@vellumai/assistant 0.8.11 → 0.8.12-dev.202606122337.5897832
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 +60 -62
- package/README.md +1 -7
- package/bun.lock +169 -247
- package/docs/architecture/integrations.md +3 -3
- package/docs/architecture/memory.md +2 -2
- package/docs/architecture/security.md +10 -10
- package/docs/runbook-trusted-contacts.md +12 -12
- package/docs/skills.md +6 -6
- package/examples/plugins/echo/README.md +5 -5
- package/knip.json +1 -0
- package/node_modules/@vellumai/gateway-client/bun.lock +1 -0
- package/node_modules/@vellumai/gateway-client/package.json +3 -1
- package/node_modules/@vellumai/gateway-client/src/__tests__/gateway-client.test.ts +1 -1
- package/node_modules/@vellumai/gateway-client/src/gateway-ipc-contracts.ts +87 -0
- package/node_modules/@vellumai/gateway-client/src/index.ts +3 -5
- package/openapi.yaml +2575 -57
- package/package.json +2 -4
- package/src/__tests__/adaptive-thinking-repair.test.ts +185 -0
- package/src/__tests__/agent-loop-compaction-events.test.ts +7 -6
- package/src/__tests__/agent-wake-disk-pressure-callsite.test.ts +2 -0
- package/src/__tests__/agent-wake-override-profile.test.ts +77 -0
- package/src/__tests__/anthropic-provider.test.ts +129 -0
- package/src/__tests__/app-dir-path-guard.test.ts +1 -0
- package/src/__tests__/approval-cascade.test.ts +0 -5
- package/src/__tests__/assistant-stream-state.test.ts +107 -0
- package/src/__tests__/background-workers-disk-pressure.test.ts +4 -1
- package/src/__tests__/btw-routes.test.ts +7 -34
- package/src/__tests__/checker.test.ts +6 -12
- package/src/__tests__/compaction-events.test.ts +63 -7
- package/src/__tests__/compaction-trail-store.test.ts +74 -1
- package/src/__tests__/config-loader-backfill.test.ts +4 -2
- package/src/__tests__/config-loader-quarantine-notice.test.ts +167 -0
- package/src/__tests__/config-watcher.test.ts +2 -2
- package/src/__tests__/conversation-abort-tool-results.test.ts +0 -5
- package/src/__tests__/conversation-agent-loop-inference-profile.test.ts +1 -1
- package/src/__tests__/conversation-confirmation-signals.test.ts +0 -5
- package/src/__tests__/conversation-error.test.ts +2 -6
- package/src/__tests__/conversation-history-web-search.test.ts +8 -0
- package/src/__tests__/conversation-process-callsite.test.ts +0 -5
- package/src/__tests__/conversation-provider-retry-repair.test.ts +0 -5
- package/src/__tests__/conversation-queue.test.ts +0 -5
- package/src/__tests__/conversation-slash-queue.test.ts +0 -5
- package/src/__tests__/conversation-slash-unknown.test.ts +0 -5
- package/src/__tests__/conversation-speed-override.test.ts +0 -5
- package/src/__tests__/conversation-title-service.test.ts +2 -1
- package/src/__tests__/conversation-workspace-injection.test.ts +0 -5
- package/src/__tests__/conversation-workspace-tool-tracking.test.ts +0 -5
- package/src/__tests__/credential-security-invariants.test.ts +1 -1
- package/src/__tests__/disk-pressure-tools.test.ts +1 -1
- package/src/__tests__/exploration-drift-hook.test.ts +692 -0
- package/src/__tests__/filing-service.test.ts +8 -3
- package/src/__tests__/guardian-action-sweep.test.ts +56 -219
- package/src/__tests__/handlers-skills-memory-v2-reseed.test.ts +1 -1
- package/src/__tests__/heartbeat-disk-pressure.test.ts +4 -1
- package/src/__tests__/heartbeat-service.test.ts +5 -2
- package/src/__tests__/helpers/channel-test-adapter.ts +0 -2
- package/src/__tests__/identity-intro-cache.test.ts +12 -5
- package/src/__tests__/identity-routes.test.ts +16 -57
- package/src/__tests__/injector-chain.test.ts +8 -3
- package/src/__tests__/injector-config-quarantine-notice.test.ts +115 -0
- package/src/__tests__/llm-catalog-parity.test.ts +16 -0
- package/src/__tests__/llm-request-log-source-clickhouse.test.ts +87 -1
- package/src/__tests__/llm-resolver.test.ts +91 -0
- package/src/__tests__/llm-usage-store.test.ts +11 -0
- package/src/__tests__/log-export-workspace.test.ts +468 -3
- package/src/__tests__/managed-profile-guard.test.ts +6 -5
- package/src/__tests__/max-tokens-continue-hook.test.ts +184 -0
- package/src/__tests__/media-generate-image.test.ts +20 -9
- package/src/__tests__/memory-v2-static-injector.test.ts +22 -0
- package/src/__tests__/model-intents.test.ts +1 -1
- package/src/__tests__/oauth-cli.test.ts +19 -8
- package/src/__tests__/openai-provider.test.ts +34 -0
- package/src/__tests__/prechat-onboarding-contract.test.ts +0 -1
- package/src/__tests__/recurrence-engine.test.ts +45 -0
- package/src/__tests__/schedule-routes.test.ts +139 -1
- package/src/__tests__/scheduler-disk-pressure.test.ts +1 -1
- package/src/__tests__/script-proxy-conversation-manager.test.ts +10 -5
- package/src/__tests__/secret-fixtures.ts +20 -0
- package/src/__tests__/skill-tool-factory.test.ts +49 -0
- package/src/__tests__/skills.test.ts +3 -3
- package/src/__tests__/subagent-role-registry.test.ts +24 -1
- package/src/__tests__/subagent-tool-filtering.test.ts +50 -0
- package/src/__tests__/subagent-tool-gate-mode.test.ts +547 -0
- package/src/__tests__/subagent-tools.test.ts +1 -0
- package/src/__tests__/system-prompt.test.ts +109 -11
- package/src/__tests__/tool-approval-handler.test.ts +85 -0
- package/src/__tests__/tool-audit-listener.test.ts +86 -0
- package/src/__tests__/tool-error-hook.test.ts +1 -0
- package/src/__tests__/tool-result-spool.test.ts +337 -0
- package/src/__tests__/tool-result-truncate-hook.test.ts +1 -0
- package/src/__tests__/validate-input.test.ts +95 -1
- package/src/__tests__/workspace-migration-098-remove-stale-updates-bulletin-file.test.ts +65 -0
- package/src/__tests__/workspace-migration-099-disable-cache-one-shot-callsites.test.ts +139 -0
- package/src/__tests__/workspace-migration-100-upgrade-quality-profile-to-fable-5.test.ts +174 -0
- package/src/__tests__/workspace-migration-101-upgrade-balanced-economy-to-minimax-m3.test.ts +162 -0
- package/src/__tests__/workspace-release-notes-feature-flag-guard.test.ts +45 -95
- package/src/acp/__tests__/agent-process.test.ts +315 -2
- package/src/acp/__tests__/prepare-agent-env.test.ts +79 -5
- package/src/acp/agent-process.ts +163 -34
- package/src/acp/prepare-agent-env.ts +55 -15
- package/src/agent/loop.ts +125 -31
- package/src/api/events/usage-progress.ts +28 -0
- package/src/api/index.ts +6 -0
- package/src/approvals/approval-primitive.ts +2 -2
- package/src/background-wake/wake-intent-hooks.test.ts +2 -0
- package/src/bundler/app-bundler.ts +25 -42
- package/src/bundler/app-compiler.ts +8 -0
- package/src/bundler/compiler-tools.ts +1 -1
- package/src/calls/call-controller.ts +1 -1
- package/src/calls/guardian-action-sweep.ts +16 -93
- package/src/cli/AGENTS.md +4 -0
- package/src/cli/commands/__tests__/schedules.test.ts +367 -0
- package/src/cli/commands/image-generation.ts +23 -9
- package/src/cli/commands/notifications.ts +1 -1
- package/src/cli/commands/plugins.ts +291 -15
- package/src/cli/commands/schedules.ts +313 -9
- package/src/cli/lib/__tests__/inspect-plugin.test.ts +382 -0
- package/src/cli/lib/__tests__/install-from-github.test.ts +31 -9
- package/src/cli/lib/__tests__/plugin-artifact.test.ts +183 -0
- package/src/cli/lib/__tests__/plugin-details.test.ts +158 -0
- package/src/cli/lib/__tests__/plugin-fingerprint.test.ts +245 -0
- package/src/cli/lib/__tests__/upgrade-plugin.test.ts +384 -0
- package/src/cli/lib/inspect-plugin.ts +313 -0
- package/src/cli/lib/install-from-github.ts +266 -26
- package/src/cli/lib/list-installed-plugins.ts +17 -6
- package/src/cli/lib/plugin-artifact.ts +103 -0
- package/src/cli/lib/plugin-details.ts +18 -1
- package/src/cli/lib/plugin-fingerprint.ts +197 -0
- package/src/cli/lib/upgrade-plugin.ts +243 -0
- package/src/config/bundled-skills/image-studio/SKILL.md +66 -19
- package/src/config/bundled-skills/image-studio/TOOLS.json +1 -6
- package/src/config/bundled-skills/image-studio/tools/media-generate-image.ts +22 -3
- package/src/config/bundled-skills/personal-page/SKILL.md +57 -0
- package/src/config/bundled-skills/personal-page/TOOLS.json +27 -0
- package/src/config/bundled-skills/personal-page/tools/app-refresh.ts +17 -0
- package/src/config/bundled-skills/subagent/SKILL.md +2 -0
- package/src/config/bundled-skills/subagent/TOOLS.json +8 -2
- package/src/config/bundled-tool-registry.ts +7 -2
- package/src/config/call-site-defaults.ts +13 -2
- package/src/config/feature-flag-registry.json +12 -20
- package/src/config/llm-context-resolution.ts +8 -0
- package/src/config/llm-resolver.ts +30 -0
- package/src/config/loader.ts +52 -59
- package/src/config/preloaded-apps/personal-page/src/components/About.tsx +22 -0
- package/src/config/preloaded-apps/personal-page/src/components/App.tsx +16 -0
- package/src/config/preloaded-apps/personal-page/src/components/Features.tsx +77 -0
- package/src/config/preloaded-apps/personal-page/src/components/Hero.tsx +57 -0
- package/src/config/preloaded-apps/personal-page/src/components/Pending.tsx +28 -0
- package/src/config/preloaded-apps/personal-page/src/components/animations.tsx +234 -0
- package/src/config/preloaded-apps/personal-page/src/components/icons.tsx +48 -0
- package/src/config/preloaded-apps/personal-page/src/components/media.ts +16 -0
- package/src/config/preloaded-apps/personal-page/src/index.html +20 -0
- package/src/config/preloaded-apps/personal-page/src/main.tsx +7 -0
- package/src/config/preloaded-apps/personal-page/src/profile-data.ts +82 -0
- package/src/config/preloaded-apps/personal-page/src/styles.css +759 -0
- package/src/config/schema.ts +0 -2
- package/src/config/schemas/__tests__/memory-v2.test.ts +1 -0
- package/src/config/schemas/__tests__/memory-v3.test.ts +10 -0
- package/src/config/schemas/llm.ts +12 -2
- package/src/config/schemas/memory-retrospective.ts +19 -0
- package/src/config/schemas/memory-v2.ts +13 -0
- package/src/config/schemas/memory-v3.ts +92 -0
- package/src/config/schemas/services.ts +2 -1
- package/src/config/seed-inference-profiles.ts +4 -8
- package/src/config/skills.ts +3 -3
- package/src/context/post-turn-tool-result-truncation.ts +32 -18
- package/src/context/tool-result-spool.ts +104 -0
- package/src/credential-execution/executable-discovery.ts +1 -1
- package/src/credential-execution/feature-gates.ts +0 -1
- package/src/daemon/conversation-agent-loop-handlers.ts +41 -16
- package/src/daemon/conversation-error.ts +6 -15
- package/src/daemon/conversation-tool-setup.ts +101 -22
- package/src/daemon/conversation.ts +124 -11
- package/src/daemon/disk-pressure-policy.ts +0 -1
- package/src/daemon/lifecycle.ts +8 -20
- package/src/daemon/message-types/conversations.ts +2 -15
- package/src/daemon/parse-actual-tokens-from-error.test.ts +62 -1
- package/src/daemon/parse-actual-tokens-from-error.ts +43 -4
- package/src/daemon/tool-setup-types.ts +57 -0
- package/src/daemon/trust-context.ts +1 -1
- package/src/daemon/wake-conversation-ops.ts +18 -0
- package/src/events/tool-audit-listener.ts +40 -9
- package/src/heartbeat/__tests__/heartbeat-service.test.ts +1 -1
- package/src/home/__tests__/home-content-refresh.test.ts +114 -0
- package/src/home/__tests__/suggested-prompts.test.ts +86 -5
- package/src/home/feed-types.ts +1 -1
- package/src/home/home-content-refresh.ts +43 -31
- package/src/home/home-greeting-cache.ts +8 -1
- package/src/home/home-greeting.ts +13 -9
- package/src/home/suggested-prompts.ts +77 -24
- package/src/ipc/routes/trust-rules.test.ts +66 -72
- package/src/media/__tests__/image-models.test.ts +57 -0
- package/src/media/image-credentials.ts +2 -2
- package/src/media/image-models.ts +66 -0
- package/src/memory/__tests__/auto-analysis-enqueue.test.ts +38 -0
- package/src/memory/__tests__/compaction-log-store-clickhouse.test.ts +432 -0
- package/src/memory/__tests__/find-most-recent-retrospective-for.test.ts +12 -2
- package/src/memory/__tests__/memory-retrospective-job.test.ts +909 -34
- package/src/memory/__tests__/memory-retrospective-startup-cleanup.test.ts +227 -5
- package/src/memory/__tests__/memory-retrospective-state.test.ts +195 -0
- package/src/memory/__tests__/preloaded-apps.test.ts +85 -0
- package/src/memory/auto-analysis-enqueue.ts +14 -1
- package/src/memory/{compaction-log-writer-clickhouse.ts → compaction-log-store-clickhouse.ts} +264 -55
- package/src/memory/conversation-attention-store.ts +1 -0
- package/src/memory/conversation-bootstrap.ts +18 -9
- package/src/memory/conversation-crud.ts +21 -4
- package/src/memory/conversation-disk-view.ts +1 -1
- package/src/memory/conversation-title-service.ts +53 -9
- package/src/memory/db-init.ts +2 -0
- package/src/memory/delivery-channels.ts +0 -69
- package/src/memory/embedding-runtime-manager.ts +1 -1
- package/src/memory/graph/extraction-job.ts +0 -15
- package/src/memory/llm-request-log-source-clickhouse.ts +84 -14
- package/src/memory/llm-request-log-source-local.ts +8 -1
- package/src/memory/llm-request-log-source.ts +14 -2
- package/src/memory/llm-request-log-store.ts +51 -2
- package/src/memory/llm-usage-store.ts +5 -1
- package/src/memory/memory-retrospective-constants.ts +9 -0
- package/src/memory/memory-retrospective-enqueue.ts +3 -6
- package/src/memory/memory-retrospective-fork-boundary.ts +94 -0
- package/src/memory/memory-retrospective-job.ts +483 -208
- package/src/memory/memory-retrospective-startup-cleanup.ts +97 -19
- package/src/memory/memory-retrospective-state.ts +85 -2
- package/src/memory/migrations/181-rename-thread-starters-checkpoints.ts +2 -2
- package/src/memory/migrations/281-memory-retrospective-remembered-log.ts +40 -0
- package/src/memory/migrations/__tests__/281-memory-retrospective-remembered-log.test.ts +96 -0
- package/src/memory/migrations/index.ts +1 -0
- package/src/memory/preloaded-apps.ts +116 -0
- package/src/memory/schema/memory-core.ts +4 -0
- package/src/memory/v2/__tests__/consolidation-job.test.ts +183 -2
- package/src/memory/v2/__tests__/injection.test.ts +70 -0
- package/src/memory/v2/__tests__/static-context.test.ts +12 -0
- package/src/memory/v2/consolidation-job.ts +93 -9
- package/src/memory/v2/injection.ts +53 -0
- package/src/memory/v2/prompts/consolidation.ts +1 -0
- package/src/memory/v2/static-context.ts +13 -1
- package/src/memory/v2/sweep-job.ts +1 -1
- package/src/memory/v2/types.ts +5 -0
- package/src/messaging/draft-store.ts +1 -1
- package/src/plugin-api/types.ts +7 -0
- package/src/plugins/defaults/exploration-drift/hooks/post-tool-use.ts +300 -0
- package/src/plugins/defaults/exploration-drift/package.json +15 -0
- package/src/plugins/defaults/index.ts +49 -0
- package/src/plugins/defaults/max-tokens-continue/continue-state-store.ts +53 -0
- package/src/plugins/defaults/max-tokens-continue/hooks/post-model-call.ts +80 -0
- package/src/plugins/defaults/max-tokens-continue/hooks/stop.ts +20 -0
- package/src/plugins/defaults/max-tokens-continue/package.json +14 -0
- package/src/plugins/defaults/memory-retrieval/injectors.ts +132 -4
- package/src/plugins/defaults/memory-v3-shadow/__tests__/card.test.ts +92 -0
- package/src/plugins/defaults/memory-v3-shadow/__tests__/carry-integration.test.ts +2 -1
- package/src/plugins/defaults/memory-v3-shadow/__tests__/fresh-set.test.ts +52 -0
- package/src/plugins/defaults/memory-v3-shadow/__tests__/injection.test.ts +1 -0
- package/src/plugins/defaults/memory-v3-shadow/__tests__/live-integration.test.ts +2 -1
- package/src/plugins/defaults/memory-v3-shadow/__tests__/orchestrate.test.ts +136 -5
- package/src/plugins/defaults/memory-v3-shadow/__tests__/pool-select.test.ts +17 -0
- package/src/plugins/defaults/memory-v3-shadow/__tests__/selection-log-store.test.ts +6 -0
- package/src/plugins/defaults/memory-v3-shadow/__tests__/shadow-integration.test.ts +5 -1
- package/src/plugins/defaults/memory-v3-shadow/__tests__/shadow-plugin.test.ts +68 -4
- package/src/plugins/defaults/memory-v3-shadow/card.ts +49 -5
- package/src/plugins/defaults/memory-v3-shadow/fresh-set.ts +59 -0
- package/src/plugins/defaults/memory-v3-shadow/injector.ts +4 -2
- package/src/plugins/defaults/memory-v3-shadow/learned-edges.test.ts +169 -0
- package/src/plugins/defaults/memory-v3-shadow/learned-edges.ts +178 -0
- package/src/plugins/defaults/memory-v3-shadow/orchestrate.ts +115 -26
- package/src/plugins/defaults/memory-v3-shadow/pool-select.ts +13 -9
- package/src/plugins/defaults/memory-v3-shadow/shadow-plugin.ts +144 -22
- package/src/plugins/defaults/memory-v3-shadow/types.ts +24 -6
- package/src/plugins/defaults/title-generate/hooks/stop.ts +13 -0
- package/src/plugins/defaults/title-generate/hooks/user-prompt-submit.ts +16 -0
- package/src/prompts/__tests__/system-prompt.test.ts +100 -1
- package/src/prompts/cache-boundary.ts +17 -0
- package/src/prompts/sections.ts +50 -17
- package/src/prompts/system-prompt.ts +63 -6
- package/src/prompts/templates/system-sections.ts +22 -0
- package/src/providers/__tests__/unparseable-tool-args.test.ts +53 -0
- package/src/providers/anthropic/client.ts +74 -28
- package/src/providers/call-site-routing.ts +6 -3
- package/src/providers/gemini/client.ts +5 -1
- package/src/providers/minimax/client.ts +9 -0
- package/src/providers/model-catalog.ts +28 -0
- package/src/providers/model-intents.ts +3 -3
- package/src/providers/openai/chat-completions-provider.ts +4 -2
- package/src/providers/openai/responses-provider.ts +7 -2
- package/src/providers/retry.ts +16 -5
- package/src/providers/types.ts +21 -0
- package/src/providers/unparseable-tool-args.ts +56 -0
- package/src/runtime/AGENTS.md +6 -0
- package/src/runtime/__tests__/agent-wake.test.ts +631 -9
- package/src/runtime/agent-wake.ts +307 -56
- package/src/runtime/assistant-stream-state.ts +141 -8
- package/src/runtime/background-job-runner.ts +2 -2
- package/src/runtime/guardian-action-message-composer.ts +0 -54
- package/src/runtime/http-server.ts +6 -14
- package/src/runtime/http-types.ts +0 -1
- package/src/runtime/message-composer-types.ts +0 -9
- package/src/runtime/middleware/__tests__/rate-limiter.test.ts +63 -0
- package/src/runtime/middleware/auth.ts +27 -3
- package/src/runtime/middleware/rate-limiter.ts +28 -1
- package/src/runtime/migrations/__tests__/vbundle-legacy-user-md.test.ts +150 -3
- package/src/runtime/migrations/vbundle-builder.ts +3 -3
- package/src/runtime/migrations/vbundle-import-analyzer.ts +29 -6
- package/src/runtime/migrations/vbundle-import-policy.ts +23 -0
- package/src/runtime/migrations/vbundle-importer.ts +9 -4
- package/src/runtime/migrations/vbundle-streaming-importer.ts +8 -3
- package/src/runtime/pre-first-message-gate.ts +1 -1
- package/src/runtime/routes/__tests__/conversation-compaction-routes.test.ts +280 -29
- package/src/runtime/routes/__tests__/conversation-query-routes.test.ts +132 -0
- package/src/runtime/routes/__tests__/gateway-log-routes.test.ts +97 -185
- package/src/runtime/routes/__tests__/home-feed-routes.test.ts +17 -0
- package/src/runtime/routes/__tests__/plugins-routes.test.ts +366 -0
- package/src/runtime/routes/__tests__/task-routes.test.ts +3 -3
- package/src/runtime/routes/btw-routes.ts +0 -14
- package/src/runtime/routes/conversation-compaction-routes.ts +105 -28
- package/src/runtime/routes/conversation-list-routes.ts +77 -5
- package/src/runtime/routes/conversation-management-routes.ts +54 -0
- package/src/runtime/routes/conversation-query-routes.ts +261 -8
- package/src/runtime/routes/gateway-log-routes.ts +14 -64
- package/src/runtime/routes/home-feed-routes.ts +10 -0
- package/src/runtime/routes/identity-intro-cache.ts +1 -1
- package/src/runtime/routes/identity-routes.ts +76 -20
- package/src/runtime/routes/image-generation-routes.ts +20 -2
- package/src/runtime/routes/inbound-message-handler.ts +0 -36
- package/src/runtime/routes/index.ts +2 -0
- package/src/runtime/routes/log-export/AGENTS.md +1 -1
- package/src/runtime/routes/log-export/workspace-allowlist.ts +1 -1
- package/src/runtime/routes/log-export-routes.ts +143 -96
- package/src/runtime/routes/plugins-routes.ts +406 -0
- package/src/runtime/routes/redact-staged-export.ts +259 -0
- package/src/runtime/routes/schedule-routes.ts +102 -36
- package/src/runtime/routes/sounds-config-routes.ts +239 -0
- package/src/runtime/routes/trust-rules-routes.ts +14 -67
- package/src/runtime/services/__tests__/analyze-conversation.test.ts +38 -0
- package/src/runtime/services/analyze-conversation.ts +26 -13
- package/src/schedule/recurrence-engine.ts +34 -0
- package/src/schedule/scheduler.ts +1 -0
- package/src/security/redact-json.ts +61 -0
- package/src/security/secret-allowlist.ts +1 -1
- package/src/skills/path-classifier.ts +1 -1
- package/src/skills/validate-input.ts +41 -1
- package/src/subagent/types.ts +26 -1
- package/src/telemetry/types.ts +15 -1
- package/src/telemetry/usage-telemetry-reporter.test.ts +6 -1
- package/src/telemetry/usage-telemetry-reporter.ts +1 -0
- package/src/tools/apps/executors.ts +1 -1
- package/src/tools/skills/skill-tool-factory.ts +19 -8
- package/src/tools/tool-approval-handler.ts +31 -0
- package/src/usage/attribution.ts +24 -0
- package/src/usage/types.ts +8 -1
- package/src/util/platform.ts +33 -17
- package/src/watcher/engine.ts +1 -0
- package/src/workspace/adaptive-thinking-repair.ts +113 -0
- package/src/workspace/migrations/021-move-signals-to-workspace.ts +1 -1
- package/src/workspace/migrations/022-move-hooks-to-workspace.ts +1 -1
- package/src/workspace/migrations/026-backfill-install-meta.ts +1 -1
- package/src/workspace/migrations/030-seed-pkb-autoinject.ts +2 -1
- package/src/workspace/migrations/031-drop-user-md.ts +1 -4
- package/src/workspace/migrations/048-remove-workspace-hooks.ts +1 -1
- package/src/workspace/migrations/056-release-notes-inference-profile-reordering.ts +5 -2
- package/src/workspace/migrations/061-move-backup-key-to-workspace.ts +1 -1
- package/src/workspace/migrations/082-backfill-managed-profile-labels.ts +8 -2
- package/src/workspace/migrations/097-enable-adaptive-thinking-managed-profiles.ts +70 -67
- package/src/workspace/migrations/098-remove-stale-updates-bulletin-file.ts +31 -0
- package/src/workspace/migrations/099-disable-cache-one-shot-callsites.ts +81 -0
- package/src/workspace/migrations/100-upgrade-quality-profile-to-fable-5.ts +86 -0
- package/src/workspace/migrations/101-upgrade-balanced-economy-to-minimax-m3.ts +70 -0
- package/src/workspace/migrations/registry.ts +8 -0
- package/src/workspace/migrations/runner.ts +1 -1
- package/tsconfig.json +1 -1
- package/src/__tests__/config-loader-quarantine-bulletin.test.ts +0 -202
- package/src/__tests__/conversation-starters-cadence.test.ts +0 -161
- package/src/__tests__/guardian-action-copy-generator.test.ts +0 -200
- package/src/__tests__/guardian-action-followup-executor.test.ts +0 -322
- package/src/__tests__/guardian-action-followup-store.test.ts +0 -373
- package/src/__tests__/guardian-action-grant-mint-consume.test.ts +0 -579
- package/src/__tests__/guardian-action-late-reply.test.ts +0 -1083
- package/src/__tests__/guardian-action-store.test.ts +0 -273
- package/src/__tests__/update-bulletin-job.test.ts +0 -292
- package/src/config/schemas/updates.ts +0 -14
- package/src/daemon/guardian-action-generators.ts +0 -71
- package/src/memory/__tests__/compaction-log-writer-clickhouse.test.ts +0 -227
- package/src/memory/conversation-starters-cadence.ts +0 -78
- package/src/memory/guardian-action-store.ts +0 -859
- package/src/prompts/update-bulletin-job.ts +0 -180
- package/src/runtime/guardian-action-followup-executor.ts +0 -306
- package/src/runtime/guardian-action-grant-minter.ts +0 -150
package/ARCHITECTURE.md
CHANGED
|
@@ -770,30 +770,28 @@ The macOS `SpeechRecognizerAdapter` protocol in `clients/macos/vellum-assistant/
|
|
|
770
770
|
- Terminology: "STT" and "transcription" refer to the same operation (converting audio to text). "Speech recognition" is used in client-native contexts where Apple's Speech framework terminology is canonical. All three terms map to the same conceptual operation.
|
|
771
771
|
- **Onboarding**: For a step-by-step guide to adding a new STT provider, see `docs/stt-provider-onboarding.md`.
|
|
772
772
|
|
|
773
|
-
###
|
|
773
|
+
### On-Demand Home Content Generation
|
|
774
774
|
|
|
775
|
-
|
|
775
|
+
LLM-generated content shown by clients (personalized home greeting, suggested prompts, conversation starters, identity intro) is produced on demand, never at daemon startup or on unconditional timers.
|
|
776
776
|
|
|
777
|
-
**Data flow:**
|
|
777
|
+
**Data flow (home greeting + suggested prompts):**
|
|
778
778
|
|
|
779
|
-
1. **
|
|
780
|
-
2. **
|
|
781
|
-
3. **
|
|
779
|
+
1. **Read** — `GET /v1/home/feed` reads both caches synchronously: the greeting from `memory_checkpoints` (`home:greeting:*`, 4-hour TTL, busted when identity files change) and suggested prompts from `memory_checkpoints` (`home:suggested_prompts:*`, 4-hour TTL, invalidated on OAuth connect/disconnect). When a cache is empty the handler falls back to a time-of-day greeting and an empty prompt list.
|
|
780
|
+
2. **Revalidate** — The same GET fires `revalidateHomeContentInBackground()` (`src/home/home-content-refresh.ts`) fire-and-forget. It is single-flight (concurrent GETs share one run) and each refresher no-ops while its cache is fresh, so generation happens at most once per TTL window — and only when a user actually views Home.
|
|
781
|
+
3. **Notify** — When fresh content lands, the coordinator publishes a `home_feed_updated` event; connected clients refetch the feed and the personalized content swaps in.
|
|
782
782
|
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
- `updates:last_processed_hash` — content hash of the `UPDATES.md` payload most recently dispatched to the background job.
|
|
783
|
+
Conversation starters follow the same pattern via `GET /v1/conversation-starters`, which enqueues a `generate_conversation_starters` memory job when the starter set is stale (cooldown-gated, deduped against in-flight jobs).
|
|
786
784
|
|
|
787
785
|
**Key source files:**
|
|
788
786
|
|
|
789
|
-
| File
|
|
790
|
-
|
|
|
791
|
-
| `src/
|
|
792
|
-
| `src/
|
|
793
|
-
| `src/
|
|
794
|
-
| `src/
|
|
795
|
-
| `src/
|
|
796
|
-
| `src/
|
|
787
|
+
| File | Purpose |
|
|
788
|
+
| --------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
789
|
+
| `src/home/home-content-refresh.ts` | Single-flight on-demand revalidation coordinator + SSE notify |
|
|
790
|
+
| `src/home/home-greeting.ts` | Greeting generation (BTW side-chain, `homeGreeting` call site) |
|
|
791
|
+
| `src/home/home-greeting-cache.ts` | Checkpoint-backed greeting cache with identity-hash invalidation |
|
|
792
|
+
| `src/home/suggested-prompts.ts` | Prompt generation + checkpoint-backed cache + OAuth invalidation |
|
|
793
|
+
| `src/runtime/routes/home-feed-routes.ts` | `GET /v1/home/feed` — cached read + fire-and-forget revalidation trigger |
|
|
794
|
+
| `src/runtime/routes/conversation-starter-routes.ts` | On-demand starter refresh via memory job enqueue |
|
|
797
795
|
|
|
798
796
|
---
|
|
799
797
|
|
|
@@ -870,7 +868,7 @@ graph LR
|
|
|
870
868
|
SL["logs/session-*.json<br/>───────────────<br/>Per-session JSON log<br/>task, start/end times, result<br/>Per-turn: AX tree, screenshot,<br/>action, token usage"]
|
|
871
869
|
end
|
|
872
870
|
|
|
873
|
-
subgraph "
|
|
871
|
+
subgraph "$VELLUM_WORKSPACE_DIR/data/db/assistant.db (SQLite + WAL)"
|
|
874
872
|
direction TB
|
|
875
873
|
CONV["conversations<br/>───────────────<br/>id, title, timestamps<br/>token counts, estimated cost<br/>context_summary (compaction)<br/>conversation_type: 'standard' | 'background' | 'scheduled'<br/>memory_scope_id: 'default' | '_pkb_workspace' | 'subagent:<id>'"]
|
|
876
874
|
MSG["messages<br/>───────────────<br/>id, conversation_id (FK)<br/>role: user | assistant<br/>content: JSON array<br/>created_at"]
|
|
@@ -893,7 +891,7 @@ graph LR
|
|
|
893
891
|
TRUST["protected/trust.json<br/>Tool permission rules"]
|
|
894
892
|
end
|
|
895
893
|
|
|
896
|
-
subgraph "
|
|
894
|
+
subgraph "$VELLUM_WORKSPACE_DIR/ (Workspace Files)"
|
|
897
895
|
CONFIG["config files<br/>Hot-reloaded by daemon"]
|
|
898
896
|
ONBOARD_PLAYBOOKS["onboarding/playbooks/<br/>[channel]_onboarding.md<br/>assistant-updatable checklists"]
|
|
899
897
|
ONBOARD_REGISTRY["onboarding/playbooks/registry.json<br/>channel-start index for fast-path + reconciliation"]
|
|
@@ -925,7 +923,7 @@ graph TB
|
|
|
925
923
|
LOCAL_CLIENT["RuntimeClient"]
|
|
926
924
|
LOCAL_HTTP["HTTP API<br/>localhost:RUNTIME_HTTP_PORT"]
|
|
927
925
|
LOCAL_DAEMON["Local Daemon<br/>(same machine)"]
|
|
928
|
-
LOCAL_DB["
|
|
926
|
+
LOCAL_DB["$VELLUM_WORKSPACE_DIR/data/db/assistant.db"]
|
|
929
927
|
end
|
|
930
928
|
|
|
931
929
|
subgraph "Cloud Mode"
|
|
@@ -1159,7 +1157,7 @@ graph TB
|
|
|
1159
1157
|
|
|
1160
1158
|
NATIVE -->|"macOS"| SBPL["sandbox-exec<br/>SBPL profile<br/>deny-default + allow workdir"]
|
|
1161
1159
|
NATIVE -->|"Linux"| BWRAP["bwrap<br/>bubblewrap<br/>ro-root + rw-workdir<br/>unshare-net + unshare-pid"]
|
|
1162
|
-
SBPL --> SB_FS["Sandbox filesystem root<br
|
|
1160
|
+
SBPL --> SB_FS["Sandbox filesystem root<br/>$VELLUM_WORKSPACE_DIR"]
|
|
1163
1161
|
BWRAP --> SB_FS
|
|
1164
1162
|
|
|
1165
1163
|
EXEC -->|"host_file_* / host_bash"| HOST_TOOLS["Host-target tools<br/>(unchanged by backend choice)"]
|
|
@@ -1177,7 +1175,7 @@ graph TB
|
|
|
1177
1175
|
- **Native backend**: Uses OS-level sandboxing — `sandbox-exec` with SBPL profiles on macOS, `bwrap` (bubblewrap) on Linux. Denies network access and restricts filesystem writes to the sandbox root, `/tmp`, `/private/tmp`, and `/var/folders` (macOS) or the sandbox root and `/tmp` (Linux).
|
|
1178
1176
|
- **Fail-closed**: The native backend refuses to execute unsandboxed if its prerequisites are unavailable, throwing `ToolError` with actionable messages on failure.
|
|
1179
1177
|
- **Host tools unchanged**: `host_bash`, `host_file_read`, `host_file_write`, and `host_file_edit` always execute directly on the host regardless of which sandbox backend is active.
|
|
1180
|
-
- Sandbox defaults: `file_*` and `bash` execute within
|
|
1178
|
+
- Sandbox defaults: `file_*` and `bash` execute within `$VELLUM_WORKSPACE_DIR`.
|
|
1181
1179
|
- Host access is explicit: `host_file_read`, `host_file_write`, `host_file_edit`, and `host_bash` are separate tools.
|
|
1182
1180
|
- Prompt defaults: host tools and `computer_use_*` skill-projected actions default to `ask` unless a trust rule allowlists/denylists them.
|
|
1183
1181
|
- Browser tool defaults: all `browser_*` tools are auto-allowed by default via seeded allow rules at priority 100, preserving the frictionless UX from when browser was a core tool.
|
|
@@ -1211,7 +1209,7 @@ Key behaviors:
|
|
|
1211
1209
|
|
|
1212
1210
|
## Dynamic Skill Authoring — Tool Flow
|
|
1213
1211
|
|
|
1214
|
-
The assistant can author, test, and persist new skills at runtime through a three-tool workflow. All operations target
|
|
1212
|
+
The assistant can author, test, and persist new skills at runtime through a three-tool workflow. All operations target `$VELLUM_WORKSPACE_DIR/skills/` (managed skills directory) and require explicit user confirmation.
|
|
1215
1213
|
|
|
1216
1214
|
```mermaid
|
|
1217
1215
|
graph TB
|
|
@@ -1227,7 +1225,7 @@ graph TB
|
|
|
1227
1225
|
subgraph "2. Persist (Filesystem)"
|
|
1228
1226
|
SCAFFOLD["scaffold_managed_skill<br/>───────────────<br/>RiskLevel: High<br/>Requires user consent"]
|
|
1229
1227
|
MANAGED_STORE["managed-store.ts<br/>───────────────<br/>validateManagedSkillId()<br/>buildSkillMarkdown()<br/>createManagedSkill()"]
|
|
1230
|
-
SKILL_DIR["
|
|
1228
|
+
SKILL_DIR["$VELLUM_WORKSPACE_DIR/skills/<id>/<br/>SKILL.md (frontmatter + body)"]
|
|
1231
1229
|
end
|
|
1232
1230
|
|
|
1233
1231
|
subgraph "3. Load & Use"
|
|
@@ -2095,44 +2093,44 @@ Connected channels are resolved at signal emission time: vellum is always includ
|
|
|
2095
2093
|
|
|
2096
2094
|
## Storage Summary
|
|
2097
2095
|
|
|
2098
|
-
| What | Where
|
|
2099
|
-
| ---------------------------------------- |
|
|
2100
|
-
| API key | CES / encrypted file store
|
|
2101
|
-
| Credential secrets | CES / encrypted file store
|
|
2102
|
-
| Credential metadata |
|
|
2103
|
-
| Integration OAuth tokens | CES / encrypted file store (via `secure-keys.ts`)
|
|
2104
|
-
| User preferences | UserDefaults
|
|
2105
|
-
| Session logs | `~/Library/.../logs/session-*.json`
|
|
2106
|
-
| Conversations & messages |
|
|
2107
|
-
| Memory segments |
|
|
2108
|
-
| Extracted facts |
|
|
2109
|
-
| Embeddings |
|
|
2110
|
-
| Async job queue |
|
|
2111
|
-
| Attachments |
|
|
2112
|
-
| Sandbox filesystem |
|
|
2113
|
-
| Tool permission rules | `~/.vellum/protected/trust.json`
|
|
2114
|
-
| Web users & assistants | PostgreSQL
|
|
2115
|
-
| Trace events | In-memory (TraceStore)
|
|
2116
|
-
| Media embed settings |
|
|
2117
|
-
| Media embed MIME cache | In-memory (`ImageMIMEProbe`)
|
|
2118
|
-
| Tasks & task runs |
|
|
2119
|
-
| Work items (Task Queue) |
|
|
2120
|
-
| Recurrence schedules & runs |
|
|
2121
|
-
| Watchers & events |
|
|
2122
|
-
| Proxy CA cert + key | `{dataDir}/proxy-ca/`
|
|
2123
|
-
| Proxy leaf certs | `{dataDir}/proxy-ca/issued/`
|
|
2124
|
-
| Proxy sessions | In-memory (SessionManager)
|
|
2125
|
-
| Call sessions, events, pending questions |
|
|
2126
|
-
| Active call controllers | In-memory (CallState)
|
|
2127
|
-
| Guardian bindings |
|
|
2128
|
-
| Channel verification sessions |
|
|
2129
|
-
| Guardian approval requests |
|
|
2130
|
-
| Contact invites |
|
|
2131
|
-
| Contacts & channels |
|
|
2132
|
-
| Notification events |
|
|
2133
|
-
| Notification decisions |
|
|
2134
|
-
| Notification deliveries |
|
|
2135
|
-
| Notification preferences |
|
|
2096
|
+
| What | Where | Format | ORM/Driver | Retention |
|
|
2097
|
+
| ---------------------------------------- | ------------------------------------------------------ | ----------------------------------- | ---------------------------------- | ------------------------------------------------------- |
|
|
2098
|
+
| API key | CES / encrypted file store | Encrypted binary | CES API / `secure-keys.ts` | Permanent |
|
|
2099
|
+
| Credential secrets | CES / encrypted file store | Encrypted binary | `secure-keys.ts` wrapper | Permanent (until deleted via tool) |
|
|
2100
|
+
| Credential metadata | `$VELLUM_WORKSPACE_DIR/data/credentials/metadata.json` | JSON | Atomic file write | Permanent (until deleted via tool) |
|
|
2101
|
+
| Integration OAuth tokens | CES / encrypted file store (via `secure-keys.ts`) | Encrypted binary | `TokenManager` auto-refresh | Until disconnected or revoked |
|
|
2102
|
+
| User preferences | UserDefaults | plist | Foundation | Permanent |
|
|
2103
|
+
| Session logs | `~/Library/.../logs/session-*.json` | JSON per session | Swift Codable | Unbounded |
|
|
2104
|
+
| Conversations & messages | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite + WAL | Drizzle ORM (Bun) | Permanent |
|
|
2105
|
+
| Memory segments | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent |
|
|
2106
|
+
| Extracted facts | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, deduped |
|
|
2107
|
+
| Embeddings | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | JSON float arrays | Drizzle ORM | Permanent |
|
|
2108
|
+
| Async job queue | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Completed jobs persist |
|
|
2109
|
+
| Attachments | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | Base64 in SQLite | Drizzle ORM | Permanent |
|
|
2110
|
+
| Sandbox filesystem | `$VELLUM_WORKSPACE_DIR` | Real filesystem tree | Node FS APIs | Persistent across sessions |
|
|
2111
|
+
| Tool permission rules | `~/.vellum/protected/trust.json` | JSON | File I/O | Permanent |
|
|
2112
|
+
| Web users & assistants | PostgreSQL | Relational | Drizzle ORM (pg) | Permanent |
|
|
2113
|
+
| Trace events | In-memory (TraceStore) | Structured events | Swift ObservableObject | Max 5,000 per session, ephemeral |
|
|
2114
|
+
| Media embed settings | `$VELLUM_WORKSPACE_DIR/config.json` (`ui.mediaEmbeds`) | JSON | `WorkspaceConfigIO` (atomic merge) | Permanent |
|
|
2115
|
+
| Media embed MIME cache | In-memory (`ImageMIMEProbe`) | `NSCache` (500 entries) | HTTP HEAD | Ephemeral; cleared on app restart |
|
|
2116
|
+
| Tasks & task runs | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent |
|
|
2117
|
+
| Work items (Task Queue) | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; archived items retained |
|
|
2118
|
+
| Recurrence schedules & runs | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; supports cron and RRULE syntax |
|
|
2119
|
+
| Watchers & events | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, cascade on watcher delete |
|
|
2120
|
+
| Proxy CA cert + key | `{dataDir}/proxy-ca/` | PEM files (ca.pem, ca-key.pem) | openssl CLI | Permanent (10-year validity) |
|
|
2121
|
+
| Proxy leaf certs | `{dataDir}/proxy-ca/issued/` | PEM files per hostname | openssl CLI, cached | 1-year validity, re-issued on CA change |
|
|
2122
|
+
| Proxy sessions | In-memory (SessionManager) | Map<ProxySessionId, ManagedSession> | Manual lifecycle | Ephemeral; 5min idle timeout, cleared on shutdown |
|
|
2123
|
+
| Call sessions, events, pending questions | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, cascade on session delete |
|
|
2124
|
+
| Active call controllers | In-memory (CallState) | Map<callSessionId, CallController> | Manual lifecycle | Ephemeral; cleared on call end or destroy |
|
|
2125
|
+
| Guardian bindings | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; revoked bindings retained |
|
|
2126
|
+
| Channel verification sessions | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; consumed/expired sessions retained |
|
|
2127
|
+
| Guardian approval requests | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; decision outcome retained |
|
|
2128
|
+
| Contact invites | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; token hash stored, raw token never persisted |
|
|
2129
|
+
| Contacts & channels | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; revoked/blocked contacts retained |
|
|
2130
|
+
| Notification events | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; deduplicated by dedupeKey |
|
|
2131
|
+
| Notification decisions | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; FK to notification_events |
|
|
2132
|
+
| Notification deliveries | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; FK to notification_decisions |
|
|
2133
|
+
| Notification preferences | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; per-assistant conversational preferences |
|
|
2136
2134
|
|
|
2137
2135
|
### Sensitive Tool Output Placeholder Substitution
|
|
2138
2136
|
|
package/README.md
CHANGED
|
@@ -45,12 +45,6 @@ cp .env.example .env
|
|
|
45
45
|
| `RUNTIME_HTTP_PORT` | No | — | Enable the HTTP server (required for gateway/web) |
|
|
46
46
|
| `RUNTIME_HTTP_HOST` | No | `127.0.0.1` | HTTP server bind address |
|
|
47
47
|
|
|
48
|
-
## Update Bulletin
|
|
49
|
-
|
|
50
|
-
Release notes are surfaced via a background conversation dispatched at daemon startup. Workspace migrations write release notes to `<workspace>/UPDATES.md`; `runUpdateBulletinJobIfNeeded()` then spawns a `conversationType: "background"` conversation via `runBackgroundJob()` (see `runtime/background-job-runner.ts`) whenever the file's content hash changes. The agent uses judgment to surface updates to the user when relevant, and deletes the file when done.
|
|
51
|
-
|
|
52
|
-
**For release maintainers:** Add a new migration under `assistant/src/workspace/migrations/0XX-release-notes-<slug>.ts` with the release notes inline as a string literal, and append the export to `WORKSPACE_MIGRATIONS` in `assistant/src/workspace/migrations/registry.ts`. Migrations are append-only. Idempotency requires both the workspace-migration runner AND an in-file marker: `runWorkspaceMigrations()` records each migration's `WorkspaceMigration.id` in `<workspace>/data/.workspace-migrations.json` and skips IDs already in the `applied` set, but a crash between `UPDATES.md` append and checkpoint finalize can cause a duplicate append on next boot. Embed an HTML marker like `<!-- release-note-id:<migration-id> -->` in the appended block, and short-circuit when the marker is already present. See the root `AGENTS.md` "Release Update Hygiene" section for the full rationale. Skip the migration entirely for releases with no user/assistant-facing changes.
|
|
53
|
-
|
|
54
48
|
## Usage
|
|
55
49
|
|
|
56
50
|
### Lifecycle management (recommended)
|
|
@@ -441,7 +435,7 @@ If no guardian binding exists, escalation fails closed — the message is denied
|
|
|
441
435
|
|
|
442
436
|
## Database
|
|
443
437
|
|
|
444
|
-
SQLite via Drizzle ORM, stored at
|
|
438
|
+
SQLite via Drizzle ORM, stored at `$VELLUM_WORKSPACE_DIR/data/db/assistant.db`. Key tables include conversations, messages, tool invocations, attachments, memory segments, memory items, reminders, and recurrence schedules (cron + RRULE).
|
|
445
439
|
|
|
446
440
|
> **Note:** The recurrence schedule system supports both cron expressions and iCalendar RRULE syntax. Use the `expression` field with an explicit `syntax` discriminator. See [`docs/architecture/scheduling.md`](docs/architecture/scheduling.md) for details.
|
|
447
441
|
|