@vellumai/assistant 0.5.9 → 0.5.11
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/AGENTS.md +9 -1
- package/ARCHITECTURE.md +48 -48
- package/Dockerfile +2 -0
- package/README.md +1 -1
- package/docs/architecture/integrations.md +6 -13
- package/docs/architecture/memory.md +7 -12
- package/docs/architecture/security.md +5 -5
- package/docs/credential-execution-service.md +9 -9
- package/docs/skills.md +1 -1
- package/node_modules/@vellumai/credential-storage/src/index.ts +2 -2
- package/node_modules/@vellumai/credential-storage/src/static-credentials.ts +1 -1
- package/openapi.yaml +7130 -0
- package/package.json +2 -1
- package/scripts/generate-openapi.ts +562 -0
- package/src/__tests__/acp-session.test.ts +239 -44
- package/src/__tests__/assistant-feature-flag-guard.test.ts +8 -8
- package/src/__tests__/assistant-feature-flag-guardrails.test.ts +5 -86
- package/src/__tests__/assistant-feature-flags-integration.test.ts +7 -14
- package/src/__tests__/browser-skill-endstate.test.ts +1 -1
- package/src/__tests__/btw-routes.test.ts +8 -0
- package/src/__tests__/bundled-skill-retrieval-guard.test.ts +10 -10
- package/src/__tests__/channel-approvals.test.ts +7 -7
- package/src/__tests__/channel-readiness-service.test.ts +41 -0
- package/src/__tests__/config-schema.test.ts +10 -2
- package/src/__tests__/context-memory-e2e.test.ts +2 -6
- package/src/__tests__/conversation-skill-tools.test.ts +1 -3
- package/src/__tests__/conversation-title-service.test.ts +2 -15
- package/src/__tests__/credential-execution-feature-gates.test.ts +4 -8
- package/src/__tests__/credential-execution-managed-contract.test.ts +8 -8
- package/src/__tests__/credential-security-e2e.test.ts +4 -4
- package/src/__tests__/credential-security-invariants.test.ts +3 -3
- package/src/__tests__/credentials-cli.test.ts +3 -3
- package/src/__tests__/dynamic-skill-workflow-prompt.test.ts +1 -1
- package/src/__tests__/gateway-only-guard.test.ts +3 -0
- package/src/__tests__/heartbeat-service.test.ts +35 -0
- package/src/__tests__/host-shell-tool.test.ts +1 -1
- package/src/__tests__/inline-skill-load-permissions.test.ts +3 -3
- package/src/__tests__/llm-request-log-turn-query.test.ts +64 -0
- package/src/__tests__/log-export-workspace.test.ts +1 -1
- package/src/__tests__/mcp-client-auth.test.ts +1 -1
- package/src/__tests__/memory-lifecycle-e2e.test.ts +2 -2
- package/src/__tests__/memory-recall-log-store.test.ts +182 -0
- package/src/__tests__/memory-recall-quality.test.ts +6 -8
- package/src/__tests__/memory-regressions.test.ts +53 -42
- package/src/__tests__/memory-retrieval.benchmark.test.ts +5 -9
- package/src/__tests__/messaging-skill-split.test.ts +2 -17
- package/src/__tests__/oauth-cli.test.ts +98 -551
- package/src/__tests__/platform-callback-registration.test.ts +119 -0
- package/src/__tests__/secret-ingress-channel.test.ts +261 -0
- package/src/__tests__/secret-ingress-cli.test.ts +201 -0
- package/src/__tests__/secret-ingress-http.test.ts +312 -0
- package/src/__tests__/secret-ingress.test.ts +283 -0
- package/src/__tests__/secret-onetime-send.test.ts +4 -4
- package/src/__tests__/skill-feature-flags-integration.test.ts +4 -4
- package/src/__tests__/skill-feature-flags.test.ts +11 -19
- package/src/__tests__/skill-load-feature-flag.test.ts +1 -1
- package/src/__tests__/skill-load-inline-command.test.ts +3 -3
- package/src/__tests__/skill-load-inline-includes.test.ts +2 -2
- package/src/__tests__/skill-memory.test.ts +2 -4
- package/src/__tests__/skill-projection-feature-flag.test.ts +2 -4
- package/src/__tests__/skill-projection.benchmark.test.ts +1 -3
- package/src/__tests__/skills.test.ts +16 -2
- package/src/__tests__/slack-channel-config.test.ts +1 -1
- package/src/__tests__/slack-skill.test.ts +5 -69
- package/src/__tests__/vellum-self-knowledge-inline-command.test.ts +1 -1
- package/src/__tests__/workspace-migration-015-migrate-credentials-to-keychain.test.ts +5 -238
- package/src/__tests__/workspace-migration-016-migrate-credentials-from-keychain.test.ts +5 -206
- package/src/__tests__/workspace-migration-018-rekey-compound-credential-keys.test.ts +181 -0
- package/src/__tests__/workspace-migrations-runner.test.ts +15 -7
- package/src/acp/client-handler.ts +113 -31
- package/src/acp/session-manager.ts +29 -27
- package/src/approvals/guardian-request-resolvers.ts +1 -1
- package/src/cli/AGENTS.md +73 -0
- package/src/cli/commands/autonomy.ts +3 -5
- package/src/cli/commands/credential-execution.ts +1 -2
- package/src/cli/commands/credentials.ts +4 -4
- package/src/cli/commands/memory.ts +2 -3
- package/src/cli/commands/oauth/__tests__/connect.test.ts +785 -0
- package/src/cli/commands/oauth/__tests__/disconnect.test.ts +760 -0
- package/src/cli/commands/oauth/__tests__/mode.test.ts +672 -0
- package/src/cli/commands/oauth/__tests__/ping.test.ts +690 -0
- package/src/cli/commands/oauth/__tests__/status.test.ts +579 -0
- package/src/cli/commands/oauth/__tests__/token.test.ts +467 -0
- package/src/cli/commands/oauth/apps.ts +29 -11
- package/src/cli/commands/oauth/connect.ts +373 -0
- package/src/cli/commands/oauth/connections.ts +14 -493
- package/src/cli/commands/oauth/disconnect.ts +333 -0
- package/src/cli/commands/oauth/index.ts +62 -10
- package/src/cli/commands/oauth/mode.ts +263 -0
- package/src/cli/commands/oauth/ping.ts +222 -0
- package/src/cli/commands/oauth/providers.ts +30 -3
- package/src/cli/commands/oauth/request.ts +576 -0
- package/src/cli/commands/oauth/shared.ts +132 -0
- package/src/cli/commands/oauth/status.ts +202 -0
- package/src/cli/commands/oauth/token.ts +159 -0
- package/src/cli/commands/platform.ts +20 -14
- package/src/cli.ts +82 -17
- package/src/config/assistant-feature-flags.ts +74 -11
- package/src/config/bundled-skills/_shared/CLI_RETRIEVAL_PATTERN.md +1 -1
- package/src/config/bundled-skills/app-builder/tools/app-create.ts +1 -1
- package/src/config/bundled-skills/messaging/SKILL.md +13 -36
- package/src/config/bundled-skills/messaging/TOOLS.json +9 -9
- package/src/config/bundled-skills/messaging/tools/messaging-analyze-style.ts +1 -1
- package/src/config/bundled-skills/notifications/SKILL.md +1 -1
- package/src/config/bundled-skills/schedule/SKILL.md +2 -2
- package/src/config/bundled-skills/settings/SKILL.md +5 -3
- package/src/config/bundled-skills/settings/TOOLS.json +17 -0
- package/src/config/bundled-skills/settings/tools/avatar-get.ts +50 -0
- package/src/config/bundled-skills/settings/tools/avatar-remove.ts +7 -0
- package/src/config/bundled-skills/settings/tools/avatar-update.ts +6 -1
- package/src/config/bundled-skills/settings/tools/identity-avatar.ts +55 -0
- package/src/config/bundled-skills/skills-catalog/SKILL.md +3 -3
- package/src/config/bundled-skills/slack/SKILL.md +58 -44
- package/src/config/bundled-tool-registry.ts +2 -19
- package/src/config/env.ts +5 -1
- package/src/config/feature-flag-registry.json +57 -41
- package/src/config/loader.ts +4 -0
- package/src/config/schemas/platform.ts +0 -8
- package/src/config/schemas/security.ts +9 -1
- package/src/config/schemas/services.ts +1 -1
- package/src/config/skill-state.ts +1 -3
- package/src/config/skills.ts +2 -4
- package/src/credential-execution/feature-gates.ts +9 -16
- package/src/credential-execution/process-manager.ts +12 -0
- package/src/daemon/config-watcher.ts +4 -0
- package/src/daemon/conversation-agent-loop-handlers.ts +10 -0
- package/src/daemon/conversation-agent-loop.ts +49 -2
- package/src/daemon/conversation-memory.ts +0 -1
- package/src/daemon/handlers/config-slack-channel.ts +43 -1
- package/src/daemon/handlers/conversations.ts +41 -33
- package/src/daemon/lifecycle.ts +28 -5
- package/src/daemon/message-types/acp.ts +0 -15
- package/src/daemon/message-types/memory.ts +0 -1
- package/src/daemon/message-types/messages.ts +9 -1
- package/src/daemon/message-types/schedules.ts +9 -0
- package/src/daemon/server.ts +19 -7
- package/src/email/feature-gate.ts +3 -3
- package/src/heartbeat/heartbeat-service.ts +48 -0
- package/src/inbound/platform-callback-registration.ts +61 -7
- package/src/mcp/mcp-oauth-provider.ts +3 -3
- package/src/memory/app-store.ts +3 -3
- package/src/memory/conversation-crud.ts +124 -0
- package/src/memory/conversation-title-service.ts +7 -17
- package/src/memory/db-init.ts +8 -0
- package/src/memory/embedding-local.ts +47 -2
- package/src/memory/indexer.ts +13 -10
- package/src/memory/items-extractor.ts +12 -4
- package/src/memory/job-utils.ts +5 -0
- package/src/memory/jobs-store.ts +10 -2
- package/src/memory/journal-memory.ts +6 -2
- package/src/memory/llm-request-log-store.ts +88 -21
- package/src/memory/memory-recall-log-store.ts +128 -0
- package/src/memory/migrations/194-memory-recall-logs.ts +50 -0
- package/src/memory/migrations/195-oauth-providers-ping-config.ts +23 -0
- package/src/memory/migrations/index.ts +2 -0
- package/src/memory/migrations/validate-migration-state.ts +14 -1
- package/src/memory/retriever.test.ts +4 -5
- package/src/memory/schema/infrastructure.ts +31 -0
- package/src/memory/schema/oauth.ts +3 -0
- package/src/messaging/providers/telegram-bot/adapter.ts +1 -1
- package/src/oauth/connect-orchestrator.ts +54 -0
- package/src/oauth/manual-token-connection.ts +5 -5
- package/src/oauth/oauth-store.ts +26 -5
- package/src/oauth/seed-providers.ts +10 -1
- package/src/permissions/checker.ts +2 -2
- package/src/permissions/trust-client.ts +2 -2
- package/src/platform/client.ts +2 -2
- package/src/prompts/journal-context.ts +6 -1
- package/src/providers/anthropic/client.ts +143 -1
- package/src/runtime/auth/__tests__/middleware.test.ts +19 -0
- package/src/runtime/auth/route-policy.ts +0 -1
- package/src/runtime/btw-sidechain.ts +7 -1
- package/src/runtime/channel-approvals.ts +2 -2
- package/src/runtime/channel-readiness-service.ts +30 -7
- package/src/runtime/http-router.ts +31 -0
- package/src/runtime/http-server.ts +21 -4
- package/src/runtime/http-types.ts +2 -0
- package/src/runtime/pending-interactions.ts +21 -3
- package/src/runtime/routes/acp-routes.ts +46 -28
- package/src/runtime/routes/app-management-routes.ts +123 -0
- package/src/runtime/routes/app-routes.ts +31 -0
- package/src/runtime/routes/approval-routes.ts +108 -3
- package/src/runtime/routes/attachment-routes.ts +45 -0
- package/src/runtime/routes/avatar-routes.ts +16 -0
- package/src/runtime/routes/brain-graph-routes.ts +18 -0
- package/src/runtime/routes/btw-routes.ts +20 -0
- package/src/runtime/routes/call-routes.ts +81 -0
- package/src/runtime/routes/channel-readiness-routes.ts +48 -7
- package/src/runtime/routes/channel-routes.ts +18 -0
- package/src/runtime/routes/channel-verification-routes.ts +49 -1
- package/src/runtime/routes/contact-routes.ts +77 -0
- package/src/runtime/routes/conversation-attention-routes.ts +37 -0
- package/src/runtime/routes/conversation-management-routes.ts +94 -0
- package/src/runtime/routes/conversation-query-routes.ts +78 -0
- package/src/runtime/routes/conversation-routes.ts +115 -38
- package/src/runtime/routes/conversation-starter-routes.ts +29 -0
- package/src/runtime/routes/debug-routes.ts +23 -0
- package/src/runtime/routes/diagnostics-routes.ts +30 -0
- package/src/runtime/routes/documents-routes.ts +42 -0
- package/src/runtime/routes/events-routes.ts +10 -0
- package/src/runtime/routes/global-search-routes.ts +35 -0
- package/src/runtime/routes/guardian-action-routes.ts +47 -2
- package/src/runtime/routes/guardian-approval-prompt.ts +77 -2
- package/src/runtime/routes/heartbeat-routes.ts +278 -0
- package/src/runtime/routes/host-bash-routes.ts +16 -1
- package/src/runtime/routes/host-cu-routes.ts +23 -1
- package/src/runtime/routes/host-file-routes.ts +18 -1
- package/src/runtime/routes/identity-routes.ts +35 -0
- package/src/runtime/routes/inbound-message-handler.ts +46 -25
- package/src/runtime/routes/inbound-stages/secret-ingress-check.ts +30 -2
- package/src/runtime/routes/inbound-stages/transcribe-audio.ts +1 -2
- package/src/runtime/routes/integrations/twilio.ts +32 -22
- package/src/runtime/routes/invite-routes.ts +83 -0
- package/src/runtime/routes/log-export-routes.ts +14 -0
- package/src/runtime/routes/memory-item-routes.ts +99 -1
- package/src/runtime/routes/migration-rollback-routes.ts +25 -0
- package/src/runtime/routes/migration-routes.ts +40 -0
- package/src/runtime/routes/notification-routes.ts +20 -0
- package/src/runtime/routes/oauth-apps.ts +11 -3
- package/src/runtime/routes/pairing-routes.ts +15 -0
- package/src/runtime/routes/recording-routes.ts +72 -0
- package/src/runtime/routes/schedule-routes.ts +77 -5
- package/src/runtime/routes/secret-routes.ts +63 -1
- package/src/runtime/routes/settings-routes.ts +91 -1
- package/src/runtime/routes/skills-routes.ts +98 -16
- package/src/runtime/routes/subagents-routes.ts +38 -3
- package/src/runtime/routes/surface-action-routes.ts +66 -24
- package/src/runtime/routes/surface-content-routes.ts +20 -0
- package/src/runtime/routes/telemetry-routes.ts +12 -0
- package/src/runtime/routes/trace-event-routes.ts +25 -0
- package/src/runtime/routes/trust-rules-routes.ts +46 -0
- package/src/runtime/routes/tts-routes.ts +15 -4
- package/src/runtime/routes/upgrade-broadcast-routes.ts +38 -0
- package/src/runtime/routes/usage-routes.ts +59 -0
- package/src/runtime/routes/watch-routes.ts +28 -0
- package/src/runtime/routes/work-items-routes.ts +59 -0
- package/src/runtime/routes/workspace-commit-routes.ts +12 -0
- package/src/runtime/routes/workspace-routes.ts +102 -0
- package/src/schedule/scheduler.ts +7 -1
- package/src/security/AGENTS.md +7 -0
- package/src/security/credential-backend.ts +1 -1
- package/src/security/encrypted-store.ts +3 -3
- package/src/security/oauth2.ts +55 -0
- package/src/security/secret-ingress.ts +174 -0
- package/src/security/secret-patterns.ts +133 -0
- package/src/security/secret-scanner.ts +28 -117
- package/src/signals/confirm.ts +12 -8
- package/src/signals/user-message.ts +18 -3
- package/src/skills/skill-memory.ts +1 -2
- package/src/tasks/task-runner.ts +7 -1
- package/src/tools/credentials/broker.ts +1 -1
- package/src/tools/credentials/metadata-store.ts +1 -1
- package/src/tools/credentials/vault.ts +2 -3
- package/src/tools/memory/definitions.ts +1 -1
- package/src/tools/memory/handlers.test.ts +2 -4
- package/src/tools/skills/load.ts +1 -1
- package/src/tools/terminal/safe-env.ts +7 -0
- package/src/tools/tool-manifest.ts +1 -1
- package/src/util/log-redact.ts +9 -34
- package/src/workspace/migrations/015-migrate-credentials-to-keychain.ts +13 -148
- package/src/workspace/migrations/016-migrate-credentials-from-keychain.ts +7 -145
- package/src/workspace/migrations/AGENTS.md +11 -0
- package/src/workspace/migrations/runner.ts +16 -6
- package/src/workspace/migrations/types.ts +7 -0
- package/docs/architecture/keychain-broker.md +0 -69
- package/src/__tests__/keychain-broker-client.test.ts +0 -800
- package/src/cli/commands/oauth/platform.ts +0 -525
- package/src/config/bundled-skills/slack/TOOLS.json +0 -272
- package/src/config/bundled-skills/slack/tools/shared.ts +0 -34
- package/src/config/bundled-skills/slack/tools/slack-add-reaction.ts +0 -27
- package/src/config/bundled-skills/slack/tools/slack-channel-details.ts +0 -38
- package/src/config/bundled-skills/slack/tools/slack-channel-permissions.ts +0 -146
- package/src/config/bundled-skills/slack/tools/slack-configure-channels.ts +0 -105
- package/src/config/bundled-skills/slack/tools/slack-delete-message.ts +0 -26
- package/src/config/bundled-skills/slack/tools/slack-edit-message.ts +0 -27
- package/src/config/bundled-skills/slack/tools/slack-leave-channel.ts +0 -25
- package/src/config/bundled-skills/slack/tools/slack-scan-digest.ts +0 -372
- package/src/security/keychain-broker-client.ts +0 -446
package/AGENTS.md
CHANGED
|
@@ -2,4 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
For error handling conventions (throw vs result objects vs null), see [docs/error-handling.md](docs/error-handling.md).
|
|
4
4
|
|
|
5
|
-
Subdirectory-scoped rules live in local AGENTS.md files: `src/cli/`, `src/runtime/`, `src/approvals/`, `src/notifications/`.
|
|
5
|
+
Subdirectory-scoped rules live in local AGENTS.md files: `src/cli/`, `src/runtime/`, `src/approvals/`, `src/notifications/`, `src/workspace/migrations/`.
|
|
6
|
+
|
|
7
|
+
## Adding new environment variables
|
|
8
|
+
|
|
9
|
+
When you introduce a new env var that the assistant process needs to read at runtime, **update `src/tools/terminal/safe-env.ts`** as well.
|
|
10
|
+
|
|
11
|
+
`safe-env.ts` maintains the allowlist of env vars that are forwarded to agent-spawned child processes (bash tool, skill sandbox, etc.). Anything not on the list is stripped to prevent credential leakage. If your new var is needed by commands the agent runs, it must be added.
|
|
12
|
+
|
|
13
|
+
**Default to including it.** If the var doesn't contain secrets (e.g. a URL, a feature flag, a path, a mode string), add it. Only omit it if it carries credential material (tokens, passwords, private keys) — those must stay isolated to CES.
|
package/ARCHITECTURE.md
CHANGED
|
@@ -321,7 +321,7 @@ The WhatsApp channel enables inbound and outbound messaging via the Meta WhatsAp
|
|
|
321
321
|
- `WHATSAPP_APP_SECRET` — App secret for webhook signature verification
|
|
322
322
|
- `WHATSAPP_WEBHOOK_VERIFY_TOKEN` — Token for the Meta webhook subscription handshake
|
|
323
323
|
|
|
324
|
-
These can be set via environment variables or stored in the credential vault (
|
|
324
|
+
These can be set via environment variables or stored in the credential vault (CES / encrypted store) under the `whatsapp` service prefix.
|
|
325
325
|
|
|
326
326
|
**Limitations (v1)**: Rich approval UI (inline buttons) is not supported. Contacts and location message types are acknowledged but not forwarded.
|
|
327
327
|
|
|
@@ -343,7 +343,7 @@ All endpoints are JWT-authenticated via `Authorization: Bearer <jwt>`.
|
|
|
343
343
|
|
|
344
344
|
**Credential storage pattern:**
|
|
345
345
|
|
|
346
|
-
Both tokens are stored in the secure key store (
|
|
346
|
+
Both tokens are stored in the secure key store (CES credential store with encrypted file fallback):
|
|
347
347
|
|
|
348
348
|
| Secure key | Content |
|
|
349
349
|
| ------------------------------------ | -------------------------------------------------------------------------- |
|
|
@@ -617,7 +617,7 @@ Release-driven update notification system that surfaces release notes to the ass
|
|
|
617
617
|
|
|
618
618
|
The assistant feature-flag resolver (`src/config/assistant-feature-flags.ts`) is the canonical module for determining whether an assistant feature flag is enabled. It loads default values from the unified registry at `meta/feature-flags/feature-flag-registry.json` (bundled copy at `src/config/feature-flag-registry.json`) and resolves the effective state for each declared assistant-scope flag. Assistant feature flags are declaration-driven assistant-scoped booleans that can gate any assistant behavior; skill availability is one consumer.
|
|
619
619
|
|
|
620
|
-
**Canonical key format:**
|
|
620
|
+
**Canonical key format:** Simple kebab-case (e.g., `contacts`, `ces-tools`).
|
|
621
621
|
|
|
622
622
|
**Resolution priority** (highest wins):
|
|
623
623
|
|
|
@@ -645,7 +645,7 @@ The assistant feature-flag resolver (`src/config/assistant-feature-flags.ts`) is
|
|
|
645
645
|
|
|
646
646
|
All six enforcement points derive the flag key via `skillFlagKey(skill)` — which returns `undefined` for ungated skills, short-circuiting the check — and then call `isAssistantFeatureFlagEnabled(flagKey, config)` for consistency.
|
|
647
647
|
|
|
648
|
-
**Migration path:** The legacy `skills.<id>.enabled` key
|
|
648
|
+
**Migration path:** The legacy `skills.<id>.enabled` and `feature_flags.<id>.enabled` key formats are no longer supported. All code must use simple kebab-case keys (e.g., `contacts`, `ces-tools`). Guard tests enforce canonical key usage and declaration coverage for literal key references in the unified registry.
|
|
649
649
|
|
|
650
650
|
**Key source files:**
|
|
651
651
|
|
|
@@ -667,9 +667,9 @@ All six enforcement points derive the flag key via `skillFlagKey(skill)` — whi
|
|
|
667
667
|
|
|
668
668
|
```mermaid
|
|
669
669
|
graph LR
|
|
670
|
-
subgraph "
|
|
671
|
-
K1["API Key<br/>service: vellum-assistant<br/>account: anthropic<br/>stored via
|
|
672
|
-
K2["Credential Secrets<br/>key: credential/{service}/{field}<br/>stored via secure-keys.ts<br/>(encrypted file fallback
|
|
670
|
+
subgraph "Credential Store"
|
|
671
|
+
K1["API Key<br/>service: vellum-assistant<br/>account: anthropic<br/>stored via CES"]
|
|
672
|
+
K2["Credential Secrets<br/>key: credential/{service}/{field}<br/>stored via secure-keys.ts<br/>(encrypted file fallback)"]
|
|
673
673
|
end
|
|
674
674
|
|
|
675
675
|
subgraph "UserDefaults (plist)"
|
|
@@ -1142,7 +1142,7 @@ Skills can expose custom tools via a `TOOLS.json` manifest alongside their `SKIL
|
|
|
1142
1142
|
|
|
1143
1143
|
### Bundled Skill Retrieval Contract (CLI-First)
|
|
1144
1144
|
|
|
1145
|
-
Config/status retrieval instructions in bundled `SKILL.md` files are CLI-first. Retrieval should flow through canonical `vellum` CLI surfaces (`assistant config get` for generic settings, secure credential surfaces for secrets, and domain reads where available) instead of direct gateway curl snippets or
|
|
1145
|
+
Config/status retrieval instructions in bundled `SKILL.md` files are CLI-first. Retrieval should flow through canonical `vellum` CLI surfaces (`assistant config get` for generic settings, secure credential surfaces for secrets, and domain reads where available) instead of direct gateway curl snippets or credential store lookups.
|
|
1146
1146
|
|
|
1147
1147
|
```mermaid
|
|
1148
1148
|
graph LR
|
|
@@ -1156,7 +1156,7 @@ Rules enforced by guard tests:
|
|
|
1156
1156
|
|
|
1157
1157
|
- Retrieval reads use `bash` + canonical CLI surfaces (`assistant config get` and domain read commands where available).
|
|
1158
1158
|
- Direct gateway `curl` + manual bearer headers are for control-plane writes/actions, not retrieval reads.
|
|
1159
|
-
- Bundled skill docs must not instruct direct
|
|
1159
|
+
- Bundled skill docs must not instruct direct credential store lookups (`security find-generic-password`, `secret-tool`) for retrieval.
|
|
1160
1160
|
- `host_bash` is not used for Vellum CLI retrieval commands unless intentionally allowlisted.
|
|
1161
1161
|
- Outbound credentialed API calls use CES tools (`make_authenticated_request`, `run_authenticated_command`) so credential materialization happens in a separate process. Command output (stdout/stderr) is forwarded back to the assistant and may contain credential values if the command echoes them, so the isolation covers injection, not output. `host_bash` is available as a user-approved escape hatch but is outside the strong secrecy guarantee.
|
|
1162
1162
|
|
|
@@ -1264,7 +1264,7 @@ graph TB
|
|
|
1264
1264
|
|
|
1265
1265
|
Skills can embed dynamic shell output in their SKILL.md body using `!`command``tokens. When`skill_load` processes a skill containing these tokens, the commands are executed at load time through a sandboxed runner and their output is substituted inline. This enables externally authored skills to include project-specific context (e.g., directory listings, config values) without requiring manual edits.
|
|
1266
1266
|
|
|
1267
|
-
**Feature flag:** `
|
|
1267
|
+
**Feature flag:** `inline-skill-commands` (default: enabled). When disabled, loading a skill that contains `!`command`` tokens fails closed with an error rather than leaving raw tokens in the prompt.
|
|
1268
1268
|
|
|
1269
1269
|
#### Syntax and Parsing
|
|
1270
1270
|
|
|
@@ -1935,44 +1935,44 @@ Connected channels are resolved at signal emission time: vellum is always includ
|
|
|
1935
1935
|
|
|
1936
1936
|
## Storage Summary
|
|
1937
1937
|
|
|
1938
|
-
| What | Where
|
|
1939
|
-
| ---------------------------------------- |
|
|
1940
|
-
| API key |
|
|
1941
|
-
| Credential secrets |
|
|
1942
|
-
| Credential metadata | `~/.vellum/workspace/data/credentials/metadata.json`
|
|
1943
|
-
| Integration OAuth tokens |
|
|
1944
|
-
| User preferences | UserDefaults
|
|
1945
|
-
| Session logs | `~/Library/.../logs/session-*.json`
|
|
1946
|
-
| Conversations & messages | `~/.vellum/workspace/data/db/assistant.db`
|
|
1947
|
-
| Memory segments | `~/.vellum/workspace/data/db/assistant.db`
|
|
1948
|
-
| Extracted facts | `~/.vellum/workspace/data/db/assistant.db`
|
|
1949
|
-
| Embeddings | `~/.vellum/workspace/data/db/assistant.db`
|
|
1950
|
-
| Async job queue | `~/.vellum/workspace/data/db/assistant.db`
|
|
1951
|
-
| Attachments | `~/.vellum/workspace/data/db/assistant.db`
|
|
1952
|
-
| Sandbox filesystem | `~/.vellum/workspace`
|
|
1953
|
-
| Tool permission rules | `~/.vellum/protected/trust.json`
|
|
1954
|
-
| Web users & assistants | PostgreSQL
|
|
1955
|
-
| Trace events | In-memory (TraceStore)
|
|
1956
|
-
| Media embed settings | `~/.vellum/workspace/config.json` (`ui.mediaEmbeds`)
|
|
1957
|
-
| Media embed MIME cache | In-memory (`ImageMIMEProbe`)
|
|
1958
|
-
| Tasks & task runs | `~/.vellum/workspace/data/db/assistant.db`
|
|
1959
|
-
| Work items (Task Queue) | `~/.vellum/workspace/data/db/assistant.db`
|
|
1960
|
-
| Recurrence schedules & runs | `~/.vellum/workspace/data/db/assistant.db`
|
|
1961
|
-
| Watchers & events | `~/.vellum/workspace/data/db/assistant.db`
|
|
1962
|
-
| Proxy CA cert + key | `{dataDir}/proxy-ca/`
|
|
1963
|
-
| Proxy leaf certs | `{dataDir}/proxy-ca/issued/`
|
|
1964
|
-
| Proxy sessions | In-memory (SessionManager)
|
|
1965
|
-
| Call sessions, events, pending questions | `~/.vellum/workspace/data/db/assistant.db`
|
|
1966
|
-
| Active call controllers | In-memory (CallState)
|
|
1967
|
-
| Guardian bindings | `~/.vellum/workspace/data/db/assistant.db`
|
|
1968
|
-
| Channel verification sessions | `~/.vellum/workspace/data/db/assistant.db`
|
|
1969
|
-
| Guardian approval requests | `~/.vellum/workspace/data/db/assistant.db`
|
|
1970
|
-
| Contact invites | `~/.vellum/workspace/data/db/assistant.db`
|
|
1971
|
-
| Contacts & channels | `~/.vellum/workspace/data/db/assistant.db`
|
|
1972
|
-
| Notification events | `~/.vellum/workspace/data/db/assistant.db`
|
|
1973
|
-
| Notification decisions | `~/.vellum/workspace/data/db/assistant.db`
|
|
1974
|
-
| Notification deliveries | `~/.vellum/workspace/data/db/assistant.db`
|
|
1975
|
-
| Notification preferences | `~/.vellum/workspace/data/db/assistant.db`
|
|
1938
|
+
| What | Where | Format | ORM/Driver | Retention |
|
|
1939
|
+
| ---------------------------------------- | ---------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------- |
|
|
1940
|
+
| API key | CES / encrypted file store | Encrypted binary | CES API / `secure-keys.ts` | Permanent |
|
|
1941
|
+
| Credential secrets | CES / encrypted file store | Encrypted binary | `secure-keys.ts` wrapper | Permanent (until deleted via tool) |
|
|
1942
|
+
| Credential metadata | `~/.vellum/workspace/data/credentials/metadata.json` | JSON | Atomic file write | Permanent (until deleted via tool) |
|
|
1943
|
+
| Integration OAuth tokens | CES / encrypted file store (via `secure-keys.ts`) | Encrypted binary | `TokenManager` auto-refresh | Until disconnected or revoked |
|
|
1944
|
+
| User preferences | UserDefaults | plist | Foundation | Permanent |
|
|
1945
|
+
| Session logs | `~/Library/.../logs/session-*.json` | JSON per session | Swift Codable | Unbounded |
|
|
1946
|
+
| Conversations & messages | `~/.vellum/workspace/data/db/assistant.db` | SQLite + WAL | Drizzle ORM (Bun) | Permanent |
|
|
1947
|
+
| Memory segments | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent |
|
|
1948
|
+
| Extracted facts | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, deduped |
|
|
1949
|
+
| Embeddings | `~/.vellum/workspace/data/db/assistant.db` | JSON float arrays | Drizzle ORM | Permanent |
|
|
1950
|
+
| Async job queue | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Completed jobs persist |
|
|
1951
|
+
| Attachments | `~/.vellum/workspace/data/db/assistant.db` | Base64 in SQLite | Drizzle ORM | Permanent |
|
|
1952
|
+
| Sandbox filesystem | `~/.vellum/workspace` | Real filesystem tree | Node FS APIs | Persistent across sessions |
|
|
1953
|
+
| Tool permission rules | `~/.vellum/protected/trust.json` | JSON | File I/O | Permanent |
|
|
1954
|
+
| Web users & assistants | PostgreSQL | Relational | Drizzle ORM (pg) | Permanent |
|
|
1955
|
+
| Trace events | In-memory (TraceStore) | Structured events | Swift ObservableObject | Max 5,000 per session, ephemeral |
|
|
1956
|
+
| Media embed settings | `~/.vellum/workspace/config.json` (`ui.mediaEmbeds`) | JSON | `WorkspaceConfigIO` (atomic merge) | Permanent |
|
|
1957
|
+
| Media embed MIME cache | In-memory (`ImageMIMEProbe`) | `NSCache` (500 entries) | HTTP HEAD | Ephemeral; cleared on app restart |
|
|
1958
|
+
| Tasks & task runs | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent |
|
|
1959
|
+
| Work items (Task Queue) | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; archived items retained |
|
|
1960
|
+
| Recurrence schedules & runs | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; supports cron and RRULE syntax |
|
|
1961
|
+
| Watchers & events | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, cascade on watcher delete |
|
|
1962
|
+
| Proxy CA cert + key | `{dataDir}/proxy-ca/` | PEM files (ca.pem, ca-key.pem) | openssl CLI | Permanent (10-year validity) |
|
|
1963
|
+
| Proxy leaf certs | `{dataDir}/proxy-ca/issued/` | PEM files per hostname | openssl CLI, cached | 1-year validity, re-issued on CA change |
|
|
1964
|
+
| Proxy sessions | In-memory (SessionManager) | Map<ProxySessionId, ManagedSession> | Manual lifecycle | Ephemeral; 5min idle timeout, cleared on shutdown |
|
|
1965
|
+
| Call sessions, events, pending questions | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, cascade on session delete |
|
|
1966
|
+
| Active call controllers | In-memory (CallState) | Map<callSessionId, CallController> | Manual lifecycle | Ephemeral; cleared on call end or destroy |
|
|
1967
|
+
| Guardian bindings | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; revoked bindings retained |
|
|
1968
|
+
| Channel verification sessions | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; consumed/expired sessions retained |
|
|
1969
|
+
| Guardian approval requests | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; decision outcome retained |
|
|
1970
|
+
| Contact invites | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; token hash stored, raw token never persisted |
|
|
1971
|
+
| Contacts & channels | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; revoked/blocked contacts retained |
|
|
1972
|
+
| Notification events | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; deduplicated by dedupeKey |
|
|
1973
|
+
| Notification decisions | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; FK to notification_events |
|
|
1974
|
+
| Notification deliveries | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; FK to notification_decisions |
|
|
1975
|
+
| Notification preferences | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; per-assistant conversational preferences |
|
|
1976
1976
|
|
|
1977
1977
|
### Sensitive Tool Output Placeholder Substitution
|
|
1978
1978
|
|
package/Dockerfile
CHANGED
package/README.md
CHANGED
|
@@ -204,7 +204,7 @@ The runtime exposes a RESTful HTTP API for Twilio configuration, credential mana
|
|
|
204
204
|
| Method | Path | Description |
|
|
205
205
|
| ------ | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
206
206
|
| GET | `/v1/integrations/twilio/config` | Returns current state: `hasCredentials` (boolean) and `phoneNumber` (if assigned) |
|
|
207
|
-
| POST | `/v1/integrations/twilio/credentials` | Validates and stores Account SID and Auth Token in secure storage (
|
|
207
|
+
| POST | `/v1/integrations/twilio/credentials` | Validates and stores Account SID and Auth Token in secure storage (CES / encrypted file store) |
|
|
208
208
|
| DELETE | `/v1/integrations/twilio/credentials` | Removes stored credentials. Preserves the phone number in config so re-entering credentials resumes working without reassigning the number. |
|
|
209
209
|
| GET | `/v1/integrations/twilio/numbers` | Lists all incoming phone numbers on the Twilio account with their capabilities |
|
|
210
210
|
| POST | `/v1/integrations/twilio/numbers/provision` | Purchases a new phone number. Accepts optional `areaCode` and `country`. Auto-assigns and configures webhooks when ingress is available. |
|
|
@@ -50,14 +50,7 @@ graph TB
|
|
|
50
50
|
|
|
51
51
|
subgraph "Slack Skill (bundled-skills/slack/)"
|
|
52
52
|
SLACK_SKILL_MD["SKILL.md<br/>agent instructions"]
|
|
53
|
-
|
|
54
|
-
SLACK_DETAILS["slack_channel_details"]
|
|
55
|
-
SLACK_CONFIGURE["slack_configure_channels"]
|
|
56
|
-
SLACK_REACT["slack_add_reaction"]
|
|
57
|
-
SLACK_DELETE["slack_delete_message"]
|
|
58
|
-
SLACK_EDIT["slack_edit_message"]
|
|
59
|
-
SLACK_LEAVE["slack_leave_channel"]
|
|
60
|
-
SLACK_PERMS["slack_channel_permissions"]
|
|
53
|
+
SLACK_WEB_API["Web API via bash<br/>(network_mode: proxied)"]
|
|
61
54
|
end
|
|
62
55
|
|
|
63
56
|
subgraph "Sequences Skill (bundled-skills/sequences/)"
|
|
@@ -107,7 +100,7 @@ graph TB
|
|
|
107
100
|
SEND --> SHARED
|
|
108
101
|
STYLE --> STYLE_ANALYZER
|
|
109
102
|
GMAIL_ARCHIVE --> GMAIL_ADAPTER
|
|
110
|
-
|
|
103
|
+
SLACK_WEB_API --> SLACK_API
|
|
111
104
|
```
|
|
112
105
|
|
|
113
106
|
### Data Flow
|
|
@@ -122,7 +115,7 @@ sequenceDiagram
|
|
|
122
115
|
participant Browser as System Browser
|
|
123
116
|
participant Google as Google OAuth Server
|
|
124
117
|
participant Store as SQLite OAuth Store
|
|
125
|
-
participant Vault as
|
|
118
|
+
participant Vault as Credential Store
|
|
126
119
|
participant TokenMgr as TokenManager
|
|
127
120
|
participant Tool as Gmail Tool Executor
|
|
128
121
|
participant API as Gmail REST API
|
|
@@ -173,7 +166,7 @@ sequenceDiagram
|
|
|
173
166
|
|
|
174
167
|
| Decision | Rationale |
|
|
175
168
|
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
176
|
-
| PKCE by default, optional client_secret | Desktop apps prefer PKCE; some providers (Slack) require a secret, which is stored in the
|
|
169
|
+
| PKCE by default, optional client_secret | Desktop apps prefer PKCE; some providers (Slack) require a secret, which is stored in the credential store (`oauth_app/{id}/client_secret`) for autonomous refresh |
|
|
177
170
|
| Shared connect orchestrator | All OAuth providers route through `orchestrateOAuthConnect()`, which resolves profiles, enforces scope policy, runs the flow, stores tokens, and verifies identity. Adding a provider is a declarative profile entry, not new orchestration code |
|
|
178
171
|
| Canonical credential naming | All reads and writes use `client_id`/`client_secret` as canonical field names |
|
|
179
172
|
| Gateway callback transport | OAuth callbacks are now routed through the gateway at `${ingress.publicBaseUrl}/webhooks/oauth/callback` instead of a loopback redirect URI. This enables OAuth flows to work in remote and tunneled deployments. |
|
|
@@ -261,7 +254,7 @@ Result is a discriminated union: `{ success, deferred, grantedScopes, accountInf
|
|
|
261
254
|
|
|
262
255
|
`assistant/src/daemon/handlers/oauth-connect.ts` handles `oauth_connect_start` messages. The handler:
|
|
263
256
|
|
|
264
|
-
1. Resolves client credentials from the
|
|
257
|
+
1. Resolves client credentials from the credential store using canonical names (`client_id`, `client_secret`).
|
|
265
258
|
2. Validates that required credentials exist (including `client_secret` when the provider requires it).
|
|
266
259
|
3. Delegates to `orchestrateOAuthConnect()`.
|
|
267
260
|
4. Sends `oauth_connect_result` back to the client.
|
|
@@ -286,7 +279,7 @@ This replaces provider-specific handlers — any provider in the registry can be
|
|
|
286
279
|
| `assistant/src/oauth/scope-policy.ts` | Scope resolution and policy enforcement (pure, no I/O) |
|
|
287
280
|
| `assistant/src/oauth/connect-orchestrator.ts` | Shared connect orchestrator (profile → scopes → flow → tokens) |
|
|
288
281
|
| `assistant/src/oauth/connect-types.ts` | Shared types (`OAuthProviderBehavior`, `OAuthScopePolicy`, `OAuthConnectResult`) |
|
|
289
|
-
| `assistant/src/oauth/token-persistence.ts` | Token storage:
|
|
282
|
+
| `assistant/src/oauth/token-persistence.ts` | Token storage: credential store writes, metadata upsert, post-connect hooks |
|
|
290
283
|
| `assistant/src/daemon/handlers/oauth-connect.ts` | Generic `oauth_connect_start` / `oauth_connect_result` handler |
|
|
291
284
|
|
|
292
285
|
---
|
|
@@ -154,7 +154,6 @@ graph TB
|
|
|
154
154
|
BUDGET["Dynamic Recall Budget<br/>computeRecallBudget()<br/>from prompt headroom"]
|
|
155
155
|
EMBED_Q["Generate dense + sparse<br/>query embeddings"]
|
|
156
156
|
HYBRID["Hybrid Search<br/>dense + sparse RRF on Qdrant"]
|
|
157
|
-
RECENCY["Recency Search<br/>conversation-scoped, DB only"]
|
|
158
157
|
MERGE["Merge + Deduplicate<br/>weighted score combination"]
|
|
159
158
|
SCOPE["Scope Filter<br/>scope_id filtering<br/>(strict | global_fallback)<br/>Private conversations: own scope + 'default'"]
|
|
160
159
|
TIER["Tier Classification<br/>score > 0.8 → tier 1<br/>score > 0.6 → tier 2<br/>below → dropped"]
|
|
@@ -218,9 +217,7 @@ graph TB
|
|
|
218
217
|
EMBED_Q --> SPARSE_GEN
|
|
219
218
|
EMBED_Q --> HYBRID
|
|
220
219
|
HYBRID --> RRF
|
|
221
|
-
QUERY --> RECENCY
|
|
222
220
|
HYBRID --> SCOPE
|
|
223
|
-
RECENCY --> SCOPE
|
|
224
221
|
SCOPE --> MERGE
|
|
225
222
|
MERGE --> TIER
|
|
226
223
|
TIER --> STALE
|
|
@@ -337,24 +334,22 @@ The recall pipeline runs on every turn that passes the `needsMemory` gate (skips
|
|
|
337
334
|
|
|
338
335
|
3. **Hybrid search on Qdrant**: When both dense and sparse vectors are available, the pipeline uses Qdrant's query API with two prefetch stages (dense and sparse, each fetching up to 40 candidates) fused via Reciprocal Rank Fusion (RRF). Falls back to dense-only search when sparse vectors are unavailable.
|
|
339
336
|
|
|
340
|
-
4. **
|
|
337
|
+
4. **Merge and deduplicate**: Hybrid candidates are deduplicated by key. A weighted final score is computed: `0.4 + importance * 0.25 + confidence * 0.15 + recency * 0.2`, where `recency` is a logarithmic time-decay score (ACT-R inspired) based on when the item was last seen.
|
|
341
338
|
|
|
342
|
-
5. **
|
|
343
|
-
|
|
344
|
-
6. **Tier classification** (`tier-classifier.ts`): Score-based, deterministic classification:
|
|
339
|
+
5. **Tier classification** (`tier-classifier.ts`): Score-based, deterministic classification:
|
|
345
340
|
- `finalScore > 0.8` → **tier 1** (high relevance)
|
|
346
341
|
- `finalScore > 0.6` → **tier 2** (possibly relevant)
|
|
347
342
|
- Below 0.6 → dropped
|
|
348
343
|
|
|
349
|
-
|
|
344
|
+
6. **Staleness computation** (`staleness.ts`): Each item candidate is annotated with a staleness level based on its age relative to a kind-specific base lifetime (see table above). The effective lifetime is extended by a reinforcement factor: `baseLifetime * (1 + 0.3 * (sourceConversationCount - 1))`, so items mentioned across multiple conversations age more slowly. Staleness levels:
|
|
350
345
|
- `ratio < 0.5` → `fresh`
|
|
351
346
|
- `ratio <= 1.0` → `aging`
|
|
352
347
|
- `ratio <= 2.0` → `stale`
|
|
353
348
|
- `ratio > 2.0` → `very_stale`
|
|
354
349
|
|
|
355
|
-
|
|
350
|
+
7. **Stale demotion**: `very_stale` tier 1 candidates are demoted to tier 2, preventing old information from occupying prime injection space.
|
|
356
351
|
|
|
357
|
-
|
|
352
|
+
8. **Two-layer XML injection** (`formatting.ts`): Budget-aware rendering into four XML sections:
|
|
358
353
|
|
|
359
354
|
```xml
|
|
360
355
|
<memory_context __injected>
|
|
@@ -380,7 +375,7 @@ The recall pipeline runs on every turn that passes the `needsMemory` gate (skips
|
|
|
380
375
|
|
|
381
376
|
Empty sections are omitted. Each section has a per-item token budget (150 tokens for tier 1, 100 for tier 2). Tier 1 sections consume budget first; tier 2 uses the remainder.
|
|
382
377
|
|
|
383
|
-
|
|
378
|
+
9. **Injection strategy**: The rendered `<memory_context __injected>` block is prepended as a text content block to the last user message (`injectMemoryRecallAsUserBlock`), following the same pattern as workspace, temporal, and other runtime injections. Stripping is handled by the generic `stripUserTextBlocksByPrefix` mechanism matching the `<memory_context __injected>` prefix (with a backward-compat entry for the legacy `<memory_context>` prefix from older history). This avoids synthetic message pairs and preserves prompt prefix caching between turns.
|
|
384
379
|
|
|
385
380
|
### Internal-Only Trust Gating
|
|
386
381
|
|
|
@@ -412,7 +407,7 @@ When the embedding backend or Qdrant is unavailable:
|
|
|
412
407
|
|
|
413
408
|
- A **circuit breaker** on Qdrant (`qdrant-circuit-breaker.ts`) tracks consecutive failures and short-circuits search calls when the breaker is open.
|
|
414
409
|
- If embedding generation fails and `memory.embeddings.required` is `true`, recall returns an empty result with a degradation status (`embedding_generation_failed` or `embedding_provider_down`).
|
|
415
|
-
- If embeddings are optional (default), the pipeline
|
|
410
|
+
- If embeddings are optional (default), the pipeline returns empty results (no fallback search path exists without Qdrant).
|
|
416
411
|
- Degradation status is reported to clients via `memory_status` events.
|
|
417
412
|
|
|
418
413
|
---
|
|
@@ -222,7 +222,7 @@ sequenceDiagram
|
|
|
222
222
|
participant Prompter as SecretPrompter
|
|
223
223
|
participant HTTP as HTTP Transport
|
|
224
224
|
participant UI as SecretPromptManager (Swift)
|
|
225
|
-
participant
|
|
225
|
+
participant Store as Credential Store (CES / encrypted file)
|
|
226
226
|
|
|
227
227
|
Model->>Vault: action: "prompt", service, field, label
|
|
228
228
|
Vault->>Prompter: requestSecret(service, field, label, ...)
|
|
@@ -233,7 +233,7 @@ sequenceDiagram
|
|
|
233
233
|
UI->>HTTP: secret_response {requestId, value, delivery: "store"}
|
|
234
234
|
HTTP->>Prompter: resolve(value, "store")
|
|
235
235
|
Prompter->>Vault: {value, delivery: "store"}
|
|
236
|
-
Vault->>
|
|
236
|
+
Vault->>Store: setSecureKeyAsync("credential/svc/field", value)
|
|
237
237
|
Vault->>Model: "Credential stored securely" (no value in output)
|
|
238
238
|
else One-Time Send (if enabled)
|
|
239
239
|
UI->>HTTP: secret_response {requestId, value, delivery: "transient_send"}
|
|
@@ -265,7 +265,7 @@ graph TB
|
|
|
265
265
|
The `allowOneTimeSend` config gate (default: `false`) enables a secondary "Send Once" button in the secret prompt UI. When used:
|
|
266
266
|
|
|
267
267
|
- The secret value is handed to the `CredentialBroker`, which holds it in memory for the next `consume` or `browserFill` call
|
|
268
|
-
- The value is **not** persisted to the
|
|
268
|
+
- The value is **not** persisted to the credential store
|
|
269
269
|
- The broker discards the value after a single use
|
|
270
270
|
- The vault tool output confirms delivery without including the secret value — the value is never returned to the model
|
|
271
271
|
- The config gate must be explicitly enabled by the operator
|
|
@@ -274,7 +274,7 @@ The `allowOneTimeSend` config gate (default: `false`) enables a secondary "Send
|
|
|
274
274
|
|
|
275
275
|
| Component | Location | What it stores |
|
|
276
276
|
| ------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
277
|
-
| Secret values |
|
|
277
|
+
| Secret values | CES credential store or encrypted file store | Encrypted credential values keyed as `credential/{service}/{field}`. Stored via CES RPC (primary), CES HTTP (containerized), or encrypted file store (fallback). |
|
|
278
278
|
| Credential metadata | `~/.vellum/workspace/data/credentials/metadata.json` | Service, field, label, policy (allowedTools, allowedDomains), timestamps |
|
|
279
279
|
| Config | `~/.vellum/workspace/config.*` | `secretDetection` settings: enabled, action, entropyThreshold, allowOneTimeSend |
|
|
280
280
|
|
|
@@ -283,7 +283,7 @@ The `allowOneTimeSend` config gate (default: `false`) enables a secondary "Send
|
|
|
283
283
|
| File | Role |
|
|
284
284
|
| ---------------------------------------------------- | --------------------------------------------------------------------- |
|
|
285
285
|
| `assistant/src/tools/credentials/vault.ts` | `credential_store` tool — store, list, delete, prompt actions |
|
|
286
|
-
| `assistant/src/security/secure-keys.ts` | Async secure key CRUD via
|
|
286
|
+
| `assistant/src/security/secure-keys.ts` | Async secure key CRUD via CES and encrypted file store |
|
|
287
287
|
| `assistant/src/tools/credentials/metadata-store.ts` | JSON file metadata CRUD for credential records |
|
|
288
288
|
| `assistant/src/tools/credentials/broker.ts` | Brokered credential access with policy enforcement and transient send |
|
|
289
289
|
| `assistant/src/tools/credentials/policy-validate.ts` | Policy input validation (allowedTools, allowedDomains) |
|
|
@@ -56,7 +56,7 @@ CES tools use the standard `class ... implements Tool` registration pattern. The
|
|
|
56
56
|
|
|
57
57
|
### 1. `host_bash` is outside the strong secrecy guarantee
|
|
58
58
|
|
|
59
|
-
The existing `host_bash` tool executes commands on the host machine without any credential isolation. When an agent uses `host_bash`, it has full access to the host environment, including any credentials stored in environment variables, config files, or
|
|
59
|
+
The existing `host_bash` tool executes commands on the host machine without any credential isolation. When an agent uses `host_bash`, it has full access to the host environment, including any credentials stored in environment variables, config files, or credential stores accessible to the user. CES does not attempt to intercept or sandbox `host_bash` invocations.
|
|
60
60
|
|
|
61
61
|
**Implication**: `host_bash` represents a weaker security tier. Agents that require the strong secrecy guarantee must use `run_authenticated_command` instead. Trust rules and permission policies should reflect this distinction — managed deployments may deny `host_bash` entirely for untrusted agents while allowing `run_authenticated_command`.
|
|
62
62
|
|
|
@@ -237,13 +237,13 @@ CES is rolled out incrementally via feature flags, all defaulting to `false` (of
|
|
|
237
237
|
|
|
238
238
|
Enable flags in this order. Each flag is safe to enable independently, but later flags depend on earlier ones being on for meaningful behavior.
|
|
239
239
|
|
|
240
|
-
| Order | Flag
|
|
241
|
-
| ----- |
|
|
242
|
-
| 1 | `
|
|
243
|
-
| 2 | `
|
|
244
|
-
| 3 | `
|
|
245
|
-
| 4 | `
|
|
246
|
-
| 5 | `
|
|
240
|
+
| Order | Flag | Gate | Safe to enable alone? |
|
|
241
|
+
| ----- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
242
|
+
| 1 | `ces-tools` | Register CES tools (`run_authenticated_command`, `make_authenticated_request`, `manage_secure_command_tool`) in the agent loop | Yes — tools register but are not invoked unless the agent discovers credentials that require CES |
|
|
243
|
+
| 2 | `ces-shell-lockdown` | Enforce shell lockdown for untrusted agents with CES-active credentials; direct shell access to credentialed services is denied | Yes — only activates when CES credentials are present |
|
|
244
|
+
| 3 | `ces-secure-install` | Route tool/command installation through CES secure bundle pipeline instead of direct shell | Yes — falls back to standard install if CES is unavailable |
|
|
245
|
+
| 4 | `ces-grant-audit` | Gate CLI execution of grant listing, grant revocation, and audit inspection commands (commands are always registered but check the flag at runtime) | Yes — read-only inspection surfaces |
|
|
246
|
+
| 5 | `ces-managed-sidecar` | Use managed sidecar transport (Unix socket) instead of local child-process transport | **No** — requires the CES sidecar container to be present in the pod template. Only enable after the sidecar image is deployed. |
|
|
247
247
|
|
|
248
248
|
### Dark-launching the managed sidecar
|
|
249
249
|
|
|
@@ -325,7 +325,7 @@ Risks that are acknowledged and accepted for v1, documented here so they are exp
|
|
|
325
325
|
|
|
326
326
|
### 1. `host_bash` is a weaker security tier
|
|
327
327
|
|
|
328
|
-
`host_bash` executes commands on the host machine with full access to the host environment. CES does not intercept or sandbox `host_bash` invocations. An untrusted agent with `host_bash` access can read credentials from environment variables, config files, or
|
|
328
|
+
`host_bash` executes commands on the host machine with full access to the host environment. CES does not intercept or sandbox `host_bash` invocations. An untrusted agent with `host_bash` access can read credentials from environment variables, config files, or credential stores.
|
|
329
329
|
|
|
330
330
|
**Mitigation**: Trust rules and permission policies should deny `host_bash` for untrusted agents in managed deployments. This is a policy enforcement, not a technical guarantee. The CES process-boundary isolation only protects operations routed through CES tools.
|
|
331
331
|
|
package/docs/skills.md
CHANGED
|
@@ -198,7 +198,7 @@ Malformed tokens do not silently pass through — they are collected as errors a
|
|
|
198
198
|
|
|
199
199
|
### Feature flag
|
|
200
200
|
|
|
201
|
-
Inline command expansion is gated by the `inline-skill-commands` feature flag (key: `
|
|
201
|
+
Inline command expansion is gated by the `inline-skill-commands` feature flag (key: `inline-skill-commands`). The flag defaults to **enabled**.
|
|
202
202
|
|
|
203
203
|
When the flag is disabled and a skill contains inline command expansion tokens, `skill_load` returns an error rather than delivering unexpanded tokens to the model. This fail-closed behavior prevents the LLM from seeing raw expansion tokens and attempting to interpret them.
|
|
204
204
|
|
|
@@ -73,8 +73,8 @@ export interface InjectionTemplate {
|
|
|
73
73
|
export type SecureKeyDeleteResult = "deleted" | "not-found" | "error";
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* Abstraction over the underlying secure-key backend (e.g.
|
|
77
|
-
*
|
|
76
|
+
* Abstraction over the underlying secure-key backend (e.g. encrypted file
|
|
77
|
+
* store). Implementations handle platform-specific details.
|
|
78
78
|
*/
|
|
79
79
|
export interface SecureKeyBackend {
|
|
80
80
|
/** Retrieve a secret value by key. Returns undefined if not found. */
|
|
@@ -233,7 +233,7 @@ export class StaticCredentialMetadataStore {
|
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* Throws if the metadata file has an unrecognized version.
|
|
236
|
-
* Call this before performing irreversible
|
|
236
|
+
* Call this before performing irreversible credential store operations
|
|
237
237
|
* so the operation fails cleanly before any side effects.
|
|
238
238
|
*/
|
|
239
239
|
assertWritable(): void {
|