opencode-swarm 7.165.0 → 7.166.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/background/delegation-cost-identity.d.ts +41 -0
  4. package/dist/background/delegation-lifecycle.d.ts +24 -5
  5. package/dist/background/pending-delegations.d.ts +2 -0
  6. package/dist/background/pr-monitor-worker.d.ts +60 -6
  7. package/dist/background/pr-subscriptions.d.ts +13 -0
  8. package/dist/cli/{capability-probe-5wa7mcp6.js → capability-probe-faqefhah.js} +2 -1
  9. package/dist/cli/{coder-settlement-89nt4j7g.js → coder-settlement-x0h3h6vd.js} +13 -13
  10. package/dist/cli/{config-doctor-gm6f5chm.js → config-doctor-pjcjeh8f.js} +5 -5
  11. package/dist/cli/{core-91p43zwj.js → core-v11pd1yk.js} +4 -4
  12. package/dist/cli/{curation-policy-bqpmry2n.js → curation-policy-jtzwz6bc.js} +4 -4
  13. package/dist/cli/{curator-drift-hbc3w5zj.js → curator-drift-jpdfwae9.js} +5 -5
  14. package/dist/cli/curator-llm-factory-da5q3gg6.js +70 -0
  15. package/dist/cli/{curator-4bs2hmy9.js → curator-ssvd7evd.js} +40 -40
  16. package/dist/cli/{dispatch-c7xjt7js.js → dispatch-591v13pp.js} +3 -3
  17. package/dist/cli/{evidence-summary-service-g1xd8egd.js → evidence-summary-service-mw6tnsp9.js} +19 -19
  18. package/dist/cli/{gate-evidence-gdmgsz7c.js → gate-evidence-jymaxb82.js} +9 -9
  19. package/dist/cli/guardrail-explain-eva1yrtf.js +71 -0
  20. package/dist/cli/guardrail-log-kzq2sktb.js +23 -0
  21. package/dist/cli/{guardrail-reset-rp9jq0gj.js → guardrail-reset-ea1g3g7d.js} +40 -40
  22. package/dist/cli/hive-promoter-ghjbgsms.js +85 -0
  23. package/dist/cli/{index-6be5caj8.js → index-066xxa4q.js} +3 -3
  24. package/dist/cli/{index-5ythtd9t.js → index-0g5v4s0x.js} +67 -16
  25. package/dist/cli/{index-a0d4fp6r.js → index-0tc0pcmh.js} +1 -1
  26. package/dist/cli/{index-n3pjcks8.js → index-13egyjgv.js} +5 -5
  27. package/dist/cli/{index-tqw8w2n5.js → index-17yszqs5.js} +1 -1
  28. package/dist/cli/{index-8bdk7124.js → index-1zqf2pny.js} +1 -1
  29. package/dist/cli/{index-8d90gzaz.js → index-2sqgbmtq.js} +1 -1
  30. package/dist/cli/{index-xwbn7c8m.js → index-2v17wb75.js} +2 -2
  31. package/dist/cli/{index-y1zhpfk8.js → index-2y4kargd.js} +4 -4
  32. package/dist/cli/{index-hwz46jj7.js → index-399nq780.js} +2509 -1094
  33. package/dist/cli/{index-r5hj3nfe.js → index-3tyym20r.js} +2 -2
  34. package/dist/cli/{index-zycp24b9.js → index-52xdezsh.js} +12 -3
  35. package/dist/cli/{index-2k53pfnc.js → index-6rff2h8x.js} +4 -4
  36. package/dist/cli/{index-6m24v15v.js → index-79sr3fd1.js} +2 -2
  37. package/dist/cli/{index-k1ntjzmf.js → index-8fr2wn18.js} +2 -2
  38. package/dist/cli/{index-dh5th4jn.js → index-8hqkrd2j.js} +1 -1
  39. package/dist/cli/{index-6rx1rdaq.js → index-a7rw4g4s.js} +1 -1
  40. package/dist/cli/{index-w6988bbc.js → index-aftapk6j.js} +75 -1
  41. package/dist/cli/{index-j2svfhzk.js → index-axf65x87.js} +1 -1
  42. package/dist/cli/{index-anxs69ad.js → index-bfr392e7.js} +1 -1
  43. package/dist/cli/{index-c4ddtrqg.js → index-bkd3450m.js} +6 -6
  44. package/dist/cli/{index-ajknebrc.js → index-c20gf089.js} +1 -1
  45. package/dist/cli/{index-qzvry1n1.js → index-crjx4sx0.js} +42 -42
  46. package/dist/cli/{index-jre6tm3v.js → index-edm41q4j.js} +1 -1
  47. package/dist/cli/{index-z6xqpmqg.js → index-ee6ydtfe.js} +1 -1
  48. package/dist/cli/{index-p7hdp3rp.js → index-fc1dqzjp.js} +2 -2
  49. package/dist/cli/{index-4gmt79q9.js → index-gerkwyrr.js} +1 -1
  50. package/dist/cli/{index-hdakb4n9.js → index-gr8ppbq3.js} +16 -13
  51. package/dist/cli/{index-f36hy1x4.js → index-hvk3zs62.js} +1 -1
  52. package/dist/cli/{index-5ebgzb5a.js → index-hwj25q9r.js} +78 -53
  53. package/dist/cli/{index-1v6vc90w.js → index-j29nkq5d.js} +5 -5
  54. package/dist/cli/{index-e45htt92.js → index-jx9f4ke1.js} +1 -1
  55. package/dist/cli/{index-7h94rfem.js → index-k5w284js.js} +16 -14
  56. package/dist/cli/{index-58be2gtd.js → index-nph5g4em.js} +3 -3
  57. package/dist/cli/{index-4fwbbad3.js → index-q1r1cfww.js} +46 -17
  58. package/dist/cli/{index-afpkqsdb.js → index-w11whwn3.js} +14 -7
  59. package/dist/cli/{index-0e9jh9c7.js → index-wf12wckd.js} +3 -3
  60. package/dist/cli/{index-ptsqnxwd.js → index-xezfx7ge.js} +21 -11
  61. package/dist/cli/{index-3xyjvx24.js → index-xwkn5hse.js} +11 -9
  62. package/dist/cli/{index-g8wdekzz.js → index-ybcxvv17.js} +2 -2
  63. package/dist/cli/{index-e6n7cemz.js → index-yt25kpvz.js} +12 -8
  64. package/dist/cli/{index-556ja8an.js → index-yzjaj53h.js} +9 -2
  65. package/dist/cli/{index-gn6ybsc4.js → index-zha9bdj9.js} +8 -8
  66. package/dist/cli/index-zpsr8rpc.js +68 -0
  67. package/dist/cli/index.js +40 -40
  68. package/dist/cli/{knowledge-escalator-eq07pcj3.js → knowledge-escalator-3pjed4tq.js} +14 -14
  69. package/dist/cli/{knowledge-events-rv9q9mkm.js → knowledge-events-a5dwkg30.js} +12 -12
  70. package/dist/cli/{knowledge-link-dgvbqjqg.js → knowledge-link-1zykfk1p.js} +3 -3
  71. package/dist/cli/{knowledge-store-cxcr0ttk.js → knowledge-store-h85efsak.js} +4 -4
  72. package/dist/cli/{knowledge-validator-8qtd9ys0.js → knowledge-validator-76qrf1ev.js} +6 -6
  73. package/dist/cli/{model-preflight-3s1c0zpc.js → model-preflight-b3b5pgsc.js} +2 -2
  74. package/dist/cli/{pending-delegations-dp3g8e7k.js → pending-delegations-zgwfqfac.js} +14 -12
  75. package/dist/cli/{pr-subscriptions-3vx06rar.js → pr-subscriptions-fzy3ks1k.js} +16 -12
  76. package/dist/cli/{pr-workflow-gate-bbet0apk.js → pr-workflow-gate-1gtsn7f0.js} +40 -40
  77. package/dist/cli/{runner-0e3bjeev.js → runner-j3acybhs.js} +4 -4
  78. package/dist/cli/{scan-cursor-zwm0xng7.js → scan-cursor-ahwkxa8j.js} +5 -5
  79. package/dist/cli/{schema-ebfxgya0.js → schema-27sedbfk.js} +3 -3
  80. package/dist/cli/{scope-persistence-6c55akfz.js → scope-persistence-q792yfxh.js} +16 -16
  81. package/dist/cli/{skill-generator-mv5jxzsh.js → skill-generator-g8wbjw6v.js} +16 -16
  82. package/dist/cli/{snapshot-coordination-init-n556wa18.js → snapshot-coordination-init-y6spakwm.js} +40 -40
  83. package/dist/cli/{telemetry-a1yvjerj.js → telemetry-9h1z2w9d.js} +1 -1
  84. package/dist/cli/{worktree-collision-ownership-pp4z4z8p.js → worktree-collision-ownership-pmpnftkd.js} +13 -13
  85. package/dist/cli/{worktree-isolation-69hz9dgg.js → worktree-isolation-4053n0px.js} +40 -40
  86. package/dist/commands/pr-monitor-status.d.ts +2 -0
  87. package/dist/commands/registry.d.ts +8 -0
  88. package/dist/commands/report.d.ts +36 -0
  89. package/dist/db/observability-event-store.d.ts +162 -0
  90. package/dist/git/pr.d.ts +27 -27
  91. package/dist/git/safe-ref.d.ts +51 -0
  92. package/dist/hooks/context-capsule-inject.d.ts +3 -0
  93. package/dist/index.d.ts +6 -1
  94. package/dist/index.js +573 -480
  95. package/dist/observability/catalog.d.ts +8 -4
  96. package/dist/sandbox/executor.d.ts +10 -0
  97. package/dist/sandbox/win32/runner-client.d.ts +7 -0
  98. package/dist/services/context-attribution.d.ts +69 -0
  99. package/dist/services/cost-accounting.d.ts +2 -0
  100. package/dist/telemetry.d.ts +10 -2
  101. package/dist/tools/co-change-analyzer.d.ts +7 -0
  102. package/dist/tools/gh-evidence.d.ts +15 -8
  103. package/dist/tools/pkg-audit.d.ts +23 -0
  104. package/dist/utils/gh-executable.d.ts +106 -0
  105. package/dist/utils/merge.d.ts +26 -0
  106. package/opencode-swarm.schema.json +1 -1
  107. package/package.json +1 -1
  108. package/dist/cli/curator-llm-factory-fhbjwar0.js +0 -70
  109. package/dist/cli/guardrail-explain-1nfbtpgg.js +0 -71
  110. package/dist/cli/guardrail-log-nyggdv04.js +0 -23
  111. package/dist/cli/hive-promoter-39xb4tx2.js +0 -85
  112. package/dist/cli/index-zjygnfay.js +0 -33
