opencode-swarm 7.158.0 → 7.159.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.
Files changed (62) hide show
  1. package/README.md +4 -2
  2. package/dist/background/pr-subscriptions.d.ts +31 -15
  3. package/dist/cli/{coder-settlement-5sexsmqz.js → coder-settlement-66mqw0xt.js} +3 -3
  4. package/dist/cli/{config-doctor-ewn2kw6d.js → config-doctor-nkx61b9e.js} +2 -2
  5. package/dist/cli/{core-72wdmzps.js → core-b3db7gf6.js} +1 -1
  6. package/dist/cli/{curator-llm-factory-r8q84m4g.js → curator-llm-factory-c4y1mrr5.js} +20 -20
  7. package/dist/cli/{curator-g06sa98p.js → curator-w4ntvkz5.js} +20 -20
  8. package/dist/cli/{evidence-summary-service-ttd0ntm0.js → evidence-summary-service-vadgnzk6.js} +6 -6
  9. package/dist/cli/{gate-evidence-agnxf7md.js → gate-evidence-0chatz5e.js} +2 -2
  10. package/dist/cli/{guardrail-explain-qf4k176t.js → guardrail-explain-ax2qmsp4.js} +21 -21
  11. package/dist/cli/{guardrail-log-g4qc595v.js → guardrail-log-t3c9g8tc.js} +3 -3
  12. package/dist/cli/{guardrail-reset-zpxk0p1j.js → guardrail-reset-wvdb5sv5.js} +20 -20
  13. package/dist/cli/{hive-promoter-zxy07gjg.js → hive-promoter-mfq3ee0n.js} +20 -20
  14. package/dist/cli/{index-rc93mm6e.js → index-04yrxg0z.js} +1 -1
  15. package/dist/cli/{index-c57cyrwn.js → index-1sdb57jv.js} +3 -3
  16. package/dist/cli/{index-f036tggv.js → index-35grv4jg.js} +3 -3
  17. package/dist/cli/{index-rac2gkvr.js → index-3e8600a7.js} +132 -63
  18. package/dist/cli/{index-rd324153.js → index-6e6qxf5q.js} +15 -1
  19. package/dist/cli/{index-pvs2zw1y.js → index-8jnzp5ct.js} +2 -2
  20. package/dist/cli/{index-745dh1z1.js → index-8kfbdrxa.js} +22 -22
  21. package/dist/cli/{index-1vxmqvpt.js → index-9vt2hknx.js} +1 -1
  22. package/dist/cli/{index-f776m4r5.js → index-b1tenv2s.js} +75 -72
  23. package/dist/cli/{index-6xxpwk5x.js → index-b82tq895.js} +1 -1
  24. package/dist/cli/{index-yfbp4q09.js → index-e2s08v0q.js} +1 -1
  25. package/dist/cli/{index-x71shq8j.js → index-erdsawqz.js} +4 -4
  26. package/dist/cli/{index-y3hdwh66.js → index-fcp41snp.js} +3 -3
  27. package/dist/cli/{index-zawd71cg.js → index-ghjs1n7k.js} +3 -3
  28. package/dist/cli/{index-gm10kvne.js → index-hte1e31d.js} +2 -2
  29. package/dist/cli/{index-vwx0by4y.js → index-k48kgm6z.js} +5 -5
  30. package/dist/cli/{index-bv24pbaj.js → index-k4arrwrz.js} +3 -3
  31. package/dist/cli/{index-x4ftmdha.js → index-mc9qgkwd.js} +531 -100
  32. package/dist/cli/{index-a1884hh4.js → index-pvzaryhr.js} +1 -1
  33. package/dist/cli/{index-663wnh64.js → index-tcbjjppb.js} +26 -2
  34. package/dist/cli/{index-dmfbmnp7.js → index-vywbn766.js} +1 -1
  35. package/dist/cli/{index-fwe1wh6r.js → index-we3nf5as.js} +1 -1
  36. package/dist/cli/{index-5tchehv7.js → index-xmz69g65.js} +1 -1
  37. package/dist/cli/{index-nvta6kcv.js → index-ynjy98vv.js} +2 -2
  38. package/dist/cli/index.js +28 -36
  39. package/dist/cli/{knowledge-escalator-22zaj224.js → knowledge-escalator-x85t1e66.js} +6 -6
  40. package/dist/cli/{knowledge-events-xbx1k408.js → knowledge-events-bwx99mxc.js} +4 -4
  41. package/dist/cli/{knowledge-store-fnm8xh9c.js → knowledge-store-21m81zsa.js} +1 -1
  42. package/dist/cli/{knowledge-validator-t2jztjy1.js → knowledge-validator-yxcadg1p.js} +2 -2
  43. package/dist/cli/{pending-delegations-29rtv1gb.js → pending-delegations-b8qka5nf.js} +1 -1
  44. package/dist/cli/{pr-review-reentry-authorization-25dep81m.js → pr-review-reentry-authorization-wv3ck5kh.js} +20 -20
  45. package/dist/cli/{pr-subscriptions-cgac3ydd.js → pr-subscriptions-j9j70bmd.js} +1 -1
  46. package/dist/cli/{scan-cursor-8acs9kwe.js → scan-cursor-m3w0tapb.js} +2 -2
  47. package/dist/cli/{schema-rjhassd0.js → schema-0b0dqn28.js} +1 -1
  48. package/dist/cli/{scope-persistence-jb1a5dzh.js → scope-persistence-199f7yqc.js} +4 -4
  49. package/dist/cli/{skill-generator-frgppk1w.js → skill-generator-a2ekcbe2.js} +7 -7
  50. package/dist/cli/{worktree-collision-ownership-f5sj6ffa.js → worktree-collision-ownership-5qaab3q7.js} +1 -1
  51. package/dist/cli/{worktree-isolation-5b0w6bha.js → worktree-isolation-esesc842.js} +20 -20
  52. package/dist/commands/close.d.ts +2 -0
  53. package/dist/config/loader.d.ts +3 -0
  54. package/dist/config/project-init.d.ts +11 -7
  55. package/dist/config/schema.d.ts +1 -0
  56. package/dist/index.js +477 -473
  57. package/dist/tools/repo-graph/query.d.ts +1 -0
  58. package/dist/tools/repo-graph/symbol-query.d.ts +47 -0
  59. package/dist/tools/repo-graph/types.d.ts +267 -1
  60. package/dist/tools/repo-graph.d.ts +3 -1
  61. package/opencode-swarm.schema.json +5160 -0
  62. package/package.json +4 -2
