You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Epic: Unified Connector + Tool framework — connect any system, use it from any agent (runtime · MCP · API)
Decision: connectors and tools are two layers, not one. A connector = authenticated access to an external system (auth + scopes + grant to specific resources). A tool = an LLM-callable action (name + schema + handler). A connector provides tools. One tool definition surfaces in the agent runtime, MCP, and the HTTP API.
Why (evidence, 2026-08-01 investigation)
Connectors today are ingest-only (Drive/WorkDrive import to KB); the only live connector tool is Gmail find_confirmation_link. No connector→tool bridge (lib/connector-*.ts, routes/drive.ts).
Tools are a fixed, triple-defined catalog: runtime AGENT_TOOLS/STORAGE_TOOLS + switch/case executors, and ~97 hand-written MCP tools — names even drift (search_knowledge vs search_agent_knowledge). Adding one capability = edit 3 places.
GitHub is 100% hardwired into Coder (routes/coding.ts, lib/github-issues.ts): actions status, issues, next-issue, private clone. No other agent can use GitHub. installationTokenForOwner is reusable in code but exposed nowhere.
Gated by #68 (focus bet). Write-safety shares the trust model with #75.
Status update 2026-08-04
All six children (#85–#90) are closed, implemented and tested — the boxes above were never
ticked, so this epic read as not-started. Live today: lib/connectors/registry.ts with 7
connectors (github, meta, tmux, browser, http, web-search, mcp), connectorClient auth dispatch, capabilities.tools gating, the write-consent gate (migration 0051), and all three surfaces
deriving from one ToolDef.
One gap the epic did not anticipate, found while building the first connector whose endpoint
is named by the subscriber at runtime (outbound MCP): the auth model assumes the operator knows
the remote system at build time (pre-registered client, secretRef in operator env, confidential
client). That is unfillable for a user-named endpoint. Tracked in #180 (dcr-oauth2) and #181
(unattended credential survivability); design in docs/connector-auth.md.
Epic: Unified Connector + Tool framework — connect any system, use it from any agent (runtime · MCP · API)
Decision: connectors and tools are two layers, not one. A connector = authenticated access to an external system (auth + scopes + grant to specific resources). A tool = an LLM-callable action (name + schema + handler). A connector provides tools. One tool definition surfaces in the agent runtime, MCP, and the HTTP API.
Why (evidence, 2026-08-01 investigation)
find_confirmation_link. No connector→tool bridge (lib/connector-*.ts,routes/drive.ts).AGENT_TOOLS/STORAGE_TOOLS+ switch/case executors, and ~97 hand-written MCP tools — names even drift (search_knowledgevssearch_agent_knowledge). Adding one capability = edit 3 places.routes/coding.ts,lib/github-issues.ts): actions status, issues, next-issue, private clone. No other agent can use GitHub.installationTokenForOwneris reusable in code but exposed nowhere.What exists to build on
lib/connector-oauth.ts(HMAC state + refresh-token store),instance_connector_grants(0044), envelope crypto (user_api_keys),fetch_url+ key-proxy, GitHub-App tokens.Target
ToolDef(name, description, JSON schema, handler, tier,connector?) → runtime + MCP + API auto-derive.{id, auth(oauth|token|app), scopes(read/write), grantModel(user | instance-resource), tools[]}, reusing OAuth + grants + crypto. Handlers get aconnectorClient(provider)that mints the token + enforces grant/scope.Children (sequence)
github_*tools)Non-goals
Per-connector bespoke routes (the current pattern). The point is: add a connector once, get tools everywhere, with no route/MCP/runtime duplication.
Issues (sequence)
Gated by #68 (focus bet). Write-safety shares the trust model with #75.
Status update 2026-08-04
All six children (#85–#90) are closed, implemented and tested — the boxes above were never
ticked, so this epic read as not-started. Live today:
lib/connectors/registry.tswith 7connectors (github, meta, tmux, browser, http, web-search, mcp),
connectorClientauth dispatch,capabilities.toolsgating, the write-consent gate (migration 0051), and all three surfacesderiving from one
ToolDef.One gap the epic did not anticipate, found while building the first connector whose endpoint
is named by the subscriber at runtime (outbound MCP): the auth model assumes the operator knows
the remote system at build time (pre-registered client,
secretRefin operator env, confidentialclient). That is unfillable for a user-named endpoint. Tracked in #180 (dcr-oauth2) and #181
(unattended credential survivability); design in
docs/connector-auth.md.