opencode-swarm 7.113.0 → 7.113.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/.opencode/skills/engineering-conventions/SKILL.md +5 -0
  2. package/.opencode/skills/gate-attribution/SKILL.md +2 -0
  3. package/dist/background/pending-delegations.d.ts +8 -0
  4. package/dist/background/workspace-snapshot.d.ts +7 -0
  5. package/dist/cli/{curator-pdcpw4x6.js → curator-9s04amtf.js} +5 -4
  6. package/dist/cli/{curator-llm-factory-3t0ehhfe.js → curator-llm-factory-dwvk7rh0.js} +5 -4
  7. package/dist/cli/{evidence-summary-service-j6fnsfeq.js → evidence-summary-service-w1er1ea2.js} +2 -2
  8. package/dist/cli/{gate-evidence-mk0ss1re.js → gate-evidence-9hdwj6tt.js} +1 -1
  9. package/dist/cli/{guardrail-explain-xsfdc49z.js → guardrail-explain-2k271yh4.js} +6 -5
  10. package/dist/cli/{hive-promoter-4htgk6zb.js → hive-promoter-0y4pnft4.js} +5 -4
  11. package/dist/cli/{index-bsvwnzh7.js → index-54dgk0bv.js} +33 -36
  12. package/dist/cli/{index-d0w40jm3.js → index-afgh75zg.js} +1 -1
  13. package/dist/cli/{workspace-snapshot-w58jr2ga.js → index-dqh3zhhc.js} +53 -10
  14. package/dist/cli/{index-h88ktb5r.js → index-h389ed8y.js} +8 -2
  15. package/dist/cli/{index-v96kmbkw.js → index-n7rd2rkj.js} +1 -1
  16. package/dist/cli/{index-6gdxwfsh.js → index-w51xz4dr.js} +6 -5
  17. package/dist/cli/{index-pm992z24.js → index-x5g7et24.js} +10 -7
  18. package/dist/cli/index.js +5 -4
  19. package/dist/cli/{pending-delegations-gc3a2hfx.js → pending-delegations-t047f4a7.js} +7 -0
  20. package/dist/cli/{skill-generator-0my4jrx6.js → skill-generator-nnwn4sq0.js} +1 -1
  21. package/dist/cli/workspace-snapshot-eyf6gd0d.js +22 -0
  22. package/dist/config/project-init.d.ts +1 -1
  23. package/dist/config/skill-mirrors.d.ts +3 -1
  24. package/dist/gate-evidence-classification.d.ts +5 -0
  25. package/dist/gate-evidence.d.ts +14 -3
  26. package/dist/index.js +276 -276
  27. package/dist/memory/schema.d.ts +4 -4
  28. package/dist/sast/rules/index.d.ts +0 -9
  29. package/dist/tools/phase-complete.d.ts +8 -0
  30. package/dist/tools/sast-scan.d.ts +2 -0
  31. package/dist/utils/gitignore-warning.d.ts +8 -4
  32. package/package.json +1 -1
@@ -149,6 +149,11 @@ A baseline captured post-edit silently encodes the very bugs the scan is meant
149
149
  to catch as "pre-existing," suppressing them indefinitely. This turns the SAST
150
150
  gate into theater.
151
151
 
152
+ Baseline capture also requires at least one supported, existing file to be
153
+ successfully scanned. Omitted, empty, or entirely unscannable `changed_files`
154
+ returns `capture_baseline requires changed_files to produce a non-empty baseline`
155
+ instead of reporting a successful no-op capture.
156
+
152
157
  ### How to use it
153
158
 
154
159
  1. Identify the files to scan. In a phase, use the union of declared task-scope
@@ -35,6 +35,8 @@ no reviewed rows are parseable, attribution falls back to the single-task rule.
35
35
  4. **Collect + attribute:** Single-task lanes auto-attribute to their taskId; set-dispatch rows auto-attribute per parsed row.
36
36
  5. **Do NOT rely on prose summaries:** A batched dispatch without parseable rows is ambiguous and does not count per-task.
37
37
 
38
+ Gate evidence is persisted independently as `.swarm/evidence/{taskId}.json` for each task. Passing set-dispatch rows cause the hook to write one task-scoped file per task; a single multi-task evidence file cannot satisfy any task.
39
+
38
40
  ## Optimization for trivial tasks
39
41
  For pure ceremony gates (1-line doc fix):
