@aiwg/cli 2026.10.19 → 2026.11.1

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 (143) hide show
  1. package/README.md +1 -0
  2. package/agentic/code/providers/flue/README.md +2 -1
  3. package/dist/src/artifacts/cli.js +3 -2
  4. package/dist/src/artifacts/discover-facets.js +2 -0
  5. package/dist/src/artifacts/discover-session-facets.js +14 -0
  6. package/dist/src/artifacts/fortemi-core-query-adapter.js +4 -4
  7. package/dist/src/artifacts/framework-capabilities.js +7 -3
  8. package/dist/src/artifacts/index-builder.js +2 -3
  9. package/dist/src/artifacts/query-engine-discover-output.js +3 -3
  10. package/dist/src/artifacts/query-engine-discover.js +61 -14
  11. package/dist/src/artifacts/query-engine-entries.js +52 -9
  12. package/dist/src/artifacts/query-engine-installation.js +27 -0
  13. package/dist/src/artifacts/query-engine-rules.js +1 -2
  14. package/dist/src/artifacts/query-engine-scoring.js +33 -31
  15. package/dist/src/artifacts/query-engine-show-card.js +6 -2
  16. package/dist/src/artifacts/query-engine-show.js +2 -2
  17. package/dist/src/artifacts/relations.js +17 -10
  18. package/dist/src/cli/handlers/bundle-declaration.js +55 -0
  19. package/dist/src/cli/handlers/bundle-deployment-mode.js +71 -0
  20. package/dist/src/cli/handlers/bundle-hash-prune.js +37 -0
  21. package/dist/src/cli/handlers/bundle-reconciliation.js +140 -0
  22. package/dist/src/cli/handlers/checkpoint.js +143 -0
  23. package/dist/src/cli/handlers/help.js +1 -0
  24. package/dist/src/cli/handlers/index.js +4 -2
  25. package/dist/src/cli/handlers/models-resource-sample.js +7 -3
  26. package/dist/src/cli/handlers/ralph-launcher.js +1 -1
  27. package/dist/src/cli/handlers/refresh-bundles.js +35 -0
  28. package/dist/src/cli/handlers/refresh-rule-inventory.js +10 -0
  29. package/dist/src/cli/handlers/refresh.js +15 -52
  30. package/dist/src/cli/handlers/remove-bundled.js +7 -4
  31. package/dist/src/cli/handlers/remove-flue-modules.js +19 -0
  32. package/dist/src/cli/handlers/remove-historical-bundle.js +18 -0
  33. package/dist/src/cli/handlers/remove.js +8 -0
  34. package/dist/src/cli/handlers/script-runner.js +12 -1
  35. package/dist/src/cli/handlers/steward-signing.js +44 -0
  36. package/dist/src/cli/handlers/steward.js +5 -0
  37. package/dist/src/cli/handlers/subcommands-list-format.js +4 -4
  38. package/dist/src/cli/handlers/update.js +18 -8
  39. package/dist/src/cli/handlers/use-additive-bundles.js +87 -0
  40. package/dist/src/cli/handlers/use-bundle-counts.js +5 -1
  41. package/dist/src/cli/handlers/use-owned-counts.js +75 -0
  42. package/dist/src/cli/handlers/use-provider-results.js +17 -0
  43. package/dist/src/cli/handlers/use.js +53 -114
  44. package/dist/src/cli/router.js +12 -2
  45. package/dist/src/cli/services/deployment-verification.js +2 -1
  46. package/dist/src/cli/user-scope-mirror.js +3 -1
  47. package/dist/src/config/aiwg-config.js +15 -6
  48. package/dist/src/config/cli.js +1 -0
  49. package/dist/src/config/delivery-validation.js +21 -0
  50. package/dist/src/config/framework-aliases.js +14 -0
  51. package/dist/src/config/host-resource-report.d.mts +1 -1
  52. package/dist/src/config/host-resource-report.mjs +23 -4
  53. package/dist/src/config/host-resource-runtime.d.mts +8 -0
  54. package/dist/src/config/host-resource-runtime.mjs +67 -24
  55. package/dist/src/config/index-graph-overrides.js +4 -0
  56. package/dist/src/config/installed-selection.js +9 -1
  57. package/dist/src/config/installed-validation.js +35 -0
  58. package/dist/src/config/worker-attribution.d.mts +7 -0
  59. package/dist/src/config/worker-attribution.mjs +44 -0
  60. package/dist/src/delivery/git.js +62 -0
  61. package/dist/src/delivery/pr.js +149 -0
  62. package/dist/src/delivery/tracker.js +33 -0
  63. package/dist/src/discovery/interview.js +1 -1
  64. package/dist/src/extensions/claude-hooks-installer.js +1 -0
  65. package/dist/src/extensions/loader.js +2 -1
  66. package/dist/src/extensions/project-local-doctor.js +1 -1
  67. package/dist/src/extensions/project-local-remove.js +3 -3
  68. package/dist/src/issues/cli.js +12 -3
  69. package/dist/src/issues/external-cli.js +76 -0
  70. package/dist/src/issues/live.js +18 -1
  71. package/dist/src/issues/tracker-policy.js +17 -0
  72. package/dist/src/mcp/cli.mjs +12 -7
  73. package/dist/src/mcp/helpers.mjs +5 -1
  74. package/dist/src/mcp/http-options.mjs +101 -0
  75. package/dist/src/mcp/http-tools.mjs +51 -0
  76. package/dist/src/mcp/http-transport.mjs +201 -0
  77. package/dist/src/mcp/server.mjs +9 -7
  78. package/dist/src/mcp/tool-context.mjs +25 -0
  79. package/dist/src/mcp/tools/orchestration.mjs +2 -1
  80. package/dist/src/mcp/tools/worker-invoke.mjs +2 -1
  81. package/dist/src/mcp/tools/worker-stdin-runtime.mjs +12 -0
  82. package/dist/src/models/conductor-data-policy.d.mts +3 -2
  83. package/dist/src/models/conductor-data-policy.mjs +94 -5
  84. package/dist/src/models/worker-plan.js +3 -3
  85. package/dist/src/models/worker-selection-policy.js +2 -1
  86. package/dist/src/providers/deployment-lock.js +77 -0
  87. package/dist/src/providers/deployment-ownership.d.mts +12 -2
  88. package/dist/src/providers/deployment-ownership.mjs +127 -19
  89. package/dist/src/providers/deployment-preservation.d.mts +6 -0
  90. package/dist/src/providers/deployment-preservation.mjs +113 -0
  91. package/dist/src/providers/deployment-removal.js +4 -2
  92. package/dist/src/providers/flue-package-mode.js +19 -0
  93. package/dist/src/providers/provider-definitions.js +4 -0
  94. package/dist/src/providers/skill-ownership.mjs +1 -0
  95. package/dist/src/research/reference-match.js +4 -0
  96. package/dist/src/serve/worker-invocation-preparation.js +3 -1
  97. package/dist/src/serve/worker-invocation.js +2 -0
  98. package/dist/src/skills/run.js +5 -0
  99. package/dist/src/smiths/hook-bridge/codex-translator.js +3 -1
  100. package/dist/src/smiths/hook-bridge/hermes-translator.js +3 -1
  101. package/dist/src/smiths/hook-bridge/prompt-discovery-gaps.js +6 -0
  102. package/package.json +5 -2
  103. package/schemas/models/model-config-compatibility.v1.schema.json +4 -0
  104. package/tools/agents/deploy-agents.mjs +21 -1
  105. package/tools/agents/deploy-options.mjs +2 -0
  106. package/tools/agents/providers/base-contract.mjs +7 -1
  107. package/tools/agents/providers/base-inventory.mjs +41 -14
  108. package/tools/agents/providers/base-kernel-skills.mjs +9 -5
  109. package/tools/agents/providers/base-migrations.mjs +1 -0
  110. package/tools/agents/providers/base-skill-copy.mjs +9 -1
  111. package/tools/agents/providers/base.mjs +1 -1
  112. package/tools/agents/providers/claude.mjs +2 -1
  113. package/tools/agents/providers/codex.mjs +5 -1
  114. package/tools/agents/providers/conductor-data-guard.mjs +35 -11
  115. package/tools/agents/providers/flue-bundles.mjs +42 -0
  116. package/tools/agents/providers/flue-cloudflare.mjs +20 -0
  117. package/tools/agents/providers/flue-project.mjs +45 -6
  118. package/tools/agents/providers/flue-skill-copy.mjs +25 -0
  119. package/tools/agents/providers/flue-skills.mjs +45 -0
  120. package/tools/agents/providers/flue-specialists.mjs +36 -18
  121. package/tools/agents/providers/flue-validation.mjs +14 -0
  122. package/tools/agents/providers/flue.mjs +12 -8
  123. package/tools/agents/providers/hermes-skill-lifecycle.mjs +1 -0
  124. package/tools/agents/providers/muse-hooks.mjs +4 -0
  125. package/tools/agents/providers/muse-prompt-discovery.mjs +22 -0
  126. package/tools/agents/providers/provider-prepare-coordinator.mjs +15 -10
  127. package/tools/agents/providers/rule-delivery-surface.mjs +18 -1
  128. package/tools/agents/providers/rule-deployment-commit.mjs +24 -0
  129. package/tools/agents/providers/rule-deployment-prepare.mjs +4 -0
  130. package/tools/agents/providers/skill-copy-prune.mjs +49 -0
  131. package/tools/agents/providers/stale-artifact-prune.mjs +10 -8
  132. package/tools/ralph-external/lib/worker-capture.mjs +157 -0
  133. package/tools/ralph-external/lib/worker-health.mjs +3 -0
  134. package/tools/ralph-external/lib/worker-invocation-processes.mjs +9 -6
  135. package/tools/ralph-external/lib/worker-launch-cli.mjs +10 -1
  136. package/tools/ralph-external/lib/worker-process-identity.mjs +30 -0
  137. package/tools/ralph-external/lib/worker-retry-evidence.mjs +87 -6
  138. package/tools/ralph-external/lib/worker-termination.mjs +56 -6
  139. package/tools/ralph-external/process-monitor.mjs +12 -18
  140. package/tools/ralph-external/session-launcher.mjs +43 -29
  141. package/tools/skills/codex-skill-metadata.mjs +22 -0
  142. package/tools/skills/deploy-skills-codex.mjs +8 -7
  143. package/vscode-extension/schemas/aiwg.config.v1.json +59 -19
