github-router 0.3.373 → 0.3.374

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 (151) hide show
  1. package/dist/ado-tools-BOW1k1KW.js +1 -0
  2. package/dist/{aic-ledger-Cp7Yk9-Q.js → aic-ledger-CeSXqTEE.js} +5 -7
  3. package/dist/{aic-ledger-Cp7Yk9-Q.js.map → aic-ledger-CeSXqTEE.js.map} +1 -1
  4. package/dist/{aic-statusline-settings-B5EMMSFC.js → aic-statusline-settings-BKveu679.js} +3 -4
  5. package/dist/{aic-statusline-settings-B5EMMSFC.js.map → aic-statusline-settings-BKveu679.js.map} +1 -1
  6. package/dist/{attribution-settings-DZ8fEfvP.js → attribution-settings-BLTnz2_A.js} +33 -53
  7. package/dist/{attribution-settings-DZ8fEfvP.js.map → attribution-settings-BLTnz2_A.js.map} +1 -1
  8. package/dist/{auth-B1egtvt4.js → auth-BZHpTtfF.js} +5 -6
  9. package/dist/{auth-B1egtvt4.js.map → auth-BZHpTtfF.js.map} +1 -1
  10. package/dist/{balanced-profile-contract-Dm_usmw7.js → balanced-profile-contract-B6pSoWjm.js} +2 -3
  11. package/dist/{balanced-profile-contract-Dm_usmw7.js.map → balanced-profile-contract-B6pSoWjm.js.map} +1 -1
  12. package/dist/{bluebird-client-ByCRusGQ.js → bluebird-client-BasIdv5J.js} +8 -12
  13. package/dist/{bluebird-client-ByCRusGQ.js.map → bluebird-client-BasIdv5J.js.map} +1 -1
  14. package/dist/{bluebird-client-CY6NBHQu.js → bluebird-client-BvoMTmEv.js} +1 -1
  15. package/dist/browser-bridge/index.js +84 -55
  16. package/dist/browser-ext/manifest.json +1 -1
  17. package/dist/{check-usage-T_z84Pgc.js → check-usage-BlIWDuV2.js} +5 -6
  18. package/dist/{check-usage-T_z84Pgc.js.map → check-usage-BlIWDuV2.js.map} +1 -1
  19. package/dist/{claude-8ksmV0dC.js → claude-DSXrdz0v.js} +37 -43
  20. package/dist/{claude-8ksmV0dC.js.map → claude-DSXrdz0v.js.map} +1 -1
  21. package/dist/{claude-md-injection-BnzVv_aB.js → claude-md-injection-DU5KYXNc.js} +6 -7
  22. package/dist/{claude-md-injection-BnzVv_aB.js.map → claude-md-injection-DU5KYXNc.js.map} +1 -1
  23. package/dist/{client-CQMfroGV.js → client-Bjp3XAMK.js} +3 -5
  24. package/dist/{client-CQMfroGV.js.map → client-Bjp3XAMK.js.map} +1 -1
  25. package/dist/{codex-C89FoaaG.js → codex-DGMUk65v.js} +10 -11
  26. package/dist/{codex-C89FoaaG.js.map → codex-DGMUk65v.js.map} +1 -1
  27. package/dist/{copilot-discount-T-cfWmc4.js → copilot-discount-CHNQLYDJ.js} +3 -4
  28. package/dist/{copilot-discount-T-cfWmc4.js.map → copilot-discount-CHNQLYDJ.js.map} +1 -1
  29. package/dist/{debug-DL2JsRqY.js → debug-1HUHCWFl.js} +3 -4
  30. package/dist/{debug-DL2JsRqY.js.map → debug-1HUHCWFl.js.map} +1 -1
  31. package/dist/engine-BC4TF4pt.js +1 -0
  32. package/dist/{exec-Bf8g_bIR.js → exec-BC0MAnoA.js} +2 -3
  33. package/dist/{exec-Bf8g_bIR.js.map → exec-BC0MAnoA.js.map} +1 -1
  34. package/dist/{fast-profile-contract-JOnZBgFB.js → fast-profile-contract-BLnKg0Ay.js} +2 -3
  35. package/dist/{fast-profile-contract-JOnZBgFB.js.map → fast-profile-contract-BLnKg0Ay.js.map} +1 -1
  36. package/dist/{gate-discovery-Bc9FdRwg.js → gate-discovery-DiXu_olc.js} +8 -10
  37. package/dist/{gate-discovery-Bc9FdRwg.js.map → gate-discovery-DiXu_olc.js.map} +1 -1
  38. package/dist/{get-copilot-usage-BSXeQEx8.js → get-copilot-usage-CKg42gSH.js} +5 -6
  39. package/dist/{get-copilot-usage-BSXeQEx8.js.map → get-copilot-usage-CKg42gSH.js.map} +1 -1
  40. package/dist/{hook-mcp-client-DERIkeR7.js → hook-mcp-client-CYx10nlU.js} +2 -3
  41. package/dist/hook-mcp-client-CYx10nlU.js.map +1 -0
  42. package/dist/hooks.mjs +1766 -1548
  43. package/dist/hooks.sha256 +1 -1
  44. package/dist/{index-cmd-DOhwt92u.js → index-cmd-BPXhTfGQ.js} +8 -9
  45. package/dist/index-cmd-BPXhTfGQ.js.map +1 -0
  46. package/dist/{internal-aic-status-CY0QxSa7.js → internal-aic-status-FQB1DQzX.js} +6 -8
  47. package/dist/{internal-aic-status-CY0QxSa7.js.map → internal-aic-status-FQB1DQzX.js.map} +1 -1
  48. package/dist/{internal-artifact-open-NAGn9Mgt.js → internal-artifact-open-DbHjipxU.js} +5 -7
  49. package/dist/{internal-artifact-open-NAGn9Mgt.js.map → internal-artifact-open-DbHjipxU.js.map} +1 -1
  50. package/dist/{internal-fast-dispatch-guard-De_DJOyZ.js → internal-fast-dispatch-guard-DMzqs-r8.js} +1 -1
  51. package/dist/{internal-fast-dispatch-guard-_n-A8hgo.js → internal-fast-dispatch-guard-PDdlkPU3.js} +6 -8
  52. package/dist/{internal-fast-dispatch-guard-_n-A8hgo.js.map → internal-fast-dispatch-guard-PDdlkPU3.js.map} +1 -1
  53. package/dist/{internal-first-mate-guard-GufCUMl3.js → internal-first-mate-guard-4Yro9xNM.js} +5 -7
  54. package/dist/{internal-first-mate-guard-GufCUMl3.js.map → internal-first-mate-guard-4Yro9xNM.js.map} +1 -1
  55. package/dist/{internal-first-mate-guard-C8GwLbaX.js → internal-first-mate-guard-BxPDUsV3.js} +1 -1
  56. package/dist/{internal-max-dispatch-guard-4rh6KSd8.js → internal-max-dispatch-guard-D3L00YXj.js} +5 -7
  57. package/dist/{internal-max-dispatch-guard-4rh6KSd8.js.map → internal-max-dispatch-guard-D3L00YXj.js.map} +1 -1
  58. package/dist/{internal-max-dispatch-guard-CKnzgJje.js → internal-max-dispatch-guard-fhBX_w49.js} +1 -1
  59. package/dist/{internal-plan-review-ChFx8wTX.js → internal-plan-review-BfHLeszV.js} +6 -7
  60. package/dist/{internal-plan-review-ChFx8wTX.js.map → internal-plan-review-BfHLeszV.js.map} +1 -1
  61. package/dist/{internal-prompt-submit-BW5g3MjD.js → internal-prompt-submit-BbnaMF2R.js} +7 -8
  62. package/dist/{internal-prompt-submit-BW5g3MjD.js.map → internal-prompt-submit-BbnaMF2R.js.map} +1 -1
  63. package/dist/{internal-prompt-submit-C4uDwr7G.js → internal-prompt-submit-DKzCckz-.js} +2 -2
  64. package/dist/{internal-rebrief-DvBS8myn.js → internal-rebrief-aEvxp7jw.js} +7 -9
  65. package/dist/{internal-rebrief-DvBS8myn.js.map → internal-rebrief-aEvxp7jw.js.map} +1 -1
  66. package/dist/{internal-session-bind-dsUOcKxU.js → internal-session-bind-pN1V11Mn.js} +3 -4
  67. package/dist/{internal-session-bind-dsUOcKxU.js.map → internal-session-bind-pN1V11Mn.js.map} +1 -1
  68. package/dist/{internal-stop-hook-nS91Jkda.js → internal-stop-hook-VQuOYpUC.js} +9 -10
  69. package/dist/{internal-stop-hook-nS91Jkda.js.map → internal-stop-hook-VQuOYpUC.js.map} +1 -1
  70. package/dist/{internal-stop-review-D_KEV_04.js → internal-stop-review-BWp-4XWW.js} +4 -5
  71. package/dist/{internal-stop-review-D_KEV_04.js.map → internal-stop-review-BWp-4XWW.js.map} +1 -1
  72. package/dist/{internal-worker-guard-DB6shBIn.js → internal-worker-guard-C9OZPgzu.js} +3 -4
  73. package/dist/{internal-worker-guard-DB6shBIn.js.map → internal-worker-guard-C9OZPgzu.js.map} +1 -1
  74. package/dist/{internal-workspace-header-DBg5Y7oN.js → internal-workspace-header-B4TXFBLU.js} +3 -4
  75. package/dist/{internal-workspace-header-DBg5Y7oN.js.map → internal-workspace-header-B4TXFBLU.js.map} +1 -1
  76. package/dist/lib/tree-sitter-pool/{lifecycle-Dx0SnP7Z.js → lifecycle-BPpOigPZ.js} +1 -2
  77. package/dist/lib/tree-sitter-pool/{lifecycle-C7W8D2lx.js → lifecycle-C3vsqXjS.js} +1 -3
  78. package/dist/lib/tree-sitter-pool/worker.js +29 -35
  79. package/dist/lifecycle-BENRuuX6.js +1 -0
  80. package/dist/{lifecycle-K9oVtGde.mjs → lifecycle-DBKu1T5r.mjs} +0 -1
  81. package/dist/{lifecycle-Gge2Dadd.js → lifecycle-Dh9y8OF1.js} +3 -4
  82. package/dist/{lifecycle-Gge2Dadd.js.map → lifecycle-Dh9y8OF1.js.map} +1 -1
  83. package/dist/lifecycle-Dli9vGI2.js +1 -0
  84. package/dist/{lifecycle-9nX09dBl.js → lifecycle-vjHAFCaY.js} +4 -6
  85. package/dist/{lifecycle-9nX09dBl.js.map → lifecycle-vjHAFCaY.js.map} +1 -1
  86. package/dist/main.js +26 -27
  87. package/dist/{max-profile-contract-CRj7N211.js → max-profile-contract-DLLTsSs2.js} +5 -8
  88. package/dist/{max-profile-contract-CRj7N211.js.map → max-profile-contract-DLLTsSs2.js.map} +1 -1
  89. package/dist/{mcp-workspace-header-Xw9B1W6T.js → mcp-workspace-header-C5-dOWNa.js} +3 -4
  90. package/dist/{mcp-workspace-header-Xw9B1W6T.js.map → mcp-workspace-header-C5-dOWNa.js.map} +1 -1
  91. package/dist/{models-Ca-HQTYi.js → models-B6nH1sS6.js} +4 -5
  92. package/dist/{models-Ca-HQTYi.js.map → models-B6nH1sS6.js.map} +1 -1
  93. package/dist/{orchestration-D3-2ulhX.js → orchestration-B93jxrWI.js} +4 -5
  94. package/dist/{orchestration-D3-2ulhX.js.map → orchestration-B93jxrWI.js.map} +1 -1
  95. package/dist/{package-root-B-osctCk.js → package-root-BXgdIM3q.js} +2 -3
  96. package/dist/{package-root-B-osctCk.js.map → package-root-BXgdIM3q.js.map} +1 -1
  97. package/dist/paths-Be9_ujQ3.js +1 -0
  98. package/dist/{paths-C5477RGC.js → paths-CVEO8jEH.js} +5 -7
  99. package/dist/{paths-C5477RGC.js.map → paths-CVEO8jEH.js.map} +1 -1
  100. package/dist/{peer-mcp-personas-BSxDj9sJ.js → peer-mcp-personas-Cv21q_YR.js} +244 -372
  101. package/dist/peer-mcp-personas-Cv21q_YR.js.map +1 -0
  102. package/dist/{pi-BglhJ6n_.js → pi-DI2QtaiZ.js} +26 -34
  103. package/dist/{pi-BglhJ6n_.js.map → pi-DI2QtaiZ.js.map} +1 -1
  104. package/dist/{pi-memory-bridge-DEU1SUDz.js → pi-memory-bridge-Dvj1T3e3.js} +2 -3
  105. package/dist/{pi-memory-bridge-DEU1SUDz.js.map → pi-memory-bridge-Dvj1T3e3.js.map} +1 -1
  106. package/dist/{plan-review-hook-C9K-em4D.js → plan-review-hook-MhjK92wq.js} +5 -6
  107. package/dist/{plan-review-hook-C9K-em4D.js.map → plan-review-hook-MhjK92wq.js.map} +1 -1
  108. package/dist/{provision-B0GNohdl.js → provision-CRmtV6ew.js} +10 -14
  109. package/dist/{provision-B0GNohdl.js.map → provision-CRmtV6ew.js.map} +1 -1
  110. package/dist/rolldown-runtime-D3PmRqjj.js +4 -0
  111. package/dist/{self-invocation-BtcGj-lY.js → self-invocation-DMUnXVGT.js} +5 -7
  112. package/dist/{self-invocation-BtcGj-lY.js.map → self-invocation-DMUnXVGT.js.map} +1 -1
  113. package/dist/{serve-BxZq9vNl.js → serve-DRASJ-ZO.js} +24 -30
  114. package/dist/{serve-BxZq9vNl.js.map → serve-DRASJ-ZO.js.map} +1 -1
  115. package/dist/{server-setup-BLdWCcby.js → server-setup-DldGizZR.js} +67 -117
  116. package/dist/{server-setup-BLdWCcby.js.map → server-setup-DldGizZR.js.map} +1 -1
  117. package/dist/{service-backend-BV2hHjuB.js → service-backend-Ce6b2XEe.js} +112 -130
  118. package/dist/service-backend-Ce6b2XEe.js.map +1 -0
  119. package/dist/{start-C3Zb8XMT.js → start-C0gngUPK.js} +6 -8
  120. package/dist/{start-C3Zb8XMT.js.map → start-C0gngUPK.js.map} +1 -1
  121. package/dist/{state-DzsaGHr9.js → state-CCGDJ43X.js} +2 -3
  122. package/dist/{state-DzsaGHr9.js.map → state-CCGDJ43X.js.map} +1 -1
  123. package/dist/{static-context-pack-CsOAC87F.js → static-context-pack-DwC69_VA.js} +14 -24
  124. package/dist/{static-context-pack-CsOAC87F.js.map → static-context-pack-DwC69_VA.js.map} +1 -1
  125. package/dist/{stop-gate-hook-DnLC09Lg.js → stop-gate-hook-CBVLD8iB.js} +9 -14
  126. package/dist/{stop-gate-hook-DnLC09Lg.js.map → stop-gate-hook-CBVLD8iB.js.map} +1 -1
  127. package/dist/{stop-gate-policy-Dx9c98_d.js → stop-gate-policy-BehNiNix.js} +4 -5
  128. package/dist/{stop-gate-policy-Dx9c98_d.js.map → stop-gate-policy-BehNiNix.js.map} +1 -1
  129. package/dist/{token-Dqjs5ixP.js → token-CPzYxU4Y.js} +16 -28
  130. package/dist/{token-Dqjs5ixP.js.map → token-CPzYxU4Y.js.map} +1 -1
  131. package/dist/{token-CVG0yI_j.js → token-DHEkiO4g.js} +3 -4
  132. package/dist/{token-CVG0yI_j.js.map → token-DHEkiO4g.js.map} +1 -1
  133. package/dist/{upstream-retry-i1k1Xai2.js → upstream-retry-VNR-bCuT.js} +2 -3
  134. package/dist/{upstream-retry-i1k1Xai2.js.map → upstream-retry-VNR-bCuT.js.map} +1 -1
  135. package/dist/{version-C8x2hQrZ.js → version-CTqwKr26.js} +3 -4
  136. package/dist/{version-C8x2hQrZ.js.map → version-CTqwKr26.js.map} +1 -1
  137. package/dist/{worker-dispatch-B1w2qfjX.js → worker-dispatch-C7RtNOXv.js} +3 -4
  138. package/dist/{worker-dispatch-B1w2qfjX.js.map → worker-dispatch-C7RtNOXv.js.map} +1 -1
  139. package/dist/{workiq-qnJR5_n2.js → workiq-CQauEAMc.js} +3 -4
  140. package/dist/{workiq-qnJR5_n2.js.map → workiq-CQauEAMc.js.map} +1 -1
  141. package/dist/{workiq-tools-C6LAF_vA.js → workiq-tools-7n2xXMrQ.js} +1 -1
  142. package/package.json +18 -15
  143. package/dist/ado-tools-WDyisN8w.js +0 -1
  144. package/dist/engine-C207cikp.js +0 -1
  145. package/dist/hook-mcp-client-DERIkeR7.js.map +0 -1
  146. package/dist/index-cmd-DOhwt92u.js.map +0 -1
  147. package/dist/lifecycle-C_CT13c9.js +0 -1
  148. package/dist/lifecycle-DibiH857.js +0 -1
  149. package/dist/paths-CEswtFj5.js +0 -1
  150. package/dist/peer-mcp-personas-BSxDj9sJ.js.map +0 -1
  151. package/dist/service-backend-BV2hHjuB.js.map +0 -1