@@ -92,7 +92,7 @@ var _internals = {
92
92
  symlinkSync: fs.symlinkSync
93
93
  },
94
94
  writeScopeToDisk: async (directory, taskId, files) => {
95
- const { writeScopeToDisk: realWrite } = await import("./scope-persistence-jb1a5dzh.js");
95
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-199f7yqc.js");
96
96
  return realWrite(directory, taskId, files);
97
97
  },
98
98
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  resolveExternalSkillsConfig
9
- } from "./index-f776m4r5.js";
9
+ } from "./index-b1tenv2s.js";
10
10
  import {
11
11
  GIT_BINARY_ENV_VAR,
12
12
  init_git_executable
@@ -244,6 +244,7 @@ __export(exports_loader, {
244
244
  getSafeDefaultConfigLoadResult: () => getSafeDefaultConfigLoadResult,
245
245
  formatZodIssues: () => formatZodIssues,
246
246
  deepMerge: () => deepMerge,
247
+ _internals: () => _internals,
247
248
  MAX_MERGE_DEPTH: () => MAX_MERGE_DEPTH,
248
249
  MAX_CONFIG_FILE_BYTES: () => MAX_CONFIG_FILE_BYTES
249
250
  });
@@ -308,6 +309,15 @@ function migratePresetsConfig(raw) {
308
309
  return migrated;
309
310
  }
310
311
  }
312
+ const dormantLegacyKeys = ["preset", "presets", "swarm_mode"].filter((key) => (key in raw));
313
+ if (dormantLegacyKeys.length > 0 && raw.agents) {
314
+ const cleaned = { ...raw };
315
+ for (const key of dormantLegacyKeys) {
316
+ delete cleaned[key];
317
+ }
318
+ advisoryWarn(`[opencode-swarm] Ignored legacy v6.12 config key(s): ${dormantLegacyKeys.join(", ")}. The agents block takes precedence \u2014 consider removing them from your opencode-swarm.json.`);
319
+ return cleaned;
320
+ }
311
321
  return raw;
312
322
  }