@@ -0,0 +1,75 @@
1
+ // Count only receipt-owned output in the bundle's recorded deployment scope.
2
+ import fs from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { frameworkRegistryId } from '../../config/framework-aliases.js';
5
+ import { getProviderArtifactPathStrings } from '../../providers/provider-definitions.js';
6
+ import { deployedSkillRoots } from '../../providers/deployed-skill-roots.js';
7
+ import { bundleDeploymentHistory, bundleDeploymentScope } from './bundle-deployment-mode.js';
8
+ import { expectedBundleOwners } from './bundle-reconciliation.js';
9
+ export async function receiptIncludesOwner(file, owners, mirrorRoot) {
10
+ try {
11
+ const receipt = JSON.parse(await fs.readFile(path.join(path.dirname(file), '.aiwg-manifest.json'), 'utf8'));
12
+ const record = receipt.managed?.[path.basename(file)];
13
+ if (record?.owners?.some((owner) => owners.has(frameworkRegistryId(owner))) === true)
14
+ return true;
15
+ // Every framework also projects these shared operator workflows. Keep this
16
+ // exception source- and kind-scoped so unrelated stale SDLC files stay out.
17
+ if (!mirrorRoot || record?.kind !== 'skill-command' || !record.owners?.includes('sdlc-complete'))
18
+ return false;
19
+ const name = path.basename(path.dirname(record.sourcePath || ''));
20
+ const source = path.join(mirrorRoot, 'agentic/code/frameworks/sdlc-complete/skills', name, 'SKILL.md');
21
+ const { shouldMirrorStandardCommandSkill } = await import('./use.js');
22
+ return shouldMirrorStandardCommandSkill(name) && record.sourcePath === source
23
+ && await fs.stat(source).then(stat => stat.isFile()).catch(() => false);
24
+ }
25
+ catch {
26
+ return false;
27
+ }
28
+ }
29
+ export async function countRecordedFrameworkArtifacts(target, provider, id, root, args) {
30
+ const selected = { installed: { [id]: { deployedTo: { [provider]: bundleDeploymentScope(id, provider, args) } } } };
31
+ const owners = await expectedBundleOwners(selected, provider, root);
32
+ // Explicit bundles have their own records, even after undeclaration leaves edits.
33
+ for (const owner of Object.keys(bundleDeploymentHistory(target)[provider] ?? {})) {
34
+ if (owner !== frameworkRegistryId(id))
35
+ owners.delete(owner);
36
+ }
37
+ const paths = getProviderArtifactPathStrings(provider);
38
+ const countFiles = async (dir, skills = false, rules = false, sharedMirrors = false) => {
39
+ if (!dir)
40
+ return 0;
41
+ const destination = path.resolve(target, dir);
42
+ let entries;
43
+ try {
44
+ entries = await fs.readdir(destination);
45
+ }
46
+ catch {
47
+ return 0;
48
+ }
49
+ const owned = [];
50
+ for (const name of entries) {
51
+ const file = path.join(destination, name, ...(skills ? ['SKILL.md'] : []));
52
+ if (!skills && !name.endsWith('.md'))
53
+ continue;
54
+ if (await fs.stat(file).then(stat => stat.isFile()).catch(() => false) && await receiptIncludesOwner(file, owners, sharedMirrors ? root : undefined))
55
+ owned.push(name);
56
+ }
57
+ if (!rules)
58
+ return owned.length;
59
+ const indexes = owned.filter(name => name.endsWith('RULES-INDEX.md'));
60
+ if (!indexes.length)
61
+ return owned.length;
62
+ let count = 0;
63
+ for (const name of indexes) {
64
+ for (const match of (await fs.readFile(path.join(destination, name), 'utf8')).matchAll(/\((\d+) rules[^)]*\)/g))
65
+ count += Number(match[1]);
66
+ }
67
+ return count || owned.length;
68
+ };
69
+ return {
70
+ agents: await countFiles(paths?.agents), commands: await countFiles(paths?.commands, false, false, !bundleDeploymentScope(id, provider, args).kernelOnly),
71
+ skills: (await Promise.all(deployedSkillRoots(target, provider).map(dir => countFiles(dir, true)))).reduce((a, b) => a + b, 0),
72
+ rules: await countFiles(paths?.rules, false, true),
73
+ };
74
+ }
75
+ //# sourceMappingURL=use-owned-counts.js.map
@@ -0,0 +1,17 @@
1
+ export async function deployEachProvider(providers, deploy) {
2
+ const providerResults = new Map();
3
+ for (const [order, provider] of providers.entries()) {
4
+ try {
5
+ providerResults.set(provider, await deploy(provider, order));
6
+ }
7
+ catch (error) {
8
+ providerResults.set(provider, { exitCode: 1, message: error instanceof Error ? error.message : String(error) });
9
+ }
10
+ }
11
+ const failed = [...providerResults.values()].find(result => result.exitCode !== 0);
12
+ return { exitCode: failed?.exitCode ?? 0, message: failed?.message, providerResults };
13
+ }
14
+ export function resultForProvider(result, provider) {
15
+ return result.providerResults?.get(provider) ?? result;
16
+ }
17
+ //# sourceMappingURL=use-provider-results.js.map
@@ -22,6 +22,7 @@ import { resolveOmpPaths } from '../../providers/omp-paths.mjs';
22
22
  import YAML from 'yaml';
