Skip to content

Add direct OpenCode stream ingest - #197

Merged
willwashburn merged 4 commits into
mainfrom
opencode-stream-direct-ingest
Apr 29, 2026
Merged

willwashburn merged 4 commits into
mainfrom
opencode-stream-direct-ingest

Conversation

@willwashburn

@willwashburn willwashburn commented Apr 29, 2026 •

Copy link
Copy Markdown
Member

Closes #92

Summary:

  • Add a reader-level OpenCode stream ingestor that normalizes SSE events into turns, content, user turns, relationships, and tool-result events for sessions observed from session.created.
  • Wire burn watch --opencode-stream to append stream-derived records, persist the Last-Event-ID cursor, and keep file polling as the fallback/drift path.
  • Add conservative per-tool usage attribution for OpenCode tool-result events and content sidecar dedupe for stream/file overlap.
  • Keep already-running sessions on file fallback to avoid stream event-index drift.

Tests:

  • pnpm run build
  • pnpm run test
  • node --test --test-reporter=spec packages/reader/dist/opencode-stream.test.js packages/reader/dist/opencode.test.js packages/cli/dist/opencode-stream.test.js packages/ledger/dist/content.test.js

Open in Devin Review

chatgpt-codex-connector[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@willwashburn
willwashburn merged commit feb8f4c into main Apr 29, 2026
2 checks passed
@willwashburn
willwashburn deleted the opencode-stream-direct-ingest branch April 29, 2026 05:49
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.

Strategy C: OpenCode server event-stream intercept for finer-than-file attribution grain

1 participant