opencode-swarm 7.164.3 → 7.164.5

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 (86) hide show
  1. package/dist/cli/{coder-settlement-m918n7qj.js → coder-settlement-x9wbqx46.js} +11 -11
  2. package/dist/cli/{config-doctor-5kytbwbx.js → config-doctor-axd9d6hs.js} +2 -2
  3. package/dist/cli/{core-anw5khk2.js → core-f1a1fk13.js} +1 -1
  4. package/dist/cli/{curation-policy-7pnmnfct.js → curation-policy-2cy7wejw.js} +6 -6
  5. package/dist/cli/{curator-yq6raqgs.js → curator-b104f7a7.js} +34 -34
  6. package/dist/cli/{curator-drift-ykrdf08r.js → curator-drift-3s3q4wsy.js} +4 -4
  7. package/dist/cli/curator-llm-factory-cv7ft0mb.js +66 -0
  8. package/dist/cli/{evidence-summary-service-8sbxvt2x.js → evidence-summary-service-5xsjs3x3.js} +15 -15
  9. package/dist/cli/{gate-evidence-53v7e938.js → gate-evidence-ypja4156.js} +7 -7
  10. package/dist/cli/guardrail-explain-cvha7b9p.js +67 -0
  11. package/dist/cli/{guardrail-log-q5sj7zby.js → guardrail-log-6t4e2j5f.js} +7 -7
  12. package/dist/cli/{guardrail-reset-dw45p5zc.js → guardrail-reset-es0bg976.js} +34 -34
  13. package/dist/cli/{hive-promoter-0axzw0h5.js → hive-promoter-yzv5g7jy.js} +34 -34
  14. package/dist/cli/{index-95hhrw1d.js → index-0trtcm9n.js} +9 -9
  15. package/dist/cli/{index-hcn69kp0.js → index-0zbze3n6.js} +1 -1
  16. package/dist/cli/{index-ac39znep.js → index-164m995b.js} +2 -2
  17. package/dist/cli/{index-bzd67m2j.js → index-1dz8hv7p.js} +4 -4
  18. package/dist/cli/{index-y2f5s2cf.js → index-1f4nandk.js} +1 -1
  19. package/dist/cli/{index-aty2dfmt.js → index-1q2dwv69.js} +1 -1
  20. package/dist/cli/{index-2xj34nkh.js → index-25jze7sf.js} +1 -1
  21. package/dist/cli/{index-5d7bzpfn.js → index-25z5qwkk.js} +1 -1
  22. package/dist/cli/{index-ehf0vjhx.js → index-3gb7bw7h.js} +88 -77
  23. package/dist/cli/{index-11st3tgy.js → index-3rrc5x4v.js} +2 -2
  24. package/dist/cli/{index-zs1jrsta.js → index-4emx8hhh.js} +2 -2
  25. package/dist/cli/{index-j98116cx.js → index-4jmtdtm9.js} +2 -2
  26. package/dist/cli/{index-w5jpjaqe.js → index-4krjn1gn.js} +2 -2
  27. package/dist/cli/{index-0145kpjr.js → index-50s9q4c1.js} +2 -2
  28. package/dist/cli/{index-4wneygfx.js → index-553veay1.js} +75 -23
  29. package/dist/cli/{index-88g6q52x.js → index-7rat6nyh.js} +4 -4
  30. package/dist/cli/{index-sn2vm710.js → index-8h9nng7f.js} +5 -5
  31. package/dist/cli/{index-xkqja15t.js → index-aaqbhn9h.js} +2 -2
  32. package/dist/cli/{index-5pxdtskj.js → index-aper29nf.js} +1 -1
  33. package/dist/cli/{index-8t11vcf5.js → index-ea7sehgy.js} +3 -3
  34. package/dist/cli/{index-kyayzfxp.js → index-er8ba9be.js} +4 -4
  35. package/dist/cli/{index-9pwa798m.js → index-fwebva1m.js} +7 -7
  36. package/dist/cli/{index-yep24wn4.js → index-fxxja498.js} +1 -1
  37. package/dist/cli/{index-sb4eanpv.js → index-hnjkpk57.js} +1 -1
  38. package/dist/cli/{index-kn0y788q.js → index-j9a4fsxg.js} +1 -1
  39. package/dist/cli/{index-493mxwj5.js → index-maxz22c1.js} +21 -21
  40. package/dist/cli/{index-0e34njnm.js → index-q0gtgwyr.js} +7 -7
  41. package/dist/cli/{index-fc153g7b.js → index-rc6hec4j.js} +4 -4
  42. package/dist/cli/{index-v56mhyhs.js → index-rz87mx1c.js} +1 -1
  43. package/dist/cli/{index-rhdwrfgc.js → index-s09b63xg.js} +5 -5
  44. package/dist/cli/{index-aaqzcnb9.js → index-ssb67ff6.js} +36 -36
  45. package/dist/cli/{index-f9nfknjg.js → index-tfa2p4y4.js} +3 -3
  46. package/dist/cli/{index-jwc2v92w.js → index-wbnyc50b.js} +5 -5
  47. package/dist/cli/{index-qbr05tbw.js → index-xj4kbtdw.js} +2 -2
  48. package/dist/cli/{index-yhpbcrdk.js → index-xm7dc14y.js} +13 -13
  49. package/dist/cli/{index-c8k4cs94.js → index-y42pra05.js} +5 -5
  50. package/dist/cli/{index-84qah5h6.js → index-yrsag0vs.js} +31 -52
  51. package/dist/cli/{index-3fpqmms2.js → index-ywtcznk2.js} +12 -4
  52. package/dist/cli/index.js +34 -34
  53. package/dist/cli/{knowledge-escalator-atn5tfy2.js → knowledge-escalator-evjd8g7y.js} +13 -13
  54. package/dist/cli/{knowledge-events-58ha93tx.js → knowledge-events-q46z1wy6.js} +11 -11
  55. package/dist/cli/{knowledge-link-2gh1cnk3.js → knowledge-link-ffmzf72f.js} +5 -5
  56. package/dist/cli/{knowledge-store-2vkn4qyy.js → knowledge-store-z82f5x9k.js} +6 -6
  57. package/dist/cli/{knowledge-validator-gcbfq9er.js → knowledge-validator-19gbnxx2.js} +8 -8
  58. package/dist/cli/{pending-delegations-esp3gpac.js → pending-delegations-t4cqk5ha.js} +6 -6
  59. package/dist/cli/{pr-subscriptions-sdv0n59c.js → pr-subscriptions-3enjtq0k.js} +6 -6
  60. package/dist/cli/{pr-workflow-gate-v5wh09wz.js → pr-workflow-gate-3ecgfsge.js} +34 -34
  61. package/dist/cli/{runner-m95v9d47.js → runner-wqy2hbxn.js} +6 -6
  62. package/dist/cli/{scan-cursor-6x0sqjer.js → scan-cursor-8wcy0dvf.js} +7 -7
  63. package/dist/cli/{schema-mgpsycrr.js → schema-hsw9r2tm.js} +5 -1
  64. package/dist/cli/{scope-persistence-pwqshfyr.js → scope-persistence-mbwt4grd.js} +9 -9
  65. package/dist/cli/{skill-generator-bywdfza0.js → skill-generator-kg32a5jy.js} +15 -15
  66. package/dist/cli/{telemetry-c4j18da8.js → telemetry-j14cj552.js} +1 -1
  67. package/dist/cli/{worktree-collision-ownership-71x5pqfz.js → worktree-collision-ownership-0rfw6kp3.js} +7 -7
  68. package/dist/cli/{worktree-isolation-e6tym281.js → worktree-isolation-qcwt09ve.js} +34 -34
  69. package/dist/config/index.d.ts +3 -3
  70. package/dist/config/loader.d.ts +34 -1
  71. package/dist/config/plan-schema.d.ts +1 -1
  72. package/dist/config/schema.d.ts +61 -7
  73. package/dist/council/council-review-identity.d.ts +1 -1
  74. package/dist/index.js +69 -69
  75. package/dist/plan/ledger.d.ts +56 -29
  76. package/dist/services/skill-optimizer/store.d.ts +1 -1
  77. package/dist/tools/build-check.d.ts +8 -0
  78. package/dist/tools/placeholder-scan.d.ts +10 -1
  79. package/dist/tools/pre-check-batch.d.ts +20 -8
  80. package/dist/tools/quality-budget.d.ts +2 -0
  81. package/dist/tools/sast-scan.d.ts +10 -2
  82. package/dist/tools/sbom-generate.d.ts +14 -0
  83. package/dist/tools/syntax-check.d.ts +11 -3
  84. package/package.json +1 -1
  85. package/dist/cli/curator-llm-factory-6swjnnb1.js +0 -66
  86. package/dist/cli/guardrail-explain-jhsqdzxr.js +0 -67
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  observeStoreHealth
4
- } from "./index-ac39znep.js";
4
+ } from "./index-164m995b.js";
5
5
  import {
6
6
  telemetry
7
- } from "./index-bzd67m2j.js";
7
+ } from "./index-1dz8hv7p.js";
8
8
  import {
9
9
  init_logger,
10
10
  warn
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  resolveExternalSkillsConfig
9
- } from "./index-84qah5h6.js";
9
+ } from "./index-yrsag0vs.js";
10
10
  import {
11
11
  GIT_BINARY_ENV_VAR,
12
12
  init_git_executable
@@ -237,9 +237,11 @@ var init_sanitize_malformed_values = () => {};
237
237
  // src/config/loader.ts
238
238
  var exports_loader = {};
239
239
  __export(exports_loader, {
240
+ resetConfigAdvisoryDedup: () => resetConfigAdvisoryDedup,
240
241
  loadPluginConfigWithMetaAsync: () => loadPluginConfigWithMetaAsync,
241
242
  loadPluginConfigWithMeta: () => loadPluginConfigWithMeta,
242
243
  loadPluginConfig: () => loadPluginConfig,
244
+ loadGateOverrides: () => loadGateOverrides,
243
245
  loadAgentPrompt: () => loadAgentPrompt,
244
246
  getSafeDefaultConfigLoadResult: () => getSafeDefaultConfigLoadResult,
245
247
  formatZodIssues: () => formatZodIssues,
@@ -252,6 +254,15 @@ import * as fs from "fs";
252
254
  import * as fsPromises from "fs/promises";
253
255
  import * as os from "os";
254
256
  import * as path from "path";
257
+ function gatesAdvisoryWarn(message, data) {
258
+ if (gatesAdvisorySignatures.has(message))
259
+ return;
260
+ if (gatesAdvisorySignatures.size >= MAX_GATES_ADVISORY_SIGNATURES) {
261
+ gatesAdvisorySignatures.clear();
262
+ }
263
+ gatesAdvisorySignatures.add(message);
264
+ advisoryWarn(message, data);
265
+ }
255
266
  function getUserConfigDir() {
256
267
  return process.env.XDG_CONFIG_HOME || path.join(os.homedir(), ".config");
257
268
  }
@@ -346,7 +357,7 @@ function sanitizeGatesConfig(raw) {
346
357
  return { result: raw, strippedKeys };
347
358
  }
348
359
  if (typeof raw.gates !== "object" || raw.gates === null || Array.isArray(raw.gates)) {
349
- advisoryWarn("[opencode-swarm] gates config validation failed: expected an object. Quality gates will use defaults; other config sections remain active.");
360
+ gatesAdvisoryWarn("[opencode-swarm] gates config validation failed: expected an object. Quality gates will use defaults; other config sections remain active.");
350
361
  const cleaned2 = { ...raw };
351
362
  delete cleaned2.gates;
352
363
  strippedKeys.push("gates");
@@ -357,7 +368,7 @@ function sanitizeGatesConfig(raw) {
357
368
  for (const [key, value] of Object.entries(cleanedGates)) {
358
369
  const schema = gateSchemas[key];
359
370
  if (!schema) {
360
- advisoryWarn(`[opencode-swarm] Unknown gates config section "gates.${key}" ignored. Other config sections remain active.`);
371
+ gatesAdvisoryWarn(`[opencode-swarm] Unknown gates config section "gates.${key}" ignored. Other config sections remain active.`);
361
372
  delete cleanedGates[key];
362
373
  strippedKeys.push(`gates.${key}`);
363
374
  continue;
@@ -369,7 +380,7 @@ function sanitizeGatesConfig(raw) {
369
380
  const knownFieldSet = new Set(knownFields);
370
381
  for (const fieldName of Object.keys(cleanedSection)) {
371
382
  if (!knownFieldSet.has(fieldName)) {
372
- advisoryWarn(`[opencode-swarm] Unknown gates config key "gates.${key}.${fieldName}" ignored. Other config sections remain active.`);
383
+ gatesAdvisoryWarn(`[opencode-swarm] Unknown gates config key "gates.${key}.${fieldName}" ignored. Other config sections remain active.`);
373
384
  delete cleanedSection[fieldName];
374
385
  strippedKeys.push(`gates.${key}.${fieldName}`);
375
386
  }
@@ -379,7 +390,7 @@ function sanitizeGatesConfig(raw) {
379
390
  }
380
391
  const sectionResult = schema.safeParse(sectionValue);
381
392
  if (!sectionResult.success) {
382
- advisoryWarn(`[opencode-swarm] gates.${key} config validation failed; that gate section will use defaults and other config sections remain active:`, formatZodIssues(sectionResult.error));
393
+ gatesAdvisoryWarn(`[opencode-swarm] gates.${key} config validation failed; that gate section will use defaults and other config sections remain active:`, formatZodIssues(sectionResult.error));
383
394
  delete cleanedGates[key];
384
395
  if (!strippedKeys.includes(`gates.${key}`)) {
385
396
  strippedKeys.push(`gates.${key}`);
@@ -390,10 +401,11 @@ function sanitizeGatesConfig(raw) {
390
401
  if (gatesResult.success) {
391
402
  return {
392
403
  result: { ...raw, gates: gatesResult.data },
393
- strippedKeys
404
+ strippedKeys,
405
+ rawGates: cleanedGates
394
406
  };
395
407
  }
396
- advisoryWarn("[opencode-swarm] gates config validation failed after section cleanup; quality gates will use defaults and other config sections remain active:", formatZodIssues(gatesResult.error));
408
+ gatesAdvisoryWarn("[opencode-swarm] gates config validation failed after section cleanup; quality gates will use defaults and other config sections remain active:", formatZodIssues(gatesResult.error));
397
409
  const cleaned = { ...raw };
398
410
  delete cleaned.gates;
399
411
  if (!strippedKeys.includes("gates")) {
@@ -403,8 +415,16 @@ function sanitizeGatesConfig(raw) {
403
415
  }
404
416
  function sanitizeSectionConfigs(raw) {
405
417
  const { result: afterExternal, strippedKeys: externalStripped } = sanitizeExternalSkillsConfig(raw);
406
- const { result, strippedKeys: gatesStripped } = sanitizeGatesConfig(afterExternal);
407
- return { result, strippedKeys: [...externalStripped, ...gatesStripped] };
418
+ const {
419
+ result,
420
+ strippedKeys: gatesStripped,
421
+ rawGates
422
+ } = sanitizeGatesConfig(afterExternal);
423
+ return {
424
+ result,
425
+ strippedKeys: [...externalStripped, ...gatesStripped],
426
+ rawGates
427
+ };
408
428
  }
409
429
  function formatZodIssues(error) {
410
430
  if (error.issues.length === 0)
@@ -491,7 +511,11 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
491
511
  mergedRaw = { ...mergedRaw, full_auto: { ...fa, locked: true } };
492
512
  }
493
513
  mergedRaw = migratePresetsConfig(mergedRaw);
494
- const { result: sanitized, strippedKeys: gatesStripped } = sanitizeSectionConfigs(mergedRaw);
514
+ const {
515
+ result: sanitized,
516
+ strippedKeys: gatesStripped,
517
+ rawGates
518
+ } = sanitizeSectionConfigs(mergedRaw);
495
519
  mergedRaw = sanitized;
496
520
  const knownTopLevel = new Set(Object.keys(PluginConfigSchema.shape));
497
521
  const unknownTopLevel = Object.keys(mergedRaw).filter((key) => !knownTopLevel.has(key));
@@ -515,14 +539,16 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
515
539
  config,
516
540
  recovery: "guardrails_defaults",
517
541
  removedKeys: [...gatesStripped],
518
- warnings: []
542
+ warnings: [],
543
+ rawGates
519
544
  };
520
545
  }
521
546
  return {
522
547
  config,
523
548
  recovery: gatesStripped.length > 0 ? "stripped_keys" : "none",
524
549
  removedKeys: [...gatesStripped],
525
- warnings: []
550
+ warnings: [],
551
+ rawGates
526
552
  };
527
553
  }
528
554
  const { cleaned, removed } = stripUnrecognizedKeys(mergedRaw, firstResult.error);
@@ -534,12 +560,17 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
534
560
  config: secure(recovered.data),
535
561
  recovery: "stripped_keys",
536
562
  removedKeys: [...gatesStripped, ...removed],
537
- warnings: []
563
+ warnings: [],
564
+ rawGates
538
565
  };
539
566
  }
540
567
  }
541
568
  if (rawUserConfig) {
542
- const { result: userSanitized, strippedKeys: userGatesStripped } = sanitizeSectionConfigs(rawUserConfig);
569
+ const {
570
+ result: userSanitized,
571
+ strippedKeys: userGatesStripped,
572
+ rawGates: userRawGates
573
+ } = sanitizeSectionConfigs(rawUserConfig);
543
574
  const userParseResult = PluginConfigSchema.safeParse(userSanitized);
544
575
  if (userParseResult.success) {
545
576
  advisoryWarn("[opencode-swarm] Project config ignored due to validation errors. Using user config.");
@@ -549,7 +580,8 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
549
580
  removedKeys: [...gatesStripped, ...userGatesStripped],
550
581
  warnings: [
551
582
  "Project config ignored due to validation errors; using user config."
552
- ]
583
+ ],
584
+ rawGates: userRawGates
553
585
  };
554
586
  }
555
587
  const userStripped = stripUnrecognizedKeys(userSanitized, userParseResult.error);
@@ -567,7 +599,8 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
567
599
  ],
568
600
  warnings: [
569
601
  "Project config ignored due to validation errors; using user config."
570
- ]
602
+ ],
603
+ rawGates: userRawGates
571
604
  };
572
605
  }
573
606
  }
@@ -595,7 +628,8 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
595
628
  config: secure(secureParse.data),
596
629
  recovery: "sanitized_values",
597
630
  removedKeys,
598
- warnings: []
631
+ warnings: [],
632
+ rawGates
599
633
  };