23
23
  import { createScriptRunner } from './script-runner.js';
24
24
  import { finalizePreparedProvider, prepareProviderDeployments } from '../services/provider-prepare-coordinator.js';
25
+ import { deployEachProvider, resultForProvider } from './use-provider-results.js';
25
26
  import { getFrameworkRoot, getVersionInfo } from '../../channel/manager.mjs';
26
27
  import { getRegistry } from '../../extensions/registry.js';
27
28
  import { registerDeployedExtensions } from '../../extensions/deployment-registration.js';
@@ -34,6 +35,11 @@ import { getLogger } from '../log.js';
34
35
  import { installCockpit } from './cockpit.js';
35
36
  import { initHandler } from './init.js';
36
37
  import { selectAddonProfile } from './use-addon-profile.js';
38
+ import { deploymentEditWarnings } from '../../providers/deployment-preservation.mjs';
39
+ import { permitsBundleDeployment } from '../../config/installed-selection.js';
40
+ import { bundleDeploymentScope, recordBundleDeployment, copyCleanupArgs, projectLocalDeploymentContext, projectLocalCopyMode } from './bundle-deployment-mode.js';
41
+ import { frameworkAdditiveBundles, getAllAddons, getAllExtensions } from './use-additive-bundles.js';
42
+ export { getAllAddons, getAllExtensions, USE_ALL_DISALLOW, USE_ALL_EXTENSIONS_DISALLOW } from './use-additive-bundles.js';
37
43
  import { checkCollisions, formatCollisionReport, hasBlockingCollisions, } from '../../smiths/skillsmith/collision-detector.js';
38
44
  import { discoverProjectLocalBundles, } from '../../extensions/project-local-discovery.js';
39
45
  import { PROJECT_LOCAL_TYPE_TO_DIR } from '../../extensions/project-local-paths.js';
