opencode-swarm 7.188.12 → 7.190.0
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 +42 -6
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/agents/architect.d.ts +1 -1
- package/dist/background/completion-observer.d.ts +6 -0
- package/dist/cli/{auto-checkpoint-4g963859.js → auto-checkpoint-qvk04fya.js} +9 -9
- package/dist/cli/{checkpoint-y9nbjper.js → checkpoint-9q2r5c3j.js} +18 -20
- package/dist/cli/{coder-settlement-q8ea2jkw.js → coder-settlement-xcparbf3.js} +13 -13
- package/dist/cli/{config-doctor-4v5m6v30.js → config-doctor-by0ak49m.js} +23 -20
- package/dist/cli/{core-879105xb.js → core-b1b3kxzy.js} +4 -4
- package/dist/cli/{curation-policy-65ckmmd5.js → curation-policy-6p6fcfjb.js} +6 -6
- package/dist/cli/{curator-t7g3hamd.js → curator-d7b88mzr.js} +44 -44
- package/dist/cli/{curator-drift-satfdnp2.js → curator-drift-6v604220.js} +9 -9
- package/dist/cli/curator-llm-factory-yvbktznk.js +82 -0
- package/dist/cli/{doctor-knowledge-receipt-phase-id-y3ft2v24.js → doctor-knowledge-receipt-phase-id-kwrvnps9.js} +9 -9
- package/dist/cli/{evidence-summary-service-56rqzmrf.js → evidence-summary-service-mzr2q4bn.js} +21 -22
- package/dist/cli/{gate-evidence-zzmgph9z.js → gate-evidence-78jes9kq.js} +8 -8
- package/dist/cli/guardrail-explain-8kt2mxmw.js +83 -0
- package/dist/cli/{guardrail-log-sxv7q0xw.js → guardrail-log-2sthykag.js} +8 -8
- package/dist/cli/{guardrail-reset-37cr442b.js → guardrail-reset-2n746rzv.js} +44 -44
- package/dist/cli/{hive-promoter-hyeta8d6.js → hive-promoter-s7a5gwhz.js} +44 -44
- package/dist/cli/{index-e638qt2d.js → index-0qc7a88d.js} +3 -3
- package/dist/cli/{index-kap0d52p.js → index-1s95jrgc.js} +3 -3
- package/dist/cli/{index-9tvjwv01.js → index-2fpv2wmc.js} +1 -1
- package/dist/cli/{index-jgr1rsr1.js → index-2kpqqcch.js} +4 -4
- package/dist/cli/{index-msvf6p5y.js → index-3t9t9q2q.js} +44 -44
- package/dist/cli/{index-8q8783g0.js → index-3zwhxk98.js} +1 -1
- package/dist/cli/{index-0b172h6r.js → index-49e65y51.js} +5 -5
- package/dist/cli/{index-5pafc9x6.js → index-69tgdm9t.js} +18 -8
- package/dist/cli/{index-d3rjvm9e.js → index-7vnr5cmp.js} +2 -2
- package/dist/cli/{index-twb3f4tk.js → index-8bx6vhzk.js} +1 -1
- package/dist/cli/{index-84pwb6cz.js → index-9gcqmgbc.js} +5 -5
- package/dist/cli/{index-9sps637v.js → index-9xxqdzp4.js} +4 -4
- package/dist/cli/{index-j0qep2zr.js → index-a5ca62vt.js} +1 -1
- package/dist/cli/{index-xy2403g9.js → index-ajzgeb2s.js} +2 -2
- package/dist/cli/{index-8xabhfwr.js → index-b2j231jy.js} +2 -2
- package/dist/cli/{index-19yt5p2t.js → index-dmq7p8s9.js} +6 -6
- package/dist/cli/{index-95pzyv9a.js → index-ej1hdw16.js} +5 -5
- package/dist/cli/{index-1krdj1sc.js → index-ejk34dnw.js} +127 -13
- package/dist/cli/{index-tbyvvq50.js → index-fb5s32c2.js} +862 -1221
- package/dist/cli/{index-ntda6tje.js → index-feaxsjrt.js} +10 -2
- package/dist/cli/{index-94fgbb34.js → index-ffgcdf49.js} +22147 -15396
- package/dist/cli/{index-fhtcx5ag.js → index-h0xhec3d.js} +4 -4
- package/dist/cli/{index-kaqdzhj3.js → index-kfevm0n5.js} +2 -2
- package/dist/cli/{index-z7gakzb5.js → index-kp8k95v9.js} +4 -4
- package/dist/cli/{index-x1eh2636.js → index-mcv0v2dp.js} +1 -1
- package/dist/cli/{index-9czp2dcg.js → index-mjfpaxw3.js} +7 -7
- package/dist/cli/{index-tmn4pf7q.js → index-mp1s7b0n.js} +7 -7
- package/dist/cli/{index-f0jn2nvs.js → index-mseerehd.js} +26 -10
- package/dist/cli/{index-f6exny9m.js → index-n8q43eff.js} +2 -2
- package/dist/cli/{index-7hr5m7yp.js → index-nkgzkt7c.js} +1 -1
- package/dist/cli/{index-8jy605yf.js → index-npe10823.js} +7 -7
- package/dist/cli/{index-yc0y5fjt.js → index-p69k8v0e.js} +1 -1
- package/dist/cli/{index-p2tqzwh6.js → index-qs9myayh.js} +5 -10
- package/dist/cli/{index-hh7pa3yk.js → index-r9yvpr2m.js} +2 -2
- package/dist/cli/{index-qha2p47y.js → index-rgkzcw2a.js} +5 -5
- package/dist/cli/{index-zfbxfm2m.js → index-s8b67e6h.js} +33 -12
- package/dist/cli/{index-m3hhaf61.js → index-s92a5ta3.js} +4 -4
- package/dist/cli/{index-dd6p8xb5.js → index-sm01zpqe.js} +46 -46
- package/dist/cli/{index-q9kefh33.js → index-sxj143a4.js} +1 -1
- package/dist/cli/{index-2h13hjbf.js → index-t0gj8s46.js} +77 -16
- package/dist/cli/{index-3dqazqk4.js → index-t73adn9b.js} +2 -2
- package/dist/cli/{index-5cksakjf.js → index-tkhenmms.js} +101 -13
- package/dist/cli/{index-zsrtt42s.js → index-v3bmwmqw.js} +25 -1
- package/dist/cli/{index-w9tfb0am.js → index-vhn4e6rm.js} +7 -7
- package/dist/cli/{index-yjjyapbf.js → index-xyvrfram.js} +2 -2
- package/dist/cli/{index-k8sarme1.js → index-y9v41185.js} +1 -1
- package/dist/cli/{index-1xa8wq76.js → index-z3ahy9c2.js} +2 -2
- package/dist/cli/{index-wrdktgpy.js → index-zk6ttjkt.js} +2 -2
- package/dist/cli/{index-7z2pxxye.js → index-zyg1m9d0.js} +4 -4
- package/dist/cli/index.js +45 -45
- package/dist/cli/{knowledge-escalator-dzd35eb3.js → knowledge-escalator-n1ezv1zp.js} +15 -15
- package/dist/cli/{knowledge-events-wkr5ne5f.js → knowledge-events-nyqk3mr7.js} +13 -13
- package/dist/cli/{knowledge-link-h4pdcnya.js → knowledge-link-6hw3z6wn.js} +5 -5
- package/dist/cli/{knowledge-store-sme6sqrb.js → knowledge-store-mnxqcyet.js} +6 -6
- package/dist/cli/{knowledge-validator-jgzeawa8.js → knowledge-validator-z30113mp.js} +8 -8
- package/dist/cli/{mcp-egrbh8na.js → mcp-mnbqw2s5.js} +1 -1
- package/dist/cli/{model-preflight-h7azh4m4.js → model-preflight-ex482fsy.js} +44 -44
- package/dist/cli/{pending-delegations-pg284vsk.js → pending-delegations-j18afz5z.js} +12 -12
- package/dist/cli/{pr-subscriptions-hzc4fg25.js → pr-subscriptions-yngda8mz.js} +12 -12
- package/dist/cli/{pr-workflow-gate-j3r3g3q7.js → pr-workflow-gate-0vt614f0.js} +44 -44
- package/dist/cli/{runner-4hfmp1ag.js → runner-ssnsje35.js} +6 -6
- package/dist/cli/{scan-cursor-zg0a56c1.js → scan-cursor-8pwfg5g9.js} +7 -7
- package/dist/cli/{schema-p246rqkt.js → schema-e58ytmqt.js} +14 -2
- package/dist/cli/{scope-persistence-7qtsmx5c.js → scope-persistence-9qfx6ext.js} +16 -16
- package/dist/cli/{server-twhpwhgq.js → server-wxcfwsdx.js} +45 -45
- package/dist/cli/{skill-generator-7vfbmyrw.js → skill-generator-tbd4tq9r.js} +17 -17
- package/dist/cli/{snapshot-coordination-init-050hf69t.js → snapshot-coordination-init-sckyzb94.js} +44 -44
- package/dist/cli/{speckit-checkoff-d3v522cb.js → speckit-checkoff-k5jm0abh.js} +5 -5
- package/dist/cli/{telemetry-kvhe94gs.js → telemetry-9szfdfqv.js} +1 -1
- package/dist/cli/{workspace-snapshot-30kdf018.js → workspace-snapshot-9f12p1s1.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-yy1tp8t9.js → worktree-collision-ownership-3wwfc72t.js} +14 -14
- package/dist/cli/{worktree-isolation-e56skbfw.js → worktree-isolation-zfk7zk6a.js} +46 -44
- package/dist/commands/coupling.d.ts +21 -4
- package/dist/commands/epic-learning.d.ts +28 -0
- package/dist/commands/epic.d.ts +81 -36
- package/dist/commands/registry.d.ts +8 -8
- package/dist/commands/turbo.d.ts +16 -1
- package/dist/config/constants.d.ts +11 -1
- package/dist/config/loader.d.ts +2 -0
- package/dist/config/schema.d.ts +291 -77
- package/dist/db/coordination-store.d.ts +6 -0
- package/dist/epic/close.d.ts +209 -0
- package/dist/{turbo/epic → epic}/cochange-conflict.d.ts +5 -4
- package/dist/{turbo/epic → epic}/cochange-source.d.ts +10 -1
- package/dist/epic/components.d.ts +238 -0
- package/dist/epic/config-gate.d.ts +25 -0
- package/dist/epic/config.d.ts +101 -0
- package/dist/{turbo/epic → epic}/coupling-report.d.ts +3 -1
- package/dist/epic/declared-scopes.d.ts +37 -0
- package/dist/epic/epic-branch.d.ts +157 -0
- package/dist/epic/gate-policy.d.ts +114 -0
- package/dist/epic/git-once.d.ts +26 -0
- package/dist/epic/learning-store.d.ts +176 -0
- package/dist/epic/learning.d.ts +198 -0
- package/dist/epic/legacy-migration.d.ts +26 -0
- package/dist/epic/lifecycle.d.ts +437 -0
- package/dist/epic/markers.d.ts +123 -0
- package/dist/epic/merge-epoch.d.ts +90 -0
- package/dist/epic/next-wave-format.d.ts +101 -0
- package/dist/epic/next-wave.d.ts +102 -0
- package/dist/epic/phase-readiness.d.ts +221 -0
- package/dist/epic/plan-key.d.ts +104 -0
- package/dist/epic/plan-shaping-seam.d.ts +112 -0
- package/dist/epic/planning-signals.d.ts +38 -0
- package/dist/epic/report.d.ts +152 -0
- package/dist/epic/residue-commit.d.ts +151 -0
- package/dist/epic/scorecard.d.ts +130 -0
- package/dist/epic/shaping-sizing.d.ts +108 -0
- package/dist/epic/shaping-suggestions.d.ts +172 -0
- package/dist/epic/shaping.d.ts +112 -0
- package/dist/epic/sizing.d.ts +60 -0
- package/dist/epic/start.d.ts +187 -0
- package/dist/epic/task-landing.d.ts +83 -0
- package/dist/epic/wave-close.d.ts +112 -0
- package/dist/epic/wave-select.d.ts +95 -0
- package/dist/evaluation/contracts.d.ts +1 -1
- package/dist/evaluation/public-api.d.ts +1 -1
- package/dist/full-auto/policy.d.ts +12 -1
- package/dist/hooks/delegation-gate/worktree-isolation.d.ts +16 -0
- package/dist/hooks/delegation-gate.d.ts +11 -0
- package/dist/hooks/guardrails/index.d.ts +7 -0
- package/dist/hooks/promotion-evidence-store.d.ts +2 -2
- package/dist/index.js +814 -807
- package/dist/plan/manager.d.ts +6 -8
- package/dist/plan/parallel-verdict.d.ts +13 -2
- package/dist/retention/caps.d.ts +1 -1
- package/dist/review/contracts.d.ts +8 -1
- package/dist/services/config-doctor.d.ts +38 -0
- package/dist/session/snapshot-reader.d.ts +2 -0
- package/dist/session/snapshot-writer.d.ts +13 -2
- package/dist/state.d.ts +13 -18
- package/dist/tools/epic-next-wave.d.ts +20 -0
- package/dist/tools/epic-phase-review.d.ts +43 -0
- package/dist/tools/index.d.ts +2 -3
- package/dist/tools/manifest.d.ts +2 -3
- package/dist/tools/phase-complete.d.ts +5 -1
- package/dist/tools/save-plan.d.ts +7 -0
- package/dist/tools/tool-metadata.d.ts +4 -8
- package/dist/worktree/merge.d.ts +14 -1
- package/opencode-swarm.schema.json +273 -28
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-fx1qnpsh.js +0 -82
- package/dist/cli/guardrail-explain-g03manbh.js +0 -83
- package/dist/tools/epic-plan-waves.d.ts +0 -79
- package/dist/tools/epic-record-divergence.d.ts +0 -73
- package/dist/tools/epic-run-phase.d.ts +0 -179
- package/dist/turbo/epic/activation.d.ts +0 -193
- package/dist/turbo/epic/calibration-engine.d.ts +0 -88
- package/dist/turbo/epic/calibration.d.ts +0 -80
- package/dist/turbo/epic/divergence-recorder.d.ts +0 -123
- package/dist/turbo/epic/index.d.ts +0 -24
- package/dist/turbo/epic/promotion-evidence.d.ts +0 -42
- package/dist/turbo/epic/state.d.ts +0 -69
- package/dist/turbo/epic/task-commit.d.ts +0 -110
- package/dist/turbo/epic/upstream-commits.d.ts +0 -82
- package/dist/turbo/epic/wave-planner.d.ts +0 -83
|
@@ -11,9 +11,11 @@ import {
|
|
|
11
11
|
GATE_CONFIG_KNOWN_SECTION_KEYS,
|
|
12
12
|
GateConfigSchema,
|
|
13
13
|
PluginConfigSchema,
|
|
14
|
+
findRetiredEpicConfigKeys,
|
|
14
15
|
init_schema,
|
|
15
|
-
resolveExternalSkillsConfig
|
|
16
|
-
|
|
16
|
+
resolveExternalSkillsConfig,
|
|
17
|
+
retiredEpicKeyReplacement
|
|
18
|
+
} from "./index-t0gj8s46.js";
|
|
17
19
|
import {
|
|
18
20
|
DangerousMergeKeyError,
|
|
19
21
|
MAX_MERGE_DEPTH,
|
|
@@ -25,6 +27,88 @@ import {
|
|
|
25
27
|
__export
|
|
26
28
|
} from "./index-a76rekgs.js";
|
|
27
29
|
|
|
30
|
+
// src/epic/config.ts
|
|
31
|
+
function resolveEpicConfig(config) {
|
|
32
|
+
return config?.epic ?? config?.turbo?.epic ?? undefined;
|
|
33
|
+
}
|
|
34
|
+
function isEpicModeConfigEnabled(config) {
|
|
35
|
+
return resolveEpicConfig(config)?.mode?.enabled === true;
|
|
36
|
+
}
|
|
37
|
+
function isEpicCochangeConfigEnabled(config) {
|
|
38
|
+
return resolveEpicConfig(config)?.cochange?.enabled === true;
|
|
39
|
+
}
|
|
40
|
+
function isPlainRecord(value) {
|
|
41
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
42
|
+
}
|
|
43
|
+
function mergeWinnerFirst(loser, winner) {
|
|
44
|
+
const out = { ...loser };
|
|
45
|
+
for (const [key, value] of Object.entries(winner)) {
|
|
46
|
+
const prior = Object.hasOwn(out, key) ? out[key] : undefined;
|
|
47
|
+
Object.defineProperty(out, key, {
|
|
48
|
+
value: isPlainRecord(prior) && isPlainRecord(value) ? mergeWinnerFirst(prior, value) : value,
|
|
49
|
+
enumerable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
configurable: true
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
function hasLegacyEpicConfig(raw) {
|
|
57
|
+
return isPlainRecord(raw) && isPlainRecord(raw.turbo) && Object.hasOwn(raw.turbo, "epic");
|
|
58
|
+
}
|
|
59
|
+
function migrateLegacyEpicConfig(raw) {
|
|
60
|
+
if (!hasLegacyEpicConfig(raw))
|
|
61
|
+
return raw;
|
|
62
|
+
const { epic: legacy, ...turboRest } = raw.turbo;
|
|
63
|
+
const top = raw.epic;
|
|
64
|
+
let epic;
|
|
65
|
+
if (top === undefined)
|
|
66
|
+
epic = legacy;
|
|
67
|
+
else if (isPlainRecord(top) && isPlainRecord(legacy)) {
|
|
68
|
+
epic = mergeWinnerFirst(legacy, top);
|
|
69
|
+
} else
|
|
70
|
+
epic = top;
|
|
71
|
+
const { turbo: _turbo, ...rest } = raw;
|
|
72
|
+
return {
|
|
73
|
+
...rest,
|
|
74
|
+
...Object.keys(turboRest).length > 0 ? { turbo: turboRest } : {},
|
|
75
|
+
epic
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function ownPathExists(node, path) {
|
|
79
|
+
let current = node;
|
|
80
|
+
for (const key of path) {
|
|
81
|
+
if (!isPlainRecord(current) || !Object.hasOwn(current, key))
|
|
82
|
+
return false;
|
|
83
|
+
current = current[key];
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
function legacyEpicIssuePath(raw, path) {
|
|
88
|
+
if (path[0] !== "epic" || !hasLegacyEpicConfig(raw) || Object.hasOwn(raw, "epic")) {
|
|
89
|
+
return [...path];
|
|
90
|
+
}
|
|
91
|
+
return ["turbo", ...path];
|
|
92
|
+
}
|
|
93
|
+
function annotateLegacyEpicKeys(keys, rawFiles) {
|
|
94
|
+
const legacy = rawFiles.filter(hasLegacyEpicConfig);
|
|
95
|
+
if (legacy.length === 0)
|
|
96
|
+
return keys;
|
|
97
|
+
const tops = rawFiles.filter((raw) => isPlainRecord(raw) && Object.hasOwn(raw, "epic"));
|
|
98
|
+
return keys.map((key) => {
|
|
99
|
+
if (key !== "epic" && !key.startsWith("epic."))
|
|
100
|
+
return key;
|
|
101
|
+
const rel = key === "epic" ? [] : key.slice("epic.".length).split(".");
|
|
102
|
+
const inLegacy = legacy.some((raw) => ownPathExists(raw.turbo.epic, rel));
|
|
103
|
+
const inTop = tops.some((raw) => ownPathExists(raw.epic, rel));
|
|
104
|
+
return inLegacy && !inTop ? `${key} (from turbo.epic)` : key;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
var LEGACY_EPIC_CONFIG_WARNING;
|
|
108
|
+
var init_config = __esm(() => {
|
|
109
|
+
LEGACY_EPIC_CONFIG_WARNING = "[opencode-swarm] turbo.epic is deprecated \u2014 move it to top-level epic " + '(`{ "epic": { "mode": { "enabled": true } } }`; no `turbo` block or ' + "`turbo.strategy` is needed). The legacy path keeps working: its keys are " + "used where top-level `epic` does not set them. See docs/configuration.md (Epic Mode).";
|
|
110
|
+
});
|
|
111
|
+
|
|
28
112
|
// src/config/sanitize-malformed-values.ts
|
|
29
113
|
function dotted(p) {
|
|
30
114
|
return p.map(String).join(".");
|
|
@@ -497,6 +581,22 @@ function enforceGitBinaryProvenance(mergedRaw, rawUserConfig) {
|
|
|
497
581
|
return rebuilt;
|
|
498
582
|
}
|
|
499
583
|
function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, configHadErrors) {
|
|
584
|
+
const rawEpicFiles = [rawUserConfig, rawProjectConfig];
|
|
585
|
+
const retiredEpicKeys = [
|
|
586
|
+
...new Set(rawEpicFiles.flatMap((raw) => findRetiredEpicConfigKeys(raw)))
|
|
587
|
+
];
|
|
588
|
+
const annotateEpicKeys = (keys) => annotateLegacyEpicKeys(keys, rawEpicFiles);
|
|
589
|
+
if (rawEpicFiles.some(hasLegacyEpicConfig)) {
|
|
590
|
+
if (rawUserConfig)
|
|
591
|
+
rawUserConfig = migrateLegacyEpicConfig(rawUserConfig);
|
|
592
|
+
if (rawProjectConfig) {
|
|
593
|
+
rawProjectConfig = migrateLegacyEpicConfig(rawProjectConfig);
|
|
594
|
+
}
|
|
595
|
+
if (!legacyEpicConfigWarned) {
|
|
596
|
+
legacyEpicConfigWarned = true;
|
|
597
|
+
advisoryWarn(LEGACY_EPIC_CONFIG_WARNING);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
500
600
|
let mergedRaw = rawUserConfig ?? {};
|
|
501
601
|
if (rawProjectConfig) {
|
|
502
602
|
try {
|
|
@@ -533,6 +633,13 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
|
|
|
533
633
|
advisoryWarn(`[opencode-swarm] Ignored ${unknownTopLevel.length} unknown top-level config key(s): ${unknownTopLevel.join(", ")}. These keys have no effect \u2014 see docs/configuration.md (Top-level configuration keys) for the valid key list.`);
|
|
534
634
|
}
|
|
535
635
|
}
|
|
636
|
+
if (retiredEpicKeys.length > 0) {
|
|
637
|
+
const signature = retiredEpicKeys.join("\x00");
|
|
638
|
+
if (signature !== lastRetiredEpicKeysSig) {
|
|
639
|
+
lastRetiredEpicKeysSig = signature;
|
|
640
|
+
advisoryWarn(`[opencode-swarm] Ignored ${retiredEpicKeys.length} retired Epic config key(s): ${retiredEpicKeys.join(", ")}. They have no effect (the rest of the Epic block is kept) \u2014 remove them; see docs/configuration.md (Epic Mode).${retiredEpicKeys.map((key) => retiredEpicKeyReplacement(key)).filter((hint) => hint !== undefined).map((hint) => ` ${hint}`).join("")}`);
|
|
641
|
+
}
|
|
642
|
+
}
|
|
536
643
|
const secure = (cfg) => loadedFromFile && configHadErrors ? PluginConfigSchema.parse({
|
|
537
644
|
...cfg,
|
|
538
645
|
guardrails: { enabled: true }
|
|
@@ -558,7 +665,8 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
|
|
|
558
665
|
rawGates
|
|
559
666
|
};
|
|
560
667
|
}
|
|
561
|
-
const { cleaned, removed } = stripUnrecognizedKeys(mergedRaw, firstResult.error);
|
|
668
|
+
const { cleaned, removed: strictRemoved } = stripUnrecognizedKeys(mergedRaw, firstResult.error);
|
|
669
|
+
const removed = annotateEpicKeys(strictRemoved);
|
|
562
670
|
if (removed.length > 0) {
|
|
563
671
|
const recovered = PluginConfigSchema.safeParse(cleaned);
|
|
564
672
|
if (recovered.success) {
|
|
@@ -597,15 +705,12 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
|
|
|
597
705
|
if (userStripped.removed.length > 0) {
|
|
598
706
|
const userRecovered = PluginConfigSchema.safeParse(userStripped.cleaned);
|
|
599
707
|
if (userRecovered.success) {
|
|
600
|
-
|
|
708
|
+
const userRemoved = annotateEpicKeys(userStripped.removed);
|
|
709
|
+
advisoryWarn(`[opencode-swarm] Project config ignored; also ignored ${userRemoved.length} unrecognized user-config key(s): ${userRemoved.join(", ")}.`);
|
|
601
710
|
return {
|
|
602
711
|
config: secure(userRecovered.data),
|
|
603
712
|
recovery: "user_only",
|
|
604
|
-
removedKeys: [
|
|
605
|
-
...gatesStripped,
|
|
606
|
-
...userGatesStripped,
|
|
607
|
-
...userStripped.removed
|
|
608
|
-
],
|
|
713
|
+
removedKeys: [...gatesStripped, ...userGatesStripped, ...userRemoved],
|
|
609
714
|
warnings: [
|
|
610
715
|
"Project config ignored due to validation errors; using user config."
|
|
611
716
|
],
|
|
@@ -622,7 +727,7 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
|
|
|
622
727
|
if (recoveredParse.success) {
|
|
623
728
|
const removedKeys = [
|
|
624
729
|
...gatesStripped,
|
|
625
|
-
...valueRecovery.recoveryWarnings.map((w) => w.section)
|
|
730
|
+
...annotateEpicKeys(valueRecovery.recoveryWarnings.map((w) => w.section))
|
|
626
731
|
];
|
|
627
732
|
const secureParse = PluginConfigSchema.safeParse({
|
|
628
733
|
...recoveredParse.data,
|
|
@@ -644,7 +749,7 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
|
|
|
644
749
|
}
|
|
645
750
|
}
|
|
646
751
|
}
|
|
647
|
-
const offending = stripUnrecognizedKeys(mergedRaw, firstResult.error).removed;
|
|
752
|
+
const offending = annotateEpicKeys(stripUnrecognizedKeys(mergedRaw, firstResult.error).removed);
|
|
648
753
|
if (offending.length > 0) {
|
|
649
754
|
advisoryWarn(`[opencode-swarm] Merged config validation failed. Unrecognized key(s): ${offending.join(", ")}.`);
|
|
650
755
|
} else {
|
|
@@ -698,6 +803,8 @@ function loadGateOverrides(directory) {
|
|
|
698
803
|
function resetConfigAdvisoryDedup() {
|
|
699
804
|
gatesAdvisorySignatures.clear();
|
|
700
805
|
lastUnknownTopLevelSig = null;
|
|
806
|
+
lastRetiredEpicKeysSig = null;
|
|
807
|
+
legacyEpicConfigWarned = false;
|
|
701
808
|
}
|
|
702
809
|
function getSafeDefaultConfigLoadResult() {
|
|
703
810
|
const { config, recovery, removedKeys, warnings } = buildConfigWithMeta(null, null, false, false);
|
|
@@ -789,8 +896,9 @@ function loadAgentPrompt(agentName) {
|
|
|
789
896
|
}
|
|
790
897
|
return result;
|
|
791
898
|
}
|
|
792
|
-
var CONFIG_FILENAME = "opencode-swarm.json", PROMPTS_DIR_NAME = "opencode-swarm", MAX_CONFIG_FILE_BYTES = 102400, lastUnknownTopLevelSig = null, gatesAdvisorySignatures, MAX_GATES_ADVISORY_SIGNATURES = 64, _internals;
|
|
899
|
+
var CONFIG_FILENAME = "opencode-swarm.json", PROMPTS_DIR_NAME = "opencode-swarm", MAX_CONFIG_FILE_BYTES = 102400, lastUnknownTopLevelSig = null, lastRetiredEpicKeysSig = null, legacyEpicConfigWarned = false, gatesAdvisorySignatures, MAX_GATES_ADVISORY_SIGNATURES = 64, _internals;
|
|
793
900
|
var init_loader = __esm(() => {
|
|
901
|
+
init_config();
|
|
794
902
|
init_warning_buffer();
|
|
795
903
|
init_git_executable();
|
|
796
904
|
init_sanitize_malformed_values();
|
|
@@ -802,10 +910,16 @@ var init_loader = __esm(() => {
|
|
|
802
910
|
resetUnknownTopLevelKeyWarning() {
|
|
803
911
|
lastUnknownTopLevelSig = null;
|
|
804
912
|
},
|
|
913
|
+
resetRetiredEpicKeyWarning() {
|
|
914
|
+
lastRetiredEpicKeysSig = null;
|
|
915
|
+
},
|
|
916
|
+
resetLegacyEpicConfigWarning() {
|
|
917
|
+
legacyEpicConfigWarned = false;
|
|
918
|
+
},
|
|
805
919
|
resetGatesAdvisoryDedup() {
|
|
806
920
|
gatesAdvisorySignatures.clear();
|
|
807
921
|
}
|
|
808
922
|
};
|
|
809
923
|
});
|
|
810
924
|
|
|
811
|
-
export { loadPluginConfig, loadPluginConfigWithMeta, loadGateOverrides, resetConfigAdvisoryDedup, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader };
|
|
925
|
+
export { resolveEpicConfig, isEpicModeConfigEnabled, isEpicCochangeConfigEnabled, hasLegacyEpicConfig, migrateLegacyEpicConfig, legacyEpicIssuePath, init_config, loadPluginConfig, loadPluginConfigWithMeta, loadGateOverrides, resetConfigAdvisoryDedup, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader };
|