@aiwg/cli 2026.11.5 → 2026.11.7

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 (201) hide show
  1. package/agentic/code/providers/model-capabilities.v1.json +9 -9
  2. package/bin/aiwg.mjs +6 -4
  3. package/dist/src/activity-log/cli.js +1 -1
  4. package/dist/src/agents/agent-deployer.js +1 -1
  5. package/dist/src/artifacts/audit/types.js +1 -1
  6. package/dist/src/artifacts/browser-export.js +1 -0
  7. package/dist/src/artifacts/discover-facets.js +1 -1
  8. package/dist/src/artifacts/enrichment/prompt.js +1 -1
  9. package/dist/src/artifacts/enrichment/types.js +1 -1
  10. package/dist/src/artifacts/fortemi-core-query-adapter.js +2 -0
  11. package/dist/src/artifacts/index-builder.js +1 -0
  12. package/dist/src/artifacts/query-engine-discover-output.js +1 -0
  13. package/dist/src/artifacts/query-engine-discover.js +2 -2
  14. package/dist/src/artifacts/query-engine-scoring.js +7 -0
  15. package/dist/src/artifacts/template-output-kind.js +10 -0
  16. package/dist/src/artifacts/types.js +1 -1
  17. package/dist/src/artifacts/views/definition.js +1 -1
  18. package/dist/src/artifacts/views/types.js +1 -1
  19. package/dist/src/catalog/cli.js +1 -1
  20. package/dist/src/catalog/cli.mjs +1 -1
  21. package/dist/src/catalog/loader.js +1 -1
  22. package/dist/src/catalog/loader.mjs +1 -1
  23. package/dist/src/catalog/types.js +1 -1
  24. package/dist/src/cli/cli-extension-loader.js +19 -5
  25. package/dist/src/cli/cli-extension-paths.js +65 -0
  26. package/dist/src/cli/handlers/best-practices-audit.js +1 -1
  27. package/dist/src/cli/handlers/dataset.js +11 -2
  28. package/dist/src/cli/handlers/help.js +3 -4
  29. package/dist/src/cli/handlers/index.js +1 -1
  30. package/dist/src/cli/handlers/marketplace-plugin-search.js +37 -0
  31. package/dist/src/cli/handlers/marketplace.js +3 -1
  32. package/dist/src/cli/handlers/models.js +1 -1
  33. package/dist/src/cli/handlers/ralph-launcher.js +8 -2
  34. package/dist/src/cli/handlers/ralph.js +1 -1
  35. package/dist/src/cli/handlers/runtime-info.js +1 -1
  36. package/dist/src/cli/handlers/scaffolding.js +2 -2
  37. package/dist/src/cli/handlers/script-runner.js +1 -1
  38. package/dist/src/cli/handlers/sdlc-accelerate.js +1 -1
  39. package/dist/src/cli/handlers/subcommands-bundles.js +1 -1
  40. package/dist/src/cli/handlers/subcommands-list-format.js +19 -1
  41. package/dist/src/cli/handlers/types.js +1 -1
  42. package/dist/src/cli/handlers/update.js +26 -12
  43. package/dist/src/cli/handlers/use.js +6 -5
  44. package/dist/src/cli/handlers/utilities.js +1 -1
  45. package/dist/src/cli/handlers/version.js +1 -1
  46. package/dist/src/cli/handlers/workspace.js +1 -1
  47. package/dist/src/cli/handlers/writing.js +7 -1
  48. package/dist/src/cli/help-generator.js +9 -11
  49. package/dist/src/cli/hooks/builtin/activity-log-hook.js +1 -1
  50. package/dist/src/cli/router.js +1 -1
  51. package/dist/src/cli/workflow-orchestrator.js +1 -1
  52. package/dist/src/config/worker-context.js +37 -7
  53. package/dist/src/config/worker-parallelism.js +11 -0
  54. package/dist/src/contributors/detect.js +1 -1
  55. package/dist/src/contributors/discover.js +1 -1
  56. package/dist/src/contributors/heuristic.js +1 -1
  57. package/dist/src/contributors/index.js +1 -1
  58. package/dist/src/contributors/types.js +1 -1
  59. package/dist/src/contributors/validation.js +1 -1
  60. package/dist/src/dataset/backend-selection.d.ts +3 -0
  61. package/dist/src/dataset/backend-selection.js +11 -0
  62. package/dist/src/dataset/contract-range.d.ts +7 -0
  63. package/dist/src/dataset/contract-range.js +55 -0
  64. package/dist/src/dataset/fortemi-execution-bridge.d.ts +2 -0
  65. package/dist/src/dataset/fortemi-execution-bridge.js +12 -1
  66. package/dist/src/dataset/index.d.ts +2 -0
  67. package/dist/src/dataset/index.js +2 -0
  68. package/dist/src/dataset/orchestration-service.d.ts +1 -1
  69. package/dist/src/dataset/orchestration-service.js +7 -8
  70. package/dist/src/dataset/orchestration-types.d.ts +2 -0
  71. package/dist/src/dataset/service-binding-checkpoints.d.ts +10 -0
  72. package/dist/src/dataset/service-binding-checkpoints.js +26 -0
  73. package/dist/src/dataset/service-binding-contract.d.ts +46 -0
  74. package/dist/src/dataset/service-binding-contract.js +25 -0
  75. package/dist/src/dataset/service-binding-registry.d.ts +12 -0
  76. package/dist/src/dataset/service-binding-registry.js +118 -0
  77. package/dist/src/effects/worker-delivery.js +83 -0
  78. package/dist/src/extensions/capability-index.js +1 -1
  79. package/dist/src/extensions/commands/definitions.js +2 -2
  80. package/dist/src/extensions/deployment-registration.js +1 -1
  81. package/dist/src/extensions/index.js +1 -1
  82. package/dist/src/extensions/loader.js +1 -1
  83. package/dist/src/extensions/manifest.js +27 -9
  84. package/dist/src/extensions/project-local-activity.js +1 -1
  85. package/dist/src/extensions/project-local-discovery.js +2 -2
  86. package/dist/src/extensions/project-local-doctor.js +9 -4
  87. package/dist/src/extensions/project-local-promote.js +3 -3
  88. package/dist/src/extensions/project-local-remove.js +3 -3
  89. package/dist/src/extensions/project-local-scaffold.js +1 -1
  90. package/dist/src/extensions/project-quickref-discovery.js +11 -0
  91. package/dist/src/extensions/project-quickref.js +4 -7
  92. package/dist/src/extensions/registry.js +1 -1
  93. package/dist/src/extensions/shadow-resolver.js +1 -1
  94. package/dist/src/extensions/types.js +1 -1
  95. package/dist/src/extensions/upstream-registry.js +1 -1
  96. package/dist/src/extensions/validation.js +1 -1
  97. package/dist/src/intake/git-history-analyzer.js +1 -1
  98. package/dist/src/kb/cli.js +1 -1
  99. package/dist/src/marketplace/plugin-directory.js +36 -0
  100. package/dist/src/marketplace/plugin-search.js +180 -0
  101. package/dist/src/mcp/cli.mjs +2 -2
  102. package/dist/src/mcp/helpers.mjs +1 -1
  103. package/dist/src/mcp/http-tools.mjs +8 -6
  104. package/dist/src/mcp/http-transport.mjs +3 -1
  105. package/dist/src/mcp/server.mjs +1 -1
  106. package/dist/src/mcp/tools/command-run.mjs +1 -1
  107. package/dist/src/mcp/tools/discovery.mjs +1 -1
  108. package/dist/src/mcp/tools/subsystems.mjs +1 -1
  109. package/dist/src/mcp/tools/worker-invoke.mjs +71 -23
  110. package/dist/src/mcp/tools/worker-launch-ledger.mjs +33 -0
  111. package/dist/src/mcp/tools/worker-local-only-preflight.mjs +79 -0
  112. package/dist/src/mcp/tools/worker-recorded-launch.mjs +26 -0
  113. package/dist/src/mcp/tools/worker-stdin-runtime.mjs +33 -6
  114. package/dist/src/mcp/tools/worker-verify-deliver-schema.mjs +49 -0
  115. package/dist/src/mcp/tools/worker-verify-deliver.mjs +25 -0
  116. package/dist/src/models/catalog-policy.js +2 -2
  117. package/dist/src/models/conductor-data-policy.mjs +83 -14
  118. package/dist/src/models/config-loader.js +2 -2
  119. package/dist/src/models/index.js +2 -2
  120. package/dist/src/models/local-endpoint-models.js +155 -0
  121. package/dist/src/models/model-capabilities.v1.json +9 -9
  122. package/dist/src/models/model-discovery.js +9 -5
  123. package/dist/src/models/opencode-worker-model.mjs +16 -0
  124. package/dist/src/models/resolver.js +2 -2
  125. package/dist/src/models/worker-installation.mjs +5 -3
  126. package/dist/src/models/worker-plan.js +1 -1
  127. package/dist/src/plugin/plugin-installer.js +2 -2
  128. package/dist/src/plugin/registry-validator.js +2 -2
  129. package/dist/src/plugin/skill-command-translator.js +1 -1
  130. package/dist/src/providers/deployment-input-session.d.mts +2 -0
  131. package/dist/src/providers/deployment-input-session.mjs +38 -0
  132. package/dist/src/rlm/cache/hash.js +1 -1
  133. package/dist/src/rlm/cache/store.js +1 -1
  134. package/dist/src/rlm/cache/types.js +1 -1
  135. package/dist/src/serve/worker-invocation-preparation.js +54 -22
  136. package/dist/src/serve/worker-invocation.js +25 -8
  137. package/dist/src/serve/worker-shell-prompt.d.mts +6 -0
  138. package/dist/src/serve/worker-shell-prompt.mjs +78 -0
  139. package/dist/src/skills/run.js +0 -11
  140. package/dist/src/smiths/agentsmith/generator.js +1 -1
  141. package/dist/src/smiths/context-pipeline/index.js +1 -1
  142. package/dist/src/smiths/context-pipeline/provider-policy.js +1 -1
  143. package/dist/src/smiths/context-pipeline/types.js +1 -1
  144. package/dist/src/smiths/mcpsmith/analyzers/cli-analyzer.js +2 -2
  145. package/dist/src/smiths/mcpsmith/generator.js +2 -2
  146. package/dist/src/smiths/mcpsmith/index.js +2 -2
  147. package/dist/src/smiths/mcpsmith/types.js +2 -2
  148. package/dist/src/smiths/skillsmith/collision-detector.js +1 -1
  149. package/dist/src/smiths/skillsmith/namespace-adapter.js +1 -1
  150. package/dist/src/smiths/toolsmith/runtime-discovery.mjs +2 -2
  151. package/dist/src/smiths/toolsmith/types.js +2 -2
  152. package/dist/src/storage/backends/fortemi.js +1 -1
  153. package/dist/src/storage/backends/fs.js +1 -1
  154. package/dist/src/storage/backends/logseq.js +1 -1
  155. package/dist/src/storage/backends/obsidian.js +1 -1
  156. package/dist/src/storage/cli.js +2 -2
  157. package/dist/src/storage/config.js +1 -1
  158. package/dist/src/storage/index.js +1 -1
  159. package/dist/src/storage/subsystem-cli.js +1 -1
  160. package/dist/src/storage/types.js +1 -1
  161. package/dist/src/testing/generators/test-case-generator.js +1 -1
  162. package/dist/src/writing/campaign-patterns.js +96 -0
  163. package/dist/src/writing/campaign-report.js +41 -0
  164. package/dist/src/writing/contextual-diagnostics.js +29 -5
  165. package/dist/src/writing/current-patterns.catalogue.json +87 -0
  166. package/dist/src/writing/current-patterns.js +99 -0
  167. package/dist/src/writing/prose-mask.js +80 -0
  168. package/dist/src/writing/structural-patterns.js +109 -0
  169. package/dist/src/writing/validation-campaign.js +19 -0
  170. package/dist/src/writing/validation-engine.js +18 -11
  171. package/dist/src/writing/validation-rules.js +4 -3
  172. package/package.json +11 -1
  173. package/schemas/dataset/service-binding.v1.schema.json +70 -0
  174. package/schemas/models/model-catalog.v1.schema.json +6 -3
  175. package/tools/agents/providers/base-models-platforms.mjs +87 -48
  176. package/tools/agents/providers/conductor-data-guard.mjs +1 -1
  177. package/tools/agents/providers/rule-deployment-corpus-inputs.mjs +19 -0
  178. package/tools/agents/providers/rule-deployment-input-session.mjs +40 -0
  179. package/tools/agents/providers/rule-deployment-prepare.mjs +15 -6
  180. package/tools/plugin/package-plugins.mjs +2 -0
  181. package/tools/ralph-external/lib/mcp-worker-launch.mjs +67 -0
  182. package/tools/ralph-external/lib/opencode-adapter.mjs +9 -7
  183. package/tools/ralph-external/lib/trusted-verification.mjs +1021 -0
  184. package/tools/ralph-external/lib/typed-stop-delivery.mjs +55 -0
  185. package/tools/ralph-external/lib/verification-isolation.mjs +509 -0
  186. package/tools/ralph-external/lib/worker-context.mjs +3 -3
  187. package/tools/ralph-external/lib/worker-delivery-guards.mjs +141 -0
  188. package/tools/ralph-external/lib/worker-delivery-record.mjs +15 -0
  189. package/tools/ralph-external/lib/worker-final.mjs +4 -1
  190. package/tools/ralph-external/lib/worker-isolation-status.mjs +3 -0
  191. package/tools/ralph-external/lib/worker-launch-cli.mjs +8 -0
  192. package/tools/ralph-external/lib/worker-local-only-paths.mjs +45 -0
  193. package/tools/ralph-external/lib/worker-prompt.mjs +4 -1
  194. package/tools/ralph-external/lib/worker-retry-evidence.mjs +2 -1
  195. package/tools/ralph-external/lib/worker-run-directory-refusal.mjs +2 -1
  196. package/tools/ralph-external/lib/worker-run-directory.mjs +45 -0
  197. package/tools/ralph-external/lib/worker-unit-cleanup.mjs +10 -2
  198. package/tools/ralph-external/lib/worker-verification-cli.mjs +164 -0
  199. package/tools/ralph-external/lib/worktree-preparation.mjs +417 -0
  200. package/tools/ralph-external/session-launcher.mjs +8 -15
  201. package/vscode-extension/schemas/aiwg.config.v1.json +27 -0
