Skip to content

CAP-983: setup tags its conversation so Keep opens it - #543

Merged
cvince merged 2 commits into
feat/onboarding-v2from
feat/cap-983-pairing-handoff
Dec 2, 2026
Merged

cvince merged 2 commits into
feat/onboarding-v2from
feat/cap-983-pairing-handoff

Conversation

@cvince

@cvince cvince commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

CAP-983, spec 3o ("After the code, Keep opens the setup conversation itself").

  • capy pair pickup keeps the sealed handoff secret in memory for this run only. It is kept only after the keys are installed, only for the bound org and user, only if it is exactly 32 bytes, and it is never written to disk.
  • Opening setup's conversation takes the secret once and tags the conversation with HMAC(secret, lp("capy.conv.handoff.v1", id, cli_pub)) through POST /flows/:id/handoff. The secret is dropped before the call.
  • When the service says the pairing tab is waiting, CONVERSATION_OPEN carries elicitation.opens_in_keep: true, and its message tells the agent not to post the link. The flag is kept in the recovery state.
  • No silent failure: if Keep hasn't opened the conversation within 45 seconds, the wait returns CONVERSATION_NOT_OPENED_IN_KEEP (exit 3) with the link. Later waits are ordinary.
  • The AGENTS block, the elicitation conventions and docs/cli-reference.md (regenerated) say when to show the link.

Tests: 4 new in setupConversation.test.ts and 2 new in pairCommand.test.ts. The full suite fails the same 170 tests as the base branch in this sandbox, all unrelated to this change. docs:cli:check passes.

… the second link

The pair payload's handoff secret is kept in memory for the capy setup --code
run once the keys are installed. Opening setup's conversation tags it with
HMAC(secret, id, cli_pub) and asks the service whether the pairing tab is
waiting. CONVERSATION_OPEN then carries opens_in_keep, and a wait that sees no
hello within 45 seconds returns CONVERSATION_NOT_OPENED_IN_KEEP with the link.
AGENTS block, elicitation conventions and cli-reference say when to show it
(spec 3o).
@cvince
cvince merged commit b50cf18 into feat/onboarding-v2 Dec 2, 2026
1 check passed
cvince added a commit that referenced this pull request Dec 6, 2026
… the second link (#543)

The pair payload's handoff secret is kept in memory for the capy setup --code
run once the keys are installed. Opening setup's conversation tags it with
HMAC(secret, id, cli_pub) and asks the service whether the pairing tab is
waiting. CONVERSATION_OPEN then carries opens_in_keep, and a wait that sees no
hello within 45 seconds returns CONVERSATION_NOT_OPENED_IN_KEEP with the link.
AGENTS block, elicitation conventions and cli-reference say when to show it
(spec 3o).
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