600
634
  }
601
635
  }
@@ -633,16 +667,29 @@ function loadPluginConfigWithMeta(directory) {
633
667
  const projectResult = loadRawConfigFromPath(projectConfigPath);
634
668
  const loadedFromFile = userResult.fileExisted || projectResult.fileExisted;
635
669
  const configHadErrors = userResult.hadError || projectResult.hadError;
636
- const { config, recovery, removedKeys, warnings } = buildConfigWithMeta(userResult.config, projectResult.config, loadedFromFile, configHadErrors);
670
+ const { config, recovery, removedKeys, warnings, rawGates } = buildConfigWithMeta(userResult.config, projectResult.config, loadedFromFile, configHadErrors);
637
671
  return {
638
672
  config,
639
673
  loadedFromFile,
640
674
  configHadErrors,
641
675
  recovery,
642
676
  removedKeys,
643
- warnings
677
+ warnings,
678
+ rawGates
644
679
  };
645
680
  }
681
+ function loadGateOverrides(directory) {
682
+ try {
683
+ const meta = loadPluginConfigWithMeta(directory);
684
+ return meta.rawGates;
685
+ } catch {
686
+ return;
687
+ }
688
+ }
689
+ function resetConfigAdvisoryDedup() {
690
+ gatesAdvisorySignatures.clear();
691
+ lastUnknownTopLevelSig = null;
692
+ }
646
693
  function getSafeDefaultConfigLoadResult() {
647
694
  const { config, recovery, removedKeys, warnings } = buildConfigWithMeta(null, null, false, false);
648
695
  return {
@@ -701,14 +748,15 @@ async function loadPluginConfigWithMetaAsync(directory) {
701
748
  ]);
702
749
  const loadedFromFile = userResult.fileExisted || projectResult.fileExisted;
703
750
  const configHadErrors = userResult.hadError || projectResult.hadError;
704
- const { config, recovery, removedKeys, warnings } = buildConfigWithMeta(userResult.config, projectResult.config, loadedFromFile, configHadErrors);
751
+ const { config, recovery, removedKeys, warnings, rawGates } = buildConfigWithMeta(userResult.config, projectResult.config, loadedFromFile, configHadErrors);
705
752
  return {
706
753
  config,
707
754
  loadedFromFile,
708
755
  configHadErrors,
709
756
  recovery,
710
757
  removedKeys,
711
- warnings
758
+ warnings,
759
+ rawGates
712
760
  };
713
761
  }
