@ashlr/hub 3.5.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/CHANGELOG.md +160 -0
  2. package/README.md +3 -0
  3. package/dist/build-identity.json +2 -2
  4. package/dist/cli/activation.d.ts +41 -0
  5. package/dist/cli/activation.js +485 -0
  6. package/dist/cli/activation.js.map +1 -0
  7. package/dist/core/daemon/cutoff-checkpoint-scheduler.js +7 -0
  8. package/dist/core/daemon/cutoff-checkpoint-scheduler.js.map +1 -1
  9. package/dist/core/daemon/loop.d.ts +19 -0
  10. package/dist/core/daemon/loop.js +235 -5
  11. package/dist/core/daemon/loop.js.map +1 -1
  12. package/dist/core/daemon/overnight-status.d.ts +152 -0
  13. package/dist/core/daemon/overnight-status.js +275 -0
  14. package/dist/core/daemon/overnight-status.js.map +1 -0
  15. package/dist/core/daemon/post-merge-halt.d.ts +212 -0
  16. package/dist/core/daemon/post-merge-halt.js +503 -0
  17. package/dist/core/daemon/post-merge-halt.js.map +1 -0
  18. package/dist/core/daemon/run-window.d.ts +218 -0
  19. package/dist/core/daemon/run-window.js +420 -0
  20. package/dist/core/daemon/run-window.js.map +1 -0
  21. package/dist/core/fleet/external-skill-audit.js +1 -1
  22. package/dist/core/fleet/external-skill-audit.js.map +1 -1
  23. package/dist/core/fleet/generated-repair-resolution.d.ts +36 -0
  24. package/dist/core/fleet/generated-repair-resolution.js +245 -0
  25. package/dist/core/fleet/generated-repair-resolution.js.map +1 -0
  26. package/dist/core/local-runtime/llama/config.d.ts +28 -6
  27. package/dist/core/local-runtime/llama/config.js +28 -6
  28. package/dist/core/local-runtime/llama/config.js.map +1 -1
  29. package/dist/core/local-runtime/llama/port.d.ts +17 -0
  30. package/dist/core/local-runtime/llama/port.js +47 -0
  31. package/dist/core/local-runtime/llama/port.js.map +1 -0
  32. package/dist/core/local-runtime/llama/proxy-host.d.ts +54 -0
  33. package/dist/core/local-runtime/llama/proxy-host.js +159 -0
  34. package/dist/core/local-runtime/llama/proxy-host.js.map +1 -0
  35. package/dist/core/local-runtime/llama/proxy-process.d.ts +148 -0
  36. package/dist/core/local-runtime/llama/proxy-process.js +250 -0
  37. package/dist/core/local-runtime/llama/proxy-process.js.map +1 -0
  38. package/dist/core/local-runtime/llama/proxy-record.d.ts +40 -0
  39. package/dist/core/local-runtime/llama/proxy-record.js +133 -0
  40. package/dist/core/local-runtime/llama/proxy-record.js.map +1 -0
  41. package/dist/core/local-runtime/llama/proxy-supervisor.d.ts +118 -0
  42. package/dist/core/local-runtime/llama/proxy-supervisor.js +511 -0
  43. package/dist/core/local-runtime/llama/proxy-supervisor.js.map +1 -0
  44. package/dist/core/web/public/next/assets/App-Cgi6j1Gk.css +1 -0
  45. package/dist/core/web/public/next/assets/App-vtaHB9mp.js +7 -0
  46. package/dist/core/web/public/next/assets/App-vtaHB9mp.js.map +1 -0
  47. package/dist/core/web/public/next/assets/ApprovalsSection-B-bFJ0I9.js +2 -0
  48. package/dist/core/web/public/next/assets/ApprovalsSection-B-bFJ0I9.js.map +1 -0
  49. package/dist/core/web/public/next/assets/ApprovalsSection-Su-NUTis.css +1 -0
  50. package/dist/core/web/public/next/assets/AutonomySection-CHjxJt2z.css +1 -0
  51. package/dist/core/web/public/next/assets/AutonomySection-DoqmsCjw.js +2 -0
  52. package/dist/core/web/public/next/assets/AutonomySection-DoqmsCjw.js.map +1 -0
  53. package/dist/core/web/public/next/assets/ChatSection-BfnLe5dT.css +1 -0
  54. package/dist/core/web/public/next/assets/ChatSection-vNPIJffd.js +80 -0
  55. package/dist/core/web/public/next/assets/ChatSection-vNPIJffd.js.map +1 -0
  56. package/dist/core/web/public/next/assets/ConfirmDialog-Dd2APQhB.js +2 -0
  57. package/dist/core/web/public/next/assets/ConfirmDialog-Dd2APQhB.js.map +1 -0
  58. package/dist/core/web/public/next/assets/{ConfirmDialog-cYuivhCX.css → ConfirmDialog-Dx15x0Ho.css} +1 -1
  59. package/dist/core/web/public/next/assets/Dialog-CPM9JxBc.js +2 -0
  60. package/dist/core/web/public/next/assets/Dialog-CPM9JxBc.js.map +1 -0
  61. package/dist/core/web/public/next/assets/Dialog-tQ8kFulD.css +1 -0
  62. package/dist/core/web/public/next/assets/DiffViewer-B84qVef9.js +7 -0
  63. package/dist/core/web/public/next/assets/DiffViewer-B84qVef9.js.map +1 -0
  64. package/dist/core/web/public/next/assets/DiffViewer-C8HHTnVE.css +1 -0
  65. package/dist/core/web/public/next/assets/McpSection-CEUpV_5X.js +2 -0
  66. package/dist/core/web/public/next/assets/McpSection-CEUpV_5X.js.map +1 -0
  67. package/dist/core/web/public/next/assets/McpSection-D88QlDpG.css +1 -0
  68. package/dist/core/web/public/next/assets/Meter--h3MmZS-.js +2 -0
  69. package/dist/core/web/public/next/assets/Meter--h3MmZS-.js.map +1 -0
  70. package/dist/core/web/public/next/assets/Meter-CLcr-4wS.css +1 -0
  71. package/dist/core/web/public/next/assets/{MutationTokenDialog-jWLLCxWn.css → MutationTokenDialog-CrfJ0PdD.css} +1 -1
  72. package/dist/core/web/public/next/assets/MutationTokenDialog-DA8t97XT.js +2 -0
  73. package/dist/core/web/public/next/assets/MutationTokenDialog-DA8t97XT.js.map +1 -0
  74. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-Bq7Vyud0.js +7 -0
  75. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-Bq7Vyud0.js.map +1 -0
  76. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-CM_8pJs6.css +1 -0
  77. package/dist/core/web/public/next/assets/RouteErrorBoundary-Badio_uO.js +2 -0
  78. package/dist/core/web/public/next/assets/RouteErrorBoundary-Badio_uO.js.map +1 -0
  79. package/dist/core/web/public/next/assets/RouteErrorBoundary-ekyMXAK8.css +1 -0
  80. package/dist/core/web/public/next/assets/SettingsSection-BII7TTSD.css +1 -0
  81. package/dist/core/web/public/next/assets/SettingsSection-BwrpQlpP.js +2 -0
  82. package/dist/core/web/public/next/assets/SettingsSection-BwrpQlpP.js.map +1 -0
  83. package/dist/core/web/public/next/assets/UniverseConsoleApp-Dh7A-hLD.css +1 -0
  84. package/dist/core/web/public/next/assets/UniverseConsoleApp-_FSohAdN.js +2 -0
  85. package/dist/core/web/public/next/assets/UniverseConsoleApp-_FSohAdN.js.map +1 -0
  86. package/dist/core/web/public/next/assets/UniverseView-Bqa8DH57.css +1 -0
  87. package/dist/core/web/public/next/assets/UniverseView-DqcXbed4.js +9 -0
  88. package/dist/core/web/public/next/assets/UniverseView-DqcXbed4.js.map +1 -0
  89. package/dist/core/web/public/next/assets/UsageSection-Bq6Daaby.js +2 -0
  90. package/dist/core/web/public/next/assets/UsageSection-Bq6Daaby.js.map +1 -0
  91. package/dist/core/web/public/next/assets/UsageSection-DwgNOYvi.css +1 -0
  92. package/dist/core/web/public/next/assets/VerseConsoleApp-CMkCizvL.css +1 -0
  93. package/dist/core/web/public/next/assets/VerseConsoleApp-CsIQv9id.js +3 -0
  94. package/dist/core/web/public/next/assets/VerseConsoleApp-CsIQv9id.js.map +1 -0
  95. package/dist/core/web/public/next/assets/charts-CTZJ-JrH.js +2 -0
  96. package/dist/core/web/public/next/assets/charts-CTZJ-JrH.js.map +1 -0
  97. package/dist/core/web/public/next/assets/charts-CsrtT4rk.css +1 -0
  98. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js +2 -0
  99. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js.map +1 -0
  100. package/dist/core/web/public/next/assets/format-BNYWGJat.js +2 -0
  101. package/dist/core/web/public/next/assets/format-BNYWGJat.js.map +1 -0
  102. package/dist/core/web/public/next/assets/global-D6bTxIRn.js +2 -0
  103. package/dist/core/web/public/next/assets/global-D6bTxIRn.js.map +1 -0
  104. package/dist/core/web/public/next/assets/global-z-JfD3ow.css +1 -0
  105. package/dist/core/web/public/next/assets/icons-D9vlf85u.js +2 -0
  106. package/dist/core/web/public/next/assets/icons-D9vlf85u.js.map +1 -0
  107. package/dist/core/web/public/next/assets/index-CZamKRUg.js +11 -0
  108. package/dist/core/web/public/next/assets/index-CZamKRUg.js.map +1 -0
  109. package/dist/core/web/public/next/assets/queries-B8eBnFox.js +2 -0
  110. package/dist/core/web/public/next/assets/queries-B8eBnFox.js.map +1 -0
  111. package/dist/core/web/public/next/assets/use-guarded-action-bzrVVAYq.js +2 -0
  112. package/dist/core/web/public/next/assets/use-guarded-action-bzrVVAYq.js.map +1 -0
  113. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js +2 -0
  114. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js.map +1 -0
  115. package/dist/core/web/public/next/assets/workspace-model-v0a1gl-C.js +2 -0
  116. package/dist/core/web/public/next/assets/workspace-model-v0a1gl-C.js.map +1 -0
  117. package/dist/core/web/public/next/index.html +1 -1
  118. package/dist/release-dependency-inventory.json +1 -1
  119. package/node_modules/marked/README.md +8 -0
  120. package/node_modules/marked/bin/main.js +12 -11
  121. package/node_modules/marked/lib/marked.d.ts +88 -25
  122. package/node_modules/marked/lib/marked.esm.js +50 -44
  123. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  124. package/node_modules/marked/lib/marked.umd.js +50 -44
  125. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  126. package/node_modules/marked/man/marked.1 +1 -1
  127. package/node_modules/marked/package.json +21 -21
  128. package/package.json +13 -8
  129. package/dist/core/web/public/next/assets/App-BCKqSppK.css +0 -1
  130. package/dist/core/web/public/next/assets/App-CsbPYQqy.js +0 -16
  131. package/dist/core/web/public/next/assets/App-CsbPYQqy.js.map +0 -1
  132. package/dist/core/web/public/next/assets/ApprovalsSection-CBZquyLK.js +0 -2
  133. package/dist/core/web/public/next/assets/ApprovalsSection-CBZquyLK.js.map +0 -1
  134. package/dist/core/web/public/next/assets/ApprovalsSection-CRP59wSb.css +0 -1
  135. package/dist/core/web/public/next/assets/AutonomySection-CQVpEdCE.js +0 -2
  136. package/dist/core/web/public/next/assets/AutonomySection-CQVpEdCE.js.map +0 -1
  137. package/dist/core/web/public/next/assets/AutonomySection-DTN6m6QE.css +0 -1
  138. package/dist/core/web/public/next/assets/ChatSection-DiRvNX3Q.css +0 -1
  139. package/dist/core/web/public/next/assets/ChatSection-DmE9K0Tg.js +0 -77
  140. package/dist/core/web/public/next/assets/ChatSection-DmE9K0Tg.js.map +0 -1
  141. package/dist/core/web/public/next/assets/ConfirmDialog-deO0C0iY.js +0 -2
  142. package/dist/core/web/public/next/assets/ConfirmDialog-deO0C0iY.js.map +0 -1
  143. package/dist/core/web/public/next/assets/Dialog-CNd7q89m.js +0 -2
  144. package/dist/core/web/public/next/assets/Dialog-CNd7q89m.js.map +0 -1
  145. package/dist/core/web/public/next/assets/Dialog-DxN7RgB5.css +0 -1
  146. package/dist/core/web/public/next/assets/DiffViewer-DTO0KRuG.js +0 -7
  147. package/dist/core/web/public/next/assets/DiffViewer-DTO0KRuG.js.map +0 -1
  148. package/dist/core/web/public/next/assets/DiffViewer-hN7X6wGT.css +0 -1
  149. package/dist/core/web/public/next/assets/Epistemic-53PikaUI.js +0 -2
  150. package/dist/core/web/public/next/assets/Epistemic-53PikaUI.js.map +0 -1
  151. package/dist/core/web/public/next/assets/Epistemic-DiyMyeaN.css +0 -1
  152. package/dist/core/web/public/next/assets/Meter-CGBsbXUX.css +0 -1
  153. package/dist/core/web/public/next/assets/Meter-DRWZQgr1.js +0 -2
  154. package/dist/core/web/public/next/assets/Meter-DRWZQgr1.js.map +0 -1
  155. package/dist/core/web/public/next/assets/MutationTokenDialog-DYF8n_RD.js +0 -2
  156. package/dist/core/web/public/next/assets/MutationTokenDialog-DYF8n_RD.js.map +0 -1
  157. package/dist/core/web/public/next/assets/RefreshIndicator-DXJQXKyA.js +0 -2
  158. package/dist/core/web/public/next/assets/RefreshIndicator-DXJQXKyA.js.map +0 -1
  159. package/dist/core/web/public/next/assets/RefreshIndicator-O7jUBOmX.css +0 -1
  160. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-DLl4DbGG.css +0 -1
  161. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-hDSEFdLU.js +0 -7
  162. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-hDSEFdLU.js.map +0 -1
  163. package/dist/core/web/public/next/assets/RouteErrorBoundary-BIpdnxp-.css +0 -1
  164. package/dist/core/web/public/next/assets/RouteErrorBoundary-CZd7ln8v.js +0 -2
  165. package/dist/core/web/public/next/assets/RouteErrorBoundary-CZd7ln8v.js.map +0 -1
  166. package/dist/core/web/public/next/assets/SettingsSection-C9Qs9JWW.js +0 -2
  167. package/dist/core/web/public/next/assets/SettingsSection-C9Qs9JWW.js.map +0 -1
  168. package/dist/core/web/public/next/assets/SettingsSection-DGJMdUh2.css +0 -1
  169. package/dist/core/web/public/next/assets/Skeleton-D2JaTXyv.css +0 -1
  170. package/dist/core/web/public/next/assets/Skeleton-YkcOpgFb.js +0 -2
  171. package/dist/core/web/public/next/assets/Skeleton-YkcOpgFb.js.map +0 -1
  172. package/dist/core/web/public/next/assets/StatusBadge-DJw0LSPg.js +0 -2
  173. package/dist/core/web/public/next/assets/StatusBadge-DJw0LSPg.js.map +0 -1
  174. package/dist/core/web/public/next/assets/StatusBadge-TpDqZf6K.css +0 -1
  175. package/dist/core/web/public/next/assets/TableView-Bj-w1O6o.js +0 -2
  176. package/dist/core/web/public/next/assets/TableView-Bj-w1O6o.js.map +0 -1
  177. package/dist/core/web/public/next/assets/TableView-R6Yeztp1.css +0 -1
  178. package/dist/core/web/public/next/assets/UniverseConsoleApp-Bs2fxaen.js +0 -2
  179. package/dist/core/web/public/next/assets/UniverseConsoleApp-Bs2fxaen.js.map +0 -1
  180. package/dist/core/web/public/next/assets/UniverseConsoleApp-CiZZxRPV.css +0 -1
  181. package/dist/core/web/public/next/assets/UniverseView-B6b2hw-8.js +0 -9
  182. package/dist/core/web/public/next/assets/UniverseView-B6b2hw-8.js.map +0 -1
  183. package/dist/core/web/public/next/assets/UniverseView-gBxl6yum.css +0 -1
  184. package/dist/core/web/public/next/assets/UsageSection-C__ziNkV.js +0 -2
  185. package/dist/core/web/public/next/assets/UsageSection-C__ziNkV.js.map +0 -1
  186. package/dist/core/web/public/next/assets/UsageSection-UUYDidOg.css +0 -1
  187. package/dist/core/web/public/next/assets/VerseConsoleApp-Cu5aG6J6.js +0 -3
  188. package/dist/core/web/public/next/assets/VerseConsoleApp-Cu5aG6J6.js.map +0 -1
  189. package/dist/core/web/public/next/assets/VerseConsoleApp-mOAXvWa6.css +0 -1
  190. package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js +0 -2
  191. package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js.map +0 -1
  192. package/dist/core/web/public/next/assets/format-fggwu_Rs.js +0 -2
  193. package/dist/core/web/public/next/assets/format-fggwu_Rs.js.map +0 -1
  194. package/dist/core/web/public/next/assets/global-BHjd6fVZ.js +0 -2
  195. package/dist/core/web/public/next/assets/global-BHjd6fVZ.js.map +0 -1
  196. package/dist/core/web/public/next/assets/global-BeRYd1Bu.css +0 -1
  197. package/dist/core/web/public/next/assets/index-CJ-e8YA9.js +0 -2
  198. package/dist/core/web/public/next/assets/index-CJ-e8YA9.js.map +0 -1
  199. package/dist/core/web/public/next/assets/index-CpgkRaTi.js +0 -51
  200. package/dist/core/web/public/next/assets/index-CpgkRaTi.js.map +0 -1
  201. package/dist/core/web/public/next/assets/queries-856qUN3Y.js +0 -2
  202. package/dist/core/web/public/next/assets/queries-856qUN3Y.js.map +0 -1
  203. package/dist/core/web/public/next/assets/use-guarded-action-Bqa2v0a-.css +0 -1
  204. package/dist/core/web/public/next/assets/use-guarded-action-DwaESKVy.js +0 -2
  205. package/dist/core/web/public/next/assets/use-guarded-action-DwaESKVy.js.map +0 -1
  206. package/dist/core/web/public/next/assets/verse-model-Dllo8rRt.js +0 -2
  207. package/dist/core/web/public/next/assets/verse-model-Dllo8rRt.js.map +0 -1
  208. package/dist/core/web/public/next/assets/workspace-model-JgmWDKt4.js +0 -2
  209. package/dist/core/web/public/next/assets/workspace-model-JgmWDKt4.js.map +0 -1
  210. /package/node_modules/marked/{LICENSE.md → LICENSE} +0 -0