@@ -1,5 +1,10 @@
1
1
  // @bun
2
2
  import {
3
+ init_path_identity,
4
+ sanitizeDiagnosticText
5
+ } from "./index-yzjaj53h.js";
6
+ import {
7
+ criticalWarn,
3
8
  init_logger,
4
9
  warn
5
10
  } from "./index-zgwm4ryv.js";
@@ -504,13 +509,14 @@ class WindowsSandboxExecutor {
504
509
  throw 'cmd.exe did not report an exit code';
505
510
  }
506
511
  exit [int]$childExitCode;`;
507
- const envOverrideBlock = envOverrideLines.length > 0 ? `
508
- ${envOverrideLines.join(`
509
- `)}` : "";
512
+ const envOverrideBlock = envOverrideLines.length > 0 ? `${envOverrideLines.join(`
513
+ `)}
514
+ ` : "";
510
515
  const psScript = `
511
516
  $ErrorActionPreference = 'Stop';
512
517
  $ProgressPreference = 'SilentlyContinue';
513
518
  try {
519
+ ${envOverrideBlock}
514
520
  $env:TEMP = '${escapedTemp}';
515
521
  $env:TMP = '${escapedTemp}';
516
522
 
@@ -529,7 +535,6 @@ try {
529
535
  Remove-Item Env:$v -Force -ErrorAction SilentlyContinue;
530
536
  }
531
537
  }
532
- ${envOverrideBlock}
533
538
 
