Skip to content

Commit 7fc6bb0

Browse files
Sg312claude
andcommitted
chore(copilot): drop user_memory from generated contracts and tool display
Companion to mothership 8ae32e97 (user_memory tool removed — the feature no longer exists). Regenerates the mothership contract mirrors via generate-mship-contracts.ts, which also picks up the pending telemetry contract additions (gen_ai.agent.name labels, llm.client.context_tokens, llm.client.compactions, llm.request.compaction_trigger, llm.compaction.pause, gen_ai.usage.context_tokens), and removes the user_memory display title. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 57b853e commit 7fc6bb0

5 files changed

Lines changed: 107 additions & 212 deletions

File tree

apps/sim/lib/copilot/generated/metrics-v1.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export const Metric = {
2828
CopilotVfsMaterializeDuration: 'copilot.vfs.materialize.duration',
2929
GenAiClientCacheTokenUsage: 'gen_ai.client.cache.token.usage',
3030
GenAiClientTokenUsage: 'gen_ai.client.token.usage',
31+
LlmClientCompactions: 'llm.client.compactions',
32+
LlmClientContextTokens: 'llm.client.context_tokens',
3133
LlmClientErrors: 'llm.client.errors',
3234
LlmClientOutputCutoff: 'llm.client.output_cutoff',
3335
LlmClientStreamDuration: 'llm.client.stream.duration',
@@ -53,6 +55,8 @@ export const MetricValues: readonly MetricValue[] = [
5355
'copilot.vfs.materialize.duration',
5456
'gen_ai.client.cache.token.usage',
5557
'gen_ai.client.token.usage',
58+
'llm.client.compactions',
59+
'llm.client.context_tokens',
5660
'llm.client.errors',
5761
'llm.client.output_cutoff',
5862
'llm.client.stream.duration',

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

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export interface ToolCatalogEntry {
101101
| 'update_deployment_version'
102102
| 'update_scheduled_task_history'
103103
| 'update_workspace_mcp_server'
104-
| 'user_memory'
105104
| 'user_table'
106105
| 'workflow'
107106
| 'workspace_file'
@@ -202,7 +201,6 @@ export interface ToolCatalogEntry {
202201
| 'update_deployment_version'
203202
| 'update_scheduled_task_history'
204203
| 'update_workspace_mcp_server'
205-
| 'user_memory'
206204
| 'user_table'
207205
| 'workflow'
208206
| 'workspace_file'
@@ -3952,50 +3950,6 @@ export const UpdateWorkspaceMcpServer: ToolCatalogEntry = {
39523950
requiredPermission: 'admin',
39533951
}
39543952

3955-
export const UserMemory: ToolCatalogEntry = {
3956-
id: 'user_memory',
3957-
name: 'user_memory',
3958-
route: 'go',
3959-
mode: 'sync',
3960-
parameters: {
3961-
type: 'object',
3962-
properties: {
3963-
confidence: {
3964-
type: 'number',
3965-
description: 'Confidence level 0-1 (default 1.0 for explicit, 0.8 for inferred)',
3966-
},
3967-
correct_value: {
3968-
type: 'string',
3969-
description:
3970-
"The correct value to replace the wrong one (for 'correct' operation). Requires `key` (the memory to replace).",
3971-
},
3972-
key: {
3973-
type: 'string',
3974-
description: "Unique key for the memory (e.g., 'preferred_model', 'slack_credential')",
3975-
},
3976-
limit: { type: 'number', description: 'Number of results for search (default 10)' },
3977-
memory_type: {
3978-
type: 'string',
3979-
description: "Type of memory: 'preference', 'entity', 'history', or 'correction'",
3980-
enum: ['preference', 'entity', 'history', 'correction'],
3981-
},
3982-
operation: {
3983-
type: 'string',
3984-
description: "Operation: 'add', 'search', 'delete', 'correct', or 'list'",
3985-
enum: ['add', 'search', 'delete', 'correct', 'list'],
3986-
},
3987-
query: { type: 'string', description: 'Search query to find relevant memories' },
3988-
source: {
3989-
type: 'string',
3990-
description: "Source: 'explicit' (user told you) or 'inferred' (you observed)",
3991-
enum: ['explicit', 'inferred'],
3992-
},
3993-
value: { type: 'string', description: 'Value to remember' },
3994-
},
3995-
required: ['operation'],
3996-
},
3997-
}
3998-
39993953
export const UserTable: ToolCatalogEntry = {
40003954
id: 'user_table',
40013955
name: 'user_table',
@@ -4690,24 +4644,6 @@ export const SearchKnowledgeBaseOperationValues = [
46904644
SearchKnowledgeBaseOperation.listTags,
46914645
] as const
46924646

4693-
export const UserMemoryOperation = {
4694-
add: 'add',
4695-
search: 'search',
4696-
delete: 'delete',
4697-
correct: 'correct',
4698-
list: 'list',
4699-
} as const
4700-
4701-
export type UserMemoryOperation = (typeof UserMemoryOperation)[keyof typeof UserMemoryOperation]
4702-
4703-
export const UserMemoryOperationValues = [
4704-
UserMemoryOperation.add,
4705-
UserMemoryOperation.search,
4706-
UserMemoryOperation.delete,
4707-
UserMemoryOperation.correct,
4708-
UserMemoryOperation.list,
4709-
] as const
4710-
47114647
export const UserTableOperation = {
47124648
create: 'create',
47134649
createFromFile: 'create_from_file',
@@ -4888,7 +4824,6 @@ export const TOOL_CATALOG: Record<string, ToolCatalogEntry> = {
48884824
[UpdateDeploymentVersion.id]: UpdateDeploymentVersion,
48894825
[UpdateScheduledTaskHistory.id]: UpdateScheduledTaskHistory,
48904826
[UpdateWorkspaceMcpServer.id]: UpdateWorkspaceMcpServer,
4891-
[UserMemory.id]: UserMemory,
48924827
[UserTable.id]: UserTable,
48934828
[Workflow.id]: Workflow,
48944829
[WorkspaceFile.id]: WorkspaceFile,

0 commit comments

Comments
 (0)