fix(host-cloudflare): route toolkit MCP endpoints - #1926
Open
donmasakayan wants to merge 17 commits into
Open
Conversation
…-toolkit-routes # Conflicts: # apps/host-cloudflare/src/mcp/agent-handler.ts # packages/hosts/cloudflare/src/mcp/agent-session-durable-object.test.ts # packages/hosts/cloudflare/src/mcp/agent-session-durable-object.ts
Author
|
Runtime validation update from a self-hosted Cloudflare staging deployment:
The backport is deployed on NextFinancial staging. No additional route patch was required after this validation. |
Codex Computer Use offers `persist: ["session", "always"]` in the terms of its "Allow Computer Use to use X?" prompt and remembers the app only when the answer names one. Executor lost the offer on the way in — the terms projection kept strings only — and the choice on the way out, because every adapter rebuilt the reply from `action` and `content`. So each accept was a one-time approval and the same app prompted on every call. - `ElicitationResponse.meta.persist` carries the choice; the vocabulary is closed so no host can grant more than the prompt offered. - `approvalTerms` keeps string lists, so the offered scopes reach the host. - The MCP plugin, the app-server bridge, and the MCP host (native mode) pass `_meta` through in both directions. - The model-mode `resume` tool takes `persist`; the pause output names the offered scopes and says a bare accept is one-time. - The HTTP resume API takes `persist`, and the browser approval page offers the scopes in a select. Nothing is chosen automatically. Fixes UsefulSoftwareCo#1962
…pr-1926 # Conflicts: # packages/hosts/cloudflare/src/mcp/agent-session-durable-object.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes toolkit URLs emitted by the toolkit UI, which previously reached the worker but returned a route-not-found response. It also prevents a session created for one toolkit from being replayed against the default server or another toolkit.
Validation