714
762
  function loadAgentPrompt(agentName) {
@@ -732,7 +780,7 @@ function loadAgentPrompt(agentName) {
732
780
  }
733
781
  return result;
734
782
  }
735
- var CONFIG_FILENAME = "opencode-swarm.json", PROMPTS_DIR_NAME = "opencode-swarm", MAX_CONFIG_FILE_BYTES = 102400, lastUnknownTopLevelSig = null, _internals;
783
+ 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;
736
784
  var init_loader = __esm(() => {
737
785
  init_warning_buffer();
738
786
  init_git_executable();
@@ -740,9 +788,13 @@ var init_loader = __esm(() => {
740
788
  init_schema();
741
789
  init_merge();
742
790
  init_merge();
791
+ gatesAdvisorySignatures = new Set;
743
792
  _internals = {
744
793
  resetUnknownTopLevelKeyWarning() {
745
794
  lastUnknownTopLevelSig = null;
795
+ },
796
+ resetGatesAdvisoryDedup() {
797
+ gatesAdvisorySignatures.clear();
746
798
  }
747
799
  };
748
800
  });
@@ -812,4 +864,4 @@ var PlanSchema = exports_external.object({
812
864
  execution_profile: ExecutionProfileSchema.optional()
813
865
  });
814
866
 
815
- export { ExecutionProfileSchema, TaskStatusSchema, TaskSizeSchema, PhaseStatusSchema, MigrationStatusSchema, TaskSchema, PhaseSchema, PlanSchema, loadPluginConfig, loadPluginConfigWithMeta, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader };
867
+ export { ExecutionProfileSchema, TaskStatusSchema, TaskSizeSchema, PhaseStatusSchema, MigrationStatusSchema, TaskSchema, PhaseSchema, PlanSchema, loadPluginConfig, loadPluginConfigWithMeta, loadGateOverrides, resetConfigAdvisoryDedup, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-fc153g7b.js";
5
+ } from "./index-rc6hec4j.js";
6
6
  import {
7
7
  withTimeoutSignal
8
8
  } from "./index-q7sjgr1y.js";
@@ -12,11 +12,11 @@ import {
12
12
  resolveHiveKnowledgePath,
13
13
  resolveSwarmKnowledgePath,
14
14
  transactKnowledge
15
- } from "./index-0e34njnm.js";
15
+ } from "./index-q0gtgwyr.js";
16
16
  import {
17
17
  effectiveRetrievalOutcomes,
18
18
  readAuthoritativeKnowledgeCounterRollups
19
- } from "./index-95hhrw1d.js";
19
+ } from "./index-0trtcm9n.js";
20
20
  import {
21
21
  advisoryWarn,
22
22
  init_warning_buffer
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  atomicWriteFileAnyRoot,
30
30
  atomicWriteSwarmFile
31
- } from "./index-f9nfknjg.js";
31
+ } from "./index-tfa2p4y4.js";
32
32
  import {
33
33
  init_logger,
34
34
  log,
@@ -2,23 +2,23 @@
2
2
  import {
3
3
  computePlanStructureHash,
4
4
  derivePlanId
5
- } from "./index-yhpbcrdk.js";
5
+ } from "./index-xm7dc14y.js";
6
6
  import {
7
7
  appendCoreEventSync
8
- } from "./index-0145kpjr.js";
8
+ } from "./index-50s9q4c1.js";
9
9
  import {
10
10
  unsafePathTextReason
11
11
  } from "./index-556ja8an.js";
