@aiwg/cli 2026.11.8 → 2026.11.9

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 (157) hide show
  1. package/README.md +1 -1
  2. package/agentic/code/providers/capability-matrix.yaml +4 -4
  3. package/agentic/code/providers/model-capabilities.v1.json +150 -28
  4. package/agentic/code/providers/model-catalog.v1.json +6 -5
  5. package/bin/aiwg.mjs +3 -1
  6. package/dist/src/agents/agent-packager.js +3 -3
  7. package/dist/src/artifacts/cli.js +6 -2
  8. package/dist/src/artifacts/fortemi-core-sync.js +2 -0
  9. package/dist/src/artifacts/index-query-help.js +27 -0
  10. package/dist/src/artifacts/query-engine-installation.js +17 -4
  11. package/dist/src/artifacts/query-engine-name-intent.js +56 -0
  12. package/dist/src/artifacts/query-engine-scoring.js +14 -8
  13. package/dist/src/artifacts/query-engine-show-card.js +3 -3
  14. package/dist/src/cli/agent-spawn.js +4 -4
  15. package/dist/src/cli/handlers/best-practices-audit.js +1 -1
  16. package/dist/src/cli/handlers/bundle-deployment-mode.js +26 -13
  17. package/dist/src/cli/handlers/bundle-reconciliation.js +2 -2
  18. package/dist/src/cli/handlers/init.js +1 -1
  19. package/dist/src/cli/handlers/issues.js +5 -0
  20. package/dist/src/cli/handlers/marketplace-plugin-search.js +6 -5
  21. package/dist/src/cli/handlers/marketplace.js +1 -1
  22. package/dist/src/cli/handlers/models-muse-wrapper.js +32 -0
  23. package/dist/src/cli/handlers/models.js +5 -4
  24. package/dist/src/cli/handlers/refresh-artifact-freshness.js +51 -0
  25. package/dist/src/cli/handlers/refresh-bundles.js +3 -0
  26. package/dist/src/cli/handlers/refresh-managed-deployment.js +6 -4
  27. package/dist/src/cli/handlers/refresh.js +7 -3
  28. package/dist/src/cli/handlers/repo-access.js +15 -2
  29. package/dist/src/cli/handlers/sdlc-accelerate.js +1 -1
  30. package/dist/src/cli/handlers/steward.js +1 -1
  31. package/dist/src/cli/handlers/subcommands-bundles.js +1 -1
  32. package/dist/src/cli/handlers/subcommands-discovery.js +5 -0
  33. package/dist/src/cli/handlers/subcommands-list.js +1 -1
  34. package/dist/src/cli/handlers/subcommands-plugins.js +1 -1
  35. package/dist/src/cli/handlers/subcommands-storage.js +11 -0
  36. package/dist/src/cli/handlers/team.js +1 -1
  37. package/dist/src/cli/handlers/use-additive-bundles.js +9 -2
  38. package/dist/src/cli/handlers/use-bundle-counts.js +1 -1
  39. package/dist/src/cli/handlers/use-copy-selection.js +42 -0
  40. package/dist/src/cli/handlers/use.js +33 -38
  41. package/dist/src/cli/handlers/workspace-context.js +4 -0
  42. package/dist/src/cli/help-generator.js +1 -1
  43. package/dist/src/cli/new-project-options.js +46 -0
  44. package/dist/src/cli/router.js +15 -4
  45. package/dist/src/cli/scope-resolver.js +6 -6
  46. package/dist/src/cli/services/deployment-probe-scope.js +11 -0
  47. package/dist/src/cli/services/deployment-staleness.js +83 -0
  48. package/dist/src/cli/services/deployment-verification.js +20 -11
  49. package/dist/src/config/aiwg-config.js +1 -1
  50. package/dist/src/config/authorization-cli.js +36 -1
  51. package/dist/src/config/config-normalization.js +3 -1
  52. package/dist/src/data/community.yaml +3 -3
  53. package/dist/src/extensions/commands/definitions.js +2 -2
  54. package/dist/src/extensions/manifest.js +27 -1
  55. package/dist/src/extensions/user-hook-diagnostics.js +6 -4
  56. package/dist/src/extensions/verified-hook-command.js +7 -5
  57. package/dist/src/features/catalog.js +2 -2
  58. package/dist/src/issues/cli.js +10 -2
  59. package/dist/src/marketplace/cache.js +31 -0
  60. package/dist/src/marketplace/plugin-search.js +39 -20
  61. package/dist/src/marketplace/public-search.js +122 -0
  62. package/dist/src/marketplace/registry.js +2 -0
  63. package/dist/src/marketplace/search-contract.js +19 -0
  64. package/dist/src/marketplace/sources/public-search.js +81 -0
  65. package/dist/src/mcp/cli.mjs +8 -7
  66. package/dist/src/mcp/credentials.mjs +1 -1
  67. package/dist/src/mcp/registry.js +6 -2
  68. package/dist/src/mcp/tool-filters.mjs +1 -1
  69. package/dist/src/memory/provider-memory-adapter.js +1 -1
  70. package/dist/src/models/catalog-policy.js +2 -1
  71. package/dist/src/models/config-loader.js +2 -1
  72. package/dist/src/models/cursor-worker-version.d.mts +2 -0
  73. package/dist/src/models/cursor-worker-version.mjs +27 -0
  74. package/dist/src/models/model-capabilities.v1.json +150 -28
  75. package/dist/src/models/model-catalog.v1.json +6 -5
  76. package/dist/src/models/model-discovery.js +3 -3
  77. package/dist/src/models/policy-resources.js +1 -1
  78. package/dist/src/models/worker-direct-readiness.js +8 -5
  79. package/dist/src/models/worker-installation.d.mts +3 -2
  80. package/dist/src/models/worker-installation.mjs +12 -10
  81. package/dist/src/models/worker-invocation-policy.js +1 -1
  82. package/dist/src/models/wrapper-deployment.js +1 -1
  83. package/dist/src/models/wrapper-enforcement.js +6 -2
  84. package/dist/src/plugin/skill-command-frontmatter.js +1 -1
  85. package/dist/src/plugin/skill-command-translator.js +1 -1
  86. package/dist/src/policy/repo-access-workspace-spec.js +63 -0
  87. package/dist/src/policy/repo-access.js +22 -0
  88. package/dist/src/providers/capability-matrix.yaml +4 -4
  89. package/dist/src/providers/deployment-ownership.mjs +1 -1
  90. package/dist/src/providers/deployment-preservation.mjs +10 -5
  91. package/dist/src/providers/deployment-removal.js +1 -1
  92. package/dist/src/providers/devin-compat.d.mts +4 -0
  93. package/dist/src/providers/devin-compat.mjs +29 -0
  94. package/dist/src/providers/grok-build-acp.js +39 -9
  95. package/dist/src/providers/grok-build-paths.js +8 -7
  96. package/dist/src/providers/provider-context-contracts.js +4 -3
  97. package/dist/src/providers/provider-definition-schema.js +1 -1
  98. package/dist/src/providers/provider-definitions.js +1 -1
  99. package/dist/src/providers/provider-definitions.mjs +3 -3
  100. package/dist/src/providers/provider-inventory.js +13 -1
  101. package/dist/src/providers/provider-seeds-3.js +10 -9
  102. package/dist/src/providers/transformation-receipt-integration.js +1 -1
  103. package/dist/src/sessions/adapters/windsurf.js +7 -7
  104. package/dist/src/sessions/grok-build-cli-output.js +1 -1
  105. package/dist/src/sessions/grok-build-cli.js +7 -1
  106. package/dist/src/skills/bundle-import-cli.js +61 -0
  107. package/dist/src/skills/bundle-import-plan.js +108 -0
  108. package/dist/src/skills/bundle-import.js +192 -0
  109. package/dist/src/skills/cli.js +5 -0
  110. package/dist/src/skills/deployment-policy.js +1 -1
  111. package/dist/src/skills/importer.js +4 -4
  112. package/dist/src/smiths/agentsmith/demo.js +1 -1
  113. package/dist/src/smiths/agentsmith/examples.js +6 -6
  114. package/dist/src/smiths/commandsmith/generator.js +1 -1
  115. package/dist/src/smiths/context-pipeline/allowlist.js +1 -1
  116. package/dist/src/smiths/context-pipeline/parallelism-section.js +2 -2
  117. package/dist/src/smiths/skillsmith/collision-detector.js +1 -1
  118. package/dist/src/smiths/skillsmith/namespace-adapter.js +1 -1
  119. package/dist/src/smiths/skillsmith/platform-resolver.js +2 -2
  120. package/dist/src/writing/campaign-report.js +4 -3
  121. package/dist/src/writing/contextual-diagnostics.js +27 -2
  122. package/dist/src/writing/current-patterns.js +1 -0
  123. package/dist/src/writing/structural-judgment.catalogue.json +17 -0
  124. package/dist/src/writing/structural-judgment.js +33 -0
  125. package/dist/src/writing/structural-patterns.js +55 -0
  126. package/dist/src/writing/validation-campaign.js +3 -0
  127. package/dist/src/writing/validation-engine.js +7 -4
  128. package/package.json +4 -2
  129. package/schemas/models/model-config-compatibility.v1.schema.json +1 -1
  130. package/tools/agents/deploy-agents.mjs +12 -10
  131. package/tools/agents/deploy-options.mjs +1 -0
  132. package/tools/agents/providers/base-behaviors.mjs +1 -1
  133. package/tools/agents/providers/base-contract.mjs +1 -1
  134. package/tools/agents/providers/base-kernel-skills.mjs +1 -1
  135. package/tools/agents/providers/base-models-platforms.mjs +9 -7
  136. package/tools/agents/providers/base-rule-index.mjs +1 -1
  137. package/tools/agents/providers/codex.mjs +1 -0
  138. package/tools/agents/providers/devin.mjs +3 -0
  139. package/tools/agents/providers/grok-build.mjs +14 -19
  140. package/tools/agents/providers/hook-capabilities.mjs +1 -1
  141. package/tools/agents/providers/model-wrapper.mjs +1 -1
  142. package/tools/agents/providers/rule-delivery-surface.mjs +14 -10
  143. package/tools/agents/providers/rule-deployment-prepare.mjs +8 -8
  144. package/tools/agents/providers/rule-projection.mjs +5 -5
  145. package/tools/agents/providers/rule-startup.mjs +1 -1
  146. package/tools/agents/providers/skill-copy-prune.mjs +5 -1
  147. package/tools/agents/providers/windsurf.mjs +26 -26
  148. package/tools/agents/use-rule-selection.mjs +1 -1
  149. package/tools/cli/workspace-deployment-health.mjs +38 -0
  150. package/tools/cli/workspace-status.mjs +5 -2
  151. package/tools/daemon/provider-watcher.mjs +3 -3
  152. package/tools/plugin/package-plugins.mjs +16 -2
  153. package/tools/ralph-external/lib/deepseek-harness-adapter.mjs +36 -22
  154. package/tools/ralph-external/lib/factory-adapter.mjs +13 -28
  155. package/tools/ralph-external/lib/factory-stream-final.mjs +31 -0
  156. package/tools/skills/deploy-skills-codex.mjs +2 -1
  157. package/vscode-extension/schemas/aiwg.config.v1.json +2 -1
