Skip to content

Add opt-in prompts/get handler to AppBridge - #879

Open
mangeshraut712 wants to merge 1 commit into
modelcontextprotocol:mainfrom
mangeshraut712:fix/app-bridge-get-prompt-876
Open

mangeshraut712 wants to merge 1 commit into
modelcontextprotocol:mainfrom
mangeshraut712:fix/app-bridge-get-prompt-876

Conversation

@mangeshraut712

Copy link
Copy Markdown

Fixes #876.

Adds an opt-in AppBridge.ongetprompt handler for view-originated prompts/get requests. The callback receives the typed request parameters and request context, and returns a GetPromptResult. Hosts can apply their own policy before fetching a prompt. Without a handler, or after it is cleared, the bridge returns Method not found.

Verification

  • The in-memory App/AppBridge regression failed on upstream main with JSON-RPC -32601 after handler assignment. With the change it verifies the prompt name and arguments, returned messages, and Method not found before setup and after removal.
  • Built the SDK and ran bun test src examples: 455 passed, 3 skipped, 0 failed.
  • TypeScript build, Prettier for both changed files, and git diff --check passed.

AI assistance disclosure: OpenAI Codex helped investigate issue #876, implement the handler and regression test, run verification, and draft this PR.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-29T16:49:41.454632Z
We couldn’t complete this review. Comment @codex review to try again.
f7ee997 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@mangeshraut712

Copy link
Copy Markdown
Author

Verified locally on commit f7ee9971d63aaff97c9dbf7230a9d47184327559. The SDK build passed, and bun test src examples finished with 455 passed, 3 skipped, 0 failed. The in-memory prompts/get regression passed, including the explicit handler and the behavior before registration and after removal.

Hosted CI remains with the maintainers for approval. OpenAI Codex ran the local verification and drafted this update.

This branch has not been deployed

No deployments
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.

AppBridge: views can list prompts but not get one (no prompts/get handler)

1 participant