@@ -126,14 +126,36 @@ export declare const NO_LOCAL_AGENT_DEFAULTS: LocalAgentRequestDefaults;
126
126
  * and ~1s was prompt (473 tokens against a warm prefix cache). So `low` is
127
127
  * worth roughly 3.8x on the decode-bound part of a turn.
128
128
  *
129
- * It is still NOT the default here. Every task in that battery is a SINGLE
130
- * tool call, and single-call accuracy is not evidence about multi-step
131
- * debugging — which is the work the local lane actually has to do. Shipping a
132
- * global reduction in a reasoning model's thinking on single-call evidence is
133
- * the kind of over-claim this module's history is made of. The mechanism is
129
+ * It is still NOT the default here — and the multi-step battery that the
130
+ * paragraph above asked for has since been run, which CHANGES WHICH VALUE an
131
+ * operator should pick while leaving the default alone.
132
+ *
133
+ * 5 agentic tasks x 3 efforts x 3 trials, plus a long-horizon `api-migration`
134
+ * arm run separately at a 1500s budget:
135
+ *
136
+ * arm pass mean decode total wall
137
+ * xhigh 15/15 1582 4208s
138
+ * medium 15/15 766 (2.07x fewer) 2545s
139
+ * low 15/15 1061 (1.49x fewer) 2657s
140
+ *
141
+ * THE LADDER IS NOT MONOTONIC. `medium` beats `low` on decode AND wall-clock,
142
+ * on 5 of 6 tasks, and the mechanism is visible in the turn counts: `low`
143
+ * under-thinks per turn and pays it back in extra tool-calling round trips
144
+ * (`refuse-unsafe-delete` 3.0 -> 4.0 turns, `edge-case-parser` 5.0 -> 6.3, and
145
+ * one `api-migration` trial at 10 turns/806s against medium's worst of
146
+ * 8/413s). So the single-call result above — which ranked `low` best — does
147
+ * not survive multi-step work. Prefer `medium`.
148
+ *
149
+ * Quality remains a NON-RESULT, which is why the shipped default still does
150
+ * not move: every arm went 15/15, so there are no failures to compare. That
151
+ * BOUNDS the difference rather than measuring it — Wilson is [0.80, 1.00] per
152
+ * arm, so a regression under roughly 20 points would have been invisible, and
153
+ * separating 100% from 95% would need 100+ trials per arm. The mechanism is
134
154
  * here, the numbers are here, and the operator chooses:
135
155
  *
136
- * "models": { "llamaServer": { "agentDefaults": { "reasoningEffort": "low" } } }
156
+ * "models": { "llamaServer": { "agentDefaults": { "reasoningEffort": "medium" } } }
157
+ *
158
+ * Reports for every trial are in `baselines/` alongside this lane's others.
137
159
  *
138
160
  * SAMPLING is off for a different reason: it was measured and REJECTED. The
139
161
  * hypothesis was that llama-server's chat-tuned defaults (temperature 1.0,
@@ -123,14 +123,36 @@ function num(value, min, max) {
123
123
  * and ~1s was prompt (473 tokens against a warm prefix cache). So `low` is
124
124
  * worth roughly 3.8x on the decode-bound part of a turn.
125
125
  *
126
- * It is still NOT the default here. Every task in that battery is a SINGLE
127
- * tool call, and single-call accuracy is not evidence about multi-step
128
- * debugging — which is the work the local lane actually has to do. Shipping a
129
- * global reduction in a reasoning model's thinking on single-call evidence is
130
- * the kind of over-claim this module's history is made of. The mechanism is
126
+ * It is still NOT the default here — and the multi-step battery that the
127
+ * paragraph above asked for has since been run, which CHANGES WHICH VALUE an
128
+ * operator should pick while leaving the default alone.
129
+ *
130
+ * 5 agentic tasks x 3 efforts x 3 trials, plus a long-horizon `api-migration`
131
+ * arm run separately at a 1500s budget:
132
+ *
133
+ * arm pass mean decode total wall
134
+ * xhigh 15/15 1582 4208s
135
+ * medium 15/15 766 (2.07x fewer) 2545s
136
+ * low 15/15 1061 (1.49x fewer) 2657s
137
+ *
138
+ * THE LADDER IS NOT MONOTONIC. `medium` beats `low` on decode AND wall-clock,
139
+ * on 5 of 6 tasks, and the mechanism is visible in the turn counts: `low`
140
+ * under-thinks per turn and pays it back in extra tool-calling round trips
141
+ * (`refuse-unsafe-delete` 3.0 -> 4.0 turns, `edge-case-parser` 5.0 -> 6.3, and
142
+ * one `api-migration` trial at 10 turns/806s against medium's worst of
143
+ * 8/413s). So the single-call result above — which ranked `low` best — does
144
+ * not survive multi-step work. Prefer `medium`.
145
+ *
146
+ * Quality remains a NON-RESULT, which is why the shipped default still does
147
+ * not move: every arm went 15/15, so there are no failures to compare. That
148
+ * BOUNDS the difference rather than measuring it — Wilson is [0.80, 1.00] per
149
+ * arm, so a regression under roughly 20 points would have been invisible, and
150
+ * separating 100% from 95% would need 100+ trials per arm. The mechanism is
131
151
  * here, the numbers are here, and the operator chooses:
132
152
  *
133
- * "models": { "llamaServer": { "agentDefaults": { "reasoningEffort": "low" } } }
153
+ * "models": { "llamaServer": { "agentDefaults": { "reasoningEffort": "medium" } } }
154
+ *
155
+ * Reports for every trial are in `baselines/` alongside this lane's others.
134
156
  *
135
157
  * SAMPLING is off for a different reason: it was measured and REJECTED. The
136
158
  * hypothesis was that llama-server's chat-tuned defaults (temperature 1.0,
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/core/local-runtime/llama/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIlD,uEAAuE;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEvC,0EAA0E;AAC1E,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAE7C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAEjD,yEAAyE;AACzE,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,kBAAkB,KAAK,CAAC;AAuBnF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,6B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AG,yBAAyB,CAAC,GAAG,CAAC,CAAC;IAC/C,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC;AAChE,CAAC;AAED,wEAAwE;AACxE,MAAM,UAAU,wBAAwB,CAAC,GAAiB;IACxD,MAAM,IAAI,GAAG,yBAAyB,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACtC,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,8BAA8B,CAAC,GAAiB;IAC9D,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACtC,IAAI,UAAU;QAAE,OAAO,UAAU,CAAC;IAClC,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;IACrC,IAAI,MAAM,EAAE,QAAQ;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC;IAC7C,OAAO,uBAAuB,CAAC;AACjC,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * "Can we bind this port right now?" — one answer, shared by both supervisors.
3
+ *
4
+ * This lived in supervisor.ts and was moved here verbatim when the Anthropic
5
+ * proxy grew a supervisor of its own: proxy-supervisor.ts needs the same
6
+ * question answered, and supervisor.ts already imports proxy-supervisor.ts, so
7
+ * leaving it where it was would have made the two modules import each other.
8
+ * supervisor.ts still re-exports it, so nothing downstream moved.
9
+ */
10
+ /**
11
+ * Can we bind this port right now?
12
+ *
13
+ * A dead process is not the same as a released port: a socket in TIME_WAIT, or
14
+ * a descendant still holding the listener, both keep the port busy while the
15
+ * pid we killed is gone. `stop` reports the port free only when this says so.
16
+ */
17
+ export declare function isPortFree(host: string, port: number, timeoutMs?: number): Promise<boolean>;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * "Can we bind this port right now?" — one answer, shared by both supervisors.
3
+ *
4
+ * This lived in supervisor.ts and was moved here verbatim when the Anthropic
5
+ * proxy grew a supervisor of its own: proxy-supervisor.ts needs the same
6
+ * question answered, and supervisor.ts already imports proxy-supervisor.ts, so
7
+ * leaving it where it was would have made the two modules import each other.
8
+ * supervisor.ts still re-exports it, so nothing downstream moved.
9
+ */
10
+ import { createServer } from 'node:net';
11
+ /**
12
+ * Can we bind this port right now?
13
+ *
14
+ * A dead process is not the same as a released port: a socket in TIME_WAIT, or
15
+ * a descendant still holding the listener, both keep the port busy while the
16
+ * pid we killed is gone. `stop` reports the port free only when this says so.
17
+ */
18
+ export function isPortFree(host, port, timeoutMs = 1_000) {
19
+ return new Promise((resolve) => {
20
+ const server = createServer();
21
+ let settled = false;
22
+ const finish = (free) => {
23
+ if (settled)
24
+ return;
25
+ settled = true;
26
+ try {
27
+ server.close();
28
+ }
29
+ catch {
30
+ // Already closed.
31
+ }
32
+ resolve(free);
33
+ };
34
+ const timer = setTimeout(() => finish(false), timeoutMs);
35
+ if (typeof timer.unref === 'function')
36
+ timer.unref();
37
+ server.once('error', () => {
38
+ clearTimeout(timer);
39
+ finish(false);
40
+ });
41
+ server.listen({ host, port, exclusive: true }, () => {
42
+ clearTimeout(timer);
43
+ finish(true);
44
+ });
45
+ });
46
+ }
47
+ //# sourceMappingURL=port.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"port.js","sourceRoot":"","sources":["../../../../src/core/local-runtime/llama/port.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,IAAY,EAAE,SAAS,GAAG,KAAK;IACtE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;QAC9B,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,MAAM,GAAG,CAAC,IAAa,EAAQ,EAAE;YACrC,IAAI,OAAO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,CAAC;gBACH,MAAM,CAAC,KAAK,EAAE,CAAC;YACjB,CAAC;YAAC,MAAM,CAAC;gBACP,kBAAkB;YACpB,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;QACzD,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;YAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QACrD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE;YACxB,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE;YAClD,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The proxy host process — what `ashlr local-runtime --_proxy-host` runs.
3
+ *
4
+ * This module IS the 24/7 local-agent story. Before it existed the Anthropic
5
+ * normalising proxy was an in-process singleton: a long-lived host kept it up,
6
+ * but `ashlr local-runtime start` set `process.exitCode`, returned to the shell
7
+ * and took the listener with it — llama-server survived (it is detached), so
8
+ * the operator was left with a serving runtime Claude Code could not talk to
9
+ * and no way to fix it but to keep a scratch script alive by hand.
10
+ *
11
+ * The fix is the one the runtime it fronts already uses: a detached child with
12
+ * an ownership record. This file is that child's whole body.
13
+ *
14
+ * WHAT DOES NOT CROSS THE ARGV BOUNDARY, and why it is the point:
15
+ *
16
+ * The bind host. Argv carries two integers — the proxy's port and
17
+ * llama-server's — and nothing else. The host is re-derived HERE from the
18
+ * persisted config and re-gated by `gateBindHost`, so there is no argument,
19
+ * environment variable or spawn site anywhere that can put this listener on
20
+ * the network. Neither this proxy nor llama-server behind it has any
21
+ * authentication of any kind: whoever reaches the port can run inference and
22
+ * read every slot's prompt. Leaving loopback still requires the persisted
23
+ * `models.llamaServer.allowNonLoopback: true` opt-in and nothing else.
24
+ *
25
+ * (Re-gating here is belt AND braces: `startAnthropicProxy` gates its own
26
+ * `host` argument too. Two gates on one value is deliberate — this is a
27
+ * detached, unattended process, and the cost of the redundancy is one
28
+ * function call.)
29
+ */
30
+ /** The two integers the host accepts. Nothing else is a valid invocation. */
31
+ export interface ProxyHostArgs {
32
+ port: number;
33
+ upstreamPort: number;
34
+ }
35
+ /**
36
+ * Parse the host's argv.
37
+ *
38
+ * PURE and strict: an unknown flag, a repeat, a missing value or an
39
+ * out-of-range integer is a refusal, not a default. This argv is written by
40
+ * this program for this program, so anything unexpected means the two halves
41
+ * have drifted — and a proxy that silently binds a port nobody asked for is
42
+ * worse than one that refuses to start and says so in its log.
43
+ */
44
+ export declare function parseProxyHostArgs(args: readonly string[]): ProxyHostArgs | {
45
+ error: string;
46
+ };
47
+ /**
48
+ * Run the proxy until a shutdown signal arrives. Resolves with an exit code.
49
+ *
50
+ * Never throws: this process has no terminal to print a stack trace to, so
51
+ * every failure is a line in the stderr log and a non-zero code the supervisor
52
+ * can see through the ownership record going stale.
53
+ */
54
+ export declare function runAnthropicProxyHost(args: readonly string[]): Promise<number>;
@@ -0,0 +1,159 @@
1
+ /**
2
+ * The proxy host process — what `ashlr local-runtime --_proxy-host` runs.
3
+ *
4
+ * This module IS the 24/7 local-agent story. Before it existed the Anthropic
5
+ * normalising proxy was an in-process singleton: a long-lived host kept it up,
6
+ * but `ashlr local-runtime start` set `process.exitCode`, returned to the shell
7
+ * and took the listener with it — llama-server survived (it is detached), so
8
+ * the operator was left with a serving runtime Claude Code could not talk to
9
+ * and no way to fix it but to keep a scratch script alive by hand.
10
+ *
11
+ * The fix is the one the runtime it fronts already uses: a detached child with
12
+ * an ownership record. This file is that child's whole body.
13
+ *
14
+ * WHAT DOES NOT CROSS THE ARGV BOUNDARY, and why it is the point:
15
+ *
16
+ * The bind host. Argv carries two integers — the proxy's port and
17
+ * llama-server's — and nothing else. The host is re-derived HERE from the
18
+ * persisted config and re-gated by `gateBindHost`, so there is no argument,
19
+ * environment variable or spawn site anywhere that can put this listener on
20
+ * the network. Neither this proxy nor llama-server behind it has any
21
+ * authentication of any kind: whoever reaches the port can run inference and
22
+ * read every slot's prompt. Leaving loopback still requires the persisted
23
+ * `models.llamaServer.allowNonLoopback: true` opt-in and nothing else.
24
+ *
25
+ * (Re-gating here is belt AND braces: `startAnthropicProxy` gates its own
26
+ * `host` argument too. Two gates on one value is deliberate — this is a
27
+ * detached, unattended process, and the cost of the redundancy is one
28
+ * function call.)
29
+ */
30
+ import { loadConfigReadOnly } from '../../config.js';
31
+ import { startAnthropicProxy } from './anthropic-proxy.js';
32
+ import { allowsNonLoopback, gateBindHost, originFor, resolveLlamaRuntimeConfig, } from './config.js';
33
+ import { ANTHROPIC_PROXY_PORT_FLAG, ANTHROPIC_PROXY_UPSTREAM_PORT_FLAG, } from './proxy-process.js';
34
+ /** Signals that mean "shut down cleanly", i.e. what `stop` sends. */
35
+ const SHUTDOWN_SIGNALS = ['SIGTERM', 'SIGINT', 'SIGHUP'];
36
+ /**
37
+ * Parse the host's argv.
38
+ *
39
+ * PURE and strict: an unknown flag, a repeat, a missing value or an
40
+ * out-of-range integer is a refusal, not a default. This argv is written by
41
+ * this program for this program, so anything unexpected means the two halves
42
+ * have drifted — and a proxy that silently binds a port nobody asked for is
43
+ * worse than one that refuses to start and says so in its log.
44
+ */
45
+ export function parseProxyHostArgs(args) {
46
+ let port;
47
+ let upstreamPort;
48
+ const integer = (raw, flag) => {
49
+ const value = Number.parseInt(raw ?? '', 10);
50
+ if (!Number.isInteger(value) || value < 1 || value > 65_535) {
51
+ return { error: `${flag} expects a port between 1 and 65535` };
52
+ }
53
+ return value;
54
+ };
55
+ for (let index = 0; index < args.length; index += 1) {
56
+ const arg = args[index];
57
+ if (arg !== ANTHROPIC_PROXY_PORT_FLAG && arg !== ANTHROPIC_PROXY_UPSTREAM_PORT_FLAG) {
58
+ return { error: `unexpected argument "${arg}"` };
59
+ }
60
+ const parsed = integer(args[index + 1], arg);
61
+ if (typeof parsed !== 'number')
62
+ return parsed;
63
+ index += 1;
64
+ if (arg === ANTHROPIC_PROXY_PORT_FLAG) {
65
+ if (port !== undefined)
66
+ return { error: `${arg} given twice` };
67
+ port = parsed;
68
+ }
69
+ else {
70
+ if (upstreamPort !== undefined)
71
+ return { error: `${arg} given twice` };
72
+ upstreamPort = parsed;
73
+ }
74
+ }
75
+ if (port === undefined)
76
+ return { error: `${ANTHROPIC_PROXY_PORT_FLAG} is required` };
77
+ if (upstreamPort === undefined) {
78
+ return { error: `${ANTHROPIC_PROXY_UPSTREAM_PORT_FLAG} is required` };
79
+ }
80
+ return { port, upstreamPort };
81
+ }
82
+ /**
83
+ * Run the proxy until a shutdown signal arrives. Resolves with an exit code.
84
+ *
85
+ * Never throws: this process has no terminal to print a stack trace to, so
86
+ * every failure is a line in the stderr log and a non-zero code the supervisor
87
+ * can see through the ownership record going stale.
88
+ */
89
+ export async function runAnthropicProxyHost(args) {
90
+ const parsed = parseProxyHostArgs(args);
91
+ if ('error' in parsed) {
92
+ console.error(`anthropic-proxy host: ${parsed.error}`);
93
+ return 2;
94
+ }
95
+ const cfg = loadConfigReadOnly();
96
+ const runtime = resolveLlamaRuntimeConfig(cfg);
97
+ // Re-gated rather than trusted. `resolveLlamaRuntimeConfig` already applied
98
+ // the rule, but this process is detached and unattended, so the value is
99
+ // re-checked at the point of use where the refusal can still be logged.
100
+ const { host, downgradedFrom } = gateBindHost(runtime.host, allowsNonLoopback(cfg));
101
+ // TWO sources of "a non-loopback host was refused", and both are reported:
102
+ //
103
+ // `runtime.hostDowngradedFrom` is the resolver's own refusal — the one that
104
+ // actually fires in practice, because `resolveLlamaRuntimeConfig` gates
105
+ // before it returns. It carries the host that was REQUESTED (via
106
+ // ASHLR_LOCAL_RUNTIME_HOST or models.llamaServer.host), which is the only
107
+ // spelling worth printing: by the time the value reaches `gateBindHost`
108
+ // below it has already been replaced.
109
+ //
110
+ // `downgradedFrom` is this module's own re-gate. It cannot fire while the
111
+ // resolver gates first, and that is exactly why it stays: it is the
112
+ // assertion that this detached, unattended process never binds a host it
113
+ // did not check itself, and it would fire the day someone hands this
114
+ // function an ungated host.
115
+ const refused = runtime.hostDowngradedFrom ?? downgradedFrom;
116
+ if (refused !== null) {
117
+ console.error(`anthropic-proxy host: refused the non-loopback bind host '${refused}'; ` +
118
+ `binding ${host} instead. llama-server and this proxy have no authentication of any ` +
119
+ 'kind, so leaving loopback requires the persisted opt-in ' +
120
+ 'models.llamaServer.allowNonLoopback=true.');
121
+ }
122
+ const upstreamOrigin = originFor(host, parsed.upstreamPort);
123
+ let handle;
124
+ try {
125
+ handle = await startAnthropicProxy({
126
+ cfg,
127
+ host,
128
+ port: parsed.port,
129
+ upstreamOrigin,
130
+ // The whole reason this process exists. Without it Node sees an empty
131
+ // event loop and exits before serving a single request.
132
+ holdProcessOpen: true,
133
+ });
134
+ }
135
+ catch (err) {
136
+ console.error(`anthropic-proxy host: could not bind ${host}:${parsed.port} — ` +
137
+ `${err instanceof Error ? err.message : String(err)}`);
138
+ return 1;
139
+ }
140
+ console.log(`anthropic-proxy host: listening on ${handle.origin} -> ${handle.upstreamOrigin} ` +
141
+ `(pid ${process.pid}, started ${new Date().toISOString()})`);
142
+ await new Promise((done) => {
143
+ let shuttingDown = false;
144
+ const shutdown = (signal) => {
145
+ if (shuttingDown)
146
+ return;
147
+ shuttingDown = true;
148
+ console.log(`anthropic-proxy host: ${signal} received, releasing ${handle.origin}`);
149
+ // `close()` cuts live SSE sockets as well as the listener, so this is
150
+ // bounded even with a generation in flight. Once it resolves nothing
151
+ // ref'd is left and Node exits on its own.
152
+ void handle.close().then(() => done(), () => done());
153
+ };
154
+ for (const signal of SHUTDOWN_SIGNALS)
155
+ process.on(signal, shutdown);
156
+ });
157
+ return 0;
158
+ }
159
+ //# sourceMappingURL=proxy-host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-host.js","sourceRoot":"","sources":["../../../../src/core/local-runtime/llama/proxy-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,yBAAyB,GAC1B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,oBAAoB,CAAC;AAE5B,qEAAqE;AACrE,MAAM,gBAAgB,GAA8B,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAQpF;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAuB;IACxD,IAAI,IAAwB,CAAC;IAC7B,IAAI,YAAgC,CAAC;IAErC,MAAM,OAAO,GAAG,CAAC,GAAuB,EAAE,IAAY,EAA8B,EAAE;QACpF,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,MAAM,EAAE,CAAC;YAC5D,OAAO,EAAE,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B,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CACX,wCAAwC,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK;YAC9D,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CACxD,CAAC;QACF,OAAO,CAAC,CAAC;IACX,CAAC;IAED,OAAO,CAAC,GAAG,CACT,sCAAsC,MAAM,CAAC,MAAM,OAAO,MAAM,CAAC,cAAc,GAAG;QAChF,QAAQ,OAAO,CAAC,GAAG,aAAa,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,GAAG,CAC9D,CAAC;IAEF,MAAM,IAAI,OAAO,CAAO,CAAC,IAAI,EAAE,EAAE;QAC/B,IAAI,YAAY,GAAG,KAAK,CAAC;QACzB,MAAM,QAAQ,GAAG,CAAC,MAAsB,EAAQ,EAAE;YAChD,IAAI,YAAY;gBAAE,OAAO;YACzB,YAAY,GAAG,IAAI,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,yBAAyB,MAAM,wBAAwB,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;YACpF,sEAAsE;YACtE,qEAAqE;YACrE,2CAA2C;YAC3C,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CACtB,GAAG,EAAE,CAAC,IAAI,EAAE,EACZ,GAAG,EAAE,CAAC,IAAI,EAAE,CACb,CAAC;QACJ,CAAC,CAAC;QACF,KAAK,MAAM,MAAM,IAAI,gBAAgB;YAAE,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACtE,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * Identity and invocation for the DETACHED Anthropic proxy host process.
3
+ *
4
+ * Two jobs, both of which are "a pid is not an identity" problems:
5
+ *
6
+ * 1. HOW TO START ONE. The proxy runs as a child of the hub's own CLI, so
7
+ * something has to answer "what argv re-enters this program?" — and the
8
+ * answer differs in all three shipping runtimes. See
9
+ * {@link anthropicProxyHostInvocation}.
10
+ *
11
+ * 2. HOW TO RECOGNISE ONE. `proxy-supervisor.ts` must be able to adopt a proxy
12
+ * it did not spawn, refuse a listener it does not own, and terminate only
13
+ * what is genuinely ours after a pid has possibly been recycled. That is
14
+ * the same discipline process.ts applies to llama-server, with the same
15
+ * rule: EVERY condition must hold, because any one of them alone is
16
+ * forgeable by an unrelated command line.
17
+ *
18
+ * WHY THE ENTRY POINT IS A SUBCOMMAND AND NOT A TOP-LEVEL FLAG: the hub already
19
+ * has internal re-entry flags (`--_cutoff-checkpoint-supervisor`, the probe
20
+ * helpers), all dispatched from `src/cli/index.ts`. This one is reached as
21
+ * `local-runtime --_proxy-host` instead, so the whole dispatch lives inside the
22
+ * `local-runtime` command that owns it. The flag is operand-free apart from two
23
+ * integers, absent from help and completions, and — the part that matters —
24
+ * CANNOT carry a bind host. The child re-derives its host from the persisted
25
+ * config and re-applies `gateBindHost`, so no argv anywhere can move the
26
+ * listener off loopback. See proxy-host.ts.
27
+ */
28
+ import type { AnthropicProxyOwnershipRecord } from './types.js';
29
+ /** The `local-runtime` subcommand word that re-enters this program as a proxy. */
30
+ export declare const ANTHROPIC_PROXY_HOST_FLAG = "--_proxy-host";
31
+ /** The command word the internal flag lives under. */
32
+ export declare const ANTHROPIC_PROXY_COMMAND = "local-runtime";
33
+ /** Flag naming the port the PROXY binds. */
34
+ export declare const ANTHROPIC_PROXY_PORT_FLAG = "--anthropic-port";
35
+ /** Flag naming the llama-server port the proxy forwards to. */
36
+ export declare const ANTHROPIC_PROXY_UPSTREAM_PORT_FLAG = "--upstream-port";
37
+ /** A proxy host process discovered by scanning the process table. */
38
+ export interface DiscoveredAnthropicProxy {
39
+ pid: number;
40
+ argv: string;
41
+ /** Absolute executable path, recovered from argv[0]. */
42
+ execPath: string;
43
+ }
44
+ /**
45
+ * Argv (after argv[0]) for a proxy host serving `port` from `upstreamPort`.
46
+ *
47
+ * PURE, so the exact spelling is pinned by unit tests rather than discovered
48
+ * from a running process — and so {@link argvMatchesProxyRecord} and this
49
+ * function cannot drift apart into a supervisor that can start a proxy it can
50
+ * never recognise again.
51
+ */
52
+ export declare function anthropicProxyHostArgs(port: number, upstreamPort: number): string[];
53
+ /** The runtime facts entry-point resolution depends on, injectable for tests. */
54
+ export interface HostInvocationContext {
55
+ /** `process.execPath` — the real on-disk executable. */
56
+ execPath: string;
57
+ /** `process.argv[1]` — the entry script, absent for a packaged binary. */
58
+ entry: string | undefined;
59
+ /** `process.execArgv` — carries tsx's loader in dev. */
60
+ execArgv: readonly string[];
61
+ /** This module's own `import.meta.url`. The signal argv cannot fake. */
62
+ moduleUrl: string;
63
+ /**
64
+ * The SPAWNER's working directory, which is what a bare loader specifier
65
+ * would otherwise be resolved against. See {@link absoluteLoaderSpecifier}.
66
+ */
67
+ cwd: string;
68
+ }
69
+ /**
70
+ * Build the command + argv that re-enters this program as a proxy host.
71
+ *
72
+ * THREE SHIPPING RUNTIMES, and the middle one is the trap:
73
+ *
74
+ * dev / tsx → node <tsx --require/--import> src/cli/index.ts local-runtime …
75
+ * npm dist → node dist/cli/index.js local-runtime …
76
+ * Bun binary → <the binary itself> local-runtime …
77
+ *
78
+ * "Compiled" means: re-invoking `execPath` alone re-enters this program, so the
79
+ * entry script must NOT be passed as a command word. Four independent signals
80
+ * decide it, because each covers a case the others miss — this is the same
81
+ * reasoning as `cutoffCaptureCliInvocation` in the daemon, and it is written
82
+ * out again here rather than imported because that function's name, flag
83
+ * argument and failure mode all belong to cutoff capture:
84
+ *
85
+ * 1. `bundledIntoSingleFileBinary(moduleUrl)` — INTRINSIC. Inside a Bun
86
+ * single-file binary every bundled module's URL collapses onto the virtual
87
+ * root, and that is true no matter how the process was invoked. This is
88
+ * the signal argv cannot fool.
89
+ * 2. no `entry` at all — a packaged binary invoked with no script operand.
90
+ * 3. `insideSingleFileBinaryRoot(entry)` — Bun sets argv[1] to
91
+ * `/$bunfs/root/_entry.js`, a path that does not exist on disk. Spawning
92
+ * it would hand the CLI a command word it parses as an unknown command and
93
+ * rejects with exit 2 — a proxy that never starts and never says why. This
94
+ * is also the only form a unit test can simulate, since `import.meta.url`
95
+ * cannot be stubbed.
96
+ * 4. `entry === execPath` — a Node SEA, where argv[1] IS the executable and
97
+ * `import.meta.url` is an ordinary on-disk path.
98
+ *
99
+ * This repository has shipped the /$bunfs/root defect three times (both account
100
+ * probes, then cutoff capture). Signals 1 and 3 are precisely what
101
+ * probe-helper-invocation.ts exports to stop it happening a fourth.
102
+ */
103
+ export declare function anthropicProxyHostInvocation(port: number, upstreamPort: number, context: HostInvocationContext): {
104
+ command: string;
105
+ args: string[];
106
+ };
107
+ /** This process's own facts, for the non-test call site. */
108
+ export declare function currentHostInvocationContext(moduleUrl: string): HostInvocationContext;
109
+ /**
110
+ * Does an argv line carry `--anthropic-port <n>` for exactly this port?
111
+ *
112
+ * Matches the `=` spelling too, so a hand-typed invocation is still recognised
113
+ * as ours rather than becoming an unkillable stranger on our own port.
114
+ */
115
+ export declare function argvBindsAnthropicPort(argv: string, port: number): boolean;
116
+ /**
117
+ * Is this argv line a proxy host invocation (and not, say, a grep for one)?
118
+ *
119
+ * Requires BOTH the command word and the internal flag as standalone tokens.
120
+ * The flag is undocumented and absent from help, parsing and completions, so an
121
+ * argv carrying it is one this program wrote — but requiring the command word
122
+ * as well keeps a stray mention in some other tool's arguments from being
123
+ * mistaken for a process we may terminate.
124
+ */
125
+ export declare function isAnthropicProxyHostArgv(argv: string): boolean;
126
+ /**
127
+ * Does this argv line belong to the proxy host described by the record?
128
+ *
129
+ * Pure, so the rule is testable without a live process. Three independent facts
130
+ * must all hold before the recorded pid may be signalled — the direct analogue
131
+ * of {@link import('./process.js').argvMatchesRecord}:
132
+ *
133
+ * 1. argv[0] is the recorded executable,
134
+ * 2. it is a proxy host invocation at all, and
135
+ * 3. it binds the recorded proxy port.
136
+ *
137
+ * A recycled pid belongs to some other program, whose argv will not be our CLI
138
+ * re-entering itself on our port — which is what makes recycling harmless.
139
+ */
140
+ export declare function argvMatchesProxyRecord(argv: string, record: AnthropicProxyOwnershipRecord): boolean;
141
+ /**
142
+ * Find every live proxy host bound to `port`.
143
+ *
144
+ * Used to ADOPT a proxy this process did not spawn — the ordinary case, since
145
+ * `ashlr local-runtime start` exits and the next invocation is a different
146
+ * process entirely — and to let `stop` release the port afterwards.
147
+ */
148
+ export declare function findAnthropicProxiesOnPort(port: number): DiscoveredAnthropicProxy[];