@@ -243,7 +243,7 @@ export const newBundleHandler = {
243
243
  console.log(` then sync search cache: aiwg index sync --graph project`);
244
244
  console.log(` then: aiwg discover "${positional}"`);
245
245
  }
246
- console.log(` 4. Deploy: aiwg use ${positional}`);
246
+ console.log(` 4. Bundle ${indexedOk ? 'indexed' : 'created'}; run aiwg use ${positional} --copy only if you want provider copies.`);
247
247
  console.log(` 5. Inspect: aiwg doctor --project-local`);
248
248
  console.log(` 6. When mature, promote: aiwg promote ${positional}`);
249
249
  return { exitCode: 0 };
@@ -8,6 +8,11 @@ export const indexHandler = {
8
8
  async help(ctx) {
9
9
  if (ctx.args[0] === "discover")
10
10
  return discoverHandler.help(ctx);
11
+ if (ctx.args[0] === "query") {
12
+ const { printIndexQueryHelp } = await import("../../artifacts/index-query-help.js");
13
+ printIndexQueryHelp();
14
+ return { exitCode: 0 };
15
+ }
11
16
  const { printIndexUsage } = await import("../../artifacts/cli.js");
12
17
  printIndexUsage();
13
18
  return { exitCode: 0 };
@@ -16,7 +16,7 @@ const LIST_PROVIDER_TARGETS = [
16
16
  { name: 'opencode', root: '.opencode', agentsPath: '.opencode/agent', skillsPath: '.opencode/skill', commandsPath: '.opencode/command' },
17
17
  { name: 'warp', root: '.warp', agentsPath: '.warp/agents', skillsPath: '.warp/skills', commandsPath: '.warp/commands' },
18
18
  { name: 'factory', root: '.factory', agentsPath: '.factory/droids', skillsPath: '.factory/skills', commandsPath: '.factory/commands' },
19
- { name: 'windsurf', root: '.windsurf', agentsPath: '.windsurf/agents', skillsPath: '.windsurf/skills', commandsPath: '.windsurf/workflows' },
19
+ { name: 'devin', root: '.windsurf', agentsPath: '.windsurf/agents', skillsPath: '.windsurf/skills', commandsPath: '.windsurf/workflows' },
20
20
  { name: 'universal', root: '.agents', agentsPath: '.agents/agents', skillsPath: '.agents/skills', commandsPath: '.agents/commands' },
21
21
  ];
22
22
  function hasAnyPopulated(cwd, p) {
@@ -18,7 +18,7 @@ export const newProjectHandler = {
18
18
  const result = await runner.run("tools/install/new-project.mjs", ctx.args, {
19
19
  cwd: ctx.cwd,
20
20
  });
21
- if (result.exitCode === 0) {
21
+ if (result.exitCode === 0 && !ctx.args.includes("--list-templates")) {
22
22
  // The real scaffolder always runs in an existing target directory. Keep
23
23
  // mocked/script-runner-only calls side-effect free when their synthetic
24
24
  // cwd does not exist.
@@ -5,6 +5,17 @@ export const configHandler = {
5
5
  description: "User config commands (get, set, list, validate, reset, path, edit)",
6
6
  category: "config",
7
7
  aliases: [],
8
+ async help(ctx) {
9
+ if (ctx.args[0] === 'authorization') {
10
+ const { authorizationUsage } = await import('../../config/authorization-cli.js');
11
+ console.log(authorizationUsage);
12
+ }
13
+ else {
14
+ const { printUsage } = await import('../../config/cli-help.js');
15
+ printUsage();
16
+ }
17
+ return { exitCode: 0 };
18
+ },
8
19
  async execute(ctx) {
9
20
  try {
10
21
  const { main } = await import("../../config/cli.js");
@@ -345,7 +345,7 @@ function showTeamHelp() {
345
345
  info <name> Show team definition and agent roster
346
346
 
347
347
  ${ui.bold('Options:')}
348
- --provider <p> Override provider: antigravity|agy|claude|warp|copilot|cursor|windsurf|opencode|factory|codex|openclaw|omp|oh-my-pi
348
+ --provider <p> Override provider: antigravity|agy|claude|warp|copilot|cursor|devin|opencode|factory|codex|openclaw|omp|oh-my-pi
349
349
  --objective "<text>" Set objective passed to mc dispatch agents
350
350
  --body-file <file> OMP task JSON with explicit ownership and tools
351
351
  --cwd <dir> OMP working directory (defaults to current workspace)
@@ -78,10 +78,17 @@ export async function getAllExtensions(frameworkRoot) {
78
78
  }
79
79
  return result;
80
80
  }
81
+ /**
82
+ * Only the bulk kernel surface (`use all` outside Pi/OMP) omits bundled extensions.
83
+ * Index-only framework passes keep them so extension rules still deliver (#4279).
84
+ */
85
+ export function omitsExtensions(id, provider, kernelOnly) {
86
+ return kernelOnly && id === 'all' && !['pi', 'omp'].includes(provider);
87
+ }
81
88
  /** The same provider and kernel gates govern use passes and expected receipt owners. */
82
- export async function frameworkAdditiveBundles(frameworkRoot, provider, skipUtils = false, kernelOnly = false) {
89
+ export async function frameworkAdditiveBundles(frameworkRoot, provider, skipUtils = false, kernelOnly = false, id = 'all') {
83
90
  const addons = skipUtils || provider === 'flue' ? [] : await getAllAddons(frameworkRoot);
84
- const extensions = skipUtils || kernelOnly || provider === 'flue' ? [] : await getAllExtensions(frameworkRoot);
91
+ const extensions = skipUtils || omitsExtensions(id, provider, kernelOnly) || provider === 'flue' ? [] : await getAllExtensions(frameworkRoot);
85
92
  return { addons, extensions };
86
93
  }
87
94
  //# sourceMappingURL=use-additive-bundles.js.map
@@ -9,7 +9,7 @@ export async function countDeployedBundleRules(bundlePath, target, deployPath, p
9
9
  return 0;
10
10
  // The shared rule projector uses this conventional directory even when a
11
11
  // provider has no native rule loader (for example Pi).
12
- const destination = path.resolve(target, deployPath || `.${provider}/rules`);
12
+ const destination = path.resolve(target, deployPath || `.${provider === 'devin' ? 'windsurf' : provider}/rules`);
13
13
  let selected = [];
14
14
  let managed = {};
15
15
  try {
@@ -0,0 +1,42 @@
1
+ import { frameworkRegistryId } from '../../config/framework-aliases.js';
2
+ export async function executeCopySelection(ctx, execute) {
3
+ const index = ctx.args.indexOf('--copy');
4
+ if (index < 0)
5
+ return undefined;
6
+ const selector = ctx.args[index + 1]?.startsWith('-') === false ? ctx.args[index + 1] : undefined;
7
+ const args = [...ctx.args];
8
+ args.splice(index, selector ? 2 : 1);
9
+ const target = args[0];
10
+ if (!target || target.startsWith('-'))
11
+ return { exitCode: 2, message: '--copy requires a use target.' };
12
+ if (!selector || frameworkRegistryId(selector) === frameworkRegistryId(target)) {
13
+ return execute({ ...ctx, args: [...args, '--copy-all'] });
14
+ }
15
+ if (target !== 'all')
16
+ return { exitCode: 2, message: `--copy ${selector} requires 'use all' or 'use ${selector}'.` };
17
+ // Validate and copy the selected bundle first so a typo cannot partially index all.
18
+ const copied = await execute({ ...ctx, args: [selector, ...args.slice(1), '--copy-all'] });
19
+ if (copied.exitCode)
20
+ return copied;
21
+ return execute({ ...ctx, args });
22
+ }
23
+ export function discoveryDeploymentArgs(args, indexOnly) {
24
+ const sourceIndex = args.indexOf('--deploy-source');
25
+ if (sourceIndex >= 0 && args[sourceIndex + 1] === 'project-local') {
26
+ indexOnly = !args.some(arg => ['--copy-all', '--copy-standard-skills'].includes(arg));
27
+ }
28
+ if (!indexOnly)
29
+ return args;
30
+ return [...args.filter(arg => !['--copy-all', '--copy-standard-skills', '--index-mode'].includes(arg)), '--discovery-only'];
31
+ }
32
+ export function discoveryMessage(target, dryRun = false) {
33
+ return `${dryRun ? 'Would index' : 'Indexed'} ${target}; find artifacts with aiwg discover "<capability>" and load them with aiwg show. Use aiwg use ${target} --copy (or --copy-all) for provider copies. Existing copies are retained; review aiwg remove ${target} --dry-run before choosing removal and re-indexing.`;
34
+ }
35
+ export function reportDiscovery(ctx, result, indexOnly) {
36
+ if (result.exitCode || !indexOnly || ctx.args[0] === 'cockpit'
37
+ || ctx.args.some(arg => ['--json', '--help', '-h', '--workspace-signals'].includes(arg)))
38
+ return result;
39
+ // Lead with the discovery note so provider next steps (hook trust/acceptance) stay the last line.
40
+ return { ...result, message: [discoveryMessage(ctx.args[0] || 'all', ctx.args.includes('--dry-run')), result.message].filter(Boolean).join('\n') };
41
+ }
42
+ //# sourceMappingURL=use-copy-selection.js.map
@@ -40,8 +40,9 @@ import { initHandler } from './init.js';
40
40
  import { selectAddonProfile } from './use-addon-profile.js';
41
41
  import { deploymentEditWarnings } from '../../providers/deployment-preservation.mjs';
42
42
  import { permitsBundleDeployment } from '../../config/installed-selection.js';
43
- import { bundleDeploymentScope, recordBundleDeployment, copyCleanupArgs, projectLocalDeploymentContext, projectLocalCopyMode } from './bundle-deployment-mode.js';
44
- import { frameworkAdditiveBundles, getAllAddons, getAllExtensions } from './use-additive-bundles.js';
43
+ import { executeCopySelection, discoveryDeploymentArgs, reportDiscovery } from './use-copy-selection.js';
44
+ import { bundleDeploymentScope, recordBundleDeployment, bundleProviderCopyArgs, projectLocalDeploymentContext, projectLocalCopyMode } from './bundle-deployment-mode.js';
45
+ import { frameworkAdditiveBundles, getAllAddons, getAllExtensions, omitsExtensions } from './use-additive-bundles.js';
45
46
  export { getAllAddons, getAllExtensions, USE_ALL_DISALLOW, USE_ALL_EXTENSIONS_DISALLOW } from './use-additive-bundles.js';
46
47
  import { checkCollisions, formatCollisionReport, hasBlockingCollisions, } from '../../smiths/skillsmith/collision-detector.js';
47
48
  import { discoverProjectLocalBundles, formatProjectLocalTargetErrors, } from '../../extensions/project-local-discovery.js';
@@ -502,6 +503,8 @@ function resolveProviderPath(target, providerPath) {
502
503
  return path.isAbsolute(providerPath) ? providerPath : path.join(target, providerPath);
503
504
  }
504
505
  async function validateDeployedModelWrappers(options) {
506
+ if (useDeployment?.indexOnly)
507
+ return null;
505
508
  const paths = getProviderPaths(options.provider);
506
509
  const agentsPath = paths.agents ? resolveProviderPath(options.target, paths.agents) : null;
507
510
  const { collectProviderInventory } = await import('../../providers/provider-inventory.js');
@@ -655,7 +658,7 @@ const NEXT_STEPS = {
655
658
  'warp/sdlc': agenticNextSteps('Open Warp: Start a Warp session in this project root.'),
656
659
  'copilot/sdlc': agenticNextSteps('Open VS Code: Open this workspace and use Copilot Chat.'),
657
660
  'codex/sdlc': agenticNextSteps('Open Codex: Restart Codex in this project root.'),
658
- 'windsurf/sdlc': agenticNextSteps('Open Devin Desktop: Open this project in Devin Desktop and ask Devin for AIWG status.'),
661
+ 'devin/sdlc': agenticNextSteps('Open Devin Desktop: Open this project in Devin Desktop and ask Devin for AIWG status.'),
659
662
  'openclaw/sdlc': agenticNextSteps('Start OpenClaw: Open OpenClaw with this project workspace.'),
660
663
  'openclaw/marketing': agenticNextSteps('Start OpenClaw: Open OpenClaw with this project workspace.'),
661
664
  'openclaw/all': agenticNextSteps('Start OpenClaw: Open OpenClaw with this project workspace.'),
@@ -707,9 +710,9 @@ const SESSION_RELOAD_NOTICE = {
707
710
  action: 'Open a fresh Warp tab — WARP.md is re-read on tab start.',
708
711
  rationale: 'Warp aggregates context from WARP.md when a new tab spawns; existing tabs keep the prior version.',
709
712
  },
710
- windsurf: {
713
+ devin: {
711
714
  action: 'Restart Devin Desktop or reload the workspace so the aggregated AGENTS.md is re-parsed.',
712
- rationale: 'Devin Desktop reads the Windsurf-compatible AGENTS.md once per workspace session.',
715
+ rationale: 'Devin Desktop reads AGENTS.md once per workspace session.',
713
716
  },
714
717
  factory: {
715
718
  action: 'Restart your Factory droid runtime to pick up new entries in .factory/droids/.',
@@ -1091,19 +1094,8 @@ async function deployOneProjectLocalBundle(opts) {
1091
1094
  '--deploy-commands', '--deploy-skills', '--deploy-rules',
1092
1095
  '--provider', provider,
1093
1096
  '--target', target,
1094
- // Project-local skills MUST land in the per-project skills tier
1095
- // (#1228 follow-up). Default deploy mode after #1217 is no-copy +
1096
- // index-driven discovery, but that model assumes upstream skills at
1097
- // $AIWG_ROOT — project-local bundles live under the project's .aiwg/
1098
- // tree and aren't reachable via `aiwg discover` of the framework
1099
- // graph. Without --copy-all, the bundle's rules deploy but its skills
1100
- // never reach <provider>/.aiwg/skills/, leaving them invisible to
1101
- // both the platform and the index.
1102
- '--copy-all', ...copyCleanupArgs(ctx.args),
1103
- // That copy-all is the deployer's doing, not the operator's, so the
1104
- // provider's startup listing cap still applies; overflow lands on the
1105
- // standard tier instead of over the cap (#2561).
1106
- '--listing-budget',
1097
+ // Honor the local bundle's declared mode independently of its parent pass.
1098
+ ...bundleProviderCopyArgs(ctx.args), '--listing-budget',
1107
1099
  // Provenance for the managed marker (#2502). Without this the deployer
1108
1100
  // stamps `bundled`/`unknown`, and `aiwg refresh`'s stale-artifact prune —
1109
1101
  // whose desired set is the packaged framework corpus — deletes every
@@ -1318,7 +1310,7 @@ async function deployProjectLocalBundles(opts) {
1318
1310
  deployedArtifactHashes,
1319
1311
  });
1320
1312
  await writeAiwgConfig(projectDir, updated);
1321
- await recordBundleDeployment(projectDir, bundle.id, provider, updated.installed[bundle.id].deployedTo[provider].copy ? ['--copy-all'] : [], frameworkRoot);
1313
+ await recordBundleDeployment(projectDir, bundle.id, provider, updated.installed[bundle.id].deployedTo[provider].copy ? ['--copy-all'] : [], frameworkRoot, config);
1322
1314
  }
1323
1315
  catch (err) {
1324
1316
  // Non-fatal: deploy already succeeded
@@ -1398,7 +1390,7 @@ for (const flag of [...MODEL_DEPLOY_VALUE_FLAGS, '--reasoning', '--coding', '--e
1398
1390
  USE_FLAGS_WITH_VALUES.add(flag);
1399
1391
  }
1400
1392
  const USE_BOOLEAN_FLAGS = new Set([
1401
- '--package', '--force', '--copy-all', '--copy-standard-skills', '--dry-run', '--verbose', '-v', '--quiet', '-q',
1393
+ '--package', '--force', '--copy', '--copy-all', '--copy-standard-skills', '--dry-run', '--verbose', '-v', '--quiet', '-q',
1402
1394
  '--json', '--no-project-local', '--no-context-files', '--no-workspace-md',
1403
1395
  '--no-aiwg-md', '--no-agents-md', '--force-context-files', '--global', '--user',
1404
1396
  '--no-utils', '--ci-hooks-enabled', '--skip-conflicts', '--no-harness-agents',
@@ -1453,7 +1445,7 @@ async function generateDeploymentContextFiles(options) {
1453
1445
  }
1454
1446
  let useDeployment;
1455
1447
  function useDeploymentArgs(args) {
1456
- const forwarded = [...args];
1448
+ const forwarded = discoveryDeploymentArgs(args, useDeployment?.indexOnly === true);
1457
1449
  const modeIndex = args.indexOf('--mode');
1458
1450
  if (useDeployment && modeIndex >= 0)
1459
1451
  useDeployment.ruleSelectionMode ??= args[modeIndex + 1];
@@ -2094,6 +2086,7 @@ async function deployOmpUserSource(opts) {
2094
2086
  const adapter = await import(pathToFileURL(path.join(opts.frameworkRoot, 'tools/agents/providers/omp.mjs')).href);
2095
2087
  await adapter.deploy({ srcRoot: opts.source, target: opts.target, provider: 'omp', scope: 'user',
2096
2088
  mode: opts.mode ?? 'general', deployCommands: true, deploySkills: true, deployRules: true,
2089
+ skillsOnly: !opts.copyAll, kernelOnly: !opts.copyAll, discoveryOnly: !opts.copyAll, copyMode: true,
2097
2090
  copyStandardSkills: opts.copyAll, quiet: true, contextFiles: !useDeployment?.skipContextFiles, deployVersion: deploymentVersion(opts.frameworkRoot) });
2098
2091
  const sourceBundles = new Set([opts.source]);
2099
2092
  const { resourceDirs } = resolveOmpPaths({ cwd: opts.target });
@@ -2261,6 +2254,7 @@ Options:
2261
2254
  --force Re-write every artifact, replacing files AIWG does
2262
2255
  not currently manage. Use this to reclaim a
2263
2256
  directory left behind by an older AIWG install.
2257
+ --copy [bundle] Opt in to provider copies for this bundle (or one bundle with all)
2264
2258
  --copy-all Mirror standard-tier skills into the project; for
2265
2259
  all, restore the full agent, command and rule surface
2266
2260
  --dry-run Preview the deployment without writing files
@@ -2329,6 +2323,9 @@ export class UseHandler {
2329
2323
  return { exitCode: 0, message: USE_HELP, rawOutput: true };
2330
2324
  }
2331
2325
  async execute(ctx) {
2326
+ const selectedCopy = await executeCopySelection(ctx, next => this.execute(next));
2327
+ if (selectedCopy)
2328
+ return selectedCopy;
2332
2329
  if (ctx.args.includes('--declare'))
2333
2330
  return (await import('./bundle-declaration.js')).declareBundle(ctx);
2334
2331
  let resourceCredentials = useDeployment?.resourceCredentials;
@@ -2346,6 +2343,7 @@ export class UseHandler {
2346
2343
  return { exitCode: 2, message: invalidOption };
2347
2344
  const previousDeployment = useDeployment;
2348
2345
  useDeployment = {
2346
+ indexOnly: !ctx.args.includes('--copy-all') && !ctx.args.includes('--copy-standard-skills'),
2349
2347
  resourceCredentials,
2350
2348
  ruleSelectionMode: previousDeployment?.ruleSelectionMode,
2351
2349
  version: previousDeployment?.version ?? resolveDeployVersion(ctx.frameworkRoot || await getFrameworkRoot()),
@@ -2381,7 +2379,7 @@ export class UseHandler {
2381
2379
  result.message = [result.message, ...rollback.conflicts.map(conflict => `Context rollback conflict: ${conflict.path}: ${conflict.reason}`)].filter(Boolean).join('\n');
2382
2380
  }
2383
2381
  }
2384
- return result;
2382
+ return reportDiscovery(ctx, result, useDeployment.indexOnly === true);
2385
2383
  }
2386
2384
  finally {
2387
2385
  journal?.dispose();
@@ -3185,11 +3183,7 @@ export class UseHandler {
3185
3183
  addonBaseArgs.push('--allow-over-budget');
3186
3184
  if (addonScope === 'user')
3187
3185
  addonBaseArgs.push('--scope', 'user');
3188
- // An explicitly selected upstream addon must be self-contained in the
3189
- // project. Unlike a full framework deploy, its standard skills cannot be
3190
- // left index-only: the user asked to install this specific bundle and
3191
- // its supporting scripts must travel with the skill directory.
3192
- addonBaseArgs.push('--copy-all', ...copyCleanupArgs(remainingArgs));
3186
+ addonBaseArgs.push(...bundleProviderCopyArgs(remainingArgs));
3193
3187
  if (provider === 'flue' && remainingArgs.includes('--package'))
3194
3188
  addonBaseArgs.push('--package');
3195
3189
  addonBaseArgs.push(...modelDeployArgs);
@@ -3277,7 +3271,7 @@ export class UseHandler {
3277
3271
  }
3278
3272
  if (!dryRunAddon && provider === 'omp' && (detectScope(remainingArgs) === 'user' || remainingArgs.includes('--user'))) {
3279
3273
  try {
3280
- await deployOmpUserSource({ frameworkRoot, source: addonSource, target, bundle: framework, copyAll: true });
3274
+ await deployOmpUserSource({ frameworkRoot, source: addonSource, target, bundle: framework, copyAll: useDeployment?.indexOnly !== true });
3281
3275
  }
3282
3276
  catch (error) {
3283
3277
  return { exitCode: 1, message: `OMP user deployment failed: ${error instanceof Error ? error.message : String(error)}` };
@@ -3347,7 +3341,7 @@ export class UseHandler {
3347
3341
  copy: remainingArgs.includes('--copy-all') || remainingArgs.includes('--copy-standard-skills'),
3348
3342
  });
3349
3343
  await writeAiwgConfig(projectDir, updated);
3350
- await recordBundleDeployment(projectDir, framework, provider, remainingArgs, frameworkRoot);
3344
+ await recordBundleDeployment(projectDir, framework, provider, remainingArgs, frameworkRoot, config);
3351
3345
  config = updated;
3352
3346
  }
3353
3347
  catch (error) {
@@ -3469,17 +3463,21 @@ export class UseHandler {
3469
3463
  if (unsupported)
3470
3464
  return { exitCode: 1, message: unsupported };
3471
3465
  const resolved = resolveBuiltInProviderForUse(local.provider);
3466
+ // Pi's discovery projection reads the preceding provider's recorded selection.
3467
+ if (useDeployment?.indexOnly && resolved.provider === 'pi') {
3468
+ canPrepareConcurrently = false;
3469
+ break;
3470
+ }
3472
3471
  if (!PREPARABLE_BUILTIN_PROVIDERS.has(resolved.provider)) {
3473
3472
  canPrepareConcurrently = false;
3474
3473
  break;
3475
3474
  }
3476
3475
  const args = useDeploymentArgs(withProviderOverride([...deployFilteredArgs], resolved.provider));
3477
3476
  if (framework === 'all') {
3478
- const kernelOnly = !['pi', 'omp'].includes(resolved.provider)
3479
- && !remainingArgs.includes('--copy-all') && !remainingArgs.includes('--copy-standard-skills');
3477
+ const kernelOnly = bundleDeploymentScope(framework, resolved.provider, remainingArgs).kernelOnly;
3480
3478
  if (kernelOnly)
3481
3479
  args.push('--kernel-only');
3482
- if (!skipUtils && ((!kernelOnly && (await getAllExtensions(frameworkRoot)).length > 0)
3480
+ if (!skipUtils && ((!omitsExtensions(framework, resolved.provider, kernelOnly) && (await getAllExtensions(frameworkRoot)).length > 0)
3483
3481
  || (!mainDeploymentIncludesAddons(resolved.provider, mode, args) && (await getAllAddons(frameworkRoot)).length > 0))) {
3484
3482
  args.push('--defer-rule-projection');
3485
3483
  }
@@ -3538,13 +3536,10 @@ export class UseHandler {
3538
3536
  const providerDeployArgs = builtInProviderResolution.requestedProvider
3539
3537
  ? withProviderOverride(deployFilteredArgs, provider)
3540
3538
  : deployFilteredArgs;
3541
- const bulkKernelOnly = framework === 'all'
3542
- && !['pi', 'omp'].includes(provider)
3543
- && !remainingArgs.includes('--copy-all')
3544
- && !remainingArgs.includes('--copy-standard-skills');
3539
+ const bulkKernelOnly = bundleDeploymentScope(framework, provider, remainingArgs).kernelOnly;
3545
3540
  if (bulkKernelOnly)
3546
3541
  providerDeployArgs.push('--kernel-only');
3547
- const { addons: allAddons, extensions: allExtensions } = await frameworkAdditiveBundles(frameworkRoot, provider, skipUtils, bulkKernelOnly);
3542
+ const { addons: allAddons, extensions: allExtensions } = await frameworkAdditiveBundles(frameworkRoot, provider, skipUtils, bulkKernelOnly, framework);
3548
3543
  const mainIncludesAddons = mainDeploymentIncludesAddons(provider, mode, providerDeployArgs);
3549
3544
  // OMP's extension sources share the root transaction and binding scan.
3550
3545
  // Their CLI contributions are still registered below in source order.
@@ -4184,7 +4179,7 @@ export class UseHandler {
4184
4179
  ...bundleDeploymentScope(framework, provider, remainingArgs),
4185
4180
  });
4186
4181
  await writeAiwgConfig(projectDir, updatedConfig);
4187
- await recordBundleDeployment(projectDir, framework, provider, remainingArgs, frameworkRoot);
4182
+ await recordBundleDeployment(projectDir, framework, provider, remainingArgs, frameworkRoot, config);
4188
4183
  }
4189
4184
  catch {
4190
4185
  // Non-fatal: config tracking failure must not block deployment
@@ -21,6 +21,10 @@ export const workspaceContextHandler = {
21
21
  description: 'Audit, migrate, diagnose, and roll back canonical WORKSPACE.md context',
22
22
  category: 'maintenance',
23
23
  aliases: [],
24
+ async help() {
25
+ printHelp();
26
+ return { exitCode: 0 };
27
+ },
24
28
  async execute(ctx) {
25
29
  try {
26
30
  if (ctx.args.includes('--help') || ctx.args.includes('-h')) {
@@ -172,6 +172,6 @@ function formatCommandName(cmd) {
172
172
  /** Provider list shared by both production help paths, including generic. */
173
173
  export function generateProviderHelp() {
174
174
  const providers = listProviderDefinitions();
175
- return `Providers: ${providers.length} — ${providers.map(({ id, status }) => status === 'experimental' ? `${id} (experimental)` : id).join(', ')} (default: claude; aliases: agy → antigravity, devin → windsurf, oh-my-pi → omp, openai → codex)`;
175
+ return `Providers: ${providers.length} — ${providers.map(({ id, status }) => status === 'experimental' ? `${id} (experimental)` : id).join(', ')} (default: claude; aliases: agy → antigravity, windsurf → devin (deprecated), oh-my-pi → omp, openai → codex)`;
176
176
  }
177
177
  //# sourceMappingURL=help-generator.js.map
@@ -0,0 +1,46 @@
1
+ // Shares scaffold argument and target validation between the router and standalone tool.
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ export function parseNewProjectArgs(args, cwd) {
5
+ const options = {
6
+ name: path.basename(cwd), withAgents: true, provider: 'claude', copy: false, mode: 'scaffold',
7
+ };
8
+ if (args.includes('--help') || args.includes('-h'))
9
+ return { ...options, mode: 'help' };
10
+ let target;
11
+ let listTemplates = false;
12
+ for (let i = 0; i < args.length; i++) {
13
+ const arg = args[i];
14
+ if (arg === '--name' || arg === '--provider') {
15
+ if (!args[i + 1] || args[i + 1].startsWith('-'))
16
+ throw new Error(`${arg} requires a value`);
17
+ const value = args[++i];
18
+ if (arg === '--name')
19
+ options.name = value;
20
+ else
21
+ options.provider = value.toLowerCase();
22
+ }
23
+ else if (arg === '--no-agents')
24
+ options.withAgents = false;
25
+ else if (arg === '--copy' || arg === '--copy-all')
26
+ options.copy = true;
27
+ else if (arg === '--list-templates')
28
+ listTemplates = true;
29
+ else if (arg.startsWith('-'))
30
+ throw new Error(`Unknown option: ${arg}`);
31
+ else if (target !== undefined)
32
+ throw new Error('Only one project target is allowed');
33
+ else {
34
+ target = arg;
35
+ if (arg !== '.')
36
+ options.name = arg;
37
+ }
38
+ }
39
+ if (listTemplates)
40
+ return { ...options, mode: 'list' };
41
+ if (target !== '.' && fs.readdirSync(cwd).length > 0) {
42
+ throw new Error('Current directory is not empty. Run aiwg new . to explicitly scaffold here.');
43
+ }
44
+ return options;
45
+ }
46
+ //# sourceMappingURL=new-project-options.js.map
@@ -186,9 +186,20 @@ export async function run(args, options = {}) {
186
186
  }
187
187
  // Build context for handler and hooks
188
188
  const ctx = await buildContext(commandArgs, args, options);
189
- // Read-only memory views (audit, cost, recommend, plan, verify, --preview) cannot invoke mutation-capable hooks or append command telemetry.
190
- // Keep dispatch through the existing memory handler and strict parser.
191
- if (commandId === 'memory' && (['audit', 'cost', 'recommend', 'plan', 'verify'].includes(commandArgs[0]) || commandArgs.includes('--preview'))) {
189
+ // Validate before mutation-capable hooks; successful scaffolds keep the normal hook path.
190
+ let readOnlyNew = false;
191
+ if (commandId === 'new') {
192
+ try {
193
+ const { parseNewProjectArgs } = await import('./new-project-options.js');
194
+ readOnlyNew = parseNewProjectArgs(commandArgs, ctx.cwd).mode !== 'scaffold';
195
+ }
196
+ catch (error) {
197
+ ui.error(error instanceof Error ? error.message : String(error));
198
+ process.exit(2);
199
+ }
200
+ }
201
+ // Listings and read-only memory views cannot invoke hooks or append telemetry.
202
+ if (readOnlyNew || commandId === 'memory' && (['audit', 'cost', 'recommend', 'plan', 'verify'].includes(commandArgs[0]) || commandArgs.includes('--preview'))) {
192
203
  const result = await handler.execute(ctx);
193
204
  if (result.message) {
194
205
  if (result.exitCode !== 0)
@@ -358,7 +369,7 @@ async function buildContext(args, rawArgs, options) {
358
369
  || (rawArgs[0] === 'steward' && args[0] === 'decision-offload');
359
370
  const readOnlyMemoryAudit = rawArgs[0] === 'memory' && (['audit', 'cost', 'recommend', 'plan', 'verify'].includes(args[0]) || args.includes('--preview') || args.includes('--help') || args.includes('-h'));
360
371
  const frameworkRoot = await getFrameworkRoot({
361
- createIfMissing: !args.includes('--dry-run') && !readOnlyRuleInventory && !readOnlyOffloadReport && !readOnlyMemoryAudit,
372
+ createIfMissing: !['new', '-new', '--new'].includes(rawArgs[0]) && !args.includes('--dry-run') && !readOnlyRuleInventory && !readOnlyOffloadReport && !readOnlyMemoryAudit,
362
373
  });
363
374
  const ctx = {
364
375
  args,
@@ -171,21 +171,21 @@ export const USER_SCOPE_PATHS = {
171
171
  rules: path.join(homedir(), '.warp', 'rules'),
172
172
  behaviors: '',
173
173
  },
174
- windsurf: {
174
+ devin: {
175
175
  // #1163 — Non-applicable for filesystem user-scope discovery.
176
176
  //
177
- // Windsurf's user-scope mechanism is **Cascade Memories** (in-app,
177
+ // Devin Desktop's user-scope mechanism is **Cascade Memories** (in-app,
178
178
  // managed by the Cascade agent itself, not file-discovered) and
179
- // global rules in the Windsurf settings UI. Project-scope discovery
179
+ // global rules in the Devin Desktop settings UI. Project-scope discovery
180
180
  // is `.windsurf/{rules,workflows}/` and AGENTS.md aggregation. There
181
181
  // is no documented filesystem scan of `~/.windsurf/` for user-scope
182
182
  // content.
183
183
  //
184
184
  // The paths below remain populated as a "harmless mirror" — deploying
185
- // there does not break Windsurf, but the runtime won't pick them up.
186
- // Operators wanting cross-project Windsurf customization should use
185
+ // there does not break Devin Desktop, but the runtime won't pick them up.
186
+ // Operators wanting cross-project Devin Desktop customization should use
187
187
  // Cascade Memories (commit a memory via the agent UI) or the
188
- // Windsurf settings UI, not AIWG `--scope user`.
188
+ // Devin Desktop settings UI, not AIWG `--scope user`.
189
189
  agents: path.join(homedir(), '.windsurf', 'agents'),
190
190
  skills: path.join(homedir(), '.windsurf', 'skills'),
191
191
  commands: path.join(homedir(), '.windsurf', 'workflows'),
@@ -4,6 +4,17 @@ import os from 'node:os';
4
4
  import path from 'node:path';
5
5
  import { readAiwgConfig } from '../../config/aiwg-config.js';
6
6
  import { inspectUserRegistry } from '../../config/user-registry.js';
7
+ import { frameworkRegistryId } from '../../config/framework-aliases.js';
8
+ /** An indexed selection still requires a valid index, but may own no provider payload. */
9
+ export async function deploymentIndexesOnly(projectRoot, provider, bundles, scope = 'project') {
10
+ const config = await readAiwgConfig(projectRoot);
11
+ const nativeInstalled = scope === 'user' ? (await inspectUserRegistry()).registry.installed : config?.installed;
12
+ return bundles.length > 0 && bundles.every(bundle => {
13
+ const flags = Object.entries(config?.installed ?? {}).find(([id]) => frameworkRegistryId(id) === frameworkRegistryId(bundle))?.[1].deployedTo[provider];
14
+ const native = Object.entries(nativeInstalled ?? {}).find(([id]) => frameworkRegistryId(id) === frameworkRegistryId(bundle))?.[1].deployedTo[provider];
15
+ return flags?.copy === false && native !== undefined && ['agents', 'commands', 'skills', 'rules'].every(kind => !native[kind]);
16
+ });
17
+ }
7
18
  export async function deploymentProbeScope(projectRoot, explicitScope) {
8
19
  if (explicitScope)
9
20
  return explicitScope;
@@ -0,0 +1,83 @@
1
+ // Share refresh's read-only drift checks with status and doctor.
2
+ import { readFile } from 'node:fs/promises';
3
+ import { homedir } from 'node:os';
4
+ import path from 'node:path';
5
+ import { lt, valid } from 'semver';
6
+ import { readAiwgConfig } from '../../config/aiwg-config.js';
7
+ import { readUserRegistry } from '../../config/user-registry.js';
8
+ import { checkManagedDeployment } from '../handlers/refresh-managed-deployment.js';
9
+ export async function deploymentStaleness(options, installedSnapshot) {
10
+ const { provider, frameworkRoot } = options;
11
+ const findings = [];
12
+ const remediation = `Run aiwg refresh --provider ${provider}${options.scope === 'user' ? ' --global' : ''} to refresh the managed deployment; review operator edits before replacing files.`;
13
+ const advisory = (id, message) => findings.push({ id, provider, severity: 'advisory', message, remediation });
14
+ let version;
15
+ try {
16
+ version = JSON.parse(await readFile(path.join(frameworkRoot, 'package.json'), 'utf8')).version;
17
+ }
18
+ catch (error) {
19
+ if (error.code === 'ENOENT')
20
+ return findings;
21
+ advisory('deployment-staleness-unreadable', `Deployment freshness could not be checked: ${String(error)}`);
22
+ return findings;
23
+ }
24
+ if (!valid(version))
25
+ return findings;
26
+ const projectRoot = options.outputRoot ?? (options.scope === 'user' ? homedir() : options.projectRoot);
27
+ try {
28
+ const installed = installedSnapshot ?? (options.scope === 'user' ? await readUserRegistry() : await readAiwgConfig(options.projectRoot))?.installed;
29
+ // Bundle manifest semver (e.g. utils 1.5.0) is independent of runtime CalVer.
30
+ for (const bundle of options.requestedBundles) {
31
+ const entry = installed?.[bundle];
32
+ if (!entry || (entry.source && entry.source !== 'bundled') || !entry.version || !/^\d{4}\./.test(entry.version) || !valid(entry.version) || !lt(entry.version, version))
33
+ continue;
34
+ advisory(`deployment-stale-bundle:${bundle}`, `Stale deployment: ${bundle} (v${entry.version} → v${version}) for ${provider}.`);
35
+ }
36
+ for (const item of await checkManagedDeployment({ projectRoot, frameworkRoot, provider, quiet: true, scope: options.scope })) {
37
+ if (item.reason === 'missing' && !options.requestedBundles.some(bundle => ['all', 'utils', 'aiwg-hooks'].includes(bundle)))
38
+ continue;
39
+ advisory(`deployment-stale-managed:${item.file}:${item.name}`, `Stale deployment: ${item.reason} ${item.name} — ${item.file}`);
40
+ }
41
+ // Import lazily: refresh also owns the use handler, which consumes verification.
42
+ const { detectStaleProviderTrees } = await import('../handlers/refresh.js');
43
+ for (const tree of await detectStaleProviderTrees({ projectRoot, frameworkRoot, currentVersion: version })) {
44
+ if (tree.provider !== provider)
45
+ continue;
46
+ advisory('deployment-stale-tree', `Stale ${provider} deployment: ${tree.total} AIWG-managed file(s) from v${tree.version}.`);
47
+ }
48
+ }
49
+ catch (error) {
50
+ advisory('deployment-staleness-unreadable', `Deployment freshness could not be checked: ${String(error)}`);
51
+ }
52
+ return findings;
53
+ }
54
+ export async function configuredDeploymentStaleness(projectRoot, frameworkRoot, snapshot) {
55
+ const config = snapshot === undefined ? await readAiwgConfig(projectRoot) : snapshot;
56
+ const installed = config?.installed ?? {};
57
+ const providers = new Set([...(config?.providers ?? []), ...Object.values(installed).flatMap(entry => Object.keys(entry.deployedTo))]);
58
+ const findings = [];
59
+ for (const provider of providers) {
60
+ const requestedBundles = Object.keys(installed).filter(bundle => installed[bundle].deployedTo[provider]);
61
+ if (!requestedBundles.length)
62
+ continue;
63
+ findings.push(...await deploymentStaleness({ projectRoot, frameworkRoot, provider, scope: 'project', requestedBundles }, installed));
64
+ }
65
+ return findings;
66
+ }
67
+ export async function withDeploymentStaleness(result, options, installedSnapshot) {
68
+ const stale = await deploymentStaleness(options, installedSnapshot);
69
+ if (!stale.length)
70
+ return result;
71
+ const findings = [...result.findings, ...stale];
72
+ const outcome = result.outcome === 'failed' ? 'failed' : 'degraded';
73
+ return { ...result, outcome, findings, phases: result.phases.map(phase => {
74
+ if (phase.id === 'deploy')
75
+ return { ...phase, summary: `${phase.summary} Deployment freshness advisories need review.` };
76
+ if (phase.id === 'verify')
77
+ return { ...phase, summary: `${findings.filter(item => item.severity === 'blocking').length} blocking and ${findings.filter(item => item.severity === 'advisory').length} advisory finding(s).` };
78
+ if (phase.id === 'report')
79
+ return { ...phase, summary: `Final provider outcome: ${outcome}.` };
80
+ return phase;
81
+ }) };
82
+ }
83
+ //# sourceMappingURL=deployment-staleness.js.map