12
12
  import {
13
13
  PlanSchema
14
- } from "./index-4wneygfx.js";
14
+ } from "./index-553veay1.js";
15
15
  import {
16
16
  assertProjectRoot
17
- } from "./index-yep24wn4.js";
17
+ } from "./index-fxxja498.js";
18
18
  import {
19
19
  atomicWriteSwarmFile,
20
20
  atomicWriteSwarmFileSync
21
- } from "./index-f9nfknjg.js";
21
+ } from "./index-tfa2p4y4.js";
22
22
  import {
23
23
  require_proper_lockfile
24
24
  } from "./index-7g4c7s5r.js";
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-0e34njnm.js";
5
+ } from "./index-q0gtgwyr.js";
6
6
  import {
7
7
  init_git_executable,
8
8
  resolveGitExecutableAsync
9
9
  } from "./index-9e6fdz2h.js";
10
10
  import {
11
11
  resolveKnowledgeStoreDir
12
- } from "./index-5d7bzpfn.js";
12
+ } from "./index-25z5qwkk.js";
13
13
  import {
14
14
  init_knowledge_types,
15
15
  isActiveStatus
@@ -4,7 +4,7 @@ import {
4
4
  readShellAuditTail,
5
5
  redactPath,
6
6
  redactShellCommand
7
- } from "./index-8t11vcf5.js";
7
+ } from "./index-ea7sehgy.js";
8
8
 
