Repository navigation
Conversation
Resolve managed-dispatch signatures for OMP's Cursor wire shape by matching content-addressed m0/m1 root blob receipts, and derive retry identity from Cursor's root blob IDs plus the active user message. Skip Cursor's structural row comparison with an explicit diagnostic until its root serializer is modeled; the receipt and identity checks remain enforced. Refs cortexkit#880 🤖 Generated with Codebuff Co-Authored-By: Codebuff <[email protected]>
|
Waiting for This PR needs a linked issue with the |
|
Thank you for this, and for checking it against Oh My Pi 18.18.0. We're closing it because 0.49.43, released today, covers the same problem in a broader fix (#880). The Cursor part landed with a different approach: the dispatch check now matches Magic Context's managed messages against Oh My Pi's own root hashes in You're credited in the 0.49.43 release notes. If a Cursor turn is still refused on 0.49.43, the refusal now names the provider and request shape, so please open an issue with that line. |
Part of #880
Summary
OMP's Cursor provider sends an
AgentRunRequestwhose history is content-addressed inconversationState.rootPromptMessagesJson. The managed-dispatch verifier only inspectedmessages,input, or Googlecontents, so every Cursor turn failed withmissing current receipt signature.This adds a Cursor adapter that:
m[0]/m[1]messages into a receipt and matches those hashes against Cursor's root blob IDs;messageId;What this does not change
The separate refusal-path behavior (calling
ctx.abort()while OMP still sends the original payload) is not changed here.#880should keep tracking that issue independently.Validation
bun test packages/pi-plugin/src/issue-880-cursor-receipt.test.ts packages/pi-plugin/src/issue-880-provider-fence.test.ts packages/pi-plugin/src/pi-dispatch-identity.test.ts packages/pi-plugin/src/issue-683-provider-fence.test.ts— 50 passed.bun run --cwd packages/pi-plugin typecheck— passed.bunx biome check --write ...on the four touched files — passed.buildGrpcRequestCursor payload; both managed m0/m1 hashes matched the emitted root blob IDs.Harness coverage (required)
AgentRunRequestsurface does not exist there.AgentRunRequest; existing standard message paths are covered by the identity and provider-fence tests.Opened as draft because
#880does not yet carrydesign-approved.Summary by cubic
Makes Pi accept Cursor's
AgentRunRequestin OMP, fixing the managed-dispatch verifier that previously rejected every Cursor turn because it only inspectedmessages,input, or Googlecontents.conversationState.rootPromptMessagesJson, rejecting payloads missing the receipt.messageIdso retries don't appear as new turns.The separate refusal-path behavior (calling
ctx.abort()while OMP still sends the original payload) is unchanged and remains tracked in #880.Written for commit ee2affd. Summary will update on new commits.