@vellumai/assistant 0.10.3-staging.2 → 0.10.4-staging.1
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/openapi.yaml +73 -56
- package/package.json +1 -1
- package/src/__tests__/actor-trust-resolver-address-fallback.test.ts +83 -31
- package/src/__tests__/assistant-stream-state.test.ts +3 -76
- package/src/__tests__/background-workers-disk-pressure.test.ts +4 -2
- package/src/__tests__/channel-approval-routes.test.ts +21 -26
- package/src/__tests__/channel-delivery-store.test.ts +28 -0
- package/src/__tests__/channel-guardian.test.ts +82 -32
- package/src/__tests__/channel-inbound-disk-pressure.test.ts +11 -19
- package/src/__tests__/channel-reply-delivery.test.ts +6 -2
- package/src/__tests__/compaction-ledger-store.test.ts +128 -0
- package/src/__tests__/config-loader-backfill.test.ts +148 -0
- package/src/__tests__/consult-deadline.test.ts +60 -0
- package/src/__tests__/contact-store-interaction-info.test.ts +156 -0
- package/src/__tests__/contact-store-user-file.test.ts +7 -10
- package/src/__tests__/contacts-relay-reads.test.ts +6 -9
- package/src/__tests__/contacts-write.test.ts +0 -2
- package/src/__tests__/conversation-agent-loop-overflow.test.ts +4 -2
- package/src/__tests__/conversation-agent-loop.test.ts +98 -7
- package/src/__tests__/conversation-attention-telegram.test.ts +9 -11
- package/src/__tests__/conversation-error.test.ts +18 -0
- package/src/__tests__/conversation-fork-crud.test.ts +354 -24
- package/src/__tests__/conversation-title-service.test.ts +222 -201
- package/src/__tests__/db-compaction-events-migration.test.ts +129 -0
- package/src/__tests__/delete-propagation.test.ts +5 -3
- package/src/__tests__/dm-backfill.test.ts +6 -4
- package/src/__tests__/emit-signal-routing-intent.test.ts +2 -6
- package/src/__tests__/guardian-binding-drift-heal.test.ts +43 -23
- package/src/__tests__/guardian-dispatch.test.ts +50 -5
- package/src/__tests__/guardian-routing-state.test.ts +6 -10
- package/src/__tests__/helpers/channel-test-adapter.ts +45 -12
- package/src/__tests__/helpers/create-guardian-binding.ts +15 -23
- package/src/__tests__/helpers/mock-logger.ts +1 -0
- package/src/__tests__/helpers/seed-contact-channel.ts +96 -0
- package/src/__tests__/inbound-invite-redemption.test.ts +87 -10
- package/src/__tests__/invite-redemption-service.test.ts +273 -53
- package/src/__tests__/invite-routes-http.test.ts +34 -0
- package/src/__tests__/invite-service-ipc.test.ts +65 -2
- package/src/__tests__/list-messages-page-latest.test.ts +173 -4
- package/src/__tests__/mcp-config-secret-boundary.test.ts +3 -0
- package/src/__tests__/non-member-access-request.test.ts +15 -13
- package/src/__tests__/onboarding-persona-write.test.ts +52 -22
- package/src/__tests__/persist-onboarding-artifacts.test.ts +1 -0
- package/src/__tests__/persona-resolver.test.ts +75 -45
- package/src/__tests__/plugin-bootstrap.test.ts +13 -5
- package/src/__tests__/plugin-disabled-state.test.ts +190 -0
- package/src/__tests__/provider-usage-tracking.test.ts +1 -1
- package/src/__tests__/reaction-intercept-cold-cache-warm.test.ts +135 -0
- package/src/__tests__/reaction-intercept-member-verdict-warm.test.ts +158 -0
- package/src/__tests__/reaction-persistence.test.ts +51 -4
- package/src/__tests__/relay-server.test.ts +88 -31
- package/src/__tests__/runtime-attachment-metadata.test.ts +9 -11
- package/src/__tests__/settings-routes.test.ts +32 -0
- package/src/__tests__/slack-block-formatting.test.ts +1 -38
- package/src/__tests__/sse-actor-principal-guardian-source.test.ts +13 -36
- package/src/__tests__/stt-hints.test.ts +6 -3
- package/src/__tests__/subagent-fork-prompt-role.test.ts +195 -0
- package/src/__tests__/subagent-fork-spawn.test.ts +6 -7
- package/src/__tests__/subagent-role-registry.test.ts +17 -4
- package/src/__tests__/subagent-spawn-and-await.test.ts +546 -0
- package/src/__tests__/subagent-tools.test.ts +398 -3
- package/src/__tests__/thread-backfill.test.ts +3 -3
- package/src/__tests__/tool-preview-lifecycle.test.ts +26 -10
- package/src/__tests__/tool-start-timestamp.test.ts +4 -3
- package/src/__tests__/trusted-contact-approval-notifier.test.ts +37 -51
- package/src/__tests__/trusted-contact-inline-approval-integration.test.ts +2 -2
- package/src/__tests__/trusted-contact-lifecycle-notifications.test.ts +9 -7
- package/src/__tests__/trusted-contact-multichannel.test.ts +16 -7
- package/src/__tests__/trusted-contact-verification.test.ts +79 -54
- package/src/__tests__/voice-guardian-cold-cache-warm.test.ts +137 -0
- package/src/__tests__/voice-invite-redemption.test.ts +183 -20
- package/src/__tests__/workspace-migration-102-preserve-heartbeat-enabled-for-existing-workspaces.test.ts +3 -3
- package/src/__tests__/workspace-migration-111-prune-seeded-callsite-defaults.test.ts +2 -2
- package/src/__tests__/workspace-migration-112-remove-advisor-callsite-override.test.ts +170 -0
- package/src/__tests__/workspace-migration-drop-user-md.test.ts +196 -238
- package/src/a2a/__tests__/e2e-a2a-channel.test.ts +35 -47
- package/src/agent/loop-exclusive-tool.test.ts +19 -15
- package/src/agent/loop-native-web-search.test.ts +200 -0
- package/src/agent/loop.ts +108 -1
- package/src/api/responses/conversation-message.ts +9 -0
- package/src/approvals/guardian-request-resolvers.ts +16 -4
- package/src/calls/__tests__/relay-setup-router.test.ts +10 -18
- package/src/calls/guardian-dispatch.ts +14 -11
- package/src/calls/inbound-trust-reader.ts +7 -1
- package/src/calls/relay-access-wait.ts +6 -6
- package/src/calls/relay-server.ts +22 -2
- package/src/calls/relay-setup-router.ts +10 -10
- package/src/cli/commands/__tests__/conversations-slack.test.ts +1 -0
- package/src/cli/commands/contacts.ts +10 -7
- package/src/cli/commands/memory/__tests__/worker.test.ts +147 -17
- package/src/cli/commands/memory/worker.ts +97 -30
- package/src/cli/commands/plugins.ts +3 -146
- package/src/cli/lib/__tests__/list-installed-plugins.test.ts +17 -17
- package/src/cli/lib/__tests__/publish-plugin.test.ts +98 -0
- package/src/cli/lib/publish-plugin.ts +231 -1
- package/src/config/__tests__/sync-gated-profiles.test.ts +5 -7
- package/src/config/bundled-skills/subagent/SKILL.md +16 -1
- package/src/config/bundled-skills/subagent/TOOLS.json +5 -4
- package/src/config/call-site-defaults.ts +0 -6
- package/src/config/llm-resolver.ts +0 -3
- package/src/config/schemas/call-site-catalog.ts +0 -7
- package/src/config/schemas/heartbeat.ts +2 -5
- package/src/config/schemas/llm.ts +3 -12
- package/src/config/schemas/memory-lifecycle.ts +1 -1
- package/src/config/seed-inference-profiles.ts +76 -35
- package/src/config/sync-gated-profiles.ts +0 -3
- package/src/contacts/__tests__/contacts-write-revoke-relay.test.ts +7 -8
- package/src/contacts/__tests__/member-write-relay.test.ts +35 -11
- package/src/contacts/contact-store.ts +27 -237
- package/src/contacts/contacts-write.ts +18 -58
- package/src/contacts/gateway-channel-read.ts +51 -0
- package/src/contacts/member-write-relay.ts +25 -31
- package/src/contacts/types.ts +3 -15
- package/src/daemon/__tests__/conversation-tool-setup.test.ts +0 -44
- package/src/daemon/conversation-agent-loop-handlers.ts +29 -10
- package/src/daemon/conversation-agent-loop.ts +68 -61
- package/src/daemon/conversation-error.ts +7 -10
- package/src/daemon/conversation-tool-setup.ts +0 -10
- package/src/daemon/conversation.ts +10 -0
- package/src/daemon/external-plugins-bootstrap.ts +8 -2
- package/src/daemon/handlers/__tests__/config-a2a-accept.test.ts +0 -1
- package/src/daemon/handlers/__tests__/config-a2a-complete.test.ts +0 -2
- package/src/daemon/handlers/__tests__/config-a2a-redeem.test.ts +0 -2
- package/src/daemon/handlers/__tests__/config-channels.test.ts +9 -14
- package/src/daemon/handlers/config-channels.ts +14 -29
- package/src/daemon/lifecycle.ts +16 -4
- package/src/daemon/message-types/surfaces.ts +2 -0
- package/src/heartbeat/heartbeat-service.ts +5 -0
- package/src/home/relationship-state-writer.ts +5 -0
- package/src/memory/__tests__/embedding-cache.test.ts +136 -0
- package/src/memory/compaction-ledger-store.ts +107 -0
- package/src/memory/conversation-crud.ts +136 -61
- package/src/memory/conversation-title-service.ts +173 -24
- package/src/memory/embedding-backend.ts +8 -1
- package/src/memory/embedding-cache.ts +139 -0
- package/src/memory/jobs-worker.ts +75 -29
- package/src/memory/memory-retrospective-job.ts +5 -0
- package/src/memory/migrations/209-strip-thinking-from-consolidated.ts +27 -5
- package/src/memory/migrations/302-create-compaction-events.ts +107 -0
- package/src/memory/migrations/303-add-conversation-creation-seq.ts +33 -0
- package/src/memory/migrations/__tests__/209-strip-thinking-from-consolidated.test.ts +79 -6
- package/src/memory/schema/contacts.ts +6 -2
- package/src/memory/schema/conversations.ts +39 -0
- package/src/memory/steps.ts +1090 -367
- package/src/memory/worker-control.ts +104 -18
- package/src/memory/worker-process.ts +17 -0
- package/src/messaging/channel-binding-metadata.ts +31 -0
- package/src/messaging/channel-binding-schema.ts +51 -0
- package/src/messaging/providers/__tests__/callback-routing.test.ts +45 -0
- package/src/messaging/providers/__tests__/transport-dispatch.test.ts +195 -0
- package/src/messaging/providers/a2a/__tests__/deliver.test.ts +11 -0
- package/src/messaging/providers/a2a/deliver.ts +5 -1
- package/src/messaging/providers/a2a/transport.ts +10 -0
- package/src/messaging/providers/callback-routing.ts +48 -0
- package/src/messaging/providers/channel-transport.ts +55 -0
- package/src/messaging/providers/index.ts +65 -241
- package/src/messaging/providers/slack/binding-metadata.ts +62 -0
- package/src/messaging/providers/slack/transport.ts +92 -0
- package/src/messaging/providers/telegram-bot/transport.ts +51 -0
- package/src/messaging/providers/whatsapp/transport.ts +38 -0
- package/src/notifications/__tests__/broadcaster.test.ts +0 -8
- package/src/notifications/__tests__/connected-channels.test.ts +8 -36
- package/src/notifications/__tests__/destination-resolver.test.ts +12 -117
- package/src/notifications/destination-resolver.ts +7 -23
- package/src/notifications/emit-signal.ts +5 -11
- package/src/plugins/defaults/index.ts +0 -35
- package/src/plugins/defaults/memory-v3-shadow/__tests__/dense.test.ts +11 -0
- package/src/plugins/defaults/memory-v3-shadow/__tests__/section-dense-store.test.ts +243 -2
- package/src/plugins/defaults/memory-v3-shadow/section-dense-store.ts +167 -14
- package/src/plugins/disabled-state.ts +31 -0
- package/src/plugins/registry.ts +55 -12
- package/src/prompts/persona-resolver.ts +43 -11
- package/src/providers/call-site-routing.ts +41 -0
- package/src/providers/provider-send-message.ts +6 -0
- package/src/providers/ratelimit.ts +6 -0
- package/src/providers/registry.ts +1 -1
- package/src/providers/retry.ts +6 -0
- package/src/providers/types.ts +13 -0
- package/src/providers/usage-tracking.ts +6 -0
- package/src/runtime/__tests__/guardian-vellum-migration.test.ts +30 -27
- package/src/runtime/__tests__/local-principal-trust.test.ts +16 -18
- package/src/runtime/__tests__/member-verdict-cache.test.ts +119 -0
- package/src/runtime/__tests__/trust-verdict-consumer.test.ts +115 -168
- package/src/runtime/access-request-helper.ts +1 -2
- package/src/runtime/actor-trust-resolver.ts +44 -17
- package/src/runtime/anchored-guardian.test.ts +7 -54
- package/src/runtime/anchored-guardian.ts +4 -53
- package/src/runtime/assistant-stream-state.ts +12 -74
- package/src/runtime/channel-reply-delivery.ts +3 -8
- package/src/runtime/guardian-vellum-migration.ts +18 -16
- package/src/runtime/invite-redemption-service.ts +25 -10
- package/src/runtime/local-actor-identity.test.ts +108 -0
- package/src/runtime/local-actor-identity.ts +27 -20
- package/src/runtime/member-verdict-cache.ts +0 -0
- package/src/runtime/routes/__tests__/contact-routes.test.ts +100 -7
- package/src/runtime/routes/__tests__/global-search-routes.test.ts +1 -2
- package/src/runtime/routes/__tests__/surface-action-routes.test.ts +2 -1
- package/src/runtime/routes/contact-routes.ts +40 -25
- package/src/runtime/routes/conversation-list-routes.ts +1 -29
- package/src/runtime/routes/conversation-routes.ts +27 -7
- package/src/runtime/routes/inbound-stages/acl-enforcement.ts +0 -10
- package/src/runtime/routes/inbound-stages/background-dispatch.ts +4 -8
- package/src/runtime/routes/inbound-stages/reaction-intercept.ts +19 -0
- package/src/runtime/routes/settings-routes.ts +8 -3
- package/src/runtime/services/conversation-serializer.ts +6 -49
- package/src/runtime/slack-block-formatting.ts +0 -15
- package/src/runtime/trust-verdict-consumer.ts +36 -41
- package/src/subagent/__tests__/consult-prompt.test.ts +35 -0
- package/src/{plugins/defaults/advisor/__tests__/transcript.test.ts → subagent/__tests__/consult-transcript.test.ts} +47 -10
- package/src/{plugins/defaults/advisor/steering.ts → subagent/consult-prompt.ts} +17 -39
- package/src/{plugins/defaults/advisor/transcript.ts → subagent/consult-transcript.ts} +18 -8
- package/src/subagent/index.ts +1 -1
- package/src/subagent/manager.ts +245 -33
- package/src/subagent/types.ts +8 -1
- package/src/tools/registry.ts +10 -3
- package/src/tools/subagent/consult-deadline.ts +49 -0
- package/src/tools/subagent/spawn.ts +234 -5
- package/src/util/logger.ts +9 -0
- package/src/util/platform.ts +14 -0
- package/src/workspace/migrations/031-drop-user-md.ts +232 -148
- package/src/workspace/migrations/112-remove-advisor-callsite-override.ts +64 -0
- package/src/workspace/migrations/registry.ts +2 -0
- package/src/plugins/defaults/advisor/__tests__/advisor-gate.test.ts +0 -56
- package/src/plugins/defaults/advisor/__tests__/advisor-state-store.test.ts +0 -43
- package/src/plugins/defaults/advisor/__tests__/agent-loop-integration.test.ts +0 -137
- package/src/plugins/defaults/advisor/__tests__/consult.test.ts +0 -314
- package/src/plugins/defaults/advisor/__tests__/context-pack-gating.test.ts +0 -106
- package/src/plugins/defaults/advisor/__tests__/context-pack.test.ts +0 -60
- package/src/plugins/defaults/advisor/__tests__/hooks.test.ts +0 -138
- package/src/plugins/defaults/advisor/advisor-gate.ts +0 -29
- package/src/plugins/defaults/advisor/advisor-state-store.ts +0 -94
- package/src/plugins/defaults/advisor/config.ts +0 -21
- package/src/plugins/defaults/advisor/consult.ts +0 -197
- package/src/plugins/defaults/advisor/context-pack.ts +0 -288
- package/src/plugins/defaults/advisor/hooks/post-model-call.ts +0 -34
- package/src/plugins/defaults/advisor/hooks/pre-model-call.ts +0 -30
- package/src/plugins/defaults/advisor/hooks/user-prompt-submit.ts +0 -19
- package/src/plugins/defaults/advisor/package.json +0 -14
- package/src/plugins/defaults/advisor/tools/advisor.ts +0 -92
package/src/memory/steps.ts
CHANGED
|
@@ -11,15 +11,36 @@ import { backfillAppConversationIds } from "./app-store.js";
|
|
|
11
11
|
// Forward migration + down function imports
|
|
12
12
|
import { migrateToolCreatedItems } from "./graph/bootstrap.js";
|
|
13
13
|
import { migrateCoreTables } from "./migrations/000-core-tables.js";
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
downJobDeferrals,
|
|
16
|
+
migrateJobDeferrals,
|
|
17
|
+
} from "./migrations/001-job-deferrals.js";
|
|
15
18
|
import { migrateToolInvocationsFk } from "./migrations/002-tool-invocations-fk.js";
|
|
16
19
|
import { migrateMemoryFtsBackfill } from "./migrations/003-memory-fts-backfill.js";
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import {
|
|
22
|
-
|
|
20
|
+
import {
|
|
21
|
+
downMemoryEntityRelationDedup,
|
|
22
|
+
migrateMemoryEntityRelationDedup,
|
|
23
|
+
} from "./migrations/004-entity-relation-dedup.js";
|
|
24
|
+
import {
|
|
25
|
+
downMemoryItemsFingerprintScopeUnique,
|
|
26
|
+
migrateMemoryItemsFingerprintScopeUnique,
|
|
27
|
+
} from "./migrations/005-fingerprint-scope-unique.js";
|
|
28
|
+
import {
|
|
29
|
+
downMemoryItemsScopeSaltedFingerprints,
|
|
30
|
+
migrateMemoryItemsScopeSaltedFingerprints,
|
|
31
|
+
} from "./migrations/006-scope-salted-fingerprints.js";
|
|
32
|
+
import {
|
|
33
|
+
downAssistantIdToSelf,
|
|
34
|
+
migrateAssistantIdToSelf,
|
|
35
|
+
} from "./migrations/007-assistant-id-to-self.js";
|
|
36
|
+
import {
|
|
37
|
+
downRemoveAssistantIdColumns,
|
|
38
|
+
migrateRemoveAssistantIdColumns,
|
|
39
|
+
} from "./migrations/008-remove-assistant-id-columns.js";
|
|
40
|
+
import {
|
|
41
|
+
downLlmUsageEventsDropAssistantId,
|
|
42
|
+
migrateLlmUsageEventsDropAssistantId,
|
|
43
|
+
} from "./migrations/009-llm-usage-events-drop-assistant-id.js";
|
|
23
44
|
import { migrateGuardianActionTables } from "./migrations/013-guardian-action-tables.js";
|
|
24
45
|
import { downBackfillInboxThreadState } from "./migrations/014-backfill-inbox-thread-state.js";
|
|
25
46
|
import { downDropActiveSearchIndex } from "./migrations/015-drop-active-search-index.js";
|
|
@@ -27,14 +48,23 @@ import { migrateMemorySegmentsIndexes } from "./migrations/016-memory-segments-i
|
|
|
27
48
|
import { migrateMemoryItemsIndexes } from "./migrations/017-memory-items-indexes.js";
|
|
28
49
|
import { migrateRemainingTableIndexes } from "./migrations/018-remaining-table-indexes.js";
|
|
29
50
|
import { downNotificationTablesSchema } from "./migrations/019-notification-tables-schema-migration.js";
|
|
30
|
-
import {
|
|
51
|
+
import {
|
|
52
|
+
downRenameChannelToVellum,
|
|
53
|
+
migrateRenameChannelToVellum,
|
|
54
|
+
} from "./migrations/020-rename-macos-ios-channel-to-vellum.js";
|
|
31
55
|
import { migrateConversationStatusIndexes } from "./migrations/021-conversation-status-indexes.js";
|
|
32
56
|
import { migrateAddOriginInterface } from "./migrations/022-add-origin-interface.js";
|
|
33
57
|
import { migrateMemoryItemSourcesIndexes } from "./migrations/023-memory-item-sources-indexes.js";
|
|
34
|
-
import {
|
|
58
|
+
import {
|
|
59
|
+
downEmbeddingVectorBlob,
|
|
60
|
+
migrateEmbeddingVectorBlob,
|
|
61
|
+
} from "./migrations/024-embedding-vector-blob.js";
|
|
35
62
|
import { migrateMessagesFtsBackfill } from "./migrations/025-messages-fts-backfill.js";
|
|
36
63
|
import { migrateGuardianVerificationSessions } from "./migrations/026-guardian-verification-sessions.js";
|
|
37
|
-
import {
|
|
64
|
+
import {
|
|
65
|
+
downEmbeddingsNullableVectorJson,
|
|
66
|
+
migrateEmbeddingsNullableVectorJson,
|
|
67
|
+
} from "./migrations/026a-embeddings-nullable-vector-json.js";
|
|
38
68
|
import { migrateGuardianBootstrapToken } from "./migrations/027a-guardian-bootstrap-token.js";
|
|
39
69
|
import { migrateCallSessionMode } from "./migrations/028-call-session-mode.js";
|
|
40
70
|
import { migrateChannelInboundDeliveredSegments } from "./migrations/029-channel-inbound-delivered-segments.js";
|
|
@@ -46,7 +76,10 @@ import { migrateNotificationDeliveryThreadDecision } from "./migrations/032-noti
|
|
|
46
76
|
import { createScopedApprovalGrantsTable } from "./migrations/033-scoped-approval-grants.js";
|
|
47
77
|
import { migrateGuardianActionToolMetadata } from "./migrations/034-guardian-action-tool-metadata.js";
|
|
48
78
|
import { migrateGuardianActionSupersession } from "./migrations/035-guardian-action-supersession.js";
|
|
49
|
-
import {
|
|
79
|
+
import {
|
|
80
|
+
downNormalizePhoneIdentities,
|
|
81
|
+
migrateNormalizePhoneIdentities,
|
|
82
|
+
} from "./migrations/036-normalize-phone-identities.js";
|
|
50
83
|
import { migrateVoiceInviteColumns } from "./migrations/037-voice-invite-columns.js";
|
|
51
84
|
import { migrateInviteCodeHashColumn } from "./migrations/040-invite-code-hash-column.js";
|
|
52
85
|
import { createApprovalPromptTsTrackerTable } from "./migrations/041-approval-prompt-ts-tracker.js";
|
|
@@ -73,30 +106,72 @@ import { migrateCanonicalGuardianRequesterChatId } from "./migrations/122-canoni
|
|
|
73
106
|
import { migrateCanonicalGuardianDeliveriesDestinationIndex } from "./migrations/123-canonical-guardian-deliveries-destination-index.js";
|
|
74
107
|
import { migrateVoiceInviteDisplayMetadata } from "./migrations/124-voice-invite-display-metadata.js";
|
|
75
108
|
import { migrateGuardianPrincipalIdColumns } from "./migrations/125-guardian-principal-id-columns.js";
|
|
76
|
-
import {
|
|
77
|
-
|
|
109
|
+
import {
|
|
110
|
+
downBackfillGuardianPrincipalId,
|
|
111
|
+
migrateBackfillGuardianPrincipalId,
|
|
112
|
+
} from "./migrations/126-backfill-guardian-principal-id.js";
|
|
113
|
+
import {
|
|
114
|
+
downGuardianPrincipalIdNotNull,
|
|
115
|
+
migrateGuardianPrincipalIdNotNull,
|
|
116
|
+
} from "./migrations/127-guardian-principal-id-not-null.js";
|
|
78
117
|
import { migrateContactsRolePrincipal } from "./migrations/128-contacts-role-principal.js";
|
|
79
118
|
import { migrateContactChannelsAccessFields } from "./migrations/129-contact-channels-access-fields.js";
|
|
80
119
|
import { migrateContactChannelsTypeChatIdIndex } from "./migrations/130-contact-channels-type-ext-chat-id-index.js";
|
|
81
120
|
import { migrateDropLegacyMemberGuardianTables } from "./migrations/131-drop-legacy-member-guardian-tables.js";
|
|
82
121
|
import { migrateContactsAssistantId } from "./migrations/132-contacts-assistant-id.js";
|
|
83
122
|
import { migrateAssistantContactMetadata } from "./migrations/133-assistant-contact-metadata.js";
|
|
84
|
-
import {
|
|
85
|
-
|
|
86
|
-
|
|
123
|
+
import {
|
|
124
|
+
downContactsNotesColumn,
|
|
125
|
+
migrateContactsNotesColumn,
|
|
126
|
+
} from "./migrations/134-contacts-notes-column.js";
|
|
127
|
+
import {
|
|
128
|
+
downBackfillContactInteractionStats,
|
|
129
|
+
migrateBackfillContactInteractionStats,
|
|
130
|
+
} from "./migrations/135-backfill-contact-interaction-stats.js";
|
|
131
|
+
import {
|
|
132
|
+
downDropAssistantIdColumns,
|
|
133
|
+
migrateDropAssistantIdColumns,
|
|
134
|
+
} from "./migrations/136-drop-assistant-id-columns.js";
|
|
87
135
|
import { migrateUsageDashboardIndexes } from "./migrations/137-usage-dashboard-indexes.js";
|
|
88
136
|
import { migrateDropUsageCompositeIndexes } from "./migrations/139-drop-usage-composite-indexes.js";
|
|
89
|
-
import {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
import {
|
|
94
|
-
|
|
137
|
+
import {
|
|
138
|
+
downBackfillUsageCacheAccounting,
|
|
139
|
+
migrateBackfillUsageCacheAccounting,
|
|
140
|
+
} from "./migrations/140-backfill-usage-cache-accounting.js";
|
|
141
|
+
import {
|
|
142
|
+
downRenameVerificationTable,
|
|
143
|
+
migrateRenameVerificationTable,
|
|
144
|
+
} from "./migrations/141-rename-verification-table.js";
|
|
145
|
+
import {
|
|
146
|
+
downRenameVerificationSessionIdColumn,
|
|
147
|
+
migrateRenameVerificationSessionIdColumn,
|
|
148
|
+
} from "./migrations/142-rename-verification-session-id-column.js";
|
|
149
|
+
import {
|
|
150
|
+
downRenameGuardianVerificationValues,
|
|
151
|
+
migrateRenameGuardianVerificationValues,
|
|
152
|
+
} from "./migrations/143-rename-guardian-verification-values.js";
|
|
153
|
+
import {
|
|
154
|
+
downRenameVoiceToPhone,
|
|
155
|
+
migrateRenameVoiceToPhone,
|
|
156
|
+
} from "./migrations/144-rename-voice-to-phone.js";
|
|
157
|
+
import {
|
|
158
|
+
migrateDropAccountsTable,
|
|
159
|
+
migrateDropAccountsTableDown,
|
|
160
|
+
} from "./migrations/145-drop-accounts-table.js";
|
|
95
161
|
import { migrateScheduleOneShotRouting } from "./migrations/146-schedule-oneshot-routing.js";
|
|
96
|
-
import {
|
|
97
|
-
|
|
162
|
+
import {
|
|
163
|
+
migrateRemindersToSchedules,
|
|
164
|
+
migrateRemindersToSchedulesDown,
|
|
165
|
+
} from "./migrations/147-migrate-reminders-to-schedules.js";
|
|
166
|
+
import {
|
|
167
|
+
migrateDropRemindersTable,
|
|
168
|
+
migrateDropRemindersTableDown,
|
|
169
|
+
} from "./migrations/148-drop-reminders-table.js";
|
|
98
170
|
import { createOAuthTables } from "./migrations/149-oauth-tables.js";
|
|
99
|
-
import {
|
|
171
|
+
import {
|
|
172
|
+
migrateOAuthAppsClientSecretPath,
|
|
173
|
+
migrateOAuthAppsClientSecretPathDown,
|
|
174
|
+
} from "./migrations/150-oauth-apps-client-secret-path.js";
|
|
100
175
|
import { migrateOAuthProvidersPingUrl } from "./migrations/151-oauth-providers-ping-url.js";
|
|
101
176
|
import { migrateMemoryItemSupersession } from "./migrations/152-memory-item-supersession.js";
|
|
102
177
|
import { migrateDropEntityTables } from "./migrations/153-drop-entity-tables.js";
|
|
@@ -108,39 +183,67 @@ import { migrateChannelInteractionColumns } from "./migrations/158-channel-inter
|
|
|
108
183
|
import { migrateDropContactInteractionColumns } from "./migrations/159-drop-contact-interaction-columns.js";
|
|
109
184
|
import { migrateDropLoopbackPortColumn } from "./migrations/160-drop-loopback-port-column.js";
|
|
110
185
|
import { migrateDropOrphanedMediaTables } from "./migrations/161-drop-orphaned-media-tables.js";
|
|
111
|
-
import {
|
|
186
|
+
import {
|
|
187
|
+
migrateGuardianTimestampsEpochMs,
|
|
188
|
+
migrateGuardianTimestampsEpochMsDown,
|
|
189
|
+
migrateGuardianTimestampsRebuildDown,
|
|
190
|
+
} from "./migrations/162-guardian-timestamps-epoch-ms.js";
|
|
112
191
|
import { migrateRenameNotificationThreadColumns } from "./migrations/163-rename-notification-thread-columns.js";
|
|
113
192
|
import { migrateRenameConversationTypeColumn } from "./migrations/164-rename-conversation-type-column.js";
|
|
114
193
|
import { migrateRenameInboxThreadStateTable } from "./migrations/165-rename-inbox-thread-state-table.js";
|
|
115
194
|
import { migrateRenameFollowupsThreadIdColumn } from "./migrations/166-rename-followups-thread-id.js";
|
|
116
195
|
import { migrateRenameSequenceEnrollmentsThreadIdColumn } from "./migrations/167-rename-sequence-enrollments-thread-id.js";
|
|
117
196
|
import { migrateRenameSequenceStepsReplyKey } from "./migrations/168-rename-sequence-steps-reply-key.js";
|
|
118
|
-
import {
|
|
197
|
+
import {
|
|
198
|
+
migrateRenameGmailProviderKeyToGoogle,
|
|
199
|
+
migrateRenameGmailProviderKeyToGoogleDown,
|
|
200
|
+
} from "./migrations/169-rename-gmail-provider-key-to-google.js";
|
|
119
201
|
import { migrateCreateThreadStartersTable } from "./migrations/170-thread-starters-table.js";
|
|
120
202
|
import { migrateCapabilityCardColumns } from "./migrations/171-capability-card-columns.js";
|
|
121
203
|
import { migrateRenameCreatedBySessionIdColumns } from "./migrations/172-rename-created-by-session-id.js";
|
|
122
204
|
import { migrateRenameSourceSessionIdColumn } from "./migrations/173-rename-source-session-id.js";
|
|
123
|
-
import {
|
|
205
|
+
import {
|
|
206
|
+
migrateRenameThreadStartersTable,
|
|
207
|
+
migrateRenameThreadStartersTableDown,
|
|
208
|
+
} from "./migrations/174-rename-thread-starters-table.js";
|
|
124
209
|
import { createLifecycleEventsTable } from "./migrations/175-create-lifecycle-events.js";
|
|
125
|
-
import {
|
|
210
|
+
import {
|
|
211
|
+
migrateDropCapabilityCardState,
|
|
212
|
+
migrateDropCapabilityCardStateDown,
|
|
213
|
+
} from "./migrations/176-drop-capability-card-state.js";
|
|
126
214
|
import { migrateCreateTraceEventsTable } from "./migrations/177-create-trace-events-table.js";
|
|
127
215
|
import { migrateOAuthProvidersManagedServiceConfigKey } from "./migrations/178-oauth-providers-managed-service-config-key.js";
|
|
128
216
|
import { migrateLlmRequestLogMessageId } from "./migrations/179-llm-request-log-message-id.js";
|
|
129
|
-
import {
|
|
130
|
-
|
|
217
|
+
import {
|
|
218
|
+
migrateBackfillInlineAttachmentsToDisk,
|
|
219
|
+
migrateBackfillInlineAttachmentsToDiskDown,
|
|
220
|
+
} from "./migrations/180-backfill-inline-attachments-to-disk.js";
|
|
221
|
+
import {
|
|
222
|
+
migrateRenameThreadStartersCheckpoints,
|
|
223
|
+
migrateRenameThreadStartersCheckpointsDown,
|
|
224
|
+
} from "./migrations/181-rename-thread-starters-checkpoints.js";
|
|
131
225
|
import { migrateOAuthProvidersDisplayMetadata } from "./migrations/182-oauth-providers-display-metadata.js";
|
|
132
226
|
import { migrateConversationForkLineage } from "./migrations/183-add-conversation-fork-lineage.js";
|
|
133
227
|
import { migrateLlmRequestLogProvider } from "./migrations/184-llm-request-log-provider.js";
|
|
134
228
|
import { migrateScheduleQuietFlag } from "./migrations/188-schedule-quiet-flag.js";
|
|
135
229
|
import { migrateDropSimplifiedMemory } from "./migrations/189-drop-simplified-memory.js";
|
|
136
230
|
import { migrateCallSessionSkipDisclosure } from "./migrations/190-call-session-skip-disclosure.js";
|
|
137
|
-
import {
|
|
231
|
+
import {
|
|
232
|
+
migrateBackfillAudioAttachmentMimeTypes,
|
|
233
|
+
migrateBackfillAudioAttachmentMimeTypesDown,
|
|
234
|
+
} from "./migrations/191-backfill-audio-attachment-mime-types.js";
|
|
138
235
|
import { migrateContactsUserFileColumn } from "./migrations/192-contacts-user-file-column.js";
|
|
139
|
-
import {
|
|
236
|
+
import {
|
|
237
|
+
migrateAddSourceTypeColumns,
|
|
238
|
+
migrateAddSourceTypeColumnsDown,
|
|
239
|
+
} from "./migrations/193-add-source-type-columns.js";
|
|
140
240
|
import { migrateCreateMemoryRecallLogs } from "./migrations/194-memory-recall-logs.js";
|
|
141
241
|
import { migrateOAuthProvidersPingConfig } from "./migrations/195-oauth-providers-ping-config.js";
|
|
142
242
|
import { migrateMessagesConversationCreatedAtIndex } from "./migrations/196-messages-conversation-created-at-index.js";
|
|
143
|
-
import {
|
|
243
|
+
import {
|
|
244
|
+
migrateStripIntegrationPrefixFromProviderKeys,
|
|
245
|
+
migrateStripIntegrationPrefixFromProviderKeysDown,
|
|
246
|
+
} from "./migrations/196-strip-integration-prefix-from-provider-keys.js";
|
|
144
247
|
import { migrateOAuthProvidersBehaviorColumns } from "./migrations/197-oauth-providers-behavior-columns.js";
|
|
145
248
|
import { migrateDropSetupSkillIdColumn } from "./migrations/198-drop-setup-skill-id-column.js";
|
|
146
249
|
import { migrateGuardianRequestEnrichmentColumns } from "./migrations/199-guardian-request-enrichment-columns.js";
|
|
@@ -149,10 +252,16 @@ import { migrateOAuthProvidersFeatureFlag } from "./migrations/201-oauth-provide
|
|
|
149
252
|
import { migrateDropCallbackTransportColumn } from "./migrations/202-drop-callback-transport-column.js";
|
|
150
253
|
import { migrateCreateMemoryGraphTables } from "./migrations/202-memory-graph-tables.js";
|
|
151
254
|
import { migrateDropMemoryItemsTables } from "./migrations/203-drop-memory-items-tables.js";
|
|
152
|
-
import {
|
|
255
|
+
import {
|
|
256
|
+
migrateRenameMemoryGraphTypeValues,
|
|
257
|
+
migrateRenameMemoryGraphTypeValuesDown,
|
|
258
|
+
} from "./migrations/204-rename-memory-graph-type-values.js";
|
|
153
259
|
import { migrateMemoryGraphImageRefs } from "./migrations/205-memory-graph-image-refs.js";
|
|
154
260
|
import { migrateCreateMemoryGraphNodeEdits } from "./migrations/206-memory-graph-node-edits.js";
|
|
155
|
-
import {
|
|
261
|
+
import {
|
|
262
|
+
migrateScrubCorruptedImageAttachments,
|
|
263
|
+
migrateScrubCorruptedImageAttachmentsDown,
|
|
264
|
+
} from "./migrations/206-scrub-corrupted-image-attachments.js";
|
|
156
265
|
import { migrateCreateConversationGraphMemoryState } from "./migrations/207-conversation-graph-memory-state.js";
|
|
157
266
|
import { migrateConversationsLastMessageAt } from "./migrations/208-conversations-last-message-at.js";
|
|
158
267
|
import { migrateStripThinkingFromConsolidated } from "./migrations/209-strip-thinking-from-consolidated.js";
|
|
@@ -163,10 +272,16 @@ import { migrateOAuthProvidersScopeSeparator } from "./migrations/213-oauth-prov
|
|
|
163
272
|
import { migrateOAuthProvidersRefreshUrl } from "./migrations/214-oauth-providers-refresh-url.js";
|
|
164
273
|
import { migrateOAuthProvidersRevoke } from "./migrations/215-oauth-providers-revoke.js";
|
|
165
274
|
import { migrateOAuthProvidersTokenAuthMethodDefault } from "./migrations/216-oauth-providers-token-auth-method.js";
|
|
166
|
-
import {
|
|
275
|
+
import {
|
|
276
|
+
downConversationHostAccess,
|
|
277
|
+
migrateConversationHostAccess,
|
|
278
|
+
} from "./migrations/217-conversation-host-access.js";
|
|
167
279
|
import { migrateOAuthProvidersLogoUrl } from "./migrations/218-oauth-providers-logo-url.js";
|
|
168
280
|
import { migrateOAuthProvidersTokenExchangeBodyFormat } from "./migrations/219-oauth-providers-token-exchange-body-format.js";
|
|
169
|
-
import {
|
|
281
|
+
import {
|
|
282
|
+
downNormalizeUserFileByPrincipal,
|
|
283
|
+
migrateNormalizeUserFileByPrincipal,
|
|
284
|
+
} from "./migrations/220-normalize-user-file-by-principal.js";
|
|
170
285
|
import { migrateConversationsArchivedAt } from "./migrations/221-conversations-archived-at.js";
|
|
171
286
|
import { migrateStripPlaceholderSentinelsFromMessages } from "./migrations/222-strip-placeholder-sentinels-from-messages.js";
|
|
172
287
|
import { migrateScheduleScriptColumn } from "./migrations/223-schedule-script-column.js";
|
|
@@ -178,13 +293,28 @@ import { migrateRenameInferenceProfileSnakeCase } from "./migrations/228-rename-
|
|
|
178
293
|
import { migrateDeletePrivateConversations } from "./migrations/229-delete-private-conversations.js";
|
|
179
294
|
import { migrate230AcpSessionHistory } from "./migrations/230-acp-session-history.js";
|
|
180
295
|
import { migrate231RepairMemoryGraphEventDates } from "./migrations/231-repair-memory-graph-event-dates.js";
|
|
181
|
-
import {
|
|
296
|
+
import {
|
|
297
|
+
downActivationState,
|
|
298
|
+
migrateActivationState,
|
|
299
|
+
} from "./migrations/232-activation-state.js";
|
|
182
300
|
import { migrateCreateDocumentConversations } from "./migrations/233-document-conversations.js";
|
|
183
|
-
import {
|
|
301
|
+
import {
|
|
302
|
+
downMemoryV2ActivationLogs,
|
|
303
|
+
migrateMemoryV2ActivationLogs,
|
|
304
|
+
} from "./migrations/234-memory-v2-activation-logs.js";
|
|
184
305
|
import { migrateLlmUsageAttribution } from "./migrations/235-llm-usage-attribution.js";
|
|
185
|
-
import {
|
|
186
|
-
|
|
187
|
-
|
|
306
|
+
import {
|
|
307
|
+
downSlackCompactionWatermark,
|
|
308
|
+
migrateSlackCompactionWatermark,
|
|
309
|
+
} from "./migrations/235-slack-compaction-watermark.js";
|
|
310
|
+
import {
|
|
311
|
+
downToolInvocationsMatchedRuleId,
|
|
312
|
+
migrateToolInvocationsMatchedRuleId,
|
|
313
|
+
} from "./migrations/236-tool-invocations-matched-rule-id.js";
|
|
314
|
+
import {
|
|
315
|
+
downHeartbeatRuns,
|
|
316
|
+
migrateHeartbeatRuns,
|
|
317
|
+
} from "./migrations/237-heartbeat-runs.js";
|
|
188
318
|
import { migrateScheduleRetryPolicy } from "./migrations/238-schedule-retry-policy.js";
|
|
189
319
|
import { migrateTraceEventsCreatedAtIndex } from "./migrations/239-trace-events-created-at-index.js";
|
|
190
320
|
import { migrateConversationInferenceProfileSession } from "./migrations/240-conversation-inference-profile-session.js";
|
|
@@ -196,22 +326,46 @@ import { migrateMemoryRetrospectiveState } from "./migrations/245-memory-retrosp
|
|
|
196
326
|
import { migrateBackfillProviderConnectionLabel } from "./migrations/246-backfill-provider-connection-label.js";
|
|
197
327
|
import { migrateExternalConversationBindingThreadId } from "./migrations/247-external-conversation-binding-thread-id.js";
|
|
198
328
|
import { createOnboardingEventsTable } from "./migrations/248-create-onboarding-events.js";
|
|
199
|
-
import {
|
|
329
|
+
import {
|
|
330
|
+
downNormalizeSlackExternalContent,
|
|
331
|
+
migrateNormalizeSlackExternalContent,
|
|
332
|
+
} from "./migrations/249-normalize-slack-external-content.js";
|
|
200
333
|
import { migrateProviderConnectionBaseUrlAndModels } from "./migrations/250-provider-connection-base-url-and-models.js";
|
|
201
334
|
import { downA2ATasks, migrateA2ATasks } from "./migrations/251-a2a-tasks.js";
|
|
202
335
|
import { migrateLlmRequestLogAgentLoopExitReason } from "./migrations/252-llm-request-log-agent-loop-exit-reason.js";
|
|
203
336
|
import { migrateConversationLastNotifiedProfile } from "./migrations/253-conversation-last-notified-profile.js";
|
|
204
337
|
import { migrateCreateDocumentComments } from "./migrations/253-document-comments.js";
|
|
205
|
-
import {
|
|
338
|
+
import {
|
|
339
|
+
downExternalConversationBindingChatName,
|
|
340
|
+
migrateExternalConversationBindingChatName,
|
|
341
|
+
} from "./migrations/254-external-conversation-binding-chat-name.js";
|
|
206
342
|
import { migrateChannelInboundDeliveryAttempts } from "./migrations/255-channel-inbound-delivery-attempts.js";
|
|
207
|
-
import {
|
|
343
|
+
import {
|
|
344
|
+
downMemoryV2InjectionEvents,
|
|
345
|
+
migrateMemoryV2InjectionEvents,
|
|
346
|
+
} from "./migrations/256-memory-v2-injection-events.js";
|
|
208
347
|
import { migrateStripBaseUrlNonOpenaiCompatible } from "./migrations/257-strip-base-url-non-openai-compatible.js";
|
|
209
348
|
import { migrateOnboardingEventsPriorAssistants } from "./migrations/258-onboarding-events-prior-assistants.js";
|
|
210
|
-
import {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
import {
|
|
349
|
+
import {
|
|
350
|
+
downConversationCleanedAt,
|
|
351
|
+
migrateConversationCleanedAt,
|
|
352
|
+
} from "./migrations/259-conversation-cleaned-at.js";
|
|
353
|
+
import {
|
|
354
|
+
downRenameCleanedAt,
|
|
355
|
+
migrateRenameCleanedAt,
|
|
356
|
+
} from "./migrations/260-rename-cleaned-at.js";
|
|
357
|
+
import {
|
|
358
|
+
downLlmUsageAddRawUsage,
|
|
359
|
+
migrateLlmUsageAddRawUsage,
|
|
360
|
+
} from "./migrations/261-llm-usage-add-raw-usage.js";
|
|
361
|
+
import {
|
|
362
|
+
downMemoryV3Coactivation,
|
|
363
|
+
migrateMemoryV3Coactivation,
|
|
364
|
+
} from "./migrations/262-memory-v3-coactivation.js";
|
|
365
|
+
import {
|
|
366
|
+
downMemoryV3AutoEdges,
|
|
367
|
+
migrateMemoryV3AutoEdges,
|
|
368
|
+
} from "./migrations/263-memory-v3-auto-edges.js";
|
|
215
369
|
import { migrateLlmRequestLogCallSite } from "./migrations/264-llm-request-log-call-site.js";
|
|
216
370
|
import { migrateDropProviderConnectionStatus } from "./migrations/265-drop-provider-connection-status.js";
|
|
217
371
|
import { migrateMessagesClientMessageId } from "./migrations/266-messages-client-message-id.js";
|
|
@@ -219,7 +373,10 @@ import { migrateLlmUsageEventsAddAssistantVersion } from "./migrations/267-llm-u
|
|
|
219
373
|
import { migrateAddMemoryV3Selections } from "./migrations/268-add-memory-v3-selections.js";
|
|
220
374
|
import { migrateScheduleScriptTimeout } from "./migrations/269-schedule-script-timeout.js";
|
|
221
375
|
import { migrateMessagesRoleCreatedAtIndex } from "./migrations/270-messages-role-created-at-index.js";
|
|
222
|
-
import {
|
|
376
|
+
import {
|
|
377
|
+
downScheduleDescription,
|
|
378
|
+
migrateScheduleDescription,
|
|
379
|
+
} from "./migrations/270-schedule-description.js";
|
|
223
380
|
import { migrateScheduleSourceConversation } from "./migrations/270-schedule-source-conversation.js";
|
|
224
381
|
import { createAuthFallbackEventsTable } from "./migrations/271-create-auth-fallback-events.js";
|
|
225
382
|
import { migrateAcpSessionHistoryCwd } from "./migrations/272-acp-session-history-cwd.js";
|
|
@@ -252,322 +409,888 @@ import { migrateMoveMemoryJobsToMemoryDb } from "./migrations/298-move-memory-jo
|
|
|
252
409
|
import { migrateCanonicalGuardianDeliveriesConversationIndex } from "./migrations/299-canonical-guardian-deliveries-conversation-index.js";
|
|
253
410
|
import { migrateAddProcessingStartedAt } from "./migrations/300-add-processing-started-at.js";
|
|
254
411
|
import { createWatchdogEventsTable } from "./migrations/301-create-watchdog-events.js";
|
|
412
|
+
import { migrateCreateCompactionEvents } from "./migrations/302-create-compaction-events.js";
|
|
413
|
+
import { migrateAddConversationCreationSeq } from "./migrations/303-add-conversation-creation-seq.js";
|
|
255
414
|
import type { MigrationStep } from "./migrations/run-migrations.js";
|
|
256
415
|
|
|
257
416
|
export const migrationSteps: MigrationStep[] = [
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
417
|
+
migrateCoreTables,
|
|
418
|
+
createWatchersAndLogsTables,
|
|
419
|
+
addCoreColumns,
|
|
420
|
+
{
|
|
421
|
+
name: "migrateJobDeferrals",
|
|
422
|
+
run: migrateJobDeferrals,
|
|
423
|
+
rollback: [
|
|
424
|
+
{
|
|
425
|
+
version: 1,
|
|
426
|
+
description:
|
|
427
|
+
"Reconcile legacy deferral history from attempts column into deferrals column",
|
|
428
|
+
down: downJobDeferrals,
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
},
|
|
432
|
+
migrateToolInvocationsFk,
|
|
433
|
+
{
|
|
434
|
+
name: "migrateMemoryEntityRelationDedup",
|
|
435
|
+
run: migrateMemoryEntityRelationDedup,
|
|
436
|
+
rollback: [
|
|
437
|
+
{
|
|
438
|
+
version: 2,
|
|
439
|
+
description:
|
|
440
|
+
"Deduplicate entity relation edges before enforcing the (source, target, relation) unique index",
|
|
441
|
+
down: downMemoryEntityRelationDedup,
|
|
442
|
+
},
|
|
443
|
+
],
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
name: "migrateMemoryItemsFingerprintScopeUnique",
|
|
447
|
+
run: migrateMemoryItemsFingerprintScopeUnique,
|
|
448
|
+
rollback: [
|
|
449
|
+
{
|
|
450
|
+
version: 3,
|
|
451
|
+
description:
|
|
452
|
+
"Replace column-level UNIQUE on fingerprint with compound (fingerprint, scope_id) unique index",
|
|
453
|
+
down: downMemoryItemsFingerprintScopeUnique,
|
|
454
|
+
},
|
|
455
|
+
],
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: "migrateMemoryItemsScopeSaltedFingerprints",
|
|
459
|
+
run: migrateMemoryItemsScopeSaltedFingerprints,
|
|
460
|
+
dependsOn: ["migrateMemoryItemsFingerprintScopeUnique"],
|
|
461
|
+
rollback: [
|
|
462
|
+
{
|
|
463
|
+
version: 4,
|
|
464
|
+
description:
|
|
465
|
+
"Recompute memory item fingerprints to include scope_id prefix after schema change",
|
|
466
|
+
down: downMemoryItemsScopeSaltedFingerprints,
|
|
467
|
+
},
|
|
468
|
+
],
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
name: "migrateAssistantIdToSelf",
|
|
472
|
+
run: migrateAssistantIdToSelf,
|
|
473
|
+
rollback: [
|
|
474
|
+
{
|
|
475
|
+
version: 5,
|
|
476
|
+
description:
|
|
477
|
+
"Normalize all assistant_id values in scoped tables to the implicit single-tenant identity",
|
|
478
|
+
down: downAssistantIdToSelf,
|
|
479
|
+
},
|
|
480
|
+
],
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
name: "migrateRemoveAssistantIdColumns",
|
|
484
|
+
run: migrateRemoveAssistantIdColumns,
|
|
485
|
+
dependsOn: ["migrateAssistantIdToSelf"],
|
|
486
|
+
rollback: [
|
|
487
|
+
{
|
|
488
|
+
version: 6,
|
|
489
|
+
description:
|
|
490
|
+
"Rebuild four tables to drop the assistant_id column after normalization",
|
|
491
|
+
down: downRemoveAssistantIdColumns,
|
|
492
|
+
},
|
|
493
|
+
],
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
name: "migrateLlmUsageEventsDropAssistantId",
|
|
497
|
+
run: migrateLlmUsageEventsDropAssistantId,
|
|
498
|
+
dependsOn: ["migrateAssistantIdToSelf"],
|
|
499
|
+
rollback: [
|
|
500
|
+
{
|
|
501
|
+
version: 7,
|
|
502
|
+
description:
|
|
503
|
+
"Remove assistant_id column from llm_usage_events (separate checkpoint from the four-table migration)",
|
|
504
|
+
down: downLlmUsageEventsDropAssistantId,
|
|
505
|
+
},
|
|
506
|
+
],
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
name: "createCoreIndexes",
|
|
510
|
+
run: createCoreIndexes,
|
|
511
|
+
rollback: [
|
|
512
|
+
{
|
|
513
|
+
version: 9,
|
|
514
|
+
description:
|
|
515
|
+
"Drop old idx_memory_items_active_search so it can be recreated with updated covering columns",
|
|
516
|
+
down: downDropActiveSearchIndex,
|
|
517
|
+
},
|
|
518
|
+
],
|
|
519
|
+
},
|
|
520
|
+
createContactsAndTriageTables,
|
|
521
|
+
createCallSessionsTables,
|
|
522
|
+
migrateCallSessionMode,
|
|
523
|
+
createFollowupsTables,
|
|
524
|
+
createTasksAndWorkItemsTables,
|
|
525
|
+
createExternalConversationBindingsTables,
|
|
526
|
+
createChannelGuardianTables,
|
|
527
|
+
migrateGuardianVerificationSessions,
|
|
528
|
+
migrateGuardianBootstrapToken,
|
|
529
|
+
migrateGuardianVerificationPurpose,
|
|
530
|
+
createMediaAssetsTables,
|
|
531
|
+
{
|
|
532
|
+
name: "createAssistantInboxTables",
|
|
533
|
+
run: createAssistantInboxTables,
|
|
534
|
+
rollback: [
|
|
535
|
+
{
|
|
536
|
+
version: 8,
|
|
537
|
+
description:
|
|
538
|
+
"Seed assistant_inbox_thread_state from external_conversation_bindings",
|
|
539
|
+
down: downBackfillInboxThreadState,
|
|
540
|
+
},
|
|
541
|
+
],
|
|
542
|
+
},
|
|
543
|
+
migrateGuardianActionTables,
|
|
544
|
+
migrateMemoryFtsBackfill,
|
|
545
|
+
migrateMemorySegmentsIndexes,
|
|
546
|
+
migrateMemoryItemsIndexes,
|
|
547
|
+
migrateRemainingTableIndexes,
|
|
548
|
+
{
|
|
549
|
+
name: "migrateRenameChannelToVellum",
|
|
550
|
+
run: migrateRenameChannelToVellum,
|
|
551
|
+
rollback: [
|
|
552
|
+
{
|
|
553
|
+
version: 11,
|
|
554
|
+
description:
|
|
555
|
+
"Rename macos and ios channel identifiers to vellum across all tables",
|
|
556
|
+
down: downRenameChannelToVellum,
|
|
557
|
+
},
|
|
558
|
+
],
|
|
559
|
+
},
|
|
560
|
+
migrateConversationStatusIndexes,
|
|
561
|
+
migrateAddOriginInterface,
|
|
562
|
+
migrateMemoryItemSourcesIndexes,
|
|
563
|
+
{
|
|
564
|
+
name: "migrateEmbeddingVectorBlob",
|
|
565
|
+
run: migrateEmbeddingVectorBlob,
|
|
566
|
+
rollback: [
|
|
567
|
+
{
|
|
568
|
+
version: 12,
|
|
569
|
+
description:
|
|
570
|
+
"Add vector_blob BLOB column to memory_embeddings and backfill from vector_json for compact binary storage",
|
|
571
|
+
down: downEmbeddingVectorBlob,
|
|
572
|
+
},
|
|
573
|
+
],
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
name: "migrateEmbeddingsNullableVectorJson",
|
|
577
|
+
run: migrateEmbeddingsNullableVectorJson,
|
|
578
|
+
dependsOn: ["migrateEmbeddingVectorBlob"],
|
|
579
|
+
rollback: [
|
|
580
|
+
{
|
|
581
|
+
version: 13,
|
|
582
|
+
description:
|
|
583
|
+
"Rebuild memory_embeddings to make vector_json nullable (pre-100 DBs had NOT NULL)",
|
|
584
|
+
down: downEmbeddingsNullableVectorJson,
|
|
585
|
+
},
|
|
586
|
+
],
|
|
587
|
+
},
|
|
588
|
+
migrateChannelInboundDeliveredSegments,
|
|
589
|
+
migrateGuardianActionFollowup,
|
|
590
|
+
migrateGuardianActionToolMetadata,
|
|
591
|
+
migrateGuardianActionSupersession,
|
|
592
|
+
migrateConversationsThreadTypeIndex,
|
|
593
|
+
migrateGuardianDeliveryConversationIndex,
|
|
594
|
+
{
|
|
595
|
+
name: "createNotificationTables",
|
|
596
|
+
run: createNotificationTables,
|
|
597
|
+
rollback: [
|
|
598
|
+
{
|
|
599
|
+
version: 10,
|
|
600
|
+
description:
|
|
601
|
+
"Drop legacy enum-based notification tables so they can be recreated with the new signal-contract schema",
|
|
602
|
+
down: downNotificationTablesSchema,
|
|
603
|
+
},
|
|
604
|
+
],
|
|
605
|
+
},
|
|
606
|
+
createSequenceTables,
|
|
607
|
+
createMessagesFts,
|
|
608
|
+
migrateMessagesFtsBackfill,
|
|
609
|
+
createConversationAttentionTables,
|
|
610
|
+
migrateReminderRoutingIntent,
|
|
611
|
+
migrateSchemaIndexesAndColumns,
|
|
612
|
+
migrateFkCascadeRebuilds,
|
|
613
|
+
createScopedApprovalGrantsTable,
|
|
614
|
+
migrateNotificationDeliveryThreadDecision,
|
|
615
|
+
createCanonicalGuardianTables,
|
|
616
|
+
migrateCanonicalGuardianRequesterChatId,
|
|
617
|
+
migrateCanonicalGuardianDeliveriesDestinationIndex,
|
|
618
|
+
{
|
|
619
|
+
name: "migrateNormalizePhoneIdentities",
|
|
620
|
+
run: migrateNormalizePhoneIdentities,
|
|
621
|
+
rollback: [
|
|
622
|
+
{
|
|
623
|
+
version: 14,
|
|
624
|
+
description:
|
|
625
|
+
"Normalize phone-like identity fields to E.164 format across guardian bindings, verification challenges, canonical requests, ingress members, and rate limits",
|
|
626
|
+
down: downNormalizePhoneIdentities,
|
|
627
|
+
},
|
|
628
|
+
],
|
|
629
|
+
},
|
|
630
|
+
migrateVoiceInviteColumns,
|
|
631
|
+
migrateVoiceInviteDisplayMetadata,
|
|
632
|
+
migrateInviteCodeHashColumn,
|
|
633
|
+
createApprovalPromptTsTrackerTable,
|
|
634
|
+
migrateGuardianPrincipalIdColumns,
|
|
635
|
+
{
|
|
636
|
+
name: "migrateBackfillGuardianPrincipalId",
|
|
637
|
+
run: migrateBackfillGuardianPrincipalId,
|
|
638
|
+
rollback: [
|
|
639
|
+
{
|
|
640
|
+
version: 15,
|
|
641
|
+
description:
|
|
642
|
+
"Backfill guardianPrincipalId for existing channel_guardian_bindings and canonical_guardian_requests rows, expire unresolvable pending requests",
|
|
643
|
+
down: downBackfillGuardianPrincipalId,
|
|
644
|
+
},
|
|
645
|
+
],
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
name: "migrateGuardianPrincipalIdNotNull",
|
|
649
|
+
run: migrateGuardianPrincipalIdNotNull,
|
|
650
|
+
dependsOn: ["migrateBackfillGuardianPrincipalId"],
|
|
651
|
+
rollback: [
|
|
652
|
+
{
|
|
653
|
+
version: 16,
|
|
654
|
+
description:
|
|
655
|
+
"Enforce NOT NULL on channel_guardian_bindings.guardian_principal_id after backfill",
|
|
656
|
+
down: downGuardianPrincipalIdNotNull,
|
|
657
|
+
},
|
|
658
|
+
],
|
|
659
|
+
},
|
|
660
|
+
migrateContactsRolePrincipal,
|
|
661
|
+
migrateContactChannelsAccessFields,
|
|
662
|
+
migrateContactChannelsTypeChatIdIndex,
|
|
663
|
+
migrateDropLegacyMemberGuardianTables,
|
|
664
|
+
migrateContactsAssistantId,
|
|
665
|
+
migrateAssistantContactMetadata,
|
|
666
|
+
{
|
|
667
|
+
name: "migrateContactsNotesColumn",
|
|
668
|
+
run: migrateContactsNotesColumn,
|
|
669
|
+
rollback: [
|
|
670
|
+
{
|
|
671
|
+
version: 17,
|
|
672
|
+
description:
|
|
673
|
+
"Consolidate relationship/importance/response_expectation/preferred_tone into a single notes TEXT column, then drop the legacy columns",
|
|
674
|
+
down: downContactsNotesColumn,
|
|
675
|
+
},
|
|
676
|
+
],
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
name: "migrateBackfillContactInteractionStats",
|
|
680
|
+
run: migrateBackfillContactInteractionStats,
|
|
681
|
+
rollback: [
|
|
682
|
+
{
|
|
683
|
+
version: 18,
|
|
684
|
+
description:
|
|
685
|
+
"Backfill contacts.last_interaction from the max lastSeenAt across each contact's channels",
|
|
686
|
+
down: downBackfillContactInteractionStats,
|
|
687
|
+
},
|
|
688
|
+
],
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
name: "migrateDropAssistantIdColumns",
|
|
692
|
+
run: migrateDropAssistantIdColumns,
|
|
693
|
+
dependsOn: ["migrateAssistantIdToSelf"],
|
|
694
|
+
rollback: [
|
|
695
|
+
{
|
|
696
|
+
version: 19,
|
|
697
|
+
description:
|
|
698
|
+
"Drop assistant_id columns from all 16 daemon tables after normalization to single-tenant identity",
|
|
699
|
+
down: downDropAssistantIdColumns,
|
|
700
|
+
},
|
|
701
|
+
],
|
|
702
|
+
},
|
|
703
|
+
migrateUsageDashboardIndexes,
|
|
704
|
+
migrateDropUsageCompositeIndexes,
|
|
705
|
+
{
|
|
706
|
+
name: "migrateBackfillUsageCacheAccounting",
|
|
707
|
+
run: migrateBackfillUsageCacheAccounting,
|
|
708
|
+
rollback: [
|
|
709
|
+
{
|
|
710
|
+
version: 20,
|
|
711
|
+
description:
|
|
712
|
+
"Backfill historical Anthropic llm_usage_events rows from llm_request_logs with cache-aware pricing",
|
|
713
|
+
down: downBackfillUsageCacheAccounting,
|
|
714
|
+
},
|
|
715
|
+
],
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
name: "migrateRenameVerificationTable",
|
|
719
|
+
run: migrateRenameVerificationTable,
|
|
720
|
+
rollback: [
|
|
721
|
+
{
|
|
722
|
+
version: 21,
|
|
723
|
+
description:
|
|
724
|
+
"Rename channel_guardian_verification_challenges table to channel_verification_sessions and update indexes",
|
|
725
|
+
down: downRenameVerificationTable,
|
|
726
|
+
},
|
|
727
|
+
],
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: "migrateRenameVerificationSessionIdColumn",
|
|
731
|
+
run: migrateRenameVerificationSessionIdColumn,
|
|
732
|
+
rollback: [
|
|
733
|
+
{
|
|
734
|
+
version: 22,
|
|
735
|
+
description:
|
|
736
|
+
"Rename guardian_verification_session_id column in call_sessions to verification_session_id",
|
|
737
|
+
down: downRenameVerificationSessionIdColumn,
|
|
738
|
+
},
|
|
739
|
+
],
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: "migrateRenameGuardianVerificationValues",
|
|
743
|
+
run: migrateRenameGuardianVerificationValues,
|
|
744
|
+
rollback: [
|
|
745
|
+
{
|
|
746
|
+
version: 23,
|
|
747
|
+
description:
|
|
748
|
+
"Rename persisted guardian_verification call_mode and guardian_voice_verification_* event_type values to drop the guardian_ prefix",
|
|
749
|
+
down: downRenameGuardianVerificationValues,
|
|
750
|
+
},
|
|
751
|
+
],
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
name: "migrateRenameVoiceToPhone",
|
|
755
|
+
run: migrateRenameVoiceToPhone,
|
|
756
|
+
rollback: [
|
|
757
|
+
{
|
|
758
|
+
version: 24,
|
|
759
|
+
description:
|
|
760
|
+
'Rename stored "voice" channel values to "phone" across all tables with channel text columns',
|
|
761
|
+
down: downRenameVoiceToPhone,
|
|
762
|
+
},
|
|
763
|
+
],
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
name: "migrateDropAccountsTable",
|
|
767
|
+
run: migrateDropAccountsTable,
|
|
768
|
+
rollback: [
|
|
769
|
+
{
|
|
770
|
+
version: 25,
|
|
771
|
+
description:
|
|
772
|
+
"Drop the unused legacy accounts table and its leftover indexes after account_manage removal",
|
|
773
|
+
down: migrateDropAccountsTableDown,
|
|
774
|
+
},
|
|
775
|
+
],
|
|
776
|
+
},
|
|
777
|
+
migrateScheduleOneShotRouting,
|
|
778
|
+
{
|
|
779
|
+
name: "migrateRemindersToSchedules",
|
|
780
|
+
run: migrateRemindersToSchedules,
|
|
781
|
+
rollback: [
|
|
782
|
+
{
|
|
783
|
+
version: 26,
|
|
784
|
+
description:
|
|
785
|
+
"Copy all existing reminders into cron_jobs as one-shot schedules with correct status and field mapping",
|
|
786
|
+
down: migrateRemindersToSchedulesDown,
|
|
787
|
+
},
|
|
788
|
+
],
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
name: "migrateDropRemindersTable",
|
|
792
|
+
run: migrateDropRemindersTable,
|
|
793
|
+
dependsOn: ["migrateRemindersToSchedules"],
|
|
794
|
+
rollback: [
|
|
795
|
+
{
|
|
796
|
+
version: 27,
|
|
797
|
+
description:
|
|
798
|
+
"Drop the legacy reminders table and its index after data migration to cron_jobs",
|
|
799
|
+
down: migrateDropRemindersTableDown,
|
|
800
|
+
},
|
|
801
|
+
],
|
|
802
|
+
},
|
|
803
|
+
createOAuthTables,
|
|
804
|
+
{
|
|
805
|
+
name: "migrateOAuthAppsClientSecretPath",
|
|
806
|
+
run: migrateOAuthAppsClientSecretPath,
|
|
807
|
+
rollback: [
|
|
808
|
+
{
|
|
809
|
+
version: 28,
|
|
810
|
+
description:
|
|
811
|
+
"Add client_secret_credential_path column to oauth_apps and backfill existing rows with convention-based paths",
|
|
812
|
+
down: migrateOAuthAppsClientSecretPathDown,
|
|
813
|
+
},
|
|
814
|
+
],
|
|
815
|
+
},
|
|
816
|
+
migrateOAuthProvidersPingUrl,
|
|
817
|
+
migrateMemoryItemSupersession,
|
|
818
|
+
migrateDropEntityTables,
|
|
819
|
+
migrateDropMemorySegmentFts,
|
|
820
|
+
migrateDropConflicts,
|
|
821
|
+
migrateCallSessionInviteMetadata,
|
|
822
|
+
migrateInviteContactId,
|
|
823
|
+
migrateChannelInteractionColumns,
|
|
824
|
+
migrateDropContactInteractionColumns,
|
|
825
|
+
migrateDropLoopbackPortColumn,
|
|
826
|
+
migrateDropOrphanedMediaTables,
|
|
827
|
+
{
|
|
828
|
+
name: "migrateGuardianTimestampsEpochMs",
|
|
829
|
+
run: migrateGuardianTimestampsEpochMs,
|
|
830
|
+
rollback: [
|
|
831
|
+
{
|
|
832
|
+
version: 29,
|
|
833
|
+
description:
|
|
834
|
+
"Convert guardian table timestamps from ISO 8601 text to epoch ms integers for consistency with all other tables",
|
|
835
|
+
down: migrateGuardianTimestampsEpochMsDown,
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
version: 30,
|
|
839
|
+
description:
|
|
840
|
+
"Rebuild guardian tables so timestamp columns have INTEGER affinity instead of TEXT",
|
|
841
|
+
down: migrateGuardianTimestampsRebuildDown,
|
|
842
|
+
},
|
|
843
|
+
],
|
|
844
|
+
},
|
|
845
|
+
migrateRenameInboxThreadStateTable,
|
|
846
|
+
migrateRenameConversationTypeColumn,
|
|
847
|
+
migrateRenameNotificationThreadColumns,
|
|
848
|
+
migrateRenameFollowupsThreadIdColumn,
|
|
849
|
+
migrateRenameSequenceEnrollmentsThreadIdColumn,
|
|
850
|
+
migrateRenameSequenceStepsReplyKey,
|
|
851
|
+
{
|
|
852
|
+
name: "migrateRenameGmailProviderKeyToGoogle",
|
|
853
|
+
run: migrateRenameGmailProviderKeyToGoogle,
|
|
854
|
+
rollback: [
|
|
855
|
+
{
|
|
856
|
+
version: 31,
|
|
857
|
+
description:
|
|
858
|
+
"Rename integration:gmail provider key to integration:google across oauth_providers, oauth_apps, and oauth_connections",
|
|
859
|
+
down: migrateRenameGmailProviderKeyToGoogleDown,
|
|
860
|
+
},
|
|
861
|
+
],
|
|
862
|
+
},
|
|
863
|
+
migrateCreateThreadStartersTable,
|
|
864
|
+
migrateCapabilityCardColumns,
|
|
865
|
+
migrateRenameCreatedBySessionIdColumns,
|
|
866
|
+
migrateRenameSourceSessionIdColumn,
|
|
867
|
+
{
|
|
868
|
+
name: "migrateRenameThreadStartersTable",
|
|
869
|
+
run: migrateRenameThreadStartersTable,
|
|
870
|
+
rollback: [
|
|
871
|
+
{
|
|
872
|
+
version: 32,
|
|
873
|
+
description:
|
|
874
|
+
"Rename thread_starters table to conversation_starters and recreate indexes with new names",
|
|
875
|
+
down: migrateRenameThreadStartersTableDown,
|
|
876
|
+
},
|
|
877
|
+
],
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
name: "migrateRenameThreadStartersCheckpoints",
|
|
881
|
+
run: migrateRenameThreadStartersCheckpoints,
|
|
882
|
+
dependsOn: ["migrateRenameThreadStartersTable"],
|
|
883
|
+
rollback: [
|
|
884
|
+
{
|
|
885
|
+
version: 35,
|
|
886
|
+
description:
|
|
887
|
+
"Rename checkpoint keys from thread_starters: to conversation_starters: prefix so renamed code paths find existing generation state",
|
|
888
|
+
down: migrateRenameThreadStartersCheckpointsDown,
|
|
889
|
+
},
|
|
890
|
+
],
|
|
891
|
+
},
|
|
892
|
+
createLifecycleEventsTable,
|
|
893
|
+
{
|
|
894
|
+
name: "migrateDropCapabilityCardState",
|
|
895
|
+
run: migrateDropCapabilityCardState,
|
|
896
|
+
dependsOn: ["migrateRenameThreadStartersTable"],
|
|
897
|
+
rollback: [
|
|
898
|
+
{
|
|
899
|
+
version: 33,
|
|
900
|
+
description:
|
|
901
|
+
"Remove deleted capability-card rows, jobs, checkpoints, and category state",
|
|
902
|
+
down: migrateDropCapabilityCardStateDown,
|
|
903
|
+
},
|
|
904
|
+
],
|
|
905
|
+
},
|
|
906
|
+
migrateCreateTraceEventsTable,
|
|
907
|
+
migrateOAuthProvidersManagedServiceConfigKey,
|
|
908
|
+
migrateOAuthProvidersDisplayMetadata,
|
|
909
|
+
migrateLlmRequestLogMessageId,
|
|
910
|
+
migrateLlmRequestLogProvider,
|
|
911
|
+
{
|
|
912
|
+
name: "migrateBackfillInlineAttachmentsToDisk",
|
|
913
|
+
run: migrateBackfillInlineAttachmentsToDisk,
|
|
914
|
+
rollback: [
|
|
915
|
+
{
|
|
916
|
+
version: 34,
|
|
917
|
+
description:
|
|
918
|
+
"Backfill existing inline base64 attachments to on-disk storage and clear dataBase64",
|
|
919
|
+
down: migrateBackfillInlineAttachmentsToDiskDown,
|
|
920
|
+
},
|
|
921
|
+
],
|
|
922
|
+
},
|
|
923
|
+
migrateConversationForkLineage,
|
|
924
|
+
migrateScheduleQuietFlag,
|
|
925
|
+
migrateDropSimplifiedMemory,
|
|
926
|
+
migrateCallSessionSkipDisclosure,
|
|
927
|
+
{
|
|
928
|
+
name: "migrateBackfillAudioAttachmentMimeTypes",
|
|
929
|
+
run: migrateBackfillAudioAttachmentMimeTypes,
|
|
930
|
+
rollback: [
|
|
931
|
+
{
|
|
932
|
+
version: 36,
|
|
933
|
+
description:
|
|
934
|
+
"Backfill correct MIME types for audio attachments stored as application/octet-stream due to missing extension map entries",
|
|
935
|
+
down: migrateBackfillAudioAttachmentMimeTypesDown,
|
|
936
|
+
},
|
|
937
|
+
],
|
|
938
|
+
},
|
|
939
|
+
migrateContactsUserFileColumn,
|
|
940
|
+
{
|
|
941
|
+
name: "migrateAddSourceTypeColumns",
|
|
942
|
+
run: migrateAddSourceTypeColumns,
|
|
943
|
+
rollback: [
|
|
944
|
+
{
|
|
945
|
+
version: 37,
|
|
946
|
+
description:
|
|
947
|
+
"Add source_type and source_message_role columns to memory_items with backfill from verification_state and source messages",
|
|
948
|
+
down: migrateAddSourceTypeColumnsDown,
|
|
949
|
+
},
|
|
950
|
+
],
|
|
951
|
+
},
|
|
952
|
+
migrateCreateMemoryRecallLogs,
|
|
953
|
+
migrateOAuthProvidersPingConfig,
|
|
954
|
+
{
|
|
955
|
+
name: "migrateStripIntegrationPrefixFromProviderKeys",
|
|
956
|
+
run: migrateStripIntegrationPrefixFromProviderKeys,
|
|
957
|
+
rollback: [
|
|
958
|
+
{
|
|
959
|
+
version: 38,
|
|
960
|
+
description:
|
|
961
|
+
"Strip integration: prefix from provider_key across oauth_providers, oauth_apps, and oauth_connections",
|
|
962
|
+
down: migrateStripIntegrationPrefixFromProviderKeysDown,
|
|
963
|
+
},
|
|
964
|
+
],
|
|
965
|
+
},
|
|
966
|
+
migrateMessagesConversationCreatedAtIndex,
|
|
967
|
+
migrateOAuthProvidersBehaviorColumns,
|
|
968
|
+
migrateDropSetupSkillIdColumn,
|
|
969
|
+
migrateGuardianRequestEnrichmentColumns,
|
|
970
|
+
migrateUsageLlmCallCount,
|
|
971
|
+
migrateOAuthProvidersFeatureFlag,
|
|
972
|
+
migrateDropCallbackTransportColumn,
|
|
973
|
+
migrateCreateMemoryGraphTables,
|
|
974
|
+
migrateMemoryGraphImageRefs,
|
|
975
|
+
// 101b. Migrate tool-created items from legacy memory_items → graph nodes.
|
|
976
|
+
// Must run before migrateDropMemoryItemsTables so data is preserved.
|
|
977
|
+
migrateToolCreatedItems,
|
|
978
|
+
migrateDropMemoryItemsTables,
|
|
979
|
+
{
|
|
980
|
+
name: "migrateRenameMemoryGraphTypeValues",
|
|
981
|
+
run: migrateRenameMemoryGraphTypeValues,
|
|
982
|
+
rollback: [
|
|
983
|
+
{
|
|
984
|
+
version: 39,
|
|
985
|
+
description:
|
|
986
|
+
"Rename legacy memory graph node type values: style → behavioral, relationship → semantic",
|
|
987
|
+
down: migrateRenameMemoryGraphTypeValuesDown,
|
|
988
|
+
},
|
|
989
|
+
],
|
|
990
|
+
},
|
|
991
|
+
migrateCreateMemoryGraphNodeEdits,
|
|
992
|
+
{
|
|
993
|
+
name: "migrateScrubCorruptedImageAttachments",
|
|
994
|
+
run: migrateScrubCorruptedImageAttachments,
|
|
995
|
+
rollback: [
|
|
996
|
+
{
|
|
997
|
+
version: 40,
|
|
998
|
+
description:
|
|
999
|
+
"Remove image attachments containing HTML error pages instead of image data",
|
|
1000
|
+
down: migrateScrubCorruptedImageAttachmentsDown,
|
|
1001
|
+
},
|
|
1002
|
+
],
|
|
1003
|
+
},
|
|
1004
|
+
migrateCreateConversationGraphMemoryState,
|
|
1005
|
+
migrateConversationsLastMessageAt,
|
|
1006
|
+
migrateStripThinkingFromConsolidated,
|
|
1007
|
+
migrateScheduleReuseConversation,
|
|
1008
|
+
migrateScheduleScriptColumn,
|
|
1009
|
+
migrateMemoryRecallLogsQueryContext,
|
|
1010
|
+
migrateLlmRequestLogsCreatedAtIndex,
|
|
1011
|
+
migrateOAuthProvidersScopeSeparator,
|
|
1012
|
+
migrateOAuthProvidersRefreshUrl,
|
|
1013
|
+
migrateOAuthProvidersRevoke,
|
|
1014
|
+
migrateOAuthProvidersTokenAuthMethodDefault,
|
|
1015
|
+
{
|
|
1016
|
+
name: "migrateConversationHostAccess",
|
|
1017
|
+
run: migrateConversationHostAccess,
|
|
1018
|
+
rollback: [
|
|
1019
|
+
{
|
|
1020
|
+
version: 41,
|
|
1021
|
+
description:
|
|
1022
|
+
"Add a host_access column to conversations so computer access is persisted per conversation with a safe default of disabled",
|
|
1023
|
+
down: downConversationHostAccess,
|
|
1024
|
+
},
|
|
1025
|
+
],
|
|
1026
|
+
},
|
|
1027
|
+
migrateOAuthProvidersLogoUrl,
|
|
1028
|
+
migrateOAuthProvidersTokenExchangeBodyFormat,
|
|
1029
|
+
{
|
|
1030
|
+
name: "migrateNormalizeUserFileByPrincipal",
|
|
1031
|
+
run: migrateNormalizeUserFileByPrincipal,
|
|
1032
|
+
rollback: [
|
|
1033
|
+
{
|
|
1034
|
+
version: 42,
|
|
1035
|
+
description:
|
|
1036
|
+
"Normalize contacts.user_file across rows sharing the same principal_id so every channel for one principal loads the same users/<slug>.md persona and journal directory",
|
|
1037
|
+
down: downNormalizeUserFileByPrincipal,
|
|
1038
|
+
},
|
|
1039
|
+
],
|
|
1040
|
+
},
|
|
1041
|
+
migrateConversationsArchivedAt,
|
|
1042
|
+
migrateStripPlaceholderSentinelsFromMessages,
|
|
1043
|
+
migrateOAuthProvidersManagedServiceIsPaid,
|
|
1044
|
+
migrateOAuthProvidersAvailableScopes,
|
|
1045
|
+
migrateScheduleWakeConversationId,
|
|
1046
|
+
migrateAddConversationInferenceProfile,
|
|
1047
|
+
migrateRenameInferenceProfileSnakeCase,
|
|
1048
|
+
migrateDeletePrivateConversations,
|
|
1049
|
+
migrate230AcpSessionHistory,
|
|
1050
|
+
migrate231RepairMemoryGraphEventDates,
|
|
1051
|
+
{
|
|
1052
|
+
name: "migrateActivationState",
|
|
1053
|
+
run: migrateActivationState,
|
|
1054
|
+
rollback: [
|
|
1055
|
+
{
|
|
1056
|
+
version: 43,
|
|
1057
|
+
description: "Create activation_state table for memory v2",
|
|
1058
|
+
down: downActivationState,
|
|
1059
|
+
},
|
|
1060
|
+
],
|
|
1061
|
+
},
|
|
1062
|
+
migrateActivationStateFkCascade,
|
|
1063
|
+
{
|
|
1064
|
+
name: "migrateMemoryV2ActivationLogs",
|
|
1065
|
+
run: migrateMemoryV2ActivationLogs,
|
|
1066
|
+
rollback: [
|
|
1067
|
+
{
|
|
1068
|
+
version: 44,
|
|
1069
|
+
description:
|
|
1070
|
+
"Create memory_v2_activation_logs table for per-turn v2 activation telemetry consumed by the LLM Context Inspector",
|
|
1071
|
+
down: downMemoryV2ActivationLogs,
|
|
1072
|
+
},
|
|
1073
|
+
],
|
|
1074
|
+
},
|
|
1075
|
+
migrateCreateDocumentConversations,
|
|
1076
|
+
migrateLlmUsageAttribution,
|
|
1077
|
+
{
|
|
1078
|
+
name: "migrateSlackCompactionWatermark",
|
|
1079
|
+
run: migrateSlackCompactionWatermark,
|
|
1080
|
+
rollback: [
|
|
1081
|
+
{
|
|
1082
|
+
version: 45,
|
|
1083
|
+
description:
|
|
1084
|
+
"Add Slack-specific compaction watermark columns to conversations",
|
|
1085
|
+
down: downSlackCompactionWatermark,
|
|
1086
|
+
},
|
|
1087
|
+
],
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
name: "migrateToolInvocationsMatchedRuleId",
|
|
1091
|
+
run: migrateToolInvocationsMatchedRuleId,
|
|
1092
|
+
rollback: [
|
|
1093
|
+
{
|
|
1094
|
+
version: 46,
|
|
1095
|
+
description:
|
|
1096
|
+
"Add matched_trust_rule_id column to tool_invocations for trust rule audit and rule editor UI",
|
|
1097
|
+
down: downToolInvocationsMatchedRuleId,
|
|
1098
|
+
},
|
|
1099
|
+
],
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
name: "migrateHeartbeatRuns",
|
|
1103
|
+
run: migrateHeartbeatRuns,
|
|
1104
|
+
rollback: [
|
|
1105
|
+
{
|
|
1106
|
+
version: 47,
|
|
1107
|
+
description:
|
|
1108
|
+
"Create heartbeat_runs table for tracking heartbeat execution lifecycle with CAS state transitions",
|
|
1109
|
+
down: downHeartbeatRuns,
|
|
1110
|
+
},
|
|
1111
|
+
],
|
|
1112
|
+
},
|
|
1113
|
+
function migrateBackfillAppConversationIds() {
|
|
1114
|
+
backfillAppConversationIds();
|
|
1115
|
+
},
|
|
1116
|
+
migrateScheduleRetryPolicy,
|
|
1117
|
+
migrateTraceEventsCreatedAtIndex,
|
|
1118
|
+
migrateConversationInferenceProfileSession,
|
|
1119
|
+
migrateMessageBookmarks,
|
|
1120
|
+
migrateCreateProviderConnections,
|
|
1121
|
+
migrateProviderConnectionStatusLabel,
|
|
1122
|
+
migrateMemoryRetrospectiveState,
|
|
1123
|
+
migrateBackfillProviderConnectionLabel,
|
|
1124
|
+
migrateExternalConversationBindingThreadId,
|
|
1125
|
+
createOnboardingEventsTable,
|
|
1126
|
+
{
|
|
1127
|
+
name: "migrateNormalizeSlackExternalContent",
|
|
1128
|
+
run: migrateNormalizeSlackExternalContent,
|
|
1129
|
+
rollback: [
|
|
1130
|
+
{
|
|
1131
|
+
version: 48,
|
|
1132
|
+
description:
|
|
1133
|
+
"Normalize legacy persisted Slack external_content wrappers back to raw message content",
|
|
1134
|
+
down: downNormalizeSlackExternalContent,
|
|
1135
|
+
},
|
|
1136
|
+
],
|
|
1137
|
+
},
|
|
1138
|
+
migrateProviderConnectionBaseUrlAndModels,
|
|
1139
|
+
{
|
|
1140
|
+
name: "migrateA2ATasks",
|
|
1141
|
+
run: migrateA2ATasks,
|
|
1142
|
+
rollback: [
|
|
1143
|
+
{
|
|
1144
|
+
version: 49,
|
|
1145
|
+
description:
|
|
1146
|
+
"Create a2a_tasks table for tracking A2A request/response lifecycle",
|
|
1147
|
+
down: downA2ATasks,
|
|
1148
|
+
},
|
|
1149
|
+
],
|
|
1150
|
+
},
|
|
1151
|
+
migrateLlmRequestLogAgentLoopExitReason,
|
|
1152
|
+
migrateCreateDocumentComments,
|
|
1153
|
+
{
|
|
1154
|
+
name: "migrateExternalConversationBindingChatName",
|
|
1155
|
+
run: migrateExternalConversationBindingChatName,
|
|
1156
|
+
rollback: [
|
|
1157
|
+
{
|
|
1158
|
+
version: 50,
|
|
1159
|
+
description:
|
|
1160
|
+
"Add external_chat_name to external conversation bindings for channel footer metadata",
|
|
1161
|
+
down: downExternalConversationBindingChatName,
|
|
1162
|
+
},
|
|
1163
|
+
],
|
|
1164
|
+
},
|
|
1165
|
+
migrateChannelInboundDeliveryAttempts,
|
|
1166
|
+
{
|
|
1167
|
+
name: "migrateMemoryV2InjectionEvents",
|
|
1168
|
+
run: migrateMemoryV2InjectionEvents,
|
|
1169
|
+
dependsOn: ["migrateMemoryV2ActivationLogs"],
|
|
1170
|
+
rollback: [
|
|
1171
|
+
{
|
|
1172
|
+
version: 51,
|
|
1173
|
+
description:
|
|
1174
|
+
"Create memory_v2_injection_events table and backfill from activation logs for EMA-based tier 2 routing",
|
|
1175
|
+
down: downMemoryV2InjectionEvents,
|
|
1176
|
+
},
|
|
1177
|
+
],
|
|
1178
|
+
},
|
|
1179
|
+
migrateConversationLastNotifiedProfile,
|
|
1180
|
+
migrateStripBaseUrlNonOpenaiCompatible,
|
|
1181
|
+
migrateOnboardingEventsPriorAssistants,
|
|
1182
|
+
{
|
|
1183
|
+
name: "migrateConversationCleanedAt",
|
|
1184
|
+
run: migrateConversationCleanedAt,
|
|
1185
|
+
rollback: [
|
|
1186
|
+
{
|
|
1187
|
+
version: 52,
|
|
1188
|
+
description:
|
|
1189
|
+
"Add cleaned_at timestamp to conversations so /clean survives reload and forks inherit conditionally on fork point",
|
|
1190
|
+
down: downConversationCleanedAt,
|
|
1191
|
+
},
|
|
1192
|
+
],
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
name: "migrateRenameCleanedAt",
|
|
1196
|
+
run: migrateRenameCleanedAt,
|
|
1197
|
+
dependsOn: ["migrateConversationCleanedAt"],
|
|
1198
|
+
rollback: [
|
|
1199
|
+
{
|
|
1200
|
+
version: 53,
|
|
1201
|
+
description:
|
|
1202
|
+
"Rename conversations.cleaned_at to history_stripped_at; the marker now records any injection-strip event (including compaction), not just /clean",
|
|
1203
|
+
down: downRenameCleanedAt,
|
|
1204
|
+
},
|
|
1205
|
+
],
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
name: "migrateLlmUsageAddRawUsage",
|
|
1209
|
+
run: migrateLlmUsageAddRawUsage,
|
|
1210
|
+
rollback: [
|
|
1211
|
+
{
|
|
1212
|
+
version: 54,
|
|
1213
|
+
description:
|
|
1214
|
+
"Add raw_usage TEXT column to llm_usage_events for storing the provider's untouched usage block as JSON (Anthropic TTL breakdown, OpenAI prompt/completion token details, etc.) so downstream consumers can extract provider-specific detail without per-field schema changes",
|
|
1215
|
+
down: downLlmUsageAddRawUsage,
|
|
1216
|
+
},
|
|
1217
|
+
],
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
name: "migrateMemoryV3Coactivation",
|
|
1221
|
+
run: migrateMemoryV3Coactivation,
|
|
1222
|
+
rollback: [
|
|
1223
|
+
{
|
|
1224
|
+
version: 55,
|
|
1225
|
+
description:
|
|
1226
|
+
"Create memory_v3_coactivation table — append-only log of pass-1 → pass-N co-activation pairs (gradient signal) emitted by the v3 retrieval loop and reconciled later by edge-learning",
|
|
1227
|
+
down: downMemoryV3Coactivation,
|
|
1228
|
+
},
|
|
1229
|
+
],
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
name: "migrateMemoryV3AutoEdges",
|
|
1233
|
+
run: migrateMemoryV3AutoEdges,
|
|
1234
|
+
rollback: [
|
|
1235
|
+
{
|
|
1236
|
+
version: 56,
|
|
1237
|
+
description:
|
|
1238
|
+
"Create memory_v3_auto_edges table — weighted, decaying learned association graph (distinct from curated edges:) accrued by the edge-learning job from used co-activations and consumed above-threshold by edge expansion",
|
|
1239
|
+
down: downMemoryV3AutoEdges,
|
|
1240
|
+
},
|
|
1241
|
+
],
|
|
1242
|
+
},
|
|
1243
|
+
migrateLlmRequestLogCallSite,
|
|
1244
|
+
migrateDropProviderConnectionStatus,
|
|
1245
|
+
migrateMessagesClientMessageId,
|
|
1246
|
+
migrateLlmUsageEventsAddAssistantVersion,
|
|
1247
|
+
migrateAddMemoryV3Selections,
|
|
1248
|
+
migrateScheduleScriptTimeout,
|
|
1249
|
+
{
|
|
1250
|
+
name: "migrateScheduleDescription",
|
|
1251
|
+
run: migrateScheduleDescription,
|
|
1252
|
+
rollback: [
|
|
1253
|
+
{
|
|
1254
|
+
version: 57,
|
|
1255
|
+
description:
|
|
1256
|
+
"Backfill authored schedule descriptions for legacy non-defer schedules from their existing names",
|
|
1257
|
+
down: downScheduleDescription,
|
|
1258
|
+
},
|
|
1259
|
+
],
|
|
1260
|
+
},
|
|
1261
|
+
migrateScheduleSourceConversation,
|
|
1262
|
+
migrateMessagesRoleCreatedAtIndex,
|
|
1263
|
+
createAuthFallbackEventsTable,
|
|
1264
|
+
migrateAcpSessionHistoryCwd,
|
|
1265
|
+
migrateOnboardingEventsFunnelColumns,
|
|
1266
|
+
createActivationSessionsTable,
|
|
1267
|
+
migrateToolInvocationsSkillId,
|
|
1268
|
+
migrateToolInvocationsCreatedAtIdIndex,
|
|
1269
|
+
migrateAddMemoryV3EverInjected,
|
|
1270
|
+
migrateToolInvocationsTelemetryColumns,
|
|
1271
|
+
createSkillLoadedEventsTable,
|
|
1272
|
+
migrateConversationsSurfacedAt,
|
|
1273
|
+
migrateMemoryRetrospectiveRememberedLog,
|
|
1274
|
+
migrateScheduleInferenceProfile,
|
|
1275
|
+
migrateMemoryV3SelectionsMessageIdAndSections,
|
|
1276
|
+
migrateWorkflowRuns,
|
|
1277
|
+
migrateScheduleWorkflowMode,
|
|
1278
|
+
migrateWorkflowRunTrust,
|
|
1279
|
+
migrateConversationOriginChannelIndex,
|
|
1280
|
+
migrateBackfillOriginChannelFromBindings,
|
|
1281
|
+
migrateContactChannelsUniqueExtUser,
|
|
1282
|
+
migrateScheduleCapabilities,
|
|
1283
|
+
migrateContactChannelsRenormalizeAddresses,
|
|
1284
|
+
migrateScheduleDefaultNoReuseConversation,
|
|
1285
|
+
migrateWorkflowJournalLeafTokens,
|
|
1286
|
+
migrateDropExternalUserId,
|
|
1287
|
+
dropApprovalPromptTsTrackerTable,
|
|
1288
|
+
migrateRewriteBalancedEconomyProfilePins,
|
|
1289
|
+
migrateMoveLlmRequestLogsToLogsDb,
|
|
1290
|
+
migrateMoveMemoryJobsToMemoryDb,
|
|
1291
|
+
migrateCanonicalGuardianDeliveriesConversationIndex,
|
|
1292
|
+
migrateAddProcessingStartedAt,
|
|
1293
|
+
createWatchdogEventsTable,
|
|
1294
|
+
migrateCreateCompactionEvents,
|
|
1295
|
+
migrateAddConversationCreationSeq,
|
|
573
1296
|
];
|