Skip to content

OpenCode adapter - #13

Merged
lukemaj merged 8 commits into
integration/mac-observerfrom
task/2-opencode
Sep 24, 2026
Merged

lukemaj merged 8 commits into
integration/mac-observerfrom
task/2-opencode

Conversation

@lukemaj

@lukemaj lukemaj commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Component PR into integration/mac-observer: the OpenCode adapter.

Imports OpenCode's session database (~/.local/share/opencode/opencode.db, opened read-only with mode=ro): sessions, assistant messages with usage per completed message, parts as events (tool calls with pending and running states reconciled, multi-file patches with every path), child sessions as synthetic. Unknown schema variants and malformed rows are quarantined; malformed token counters are quarantined under malformed_usage. Every privacy rule goes through agent_observer/privacy.py, with versioned re-import that corrects older rows.

Refs #2.

Proof

Candidate 34b7823 on integration 78f9ae3: python3 -m unittest discover -s tests OK (full suite). A live read-only sync of this Mac's database imported 229 sessions and 5,627 responses with no failures (job ao-opencode-1).

Review

Independent Luna reviews over eight rounds drove corrections through Model Router jobs ao-opencode-2 to ao-opencode-8; the last review: APPROVE, no findings.

🤖 Generated with Claude Code

lukemaj and others added 8 commits September 24, 2026 02:57
Implemented by a Model Router worker (ao-opencode-1, Muse Spark on Zen free).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… variants (#2)

Addresses the independent review of 1ded9c7 through Model Router job
ao-opencode-2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed fail-closed, parts without ids quarantined (#2)

Addresses the delta review of f90acd3 through Model Router job ao-opencode-3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Addresses the delta review of 57186d7 through Model Router job ao-opencode-4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removes the adapter's private privacy rules in favor of agent_observer/privacy.py
and fixes versioned revalidation, event upserts, target and hash types and
import_errors deduplication, through Model Router job ao-opencode-5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… synthetic fails closed (#2)

Addresses the review of 580bbf8 through Model Router job ao-opencode-6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pes quarantined (#2)

Addresses the review of 079c44b through Model Router job ao-opencode-7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uarantined (#2)

Addresses the review of b6c4672 through Model Router job ao-opencode-8.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lukemaj
lukemaj merged commit 0836bbb into integration/mac-observer Sep 24, 2026
1 check passed
@lukemaj
lukemaj deleted the task/2-opencode branch September 24, 2026 00:58
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.

1 participant