@vellumai/assistant 0.8.9 → 0.8.10-dev.202606092238.d04fd59

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.
Files changed (147) hide show
  1. package/AGENTS.md +1 -1
  2. package/examples/plugins/echo/README.md +3 -3
  3. package/node_modules/@vellumai/skill-host-contracts/src/tool-types.ts +2 -0
  4. package/openapi.yaml +38 -12
  5. package/package.json +1 -1
  6. package/scripts/sync-llm-catalog.ts +2 -0
  7. package/src/__tests__/agent-loop-exit-reason.test.ts +19 -14
  8. package/src/__tests__/build-persisted-content.test.ts +75 -1
  9. package/src/__tests__/config-managed-gemini-defaults.test.ts +2 -46
  10. package/src/__tests__/context-overflow-reducer.test.ts +264 -124
  11. package/src/__tests__/context-window-manager-overflow-rung.test.ts +289 -0
  12. package/src/__tests__/conversation-agent-loop-overflow.test.ts +22 -22
  13. package/src/__tests__/conversation-agent-loop.test.ts +45 -37
  14. package/src/__tests__/conversation-fork-crud.test.ts +110 -0
  15. package/src/__tests__/conversation-provider-retry-repair.test.ts +16 -20
  16. package/src/__tests__/conversation-runtime-assembly.test.ts +118 -5
  17. package/src/__tests__/conversation-surfaces-app-control.test.ts +4 -1
  18. package/src/__tests__/conversation-tool-setup-app-refresh.test.ts +91 -142
  19. package/src/__tests__/conversation-tool-setup-skill-attribution.test.ts +116 -0
  20. package/src/__tests__/conversation-tool-setup-test-helpers.ts +98 -0
  21. package/src/__tests__/corrected-target.test.ts +93 -0
  22. package/src/__tests__/credential-execution-feature-gates.test.ts +3 -5
  23. package/src/__tests__/credential-security-invariants.test.ts +1 -0
  24. package/src/__tests__/embedding-managed-proxy-selection.test.ts +6 -40
  25. package/src/__tests__/external-plugin-loader.test.ts +0 -1
  26. package/src/__tests__/guardian-routing-invariants.test.ts +91 -0
  27. package/src/__tests__/history-repair-hook.test.ts +2 -0
  28. package/src/__tests__/host-app-control-proxy.test.ts +45 -0
  29. package/src/__tests__/llm-catalog-parity.test.ts +4 -0
  30. package/src/__tests__/memory-retrieval-hook.test.ts +29 -15
  31. package/src/__tests__/notification-decision-strategy.test.ts +3 -3
  32. package/src/__tests__/persistence-secret-redaction.test.ts +78 -0
  33. package/src/__tests__/plugin-bootstrap.test.ts +82 -73
  34. package/src/__tests__/plugin-tool-contribution.test.ts +7 -4
  35. package/src/__tests__/plugin-types.test.ts +0 -8
  36. package/src/__tests__/provider-catalog-visibility.test.ts +1 -9
  37. package/src/__tests__/retry-thinking-adaptive-only.test.ts +245 -0
  38. package/src/__tests__/server-history-render.test.ts +39 -0
  39. package/src/__tests__/skills.test.ts +123 -0
  40. package/src/__tests__/title-generate-hook.test.ts +2 -0
  41. package/src/__tests__/tool-audit-listener.test.ts +51 -0
  42. package/src/__tests__/tool-executor-lifecycle-events.test.ts +32 -0
  43. package/src/__tests__/tool-start-timestamp.test.ts +218 -0
  44. package/src/agent/loop.ts +26 -23
  45. package/src/api/events/tool-result.ts +9 -0
  46. package/src/api/events/tool-use-start.ts +7 -0
  47. package/src/api/responses/conversation-message.ts +91 -14
  48. package/src/approvals/guardian-request-resolvers.ts +26 -0
  49. package/src/cli/commands/channel-verification-sessions.ts +6 -6
  50. package/src/cli/commands/inference-providers.ts +0 -8
  51. package/src/cli/commands/plugins.ts +2 -2
  52. package/src/cli/lib/__tests__/install-from-github.test.ts +174 -18
  53. package/src/cli/lib/__tests__/plugin-catalog-cache.test.ts +1 -1
  54. package/src/cli/lib/__tests__/plugin-details.test.ts +1 -1
  55. package/src/cli/lib/__tests__/plugin-marketplace.test.ts +1 -1
  56. package/src/cli/lib/__tests__/search-plugins.test.ts +11 -11
  57. package/src/cli/lib/install-from-github.ts +130 -19
  58. package/src/cli/lib/plugin-catalog-cache.ts +1 -1
  59. package/src/cli/lib/plugin-details.ts +4 -4
  60. package/src/cli/lib/plugin-marketplace.ts +2 -2
  61. package/src/cli/lib/search-plugins.ts +6 -6
  62. package/src/config/bundled-skills/skill-management/SKILL.md +89 -1
  63. package/src/config/env-registry.ts +12 -0
  64. package/src/config/feature-flag-registry.json +0 -80
  65. package/src/config/loader.ts +5 -22
  66. package/src/config/seed-inference-profiles.ts +1 -1
  67. package/src/config/skills.ts +101 -47
  68. package/src/context/strip-injections.ts +7 -4
  69. package/src/daemon/conversation-agent-loop-handlers.ts +102 -6
  70. package/src/daemon/conversation-agent-loop.ts +134 -232
  71. package/src/daemon/conversation-runtime-assembly.ts +44 -8
  72. package/src/daemon/conversation-tool-setup.ts +9 -1
  73. package/src/daemon/external-plugins-bootstrap.ts +33 -87
  74. package/src/daemon/handlers/config-channels.ts +11 -2
  75. package/src/daemon/handlers/shared.ts +9 -1
  76. package/src/daemon/handlers/skills.ts +6 -2
  77. package/src/daemon/host-app-control-proxy.ts +72 -57
  78. package/src/daemon/message-protocol.ts +0 -7
  79. package/src/daemon/message-types/skills.ts +4 -0
  80. package/src/events/tool-audit-listener.ts +7 -1
  81. package/src/memory/__tests__/tool-invocation-test-helpers.ts +69 -0
  82. package/src/memory/conversation-crud.ts +44 -1
  83. package/src/memory/db-init.ts +4 -0
  84. package/src/memory/embedding-backend.ts +5 -22
  85. package/src/memory/memory-retrospective-startup-cleanup.ts +1 -1
  86. package/src/memory/migrations/275-tool-invocations-add-skill-id.test.ts +81 -0
  87. package/src/memory/migrations/275-tool-invocations-add-skill-id.ts +20 -0
  88. package/src/memory/migrations/276-tool-invocations-created-at-id-index.test.ts +68 -0
  89. package/src/memory/migrations/276-tool-invocations-created-at-id-index.ts +20 -0
  90. package/src/memory/migrations/index.ts +2 -0
  91. package/src/memory/schema/conversations.ts +3 -0
  92. package/src/memory/tool-execution-events-store.test.ts +162 -0
  93. package/src/memory/tool-execution-events-store.ts +73 -0
  94. package/src/memory/tool-usage-store.ts +4 -3
  95. package/src/memory/v2/__tests__/injected-block-slugs.test.ts +51 -0
  96. package/src/memory/v2/activation-store.ts +50 -1
  97. package/src/memory/v2/injected-block-slugs.ts +30 -0
  98. package/src/notifications/__tests__/copy-composer.test.ts +244 -0
  99. package/src/notifications/access-request-copy.ts +298 -0
  100. package/src/notifications/adapters/slack.ts +3 -3
  101. package/src/notifications/adapters/telegram.ts +2 -1
  102. package/src/notifications/copy-composer.ts +49 -267
  103. package/src/notifications/decision-engine.ts +16 -35
  104. package/src/notifications/home-feed-side-effect.ts +1 -6
  105. package/src/platform/client.ts +1 -3
  106. package/src/platform/feature-gate.ts +3 -12
  107. package/src/plugin-api/constants.ts +2 -0
  108. package/src/plugin-api/index.ts +34 -6
  109. package/src/plugin-api/types.ts +19 -0
  110. package/src/plugins/defaults/compaction/compact.ts +39 -1
  111. package/src/plugins/defaults/compaction/context-overflow-reducer.ts +240 -32
  112. package/src/plugins/defaults/compaction/corrected-target.ts +53 -0
  113. package/src/plugins/defaults/compaction/window-manager.ts +136 -0
  114. package/src/plugins/defaults/index.ts +24 -0
  115. package/src/plugins/defaults/memory-retrieval/hooks/post-compact.ts +68 -43
  116. package/src/plugins/defaults/memory-retrieval/hooks/{user-prompt-submit-temp.ts → user-prompt-submit.ts} +36 -67
  117. package/src/plugins/defaults/memory-retrieval/package.json +14 -0
  118. package/src/plugins/external-api.ts +1 -1
  119. package/src/plugins/types.ts +5 -51
  120. package/src/providers/inference/__tests__/base-url-route-validation.test.ts +1 -2
  121. package/src/providers/model-catalog.ts +57 -1
  122. package/src/providers/registry.ts +0 -8
  123. package/src/providers/retry.ts +35 -7
  124. package/src/runtime/routes/__tests__/acp-routes.test.ts +151 -0
  125. package/src/runtime/routes/__tests__/inference-provider-connection-routes.test.ts +0 -62
  126. package/src/runtime/routes/__tests__/plugins-routes.test.ts +4 -4
  127. package/src/runtime/routes/acp-routes.test.ts +106 -0
  128. package/src/runtime/routes/acp-routes.ts +248 -2
  129. package/src/runtime/routes/browser-tabs-routes.ts +1 -1
  130. package/src/runtime/routes/channel-verification-routes.ts +14 -5
  131. package/src/runtime/routes/chatgpt-subscription-auth-routes.ts +0 -14
  132. package/src/runtime/routes/inbound-stages/acl-enforcement.ts +33 -34
  133. package/src/runtime/routes/inference-provider-connection-routes.ts +0 -45
  134. package/src/runtime/routes/plugins-routes.ts +3 -3
  135. package/src/runtime/verification-outbound-actions.ts +147 -2
  136. package/src/runtime/verification-templates.ts +29 -3
  137. package/src/telemetry/types.ts +25 -1
  138. package/src/telemetry/usage-telemetry-reporter.test.ts +141 -7
  139. package/src/telemetry/usage-telemetry-reporter.ts +63 -7
  140. package/src/tools/executor.ts +4 -1
  141. package/src/tools/skills/load.ts +11 -6
  142. package/src/tools/terminal/safe-env.ts +1 -0
  143. package/src/tools/types.ts +10 -0
  144. package/src/__tests__/plugin-skill-contribution.test.ts +0 -355
  145. package/src/daemon/message-types/browser.ts +0 -10
  146. package/src/notifications/__tests__/emit-signal-home-feed.test.ts +0 -187
  147. package/src/plugins/plugin-skill-contributions.ts +0 -292
