@aiwg/cli 2026.11.7 → 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.
- package/README.md +1 -1
- package/agentic/code/addons/aiwg-hooks/hooks/aiwg-prompt-discovery.cjs +3 -2
- package/agentic/code/providers/capability-matrix.yaml +4 -4
- package/agentic/code/providers/model-capabilities.v1.json +169 -46
- package/agentic/code/providers/model-catalog.v1.json +17 -15
- package/bin/aiwg.mjs +3 -1
- package/dist/src/agents/agent-packager.js +3 -3
- package/dist/src/artifacts/cli.js +6 -2
- package/dist/src/artifacts/fortemi-core-sync.js +2 -0
- package/dist/src/artifacts/index-query-help.js +27 -0
- package/dist/src/artifacts/query-engine-installation.js +17 -4
- package/dist/src/artifacts/query-engine-name-intent.js +56 -0
- package/dist/src/artifacts/query-engine-scoring.js +14 -8
- package/dist/src/artifacts/query-engine-show-card.js +3 -3
- package/dist/src/cli/agent-spawn.js +4 -4
- package/dist/src/cli/handlers/best-practices-audit.js +1 -1
- package/dist/src/cli/handlers/bundle-deployment-mode.js +26 -13
- package/dist/src/cli/handlers/bundle-reconciliation.js +2 -2
- package/dist/src/cli/handlers/init.js +1 -1
- package/dist/src/cli/handlers/issues.js +5 -0
- package/dist/src/cli/handlers/marketplace-plugin-search.js +6 -5
- package/dist/src/cli/handlers/marketplace.js +1 -1
- package/dist/src/cli/handlers/models-muse-wrapper.js +32 -0
- package/dist/src/cli/handlers/models.js +5 -4
- package/dist/src/cli/handlers/refresh-artifact-freshness.js +51 -0
- package/dist/src/cli/handlers/refresh-bundles.js +3 -0
- package/dist/src/cli/handlers/refresh-managed-deployment.js +19 -7
- package/dist/src/cli/handlers/refresh-user-hooks.js +102 -0
- package/dist/src/cli/handlers/refresh.js +9 -3
- package/dist/src/cli/handlers/repo-access.js +15 -2
- package/dist/src/cli/handlers/sdlc-accelerate.js +1 -1
- package/dist/src/cli/handlers/steward.js +1 -1
- package/dist/src/cli/handlers/subcommands-bundles.js +1 -1
- package/dist/src/cli/handlers/subcommands-discovery.js +5 -0
- package/dist/src/cli/handlers/subcommands-list.js +1 -1
- package/dist/src/cli/handlers/subcommands-plugins.js +1 -1
- package/dist/src/cli/handlers/subcommands-storage.js +11 -0
- package/dist/src/cli/handlers/team.js +1 -1
- package/dist/src/cli/handlers/use-additive-bundles.js +9 -2
- package/dist/src/cli/handlers/use-bundle-counts.js +1 -1
- package/dist/src/cli/handlers/use-copy-selection.js +42 -0
- package/dist/src/cli/handlers/use.js +33 -38
- package/dist/src/cli/handlers/workspace-context.js +4 -0
- package/dist/src/cli/help-generator.js +1 -1
- package/dist/src/cli/new-project-options.js +46 -0
- package/dist/src/cli/router.js +15 -4
- package/dist/src/cli/scope-resolver.js +6 -6
- package/dist/src/cli/services/deployment-probe-scope.js +11 -0
- package/dist/src/cli/services/deployment-staleness.js +83 -0
- package/dist/src/cli/services/deployment-verification.js +20 -11
- package/dist/src/config/aiwg-config.js +1 -1
- package/dist/src/config/authorization-cli.js +36 -1
- package/dist/src/config/config-normalization.js +3 -1
- package/dist/src/config/worker-guidance-warning.js +8 -0
- package/dist/src/data/community.yaml +3 -3
- package/dist/src/extensions/commands/definitions.js +2 -2
- package/dist/src/extensions/manifest.js +27 -1
- package/dist/src/extensions/user-hook-diagnostics.js +18 -1
- package/dist/src/extensions/verified-hook-command.js +9 -0
- package/dist/src/features/catalog.js +2 -2
- package/dist/src/issues/cli.js +10 -2
- package/dist/src/marketplace/cache.js +31 -0
- package/dist/src/marketplace/plugin-search.js +39 -20
- package/dist/src/marketplace/public-search.js +122 -0
- package/dist/src/marketplace/registry.js +2 -0
- package/dist/src/marketplace/search-contract.js +19 -0
- package/dist/src/marketplace/sources/public-search.js +81 -0
- package/dist/src/mcp/cli.mjs +8 -7
- package/dist/src/mcp/credentials.mjs +1 -1
- package/dist/src/mcp/registry.js +6 -2
- package/dist/src/mcp/tool-filters.mjs +1 -1
- package/dist/src/memory/provider-memory-adapter.js +1 -1
- package/dist/src/models/catalog-policy.js +2 -1
- package/dist/src/models/config-loader.js +2 -1
- package/dist/src/models/cursor-models.js +92 -0
- package/dist/src/models/cursor-worker-version.d.mts +2 -0
- package/dist/src/models/cursor-worker-version.mjs +27 -0
- package/dist/src/models/model-capabilities.v1.json +169 -46
- package/dist/src/models/model-catalog.v1.json +17 -15
- package/dist/src/models/model-discovery.js +7 -6
- package/dist/src/models/policy-resources.js +1 -1
- package/dist/src/models/provider-policy.js +1 -1
- package/dist/src/models/worker-direct-readiness.js +8 -5
- package/dist/src/models/worker-health-readiness.js +4 -0
- package/dist/src/models/worker-installation.d.mts +5 -2
- package/dist/src/models/worker-installation.mjs +20 -12
- package/dist/src/models/worker-invocation-policy.js +22 -2
- package/dist/src/models/worker-plan.js +3 -1
- package/dist/src/models/worker-wiring-diagnostics.js +25 -0
- package/dist/src/models/wrapper-deployment.js +1 -1
- package/dist/src/models/wrapper-enforcement.js +6 -2
- package/dist/src/plugin/skill-command-frontmatter.js +1 -1
- package/dist/src/plugin/skill-command-translator.js +1 -1
- package/dist/src/policy/repo-access-workspace-spec.js +63 -0
- package/dist/src/policy/repo-access.js +22 -0
- package/dist/src/providers/capability-matrix.yaml +4 -4
- package/dist/src/providers/deployment-ownership.mjs +1 -1
- package/dist/src/providers/deployment-preservation.mjs +10 -5
- package/dist/src/providers/deployment-removal.js +1 -1
- package/dist/src/providers/devin-compat.d.mts +4 -0
- package/dist/src/providers/devin-compat.mjs +29 -0
- package/dist/src/providers/grok-build-acp.js +39 -9
- package/dist/src/providers/grok-build-paths.js +8 -7
- package/dist/src/providers/provider-context-contracts.js +7 -3
- package/dist/src/providers/provider-definition-schema.js +1 -1
- package/dist/src/providers/provider-definitions.js +1 -1
- package/dist/src/providers/provider-definitions.mjs +3 -3
- package/dist/src/providers/provider-inventory.js +13 -1
- package/dist/src/providers/provider-seeds-1.js +1 -1
- package/dist/src/providers/provider-seeds-3.js +10 -9
- package/dist/src/providers/transformation-receipt-integration.js +1 -1
- package/dist/src/sessions/adapters/windsurf.js +7 -7
- package/dist/src/sessions/grok-build-cli-output.js +1 -1
- package/dist/src/sessions/grok-build-cli.js +7 -1
- package/dist/src/skills/bundle-import-cli.js +61 -0
- package/dist/src/skills/bundle-import-plan.js +108 -0
- package/dist/src/skills/bundle-import.js +192 -0
- package/dist/src/skills/cli.js +5 -0
- package/dist/src/skills/deployment-policy.js +1 -1
- package/dist/src/skills/importer.js +4 -4
- package/dist/src/smiths/agentsmith/demo.js +1 -1
- package/dist/src/smiths/agentsmith/examples.js +6 -6
- package/dist/src/smiths/commandsmith/generator.js +1 -1
- package/dist/src/smiths/context-pipeline/allowlist.js +1 -1
- package/dist/src/smiths/context-pipeline/muse-bridge.js +7 -4
- package/dist/src/smiths/context-pipeline/parallelism-section.js +2 -2
- package/dist/src/smiths/context-pipeline/workspace-audit.js +37 -6
- package/dist/src/smiths/context-pipeline/workspace-bootstrap.js +3 -1
- package/dist/src/smiths/context-pipeline/workspace-doctor.js +16 -4
- package/dist/src/smiths/context-pipeline/workspace-document.js +4 -2
- package/dist/src/smiths/hook-bridge/codex-trust.js +56 -7
- package/dist/src/smiths/hook-bridge/cursor-translator.js +89 -0
- package/dist/src/smiths/hook-bridge/index.js +4 -1
- package/dist/src/smiths/skillsmith/collision-detector.js +1 -1
- package/dist/src/smiths/skillsmith/namespace-adapter.js +1 -1
- package/dist/src/smiths/skillsmith/platform-resolver.js +2 -2
- package/dist/src/writing/campaign-report.js +4 -3
- package/dist/src/writing/contextual-diagnostics.js +29 -3
- package/dist/src/writing/current-patterns.catalogue.json +4 -4
- package/dist/src/writing/current-patterns.js +3 -2
- package/dist/src/writing/structural-judgment.catalogue.json +17 -0
- package/dist/src/writing/structural-judgment.js +33 -0
- package/dist/src/writing/structural-patterns.js +78 -6
- package/dist/src/writing/validation-campaign.js +3 -0
- package/dist/src/writing/validation-engine.js +7 -4
- package/package.json +4 -2
- package/schemas/models/model-config-compatibility.v1.schema.json +1 -1
- package/tools/agents/deploy-agents.mjs +12 -10
- package/tools/agents/deploy-options.mjs +1 -0
- package/tools/agents/providers/base-behaviors.mjs +1 -1
- package/tools/agents/providers/base-contract.mjs +1 -1
- package/tools/agents/providers/base-kernel-skills.mjs +1 -1
- package/tools/agents/providers/base-models-platforms.mjs +9 -7
- package/tools/agents/providers/base-rule-index.mjs +1 -1
- package/tools/agents/providers/codex.mjs +1 -0
- package/tools/agents/providers/cursor-prompt-discovery.mjs +13 -0
- package/tools/agents/providers/cursor.mjs +2 -0
- package/tools/agents/providers/devin.mjs +3 -0
- package/tools/agents/providers/grok-build.mjs +14 -19
- package/tools/agents/providers/hook-capabilities.mjs +1 -1
- package/tools/agents/providers/model-wrapper.mjs +1 -1
- package/tools/agents/providers/openclaw-context.mjs +6 -0
- package/tools/agents/providers/openclaw.mjs +14 -12
- package/tools/agents/providers/rule-delivery-surface.mjs +15 -11
- package/tools/agents/providers/rule-deployment-prepare.mjs +9 -8
- package/tools/agents/providers/rule-presentation.mjs +1 -1
- package/tools/agents/providers/rule-projection.mjs +5 -5
- package/tools/agents/providers/rule-startup.mjs +4 -2
- package/tools/agents/providers/skill-copy-prune.mjs +5 -1
- package/tools/agents/providers/windsurf.mjs +26 -26
- package/tools/agents/use-rule-selection.mjs +1 -1
- package/tools/cli/workspace-deployment-health.mjs +38 -0
- package/tools/cli/workspace-status.mjs +5 -2
- package/tools/daemon/provider-watcher.mjs +3 -3
- package/tools/plugin/package-plugins.mjs +16 -2
- package/tools/ralph-external/lib/deepseek-harness-adapter.mjs +36 -22
- package/tools/ralph-external/lib/factory-adapter.mjs +13 -28
- package/tools/ralph-external/lib/factory-stream-final.mjs +31 -0
- package/tools/skills/deploy-skills-codex.mjs +2 -1
- package/vscode-extension/schemas/aiwg.config.v1.json +15 -1
|
@@ -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 {
|
|
44
|
-
import {
|
|
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
|
-
'
|
|
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
|
-
|
|
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
|
|
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
|
-
//
|
|
1095
|
-
|
|
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 =
|
|
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
|
-
|
|
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 =
|
|
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
|
|
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,
|
|
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
|
package/dist/src/cli/router.js
CHANGED
|
@@ -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
|
-
//
|
|
190
|
-
|
|
191
|
-
if (commandId === '
|
|
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
|
-
|
|
174
|
+
devin: {
|
|
175
175
|
// #1163 — Non-applicable for filesystem user-scope discovery.
|
|
176
176
|
//
|
|
177
|
-
//
|
|
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
|
|
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
|
|
186
|
-
// Operators wanting cross-project
|
|
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
|
-
//
|
|
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
|
|
@@ -14,7 +14,8 @@ import { runGrokInspect } from '../../providers/grok-build-inspect.js';
|
|
|
14
14
|
import { diagnoseIntegratedProviderTransformationReceipt } from '../../providers/transformation-receipt-integration.js';
|
|
15
15
|
import { diagnoseWorkspaceContext, providerContextContract, } from '../../smiths/context-pipeline/workspace-context.js';
|
|
16
16
|
import { USER_SCOPE_PATHS } from '../scope-resolver.js';
|
|
17
|
-
import {
|
|
17
|
+
import { withDeploymentStaleness } from './deployment-staleness.js';
|
|
18
|
+
import { deploymentProbeNextCommand, deploymentProbeScope, deploymentIndexesOnly } from './deployment-probe-scope.js';
|
|
18
19
|
const RESTART_NOTICES = {
|
|
19
20
|
flue: { policy: 'restart-required',
|
|
20
21
|
action: 'Restart the Flue app before checking deployed context and skills.',
|
|
@@ -75,10 +76,10 @@ const RESTART_NOTICES = {
|
|
|
75
76
|
action: 'Open a fresh Warp tab so it reloads project context.',
|
|
76
77
|
reason: 'Warp reads project context when a tab starts.',
|
|
77
78
|
},
|
|
78
|
-
|
|
79
|
+
devin: {
|
|
79
80
|
policy: 'restart-required',
|
|
80
81
|
action: 'Reload Devin Desktop so it reparses project context.',
|
|
81
|
-
reason: 'Devin Desktop reads the
|
|
82
|
+
reason: 'Devin Desktop reads the project context when the workspace opens.',
|
|
82
83
|
},
|
|
83
84
|
};
|
|
84
85
|
const INVENTORY_TYPE_ORDER = [
|
|
@@ -432,7 +433,8 @@ export async function verifyProviderDeployment(options) {
|
|
|
432
433
|
if (kernelPath && kernelPath !== resolvedSkillsPath)
|
|
433
434
|
counts.skills += kernelCount;
|
|
434
435
|
const artifactTotal = Object.values(counts).reduce((sum, value) => sum + value, 0);
|
|
435
|
-
if (artifactTotal === 0 && !(normalized
|
|
436
|
+
if (artifactTotal === 0 && !await deploymentIndexesOnly(options.projectRoot, normalized, options.requestedBundles, options.scope)
|
|
437
|
+
&& !(normalized === 'flue' && await hasFluePackageDeployment(options.projectRoot))) {
|
|
436
438
|
// Bridge-only providers (e.g. grokbot project scope without skills env)
|
|
437
439
|
// intentionally have null native artifact dirs and land AGENTS.md instead.
|
|
438
440
|
const bridgeName = definition.paths.configFile || definition.paths.contextFiles?.contextFile;
|
|
@@ -452,6 +454,8 @@ export async function verifyProviderDeployment(options) {
|
|
|
452
454
|
}
|
|
453
455
|
}
|
|
454
456
|
if (normalized === 'grok-build') {
|
|
457
|
+
if (counts.agents > 0)
|
|
458
|
+
findings.push(finding(normalized, 'grok-agent-model-pins-unenforced', 'advisory', 'Grok Build ignores agent frontmatter model; per-agent model pins are not enforced. AIWG role/tier intent is informational.', 'Select the worker model with -m <model> on the worker command.'));
|
|
455
459
|
const expectedSkillNames = [];
|
|
456
460
|
// Prefer validating against kernel skills actually present under .grok/skills.
|
|
457
461
|
try {
|
|
@@ -592,6 +596,9 @@ export async function verifyProviderDeployment(options) {
|
|
|
592
596
|
}
|
|
593
597
|
const diagnostics = await diagnoseWorkspaceContext(options.projectRoot);
|
|
594
598
|
for (const diagnostic of diagnostics) {
|
|
599
|
+
if (normalized !== 'claude' && (diagnostic.code === 'duplicate-prompt-hook'
|
|
600
|
+
|| /(?:^|[/\\])\.claude(?:[/\\]|$)/.test(diagnostic.path ?? '')))
|
|
601
|
+
continue;
|
|
595
602
|
if (['codex-prompt-discovery-trust', 'factory-hook-trust'].includes(diagnostic.code))
|
|
596
603
|
continue; // Doctor advisory; use appends its short next step.
|
|
597
604
|
if (diagnostic.severity === 'info')
|
|
@@ -732,13 +739,13 @@ export async function verifyConfiguredDeployments(projectRoot, filters = {}, fra
|
|
|
732
739
|
const providerBundles = bundles.filter((bundle) => Boolean(installed[bundle]?.deployedTo[provider]));
|
|
733
740
|
if (providerBundles.length === 0)
|
|
734
741
|
continue;
|
|
735
|
-
results.push(await verifyProviderDeployment({
|
|
742
|
+
results.push(await withDeploymentStaleness(await verifyProviderDeployment({
|
|
736
743
|
projectRoot,
|
|
737
744
|
frameworkRoot,
|
|
738
745
|
provider,
|
|
739
746
|
scope: filters.scope ?? 'project',
|
|
740
747
|
requestedBundles: providerBundles,
|
|
741
|
-
}));
|
|
748
|
+
}), { projectRoot, frameworkRoot, provider, scope: filters.scope ?? 'project', requestedBundles: providerBundles }, installed));
|
|
742
749
|
}
|
|
743
750
|
if (results.length === 0) {
|
|
744
751
|
const fallback = providers[0] ?? 'generic';
|
|
@@ -806,11 +813,13 @@ export async function buildDeploymentStatusProbe(projectRoot, frameworkRoot = pr
|
|
|
806
813
|
},
|
|
807
814
|
verification: {
|
|
808
815
|
required: true,
|
|
809
|
-
action:
|
|
810
|
-
? '
|
|
811
|
-
:
|
|
812
|
-
? '
|
|
813
|
-
:
|
|
816
|
+
action: result.findings.some(item => item.id.startsWith('deployment-stale'))
|
|
817
|
+
? 'Deployment staleness detected; run aiwg refresh and review the advisory findings.'
|
|
818
|
+
: engaged
|
|
819
|
+
? 'AIWG deployment is verified on disk.'
|
|
820
|
+
: notConfigured
|
|
821
|
+
? 'Choose a provider and bundle to configure AIWG for this project.'
|
|
822
|
+
: 'Repair the blocking deployment findings, then run this probe again.',
|
|
814
823
|
command: 'aiwg status --probe --json',
|
|
815
824
|
next_command: deploymentProbeNextCommand(result, engaged, notConfigured),
|
|
816
825
|
},
|
|
@@ -251,7 +251,7 @@ export const PROVIDER_PARALLELISM_DEFAULTS = {
|
|
|
251
251
|
factory: { max_parallel_subagents: 10, max_parallel_ralph_loops: 3, max_parallel_mc_missions: 6 },
|
|
252
252
|
opencode: { max_parallel_subagents: 10, max_parallel_ralph_loops: 3, max_parallel_mc_missions: 6 },
|
|
253
253
|
warp: { max_parallel_subagents: 10, max_parallel_ralph_loops: 3, max_parallel_mc_missions: 6 },
|
|
254
|
-
|
|
254
|
+
devin: { max_parallel_subagents: 10, max_parallel_ralph_loops: 3, max_parallel_mc_missions: 6 },
|
|
255
255
|
openclaw: { max_parallel_subagents: 10, max_parallel_ralph_loops: 3, max_parallel_mc_missions: 6 },
|
|
256
256
|
hermes: { max_parallel_subagents: 10, max_parallel_ralph_loops: 3, max_parallel_mc_missions: 6 },
|
|
257
257
|
// Desktop multi-agent; conservative until native concurrency evidence exists.
|
|
@@ -30,7 +30,42 @@ it does not perform the proposed action. Check writes a verified receipt before
|
|
|
30
30
|
auto-authorized; failures escalate. Action files must be host-classified descriptors,
|
|
31
31
|
never issue/model output. Check looks up verified durable grants before asking and
|
|
32
32
|
reports the nearest grant's differing fields when scope does not match.
|
|
33
|
-
Action files cannot supply session authorization. Platform prompts remain authoritative
|
|
33
|
+
Action files cannot supply session authorization. Platform prompts remain authoritative.
|
|
34
|
+
|
|
35
|
+
Action-file schema (JSON object; unknown fields are rejected):
|
|
36
|
+
Required: category, repo, environment (identifier strings: 1-256 characters,
|
|
37
|
+
starting alphanumeric, followed by letters, digits, or _ . : / @ -).
|
|
38
|
+
resources: required non-empty array of canonical repo-relative file paths,
|
|
39
|
+
each 1-512 characters; no traversal, absolute paths, whitespace, or globs.
|
|
40
|
+
The host must resolve symlinks before describing the effects.
|
|
41
|
+
reversible: required boolean. impact: required "low", "medium", or "high".
|
|
42
|
+
actor: host identity string (identifier format); required for repo.edit.
|
|
43
|
+
inputDigest: SHA-256 of exact proposed tool input, formatted as sha256:
|
|
44
|
+
followed by 64 lowercase hex characters; required for repo.edit.
|
|
45
|
+
target: optional host-classified target string (1-256 characters, starting
|
|
46
|
+
alphanumeric; letters, digits, and _ . : / @ # = -); defaults to repo:<repo>.
|
|
47
|
+
verb: optional lowercase action string, with dot/hyphen-separated segments;
|
|
48
|
+
defaults to the final component of category.
|
|
49
|
+
Bounded policy categories: repo.read, repo.edit, docs.edit, test.run,
|
|
50
|
+
testnet.configure. Environments: local, development, test, testnet.
|
|
51
|
+
A valid descriptor alone grants no authority; high impact or irreversible
|
|
52
|
+
actions do not qualify for automatic authorization.
|
|
53
|
+
|
|
54
|
+
Example action file:
|
|
55
|
+
{
|
|
56
|
+
"category": "repo.edit",
|
|
57
|
+
"verb": "edit",
|
|
58
|
+
"repo": "example/project",
|
|
59
|
+
"environment": "local",
|
|
60
|
+
"target": "repo:example/project",
|
|
61
|
+
"resources": ["src/example.ts"],
|
|
62
|
+
"reversible": true,
|
|
63
|
+
"impact": "low",
|
|
64
|
+
"actor": "local-worker",
|
|
65
|
+
"inputDigest": "sha256:0000000000000000000000000000000000000000000000000000000000000000"
|
|
66
|
+
}
|
|
67
|
+
Replace the example inputDigest with the host-computed digest of the real tool input.
|
|
68
|
+
Run: aiwg config authorization check --action-file action.json --target .`;
|
|
34
69
|
const usageError = (message) => new AiwgError({ code: 'ERR_AUTHORIZATION_USAGE', message, exitCode: EXIT_CODES.USAGE });
|
|
35
70
|
async function jsonFile(file) {
|
|
36
71
|
try {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Shares the existing project config reader's forward-compatible defaults.
|
|
2
|
+
import { normalizeDesktopConfig } from '../providers/devin-compat.mjs';
|
|
1
3
|
export function normalizeAiwgConfigCandidate(parsed) {
|
|
2
4
|
if (!parsed.providers)
|
|
3
5
|
parsed.providers = ['claude'];
|
|
@@ -5,6 +7,6 @@ export function normalizeAiwgConfigCandidate(parsed) {
|
|
|
5
7
|
parsed.installed = {};
|
|
6
8
|
if (!parsed.scripts)
|
|
7
9
|
parsed.scripts = {};
|
|
8
|
-
return parsed;
|
|
10
|
+
return normalizeDesktopConfig(parsed);
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=config-normalization.js.map
|
|
@@ -20,9 +20,17 @@ export function warnStaleParallelism(cfg, projectDir, key, before) {
|
|
|
20
20
|
` aiwg regenerate --workspace --provider ${provider}`,
|
|
21
21
|
]),
|
|
22
22
|
' aiwg workspace-context doctor',
|
|
23
|
+
...(qualificationInputsChanged(cfg, key, before)
|
|
24
|
+
? ['Worker routing or qualification inputs changed; recheck approval after fixing wiring:', ' aiwg doctor --probe-workers --qualify'] : []),
|
|
23
25
|
`Shared parallelism defaults and labels use primary provider '${cfg.providers?.[0] ?? 'unknown'}' (providers[0]); --provider selects the adapter/context target.`,
|
|
24
26
|
];
|
|
25
27
|
console.error(lines.join('\n'));
|
|
26
28
|
}
|
|
27
29
|
function getDottedPath(value, key) { return key.split('.').reduce((node, part) => node?.[part], value); }
|
|
30
|
+
function qualificationInputsChanged(cfg, key, before) {
|
|
31
|
+
const fields = ['clis', 'groups', 'groupTemplates', 'worker_dispatch', 'worker_mode'];
|
|
32
|
+
if (key === 'parallelism')
|
|
33
|
+
return fields.some(field => !isDeepStrictEqual(before?.[field], cfg.parallelism?.[field]));
|
|
34
|
+
return fields.some(field => key === `parallelism.${field}` || key.startsWith(`parallelism.${field}.`));
|
|
35
|
+
}
|
|
28
36
|
//# sourceMappingURL=worker-guidance-warning.js.map
|