9
9
  // src/services/guardrail-log-service.ts
10
10
  var BLOCK_TYPES = new Set([
@@ -11,16 +11,16 @@ import {
11
11
  import {
12
12
  init_schema,
13
13
  stripKnownSwarmPrefix
14
- } from "./index-84qah5h6.js";
14
+ } from "./index-yrsag0vs.js";
15
15
  import {
16
16
  observeStoreHealth
17
- } from "./index-ac39znep.js";
17
+ } from "./index-164m995b.js";
18
18
  import {
19
19
  init_constants
20
20
  } from "./index-m1nrd3yd.js";
21
21
  import {
22
22
  telemetry
23
- } from "./index-bzd67m2j.js";
23
+ } from "./index-1dz8hv7p.js";
24
24
  import {
25
25
  init_logger,
26
26
  warn
@@ -4,17 +4,17 @@ import {
4
4
  } from "./index-ddszzne4.js";
5
5
  import {
6
6
  validateSwarmPath
7
- } from "./index-v56mhyhs.js";
7
+ } from "./index-rz87mx1c.js";
8
8
  import {
9
9
  bunWrite
10
10
  } from "./index-r3mvsbtq.js";
11
11
  import {
12
12
  observeDelegationLedgerPressure
13
- } from "./index-ac39znep.js";
13
+ } from "./index-164m995b.js";
14
14
  import {
15
15
  EvidenceLockTimeoutError,
16
16
  withEvidenceLock
17
- } from "./index-yep24wn4.js";
17
+ } from "./index-fxxja498.js";
18
18
  import {
19
19
  exports_external,
20
20
  init_zod
@@ -3947,7 +3947,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
3947
3947
  const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
3948
3948
  if (candidates.length === 0)
3949
3949
  return 0;
3950
- const { transferCoderSettlementToBackground } = await import("./coder-settlement-m918n7qj.js");
3950
+ const { transferCoderSettlementToBackground } = await import("./coder-settlement-x9wbqx46.js");
3951
3951
  let transferred = 0;
3952
3952
  for (const record of candidates) {
3953
3953
  try {
@@ -5,7 +5,7 @@ import {
5
5
  } from "./index-3f7hqtgg.js";
6
6
  import {
7
7
  removeWorktreeProvisioningOwner
8
- } from "./index-qbr05tbw.js";
8
+ } from "./index-xj4kbtdw.js";
9
9
  import {
10
10
  SOURCE_WORKTREE_GONE_STAGE,
11
11
  getTaskWorkflowSnapshot,
@@ -13,19 +13,19 @@ import {
13
13
  reconcileLandedMerge,
14
14
  withTaskEvidenceTransaction,
15
15
  writeWorkflowWalFile
16
- } from "./index-jwc2v92w.js";
16
+ } from "./index-wbnyc50b.js";
17
17
  import {
18
18
  canonicalRootKeyFresh
19
19
  } from "./index-ddszzne4.js";
20
20
  import {
21
21
  appendCoreEventSync
22
- } from "./index-0145kpjr.js";
22
+ } from "./index-50s9q4c1.js";
23
23
  import {
24
24
  isPathWithinDeclaredScope
25
25
  } from "./index-556ja8an.js";
26
26
  import {
27
27
  validateSwarmPath
28
- } from "./index-v56mhyhs.js";
28
+ } from "./index-rz87mx1c.js";
29
29
  import {
30
30
  init_git_executable,
31
31
  resolveGitExecutable
@@ -36,7 +36,7 @@ import {
36
36
  } from "./index-4rhhvd1a.js";
37
37
  import {
38
38
  tryAcquireLock
39
- } from "./index-yep24wn4.js";
39
+ } from "./index-fxxja498.js";
40
40
  import {
41
41
  criticalWarn,
42
42
  init_logger
@@ -478,7 +478,7 @@ async function cleanupRecoveredWorktree(directory, descriptor) {
478
478
  awaitingMergeByCallID,
479
479
  cleanupStandardWorktreeForCallId,
480
480
  standardWorktreeByCallID
481
- } = await import("./worktree-isolation-e6tym281.js");
481
+ } = await import("./worktree-isolation-qcwt09ve.js");
482
482
  standardWorktreeByCallID.delete(descriptor.callID);