@@ -64,6 +70,7 @@ const PREPARABLE_BUILTIN_PROVIDERS = new Set(['claude', 'codex', 'cursor', 'herm
64
70
  // Distinct from agentsmith (which creates subagent personas).
65
71
  import { generate as generateContextFiles, discoverDeployedArtifacts, } from '../../smiths/context-pipeline/index.js';
66
72
  import { verifyModelWrapperDeployment } from '../../models/wrapper-deployment.js';
73
+ import { countRecordedFrameworkArtifacts, receiptIncludesOwner } from './use-owned-counts.js';
67
74
  import { countDeployedBundleFiles, countDeployedBundleRules } from './use-bundle-counts.js';
68
75
  import { reconcileDeployedSkillAssets } from './use-skill-assets.js';
69
76
  import { aggregateUseDeploymentResult, buildDryRunUseResult, renderUseDeploymentResult, verifyProviderDeployment, } from '../services/deployment-verification.js';
@@ -263,32 +270,6 @@ const FRAMEWORK_DIR_MAP = {
263
270
  export function resolveFrameworkDir(framework) {
264
271
  return FRAMEWORK_DIR_MAP[framework];
265
272
  }
266
- /**
267
- * Addons excluded from `aiwg use all`.
268
- * aiwg-dev is contributor-only tooling — not for end users.
269
- */
270
- export const USE_ALL_DISALLOW = new Set(['aiwg-dev']);
271
- /**
272
- * Whether an addon's manifest keeps it out of bulk deploys (#2641).
273
- *
274
- * `devOnly` marks contributor tooling; `explicitInstall` marks an addon that is
275
- * deployed only when named, such as `aiwg use decision-engine`. Both match
276
- * `discoverAddons()` in tools/agents/providers/base.mjs, which applies the same
277
- * rule to framework-mode deploys.
278
- *
279
- * `autoInstall: false` is deliberately NOT an exclusion signal: most addons
280
- * declare it (and the extension manifest schema defaults to it), so honoring
281
- * it would drop most addons from `all` for existing users.
282
- */
283
- async function isExplicitOnlyAddon(addonDir) {
284
- try {
285
- const manifest = JSON.parse(await fs.readFile(path.join(addonDir, 'manifest.json'), 'utf8'));
286
- return manifest?.devOnly === true || manifest?.explicitInstall === true;
287
- }
288
- catch {
289
- return false;
290
- }
291
- }
292
273
  /** Full-framework setup requires the corpus omitted by the lightweight CLI. */
293
274
  async function bundledSetupPrerequisiteMessage(frameworkRoot) {
294
275
  let packageName;
@@ -319,57 +300,6 @@ async function bundledSetupPrerequisiteMessage(frameworkRoot) {
319
300
  '@aiwg/cli can still query signed web resources and deploy external project-local bundles.',
320
301
  ].join('\n');
321
302
  }
322
- /**
323
- * Discover all addon names from the filesystem, minus the disallow list and
324
- * addons whose manifest restricts them to explicit installs.
325
- */
326
- export async function getAllAddons(frameworkRoot) {
327
- const addonsDir = path.join(frameworkRoot, 'agentic/code/addons');
328
- const entries = await fs.readdir(addonsDir, { withFileTypes: true });
329
- const candidates = entries.filter(e => e.isDirectory() && !USE_ALL_DISALLOW.has(e.name));
330
- const excluded = await Promise.all(candidates.map(e => isExplicitOnlyAddon(path.join(addonsDir, e.name))));
331
- return candidates.filter((_, index) => !excluded[index]).map(e => e.name);
332
- }
333
- /**
334
- * Extensions excluded from `aiwg use all` deployment.
335
- * `api-adapter` is an OpenAPI spec, not a deployable artifact bundle.
336
- */
337
- export const USE_ALL_EXTENSIONS_DISALLOW = new Set(['api-adapter']);
338
- /**
339
- * Discover all extension names from `agentic/code/extensions/*` (#1221).
340
- *
341
- * Extensions are addon-shaped bundles with their own `manifest.json`,
342
- * `skills/`, `rules/`, and `templates/` directories. Only directories
343
- * containing a `manifest.json` are considered deployable; bare directories
344
- * (e.g. `api-adapter` which only ships an OpenAPI spec) are skipped.
345
- */
346
- export async function getAllExtensions(frameworkRoot) {
347
- const extensionsDir = path.join(frameworkRoot, 'agentic/code/extensions');
348
- let entries;
349
- try {
350
- entries = await fs.readdir(extensionsDir, { withFileTypes: true });
351
- }
352
- catch {
353
- return [];
354
- }
355
- const result = [];
356
- for (const entry of entries) {
357
- if (!entry.isDirectory())
358
- continue;
359
- if (USE_ALL_EXTENSIONS_DISALLOW.has(entry.name))
360
- continue;
361
- const manifestPath = path.join(extensionsDir, entry.name, 'manifest.json');
362
- try {
363
- await fs.access(manifestPath);
364
- result.push(entry.name);
365
- }
366
- catch {
367
- // Directory without a manifest is not deployable as an extension.
368
- continue;
369
- }
370
- }
371
- return result;
372
- }
373
303
  /**
374
304
  * Resolve extension source path from its name.
375
305
  */
@@ -558,7 +488,7 @@ const MIRRORED_KERNEL_COMMAND_SKILLS = new Set([
558
488
  'use',
559
489
  'steward',
560
490
  ]);
561
- function shouldMirrorStandardCommandSkill(skillName) {
491
+ export function shouldMirrorStandardCommandSkill(skillName) {
562
492
  return skillName.startsWith('flow-') || MIRRORED_STANDARD_COMMAND_SKILLS.has(skillName);
563
493
  }
564
494
  function shouldMirrorKernelCommandSkill(skillName) {
@@ -1073,7 +1003,8 @@ async function countDeployedBundleSkills(bundlePath, target, provider) {
1073
1003
  let found = false;
1074
1004
  for (const dir of uniqueCandidateDirs) {
1075
1005
  for (const name of names) {
1076
- if (!(await fileExists(path.join(dir, name, 'SKILL.md'))))
1006
+ if (!(await fileExists(path.join(dir, name, 'SKILL.md')))
1007
+ || !await receiptIncludesOwner(path.join(dir, name, 'SKILL.md'), new Set([path.basename(bundlePath)])))
1077
1008
  continue;
1078
1009
  count++;
1079
1010
  found = true;
@@ -1164,7 +1095,7 @@ async function deployOneProjectLocalBundle(opts) {
1164
1095
  // graph. Without --copy-all, the bundle's rules deploy but its skills
1165
1096
  // never reach <provider>/.aiwg/skills/, leaving them invisible to
1166
1097
  // both the platform and the index.
1167
- '--copy-all',
1098
+ '--copy-all', ...copyCleanupArgs(ctx.args),
1168
1099
  // That copy-all is the deployer's doing, not the operator's, so the
1169
1100
  // provider's startup listing cap still applies; overflow lands on the
1170
1101
  // standard tier instead of over the cap (#2561).
@@ -1257,8 +1188,8 @@ async function deployProjectLocalBundles(opts) {
1257
1188
  }
1258
1189
  const targetBundles = onlyBundleId
1259
1190
  ? discovery.bundles.filter(b => b.id === onlyBundleId)
1260
- : discovery.bundles.filter(b => b.type !== 'provider');
1261
- if (targetBundles.length === 0) {
1191
+ : discovery.bundles.filter(b => b.type !== 'provider' && permitsBundleDeployment(projectDir, b.id, provider));
1192
+ if (targetBundles.length === 0 && discovery.bundles.length === 0) {
1262
1193
  if (!onlyBundleId) {
1263
1194
  const { hasProjectQuickref, deployProjectQuickref } = await import('../../extensions/project-quickref.js');
1264
1195
  try {
@@ -1328,7 +1259,7 @@ async function deployProjectLocalBundles(opts) {
1328
1259
  }
1329
1260
  }
1330
1261
  const result = await deployOneProjectLocalBundle({
1331
- bundle, ctx, frameworkRoot, provider, target, dryRun, verbose, quiet, modelArgs,
1262
+ bundle, ctx: await projectLocalDeploymentContext(ctx, projectDir, bundle.id, provider, Boolean(onlyBundleId)), frameworkRoot, provider, target, dryRun, verbose, quiet, modelArgs,
1332
1263
  });
1333
1264
  if (result.exitCode !== 0) {
1334
1265
  failed++;
@@ -1376,10 +1307,12 @@ async function deployProjectLocalBundles(opts) {
1376
1307
  localPath: bundle.localPath,
1377
1308
  localType: bundle.type,
1378
1309
  manifestVersion: bundle.manifest.manifestVersion,
1310
+ copy: projectLocalCopyMode(config, bundle.id, provider, ctx.args, Boolean(onlyBundleId)),
1379
1311
  artifactHashes,
1380
1312
  deployedArtifactHashes,
1381
1313
  });
1382
1314
  await writeAiwgConfig(projectDir, updated);
1315
+ await recordBundleDeployment(projectDir, bundle.id, provider, updated.installed[bundle.id].deployedTo[provider].copy ? ['--copy-all'] : [], frameworkRoot);
1383
1316
  }
1384
1317
  catch (err) {
1385
1318
  // Non-fatal: deploy already succeeded
@@ -1390,7 +1323,7 @@ async function deployProjectLocalBundles(opts) {
1390
1323
  // Automatic reconciliation (also used by refresh/upgrade) must restore the
1391
1324
  // project search cache for existing bundles, just as a named local install
1392
1325
  // does. Named installs refresh once after all selected providers finish.
1393
- if (deployed > 0 && !dryRun && !onlyBundleId) {
1326
+ if (discovery.bundles.length > 0 && !dryRun && !onlyBundleId) {
1394
1327
  try {
1395
1328
  await rebuildExternalBundleIndex(projectDir, 'project', verbose);
1396
1329
  }
@@ -1459,7 +1392,7 @@ for (const flag of [...MODEL_DEPLOY_VALUE_FLAGS, '--reasoning', '--coding', '--e
1459
1392
  USE_FLAGS_WITH_VALUES.add(flag);
1460
1393
  }
1461
1394
  const USE_BOOLEAN_FLAGS = new Set([
1462
- '--force', '--copy-all', '--copy-standard-skills', '--dry-run', '--verbose', '-v', '--quiet', '-q',
1395
+ '--package', '--force', '--copy-all', '--copy-standard-skills', '--dry-run', '--verbose', '-v', '--quiet', '-q',
1463
1396
  '--json', '--no-project-local', '--no-context-files', '--no-workspace-md',
1464
1397
  '--no-aiwg-md', '--no-agents-md', '--force-context-files', '--global', '--user',
1465
1398
  '--no-utils', '--ci-hooks-enabled', '--skip-conflicts', '--no-harness-agents',
@@ -1467,7 +1400,7 @@ const USE_BOOLEAN_FLAGS = new Set([
1467
1400
  '--allow-over-budget', '--no-hooks', '--no-attribution', '--enable-cross-provider-hooks',
1468
1401
  '--skip-commands-migration', '--listing-budget', '--mcp', '--as-agents-md',
1469
1402
  '--create-agents-md', '--commands-only', '--skills-only', '--rules-only',
1470
- '--save', '--save-user', '--help', '-h',
1403
+ '--declare', '--save', '--save-user', '--help', '-h',
1471
1404
  ]);
1472
1405
  export function validateUseOptions(args, preparedCapabilities = new Set()) {
1473
1406
  for (let i = 0; i < args.length; i++) {
@@ -2334,6 +2267,7 @@ Additional options:
2334
2267
  --providers <a,b> Providers for global bootstrap
2335
2268
  --prefix <dir> Alias for --target
2336
2269
  --global, --user Install to user scope
2270
+ --package Flue: import skills from @aiwg/flue; persist across update/refresh
2337
2271
  --copy-standard-skills Alias for --copy-all (also restores the full surface)
2338
2272
  --profile <name> Select workspace profile (implicit target: all)
2339
2273
  --workspace-signals Show the workspace signal plan
@@ -2345,6 +2279,7 @@ Additional options:
2345
2279
  --filter <glob>, --filter-role <role>
2346
2280
  Filter deployed agents
2347
2281
  --save, --save-user Persist model selection
2282
+ --declare Declare a bundle for --provider without deploying (project scope)
2348
2283
  --no-utils Skip additive addon and extension passes
2349
2284
  --no-workspace-md, --no-aiwg-md, --no-agents-md
2350
2285
  Suppress individual context files
@@ -2385,6 +2320,8 @@ export class UseHandler {
2385
2320
  return { exitCode: 0, message: USE_HELP, rawOutput: true };
2386
2321
  }
2387
2322
  async execute(ctx) {
2323
+ if (ctx.args.includes('--declare'))
2324
+ return (await import('./bundle-declaration.js')).declareBundle(ctx);
2388
2325
  let resourceCredentials = useDeployment?.resourceCredentials;
2389
2326
  try {
2390
2327
  if (!resourceCredentials) {
@@ -2543,6 +2480,11 @@ export class UseHandler {
2543
2480
  console.error = originalConsole.error;
2544
2481
  }
2545
2482
  }
2483
+ if (coreResult.exitCode === 0 && !dryRun)
2484
+ for (const provider of providers) {
2485
+ for (const warning of deploymentEditWarnings(projectDir, provider))
2486
+ originalConsole.warn(warning);
2487
+ }
2546
2488
  let result;
2547
2489
  if (dryRun && coreResult.exitCode === 0) {
2548
2490
  result = buildDryRunUseResult({
@@ -2581,10 +2523,11 @@ export class UseHandler {
2581
2523
  }
2582
2524
  const providerResults = [];
2583
2525
  for (const provider of providers) {
2526
+ const providerResult = resultForProvider(coreResult, provider);
2584
2527
  const effectiveScope = provider === 'openclaw' || provider === 'openhuman'
2585
2528
  ? 'user'
2586
2529
  : requestedScope;
2587
- if (coreResult.exitCode === 0 && !dryRun) {
2530
+ if (providerResult.exitCode === 0 && !dryRun) {
2588
2531
  try {
2589
2532
  const receiptOptions = {
2590
2533
  projectRoot: projectDir,
@@ -2616,8 +2559,8 @@ export class UseHandler {
2616
2559
  requestedBundles: [requestedBundle],
2617
2560
  contextOptOut,
2618
2561
  invocationStartedAt: dryRun ? undefined : startedAt,
2619
- deploymentExitCode: coreResult.exitCode,
2620
- deploymentMessage: coreResult.message,
2562
+ deploymentExitCode: providerResult.exitCode,
2563
+ deploymentMessage: providerResult.message,
2621
2564
  // A normal first deployment has no authenticated verifier handoff
2622
2565
  // yet, so receipt absence belongs in doctor/status rather than
2623
2566
  // degrading an otherwise successful `aiwg use` result.
@@ -3216,7 +3159,9 @@ export class UseHandler {
3216
3159
  // project. Unlike a full framework deploy, its standard skills cannot be
3217
3160
  // left index-only: the user asked to install this specific bundle and
3218
3161
  // its supporting scripts must travel with the skill directory.
3219
- addonBaseArgs.push('--copy-all');
3162
+ addonBaseArgs.push('--copy-all', ...copyCleanupArgs(remainingArgs));
3163
+ if (provider === 'flue' && remainingArgs.includes('--package'))
3164
+ addonBaseArgs.push('--package');
3220
3165
  addonBaseArgs.push(...modelDeployArgs);
3221
3166
  if (provider)
3222
3167
  addonBaseArgs.push('--provider', provider);
@@ -3231,7 +3176,7 @@ export class UseHandler {
3231
3176
  addonBaseArgs.push('--dry-run');
3232
3177
  if (remainingArgs.includes('--force'))
3233
3178
  addonBaseArgs.push('--force');
3234
- const activationOrder = isAddon
3179
+ const activationOrder = isAddon && provider !== 'flue'
3235
3180
  ? await resolveRequiredAddonActivationOrder(frameworkRoot, framework)
3236
3181
  : [framework];
3237
3182
  const requiredAddons = activationOrder.slice(0, -1);
@@ -3368,8 +3313,11 @@ export class UseHandler {
3368
3313
  source: 'bundled',
3369
3314
  manifestHash: await hashManifest(manifestPath),
3370
3315
  asPrimary: Boolean(explicitAddonProvider),
3316
+ package: provider === 'flue' ? remainingArgs.includes('--package') : undefined,
3317
+ copy: remainingArgs.includes('--copy-all') || remainingArgs.includes('--copy-standard-skills'),
3371
3318
  });
3372
3319
  await writeAiwgConfig(projectDir, updated);
3320
+ await recordBundleDeployment(projectDir, framework, provider, remainingArgs, frameworkRoot);
3373
3321
  config = updated;
3374
3322
  }
3375
3323
  catch (error) {
@@ -3521,20 +3469,17 @@ export class UseHandler {
3521
3469
  let session;
3522
3470
  try {
3523
3471
  session = await prepareProviderDeployments(frameworkRoot, preparedJobs);
3524
- for (const [order, requested] of providers.entries()) {
3472
+ return await session.run(() => deployEachProvider(providers, async (requested, order) => {
3525
3473
  await session.commit(order);
3526
3474
  const capability = randomUUID();
3527
3475
  this.preparedProviderContinuations.add(capability);
3528
3476
  try {
3529
- const result = await this.execute({ ...ctx, args: [framework, '--provider', requested, preparedFlag, capability, ...remainingArgs] });
3530
- if (result.exitCode !== 0)
3531
- return result;
3477
+ return await this.execute({ ...ctx, args: [framework, '--provider', requested, preparedFlag, capability, ...remainingArgs] });
3532
3478
  }
3533
3479
  finally {
3534
3480
  this.preparedProviderContinuations.delete(capability);
3535
3481
  }
3536
- }
3537
- return { exitCode: 0 };
3482
+ }));
3538
3483
  }
3539
3484
  catch (error) {
3540
3485
  return { exitCode: 1, message: `Concurrent provider preparation failed: ${error instanceof Error ? error.message : String(error)}` };
@@ -3543,12 +3488,7 @@ export class UseHandler {
3543
3488
  await session?.dispose();
3544
3489
  }
3545
3490
  }
3546
- for (const p of providers) {
3547
- const result = await this.execute({ ...ctx, args: [framework, '--provider', p, ...remainingArgs] });
3548
- if (result.exitCode !== 0)
3549
- return result;
3550
- }
3551
- return { exitCode: 0 };
3491
+ return deployEachProvider(providers, p => this.execute({ ...ctx, args: [framework, '--provider', p, ...remainingArgs] }));
3552
3492
  }
3553
3493
  const requestedProvider = providers[0];
3554
3494
  const projectLocalProviderResolution = await resolveProjectLocalProviderAdapter(projectDir, requestedProvider);
@@ -3574,8 +3514,7 @@ export class UseHandler {
3574
3514
  && !remainingArgs.includes('--copy-standard-skills');
3575
3515
  if (bulkKernelOnly)
3576
3516
  providerDeployArgs.push('--kernel-only');
3577
- const allAddons = skipUtils || provider === 'flue' ? [] : await getAllAddons(frameworkRoot);
3578
- const allExtensions = skipUtils || bulkKernelOnly || provider === 'flue' ? [] : await getAllExtensions(frameworkRoot);
3517
+ const { addons: allAddons, extensions: allExtensions } = await frameworkAdditiveBundles(frameworkRoot, provider, skipUtils, bulkKernelOnly);
3579
3518
  const mainIncludesAddons = mainDeploymentIncludesAddons(provider, mode, providerDeployArgs);
3580
3519
  // OMP's extension sources share the root transaction and binding scan.
3581
3520
  // Their CLI contributions are still registered below in source order.
@@ -3812,7 +3751,7 @@ export class UseHandler {
3812
3751
  // Deploy project-local bundles (#1035). Auto-runs after upstream addons unless
3813
3752
  // --no-project-local. Idempotent — overwrites prior deploys. Skipped under
3814
3753
  // --dry-run-disabled scenarios for safety; --dry-run is honored and logged.
3815
- if (!skipProjectLocal) {
3754
+ if (!skipProjectLocal && provider !== 'flue') {
3816
3755
  const plResult = await deployProjectLocalBundles({
3817
3756
  ctx,
3818
3757
  frameworkRoot,
@@ -3984,7 +3923,7 @@ export class UseHandler {
3984
3923
  if (!prebuilt && await fs.access(path.join(aiwgRootForIndex, 'prebuilt', 'framework-relations', 'manifest.json')).then(() => true).catch(() => false)) {
3985
3924
  const { selectPrebuiltRelations } = await import('../../artifacts/relations.js');
3986
3925
  const reason = selectPrebuiltRelations(aiwgRootForIndex).reason ?? 'packaged search index is missing, stale, or does not match the source';
3987
- ui.dim(` Packaged index unavailable: ${reason}.`);
3926
+ ui.dim(verbose ? ` Packaged index unavailable: ${reason}.` : ' Packaged index unavailable; rebuilding capability index.');
3988
3927
  }
3989
3928
  ui.dim(' Indexing operational assets for agent-side lookup.');
3990
3929
  const indexStart = Date.now();
@@ -4018,7 +3957,8 @@ export class UseHandler {
4018
3957
  // registry record written below (#621) reflects the real deploy even on
4019
3958
  // a verbose run — the prior `if (quiet)` guard left the record
4020
3959
  // `{agents: 0, commands: 0, skills: 0, rules: 0}` on `-v` runs.
4021
- const counts = await countDeployedArtifacts(target, paths, provider);
3960
+ const counts = dryRun ? await countDeployedArtifacts(target, paths, provider)
3961
+ : await countRecordedFrameworkArtifacts(target, provider, framework, frameworkRoot, remainingArgs);
4022
3962
  // Deploy CI workflow files when --ci-hooks-enabled is set (#661)
4023
3963
  if (ciHooksEnabled) {
4024
3964
  await deployCiHooks({ frameworkRoot, framework, target, dryRun });
@@ -4204,18 +4144,17 @@ export class UseHandler {
4204
4144
  if (!frameworkManifestPath)
4205
4145
  throw new Error('no manifest for general/writing mode');
4206
4146
  const mHash = await hashManifest(frameworkManifestPath);
4207
- const updatedConfig = updateInstalled(config, framework, provider, {
4208
- agents: counts.agents,
4209
- commands: counts.commands,
4210
- skills: counts.skills,
4211
- rules: counts.rules,
4212
- }, {
4147
+ const updatedConfig = updateInstalled(config, framework, provider, counts, {
4213
4148
  version: versionInfo.version,
4214
4149
  source: 'bundled',
4215
4150
  manifestHash: mHash,
4216
4151
  asPrimary: Boolean(explicitProvider),
4152
+ package: provider === 'flue' ? remainingArgs.includes('--package') : undefined,
4153
+ copy: remainingArgs.includes('--copy-all') || remainingArgs.includes('--copy-standard-skills'),
4154
+ ...bundleDeploymentScope(framework, provider, remainingArgs),
4217
4155
  });
4218
4156
  await writeAiwgConfig(projectDir, updatedConfig);
4157
+ await recordBundleDeployment(projectDir, framework, provider, remainingArgs, frameworkRoot);
4219
4158
  }
4220
4159
  catch {
4221
4160
  // Non-fatal: config tracking failure must not block deployment
@@ -23,6 +23,7 @@ import { maybeAppendCommandLog } from './command-log.js';
23
23
  import { maybeAppendSkillUsage } from './skill-usage.js';
24
24
  // Cached loaded registry
25
25
  let cachedRegistry = null;
26
+ let discoveryRegistry = null;
26
27
  // Global hook registry and executor. Register built-in hooks at module
27
28
  // load time so they fire for every command without per-handler wiring.
28
29
  const hookRegistry = new HookRegistry();
@@ -36,7 +37,16 @@ hookRegistry.register(activityLogPostCommandHook);
36
37
  *
37
38
  * @returns Loaded registry with handlers
38
39
  */
39
- export async function initRouter() {
40
+ export async function initRouter(discoveryOnly = false) {
41
+ if (discoveryOnly && !cachedRegistry) {
42
+ if (!discoveryRegistry) {
43
+ // Keep normal dispatch, hooks and logging; avoid importing every command's
44
+ // implementation and schema validators for the session's first lookup.
45
+ const { discoverHandler, indexHandler } = await import('./handlers/subcommands-discovery.js');
46
+ discoveryRegistry = await loadRegistry({ handlers: [discoverHandler, indexHandler] });
47
+ }
48
+ return discoveryRegistry;
49
+ }
40
50
  if (!cachedRegistry) {
41
51
  cachedRegistry = await loadRegistry({ indexCapabilities: true });
42
52
  }
@@ -85,7 +95,7 @@ export async function run(args, options = {}) {
85
95
  return;
86
96
  }
87
97
  const started = process.hrtime.bigint();
88
- const registry = await initRouter();
98
+ const registry = await initRouter(args[0] === 'discover' || args[0] === 'index' && args[1] === 'discover');
89
99
  // Normalize `help <command>` into the same non-executing help path.
90
100
  const routedArgs = args[0] === 'help' && args[1] && !args[1].startsWith('-')
91
101
  ? [args[1], ...args.slice(2), '--help']
@@ -8,6 +8,7 @@ import { inspectInstallation } from '../../installation/manager.mjs';
8
8
  import { getPackageRoot } from '../../channel/manager.mjs';
9
9
  import { getProviderDefinition, normalizeProviderDefinitionId, resolveProviderPathValue, } from '../../providers/provider-definitions.js';
10
10
  import { resolveGrokbotSkillsDir } from '../../providers/grokbot-paths.js';
11
+ import { hasFluePackageDeployment } from '../../providers/flue-package-mode.js';
11
12
  import { resolveGrokHome } from '../../providers/grok-build-paths.js';
12
13
  import { runGrokInspect } from '../../providers/grok-build-inspect.js';
13
14
  import { diagnoseIntegratedProviderTransformationReceipt } from '../../providers/transformation-receipt-integration.js';
@@ -433,7 +434,7 @@ export async function verifyProviderDeployment(options) {
433
434
  if (kernelPath && kernelPath !== resolvedSkillsPath)
434
435
  counts.skills += kernelCount;
435
436
  const artifactTotal = Object.values(counts).reduce((sum, value) => sum + value, 0);
436
- if (artifactTotal === 0) {
437
+ if (artifactTotal === 0 && !(normalized === 'flue' && await hasFluePackageDeployment(options.projectRoot))) {
437
438
  // Bridge-only providers (e.g. grokbot project scope without skills env)
438
439
  // intentionally have null native artifact dirs and land AGENTS.md instead.
439
440
  const bridgeName = definition.paths.configFile || definition.paths.contextFiles?.contextFile;
@@ -142,7 +142,9 @@ export async function mirrorArtifactDir(src, dst, ownedThisCall = new Set()) {
142
142
  }
143
143
  if (Object.keys(copiedRecords).length) {
144
144
  const sidecarPath = path.resolve(dst, SIDECAR);
145
- const prior = receipt(before.get(sidecarPath));
145
+ // Receipt sidecars are always captured as bytes.
146
+ const priorBytes = before.get(sidecarPath);
147
+ const prior = receipt(Buffer.isBuffer(priorBytes) ? priorBytes : undefined);
146
148
  const next = { ...prior, managed: { ...object(prior.managed), ...copiedRecords } };
147
149
  await fs.writeFile(sidecarPath, `${JSON.stringify(next, null, 2)}\n`);
148
150
  }
@@ -1,3 +1,5 @@
1
+ import { validateDeliverySettings } from './delivery-validation.js';
2
+ import { validateInstalled } from './installed-validation.js';
1
3
  import { preserveInstalledSelection } from './installed-selection.js';
2
4
  import { validateHitlPolicy } from '../policy/hitl-validation.js';
3
5
  import { normalizeAiwgConfigCandidate } from './config-normalization.js';
@@ -28,7 +30,7 @@ import { readFileSync, existsSync } from 'node:fs';
28
30
  import { readFile, access, readdir } from 'fs/promises';
29
31
  import { createHash } from 'crypto';
30
32
  import { resolve, join, isAbsolute } from 'path';
31
- import { normalizeNamedCaptures } from '../artifacts/index-builder.js';
33
+ import { normalizeNamedCaptures } from './index-graph-overrides.js';
32
34
  import { getProviderDefinition, getProviderKernelSkillPath, PROVIDER_IDS, resolveProviderPathValue, } from '../providers/provider-definitions.js';
33
35
  import { validateAuthorization, } from '../policy/authorization.js';
34
36
  import { projectAiwgPath, projectControlPath, resolveProjectAiwgDir, } from './project-artifacts.js';
@@ -168,6 +170,7 @@ export function resolveDelivery(delivery) {
168
170
  },
169
171
  },
170
172
  merge_style: delivery?.merge_style ?? 'rebase-merge',
173
+ merge: delivery?.merge ?? 'tracker',
171
174
  delete_branch_on_merge: delivery?.delete_branch_on_merge ?? true,
172
175
  require_ci_green: delivery?.require_ci_green ?? true,
173
176
  require_signed_commits: delivery?.require_signed_commits ?? false,
@@ -993,6 +996,7 @@ export async function readAiwgConfigCandidate(projectDir) {
993
996
  const threatAssessmentErrors = [
994
997
  ...validateThreatAssessmentConfig(parsed.security?.threatAssessment),
995
998
  ...validateProjectConfig(parsed.project),
999
+ ...validateDeliverySettings(parsed),
996
1000
  ...validateParallelismConfig(parsed.parallelism),
997
1001
  ...validateDecisionConfig(parsed.decision),
998
1002
  ...validateRulePinCapabilities(parsed.rules, installedRuleCapabilities(loadRulePinConfigs(projectDir, parsed)), loadRulePinConfigs(projectDir, parsed).user.rules?.pin_groups),
@@ -1082,6 +1086,7 @@ async function writeAiwgConfigUnlocked(projectDir, config) {
1082
1086
  const threatAssessmentErrors = [
1083
1087
  ...validateThreatAssessmentConfig(config.security?.threatAssessment),
1084
1088
  ...validateProjectConfig(config.project),
1089
+ ...validateDeliverySettings(config),
1085
1090
  ...validateParallelismConfig(config.parallelism),
1086
1091
  ...validateDecisionConfig(config.decision),
1087
1092
  ...validateRulePinCapabilities(config.rules, installedRuleCapabilities(loadRulePinConfigs(projectDir, config)), loadRulePinConfigs(projectDir, config).user.rules?.pin_groups),
@@ -1157,6 +1162,9 @@ export function updateInstalled(config, name, provider, counts, opts) {
1157
1162
  throw new Error(`updateInstalled: source 'project-local' requires localPath and localType (got ${JSON.stringify({ localPath: opts.localPath, localType: opts.localType })})`);
1158
1163
  }
1159
1164
  }
1165
+ validateInstalled({ [name]: { version: opts.version, source: opts.source, installedAt: new Date().toISOString(),
1166
+ deployedTo: { [provider]: { agents: counts.agents, commands: counts.commands, skills: counts.skills, rules: counts.rules,
1167
+ copy: opts.copy, package: opts.package, skipUtils: opts.skipUtils, kernelOnly: opts.kernelOnly } } } });
1160
1168
  const existing = config.installed[name] ?? {
1161
1169
  version: opts.version,
1162
1170
  source: opts.source,
@@ -1167,7 +1175,8 @@ export function updateInstalled(config, name, provider, counts, opts) {
1167
1175
  existing.version = opts.version;
1168
1176
  existing.source = opts.source;
1169
1177
  existing.installedAt = new Date().toISOString();
1170
- existing.deployedTo[provider] = counts;
1178
+ existing.deployedTo[provider] = { ...counts, ...(opts.package === undefined ? {} : { package: opts.package }), ...(opts.copy === undefined ? {} : { copy: opts.copy }),
1179
+ ...(opts.skipUtils === undefined ? {} : { skipUtils: opts.skipUtils }), ...(opts.kernelOnly === undefined ? {} : { kernelOnly: opts.kernelOnly }) };
1171
1180
  if (opts.manifestHash)
1172
1181
  existing.manifestHash = opts.manifestHash;
1173
1182
  if (opts.source === 'project-local') {
@@ -1208,10 +1217,10 @@ export function getDeploymentSummary(config, provider) {
1208
1217
  const counts = entry.deployedTo[targetProvider];
1209
1218
  if (!counts)
1210
1219
  continue;
1211
- totals.agents += counts.agents;
1212
- totals.commands += counts.commands;
1213
- totals.skills += counts.skills;
1214
- totals.rules += counts.rules;
1220
+ totals.agents += counts.agents ?? 0;
1221
+ totals.commands += counts.commands ?? 0;
1222
+ totals.skills += counts.skills ?? 0;
1223
+ totals.rules += counts.rules ?? 0;
1215
1224
  }
1216
1225
  return totals;
1217
1226
  }
@@ -175,6 +175,7 @@ const ENUM_ALIAS_NOTES = {
175
175
  };
176
176
  const ENUM_RULES = {
177
177
  'delivery.mode': ['direct', 'feature-branch', 'pr-required'],
178
+ 'delivery.merge': ['local-signed', 'local', 'tracker'],
178
179
  'delivery.merge_style': ['rebase-merge', 'squash', 'merge', 'fast-forward-only'],
179
180
  'delivery.force_push_policy': ['never', 'own-branch-only', 'allowed'],
180
181
  'delivery.signing.format': ['openpgp', 'ssh', 'x509'],