Skip to content

Commit cefb2dc

Browse files
authored
improvement(mship): add enrichment tool, clean up dead tools (#5058)
* feat(mothership): add enrichment_run server tool for one-off lookups 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. * fix(mothership): remove leftover touch_plan tool references 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. * chore(mothership): trigger dev redeploy * improvement(mothership): log billed cost on enrichment_run lookups * fix(contracts): regenerate mship contracts * fix(contracts): fix mship contracts
1 parent 1750043 commit cefb2dc

11 files changed

Lines changed: 297 additions & 625 deletions

File tree

apps/sim/lib/copilot/generated/tool-catalog-v1.ts

Lines changed: 68 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export interface ToolCatalogEntry {
3030
| 'download_to_workspace_file'
3131
| 'edit_content'
3232
| 'edit_workflow'
33+
| 'enrichment_run'
3334
| 'ffmpeg'
3435
| 'file'
3536
| 'function_execute'
@@ -97,7 +98,6 @@ export interface ToolCatalogEntry {
9798
| 'set_global_workflow_variables'
9899
| 'superagent'
99100
| 'table'
100-
| 'touch_plan'
101101
| 'update_deployment_version'
102102
| 'update_job_history'
103103
| 'update_workspace_mcp_server'
@@ -131,6 +131,7 @@ export interface ToolCatalogEntry {
131131
| 'download_to_workspace_file'
132132
| 'edit_content'
133133
| 'edit_workflow'
134+
| 'enrichment_run'
134135
| 'ffmpeg'
135136
| 'file'
136137
| 'function_execute'
@@ -198,7 +199,6 @@ export interface ToolCatalogEntry {
198199
| 'set_global_workflow_variables'
199200
| 'superagent'
200201
| 'table'
201-
| 'touch_plan'
202202
| 'update_deployment_version'
203203
| 'update_job_history'
204204
| 'update_workspace_mcp_server'
@@ -1073,6 +1073,56 @@ export const EditWorkflow: ToolCatalogEntry = {
10731073
requiredPermission: 'write',
10741074
}
10751075

1076+
export const EnrichmentRun: ToolCatalogEntry = {
1077+
id: 'enrichment_run',
1078+
name: 'enrichment_run',
1079+
route: 'sim',
1080+
mode: 'async',
1081+
parameters: {
1082+
type: 'object',
1083+
properties: {
1084+
enrichmentId: {
1085+
type: 'string',
1086+
description:
1087+
"Which enrichment to run. Discover the full set and each one's inputs/outputs via user_table.list_enrichments.",
1088+
enum: [
1089+
'work-email',
1090+
'phone-number',
1091+
'company-domain',
1092+
'company-info',
1093+
'email-verification',
1094+
],
1095+
},
1096+
inputs: {
1097+
type: 'object',
1098+
description:
1099+
'Map of the enrichment\'s input id → value, e.g. { "fullName": "Jane Doe", "companyDomain": "acme.com" }. Provide a value for every required input.',
1100+
},
1101+
},
1102+
required: ['enrichmentId', 'inputs'],
1103+
},
1104+
resultSchema: {
1105+
type: 'object',
1106+
properties: {
1107+
matched: {
1108+
type: 'boolean',
1109+
description: 'True when a provider returned a non-empty result.',
1110+
},
1111+
provider: {
1112+
type: 'string',
1113+
description:
1114+
'Internal label of the provider that produced the result (billing/diagnostics only — do NOT surface it to the user), or null on no match.',
1115+
},
1116+
result: {
1117+
type: 'object',
1118+
description: 'Mapped output values from the winning provider (empty object on no match).',
1119+
},
1120+
},
1121+
required: ['matched', 'result'],
1122+
},
1123+
requiredPermission: 'write',
1124+
}
1125+
10761126
export const Ffmpeg: ToolCatalogEntry = {
10771127
id: 'ffmpeg',
10781128
name: 'ffmpeg',
@@ -1106,7 +1156,7 @@ export const Ffmpeg: ToolCatalogEntry = {
11061156
path: {
11071157
type: 'string',
11081158
description:
1109-
'Canonical VFS folder path, e.g. "files/Reports" or "workflows/My%20Workflow/.plans". By default this mounts at "/home/user/{path}". Workflow alias directories mount under "/home/user/workflows/...".',
1159+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
11101160
},
11111161
sandboxPath: {
11121162
type: 'string',
@@ -1126,7 +1176,7 @@ export const Ffmpeg: ToolCatalogEntry = {
11261176
path: {
11271177
type: 'string',
11281178
description:
1129-
'Canonical VFS file path, e.g. "files/Reports/sales.csv" or "workflows/My%20Workflow/changelog.md". By default this mounts at "/home/user/{path}". Workflow alias paths mount under "/home/user/workflows/...".',
1179+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
11301180
},
11311181
sandboxPath: {
11321182
type: 'string',
@@ -1207,8 +1257,7 @@ export const Ffmpeg: ToolCatalogEntry = {
12071257
},
12081258
path: {
12091259
type: 'string',
1210-
description:
1211-
'Canonical destination VFS path, e.g. "files/Reports/chart.png", "workflows/My%20Workflow/changelog.md", or "workflows/My%20Workflow/.plans/plan.md".',
1260+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
12121261
},
12131262
sandboxPath: {
12141263
type: 'string',
@@ -1287,7 +1336,7 @@ export const FunctionExecute: ToolCatalogEntry = {
12871336
path: {
12881337
type: 'string',
12891338
description:
1290-
'Canonical VFS folder path, e.g. "files/Reports" or "workflows/My%20Workflow/.plans". By default this mounts at "/home/user/{path}". Workflow alias directories mount under "/home/user/workflows/...".',
1339+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
12911340
},
12921341
sandboxPath: {
12931342
type: 'string',
@@ -1307,7 +1356,7 @@ export const FunctionExecute: ToolCatalogEntry = {
13071356
path: {
13081357
type: 'string',
13091358
description:
1310-
'Canonical VFS file path, e.g. "files/Reports/sales.csv" or "workflows/My%20Workflow/changelog.md". By default this mounts at "/home/user/{path}". Workflow alias paths mount under "/home/user/workflows/...".',
1359+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
13111360
},
13121361
sandboxPath: {
13131362
type: 'string',
@@ -1372,8 +1421,7 @@ export const FunctionExecute: ToolCatalogEntry = {
13721421
},
13731422
path: {
13741423
type: 'string',
1375-
description:
1376-
'Canonical destination VFS path, e.g. "files/Reports/chart.png", "workflows/My%20Workflow/changelog.md", or "workflows/My%20Workflow/.plans/plan.md".',
1424+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
13771425
},
13781426
sandboxPath: {
13791427
type: 'string',
@@ -1449,7 +1497,7 @@ export const GenerateAudio: ToolCatalogEntry = {
14491497
path: {
14501498
type: 'string',
14511499
description:
1452-
'Canonical VFS folder path, e.g. "files/Reports" or "workflows/My%20Workflow/.plans". By default this mounts at "/home/user/{path}". Workflow alias directories mount under "/home/user/workflows/...".',
1500+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
14531501
},
14541502
sandboxPath: {
14551503
type: 'string',
@@ -1469,7 +1517,7 @@ export const GenerateAudio: ToolCatalogEntry = {
14691517
path: {
14701518
type: 'string',
14711519
description:
1472-
'Canonical VFS file path, e.g. "files/Reports/sales.csv" or "workflows/My%20Workflow/changelog.md". By default this mounts at "/home/user/{path}". Workflow alias paths mount under "/home/user/workflows/...".',
1520+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
14731521
},
14741522
sandboxPath: {
14751523
type: 'string',
@@ -1539,8 +1587,7 @@ export const GenerateAudio: ToolCatalogEntry = {
15391587
},
15401588
path: {
15411589
type: 'string',
1542-
description:
1543-
'Canonical destination VFS path, e.g. "files/Reports/chart.png", "workflows/My%20Workflow/changelog.md", or "workflows/My%20Workflow/.plans/plan.md".',
1590+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
15441591
},
15451592
sandboxPath: {
15461593
type: 'string',
@@ -1599,7 +1646,7 @@ export const GenerateImage: ToolCatalogEntry = {
15991646
path: {
16001647
type: 'string',
16011648
description:
1602-
'Canonical VFS folder path, e.g. "files/Reports" or "workflows/My%20Workflow/.plans". By default this mounts at "/home/user/{path}". Workflow alias directories mount under "/home/user/workflows/...".',
1649+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
16031650
},
16041651
sandboxPath: {
16051652
type: 'string',
@@ -1619,7 +1666,7 @@ export const GenerateImage: ToolCatalogEntry = {
16191666
path: {
16201667
type: 'string',
16211668
description:
1622-
'Canonical VFS file path, e.g. "files/Reports/sales.csv" or "workflows/My%20Workflow/changelog.md". By default this mounts at "/home/user/{path}". Workflow alias paths mount under "/home/user/workflows/...".',
1669+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
16231670
},
16241671
sandboxPath: {
16251672
type: 'string',
@@ -1674,8 +1721,7 @@ export const GenerateImage: ToolCatalogEntry = {
16741721
},
16751722
path: {
16761723
type: 'string',
1677-
description:
1678-
'Canonical destination VFS path, e.g. "files/Reports/chart.png", "workflows/My%20Workflow/changelog.md", or "workflows/My%20Workflow/.plans/plan.md".',
1724+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
16791725
},
16801726
sandboxPath: {
16811727
type: 'string',
@@ -1737,7 +1783,7 @@ export const GenerateVideo: ToolCatalogEntry = {
17371783
path: {
17381784
type: 'string',
17391785
description:
1740-
'Canonical VFS folder path, e.g. "files/Reports" or "workflows/My%20Workflow/.plans". By default this mounts at "/home/user/{path}". Workflow alias directories mount under "/home/user/workflows/...".',
1786+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
17411787
},
17421788
sandboxPath: {
17431789
type: 'string',
@@ -1757,7 +1803,7 @@ export const GenerateVideo: ToolCatalogEntry = {
17571803
path: {
17581804
type: 'string',
17591805
description:
1760-
'Canonical VFS file path, e.g. "files/Reports/sales.csv" or "workflows/My%20Workflow/changelog.md". By default this mounts at "/home/user/{path}". Workflow alias paths mount under "/home/user/workflows/...".',
1806+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
17611807
},
17621808
sandboxPath: {
17631809
type: 'string',
@@ -1833,8 +1879,7 @@ export const GenerateVideo: ToolCatalogEntry = {
18331879
},
18341880
path: {
18351881
type: 'string',
1836-
description:
1837-
'Canonical destination VFS path, e.g. "files/Reports/chart.png", "workflows/My%20Workflow/changelog.md", or "workflows/My%20Workflow/.plans/plan.md".',
1882+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
18381883
},
18391884
sandboxPath: {
18401885
type: 'string',
@@ -3694,54 +3739,6 @@ export const Table: ToolCatalogEntry = {
36943739
internal: true,
36953740
}
36963741

3697-
export const TouchPlan: ToolCatalogEntry = {
3698-
id: 'touch_plan',
3699-
name: 'touch_plan',
3700-
route: 'sim',
3701-
mode: 'async',
3702-
parameters: {
3703-
type: 'object',
3704-
properties: {
3705-
name: {
3706-
type: 'string',
3707-
description:
3708-
'Plan file name or relative path under .plans, e.g. "implementation.md" or "phase-1/implementation.md". If no extension is supplied, ".md" is appended.',
3709-
},
3710-
scope: {
3711-
type: 'string',
3712-
description:
3713-
'Plan scope. Use "workspace" for root .plans/** main-agent plans. Use "workflow" for workflows/{workflow}/.plans/** subplans. If omitted with workflowPath, workflow scope is assumed; otherwise workspace scope is assumed.',
3714-
enum: ['workspace', 'workflow'],
3715-
},
3716-
title: {
3717-
type: 'string',
3718-
description: 'Optional short user-visible label for the plan creation.',
3719-
},
3720-
workflowPath: {
3721-
type: 'string',
3722-
description:
3723-
'Required for scope "workflow". Canonical workflow VFS path, e.g. "workflows/My%20Workflow" or "workflows/Folder/My%20Workflow". Copy paths verbatim from glob/read/grep output — they are percent-encoded per segment (spaces are %20, an in-name slash is %2F; parentheses and dots stay literal). Both the encoded path and the plain name resolve, so copy the returned path exactly rather than retyping or decoding it. Do not use workflow IDs.',
3724-
},
3725-
},
3726-
required: ['name'],
3727-
},
3728-
resultSchema: {
3729-
type: 'object',
3730-
properties: {
3731-
data: {
3732-
type: 'object',
3733-
description:
3734-
'Contains id, name, scope, vfsPath, backingVfsPath, and workflowId for workflow plans. Use vfsPath for follow-up workspace_file calls.',
3735-
},
3736-
message: { type: 'string', description: 'Human-readable outcome.' },
3737-
success: { type: 'boolean', description: 'Whether the plan file was created.' },
3738-
},
3739-
required: ['success', 'message'],
3740-
},
3741-
requiredPermission: 'write',
3742-
capabilities: ['file_output'],
3743-
}
3744-
37453742
export const UpdateDeploymentVersion: ToolCatalogEntry = {
37463743
id: 'update_deployment_version',
37473744
name: 'update_deployment_version',
@@ -4627,6 +4624,7 @@ export const TOOL_CATALOG: Record<string, ToolCatalogEntry> = {
46274624
[DownloadToWorkspaceFile.id]: DownloadToWorkspaceFile,
46284625
[EditContent.id]: EditContent,
46294626
[EditWorkflow.id]: EditWorkflow,
4627+
[EnrichmentRun.id]: EnrichmentRun,
46304628
[Ffmpeg.id]: Ffmpeg,
46314629
[File.id]: File,
46324630
[FunctionExecute.id]: FunctionExecute,
@@ -4694,7 +4692,6 @@ export const TOOL_CATALOG: Record<string, ToolCatalogEntry> = {
46944692
[SetGlobalWorkflowVariables.id]: SetGlobalWorkflowVariables,
46954693
[Superagent.id]: Superagent,
46964694
[Table.id]: Table,
4697-
[TouchPlan.id]: TouchPlan,
46984695
[UpdateDeploymentVersion.id]: UpdateDeploymentVersion,
46994696
[UpdateJobHistory.id]: UpdateJobHistory,
47004697
[UpdateWorkspaceMcpServer.id]: UpdateWorkspaceMcpServer,

0 commit comments

Comments
 (0)