483
483
  if (hasResidue)
484
484
  awaitingMergeByCallID.set(descriptor.callID, {
@@ -602,7 +602,7 @@ async function recoverCoderSettlement(directory, taskId) {
602
602
  awaitingMergeByCallID,
603
603
  finishStandardWorktreeDispatch,
604
604
  standardWorktreeByCallID
605
- } = await import("./worktree-isolation-e6tym281.js");
605
+ } = await import("./worktree-isolation-qcwt09ve.js");
606
606
  const descriptor = wal.worktree;
607
607
  const reconstructedDispatch = {
608
608
  callID: descriptor.callID,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  emit
4
- } from "./index-bzd67m2j.js";
4
+ } from "./index-1dz8hv7p.js";
5
5
  import {
6
6
  require_proper_lockfile
7
7
  } from "./index-7g4c7s5r.js";
@@ -7,7 +7,7 @@ import {
7
7
  readLinkPointer,
8
8
  resolveKnowledgeStoreDir,
9
9
  resolveLinkDir
10
- } from "./index-5d7bzpfn.js";
10
+ } from "./index-25z5qwkk.js";
11
11
 
12
12
  // src/knowledge/curation-policy.ts
13
13
  import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
@@ -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-pwqshfyr.js");
95
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-mbwt4grd.js");
96
96
  return realWrite(directory, taskId, files);