40
42
  ```
@@ -56,6 +56,8 @@ export interface BackgroundDelegationRecord {
56
56
  promptHash?: string;
57
57
  /** Project/root provenance captured at dispatch time. */
58
58
  workspace?: BackgroundWorkspaceSnapshot;
59
+ /** Immutable pre-coder provenance for doc-only gate classification. */
60
+ taskChangeContext?: BackgroundTaskChangeContext;
59
61
  prompt?: BackgroundPromptSnapshot;
60
62
  generation?: number;
61
63
  result?: BackgroundDelegationResult;
@@ -65,9 +67,14 @@ export interface BackgroundWorkspaceSnapshot {
65
67
  directory: string;
66
68
  gitHead: string | null;
67
69
  dirtyHash: string | null;
70
+ changedFiles?: string[] | null;
68
71
  prHeadSha: string | null;
69
72
  scope: string | null;
70
73
  }
74
+ export interface BackgroundTaskChangeContext {
75
+ declaredFiles: string[] | null;
76
+ baseline: BackgroundWorkspaceSnapshot;
77
+ }
71
78
  export interface BackgroundPromptSnapshot {
72
79
  text: string;
73
80
  chars: number;
@@ -114,6 +121,7 @@ export interface RecordPendingInput {
114
121
  mode?: string;
115
122
  promptHash?: string;
116
123
  workspace?: BackgroundWorkspaceSnapshot;
124
+ taskChangeContext?: BackgroundTaskChangeContext;
117
125
  prompt?: BackgroundPromptSnapshot;
118
126
  generation?: number;
119
127
  }
@@ -11,7 +11,14 @@ interface CaptureWorkspaceSnapshotOptions {
11
11
  */
12
12
  resolveCurrentPrHeadSha?: boolean;
13
13
  }
14
+ /** Parse `git status --porcelain=v1 -z`, including both sides of renames. */
15
+ export declare function parsePorcelainPaths(output: string): string[] | null;
14
16
  export declare function captureWorkspaceSnapshot(directory: string, optionsOrScope?: string | null | CaptureWorkspaceSnapshotOptions, prHeadShaArg?: string | null): BackgroundWorkspaceSnapshot;
17
+ /**
18
+ * Conservatively derive final paths changed since a pre-task snapshot.
19
+ * Git or parsing failures return null so gate classification fails closed.
20
+ */
21
+ export declare function changedFilesSinceSnapshot(directory: string, baseline: BackgroundWorkspaceSnapshot | undefined): string[] | null;
15
22
  export declare function workspaceSnapshotMatches(expected: BackgroundWorkspaceSnapshot | undefined, current: BackgroundWorkspaceSnapshot): {
16
23
  ok: true;
17
24
  } | {
@@ -12,16 +12,16 @@ import {
12
12
  runCuratorInit,
13
13
  runCuratorPhase,
14
14
  writeCuratorSummary
15
- } from "./index-bsvwnzh7.js";
15
+ } from "./index-54dgk0bv.js";
16
16
  import"./index-8f256d7t.js";
17
17
  import"./index-c8s9a3zh.js";
18
18
  import"./index-0gf6de8b.js";
19
19
  import"./index-1ey3dxq7.js";
20
- import"./index-d0w40jm3.js";
20
+ import"./index-afgh75zg.js";
21
21
  import"./index-scww5b77.js";
22
22
  import"./index-9fxs0rm1.js";
23
23
  import"./index-q1jaeynn.js";
24
- import"./index-h88ktb5r.js";
24
+ import"./index-h389ed8y.js";
25
25
  import"./index-30ejh1tx.js";
26
26
  import"./index-t6wfwdm1.js";
27
27
  import"./index-hpp2r0sd.js";
@@ -38,7 +38,8 @@ import"./index-jtqkh8jf.js";
38
38
  import"./index-5e4e2hvv.js";
39
39
  import"./index-p0arc26j.js";
40
40
  import"./index-zgwm4ryv.js";
41
- import"./index-pm992z24.js";
41
+ import"./index-dqh3zhhc.js";
42
+ import"./index-x5g7et24.js";
42
43
  import"./index-0dab9w37.js";
43
44
  import"./index-293f68mj.js";
44
45
  import"./index-5mkc2f9z.js";
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  createCuratorLLMDelegate
4
- } from "./index-bsvwnzh7.js";
4
+ } from "./index-54dgk0bv.js";
5
5
  import"./index-8f256d7t.js";
6
6
  import"./index-c8s9a3zh.js";
7
7
  import"./index-0gf6de8b.js";
8
8
  import"./index-1ey3dxq7.js";
9
- import"./index-d0w40jm3.js";
9
+ import"./index-afgh75zg.js";
10
10
  import"./index-scww5b77.js";
11
11
  import"./index-9fxs0rm1.js";
12
12
  import"./index-q1jaeynn.js";
13
- import"./index-h88ktb5r.js";
13
+ import"./index-h389ed8y.js";
14
14
  import"./index-30ejh1tx.js";
15
15
  import"./index-t6wfwdm1.js";
16
16
  import"./index-hpp2r0sd.js";
@@ -27,7 +27,8 @@ import"./index-jtqkh8jf.js";
27
27
  import"./index-5e4e2hvv.js";
28
28
  import"./index-p0arc26j.js";
29
29
  import"./index-zgwm4ryv.js";
30
- import"./index-pm992z24.js";
30
+ import"./index-dqh3zhhc.js";
31
+ import"./index-x5g7et24.js";
31
32
  import"./index-0dab9w37.js";
32
33
  import"./index-293f68mj.js";
33
34
  import"./index-5mkc2f9z.js";
@@ -6,7 +6,7 @@ import {
6
6
  loadPlanJsonOnly,
7
7
  mergeDurableGateEntriesFromEvidence,
8
8
  readDurableGateEvidence
9
- } from "./index-d0w40jm3.js";
9
+ } from "./index-afgh75zg.js";
10
10
  import"./index-scww5b77.js";
11
11
  import"./index-q1exe2b3.js";
12
12
  import"./index-1rga1vvb.js";
@@ -16,7 +16,7 @@ import"./index-p0arc26j.js";
16
16
  import {
17
17
  log
18
18
  } from "./index-zgwm4ryv.js";
19
- import"./index-pm992z24.js";
19
+ import"./index-x5g7et24.js";
20
20
  import"./index-0dab9w37.js";
21
21
  import"./index-293f68mj.js";
22
22
  import"./index-5mkc2f9z.js";
@@ -9,7 +9,7 @@ import {
9
9
  readTaskEvidenceRaw,
10
10
  recordAgentDispatch,
11
11
  recordGateEvidence
12
- } from "./index-pm992z24.js";
12
+ } from "./index-x5g7et24.js";
13
13
  import"./index-0dab9w37.js";
14
14
  import"./index-293f68mj.js";
15
15
  import"./index-5mkc2f9z.js";
@@ -1,17 +1,17 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-v96kmbkw.js";
5
- import"./index-bsvwnzh7.js";
4
+ } from "./index-n7rd2rkj.js";
5
+ import"./index-54dgk0bv.js";
6
6
  import"./index-8f256d7t.js";
7
7
  import"./index-c8s9a3zh.js";
8
8
  import"./index-0gf6de8b.js";
9
9
  import"./index-1ey3dxq7.js";
10
- import"./index-d0w40jm3.js";
10
+ import"./index-afgh75zg.js";
11
11
  import"./index-scww5b77.js";
12
12
  import"./index-9fxs0rm1.js";
13
13
  import"./index-q1jaeynn.js";
14
- import"./index-h88ktb5r.js";
14
+ import"./index-h389ed8y.js";
15
15
  import"./index-30ejh1tx.js";
16
16
  import"./index-t6wfwdm1.js";
17
17
  import"./index-hpp2r0sd.js";
@@ -28,7 +28,8 @@ import"./index-jtqkh8jf.js";
28
28
  import"./index-5e4e2hvv.js";
29
29
  import"./index-p0arc26j.js";
30
30
  import"./index-zgwm4ryv.js";
31
- import"./index-pm992z24.js";
31
+ import"./index-dqh3zhhc.js";
32
+ import"./index-x5g7et24.js";
32
33
  import"./index-0dab9w37.js";
33
34
  import"./index-293f68mj.js";
34
35
  import"./index-5mkc2f9z.js";
@@ -5,16 +5,16 @@ import {
5
5
  isHiveEligible,
6
6
  promoteFromSwarm,
7
7
  promoteToHive
8
- } from "./index-bsvwnzh7.js";
8
+ } from "./index-54dgk0bv.js";
9
9
  import"./index-8f256d7t.js";
10
10
  import"./index-c8s9a3zh.js";
11
11
  import"./index-0gf6de8b.js";
12
12
  import"./index-1ey3dxq7.js";
13
- import"./index-d0w40jm3.js";
13
+ import"./index-afgh75zg.js";
14
14
  import"./index-scww5b77.js";
15
15
  import"./index-9fxs0rm1.js";
16
16
  import"./index-q1jaeynn.js";
17
- import"./index-h88ktb5r.js";
17
+ import"./index-h389ed8y.js";
18
18
  import"./index-30ejh1tx.js";
19
19
  import"./index-t6wfwdm1.js";
20
20
  import"./index-hpp2r0sd.js";
@@ -31,7 +31,8 @@ import"./index-jtqkh8jf.js";
31
31
  import"./index-5e4e2hvv.js";
32
32
  import"./index-p0arc26j.js";
33
33
  import"./index-zgwm4ryv.js";
34
- import"./index-pm992z24.js";
34
+ import"./index-dqh3zhhc.js";
35
+ import"./index-x5g7et24.js";
35
36
  import"./index-0dab9w37.js";
36
37
  import"./index-293f68mj.js";
37
38
  import"./index-5mkc2f9z.js";
@@ -68,7 +68,7 @@ import {
68
68
  savePlan,
69
69
  transientBackoff,
70
70
  validateProjectRoot
71
- } from "./index-d0w40jm3.js";
71
+ } from "./index-afgh75zg.js";
72
72
  import {
73
73
  buildOpenSpecProjectionSync,
74
74
  detectSpeckit,
@@ -94,6 +94,7 @@ import {
94
94
  BUNDLED_PROJECT_SKILL_ROOT,
95
95
  DEFAULT_SKILL_MIN_CONFIDENCE,
96
96
  DEFAULT_SKILL_MIN_CONFIRMATIONS,
97
+ advisoryWarn,
97
98
  appendRejectedSkillEdit,
98
99
  appendSkillChangelog,
99
100
  autoApplyProposals,
@@ -110,7 +111,7 @@ import {
110
111
  retireSkill,
111
112
  selectCandidateEntries,
112
113
  syncBundledProjectSkillsIfMissingAsync
113
- } from "./index-h88ktb5r.js";
114
+ } from "./index-h389ed8y.js";
114
115
  import {
115
116
  appendUnactionable,
116
117
  quarantineEntry,
@@ -4799,14 +4800,14 @@ function loadRawConfigFromPath(configPath) {
4799
4800
  try {
4800
4801
  const stats = fs.statSync(configPath);
4801
4802
  if (stats.size > MAX_CONFIG_FILE_BYTES) {
4802
- console.warn(`[opencode-swarm] Config file too large (max 100 KB): ${configPath}`);
4803
- console.warn("[opencode-swarm] \u26A0\uFE0F SECURITY: Config file exceeds size limit. Falling back to safe defaults with guardrails ENABLED.");
4803
+ advisoryWarn(`[opencode-swarm] Config file too large (max 100 KB): ${configPath}`);
4804
+ advisoryWarn("[opencode-swarm] \u26A0\uFE0F SECURITY: Config file exceeds size limit. Falling back to safe defaults with guardrails ENABLED.");
4804
4805
  return { config: null, fileExisted: true, hadError: true };
4805
4806
  }
4806
4807
  const content = fs.readFileSync(configPath, "utf-8");
4807
4808
  if (content.length > MAX_CONFIG_FILE_BYTES) {
4808
- console.warn(`[opencode-swarm] Config file too large after read (max 100 KB): ${configPath}`);
4809
- console.warn("[opencode-swarm] \u26A0\uFE0F SECURITY: Config file exceeds size limit. Falling back to safe defaults with guardrails ENABLED.");
4809
+ advisoryWarn(`[opencode-swarm] Config file too large after read (max 100 KB): ${configPath}`);
4810
+ advisoryWarn("[opencode-swarm] \u26A0\uFE0F SECURITY: Config file exceeds size limit. Falling back to safe defaults with guardrails ENABLED.");
4810
4811
  return { config: null, fileExisted: true, hadError: true };
4811
4812
  }
4812
4813
  let sanitizedContent = content;
@@ -4815,8 +4816,8 @@ function loadRawConfigFromPath(configPath) {
4815
4816
  }
4816
4817
  const rawConfig = JSON.parse(sanitizedContent);
4817
4818
  if (typeof rawConfig !== "object" || rawConfig === null || Array.isArray(rawConfig)) {
4818
- console.warn(`[opencode-swarm] Invalid config at ${configPath}: expected an object`);
4819
- console.warn("[opencode-swarm] \u26A0\uFE0F SECURITY: Config format invalid. Falling back to safe defaults with guardrails ENABLED.");
4819
+ advisoryWarn(`[opencode-swarm] Invalid config at ${configPath}: expected an object`);
4820
+ advisoryWarn("[opencode-swarm] \u26A0\uFE0F SECURITY: Config format invalid. Falling back to safe defaults with guardrails ENABLED.");
4820
4821
  return { config: null, fileExisted: true, hadError: true };
4821
4822
  }
4822
4823
  return {
@@ -4828,8 +4829,8 @@ function loadRawConfigFromPath(configPath) {
4828
4829
  const isFileNotFoundError = error2 instanceof Error && "code" in error2 && error2.code === "ENOENT";
4829
4830
  if (!isFileNotFoundError) {
4830
4831
  const errorMessage = error2 instanceof Error ? error2.message : String(error2);
4831
- console.warn(`[opencode-swarm] \u26A0\uFE0F CONFIG LOAD FAILURE \u2014 config exists at ${configPath} but could not be loaded: ${errorMessage}`);
4832
- console.warn("[opencode-swarm] \u26A0\uFE0F SECURITY: Config load failed. Falling back to safe defaults with guardrails ENABLED.");
4832
+ advisoryWarn(`[opencode-swarm] \u26A0\uFE0F CONFIG LOAD FAILURE \u2014 config exists at ${configPath} but could not be loaded: ${errorMessage}`);
4833
+ advisoryWarn("[opencode-swarm] \u26A0\uFE0F SECURITY: Config load failed. Falling back to safe defaults with guardrails ENABLED.");
4833
4834
  return { config: null, fileExisted: true, hadError: true };
4834
4835
  }
4835
4836
  return { config: null, fileExisted: false, hadError: false };
@@ -4845,7 +4846,7 @@ function migratePresetsConfig(raw) {
4845
4846
  delete migrated.preset;
4846
4847
  delete migrated.presets;
4847
4848
  delete migrated.swarm_mode;
4848
- console.warn("[opencode-swarm] Migrated v6.12 presets config to agents format. Consider updating your opencode-swarm.json.");
4849
+ advisoryWarn("[opencode-swarm] Migrated v6.12 presets config to agents format. Consider updating your opencode-swarm.json.");
4849
4850
  return migrated;
4850
4851
  }
4851
4852
  }
@@ -4862,9 +4863,8 @@ function sanitizeExternalSkillsConfig(raw) {
4862
4863
  external_skills: resolveExternalSkillsConfig(esResult.data)
4863
4864
  };
4864
4865
  }
4865
- console.warn("[opencode-swarm] external_skills config validation failed:");
4866
- console.warn(esResult.error.format());
4867
- console.warn("[opencode-swarm] External skills curation disabled due to invalid config. Fix the external_skills section to enable it.");
4866
+ advisoryWarn("[opencode-swarm] external_skills config validation failed:", esResult.error.format());
4867
+ advisoryWarn("[opencode-swarm] External skills curation disabled due to invalid config. Fix the external_skills section to enable it.");
4868
4868
  const cleaned = { ...raw };
4869
4869
  delete cleaned.external_skills;
4870
4870
  return cleaned;
@@ -4874,7 +4874,7 @@ function sanitizeGatesConfig(raw) {
4874
4874
  return raw;
4875
4875
  }
4876
4876
  if (typeof raw.gates !== "object" || raw.gates === null || Array.isArray(raw.gates)) {
4877
- console.warn("[opencode-swarm] gates config validation failed: expected an object. Quality gates will use defaults; other config sections remain active.");
4877
+ advisoryWarn("[opencode-swarm] gates config validation failed: expected an object. Quality gates will use defaults; other config sections remain active.");
4878
4878
  const cleaned2 = { ...raw };
4879
4879
  delete cleaned2.gates;
4880
4880
  return cleaned2;
@@ -4884,7 +4884,7 @@ function sanitizeGatesConfig(raw) {
4884
4884
  for (const [key, value] of Object.entries(cleanedGates)) {
4885
4885
  const schema = gateSchemas[key];
4886
4886
  if (!schema) {
4887
- console.warn(`[opencode-swarm] Unknown gates config section "gates.${key}" ignored. Other config sections remain active.`);
4887
+ advisoryWarn(`[opencode-swarm] Unknown gates config section "gates.${key}" ignored. Other config sections remain active.`);
4888
4888
  delete cleanedGates[key];
4889
4889
  continue;
4890
4890
  }
@@ -4895,7 +4895,7 @@ function sanitizeGatesConfig(raw) {
4895
4895
  const knownFieldSet = new Set(knownFields);
4896
4896
  for (const fieldName of Object.keys(cleanedSection)) {
4897
4897
  if (!knownFieldSet.has(fieldName)) {
4898
- console.warn(`[opencode-swarm] Unknown gates config key "gates.${key}.${fieldName}" ignored. Other config sections remain active.`);
4898
+ advisoryWarn(`[opencode-swarm] Unknown gates config key "gates.${key}.${fieldName}" ignored. Other config sections remain active.`);
4899
4899
  delete cleanedSection[fieldName];
4900
4900
  }
4901
4901
  }
@@ -4904,8 +4904,7 @@ function sanitizeGatesConfig(raw) {
4904
4904
  }
4905
4905
  const sectionResult = schema.safeParse(sectionValue);
4906
4906
  if (!sectionResult.success) {
4907
- console.warn(`[opencode-swarm] gates.${key} config validation failed; that gate section will use defaults and other config sections remain active:`);
4908
- console.warn(sectionResult.error.format());
4907
+ advisoryWarn(`[opencode-swarm] gates.${key} config validation failed; that gate section will use defaults and other config sections remain active:`, sectionResult.error.format());
4909
4908
  delete cleanedGates[key];
4910
4909
  }
4911
4910
  }
@@ -4916,8 +4915,7 @@ function sanitizeGatesConfig(raw) {
4916
4915
  gates: gatesResult.data
4917
4916
  };
4918
4917
  }
4919
- console.warn("[opencode-swarm] gates config validation failed after section cleanup; quality gates will use defaults and other config sections remain active:");
4920
- console.warn(gatesResult.error.format());
4918
+ advisoryWarn("[opencode-swarm] gates config validation failed after section cleanup; quality gates will use defaults and other config sections remain active:", gatesResult.error.format());
4921
4919
  const cleaned = { ...raw };
4922
4920
  delete cleaned.gates;
4923
4921
  return cleaned;
@@ -4961,13 +4959,12 @@ function loadPluginConfig(directory) {
4961
4959
  if (rawUserConfig) {
4962
4960
  const userParseResult = PluginConfigSchema.safeParse(sanitizeSectionConfigs(rawUserConfig ?? {}));
4963
4961
  if (userParseResult.success) {
4964
- console.warn("[opencode-swarm] Project config ignored due to validation errors. Using user config.");
4962
+ advisoryWarn("[opencode-swarm] Project config ignored due to validation errors. Using user config.");
4965
4963
  return userParseResult.data;
4966
4964
  }
4967
4965
  }
4968
- console.warn("[opencode-swarm] Merged config validation failed:");
4969
- console.warn(result.error.format());
4970
- console.warn("[opencode-swarm] \u26A0\uFE0F SECURITY: Falling back to conservative defaults with guardrails ENABLED. Fix the config file to restore custom configuration.");
4966
+ advisoryWarn("[opencode-swarm] Merged config validation failed:", result.error.format());
4967
+ advisoryWarn("[opencode-swarm] \u26A0\uFE0F SECURITY: Falling back to conservative defaults with guardrails ENABLED. Fix the config file to restore custom configuration.");
4971
4968
  return PluginConfigSchema.parse({
4972
4969
  guardrails: { enabled: true }
4973
4970
  });
@@ -8979,7 +8976,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
8979
8976
  }
8980
8977
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
8981
8978
  try {
8982
- const skillModule = await import("./skill-generator-0my4jrx6.js");
8979
+ const skillModule = await import("./skill-generator-nnwn4sq0.js");
8983
8980
  for (const cand of skillCandidates) {
8984
8981
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
8985
8982
  continue;
@@ -10221,11 +10218,11 @@ var _internals12 = {
10221
10218
  return KnowledgeConfigSchema2.parse({});
10222
10219
  },
10223
10220
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig) => {
10224
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-pdcpw4x6.js");
10221
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-9s04amtf.js");
10225
10222
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig);
10226
10223
  },
10227
10224
  checkHivePromotions: async (entries, knowledgeConfig) => {
10228
- const { checkHivePromotions } = await import("./hive-promoter-4htgk6zb.js");
10225
+ const { checkHivePromotions } = await import("./hive-promoter-0y4pnft4.js");
10229
10226
  return checkHivePromotions(entries, knowledgeConfig);
10230
10227
  },
10231
10228
  applyProposalTriage: async (directory, triage) => {
@@ -10234,7 +10231,7 @@ var _internals12 = {
10234
10231
  activateProposal,
10235
10232
  listSkills: listSkills2,
10236
10233
  sanitizeSlug
10237
- } = await import("./skill-generator-0my4jrx6.js");
10234
+ } = await import("./skill-generator-nnwn4sq0.js");
10238
10235
  const result = {
10239
10236
  approved: [],
10240
10237
  rejected: [],
@@ -17283,8 +17280,8 @@ var _internals23 = {
17283
17280
  loadCuratorDeps: async () => {
17284
17281
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
17285
17282
  import("./schema-qb313fyy.js"),
17286
- import("./curator-pdcpw4x6.js"),
17287
- import("./curator-llm-factory-3t0ehhfe.js")
17283
+ import("./curator-9s04amtf.js"),
17284
+ import("./curator-llm-factory-dwvk7rh0.js")
17288
17285
  ]);
17289
17286
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
17290
17287
  }
@@ -17780,7 +17777,7 @@ import { fileURLToPath } from "url";
17780
17777
  // package.json
17781
17778
  var package_default = {
17782
17779
  name: "opencode-swarm",
17783
- version: "7.113.0",
17780
+ version: "7.113.2",
17784
17781
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
17785
17782
  main: "dist/index.js",
17786
17783
  types: "dist/index.d.ts",
@@ -20053,7 +20050,7 @@ async function handleEvidenceCommand(directory, args) {
20053
20050
  return formatTaskEvidenceMarkdown(evidenceData);
20054
20051
  }
20055
20052
  async function handleEvidenceSummaryCommand(directory) {
20056
- const { buildEvidenceSummary } = await import("./evidence-summary-service-j6fnsfeq.js");
20053
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-w1er1ea2.js");
20057
20054
  const artifact = await buildEvidenceSummary(directory);
20058
20055
  if (!artifact) {
20059
20056
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -32621,7 +32618,7 @@ function buildDetailedHelp(commandName, entry) {
32621
32618
  async function handleHelpCommand(ctx) {
32622
32619
  const targetCommand = ctx.args.join(" ");
32623
32620
  if (!targetCommand) {
32624
- const { buildHelpText } = await import("./index-6gdxwfsh.js");
32621
+ const { buildHelpText } = await import("./index-w51xz4dr.js");
32625
32622
  return buildHelpText();
32626
32623
  }
32627
32624
  const tokens = targetCommand.split(/\s+/);
@@ -32630,7 +32627,7 @@ async function handleHelpCommand(ctx) {
32630
32627
  return _internals48.buildDetailedHelp(resolved.key, resolved.entry);
32631
32628
  }
32632
32629
  const similar = _internals48.findSimilarCommands(targetCommand);
32633
- const { buildHelpText: fullHelp } = await import("./index-6gdxwfsh.js");
32630
+ const { buildHelpText: fullHelp } = await import("./index-w51xz4dr.js");
32634
32631
  if (similar.length > 0) {
32635
32632
  return `Command '/swarm ${targetCommand}' not found.
