Skip to content

Commit 6f4189f

Browse files
authored
improvement(mship): clean up dead tools, add enrichments (#5056)
* 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
1 parent 1c8ac05 commit 6f4189f

8 files changed

Lines changed: 292 additions & 545 deletions

File tree

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

Lines changed: 66 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,54 @@ 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: 'Label of the provider that produced the result, or null on no match.',
1114+
},
1115+
result: {
1116+
type: 'object',
1117+
description: 'Mapped output values from the winning provider (empty object on no match).',
1118+
},
1119+
},
1120+
required: ['matched', 'result'],
1121+
},
1122+
}
1123+
10761124
export const Ffmpeg: ToolCatalogEntry = {
10771125
id: 'ffmpeg',
10781126
name: 'ffmpeg',
@@ -1106,7 +1154,7 @@ export const Ffmpeg: ToolCatalogEntry = {
11061154
path: {
11071155
type: 'string',
11081156
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/...".',
1157+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
11101158
},
11111159
sandboxPath: {
11121160
type: 'string',
@@ -1126,7 +1174,7 @@ export const Ffmpeg: ToolCatalogEntry = {
11261174
path: {
11271175
type: 'string',
11281176
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/...".',
1177+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
11301178
},
11311179
sandboxPath: {
11321180
type: 'string',
@@ -1207,8 +1255,7 @@ export const Ffmpeg: ToolCatalogEntry = {
12071255
},
12081256
path: {
12091257
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".',
1258+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
12121259
},
12131260
sandboxPath: {
12141261
type: 'string',
@@ -1287,7 +1334,7 @@ export const FunctionExecute: ToolCatalogEntry = {
12871334
path: {
12881335
type: 'string',
12891336
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/...".',
1337+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
12911338
},
12921339
sandboxPath: {
12931340
type: 'string',
@@ -1307,7 +1354,7 @@ export const FunctionExecute: ToolCatalogEntry = {
13071354
path: {
13081355
type: 'string',
13091356
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/...".',
1357+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
13111358
},
13121359
sandboxPath: {
13131360
type: 'string',
@@ -1372,8 +1419,7 @@ export const FunctionExecute: ToolCatalogEntry = {
13721419
},
13731420
path: {
13741421
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".',
1422+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
13771423
},
13781424
sandboxPath: {
13791425
type: 'string',
@@ -1449,7 +1495,7 @@ export const GenerateAudio: ToolCatalogEntry = {
14491495
path: {
14501496
type: 'string',
14511497
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/...".',
1498+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
14531499
},
14541500
sandboxPath: {
14551501
type: 'string',
@@ -1469,7 +1515,7 @@ export const GenerateAudio: ToolCatalogEntry = {
14691515
path: {
14701516
type: 'string',
14711517
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/...".',
1518+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
14731519
},
14741520
sandboxPath: {
14751521
type: 'string',
@@ -1539,8 +1585,7 @@ export const GenerateAudio: ToolCatalogEntry = {
15391585
},
15401586
path: {
15411587
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".',
1588+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
15441589
},
15451590
sandboxPath: {
15461591
type: 'string',
@@ -1599,7 +1644,7 @@ export const GenerateImage: ToolCatalogEntry = {
15991644
path: {
16001645
type: 'string',
16011646
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/...".',
1647+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
16031648
},
16041649
sandboxPath: {
16051650
type: 'string',
@@ -1619,7 +1664,7 @@ export const GenerateImage: ToolCatalogEntry = {
16191664
path: {
16201665
type: 'string',
16211666
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/...".',
1667+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
16231668
},
16241669
sandboxPath: {
16251670
type: 'string',
@@ -1674,8 +1719,7 @@ export const GenerateImage: ToolCatalogEntry = {
16741719
},
16751720
path: {
16761721
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".',
1722+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
16791723
},
16801724
sandboxPath: {
16811725
type: 'string',
@@ -1737,7 +1781,7 @@ export const GenerateVideo: ToolCatalogEntry = {
17371781
path: {
17381782
type: 'string',
17391783
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/...".',
1784+
'Canonical VFS folder path, e.g. "files/Reports". By default this mounts at "/home/user/{path}".',
17411785
},
17421786
sandboxPath: {
17431787
type: 'string',
@@ -1757,7 +1801,7 @@ export const GenerateVideo: ToolCatalogEntry = {
17571801
path: {
17581802
type: 'string',
17591803
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/...".',
1804+
'Canonical VFS file path, e.g. "files/Reports/sales.csv". By default this mounts at "/home/user/{path}".',
17611805
},
17621806
sandboxPath: {
17631807
type: 'string',
@@ -1833,8 +1877,7 @@ export const GenerateVideo: ToolCatalogEntry = {
18331877
},
18341878
path: {
18351879
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".',
1880+
description: 'Canonical destination VFS path, e.g. "files/Reports/chart.png".',
18381881
},
18391882
sandboxPath: {
18401883
type: 'string',
@@ -3694,54 +3737,6 @@ export const Table: ToolCatalogEntry = {
36943737
internal: true,
36953738
}
36963739

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-
37453740
export const UpdateDeploymentVersion: ToolCatalogEntry = {
37463741
id: 'update_deployment_version',
37473742
name: 'update_deployment_version',
@@ -4627,6 +4622,7 @@ export const TOOL_CATALOG: Record<string, ToolCatalogEntry> = {
46274622
[DownloadToWorkspaceFile.id]: DownloadToWorkspaceFile,
46284623
[EditContent.id]: EditContent,
46294624
[EditWorkflow.id]: EditWorkflow,
4625+
[EnrichmentRun.id]: EnrichmentRun,
46304626
[Ffmpeg.id]: Ffmpeg,
46314627
[File.id]: File,
46324628
[FunctionExecute.id]: FunctionExecute,
@@ -4694,7 +4690,6 @@ export const TOOL_CATALOG: Record<string, ToolCatalogEntry> = {
46944690
[SetGlobalWorkflowVariables.id]: SetGlobalWorkflowVariables,
46954691
[Superagent.id]: Superagent,
46964692
[Table.id]: Table,
4697-
[TouchPlan.id]: TouchPlan,
46984693
[UpdateDeploymentVersion.id]: UpdateDeploymentVersion,
46994694
[UpdateJobHistory.id]: UpdateJobHistory,
47004695
[UpdateWorkspaceMcpServer.id]: UpdateWorkspaceMcpServer,

0 commit comments

Comments
 (0)