Conversation
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs FoundBased on the search results, there are related PRs addressing similar MCP resource functionality:
These PRs overlap with the functionality described in PR #35197. Review the status and content of these existing PRs to determine if they should be consolidated or if #35197 represents a comprehensive rewrite/update that supersedes them. |
16676a1 to
002cef1
Compare
6a39a50 to
84d4cc9
Compare
84d4cc9 to
ce22f7d
Compare
…e read Adds MCP client subscribeResource/unsubscribeResource support on top of upstream's existing readResource API: - New BusEvents: mcp.resource.updated, mcp.resource.list.changed - New MCP.Service methods: subscribe(client, uri), unsubscribe(client, uri), subscriptions() - New State.subscriptions tracking (Map<server, Set<uri>>) - New supportsSubscriptions helper (gates on getServerCapabilities) - New notification handlers: ResourceUpdatedNotificationSchema and ResourceListChangedNotificationSchema - readResource now auto-subscribes after a successful read - New config.mcp[name].subscriptions and config.mcp[name].autoprompt fields - TUI app.tsx surfaces resource.updated/resource.list.changed events as toasts, optionally triggering an AI prompt when autoprompt is enabled - Lifecycle test covering subscribe/unsubscribe round-trip - Stub fields added to all MCP.Service mock layers Used by Oh My Open Agents skill-loaded MCPs (WhatsApp, Envoy plugin, etc.) to react to push notifications from MCP servers.
ce22f7d to
6c20859
Compare
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Refs #28567 (partial — this PR delivers the resource-subscription slice of "full MCP client capabilities")
Re-submission of #20672 (closed by automated cleanup) and #14569 (earlier version), rebased onto current dev. The previous PR could not be reopened because the branch has been force-pushed since closure.
Type of change
What does this PR do?
Adds MCP resource subscription support on top of the upstream MCP client:
subscriptionsandautopromptfields in MCP server configmcp.resource.updatedandmcp.resource.list.changedeventsHow did you verify your code works?
test/mcp/lifecycle.test.tscovers the subscription lifecycle.bun typecheckpasses. Manual smoke test against a sample MCP server.Checklist
Refs #28567
Supersedes #29355 (closed by the inactivity bot). Rebased onto latest
devwith all merge conflicts resolved; typecheck and targeted tests pass on the fork branch.