@vellumai/assistant 0.4.49 → 0.4.51
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 +24 -33
- package/README.md +3 -3
- package/docs/architecture/integrations.md +2 -2
- package/docs/architecture/keychain-broker.md +6 -6
- package/docs/architecture/memory.md +180 -119
- package/knip.json +32 -0
- package/package.json +3 -2
- package/src/__tests__/agent-loop.test.ts +3 -1
- package/src/__tests__/anthropic-provider.test.ts +114 -23
- package/src/__tests__/approval-cascade.test.ts +1 -15
- package/src/__tests__/approval-routes-http.test.ts +2 -0
- package/src/__tests__/assistant-feature-flag-guard.test.ts +0 -23
- package/src/__tests__/btw-routes.test.ts +61 -5
- package/src/__tests__/canonical-guardian-store.test.ts +95 -0
- package/src/__tests__/checker.test.ts +13 -0
- package/src/__tests__/config-schema.test.ts +1 -68
- package/src/__tests__/config-watcher.test.ts +8 -0
- package/src/__tests__/context-memory-e2e.test.ts +11 -100
- package/src/__tests__/conversation-routes-guardian-reply.test.ts +8 -0
- package/src/__tests__/conversation-routes-slash-commands.test.ts +1 -0
- package/src/__tests__/credential-security-e2e.test.ts +1 -0
- package/src/__tests__/credential-security-invariants.test.ts +8 -7
- package/src/__tests__/credential-vault-unit.test.ts +23 -18
- package/src/__tests__/credential-vault.test.ts +30 -18
- package/src/__tests__/credentials-cli.test.ts +257 -82
- package/src/__tests__/cu-unified-flow.test.ts +532 -0
- package/src/__tests__/date-context.test.ts +93 -77
- package/src/__tests__/deterministic-verification-control-plane.test.ts +64 -0
- package/src/__tests__/guardian-routing-invariants.test.ts +93 -0
- package/src/__tests__/history-repair.test.ts +245 -0
- package/src/__tests__/host-cu-proxy.test.ts +165 -3
- package/src/__tests__/http-user-message-parity.test.ts +1 -0
- package/src/__tests__/inbound-invite-redemption.test.ts +36 -7
- package/src/__tests__/integration-status.test.ts +31 -30
- package/src/__tests__/invite-redemption-service.test.ts +166 -13
- package/src/__tests__/invite-routes-http.test.ts +166 -5
- package/src/__tests__/keychain-broker-client.test.ts +4 -4
- package/src/__tests__/list-messages-attachments.test.ts +193 -0
- package/src/__tests__/memory-context-benchmark.benchmark.test.ts +56 -18
- package/src/__tests__/memory-lifecycle-e2e.test.ts +244 -387
- package/src/__tests__/memory-recall-quality.test.ts +244 -407
- package/src/__tests__/memory-regressions.experimental.test.ts +126 -101
- package/src/__tests__/memory-regressions.test.ts +477 -2841
- package/src/__tests__/memory-retrieval.benchmark.test.ts +33 -150
- package/src/__tests__/memory-upsert-concurrency.test.ts +5 -244
- package/src/__tests__/mime-builder.test.ts +28 -0
- package/src/__tests__/native-web-search.test.ts +1 -0
- package/src/__tests__/oauth-cli.test.ts +824 -31
- package/src/__tests__/oauth-provider-profiles.test.ts +1 -1
- package/src/__tests__/oauth-store.test.ts +363 -17
- package/src/__tests__/qdrant-collection-migration.test.ts +53 -8
- package/src/__tests__/registry.test.ts +0 -1
- package/src/__tests__/relay-server.test.ts +55 -1
- package/src/__tests__/schedule-tools.test.ts +32 -0
- package/src/__tests__/script-proxy-certs.test.ts +1 -1
- package/src/__tests__/secret-onetime-send.test.ts +1 -0
- package/src/__tests__/secret-routes-managed-proxy.test.ts +183 -0
- package/src/__tests__/secure-keys.test.ts +78 -18
- package/src/__tests__/send-endpoint-busy.test.ts +3 -0
- package/src/__tests__/server-history-render.test.ts +2 -2
- package/src/__tests__/session-abort-tool-results.test.ts +1 -14
- package/src/__tests__/session-agent-loop-overflow.test.ts +1583 -0
- package/src/__tests__/session-agent-loop.test.ts +19 -15
- package/src/__tests__/session-confirmation-signals.test.ts +1 -15
- package/src/__tests__/session-error.test.ts +124 -2
- package/src/__tests__/session-history-web-search.test.ts +918 -0
- package/src/__tests__/session-pre-run-repair.test.ts +1 -14
- package/src/__tests__/session-provider-retry-repair.test.ts +25 -28
- package/src/__tests__/session-queue.test.ts +37 -27
- package/src/__tests__/session-runtime-assembly.test.ts +54 -0
- package/src/__tests__/session-slash-known.test.ts +1 -15
- package/src/__tests__/session-slash-queue.test.ts +1 -15
- package/src/__tests__/session-slash-unknown.test.ts +1 -15
- package/src/__tests__/session-workspace-cache-state.test.ts +3 -33
- package/src/__tests__/session-workspace-injection.test.ts +3 -37
- package/src/__tests__/session-workspace-tool-tracking.test.ts +3 -37
- package/src/__tests__/skills-install-extract.test.ts +93 -0
- package/src/__tests__/skills.test.ts +2 -2
- package/src/__tests__/skillssh-registry.test.ts +451 -0
- package/src/__tests__/slack-channel-config.test.ts +10 -8
- package/src/__tests__/trust-store.test.ts +15 -0
- package/src/__tests__/twilio-config.test.ts +11 -10
- package/src/__tests__/twilio-provider.test.ts +9 -4
- package/src/__tests__/voice-invite-redemption.test.ts +85 -5
- package/src/agent/ax-tree-compaction.test.ts +51 -0
- package/src/agent/loop.ts +39 -12
- package/src/approvals/AGENTS.md +1 -1
- package/src/approvals/guardian-request-resolvers.ts +14 -2
- package/src/bundler/compiler-tools.ts +66 -2
- package/src/calls/call-domain.ts +134 -3
- package/src/calls/call-store.ts +6 -0
- package/src/calls/relay-server.ts +44 -6
- package/src/calls/relay-setup-router.ts +17 -1
- package/src/calls/twilio-config.ts +5 -4
- package/src/calls/twilio-provider.ts +14 -9
- package/src/calls/twilio-rest.ts +10 -7
- package/src/calls/types.ts +3 -1
- package/src/cli/commands/config.ts +14 -9
- package/src/cli/commands/contacts.ts +3 -0
- package/src/cli/commands/credentials.ts +170 -174
- package/src/cli/commands/doctor.ts +11 -8
- package/src/cli/commands/keys.ts +9 -9
- package/src/cli/commands/mcp.ts +46 -59
- package/src/cli/commands/memory.ts +16 -165
- package/src/cli/commands/oauth/apps.ts +68 -10
- package/src/cli/commands/oauth/connections.ts +475 -105
- package/src/cli/commands/oauth/index.ts +3 -3
- package/src/cli/commands/oauth/providers.ts +18 -4
- package/src/cli/commands/sessions.ts +5 -2
- package/src/cli/commands/skills.ts +173 -1
- package/src/cli/http-client.ts +0 -20
- package/src/cli/main-screen.tsx +2 -2
- package/src/cli/program.ts +5 -6
- package/src/cli.ts +20 -22
- package/src/config/__tests__/feature-flag-registry-bundled.test.ts +39 -0
- package/src/config/bundled-skills/computer-use/TOOLS.json +1 -1
- package/src/config/bundled-skills/computer-use/tools/computer-use-observe.ts +12 -0
- package/src/config/bundled-skills/contacts/SKILL.md +35 -11
- package/src/config/bundled-skills/contacts/tools/google-contacts.ts +1 -1
- package/src/config/bundled-skills/gmail/SKILL.md +1 -1
- package/src/config/bundled-skills/gmail/TOOLS.json +52 -0
- package/src/config/bundled-skills/gmail/tools/gmail-archive.ts +13 -3
- package/src/config/bundled-skills/gmail/tools/gmail-attachments.ts +9 -2
- package/src/config/bundled-skills/gmail/tools/gmail-draft.ts +5 -1
- package/src/config/bundled-skills/gmail/tools/gmail-filters.ts +5 -1
- package/src/config/bundled-skills/gmail/tools/gmail-follow-up.ts +5 -1
- package/src/config/bundled-skills/gmail/tools/gmail-forward.ts +5 -1
- package/src/config/bundled-skills/gmail/tools/gmail-label.ts +9 -2
- package/src/config/bundled-skills/gmail/tools/gmail-outreach-scan.ts +5 -1
- package/src/config/bundled-skills/gmail/tools/gmail-send-draft.ts +5 -1
- package/src/config/bundled-skills/gmail/tools/gmail-sender-digest.ts +5 -1
- package/src/config/bundled-skills/gmail/tools/gmail-trash.ts +5 -1
- package/src/config/bundled-skills/gmail/tools/gmail-unsubscribe.ts +5 -1
- package/src/config/bundled-skills/gmail/tools/gmail-vacation.ts +5 -1
- package/src/config/bundled-skills/google-calendar/TOOLS.json +20 -0
- package/src/config/bundled-skills/google-calendar/tools/calendar-check-availability.ts +2 -1
- package/src/config/bundled-skills/google-calendar/tools/calendar-create-event.ts +2 -1
- package/src/config/bundled-skills/google-calendar/tools/calendar-get-event.ts +2 -1
- package/src/config/bundled-skills/google-calendar/tools/calendar-list-events.ts +2 -1
- package/src/config/bundled-skills/google-calendar/tools/calendar-rsvp.ts +2 -1
- package/src/config/bundled-skills/google-calendar/tools/shared.ts +8 -2
- package/src/config/bundled-skills/messaging/SKILL.md +1 -1
- package/src/config/bundled-skills/messaging/tools/messaging-analyze-style.ts +2 -2
- package/src/config/bundled-skills/messaging/tools/messaging-archive-by-sender.ts +2 -2
- package/src/config/bundled-skills/messaging/tools/messaging-auth-test.ts +2 -2
- package/src/config/bundled-skills/messaging/tools/messaging-list-conversations.ts +2 -2
- package/src/config/bundled-skills/messaging/tools/messaging-mark-read.ts +2 -2
- package/src/config/bundled-skills/messaging/tools/messaging-read.ts +2 -2
- package/src/config/bundled-skills/messaging/tools/messaging-search.ts +2 -2
- package/src/config/bundled-skills/messaging/tools/messaging-send.ts +2 -2
- package/src/config/bundled-skills/messaging/tools/messaging-sender-digest.ts +2 -2
- package/src/config/bundled-skills/messaging/tools/shared.ts +7 -5
- package/src/config/bundled-skills/slack/tools/shared.ts +1 -1
- package/src/config/bundled-skills/slack/tools/slack-add-reaction.ts +1 -1
- package/src/config/bundled-skills/slack/tools/slack-channel-details.ts +1 -1
- package/src/config/bundled-skills/slack/tools/slack-delete-message.ts +1 -1
- package/src/config/bundled-skills/slack/tools/slack-edit-message.ts +1 -1
- package/src/config/bundled-skills/slack/tools/slack-leave-channel.ts +1 -1
- package/src/config/bundled-skills/slack/tools/slack-scan-digest.ts +1 -1
- package/src/config/bundled-tool-registry.ts +2 -5
- package/src/config/loader.ts +6 -42
- package/src/config/schema.ts +1 -12
- package/src/config/schemas/memory-lifecycle.ts +0 -9
- package/src/config/schemas/memory-processing.ts +0 -180
- package/src/config/schemas/memory-retrieval.ts +32 -104
- package/src/config/schemas/memory.ts +0 -10
- package/src/config/types.ts +0 -4
- package/src/contacts/contact-store.ts +39 -2
- package/src/contacts/contacts-write.ts +9 -0
- package/src/context/window-manager.ts +4 -1
- package/src/daemon/config-watcher.ts +55 -2
- package/src/daemon/daemon-control.ts +1 -1
- package/src/daemon/date-context.ts +114 -31
- package/src/daemon/handlers/config-ingress.ts +2 -2
- package/src/daemon/handlers/config-slack-channel.ts +59 -39
- package/src/daemon/handlers/config-telegram.ts +23 -14
- package/src/daemon/handlers/session-history.ts +1 -358
- package/src/daemon/handlers/sessions.ts +18 -13
- package/src/daemon/handlers/shared.ts +3 -17
- package/src/daemon/handlers/skills.ts +20 -1
- package/src/daemon/history-repair.ts +72 -8
- package/src/daemon/host-cu-proxy.ts +55 -26
- package/src/daemon/lifecycle.ts +39 -4
- package/src/daemon/mcp-reload-service.ts +2 -2
- package/src/daemon/message-types/computer-use.ts +1 -12
- package/src/daemon/message-types/memory.ts +4 -16
- package/src/daemon/message-types/messages.ts +1 -0
- package/src/daemon/message-types/sessions.ts +4 -42
- package/src/daemon/server.ts +6 -1
- package/src/daemon/session-agent-loop-handlers.ts +38 -0
- package/src/daemon/session-agent-loop.ts +334 -48
- package/src/daemon/session-error.ts +89 -6
- package/src/daemon/session-history.ts +17 -7
- package/src/daemon/session-media-retry.ts +6 -2
- package/src/daemon/session-memory.ts +69 -149
- package/src/daemon/session-process.ts +10 -1
- package/src/daemon/session-runtime-assembly.ts +49 -19
- package/src/daemon/session-slash.ts +3 -5
- package/src/daemon/session-surfaces.ts +4 -1
- package/src/daemon/session-tool-setup.ts +7 -1
- package/src/daemon/session.ts +12 -2
- package/src/email/providers/index.ts +2 -2
- package/src/instrument.ts +61 -1
- package/src/media/avatar-router.ts +1 -1
- package/src/memory/admin.ts +2 -191
- package/src/memory/canonical-guardian-store.ts +38 -2
- package/src/memory/conversation-crud.ts +0 -33
- package/src/memory/conversation-queries.ts +25 -83
- package/src/memory/db-init.ts +32 -0
- package/src/memory/embedding-backend.ts +84 -8
- package/src/memory/embedding-types.ts +9 -1
- package/src/memory/indexer.ts +7 -46
- package/src/memory/invite-store.ts +19 -0
- package/src/memory/items-extractor.ts +274 -76
- package/src/memory/job-handlers/backfill.ts +2 -127
- package/src/memory/job-handlers/cleanup.ts +2 -16
- package/src/memory/job-handlers/extraction.ts +2 -138
- package/src/memory/job-handlers/index-maintenance.ts +1 -6
- package/src/memory/job-handlers/summarization.ts +3 -148
- package/src/memory/job-utils.ts +21 -59
- package/src/memory/jobs-store.ts +1 -159
- package/src/memory/jobs-worker.ts +9 -52
- package/src/memory/migrations/104-core-indexes.ts +3 -3
- package/src/memory/migrations/149-oauth-tables.ts +2 -0
- package/src/memory/migrations/150-oauth-apps-client-secret-path.ts +98 -0
- package/src/memory/migrations/151-oauth-providers-ping-url.ts +11 -0
- package/src/memory/migrations/152-memory-item-supersession.ts +44 -0
- package/src/memory/migrations/153-drop-entity-tables.ts +15 -0
- package/src/memory/migrations/154-drop-fts.ts +20 -0
- package/src/memory/migrations/155-drop-conflicts.ts +7 -0
- package/src/memory/migrations/156-call-session-invite-metadata.ts +24 -0
- package/src/memory/migrations/157-invite-contact-id.ts +104 -0
- package/src/memory/migrations/index.ts +8 -0
- package/src/memory/migrations/registry.ts +6 -0
- package/src/memory/qdrant-client.ts +148 -51
- package/src/memory/raw-query.ts +1 -1
- package/src/memory/retriever.test.ts +294 -273
- package/src/memory/retriever.ts +421 -645
- package/src/memory/schema/calls.ts +2 -0
- package/src/memory/schema/contacts.ts +1 -0
- package/src/memory/schema/memory-core.ts +3 -48
- package/src/memory/schema/oauth.ts +2 -0
- package/src/memory/search/formatting.ts +263 -176
- package/src/memory/search/lexical.ts +1 -254
- package/src/memory/search/ranking.ts +0 -455
- package/src/memory/search/semantic.ts +100 -14
- package/src/memory/search/staleness.ts +47 -0
- package/src/memory/search/tier-classifier.ts +21 -0
- package/src/memory/search/types.ts +15 -77
- package/src/memory/task-memory-cleanup.ts +4 -6
- package/src/messaging/provider.ts +1 -1
- package/src/messaging/providers/gmail/adapter.ts +1 -1
- package/src/messaging/providers/gmail/mime-builder.ts +17 -7
- package/src/messaging/providers/telegram-bot/adapter.ts +17 -8
- package/src/messaging/providers/whatsapp/adapter.ts +13 -9
- package/src/messaging/registry.ts +9 -5
- package/src/oauth/byo-connection.test.ts +40 -25
- package/src/oauth/connect-orchestrator.ts +4 -10
- package/src/oauth/connection-resolver.ts +20 -6
- package/src/oauth/manual-token-connection.ts +5 -5
- package/src/oauth/oauth-store.ts +183 -31
- package/src/oauth/platform-connection.test.ts +1 -1
- package/src/oauth/provider-behaviors.ts +503 -4
- package/src/oauth/seed-providers.ts +214 -8
- package/src/oauth/token-persistence.ts +31 -16
- package/src/permissions/defaults.ts +1 -0
- package/src/permissions/trust-store.ts +23 -1
- package/src/playbooks/playbook-compiler.ts +1 -1
- package/src/prompts/system-prompt.ts +18 -2
- package/src/providers/anthropic/client.ts +56 -126
- package/src/providers/types.ts +7 -1
- package/src/runtime/AGENTS.md +9 -0
- package/src/runtime/auth/route-policy.ts +6 -3
- package/src/runtime/channel-readiness-service.ts +48 -40
- package/src/runtime/guardian-reply-router.ts +24 -22
- package/src/runtime/http-server.ts +2 -2
- package/src/runtime/http-types.ts +2 -0
- package/src/runtime/invite-redemption-service.ts +72 -12
- package/src/runtime/invite-service.ts +43 -0
- package/src/runtime/middleware/twilio-validation.ts +1 -1
- package/src/runtime/pending-interactions.ts +2 -2
- package/src/runtime/routes/brain-graph-routes.ts +10 -90
- package/src/runtime/routes/btw-routes.ts +10 -5
- package/src/runtime/routes/conversation-routes.ts +56 -11
- package/src/runtime/routes/inbound-stages/acl-enforcement.ts +21 -12
- package/src/runtime/routes/integrations/slack/channel.ts +2 -2
- package/src/runtime/routes/integrations/telegram.ts +2 -2
- package/src/runtime/routes/integrations/twilio.ts +17 -17
- package/src/runtime/routes/invite-routes.ts +29 -4
- package/src/runtime/routes/memory-item-routes.test.ts +754 -0
- package/src/runtime/routes/memory-item-routes.ts +503 -0
- package/src/runtime/routes/secret-routes.ts +17 -0
- package/src/runtime/routes/session-management-routes.ts +3 -3
- package/src/runtime/routes/settings-routes.ts +3 -3
- package/src/runtime/routes/trust-rules-routes.ts +14 -0
- package/src/runtime/routes/workspace-routes.ts +9 -4
- package/src/runtime/routes/workspace-utils.ts +8 -2
- package/src/schedule/integration-status.ts +26 -19
- package/src/security/keychain-broker-client.ts +17 -4
- package/src/security/oauth2.ts +6 -7
- package/src/security/secure-keys.ts +44 -19
- package/src/security/token-manager.ts +46 -39
- package/src/services/vercel-deploy.ts +0 -24
- package/src/signals/confirm.ts +78 -0
- package/src/signals/mcp-reload.ts +18 -0
- package/src/skills/catalog-install.ts +74 -18
- package/src/skills/skillssh-registry.ts +503 -0
- package/src/tools/assets/search.ts +5 -1
- package/src/tools/computer-use/definitions.ts +0 -10
- package/src/tools/computer-use/registry.ts +1 -1
- package/src/tools/credentials/vault.ts +22 -7
- package/src/tools/memory/definitions.ts +4 -13
- package/src/tools/memory/handlers.test.ts +83 -103
- package/src/tools/memory/handlers.ts +50 -85
- package/src/tools/network/script-proxy/session-manager.ts +8 -8
- package/src/tools/schedule/create.ts +10 -3
- package/src/tools/schedule/update.ts +8 -1
- package/src/tools/skills/load.ts +25 -2
- package/src/watcher/provider-types.ts +1 -1
- package/src/watcher/providers/github.ts +1 -1
- package/src/watcher/providers/gmail.ts +3 -3
- package/src/watcher/providers/google-calendar.ts +3 -3
- package/src/watcher/providers/linear.ts +1 -1
- package/src/__tests__/clarification-resolver.test.ts +0 -193
- package/src/__tests__/conflict-intent-tokenization.test.ts +0 -160
- package/src/__tests__/conflict-policy.test.ts +0 -269
- package/src/__tests__/conflict-store.test.ts +0 -372
- package/src/__tests__/contradiction-checker.test.ts +0 -361
- package/src/__tests__/entity-extractor.test.ts +0 -211
- package/src/__tests__/entity-search.test.ts +0 -1117
- package/src/__tests__/profile-compiler.test.ts +0 -392
- package/src/__tests__/session-conflict-gate.test.ts +0 -1228
- package/src/__tests__/session-profile-injection.test.ts +0 -557
- package/src/config/bundled-skills/knowledge-graph/SKILL.md +0 -25
- package/src/config/bundled-skills/knowledge-graph/TOOLS.json +0 -66
- package/src/config/bundled-skills/knowledge-graph/tools/graph-query.ts +0 -211
- package/src/daemon/session-conflict-gate.ts +0 -167
- package/src/daemon/session-dynamic-profile.ts +0 -77
- package/src/memory/clarification-resolver.ts +0 -417
- package/src/memory/conflict-intent.ts +0 -205
- package/src/memory/conflict-policy.ts +0 -127
- package/src/memory/conflict-store.ts +0 -410
- package/src/memory/contradiction-checker.ts +0 -508
- package/src/memory/entity-extractor.ts +0 -535
- package/src/memory/format-recall.ts +0 -47
- package/src/memory/fts-reconciler.ts +0 -165
- package/src/memory/job-handlers/conflict.ts +0 -200
- package/src/memory/profile-compiler.ts +0 -195
- package/src/memory/recall-cache.ts +0 -117
- package/src/memory/search/entity.ts +0 -535
- package/src/memory/search/query-expansion.test.ts +0 -70
- package/src/memory/search/query-expansion.ts +0 -118
- package/src/runtime/routes/mcp-routes.ts +0 -20
|
@@ -17,7 +17,7 @@ The oauth command group manages the full OAuth lifecycle:
|
|
|
17
17
|
|
|
18
18
|
providers Protocol-level configurations (auth URLs, scopes, endpoints)
|
|
19
19
|
apps Client credentials (client ID / secret pairs)
|
|
20
|
-
connections Active token grants per provider (list, get, token)
|
|
20
|
+
connections Active token grants per provider (list, get, token, disconnect)
|
|
21
21
|
|
|
22
22
|
Providers are seeded on startup for built-in integrations. Apps and connections
|
|
23
23
|
are created during the OAuth authorization flow or can be managed manually via
|
|
@@ -26,9 +26,9 @@ their respective subcommands.
|
|
|
26
26
|
Examples:
|
|
27
27
|
$ assistant oauth connections token integration:twitter
|
|
28
28
|
$ assistant oauth connections list
|
|
29
|
-
$ assistant oauth connections get --provider integration:
|
|
29
|
+
$ assistant oauth connections get --provider integration:google
|
|
30
30
|
$ assistant oauth providers list
|
|
31
|
-
$ assistant oauth providers get integration:
|
|
31
|
+
$ assistant oauth providers get integration:google
|
|
32
32
|
$ assistant oauth providers register --provider-key custom:myapi --auth-url https://example.com/auth --token-url https://example.com/token`,
|
|
33
33
|
);
|
|
34
34
|
|
|
@@ -39,7 +39,7 @@ authorization URL, token URL, default scopes, and other endpoint details.
|
|
|
39
39
|
They are seeded on startup for built-in integrations (e.g. Gmail, Twitter,
|
|
40
40
|
Slack) but can also be registered dynamically via the "register" subcommand.
|
|
41
41
|
|
|
42
|
-
Each provider is identified by a provider key (e.g. "integration:
|
|
42
|
+
Each provider is identified by a provider key (e.g. "integration:google").`,
|
|
43
43
|
);
|
|
44
44
|
|
|
45
45
|
// ---------------------------------------------------------------------------
|
|
@@ -115,7 +115,7 @@ Examples:
|
|
|
115
115
|
"after",
|
|
116
116
|
`
|
|
117
117
|
Arguments:
|
|
118
|
-
provider-key The full provider key (e.g. "integration:
|
|
118
|
+
provider-key The full provider key (e.g. "integration:google").
|
|
119
119
|
Must match the key used during registration or seeding.
|
|
120
120
|
|
|
121
121
|
Returns the full provider configuration including auth URL, token URL,
|
|
@@ -123,7 +123,7 @@ default scopes, scope policy, and extra parameters. Exits with code 1
|
|
|
123
123
|
if the provider key is not found.
|
|
124
124
|
|
|
125
125
|
Examples:
|
|
126
|
-
$ assistant oauth providers get integration:
|
|
126
|
+
$ assistant oauth providers get integration:google
|
|
127
127
|
$ assistant oauth providers get integration:twitter --json`,
|
|
128
128
|
)
|
|
129
129
|
.action((providerKey: string, _opts: unknown, cmd: Command) => {
|
|
@@ -171,6 +171,10 @@ Examples:
|
|
|
171
171
|
}
|
|
172
172
|
return port;
|
|
173
173
|
})
|
|
174
|
+
.option(
|
|
175
|
+
"--ping-url <url>",
|
|
176
|
+
"Health-check endpoint URL for token validation",
|
|
177
|
+
)
|
|
174
178
|
.addHelpText(
|
|
175
179
|
"after",
|
|
176
180
|
`
|
|
@@ -186,6 +190,9 @@ Arguments (via options):
|
|
|
186
190
|
(e.g. "client_secret_post", "client_secret_basic").
|
|
187
191
|
--callback-transport Transport method for the OAuth callback.
|
|
188
192
|
--loopback-port Port number for the local loopback callback server (1-65535).
|
|
193
|
+
--ping-url Optional URL for a lightweight health-check endpoint.
|
|
194
|
+
Used by "connections ping" to validate that a stored token
|
|
195
|
+
is still functional (e.g. "https://api.example.com/user").
|
|
189
196
|
|
|
190
197
|
Registers a new OAuth provider configuration in the local store. This is
|
|
191
198
|
used for custom integrations not covered by the built-in provider seeds.
|
|
@@ -200,7 +207,12 @@ Examples:
|
|
|
200
207
|
--provider-key integration:my-service \\
|
|
201
208
|
--auth-url https://my-service.com/auth \\
|
|
202
209
|
--token-url https://my-service.com/token \\
|
|
203
|
-
--scopes read,write --json
|
|
210
|
+
--scopes read,write --json
|
|
211
|
+
$ assistant oauth providers register \\
|
|
212
|
+
--provider-key integration:custom-api \\
|
|
213
|
+
--auth-url https://example.com/auth \\
|
|
214
|
+
--token-url https://example.com/token \\
|
|
215
|
+
--ping-url https://example.com/user`,
|
|
204
216
|
)
|
|
205
217
|
.action(
|
|
206
218
|
(
|
|
@@ -214,6 +226,7 @@ Examples:
|
|
|
214
226
|
tokenAuthMethod?: string;
|
|
215
227
|
callbackTransport?: string;
|
|
216
228
|
loopbackPort?: number;
|
|
229
|
+
pingUrl?: string;
|
|
217
230
|
},
|
|
218
231
|
cmd: Command,
|
|
219
232
|
) => {
|
|
@@ -229,6 +242,7 @@ Examples:
|
|
|
229
242
|
tokenEndpointAuthMethod: opts.tokenAuthMethod,
|
|
230
243
|
callbackTransport: opts.callbackTransport,
|
|
231
244
|
loopbackPort: opts.loopbackPort,
|
|
245
|
+
pingUrl: opts.pingUrl,
|
|
232
246
|
});
|
|
233
247
|
|
|
234
248
|
writeOutput(cmd, parseProviderRow(row));
|
|
@@ -12,7 +12,10 @@ import {
|
|
|
12
12
|
getMessages,
|
|
13
13
|
} from "../../memory/conversation-crud.js";
|
|
14
14
|
import { listConversations } from "../../memory/conversation-queries.js";
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
selectEmbeddingBackend,
|
|
17
|
+
SPARSE_EMBEDDING_VERSION,
|
|
18
|
+
} from "../../memory/embedding-backend.js";
|
|
16
19
|
import { initQdrantClient } from "../../memory/qdrant-client.js";
|
|
17
20
|
import { timeAgo } from "../../util/time.js";
|
|
18
21
|
import { initializeDb } from "../db.js";
|
|
@@ -226,7 +229,7 @@ Examples:
|
|
|
226
229
|
const qdrantUrl = getQdrantUrlEnv() || config.memory.qdrant.url;
|
|
227
230
|
const embeddingSelection = selectEmbeddingBackend(config);
|
|
228
231
|
const embeddingModel = embeddingSelection.backend
|
|
229
|
-
? `${embeddingSelection.backend.provider}:${embeddingSelection.backend.model}`
|
|
232
|
+
? `${embeddingSelection.backend.provider}:${embeddingSelection.backend.model}:sparse-v${SPARSE_EMBEDDING_VERSION}`
|
|
230
233
|
: undefined;
|
|
231
234
|
const qdrant = initQdrantClient({
|
|
232
235
|
url: qdrantUrl,
|
|
@@ -8,6 +8,14 @@ import {
|
|
|
8
8
|
readLocalCatalog,
|
|
9
9
|
uninstallSkillLocally,
|
|
10
10
|
} from "../../skills/catalog-install.js";
|
|
11
|
+
import type { AuditResponse } from "../../skills/skillssh-registry.js";
|
|
12
|
+
import {
|
|
13
|
+
fetchSkillAudits,
|
|
14
|
+
formatAuditBadges,
|
|
15
|
+
installExternalSkill,
|
|
16
|
+
resolveSkillSource,
|
|
17
|
+
searchSkillsRegistry,
|
|
18
|
+
} from "../../skills/skillssh-registry.js";
|
|
11
19
|
import { log } from "../logger.js";
|
|
12
20
|
|
|
13
21
|
// ---------------------------------------------------------------------------
|
|
@@ -28,9 +36,13 @@ capabilities with pre-built workflows and tools.
|
|
|
28
36
|
Examples:
|
|
29
37
|
$ assistant skills list
|
|
30
38
|
$ assistant skills list --json
|
|
39
|
+
$ assistant skills search react
|
|
40
|
+
$ assistant skills search react --limit 5 --json
|
|
31
41
|
$ assistant skills install weather
|
|
32
42
|
$ assistant skills install weather --overwrite
|
|
33
|
-
$ assistant skills uninstall weather
|
|
43
|
+
$ assistant skills uninstall weather
|
|
44
|
+
$ assistant skills add vercel-labs/skills@find-skills
|
|
45
|
+
$ assistant skills add vercel-labs/skills/find-skills --overwrite`,
|
|
34
46
|
);
|
|
35
47
|
|
|
36
48
|
skills
|
|
@@ -79,6 +91,102 @@ Examples:
|
|
|
79
91
|
}
|
|
80
92
|
});
|
|
81
93
|
|
|
94
|
+
skills
|
|
95
|
+
.command("search <query>")
|
|
96
|
+
.description("Search the skills.sh community registry")
|
|
97
|
+
.option("--limit <n>", "Maximum number of results", "10")
|
|
98
|
+
.option("--json", "Machine-readable JSON output")
|
|
99
|
+
.addHelpText(
|
|
100
|
+
"after",
|
|
101
|
+
`
|
|
102
|
+
Arguments:
|
|
103
|
+
query Free-text search term matched against skill names, descriptions,
|
|
104
|
+
and tags in the skills.sh registry.
|
|
105
|
+
|
|
106
|
+
Searches the skills.sh community registry and displays matching skills
|
|
107
|
+
with install counts and security audit badges (ATH, Socket, Snyk).
|
|
108
|
+
Audit fetch failures are non-fatal — results are still shown without
|
|
109
|
+
security data.
|
|
110
|
+
|
|
111
|
+
Examples:
|
|
112
|
+
$ assistant skills search react
|
|
113
|
+
$ assistant skills search "file management" --limit 3
|
|
114
|
+
$ assistant skills search deploy --json`,
|
|
115
|
+
)
|
|
116
|
+
.action(async (query: string, opts: { limit: string; json?: boolean }) => {
|
|
117
|
+
const json = opts.json ?? false;
|
|
118
|
+
const limit = parseInt(opts.limit, 10) || 10;
|
|
119
|
+
|
|
120
|
+
try {
|
|
121
|
+
const results = await searchSkillsRegistry(query, limit);
|
|
122
|
+
|
|
123
|
+
if (results.length === 0) {
|
|
124
|
+
if (json) {
|
|
125
|
+
console.log(JSON.stringify({ ok: true, results: [], audits: {} }));
|
|
126
|
+
} else {
|
|
127
|
+
log.info(`No skills found for "${query}".`);
|
|
128
|
+
}
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Group skill slugs by source for batch audit lookups
|
|
133
|
+
const sourceToSlugs = new Map<string, string[]>();
|
|
134
|
+
for (const r of results) {
|
|
135
|
+
const slugs = sourceToSlugs.get(r.source) ?? [];
|
|
136
|
+
slugs.push(r.skillId);
|
|
137
|
+
sourceToSlugs.set(r.source, slugs);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Fetch audits for each unique source, keyed by source/skillId
|
|
141
|
+
// to avoid collisions when different sources share the same slug.
|
|
142
|
+
const allAudits: AuditResponse = {};
|
|
143
|
+
for (const [source, slugs] of sourceToSlugs) {
|
|
144
|
+
try {
|
|
145
|
+
const audits = await fetchSkillAudits(source, slugs);
|
|
146
|
+
for (const [skillId, auditData] of Object.entries(audits)) {
|
|
147
|
+
allAudits[`${source}/${skillId}`] = auditData;
|
|
148
|
+
}
|
|
149
|
+
} catch {
|
|
150
|
+
// Audit fetch failures are non-fatal; display results without audits
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (json) {
|
|
155
|
+
console.log(
|
|
156
|
+
JSON.stringify({
|
|
157
|
+
ok: true,
|
|
158
|
+
results,
|
|
159
|
+
audits: allAudits,
|
|
160
|
+
}),
|
|
161
|
+
);
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
log.info(`Search results for "${query}" (${results.length}):\n`);
|
|
166
|
+
for (const r of results) {
|
|
167
|
+
log.info(` ${r.name}`);
|
|
168
|
+
log.info(` ID: ${r.skillId}`);
|
|
169
|
+
log.info(` Source: ${r.source}`);
|
|
170
|
+
log.info(` Installs: ${r.installs}`);
|
|
171
|
+
const auditData = allAudits[`${r.source}/${r.skillId}`];
|
|
172
|
+
if (auditData) {
|
|
173
|
+
log.info(` ${formatAuditBadges(auditData)}`);
|
|
174
|
+
} else {
|
|
175
|
+
log.info(" Security: no audit data");
|
|
176
|
+
}
|
|
177
|
+
log.info("");
|
|
178
|
+
}
|
|
179
|
+
} catch (err) {
|
|
180
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
181
|
+
if (json) {
|
|
182
|
+
console.log(JSON.stringify({ ok: false, error: msg }));
|
|
183
|
+
} else {
|
|
184
|
+
log.error(`Error: ${msg}`);
|
|
185
|
+
}
|
|
186
|
+
process.exitCode = 1;
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
|
|
82
190
|
skills
|
|
83
191
|
.command("install <skill-id>")
|
|
84
192
|
.description("Install a skill from the catalog")
|
|
@@ -157,4 +265,68 @@ Examples:
|
|
|
157
265
|
process.exitCode = 1;
|
|
158
266
|
}
|
|
159
267
|
});
|
|
268
|
+
|
|
269
|
+
skills
|
|
270
|
+
.command("add <source>")
|
|
271
|
+
.description(
|
|
272
|
+
"Install a community skill from the skills.sh registry (GitHub)",
|
|
273
|
+
)
|
|
274
|
+
.option("--overwrite", "Replace an already installed skill")
|
|
275
|
+
.option("--json", "Machine-readable JSON output")
|
|
276
|
+
.addHelpText(
|
|
277
|
+
"after",
|
|
278
|
+
`
|
|
279
|
+
Arguments:
|
|
280
|
+
source Skill source in one of these formats:
|
|
281
|
+
owner/repo@skill-name
|
|
282
|
+
owner/repo/skill-name
|
|
283
|
+
https://github.com/owner/repo/tree/<branch>/skills/skill-name
|
|
284
|
+
|
|
285
|
+
Notes:
|
|
286
|
+
Fetches the skill's SKILL.md and supporting files from the specified GitHub
|
|
287
|
+
repository and installs them into the workspace skills directory. A
|
|
288
|
+
version.json file is written with origin metadata for provenance tracking.
|
|
289
|
+
|
|
290
|
+
Examples:
|
|
291
|
+
$ assistant skills add vercel-labs/skills@find-skills
|
|
292
|
+
$ assistant skills add vercel-labs/skills/find-skills
|
|
293
|
+
$ assistant skills add vercel-labs/skills@find-skills --overwrite`,
|
|
294
|
+
)
|
|
295
|
+
.action(
|
|
296
|
+
async (source: string, opts: { overwrite?: boolean; json?: boolean }) => {
|
|
297
|
+
const json = opts.json ?? false;
|
|
298
|
+
|
|
299
|
+
try {
|
|
300
|
+
const { owner, repo, skillSlug, ref } = resolveSkillSource(source);
|
|
301
|
+
|
|
302
|
+
await installExternalSkill(
|
|
303
|
+
owner,
|
|
304
|
+
repo,
|
|
305
|
+
skillSlug,
|
|
306
|
+
opts.overwrite ?? false,
|
|
307
|
+
ref,
|
|
308
|
+
);
|
|
309
|
+
|
|
310
|
+
if (json) {
|
|
311
|
+
console.log(
|
|
312
|
+
JSON.stringify({
|
|
313
|
+
ok: true,
|
|
314
|
+
skillSlug,
|
|
315
|
+
source: `${owner}/${repo}`,
|
|
316
|
+
}),
|
|
317
|
+
);
|
|
318
|
+
} else {
|
|
319
|
+
log.info(`Installed skill "${skillSlug}" from ${owner}/${repo}.`);
|
|
320
|
+
}
|
|
321
|
+
} catch (err) {
|
|
322
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
323
|
+
if (json) {
|
|
324
|
+
console.log(JSON.stringify({ ok: false, error: msg }));
|
|
325
|
+
} else {
|
|
326
|
+
log.error(`Error: ${msg}`);
|
|
327
|
+
}
|
|
328
|
+
process.exitCode = 1;
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
);
|
|
160
332
|
}
|
package/src/cli/http-client.ts
CHANGED
|
@@ -64,23 +64,3 @@ export async function httpSend(
|
|
|
64
64
|
}
|
|
65
65
|
return fetch(url, { ...init, headers });
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
// ---------------------------------------------------------------------------
|
|
69
|
-
// Health check
|
|
70
|
-
// ---------------------------------------------------------------------------
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Perform an HTTP health check against the daemon's `/healthz` endpoint.
|
|
74
|
-
* Returns true if the daemon responds with HTTP 200, false otherwise.
|
|
75
|
-
*/
|
|
76
|
-
export async function httpHealthCheck(timeoutMs = 2000): Promise<boolean> {
|
|
77
|
-
try {
|
|
78
|
-
const url = `${getHttpBaseUrl()}/healthz`;
|
|
79
|
-
const response = await fetch(url, {
|
|
80
|
-
signal: AbortSignal.timeout(timeoutMs),
|
|
81
|
-
});
|
|
82
|
-
return response.ok;
|
|
83
|
-
} catch {
|
|
84
|
-
return false;
|
|
85
|
-
}
|
|
86
|
-
}
|
package/src/cli/main-screen.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
|
|
4
|
+
import { getGatewayInternalBaseUrl } from "../config/env.js";
|
|
4
5
|
import { getWorkspaceDir } from "../util/platform.js";
|
|
5
|
-
import { getHttpBaseUrl } from "./http-client.js";
|
|
6
6
|
|
|
7
7
|
const LEFT_PANEL_WIDTH = 36;
|
|
8
8
|
const RIGHT_LINE_COUNT = 11;
|
|
@@ -14,7 +14,7 @@ export interface MainScreenLayout {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export function renderMainScreen(): MainScreenLayout {
|
|
17
|
-
const httpUrl =
|
|
17
|
+
const httpUrl = getGatewayInternalBaseUrl();
|
|
18
18
|
const workspace = getWorkspaceDir();
|
|
19
19
|
const assistantId = workspace.split("/").pop() ?? "vellum";
|
|
20
20
|
|
package/src/cli/program.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
1
|
import { Command } from "commander";
|
|
4
2
|
|
|
5
3
|
import { registerHooksCommand } from "../hooks/cli.js";
|
|
4
|
+
import { APP_VERSION } from "../version.js";
|
|
6
5
|
import { registerAuditCommand } from "./commands/audit.js";
|
|
7
6
|
import { registerAutonomyCommand } from "./commands/autonomy.js";
|
|
8
7
|
import { registerBrowserRelayCommand } from "./commands/browser-relay.js";
|
|
@@ -25,13 +24,13 @@ import { registerSessionsCommand } from "./commands/sessions.js";
|
|
|
25
24
|
import { registerSkillsCommand } from "./commands/skills.js";
|
|
26
25
|
import { registerTrustCommand } from "./commands/trust.js";
|
|
27
26
|
|
|
28
|
-
const require = createRequire(import.meta.url);
|
|
29
|
-
const { version } = require("../../package.json") as { version: string };
|
|
30
|
-
|
|
31
27
|
export function buildCliProgram(): Command {
|
|
32
28
|
const program = new Command();
|
|
33
29
|
|
|
34
|
-
program
|
|
30
|
+
program
|
|
31
|
+
.name("assistant")
|
|
32
|
+
.description("Local AI assistant")
|
|
33
|
+
.version(APP_VERSION);
|
|
35
34
|
|
|
36
35
|
registerDefaultAction(program);
|
|
37
36
|
registerSessionsCommand(program);
|
package/src/cli.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
appendFileSync,
|
|
4
|
+
mkdirSync,
|
|
5
|
+
readFileSync,
|
|
6
|
+
writeFileSync,
|
|
7
|
+
} from "node:fs";
|
|
8
|
+
import { dirname, join } from "node:path";
|
|
4
9
|
import * as readline from "node:readline";
|
|
5
10
|
|
|
6
|
-
import {
|
|
11
|
+
import { httpSend } from "./cli/http-client.js";
|
|
7
12
|
import {
|
|
8
13
|
type MainScreenLayout,
|
|
9
14
|
renderMainScreen,
|
|
@@ -11,6 +16,7 @@ import {
|
|
|
11
16
|
updateStatusText,
|
|
12
17
|
} from "./cli/main-screen.jsx";
|
|
13
18
|
import { shouldAutoStartDaemon } from "./daemon/connection-policy.js";
|
|
19
|
+
import { isHttpHealthy } from "./daemon/daemon-control.js";
|
|
14
20
|
import { ensureDaemonRunning } from "./daemon/lifecycle.js";
|
|
15
21
|
import type {
|
|
16
22
|
ConfirmationRequest,
|
|
@@ -22,7 +28,7 @@ import {
|
|
|
22
28
|
formatSessionForExport,
|
|
23
29
|
} from "./util/clipboard.js";
|
|
24
30
|
import { formatDiff, formatNewFileDiff } from "./util/diff.js";
|
|
25
|
-
import { getHistoryPath } from "./util/platform.js";
|
|
31
|
+
import { getHistoryPath, getWorkspaceDir } from "./util/platform.js";
|
|
26
32
|
import { Spinner } from "./util/spinner.js";
|
|
27
33
|
import { timeAgo } from "./util/time.js";
|
|
28
34
|
import { truncate } from "./util/truncate.js";
|
|
@@ -219,16 +225,15 @@ export async function startCli(): Promise<void> {
|
|
|
219
225
|
rl.prompt();
|
|
220
226
|
}
|
|
221
227
|
|
|
222
|
-
/** Send a confirmation decision via
|
|
223
|
-
|
|
224
|
-
requestId: string,
|
|
225
|
-
decision: string,
|
|
226
|
-
): Promise<void> {
|
|
228
|
+
/** Send a confirmation decision via signal file (read by the daemon). */
|
|
229
|
+
function sendConfirmation(requestId: string, decision: string): void {
|
|
227
230
|
try {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
231
|
+
const signalsDir = join(getWorkspaceDir(), "signals");
|
|
232
|
+
mkdirSync(signalsDir, { recursive: true });
|
|
233
|
+
writeFileSync(
|
|
234
|
+
join(signalsDir, "confirm"),
|
|
235
|
+
JSON.stringify({ requestId, decision }),
|
|
236
|
+
);
|
|
232
237
|
} catch {
|
|
233
238
|
process.stdout.write("[Failed to send confirmation]\n");
|
|
234
239
|
}
|
|
@@ -637,7 +642,7 @@ export async function startCli(): Promise<void> {
|
|
|
637
642
|
case "memory_recalled":
|
|
638
643
|
spinner.stop();
|
|
639
644
|
process.stdout.write(
|
|
640
|
-
`\n\x1B[2m[Memory recalled: ${msg.injectedTokens} tokens |
|
|
645
|
+
`\n\x1B[2m[Memory recalled: ${msg.injectedTokens} tokens | t1 ${msg.tier1Count} t2 ${msg.tier2Count} | semantic ${msg.semanticHits} | recency ${msg.recencyHits} | merged ${msg.mergedCount} → selected ${msg.selectedCount}${msg.sparseVectorUsed ? " (sparse)" : ""} | hybrid ${msg.hybridSearchLatencyMs}ms | ${msg.provider}/${msg.model} | ${msg.latencyMs}ms]\x1B[0m\n`,
|
|
641
646
|
);
|
|
642
647
|
spinner.start("Thinking...");
|
|
643
648
|
break;
|
|
@@ -885,17 +890,10 @@ export async function startCli(): Promise<void> {
|
|
|
885
890
|
|
|
886
891
|
/** Connect the SSE event stream for the current conversation. */
|
|
887
892
|
async function connectSse(): Promise<void> {
|
|
888
|
-
const token = readHttpToken();
|
|
889
893
|
const controller = new AbortController();
|
|
890
894
|
sseAbortController = controller;
|
|
891
895
|
|
|
892
896
|
const url = `/v1/events?conversationKey=${encodeURIComponent(conversationKey)}`;
|
|
893
|
-
const headers: Record<string, string> = {
|
|
894
|
-
Accept: "text/event-stream",
|
|
895
|
-
};
|
|
896
|
-
if (token) {
|
|
897
|
-
headers["Authorization"] = `Bearer ${token}`;
|
|
898
|
-
}
|
|
899
897
|
|
|
900
898
|
try {
|
|
901
899
|
const response = await httpSend(url, {
|
|
@@ -1010,7 +1008,7 @@ export async function startCli(): Promise<void> {
|
|
|
1010
1008
|
try {
|
|
1011
1009
|
if (shouldAutoStartDaemon()) await ensureDaemonRunning();
|
|
1012
1010
|
// Verify the daemon is healthy before attempting SSE
|
|
1013
|
-
const healthy = await
|
|
1011
|
+
const healthy = await isHttpHealthy();
|
|
1014
1012
|
if (!healthy) throw new Error("Health check failed");
|
|
1015
1013
|
await connectSse();
|
|
1016
1014
|
reconnectDelay = RECONNECT_BASE_DELAY_MS;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Smoke test: verifies that the bundled feature-flag-registry.json exists
|
|
3
|
+
* in the assistant source tree and is a valid, non-empty registry.
|
|
4
|
+
*
|
|
5
|
+
* The bundled copy is created by `meta/feature-flags/sync-bundled-copies.ts`
|
|
6
|
+
* (run via postinstall or CI sync step). This test catches cases where the
|
|
7
|
+
* sync was skipped — e.g. Docker builds that forget to copy the registry.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
import { describe, expect, test } from "bun:test";
|
|
13
|
+
|
|
14
|
+
const BUNDLED_PATH = join(
|
|
15
|
+
import.meta.dirname ?? __dirname,
|
|
16
|
+
"..",
|
|
17
|
+
"feature-flag-registry.json",
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
describe("bundled feature-flag-registry.json", () => {
|
|
21
|
+
test("file exists", () => {
|
|
22
|
+
expect(
|
|
23
|
+
existsSync(BUNDLED_PATH),
|
|
24
|
+
`Expected bundled registry at ${BUNDLED_PATH}. Run: bun run meta/feature-flags/sync-bundled-copies.ts`,
|
|
25
|
+
).toBe(true);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test("file is non-empty and valid JSON", () => {
|
|
29
|
+
const stat = statSync(BUNDLED_PATH);
|
|
30
|
+
expect(stat.size).toBeGreaterThan(0);
|
|
31
|
+
|
|
32
|
+
const raw = readFileSync(BUNDLED_PATH, "utf-8");
|
|
33
|
+
const registry = JSON.parse(raw);
|
|
34
|
+
|
|
35
|
+
expect(registry.version).toBe(1);
|
|
36
|
+
expect(Array.isArray(registry.flags)).toBe(true);
|
|
37
|
+
expect(registry.flags.length).toBeGreaterThan(0);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
},
|
|
302
302
|
{
|
|
303
303
|
"name": "computer_use_respond",
|
|
304
|
-
"description": "Respond
|
|
304
|
+
"description": "Respond to the user with a text answer instead of performing computer actions. Use this when you can answer directly without interacting with the screen.",
|
|
305
305
|
"category": "computer-use",
|
|
306
306
|
"risk": "low",
|
|
307
307
|
"input_schema": {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { forwardComputerUseProxyTool } from "../../../../tools/computer-use/skill-proxy-bridge.js";
|
|
2
|
+
import type {
|
|
3
|
+
ToolContext,
|
|
4
|
+
ToolExecutionResult,
|
|
5
|
+
} from "../../../../tools/types.js";
|
|
6
|
+
|
|
7
|
+
export async function run(
|
|
8
|
+
input: Record<string, unknown>,
|
|
9
|
+
context: ToolContext,
|
|
10
|
+
): Promise<ToolExecutionResult> {
|
|
11
|
+
return forwardComputerUseProxyTool("computer_use_observe", input, context);
|
|
12
|
+
}
|