313
323
  function sanitizeExternalSkillsConfig(raw) {
@@ -483,6 +493,15 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
483
493
  mergedRaw = migratePresetsConfig(mergedRaw);
484
494
  const { result: sanitized, strippedKeys: gatesStripped } = sanitizeSectionConfigs(mergedRaw);
485
495
  mergedRaw = sanitized;
496
+ const knownTopLevel = new Set(Object.keys(PluginConfigSchema.shape));
497
+ const unknownTopLevel = Object.keys(mergedRaw).filter((key) => !knownTopLevel.has(key));
498
+ if (unknownTopLevel.length > 0) {
499
+ const signature = unknownTopLevel.join("\x00");
500
+ if (signature !== lastUnknownTopLevelSig) {
501
+ lastUnknownTopLevelSig = signature;
502
+ 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.`);
503
+ }
504
+ }
486
505
  const secure = (cfg) => loadedFromFile && configHadErrors ? PluginConfigSchema.parse({
487
506
  ...cfg,
488
507
  guardrails: { enabled: true }
@@ -713,7 +732,7 @@ function loadAgentPrompt(agentName) {
713
732
  }
714
733
  return result;
715
734
  }
716
- var CONFIG_FILENAME = "opencode-swarm.json", PROMPTS_DIR_NAME = "opencode-swarm", MAX_CONFIG_FILE_BYTES = 102400;
735
+ var CONFIG_FILENAME = "opencode-swarm.json", PROMPTS_DIR_NAME = "opencode-swarm", MAX_CONFIG_FILE_BYTES = 102400, lastUnknownTopLevelSig = null, _internals;
717
736
  var init_loader = __esm(() => {
718
737
  init_warning_buffer();
719
738
  init_git_executable();
@@ -721,6 +740,11 @@ var init_loader = __esm(() => {
721
740
  init_schema();
722
741
  init_merge();
723
742
  init_merge();
743
+ _internals = {
744
+ resetUnknownTopLevelKeyWarning() {
745
+ lastUnknownTopLevelSig = null;
746
+ }
747
+ };
724
748
  });
725
749
 
726
750
  // src/config/plan-schema.ts
@@ -9,7 +9,7 @@ import {
9
9
  resolveSwarmKnowledgePath,
10
10
  resolveSwarmRejectedPath,
11
11
  transactKnowledge
12
- } from "./index-x71shq8j.js";
12
+ } from "./index-erdsawqz.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
15
  } from "./index-5zgf140g.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  autoCommitDirty,
4
4
  cleanUntrackedFiles
5
- } from "./index-a1884hh4.js";
5
+ } from "./index-pvzaryhr.js";
6
6
  import {
7
7
  isPathWithinDeclaredScope,
8
8
  unsafePathTextReason
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-x71shq8j.js";
5
+ } from "./index-erdsawqz.js";
6
6
  import {
7
7
  init_git_executable,
8
8
  resolveGitExecutableAsync
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  computePlanStructureHash,
4
4
  derivePlanId
5
- } from "./index-6xxpwk5x.js";
5
+ } from "./index-b82tq895.js";
6
6
  import {
7
7
  appendCoreEventSync
8
8
  } from "./index-nwkr6tvv.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./index-556ja8an.js";
12
12
  import {
13
13
  PlanSchema
14
- } from "./index-663wnh64.js";
14
+ } from "./index-tcbjjppb.js";
15
15
  import {
16
16
  atomicWriteSwarmFile,
17
17
  atomicWriteSwarmFileSync
package/dist/cli/index.js CHANGED
@@ -11,53 +11,53 @@ import {
11
11
  readCachePackageVersion,
12
12
  resolveCommand,
13
13
  safeRealpathSync
14
- } from "./index-rac2gkvr.js";
14
+ } from "./index-3e8600a7.js";
15
15
  import"./index-z54qw70y.js";
16
- import"./index-rc93mm6e.js";
17
- import"./index-rd324153.js";
18
- import"./index-bv24pbaj.js";
16
+ import"./index-04yrxg0z.js";
17
+ import"./index-6e6qxf5q.js";
18
+ import"./index-k4arrwrz.js";
19
19
  import"./index-7s1hmrfh.js";
20
20
  import"./index-txdagbh7.js";
21
21
  import"./index-134d35c1.js";
22
22
  import"./index-nj6rmyeh.js";
23
- import"./index-y3hdwh66.js";
24
- import"./index-vwx0by4y.js";
25
- import"./index-5tchehv7.js";
23
+ import"./index-fcp41snp.js";
24
+ import"./index-k48kgm6z.js";
25
+ import"./index-xmz69g65.js";
26
26
  import"./index-70ha9e09.js";
27
27
  import"./index-c8s9a3zh.js";
28
28
  import"./index-9ss2m4rs.js";
29
- import"./index-x4ftmdha.js";
29
+ import"./index-mc9qgkwd.js";
30
30
  import"./index-zsrtt42s.js";
31
- import"./index-c57cyrwn.js";
31
+ import"./index-1sdb57jv.js";
32
32
  import"./index-3f7hqtgg.js";
33
33
  import"./index-8fqb0ynp.js";
34
- import"./index-dmfbmnp7.js";
34
+ import"./index-vywbn766.js";
35
35
  import"./index-pfnj5pvs.js";
36
36
  import"./index-rtry5xyf.js";
37
- import"./index-fwe1wh6r.js";
38
- import"./index-a1884hh4.js";
39
- import"./index-yfbp4q09.js";
37
+ import"./index-we3nf5as.js";
38
+ import"./index-pvzaryhr.js";
39
+ import"./index-e2s08v0q.js";
40
40
  import"./index-ddszzne4.js";
41
- import"./index-nvta6kcv.js";
42
- import"./index-6xxpwk5x.js";
41
+ import"./index-ynjy98vv.js";
42
+ import"./index-b82tq895.js";
43
43
  import"./index-nwkr6tvv.js";
44
44
  import"./index-556ja8an.js";
45
45
  import"./index-4fwbbad3.js";
46
46
  import"./index-b43rt5ph.js";
47
47
  import"./index-q7sjgr1y.js";
48
- import"./index-x71shq8j.js";
49
- import"./index-f036tggv.js";
50
- import"./index-gm10kvne.js";
48
+ import"./index-erdsawqz.js";
49
+ import"./index-35grv4jg.js";
50
+ import"./index-hte1e31d.js";
51
51
  import"./index-gprxjmm7.js";
52
52
  import"./index-n832052r.js";
53
53
  import"./index-dtn0pne5.js";
54
54
  import"./index-z6xqpmqg.js";
55
55
  import"./index-r3mvsbtq.js";
56
- import"./index-663wnh64.js";
56
+ import"./index-tcbjjppb.js";
57
57
  import {
58
58
  init_package,
59
59
  package_default
60
- } from "./index-f776m4r5.js";
60
+ } from "./index-b1tenv2s.js";
61
61
  import"./index-9e6fdz2h.js";
62
62
  import"./index-4rhhvd1a.js";
63
63
  import {
@@ -85,6 +85,13 @@ import * as os from "os";
85
85
  import * as path from "path";
86
86
  import { fileURLToPath } from "url";
87
87
  init_constants();
88
+
89
+ // src/config/project-init.ts
90
+ init_package();
91
+ init_constants();
92
+ var CONFIG_SCHEMA_REF = `https://unpkg.com/opencode-swarm@${package_default.version}/opencode-swarm.schema.json`;
93
+
94
+ // src/cli/index.ts
88
95
  var { version } = package_default;
89
96
  var PACKAGE_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..");
90
97
  var CONFIG_DIR = getPluginConfigDir();
@@ -203,21 +210,6 @@ function saveJson(filepath, data) {
203
210
  fs.writeFileSync(filepath, `${JSON.stringify(data, null, 2)}
204
211
  `, "utf-8");
205
212
  }
206
- function writeProjectConfigIfMissing(cwd) {
207
- try {
208
- const opencodeDir = path.join(cwd, ".opencode");
209
- const projectConfigPath = path.join(opencodeDir, "opencode-swarm.json");
210
- if (fs.existsSync(projectConfigPath)) {
211
- return;
212
- }
213
- ensureDir(opencodeDir);
214
- saveJson(projectConfigPath, { agents: {} });
215
- console.log("\u2713 Created project config at:", projectConfigPath);
216
- } catch (error) {
217
- console.warn("\u26A0 Could not create project config \u2014 installation will continue:");
218
- console.warn(` ${error instanceof Error ? error.message : String(error)}`);
219
- }
220
- }
221
213
  async function install() {
222
214
  console.log(`\uD83D\uDC1D Installing OpenCode Swarm...
223
215
  `);
@@ -272,6 +264,7 @@ async function install() {
272
264
  }
273
265
  if (!fs.existsSync(PLUGIN_CONFIG_PATH)) {
274
266
  const defaultConfig = {
267
+ $schema: CONFIG_SCHEMA_REF,
275
268
  agents: { ...DEFAULT_AGENT_CONFIGS },
276
269
  max_iterations: 5
277
270
  };
@@ -280,7 +273,6 @@ async function install() {
280
273
  } else {
281
274
  console.log("\u2713 Plugin config already exists at:", PLUGIN_CONFIG_PATH);
282
275
  }
283
- writeProjectConfigIfMissing(process.cwd());
284
276
  console.log(`
285
277
  \uD83D\uDCC1 Configuration files:`);
286
278
  console.log(` OpenCode config: ${OPENCODE_CONFIG_PATH}`);
@@ -9,17 +9,17 @@ import {
9
9
  maybeEscalateOnViolation,
10
10
  maybeQuarantineOnContradiction,
11
11
  readRecentEscalations
12
- } from "./index-vwx0by4y.js";
13
- import"./index-x71shq8j.js";
14
- import"./index-f036tggv.js";
15
- import"./index-gm10kvne.js";
12
+ } from "./index-k48kgm6z.js";
13
+ import"./index-erdsawqz.js";
14
+ import"./index-35grv4jg.js";
15
+ import"./index-hte1e31d.js";
16
16
  import"./index-gprxjmm7.js";
17
17
  import"./index-n832052r.js";
18
18
  import"./index-dtn0pne5.js";
19
19
  import"./index-z6xqpmqg.js";
20
20
  import"./index-r3mvsbtq.js";
21
- import"./index-663wnh64.js";
22
- import"./index-f776m4r5.js";
21
+ import"./index-tcbjjppb.js";
22
+ import"./index-b1tenv2s.js";
23
23
  import"./index-9e6fdz2h.js";
24
24
  import"./index-4rhhvd1a.js";
25
25
  import"./index-yt75r1er.js";
@@ -29,15 +29,15 @@ import {
29
29
  resolveKnowledgeCounterBaselinePath,
30
30
  resolveKnowledgeEventsPath,
31
31
  resolveLegacyApplicationLogPath
32
- } from "./index-f036tggv.js";
33
- import"./index-gm10kvne.js";
32
+ } from "./index-35grv4jg.js";
33
+ import"./index-hte1e31d.js";
34
34
  import"./index-gprxjmm7.js";
35
35
  import"./index-n832052r.js";
36
36
  import"./index-dtn0pne5.js";
37
37
  import"./index-z6xqpmqg.js";
38
38
  import"./index-r3mvsbtq.js";
39
- import"./index-663wnh64.js";
40
- import"./index-f776m4r5.js";
39
+ import"./index-tcbjjppb.js";
40
+ import"./index-b1tenv2s.js";
41
41
  import"./index-9e6fdz2h.js";
42
42
  import"./index-4rhhvd1a.js";
43
43
  import"./index-yt75r1er.js";
@@ -42,7 +42,7 @@ import {
42
42
  transactKnowledge,
43
43
  transactKnowledgeWithCas,
44
44
  wordBigrams
45
- } from "./index-x71shq8j.js";
45
+ } from "./index-erdsawqz.js";
46
46
  import {
47
47
  resolveHiveDataDir
48
48
  } from "./index-ae75rja9.js";
@@ -23,10 +23,10 @@ import {
23
23
  validateLesson,
24
24
  validateSkillCandidatePath,
25
25
  validateSkillPath
26
- } from "./index-dmfbmnp7.js";
26
+ } from "./index-vywbn766.js";
27
27
  import"./index-pfnj5pvs.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-x71shq8j.js";
29
+ import"./index-erdsawqz.js";
30
30
  import"./index-ae75rja9.js";
31
31
  import"./index-5zgf140g.js";
32
32
  import"./index-h52hs4e9.js";
@@ -64,7 +64,7 @@ import {
64
64
  sweepStaleDelegations,
65
65
  updateCoderSettlement,
66
66
  writeDelegationFallback
67
- } from "./index-yfbp4q09.js";
67
+ } from "./index-e2s08v0q.js";
68
68
  import"./index-ddszzne4.js";