534
539
  # Execute the command \u2014 PS-native cmdlets via Invoke-Expression, others via the standard command interpreter
535
540
  $commandBytes = [Convert]::FromBase64String('${commandBase64}');
@@ -598,6 +603,7 @@ __export(exports_runner_client, {
598
603
  buildDefaultPolicy: () => buildDefaultPolicy,
599
604
  _resetProbeCache: () => _resetProbeCache,
600
605
  _internals: () => _internals3,
606
+ RUNNER_PROTOCOL_SCHEMA_VERSION: () => RUNNER_PROTOCOL_SCHEMA_VERSION,
601
607
  RUNNER_EXIT_CODES: () => RUNNER_EXIT_CODES
602
608
  });
603
609
  import { spawn, spawnSync as spawnSync3 } from "child_process";
@@ -608,9 +614,11 @@ import { fileURLToPath } from "url";
608
614
  function findRunnerBinary() {
609
615
  const arch = process.arch === "x64" ? "x64" : "arm64";
610
616
  const platform = "win32";
617
+ const runtimeDir = _internals3.runtimeDir ?? _runtimeDir;
611
618
  const packagePaths = [
612
- path3.resolve(_runtimeDir, "..", "..", "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe"),
613
- path3.resolve(_runtimeDir, "..", "..", "..", "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe")
619
+ path3.resolve(runtimeDir, "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe"),
620
+ path3.resolve(runtimeDir, "..", "..", "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe"),
621
+ path3.resolve(runtimeDir, "..", "..", "..", "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe")
614
622
  ];
615
623
  for (const p of packagePaths) {
616
624
  try {
@@ -654,7 +662,7 @@ function probe() {
654
662
  capabilities: null,
655
663
  error: "runner binary not found"
656
664
  };
657
- warn("Sandbox runner binary not found \u2014 degrading to weak sandbox");
665
+ criticalWarn("[sandbox] swarm-sandbox-runner binary not found \u2014 native Windows sandbox unavailable; commands fall back to the weak PowerShell wrapper (or run unsandboxed in advisory mode). Run /swarm diagnose for details.");
658
666
  return _cachedProbe;
659
667
  }
660
668
  try {
@@ -672,7 +680,7 @@ function probe() {
672
680
  capabilities: null,
673
681
  error: `probe spawn error: ${result.error.code ?? result.error.message}`
674
682
  };
675
- warn(`Sandbox runner probe failed: ${_cachedProbe.error}`);
683
+ criticalWarn(`[sandbox] swarm-sandbox-runner probe failed (${_cachedProbe.error}) \u2014 degrading to weak sandbox. This covers wrong-arch and corrupt binaries; run /swarm diagnose for details.`);
676
684
  return _cachedProbe;
677
685
  }
678
686
  if (result.status !== 0) {
@@ -682,10 +690,21 @@ function probe() {
682
690
  capabilities: null,
683
691
  error: `probe exited with code ${result.status}`
684
692
  };
685
- warn(`Sandbox runner probe failed: ${_cachedProbe.error}`);
693
+ criticalWarn(`[sandbox] swarm-sandbox-runner probe failed (${_cachedProbe.error}) \u2014 degrading to weak sandbox. Run /swarm diagnose for details.`);
686
694
  return _cachedProbe;
687
695
  }
688
696
  const capabilities = JSON.parse(result.stdout?.trim() ?? "{}");
697
+ const reportedProtocol = typeof capabilities.protocol_schema_version === "number" ? capabilities.protocol_schema_version : null;
698
+ if (reportedProtocol !== RUNNER_PROTOCOL_SCHEMA_VERSION) {
699
+ _cachedProbe = {
700
+ available: false,
701
+ mode: "none",
702
+ capabilities,
703
+ error: `runner protocol mismatch (got ${reportedProtocol ?? "none"}, expected ${RUNNER_PROTOCOL_SCHEMA_VERSION})`
704
+ };
705
+ criticalWarn(`[sandbox] ${_cachedProbe.error} at ${path3.basename(binary)} \u2014 stale or foreign runner binary refused; degrading to weak sandbox. Run /swarm diagnose for details.`);
706
+ return _cachedProbe;
707
+ }
689
708
  let mode = "none";
690
709
  if (capabilities.app_container_available) {
691
710
  mode = "app-container";
@@ -706,7 +725,7 @@ function probe() {
706
725
  capabilities: null,
707
726
  error: `probe threw: ${msg}`
708
727
  };
709
- warn(`Sandbox runner probe threw: ${msg}`);
728
+ criticalWarn(`[sandbox] swarm-sandbox-runner probe threw (${sanitizeDiagnosticText(msg, 200)}) \u2014 degrading to weak sandbox. Run /swarm diagnose for details.`);
710
729
  return _cachedProbe;
711
730
  }
712
731
  }
@@ -806,6 +825,7 @@ function buildDefaultPolicy(workspaceRoot, runId) {
806
825
  HTTP_PROXY: "http://127.0.0.1:1",
807
826
  HTTPS_PROXY: "http://127.0.0.1:1"
808
827
  },
828
+ env_unsets: [],
809
829
  path_stubs: ["ssh.exe", "curl.exe", "wget.exe", "scp.exe", "sftp.exe"],
810
830
  private_desktop: true,
811
831
  deny_alternate_data_streams: true,
@@ -814,8 +834,9 @@ function buildDefaultPolicy(workspaceRoot, runId) {
814
834
  deny_symlink_egress: true
815
835
  };
816
836
  }