@@ -2,7 +2,7 @@
2
2
  * In-memory cache for the installable plugin catalog.
3
3
  *
4
4
  * The catalog (`loadPluginCatalog`) is built from two unauthenticated GitHub
5
- * Contents API calls — the first-party `experimental/plugins/` directory
5
+ * Contents API calls — the first-party `plugins/` directory
6
6
  * listing and the `marketplace.json` manifest. GitHub's unauthenticated rate
7
7
  * limit is 60 requests/hour per IP, so a long-lived daemon that hit GitHub on
8
8
  * every catalog search (on web mount, on every keystroke, across reloads and
@@ -6,17 +6,17 @@
6
6
  * most authoritative for each field:
7
7
  * 1. The locally installed copy under `<workspacePluginsDir>/<name>/`, when
8
8
  * present — its `package.json` and `README.md` are read straight off disk.
9
- * 2. The curated `experimental/plugins/marketplace.json` entry, for external
9
+ * 2. The curated `plugins/marketplace.json` entry, for external
10
10
  * ecosystem plugins (description / homepage / license / pinned source).
11
11
  * 3. The plugin's own repository at the pinned ref (first-party
12
- * `experimental/plugins/<name>/` or the external `owner/repo[/path]`),
12
+ * `plugins/<name>/` or the external `owner/repo[/path]`),
13
13
  * fetched via the GitHub Contents API for the README and any