97
97
  },
98
98
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -3,14 +3,14 @@ import {
3
3
  EvaluationRunV1Schema,
4
4
  GateAuditResultV1Schema,
5
5
  getProtectedEvaluationRunIds
6
- } from "./index-w5jpjaqe.js";
6
+ } from "./index-4krjn1gn.js";
7
7
  import {
8
8
  DURABILITY_CLASSES,
9
9
  getProjectDb,
10
10
  projectDbExists,
11
11
  readEffectiveSpecSync,
12
12
  withDurabilityClass
13
- } from "./index-hcn69kp0.js";
13
+ } from "./index-0zbze3n6.js";
14
14
  import {
15
15
  getWorktreeMergeFailure
16
16
  } from "./index-zsrtt42s.js";
@@ -24,12 +24,12 @@ import {
24
24
  readTaskEvidence,
25
25
  readTaskEvidenceRaw,
26
26
  sanitizeTaskId
27
- } from "./index-jwc2v92w.js";
27
+ } from "./index-wbnyc50b.js";
28
28
  import {
29
29
  LedgerStaleWriterError,
30
30
  appendLedgerEvent,
31
31
  computeCurrentPlanHash,
32
- computePlanHash,
32
+ computePlanLedgerHash,
33
33
  derivePlanId,
34
34
  derivePlanIdentityHash,
35
35
  getLatestLedgerSeq,
@@ -44,10 +44,10 @@ import {
44
44
  replayFromLedgerWithStatus,
45
45
  takeSnapshotEvent,
46
46
  takeSnapshotWithRetry
47
- } from "./index-yhpbcrdk.js";
47
+ } from "./index-xm7dc14y.js";
48
48
  import {
49
49
  appendCoreEventSync
50
- } from "./index-0145kpjr.js";
50
+ } from "./index-50s9q4c1.js";
51
51
  import {
52
52
  init_executor,
53
53
  isUntrustedEnvKey,
@@ -63,7 +63,7 @@ import {
63
63
  estimateTokens,
64
64
  readSwarmFileAsync,
65
65
  validateSwarmPath
66
- } from "./index-v56mhyhs.js";
66
+ } from "./index-rz87mx1c.js";
67
67
  import {
68
68
  bunHash,
69
69
  bunWrite,
@@ -71,7 +71,7 @@ import {
71
71
  } from "./index-r3mvsbtq.js";
72
72
  import {
73
73
  PlanSchema
74
- } from "./index-4wneygfx.js";
74
+ } from "./index-553veay1.js";
75
75
  import {
76
76
  GIT_BINARY_ENV_VAR,
77
77
  describeGitResolution,
@@ -82,14 +82,14 @@ import {
82
82
  assertProjectRoot,
83
83
  tryAcquireLock,
84
84
  withEvidenceLock
85
- } from "./index-yep24wn4.js";
85
+ } from "./index-fxxja498.js";
86
86
  import {
87
87
  invalidateCachedArtifact,
88
88
  readCachedParsedFile
89
- } from "./index-f9nfknjg.js";
89
+ } from "./index-tfa2p4y4.js";
90
90
  import {
91
91
  emit
92
- } from "./index-bzd67m2j.js";
92
+ } from "./index-1dz8hv7p.js";
93
93
  import {
94
94
  ZodError,
95
95
  init_zod
@@ -1979,7 +1979,7 @@ async function surfaceLedgerStaleIfPersisted(directory, plan) {
1979
1979
  return plan;
1980
1980
  }
1981
1981
  try {
1982
- const planHash = computePlanHash(plan);
1982
+ const planHash = computePlanLedgerHash(plan);
1983
1983
  const ledgerHash = await getLatestLedgerHash(directory);
1984
1984
  if (ledgerHash !== "" && planHash === ledgerHash) {
1985
1985
  ledgerStaleWorkspaces.delete(resolvedWorkspace);
@@ -2092,7 +2092,7 @@ async function loadPlan(directory, cache) {
2092
2092
  }
2093
2093
  }
2094
2094
  if (await ledgerExists(directory)) {
2095
- const planHash = computePlanHash(validated);
2095
+ const planHash = computePlanLedgerHash(validated);
2096
2096
  const ledgerHash = await getLatestLedgerHash(directory);
2097
2097
  const resolvedWorkspace = path5.resolve(directory);
2098
2098
  if (!startupLedgerCheckedWorkspaces.has(resolvedWorkspace)) {
@@ -2387,7 +2387,7 @@ async function savePlan(directory, plan, options) {
2387
2387
  derivePhaseStatusesInPlace(validated);
2388
2388
  const currentPlan = await _internals6.loadPlanJsonOnly(directory);
2389
2389
  const planId = derivePlanId(validated);
2390
- const planHashForInit = computePlanHash(validated);
2390
+ const planHashForInit = computePlanLedgerHash(validated);
2391
2391
  if (!await ledgerExists(directory)) {
2392
2392
  try {
2393
2393
  options?.preCommitCheck?.();
@@ -2499,7 +2499,7 @@ async function savePlan(directory, plan, options) {
2499
2499
  });
2500
2500
  } else {
2501
2501
  await takeSnapshotEvent(directory, validated, {
2502
- planHashAfter: computePlanHash(validated),
2502
+ planHashAfter: computePlanLedgerHash(validated),
2503
2503
  source: "save_plan_stale_projection_reconcile",
2504
2504
  expectedSeq: expected.expectedSeq,
2505
2505
  expectedLedgerHash: expected.expectedLedgerHash
@@ -2513,7 +2513,7 @@ async function savePlan(directory, plan, options) {
2513
2513
  }
2514
2514
  }
2515
2515
  const currentHash = computeCurrentPlanHash(directory);
2516
- const hashAfter = computePlanHash(validated);
2516
+ const hashAfter = computePlanLedgerHash(validated);
2517
2517
  if (currentPlan) {
2518
2518
  const oldTaskMap = new Map;
2519
2519
  for (const phase of currentPlan.phases) {
@@ -2635,10 +2635,10 @@ async function savePlan(directory, plan, options) {
2635
2635
  const ledgerStatusTaskIds = collectLedgerStatusTaskIds(await readLedgerEvents(directory));
2636
2636
  const replayedBeforeProjection = await replayFromLedger(directory);
2637
2637
  const projectionCandidate = replayedBeforeProjection ? mergeStatusesTakingPrecedence(validated, replayedBeforeProjection, ledgerStatusTaskIds) : validated;
2638
- if (replayedBeforeProjection && computePlanHash(replayedBeforeProjection) !== computePlanHash(projectionCandidate)) {
2638
+ if (replayedBeforeProjection && computePlanLedgerHash(replayedBeforeProjection) !== computePlanLedgerHash(projectionCandidate)) {
2639
2639
  options?.preCommitCheck?.();
2640
2640
  await takeSnapshotEvent(directory, projectionCandidate, {
2641
- planHashAfter: computePlanHash(projectionCandidate),
2641
+ planHashAfter: computePlanLedgerHash(projectionCandidate),
2642
2642
  source: "savePlan_structural_projection"
2643
2643
  });
2644
2644
  }
@@ -2647,7 +2647,7 @@ async function savePlan(directory, plan, options) {
2647
2647
  const latestSeq = await getLatestLedgerSeq(directory);
2648
2648
  if (!options?.preCommitCheck && latestSeq > 0 && latestSeq % SNAPSHOT_INTERVAL === 0) {
2649
2649
  await takeSnapshotWithRetry(directory, projectedPlan, {
2650
- planHashAfter: computePlanHash(projectedPlan),
2650
+ planHashAfter: computePlanLedgerHash(projectedPlan),
2651
2651
  source: "savePlan_manager"
2652
2652
  });
2653
2653
  }
@@ -2803,7 +2803,7 @@ ${markdown}`;
2803
2803
  }
2804
2804
  try {
2805
2805
  const planId = derivePlanId(targetPlan);
2806
- const planHashAfter = computePlanHash(targetPlan);
2806
+ const planHashAfter = computePlanLedgerHash(targetPlan);
2807
2807
  await appendLedgerEvent(directory, {
2808
2808
  event_type: "plan_rebuilt",
2809
2809
  source: "rebuildPlan",
@@ -2821,7 +2821,7 @@ async function closePlanTerminalState(directory, plan, options) {
2821
2821
  assertProjectRoot(directory);
2822
2822
  const planId = derivePlanId(plan);
2823
2823
  const validated = PlanSchema.parse(plan);
2824
- const hashAfter = computePlanHash(validated);
2824
+ const hashAfter = computePlanLedgerHash(validated);
2825
2825
  for (const taskId of options.closedTaskIds) {
2826
2826
  let taskPhaseId;
2827
2827
  for (const phase of validated.phases) {