69
69
  import"./index-dtn0pne5.js";
70
70
  import"./index-z6xqpmqg.js";
@@ -3,43 +3,43 @@ import {
3
3
  PrReviewRunIdSchema,
4
4
  prWorkflowSessionFileStem,
5
5
  readPrReviewReentryBindingContext
6
- } from "./index-rac2gkvr.js";
6
+ } from "./index-3e8600a7.js";
7
7
  import"./index-z54qw70y.js";
8
- import"./index-rc93mm6e.js";
9
- import"./index-rd324153.js";
10
- import"./index-bv24pbaj.js";
8
+ import"./index-04yrxg0z.js";
9
+ import"./index-6e6qxf5q.js";
10
+ import"./index-k4arrwrz.js";
11
11
  import"./index-7s1hmrfh.js";
12
12
  import"./index-txdagbh7.js";
13
13
  import"./index-134d35c1.js";
14
14
  import"./index-nj6rmyeh.js";
15
- import"./index-y3hdwh66.js";
16
- import"./index-vwx0by4y.js";
17
- import"./index-5tchehv7.js";
15
+ import"./index-fcp41snp.js";
16
+ import"./index-k48kgm6z.js";
17
+ import"./index-xmz69g65.js";
18
18
  import"./index-70ha9e09.js";