@@ -1,15 +1,16 @@
1
- import { t as PATHS } from "./paths-C5477RGC.js";
2
- import { d as runManagedExeCapture, f as spawnTaskkillBestEffort, n as isWindowsScriptShim, s as resolveExecutable } from "./exec-Bf8g_bIR.js";
3
- import { c as untrackChild, n as isPidAlive, s as trackChild, t as getColbertInstanceUuid } from "./lifecycle-9nX09dBl.js";
1
+ import { t as __require } from "./rolldown-runtime-D3PmRqjj.js";
2
+ import { t as PATHS } from "./paths-CVEO8jEH.js";
3
+ import { d as runManagedExeCapture, f as spawnTaskkillBestEffort, n as isWindowsScriptShim, s as resolveExecutable } from "./exec-BC0MAnoA.js";
4
+ import { c as untrackChild, n as isPidAlive, s as trackChild, t as getColbertInstanceUuid } from "./lifecycle-vjHAFCaY.js";
4
5
  import { createRequire } from "node:module";
5
6
  import consola from "consola";
6
7
  import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
7
- import * as path$1 from "node:path";
8
- import path, { dirname, join } from "node:path";
8
+ import * as path from "node:path";
9
+ import path$1, { dirname, join } from "node:path";
9
10
  import { fileURLToPath } from "node:url";
