Skip to content

feat(conversations): incremental transcript fetching via --since#12

Merged
etown merged 1 commit into
bee-computer:mainfrom
quinnypig:feat/conversations-transcript-since
Jun 27, 2026
Merged

feat(conversations): incremental transcript fetching via --since#12
etown merged 1 commit into
bee-computer:mainfrom
quinnypig:feat/conversations-transcript-since

Conversation

@quinnypig

Copy link
Copy Markdown
Contributor

What

Adds a --since <epochMs> filter to bee conversations transcript <id> (and the matching since input to the bee_get_conversation_transcript MCP tool). When set, only utterances whose timestamp is >= since are returned.

Why

A live-transcript watcher currently has to refetch the entire flattened utterance stream on every poll and diff it locally to find what's new. --since pushes that boundary to the request, so a watcher can poll for only new utterances without maintaining client-side "seen" state. The transcript subcommand is the right home for this since it is purpose-built to return the flattened utterance stream (unlike get, which returns the whole conversation document).

Details

  • New CLI flag --since of kind int (epoch milliseconds), consistent with bee search --since. USAGE updated to bee conversations transcript <id> [--since <epochMs>] [--json].
  • Filtering uses the same timestamp key the codebase already uses to order utterances in the detail document: spoken_at ?? start.
  • Utterances with null/missing timestamp are excluded when --since is set — with no timestamp they cannot be ordered against the bound (a watcher would otherwise re-emit them every poll). With --since omitted, behavior is unchanged.
  • Return shape is preserved ({ conversationId, transcript, note }); the applied since is echoed back only when supplied.
  • CLI and MCP stay at parity: an optional integer since is added to the tool inputSchema and the tool snapshot.

Tests

  • transcript --since filters out older utterances, keeps the boundary and newer ones, honors the start fallback, and excludes null-timestamp utterances.
  • Omitting --since leaves the transcript unfiltered and omits since from the response.
  • bun run typecheck, bun run build, and bun test all pass locally (300 tests, 0 fail).

Heads-up: verifying locally required working around #10 (a fresh bun install 401s because the lockfile resolves to a private registry). No lockfile changes are included in this PR.

Enable incremental transcript polling: `bee conversations transcript <id>
--since <epochMs>` returns only utterances spoken at or after the given
epoch-millisecond bound, so a live-transcript watcher can fetch just the new
utterances each poll instead of refetching the full transcript and diffing
client-side.

Filtering uses the same `spoken_at ?? start` ordering key as the conversation
detail document. Utterances with no timestamp are excluded when --since is set
(they cannot be ordered against the bound). Omitting --since is unchanged. The
matching optional `since` integer is added to the bee_get_conversation_transcript
MCP tool so the CLI and MCP surfaces stay at parity.
@etown etown merged commit 2b08918 into bee-computer:main Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants