feat(connectors): @gemstack/connectors kit + reference connector#91
Merged
Conversation
The AI-vs-Next.js benchmark is moving to suleimansh/vike-data, where the extension family it now measures (vike-auth, vike-data, vike-notifications, vike-stripe) lives. Removes the benchmarks/ harness and both bench-app-* examples, plus the better-sqlite3/sharp build approvals only they needed. examples/mcp-quickstart and all packages are untouched; build stays green.
Phase 0 of the connectors epic. New @gemstack/connectors package: the
connector contract for AI orchestration.
- defineConnector({ id, auth, tools }) declares a connector to an
external service (auth requirement + tools), validating shape + defaults.
- mountConnectors(connectors, { credentials }) composes any number into a
single @gemstack/mcp server class, namespacing tools by connector id and
resolving credentials per connector at call time.
- examples/connectors-quickstart: a runnable read-only reference connector
to copy from, driven through McpTestClient.
Built on @gemstack/mcp, framework-agnostic. 8 kit tests + 3 example tests.
# Conflicts: # pnpm-lock.yaml
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.
Closes #87. Phase 0 of the connectors epic (#86).
New
@gemstack/connectorspackage: the connector contract for AI orchestration, built on@gemstack/mcp.What
defineConnector({ id, auth, tools })— declare a connector to an external service: its auth requirement (none/pat/oauth) and its tools. Validates shape + fills defaults.mountConnectors(connectors, { credentials })— compose any number of connectors into a single@gemstack/mcpserver class. Tools are namespaced by connector id (github_list-issues) so names never collide; credentials are resolved per connector at call time and handed to each tool viactx.auth.examples/connectors-quickstart— a runnable read-only reference connector to copy from, driven throughMcpTestClient.Design
A connector only declares what it needs and what it does. It never touches env vars, OAuth, or a transport itself — the orchestrator that mounts it supplies credentials and chooses how to serve it. That split is what lets first-party and third-party connectors compose interchangeably. The mounted result is a plain
@gemstack/mcpserver, so it plugs intoMcp.web/Mcp.local/McpTestClientunchanged.Verify
pnpm --filter @gemstack/connectors test— 8 tests (validation, namespacing, credential threading, annotations, collision guard).pnpm --filter @gemstack/example-connectors-quickstart start— runs the reference connector end to end.Next:
@gemstack/connector-github(#88) builds on this.