10
11
  import { createHash, randomBytes } from "node:crypto";
11
12
  import fs$1, { chmod, mkdir, open, readFile, rename, rm, stat, symlink, writeFile } from "node:fs/promises";
12
- import os, * as os$1 from "node:os";
13
+ import os$1, * as os from "node:os";
13
14
  import process$1 from "node:process";
14
15
  import { execFileSync, spawn } from "node:child_process";
15
16
  import { performance } from "node:perf_hooks";
@@ -18,10 +19,7 @@ import { Language, Parser } from "web-tree-sitter";
18
19
  import { Worker } from "node:worker_threads";
19
20
  import { gunzipSync, inflateRawSync } from "node:zlib";
20
21
  import * as net from "node:net";
21
- //#region \0rolldown/runtime.js
22
- var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
23
- //#endregion
24
- //#region src/lib/update-lock.ts
22
+ // src/lib/update-lock.ts
25
23
  /**
26
24
  * Cross-process install lock for the auto-update / self-update paths.
27
25
  *
@@ -34,7 +32,7 @@ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
34
32
  /** A lock older than this is treated as stale (crashed holder) and stolen. */
35
33
  const STALE_LOCK_MS = 6e5;
36
34
  function lockPath(name) {
37
- return path.join(os.homedir(), ".local", "share", "github-router", name);
35
+ return path$1.join(os$1.homedir(), ".local", "share", "github-router", name);
38
36
  }
39
37
  /**
40
38
  * Run `fn` while holding an exclusive lockfile named `name` under the
@@ -75,8 +73,7 @@ async function tryCreateLock(p) {
75
73
  return null;
76
74
  }
77
75
  }
78
- //#endregion
79
- //#region src/lib/tree-sitter-assets/files.ts
76
+ // src/lib/tree-sitter-assets/files.ts
80
77
  /** WASM assets code search loads from tree-sitter-wasms. */