@@ -3,14 +3,14 @@
3
3
  *
4
4
  * Validates `.aiwg/{extensions,addons,frameworks,plugins,providers}/<name>/manifest.json`
5
5
  * for project-local artifact bundles. Implements the design in
6
- * `.aiwg/architecture/design-manifest-schema.md` (#1044).
6
+ * `docs/project-local/manifest-reference.md` (#1044).
7
7
  *
8
8
  * Layered above the per-artifact Extension type validation in `validation.ts`:
9
9
  * the bundle manifest declares the bundle (a directory containing artifacts);
10
10
  * the existing schemas validate individual artifact bodies inside the bundle.
11
11
  *
12
12
  * @implements #1044
13
- * @architecture .aiwg/architecture/design-manifest-schema.md
13
+ * @architecture docs/project-local/manifest-reference.md
14
14
  */
15
15
  import { z } from 'zod';
16
16
  import { integer, dateTime, url } from '../schema/zod-validation.mjs';
@@ -49,6 +49,7 @@ const bundleNamePattern = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;
49
49
  // Per-type config blocks
50
50
  // ============================================
51
51
  const ArtifactListsSchema = z.object({
52
+ flows: z.array(z.string()).max(200).optional(),
52
53
  agents: z.array(z.string()).max(200).optional(),
53
54
  skills: z.array(z.string()).max(500).optional(),
54
55
  rules: z.array(z.string()).max(200).optional(),
@@ -60,6 +61,7 @@ const ArtifactListsSchema = z.object({
60
61
  gatePacks: z.array(z.string().min(1).max(128)).max(50).optional(),
61
62
  });
62
63
  const EntryPathsSchema = z.strictObject({
64
+ flows: safeRelativePath.optional(),
63
65
  agents: safeRelativePath.optional(),
64
66
  skills: safeRelativePath.optional(),
65
67
  rules: safeRelativePath.optional(),
@@ -265,6 +267,19 @@ export const BundleManifestSchema = z.strictObject({
265
267
  }
266
268
  return presentCount === 1 && present[m.type];
267
269
  }, { error: 'type must match its corresponding *Config block (addon→addonConfig, framework→frameworkConfig, plugin→pluginConfig, provider→providerConfig; extension may omit extensionConfig)' });
270
+ /** Format a field diagnostic consistently with `aiwg list --project-local`. */
271
+ export function formatManifestValidationError(error) {
272
+ return `${error.field}: expected ${error.expected}, got ${error.actual}`
273
+ + (error.hint ? `; hint: ${error.hint}` : '');
274
+ }
275
+ function stringifyManifestValue(value) {
276
+ try {
277
+ return JSON.stringify(value) ?? String(value);
278
+ }
279
+ catch {
280
+ return String(value);
281
+ }
282
+ }
268
283
  /**
269
284
  * Convert a Zod error into the structured ManifestValidationError shape used
270
285
  * by discovery and `aiwg validate-metadata`.
@@ -291,22 +306,25 @@ export function zodErrorToValidationErrors(err, manifestPath, input) {
291
306
  const keys = issue.keys.map((key) => `"${String(key)}"`).join(', ');
292
307
  actual = `unknown key(s): ${keys}`;
293
308
  }
294
- if (issue.code === 'invalid_type' && hasInput) {
309
+ if ((issue.code === 'invalid_type' || issue.code === 'invalid_value') && hasInput) {
295
310
  let value = input;
296
311
  for (const segment of issue.path) {
297
312
  value = value !== null && typeof value === 'object' && Object.hasOwn(value, segment)
298
313
  ? value[segment] : undefined;
299
314
  }
300
- // Emit only the former type classification, never rejected values.
301
- actual = value === null ? 'null' : Array.isArray(value) ? 'array'
302
- : typeof value === 'number' && Number.isNaN(value) ? 'nan'
303
- : issue.expected === 'int' && typeof value === 'number' ? 'float'
304
- : typeof value;
315
+ // Enum diagnostics need the rejected value; type errors retain their classification.
316
+ actual = issue.code === 'invalid_value' ? stringifyManifestValue(value)
317
+ : value === null ? 'null' : Array.isArray(value) ? 'array'
318
+ : typeof value === 'number' && Number.isNaN(value) ? 'nan'
319
+ : issue.expected === 'int' && typeof value === 'number' ? 'float'
320
+ : typeof value;
305
321
  }
306
322
  return {
307
323
  path: manifestPath,
308
324
  field: issue.path.join('.') || '(root)',
309
- expected: issue.message,
325
+ expected: issue.code === 'invalid_value' && Array.isArray(issue.values)
326
+ ? `one of ${issue.values.map(stringifyManifestValue).join('|')}`
327
+ : issue.message,
310
328
  actual,
311
329
  severity: 'error',
312
330
  };
@@ -10,7 +10,7 @@
10
10
  * per-event entries (per-bundle, per-provider) at finer granularity, as
11
11
  * specified by the design doc.
12
12
  *
13
- * @design @.aiwg/architecture/design-doctor-log-promote.md
13
+ * @design @docs/customization/project-local-lifecycle.md
14
14
  * @implements #1037
15
15
  * @issue #1049
16
16
  */
@@ -6,8 +6,8 @@
6
6
  * deployment side effects.
7
7
  *
8
8
  * @implements #1034
9
- * @architecture .aiwg/architecture/adr-aiwg-directory-layout.md (#1039)
10
- * @architecture .aiwg/architecture/design-manifest-schema.md (#1044)
9
+ * @architecture docs/architecture/cli/extending-cli.md (#1039)
10
+ * @architecture docs/project-local/manifest-reference.md (#1044)
11
11
  */
12
12
  import { readFile, readdir, lstat, stat, access, realpath } from 'fs/promises';
13
13
  import { join, relative, resolve, sep } from 'path';
@@ -2,17 +2,18 @@
2
2
  * Project-Local Doctor Section
3
3
  *
4
4
  * Builds the "Project-local artifacts" section for `aiwg doctor` output
5
- * per the spec at @.aiwg/architecture/design-doctor-log-promote.md (#1049).
5
+ * per the spec at @docs/customization/project-local-lifecycle.md (#1049).
6
6
  *
7
7
  * Pure function over (projectDir, frameworkRoot) — returns a string. The
8
8
  * doctor handler in src/cli/handlers/utilities.ts is responsible for
9
9
  * printing it. Section is fully suppressed when no project-local dirs
10
10
  * are present.
11
11
  *
12
- * @design @.aiwg/architecture/design-doctor-log-promote.md
12
+ * @design @docs/customization/project-local-lifecycle.md
13
13
  * @implements #1037
14
14
  */
15
15
  import { join } from 'path';
16
+ import { cliExtensionSourceWarnings } from '../cli/cli-extension-paths.js';
16
17
  import { readFile, readdir } from 'fs/promises';
17
18
  import { discoverProjectLocalBundles } from './project-local-discovery.js';
18
19
  import { parseRuleFrontmatter, formatRuleFrontmatterError } from '../rules/activation.mjs';
@@ -20,6 +21,7 @@ import { buildUpstreamRegistry } from './upstream-registry.js';
20
21
  import { resolveShadows } from './shadow-resolver.js';
21
22
  import { checkBundleManifestIgnored } from './project-local-gitignore.js';
22
23
  import { sha256OfFileRawAndNormalized } from './managed-marker.js';
24
+ import { formatManifestValidationError } from './manifest.js';
23
25
  import { projectAiwgPath } from '../config/project-artifacts.js';
24
26
  import { projectRelativePathIfInside } from './project-local-paths.js';
25
27
  import { auditProjectQuickref } from './project-quickref.js';
@@ -103,6 +105,7 @@ async function collectBundleRuleFiles(artifactPath) {
103
105
  export async function buildProjectLocalDoctorSection(opts) {
104
106
  const { projectDir, frameworkRoot, config, quiet = false } = opts;
105
107
  const discovery = await discoverProjectLocalBundles(projectDir);
108
+ const cliWarnings = await cliExtensionSourceWarnings(projectDir);
106
109
  const quickrefAudit = await auditProjectQuickref(projectDir, config?.providers ?? []);
107
110
  const quickrefErrors = [...quickrefAudit.errors];
108
111
  if (quickrefAudit.exists) {
@@ -118,10 +121,12 @@ export async function buildProjectLocalDoctorSection(opts) {
118
121
  }
119
122
  }
120
123
  // No project-local content → no section at all
121
- if (discovery.isEmpty && discovery.errors.length === 0 && !quickrefAudit.exists && quickrefErrors.length === 0) {
124
+ if (discovery.isEmpty && discovery.errors.length === 0 && !quickrefAudit.exists && quickrefErrors.length === 0 && cliWarnings.length === 0) {
122
125
  return { output: '', validationErrors: 0, denylistViolations: 0, driftCount: 0, undeployedCount: 0, hasFailures: false };
123
126
  }
124
127
  const lines = ['', '── Project-local artifacts ────────────────────────────────────'];
128
+ for (const warning of cliWarnings)
129
+ lines.push(` ⚠ ${warning}`);
125
130
  // Counts
126
131
  if (!quiet) {
127
132
  lines.push(` Discovered: ${discovery.bundles.length} bundle${discovery.bundles.length === 1 ? '' : 's'}`);
@@ -167,7 +172,7 @@ export async function buildProjectLocalDoctorSection(opts) {
167
172
  else {
168
173
  lines.push(` Validation: ✗ ${validationErrors} error${validationErrors === 1 ? '' : 's'}`);
169
174
  for (const e of discovery.errors.slice(0, 10)) {
170
- lines.push(` ✗ ${e.path}: ${e.field} — ${e.actual}`);
175
+ lines.push(` ✗ ${e.path}: ${formatManifestValidationError(e)}`);
171
176
  }
172
177
  const quickrefShown = quickrefErrors.slice(0, Math.max(0, 10 - discovery.errors.length));
173
178
  for (const error of quickrefShown) {
@@ -2,11 +2,11 @@
2
2
  * Project-Local Bundle Promotion (Graduate)
3
3
  *
4
4
  * Operationalizes the identical-form portability invariant from
5
- * @.aiwg/architecture/adr-identical-form-portability.md (#1038): a
5
+ * @docs/customization/project-local-lifecycle.md (#1038): a
6
6
  * project-local bundle should graduate to upstream (or to a private
7
7
  * corpus path) by byte-identical copy.
8
8
  *
9
- * Per the design at @.aiwg/architecture/design-doctor-log-promote.md
9
+ * Per the design at @docs/customization/project-local-lifecycle.md
10
10
  * (#1049), promote performs:
11
11
  * 1. Pre-flight checks (bundle exists, manifest valid, no project-
12
12
  * local @-refs, destination doesn't exist, identical-form layout)
@@ -17,7 +17,7 @@
17
17
  * 6. Optional --cleanup: remove .aiwg/<type>/<name>/ source
18
18
  * 7. Activity log entry
19
19
  *
20
- * @design @.aiwg/architecture/design-doctor-log-promote.md
20
+ * @design @docs/customization/project-local-lifecycle.md
21
21
  * @implements #1037
22
22
  */
23
23
  import { createHash } from 'crypto';
@@ -2,14 +2,14 @@
2
2
  * Project-Local Bundle Remove
3
3
  *
4
4
  * Reverts a project-local bundle's deployed artifacts from provider paths
5
- * per the case table in `.aiwg/architecture/design-aiwg-remove-revert.md`
5
+ * per the case table in `docs/customization/project-local-lifecycle.md`
6
6
  * (#1048). Reads artifactHashes from the registry to detect pristine vs
7
7
  * mutated vs replaced files.
8
8
  *
9
9
  * Source under `.aiwg/<type>/<name>/` is NEVER deleted (load-bearing
10
10
  * invariant — `--force` does not change this).
11
11
  *
12
- * @design @.aiwg/architecture/design-aiwg-remove-revert.md
12
+ * @design @docs/customization/project-local-lifecycle.md
13
13
  * @implements #1037
14
14
  */
15
15
  import { lstat, readdir, readFile, stat, unlink, rmdir } from 'fs/promises';
@@ -232,7 +232,7 @@ function resolveOwnership(config, selfBundleId, provider, sourceRel) {
232
232
  }
233
233
  /**
234
234
  * Remove a project-local bundle's deploys per the design at
235
- * `.aiwg/architecture/design-aiwg-remove-revert.md`.
235
+ * `docs/customization/project-local-lifecycle.md`.
236
236
  *
237
237
  * Pure function over (config, projectDir, opts). The caller is responsible
238
238
  * for persisting the returned (mutated) config.
@@ -8,7 +8,7 @@
8
8
  * The output is byte-identical-shaped to upstream addon directories so
9
9
  * `aiwg promote` can graduate it without any rewrite.
10
10
  *
11
- * @design @.aiwg/architecture/adr-identical-form-portability.md (#1038)
11
+ * @design @docs/customization/project-local-lifecycle.md (#1038)
12
12
  * @implements #1050
13
13
  */
14
14
  import { mkdir, writeFile, stat } from 'fs/promises';
@@ -0,0 +1,11 @@
1
+ // Build quickrefs from validated bundles while retaining rejected sibling diagnostics.
2
+ import { discoverProjectLocalBundles } from './project-local-discovery.js';
3
+ import { formatManifestValidationError } from './manifest.js';
4
+ export async function discoverProjectQuickrefBundles(projectDir) {
5
+ const discovery = await discoverProjectLocalBundles(projectDir);
6
+ return {
7
+ ...discovery,
8
+ warnings: discovery.errors.map(error => `${error.path}: ${formatManifestValidationError(error)}`),
9
+ };
10
+ }
11
+ //# sourceMappingURL=project-quickref-discovery.js.map
@@ -16,7 +16,7 @@ import { resolveHermesHome } from '../providers/hermes-home.js';
16
16
  import { OPERATIONAL_SHOW_TYPES } from '../artifacts/types.js';
17
17
  import { projectAiwgPath } from '../config/project-artifacts.js';
18
18
  import { appendAiwgSourceTrackBlock } from './project-local-gitignore.js';
19
- import { discoverProjectLocalBundles } from './project-local-discovery.js';
19
+ import { discoverProjectQuickrefBundles } from './project-quickref-discovery.js';
20
20
  import { enumerateBundleArtifacts } from './shadow-resolver.js';
21
21
  const OWNERSHIP_MARKER = '.aiwg-project-quickref.json';
22
22
  const ShowHintSchema = z.strictObject({
@@ -180,16 +180,13 @@ export async function resolveProjectQuickref(projectDir) {
180
180
  };
181
181
  }
182
182
  const managed = await loadManagedConfig(projectDir);
183
- const discovery = await discoverProjectLocalBundles(projectDir);
184
- if (discovery.errors.length > 0) {
185
- throw new Error(discovery.errors.map(error => `${error.path}: ${error.field}: ${error.actual}`).join('\n'));
186
- }
183
+ const discovery = await discoverProjectQuickrefBundles(projectDir);
187
184
  if (!managed.config && discovery.bundles.length === 0) {
188
- return { exists: false, sourcePath: managed.path, provenance: 'managed', warnings: [] };
185
+ return { exists: false, sourcePath: managed.path, provenance: 'managed', warnings: discovery.warnings };
189
186
  }
190
187
  const config = managed.config ?? ProjectQuickrefConfigSchema.parse({ version: '1' });
191
188
  const excluded = new Set(config.discovery.excludeBundles.map(id => id.toLowerCase()));
192
- const warnings = [];
189
+ const warnings = discovery.warnings;
193
190
  const candidates = [];
194
191
  if (config.discovery.enabled) {
195
192
  for (const bundle of discovery.bundles) {
@@ -4,7 +4,7 @@
4
4
  * Provides efficient storage, indexing, and retrieval of AIWG extensions.
5
5
  * Supports O(1) lookup by ID, type-based indexing, and command alias resolution.
6
6
  *
7
- * @architecture @.aiwg/architecture/unified-extension-schema.md
7
+ * @architecture @docs/architecture/cli/extending-cli.md
8
8
  * @tests @test/unit/extensions/registry.test.ts
9
9
  * @version 1.0.0
10
10
  */
@@ -2,7 +2,7 @@
2
2
  * Shadow Resolver
3
3
  *
4
4
  * Implements the override / shadow-resolution policy from
5
- * `.aiwg/architecture/adr-override-shadow-policy.md` (#1041) for project-local
5
+ * `docs/customization/project-local-lifecycle.md` (#1041) for project-local
6
6
  * artifact bundles deployed via `aiwg use` / `aiwg refresh`.
7
7
  *
8
8
  * Resolves the seven cases from ADR §4:
@@ -5,7 +5,7 @@
5
5
  * hooks, tools, and MCP servers. Enables dynamic discovery, semantic search,
6
6
  * and unified help generation.
7
7
  *
8
- * @architecture @.aiwg/architecture/unified-extension-schema.md
8
+ * @architecture @docs/architecture/cli/extending-cli.md
9
9
  * @version 1.0.0
10
10
  */
11
11
  // ============================================
@@ -10,7 +10,7 @@
10
10
  *
11
11
  * Consumed by the shadow resolver (#1036) to detect collisions between project-
12
12
  * local bundles and upstream artifacts and apply the override / safety-critical
13
- * denylist policy from `.aiwg/architecture/adr-override-shadow-policy.md`.
13
+ * denylist policy from `docs/customization/project-local-lifecycle.md`.
14
14
  *
15
15
  * @implements #1036
16
16
  */
@@ -5,7 +5,7 @@
5
5
  * error messages. Ensures extension manifests conform to the unified schema.
6
6
  *
7
7
  * @implements @.aiwg/requirements/use-cases/UC-003-extension-validation.md
8
- * @architecture @.aiwg/architecture/unified-extension-schema.md
8
+ * @architecture @docs/architecture/cli/extending-cli.md
9
9
  * @tests @test/unit/extensions/validation.test.ts
10
10
  * @version 1.0.0
11
11
  */
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @module src/intake/git-history-analyzer
8
8
  * @implements @.aiwg/requirements/use-cases/UC-003-generate-intake-from-codebase.md
9
- * @architecture @.aiwg/architecture/software-architecture-doc.md - Section 5.2 Intake Coordinator
9
+ * @architecture @docs/architecture/cli/index.md
10
10
  * @tests @test/unit/intake/git-history-analyzer.test.ts
11
11
  * @command @.claude/commands/intake-from-codebase.md
12
12
  * @agent @agentic/code/frameworks/sdlc-complete/agents/intake-coordinator.md
@@ -13,7 +13,7 @@
13
13
  * put <path> Write stdin contents to an entry (creates parents)
14
14
  * delete <path> Delete an entry (no-op if missing)
15
15
  *
16
- * @design @.aiwg/architecture/storage-design.md (§4, §5)
16
+ * @design @docs/storage/overview.md
17
17
  * @issue #934
18
18
  * @issue #965
19
19
  */
@@ -0,0 +1,36 @@
1
+ const record = (value) => value !== null && typeof value === 'object' ? value : {};
2
+ export function repositoryKey(value) {
3
+ if (typeof value !== 'string')
4
+ return null;
5
+ try {
6
+ const url = new URL(value);
7
+ return `${url.hostname.toLowerCase()}${url.pathname.replace(/\.git\/?$/, '').replace(/\/$/, '')}`.toLowerCase();
8
+ }
9
+ catch {
10
+ return /^[\w.-]+\/[\w.-]+$/.test(value) ? `github.com/${value.toLowerCase().replace(/\.git$/, '')}` : null;
11
+ }
12
+ }
13
+ export function pluginRepository(plugin, marketplaceSource) {
14
+ const source = record(record(plugin).source);
15
+ const market = record(marketplaceSource);
16
+ return repositoryKey(source.url ?? source.repo) ?? repositoryKey(market.repo ?? market.url);
17
+ }
18
+ export function normalizeDirectoryListing(raw, entryNames, targets) {
19
+ const entry = record(raw);
20
+ if (typeof entry.id !== 'string')
21
+ return null;
22
+ const repository = record(record(entry.source).repository);
23
+ const key = repositoryKey(repository.url);
24
+ const slug = record(entryNames)[entry.id];
25
+ const name = typeof slug === 'string' && slug ? slug : typeof entry.name === 'string' ? entry.name : null;
26
+ if (!name)
27
+ return null;
28
+ const matches = targets.filter(target => key !== null && target.repository === key && target.name === name);
29
+ const matching = matches.length === 1 ? matches[0] : undefined;
30
+ return {
31
+ plugin: { ...entry, name, description: entry.summary, repository: repository.url },
32
+ marketplace: matching?.marketplace ?? undefined,
33
+ directoryId: matching ? undefined : entry.id,
34
+ };
35
+ }
36
+ //# sourceMappingURL=plugin-directory.js.map
@@ -0,0 +1,180 @@
1
+ // Read provider-owned plugin manifests and caches without fetching or changing state.
2
+ import { normalizeDirectoryListing, pluginRepository, repositoryKey } from './plugin-directory.js';
3
+ import fs from 'node:fs';
4
+ import os from 'node:os';
5
+ import path from 'node:path';
6
+ const object = (value) => value !== null && typeof value === 'object' && !Array.isArray(value)
7
+ ? value : {};
8
+ const string = (value) => typeof value === 'string' && value.trim() ? value : undefined;
9
+ function date(value) {
10
+ if (typeof value !== 'string' && typeof value !== 'number')
11
+ return null;
12
+ const milliseconds = typeof value === 'number' && value < 1e12 ? value * 1000 : value;
13
+ const parsed = new Date(milliseconds);
14
+ return Number.isFinite(parsed.getTime()) ? parsed.toISOString() : null;
15
+ }
16
+ function asOf(value) {
17
+ return date(value.lastUpdated ?? value.updatedAt ?? value.fetchedAt ?? value.timestamp);
18
+ }
19
+ function entries(value) {
20
+ return Array.isArray(value) ? value.map((entry, index) => [String(index), entry]) : Object.entries(object(value));
21
+ }
22
+ export function searchProviderPlugins(query, options = {}) {
23
+ const maxAgeDays = options.maxAgeDays ?? 30;
24
+ if (!Number.isFinite(maxAgeDays) || maxAgeDays < 0)
25
+ throw new Error('--max-age-days must be a non-negative number');
26
+ const report = {
27
+ query, marketplaces: [], results: [], warnings: [],
28
+ ranking: 'Matched terms, review tier (anthropic > partner > none/unknown), installs, cache date; descending. Signals are observations, not ratings or capability measurements.',
29
+ };
30
+ const provider = options.provider ?? 'all';
31
+ if (!['all', 'claude', 'codex'].includes(provider))
32
+ throw new Error('Plugin search supports --provider all, claude or codex');
33
+ if (provider !== 'claude')
34
+ report.warnings.push('Codex marketplace.json search deferred pending a stable local manifest/configuration contract (#783). Other provider formats are not yet supported.');
35
+ if (provider === 'codex')
36
+ return report;
37
+ const base = path.join(options.claudeConfigDir ?? process.env.CLAUDE_CONFIG_DIR
38
+ ?? path.join(options.home ?? os.homedir(), '.claude'), 'plugins');
39
+ const now = options.now ?? Date.now();
40
+ function read(file, required = false) {
41
+ try {
42
+ const parsed = JSON.parse(fs.readFileSync(file, 'utf8'));
43
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed))
44
+ throw new Error('Expected a JSON object');
45
+ return object(parsed);
46
+ }
47
+ catch (error) {
48
+ if (required || error.code !== 'ENOENT') {
49
+ report.warnings.push(`Unable to read marketplace data: ${file}`);
50
+ }
51
+ return null;
52
+ }
53
+ }
54
+ function checkAge(file, timestamp) {
55
+ if (!timestamp)
56
+ report.warnings.push(`Cache date unknown: ${file}`);
57
+ else if (Date.parse(timestamp) > now)
58
+ report.warnings.push(`Cache date is in the future: ${file} (as of ${timestamp})`);
59
+ else if (now - Date.parse(timestamp) > maxAgeDays * 86_400_000) {
60
+ report.warnings.push(`Stale cache: ${file} (as of ${timestamp}; maximum age ${maxAgeDays} days)`);
61
+ }
62
+ }
63
+ const results = new Map();
64
+ function add(raw, marketplace, source, timestamp, key, directoryId, repository) {
65
+ const entry = object(raw);
66
+ const plugin = Object.keys(object(entry.plugin)).length ? object(entry.plugin) : entry;
67
+ const coordinate = string(entry.id) ?? (key?.includes('@') ? key : undefined);
68
+ const split = coordinate?.lastIndexOf('@') ?? -1;
69
+ const name = string(plugin.name) ?? (split > 0 ? coordinate?.slice(0, split) : undefined);
70
+ const market = marketplace ?? string(entry.marketplace) ?? string(object(entry.marketplace).name)
71
+ ?? string(entry.marketplaceName) ?? (split > 0 ? coordinate?.slice(split + 1) : undefined);
72
+ if (!name || (!market && !directoryId))
73
+ return;
74
+ const id = directoryId ? `directory:${directoryId}` : `${name}@${market}`;
75
+ const previous = results.get(id);
76
+ const keywords = Array.isArray(plugin.keywords) ? plugin.keywords.filter((item) => typeof item === 'string') : [];
77
+ const reviewType = object(object(object(entry.checks).review).by).type;
78
+ const review = ['anthropic', 'partner', 'none'].includes(String(reviewType))
79
+ ? reviewType : null;
80
+ const observedAt = asOf(entry) ?? timestamp;
81
+ results.set(id, {
82
+ id, name, marketplace: market ?? null, provider: 'claude',
83
+ repository: repository ?? repositoryKey(plugin.repository) ?? previous?.repository ?? null,
84
+ description: string(plugin.description) ?? previous?.description ?? '',
85
+ category: string(plugin.category) ?? previous?.category ?? null,
86
+ keywords: [...new Set([...(previous?.keywords ?? []), ...keywords])],
87
+ sources: [...new Set([...(previous?.sources ?? []), source])],
88
+ cacheAsOf: observedAt ?? previous?.cacheAsOf ?? null,
89
+ installs: previous?.installs ?? { value: null, asOf: null },
90
+ review: review ? { value: review, asOf: observedAt } : previous?.review ?? { value: null, asOf: null },
91
+ matchedTerms: [], installSkill: 'install-plugin',
92
+ installHelp: 'aiwg show skill install-plugin',
93
+ });
94
+ }
95
+ const registryFile = path.join(base, 'known_marketplaces.json');
96
+ const registry = read(registryFile);
97
+ for (const [name, value] of Object.entries(registry ?? {}).sort(([a], [b]) => a.localeCompare(b))) {
98
+ const config = object(value);
99
+ const location = string(config.installLocation);
100
+ // Registry names must never escape the provider's marketplaces directory.
101
+ if (!location && (name === '.' || name === '..' || /[\\/]/.test(name))) {
102
+ report.warnings.push(`Invalid marketplace name: ${name}`);
103
+ continue;
104
+ }
105
+ const manifest = path.join(location ? path.resolve(base, location) : path.join(base, 'marketplaces', name), '.claude-plugin/marketplace.json');
106
+ const data = read(manifest, true);
107
+ const timestamp = asOf(data ?? {}) ?? asOf(config);
108
+ report.marketplaces.push({ name, provider: 'claude', manifest, asOf: timestamp });
109
+ if (!data)
110
+ continue;
111
+ checkAge(manifest, timestamp);
112
+ for (const [key, plugin] of entries(data.plugins))
113
+ add(plugin, name, manifest, timestamp, key, undefined, pluginRepository(plugin, config.source));
114
+ }
115
+ const directoryFile = path.join(base, 'plugin-directory-cache-v2.json');
116
+ const directory = read(directoryFile);
117
+ if (directory) {
118
+ const timestamp = asOf(directory);
119
+ checkAge(directoryFile, timestamp);
120
+ if (!directory.plugins && !directory.listings)
121
+ report.warnings.push(`Unrecognized directory cache format: ${directoryFile}`);
122
+ const manifestTargets = [...results.values()];
123
+ for (const [key, plugin] of entries(directory.plugins))
124
+ add(plugin, undefined, directoryFile, timestamp, key);
125
+ // V2 directory IDs do not encode marketplace membership. Join only on
126
+ // both repository identity and the provider's recorded entry name.
127
+ for (const [, listing] of entries(directory.listings)) {
128
+ const normalized = normalizeDirectoryListing(listing, directory.entryNames, manifestTargets);
129
+ if (normalized)
130
+ add(normalized.plugin, normalized.marketplace, directoryFile, timestamp, undefined, normalized.directoryId);
131
+ }
132
+ }
133
+ const countsFile = path.join(base, 'install-counts-cache.json');
134
+ const counts = read(countsFile);
135
+ if (counts) {
136
+ const timestamp = asOf(counts);
137
+ checkAge(countsFile, timestamp);
138
+ if (!counts.counts)
139
+ report.warnings.push(`Unrecognized install-count cache format: ${countsFile}`);
140
+ for (const [key, value] of entries(counts.counts)) {
141
+ const entry = object(value);
142
+ const id = string(entry.plugin) ?? string(entry.id) ?? key;
143
+ const result = results.get(id);
144
+ const installs = entry.unique_installs;
145
+ if (result && typeof installs === 'number' && Number.isSafeInteger(installs) && installs >= 0) {
146
+ result.installs = { value: installs, asOf: asOf(entry) ?? timestamp };
147
+ }
148
+ }
149
+ }
150
+ const terms = [...new Set(query.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [])];
151
+ const tier = (result) => ({ anthropic: 2, partner: 1, none: 0 })[result.review.value ?? 'none'];
152
+ report.results = [...results.values()].filter(result => {
153
+ const text = [result.name, result.description, result.category, ...result.keywords].join(' ').toLowerCase();
154
+ result.matchedTerms = terms.filter(term => text.includes(term));
155
+ return terms.length > 0 && result.matchedTerms.length > 0;
156
+ }).sort((a, b) => b.matchedTerms.length - a.matchedTerms.length || tier(b) - tier(a)
157
+ || (b.installs.value ?? -1) - (a.installs.value ?? -1)
158
+ || Date.parse(b.cacheAsOf ?? '1970-01-01') - Date.parse(a.cacheAsOf ?? '1970-01-01')
159
+ || a.id.localeCompare(b.id));
160
+ if (!registry && !directory)
161
+ report.warnings.push('No local Claude marketplace manifests or directory cache found; nothing was fetched.');
162
+ return report;
163
+ }
164
+ export function formatPluginSearch(report) {
165
+ const clean = (value) => value.replace(/[\u0000-\u001f\u007f-\u009f]/g, ' ');
166
+ const lines = [`Plugin marketplace search: ${clean(report.query)}`,
167
+ `Configured marketplaces: ${report.marketplaces.map(market => clean(market.name)).join(', ') || 'none'}`,
168
+ 'Plugin / ID | Marketplace | Installs (as of) | Review (as of) | Cache as of | Description'];
169
+ for (const result of report.results)
170
+ lines.push([
171
+ clean(result.marketplace ? result.id : `${result.name} / ${result.id}`), clean(result.marketplace ?? 'unknown'),
172
+ `${result.installs.value ?? 'unknown'} (${result.installs.asOf ?? 'unknown'})`,
173
+ `${result.review.value ?? 'unknown'} (${result.review.asOf ?? 'unknown'})`, result.cacheAsOf ?? 'unknown', clean(result.description),
174
+ ].join(' | '));
175
+ if (!report.results.length)
176
+ lines.push('No results found.');
177
+ lines.push(report.ranking, 'Installation guidance for a selected ID: aiwg show skill install-plugin');
178
+ return lines.join('\n');
179
+ }
180
+ //# sourceMappingURL=plugin-search.js.map
@@ -628,7 +628,7 @@ CORE TOOLS (19, always registered):
628
628
  aiwg_authorization_grant_lookup Read-only list/search/explain of signed grants
629
629
  aiwg_authorization_grant_request Save a bounded grant only after native form confirmation
630
630
 
631
- OPT-IN TOOLSETS (71 additional tools, including explicit workers):
631
+ OPT-IN TOOLSETS (72 additional tools, including explicit workers):
632
632
  flows flow-list / flow-show / flow-run
633
633
  missions mission-guide / mission-dispatch / mission-status / worker-resolve
634
634
  memory memory-* and reflections-* storage operations
@@ -641,7 +641,7 @@ OPT-IN TOOLSETS (71 additional tools, including explicit workers):
641
641
  ops status / list / use / push
642
642
  sandbox fleet inventory / mutation / reconciliation and governed activity
643
643
  decision validation / evaluation / rules / features / calibration
644
- workers worker-invoke (explicit opt-in; all excludes workers)
644
+ workers worker-invoke, worker-verify-deliver (explicit opt-in; all excludes workers)
645
645
 
646
646
  Enable opt-in tools:
647
647
  AIWG_MCP_TOOLSETS=flows,missions,memory,kb,ralph,sandbox aiwg mcp serve
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * AIWG MCP Server — Shared Helpers
3
3
  *
4
- * @architecture @.aiwg/architecture/sketch-hermes-mcp-parity.md
4
+ * @architecture @docs/cli/agent-usage.md
5
5
  * @issues #1311 (scope split), #1312 (command-run), #1313 (discover + pairs)
6
6
  */
7
7
 
@@ -14,25 +14,27 @@ function containsCliOption(value) {
14
14
  return false;
15
15
  }
16
16
 
17
- export function remoteToolPolicy(projectDir, tools) {
17
+ export function remoteToolPolicy(projectDir, tools, { verifiedDeliveryOnly = false } = {}) {
18
18
  const selected = tools === undefined ? undefined : new Set(tools);
19
19
  const exposed = new Set();
20
20
  const children = new Set();
21
21
  let active = 0;
22
22
  return {
23
23
  configureTool(name, config, handler) {
24
- const allowed = name === 'discover' || name.endsWith('-show') || name === 'artifact-write';
24
+ const allowed = name === 'discover' || name.endsWith('-show') || (name === 'artifact-write' && !verifiedDeliveryOnly) || name === 'worker-verify-deliver' || name === 'worker-invoke';
25
25
  if (!allowed || (selected && !selected.has(name))) return undefined;
26
26
  exposed.add(name);
27
27
  const shape = config.inputSchema?.shape ?? {};
28
- const inputSchema = z.strictObject(Object.fromEntries(
29
- Object.entries(shape).filter(([key]) => !scopeFields.has(key)),
28
+ // This tool's strict publication union already excludes every scope
29
+ // override; reconstructing its shape would discard union validation.
30
+ const inputSchema = name === 'worker-verify-deliver' ? config.inputSchema : z.strictObject(Object.fromEntries(
31
+ Object.entries(shape).filter(([key]) => !scopeFields.has(key) || (name === 'worker-invoke' && key === 'workdir')),
30
32
  ));
31
33
  return { config: { ...config, inputSchema }, handler: async (args, extra) => {
32
34
  extra.signal.throwIfAborted();
33
35
  // CLI-backed cards must not reinterpret data values as scope/source flags.
34
36
  // artifact-write uses openArtifact directly and spawns no CLI.
35
- if (name !== 'artifact-write' && containsCliOption(args)) {
37
+ if (name !== 'artifact-write' && name !== 'worker-verify-deliver' && name !== 'worker-invoke' && containsCliOption(args)) {
36
38
  throw new Error('Tool arguments must not contain CLI options');
37
39
  }
38
40
  active++;
@@ -44,7 +46,7 @@ export function remoteToolPolicy(projectDir, tools) {
44
46
  drain: () => Promise.allSettled([...children]),
45
47
  validate() {
46
48
  if (selected && [...selected].some(name => !exposed.has(name))) {
47
- throw new Error('--tools must name only available discover, *-show or artifact-write tools; enable required --toolsets explicitly');
49
+ throw new Error('--tools must name only available discover, *-show, artifact-write, worker-invoke or worker-verify-deliver tools; enable required --toolsets explicitly');
48
50
  }
49
51
  },
50
52
  };