817
- var _runtimeDir, RUNNER_EXIT_CODES, _cachedProbe, _internals3;
837
+ var _runtimeDir, RUNNER_PROTOCOL_SCHEMA_VERSION = 1, RUNNER_EXIT_CODES, _cachedProbe, _internals3;
818
838
  var init_runner_client = __esm(() => {
839
+ init_path_identity();
819
840
  init_logger();
820
841
  _runtimeDir = fileURLToPath(new URL(".", import.meta.url));
821
842
  RUNNER_EXIT_CODES = {
@@ -831,7 +852,8 @@ var init_runner_client = __esm(() => {
831
852
  _internals3 = {
832
853
  findRunnerBinary,
833
854
  spawnRunner: spawnSync3,
834
- spawnAsync: spawn
855
+ spawnAsync: spawn,
856
+ runtimeDir: null
835
857
  };
836
858
  });
837
859
 
@@ -859,7 +881,7 @@ class NativeWindowsSandboxExecutor {
859
881
  } else if (this._fallbackExecutor.isAvailable()) {
860
882
  this._strength = "weak";
861
883
  this.mechanism = "powershell-wrapper";
862
- warn(`Native sandbox runner unavailable (${this._probeResult.error ?? "unknown"}); ` + "falling back to PowerShell environment restrictions (weak sandbox)");
884
+ criticalWarn(`[sandbox] native Windows sandbox runner unavailable (${sanitizeDiagnosticText(this._probeResult.error ?? "unknown", 200)}); falling back to PowerShell environment restrictions (weak sandbox). Run /swarm diagnose for details.`);
863
885
  } else {
864
886
  this._strength = "none";
865
887
  this.mechanism = "none";
@@ -876,13 +898,16 @@ class NativeWindowsSandboxExecutor {
876
898
  disable(reason) {
877
899
  this._disabled = true;
878
900
  this._disabledReason = reason;
879
- warn(`Sandbox disabled: ${reason}. Falling through to tool-layer enforcement.`);
901
+ criticalWarn(`[sandbox] Sandbox disabled: ${sanitizeDiagnosticText(reason, 200)}. Falling through to tool-layer enforcement. Run /swarm diagnose for details.`);
880
902
  }
881
903
  wrapCommand(command, scopePaths, tempDir, envOverrides, policy) {
882
904
  if (!this.isAvailable()) {
883
905
  throw new SandboxError("Sandbox not available", "SANDBOX_UNAVAILABLE");
884
906
  }
885
907
  if (this._strength === "strong") {
908
+ if (/["&|<>^%]/.test(command)) {
909
+ return this._fallbackExecutor.wrapCommand(command, scopePaths, tempDir, envOverrides);
910
+ }
886
911
  return this._wrapWithRunner(command, scopePaths, tempDir, envOverrides, policy);
887
912
  }
888
913
  return this._fallbackExecutor.wrapCommand(command, scopePaths, tempDir, envOverrides);
@@ -907,6 +932,9 @@ class NativeWindowsSandboxExecutor {
907
932
  continue;
908
933
  if (typeof value === "string") {
909
934
  policy.env_overrides[key] = value;
935
+ } else {
936
+ policy.env_unsets.push(key);
937
+ policy.env_allowlist = policy.env_allowlist.filter((allowed) => allowed.toUpperCase() !== key.toUpperCase());
910
938
  }
911
939
  }
912
940
  }
@@ -957,6 +985,7 @@ class NativeWindowsSandboxExecutor {
957
985
  }
958
986
  }
959
987
  var init_native_sandbox_executor = __esm(() => {
988
+ init_path_identity();
960
989
  init_logger();
961
990
  init_executor();
962
991
  init_restricted_environment_executor();
@@ -1007,7 +1036,7 @@ async function _createExecutor() {
1007
1036
  return null;
1008
1037
  }
1009
1038
  async function _createLinuxExecutor() {
1010
- const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isBubblewrapAvailable } = await import("./capability-probe-5wa7mcp6.js");
1039
+ const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isBubblewrapAvailable } = await import("./capability-probe-faqefhah.js");
1011
1040
  await new SandboxCapabilityProbe2().detect();
1012
1041
  if (!isBubblewrapAvailable()) {
1013
1042
  return null;
@@ -1027,7 +1056,7 @@ async function _createMacOSExecutor() {
1027
1056
  }
1028
1057
  return null;
1029
1058
  }
1030
- const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isSandboxExecAvailable } = await import("./capability-probe-5wa7mcp6.js");
1059
+ const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isSandboxExecAvailable } = await import("./capability-probe-faqefhah.js");
1031
1060
  await new SandboxCapabilityProbe2().detect();
1032
1061
  if (!isSandboxExecAvailable()) {
1033
1062
  return null;
@@ -1040,7 +1069,7 @@ async function _createMacOSExecutor() {
1040
1069
  }
1041
1070
  }
1042
1071
  async function _createWindowsExecutor() {
1043
- const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isWindowsSandboxAvailable } = await import("./capability-probe-5wa7mcp6.js");
1072
+ const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isWindowsSandboxAvailable } = await import("./capability-probe-faqefhah.js");
1044
1073
  await new SandboxCapabilityProbe2().detect();
1045
1074
  if (!isWindowsSandboxAvailable()) {
1046
1075
  return null;
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-anxs69ad.js";
4
+ } from "./index-bfr392e7.js";
5
5
  import {
6
6
  bunWrite
7
7
  } from "./index-p612v1mv.js";
@@ -18,14 +18,14 @@ import {
18
18
  releaseCoordinationLease,
19
19
  transitionCoordinationState,
20
20
  withCoordinationTransaction
21
- } from "./index-e45htt92.js";
21
+ } from "./index-jx9f4ke1.js";
22
22
  import {
23
23
  getProjectDb,
24
24
  projectDbExists
25
- } from "./index-w6988bbc.js";
25
+ } from "./index-aftapk6j.js";
26
26
  import {
27
27
  observeDelegationLedgerPressure
28
- } from "./index-j2svfhzk.js";
28
+ } from "./index-axf65x87.js";
29
29
  import {
30
30
  canonicalRootKeyFresh,
31
31
  sameProjectRoot
@@ -33,7 +33,7 @@ import {
33
33
  import {
34
34
  EvidenceLockTimeoutError,
35
35
  withEvidenceLock
36
- } from "./index-jre6tm3v.js";
36
+ } from "./index-edm41q4j.js";
37
37
  import {
38
38
  exports_external,
39
39
  init_zod
@@ -3656,6 +3656,10 @@ function isTerminal(status) {
3656
3656
  function isTerminalDelegationStatus(status) {
3657
3657
  return isTerminal(status);
3658
3658
  }
3659
+ var _staleSweepObserver = null;
3660
+ function registerStaleSweepObserver(observer) {
3661
+ _staleSweepObserver = observer;
3662
+ }
3659
3663
  function sweepStaleLocked(directory, timeoutMs, now, statuses = DEFAULT_SWEEPABLE_DELEGATION_STATUSES, filters = {}, limits = {}) {
3660
3664
  let swept = 0;
3661
3665
  const { excludeCorrelationIds, includeCorrelationIds } = filters;
@@ -3679,6 +3683,9 @@ function sweepStaleLocked(directory, timeoutMs, now, statuses = DEFAULT_SWEEPABL
3679
3683
  status: "stale",
3680
3684
  updatedAt: now
3681
3685
  });
3686
+ try {
3687
+ _staleSweepObserver?.(record, "stale");
3688
+ } catch {}
3682
3689
  swept += 1;
3683
3690
  }
3684
3691
  if (swept > 0)
@@ -4517,7 +4524,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
4517
4524
  const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
4518
4525
  if (candidates.length === 0)
4519
4526
  return 0;
4520
- const { transferCoderSettlementToBackground } = await import("./coder-settlement-89nt4j7g.js");
4527
+ const { transferCoderSettlementToBackground } = await import("./coder-settlement-x0h3h6vd.js");
4521
4528
  let transferred = 0;
4522
4529
  for (const record of candidates) {
4523
4530
  try {
@@ -4874,4 +4881,4 @@ async function maintainBackgroundDelegations(directory, options = {}) {
4874
4881
  return emitObservation("ok");
4875
4882
  }
4876
4883
 
4877
- export { prReviewFindingRequiresCritic, PR_REVIEW_BASE_DIMENSION_IDS, PR_REVIEW_RISK_IMPACTS, PR_REVIEW_RISK_TAGS, prReviewLegacyTranscriptCompatibilityEnabled, PrReviewLaneResultEnvelopeSchema, decodePrReviewWorkflowBinding, prReviewLaneResultEnvelopeDigest, PrReviewResultReceiptSchema, PR_REVIEW_FINDINGS_MAX_BYTES, PR_REVIEW_HANDOFF_MAX_BYTES, PR_REVIEW_DISCARDED_EXAMPLE_ITEM_ID, PrReviewRunIdSchema, parsePrReviewRiskTagsField, PrReviewReviewerVerdictFieldsSchema, PrReviewCriticVerdictFieldsSchema, parsePrReviewVerdictRow, generatePrReviewRunId, MAX_RECOVERY_LEDGER_BYTES, readDelegationHealthArtifact, collectDelegationLedgerHealth, MAX_PR_REVIEW_COLLECTION_RECEIPT_ITEM_IDS, BACKGROUND_DELEGATIONS_FILE, BACKGROUND_DELEGATION_FALLBACK_DIR, BACKGROUND_CODER_RESERVATIONS_FILE, BACKGROUND_DELEGATIONS_CHECKPOINT_FILE, BACKGROUND_DELEGATIONS_MANIFEST_FILE, MAX_LIVE_BACKGROUND_FALLBACKS, MAX_LIVE_BACKGROUND_CODER_RESERVATIONS, MAX_BACKGROUND_OBSERVED_FILES, MAX_BACKGROUND_ADVISORY_CHARS, LEGACY_CODER_SETTLEMENT_PENDING_ADVISORY_MARKER, DELEGATION_COMPACTION_LOW_WATER_BYTES, DELEGATION_COMPACTION_HIGH_WATER_BYTES, MAX_CHECKPOINT_BYTES, MAX_CHECKPOINT_RECORDS, TOMBSTONE_MIN_AGE_MS, BACKGROUND_INGESTION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MAX_MS, BACKGROUND_CODER_RESERVATION_LEASE_MIN_MS, DEFAULT_STALE_DELEGATION_TIMEOUT_MS, DEFAULT_SWEEPABLE_DELEGATION_STATUSES, _checkpointInternals, isUnsettledWorktreeOwner, compactBackgroundDelegations, readDelegations, scanDelegationsForRecovery, findByCorrelationId, recordPendingDelegationDetailed, recordPendingDelegation, buildPromptSnapshot, appendDelegationTransition, publishPrReviewResultReceipt, buildBackgroundCompletionEventId, claimTerminalResult, claimCoderSettlement, normalizeBackgroundObservedFiles, updateCoderSettlement, registerLegacyCoderSettlementReconciler, _internals, markLegacyCoderSettlementTransferPending, clearLegacyCoderSettlementTransferPending, claimDelegationIngestion, recordDelegationIngestionResult, putPendingBackgroundAdvisory, replacePendingBackgroundAdvisory, preparePendingBackgroundAdvisories, acknowledgeObservedBackgroundAdvisories, releasePreparedBackgroundAdvisories, findByBatchId, findOpenAsyncLaneBatches, isTerminalDelegationStatus, sweepStaleDelegations, readDelegationFallback, listDelegationFallbacks, scanDelegationFallbacksForRecovery, writeDelegationFallback, removeDelegationFallback, findDelegationForCompletion, promoteDelegationFallback, buildBackgroundCoderReservationId, scanBackgroundCoderReservationsForAdmission, reserveBackgroundCoderSlot, bindBackgroundCoderReservation, releaseBackgroundCoderReservation, maintainBackgroundDelegations };
4884
+ export { prReviewFindingRequiresCritic, PR_REVIEW_BASE_DIMENSION_IDS, PR_REVIEW_RISK_IMPACTS, PR_REVIEW_RISK_TAGS, prReviewLegacyTranscriptCompatibilityEnabled, PrReviewLaneResultEnvelopeSchema, decodePrReviewWorkflowBinding, prReviewLaneResultEnvelopeDigest, PrReviewResultReceiptSchema, PR_REVIEW_FINDINGS_MAX_BYTES, PR_REVIEW_HANDOFF_MAX_BYTES, PR_REVIEW_DISCARDED_EXAMPLE_ITEM_ID, PrReviewRunIdSchema, parsePrReviewRiskTagsField, PrReviewReviewerVerdictFieldsSchema, PrReviewCriticVerdictFieldsSchema, parsePrReviewVerdictRow, generatePrReviewRunId, MAX_RECOVERY_LEDGER_BYTES, readDelegationHealthArtifact, collectDelegationLedgerHealth, MAX_PR_REVIEW_COLLECTION_RECEIPT_ITEM_IDS, BACKGROUND_DELEGATIONS_FILE, BACKGROUND_DELEGATION_FALLBACK_DIR, BACKGROUND_CODER_RESERVATIONS_FILE, BACKGROUND_DELEGATIONS_CHECKPOINT_FILE, BACKGROUND_DELEGATIONS_MANIFEST_FILE, MAX_LIVE_BACKGROUND_FALLBACKS, MAX_LIVE_BACKGROUND_CODER_RESERVATIONS, MAX_BACKGROUND_OBSERVED_FILES, MAX_BACKGROUND_ADVISORY_CHARS, LEGACY_CODER_SETTLEMENT_PENDING_ADVISORY_MARKER, DELEGATION_COMPACTION_LOW_WATER_BYTES, DELEGATION_COMPACTION_HIGH_WATER_BYTES, MAX_CHECKPOINT_BYTES, MAX_CHECKPOINT_RECORDS, TOMBSTONE_MIN_AGE_MS, BACKGROUND_INGESTION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MS, BACKGROUND_CODER_RESERVATION_LEASE_MAX_MS, BACKGROUND_CODER_RESERVATION_LEASE_MIN_MS, DEFAULT_STALE_DELEGATION_TIMEOUT_MS, DEFAULT_SWEEPABLE_DELEGATION_STATUSES, _checkpointInternals, isUnsettledWorktreeOwner, compactBackgroundDelegations, readDelegations, scanDelegationsForRecovery, findByCorrelationId, recordPendingDelegationDetailed, recordPendingDelegation, buildPromptSnapshot, appendDelegationTransition, publishPrReviewResultReceipt, buildBackgroundCompletionEventId, claimTerminalResult, claimCoderSettlement, normalizeBackgroundObservedFiles, updateCoderSettlement, registerLegacyCoderSettlementReconciler, _internals, markLegacyCoderSettlementTransferPending, clearLegacyCoderSettlementTransferPending, claimDelegationIngestion, recordDelegationIngestionResult, putPendingBackgroundAdvisory, replacePendingBackgroundAdvisory, preparePendingBackgroundAdvisories, acknowledgeObservedBackgroundAdvisories, releasePreparedBackgroundAdvisories, findByBatchId, findOpenAsyncLaneBatches, isTerminalDelegationStatus, registerStaleSweepObserver, sweepStaleDelegations, readDelegationFallback, listDelegationFallbacks, scanDelegationFallbacksForRecovery, writeDelegationFallback, removeDelegationFallback, findDelegationForCompletion, promoteDelegationFallback, buildBackgroundCoderReservationId, scanBackgroundCoderReservationsForAdmission, reserveBackgroundCoderSlot, bindBackgroundCoderReservation, releaseBackgroundCoderReservation, maintainBackgroundDelegations };
@@ -3,7 +3,7 @@ import {
3
3
  ALL_AGENT_NAMES,
4
4
  SUMMARIZER_EXEMPT_TOOL_NAMES,
5
5
  init_constants
6
- } from "./index-a0d4fp6r.js";
6
+ } from "./index-0tc0pcmh.js";
7
7
  import {
8
8
  OUTCOME_BLOCK_THRESHOLD,
9
9
  init_knowledge_types
@@ -21,7 +21,7 @@ var package_default;
21
21
  var init_package = __esm(() => {
22
22
  package_default = {
23
23
  name: "opencode-swarm",
24
- version: "7.165.0",
24
+ version: "7.166.1",
25
25
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
26
26
  main: "dist/index.js",
27
27
  types: "dist/index.d.ts",
@@ -835,7 +835,7 @@ var init_schema = __esm(() => {
835
835
  ]);
836
836
  CheckpointConfigSchema = exports_external.preprocess(rejectCheckpointPrototypePollution, exports_external.object({
837
837
  enabled: exports_external.boolean().default(true),
838
- auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3).describe("Maximum number of checkpoints to retain. Oldest checkpoints are evicted when this limit is exceeded."),
838
+ auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3).describe("Number of completed tasks that trigger an automatic checkpoint. Retention of old checkpoints is controlled separately by max_retention."),
839
839
  max_retention: exports_external.number().int().min(1).max(100).default(20),
840
840
  allow_empty_commits: exports_external.boolean().default(false)
841
841
  }).strict());
@@ -1,21 +1,21 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-anxs69ad.js";
4
+ } from "./index-bfr392e7.js";
5
5
  import {
6
6
  deleteCoordinationState,
7
7
  importCoordinationOnce,
8
8
  listCoordinationStates,
9
9
  transitionCoordinationState,
10
10
  withCoordinationTransaction
11
- } from "./index-e45htt92.js";
11
+ } from "./index-jx9f4ke1.js";
12
12
  import {
13
13
  getProjectDb,
14
14
  projectDbExists
15
- } from "./index-w6988bbc.js";
15
+ } from "./index-aftapk6j.js";
16
16
  import {
17
17
  observeStoreHealth
18
- } from "./index-j2svfhzk.js";
18
+ } from "./index-axf65x87.js";
19
19
  import {
20
20
  canonicalRootKey,
21
21
  canonicalRootKeyFresh,
@@ -23,13 +23,13 @@ import {
23
23
  } from "./index-7qefgq4j.js";
24
24
  import {
25
25
  withEvidenceLock
26
- } from "./index-jre6tm3v.js";
26
+ } from "./index-edm41q4j.js";
27
27
  import {
28
28
  atomicWriteSwarmFileSync
29
29
  } from "./index-gy0nyfbw.js";
30
30
  import {
31
31
  telemetry
32
- } from "./index-5ebgzb5a.js";
32
+ } from "./index-hwj25q9r.js";
33
33
  import {
34
34
  exports_external,
35
35
  init_zod
@@ -285,16 +285,26 @@ function buildCoordinationProjectionCheckpoint(directory, view, baseCheckpoint)
285
285
  checkpoint.rootPath = path.resolve(directory);
286
286
  return checkpoint;
287
287
  }
