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 SummaryAdds a new
Confidence Score: 5/5Safe to merge — the new enrichment tool is fully gated behind write permission and correctly wired into the billing path; the touch_plan removal is complete across all layers. The write-permission gate for the cost-incurring enrichment_run tool is properly set in WRITE_ACTIONS, matching the pattern of the existing media tools. The touch_plan cleanup is thorough: catalog entry, runtime schema, server tool, test file, error message reference, and build scripts are all removed consistently. No partial deletions or dangling references were found. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant LLM as Copilot LLM
participant Router as ServerToolRouter
participant WA as WRITE_ACTIONS check
participant Tool as enrichmentRunServerTool
participant Reg as getEnrichment()
participant Run as runEnrichment()
LLM->>Router: "routeExecution("enrichment_run", {enrichmentId, inputs})"
Router->>WA: isWriteAction("enrichment_run", action)
WA-->>Router: "true (wildcard *)"
Router->>Router: isWritePermission(context.userPermission)?
alt "userPermission != write/admin"
Router-->>LLM: Error: Permission denied
else has write permission
Router->>Router: validateGeneratedToolPayload(params)
Router->>Tool: "execute({enrichmentId, inputs}, context)"
Tool->>Tool: validate workspaceId
Tool->>Reg: getEnrichment(enrichmentId)
Reg-->>Tool: enrichment config
Tool->>Run: "runEnrichment(enrichment, inputs, {workspaceId})"
Run-->>Tool: "{result, cost, error, provider}"
alt all providers failed
Tool-->>Router: throw Error(error)
else matched or no-match
Tool-->>Router: "{matched, result, provider, _serviceCost?}"
end
Router->>Router: validateGeneratedToolPayload(result, resultSchema)
Router-->>LLM: "{success: true, result}"
end
Reviews (2): Last reviewed commit: "fix(contracts): fix mship contracts" | Re-trigger Greptile |
|
@greptile |
Summary
Adds enrichment tool, cleans up dead tools
Type of Change
Testing
Manual
Checklist