19
19
  import"./index-c8s9a3zh.js";
20
20
  import"./index-9ss2m4rs.js";
21
- import"./index-x4ftmdha.js";
21
+ import"./index-mc9qgkwd.js";
22
22
  import"./index-zsrtt42s.js";
23
- import"./index-c57cyrwn.js";
23
+ import"./index-1sdb57jv.js";
24
24
  import"./index-3f7hqtgg.js";
25
25
  import"./index-8fqb0ynp.js";
26
- import"./index-dmfbmnp7.js";
26
+ import"./index-vywbn766.js";
27
27
  import"./index-pfnj5pvs.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-fwe1wh6r.js";
30
- import"./index-a1884hh4.js";
31
- import"./index-yfbp4q09.js";
29
+ import"./index-we3nf5as.js";
30
+ import"./index-pvzaryhr.js";
31
+ import"./index-e2s08v0q.js";
32
32
  import"./index-ddszzne4.js";
33
- import"./index-nvta6kcv.js";
34
- import"./index-6xxpwk5x.js";
33
+ import"./index-ynjy98vv.js";
34
+ import"./index-b82tq895.js";
35
35
  import"./index-nwkr6tvv.js";
36
36
  import"./index-556ja8an.js";
37
37
  import"./index-4fwbbad3.js";
