@vellumai/assistant 0.10.8-dev.202607121434.7bb168a → 0.10.8-dev.202607121624.85b2d5c
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/package.json +1 -1
- package/src/__tests__/agent-loop-callsite-precedence.test.ts +5 -10
- package/src/__tests__/agent-loop-override-profile.test.ts +35 -28
- package/src/__tests__/agent-loop-pushes-post-hook-prompt.test.ts +4 -9
- package/src/__tests__/agent-loop-set-system-prompt.test.ts +3 -8
- package/src/__tests__/agent-wake-disk-pressure-callsite.test.ts +0 -4
- package/src/__tests__/agent-wake-override-profile.test.ts +19 -23
- package/src/__tests__/annotate-activity-metadata.test.ts +0 -21
- package/src/__tests__/annotate-risk-options.test.ts +0 -21
- package/src/__tests__/approval-cascade.test.ts +0 -41
- package/src/__tests__/approval-routes-http.test.ts +5 -56
- package/src/__tests__/assistant-event-hub-machine-name.test.ts +1 -12
- package/src/__tests__/assistant-events-sse-hardening.test.ts +4 -14
- package/src/__tests__/attachment-stored-path-annotation.test.ts +1 -12
- package/src/__tests__/attachment-upload-trusted-source.test.ts +0 -6
- package/src/__tests__/attachments-store-heic-normalize.test.ts +0 -6
- package/src/__tests__/attachments-store.test.ts +5 -12
- package/src/__tests__/available-skills.test.ts +7 -15
- package/src/__tests__/avatar-e2e.test.ts +0 -19
- package/src/__tests__/background-shell-bash.test.ts +0 -20
- package/src/__tests__/background-shell-host-bash.test.ts +0 -27
- package/src/__tests__/background-workers-disk-pressure.test.ts +0 -43
- package/src/__tests__/browser-skill-endstate.test.ts +1 -5
- package/src/__tests__/btw-routes.test.ts +7 -23
- package/src/__tests__/build-persisted-content.test.ts +0 -21
- package/src/__tests__/call-controller.test.ts +16 -72
- package/src/__tests__/call-domain.test.ts +14 -32
- package/src/__tests__/call-routes-http.test.ts +9 -37
- package/src/__tests__/call-site-routing-provider.test.ts +5 -11
- package/src/__tests__/call-start-guardian-guard.test.ts +0 -10
- package/src/__tests__/cancel-resolves-conversation-key.test.ts +0 -25
- package/src/__tests__/channel-delivery-store.test.ts +6 -10
- package/src/__tests__/channel-readiness-routes.test.ts +41 -67
- package/src/__tests__/channel-readiness-service.test.ts +13 -45
- package/src/__tests__/channel-readiness-slack-remote.test.ts +5 -22
- package/src/__tests__/checker.test.ts +0 -24
- package/src/__tests__/compaction-events.test.ts +26 -58
- package/src/__tests__/compaction-summary-head-persisted-count.test.ts +0 -6
- package/src/__tests__/compaction-trail-store.test.ts +1 -12
- package/src/__tests__/compactor-image-manifest-trust.test.ts +1 -10
- package/src/__tests__/config-get-vision-flag.test.ts +24 -47
- package/src/__tests__/config-set-route.test.ts +32 -56
- package/src/__tests__/config-watcher-cleanup-throttle.test.ts +44 -75
- package/src/__tests__/config-watcher-skill-reseed.test.ts +0 -8
- package/src/__tests__/config-watcher.test.ts +2 -9
- package/src/__tests__/contacts-tools.test.ts +0 -7
- package/src/__tests__/context-window-manager-compact-retry.test.ts +0 -6
- package/src/__tests__/conversation-abort-tool-results.test.ts +0 -63
- package/src/__tests__/conversation-agent-loop-disk-pressure.test.ts +6 -34
- package/src/__tests__/conversation-agent-loop-inference-profile.test.ts +16 -47
- package/src/__tests__/conversation-agent-loop-overflow.test.ts +10 -55
- package/src/__tests__/conversation-agent-loop.test.ts +57 -82
- package/src/__tests__/conversation-app-control-instantiation.test.ts +10 -11
- package/src/__tests__/conversation-app-control-lifecycle.test.ts +0 -38
- package/src/__tests__/conversation-attachments.test.ts +0 -10
- package/src/__tests__/conversation-confirmation-signals.test.ts +0 -41
- package/src/__tests__/conversation-disk-view-integration.test.ts +1 -19
- package/src/__tests__/conversation-disk-view.test.ts +1 -19
- package/src/__tests__/conversation-enabledplugins-route.test.ts +1 -13
- package/src/__tests__/conversation-fork-crud.test.ts +1 -12
- package/src/__tests__/conversation-fork-retrospective.test.ts +1 -12
- package/src/__tests__/conversation-fork-route.test.ts +0 -25
- package/src/__tests__/conversation-inference-profile-list.test.ts +0 -11
- package/src/__tests__/conversation-inference-profile-route.test.ts +2 -19
- package/src/__tests__/conversation-init.benchmark.test.ts +0 -55
- package/src/__tests__/conversation-key-store-disk-view.test.ts +1 -26
- package/src/__tests__/conversation-lifecycle.test.ts +0 -38
- package/src/__tests__/conversation-list-source.test.ts +0 -11
- package/src/__tests__/conversation-load-history-repair.test.ts +0 -38
- package/src/__tests__/conversation-load-history-stripped.test.ts +0 -38
- package/src/__tests__/conversation-loop-db-lock-resilience.test.ts +0 -5
- package/src/__tests__/conversation-message-id-uuidv7.test.ts +1 -11
- package/src/__tests__/conversation-process-callsite.test.ts +13 -63
- package/src/__tests__/conversation-provider-retry-repair.test.ts +3 -59
- package/src/__tests__/conversation-queue.test.ts +6 -66
- package/src/__tests__/conversation-routes-disk-view.test.ts +8 -53
- package/src/__tests__/conversation-routes-enabled-plugins.test.ts +0 -46
- package/src/__tests__/conversation-routes-hidden-queue.test.ts +0 -46
- package/src/__tests__/conversation-routes-slash-commands.test.ts +12 -55
- package/src/__tests__/conversation-runtime-assembly.test.ts +28 -34
- package/src/__tests__/conversation-skill-tools.test.ts +19 -23
- package/src/__tests__/conversation-slash-queue.test.ts +0 -64
- package/src/__tests__/conversation-slash-unknown.test.ts +0 -63
- package/src/__tests__/conversation-speed-override.test.ts +19 -53
- package/src/__tests__/conversation-summarize-route.test.ts +0 -4
- package/src/__tests__/conversation-summarize-up-to.test.ts +0 -44
- package/src/__tests__/conversation-tool-setup-attribution.test.ts +37 -59
- package/src/__tests__/conversation-usage.test.ts +18 -53
- package/src/__tests__/conversation-wait-for-idle.test.ts +0 -41
- package/src/__tests__/conversation-workspace-cache-state.test.ts +0 -40
- package/src/__tests__/conversation-workspace-injection.test.ts +0 -64
- package/src/__tests__/conversation-workspace-tool-tracking.test.ts +0 -64
- package/src/__tests__/conversations-import-system-filter.test.ts +0 -10
- package/src/__tests__/credential-health-service.test.ts +14 -22
- package/src/__tests__/credential-prompt-route.test.ts +9 -8
- package/src/__tests__/cross-provider-web-search.test.ts +12 -18
- package/src/__tests__/db-readiness-http-gate.test.ts +0 -11
- package/src/__tests__/disk-pressure-guard.test.ts +0 -4
- package/src/__tests__/disk-pressure-routes.test.ts +0 -4
- package/src/__tests__/disk-pressure-tools.test.ts +0 -37
- package/src/__tests__/dynamic-skill-background-guard.test.ts +0 -35
- package/src/__tests__/dynamic-skill-workflow-prompt.test.ts +2 -27
- package/src/__tests__/email-invite-adapter.test.ts +8 -33
- package/src/__tests__/empty-state-greeting-cache.test.ts +9 -9
- package/src/__tests__/ensure-conversation-exists.test.ts +1 -11
- package/src/__tests__/events-client-registration.test.ts +1 -12
- package/src/__tests__/followup-tools.test.ts +1 -9
- package/src/__tests__/gateway-only-enforcement.test.ts +3 -44
- package/src/__tests__/get-skill-detail-audit.test.ts +0 -7
- package/src/__tests__/guardian-dispatch.test.ts +0 -10
- package/src/__tests__/guardian-verification-voice-binding.test.ts +0 -10
- package/src/__tests__/guardian-wait-controller.test.ts +28 -32
- package/src/__tests__/handlers-skills-memory-v2-reseed.test.ts +26 -89
- package/src/__tests__/handlers-user-message-approval-consumption.test.ts +2 -18
- package/src/__tests__/heartbeat-disk-pressure.test.ts +9 -29
- package/src/__tests__/heartbeat-service.test.ts +83 -78
- package/src/__tests__/host-bash-proxy.test.ts +18 -34
- package/src/__tests__/host-shell-tool.test.ts +0 -27
- package/src/__tests__/http-conversation-lineage.test.ts +3 -12
- package/src/__tests__/http-user-message-parity.test.ts +0 -52
- package/src/__tests__/inference-profile-session-handler.test.ts +4 -24
- package/src/__tests__/inference-profile-session-ipc.test.ts +3 -14
- package/src/__tests__/injector-background-turn.test.ts +10 -24
- package/src/__tests__/injector-chain.test.ts +4 -13
- package/src/__tests__/injector-pkb-v2-silenced.test.ts +19 -17
- package/src/__tests__/inline-command-runner.test.ts +0 -27
- package/src/__tests__/inline-skill-load-permissions.test.ts +1 -23
- package/src/__tests__/install-skill-routing.test.ts +7 -6
- package/src/__tests__/integration-status.test.ts +25 -17
- package/src/__tests__/intent-routing.test.ts +0 -25
- package/src/__tests__/jobs-store-qdrant-breaker.test.ts +1 -7
- package/src/__tests__/jobs-store-upsert-debounced.test.ts +1 -7
- package/src/__tests__/list-messages-attachments.test.ts +11 -13
- package/src/__tests__/list-messages-background-tool-completion.test.ts +6 -11
- package/src/__tests__/list-messages-client-message-id.test.ts +5 -10
- package/src/__tests__/list-messages-hidden-metadata.test.ts +6 -11
- package/src/__tests__/list-messages-page-latest.test.ts +4 -13
- package/src/__tests__/list-messages-queued.test.ts +1 -11
- package/src/__tests__/list-messages-tool-merge.test.ts +7 -11
- package/src/__tests__/llm-request-log-agent-loop-exit-reason.test.ts +1 -12
- package/src/__tests__/llm-request-log-call-site.test.ts +1 -12
- package/src/__tests__/llm-request-log-clickhouse-routing.test.ts +3 -6
- package/src/__tests__/llm-request-log-clickhouse-writer-guards.test.ts +13 -20
- package/src/__tests__/llm-request-log-sink-clickhouse.test.ts +21 -27
- package/src/__tests__/llm-request-log-source-factory.test.ts +23 -48
- package/src/__tests__/llm-request-log-turn-query.test.ts +1 -12
- package/src/__tests__/managed-profile-guard.test.ts +125 -131
- package/src/__tests__/managed-skill-lifecycle.test.ts +6 -43
- package/src/__tests__/mcp-auth-routes.test.ts +14 -18
- package/src/__tests__/mcp-config-secret-boundary.test.ts +49 -91
- package/src/__tests__/mcp-health-check.test.ts +14 -20
- package/src/__tests__/media-generate-image.test.ts +25 -32
- package/src/__tests__/media-stream-stt-session.test.ts +16 -19
- package/src/__tests__/memory-jobs-worker-backoff.test.ts +6 -10
- package/src/__tests__/memory-jobs-worker-cleanup-cadence.test.ts +0 -5
- package/src/__tests__/memory-jobs-worker-lanes.test.ts +10 -22
- package/src/__tests__/memory-recall-log-store.test.ts +1 -12
- package/src/__tests__/memory-retrieval-hook.test.ts +0 -3
- package/src/__tests__/memory-upsert-concurrency.test.ts +12 -28
- package/src/__tests__/memory-v2-static-injector.test.ts +5 -17
- package/src/__tests__/migration-cross-version-compatibility.test.ts +0 -11
- package/src/__tests__/migration-export-http.test.ts +0 -11
- package/src/__tests__/migration-export-streaming.test.ts +0 -11
- package/src/__tests__/migration-export-to-gcs.test.ts +0 -12
- package/src/__tests__/migration-import-commit-http.test.ts +0 -11
- package/src/__tests__/migration-import-from-gcs.test.ts +0 -12
- package/src/__tests__/migration-import-from-url.test.ts +0 -12
- package/src/__tests__/migration-import-preflight-http.test.ts +0 -11
- package/src/__tests__/migration-jobs-status.test.ts +0 -12
- package/src/__tests__/migration-validate-http.test.ts +0 -11
- package/src/__tests__/native-web-search.test.ts +0 -21
- package/src/__tests__/notification-guardian-path.test.ts +0 -10
- package/src/__tests__/oauth-cli.test.ts +0 -19
- package/src/__tests__/oauth-commands-routes.test.ts +28 -43
- package/src/__tests__/oauth-connect-orchestrator.test.ts +17 -18
- package/src/__tests__/oauth2-gateway-transport.test.ts +41 -43
- package/src/__tests__/outbound-slack-persistence.test.ts +4 -39
- package/src/__tests__/persistence-secret-redaction.test.ts +0 -21
- package/src/__tests__/platform-bash-auto-approve.test.ts +0 -38
- package/src/__tests__/playbook-execution.test.ts +0 -7
- package/src/__tests__/playbook-tools.test.ts +0 -7
- package/src/__tests__/plugin-api-model-profiles.test.ts +12 -35
- package/src/__tests__/plugin-import-boundary-guard.test.ts +1 -0
- package/src/__tests__/plugin-import-boundary-reverse-guard.test.ts +0 -1
- package/src/__tests__/prechat-onboarding-contract.test.ts +0 -27
- package/src/__tests__/process-message-background-slack.test.ts +4 -12
- package/src/__tests__/processing-flag-persist-failure.test.ts +0 -39
- package/src/__tests__/provider-commit-message-generator.test.ts +38 -44
- package/src/__tests__/provider-platform-proxy-integration.test.ts +13 -28
- package/src/__tests__/provider-send-message-override-profile.test.ts +6 -11
- package/src/__tests__/provider-usage-tracking.test.ts +5 -11
- package/src/__tests__/proxy-approval-callback.test.ts +0 -11
- package/src/__tests__/rebuild-index-graph-nodes.test.ts +0 -7
- package/src/__tests__/recording-handler.test.ts +0 -27
- package/src/__tests__/request-secret-standalone-channel-gate.test.ts +4 -9
- package/src/__tests__/require-fresh-approval.test.ts +0 -37
- package/src/__tests__/retry-openrouter-only-normalization.test.ts +4 -10
- package/src/__tests__/retry-prompt-cache-key.test.ts +5 -11
- package/src/__tests__/retry-thinking-adaptive-only.test.ts +4 -10
- package/src/__tests__/retry-thinking-tool-choice.test.ts +4 -10
- package/src/__tests__/retry-verbosity-normalization.test.ts +4 -10
- package/src/__tests__/runtime-attachment-metadata.test.ts +5 -11
- package/src/__tests__/runtime-events-sse-bilingual.test.ts +1 -12
- package/src/__tests__/runtime-events-sse-parity.test.ts +1 -13
- package/src/__tests__/runtime-events-sse-reconnect.test.ts +1 -12
- package/src/__tests__/runtime-events-sse.test.ts +1 -13
- package/src/__tests__/schedule-routes-workflow-validation.test.ts +0 -12
- package/src/__tests__/schedule-routes.test.ts +2 -143
- package/src/__tests__/schedule-tools.test.ts +1 -9
- package/src/__tests__/scheduler-disk-pressure.test.ts +0 -16
- package/src/__tests__/scheduler-recurrence.test.ts +29 -46
- package/src/__tests__/scheduler-worker-standdown.test.ts +10 -24
- package/src/__tests__/search-skills-unified.test.ts +0 -6
- package/src/__tests__/secret-ingress-channel.test.ts +4 -25
- package/src/__tests__/secret-ingress-cli.test.ts +3 -30
- package/src/__tests__/secret-ingress-http.test.ts +10 -61
- package/src/__tests__/secret-ingress.test.ts +14 -31
- package/src/__tests__/secret-prompt-log-hygiene.test.ts +4 -10
- package/src/__tests__/secret-prompter-channel-fallback.test.ts +3 -9
- package/src/__tests__/secret-routes-platform-proxy.test.ts +3 -33
- package/src/__tests__/send-endpoint-busy.test.ts +6 -53
- package/src/__tests__/set-permission-mode.test.ts +5 -0
- package/src/__tests__/shell-credential-ref.test.ts +0 -10
- package/src/__tests__/shell-observability.test.ts +0 -21
- package/src/__tests__/shell-tool-proxy-mode.test.ts +0 -27
- package/src/__tests__/skill-load-feature-flag.test.ts +0 -27
- package/src/__tests__/skill-load-inline-command.test.ts +0 -25
- package/src/__tests__/skill-load-inline-includes.test.ts +0 -25
- package/src/__tests__/skill-load-plugin-scope.test.ts +0 -24
- package/src/__tests__/skill-projection-feature-flag.test.ts +14 -24
- package/src/__tests__/skill-projection.benchmark.test.ts +14 -14
- package/src/__tests__/skill-script-runner-sandbox.test.ts +1 -32
- package/src/__tests__/skills-file-content-endpoint.test.ts +0 -7
- package/src/__tests__/skills-files-catalog-fallback.test.ts +0 -7
- package/src/__tests__/slack-channel-config.test.ts +24 -79
- package/src/__tests__/slim-skill-category.test.ts +0 -7
- package/src/__tests__/subagent-call-site-routing.test.ts +4 -12
- package/src/__tests__/subagent-fork-prompt-role.test.ts +0 -7
- package/src/__tests__/subagent-spawn-and-await.test.ts +0 -13
- package/src/__tests__/subagent-tool-gate-mode.test.ts +0 -23
- package/src/__tests__/subagent-tools.test.ts +15 -30
- package/src/__tests__/system-prompt-ask-mode.test.ts +0 -25
- package/src/__tests__/system-prompt.test.ts +0 -33
- package/src/__tests__/task-memory-cleanup.test.ts +18 -185
- package/src/__tests__/telegram-bot-username-resolution.test.ts +25 -41
- package/src/__tests__/telegram-config.test.ts +0 -8
- package/src/__tests__/telephony-credential-preflight.test.ts +7 -11
- package/src/__tests__/telephony-tts-guard.test.ts +11 -21
- package/src/__tests__/terminal-tools.test.ts +0 -21
- package/src/__tests__/title-generate-hook.test.ts +11 -10
- package/src/__tests__/tool-execution-pipeline.benchmark.test.ts +3 -15
- package/src/__tests__/tool-executor-lifecycle-events.test.ts +0 -40
- package/src/__tests__/tool-executor.test.ts +3 -41
- package/src/__tests__/tool-preview-lifecycle.test.ts +0 -21
- package/src/__tests__/tool-result-metadata-plumbing.test.ts +0 -21
- package/src/__tests__/tool-start-timestamp.test.ts +0 -21
- package/src/__tests__/turn-boundary-resolution.test.ts +1 -12
- package/src/__tests__/twilio-config.test.ts +11 -21
- package/src/__tests__/twilio-provider.test.ts +2 -6
- package/src/__tests__/twilio-routes.test.ts +49 -100
- package/src/__tests__/twilio-validation.test.ts +5 -15
- package/src/__tests__/ui-file-upload-surface.test.ts +6 -9
- package/src/__tests__/usage-attribution.test.ts +7 -15
- package/src/__tests__/usage-cache-backfill-migration.test.ts +8 -8
- package/src/__tests__/vbundle-pax-and-symlink.test.ts +0 -11
- package/src/__tests__/vellum-self-knowledge-inline-command.test.ts +0 -24
- package/src/__tests__/verification-control-plane-policy.test.ts +0 -37
- package/src/__tests__/voice-ingress-preflight.test.ts +16 -15
- package/src/__tests__/voice-scoped-grant-consumer.test.ts +0 -22
- package/src/__tests__/voice-session-bridge-processing-wait.test.ts +1 -10
- package/src/__tests__/voice-session-bridge.test.ts +14 -39
- package/src/__tests__/web-search-backend-failure.test.ts +0 -21
- package/src/__tests__/whatsapp-invite-adapter.test.ts +11 -30
- package/src/__tests__/workspace-migration-009-backfill-conversation-disk-view.test.ts +1 -19
- package/src/__tests__/workspace-migration-013-repair-conversation-disk-view.test.ts +1 -19
- package/src/__tests__/workspace-migration-028-recover-conversations-from-disk-view.test.ts +1 -19
- package/src/background-wake/next-wake.test.ts +23 -20
- package/src/calls/__tests__/call-setup-router.test.ts +0 -4
- package/src/calls/__tests__/voice-session-bridge.test.ts +5 -7
- package/src/cli/commands/__tests__/inference-send.test.ts +0 -10
- package/src/cli/commands/__tests__/inference-session.test.ts +0 -7
- package/src/daemon/__tests__/embedding-reconcile.test.ts +0 -11
- package/src/daemon/__tests__/inference-profile-notification.test.ts +6 -4
- package/src/daemon/__tests__/native-web-search-metadata.test.ts +6 -20
- package/src/daemon/__tests__/web-search-status-text.test.ts +0 -21
- package/src/heartbeat/__tests__/heartbeat-service.test.ts +29 -55
- package/src/home/__tests__/suggested-prompts.test.ts +0 -4
- package/src/live-voice/__tests__/live-voice-credential-preflight.test.ts +50 -53
- package/src/live-voice/__tests__/live-voice-tts.test.ts +0 -4
- package/src/live-voice/__tests__/runtime-websocket-shell.test.ts +0 -34
- package/src/messaging/providers/slack/binding-metadata.test.ts +23 -21
- package/src/monitoring/worker.ts +17 -0
- package/src/oauth/connection-resolver.test.ts +18 -39
- package/src/permissions/checker.test.ts +10 -16
- package/src/permissions/question-prompter.test.ts +7 -14
- package/src/persistence/schema/tasks.ts +0 -27
- package/src/platform/consent-cache.test.ts +5 -11
- package/src/plugin-api/model-profiles.test.ts +29 -28
- package/src/plugin-api/vision-support.test.ts +18 -20
- package/src/plugins/defaults/memory/__tests__/conversation-row-batch-delete.test.ts +7 -12
- package/src/plugins/defaults/memory/__tests__/fork-message-copy.test.ts +7 -12
- package/src/plugins/defaults/memory/__tests__/jobs-store-enqueue-gate.test.ts +31 -33
- package/src/plugins/defaults/memory/__tests__/jobs-worker-memory-disabled.test.ts +11 -19
- package/src/plugins/defaults/memory/__tests__/jobs-worker-v2-graph-trigger-embed.test.ts +3 -17
- package/src/plugins/defaults/memory/__tests__/memory-retrospective-state.test.ts +6 -11
- package/src/plugins/defaults/memory/__tests__/memory-v2-activation-log-store.test.ts +1 -12
- package/src/plugins/defaults/memory/__tests__/memory-v2-concept-frequency.test.ts +0 -11
- package/src/plugins/defaults/memory/graph/graph-search.test.ts +3 -3
- package/src/plugins/defaults/memory/jobs/embed-pkb-file.test.ts +0 -6
- package/src/plugins/defaults/memory/pkb/pkb-index.test.ts +0 -6
- package/src/plugins/defaults/memory/pkb/pkb-reconcile.test.ts +0 -3
- package/src/plugins/defaults/memory/routes/__tests__/memory-v2-simulate-route.test.ts +11 -77
- package/src/plugins/defaults/memory/routes/memory-item-routes.test.ts +7 -14
- package/src/plugins/defaults/memory/task-memory-cleanup.ts +11 -22
- package/src/plugins/defaults/memory/tools.test.ts +6 -8
- package/src/plugins/defaults/memory/v2/__tests__/activation.test.ts +0 -14
- package/src/plugins/defaults/memory/v2/__tests__/backfill-jobs.test.ts +27 -35
- package/src/plugins/defaults/memory/v2/__tests__/cli-command-store.test.ts +0 -9
- package/src/plugins/defaults/memory/v2/__tests__/harness-compare.test.ts +1 -5
- package/src/plugins/defaults/memory/v2/__tests__/harness-oracle.test.ts +1 -5
- package/src/plugins/defaults/memory/v2/__tests__/harness-replay-input.test.ts +1 -5
- package/src/plugins/defaults/memory/v2/__tests__/injection.test.ts +0 -14
- package/src/plugins/defaults/memory/v2/__tests__/qdrant.test.ts +6 -19
- package/src/plugins/defaults/memory/v2/__tests__/sim.test.ts +0 -19
- package/src/plugins/defaults/memory/v2/__tests__/skill-content.test.ts +17 -11
- package/src/plugins/defaults/memory/v2/__tests__/skill-store.test.ts +0 -11
- package/src/plugins/defaults/memory/v2/__tests__/static-context.test.ts +0 -10
- package/src/plugins/defaults/memory/v3/__tests__/carry-integration.test.ts +10 -22
- package/src/plugins/defaults/memory/v3/__tests__/injection.test.ts +18 -20
- package/src/plugins/defaults/memory/v3/__tests__/selection-log-store.test.ts +5 -9
- package/src/plugins/defaults/memory/v3/__tests__/shadow-plugin.test.ts +51 -31
- package/src/plugins/defaults/memory/v3/prune.test.ts +3 -11
- package/src/plugins/defaults/memory/worker.ts +11 -0
- package/src/prompts/__tests__/system-prompt.test.ts +0 -28
- package/src/prompts/__tests__/task-progress-hint-section.test.ts +0 -28
- package/src/providers/__tests__/connection-model-compat.test.ts +6 -14
- package/src/providers/__tests__/dispatch-connection-routing.test.ts +3 -12
- package/src/providers/__tests__/retry-callsite.test.ts +5 -14
- package/src/providers/__tests__/satellite-connection-routing.test.ts +3 -15
- package/src/providers/inference/__tests__/base-url-route-validation.test.ts +7 -11
- package/src/providers/speech-to-text/__tests__/resolve.test.ts +77 -79
- package/src/runtime/__tests__/agent-wake.test.ts +0 -20
- package/src/runtime/routes/__tests__/backup-routes.test.ts +195 -118
- package/src/runtime/routes/__tests__/connection-routes-vs-cli-parity.test.ts +1 -14
- package/src/runtime/routes/__tests__/conversation-compaction-routes.test.ts +5 -20
- package/src/runtime/routes/__tests__/conversation-management-routes.test.ts +12 -23
- package/src/runtime/routes/__tests__/conversation-query-routes.test.ts +59 -49
- package/src/runtime/routes/__tests__/default-provider-routes.test.ts +53 -73
- package/src/runtime/routes/__tests__/inference-callsites-routes.test.ts +2 -10
- package/src/runtime/routes/__tests__/inference-profiles-routes.test.ts +58 -88
- package/src/runtime/routes/__tests__/inference-provider-connection-routes.test.ts +41 -65
- package/src/runtime/routes/__tests__/memory-worker-routes.test.ts +41 -29
- package/src/runtime/routes/__tests__/monitoring-routes.test.ts +0 -8
- package/src/runtime/routes/__tests__/schedule-worker-routes.test.ts +30 -20
- package/src/runtime/routes/__tests__/tts-routes.test.ts +0 -4
- package/src/runtime/routes/playground/__tests__/force-compact.test.ts +0 -4
- package/src/runtime/routes/playground/__tests__/guard.test.ts +0 -4
- package/src/runtime/routes/playground/__tests__/inject-failures.test.ts +0 -14
- package/src/runtime/routes/playground/__tests__/reset-circuit.test.ts +0 -14
- package/src/runtime/routes/playground/__tests__/seed-conversation.test.ts +0 -4
- package/src/runtime/routes/playground/__tests__/seeded-conversations.test.ts +16 -18
- package/src/runtime/routes/playground/__tests__/state.test.ts +0 -14
- package/src/runtime/routes/schedule-routes.ts +12 -58
- package/src/schedule/scheduler.ts +17 -173
- package/src/telemetry/__tests__/config-setting-events-store.test.ts +12 -8
- package/src/telemetry/__tests__/config-setting-snapshot.test.ts +122 -0
- package/src/telemetry/config-setting-events-store.ts +8 -4
- package/src/telemetry/config-setting-snapshot.ts +135 -0
- package/src/tools/apps/definitions.ts +1 -7
- package/src/tools/browser/__tests__/browser-execution-acquire.test.ts +11 -24
- package/src/tools/browser/__tests__/browser-status.test.ts +47 -33
- package/src/tools/browser/cdp-client/__tests__/factory.test.ts +75 -58
- package/src/tools/host-terminal/host-shell.test.ts +0 -25
- package/src/tools/network/__tests__/web-fetch-firecrawl.test.ts +13 -15
- package/src/tools/network/__tests__/web-search-metadata.test.ts +15 -18
- package/src/tools/network/__tests__/web-search.test.ts +39 -50
- package/src/tools/registry.ts +24 -60
- package/src/tools/terminal/shell.test.ts +4 -8
- package/src/tools/tool-manifest.ts +10 -4
- package/src/tools/ui-surface/definitions.ts +1 -7
- package/src/tools/workflows/run-workflow.test.ts +8 -22
- package/src/tts/__tests__/provider-adapters.test.ts +28 -15
- package/src/tts/__tests__/synthesis-stream.test.ts +6 -6
- package/src/workflows/leaf-runner.test.ts +18 -45
- package/__tests__/permissions/gateway-threshold-reader.test.ts +0 -450
- package/src/__tests__/task-scheduler.test.ts +0 -779
- package/src/tasks/task-runner.ts +0 -119
- package/src/tasks/task-scheduler.ts +0 -22
- package/src/tasks/task-store.ts +0 -106
package/package.json
CHANGED
|
@@ -19,16 +19,9 @@
|
|
|
19
19
|
* clients consume.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import { beforeEach, describe, expect,
|
|
23
|
-
|
|
24
|
-
let mockLlmConfig: Record<string, unknown> = {};
|
|
25
|
-
|
|
26
|
-
mock.module("../config/loader.js", () => ({
|
|
27
|
-
getConfig: () => ({ llm: mockLlmConfig }),
|
|
28
|
-
}));
|
|
22
|
+
import { beforeEach, describe, expect, test } from "bun:test";
|
|
29
23
|
|
|
30
24
|
import { AgentLoop } from "../agent/loop.js";
|
|
31
|
-
import { LLMSchema } from "../config/schemas/llm.js";
|
|
32
25
|
import { RetryProvider } from "../providers/retry.js";
|
|
33
26
|
import type {
|
|
34
27
|
Message,
|
|
@@ -36,18 +29,20 @@ import type {
|
|
|
36
29
|
ProviderResponse,
|
|
37
30
|
SendMessageOptions,
|
|
38
31
|
} from "../providers/types.js";
|
|
32
|
+
import { setConfig } from "./helpers/set-config.js";
|
|
39
33
|
|
|
40
34
|
const userMessage: Message = {
|
|
41
35
|
role: "user",
|
|
42
36
|
content: [{ type: "text", text: "hi" }],
|
|
43
37
|
};
|
|
44
38
|
|
|
39
|
+
/** Seed the workspace `llm` config block for real; the loader schema-merges it. */
|
|
45
40
|
function setLlmConfig(raw: unknown): void {
|
|
46
|
-
|
|
41
|
+
setConfig("llm", raw);
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
beforeEach(() => {
|
|
50
|
-
|
|
45
|
+
setLlmConfig({});
|
|
51
46
|
});
|
|
52
47
|
|
|
53
48
|
/**
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { beforeAll, describe, expect, mock, test } from "bun:test";
|
|
17
17
|
|
|
18
18
|
import { setOverridesForTesting } from "./feature-flag-test-helpers.js";
|
|
19
|
+
import { setConfig } from "./helpers/set-config.js";
|
|
19
20
|
|
|
20
21
|
// These suites exercise override-profile PLUMBING through legacy-shaped
|
|
21
22
|
// fixtures (llm.default-centric, no defaultProvider). Pinned to the
|
|
@@ -292,32 +293,37 @@ mock.module("../providers/inference/connections.js", () => ({
|
|
|
292
293
|
}),
|
|
293
294
|
}));
|
|
294
295
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
296
|
+
/**
|
|
297
|
+
* Seed the workspace `llm` config block for real. `activeProfile` and
|
|
298
|
+
* `callSites` vary per test; the rest is the shared legacy-shaped fixture.
|
|
299
|
+
*/
|
|
300
|
+
function seedLlmConfig(options?: {
|
|
301
|
+
activeProfile?: string;
|
|
302
|
+
callSites?: Record<string, unknown>;
|
|
303
|
+
}): void {
|
|
304
|
+
setConfig("llm", {
|
|
305
|
+
default: {
|
|
306
|
+
provider: "anthropic",
|
|
307
|
+
model: "claude-opus-4-7",
|
|
308
|
+
provider_connection: "anthropic-conn",
|
|
309
|
+
},
|
|
310
|
+
profiles: {
|
|
311
|
+
// Disable the catalog default so resolution lands on llm.default.
|
|
312
|
+
balanced: { source: "managed", status: "disabled" },
|
|
313
|
+
fast: {
|
|
314
|
+
source: "user",
|
|
302
315
|
provider: "anthropic",
|
|
303
|
-
model: "claude-
|
|
304
|
-
provider_connection: "anthropic-conn",
|
|
305
|
-
},
|
|
306
|
-
profiles: {
|
|
307
|
-
// Disable the catalog default so resolution lands on llm.default.
|
|
308
|
-
balanced: { source: "managed", status: "disabled" },
|
|
309
|
-
fast: {
|
|
310
|
-
source: "user",
|
|
311
|
-
provider: "anthropic",
|
|
312
|
-
model: "claude-haiku-4-5-20251001",
|
|
313
|
-
},
|
|
316
|
+
model: "claude-haiku-4-5-20251001",
|
|
314
317
|
},
|
|
315
|
-
activeProfile: mockActiveProfile,
|
|
316
|
-
callSites: mockCallSites,
|
|
317
318
|
},
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
})
|
|
319
|
+
...(options?.activeProfile === undefined
|
|
320
|
+
? {}
|
|
321
|
+
: { activeProfile: options.activeProfile }),
|
|
322
|
+
callSites: options?.callSites ?? {},
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
seedLlmConfig();
|
|
321
327
|
|
|
322
328
|
import { SubagentManager } from "../subagent/manager.js";
|
|
323
329
|
|
|
@@ -494,7 +500,7 @@ describe("executeSubagentSpawn — nested inheritance via context.overrideProfil
|
|
|
494
500
|
capturedConfig = config;
|
|
495
501
|
return "nested-subagent-id-3";
|
|
496
502
|
};
|
|
497
|
-
|
|
503
|
+
seedLlmConfig({ activeProfile: "fast" });
|
|
498
504
|
try {
|
|
499
505
|
const baseContext = {
|
|
500
506
|
workingDir: "/tmp",
|
|
@@ -503,14 +509,16 @@ describe("executeSubagentSpawn — nested inheritance via context.overrideProfil
|
|
|
503
509
|
sendToClient: () => {},
|
|
504
510
|
} as import("../tools/types.js").ToolContext;
|
|
505
511
|
|
|
506
|
-
mockCallSites = {};
|
|
507
512
|
await executeSubagentSpawn(
|
|
508
513
|
{ label: "nested", objective: "do nested work" },
|
|
509
514
|
baseContext,
|
|
510
515
|
);
|
|
511
516
|
expect(capturedConfig!.overrideProfile).toBe("fast");
|
|
512
517
|
|
|
513
|
-
|
|
518
|
+
seedLlmConfig({
|
|
519
|
+
activeProfile: "fast",
|
|
520
|
+
callSites: { subagentSpawn: { profile: "fast" } },
|
|
521
|
+
});
|
|
514
522
|
capturedConfig = undefined;
|
|
515
523
|
await executeSubagentSpawn(
|
|
516
524
|
{ label: "nested", objective: "do nested work" },
|
|
@@ -519,8 +527,7 @@ describe("executeSubagentSpawn — nested inheritance via context.overrideProfil
|
|
|
519
527
|
expect("overrideProfile" in capturedConfig!).toBe(false);
|
|
520
528
|
} finally {
|
|
521
529
|
manager.spawn = originalSpawn;
|
|
522
|
-
|
|
523
|
-
mockCallSites = {};
|
|
530
|
+
seedLlmConfig();
|
|
524
531
|
}
|
|
525
532
|
});
|
|
526
533
|
});
|
|
@@ -46,15 +46,8 @@ mock.module("../plugins/pipeline.js", () => ({
|
|
|
46
46
|
},
|
|
47
47
|
}));
|
|
48
48
|
|
|
49
|
-
// Minimal `getConfig` so the loop's defaults/loader path doesn't trip.
|
|
50
|
-
let mockLlmConfig: Record<string, unknown> = {};
|
|
51
|
-
mock.module("../config/loader.js", () => ({
|
|
52
|
-
getConfig: () => ({ llm: mockLlmConfig }),
|
|
53
|
-
}));
|
|
54
|
-
|
|
55
49
|
import type { AgentEvent } from "../agent/loop.js";
|
|
56
50
|
import { AgentLoop } from "../agent/loop.js";
|
|
57
|
-
import { LLMSchema } from "../config/schemas/llm.js";
|
|
58
51
|
import type { TrustContext } from "../daemon/trust-context-types.js";
|
|
59
52
|
import type {
|
|
60
53
|
Message,
|
|
@@ -62,6 +55,7 @@ import type {
|
|
|
62
55
|
ProviderResponse,
|
|
63
56
|
SendMessageOptions,
|
|
64
57
|
} from "../providers/types.js";
|
|
58
|
+
import { setConfig } from "./helpers/set-config.js";
|
|
65
59
|
|
|
66
60
|
const userMessage: Message = {
|
|
67
61
|
role: "user",
|
|
@@ -73,12 +67,13 @@ const trust: TrustContext = {
|
|
|
73
67
|
trustClass: "guardian",
|
|
74
68
|
};
|
|
75
69
|
|
|
70
|
+
/** Seed the workspace `llm` config block for real; the loader schema-merges it. */
|
|
76
71
|
function setLlmConfig(raw: unknown): void {
|
|
77
|
-
|
|
72
|
+
setConfig("llm", raw);
|
|
78
73
|
}
|
|
79
74
|
|
|
80
75
|
beforeEach(() => {
|
|
81
|
-
|
|
76
|
+
setLlmConfig({});
|
|
82
77
|
hookMutatesInPlace = false;
|
|
83
78
|
hookResponse = {
|
|
84
79
|
conversationId: "test-conv",
|
|
@@ -20,13 +20,7 @@ mock.module("../plugins/pipeline.js", () => ({
|
|
|
20
20
|
runHook: async (_hook: unknown, ctx: unknown): Promise<unknown> => ctx,
|
|
21
21
|
}));
|
|
22
22
|
|
|
23
|
-
let mockLlmConfig: Record<string, unknown> = {};
|
|
24
|
-
mock.module("../config/loader.js", () => ({
|
|
25
|
-
getConfig: () => ({ llm: mockLlmConfig }),
|
|
26
|
-
}));
|
|
27
|
-
|
|
28
23
|
import { AgentLoop } from "../agent/loop.js";
|
|
29
|
-
import { LLMSchema } from "../config/schemas/llm.js";
|
|
30
24
|
import type { TrustContext } from "../daemon/trust-context-types.js";
|
|
31
25
|
import type {
|
|
32
26
|
Message,
|
|
@@ -34,6 +28,7 @@ import type {
|
|
|
34
28
|
ProviderResponse,
|
|
35
29
|
SendMessageOptions,
|
|
36
30
|
} from "../providers/types.js";
|
|
31
|
+
import { setConfig } from "./helpers/set-config.js";
|
|
37
32
|
|
|
38
33
|
const userMessage: Message = {
|
|
39
34
|
role: "user",
|
|
@@ -92,9 +87,9 @@ async function runOnce(loop: AgentLoop): Promise<void> {
|
|
|
92
87
|
}
|
|
93
88
|
|
|
94
89
|
beforeEach(() => {
|
|
95
|
-
|
|
90
|
+
setConfig("llm", {
|
|
96
91
|
default: { provider: "anthropic", model: "mock-model" },
|
|
97
|
-
})
|
|
92
|
+
});
|
|
98
93
|
});
|
|
99
94
|
|
|
100
95
|
describe("AgentLoop.setSystemPrompt", () => {
|
|
@@ -26,10 +26,6 @@ mock.module("../persistence/conversation-crud.js", () => ({
|
|
|
26
26
|
getConversationOverrideProfile: () => undefined,
|
|
27
27
|
}));
|
|
28
28
|
|
|
29
|
-
mock.module("../config/loader.js", () => ({
|
|
30
|
-
getConfig: () => ({ llm: {} }),
|
|
31
|
-
}));
|
|
32
|
-
|
|
33
29
|
mock.module("../config/llm-context-resolution.js", () => ({
|
|
34
30
|
resolveEffectiveContextWindow: () => ({ maxInputTokens: 200_000 }),
|
|
35
31
|
}));
|
|
@@ -56,21 +56,7 @@ mock.module("../persistence/conversation-crud.js", () => ({
|
|
|
56
56
|
reserveMessage: mock(async () => ({ id: "msg-reserve" })),
|
|
57
57
|
}));
|
|
58
58
|
|
|
59
|
-
// Mutable stub for `getConfig().llm` consumed by `RetryProvider`'s
|
|
60
|
-
// resolver path in the integration-style assertion below. Defined ahead of
|
|
61
|
-
// import so the module-level `getConfig()` reference inside `retry.ts`
|
|
62
|
-
// closes over our mutable holder.
|
|
63
|
-
let mockLlmConfig: Record<string, unknown> = {};
|
|
64
|
-
|
|
65
|
-
mock.module("../config/loader.js", () => ({
|
|
66
|
-
getConfig: () => ({
|
|
67
|
-
llm: mockLlmConfig,
|
|
68
|
-
services: { inference: { mode: "your-own" } },
|
|
69
|
-
}),
|
|
70
|
-
}));
|
|
71
|
-
|
|
72
59
|
import type { AgentLoopRunOptions } from "../agent/loop.js";
|
|
73
|
-
import { LLMSchema } from "../config/schemas/llm.js";
|
|
74
60
|
import type { Conversation } from "../daemon/conversation.js";
|
|
75
61
|
import { RetryProvider } from "../providers/retry.js";
|
|
76
62
|
import type {
|
|
@@ -83,6 +69,16 @@ import {
|
|
|
83
69
|
__resetWakeChainForTests,
|
|
84
70
|
wakeAgentForOpportunity,
|
|
85
71
|
} from "../runtime/agent-wake.js";
|
|
72
|
+
import { setConfig } from "./helpers/set-config.js";
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Seed the workspace `llm` config block for real. The loader schema-merges
|
|
76
|
+
* it, so `RetryProvider`'s resolver path reads the seeded values on its next
|
|
77
|
+
* `getConfig()` call.
|
|
78
|
+
*/
|
|
79
|
+
function setLlmConfig(raw: unknown): void {
|
|
80
|
+
setConfig("llm", raw);
|
|
81
|
+
}
|
|
86
82
|
|
|
87
83
|
interface RunArgs {
|
|
88
84
|
messages: Message[];
|
|
@@ -133,7 +129,7 @@ function makeTarget(): {
|
|
|
133
129
|
|
|
134
130
|
beforeEach(() => {
|
|
135
131
|
__resetWakeChainForTests();
|
|
136
|
-
|
|
132
|
+
setLlmConfig({});
|
|
137
133
|
});
|
|
138
134
|
|
|
139
135
|
afterEach(() => {
|
|
@@ -143,7 +139,7 @@ afterEach(() => {
|
|
|
143
139
|
describe("wakeAgentForOpportunity — overrideProfile forwarding", () => {
|
|
144
140
|
test("forwards the conversation's pinned overrideProfile + mainAgent callSite to agentLoop.run", async () => {
|
|
145
141
|
mockOverrideProfile = "frontier";
|
|
146
|
-
|
|
142
|
+
setLlmConfig({
|
|
147
143
|
default: {
|
|
148
144
|
provider: "anthropic",
|
|
149
145
|
model: "claude-sonnet-4-6",
|
|
@@ -158,7 +154,7 @@ describe("wakeAgentForOpportunity — overrideProfile forwarding", () => {
|
|
|
158
154
|
callSites: {
|
|
159
155
|
mainAgent: {},
|
|
160
156
|
},
|
|
161
|
-
})
|
|
157
|
+
});
|
|
162
158
|
const { target, runArgs } = makeTarget();
|
|
163
159
|
|
|
164
160
|
const result = await wakeAgentForOpportunity(
|
|
@@ -191,7 +187,7 @@ describe("wakeAgentForOpportunity — overrideProfile forwarding", () => {
|
|
|
191
187
|
// conversation) takes its place AND floats above the call-site layers
|
|
192
188
|
// via the resolver's `forceOverrideProfile` escape hatch.
|
|
193
189
|
mockOverrideProfile = "pinned-ignored";
|
|
194
|
-
|
|
190
|
+
setLlmConfig({
|
|
195
191
|
default: {
|
|
196
192
|
provider: "anthropic",
|
|
197
193
|
model: "claude-sonnet-4-6",
|
|
@@ -206,7 +202,7 @@ describe("wakeAgentForOpportunity — overrideProfile forwarding", () => {
|
|
|
206
202
|
callSites: {
|
|
207
203
|
memoryRetrospective: { contextWindow: { maxInputTokens: 180000 } },
|
|
208
204
|
},
|
|
209
|
-
})
|
|
205
|
+
});
|
|
210
206
|
const { target, runArgs } = makeTarget();
|
|
211
207
|
|
|
212
208
|
const result = await wakeAgentForOpportunity(
|
|
@@ -234,7 +230,7 @@ describe("wakeAgentForOpportunity — overrideProfile forwarding", () => {
|
|
|
234
230
|
|
|
235
231
|
test("without forceOverrideProfile the wake never sets the force flag", async () => {
|
|
236
232
|
mockOverrideProfile = "frontier";
|
|
237
|
-
|
|
233
|
+
setLlmConfig({
|
|
238
234
|
default: {
|
|
239
235
|
provider: "anthropic",
|
|
240
236
|
model: "claude-sonnet-4-6",
|
|
@@ -243,7 +239,7 @@ describe("wakeAgentForOpportunity — overrideProfile forwarding", () => {
|
|
|
243
239
|
},
|
|
244
240
|
profiles: { frontier: {} },
|
|
245
241
|
callSites: { mainAgent: {} },
|
|
246
|
-
})
|
|
242
|
+
});
|
|
247
243
|
const { target, runArgs } = makeTarget();
|
|
248
244
|
|
|
249
245
|
await wakeAgentForOpportunity(
|
|
@@ -320,7 +316,7 @@ describe("wakeAgentForOpportunity — resolver actually engages", () => {
|
|
|
320
316
|
// so we can detect whether the resolver engaged. If `callSite` were
|
|
321
317
|
// undefined (the original bug), the retry layer would skip the resolver
|
|
322
318
|
// entirely and the downstream provider would see only the wire defaults.
|
|
323
|
-
|
|
319
|
+
setLlmConfig({
|
|
324
320
|
default: {
|
|
325
321
|
provider: "anthropic",
|
|
326
322
|
model: "claude-sonnet-4-6",
|
|
@@ -335,7 +331,7 @@ describe("wakeAgentForOpportunity — resolver actually engages", () => {
|
|
|
335
331
|
callSites: {
|
|
336
332
|
mainAgent: {},
|
|
337
333
|
},
|
|
338
|
-
})
|
|
334
|
+
});
|
|
339
335
|
|
|
340
336
|
let seen: SendMessageOptions | undefined;
|
|
341
337
|
const wrapped = new RetryProvider(
|
|
@@ -22,27 +22,6 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { beforeEach, describe, expect, mock, test } from "bun:test";
|
|
24
24
|
|
|
25
|
-
mock.module("../config/loader.js", () => ({
|
|
26
|
-
getConfig: () => ({
|
|
27
|
-
skills: {
|
|
28
|
-
entries: {},
|
|
29
|
-
load: { extraDirs: [], watch: false, watchDebounceMs: 0 },
|
|
30
|
-
install: { nodeManager: "npm" },
|
|
31
|
-
allowBundled: null,
|
|
32
|
-
remoteProviders: {
|
|
33
|
-
skillssh: { enabled: true },
|
|
34
|
-
clawhub: { enabled: true },
|
|
35
|
-
},
|
|
36
|
-
remotePolicy: {
|
|
37
|
-
blockSuspicious: true,
|
|
38
|
-
blockMalware: true,
|
|
39
|
-
maxSkillsShRisk: "medium",
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
}),
|
|
43
|
-
loadConfig: () => ({}),
|
|
44
|
-
}));
|
|
45
|
-
|
|
46
25
|
let mockedRowContent = "";
|
|
47
26
|
const updates: Array<{ id: string; content: string }> = [];
|
|
48
27
|
|
|
@@ -17,27 +17,6 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { beforeEach, describe, expect, mock, test } from "bun:test";
|
|
19
19
|
|
|
20
|
-
mock.module("../config/loader.js", () => ({
|
|
21
|
-
getConfig: () => ({
|
|
22
|
-
skills: {
|
|
23
|
-
entries: {},
|
|
24
|
-
load: { extraDirs: [], watch: false, watchDebounceMs: 0 },
|
|
25
|
-
install: { nodeManager: "npm" },
|
|
26
|
-
allowBundled: null,
|
|
27
|
-
remoteProviders: {
|
|
28
|
-
skillssh: { enabled: true },
|
|
29
|
-
clawhub: { enabled: true },
|
|
30
|
-
},
|
|
31
|
-
remotePolicy: {
|
|
32
|
-
blockSuspicious: true,
|
|
33
|
-
blockMalware: true,
|
|
34
|
-
maxSkillsShRisk: "medium",
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
}),
|
|
38
|
-
loadConfig: () => ({}),
|
|
39
|
-
}));
|
|
40
|
-
|
|
41
20
|
let mockedRowContent = "";
|
|
42
21
|
const updates: Array<{ id: string; content: string }> = [];
|
|
43
22
|
|
|
@@ -24,47 +24,6 @@ mock.module("../providers/registry.js", () => ({
|
|
|
24
24
|
initializeProviders: async () => {},
|
|
25
25
|
}));
|
|
26
26
|
|
|
27
|
-
mock.module("../config/loader.js", () => ({
|
|
28
|
-
getConfig: () => ({
|
|
29
|
-
ui: {},
|
|
30
|
-
llm: {
|
|
31
|
-
default: {
|
|
32
|
-
provider: "mock-provider",
|
|
33
|
-
model: "mock-model",
|
|
34
|
-
maxTokens: 4096,
|
|
35
|
-
effort: "max" as const,
|
|
36
|
-
speed: "standard" as const,
|
|
37
|
-
temperature: null,
|
|
38
|
-
thinking: { enabled: false, streamThinking: true },
|
|
39
|
-
contextWindow: {
|
|
40
|
-
enabled: true,
|
|
41
|
-
maxInputTokens: 100000,
|
|
42
|
-
targetBudgetRatio: 0.3,
|
|
43
|
-
compactThreshold: 0.8,
|
|
44
|
-
summaryBudgetRatio: 0.05,
|
|
45
|
-
overflowRecovery: {
|
|
46
|
-
enabled: true,
|
|
47
|
-
safetyMarginRatio: 0.05,
|
|
48
|
-
maxAttempts: 3,
|
|
49
|
-
interactiveLatestTurnCompression: "summarize",
|
|
50
|
-
nonInteractiveLatestTurnCompression: "truncate",
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
profiles: {},
|
|
55
|
-
callSites: {},
|
|
56
|
-
pricingOverrides: [],
|
|
57
|
-
},
|
|
58
|
-
rateLimit: { maxRequestsPerMinute: 0 },
|
|
59
|
-
timeouts: { permissionTimeoutSec: 300 },
|
|
60
|
-
skills: { entries: {}, allowBundled: true },
|
|
61
|
-
permissions: { mode: "workspace" },
|
|
62
|
-
}),
|
|
63
|
-
loadRawConfig: () => ({}),
|
|
64
|
-
saveRawConfig: () => {},
|
|
65
|
-
invalidateConfigCache: () => {},
|
|
66
|
-
}));
|
|
67
|
-
|
|
68
27
|
mock.module("../prompts/system-prompt.js", () => ({
|
|
69
28
|
buildSystemPrompt: () => "system prompt",
|
|
70
29
|
}));
|
|
@@ -10,60 +10,6 @@ import type { Conversation } from "../daemon/conversation.js";
|
|
|
10
10
|
import type { ServerMessage } from "../daemon/message-protocol.js";
|
|
11
11
|
import type { SecretPromptResult } from "../permissions/secret-prompt-types.js";
|
|
12
12
|
|
|
13
|
-
mock.module("../config/loader.js", () => ({
|
|
14
|
-
getConfig: () => ({
|
|
15
|
-
ui: {},
|
|
16
|
-
|
|
17
|
-
model: "test",
|
|
18
|
-
provider: "test",
|
|
19
|
-
memory: { enabled: false },
|
|
20
|
-
rateLimit: { maxRequestsPerMinute: 0 },
|
|
21
|
-
secretDetection: { enabled: false },
|
|
22
|
-
contextWindow: { maxInputTokens: 200000 },
|
|
23
|
-
llm: {
|
|
24
|
-
default: {
|
|
25
|
-
provider: "anthropic",
|
|
26
|
-
model: "claude-opus-4-7",
|
|
27
|
-
maxTokens: 64000,
|
|
28
|
-
effort: "max" as const,
|
|
29
|
-
speed: "standard" as const,
|
|
30
|
-
temperature: null,
|
|
31
|
-
thinking: { enabled: true, streamThinking: true },
|
|
32
|
-
contextWindow: {
|
|
33
|
-
enabled: true,
|
|
34
|
-
maxInputTokens: 200000,
|
|
35
|
-
targetBudgetRatio: 0.3,
|
|
36
|
-
compactThreshold: 0.8,
|
|
37
|
-
summaryBudgetRatio: 0.05,
|
|
38
|
-
overflowRecovery: {
|
|
39
|
-
enabled: true,
|
|
40
|
-
safetyMarginRatio: 0.05,
|
|
41
|
-
maxAttempts: 3,
|
|
42
|
-
interactiveLatestTurnCompression: "summarize",
|
|
43
|
-
nonInteractiveLatestTurnCompression: "truncate",
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
profiles: {},
|
|
48
|
-
callSites: {},
|
|
49
|
-
pricingOverrides: [],
|
|
50
|
-
},
|
|
51
|
-
services: {
|
|
52
|
-
inference: {
|
|
53
|
-
mode: "your-own",
|
|
54
|
-
provider: "anthropic",
|
|
55
|
-
model: "claude-opus-4-7",
|
|
56
|
-
},
|
|
57
|
-
"image-generation": {
|
|
58
|
-
mode: "your-own",
|
|
59
|
-
provider: "gemini",
|
|
60
|
-
model: "gemini-3.1-flash-image-preview",
|
|
61
|
-
},
|
|
62
|
-
"web-search": { mode: "your-own", provider: "inference-provider-native" },
|
|
63
|
-
},
|
|
64
|
-
}),
|
|
65
|
-
}));
|
|
66
|
-
|
|
67
13
|
mock.module("../config/env.js", () => ({
|
|
68
14
|
isHttpAuthDisabled: () => true,
|
|
69
15
|
hasUngatedHttpAuthDisabled: () => false,
|
|
@@ -116,15 +62,18 @@ let _conversationFactory: (() => Conversation) | undefined;
|
|
|
116
62
|
mock.module("../daemon/conversation-registry.js", () => ({
|
|
117
63
|
findConversation: () => {
|
|
118
64
|
// Return the current test session for any conversation ID lookup.
|
|
119
|
-
if (!_conversationFactory)
|
|
65
|
+
if (!_conversationFactory) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
120
68
|
return _conversationFactory();
|
|
121
69
|
},
|
|
122
70
|
}));
|
|
123
71
|
|
|
124
72
|
mock.module("../daemon/conversation-store.js", () => ({
|
|
125
73
|
getOrCreateConversation: async () => {
|
|
126
|
-
if (!_conversationFactory)
|
|
74
|
+
if (!_conversationFactory) {
|
|
127
75
|
throw new Error("_conversationFactory not set in test");
|
|
76
|
+
}
|
|
128
77
|
return _conversationFactory();
|
|
129
78
|
},
|
|
130
79
|
}));
|
|
@@ -5,18 +5,7 @@
|
|
|
5
5
|
* - subscribing with machineName set results in listClients() returning the name
|
|
6
6
|
* - subscribing without machineName results in listClients() returning undefined
|
|
7
7
|
*/
|
|
8
|
-
import { describe, expect,
|
|
9
|
-
|
|
10
|
-
mock.module("../config/loader.js", () => ({
|
|
11
|
-
getConfig: () => ({
|
|
12
|
-
ui: {},
|
|
13
|
-
model: "test",
|
|
14
|
-
provider: "test",
|
|
15
|
-
memory: { enabled: false },
|
|
16
|
-
rateLimit: { maxRequestsPerMinute: 0 },
|
|
17
|
-
secretDetection: { enabled: false },
|
|
18
|
-
}),
|
|
19
|
-
}));
|
|
8
|
+
import { describe, expect, test } from "bun:test";
|
|
20
9
|
|
|
21
10
|
import { initializeDb } from "../persistence/db-init.js";
|
|
22
11
|
import { AssistantEventHub } from "../runtime/assistant-event-hub.js";
|
|
@@ -8,19 +8,7 @@
|
|
|
8
8
|
* - Subscription cleanup on request abort.
|
|
9
9
|
* - Subscription cleanup on reader cancel.
|
|
10
10
|
*/
|
|
11
|
-
import { beforeEach, describe, expect,
|
|
12
|
-
|
|
13
|
-
mock.module("../config/loader.js", () => ({
|
|
14
|
-
getConfig: () => ({
|
|
15
|
-
ui: {},
|
|
16
|
-
|
|
17
|
-
model: "test",
|
|
18
|
-
provider: "test",
|
|
19
|
-
memory: { enabled: false },
|
|
20
|
-
rateLimit: { maxRequestsPerMinute: 0 },
|
|
21
|
-
secretDetection: { enabled: false },
|
|
22
|
-
}),
|
|
23
|
-
}));
|
|
11
|
+
import { beforeEach, describe, expect, test } from "bun:test";
|
|
24
12
|
|
|
25
13
|
import { getDb } from "../persistence/db-connection.js";
|
|
26
14
|
import { initializeDb } from "../persistence/db-init.js";
|
|
@@ -282,7 +270,9 @@ describe("SSE route — heartbeat", () => {
|
|
|
282
270
|
setTimeout(() => r({ value: undefined, done: true }), 20),
|
|
283
271
|
),
|
|
284
272
|
]);
|
|
285
|
-
if (done || !value)
|
|
273
|
+
if (done || !value) {
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
286
276
|
chunks.push(new TextDecoder().decode(value));
|
|
287
277
|
}
|
|
288
278
|
|
|
@@ -8,18 +8,7 @@
|
|
|
8
8
|
* stays bound to the oldest upload.
|
|
9
9
|
*/
|
|
10
10
|
import { readFileSync } from "node:fs";
|
|
11
|
-
import { beforeEach, describe, expect,
|
|
12
|
-
|
|
13
|
-
mock.module("../config/loader.js", () => ({
|
|
14
|
-
getConfig: () => ({
|
|
15
|
-
ui: {},
|
|
16
|
-
|
|
17
|
-
model: "test",
|
|
18
|
-
provider: "test",
|
|
19
|
-
memory: { enabled: false },
|
|
20
|
-
rateLimit: { maxRequestsPerMinute: 0 },
|
|
21
|
-
}),
|
|
22
|
-
}));
|
|
11
|
+
import { beforeEach, describe, expect, test } from "bun:test";
|
|
23
12
|
|
|
24
13
|
import { reinjectAttachmentPathAnnotations } from "../daemon/conversation-lifecycle.js";
|
|
25
14
|
import type { MessagingConversationContext } from "../daemon/conversation-messaging.js";
|
|
@@ -7,12 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { beforeAll, beforeEach, describe, expect, mock, test } from "bun:test";
|
|
9
9
|
|
|
10
|
-
mock.module("../config/loader.js", () => ({
|
|
11
|
-
loadConfig: () => ({}),
|
|
12
|
-
getConfig: () => ({}),
|
|
13
|
-
invalidateConfigCache: () => {},
|
|
14
|
-
}));
|
|
15
|
-
|
|
16
10
|
mock.module("../config/env.js", () => ({
|
|
17
11
|
isHttpAuthDisabled: () => true,
|
|
18
12
|
getAssistantDomain: () => "vellum.me",
|
|
@@ -11,12 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
import { beforeAll, describe, expect, mock, test } from "bun:test";
|
|
13
13
|
|
|
14
|
-
mock.module("../config/loader.js", () => ({
|
|
15
|
-
loadConfig: () => ({}),
|
|
16
|
-
getConfig: () => ({}),
|
|
17
|
-
invalidateConfigCache: () => {},
|
|
18
|
-
}));
|
|
19
|
-
|
|
20
14
|
mock.module("../config/env.js", () => ({
|
|
21
15
|
isHttpAuthDisabled: () => true,
|
|
22
16
|
getAssistantDomain: () => "vellum.me",
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, rmSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
-
import { beforeEach, describe, expect,
|
|
4
|
-
|
|
5
|
-
mock.module("../config/loader.js", () => ({
|
|
6
|
-
getConfig: () => ({
|
|
7
|
-
ui: {},
|
|
8
|
-
|
|
9
|
-
model: "test",
|
|
10
|
-
provider: "test",
|
|
11
|
-
memory: { enabled: false },
|
|
12
|
-
rateLimit: { maxRequestsPerMinute: 0 },
|
|
13
|
-
}),
|
|
14
|
-
}));
|
|
3
|
+
import { beforeEach, describe, expect, test } from "bun:test";
|
|
15
4
|
|
|
16
5
|
import {
|
|
17
6
|
attachInlineAttachmentToMessage,
|
|
@@ -40,6 +29,10 @@ import { initializeDb } from "../persistence/db-init.js";
|
|
|
40
29
|
import { rawGet, rawRun } from "../persistence/raw-query.js";
|
|
41
30
|
import { mediaSourceBytes } from "../providers/media-resolve.js";
|
|
42
31
|
import { getConversationsDir } from "../util/platform.js";
|
|
32
|
+
import { setConfig } from "./helpers/set-config.js";
|
|
33
|
+
|
|
34
|
+
// Disable memory so addMessage skips background indexing of test messages.
|
|
35
|
+
setConfig("memory", { enabled: false });
|
|
43
36
|
|
|
44
37
|
await initializeDb();
|
|
45
38
|
|