Skip to content

Commit e745fb4

Browse files
committed
Refresh secret schemas and shared test mocks
1 parent ffb045f commit e745fb4

4 files changed

Lines changed: 25 additions & 4 deletions

File tree

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5265,10 +5265,19 @@ export const SetEnvironmentVariables: ToolCatalogEntry = {
52655265
items: {
52665266
type: 'object',
52675267
properties: {
5268+
description: {
5269+
type: 'string',
5270+
description:
5271+
'What the variable is for, in one short phrase — aim for under 80 characters, like "Stripe live key for the billing workflow". Not a sentence, and never a restatement of the name. Workspace scope only; sending it with scope personal is rejected. Omit it on an existing variable to leave its current description untouched; send an empty string to clear one. You may send it alone, without a value, to describe a secret that already exists.',
5272+
},
52685273
name: { type: 'string', description: 'Variable name' },
5269-
value: { type: 'string', description: 'Variable value' },
5274+
value: {
5275+
type: 'string',
5276+
description:
5277+
"Variable value. Omit it to leave an existing variable's value untouched and change only its description — never invent or guess a value you were not given, which would overwrite the real secret.",
5278+
},
52705279
},
5271-
required: ['name', 'value'],
5280+
required: ['name'],
52725281
},
52735282
},
52745283
},

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5168,16 +5168,22 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
51685168
items: {
51695169
type: 'object',
51705170
properties: {
5171+
description: {
5172+
type: 'string',
5173+
description:
5174+
'What the variable is for, in one short phrase — aim for under 80 characters, like "Stripe live key for the billing workflow". Not a sentence, and never a restatement of the name. Workspace scope only; sending it with scope personal is rejected. Omit it on an existing variable to leave its current description untouched; send an empty string to clear one. You may send it alone, without a value, to describe a secret that already exists.',
5175+
},
51715176
name: {
51725177
type: 'string',
51735178
description: 'Variable name',
51745179
},
51755180
value: {
51765181
type: 'string',
5177-
description: 'Variable value',
5182+
description:
5183+
"Variable value. Omit it to leave an existing variable's value untouched and change only its description — never invent or guess a value you were not given, which would overwrite the real secret.",
51785184
},
51795185
},
5180-
required: ['name', 'value'],
5186+
required: ['name'],
51815187
},
51825188
},
51835189
},

packages/testing/src/mocks/logger.mock.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const loggerMock = {
3939
logger: createMockLogger(),
4040
runWithRequestContext: vi.fn(<T>(_ctx: unknown, fn: () => T): T => fn()),
4141
getRequestContext: vi.fn(() => undefined),
42+
setRequestTraceId: vi.fn(),
4243
}
4344

4445
/**

packages/testing/src/mocks/permissions.mock.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,9 @@ export const permissionsMock = {
4545
getWorkspaceMemberProfiles: permissionsMockFns.mockGetWorkspaceMemberProfiles,
4646
hasWorkspaceAdminAccess: permissionsMockFns.mockHasWorkspaceAdminAccess,
4747
getManageableWorkspaces: permissionsMockFns.mockGetManageableWorkspaces,
48+
// Faithful to the real type guard without importing the class the mock
49+
// replaces: the constructor stamps name = 'WorkspaceAccessDeniedError', so a
50+
// test exercising the 403 projection throws an Error carrying that name.
51+
isWorkspaceAccessDeniedError: (error: unknown): boolean =>
52+
error instanceof Error && error.name === 'WorkspaceAccessDeniedError',
4853
}

0 commit comments

Comments
 (0)