38
38
  import"./index-b43rt5ph.js";
39
39
  import"./index-q7sjgr1y.js";
40
- import"./index-x71shq8j.js";
41
- import"./index-f036tggv.js";
42
- import"./index-gm10kvne.js";
40
+ import"./index-erdsawqz.js";
41
+ import"./index-35grv4jg.js";
42
+ import"./index-hte1e31d.js";
43
43
  import"./index-gprxjmm7.js";
44
44
  import"./index-n832052r.js";
45
45
  import {
@@ -47,8 +47,8 @@ import {
47
47
  } from "./index-dtn0pne5.js";
48
48
  import"./index-z6xqpmqg.js";
49
49
  import"./index-r3mvsbtq.js";
50
- import"./index-663wnh64.js";
51
- import"./index-f776m4r5.js";
50
+ import"./index-tcbjjppb.js";
51
+ import"./index-b1tenv2s.js";
52
52
  import"./index-9e6fdz2h.js";
53
53
  import"./index-4rhhvd1a.js";
54
54
  import"./index-yt75r1er.js";
@@ -14,7 +14,7 @@ import {
14
14
  sweepStale,
15
15
  unsubscribe,
16
16
  updateSnapshot
17
- } from "./index-x4ftmdha.js";
17
+ } from "./index-mc9qgkwd.js";
18
18
  import"./index-dtn0pne5.js";
19
19
  import"./index-z6xqpmqg.js";
20
20
  import"./index-r3mvsbtq.js";
@@ -4,8 +4,8 @@ import {
4
4
  alreadyCuratedThisGeneration,
5
5
  claimNextScanBatch,
6
6
  getScanStatus
7
- } from "./index-5tchehv7.js";
8
- import"./index-x71shq8j.js";
7
+ } from "./index-xmz69g65.js";
8
+ import"./index-erdsawqz.js";
9
9
  import"./index-9e6fdz2h.js";
10
10
  import"./index-4rhhvd1a.js";
11
11
  import"./index-ae75rja9.js";
@@ -101,7 +101,7 @@ import {
101
101
  resolveGeneratedAgentRole,
102
102
  resolveGuardrailsConfig,
103
103
  stripKnownSwarmPrefix
104
- } from "./index-f776m4r5.js";
104
+ } from "./index-b1tenv2s.js";
105
105
  import"./index-yt75r1er.js";
106
106
  import"./index-zjygnfay.js";
107
107
  import"./index-bk5tah7q.js";
@@ -23,12 +23,12 @@ import {
23
23
  tombstoneScopeBinding,
24
24
  writeScopeBindingToDisk,
25
25
  writeScopeToDisk
26
- } from "./index-nvta6kcv.js";
27
- import"./index-6xxpwk5x.js";
26
+ } from "./index-ynjy98vv.js";
27
+ import"./index-b82tq895.js";
28
28
  import"./index-nwkr6tvv.js";
29
29
  import"./index-556ja8an.js";
30
- import"./index-663wnh64.js";
31
- import"./index-f776m4r5.js";
30
+ import"./index-tcbjjppb.js";
31
+ import"./index-b1tenv2s.js";
32
32
  import"./index-9e6fdz2h.js";
33
33
  import"./index-4rhhvd1a.js";
34
34
  import"./index-yt75r1er.js";