81
78
  const TREE_SITTER_GRAMMAR_FILES = {
82
79
  typescript: "tree-sitter-typescript.wasm",
@@ -91,8 +88,7 @@ const TREE_SITTER_GRAMMAR_FILES = {
91
88
  csharp: "tree-sitter-c_sharp.wasm"
92
89
  };
93
90
  const TREE_SITTER_RUNTIME_FILE = "tree-sitter.wasm";
94
- //#endregion
95
- //#region src/lib/tree-sitter-assets/provision.ts
91
+ // src/lib/tree-sitter-assets/provision.ts
96
92
  const PUBLISH_ATTEMPTS = 3;
97
93
  let _provisioned = false;
98
94
  let _inFlight;
@@ -114,12 +110,12 @@ function provisionImpl() {
114
110
  try {
115
111
  const require = createRequire(import.meta.url);
116
112
  const grammarPackage = require.resolve("tree-sitter-wasms/package.json");
117
- const grammarRoot = path.join(path.dirname(grammarPackage), "out");
113
+ const grammarRoot = path$1.join(path$1.dirname(grammarPackage), "out");
118
114
  const runtime = require.resolve("web-tree-sitter/tree-sitter.wasm");
119
115
  const destination = PATHS.TREE_SITTER_ASSETS_DIR;
120
116
  mkdirSync(destination, { recursive: true });
121
- let complete = publishAsset(runtime, path.join(destination, TREE_SITTER_RUNTIME_FILE));
122
- for (const filename of Object.values(TREE_SITTER_GRAMMAR_FILES)) complete = publishAsset(path.join(grammarRoot, filename), path.join(destination, filename)) && complete;
117
+ let complete = publishAsset(runtime, path$1.join(destination, TREE_SITTER_RUNTIME_FILE));
118
+ for (const filename of Object.values(TREE_SITTER_GRAMMAR_FILES)) complete = publishAsset(path$1.join(grammarRoot, filename), path$1.join(destination, filename)) && complete;
123
119
  return complete;
124
120
  } catch (err) {
125
121
  consola.debug("[tree-sitter-assets] provisioning skipped:", err);
@@ -187,7 +183,7 @@ function stableTreeSitterAssetsComplete() {
187
183
  const dir = PATHS.TREE_SITTER_ASSETS_DIR;
188
184
  return [TREE_SITTER_RUNTIME_FILE, ...Object.values(TREE_SITTER_GRAMMAR_FILES)].every((name) => {
189
185
  try {
190
- return statSync(path.join(dir, name)).isFile();
186
+ return statSync(path$1.join(dir, name)).isFile();
191
187
  } catch {
192
188
  return false;
193
189
  }
@@ -391,7 +387,7 @@ const IDENTIFIER_NODE_TYPES = /* @__PURE__ */ new Set([
391
387
  * structural pass).
392
388
  */
393
389
  function getLanguageKeyForPath(filePath) {
394
- const ext = path$1.extname(filePath).toLowerCase();
390
+ const ext = path.extname(filePath).toLowerCase();
395
391
  return EXTENSION_TO_LANG[ext] ?? null;
396
392
  }
397
393
  let _grammarBundle;
@@ -408,7 +404,7 @@ function resolveGrammarRoot() {
408
404
  if (stableTreeSitterAssetsComplete()) return PATHS.TREE_SITTER_ASSETS_DIR;
409
405
  try {
410
406
  const pkgPath = __require.resolve("tree-sitter-wasms/package.json");
411
- return path$1.join(path$1.dirname(pkgPath), "out");
407
+ return path.join(path.dirname(pkgPath), "out");
412
408
  } catch {
413
409
  return null;
414
410
  }
@@ -420,7 +416,7 @@ function resolveGrammarRoot() {
420
416
  */
421
417
  function parserInitOptions() {
422
418
  if (!stableTreeSitterAssetsComplete()) return void 0;
423
- return { locateFile: () => path$1.join(PATHS.TREE_SITTER_ASSETS_DIR, TREE_SITTER_RUNTIME_FILE) };
419
+ return { locateFile: () => path.join(PATHS.TREE_SITTER_ASSETS_DIR, TREE_SITTER_RUNTIME_FILE) };
424
420
  }
425
421
  /**
426
422
  * Pre-load all grammars at module-init time so the first search
@@ -444,7 +440,7 @@ function getGrammarBundle() {
444
440
  return out;
445
441
  }
446
442
  for (const [key, filename] of Object.entries(GRAMMAR_FILES)) {
447
- const wasmPath = path$1.join(root, filename);
443
+ const wasmPath = path.join(root, filename);
448
444
  try {
449
445
  const lang = await Language.load(wasmPath);
450
446
  out.set(key, lang);
@@ -840,8 +836,7 @@ async function outlineFile(absPath, signal) {
840
836
  } catch {}
841
837
  }
842
838
  }
843
- //#endregion
844
- //#region src/lib/tree-sitter-pool/pool.ts
839
+ // src/lib/tree-sitter-pool/pool.ts
845
840
  /**
846
841
  * Warm `worker_threads` pool that parallelizes the synchronous web-tree-sitter
847
842
  * parses the `code_search` structural pass would otherwise serialize on the one
@@ -914,7 +909,7 @@ function computePoolSize() {
914
909
  }
915
910
  let cpus;
916
911
  try {
917
- cpus = os$1.cpus().length;
912
+ cpus = os.cpus().length;
918
913
  } catch {
919
914
  cpus = 1;
920
915
  }
@@ -1353,8 +1348,7 @@ async function warmTreeSitterPool() {
1353
1348
  _pool = null;
1354
1349
  }
1355
1350
  }
1356
- //#endregion
1357
- //#region src/lib/search-concurrency.ts
1351
+ // src/lib/search-concurrency.ts
1358
1352
  /**
1359
1353
  * Search-specific concurrency control for `code_search`.
1360
1354
  *
@@ -1398,7 +1392,7 @@ const WEIGHTS = {
1398
1392
  };
1399
1393
  function cpuCount() {
1400
1394
  try {
1401
- const n = os$1.cpus().length;
1395
+ const n = os.cpus().length;
1402
1396
  return Number.isSafeInteger(n) && n > 0 ? n : 4;
1403
1397
  } catch {
1404
1398
  return 4;
@@ -1508,8 +1502,7 @@ function recommendedRgThreads() {
1508
1502
  const cpus = cpuCount();
1509
1503
  return Math.max(1, Math.floor(cpus / Math.max(1, Math.ceil(activeWeight))));
1510
1504
  }
1511
- //#endregion
1512
- //#region src/lib/rerank.ts
1505
+ // src/lib/rerank.ts
1513
1506
  /**
1514
1507
  * JIT cross-encoder reranking for lexical results (Phase 3).
1515
1508
  *
@@ -1627,8 +1620,7 @@ async function rerankDocuments(query, documents, topN, signal) {
1627
1620
  if (timer) clearTimeout(timer);
1628
1621
  }
1629
1622
  }
1630
- //#endregion
1631
- //#region src/lib/worker-agent/paths.ts
1623
+ // src/lib/worker-agent/paths.ts
1632
1624
  /**
1633
1625
  * Workspace confinement + sensitive-file denylist for worker tools.
1634
1626
  *
@@ -1714,7 +1706,7 @@ function splitSegments(p) {
1714
1706
  * but free correctness).
1715
1707
  */
1716
1708
  function isSensitivePath(absPath, workspaceAbs) {
1717
- const rel = path$1.relative(workspaceAbs, absPath);
1709
+ const rel = path.relative(workspaceAbs, absPath);
1718
1710
  if (rel === "") return false;
1719
1711
  const segments = splitSegments(rel);
1720
1712
  for (const seg of segments) {
@@ -1766,21 +1758,21 @@ function confineToWorkspaceResult(rawPath, workspaceAbs) {
1766
1758
  ok: false,
1767
1759
  error: "rejected: parent-directory segment"
1768
1760
  };
1769
- const candidate = path$1.isAbsolute(rawPath) ? path$1.normalize(rawPath) : path$1.normalize(path$1.join(workspaceAbs, rawPath));
1761
+ const candidate = path.isAbsolute(rawPath) ? path.normalize(rawPath) : path.normalize(path.join(workspaceAbs, rawPath));
1770
1762
  let canonical;
1771
1763
  try {
1772
1764
  canonical = realpathSync.native(candidate);
1773
1765
  } catch {
1774
- const parent = path$1.dirname(candidate);
1775
- const base = path$1.basename(candidate);
1766
+ const parent = path.dirname(candidate);
1767
+ const base = path.basename(candidate);
1776
1768
  try {
1777
1769
  const realParent = realpathSync.native(parent);
1778
- canonical = path$1.join(realParent, base);
1770
+ canonical = path.join(realParent, base);
1779
1771
  } catch {
1780
1772
  canonical = candidate;
1781
1773
  }
1782
1774
  }
1783
- const wsWithSep = workspaceAbs.endsWith(path$1.sep) ? workspaceAbs : workspaceAbs + path$1.sep;
1775
+ const wsWithSep = workspaceAbs.endsWith(path.sep) ? workspaceAbs : workspaceAbs + path.sep;
1784
1776
  if (!(canonical === workspaceAbs || canonical.startsWith(wsWithSep))) return {
1785
1777
  ok: false,
1786
1778
  error: "rejected: outside workspace"
@@ -1790,8 +1782,7 @@ function confineToWorkspaceResult(rawPath, workspaceAbs) {
1790
1782
  abs: canonical
1791
1783
  };
1792
1784
  }
1793
- //#endregion
1794
- //#region src/lib/code-search.ts
1785
+ // src/lib/code-search.ts
1795
1786
  /**
1796
1787
  * `code_search` MCP tool implementation.
1797
1788
  *
@@ -1971,7 +1962,7 @@ function resolveRipgrep() {
1971
1962
  };
1972
1963
  return _rgResolution;
1973
1964
  }
1974
- const toolbeltPath = path$1.join(PATHS.TOOLBELT_BIN_DIR, process.platform === "win32" ? "rg.exe" : "rg");
1965
+ const toolbeltPath = path.join(PATHS.TOOLBELT_BIN_DIR, process.platform === "win32" ? "rg.exe" : "rg");
1975
1966
  if (existsSync(toolbeltPath)) {
1976
1967
  _rgResolution = {
1977
1968
  rgPath: toolbeltPath,
@@ -2049,7 +2040,7 @@ function validateInputs(input) {
2049
2040
  * COPILOT_HOST_ALLOWLIST pattern in `src/lib/utils.ts`).
2050
2041
  */
2051
2042
  function validateWorkspace(workspace) {
2052
- if (!path$1.isAbsolute(workspace)) return {
2043
+ if (!path.isAbsolute(workspace)) return {
2053
2044
  ok: false,
2054
2045
  error: "workspace must be an absolute path"
2055
2046
  };
@@ -2256,7 +2247,7 @@ async function parseRgJsonStream(child, opts) {
2256
2247
  child.stdout.setEncoding("utf8");
2257
2248
  const rl = createInterface({
2258
2249
  input: child.stdout,
2259
- crlfDelay: Infinity
2250
+ crlfDelay: 1e400
2260
2251
  });
2261
2252
  const onAbort = () => {
2262
2253
  cancelled = true;
@@ -2475,7 +2466,7 @@ async function runStructuralPassPooled(opts) {
2475
2466
  for (const [relFile, entries] of opts.byFile) {
2476
2467
  const langKey = getLanguageKeyForPath(relFile);
2477
2468
  if (!langKey || !opts.grammars.has(langKey)) continue;
2478
- const absPath = path$1.join(opts.workspaceRoot, relFile);
2469
+ const absPath = path.join(opts.workspaceRoot, relFile);
2479
2470
  let mtimeMs;
2480
2471
  try {
2481
2472
  const st = statSync(absPath);
@@ -2556,7 +2547,7 @@ async function runStructuralPassInProcess(opts) {
2556
2547
  const langKey = getLanguageKeyForPath(relFile);
2557
2548
  if (!langKey) return { kind: "skip" };
2558
2549
  if (!grammars.get(langKey)) return { kind: "skip" };
2559
- const absPath = path$1.join(opts.workspaceRoot, relFile);
2550
+ const absPath = path.join(opts.workspaceRoot, relFile);
2560
2551
  let mtimeMs;
2561
2552
  let size;
2562
2553
  try {
@@ -2625,7 +2616,7 @@ async function runStructuralPassInProcess(opts) {
2625
2616
  if (!langKey) continue;
2626
2617
  const lang = grammars.get(langKey);
2627
2618
  if (!lang) continue;
2628
- const absPath = path$1.join(opts.workspaceRoot, relFile);
2619
+ const absPath = path.join(opts.workspaceRoot, relFile);
2629
2620
  let cached;
2630
2621
  if (input.kind === "cached") cached = input.cached;
2631
2622
  else if (input.kind === "readfail") {
@@ -2917,7 +2908,7 @@ function resolveAstGrep() {
2917
2908
  "ast-grep"
2918
2909
  ] : ["sg", "ast-grep"];
2919
2910
  for (const name of toolbeltNames) {
2920
- const candidate = path$1.resolve(toolbeltDir, name);
2911
+ const candidate = path.resolve(toolbeltDir, name);
2921
2912
  if (existsSync(candidate)) return candidate;
2922
2913
  }
2923
2914
  const fromPath = resolveExecutable("ast-grep", { env: process.env });
@@ -3003,7 +2994,7 @@ async function runAstGrep(opts) {
3003
2994
  if (typeof m.file !== "string") continue;
3004
2995
  const rel = relativizeToWorkspace(m.file, opts.workspaceCanonical);
3005
2996
  if (rel === null) continue;
3006
- if (isSensitivePath(path$1.join(opts.workspaceCanonical, rel), opts.workspaceCanonical)) continue;
2997
+ if (isSensitivePath(path.join(opts.workspaceCanonical, rel), opts.workspaceCanonical)) continue;
3007
2998
  const startLine = m.range?.start?.line;
3008
2999
  const line1 = typeof startLine === "number" ? startLine + 1 : 1;
3009
3000
  const snippetSrc = typeof m.text === "string" && m.text.length > 0 ? m.text : typeof m.lines === "string" ? m.lines : "";
@@ -3032,9 +3023,9 @@ async function runAstGrep(opts) {
3032
3023
  */
3033
3024
  function relativizeToWorkspace(file, workspaceCanonical) {
3034
3025
  try {
3035
- const abs = path$1.resolve(workspaceCanonical, file);
3036
- const rel = path$1.relative(workspaceCanonical, abs);
3037
- if (rel === "" || rel.startsWith("..") || path$1.isAbsolute(rel)) return null;
3026
+ const abs = path.resolve(workspaceCanonical, file);
3027
+ const rel = path.relative(workspaceCanonical, abs);
3028
+ if (rel === "" || rel.startsWith("..") || path.isAbsolute(rel)) return null;
3038
3029
  return rel;
3039
3030
  } catch {
3040
3031
  return null;
@@ -3093,7 +3084,7 @@ async function enumerateWorkspaceFiles(opts) {
3093
3084
  child.stdout.setEncoding("utf8");
3094
3085
  const rl = createInterface({
3095
3086
  input: child.stdout,
3096
- crlfDelay: Infinity
3087
+ crlfDelay: 1e400
3097
3088
  });
3098
3089
  let stdoutBytes = 0;
3099
3090
  for await (const rawLine of rl) {
@@ -3108,9 +3099,9 @@ async function enumerateWorkspaceFiles(opts) {
3108
3099
  }
3109
3100
  const rel = normalizeRelFile(rawLine.trim());
3110
3101
  if (rel.length === 0) continue;
3111
- if (path$1.isAbsolute(rel) || rel.split("/").includes("..")) continue;
3102
+ if (path.isAbsolute(rel) || rel.split("/").includes("..")) continue;
3112
3103
  if (!getLanguageKeyForPath(rel)) continue;
3113
- if (isSensitivePath(path$1.join(opts.workspaceCanonical, rel), opts.workspaceCanonical)) continue;
3104
+ if (isSensitivePath(path.join(opts.workspaceCanonical, rel), opts.workspaceCanonical)) continue;
3114
3105
  total += 1;
3115
3106
  if (files.length < SCAN_MAX_FILES) files.push(rel);
3116
3107
  else capped = true;
@@ -3372,7 +3363,7 @@ async function searchCode(rawInput, externalSignal) {
3372
3363
  const outlineDeadline = wantScan ? scanDeadline : Date.now() + 2e3;
3373
3364
  for (const file of distinct) {
3374
3365
  if (ac.signal.aborted || Date.now() > outlineDeadline) break;
3375
- const abs = path$1.resolve(ws.canonical, file);
3366
+ const abs = path.resolve(ws.canonical, file);
3376
3367
  let result;
3377
3368
  const pooled = structuralOutlines?.get(file);
3378
3369
  if (pooled) result = {
@@ -3423,8 +3414,7 @@ async function searchCode(rawInput, externalSignal) {
3423
3414
  function round4(x) {
3424
3415
  return Math.round(x * 1e4) / 1e4;
3425
3416
  }
3426
- //#endregion
3427
- //#region src/lib/colbert/manifest.ts
3417
+ // src/lib/colbert/manifest.ts
3428
3418
  /** ONNX Runtime version colgrep pins (`onnx_runtime.rs:33`). */
3429
3419
  const ORT_VERSION = "1.23.0";
3430
3420
  /** ColBERT model HF repo id (`model.rs:5`). */
@@ -3636,8 +3626,7 @@ function nextPlaidServerPromoted(variant, platform = process.platform, arch = pr
3636
3626
  const asset = nextPlaidServerAsset(variant, platform, arch);
3637
3627
  return asset !== void 0 && asset.sha256.length > 0;
3638
3628
  }
3639
- //#endregion
3640
- //#region src/lib/toolbelt/extract.ts
3629
+ // src/lib/toolbelt/extract.ts
3641
3630
  /**
3642
3631
  * Minimal, dependency-free archive extraction for the toolbelt.
3643
3632
  *
@@ -3830,8 +3819,7 @@ function readZipLocalEntry(buf, localOffset, method, compSize) {
3830
3819
  }
3831
3820
  return null;
3832
3821
  }
3833
- //#endregion
3834
- //#region src/lib/colbert/provision.ts
3822
+ // src/lib/colbert/provision.ts
3835
3823
  /**
3836
3824
  * ColBERT sidecar provisioner: download + SHA-verify + extract the three
3837
3825
  * artifacts (`colgrep` binary, ONNX Runtime dylib, ColBERT INT8 model)
@@ -3862,11 +3850,11 @@ const SMOKE_TIMEOUT_MS = 3e4;
3862
3850
  const EXE_EXT = process$1.platform === "win32" ? ".exe" : "";
3863
3851
  /** Absolute path the provisioned colgrep binary lives at. */
3864
3852
  function colgrepBinaryPath() {
3865
- return path.join(PATHS.COLBERT_BIN_DIR, "colgrep" + EXE_EXT);
3853
+ return path$1.join(PATHS.COLBERT_BIN_DIR, "colgrep" + EXE_EXT);
3866
3854
  }
3867
3855
  /** Absolute path the provisioned model dir lives at (pinned revision). */
3868
3856
  function colbertModelDir() {
3869
- return path.join(PATHS.COLBERT_MODELS_DIR, "LateOn-Code-edge", modelDirName());
3857
+ return path$1.join(PATHS.COLBERT_MODELS_DIR, "LateOn-Code-edge", modelDirName());
3870
3858
  }
3871
3859
  /**
3872
3860
  * Canonical model argument for every colgrep invocation and project lookup.
@@ -3874,12 +3862,12 @@ function colbertModelDir() {
3874
3862
  * index into distinct project keys on Windows.
3875
3863
  */
3876
3864
  function canonicalColbertModelDir() {
3877
- return path.resolve(colbertModelDir());
3865
+ return path$1.resolve(colbertModelDir());
3878
3866
  }
3879
3867
  /** Absolute path a provisioned next-plaid-api server binary lives at. */
3880
3868
  function nextPlaidServerBinaryPath(variant) {
3881
3869
  const suffix = variant === "cuda" ? "-cuda" : "";
3882
- return path.join(PATHS.COLBERT_BIN_DIR, `next-plaid-api${suffix}${EXE_EXT}`);
3870
+ return path$1.join(PATHS.COLBERT_BIN_DIR, `next-plaid-api${suffix}${EXE_EXT}`);
3883
3871
  }
3884
3872
  /**
3885
3873
  * Provision the next-plaid-api server binary for the requested variant.
@@ -3909,7 +3897,7 @@ async function provisionNextPlaidServer(variant) {
3909
3897
  /** Absolute path the provisioned ORT dylib lives at. */
3910
3898
  function colbertOrtDylibPath() {
3911
3899
  const lib = ortLibAsset()?.member ?? "libonnxruntime.so";
3912
- return path.join(PATHS.COLBERT_ORT_DIR, ORT_VERSION, "cpu", lib);
3900
+ return path$1.join(PATHS.COLBERT_ORT_DIR, ORT_VERSION, "cpu", lib);
3913
3901
  }
3914
3902
  /**
3915
3903
  * Cheap on-disk presence check (no download, no smoke). Used by the
@@ -3918,7 +3906,7 @@ function colbertOrtDylibPath() {
3918
3906
  * all exist on disk.
3919
3907
  */
3920
3908
  function colbertArtifactsPresent() {
3921
- return existsSync(colgrepBinaryPath()) && existsSync(path.join(colbertModelDir(), "model_int8.onnx")) && existsSync(colbertOrtDylibPath());
3909
+ return existsSync(colgrepBinaryPath()) && existsSync(path$1.join(colbertModelDir(), "model_int8.onnx")) && existsSync(colbertOrtDylibPath());
3922
3910
  }
3923
3911
  /**
3924
3912
  * Router credentials that must NOT reach a colgrep child. colgrep is a
@@ -3944,7 +3932,7 @@ function dropColgrepSecrets(env) {
3944
3932
  }
3945
3933
  /** Marker file written next to the model dir once the smoke test passed. */
3946
3934
  function smokeMarkerPath() {
3947
- return path.join(PATHS.COLBERT_DIR, ".smoke-ok");
3935
+ return path$1.join(PATHS.COLBERT_DIR, ".smoke-ok");
3948
3936
  }
3949
3937
  /**
3950
3938
  * The content written into `.smoke-ok` on a successful smoke test:
@@ -4043,7 +4031,7 @@ async function provisionColbert() {
4043
4031
  async function provisionBinary(asset, dest) {
4044
4032
  const sidecar = `${dest}.sha256`;
4045
4033
  if (await installedArtifactIsIntact(sidecar, dest, asset.sha256)) return;
4046
- await mkdir(path.dirname(dest), { recursive: true });
4034
+ await mkdir(path$1.dirname(dest), { recursive: true });
4047
4035
  const archive = await download(asset.url);
4048
4036
  verifySha(archive, asset.sha256, "colgrep binary");
4049
4037
  const member = await extractMember(asset, archive, "colgrep");
@@ -4054,7 +4042,7 @@ async function provisionBinary(asset, dest) {
4054
4042
  async function provisionOrt(asset, dest) {
4055
4043
  const sidecar = `${dest}.sha256`;
4056
4044
  if (await installedArtifactIsIntact(sidecar, dest, asset.sha256)) return;
4057
- await mkdir(path.dirname(dest), { recursive: true });
4045
+ await mkdir(path$1.dirname(dest), { recursive: true });
4058
4046
  const archive = await download(asset.url);
4059
4047
  verifySha(archive, asset.sha256, "ONNX Runtime");
4060
4048
  const member = await extractMember(asset, archive, asset.member ?? "");
@@ -4062,15 +4050,15 @@ async function provisionOrt(asset, dest) {
4062
4050
  await atomicWrite(dest, member, true);
4063
4051
  await writeFile(sidecar, sidecarContent(asset.sha256, member)).catch(() => {});
4064
4052
  if (process$1.platform !== "win32" && asset.soname) {
4065
- const link = path.join(path.dirname(dest), asset.soname);
4053
+ const link = path$1.join(path$1.dirname(dest), asset.soname);
4066
4054
  await rm(link, { force: true }).catch(() => {});
4067
- await symlink(path.basename(dest), link).catch((err) => consola.debug("colbert: ORT soname symlink skipped:", err));
4055
+ await symlink(path$1.basename(dest), link).catch((err) => consola.debug("colbert: ORT soname symlink skipped:", err));
4068
4056
  }
4069
4057
  }
4070
4058
  async function provisionModel(modelDir) {
4071
4059
  await mkdir(modelDir, { recursive: true });
4072
4060
  for (const file of MODEL_FILES) {
4073
- const dest = path.join(modelDir, file.name);
4061
+ const dest = path$1.join(modelDir, file.name);
4074
4062
  if (existsSync(dest)) try {
4075
4063
  const have = await readFile(dest);
4076
4064
  if (createHash("sha256").update(have).digest("hex") === file.sha256) continue;
@@ -4085,7 +4073,7 @@ async function extractMember(asset, archive, wantBasename) {
4085
4073
  if (asset.archive === "zip") return extractZipMember(archive, wantBasename);
4086
4074
  if (asset.archive === "tar.gz") return extractTarGzMember(archive, wantBasename);
4087
4075
  if (asset.archive === "tar.xz") {
4088
- const tmp = path.join(PATHS.COLBERT_DIR, `xz-tmp-${process$1.pid}-${randomBytes(4).toString("hex")}`);
4076
+ const tmp = path$1.join(PATHS.COLBERT_DIR, `xz-tmp-${process$1.pid}-${randomBytes(4).toString("hex")}`);
4089
4077
  try {
4090
4078
  return await extractTarXzMember(archive, wantBasename, tmp);
4091
4079
  } finally {
@@ -4189,13 +4177,13 @@ function sidecarContent(archiveSha, installed) {
4189
4177
  * the dylib didn't load and we fail the smoke test even on exit 0.
4190
4178
  */
4191
4179
  async function runSmokeTest(binaryPath, ortDylibPath) {
4192
- const tmp = path.join(PATHS.COLBERT_DIR, `smoke-${process$1.pid}-${randomBytes(4).toString("hex")}`);
4193
- const fixtureDir = path.join(tmp, "fixture");
4194
- const dataDir = path.join(tmp, "data");
4180
+ const tmp = path$1.join(PATHS.COLBERT_DIR, `smoke-${process$1.pid}-${randomBytes(4).toString("hex")}`);
4181
+ const fixtureDir = path$1.join(tmp, "fixture");
4182
+ const dataDir = path$1.join(tmp, "data");
4195
4183
  try {
4196
4184
  await mkdir(fixtureDir, { recursive: true });
4197
4185
  await mkdir(dataDir, { recursive: true });
4198
- await writeFile(path.join(fixtureDir, "smoke.py"), "def smoke_test_function():\n return 1\n");
4186
+ await writeFile(path$1.join(fixtureDir, "smoke.py"), "def smoke_test_function():\n return 1\n");
4199
4187
  } catch {
4200
4188
  return {
4201
4189
  ok: false,
@@ -4208,7 +4196,7 @@ async function runSmokeTest(binaryPath, ortDylibPath) {
4208
4196
  COLGREP_DATA_DIR: dataDir,
4209
4197
  ORT_DYLIB_PATH: ortDylibPath,
4210
4198
  COLGREP_FORCE_CPU: "1",
4211
- PATH: `${path.dirname(ortDylibPath)}${path.delimiter}${process$1.env.PATH ?? ""}`
4199
+ PATH: `${path$1.dirname(ortDylibPath)}${path$1.delimiter}${process$1.env.PATH ?? ""}`
4212
4200
  });
4213
4201
  const res = await runManagedExeCapture(binaryPath, [
4214
4202
  "search",
@@ -4254,8 +4242,7 @@ async function runSmokeTest(binaryPath, ortDylibPath) {
4254
4242
  }).catch(() => {});
4255
4243
  }
4256
4244
  }
4257
- //#endregion
4258
- //#region src/lib/colbert/index-store.ts
4245
+ // src/lib/colbert/index-store.ts
4259
4246
  /**
4260
4247
  * ColBERT index store: router-owned sidecar metadata, the per-query
4261
4248
  * freshness verdict (git HEAD / dirty check), the `COLGREP_DATA_DIR`
@@ -4301,7 +4288,7 @@ function metaHashForWorkspace(workspace) {
4301
4288
  return (h >>> 0).toString(16).padStart(8, "0");
4302
4289
  }
4303
4290
  function metaPath(workspace) {
4304
- return path.join(PATHS.COLBERT_META_DIR, `${metaHashForWorkspace(workspace)}.json`);
4291
+ return path$1.join(PATHS.COLBERT_META_DIR, `${metaHashForWorkspace(workspace)}.json`);
4305
4292
  }
4306
4293
  /** Read the sidecar metadata for a workspace (null if none yet). */
4307
4294
  /**
@@ -4444,10 +4431,10 @@ async function colbertProjectDir(workspace) {
4444
4431
  const wantCanonical = await realpathForCompare(workspace);
4445
4432
  for (const name of names) {
4446
4433
  if (name === ".gh-router-meta" || name.includes(".corrupt-")) continue;
4447
- const dir = path.join(indicesDir, name);
4434
+ const dir = path$1.join(indicesDir, name);
4448
4435
  let proj;
4449
4436
  try {
4450
- proj = JSON.parse(await fs$1.readFile(path.join(dir, "project.json"), "utf8"));
4437
+ proj = JSON.parse(await fs$1.readFile(path$1.join(dir, "project.json"), "utf8"));
4451
4438
  } catch {
4452
4439
  continue;
4453
4440
  }
@@ -4491,7 +4478,7 @@ function validateIndexIntegrity(projectIndexDir) {
4491
4478
  if (names.length === 0) return { verdict: "not-built" };
4492
4479
  let sum = 0;
4493
4480
  for (const name of names) try {
4494
- const parsed = JSON.parse(readFileSync(path.join(projectIndexDir, name), "utf8"));
4481
+ const parsed = JSON.parse(readFileSync(path$1.join(projectIndexDir, name), "utf8"));
4495
4482
  const start = parsed.embedding_offset;
4496
4483
  const count = parsed.num_embeddings;
4497
4484
  if (typeof start !== "number" || typeof count !== "number" || !Number.isSafeInteger(start) || !Number.isSafeInteger(count) || start < 0 || count < 0) return {
@@ -4514,7 +4501,7 @@ function validateIndexIntegrity(projectIndexDir) {
4514
4501
  async function completedIndexOnDisk(workspace) {
4515
4502
  const projectDir = await colbertProjectDir(workspace);
4516
4503
  if (!projectDir) return false;
4517
- return validateIndexIntegrity(path.join(projectDir, "index")).verdict !== "not-built";
4504
+ return validateIndexIntegrity(path$1.join(projectDir, "index")).verdict !== "not-built";
4518
4505
  }
4519
4506
  /**
4520
4507
  * Strip a Windows extended-length prefix.
@@ -4545,21 +4532,21 @@ function stripExtendedPrefix(p) {
4545
4532
  */
4546
4533
  const _caseInsensitiveByRoot = /* @__PURE__ */ new Map();
4547
4534
  function volumeIsCaseInsensitive(p) {
4548
- const root = path.parse(path.resolve(p)).root || path.sep;
4535
+ const root = path$1.parse(path$1.resolve(p)).root || path$1.sep;
4549
4536
  const cached = _caseInsensitiveByRoot.get(root);
4550
4537
  if (cached !== void 0) return cached;
4551
4538
  let result = process$1.platform === "win32" || process$1.platform === "darwin";
4552
4539
  try {
4553
- let probe = path.resolve(p);
4540
+ let probe = path$1.resolve(p);
4554
4541
  for (let i = 0; i < 64 && !existsSync(probe); i++) {
4555
- const parent = path.dirname(probe);
4542
+ const parent = path$1.dirname(probe);
4556
4543
  if (parent === probe) break;
4557
4544
  probe = parent;
4558
4545
  }
4559
- const base = path.basename(probe);
4546
+ const base = path$1.basename(probe);
4560
4547
  if (base && /[a-z]/i.test(base)) {
4561
4548
  const flipped = base === base.toLowerCase() ? base.toUpperCase() : base.toLowerCase();
4562
- const sibling = path.join(path.dirname(probe), flipped);
4549
+ const sibling = path$1.join(path$1.dirname(probe), flipped);
4563
4550
  result = existsSync(sibling);
4564
4551
  }
4565
4552
  } catch {}
@@ -4591,7 +4578,7 @@ function canonicalWorkspace(p) {
4591
4578
  } catch {
4592
4579
  out = resolveThroughExistingAncestor(out);
4593
4580
  }
4594
- out = path.resolve(out);
4581
+ out = path$1.resolve(out);
4595
4582
  if (volumeIsCaseInsensitive(out)) out = out.toLowerCase();
4596
4583
  return process$1.platform === "win32" ? out.replaceAll("\\", "/") : out;
4597
4584
  }
@@ -4601,16 +4588,16 @@ function canonicalWorkspace(p) {
4601
4588
  * self.
4602
4589
  */
4603
4590
  function resolveThroughExistingAncestor(p) {
4604
- const abs = path.resolve(p);
4591
+ const abs = path$1.resolve(p);
4605
4592
  const tail = [];
4606
4593
  let cur = abs;
4607
4594
  for (let i = 0; i < 64; i++) try {
4608
4595
  const real = stripExtendedPrefix(realpathSync.native(cur));
4609
- return tail.length > 0 ? path.join(real, ...tail.reverse()) : real;
4596
+ return tail.length > 0 ? path$1.join(real, ...tail.reverse()) : real;
4610
4597
  } catch {
4611
- const parent = path.dirname(cur);
4598
+ const parent = path$1.dirname(cur);
4612
4599
  if (parent === cur) break;
4613
- tail.push(path.basename(cur));
4600
+ tail.push(path$1.basename(cur));
4614
4601
  cur = parent;
4615
4602
  }
4616
4603
  return abs;
@@ -4635,7 +4622,7 @@ function dirSizeSync(dir) {
4635
4622
  return [0, 0];
4636
4623
  }
4637
4624
  for (const e of entries) {
4638
- const p = path.join(dir, e.name);
4625
+ const p = path$1.join(dir, e.name);
4639
4626
  if (e.isDirectory()) {
4640
4627
  const [b, c] = dirSizeSync(p);
4641
4628
  bytes += b;
@@ -4659,10 +4646,10 @@ function indexDirSignature(workspace) {
4659
4646
  for (const name of names) {
4660
4647
  if (name === ".gh-router-meta") continue;
4661
4648
  if (name.includes(".corrupt-")) continue;
4662
- const dir = path.join(indicesDir, name);
4649
+ const dir = path$1.join(indicesDir, name);
4663
4650
  let proj;
4664
4651
  try {
4665
- proj = JSON.parse(readFileSync(path.join(dir, "project.json"), "utf8"));
4652
+ proj = JSON.parse(readFileSync(path$1.join(dir, "project.json"), "utf8"));
4666
4653
  } catch {
4667
4654
  continue;
4668
4655
  }
@@ -4748,7 +4735,7 @@ async function freshnessVerdict(workspace) {
4748
4735
  verdict: "building",
4749
4736
  meta
4750
4737
  };
4751
- const integrity = validateIndexIntegrity(path.join(projectDir, "index"));
4738
+ const integrity = validateIndexIntegrity(path$1.join(projectDir, "index"));
4752
4739
  if (integrity.verdict === "not-built") return {
4753
4740
  verdict: "building",
4754
4741
  meta
@@ -4989,8 +4976,7 @@ function releaseInit(workspace) {
4989
4976
  function initKey(workspace) {
4990
4977
  return `${MODEL_ID}::${canonicalForCompare(workspace)}`;
4991
4978
  }
4992
- //#endregion
4993
- //#region src/lib/colbert/runner.ts
4979
+ // src/lib/colbert/runner.ts
4994
4980
  /**
4995
4981
  * ColBERT sidecar runner: spawn `colgrep search` / `colgrep init` with
4996
4982
  * the isolating env + flags, parse `--json`, trim to the minimal MCP
@@ -5085,17 +5071,17 @@ let _runManagedExeCapture = runManagedExeCapture;
5085
5071
  * by tests (via the alias below).
5086
5072
  */
5087
5073
  async function waitForInit(workspace) {
5088
- await _initPromises.get(path.resolve(workspace));
5074
+ await _initPromises.get(path$1.resolve(workspace));
5089
5075
  }
5090
5076
  /** Build the isolating env for any colgrep child (search or init). */
5091
5077
  function colgrepEnv() {
5092
- const ortDir = path.dirname(colbertOrtDylibPath());
5078
+ const ortDir = path$1.dirname(colbertOrtDylibPath());
5093
5079
  return dropColgrepSecrets({
5094
5080
  ...process$1.env,
5095
5081
  COLGREP_DATA_DIR: PATHS.COLBERT_INDICES_DIR,
5096
5082
  ORT_DYLIB_PATH: colbertOrtDylibPath(),
5097
5083
  COLGREP_FORCE_CPU: "1",
5098
- PATH: `${ortDir}${path.delimiter}${process$1.env.PATH ?? ""}`
5084
+ PATH: `${ortDir}${path$1.delimiter}${process$1.env.PATH ?? ""}`
5099
5085
  });
5100
5086
  }
5101
5087
  /**
@@ -5201,7 +5187,7 @@ async function quarantineProjectDir(projectDir) {
5201
5187
  return true;
5202
5188
  }
5203
5189
  async function repairCorruptIndex(workspace, meta) {
5204
- const wsKey = path.resolve(workspace);
5190
+ const wsKey = path$1.resolve(workspace);
5205
5191
  const attempts = (meta?.failureClass === "corrupt" ? meta.failedAttempts ?? 0 : 0) + 1;
5206
5192
  const failedMeta = {
5207
5193
  workspace,
@@ -5383,7 +5369,7 @@ async function spawnSearch(opts) {
5383
5369
  ];
5384
5370
  if (opts.pattern) args.push("-e", opts.pattern);
5385
5371
  args.push(opts.query, opts.workspace);
5386
- const wsKey = path.resolve(opts.workspace);
5372
+ const wsKey = path$1.resolve(opts.workspace);
5387
5373
  if (_searchIndexInFlight.has(wsKey)) return {
5388
5374
  status: "building",
5389
5375
  notice: "semantic index is busy (another search is running); retry shortly"
@@ -5524,7 +5510,7 @@ function relativize(file, workspace, workspaceReal) {
5524
5510
  const normalizedFile = stripExtendedPathPrefix(file);
5525
5511
  for (const rawBase of [workspace, workspaceReal]) try {
5526
5512
  const base = stripExtendedPathPrefix(rawBase);
5527
- const flavor = /^[a-z]:[\\/]/i.test(base) || base.startsWith("\\\\") ? path.win32 : path;
5513
+ const flavor = /^[a-z]:[\\/]/i.test(base) || base.startsWith("\\\\") ? path$1.win32 : path$1;
5528
5514
  const rel = flavor.relative(base, normalizedFile);
5529
5515
  if (rel && !rel.startsWith("..") && !flavor.isAbsolute(rel)) return rel;
5530
5516
  } catch {}
@@ -5553,7 +5539,7 @@ function clampLimit(limit) {
5553
5539
  function kickBackgroundInit(workspace) {
5554
5540
  if (isInitInFlight(workspace)) return;
5555
5541
  if (!tryClaimInit(workspace)) return;
5556
- const key = path.resolve(workspace);
5542
+ const key = path$1.resolve(workspace);
5557
5543
  const promise = runInit(workspace).catch(async (err) => {
5558
5544
  releaseInit(workspace);
5559
5545
  consola.error("colbert: background init failed:", err);
@@ -5622,7 +5608,7 @@ async function startupKickAllowed(workspace) {
5622
5608
  function colbertParallelSessions() {
5623
5609
  const raw = Number(process$1.env.GH_ROUTER_COLBERT_PARALLEL);
5624
5610
  if (Number.isSafeInteger(raw) && raw > 0) return raw;
5625
- const threads = os.availableParallelism?.() ?? os.cpus?.().length ?? 4;
5611
+ const threads = os$1.availableParallelism?.() ?? os$1.cpus?.().length ?? 4;
5626
5612
  return Math.max(2, Math.floor(threads * .25));
5627
5613
  }
5628
5614
  /**
@@ -5714,7 +5700,7 @@ async function runInit(workspace) {
5714
5700
  ok = !res.stalled && !res.timedOut && res.code === 0;
5715
5701
  if (ok) {
5716
5702
  const projectDir = await colbertProjectDir(workspace);
5717
- ok = projectDir !== null && validateIndexIntegrity(path.join(projectDir, "index")).verdict === "coherent";
5703
+ ok = projectDir !== null && validateIndexIntegrity(path$1.join(projectDir, "index")).verdict === "coherent";
5718
5704
  if (!ok) {
5719
5705
  failureClass = "corrupt";
5720
5706
  if (projectDir) await quarantineProjectDir(projectDir);
@@ -5759,8 +5745,7 @@ async function runInit(workspace) {
5759
5745
  }
5760
5746
  await writeColbertMeta(finalMeta).catch(() => {});
5761
5747
  }
5762
- //#endregion
5763
- //#region src/lib/colbert/service.ts
5748
+ // src/lib/colbert/service.ts
5764
5749
  /**
5765
5750
  * next-plaid-api service client + managed lifecycle (Phase 2e).
5766
5751
  *
@@ -6142,7 +6127,7 @@ function serverParallelSessions(foreground = false) {
6142
6127
  if (Number.isSafeInteger(raw) && raw > 0) return raw;
6143
6128
  let cpus = 4;
6144
6129
  try {
6145
- cpus = os$1.cpus().length;
6130
+ cpus = os.cpus().length;
6146
6131
  } catch {}
6147
6132
  if (foreground) return Math.max(1, cpus);
6148
6133
  return Math.max(1, Math.floor(cpus * .25));
@@ -6156,8 +6141,7 @@ function indexNameForWorkspace(canonicalWorkspace) {
6156
6141
  }
6157
6142
  return `ws-${(h >>> 0).toString(16).padStart(8, "0")}`;
6158
6143
  }
6159
- //#endregion
6160
- //#region src/lib/colbert/units.ts
6144
+ // src/lib/colbert/units.ts
6161
6145
  /**
6162
6146
  * Semantic code-unit extraction (Phase 2b).
6163
6147
  *
@@ -6344,8 +6328,7 @@ async function extractUnits(absPath, relPath, signal) {
6344
6328
  } catch {}
6345
6329
  }
6346
6330
  }
6347
- //#endregion
6348
- //#region src/lib/colbert/service-backend.ts
6331
+ // src/lib/colbert/service-backend.ts
6349
6332
  /**
6350
6333
  * Service-backed semantic search orchestration (Phase 2e query path).
6351
6334
  *
@@ -6479,7 +6462,7 @@ async function ensureServer(opts = {}) {
6479
6462
  const resolved = await resolveServerBinaryWithVariant(await selectServerVariant());
6480
6463
  if (!resolved) return null;
6481
6464
  _starting = (async () => {
6482
- const ortDir = path.dirname(colbertOrtDylibPath());
6465
+ const ortDir = path$1.dirname(colbertOrtDylibPath());
6483
6466
  const svc = await startManagedServer({
6484
6467
  binaryPath: resolved.binary,
6485
6468
  modelDir: canonicalColbertModelDir(),
@@ -6488,7 +6471,7 @@ async function ensureServer(opts = {}) {
6488
6471
  cuda: resolved.cuda,
6489
6472
  env: {
6490
6473
  ORT_DYLIB_PATH: colbertOrtDylibPath(),
6491
- PATH: `${ortDir}${path.delimiter}${process.env.PATH ?? ""}`
6474
+ PATH: `${ortDir}${path$1.delimiter}${process.env.PATH ?? ""}`
6492
6475
  },
6493
6476
  startupTimeoutMs: 12e4
6494
6477
  });
@@ -6505,7 +6488,7 @@ async function ensureServer(opts = {}) {
6505
6488
  }
6506
6489
  }
6507
6490
  function serviceMetaPath(workspace) {
6508
- return path.join(PATHS.COLBERT_META_DIR, `svc-${metaHash(workspace)}.json`);
6491
+ return path$1.join(PATHS.COLBERT_META_DIR, `svc-${metaHash(workspace)}.json`);
6509
6492
  }
6510
6493
  function metaHash(workspace) {
6511
6494
  const canonical = canonicalWorkspace(workspace);
@@ -6618,7 +6601,7 @@ async function hashFile(absPath) {
6618
6601
  async function hashFilesParallel(relPaths, workspace, signal, onProgress) {
6619
6602
  let cpus = 4;
6620
6603
  try {
6621
- cpus = os.cpus().length;
6604
+ cpus = os$1.cpus().length;
6622
6605
  } catch {}
6623
6606
  const concurrency = Math.max(1, Math.min(16, cpus, relPaths.length));
6624
6607
  const out = {};
@@ -6631,7 +6614,7 @@ async function hashFilesParallel(relPaths, workspace, signal, onProgress) {
6631
6614
  next += 1;
6632
6615
  if (i >= relPaths.length) break;
6633
6616
  const rel = relPaths[i];
6634
- const hash = await hashFile(path.join(workspace, rel));
6617
+ const hash = await hashFile(path$1.join(workspace, rel));
6635
6618
  if (hash !== void 0) out[rel] = hash;
6636
6619
  scanned += 1;
6637
6620
  onProgress?.(scanned, relPaths.length);
@@ -6642,7 +6625,7 @@ async function hashFilesParallel(relPaths, workspace, signal, onProgress) {
6642
6625
  }
6643
6626
  /** Fire-and-forget per-workspace populate (single-flight). Never throws. */
6644
6627
  function kickServiceIndex(workspace) {
6645
- const key = path.resolve(workspace);
6628
+ const key = path$1.resolve(workspace);
6646
6629
  if (_populateInFlight.has(key)) return;
6647
6630
  _populateInFlight.add(key);
6648
6631
  const p = populateWorkspace(workspace).catch((err) => {
@@ -6699,7 +6682,7 @@ async function enumerateSourceFiles(rgPath, workspace, signal) {
6699
6682
  while ((idx = buf.indexOf(0)) >= 0 && files.length < POPULATE_MAX_FILES) {
6700
6683
  const rel = buf.subarray(0, idx).toString("utf8");
6701
6684
  buf = buf.subarray(idx + 1);
6702
- if (rel.length > 0 && !path.isAbsolute(rel)) files.push(rel.replace(/\\/g, "/"));
6685
+ if (rel.length > 0 && !path$1.isAbsolute(rel)) files.push(rel.replace(/\\/g, "/"));
6703
6686
  }
6704
6687
  if (files.length >= POPULATE_MAX_FILES) finish(files);
6705
6688
  });
@@ -6922,7 +6905,7 @@ async function populateWorkspace(workspace, opts = {}) {
6922
6905
  }
6923
6906
  let cpus = 4;
6924
6907
  try {
6925
- cpus = os.cpus().length;
6908
+ cpus = os$1.cpus().length;
6926
6909
  } catch {}
6927
6910
  const parseConcurrency = opts.foreground === true ? Math.max(4, Math.min(16, cpus)) : POPULATE_PARSE_CONCURRENCY;
6928
6911
  let units = [];
@@ -6952,7 +6935,7 @@ async function populateWorkspace(workspace, opts = {}) {
6952
6935
  if (i >= changed.length) break;
6953
6936
  const rel = changed[i];
6954
6937
  try {
6955
- const r = await extractUnits(path.join(canonical, rel), rel, signal);
6938
+ const r = await extractUnits(path$1.join(canonical, rel), rel, signal);
6956
6939
  fileUnitCounts[rel] = r.units.length;
6957
6940
  for (const u of r.units) {
6958
6941
  units.push({
@@ -7100,7 +7083,6 @@ function buildSnippet(h) {
7100
7083
  const sig = typeof meta.signature === "string" ? meta.signature : "";
7101
7084
  return sig.length > 0 ? `${sig}\n${h.file}:${h.line}` : `${h.file}:${h.line}`;
7102
7085
  }
7103
- //#endregion
7104
7086
  export { validateWorkspace as A, provisionColbert as C, colbertPlatformSupported as D, extractZipMember as E, outlineFile as F, provisionTreeSitterAssets as I, withInstallLock as L, isSensitivePath as M, recommendedRgThreads as N, resolveRipgrep as O, warmTreeSitterPool as P, colbertSmokeOk as S, extractTarGzMember as T, gitState as _, semanticBackend as a, validateIndexIntegrity as b, serviceFreshness as c, runSemanticSearch as d, startupKickAllowed as f, freshnessVerdict as g, completedIndexOnDisk as h, selectServerVariant as i, confineToWorkspaceResult as j, searchCode as k, stopServiceServer as l, colbertProjectDir as m, populateWorkspace as n, serviceBackendEnabled as o, waitForInit as p, runServiceSearch as r, serviceBackendProvisionable as s, ensureServerForeground as t, kickBackgroundInit as u, indexDirSignature as v, provisionNextPlaidServer as w, colbertArtifactsPresent as x, readColbertMeta as y };
7105
7087
 
7106
- //# sourceMappingURL=service-backend-BV2hHjuB.js.map
7088
+ //# sourceMappingURL=service-backend-Ce6b2XEe.js.map