14
14
  * `package.json` fields the manifest doesn't carry.
15
15
  *
16
16
  * Name-collision precedence matches {@link ./search-plugins} and
17
17
  * {@link ./install-from-github}: a marketplace entry owns its name, so the
18
18
  * detail page advertises the external source the catalog and installer use. A
19
- * same-named `experimental/plugins/<name>/` directory is that plugin's adapter
19
+ * same-named `plugins/<name>/` directory is that plugin's adapter
20
20
  * stub, not a standalone first-party plugin, so it does not override the claim.
21
21
  *
22
22
  * Designed for direct programmatic use with an injected `fetch`, mirroring the
@@ -40,7 +40,7 @@ import type { PluginMatchSource } from "./search-plugins.js";
40
40
 
41
41
  const PLUGIN_SOURCE_OWNER = "vellum-ai";
42
42
  const PLUGIN_SOURCE_REPO = "vellum-assistant";
43
- const PLUGIN_SOURCE_PATH_PREFIX = "experimental/plugins";
43
+ const PLUGIN_SOURCE_PATH_PREFIX = "plugins";
44
44
 
45
45
  /** Recognised README filenames, matched case-insensitively against a listing. */
46
46
  const README_RE = /^readme(\.md|\.markdown)?$/i;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Read the curated plugin marketplace manifest from the canonical repo.
3
3
  *
4
- * The manifest at `experimental/plugins/marketplace.json` whitelists external
4
+ * The manifest at `plugins/marketplace.json` whitelists external
5
5
  * ecosystem plugins so they appear in `assistant plugins search` / the web
6
6
  * catalog and become installable by name. Its shape is a subset of the
7
7
  * Claude Code marketplace manifest
@@ -33,7 +33,7 @@ import type { FetchLike } from "./install-from-github.js";
33
33
  /** Canonical location of the marketplace manifest. */
34
34
  const MARKETPLACE_SOURCE_OWNER = "vellum-ai";
35
35
  const MARKETPLACE_SOURCE_REPO = "vellum-assistant";
36
- const MARKETPLACE_FILE_PATH = "experimental/plugins/marketplace.json";
36
+ const MARKETPLACE_FILE_PATH = "plugins/marketplace.json";
37
37
 
38
38
  // ---------------------------------------------------------------------------
39
39
  // Manifest schema (subset of the Claude Code marketplace schema)
@@ -4,9 +4,9 @@
4
4
  * The catalog is the union of two sources, both fetched from the repo at the
5
5
  * configured git ref:
6
6
  * 1. First-party plugins — directories under
7
- * `vellum-ai/vellum-assistant/experimental/plugins/`.
7
+ * `vellum-ai/vellum-assistant/plugins/`.
8
8
  * 2. Whitelisted external ecosystem plugins — entries in the curated
