Skip to content

Commit 797076c

Browse files
committed
Checkpoint
1 parent ac108e4 commit 797076c

5 files changed

Lines changed: 84 additions & 28 deletions

File tree

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

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,25 @@ export const Browser: ToolCatalogEntry = {
295295
mode: 'async',
296296
parameters: {
297297
properties: {
298+
sessionId: {
299+
description:
300+
'Reusable session ID returned by an earlier browser call in this chat. Supply it only on a later user message that continues the same browsing objective, and at most once per user message.',
301+
type: 'string',
302+
},
298303
task: {
299304
description:
300-
'The web task to complete, in plain language (include the target site/URL if known).',
305+
"Optional brief scoping instruction that the conversation does not already convey. Do not restate the user's request.",
306+
type: 'string',
307+
},
308+
title: {
309+
description:
310+
"Required private orchestration label (3–8 words) for this Browser Agent session's stable objective. When resuming with sessionId, copy the registry title unchanged.",
311+
maxLength: 120,
312+
minLength: 1,
301313
type: 'string',
302314
},
303315
},
304-
required: ['task'],
316+
required: ['title'],
305317
type: 'object',
306318
},
307319
subagentId: 'browser',
@@ -1248,16 +1260,14 @@ export const Cp: ToolCatalogEntry = {
12481260
properties: {
12491261
destination: {
12501262
type: 'string',
1251-
maxLength: 4096,
12521263
description:
12531264
'Target path under workflows/. An existing folder (or a path ending in "/") duplicates sources into it keeping their names; otherwise the last segment names the copy and the preceding segments are the target folder (created automatically when missing).',
12541265
},
12551266
sources: {
12561267
type: 'array',
1257-
maxItems: 100,
12581268
description:
12591269
'Canonical workflow VFS paths to duplicate, e.g. ["workflows/My%20Workflow"]. Copy paths verbatim from glob/grep/read output.',
1260-
items: { type: 'string', maxLength: 4096 },
1270+
items: { type: 'string' },
12611271
},
12621272
toolTitle: {
12631273
type: 'string',
@@ -3268,6 +3278,26 @@ export const KnowledgeBase: ToolCatalogEntry = {
32683278
'Field type: text, number, date, boolean (optional for create_tag, defaults to text)',
32693279
enum: ['text', 'number', 'date', 'boolean'],
32703280
},
3281+
tagValues: {
3282+
type: 'array',
3283+
description:
3284+
'Typed tag values to set on this document (optional for update_document). Resolve tagDefinitionId with list_tags first. Use null to clear a value.',
3285+
items: {
3286+
type: 'object',
3287+
properties: {
3288+
tagDefinitionId: {
3289+
type: 'string',
3290+
description: 'Tag definition ID returned by list_tags.',
3291+
},
3292+
value: {
3293+
type: ['string', 'number', 'boolean', 'null'],
3294+
description:
3295+
"Value matching the tag definition's field type: string for text, number for number, YYYY-MM-DD string for date, boolean for boolean, or null to clear.",
3296+
},
3297+
},
3298+
required: ['tagDefinitionId', 'value'],
3299+
},
3300+
},
32713301
topK: {
32723302
type: 'number',
32733303
description: 'Number of results to return (1-50, default: 5)',
@@ -3716,10 +3746,9 @@ export const Mkdir: ToolCatalogEntry = {
37163746
properties: {
37173747
paths: {
37183748
type: 'array',
3719-
maxItems: 100,
37203749
description:
37213750
'Canonical folder VFS paths to create, e.g. ["files/Reports/2026"]. Missing parent segments are created automatically.',
3722-
items: { type: 'string', maxLength: 4096 },
3751+
items: { type: 'string' },
37233752
},
37243753
toolTitle: {
37253754
type: 'string',
@@ -3742,16 +3771,14 @@ export const Mv: ToolCatalogEntry = {
37423771
properties: {
37433772
destination: {
37443773
type: 'string',
3745-
maxLength: 4096,
37463774
description:
37473775
'Target path. A path ending in "/" (or naming an existing folder) moves sources into it keeping their names — always use the trailing "/" form when targeting a folder. Otherwise the last segment is the new name and the preceding segments are the target folder (created automatically when missing).',
37483776
},
37493777
sources: {
37503778
type: 'array',
3751-
maxItems: 100,
37523779
description:
37533780
'Canonical VFS paths to move or rename, e.g. ["files/draft.md"]. All sources must share one category. Copy paths verbatim from glob/grep/read output.',
3754-
items: { type: 'string', maxLength: 4096 },
3781+
items: { type: 'string' },
37553782
},
37563783
toolTitle: {
37573784
type: 'string',
@@ -4184,10 +4211,9 @@ export const Rm: ToolCatalogEntry = {
41844211
properties: {
41854212
paths: {
41864213
type: 'array',
4187-
maxItems: 100,
41884214
description:
41894215
'Canonical VFS paths to delete, e.g. ["files/Reports/draft.md"]. Copy paths verbatim from glob/grep/read output. Paths from different categories may be mixed in one call.',
4190-
items: { type: 'string', maxLength: 4096 },
4216+
items: { type: 'string' },
41914217
},
41924218
toolTitle: {
41934219
type: 'string',

‎apps/sim/lib/copilot/generated/tool-schemas-v1.ts‎

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,25 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
3939
browser: {
4040
parameters: {
4141
properties: {
42+
sessionId: {
43+
description:
44+
'Reusable session ID returned by an earlier browser call in this chat. Supply it only on a later user message that continues the same browsing objective, and at most once per user message.',
45+
type: 'string',
46+
},
4247
task: {
4348
description:
44-
'The web task to complete, in plain language (include the target site/URL if known).',
49+
"Optional brief scoping instruction that the conversation does not already convey. Do not restate the user's request.",
50+
type: 'string',
51+
},
52+
title: {
53+
description:
54+
"Required private orchestration label (3–8 words) for this Browser Agent session's stable objective. When resuming with sessionId, copy the registry title unchanged.",
55+
maxLength: 120,
56+
minLength: 1,
4557
type: 'string',
4658
},
4759
},
48-
required: ['task'],
60+
required: ['title'],
4961
type: 'object',
5062
},
5163
resultSchema: undefined,
@@ -1112,18 +1124,15 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
11121124
properties: {
11131125
destination: {
11141126
type: 'string',
1115-
maxLength: 4096,
11161127
description:
11171128
'Target path under workflows/. An existing folder (or a path ending in "/") duplicates sources into it keeping their names; otherwise the last segment names the copy and the preceding segments are the target folder (created automatically when missing).',
11181129
},
11191130
sources: {
11201131
type: 'array',
1121-
maxItems: 100,
11221132
description:
11231133
'Canonical workflow VFS paths to duplicate, e.g. ["workflows/My%20Workflow"]. Copy paths verbatim from glob/grep/read output.',
11241134
items: {
11251135
type: 'string',
1126-
maxLength: 4096,
11271136
},
11281137
},
11291138
toolTitle: {
@@ -3164,6 +3173,26 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
31643173
'Field type: text, number, date, boolean (optional for create_tag, defaults to text)',
31653174
enum: ['text', 'number', 'date', 'boolean'],
31663175
},
3176+
tagValues: {
3177+
type: 'array',
3178+
description:
3179+
'Typed tag values to set on this document (optional for update_document). Resolve tagDefinitionId with list_tags first. Use null to clear a value.',
3180+
items: {
3181+
type: 'object',
3182+
properties: {
3183+
tagDefinitionId: {
3184+
type: 'string',
3185+
description: 'Tag definition ID returned by list_tags.',
3186+
},
3187+
value: {
3188+
type: ['string', 'number', 'boolean', 'null'],
3189+
description:
3190+
"Value matching the tag definition's field type: string for text, number for number, YYYY-MM-DD string for date, boolean for boolean, or null to clear.",
3191+
},
3192+
},
3193+
required: ['tagDefinitionId', 'value'],
3194+
},
3195+
},
31673196
topK: {
31683197
type: 'number',
31693198
description: 'Number of results to return (1-50, default: 5)',
@@ -3596,12 +3625,10 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
35963625
properties: {
35973626
paths: {
35983627
type: 'array',
3599-
maxItems: 100,
36003628
description:
36013629
'Canonical folder VFS paths to create, e.g. ["files/Reports/2026"]. Missing parent segments are created automatically.',
36023630
items: {
36033631
type: 'string',
3604-
maxLength: 4096,
36053632
},
36063633
},
36073634
toolTitle: {
@@ -3620,18 +3647,15 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
36203647
properties: {
36213648
destination: {
36223649
type: 'string',
3623-
maxLength: 4096,
36243650
description:
36253651
'Target path. A path ending in "/" (or naming an existing folder) moves sources into it keeping their names — always use the trailing "/" form when targeting a folder. Otherwise the last segment is the new name and the preceding segments are the target folder (created automatically when missing).',
36263652
},
36273653
sources: {
36283654
type: 'array',
3629-
maxItems: 100,
36303655
description:
36313656
'Canonical VFS paths to move or rename, e.g. ["files/draft.md"]. All sources must share one category. Copy paths verbatim from glob/grep/read output.',
36323657
items: {
36333658
type: 'string',
3634-
maxLength: 4096,
36353659
},
36363660
},
36373661
toolTitle: {
@@ -4067,12 +4091,10 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
40674091
properties: {
40684092
paths: {
40694093
type: 'array',
4070-
maxItems: 100,
40714094
description:
40724095
'Canonical VFS paths to delete, e.g. ["files/Reports/draft.md"]. Copy paths verbatim from glob/grep/read output. Paths from different categories may be mixed in one call.',
40734096
items: {
40744097
type: 'string',
4075-
maxLength: 4096,
40764098
},
40774099
},
40784100
toolTitle: {

‎apps/sim/lib/copilot/request/tools/executor.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,11 @@ describe('executeToolAndReport provenance isolation', () => {
359359
const completion = await executeToolAndReport(
360360
toolCall.id,
361361
buildStreamingContext(toolCall),
362-
{ userId: 'user-1', workflowId: 'workflow-1' },
362+
{
363+
userId: 'user-1',
364+
workflowId: 'workflow-1',
365+
resolvedSecretTraceRegistry: new ResolvedSecretTraceRegistry(),
366+
},
363367
{ onEvent }
364368
)
365369

‎apps/sim/lib/copilot/request/tools/executor.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,10 +808,10 @@ async function executeToolAndReportInner(
808808
return cancelledCompletion('Request aborted before tool result delivery')
809809
}
810810

811-
// Fire-and-forget: notify the copilot backend that the tool completed.
812-
// IMPORTANT: We must NOT await this — the Go backend may block on the
811+
// A newly generated API key is intentionally included only in this
812+
// live/replay client event. Model-facing results and long-term chat records stay redacted.
813813
const clientEventOutput =
814-
toolCall.name === GenerateApiKey.id && hasOutputValue(copilotResult)
814+
toolCall.name === GenerateApiKey.id && modelSucceeded && hasOutputValue(copilotResult)
815815
? copilotResult.output
816816
: terminalData
817817
const resultEvent: StreamEvent = {

‎bun.lock‎

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)