chore(trpc,mcp,cli,sdk,desktop): remove dead mcpScope plumbing

Merged
SA
3mo ago
+0-25

What

Removes mcpScope from every surface that carries it:

  • tRPC createAutomationSchema / updateAutomationSchema and the router
  • MCP automations.create / automations.update tool inputs
  • CLI automations create and the --mcp-scope flag on automations update
  • SDK Automation, AutomationCreateParams, AutomationUpdateParams
  • Desktop CreateAutomationDialog

The automations.mcp_scope column stays.

Why

It has never had a consumer. dispatch.ts builds the agents.run payload from agent and prompt and never passes it, and MCP was hardcoded disableMcp: true when automations shipped.

Every caller writes [] unconditionally:

  • CreateAutomationDialog.tsx hardcodes mcpScope: []
  • cli/automations/create hardcodes mcpScope: []
  • the tRPC schema defaults it to []

So it is a field users can set through three public surfaces that has no effect anywhere.

Why the column stays

Dropping it now would break currently deployed code, since Drizzle selects columns explicitly and running instances still name mcp_scope in their SELECT. It drops alongside rrule, dtstart, timezone, and next_run_at once the automation trigger cutover is complete and nothing reads the legacy columns.

Note on public surfaces

This removes a field from the CLI and SDK. It is technically a breaking change for anyone passing mcpScope, but passing it has never done anything, so nothing can regress behaviourally.

Testing

  • bun run typecheck — 37/37 packages
  • bun run lint — clean
  • bun test packages/trpc packages/cli apps/api — 131 pass
  • grep confirms the only remaining reference is the column definition

Summary by cubic

Removes the unused mcpScope field from automation create/update across tRPC, MCP tools, CLI, SDK types, and the desktop dialog. The field never affected execution; the database column remains to avoid breaking running instances.

  • Migration/rollout:
    • Remove --mcp-scope from any automations update CLI usage.
    • Stop sending mcpScope in SDK payloads and tRPC/MCP inputs; delete references to Automation.mcpScope, AutomationCreateParams.mcpScope, and AutomationUpdateParams.mcpScope.
    • The automations.mcp_scope column stays for now and will be dropped with other legacy trigger columns after the cutover.