Conversation
Implement the Sim-side handler for the copilot enrichment_run tool: runs the enrichment provider cascade for a single entity and returns the result inline, surfacing the hosted-key cost as _serviceCost for per-round billing (matching the media tools). Registered in the server-tool router. Regenerate the copilot tool catalog/schemas to include enrichment_run.
touch_plan was removed from the copilot tool catalog earlier, but the Sim side still referenced it. Regenerating the generated tool catalog (for enrichment_run) synced it to the current contract and dropped the stale TouchPlan export, which broke the build where router.ts still imported it. Remove the dead touch_plan server tool and its test, drop its router registration and WRITE_ACTIONS entry, simplify getServerToolRegistry (no more beta-gated server tools), and clean up stale "use touch_plan" guidance strings.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds an
Confidence Score: 3/5Safe to merge with the caveat that read-only workspace members can invoke The new tool calls real external APIs and can accrue billing costs, yet it bypasses the router's write-permission gate that every other cost-incurring tool (image, video, audio, ffmpeg) passes through. The catalog entry also lacks apps/sim/lib/copilot/tools/server/router.ts and apps/sim/lib/copilot/generated/tool-catalog-v1.ts need the missing write-permission declarations for Important Files Changed
Sequence DiagramsequenceDiagram
participant Copilot as Copilot Orchestrator
participant Router as server/router.ts
participant Tool as enrichment-run.ts
participant Registry as enrichments/registry.ts
participant Run as enrichments/run.ts
participant Ext as External Provider API
Copilot->>Router: routeExecution("enrichment_run", payload)
Note over Router: WRITE_ACTIONS check skipped<br/>(enrichment_run not in map)
Router->>Tool: "execute({ enrichmentId, inputs }, context)"
Tool->>Registry: getEnrichment(enrichmentId)
Registry-->>Tool: EnrichmentConfig
Tool->>Run: "runEnrichment(enrichment, inputs, { workspaceId })"
loop Provider cascade
Run->>Ext: executeTool(provider.toolId, params)
Ext-->>Run: response (hit / miss / error)
end
Run-->>Tool: "{ result, cost, error, provider }"
Tool-->>Router: EnrichmentRunResult + _serviceCost
Router-->>Copilot: result
|
Summary
Adds enrichment tool to mship orchestrator, cleans up dead tools like touch plan
Type of Change
Testing
Manual
Checklist