9
- * `experimental/plugins/marketplace.json` manifest (see
9
+ * `plugins/marketplace.json` manifest (see
10
10
  * {@link ./plugin-marketplace}).
11
11
  *
12
12
  * Entries are filtered by case-insensitive ECMAScript regex against the
@@ -33,7 +33,7 @@ export type { FetchLike } from "./install-from-github.js";
33
33
 
34
34
  const PLUGIN_SOURCE_OWNER = "vellum-ai";
35
35
  const PLUGIN_SOURCE_REPO = "vellum-assistant";
36
- const PLUGIN_SOURCE_PATH_PREFIX = "experimental/plugins";
36
+ const PLUGIN_SOURCE_PATH_PREFIX = "plugins";
37
37
 
38
38
  /** Entry shape returned by the GitHub Contents API for a directory listing. */
39
39
  interface GitHubContentEntry {
@@ -80,7 +80,7 @@ export interface PluginSearchMatch {
80
80
  readonly name: string;
81
81
  /**
82
82
  * Human-readable origin of the entry: the repo-relative path for
83
- * first-party plugins (e.g. `experimental/plugins/<name>`) or a
83
+ * first-party plugins (e.g. `plugins/<name>`) or a
84
84
  * `github:owner/repo@ref` locator for external ones.
85
85
  */
86
86
  readonly path: string;
@@ -179,7 +179,7 @@ export interface PluginCatalog {
179
179
 
180
180
  /**
181
181
  * Build the full catalog at {@link opts.ref}: every first-party plugin
182
- * directory under `experimental/plugins/` merged with every whitelisted
182
+ * directory under `plugins/` merged with every whitelisted
183
183
  * external entry in the marketplace manifest.
184
184
  *
185
185
  * The result is **query-independent** — `searchPlugins` applies the regex
@@ -202,7 +202,7 @@ export async function loadPluginCatalog(
202
202
  const seen = new Set<string>();
203
203
 
204
204
  // Whitelisted external entries own their name. A same-named
205
- // `experimental/plugins/<name>/` directory is that plugin's curated adapter
205
+ // `plugins/<name>/` directory is that plugin's curated adapter
206
206
  // stub (overlaid onto the clone at install time), not a standalone
207
207
  // first-party plugin — so it must surface once, as the external entry.
208
208
  for (const entry of marketplace) {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: skill-management
3
- description: Create and delete custom managed skills
3
+ description: Create, edit, and delete custom managed skills in the user's workspace. Use whenever the user wants to author a new skill from a description, scaffold a SKILL.md, or remove a skill they no longer need.
4
4
  metadata:
5
5
  emoji: "\U0001F9E9"
6
6
  vellum:
@@ -15,9 +15,97 @@ metadata:
15
15
 
16
16
  Manage the lifecycle of custom managed skills in `{workspaceDir}/skills`.
17
17
 
18
+ ## When to Use
19
+
20
+ USE THIS SKILL WHEN:
21
+ - The user says "build me a skill" or "create a skill for X"
22
+ - The user wants to scaffold, edit, or delete a SKILL.md in their workspace
23
+ - The user wants a repeatable workflow captured as an invocable skill
24
+
25
+ Do NOT use this skill when the user just wants to run an existing skill. That is normal activation, not management.
26
+
18
27
  ## Capabilities
19
28
 
20
29
  - **Scaffold** a new managed skill with YAML frontmatter and markdown body
30
+ - **Edit** an existing skill by scaffolding over it (rewrites the SKILL.md in place)
21
31
  - **Delete** an existing managed skill directory
22
32
 
23
33
  Skills created via `scaffold_managed_skill` become available for `skill_load` when a valid top-level `SKILL.md` is written under the skill directory.
34
+
35
+ ## Step 1 - Align with the user before building
36
+
37
+ Ask before doing anything. Do not scaffold a skill until you have confirmed with the user:
38
+
39
+ - What the skill should do
40
+ - When it should activate (the trigger phrases, in their words)
41
+ - The major steps it performs
42
+ - Any destructive steps and the done condition
43
+
44
+ > ✓ Checkpoint: Have you confirmed scope with the user? If you are guessing at any of the four points above, ask first. Do not scaffold on assumption.
45
+
46
+ ## Step 2 - Write a description that covers what AND when
47
+
48
+ The description is what makes the skill discoverable. It must cover both what the skill does and when to reach for it, phrased the way the user would say it.
49
+
50
+ ```yaml
51
+ description: Build anything visual — apps, landing pages, dashboards, trackers,
52
+ calculators, games, tools, slide decks, or data visualizations. Use whenever
53
+ the user wants something built that they can see and interact with.
54
+ ```
55
+
56
+ Keep `activation-hints` separate from the description. The description sells the skill, the hints list the concrete trigger phrases.
57
+
58
+ ## Step 3 - Structure the body so it survives weak models
59
+
60
+ Strong models tolerate loose structure. Weaker models drift. Build every body with these patterns.
61
+
62
+ **Open with a `## When to Use` block.** User language, not jargon. This is what makes the model recognize when the skill applies.
63
+
64
+ **Put critical warnings at the point of action.** A warning at the top of a file is forgotten by the time the model is 200 lines deep. Do not trust the top-of-file warning. Repeat the danger where the dangerous action happens.
65
+
66
+ ```markdown
67
+ ## Step 5 - Apply the JSON blob
68
+
69
+ ⚠️ CRITICAL: Use the complete blob below. Setting even one key
70
+ wipes the entire block. Copy the whole thing or fail.
71
+ ```
72
+
73
+ **Add explicit checkpoints between major steps, sparingly.** Long executions blur together. The model finishes step 3 and slides into step 4 without re-anchoring. A checkpoint forces a re-read. Use them between major sections, not on every step.
74
+
75
+ **Make branching explicit with `If / →`, and always name the default.** Prose hides decisions. The model reads linearly and walks past a branch without registering it. Every `If` must cover the default case. Implicit fall-through ("otherwise figure it out") creates drift.
76
+
77
+ ```markdown
78
+ If the user already has a draft → restructure it into the template.
79
+ If not → build the steps from their description (default).
80
+ ```
81
+
82
+ ## Step 4 - Define done by binding tool calls to artifacts
83
+
84
+ Without an explicit done condition, the model invents one. It stops too early ("the file was created, done") or overshoots ("let me add one more feature"). Both are drift.
85
+
86
+ Each completion criterion must bind a **tool call** to the **user-visible artifact** it produces. Do not write criteria the model can satisfy by narration alone.
87
+
88
+ ```markdown
89
+ ## SKILL COMPLETE WHEN
90
+
91
+ - [ ] `scaffold_managed_skill` wrote the SKILL.md and returned its path
92
+ - [ ] User confirmed the skill loads via `skill_load`
93
+ - [ ] User saw the trigger phrases that will activate it
94
+ ```
95
+
96
+ > ✓ Checkpoint: Before scaffolding, confirm the body has a `## When to Use` block, point-of-action warnings on any dangerous step, explicit `If / →` branches with named defaults, and artifact-bound completion criteria.
97
+
98
+ ## Step 5 - Keep SKILL.md under 500 lines
99
+
100
+ Past 500 lines the model loses things in the middle. Warnings get buried, branching loses visibility, and the file fights the task for the same context budget. If a skill is growing past 500 lines, split reference material into separate files the skill points to.
101
+
102
+ ## Step 6 - Test the skill before calling it done
103
+
104
+ After scaffolding, load the skill and confirm it activates on the intended trigger and follows its own steps. If it does not activate or drifts, fix the body and test again.
105
+
106
+ How you exercise it depends on what the skill does:
107
+
108
+ - **If the skill performs side effects** (sends messages, deletes data, makes purchases, mutates external state) → do not trigger a live run during creation. Confirm it loads and activates on the intended trigger (static check), then ask the user before exercising it for real.
109
+ - **Otherwise** (read-only or local-only skills) → run it against a realistic prompt directly. This is the default.
110
+
111
+ > ⚠️ CRITICAL: Do not tell the user a skill is ready until you have confirmed it loads and activates on the intended trigger. A skill that was never loaded is a skill that was never tested. Never perform user-visible side effects just to test a skill without the user's consent.
@@ -72,6 +72,17 @@ export function isPlatformRemote(): boolean {
72
72
  return getIsPlatform();
73
73
  }
74
74
 
75
+ /**
76
+ * VELLUM_DISABLE_PLATFORM — boolean, default: false
77
+ * When true, all outbound platform API calls in local mode are suppressed.
78
+ * The daemon, gateway, and web UI each no-op platform requests with a
79
+ * debug log. Has no effect when IS_PLATFORM is true (platform-managed
80
+ * instances always connect to the platform).
81
+ */
82
+ export function getDisablePlatform(): boolean {
83
+ return flag("VELLUM_DISABLE_PLATFORM");
84
+ }
85
+
75
86
  /**
76
87
  * VELLUM_WORKSPACE_DIR — string, default: undefined
77
88
  * Overrides the default workspace directory.
@@ -191,6 +202,7 @@ const KNOWN_VELLUM_VARS = new Set([
191
202
  "VELLUM_DEBUG",
192
203
  "VELLUM_DESKTOP_APP",
193
204
  "VELLUM_DEV",
205
+ "VELLUM_DISABLE_PLATFORM",
194
206
  "VELLUM_DOCS_BASE_URL",
195
207
  "VELLUM_ENVIRONMENT",
196
208
  "VELLUM_HATCHED_BY",
@@ -115,22 +115,6 @@
115
115
  "description": "Surface credential grant and audit inspection endpoints for reviewing active grants and access logs",
116
116
  "defaultEnabled": false
117
117
  },
118
- {
119
- "id": "chatgpt-subscription-auth",
120
- "scope": "assistant",
121
- "key": "chatgpt-subscription-auth",
122
- "label": "ChatGPT Subscription Auth",
123
- "description": "Enable ChatGPT subscription OAuth as a provider auth type for OpenAI models, using the Codex device-code flow.",
124
- "defaultEnabled": false
125
- },
126
- {
127
- "id": "deploy-to-vercel",
128
- "scope": "assistant",
129
- "key": "deploy-to-vercel",
130
- "label": "Deploy to Vercel",
131
- "description": "Enable the Deploy to Vercel / Publish option in the app workspace header share menu",
132
- "defaultEnabled": false
133
- },
134
118
  {
135
119
  "id": "settings-embedding-provider",
136
120
  "scope": "assistant",
@@ -163,14 +147,6 @@
163
147
  "description": "Auto-expand completed tool call step groups instead of showing them collapsed",
164
148
  "defaultEnabled": false
165
149
  },
166
- {
167
- "id": "sounds",
168
- "scope": "assistant",
169
- "key": "sounds",
170
- "label": "Sounds",
171
- "description": "Enable the Sounds tab in Settings and all app sound playback (event sounds, random ambient sounds)",
172
- "defaultEnabled": false
173
- },
174
150
  {
175
151
  "id": "message-tts",
176
152
  "scope": "assistant",
@@ -179,14 +155,6 @@
179
155
  "description": "Show a speaker button on assistant messages to generate and play the message as audio via Fish Audio TTS",
180
156
  "defaultEnabled": false
181
157
  },
182
- {
183
- "id": "openai-compatible-endpoints",
184
- "scope": "assistant",
185
- "key": "openai-compatible-endpoints",
186
- "label": "OpenAI-Compatible Endpoints",
187
- "description": "Enable user-configured OpenAI-compatible inference endpoints with custom base URLs and model identifiers",
188
- "defaultEnabled": false
189
- },
190
158
  {
191
159
  "id": "backward-releases",
192
160
  "scope": "assistant",
@@ -235,14 +203,6 @@
235
203
  "description": "Enable assistant sandboxing via Apple Containers on macOS 26+, providing a lightweight native sandbox without third-party dependencies",
236
204
  "defaultEnabled": false
237
205
  },
238
- {
239
- "id": "managed-gemini-embeddings-enabled",
240
- "scope": "assistant",
241
- "key": "managed-gemini-embeddings-enabled",
242
- "label": "Managed Gemini Embeddings Enabled",
243
- "description": "Route embedding requests through the platform runtime proxy using Vellum-managed Gemini credentials when available",
244
- "defaultEnabled": false
245
- },
246
206
  {
247
207
  "id": "bookmarks",
248
208
  "scope": "client",
@@ -299,14 +259,6 @@
299
259
  "description": "Expose the developer-only Compaction Playground tab in macOS Settings and enable the /playground/* HTTP endpoints for exercising compaction conditions. Dev-only; default off.",
300
260
  "defaultEnabled": false
301
261
  },
302
- {
303
- "id": "account-deletion",
304
- "scope": "assistant",
305
- "key": "account-deletion",
306
- "label": "Account Deletion",
307
- "description": "Surfaces the user-initiated account deletion flow in client settings.",
308
- "defaultEnabled": true
309
- },
310
262
  {
311
263
  "id": "app-control",
312
264
  "scope": "assistant",
@@ -331,14 +283,6 @@
331
283
  "description": "Enable the external-plugin install path: the `assistant plugins` CLI subcommand and the declarative external-plugin loader convention (`<workspaceDir>/plugins/<name>/` directories containing `package.json` plus interface dirs). Gates an unstable surface that may change shape before stabilizing.",
332
284
  "defaultEnabled": false
333
285
  },
334
- {
335
- "id": "provider-zai",
336
- "scope": "assistant",
337
- "key": "provider-zai",
338
- "label": "z.ai Provider",
339
- "description": "Enable the z.ai (Zhipu AI) provider and its GLM models in the provider picker and model selection UI",
340
- "defaultEnabled": false
341
- },
342
286
  {
343
287
  "id": "velvet-theme",
344
288
  "scope": "client",
@@ -371,22 +315,6 @@
371
315
  "description": "Enable pull-to-refresh gesture in the chat view.",
372
316
  "defaultEnabled": false
373
317
  },
374
- {
375
- "id": "doctor",
376
- "scope": "client",
377
- "key": "doctor",
378
- "label": "Doctor",
379
- "description": "Enable the Doctor diagnostic tab in Debug settings.",
380
- "defaultEnabled": false
381
- },
382
- {
383
- "id": "home-page",
384
- "scope": "client",
385
- "key": "home-page",
386
- "label": "Home Page",
387
- "description": "Enable the Home page as the default landing view.",
388
- "defaultEnabled": false
389
- },
390
318
  {
391
319
  "id": "platform-notifications",
392
320
  "scope": "client",
@@ -443,14 +371,6 @@
443
371
  "description": "Expose the developer-only Memory Router Playground tab in macOS Settings and the /assistant/memory-router-playground web page for dry-running v4 router config overrides against the live page index. Dev-only; default off.",
444
372
  "defaultEnabled": false
445
373
  },
446
- {
447
- "id": "platform-features-in-local-mode",
448
- "scope": "assistant",
449
- "key": "platform-features-in-local-mode",
450
- "label": "Platform Features in Local Mode",
451
- "description": "When enabled, the assistant can call the Vellum platform API from local mode. When disabled, all platform API clients in the daemon, gateway, CES, and web UI no-op with a debug log instead of making outbound requests.",
452
- "defaultEnabled": true
453
- },
454
374
  {
455
375
  "id": "memory-v3-shadow",
456
376
  "scope": "assistant",
@@ -14,7 +14,6 @@ import {
14
14
  getWorkspaceConfigPath,
15
15
  getWorkspaceDir,
16
16
  } from "../util/platform.js";
17
- import { isAssistantFeatureFlagEnabled } from "./assistant-feature-flags.js";
18
17
  import { AssistantConfigSchema } from "./schema.js";
19
18
  import type { AssistantConfig } from "./types.js";
20
19
 
@@ -692,16 +691,15 @@ export function loadConfig(): AssistantConfig {
692
691
 
693
692
  if (suppressConfigDiskWritesDepth === 0) {
694
693
  // Managed Gemini embedding defaults migration.
695
- // When on a managed platform (IS_PLATFORM=true) with the feature flag
696
- // enabled and no explicit embedding provider chosen (provider=auto),
697
- // persist Gemini embedding defaults into the raw config file.
694
+ // When on a managed platform (IS_PLATFORM=true) and no explicit embedding
695
+ // provider chosen (provider=auto), persist Gemini embedding defaults into
696
+ // the raw config file.
698
697
  // Idempotent: once provider=gemini is written, subsequent loads skip this.
699
698
  if (config.memory.embeddings.provider === "auto") {
700
699
  try {
701
700
  if (
702
- (process.env.IS_PLATFORM === "true" ||
703
- process.env.IS_PLATFORM === "1") &&
704
- isManagedGeminiFFEnabled(config)
701
+ process.env.IS_PLATFORM === "true" ||
702
+ process.env.IS_PLATFORM === "1"
705
703
  ) {
706
704
  setNestedValue(fileConfig, "memory.embeddings.provider", "gemini");
707
705
  setNestedValue(
@@ -797,21 +795,6 @@ export function loadConfig(): AssistantConfig {
797
795
  }
798
796
  }
799
797
 
800
- /**
801
- * Check whether the managed-gemini-embeddings-enabled feature flag is on.
802
- * Wrapped in a try/catch so a flag-resolver failure never breaks config loading.
803
- */
804
- function isManagedGeminiFFEnabled(config: AssistantConfig): boolean {
805
- try {
806
- return isAssistantFeatureFlagEnabled(
807
- "managed-gemini-embeddings-enabled",
808
- config,
809
- );
810
- } catch {
811
- return false;
812
- }
813
- }
814
-
815
798
  export function getConfig(): AssistantConfig {
816
799
  return loadConfig();
817
800
  }
@@ -229,7 +229,7 @@ export function seedInferenceProfiles(
229
229
  // profiles without duplicating; we have to honor those edits across
230
230
  // reseeds or they'd silently revert on every boot. Carry by
231
231
  // key-presence rather than truthiness so an explicit `null` (user
232
- // cleared the label) survives too. Codex P1 finding on PR #30362.
232
+ // cleared the label) survives too.
233
233
  //
234
234
  // BYOK seed defaults (off-platform only):
235
235
  // • label: " (Managed)" suffix disambiguates managed profile labels
@@ -1,4 +1,5 @@
1
1
  import {
2
+ type Dirent,
2
3
  existsSync,
3
4
  lstatSync,
4
5
  readdirSync,
@@ -17,18 +18,16 @@ import {
17
18
 
18
19
  import { z } from "zod";
19
20
 
20
- import {
21
- getPluginContributedSkillDefinition,
22
- getPluginContributedSkillSummaries,
23
- } from "../plugins/plugin-skill-contributions.js";
24
21
  import { parseFrontmatterFields } from "../skills/frontmatter.js";
25
22
  import type { InlineCommandExpansion } from "../skills/inline-command-expansions.js";
26
23
  import { parseInlineCommandExpansions } from "../skills/inline-command-expansions.js";
27
24
  import { parseToolManifestFile } from "../skills/tool-manifest.js";
28
25
  import { computeSkillVersionHash } from "../skills/version-hash.js";
26
+ import type { OwnerInfo } from "../tools/types.js";
29
27
  import { getLogger } from "../util/logger.js";
30
28
  import {
31
29
  getWorkspaceDirDisplay,
30
+ getWorkspacePluginsDir,
32
31
  getWorkspaceSkillsDir,
33
32
  } from "../util/platform.js";
34
33
  import { stripCommentLines } from "../util/strip-comment-lines.js";
@@ -66,9 +65,9 @@ const SkillMetadataSchema = z
66
65
  * - `workspace`: user-authored skill living in a conversation's working dir.
67
66
  * - `extra`: third-party directory roots passed via `loadSkillCatalog`'s
68
67
  * `extraDirs` argument (primarily for tests).
69
- * - `plugin`: contributed at runtime by a loaded plugin via
70
- * `PluginSkillRegistration`. Body is held in-memory by
71
- * `plugins/plugin-skill-contributions.ts`, not on disk.
68
+ * - `plugin`: shipped on disk inside an installed plugin at
69
+ * `<workspaceDir>/plugins/<name>/skills/<id>/SKILL.md`, attributed back to
70
+ * the owning plugin via its `owner` descriptor.
72
71
  */
73
72
  export type SkillSource =
74
73
  | "bundled"
@@ -90,6 +89,13 @@ export interface SkillSummary {
90
89
  icon?: string;
91
90
  emoji?: string;
92
91
  source: SkillSource;
92
+ /**
93
+ * Ownership descriptor identifying the extension that ships this skill,
94
+ * reusing the same {@link OwnerInfo} model the tool registry uses. Set only
95
+ * for `source: "plugin"` skills — `{ kind: "plugin", id: <plugin dir name> }`
96
+ * — attributing them to the installed plugin under `<workspaceDir>/plugins/`.
97
+ */
98
+ owner?: OwnerInfo;
93
99
  /** Parsed tool manifest metadata, if the skill has a valid TOOLS.json. */
94
100
  toolManifest?: SkillToolManifestMeta;
95
101
  /** IDs of child skills that this skill includes (metadata-only, not auto-activated). */
@@ -646,6 +652,82 @@ function discoverSkillDirectories(skillsDir: string): string[] {
646
652
  return dirs.sort((a, b) => a.localeCompare(b));
647
653
  }
648
654
 
655
+ /**
656
+ * Whether `pluginDir` is a recognized installed plugin: it must carry a
657
+ * parseable `package.json` whose `name` equals the directory name. This
658
+ * mirrors the external plugin loader's recognition gate, which skips any
659
+ * directory whose `manifest.name` does not match its directory name.
660
+ */
661
+ function isRecognizedPluginDir(pluginDir: string, dirName: string): boolean {
662
+ const manifestPath = join(pluginDir, "package.json");
663
+ if (!existsSync(manifestPath)) return false;
664
+ try {
665
+ const parsed: unknown = JSON.parse(readFileSync(manifestPath, "utf-8"));
666
+ return (
667
+ typeof parsed === "object" &&
668
+ parsed !== null &&
669
+ "name" in parsed &&
670
+ (parsed as { name: unknown }).name === dirName
671
+ );
672
+ } catch (err) {
673
+ log.warn(
674
+ { err, manifestPath },
675
+ "Skipping plugin dir with unparseable package.json for resident skills",
676
+ );
677
+ return false;
678
+ }
679
+ }
680
+
681
+ /**
682
+ * Discover skills shipped on disk inside installed plugins. Each installed
683
+ * plugin — a directory under `<workspaceDir>/plugins/` recognized by
684
+ * {@link isRecognizedPluginDir} — may ship skills at `skills/<id>/SKILL.md`.
685
+ * Returned summaries are attributed to the owning plugin via their `owner`
686
+ * descriptor (`{ kind: "plugin", id: <plugin dir name> }`).
687
+ */
688
+ function discoverPluginResidentSkills(): SkillSummary[] {
689
+ const pluginsDir = getWorkspacePluginsDir();
690
+ if (!existsSync(pluginsDir)) return [];
691
+
692
+ let entries: Dirent[];
693
+ try {
694
+ entries = readdirSync(pluginsDir, { withFileTypes: true });
695
+ } catch (err) {
696
+ log.warn(
697
+ { err, pluginsDir },
698
+ "Failed to read plugins directory for resident skills",
699
+ );
700
+ return [];
701
+ }
702
+
703
+ const summaries: SkillSummary[] = [];
704
+ for (const entry of entries) {
705
+ if (!entry.isDirectory() && !entry.isSymbolicLink()) continue;
706
+ const pluginDir = join(pluginsDir, entry.name);
707
+ // Mirror the plugin loader's recognition gate: a directory is a real
708
+ // installed plugin only if it carries a parseable `package.json` whose
709
+ // `name` matches the directory. This rejects staging dirs, stray files,
710
+ // and malformed/mismatched clones (e.g. an un-adapted `caveman-installer`)
711
+ // that the loader itself would skip, so the catalog never surfaces skills
712
+ // from a directory the runtime would refuse to load.
713
+ if (!isRecognizedPluginDir(pluginDir, entry.name)) continue;
714
+
715
+ const skillsDir = join(pluginDir, "skills");
716
+ if (!existsSync(skillsDir)) continue;
717
+
718
+ for (const directory of discoverSkillDirectories(skillsDir)) {
719
+ const skill = readSkillFromDirectory(directory, skillsDir, "plugin");
720
+ if (!skill) continue;
721
+ summaries.push({
722
+ ...skillSummaryFromDefinition(skill, "plugin"),
723
+ owner: { kind: "plugin", id: entry.name },
724
+ });
725
+ }
726
+ }
727
+
728
+ return summaries;
729
+ }
730
+
649
731
  // ─── Catalog loading ─────────────────────────────────────────────────────────
650
732
 
651
733
  function skillSummaryFromDefinition(
@@ -754,12 +836,11 @@ export function loadSkillCatalog(
754
836
  catalog.push(skill);
755
837
  }
756
838
 
757
- // Load plugin-contributed skills. They sit above bundled/extra but below
758
- // managed and workspace so that user-authored filesystem skills can
759
- // override a plugin-provided skill by declaring the same id under
760
- // `~/.vellum/workspace/skills/`. Registration is owned by the plugin
761
- // bootstrap — this call is a pure read against the in-memory registry.
762
- const pluginSkills = getPluginContributedSkillSummaries();
839
+ // Discover skills shipped on disk inside installed plugins. They sit above
840
+ // bundled/extra but below managed and workspace so a user-authored
841
+ // filesystem skill can override a plugin-provided skill by declaring the
842
+ // same id under `$VELLUM_WORKSPACE_DIR/skills/`.
843
+ const pluginSkills = discoverPluginResidentSkills();
763
844
  for (const skill of pluginSkills) {
764
845
  if (seenIds.has(skill.id)) {
765
846
  const existingIndex = catalog.findIndex((s) => s.id === skill.id);
@@ -769,14 +850,14 @@ export function loadSkillCatalog(
769
850
  catalog[existingIndex].source === "extra")
770
851
  ) {
771
852
  log.info(
772
- { id: skill.id, pluginSkill: true },
853
+ { id: skill.id, pluginName: skill.owner?.id },
773
854
  "Plugin skill overrides bundled/extra skill",
774
855
  );
775
856
  catalog[existingIndex] = skill;
776
857
  continue;
777
858
  }
778
859
  log.warn(
779
- { id: skill.id },
860
+ { id: skill.id, pluginName: skill.owner?.id },
780
861
  "Skipping duplicate plugin skill id (already present in catalog)",
781
862
  );
782
863
  continue;
@@ -992,41 +1073,13 @@ export function listReferenceFiles(directoryPath: string): string | null {
992
1073
  }
993
1074
 
994
1075
  function loadSkillDefinition(skill: SkillSummary): SkillLookupResult {
995
- // Plugin-contributed skills live in-memory, not on disk. The registry
996
- // (see `plugins/plugin-skill-contributions.ts`) stores a pre-built
997
- // SkillDefinition we can return directly — no file read, no frontmatter
998
- // parse. We still run placeholder / feature-gate substitution on the
999
- // body so plugin skills behave the same as filesystem skills from the
1000
- // model's perspective.
1001
- if (skill.source === "plugin") {
1002
- const pluginDef = getPluginContributedSkillDefinition(skill.id);
1003
- if (!pluginDef) {
1004
- // The skill was in the catalog when the selector ran but has since
1005
- // been unregistered (plugin hot-reload, shutdown race). Fail loudly
1006
- // rather than returning a mystery undefined.
1007
- return {
1008
- error: `Plugin-contributed skill "${skill.id}" is no longer registered`,
1009
- };
1010
- }
1011
- // Shallow-clone so mutating the returned `body` below does not touch
1012
- // the registry's stored copy — the registry must stay the source of
1013
- // truth across repeated `skill_load` calls.
1014
- const loaded: SkillDefinition = { ...pluginDef };
1015
- loaded.body = loaded.body.replaceAll("{baseDir}", loaded.directoryPath);
1016
- loaded.body = loaded.body.replaceAll(
1017
- "{workspaceDir}",
1018
- getWorkspaceDirDisplay(),
1019
- );
1020
- loaded.body = applyFeatureGatedSections(loaded.body);
1021
- return { skill: loaded };
1022
- }
1023
-
1024
1076
  let loaded: SkillDefinition | null;
1025
1077
  if (skill.bundled) {
1026
1078
  loaded = readBundledSkillFromDirectory(skill.directoryPath);
1027
- } else if (skill.source === "workspace") {
1028
- // Workspace skills live outside ~/.vellum/workspace/skills, so use their parent
1029
- // directory as the root to avoid the isOutsideSkillsRoot rejection.
1079
+ } else if (skill.source === "workspace" || skill.source === "plugin") {
1080
+ // Workspace and plugin-resident skills live outside
1081
+ // $VELLUM_WORKSPACE_DIR/skills, so use the skill's parent directory as the
1082
+ // root to avoid the isOutsideSkillsRoot rejection.
1030
1083
  loaded = readSkillFromDirectory(
1031
1084
  skill.directoryPath,
1032
1085
  dirname(skill.directoryPath),
@@ -1042,6 +1095,7 @@ function loadSkillDefinition(skill: SkillSummary): SkillLookupResult {
1042
1095
  if (!loaded) {
1043
1096
  return { error: `Failed to load SKILL.md for "${skill.id}"` };
1044
1097
  }
1098
+ loaded.owner = skill.owner;
1045
1099
  // Replace {baseDir} placeholders with the actual skill directory path
1046
1100
  loaded.body = loaded.body.replaceAll("{baseDir}", loaded.directoryPath);
1047
1101
  // Replace {workspaceDir} placeholders with the runtime workspace display path