@@ -33,21 +33,21 @@ import {
33
33
  sanitizeSlug,
34
34
  selectCandidateEntries,
35
35
  writeEvalStub
36
- } from "./index-y3hdwh66.js";
37
- import"./index-dmfbmnp7.js";
36
+ } from "./index-fcp41snp.js";
37
+ import"./index-vywbn766.js";
38
38
  import"./index-pfnj5pvs.js";
39
39
  import"./index-rtry5xyf.js";
40
40
  import"./index-q7sjgr1y.js";
41
- import"./index-x71shq8j.js";
42
- import"./index-f036tggv.js";
43
- import"./index-gm10kvne.js";
41
+ import"./index-erdsawqz.js";
42
+ import"./index-35grv4jg.js";
43
+ import"./index-hte1e31d.js";
44
44
  import"./index-gprxjmm7.js";
45
45
  import"./index-n832052r.js";
46
46
  import"./index-dtn0pne5.js";
47
47
  import"./index-z6xqpmqg.js";
48
48
  import"./index-r3mvsbtq.js";
49
- import"./index-663wnh64.js";
50
- import"./index-f776m4r5.js";
49
+ import"./index-tcbjjppb.js";
50
+ import"./index-b1tenv2s.js";
51
51
  import"./index-9e6fdz2h.js";
52
52
  import"./index-4rhhvd1a.js";
53
53
  import"./index-yt75r1er.js";
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  scanDelegationFallbacksForRecovery,
12
12
  scanDelegationsForRecovery
13
- } from "./index-yfbp4q09.js";
13
+ } from "./index-e2s08v0q.js";
14
14
  import"./index-ddszzne4.js";
15
15
  import"./index-dtn0pne5.js";
16
16
  import"./index-z6xqpmqg.js";
@@ -21,52 +21,52 @@ import {
21
21
  sanitizeWorktreeTaskId,
22
22
  standardWorktreeByCallID,
23
23
  standardWorktreeSerializationSessions
24
- } from "./index-rac2gkvr.js";
24
+ } from "./index-3e8600a7.js";
25
25
  import"./index-z54qw70y.js";
26
- import"./index-rc93mm6e.js";
27
- import"./index-rd324153.js";
28
- import"./index-bv24pbaj.js";
26
+ import"./index-04yrxg0z.js";
27
+ import"./index-6e6qxf5q.js";
28
+ import"./index-k4arrwrz.js";
29
29
  import"./index-7s1hmrfh.js";
30
30
  import"./index-txdagbh7.js";
31
31
  import"./index-134d35c1.js";
32
32
  import"./index-nj6rmyeh.js";
33
- import"./index-y3hdwh66.js";
34
- import"./index-vwx0by4y.js";
35
- import"./index-5tchehv7.js";
33
+ import"./index-fcp41snp.js";
34
+ import"./index-k48kgm6z.js";
35
+ import"./index-xmz69g65.js";
36
36
  import"./index-70ha9e09.js";
37
37
  import"./index-c8s9a3zh.js";
38
38
  import"./index-9ss2m4rs.js";
39
- import"./index-x4ftmdha.js";
39
+ import"./index-mc9qgkwd.js";
40
40
  import"./index-zsrtt42s.js";
41
- import"./index-c57cyrwn.js";
41
+ import"./index-1sdb57jv.js";
42
42
  import"./index-3f7hqtgg.js";
43
43
  import"./index-8fqb0ynp.js";
44
- import"./index-dmfbmnp7.js";
44
+ import"./index-vywbn766.js";
45
45
  import"./index-pfnj5pvs.js";
46
46
  import"./index-rtry5xyf.js";
47
- import"./index-fwe1wh6r.js";
48
- import"./index-a1884hh4.js";
49
- import"./index-yfbp4q09.js";
47
+ import"./index-we3nf5as.js";
48
+ import"./index-pvzaryhr.js";
49
+ import"./index-e2s08v0q.js";
50
50
  import"./index-ddszzne4.js";
51
- import"./index-nvta6kcv.js";
52
- import"./index-6xxpwk5x.js";
51
+ import"./index-ynjy98vv.js";
52
+ import"./index-b82tq895.js";
53
53
  import"./index-nwkr6tvv.js";
54
54
  import"./index-556ja8an.js";
55
55
  import"./index-4fwbbad3.js";
56
56
  import"./index-b43rt5ph.js";
57
57
  import"./index-q7sjgr1y.js";
