You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracks the known-remaining OpenCode items after the parity work landed in #109 (detection + array-form MCP), #115 (memory parser), and #116 (debounced auto-index sweep).
1. Verify the memory parser against a live OpenCode install
src/memory/opencode.ts (#115) is fixture-tested against the documented flat-JSON layout, not a real ~/.local/share/opencode. It is defensive (unrecognized shapes → no-op, never garbage), but should be smoke-tested against an actual OpenCode session before we rely on it:
Run kit memory index against a real OpenCode install; confirm sessions/messages land with correct role, content (text parts only), project/cwd, and timestamps.
Confirm the part-grouping-by-messageID assumption holds on real data.
2. Support the newer SQLite-backed OpenCode layout
Recent OpenCode (sst/opencode message-v2) persists messages/parts to SQLite (MessageTable, session.sql.ts) rather than flat storage/*.json. On such installs the current parser is a safe no-op (indexes nothing).
Detect a SQLite-backed install and read messages/parts from the DB.
Keep the flat-JSON path for older installs; pick the right reader per install.
3. Audit OpenCode's own plugin/hook system
kit audits git hooks and Claude's command/agent/skill/plugin surfaces (#94), and OpenCode's mcp server block (#87/#109), but not OpenCode's own plugin/hook mechanism (distinct from git hooks). An OpenCode plugin can run code on agent lifecycle events — same class of exec surface kit already flags elsewhere.
Identify where OpenCode declares plugins/hooks (config keys + on-disk location).
Run the existing malware/secret analyzers over them.
Notes
Items 1–2 are about memory coverage; item 3 is about security audit coverage.
All three are low-priority hardening, not regressions — current behavior on unsupported layouts is a safe no-op.
Closing — all three follow-ups are now done and on main, verified against a real OpenCode install (opencode-ai@1.17.11), not just docs:
Live-verify the memory parser ✅ — ran kit's parser against a real opencode.db; queries resolve clean against the actual schema.
SQLite-backed layout ✅ (feat(opencode): SQLite memory parser + install-gate plugin (verified against opencode-ai@1.17.x) #156) — current OpenCode dropped the flat-JSON storage/ tree entirely and moved to SQLite (~/.local/share/opencode/opencode.db, tables session/message/part with JSON data blobs). Added a read-only SQLite path (session.directory=cwd, role from message.data, text from part.data), preferring it with flat-JSON fallback for older installs.
Bonus from the same verification: the OpenCode install-gate now ships too (#156) — a generated .opencode/plugin/kit-install-gate.js that hooks the verified tool.execute.before contract and throws to block, routing through kit gate-bash. Confirmed end-to-end in CI (the dogfood-scan job).
Activity
feat(memory): index OpenCode sessions (opencode harness) (#115)
feat(agent-audit): scan OpenCode plugins for malware shapes + secrets (…
feat(opencode): SQLite memory parser + install-gate plugin (verified …
sandstream commentedon Jun 27, 2026
Closing — all three follow-ups are now done and on
main, verified against a real OpenCode install (opencode-ai@1.17.11), not just docs:opencode.db; queries resolve clean against the actual schema.storage/tree entirely and moved to SQLite (~/.local/share/opencode/opencode.db, tablessession/message/partwith JSONdatablobs). Added a read-only SQLite path (session.directory=cwd, role frommessage.data, text frompart.data), preferring it with flat-JSON fallback for older installs.agent-auditnow scans.opencode/plugin/*.{js,ts}for malware shapes + plaintext secrets.Bonus from the same verification: the OpenCode install-gate now ships too (#156) — a generated
.opencode/plugin/kit-install-gate.jsthat hooks the verifiedtool.execute.beforecontract and throws to block, routing throughkit gate-bash. Confirmed end-to-end in CI (thedogfood-scanjob).Generated by Claude Code