32636
32633
 
@@ -32763,7 +32760,7 @@ var COMMAND_REGISTRY = {
32763
32760
  },
32764
32761
  "guardrail explain": {
32765
32762
  handler: async (ctx) => {
32766
- const { handleGuardrailExplain } = await import("./guardrail-explain-xsfdc49z.js");
32763
+ const { handleGuardrailExplain } = await import("./guardrail-explain-2k271yh4.js");
32767
32764
  return handleGuardrailExplain(ctx.directory, ctx.args);
32768
32765
  },
32769
32766
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -27,7 +27,7 @@ import {
27
27
  readTaskEvidence,
28
28
  readTaskEvidenceRaw,
29
29
  sanitizeTaskId
30
- } from "./index-pm992z24.js";
30
+ } from "./index-x5g7et24.js";
31
31
  import {
32
32
  ZodError,
33
33
  exports_external
@@ -1,6 +1,4 @@
1
1
  // @bun
2
- import"./index-a76rekgs.js";
3
-
4
2
  // src/background/workspace-snapshot.ts
5
3
  import * as child_process from "child_process";
6
4
  import { createHash } from "crypto";
@@ -19,6 +17,30 @@ function runGit(directory, args) {
19
17
  return null;
20
18
  return typeof result.stdout === "string" ? result.stdout.trimEnd() : null;
21
19
  }
20
+ function parseNulPaths(output) {
21
+ return output.split("\x00").filter((entry) => entry.length > 0);
22
+ }
23
+ function parsePorcelainPaths(output) {
24
+ const entries = parseNulPaths(output);
25
+ const paths = [];
26
+ for (let index = 0;index < entries.length; index++) {
27
+ const entry = entries[index];
28
+ if (entry.length < 4 || entry[2] !== " ")
29
+ return null;
30
+ const status = entry.slice(0, 2);
31
+ const changedPath = entry.slice(3);
32
+ if (!changedPath)
33
+ return null;
34
+ paths.push(changedPath);
35
+ if (status.includes("R") || status.includes("C")) {
36
+ const originalPath = entries[++index];
37
+ if (!originalPath)
38
+ return null;
39
+ paths.push(originalPath);
40
+ }
41
+ }
42
+ return [...new Set(paths)];
43
+ }
22
44
  function captureWorkspaceSnapshot(directory, optionsOrScope = null, prHeadShaArg = null) {
23
45
  const scope = typeof optionsOrScope === "object" && optionsOrScope !== null ? optionsOrScope.scope ?? null : optionsOrScope;
24
46
  const prHeadSha = (() => {
@@ -34,16 +56,43 @@ function captureWorkspaceSnapshot(directory, optionsOrScope = null, prHeadShaArg
34
56
  const porcelain = runGit(directory, [
35
57
  "status",
36
58
  "--porcelain=v1",
59
+ "-z",
37
60
  "--untracked-files=all"
38
61
  ]);
62
+ const changedFiles = porcelain === null ? null : parsePorcelainPaths(porcelain);
39
63
  return {
40
64
  directory: path.resolve(directory),
41
65
  gitHead,
42
66
  dirtyHash: porcelain === null ? null : digest(porcelain),
67
+ changedFiles,
43
68
  prHeadSha,
44
69
  scope
45
70
  };
46
71
  }
72
+ function changedFilesSinceSnapshot(directory, baseline) {
73
+ if (!baseline?.gitHead || baseline.changedFiles == null)
74
+ return null;
75
+ if (baseline.changedFiles.length > 0)
76
+ return null;
77
+ const current = captureWorkspaceSnapshot(directory);
78
+ if (!current.gitHead || current.changedFiles == null)
79
+ return null;
80
+ const changed = new Set(current.changedFiles);
81
+ if (baseline.gitHead !== current.gitHead) {
82
+ const committed = runGit(directory, [
83
+ "diff",
84
+ "--name-only",
85
+ "-z",
86
+ baseline.gitHead,
87
+ current.gitHead
88
+ ]);
89
+ if (committed === null)
90
+ return null;
91
+ for (const changedPath of parseNulPaths(committed))
92
+ changed.add(changedPath);
93
+ }
94
+ return [...changed];
95
+ }
47
96
  function workspaceSnapshotMatches(expected, current) {
48
97
  if (!expected)
49
98
  return { ok: true };
@@ -80,11 +129,5 @@ function digest(text) {
80
129
  var _internals = {
81
130
  spawnSync: child_process.spawnSync
82
131
  };
83
- export {
84
- workspaceSnapshotMatches,
85
- digest,
86
- compareWorkspaceSnapshots,
87
- compareWorkspaceSnapshot,
88
- captureWorkspaceSnapshot,
89
- _internals
90
- };
132
+
133
+ export { parsePorcelainPaths, captureWorkspaceSnapshot, changedFilesSinceSnapshot, workspaceSnapshotMatches, compareWorkspaceSnapshot, compareWorkspaceSnapshots, digest, _internals };
@@ -40,9 +40,15 @@ import * as path from "path";
40
40
  init_logger();
41
41
  var deferredWarnings = [];
42
42
  var MAX_DEFERRED_WARNINGS = 50;
43
+ var deferredWarningsTruncated = false;
43
44
  function addDeferredWarning(warning) {
44
- if (deferredWarnings.length < MAX_DEFERRED_WARNINGS) {
45
+ if (deferredWarnings.length < MAX_DEFERRED_WARNINGS - 1) {
45
46
  deferredWarnings.push(warning);
47
+ return;
48
+ }
49
+ if (!deferredWarningsTruncated) {
50
+ deferredWarnings.push(`[opencode-swarm] ${MAX_DEFERRED_WARNINGS - 1} deferred warnings buffered; additional advisories were dropped (cap reached). Run with OPENCODE_SWARM_DEBUG=1 to see all advisories in the debug log.`);
51
+ deferredWarningsTruncated = true;
46
52
  }
47
53
  }
48
54
  function advisoryWarn(message, data) {
@@ -2146,4 +2152,4 @@ var _internals = {
2146
2152
  clearRetiredSkillLinks
2147
2153
  };
2148
2154
 
2149
- export { getDeferredWarnings, BUNDLED_PROJECT_SKILL_ROOT, bundledProjectSkillFileReference, syncBundledProjectSkillsIfMissingAsync, appendSkillChangelog, evaluateSkillChange, appendRejectedSkillEdit, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, proposalRepoRelativePath, generateEvalStub, writeEvalStub, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, buildKnowledgeCluster, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, clearDraftSkillLinks, clearRetiredSkillLinks, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
2155
+ export { advisoryWarn, getDeferredWarnings, BUNDLED_PROJECT_SKILL_ROOT, bundledProjectSkillFileReference, syncBundledProjectSkillsIfMissingAsync, appendSkillChangelog, evaluateSkillChange, appendRejectedSkillEdit, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, proposalRepoRelativePath, generateEvalStub, writeEvalStub, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, buildKnowledgeCluster, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, clearDraftSkillLinks, clearRetiredSkillLinks, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
@@ -12,7 +12,7 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-bsvwnzh7.js";
15
+ } from "./index-54dgk0bv.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-v96kmbkw.js";
4
+ } from "./index-n7rd2rkj.js";
5
5
  import {
6
6
  handleGuardrailLog
7
7
  } from "./index-r9fjzr3k.js";
@@ -81,7 +81,7 @@ import {
81
81
  handleWriteRetroCommand,
82
82
  normalizeSwarmCommandInput,
83
83
  resolveCommand
84
- } from "./index-bsvwnzh7.js";
84
+ } from "./index-54dgk0bv.js";
85
85
  import"./index-8f256d7t.js";
86
86
  import"./index-c8s9a3zh.js";
87
87
  import"./index-0gf6de8b.js";
@@ -90,11 +90,11 @@ import {
90
90
  ORCHESTRATOR_NAME,
91
91
  stripKnownSwarmPrefix
92
92
  } from "./index-1ey3dxq7.js";
93
- import"./index-d0w40jm3.js";
93
+ import"./index-afgh75zg.js";
94
94
  import"./index-scww5b77.js";
95
95
  import"./index-9fxs0rm1.js";
96
96
  import"./index-q1jaeynn.js";
97
- import"./index-h88ktb5r.js";
97
+ import"./index-h389ed8y.js";
98
98
  import"./index-30ejh1tx.js";
99
99
  import"./index-t6wfwdm1.js";
100
100
  import"./index-hpp2r0sd.js";
@@ -111,7 +111,8 @@ import"./index-jtqkh8jf.js";
111
111
  import"./index-5e4e2hvv.js";
112
112
  import"./index-p0arc26j.js";
113
113
  import"./index-zgwm4ryv.js";
114
- import"./index-pm992z24.js";
114
+ import"./index-dqh3zhhc.js";
115
+ import"./index-x5g7et24.js";
115
116
  import"./index-0dab9w37.js";
116
117
  import"./index-293f68mj.js";
117
118
  import"./index-5mkc2f9z.js";