58
- import"./index-x71shq8j.js";
59
- import"./index-f036tggv.js";
58
+ import"./index-erdsawqz.js";
59
+ import"./index-35grv4jg.js";
60
60
  import {
61
61
  resolveWorktreeIsolationConfig
62
- } from "./index-gm10kvne.js";
62
+ } from "./index-hte1e31d.js";
63
63
  import"./index-gprxjmm7.js";
64
64
  import"./index-n832052r.js";
65
65
  import"./index-dtn0pne5.js";
66
66
  import"./index-z6xqpmqg.js";
67
67
  import"./index-r3mvsbtq.js";
68
- import"./index-663wnh64.js";
69
- import"./index-f776m4r5.js";
68
+ import"./index-tcbjjppb.js";
69
+ import"./index-b1tenv2s.js";
70
70
  import"./index-9e6fdz2h.js";
71
71
  import"./index-4rhhvd1a.js";
72
72
  import"./index-yt75r1er.js";
@@ -146,6 +146,7 @@ export interface CloseStageContext {
146
146
  archiveSuffix: string;
147
147
  args: string[];
148
148
  }
149
+ declare function archiveCloseSummary(ctx: Pick<CloseStageContext, 'archiveStageFailed' | 'archiveDir' | 'warnings'>, closeSummaryPath: string, summaryWritten: boolean): Promise<void>;
149
150
  declare function countSessionKnowledgeEntries(entries: CloseKnowledgeEntry[], sessionStart: string | undefined, fallbackCount: number): number;
150
151
  /**
151
152
  * Backward-compatible wrapper that returns only the copied count.
@@ -296,6 +297,7 @@ export declare const _internals: {
296
297
  runFinalizeRewardSweep: typeof runFinalizeRewardSweep;
297
298
  acquireFinalizeLock: typeof acquireFinalizeLock;
298
299
  runArchiveStage: typeof runArchiveStage;
300
+ archiveCloseSummary: typeof archiveCloseSummary;
299
301
  runArchiveEvidenceRetention: typeof runArchiveEvidenceRetention;
300
302
  runCleanStage: typeof runCleanStage;
301
303
  runAlignStage: typeof runAlignStage;
@@ -1,6 +1,9 @@
1
1
  import type { z } from 'zod';
2
2
  import { type PluginConfig } from './schema';
3
3
  export declare const MAX_CONFIG_FILE_BYTES = 102400;
4
+ export declare const _internals: {
5
+ resetUnknownTopLevelKeyWarning(): void;
6
+ };
4
7
  export { deepMerge, MAX_MERGE_DEPTH } from '../utils/merge';
5
8
  /**
6
9
  * Flatten a ZodError into a compact, single-line, human-readable summary that
@@ -1,12 +1,16 @@
1
1
  /**
2
- * Creates .opencode/opencode-swarm.json in the given directory if it does not
3
- * already exist. Uses an atomic exclusive write (flag 'wx') so concurrent
4
- * plugin loads never double-write or corrupt the file.
5
- *
6
- * Non-fatal: any fs error (permissions, disk full, etc.) is swallowed so the
7
- * plugin continues with its default or global config.
2
+ * Absolute `$schema` reference written into config files this plugin authors
3
+ * (issue #1663) so editors get validation/autocomplete from the shipped
4
+ * opencode-swarm.schema.json. Version-pinned on purpose: the schema validating
5
+ * a config file should be the one shipped by the plugin version that authored
6
+ * it, and unpkg serves every published version. A relative path is unusable
7
+ * because these config files live in the user's project/home directory,
8
+ * outside the installed package. This is a DIFFERENT convention from the
9
+ * unversioned canonical URL (CONFIG_SCHEMA_CANONICAL_URL in
10
+ * scripts/generate-config-schema.ts) used as the artifact's `$id` and in
11
+ * docs — both resolve to the same file in every published package.
8
12
  */
9
- export declare function writeProjectConfigIfNew(directory: string, _quiet?: boolean): void;
13
+ export declare const CONFIG_SCHEMA_REF: string;
10
14
  /**
11
15
  * Writes .swarm/config.example.json on first plugin init for a given project.
12
16
  * Creates .swarm/ if it does not yet exist. Non-fatal: all errors are silently
@@ -1804,6 +1804,7 @@ export declare const PrReviewResilienceConfigSchema: z.ZodObject<{
1804
1804
  circuit_open_duration_ms: z.ZodDefault<z.ZodNumber>;
1805
1805
  }, z.core.$strict>;
1806
1806
  export declare const PluginConfigSchema: z.ZodObject<{
1807
+ $schema: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1807
1808
  config_format_version: z.ZodDefault<z.ZodNumber>;
1808
1809
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1809
1810
  model: z.ZodOptional<z.ZodString>;