@aiwg/cli 2026.9.24 → 2026.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agentic/code/providers/capability-matrix.yaml +2 -1
- package/dist/src/artifacts/discovery-shadow-evaluator.js +177 -0
- package/dist/src/artifacts/discovery-shadow.js +195 -0
- package/dist/src/artifacts/index-builder.js +47 -9
- package/dist/src/artifacts/query-engine.js +94 -1
- package/dist/src/artifacts/types.js +1 -0
- package/dist/src/cli/handlers/decision.js +177 -0
- package/dist/src/cli/handlers/gates.js +154 -0
- package/dist/src/cli/handlers/index.js +5 -1
- package/dist/src/cli/handlers/sessions.js +10 -7
- package/dist/src/cli/handlers/utilities.js +20 -0
- package/dist/src/config/aiwg-config.js +15 -2
- package/dist/src/decision/acceptance.js +25 -0
- package/dist/src/decision/adapters/jev.js +29 -3
- package/dist/src/decision/ask.js +352 -0
- package/dist/src/decision/calibration/registry.js +9 -0
- package/dist/src/decision/compose.js +74 -15
- package/dist/src/decision/context-live-promotion.js +344 -0
- package/dist/src/decision/context-live-qualification.js +591 -0
- package/dist/src/decision/context-pruning.js +847 -0
- package/dist/src/decision/driver.js +432 -0
- package/dist/src/decision/egress-live-qualification.js +874 -0
- package/dist/src/decision/ensemble/contract.js +64 -1
- package/dist/src/decision/ensemble/index.js +1 -0
- package/dist/src/decision/ensemble/report.js +8 -42
- package/dist/src/decision/ensemble/runtime.js +571 -0
- package/dist/src/decision/ensemble-study/artifacts.js +85 -0
- package/dist/src/decision/ensemble-study/calibration.js +443 -0
- package/dist/src/decision/ensemble-study/corpus.js +229 -0
- package/dist/src/decision/ensemble-study/multifact-artifacts.js +23 -0
- package/dist/src/decision/ensemble-study/multifact-study.js +596 -0
- package/dist/src/decision/ensemble-study/multifact.js +241 -0
- package/dist/src/decision/ensemble-study/protocol.js +77 -0
- package/dist/src/decision/ensemble-study/score.js +462 -0
- package/dist/src/decision/ensemble-study/staged.js +87 -0
- package/dist/src/decision/ensemble-study/statistics.js +84 -0
- package/dist/src/decision/evaluate.js +227 -14
- package/dist/src/decision/export.js +4 -0
- package/dist/src/decision/feature-export.js +1074 -0
- package/dist/src/decision/graph-index.js +16 -0
- package/dist/src/decision/graph-live-qualification.js +1041 -0
- package/dist/src/decision/graph-live-workload.js +245 -0
- package/dist/src/decision/graph-skill-bridge.js +21 -3
- package/dist/src/decision/heldout/calibration.js +140 -0
- package/dist/src/decision/heldout/collector.js +430 -0
- package/dist/src/decision/heldout/contract.js +309 -0
- package/dist/src/decision/heldout/d29-generator-ids.js +12 -0
- package/dist/src/decision/heldout/d29-passage-baseline-v2.js +93 -0
- package/dist/src/decision/heldout/d29-passage-baseline-v3.js +100 -0
- package/dist/src/decision/heldout/d29-passage-baseline.js +66 -0
- package/dist/src/decision/heldout/d29-pools-v8.js +575 -0
- package/dist/src/decision/heldout/d29-pools.js +288 -0
- package/dist/src/decision/heldout/d29-v6.js +169 -0
- package/dist/src/decision/heldout/d29-v7.js +202 -0
- package/dist/src/decision/heldout/d29-v8.js +586 -0
- package/dist/src/decision/heldout/generator-registry.js +67 -0
- package/dist/src/decision/heldout/generators.js +696 -0
- package/dist/src/decision/heldout/index.js +8 -0
- package/dist/src/decision/heldout/journal.js +346 -0
- package/dist/src/decision/heldout/study-generators.js +64 -0
- package/dist/src/decision/heldout/types.js +2 -0
- package/dist/src/decision/host-policy.js +61 -0
- package/dist/src/decision/index.js +13 -0
- package/dist/src/decision/interop-profile.v1.json +112 -0
- package/dist/src/decision/interop.js +653 -0
- package/dist/src/decision/issue-triage/index.js +3 -0
- package/dist/src/decision/issue-triage/runtime.js +1069 -0
- package/dist/src/decision/issue-triage/types.js +2 -0
- package/dist/src/decision/jev-credentials.js +121 -0
- package/dist/src/decision/patterns/catalog.js +28 -8
- package/dist/src/decision/patterns/playground.js +28 -11
- package/dist/src/decision/patterns/specs.js +19 -10
- package/dist/src/decision/preprocessed-evidence.js +724 -0
- package/dist/src/decision/qualification/capture.js +8 -2
- package/dist/src/decision/qualification/gate-evidence.js +19 -4
- package/dist/src/decision/qualification/quality.js +57 -49
- package/dist/src/decision/qualification/release.js +76 -3
- package/dist/src/decision/qualification/runner.js +5 -2
- package/dist/src/decision/routing/contract.js +175 -0
- package/dist/src/decision/routing/index.js +5 -0
- package/dist/src/decision/routing/report.js +216 -0
- package/dist/src/decision/routing/runtime.js +685 -0
- package/dist/src/decision/routing/types.js +2 -0
- package/dist/src/decision/sdlc-screening.js +1157 -0
- package/dist/src/decision/sensitivity/comparative.js +154 -0
- package/dist/src/decision/sensitivity/contract.js +218 -0
- package/dist/src/decision/sensitivity/index.js +5 -0
- package/dist/src/decision/sensitivity/runtime.js +912 -0
- package/dist/src/decision/sensitivity/types.js +2 -0
- package/dist/src/decision/validate.js +26 -0
- package/dist/src/extensions/commands/definitions.js +38 -0
- package/dist/src/extensions/manifest.js +44 -0
- package/dist/src/gates/discovery.js +315 -0
- package/dist/src/gates/driver.js +388 -0
- package/dist/src/gates/evaluate.js +719 -0
- package/dist/src/gates/floors.js +255 -0
- package/dist/src/gates/index.js +17 -0
- package/dist/src/gates/providers/evidence.js +38 -0
- package/dist/src/gates/providers/index.js +21 -0
- package/dist/src/gates/providers/isolated-child-source.js +446 -0
- package/dist/src/gates/providers/loader.js +1069 -0
- package/dist/src/gates/providers/paired.js +52 -0
- package/dist/src/gates/providers/proportion.js +60 -0
- package/dist/src/gates/providers/registry.js +40 -0
- package/dist/src/gates/providers/scalar.js +41 -0
- package/dist/src/gates/providers/screening.js +53 -0
- package/dist/src/gates/providers/types.js +25 -0
- package/dist/src/gates/registry.js +1003 -0
- package/dist/src/gates/report.js +102 -0
- package/dist/src/gates/schema.js +56 -0
- package/dist/src/gates/stats/binomial.js +26 -0
- package/dist/src/gates/stats/bootstrap.js +62 -0
- package/dist/src/gates/stats/clopper-pearson.js +95 -0
- package/dist/src/gates/stats/digest.js +26 -0
- package/dist/src/gates/stats/error.js +5 -0
- package/dist/src/gates/stats/index.js +9 -0
- package/dist/src/gates/stats/normal.js +35 -0
- package/dist/src/gates/stats/paired.js +120 -0
- package/dist/src/gates/stats/splits.js +30 -0
- package/dist/src/gates/types.js +8 -0
- package/dist/src/governance/redaction.js +14 -4
- package/dist/src/mcp/muse-native-config.mjs +123 -0
- package/dist/src/mcp/tools/decision.mjs +228 -0
- package/dist/src/mcp/tools/subsystems.mjs +2 -0
- package/dist/src/providers/capability-matrix.yaml +2 -1
- package/dist/src/providers/provider-definitions.js +2 -1
- package/dist/src/sessions/adapters/muse.js +336 -39
- package/dist/src/sessions/batch-import.js +7 -0
- package/dist/src/sessions/workspace-discovery.js +13 -2
- package/package.json +1 -1
- package/schemas/decision/ConformalFrozenOpenData.v2.schema.json +371 -0
- package/schemas/decision/ConformalOpenDataReport.v2.schema.json +421 -0
- package/schemas/decision/ConformalPreregistration.v2.schema.json +529 -0
- package/schemas/decision/ContextPruningCandidate.v1.schema.json +47 -0
- package/schemas/decision/ContextPruningEvaluationReport.v1.schema.json +758 -0
- package/schemas/decision/ContextPruningPreregistration.v1.schema.json +175 -0
- package/schemas/decision/ContextPruningReceipt.v1.schema.json +72 -0
- package/schemas/decision/D17Multifact.v1.schema.json +1851 -0
- package/schemas/decision/D17StudyAnalysis.v1.schema.json +42 -0
- package/schemas/decision/D17StudyAnalysis.v2.schema.json +51 -0
- package/schemas/decision/D17StudyCalibration.v1.schema.json +819 -0
- package/schemas/decision/D17StudyDryRun.v1.schema.json +169 -0
- package/schemas/decision/D17StudyDryRun.v2.schema.json +239 -0
- package/schemas/decision/D17StudyGold.v1.schema.json +108 -0
- package/schemas/decision/D17StudyGuide.v1.schema.json +63 -0
- package/schemas/decision/D17StudyNativeTemplates.v1.schema.json +619 -0
- package/schemas/decision/D17StudyProtocol.v1.schema.json +241 -0
- package/schemas/decision/D17StudyReport.v1.schema.json +902 -0
- package/schemas/decision/D17StudyReport.v2.schema.json +1319 -0
- package/schemas/decision/D17StudyReview.v1.schema.json +175 -0
- package/schemas/decision/D17StudySplits.v1.schema.json +217 -0
- package/schemas/decision/D29Study.v1.schema.json +1903 -0
- package/schemas/decision/D29Study.v2.schema.json +1344 -0
- package/schemas/decision/D29Study.v3.schema.json +609 -0
- package/schemas/decision/D29Study.v4.schema.json +1133 -0
- package/schemas/decision/D29Study.v6.schema.json +1205 -0
- package/schemas/decision/D29Study.v7.schema.json +1471 -0
- package/schemas/decision/D29Study.v8.schema.json +671 -0
- package/schemas/decision/D29Study.v9.schema.json +778 -0
- package/schemas/decision/DecisionComparativeReplayAuditSample.v1.schema.json +137 -0
- package/schemas/decision/DecisionComparativeReplayCorpus.v1.schema.json +258 -0
- package/schemas/decision/DecisionComparativeReplayFreeze.v1.schema.json +74 -0
- package/schemas/decision/DecisionComparativeReplayGold.v1.schema.json +50 -0
- package/schemas/decision/DecisionComparativeReplayGoldAsset.v1.schema.json +37 -0
- package/schemas/decision/DecisionComparativeReplayIntegrity.v1.schema.json +81 -0
- package/schemas/decision/DecisionComparativeReplayMembers.v1.schema.json +52 -0
- package/schemas/decision/DecisionComparativeReplayPreregistration.v1.schema.json +113 -0
- package/schemas/decision/DecisionComparativeReplayReport.v1.schema.json +407 -0
- package/schemas/decision/DecisionComparativeReplayReviewPackets.v1.schema.json +260 -0
- package/schemas/decision/DecisionComparativeReplaySplit.v1.schema.json +84 -0
- package/schemas/decision/DecisionFeatureObservation.v1.schema.json +564 -0
- package/schemas/decision/DecisionFeatureSet.v1.schema.json +155 -0
- package/schemas/decision/DecisionInteropMapping.v1.schema.json +85 -0
- package/schemas/decision/DecisionIssueTriageEvaluationManifest.v1.schema.json +174 -0
- package/schemas/decision/DecisionIssueTriageEvaluationReport.v1.schema.json +280 -0
- package/schemas/decision/DecisionIssueTriagePilotPack.v1.schema.json +114 -0
- package/schemas/decision/DecisionRouteReceipt.v1.schema.json +155 -0
- package/schemas/decision/DecisionRoutingPolicy.v1.schema.json +132 -0
- package/schemas/decision/DecisionRoutingShadowReport.v1.schema.json +170 -0
- package/schemas/decision/DecisionRoutingTask.v1.schema.json +49 -0
- package/schemas/decision/DecisionRuleset.schema.json +8 -2
- package/schemas/decision/DecisionRuleset.v1alpha2.schema.json +8 -2
- package/schemas/decision/DecisionSensitivityPlan.v1.schema.json +191 -0
- package/schemas/decision/DecisionSensitivityReport.v1.schema.json +163 -0
- package/schemas/decision/HeldoutApproval.v1.schema.json +312 -0
- package/schemas/decision/HeldoutAttempt.v1.schema.json +211 -0
- package/schemas/decision/HeldoutBaseline.v1.schema.json +90 -0
- package/schemas/decision/HeldoutCalibrationPhase.v1.schema.json +87 -0
- package/schemas/decision/HeldoutCorpus.v1.schema.json +167 -0
- package/schemas/decision/HeldoutEvent.v1.schema.json +41 -0
- package/schemas/decision/HeldoutFrozen.v1.schema.json +142 -0
- package/schemas/decision/HeldoutPreregistration.v1.schema.json +222 -0
- package/schemas/decision/HeldoutSpendEvent.v1.schema.json +122 -0
- package/schemas/decision/HeldoutSpendHead.v1.schema.json +25 -0
- package/schemas/decision/HeldoutSpendHead.v2.schema.json +46 -0
- package/schemas/decision/HeldoutSummary.v1.schema.json +101 -0
- package/schemas/decision/OpaDecisionLogExport.v1.schema.json +65 -0
- package/schemas/decision/PreprocessedEvidence.v1.schema.json +306 -0
- package/schemas/decision/RulesetResult.v1alpha2.schema.json +175 -0
- package/schemas/decision/SdlcEvidenceScreening.v1.schema.json +499 -0
- package/schemas/decision/SdlcScreeningPreregistration.v1.schema.json +132 -0
- package/schemas/decision/SdlcScreeningPreregistration.v2.schema.json +138 -0
- package/schemas/decision/SdlcScreeningRelease.v1.schema.json +654 -0
- package/schemas/decision/SdlcScreeningRelease.v2.schema.json +654 -0
- package/tools/agents/deploy-agents.mjs +1 -1
- package/tools/agents/providers/base.mjs +40 -18
- package/tools/agents/providers/factory.mjs +10 -2
- package/tools/agents/providers/muse-hooks.mjs +1 -29
- package/tools/agents/providers/muse.mjs +6 -3
|
@@ -592,15 +592,34 @@ export function toKebabCase(str) {
|
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
/**
|
|
595
|
-
* Strip JSON comments (JSONC) for parsing
|
|
596
|
-
*
|
|
595
|
+
* Strip JSON comments (JSONC) for parsing. Used by the Factory and Muse
|
|
596
|
+
* settings and hooks merges, which write the parsed document back, so the
|
|
597
|
+
* scanner tracks string literals: `//` in a URL or a slash-star sequence in
|
|
598
|
+
* a glob matcher is data, not a comment. A regex-only stripper collapsed glob
|
|
599
|
+
* matchers inside strings and rejected any settings file containing a URL.
|
|
597
600
|
*/
|
|
598
601
|
export function stripJsonComments(jsonc) {
|
|
599
|
-
|
|
600
|
-
let
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
602
|
+
const text = String(jsonc);
|
|
603
|
+
let out = '';
|
|
604
|
+
let i = 0;
|
|
605
|
+
while (i < text.length) {
|
|
606
|
+
const ch = text[i];
|
|
607
|
+
if (ch === '"') {
|
|
608
|
+
let j = i + 1;
|
|
609
|
+
while (j < text.length && text[j] !== '"') j += text[j] === '\\' ? 2 : 1;
|
|
610
|
+
out += text.slice(i, j + 1);
|
|
611
|
+
i = j + 1;
|
|
612
|
+
} else if (ch === '/' && text[i + 1] === '/') {
|
|
613
|
+
while (i < text.length && text[i] !== '\n') i++;
|
|
614
|
+
} else if (ch === '/' && text[i + 1] === '*') {
|
|
615
|
+
const end = text.indexOf('*/', i + 2);
|
|
616
|
+
i = end === -1 ? text.length : end + 2;
|
|
617
|
+
} else {
|
|
618
|
+
out += ch;
|
|
619
|
+
i++;
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
return out;
|
|
604
623
|
}
|
|
605
624
|
|
|
606
625
|
// ============================================================================
|
|
@@ -1344,13 +1363,13 @@ export function computeAllArtifactBasenames(srcRoot, type) {
|
|
|
1344
1363
|
// Soul companions live alongside agents and are deployed with them —
|
|
1345
1364
|
// keep their stems in the desired set so the prune never removes them.
|
|
1346
1365
|
add(frameworkArtifacts.souls || []);
|
|
1347
|
-
add(getAddonAgentFiles(aiwgRoot));
|
|
1366
|
+
add(getAddonAgentFiles(aiwgRoot, [], { includeExplicit: true }));
|
|
1348
1367
|
} else if (type === 'commands') {
|
|
1349
1368
|
add(frameworkArtifacts.commands);
|
|
1350
|
-
add(getAddonCommandFiles(aiwgRoot));
|
|
1369
|
+
add(getAddonCommandFiles(aiwgRoot, [], { includeExplicit: true }));
|
|
1351
1370
|
} else if (type === 'rules') {
|
|
1352
1371
|
add(frameworkArtifacts.rules);
|
|
1353
|
-
add(getAddonRuleFiles(aiwgRoot));
|
|
1372
|
+
add(getAddonRuleFiles(aiwgRoot, [], { includeExplicit: true }));
|
|
1354
1373
|
}
|
|
1355
1374
|
|
|
1356
1375
|
return stems;
|
|
@@ -2245,9 +2264,10 @@ export function collectFrameworkArtifacts(srcRoot, mode, options = {}) {
|
|
|
2245
2264
|
/**
|
|
2246
2265
|
* Discover all addons in the agentic/code/addons directory
|
|
2247
2266
|
* @param {string} srcRoot - Source root directory
|
|
2267
|
+
* @param {{includeExplicit?: boolean}} [options] - includeExplicit also returns explicitInstall addons
|
|
2248
2268
|
* @returns {Array<{name: string, path: string, manifest: object}>} - Array of addon info
|
|
2249
2269
|
*/
|
|
2250
|
-
export function discoverAddons(srcRoot) {
|
|
2270
|
+
export function discoverAddons(srcRoot, { includeExplicit = false } = {}) {
|
|
2251
2271
|
const addonsDir = path.join(srcRoot, 'agentic', 'code', 'addons');
|
|
2252
2272
|
if (!fs.existsSync(addonsDir)) return [];
|
|
2253
2273
|
|
|
@@ -2271,7 +2291,9 @@ export function discoverAddons(srcRoot) {
|
|
|
2271
2291
|
if (manifest.devOnly === true) continue;
|
|
2272
2292
|
// explicitInstall addons deploy only when named (`aiwg use <addon>`), never
|
|
2273
2293
|
// as part of a framework or `all` bulk deploy (#2641).
|
|
2274
|
-
|
|
2294
|
+
// The stale-artifact prune passes includeExplicit so a named install's own
|
|
2295
|
+
// files stay in its desired set and are not deleted right after deployment.
|
|
2296
|
+
if (manifest.explicitInstall === true && !includeExplicit) continue;
|
|
2275
2297
|
|
|
2276
2298
|
addons.push({
|
|
2277
2299
|
name: entry.name,
|
|
@@ -2289,8 +2311,8 @@ export function discoverAddons(srcRoot) {
|
|
|
2289
2311
|
* @param {string[]} excludeAddons - Addon names to exclude (default: none)
|
|
2290
2312
|
* @returns {string[]} - Array of agent file paths
|
|
2291
2313
|
*/
|
|
2292
|
-
export function getAddonAgentFiles(srcRoot, excludeAddons = []) {
|
|
2293
|
-
const addons = discoverAddons(srcRoot);
|
|
2314
|
+
export function getAddonAgentFiles(srcRoot, excludeAddons = [], options = {}) {
|
|
2315
|
+
const addons = discoverAddons(srcRoot, options);
|
|
2294
2316
|
const files = [];
|
|
2295
2317
|
|
|
2296
2318
|
for (const addon of addons) {
|
|
@@ -2311,8 +2333,8 @@ export function getAddonAgentFiles(srcRoot, excludeAddons = []) {
|
|
|
2311
2333
|
* @param {string[]} excludeAddons - Addon names to exclude (default: none)
|
|
2312
2334
|
* @returns {string[]} - Array of command file paths
|
|
2313
2335
|
*/
|
|
2314
|
-
export function getAddonCommandFiles(srcRoot, excludeAddons = []) {
|
|
2315
|
-
const addons = discoverAddons(srcRoot);
|
|
2336
|
+
export function getAddonCommandFiles(srcRoot, excludeAddons = [], options = {}) {
|
|
2337
|
+
const addons = discoverAddons(srcRoot, options);
|
|
2316
2338
|
const files = [];
|
|
2317
2339
|
|
|
2318
2340
|
for (const addon of addons) {
|
|
@@ -2632,8 +2654,8 @@ export function writeOnDemandRuleIndex(destDir, onDemandFiles, opts = {}) {
|
|
|
2632
2654
|
return names.length + demotedNames.length;
|
|
2633
2655
|
}
|
|
2634
2656
|
|
|
2635
|
-
export function getAddonRuleFiles(srcRoot, excludeAddons = []) {
|
|
2636
|
-
const addons = discoverAddons(srcRoot);
|
|
2657
|
+
export function getAddonRuleFiles(srcRoot, excludeAddons = [], options = {}) {
|
|
2658
|
+
const addons = discoverAddons(srcRoot, options);
|
|
2637
2659
|
const files = [];
|
|
2638
2660
|
|
|
2639
2661
|
for (const addon of addons) {
|
|
@@ -785,8 +785,16 @@ export function deployFactoryHooks(dryRun) {
|
|
|
785
785
|
fs.mkdirSync(settingsDir, { recursive: true });
|
|
786
786
|
}
|
|
787
787
|
|
|
788
|
-
//
|
|
789
|
-
|
|
788
|
+
// Parsed successfully, so the merge is safe to write back. It is written
|
|
789
|
+
// as canonical JSON, which drops operator comments and formatting, so
|
|
790
|
+
// keep a timestamped copy of a hand-edited user-global file first.
|
|
791
|
+
const updatedContent = JSON.stringify(settings, null, 2) + '\n';
|
|
792
|
+
if (hasExistingFile && originalContent !== JSON.stringify(JSON.parse(stripJsonComments(originalContent)), null, 2) + '\n') {
|
|
793
|
+
const backupPath = `${settingsPath}.aiwg-backup-${new Date().toISOString().replace(/[:.]/g, '-')}`;
|
|
794
|
+
fs.copyFileSync(settingsPath, backupPath);
|
|
795
|
+
console.log(`Backed up ${settingsPath} to ${backupPath} (comments and formatting are not preserved)`);
|
|
796
|
+
}
|
|
797
|
+
fs.writeFileSync(settingsPath, updatedContent, 'utf8');
|
|
790
798
|
console.log(`Deployed SessionStart hook to ${settingsPath}`);
|
|
791
799
|
console.log('Hook: aiwg sync --dry-run --quiet (runs on every new Factory session)');
|
|
792
800
|
}
|
|
@@ -53,41 +53,13 @@
|
|
|
53
53
|
import fs from 'node:fs';
|
|
54
54
|
import os from 'node:os';
|
|
55
55
|
import path from 'node:path';
|
|
56
|
+
import { stripJsonComments } from './base.mjs';
|
|
56
57
|
import { resolveMuseXdgSkillsDir, museXdgSkillsDirRemediation } from './muse-paths.mjs';
|
|
57
58
|
|
|
58
59
|
// ---------------------------------------------------------------------------
|
|
59
60
|
// Shared JSON helpers
|
|
60
61
|
// ---------------------------------------------------------------------------
|
|
61
62
|
|
|
62
|
-
/**
|
|
63
|
-
* Strip JSON comments (JSONC) before parsing. Comments are *read* tolerance
|
|
64
|
-
* only: merged files are written back as canonical JSON. The scanner tracks
|
|
65
|
-
* string literals so `//` in a URL or `/*` in a glob matcher is preserved.
|
|
66
|
-
*/
|
|
67
|
-
function stripJsonComments(jsonc) {
|
|
68
|
-
const text = String(jsonc);
|
|
69
|
-
let out = '';
|
|
70
|
-
let i = 0;
|
|
71
|
-
while (i < text.length) {
|
|
72
|
-
const ch = text[i];
|
|
73
|
-
if (ch === '"') {
|
|
74
|
-
let j = i + 1;
|
|
75
|
-
while (j < text.length && text[j] !== '"') j += text[j] === '\\' ? 2 : 1;
|
|
76
|
-
out += text.slice(i, j + 1);
|
|
77
|
-
i = j + 1;
|
|
78
|
-
} else if (ch === '/' && text[i + 1] === '/') {
|
|
79
|
-
while (i < text.length && text[i] !== '\n') i++;
|
|
80
|
-
} else if (ch === '/' && text[i + 1] === '*') {
|
|
81
|
-
const end = text.indexOf('*/', i + 2);
|
|
82
|
-
i = end === -1 ? text.length : end + 2;
|
|
83
|
-
} else {
|
|
84
|
-
out += ch;
|
|
85
|
-
i++;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return out;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
63
|
/**
|
|
92
64
|
* Parse a JSON/JSONC document, failing closed with a coded error.
|
|
93
65
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Muse Code provider (
|
|
2
|
+
* Muse Code provider (stable).
|
|
3
3
|
*
|
|
4
4
|
* Muse-native skill roots (docs/architecture/adr-muse-provider-target.md):
|
|
5
5
|
* - Project scope: `<target>/.agents/skills/<id>/SKILL.md`
|
|
@@ -221,7 +221,10 @@ function assertSafeAgentsMd(target) {
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
export async function postDeploy(targetDir, opts = {}) {
|
|
224
|
-
|
|
224
|
+
// `aiwg use all` deploys in kernel-only mode, which deploy-agents also
|
|
225
|
+
// reports as skillsOnly. That is still a whole-provider deploy, so the
|
|
226
|
+
// bridge, managed hooks, and an opted-in MCP profile must not be skipped.
|
|
227
|
+
const fullDeploy = !opts.commandsOnly && !opts.rulesOnly && (!opts.skillsOnly || opts.kernelOnly === true);
|
|
225
228
|
if (opts.createAgentsMd || fullDeploy) {
|
|
226
229
|
createAgentsMd(targetDir, opts.srcRoot, opts.dryRun);
|
|
227
230
|
}
|
|
@@ -273,7 +276,7 @@ export async function deploy(opts = {}) {
|
|
|
273
276
|
} = opts;
|
|
274
277
|
|
|
275
278
|
if (!opts.quiet) {
|
|
276
|
-
console.log(`\n=== Muse Code Provider (
|
|
279
|
+
console.log(`\n=== Muse Code Provider (stable) ===`);
|
|
277
280
|
console.log(`Target: ${target}`);
|
|
278
281
|
console.log(`Mode: ${mode}`);
|
|
279
282
|
if (opts.dryRun) console.log('Dry-run: no filesystem mutations');
|