@vellumai/assistant 0.10.7-dev.202607092332.9deedf4 → 0.10.7-dev.202607100313.fffdfea
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +1 -2
- package/docs/architecture/memory.md +1 -3
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/package.json +0 -2
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/__tests__/contracts.test.ts +0 -2
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/credential-rpc.ts +3 -5
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/index.ts +2 -4
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/rpc.ts +4 -447
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/package.json +0 -2
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/__tests__/contracts.test.ts +0 -2
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/credential-rpc.ts +3 -5
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/index.ts +2 -4
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/rpc.ts +4 -447
- package/node_modules/@vellumai/service-contracts/package.json +0 -2
- package/node_modules/@vellumai/service-contracts/src/__tests__/contracts.test.ts +0 -2
- package/node_modules/@vellumai/service-contracts/src/credential-rpc.ts +3 -5
- package/node_modules/@vellumai/service-contracts/src/index.ts +2 -4
- package/node_modules/@vellumai/service-contracts/src/rpc.ts +4 -447
- package/openapi.yaml +1 -222
- package/package.json +1 -1
- package/scripts/memory-inspect.ts +2 -8
- package/src/__tests__/approval-routes-http.test.ts +0 -8
- package/src/__tests__/background-workers-disk-pressure.test.ts +4 -2
- package/src/__tests__/compaction-events.test.ts +0 -4
- package/src/__tests__/context-search-memory-source.test.ts +0 -1
- package/src/__tests__/conversation-agent-loop-disk-pressure.test.ts +0 -1
- package/src/__tests__/conversation-agent-loop-inference-profile.test.ts +0 -2
- package/src/__tests__/conversation-agent-loop-overflow.test.ts +0 -2
- package/src/__tests__/conversation-agent-loop.test.ts +0 -4
- package/src/__tests__/conversation-app-control-lifecycle.test.ts +0 -4
- package/src/__tests__/conversation-fork-crud.test.ts +18 -5
- package/src/__tests__/conversation-fork-retrospective.test.ts +483 -0
- package/src/__tests__/conversation-routes-disk-view.test.ts +0 -4
- package/src/__tests__/conversation-store.test.ts +0 -10
- package/src/__tests__/conversation-summarize-up-to.test.ts +0 -4
- package/src/__tests__/credential-execution-api-key-propagation.test.ts +0 -40
- package/src/__tests__/credential-execution-client.test.ts +3 -3
- package/src/__tests__/credential-execution-managed-contract.test.ts +8 -104
- package/src/__tests__/file-write-tool.test.ts +9 -13
- package/src/__tests__/graph-extraction-event-date.test.ts +0 -9
- package/src/__tests__/injection-block.test.ts +0 -1
- package/src/__tests__/job-handler-registration-guard.test.ts +0 -1
- package/src/__tests__/lexical-index-dual-write.test.ts +2 -2
- package/src/__tests__/llm-resolver.test.ts +0 -1
- package/src/__tests__/messages-after-tiebreaker.test.ts +0 -1
- package/src/__tests__/playbook-execution.test.ts +2 -26
- package/src/__tests__/plugin-import-boundary-guard.test.ts +0 -4
- package/src/__tests__/plugin-import-boundary-reverse-guard.test.ts +318 -0
- package/src/__tests__/proxy-approval-callback.test.ts +0 -1
- package/src/__tests__/rebuild-index-graph-nodes.test.ts +0 -4
- package/src/__tests__/send-endpoint-busy.test.ts +0 -12
- package/src/__tests__/service-contracts-import-guard.test.ts +4 -9
- package/src/__tests__/subagent-fork-spawn.test.ts +0 -37
- package/src/__tests__/task-memory-cleanup.test.ts +0 -11
- package/src/__tests__/voice-scoped-grant-consumer.test.ts +0 -1
- package/src/__tests__/voice-session-bridge.test.ts +0 -56
- package/src/__tests__/workspace-migration-009-backfill-conversation-disk-view.test.ts +0 -1
- package/src/__tests__/workspace-migration-013-repair-conversation-disk-view.test.ts +0 -1
- package/src/__tests__/workspace-migration-028-recover-conversations-from-disk-view.test.ts +0 -1
- package/src/__tests__/workspace-migration-129-remove-analyze-conversation-config.test.ts +190 -0
- package/src/cli/commands/db/repair-step-conversation-backfill.ts +0 -1
- package/src/config/bundled-skills/messaging/tools/messaging-analyze-style.ts +0 -6
- package/src/config/bundled-skills/playbooks/tools/playbook-create.ts +0 -3
- package/src/config/bundled-skills/playbooks/tools/playbook-delete.ts +0 -3
- package/src/config/bundled-skills/playbooks/tools/playbook-list.ts +1 -3
- package/src/config/bundled-skills/playbooks/tools/playbook-update.ts +0 -4
- package/src/config/call-site-defaults.ts +0 -1
- package/src/config/feature-flag-registry.json +0 -16
- package/src/config/schema.ts +0 -3
- package/src/config/schemas/call-site-catalog.ts +0 -6
- package/src/config/schemas/llm.ts +0 -1
- package/src/conversations/job-handlers/summarization.ts +0 -2
- package/src/daemon/conversation-agent-loop-handlers.ts +0 -1
- package/src/daemon/conversation-agent-loop.ts +1 -6
- package/src/daemon/conversation-lifecycle.ts +0 -14
- package/src/daemon/conversation-turn-finalize.ts +0 -1
- package/src/daemon/handlers/shared.ts +1 -2
- package/src/export/transcript-formatter.ts +9 -39
- package/src/home/conversation-starter-checkpoints.ts +9 -5
- package/src/home/job-handlers/conversation-starters.ts +24 -54
- package/src/hooks/types.ts +2 -2
- package/src/ipc/routes/__tests__/memory-v2-backfill.test.ts +5 -7
- package/src/persistence/__tests__/bulk-write-gate.test.ts +165 -0
- package/src/persistence/__tests__/immediate-transaction-guard.test.ts +70 -0
- package/src/persistence/auto-analysis-constants.ts +4 -13
- package/src/persistence/bulk-write-gate.ts +82 -0
- package/src/persistence/conversation-bootstrap.ts +3 -3
- package/src/persistence/conversation-crud.ts +158 -80
- package/src/persistence/conversation-key-store.ts +0 -2
- package/src/persistence/conversation-row-batch-delete.ts +16 -1
- package/src/persistence/conversation-types.ts +12 -1
- package/src/persistence/db-async-query.ts +18 -9
- package/src/persistence/db-connection.ts +20 -4
- package/src/persistence/db-maintenance.ts +78 -6
- package/src/persistence/embeddings/qdrant-client.ts +2 -18
- package/src/persistence/fork-message-copy.ts +18 -4
- package/src/persistence/jobs-store.ts +3 -86
- package/src/persistence/migrations/323-delete-non-default-memory-scopes.test.ts +148 -0
- package/src/persistence/migrations/323-delete-non-default-memory-scopes.ts +35 -0
- package/src/persistence/schema/conversations.ts +0 -1
- package/src/persistence/schema/memory-core.ts +17 -28
- package/src/persistence/schema/memory-graph.ts +0 -4
- package/src/persistence/schema/tasks.ts +0 -1
- package/src/persistence/steps.ts +2 -0
- package/src/playbooks/playbook-compiler.ts +2 -10
- package/src/plugins/defaults/memory/__tests__/db-maintenance.test.ts +105 -11
- package/src/plugins/defaults/memory/__tests__/jobs-store-enqueue-gate.test.ts +7 -62
- package/src/plugins/defaults/memory/__tests__/memory-retrospective-job.test.ts +47 -5
- package/src/plugins/defaults/memory/__tests__/memory-retrospective-skill-card.test.ts +29 -1
- package/src/plugins/defaults/memory/__tests__/memory-retrospective-startup-cleanup.test.ts +133 -70
- package/src/plugins/defaults/memory/activation-session-store.ts +1 -1
- package/src/plugins/defaults/memory/config.ts +1 -1
- package/src/plugins/defaults/memory/context-search/sources/conversations.ts +1 -1
- package/src/plugins/defaults/memory/context-search/sources/memory-v2.ts +1 -1
- package/src/plugins/defaults/memory/context-search/sources/memory.ts +1 -1
- package/src/plugins/defaults/memory/filing-jobs.ts +1 -1
- package/src/plugins/defaults/memory/fork-conversation-memory.ts +8 -4
- package/src/plugins/defaults/memory/frontmatter.ts +1 -1
- package/src/plugins/defaults/memory/graph/__tests__/handle-remember-v2.test.ts +4 -25
- package/src/plugins/defaults/memory/graph/bootstrap.ts +12 -18
- package/src/plugins/defaults/memory/graph/capability-seed.ts +4 -18
- package/src/plugins/defaults/memory/graph/consolidation.ts +7 -14
- package/src/plugins/defaults/memory/graph/conversation-graph-memory.ts +1 -3
- package/src/plugins/defaults/memory/graph/decay.ts +5 -10
- package/src/plugins/defaults/memory/graph/extraction-job.ts +2 -3
- package/src/plugins/defaults/memory/graph/extraction.test.ts +1 -9
- package/src/plugins/defaults/memory/graph/extraction.ts +1 -8
- package/src/plugins/defaults/memory/graph/graph-search.ts +1 -2
- package/src/plugins/defaults/memory/graph/injection.test.ts +0 -1
- package/src/plugins/defaults/memory/graph/injection.ts +1 -1
- package/src/plugins/defaults/memory/graph/narrative.ts +1 -3
- package/src/plugins/defaults/memory/graph/pattern-scan.ts +1 -4
- package/src/plugins/defaults/memory/graph/retriever.test.ts +0 -19
- package/src/plugins/defaults/memory/graph/retriever.ts +6 -14
- package/src/plugins/defaults/memory/graph/scoring.test.ts +0 -1
- package/src/plugins/defaults/memory/graph/store.test.ts +6 -58
- package/src/plugins/defaults/memory/graph/store.ts +5 -43
- package/src/plugins/defaults/memory/graph/tool-handlers.test.ts +0 -4
- package/src/plugins/defaults/memory/graph/tool-handlers.ts +1 -11
- package/src/plugins/defaults/memory/graph/types.ts +0 -3
- package/src/plugins/defaults/memory/hooks/init.ts +1 -1
- package/src/plugins/defaults/memory/indexer.ts +2 -45
- package/src/plugins/defaults/memory/injectors.ts +2 -3
- package/src/plugins/defaults/memory/job-handler-registration.ts +0 -4
- package/src/plugins/defaults/memory/job-handlers/backfill.ts +0 -1
- package/src/plugins/defaults/memory/job-handlers/embedding.test.ts +0 -1
- package/src/plugins/defaults/memory/job-handlers/embedding.ts +0 -4
- package/src/plugins/defaults/memory/job-handlers/index-maintenance.ts +1 -1
- package/src/plugins/defaults/memory/job-handlers.ts +5 -9
- package/src/plugins/defaults/memory/jobs/embed-concept-page.ts +1 -1
- package/src/plugins/defaults/memory/jobs/embed-pkb-file.test.ts +41 -21
- package/src/plugins/defaults/memory/jobs/embed-pkb-file.ts +10 -5
- package/src/plugins/defaults/memory/jobs-worker.ts +21 -9
- package/src/plugins/defaults/memory/logging.ts +17 -0
- package/src/plugins/defaults/memory/memory-retrospective-constants.ts +10 -7
- package/src/plugins/defaults/memory/memory-retrospective-enqueue.ts +5 -6
- package/src/plugins/defaults/memory/memory-retrospective-fork-boundary.ts +57 -20
- package/src/plugins/defaults/memory/memory-retrospective-job.ts +13 -15
- package/src/plugins/defaults/memory/memory-retrospective-skill-card.ts +2 -2
- package/src/plugins/defaults/memory/memory-retrospective-startup-cleanup.ts +52 -39
- package/src/plugins/defaults/memory/memory-retrospective-trigger-check.ts +1 -1
- package/src/plugins/defaults/memory/pkb/pkb-index.test.ts +25 -38
- package/src/plugins/defaults/memory/pkb/pkb-index.ts +7 -19
- package/src/plugins/defaults/memory/pkb/pkb-reconcile.test.ts +46 -28
- package/src/plugins/defaults/memory/pkb/pkb-reconcile.ts +4 -9
- package/src/plugins/defaults/memory/pkb/pkb-search.test.ts +3 -9
- package/src/plugins/defaults/memory/pkb/pkb-search.ts +2 -9
- package/src/plugins/defaults/memory/pkb/types.ts +0 -11
- package/src/plugins/defaults/memory/rerank-local.ts +1 -1
- package/src/plugins/defaults/memory/routes/memory-eval-routes.ts +1 -1
- package/src/plugins/defaults/memory/routes/memory-item-routes.test.ts +0 -1
- package/src/plugins/defaults/memory/routes/memory-item-routes.ts +3 -11
- package/src/plugins/defaults/memory/routes/memory-v2-routes.ts +1 -1
- package/src/plugins/defaults/memory/routes/memory-v3-routes.ts +1 -1
- package/src/plugins/defaults/memory/startup.ts +2 -3
- package/src/plugins/defaults/memory/task-memory-cleanup.ts +1 -1
- package/src/plugins/defaults/memory/tools.test.ts +1 -9
- package/src/plugins/defaults/memory/tools.ts +0 -1
- package/src/plugins/defaults/memory/v2/backfill-jobs.ts +1 -1
- package/src/plugins/defaults/memory/v2/cli-command-store.ts +1 -1
- package/src/plugins/defaults/memory/v2/consolidation-job.ts +1 -1
- package/src/plugins/defaults/memory/v2/frontmatter-sweep.ts +1 -1
- package/src/plugins/defaults/memory/v2/injection-events.ts +1 -1
- package/src/plugins/defaults/memory/v2/injection.ts +1 -1
- package/src/plugins/defaults/memory/v2/memory-v2-startup.ts +1 -1
- package/src/plugins/defaults/memory/v2/migration.ts +1 -1
- package/src/plugins/defaults/memory/v2/page-index.ts +1 -1
- package/src/plugins/defaults/memory/v2/prompts/consolidation.ts +1 -1
- package/src/plugins/defaults/memory/v2/prompts/router.ts +1 -1
- package/src/plugins/defaults/memory/v2/qdrant.ts +1 -1
- package/src/plugins/defaults/memory/v2/reranker.ts +1 -1
- package/src/plugins/defaults/memory/v2/router.ts +1 -1
- package/src/plugins/defaults/memory/v2/skill-store.ts +1 -1
- package/src/plugins/defaults/memory/v2/sweep-job.ts +1 -1
- package/src/plugins/defaults/memory/v3/candidate-match.ts +1 -1
- package/src/plugins/defaults/memory/v3/dense.ts +1 -1
- package/src/plugins/defaults/memory/v3/injector.ts +1 -1
- package/src/plugins/defaults/memory/v3/maintain-job.ts +1 -1
- package/src/plugins/defaults/memory/v3/orchestrate.ts +1 -1
- package/src/plugins/defaults/memory/v3/pool-select.ts +1 -1
- package/src/plugins/defaults/memory/v3/prune.ts +1 -1
- package/src/plugins/defaults/memory/v3/section-dense-store.ts +1 -1
- package/src/plugins/defaults/memory/v3/shadow-plugin.ts +1 -1
- package/src/plugins/defaults/memory/worker.ts +1 -1
- package/src/runtime/capabilities.ts +1 -1
- package/src/runtime/routes/__tests__/bookmark-routes.test.ts +0 -1
- package/src/runtime/routes/__tests__/conversation-management-routes.test.ts +0 -1
- package/src/runtime/routes/__tests__/conversation-query-routes.test.ts +0 -1
- package/src/runtime/routes/conversation-starter-routes.ts +12 -23
- package/src/runtime/routes/index.ts +0 -2
- package/src/runtime/services/__tests__/auto-analysis-guard.test.ts +1 -8
- package/src/runtime/services/__tests__/conversation-serializer.test.ts +0 -1
- package/src/runtime/services/auto-analysis-guard.ts +5 -5
- package/src/runtime/services/conversation-serializer.ts +2 -3
- package/src/tasks/SPEC.md +10 -17
- package/src/tools/executor.ts +1 -102
- package/src/tools/filesystem/write.ts +0 -2
- package/src/tools/tool-types.ts +0 -15
- package/src/tools/types.ts +0 -10
- package/src/workspace/migrations/028-recover-conversations-from-disk-view.ts +0 -1
- package/src/workspace/migrations/129-remove-analyze-conversation-config.ts +59 -0
- package/src/workspace/migrations/registry.ts +2 -0
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/__tests__/grants.test.ts +0 -686
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/grants.ts +0 -184
- package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/rendering.ts +0 -135
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/__tests__/grants.test.ts +0 -686
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/grants.ts +0 -184
- package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/rendering.ts +0 -135
- package/node_modules/@vellumai/service-contracts/src/__tests__/grants.test.ts +0 -686
- package/node_modules/@vellumai/service-contracts/src/grants.ts +0 -184
- package/node_modules/@vellumai/service-contracts/src/rendering.ts +0 -135
- package/src/__tests__/auto-analysis-end-to-end.test.ts +0 -621
- package/src/__tests__/auto-analysis-prompt.test.ts +0 -50
- package/src/__tests__/config-analysis.test.ts +0 -83
- package/src/__tests__/conversation-analysis-routes.test.ts +0 -156
- package/src/__tests__/credential-execution-approval-bridge.test.ts +0 -297
- package/src/config/schemas/analysis.ts +0 -32
- package/src/credential-execution/approval-bridge.ts +0 -320
- package/src/daemon/__tests__/conversation-lifecycle-auto-analyze.test.ts +0 -449
- package/src/plugins/defaults/memory/__tests__/find-analysis-conversation.test.ts +0 -197
- package/src/runtime/routes/conversation-analysis-routes.ts +0 -75
- package/src/runtime/services/__tests__/analyze-conversation.test.ts +0 -477
- package/src/runtime/services/__tests__/auto-analysis-enqueue.test.ts +0 -386
- package/src/runtime/services/__tests__/auto-analysis-prompt.test.ts +0 -53
- package/src/runtime/services/__tests__/conversation-analyze-job.test.ts +0 -213
- package/src/runtime/services/__tests__/manual-analysis-prompt.test.ts +0 -41
- package/src/runtime/services/analyze-conversation.ts +0 -334
- package/src/runtime/services/auto-analysis-enqueue.ts +0 -130
- package/src/runtime/services/auto-analysis-prompt.ts +0 -55
- package/src/runtime/services/conversation-analyze-job.ts +0 -53
|
@@ -69,10 +69,6 @@ function makeStreamingSession(events: ServerMessage[]): Conversation {
|
|
|
69
69
|
id: "test-msg-id",
|
|
70
70
|
deduplicated: false,
|
|
71
71
|
}),
|
|
72
|
-
memoryPolicy: {
|
|
73
|
-
scopeId: "default",
|
|
74
|
-
includeDefaultFallback: false,
|
|
75
|
-
},
|
|
76
72
|
setChannelCapabilities: () => {},
|
|
77
73
|
setAssistantId: () => {},
|
|
78
74
|
setTrustContext: () => {},
|
|
@@ -113,10 +109,6 @@ function makePersistingStreamingSession(
|
|
|
113
109
|
currentRequestId: undefined,
|
|
114
110
|
queue: {} as never,
|
|
115
111
|
trustContext: undefined,
|
|
116
|
-
memoryPolicy: {
|
|
117
|
-
scopeId: "default",
|
|
118
|
-
includeDefaultFallback: false,
|
|
119
|
-
},
|
|
120
112
|
isProcessing: () => processing,
|
|
121
113
|
setProcessing: (value: boolean) => {
|
|
122
114
|
processing = value;
|
|
@@ -280,10 +272,6 @@ describe("voice-session-bridge", () => {
|
|
|
280
272
|
session.currentRequestId = options.requestId;
|
|
281
273
|
return { id: "test-msg-id", deduplicated: false };
|
|
282
274
|
},
|
|
283
|
-
memoryPolicy: {
|
|
284
|
-
scopeId: "default",
|
|
285
|
-
includeDefaultFallback: false,
|
|
286
|
-
},
|
|
287
275
|
setChannelCapabilities: () => {},
|
|
288
276
|
setAssistantId: () => {},
|
|
289
277
|
setTrustContext: () => {},
|
|
@@ -369,10 +357,6 @@ describe("voice-session-bridge", () => {
|
|
|
369
357
|
session.currentRequestId = options.requestId;
|
|
370
358
|
return { id: "test-msg-id", deduplicated: false };
|
|
371
359
|
},
|
|
372
|
-
memoryPolicy: {
|
|
373
|
-
scopeId: "default",
|
|
374
|
-
includeDefaultFallback: false,
|
|
375
|
-
},
|
|
376
360
|
setChannelCapabilities: () => {},
|
|
377
361
|
setAssistantId: () => {},
|
|
378
362
|
setTrustContext: () => {},
|
|
@@ -744,10 +728,6 @@ describe("voice-session-bridge", () => {
|
|
|
744
728
|
id: "test-msg-id",
|
|
745
729
|
deduplicated: false,
|
|
746
730
|
}),
|
|
747
|
-
memoryPolicy: {
|
|
748
|
-
scopeId: "default",
|
|
749
|
-
includeDefaultFallback: false,
|
|
750
|
-
},
|
|
751
731
|
setChannelCapabilities: () => {},
|
|
752
732
|
setAssistantId: () => {},
|
|
753
733
|
setTrustContext: () => {},
|
|
@@ -834,10 +814,6 @@ describe("voice-session-bridge", () => {
|
|
|
834
814
|
id: "test-msg-id",
|
|
835
815
|
deduplicated: false,
|
|
836
816
|
}),
|
|
837
|
-
memoryPolicy: {
|
|
838
|
-
scopeId: "default",
|
|
839
|
-
includeDefaultFallback: false,
|
|
840
|
-
},
|
|
841
817
|
setChannelCapabilities: () => {},
|
|
842
818
|
setAssistantId: () => {},
|
|
843
819
|
setTrustContext: () => {},
|
|
@@ -905,10 +881,6 @@ describe("voice-session-bridge", () => {
|
|
|
905
881
|
id: "test-msg-id",
|
|
906
882
|
deduplicated: false,
|
|
907
883
|
}),
|
|
908
|
-
memoryPolicy: {
|
|
909
|
-
scopeId: "default",
|
|
910
|
-
includeDefaultFallback: false,
|
|
911
|
-
},
|
|
912
884
|
setChannelCapabilities: () => {},
|
|
913
885
|
setAssistantId: () => {},
|
|
914
886
|
setTrustContext: () => {},
|
|
@@ -982,10 +954,6 @@ describe("voice-session-bridge", () => {
|
|
|
982
954
|
id: "test-msg-id",
|
|
983
955
|
deduplicated: false,
|
|
984
956
|
}),
|
|
985
|
-
memoryPolicy: {
|
|
986
|
-
scopeId: "default",
|
|
987
|
-
includeDefaultFallback: false,
|
|
988
|
-
},
|
|
989
957
|
setChannelCapabilities: () => {},
|
|
990
958
|
setAssistantId: () => {},
|
|
991
959
|
setTrustContext: () => {},
|
|
@@ -1075,10 +1043,6 @@ describe("voice-session-bridge", () => {
|
|
|
1075
1043
|
id: "test-msg-id",
|
|
1076
1044
|
deduplicated: false,
|
|
1077
1045
|
}),
|
|
1078
|
-
memoryPolicy: {
|
|
1079
|
-
scopeId: "default",
|
|
1080
|
-
includeDefaultFallback: false,
|
|
1081
|
-
},
|
|
1082
1046
|
setChannelCapabilities: () => {},
|
|
1083
1047
|
setAssistantId: () => {},
|
|
1084
1048
|
setTrustContext: () => {},
|
|
@@ -1151,10 +1115,6 @@ describe("voice-session-bridge", () => {
|
|
|
1151
1115
|
id: "test-msg-id",
|
|
1152
1116
|
deduplicated: false,
|
|
1153
1117
|
}),
|
|
1154
|
-
memoryPolicy: {
|
|
1155
|
-
scopeId: "default",
|
|
1156
|
-
includeDefaultFallback: false,
|
|
1157
|
-
},
|
|
1158
1118
|
setChannelCapabilities: () => {},
|
|
1159
1119
|
setAssistantId: () => {},
|
|
1160
1120
|
setTrustContext: () => {},
|
|
@@ -1223,10 +1183,6 @@ describe("voice-session-bridge", () => {
|
|
|
1223
1183
|
persistUserMessage: async () => {
|
|
1224
1184
|
throw new Error("simulated persistence failure");
|
|
1225
1185
|
},
|
|
1226
|
-
memoryPolicy: {
|
|
1227
|
-
scopeId: "default",
|
|
1228
|
-
includeDefaultFallback: false,
|
|
1229
|
-
},
|
|
1230
1186
|
setChannelCapabilities: () => {},
|
|
1231
1187
|
setAssistantId: () => {},
|
|
1232
1188
|
setTrustContext: () => {},
|
|
@@ -1286,10 +1242,6 @@ describe("voice-session-bridge", () => {
|
|
|
1286
1242
|
persistUserMessage: async () => {
|
|
1287
1243
|
throw new Error("simulated persistence failure");
|
|
1288
1244
|
},
|
|
1289
|
-
memoryPolicy: {
|
|
1290
|
-
scopeId: "default",
|
|
1291
|
-
includeDefaultFallback: false,
|
|
1292
|
-
},
|
|
1293
1245
|
setChannelCapabilities: recordLast("setChannelCapabilities"),
|
|
1294
1246
|
setAssistantId: recordLast("setAssistantId"),
|
|
1295
1247
|
setTrustContext: recordLast("setTrustContext"),
|
|
@@ -1356,10 +1308,6 @@ describe("voice-session-bridge", () => {
|
|
|
1356
1308
|
persistUserMessage: async () => {
|
|
1357
1309
|
throw new Error("persist failed before bridge installed callback");
|
|
1358
1310
|
},
|
|
1359
|
-
memoryPolicy: {
|
|
1360
|
-
scopeId: "default",
|
|
1361
|
-
includeDefaultFallback: false,
|
|
1362
|
-
},
|
|
1363
1311
|
setChannelCapabilities: () => {},
|
|
1364
1312
|
setAssistantId: () => {},
|
|
1365
1313
|
setTrustContext: () => {},
|
|
@@ -1420,10 +1368,6 @@ describe("voice-session-bridge", () => {
|
|
|
1420
1368
|
session.currentRequestId = options.requestId;
|
|
1421
1369
|
return { id: "test-msg-id", deduplicated: false };
|
|
1422
1370
|
},
|
|
1423
|
-
memoryPolicy: {
|
|
1424
|
-
scopeId: "default",
|
|
1425
|
-
includeDefaultFallback: false,
|
|
1426
|
-
},
|
|
1427
1371
|
setChannelCapabilities: () => {},
|
|
1428
1372
|
setAssistantId: () => {},
|
|
1429
1373
|
setTrustContext: () => {},
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import {
|
|
2
|
+
existsSync,
|
|
3
|
+
mkdirSync,
|
|
4
|
+
readFileSync,
|
|
5
|
+
rmSync,
|
|
6
|
+
writeFileSync,
|
|
7
|
+
} from "node:fs";
|
|
8
|
+
import { tmpdir } from "node:os";
|
|
9
|
+
import { join } from "node:path";
|
|
10
|
+
import { afterEach, beforeEach, describe, expect, test } from "bun:test";
|
|
11
|
+
|
|
12
|
+
import { removeAnalyzeConversationConfigMigration } from "../workspace/migrations/129-remove-analyze-conversation-config.js";
|
|
13
|
+
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
// Helpers
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
let workspaceDir: string;
|
|
19
|
+
|
|
20
|
+
function freshWorkspace(): void {
|
|
21
|
+
workspaceDir = join(
|
|
22
|
+
tmpdir(),
|
|
23
|
+
`vellum-migration-129-test-${Date.now()}-${Math.random().toString(36).slice(2)}`,
|
|
24
|
+
);
|
|
25
|
+
mkdirSync(workspaceDir, { recursive: true });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function writeConfig(data: Record<string, unknown>): void {
|
|
29
|
+
writeFileSync(
|
|
30
|
+
join(workspaceDir, "config.json"),
|
|
31
|
+
JSON.stringify(data, null, 2) + "\n",
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function readConfig(): Record<string, unknown> {
|
|
36
|
+
return JSON.parse(readFileSync(join(workspaceDir, "config.json"), "utf-8"));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// ---------------------------------------------------------------------------
|
|
40
|
+
// Setup / teardown
|
|
41
|
+
// ---------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
beforeEach(() => {
|
|
44
|
+
freshWorkspace();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
afterEach(() => {
|
|
48
|
+
if (existsSync(workspaceDir)) {
|
|
49
|
+
rmSync(workspaceDir, { recursive: true, force: true });
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// ---------------------------------------------------------------------------
|
|
54
|
+
// Tests
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
describe("129-remove-analyze-conversation-config migration", () => {
|
|
58
|
+
test("has correct migration id", () => {
|
|
59
|
+
expect(removeAnalyzeConversationConfigMigration.id).toBe(
|
|
60
|
+
"129-remove-analyze-conversation-config",
|
|
61
|
+
);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// ─── No-op cases ────────────────────────────────────────────────────────
|
|
65
|
+
|
|
66
|
+
test("no-op when config.json does not exist", () => {
|
|
67
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
68
|
+
expect(existsSync(join(workspaceDir, "config.json"))).toBe(false);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
test("gracefully handles invalid JSON in config file", () => {
|
|
72
|
+
writeFileSync(join(workspaceDir, "config.json"), "not-valid-json");
|
|
73
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
74
|
+
expect(readFileSync(join(workspaceDir, "config.json"), "utf-8")).toBe(
|
|
75
|
+
"not-valid-json",
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
test("no-op when config has neither targeted key", () => {
|
|
80
|
+
const original = {
|
|
81
|
+
llm: {
|
|
82
|
+
default: { provider: "anthropic", model: "claude-opus-4-8" },
|
|
83
|
+
callSites: { mainAgent: { profile: "balanced" } },
|
|
84
|
+
},
|
|
85
|
+
otherSetting: true,
|
|
86
|
+
};
|
|
87
|
+
writeConfig(original);
|
|
88
|
+
|
|
89
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
90
|
+
|
|
91
|
+
expect(readConfig()).toEqual(original);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// ─── Removal ────────────────────────────────────────────────────────────
|
|
95
|
+
|
|
96
|
+
test("removes llm.callSites.analyzeConversation and preserves siblings", () => {
|
|
97
|
+
writeConfig({
|
|
98
|
+
llm: {
|
|
99
|
+
default: { provider: "anthropic", model: "claude-opus-4-8" },
|
|
100
|
+
callSites: {
|
|
101
|
+
analyzeConversation: { model: "claude-opus-4-7", effort: "low" },
|
|
102
|
+
mainAgent: { profile: "balanced" },
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
108
|
+
|
|
109
|
+
const config = readConfig();
|
|
110
|
+
const llm = config.llm as { callSites: Record<string, unknown> };
|
|
111
|
+
expect(llm.callSites.analyzeConversation).toBeUndefined();
|
|
112
|
+
expect(llm.callSites.mainAgent).toEqual({ profile: "balanced" });
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
test("removes the top-level analysis block", () => {
|
|
116
|
+
writeConfig({
|
|
117
|
+
analysis: { batchSize: 30, idleTimeoutMs: 600000 },
|
|
118
|
+
otherSetting: "preserved",
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
122
|
+
|
|
123
|
+
const config = readConfig();
|
|
124
|
+
expect(config.analysis).toBeUndefined();
|
|
125
|
+
expect(config.otherSetting).toBe("preserved");
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test("removes both keys when both are present", () => {
|
|
129
|
+
writeConfig({
|
|
130
|
+
analysis: { batchSize: 10 },
|
|
131
|
+
llm: {
|
|
132
|
+
callSites: {
|
|
133
|
+
analyzeConversation: { profile: "balanced" },
|
|
134
|
+
recall: { effort: "low" },
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
140
|
+
|
|
141
|
+
const config = readConfig();
|
|
142
|
+
expect(config.analysis).toBeUndefined();
|
|
143
|
+
const llm = config.llm as { callSites: Record<string, unknown> };
|
|
144
|
+
expect(llm.callSites.analyzeConversation).toBeUndefined();
|
|
145
|
+
expect(llm.callSites.recall).toEqual({ effort: "low" });
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// ─── Idempotency ───────────────────────────────────────────────────────
|
|
149
|
+
|
|
150
|
+
test("idempotency: re-running the migration yields no further mutation", () => {
|
|
151
|
+
writeConfig({
|
|
152
|
+
analysis: { batchSize: 30 },
|
|
153
|
+
llm: { callSites: { analyzeConversation: { effort: "low" } } },
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
157
|
+
const afterFirst = readConfig();
|
|
158
|
+
|
|
159
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
160
|
+
const afterSecond = readConfig();
|
|
161
|
+
|
|
162
|
+
expect(afterSecond).toEqual(afterFirst);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
// ─── Defensive shape handling ──────────────────────────────────────────
|
|
166
|
+
|
|
167
|
+
test("ignores non-object values at sub-paths", () => {
|
|
168
|
+
writeConfig({
|
|
169
|
+
llm: "not-an-object",
|
|
170
|
+
analysis: { batchSize: 30 },
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
174
|
+
|
|
175
|
+
const config = readConfig();
|
|
176
|
+
expect(config.analysis).toBeUndefined();
|
|
177
|
+
expect(config.llm).toBe("not-an-object");
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
test("ignores non-object callSites", () => {
|
|
181
|
+
const original = {
|
|
182
|
+
llm: { callSites: ["not", "an", "object"] },
|
|
183
|
+
};
|
|
184
|
+
writeConfig(original);
|
|
185
|
+
|
|
186
|
+
removeAnalyzeConversationConfigMigration.run(workspaceDir);
|
|
187
|
+
|
|
188
|
+
expect(readConfig()).toEqual(original);
|
|
189
|
+
});
|
|
190
|
+
});
|
|
@@ -27,7 +27,6 @@ function upsertMemoryItem(opts: {
|
|
|
27
27
|
subject: string;
|
|
28
28
|
statement: string;
|
|
29
29
|
importance: number;
|
|
30
|
-
scopeId: string;
|
|
31
30
|
}): void {
|
|
32
31
|
const db = getDb();
|
|
33
32
|
const now = Date.now();
|
|
@@ -39,7 +38,6 @@ function upsertMemoryItem(opts: {
|
|
|
39
38
|
.where(
|
|
40
39
|
and(
|
|
41
40
|
eq(memoryGraphNodes.content, content),
|
|
42
|
-
eq(memoryGraphNodes.scopeId, opts.scopeId),
|
|
43
41
|
sql`${memoryGraphNodes.fidelity} != 'gone'`,
|
|
44
42
|
),
|
|
45
43
|
)
|
|
@@ -84,7 +82,6 @@ function upsertMemoryItem(opts: {
|
|
|
84
82
|
sourceType: "inferred",
|
|
85
83
|
narrativeRole: null,
|
|
86
84
|
partOfStory: null,
|
|
87
|
-
scopeId: opts.scopeId,
|
|
88
85
|
})
|
|
89
86
|
.run();
|
|
90
87
|
if (isMemoryEnabled()) {
|
|
@@ -127,7 +124,6 @@ export async function run(
|
|
|
127
124
|
return err("No style patterns were extracted. Try with more messages.");
|
|
128
125
|
}
|
|
129
126
|
|
|
130
|
-
const scopeId = "default";
|
|
131
127
|
let savedCount = 0;
|
|
132
128
|
|
|
133
129
|
for (const pattern of result.stylePatterns) {
|
|
@@ -140,7 +136,6 @@ export async function run(
|
|
|
140
136
|
subject,
|
|
141
137
|
statement: pattern.summary,
|
|
142
138
|
importance,
|
|
143
|
-
scopeId,
|
|
144
139
|
});
|
|
145
140
|
savedCount++;
|
|
146
141
|
}
|
|
@@ -157,7 +152,6 @@ export async function run(
|
|
|
157
152
|
"",
|
|
158
153
|
),
|
|
159
154
|
importance: 0.6,
|
|
160
|
-
scopeId,
|
|
161
155
|
});
|
|
162
156
|
savedCount++;
|
|
163
157
|
}
|
|
@@ -64,7 +64,6 @@ export async function executePlaybookCreate(
|
|
|
64
64
|
const sanitizedTrigger = trigger.replace(/[\r\n]+/g, " ");
|
|
65
65
|
const subject = `Playbook: ${sanitizedTrigger}`.slice(0, 80);
|
|
66
66
|
const content = `${subject}\n${statement}`;
|
|
67
|
-
const scopeId = "default";
|
|
68
67
|
|
|
69
68
|
try {
|
|
70
69
|
const db = getDb();
|
|
@@ -76,7 +75,6 @@ export async function executePlaybookCreate(
|
|
|
76
75
|
.where(
|
|
77
76
|
sql`${memoryGraphNodes.sourceConversations} LIKE '%playbook:%'
|
|
78
77
|
AND ${memoryGraphNodes.content} = ${content}
|
|
79
|
-
AND ${memoryGraphNodes.scopeId} = ${scopeId}
|
|
80
78
|
AND ${memoryGraphNodes.fidelity} != 'gone'`,
|
|
81
79
|
)
|
|
82
80
|
.get();
|
|
@@ -114,7 +112,6 @@ export async function executePlaybookCreate(
|
|
|
114
112
|
narrativeRole: null,
|
|
115
113
|
partOfStory: null,
|
|
116
114
|
imageRefs: null,
|
|
117
|
-
scopeId,
|
|
118
115
|
};
|
|
119
116
|
|
|
120
117
|
const node = createNode(newNode);
|
|
@@ -20,13 +20,10 @@ export async function executePlaybookDelete(
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const scopeId = "default";
|
|
24
|
-
|
|
25
23
|
try {
|
|
26
24
|
const existing = getNode(playbookId);
|
|
27
25
|
if (
|
|
28
26
|
!existing ||
|
|
29
|
-
existing.scopeId !== scopeId ||
|
|
30
27
|
!existing.sourceConversations.some((s) => s.startsWith("playbook:")) ||
|
|
31
28
|
existing.fidelity === "gone"
|
|
32
29
|
) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { and,
|
|
1
|
+
import { and, sql } from "drizzle-orm";
|
|
2
2
|
|
|
3
3
|
import { getDb } from "../../../../persistence/db-connection.js";
|
|
4
4
|
import { memoryGraphNodes } from "../../../../persistence/schema/index.js";
|
|
@@ -12,7 +12,6 @@ export async function executePlaybookList(
|
|
|
12
12
|
input: Record<string, unknown>,
|
|
13
13
|
_context: ToolContext,
|
|
14
14
|
): Promise<ToolExecutionResult> {
|
|
15
|
-
const scopeId = "default";
|
|
16
15
|
const channelFilter =
|
|
17
16
|
typeof input.channel === "string" ? input.channel : null;
|
|
18
17
|
const categoryFilter =
|
|
@@ -31,7 +30,6 @@ export async function executePlaybookList(
|
|
|
31
30
|
.from(memoryGraphNodes)
|
|
32
31
|
.where(
|
|
33
32
|
and(
|
|
34
|
-
eq(memoryGraphNodes.scopeId, scopeId),
|
|
35
33
|
sql`${memoryGraphNodes.sourceConversations} LIKE '%playbook:%'`,
|
|
36
34
|
sql`${memoryGraphNodes.fidelity} != 'gone'`,
|
|
37
35
|
),
|
|
@@ -34,13 +34,10 @@ export async function executePlaybookUpdate(
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
const scopeId = "default";
|
|
38
|
-
|
|
39
37
|
try {
|
|
40
38
|
const existing = getNode(playbookId);
|
|
41
39
|
if (
|
|
42
40
|
!existing ||
|
|
43
|
-
existing.scopeId !== scopeId ||
|
|
44
41
|
!existing.sourceConversations.some((s) => s.startsWith("playbook:")) ||
|
|
45
42
|
existing.fidelity === "gone"
|
|
46
43
|
) {
|
|
@@ -108,7 +105,6 @@ export async function executePlaybookUpdate(
|
|
|
108
105
|
.from(memoryGraphNodes)
|
|
109
106
|
.where(
|
|
110
107
|
and(
|
|
111
|
-
eq(memoryGraphNodes.scopeId, scopeId),
|
|
112
108
|
sql`${memoryGraphNodes.sourceConversations} LIKE '%playbook:%'`,
|
|
113
109
|
eq(memoryGraphNodes.content, content),
|
|
114
110
|
sql`${memoryGraphNodes.fidelity} != 'gone'`,
|
|
@@ -26,7 +26,6 @@ export const CALL_SITE_DEFAULTS: Record<LLMCallSite, CallSiteDefaultConfig> = {
|
|
|
26
26
|
mainAgent: { profile: "balanced" },
|
|
27
27
|
subagentSpawn: { profile: "balanced" },
|
|
28
28
|
compactionAgent: { profile: "balanced" },
|
|
29
|
-
analyzeConversation: { profile: "balanced" },
|
|
30
29
|
patternScan: { profile: "balanced" },
|
|
31
30
|
narrativeRefinement: { profile: "balanced" },
|
|
32
31
|
callAgent: { profile: "balanced" },
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"flags": [
|
|
4
|
-
{
|
|
5
|
-
"id": "auto-analyze",
|
|
6
|
-
"scope": "assistant",
|
|
7
|
-
"key": "auto-analyze",
|
|
8
|
-
"label": "Auto-analyze conversations",
|
|
9
|
-
"description": "Automatically trigger conversation analysis on the same cadence as memory extraction (batch threshold, idle debounce, end-of-conversation). The analysis agent has full tool access and writes back to memory and skills without user approval.",
|
|
10
|
-
"defaultEnabled": false
|
|
11
|
-
},
|
|
12
4
|
{
|
|
13
5
|
"id": "user-hosted-enabled",
|
|
14
6
|
"scope": "client",
|
|
@@ -210,14 +202,6 @@
|
|
|
210
202
|
"description": "Enable the app-control skill (per-app screenshot + raw input bypassing AX tree)",
|
|
211
203
|
"defaultEnabled": false
|
|
212
204
|
},
|
|
213
|
-
{
|
|
214
|
-
"id": "analyze-conversation",
|
|
215
|
-
"scope": "assistant",
|
|
216
|
-
"key": "analyze-conversation",
|
|
217
|
-
"label": "Analyze Conversation",
|
|
218
|
-
"description": "Show the 'Analyze' / 'Analyze conversation' option in conversation context menus and the conversation title actions dropdown.",
|
|
219
|
-
"defaultEnabled": false
|
|
220
|
-
},
|
|
221
205
|
{
|
|
222
206
|
"id": "velvet-theme",
|
|
223
207
|
"scope": "client",
|
package/src/config/schema.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { z } from "zod";
|
|
|
3
3
|
import { getDataDir } from "../util/platform.js";
|
|
4
4
|
|
|
5
5
|
// Re-export domain schemas that have external consumers
|
|
6
|
-
export { AnalysisConfigSchema } from "./schemas/analysis.js";
|
|
7
6
|
export type { BackupConfig, BackupDestination } from "./schemas/backup.js";
|
|
8
7
|
export { BackupConfigSchema } from "./schemas/backup.js";
|
|
9
8
|
export { VALID_CALLER_IDENTITY_MODES } from "./schemas/calls.js";
|
|
@@ -16,7 +15,6 @@ export type { SkillEntryConfig } from "./schemas/skills.js";
|
|
|
16
15
|
|
|
17
16
|
// Imports for AssistantConfigSchema composition
|
|
18
17
|
import { AcpConfigSchema } from "./acp-schema.js";
|
|
19
|
-
import { AnalysisConfigSchema } from "./schemas/analysis.js";
|
|
20
18
|
import { BackupConfigSchema } from "./schemas/backup.js";
|
|
21
19
|
import { CallsConfigSchema } from "./schemas/calls.js";
|
|
22
20
|
import {
|
|
@@ -107,7 +105,6 @@ export const AssistantConfigSchema = z
|
|
|
107
105
|
ConversationsConfigSchema.parse({}),
|
|
108
106
|
),
|
|
109
107
|
journal: JournalConfigSchema.default(JournalConfigSchema.parse({})),
|
|
110
|
-
analysis: AnalysisConfigSchema.default(AnalysisConfigSchema.parse({})),
|
|
111
108
|
backup: BackupConfigSchema.default(BackupConfigSchema.parse({})),
|
|
112
109
|
mcp: McpConfigSchema.default(McpConfigSchema.parse({})),
|
|
113
110
|
acp: AcpConfigSchema.default(AcpConfigSchema.parse({})),
|
|
@@ -70,12 +70,6 @@ const CATALOG_RECORD: CatalogRecord = {
|
|
|
70
70
|
description: "Compacts conversation history to stay within context limits.",
|
|
71
71
|
domain: "agentLoop",
|
|
72
72
|
},
|
|
73
|
-
analyzeConversation: {
|
|
74
|
-
id: "analyzeConversation",
|
|
75
|
-
displayName: "Analyze Conversation",
|
|
76
|
-
description: "Analyzes conversation content for summaries and insights.",
|
|
77
|
-
domain: "agentLoop",
|
|
78
|
-
},
|
|
79
73
|
callAgent: {
|
|
80
74
|
id: "callAgent",
|
|
81
75
|
displayName: "Call Agent",
|
|
@@ -109,7 +109,6 @@ export async function buildConversationSummaryJob(
|
|
|
109
109
|
id: summaryId,
|
|
110
110
|
scope: "conversation",
|
|
111
111
|
scopeKey: conversationId,
|
|
112
|
-
scopeId: "default",
|
|
113
112
|
summary: summaryText,
|
|
114
113
|
tokenEstimate: estimateTextTokens(summaryText),
|
|
115
114
|
version: nextVersion,
|
|
@@ -124,7 +123,6 @@ export async function buildConversationSummaryJob(
|
|
|
124
123
|
summary: summaryText,
|
|
125
124
|
tokenEstimate: estimateTextTokens(summaryText),
|
|
126
125
|
version: sql`${memorySummaries.version} + 1`,
|
|
127
|
-
scopeId: "default",
|
|
128
126
|
startAt: earliestCovered,
|
|
129
127
|
endAt: latestCovered,
|
|
130
128
|
updatedAt: now,
|
|
@@ -63,7 +63,6 @@ import { runHook } from "../plugins/pipeline.js";
|
|
|
63
63
|
import type { ContentBlock, Message } from "../providers/types.js";
|
|
64
64
|
import type { Provider } from "../providers/types.js";
|
|
65
65
|
import { resolveCapabilities } from "../runtime/capabilities.js";
|
|
66
|
-
import { enqueueAutoAnalysisOnCompaction } from "../runtime/services/auto-analysis-enqueue.js";
|
|
67
66
|
import { publishConversationMessagesChanged } from "../runtime/sync/resource-sync-events.js";
|
|
68
67
|
import type { ActivationMomentParam } from "../telemetry/activation-funnel.js";
|
|
69
68
|
import { stampTurnOutcome } from "../telemetry/turn-outcome.js";
|
|
@@ -1744,7 +1743,7 @@ export interface CompactionApplyContext {
|
|
|
1744
1743
|
/**
|
|
1745
1744
|
* Applies a successful `ContextWindowResult` to a conversation: updates the
|
|
1746
1745
|
* in-memory message buffer and compaction counters, notifies the graph memory
|
|
1747
|
-
* and conversation-summary store,
|
|
1746
|
+
* and conversation-summary store, emits the
|
|
1748
1747
|
* `context_compacted` event, and records a `context_compactor` usage event.
|
|
1749
1748
|
*
|
|
1750
1749
|
* The emitted `usage_update` intentionally omits `contextWindow` — the
|
|
@@ -1815,10 +1814,6 @@ export async function applyCompactionResult(
|
|
|
1815
1814
|
ctx.slackContextCompactionWatermarkTs =
|
|
1816
1815
|
options.slackContextCompactionWatermarkTs;
|
|
1817
1816
|
}
|
|
1818
|
-
enqueueAutoAnalysisOnCompaction(
|
|
1819
|
-
ctx.conversationId,
|
|
1820
|
-
ctx.trustContext?.trustClass,
|
|
1821
|
-
);
|
|
1822
1817
|
enqueueMemoryRetrospectiveOnCompaction(
|
|
1823
1818
|
ctx.conversationId,
|
|
1824
1819
|
ctx.trustContext?.trustClass,
|
|
@@ -20,7 +20,6 @@ import { enqueueMemoryRetrospectiveIfEnabled } from "../plugins/defaults/memory/
|
|
|
20
20
|
import type { ContentBlock, Message } from "../providers/types.js";
|
|
21
21
|
import { type TrustClass } from "../runtime/actor-trust-resolver.js";
|
|
22
22
|
import { resolveCapabilities } from "../runtime/capabilities.js";
|
|
23
|
-
import { enqueueAutoAnalysisIfEnabled } from "../runtime/services/auto-analysis-enqueue.js";
|
|
24
23
|
import { isAutoAnalysisConversation } from "../runtime/services/auto-analysis-guard.js";
|
|
25
24
|
import { unregisterConversationSender } from "../tools/browser/browser-screencast.js";
|
|
26
25
|
import { disposeToolProfiler } from "../tools/tool-profiler.js";
|
|
@@ -222,7 +221,6 @@ export function disposeConversation(ctx: DisposeContext): void {
|
|
|
222
221
|
try {
|
|
223
222
|
enqueueMemoryJob("graph_extract", {
|
|
224
223
|
conversationId: ctx.conversationId,
|
|
225
|
-
scopeId: "default",
|
|
226
224
|
...(ctx.activeContextNodeIds?.length
|
|
227
225
|
? { activeContextNodeIds: ctx.activeContextNodeIds }
|
|
228
226
|
: {}),
|
|
@@ -249,18 +247,6 @@ export function disposeConversation(ctx: DisposeContext): void {
|
|
|
249
247
|
// Best-effort — don't block conversation disposal
|
|
250
248
|
}
|
|
251
249
|
}
|
|
252
|
-
|
|
253
|
-
try {
|
|
254
|
-
// `enqueueAutoAnalysisIfEnabled` has its own internal recursion guard
|
|
255
|
-
// (it checks `isAutoAnalysisConversation()`), so it's safe to call
|
|
256
|
-
// unconditionally here.
|
|
257
|
-
enqueueAutoAnalysisIfEnabled({
|
|
258
|
-
conversationId: ctx.conversationId,
|
|
259
|
-
trigger: "lifecycle",
|
|
260
|
-
});
|
|
261
|
-
} catch {
|
|
262
|
-
// Best-effort — don't block conversation disposal
|
|
263
|
-
}
|
|
264
250
|
}
|
|
265
251
|
|
|
266
252
|
abortConversation(
|