288
+
289
+ class PrSubscriptionCapacityError extends Error {
290
+ constructor(message) {
291
+ super(message);
292
+ this.name = "PrSubscriptionCapacityError";
293
+ }
294
+ }
295
+ function isPrSubscriptionCapacityError(err) {
296
+ return err instanceof PrSubscriptionCapacityError;
297
+ }
288
298
  function assertCoordinationProjectionCapacity(directory, view, baseCheckpoint) {
289
299
  const checkpoint = buildCoordinationProjectionCheckpoint(directory, view, baseCheckpoint);
290
300
  const recordCount = Object.keys(checkpoint.records).length;
291
301
  if (recordCount > PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords) {
292
- throw new Error(`PR subscription store over checkpoint capacity: ${recordCount} records > ${PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
302
+ throw new PrSubscriptionCapacityError(`PR subscription store over checkpoint capacity: ${recordCount} records > ${PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
293
303
  }
294
304
  const contentBytes = Buffer.byteLength(`${JSON.stringify(checkpoint)}
295
305
  `, "utf-8");
296
306
  if (contentBytes > PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes) {
297
- throw new Error(`PR subscription store over checkpoint capacity: ${contentBytes} bytes > ${PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
307
+ throw new PrSubscriptionCapacityError(`PR subscription store over checkpoint capacity: ${contentBytes} bytes > ${PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
298
308
  }
299
309
  }
300
310
  function prepareCoordinationPersistence(directory, view, baseCheckpoint) {
@@ -1013,13 +1023,13 @@ function snapshotUpdateHasChanges(match, updates) {
1013
1023
  function writeCheckpointFile(directory, checkpoint) {
1014
1024
  const recordCount = Object.keys(checkpoint.records).length;
1015
1025
  if (recordCount > PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords) {
1016
- throw new Error(`PR subscription store over checkpoint capacity: ${recordCount} records > ${PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
1026
+ throw new PrSubscriptionCapacityError(`PR subscription store over checkpoint capacity: ${recordCount} records > ${PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
1017
1027
  }
1018
1028
  const content = `${JSON.stringify(checkpoint)}
1019
1029
  `;
1020
1030
  const contentBytes = Buffer.byteLength(content, "utf-8");
1021
1031
  if (contentBytes > PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes) {
1022
- throw new Error(`PR subscription store over checkpoint capacity: ${contentBytes} bytes > ${PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
1032
+ throw new PrSubscriptionCapacityError(`PR subscription store over checkpoint capacity: ${contentBytes} bytes > ${PR_SUBSCRIPTION_LIMITS.checkpointHardReadBytes}. The folded state exceeds the bounded checkpoint \u2014 archive or split .swarm/pr-monitor/subscriptions.jsonl (subscriptions can be re-created with /swarm pr subscribe), then remove it.`);
1023
1033
  }
1024
1034
  if (contentBytes > PR_SUBSCRIPTION_LIMITS.maxCheckpointBytes) {
1025
1035
  log(`[pr-monitor] checkpoint pressure: ${contentBytes}/${PR_SUBSCRIPTION_LIMITS.maxCheckpointBytes} bytes`);
@@ -2419,4 +2429,4 @@ var _internals = {
2419
2429
  writeCheckpointFile
2420
2430
  };
2421
2431
 
2422
- export { PR_SUBSCRIPTIONS_FILE, PR_SUBSCRIPTIONS_CHECKPOINT_FILE, PR_SUBSCRIPTIONS_AUDIT_FILE, PR_SUBSCRIPTION_LIMITS, setOnSubscriptionCreated, buildCorrelationId, subscribe, unsubscribe, listActive, lookupByPr, updateSnapshot, sweepStale, getPrSubscriptionHealth, _internals };
2432
+ export { PR_SUBSCRIPTIONS_FILE, PR_SUBSCRIPTIONS_CHECKPOINT_FILE, PR_SUBSCRIPTIONS_AUDIT_FILE, PR_SUBSCRIPTION_LIMITS, setOnSubscriptionCreated, PrSubscriptionCapacityError, isPrSubscriptionCapacityError, buildCorrelationId, subscribe, unsubscribe, listActive, lookupByPr, updateSnapshot, sweepStale, getPrSubscriptionHealth, _internals };
@@ -1,13 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  computePlanStructureHash
4
- } from "./index-y1zhpfk8.js";
4
+ } from "./index-2y4kargd.js";
5
5
  import {
6
6
  appendCoreEventSync
7
- } from "./index-xwbn7c8m.js";
8
- import {
9
- unsafePathTextReason
10
- } from "./index-556ja8an.js";
7
+ } from "./index-2v17wb75.js";
11
8
  import {
12
9
  deleteCoordinationState,
13
10
  derivePlanId,
@@ -16,17 +13,17 @@ import {
16
13
  transitionCoordinationState,
17
14
  transitionCoordinationStateWithinTransaction,
18
15
  withCoordinationTransaction
19
- } from "./index-e45htt92.js";
16
+ } from "./index-jx9f4ke1.js";
20
17
  import {
21
18
  getProjectDb
22
- } from "./index-w6988bbc.js";
19
+ } from "./index-aftapk6j.js";
23
20
  import {
24
21
  canonicalExistingFilesystemPath,
25
22
  legacyCanonicalExistingFilesystemPath
26
23
  } from "./index-ry16d01s.js";
27
24
  import {
28
25
  assertProjectRoot
29
- } from "./index-jre6tm3v.js";
26
+ } from "./index-edm41q4j.js";
30
27
  import {
31
28
  atomicWriteSwarmFile,
32
29
  atomicWriteSwarmFileSync
@@ -36,7 +33,11 @@ import {
36
33
  } from "./index-7g4c7s5r.js";
37
34
  import {
38
35
  PlanSchema
39
- } from "./index-zycp24b9.js";
36
+ } from "./index-52xdezsh.js";
37
+ import {
38
+ init_path_identity,
39
+ unsafePathTextReason
40
+ } from "./index-yzjaj53h.js";
40
41
  import {
41
42
  __toESM
42
43
  } from "./index-a76rekgs.js";
@@ -50,6 +51,7 @@ import * as path2 from "path";
50
51
  // src/scope/scope-binding.ts
51
52
  import { randomUUID } from "crypto";
52
53
  import * as path from "path";
54
+ init_path_identity();
53
55
  var MAX_PENDING_SCOPE_BINDINGS = 256;
54
56
  var DEFAULT_SCOPE_BINDING_TTL_MS = 60 * 60 * 1000;
55
57
  var MAX_SCOPE_BINDING_TOMBSTONES = 256;
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-c4ddtrqg.js";
5
+ } from "./index-bkd3450m.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
- } from "./index-6rx1rdaq.js";
8
+ } from "./index-a7rw4g4s.js";
9
9
  import {
10
10
  init_git_executable,
11
11
  resolveGitExecutableAsync
@@ -2,27 +2,23 @@
2
2
  import {
3
3
  autoCommitDirty,
4
4
  cleanUntrackedFiles
5
- } from "./index-p7hdp3rp.js";
5
+ } from "./index-fc1dqzjp.js";
6
6
  import {
7
7
  validateSwarmPath
8
- } from "./index-anxs69ad.js";
8
+ } from "./index-bfr392e7.js";
9
9
  import {
10
10
  bunSpawn,
11
11
  classifySpawnFailure
12
12
  } from "./index-p612v1mv.js";
13
- import {
14
- isPathWithinDeclaredScope,
15
- unsafePathTextReason
16
- } from "./index-556ja8an.js";
17
13
  import {
18
14
  assertProjectRoot,
19
15
  atomicWriteFile,
20
16
  taskEvidencePath,
21
17
  withTaskEvidenceLock
22
- } from "./index-jre6tm3v.js";
18
+ } from "./index-edm41q4j.js";
23
19
  import {
24
20
  telemetry
25
- } from "./index-5ebgzb5a.js";
21
+ } from "./index-hwj25q9r.js";
26
22
  import {
27
23
  init_git_executable,
28
24
  resolveGitExecutable
@@ -35,6 +31,11 @@ import {
35
31
  exports_external,
36
32
  init_zod
37
33
  } from "./index-bpmtbmy9.js";
34
+ import {
35
+ init_path_identity,
36
+ isPathWithinDeclaredScope,
37
+ unsafePathTextReason
38
+ } from "./index-yzjaj53h.js";
38
39
  import {
39
40
  log
40
41
  } from "./index-zgwm4ryv.js";
@@ -301,6 +302,9 @@ import * as fs4 from "fs";
301
302
  import { mkdir, open } from "fs/promises";
302
303
  import { dirname } from "path";
303
304
 
305
+ // src/workflow/workflow-wal-schema.ts
306
+ init_path_identity();
307
+
304
308
  // src/worktree/merge.ts
305
309
  init_warning_buffer();
306
310
  import * as fs3 from "fs";
@@ -1,7 +1,10 @@
1
1
  // @bun
2
+ import {
3
+ __esm
4
+ } from "./index-a76rekgs.js";
5
+
2
6
  // src/scope/path-identity.ts
3
7
  import * as path from "path";
4
- var BIDI_CONTROL_CHARACTERS = /[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/u;
5
8
  function isControlCharacter(character) {
6
9
  const codePoint = character.codePointAt(0) ?? 0;
7
10
  return codePoint <= 31 || codePoint >= 127 && codePoint <= 159;
@@ -58,5 +61,9 @@ function sanitizeDiagnosticText(value, maxLength = 256) {
58
61
  return rendered;
59
62
  return `${rendered.slice(0, Math.max(0, maxLength - 1))}\u2026`;
60
63
  }
64
+ var BIDI_CONTROL_CHARACTERS;
65
+ var init_path_identity = __esm(() => {
66
+ BIDI_CONTROL_CHARACTERS = /[\u061c\u200e\u200f\u202a-\u202e\u2066-\u2069]/u;
67
+ });
61
68
 
62
- export { getPathFlavor, pathIdentitiesEqual, isPathIdentityWithin, isPathWithinDeclaredScope, isOnDifferentPathRoot, unsafePathTextReason, sanitizeDiagnosticText };
69
+ export { getPathFlavor, pathIdentitiesEqual, isPathIdentityWithin, isPathWithinDeclaredScope, isOnDifferentPathRoot, unsafePathTextReason, sanitizeDiagnosticText, init_path_identity };
@@ -1,36 +1,36 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-anxs69ad.js";
4
+ } from "./index-bfr392e7.js";
5
5
  import {
6
6
  observeReceiptTransition
7
- } from "./index-j2svfhzk.js";
7
+ } from "./index-axf65x87.js";
8
8
  import {
9
9
  resolveHiveEventsPath
10
10
  } from "./index-ae75rja9.js";
11
11
  import {
12
12
  resolveKnowledgeStoreDir
13
- } from "./index-6rx1rdaq.js";
13
+ } from "./index-a7rw4g4s.js";
14
14
  import {
15
15
  canonicalRootKey
16
16
  } from "./index-7qefgq4j.js";
17
17
  import {
18
18
  assertProjectRoot,
19
19
  atomicWriteFile
20
- } from "./index-jre6tm3v.js";
20
+ } from "./index-edm41q4j.js";
21
21
  import {
22
22
  emit
23
- } from "./index-5ebgzb5a.js";
23
+ } from "./index-hwj25q9r.js";
24
24
  import {
25
25
  require_proper_lockfile
26
26
  } from "./index-7g4c7s5r.js";
27
27
  import {
28
28
  loadPluginConfigWithMeta
29
- } from "./index-zycp24b9.js";
29
+ } from "./index-52xdezsh.js";
30
30
  import {
31
31
  KnowledgeConfigSchema,
32
32
  init_schema
33
- } from "./index-0e9jh9c7.js";
33
+ } from "./index-wf12wckd.js";
34
34
  import {
35
35
  init_logger,
36
36
  warn
@@ -2813,7 +2813,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
2813
2813
  }
2814
2814
  let bumps = 0;
2815
2815
  if (deltas.length > 0) {
2816
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-cxcr0ttk.js");
2816
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-h85efsak.js");
2817
2817
  bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
2818
2818
  }
2819
2819
  return {