Skip to content

fix: restore OpenCode v2 auto-capture (#331) - #332

Merged
EyJunge1 merged 1 commit into
tickernelz:mainfrom
EyJunge1:fix/v2-auto-capture-session-idle
Oct 1, 2026
Merged

EyJunge1 merged 1 commit into
tickernelz:mainfrom
EyJunge1:fix/v2-auto-capture-session-idle

Conversation

@EyJunge1

Copy link
Copy Markdown
Collaborator

Summary

  • Map OpenCode v2 session.execution.succeeded to legacy session.idle so auto-capture and profile learning actually trigger.
  • Enable SDK structured-output transport when setV2Client receives a session-capable client, fixing native v2 hosts that have no serverUrl.
  • Adds regression tests for both paths.

Fixes #331

Test plan

  • bun test tests/v2-legacy-client.test.ts tests/opencode-provider.test.ts
  • On OpenCode v2: multi-turn conversation, wait >10s idle, confirm capture_attempts > 0 / memories written
  • Confirm Turso/other worktrees unaffected

Map session.execution.succeeded to session.idle and enable SDK
structured output when setV2Client receives a session-capable client,
so native v2 hosts can run auto-capture without a server URL.
@EyJunge1

EyJunge1 commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator Author

@tickernelz Could you please merge this and then release it so that users can use the new v2 API?

@tickernelz

Copy link
Copy Markdown
Owner

@tickernelz Could you please merge this and then release it so that users can use the new v2 API?

you are invited become collaborators, now you can continue maintain this project. you can merge, and release new versions

@EyJunge1
EyJunge1 merged commit 16d7c99 into tickernelz:main Oct 1, 2026
8 checks passed
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.

[BUG] Auto-capture and profile learning never run on OpenCode v2: session.idle is not delivered and SDK transport is never initialized

2 participants