@ashlr/hub 3.4.0 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/CHANGELOG.md +107 -1
  2. package/README.md +3 -0
  3. package/dist/build-identity.json +2 -2
  4. package/dist/cli/index.js +11 -0
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/cli/local-runtime.js +40 -9
  7. package/dist/cli/local-runtime.js.map +1 -1
  8. package/dist/core/fleet/external-skill-audit.js +1 -1
  9. package/dist/core/fleet/external-skill-audit.js.map +1 -1
  10. package/dist/core/local-eval/classify.d.ts +57 -0
  11. package/dist/core/local-eval/classify.js +121 -0
  12. package/dist/core/local-eval/classify.js.map +1 -0
  13. package/dist/core/local-eval/configuration.d.ts +37 -0
  14. package/dist/core/local-eval/configuration.js +171 -0
  15. package/dist/core/local-eval/configuration.js.map +1 -0
  16. package/dist/core/local-eval/index.d.ts +15 -0
  17. package/dist/core/local-eval/index.js +16 -0
  18. package/dist/core/local-eval/index.js.map +1 -0
  19. package/dist/core/local-eval/main.d.ts +31 -0
  20. package/dist/core/local-eval/main.js +174 -0
  21. package/dist/core/local-eval/main.js.map +1 -0
  22. package/dist/core/local-eval/report.d.ts +25 -0
  23. package/dist/core/local-eval/report.js +157 -0
  24. package/dist/core/local-eval/report.js.map +1 -0
  25. package/dist/core/local-eval/runner.d.ts +55 -0
  26. package/dist/core/local-eval/runner.js +290 -0
  27. package/dist/core/local-eval/runner.js.map +1 -0
  28. package/dist/core/local-eval/tasks.d.ts +22 -0
  29. package/dist/core/local-eval/tasks.js +303 -0
  30. package/dist/core/local-eval/tasks.js.map +1 -0
  31. package/dist/core/local-eval/trace.d.ts +67 -0
  32. package/dist/core/local-eval/trace.js +309 -0
  33. package/dist/core/local-eval/trace.js.map +1 -0
  34. package/dist/core/local-eval/types.d.ts +262 -0
  35. package/dist/core/local-eval/types.js +23 -0
  36. package/dist/core/local-eval/types.js.map +1 -0
  37. package/dist/core/local-runtime/llama/anthropic-proxy-host.d.ts +68 -0
  38. package/dist/core/local-runtime/llama/anthropic-proxy-host.js +120 -0
  39. package/dist/core/local-runtime/llama/anthropic-proxy-host.js.map +1 -0
  40. package/dist/core/local-runtime/llama/anthropic-proxy-process.d.ts +15 -0
  41. package/dist/core/local-runtime/llama/anthropic-proxy-process.js +21 -0
  42. package/dist/core/local-runtime/llama/anthropic-proxy-process.js.map +1 -0
  43. package/dist/core/local-runtime/llama/anthropic-proxy.d.ts +2 -1
  44. package/dist/core/local-runtime/llama/anthropic-proxy.js +14 -6
  45. package/dist/core/local-runtime/llama/anthropic-proxy.js.map +1 -1
  46. package/dist/core/local-runtime/llama/anthropic-shim.d.ts +33 -0
  47. package/dist/core/local-runtime/llama/anthropic-shim.js +59 -0
  48. package/dist/core/local-runtime/llama/anthropic-shim.js.map +1 -1
  49. package/dist/core/local-runtime/llama/config.d.ts +123 -6
  50. package/dist/core/local-runtime/llama/config.js +196 -6
  51. package/dist/core/local-runtime/llama/config.js.map +1 -1
  52. package/dist/core/local-runtime/llama/index.d.ts +15 -0
  53. package/dist/core/local-runtime/llama/index.js +13 -0
  54. package/dist/core/local-runtime/llama/index.js.map +1 -1
  55. package/dist/core/local-runtime/llama/paths.d.ts +17 -0
  56. package/dist/core/local-runtime/llama/paths.js +25 -0
  57. package/dist/core/local-runtime/llama/paths.js.map +1 -1
  58. package/dist/core/local-runtime/llama/proxy-invocation.d.ts +101 -0
  59. package/dist/core/local-runtime/llama/proxy-invocation.js +134 -0
  60. package/dist/core/local-runtime/llama/proxy-invocation.js.map +1 -0
  61. package/dist/core/local-runtime/llama/proxy-launchd.d.ts +83 -0
  62. package/dist/core/local-runtime/llama/proxy-launchd.js +216 -0
  63. package/dist/core/local-runtime/llama/proxy-launchd.js.map +1 -0
  64. package/dist/core/local-runtime/llama/shapes.d.ts +2 -1
  65. package/dist/core/local-runtime/llama/shapes.js +2 -1
  66. package/dist/core/local-runtime/llama/shapes.js.map +1 -1
  67. package/dist/core/verse/adapters/claude.js +16 -0
  68. package/dist/core/verse/adapters/claude.js.map +1 -1
  69. package/dist/core/verse/adapters/codex.js +60 -2
  70. package/dist/core/verse/adapters/codex.js.map +1 -1
  71. package/dist/core/verse/adapters/grok.js +13 -0
  72. package/dist/core/verse/adapters/grok.js.map +1 -1
  73. package/dist/core/verse/control-api.d.ts +8 -9
  74. package/dist/core/verse/control-api.js +14 -114
  75. package/dist/core/verse/control-api.js.map +1 -1
  76. package/dist/core/verse/github-api.d.ts +50 -0
  77. package/dist/core/verse/github-api.js +211 -0
  78. package/dist/core/verse/github-api.js.map +1 -0
  79. package/dist/core/verse/github-proposal.d.ts +64 -0
  80. package/dist/core/verse/github-proposal.js +186 -0
  81. package/dist/core/verse/github-proposal.js.map +1 -0
  82. package/dist/core/verse/github-repo.d.ts +104 -0
  83. package/dist/core/verse/github-repo.js +476 -0
  84. package/dist/core/verse/github-repo.js.map +1 -0
  85. package/dist/core/verse/github-types.d.ts +174 -0
  86. package/dist/core/verse/github-types.js +31 -0
  87. package/dist/core/verse/github-types.js.map +1 -0
  88. package/dist/core/verse/mcp-cli-health.d.ts +149 -0
  89. package/dist/core/verse/mcp-cli-health.js +227 -0
  90. package/dist/core/verse/mcp-cli-health.js.map +1 -0
  91. package/dist/core/verse/mcp-control-api.d.ts +68 -0
  92. package/dist/core/verse/mcp-control-api.js +322 -0
  93. package/dist/core/verse/mcp-control-api.js.map +1 -0
  94. package/dist/core/verse/mcp-mutation.d.ts +187 -0
  95. package/dist/core/verse/mcp-mutation.js +471 -0
  96. package/dist/core/verse/mcp-mutation.js.map +1 -0
  97. package/dist/core/verse/mcp-scope.d.ts +114 -0
  98. package/dist/core/verse/mcp-scope.js +149 -0
  99. package/dist/core/verse/mcp-scope.js.map +1 -0
  100. package/dist/core/verse/mcp-seat-view.d.ts +197 -0
  101. package/dist/core/verse/mcp-seat-view.js +322 -0
  102. package/dist/core/verse/mcp-seat-view.js.map +1 -0
  103. package/dist/core/verse/path-guard.d.ts +115 -0
  104. package/dist/core/verse/path-guard.js +171 -0
  105. package/dist/core/verse/path-guard.js.map +1 -0
  106. package/dist/core/verse/seats.js +30 -2
  107. package/dist/core/verse/seats.js.map +1 -1
  108. package/dist/core/verse/session-engine.js +60 -1
  109. package/dist/core/verse/session-engine.js.map +1 -1
  110. package/dist/core/verse/session-store.js +20 -0
  111. package/dist/core/verse/session-store.js.map +1 -1
  112. package/dist/core/verse/types.d.ts +225 -1
  113. package/dist/core/verse/types.js +26 -0
  114. package/dist/core/verse/types.js.map +1 -1
  115. package/dist/core/verse/verse-api.d.ts +16 -1
  116. package/dist/core/verse/verse-api.js +338 -16
  117. package/dist/core/verse/verse-api.js.map +1 -1
  118. package/dist/core/verse/workspaces.d.ts +130 -0
  119. package/dist/core/verse/workspaces.js +501 -0
  120. package/dist/core/verse/workspaces.js.map +1 -0
  121. package/dist/core/web/api.js +23 -0
  122. package/dist/core/web/api.js.map +1 -1
  123. package/dist/core/web/public/next/assets/App-BbVoUCIi.js +7 -0
  124. package/dist/core/web/public/next/assets/App-BbVoUCIi.js.map +1 -0
  125. package/dist/core/web/public/next/assets/App-Cgi6j1Gk.css +1 -0
  126. package/dist/core/web/public/next/assets/ApprovalsSection-BW9iVjUa.js +2 -0
  127. package/dist/core/web/public/next/assets/ApprovalsSection-BW9iVjUa.js.map +1 -0
  128. package/dist/core/web/public/next/assets/ApprovalsSection-Su-NUTis.css +1 -0
  129. package/dist/core/web/public/next/assets/AutonomySection-CRqHUhED.js +2 -0
  130. package/dist/core/web/public/next/assets/AutonomySection-CRqHUhED.js.map +1 -0
  131. package/dist/core/web/public/next/assets/AutonomySection-Cpk_oEhc.css +1 -0
  132. package/dist/core/web/public/next/assets/ChatSection-5irrh6Jw.js +80 -0
  133. package/dist/core/web/public/next/assets/ChatSection-5irrh6Jw.js.map +1 -0
  134. package/dist/core/web/public/next/assets/ChatSection-LQiAn6Eu.css +1 -0
  135. package/dist/core/web/public/next/assets/ConfirmDialog-CXevY3Au.js +2 -0
  136. package/dist/core/web/public/next/assets/ConfirmDialog-CXevY3Au.js.map +1 -0
  137. package/dist/core/web/public/next/assets/{ConfirmDialog-cYuivhCX.css → ConfirmDialog-Dx15x0Ho.css} +1 -1
  138. package/dist/core/web/public/next/assets/Dialog-Bn0CgEGz.js +2 -0
  139. package/dist/core/web/public/next/assets/Dialog-Bn0CgEGz.js.map +1 -0
  140. package/dist/core/web/public/next/assets/Dialog-tQ8kFulD.css +1 -0
  141. package/dist/core/web/public/next/assets/DiffViewer-C8HHTnVE.css +1 -0
  142. package/dist/core/web/public/next/assets/DiffViewer-QKyisN2L.js +7 -0
  143. package/dist/core/web/public/next/assets/DiffViewer-QKyisN2L.js.map +1 -0
  144. package/dist/core/web/public/next/assets/{MutationTokenDialog-jWLLCxWn.css → MutationTokenDialog-CrfJ0PdD.css} +1 -1
  145. package/dist/core/web/public/next/assets/MutationTokenDialog-DbSHPy3w.js +2 -0
  146. package/dist/core/web/public/next/assets/MutationTokenDialog-DbSHPy3w.js.map +1 -0
  147. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-C-PCgCzo.js +7 -0
  148. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-C-PCgCzo.js.map +1 -0
  149. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-CM_8pJs6.css +1 -0
  150. package/dist/core/web/public/next/assets/RouteErrorBoundary-Dw8ZjmkS.js +2 -0
  151. package/dist/core/web/public/next/assets/RouteErrorBoundary-Dw8ZjmkS.js.map +1 -0
  152. package/dist/core/web/public/next/assets/RouteErrorBoundary-ekyMXAK8.css +1 -0
  153. package/dist/core/web/public/next/assets/SettingsSection-BII7TTSD.css +1 -0
  154. package/dist/core/web/public/next/assets/SettingsSection-CWxtTNlD.js +2 -0
  155. package/dist/core/web/public/next/assets/SettingsSection-CWxtTNlD.js.map +1 -0
  156. package/dist/core/web/public/next/assets/UniverseConsoleApp-Bk5HipM0.js +2 -0
  157. package/dist/core/web/public/next/assets/UniverseConsoleApp-Bk5HipM0.js.map +1 -0
  158. package/dist/core/web/public/next/assets/UniverseConsoleApp-Dh7A-hLD.css +1 -0
  159. package/dist/core/web/public/next/assets/UniverseView-Bqa8DH57.css +1 -0
  160. package/dist/core/web/public/next/assets/UniverseView-D8k9q0ce.js +9 -0
  161. package/dist/core/web/public/next/assets/UniverseView-D8k9q0ce.js.map +1 -0
  162. package/dist/core/web/public/next/assets/UsageSection-B2E06ZH1.js +2 -0
  163. package/dist/core/web/public/next/assets/UsageSection-B2E06ZH1.js.map +1 -0
  164. package/dist/core/web/public/next/assets/UsageSection-DwgNOYvi.css +1 -0
  165. package/dist/core/web/public/next/assets/VerseConsoleApp-CRfZUV-T.js +3 -0
  166. package/dist/core/web/public/next/assets/VerseConsoleApp-CRfZUV-T.js.map +1 -0
  167. package/dist/core/web/public/next/assets/VerseConsoleApp-D2E3mU9a.css +1 -0
  168. package/dist/core/web/public/next/assets/charts-CsrtT4rk.css +1 -0
  169. package/dist/core/web/public/next/assets/charts-DSUpczxG.js +2 -0
  170. package/dist/core/web/public/next/assets/charts-DSUpczxG.js.map +1 -0
  171. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js +2 -0
  172. package/dist/core/web/public/next/assets/fleet-model-ClBbQ0Uj.js.map +1 -0
  173. package/dist/core/web/public/next/assets/format-BNYWGJat.js +2 -0
  174. package/dist/core/web/public/next/assets/format-BNYWGJat.js.map +1 -0
  175. package/dist/core/web/public/next/assets/global-C4jfYHrj.js +2 -0
  176. package/dist/core/web/public/next/assets/global-C4jfYHrj.js.map +1 -0
  177. package/dist/core/web/public/next/assets/global-D463gG1X.css +1 -0
  178. package/dist/core/web/public/next/assets/icons-BxOX8-XB.js +2 -0
  179. package/dist/core/web/public/next/assets/icons-BxOX8-XB.js.map +1 -0
  180. package/dist/core/web/public/next/assets/index-BMRIET7F.js +11 -0
  181. package/dist/core/web/public/next/assets/index-BMRIET7F.js.map +1 -0
  182. package/dist/core/web/public/next/assets/queries-AxnVa02h.js +2 -0
  183. package/dist/core/web/public/next/assets/queries-AxnVa02h.js.map +1 -0
  184. package/dist/core/web/public/next/assets/use-guarded-action-BO6c94Wp.js +2 -0
  185. package/dist/core/web/public/next/assets/use-guarded-action-BO6c94Wp.js.map +1 -0
  186. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js +2 -0
  187. package/dist/core/web/public/next/assets/verse-model-CvtK6vP6.js.map +1 -0
  188. package/dist/core/web/public/next/assets/workspace-model-cE4LkKpE.js +2 -0
  189. package/dist/core/web/public/next/assets/workspace-model-cE4LkKpE.js.map +1 -0
  190. package/dist/core/web/public/next/index.html +1 -1
  191. package/dist/release-dependency-inventory.json +1 -1
  192. package/docs/README.md +4 -0
  193. package/node_modules/marked/README.md +8 -0
  194. package/node_modules/marked/bin/main.js +12 -11
  195. package/node_modules/marked/lib/marked.d.ts +88 -25
  196. package/node_modules/marked/lib/marked.esm.js +50 -44
  197. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  198. package/node_modules/marked/lib/marked.umd.js +50 -44
  199. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  200. package/node_modules/marked/man/marked.1 +1 -1
  201. package/node_modules/marked/package.json +21 -21
  202. package/package.json +13 -8
  203. package/dist/cli/activation.d.ts +0 -41
  204. package/dist/cli/activation.js +0 -485
  205. package/dist/cli/activation.js.map +0 -1
  206. package/dist/core/fleet/generated-repair-resolution.d.ts +0 -36
  207. package/dist/core/fleet/generated-repair-resolution.js +0 -245
  208. package/dist/core/fleet/generated-repair-resolution.js.map +0 -1
  209. package/dist/core/local-runtime/llama/port.d.ts +0 -17
  210. package/dist/core/local-runtime/llama/port.js +0 -47
  211. package/dist/core/local-runtime/llama/port.js.map +0 -1
  212. package/dist/core/local-runtime/llama/proxy-host.d.ts +0 -54
  213. package/dist/core/local-runtime/llama/proxy-host.js +0 -159
  214. package/dist/core/local-runtime/llama/proxy-host.js.map +0 -1
  215. package/dist/core/local-runtime/llama/proxy-process.d.ts +0 -148
  216. package/dist/core/local-runtime/llama/proxy-process.js +0 -250
  217. package/dist/core/local-runtime/llama/proxy-process.js.map +0 -1
  218. package/dist/core/local-runtime/llama/proxy-record.d.ts +0 -40
  219. package/dist/core/local-runtime/llama/proxy-record.js +0 -133
  220. package/dist/core/local-runtime/llama/proxy-record.js.map +0 -1
  221. package/dist/core/local-runtime/llama/proxy-supervisor.d.ts +0 -118
  222. package/dist/core/local-runtime/llama/proxy-supervisor.js +0 -511
  223. package/dist/core/local-runtime/llama/proxy-supervisor.js.map +0 -1
  224. package/dist/core/web/public/next/assets/App-BCKqSppK.css +0 -1
  225. package/dist/core/web/public/next/assets/App-LuILXjWG.js +0 -16
  226. package/dist/core/web/public/next/assets/App-LuILXjWG.js.map +0 -1
  227. package/dist/core/web/public/next/assets/ApprovalsSection-B_Xor8JH.js +0 -2
  228. package/dist/core/web/public/next/assets/ApprovalsSection-B_Xor8JH.js.map +0 -1
  229. package/dist/core/web/public/next/assets/ApprovalsSection-CRP59wSb.css +0 -1
  230. package/dist/core/web/public/next/assets/AutonomySection-BB8RD-tv.css +0 -1
  231. package/dist/core/web/public/next/assets/AutonomySection-BEwITtPJ.js +0 -2
  232. package/dist/core/web/public/next/assets/AutonomySection-BEwITtPJ.js.map +0 -1
  233. package/dist/core/web/public/next/assets/ChatSection-DrxqhBPK.css +0 -1
  234. package/dist/core/web/public/next/assets/ChatSection-bRAzlMth.js +0 -77
  235. package/dist/core/web/public/next/assets/ChatSection-bRAzlMth.js.map +0 -1
  236. package/dist/core/web/public/next/assets/ConfirmDialog-BqkZdPs_.js +0 -2
  237. package/dist/core/web/public/next/assets/ConfirmDialog-BqkZdPs_.js.map +0 -1
  238. package/dist/core/web/public/next/assets/Dialog-CPmedg4S.js +0 -2
  239. package/dist/core/web/public/next/assets/Dialog-CPmedg4S.js.map +0 -1
  240. package/dist/core/web/public/next/assets/Dialog-DxN7RgB5.css +0 -1
  241. package/dist/core/web/public/next/assets/DiffViewer-DmPJbeM_.js +0 -7
  242. package/dist/core/web/public/next/assets/DiffViewer-DmPJbeM_.js.map +0 -1
  243. package/dist/core/web/public/next/assets/DiffViewer-hN7X6wGT.css +0 -1
  244. package/dist/core/web/public/next/assets/Epistemic-DiyMyeaN.css +0 -1
  245. package/dist/core/web/public/next/assets/Epistemic-M3SxLHjq.js +0 -2
  246. package/dist/core/web/public/next/assets/Epistemic-M3SxLHjq.js.map +0 -1
  247. package/dist/core/web/public/next/assets/Meter-CGBsbXUX.css +0 -1
  248. package/dist/core/web/public/next/assets/Meter-D_X7c9U3.js +0 -2
  249. package/dist/core/web/public/next/assets/Meter-D_X7c9U3.js.map +0 -1
  250. package/dist/core/web/public/next/assets/MutationTokenDialog-Ba5ZHu-8.js +0 -2
  251. package/dist/core/web/public/next/assets/MutationTokenDialog-Ba5ZHu-8.js.map +0 -1
  252. package/dist/core/web/public/next/assets/RefreshIndicator-O7jUBOmX.css +0 -1
  253. package/dist/core/web/public/next/assets/RefreshIndicator-vHGpmyzb.js +0 -2
  254. package/dist/core/web/public/next/assets/RefreshIndicator-vHGpmyzb.js.map +0 -1
  255. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-B5g6JEVk.js +0 -7
  256. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-B5g6JEVk.js.map +0 -1
  257. package/dist/core/web/public/next/assets/ResourcePoolConsoleApp-DLl4DbGG.css +0 -1
  258. package/dist/core/web/public/next/assets/RouteErrorBoundary-BIpdnxp-.css +0 -1
  259. package/dist/core/web/public/next/assets/RouteErrorBoundary-CroxuKoi.js +0 -2
  260. package/dist/core/web/public/next/assets/RouteErrorBoundary-CroxuKoi.js.map +0 -1
  261. package/dist/core/web/public/next/assets/SettingsSection-DGJMdUh2.css +0 -1
  262. package/dist/core/web/public/next/assets/SettingsSection-p-7FCGfn.js +0 -2
  263. package/dist/core/web/public/next/assets/SettingsSection-p-7FCGfn.js.map +0 -1
  264. package/dist/core/web/public/next/assets/Skeleton-4qq4HuJO.js +0 -2
  265. package/dist/core/web/public/next/assets/Skeleton-4qq4HuJO.js.map +0 -1
  266. package/dist/core/web/public/next/assets/Skeleton-D2JaTXyv.css +0 -1
  267. package/dist/core/web/public/next/assets/StatusBadge-BbEdqEGn.js +0 -2
  268. package/dist/core/web/public/next/assets/StatusBadge-BbEdqEGn.js.map +0 -1
  269. package/dist/core/web/public/next/assets/StatusBadge-TpDqZf6K.css +0 -1
  270. package/dist/core/web/public/next/assets/TableView-R6Yeztp1.css +0 -1
  271. package/dist/core/web/public/next/assets/TableView-nyYs7Sv1.js +0 -2
  272. package/dist/core/web/public/next/assets/TableView-nyYs7Sv1.js.map +0 -1
  273. package/dist/core/web/public/next/assets/UniverseConsoleApp-CiZZxRPV.css +0 -1
  274. package/dist/core/web/public/next/assets/UniverseConsoleApp-DjTpQUrA.js +0 -2
  275. package/dist/core/web/public/next/assets/UniverseConsoleApp-DjTpQUrA.js.map +0 -1
  276. package/dist/core/web/public/next/assets/UniverseView-BtApwayT.js +0 -9
  277. package/dist/core/web/public/next/assets/UniverseView-BtApwayT.js.map +0 -1
  278. package/dist/core/web/public/next/assets/UniverseView-gBxl6yum.css +0 -1
  279. package/dist/core/web/public/next/assets/UsageSection-Db99N6ao.js +0 -2
  280. package/dist/core/web/public/next/assets/UsageSection-Db99N6ao.js.map +0 -1
  281. package/dist/core/web/public/next/assets/UsageSection-UUYDidOg.css +0 -1
  282. package/dist/core/web/public/next/assets/VerseConsoleApp-COa3J2dO.js +0 -3
  283. package/dist/core/web/public/next/assets/VerseConsoleApp-COa3J2dO.js.map +0 -1
  284. package/dist/core/web/public/next/assets/VerseConsoleApp-mOAXvWa6.css +0 -1
  285. package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js +0 -2
  286. package/dist/core/web/public/next/assets/fleet-model-DXCfVtNW.js.map +0 -1
  287. package/dist/core/web/public/next/assets/format-fggwu_Rs.js +0 -2
  288. package/dist/core/web/public/next/assets/format-fggwu_Rs.js.map +0 -1
  289. package/dist/core/web/public/next/assets/global-BeRYd1Bu.css +0 -1
  290. package/dist/core/web/public/next/assets/global-CNVapoV1.js +0 -2
  291. package/dist/core/web/public/next/assets/global-CNVapoV1.js.map +0 -1
  292. package/dist/core/web/public/next/assets/index-BkUlX2Se.js +0 -51
  293. package/dist/core/web/public/next/assets/index-BkUlX2Se.js.map +0 -1
  294. package/dist/core/web/public/next/assets/index-YNTgDG2b.js +0 -2
  295. package/dist/core/web/public/next/assets/index-YNTgDG2b.js.map +0 -1
  296. package/dist/core/web/public/next/assets/queries-C9XS4SYq.js +0 -2
  297. package/dist/core/web/public/next/assets/queries-C9XS4SYq.js.map +0 -1
  298. package/dist/core/web/public/next/assets/use-guarded-action-Bqa2v0a-.css +0 -1
  299. package/dist/core/web/public/next/assets/use-guarded-action-Bql1nA-z.js +0 -2
  300. package/dist/core/web/public/next/assets/use-guarded-action-Bql1nA-z.js.map +0 -1
  301. package/dist/core/web/public/next/assets/verse-model-IrNQKtER.js +0 -2
  302. package/dist/core/web/public/next/assets/verse-model-IrNQKtER.js.map +0 -1
  303. package/node_modules/which/CHANGELOG.md +0 -166
  304. /package/node_modules/marked/{LICENSE.md → LICENSE} +0 -0
@@ -34,12 +34,27 @@ export const DEFAULT_LLAMA_SLOTS = 4;
34
34
  * did not fit in its context before a single turn began, which is a failure
35
35
  * with no useful error attached.
36
36
  *
37
- * 262,144 is Qwen3.8 27B's native trained context, not a guess. Measured on a
38
- * 128 GB machine: raising `-c` from 131,072 to 262,144 moved resident memory
39
- * from 46.2 GB to 43.4 GB — no increase at all, because Qwen3.8 runs linear
40
- * attention on 48 of its 64 layers and only 16 carry a full KV cache. Verified
41
- * with a real agent turn afterwards: correct edit, prefix cache still reusing
42
- * (23,301 cold, then 56 and 306 tokens).
37
+ * 262,144 is Qwen3.8 27B's native trained context.
38
+ *
39
+ * CORRECTION. This comment previously claimed raising `-c` from 131,072 to
40
+ * 262,144 cost no extra memory, citing 46.2 GB falling to 43.4 GB. That
41
+ * comparison was invalid: the 46.2 GB reading came from a process that had been
42
+ * serving for hours with a populated cache, the 43.4 GB from one measured
43
+ * seconds after startup with an empty one. Warm against cold, no control.
44
+ *
45
+ * The arithmetic contradicts it. From the model card — 4 KV heads, 256 head
46
+ * dim, fp16 K and V, and 16 of 64 layers carrying a full KV cache — the cache
47
+ * costs 64 KiB per token: 8 GiB at 131,072 and 16 GiB at 262,144. The same
48
+ * process later measured 47.0 GB resident, consistent with the cache filling.
49
+ *
50
+ * So the honest statement is: this costs up to ~8 GiB more than 131,072 once
51
+ * the cache is populated, which a 128 GB machine carries comfortably. The 48
52
+ * linear-attention layers do make it far cheaper than a full-attention model of
53
+ * this size would be, but "free" was wrong.
54
+ *
55
+ * Verified separately and still true: a real agent turn at this setting made
56
+ * the correct edit with the prefix cache reusing (23,301 cold, then 56 and 306
57
+ * tokens).
43
58
  *
44
59
  * Operators on less memory override it with `--ctx` or
45
60
  * `models.llamaServer.contextSize`.
@@ -57,6 +72,119 @@ export const DEFAULT_LLAMA_CONTEXT = 262_144;
57
72
  export const DEFAULT_ANTHROPIC_PROXY_PORT = 8081;
58
73
  /** The historical base URL, pinned by test/m144.llama-server.test.ts. */
59
74
  export const LEGACY_DEFAULT_BASE_URL = `http://localhost:${DEFAULT_LLAMA_PORT}/v1`;
75
+ /**
76
+ * The reasoning efforts Qwen3.8's chat template will actually accept.
77
+ *
78
+ * MEASURED against the live template, with a deliberately bogus value as a
79
+ * control (both behave identically, which is how we know the check is real):
80
+ *
81
+ * reasoning_effort=xhigh -> 200, and it is the template's OWN default
82
+ * reasoning_effort=medium -> 200
83
+ * reasoning_effort=low -> 200
84
+ * reasoning_effort=high -> 500 raise_exception('Unexpected reasoning effort high')
85
+ * reasoning_effort=bogus -> 500 (the control)
86
+ *
87
+ * `high` is the trap: it is the spelling every other vendor uses, it is what
88
+ * Claude Code itself puts in `output_config.effort`, and it is fatal here —
89
+ * a template exception fires BEFORE inference, so the turn dies with no
90
+ * partial output. Hence a closed list rather than a string passthrough.
91
+ */
92
+ export const LOCAL_AGENT_REASONING_EFFORTS = ['low', 'medium', 'xhigh'];
93
+ /** Every field null — "change nothing", the shipping default. */
94
+ export const NO_LOCAL_AGENT_DEFAULTS = {
95
+ reasoningEffort: null, temperature: null, topP: null, topK: null,
96
+ };
97
+ /** A finite number in range, or undefined. Never throws on junk. */
98
+ function num(value, min, max) {
99
+ const parsed = typeof value === 'number' ? value : Number.parseFloat(String(value ?? ''));
100
+ if (!Number.isFinite(parsed) || parsed < min || parsed > max)
101
+ return undefined;
102
+ return parsed;
103
+ }
104
+ /**
105
+ * Resolve the local agent lane's per-request defaults.
106
+ *
107
+ * WHY THESE ARE ALL OFF BY DEFAULT — the measurements, so the next person
108
+ * does not have to re-derive them.
109
+ *
110
+ * REASONING EFFORT is the largest lever measured on this runtime, and it is
111
+ * currently unreachable. The template defaults to `xhigh`; Claude Code's own
112
+ * `output_config.effort` is dropped on the floor by llama-server (verified:
113
+ * sending it changes nothing), so no caller can ask for less. Holding
114
+ * sampling at greedy and varying only the effort, on identical tool-calling
115
+ * prompts, the DECODE TOKEN COUNT for the same correct answer was:
116
+ *
117
+ * task xhigh medium low thinking-off
118
+ * verbatim_sha 536 218 141 64
119
+ * verbatim_oddpath 78 59 59 48
120
+ *
121
+ * Decode, not prompt processing, is what a warm agent turn spends its time
122
+ * on: a measured hard-tool-call turn was 69.7s wall of which 65s was decode
123
+ * and ~1s was prompt (473 tokens against a warm prefix cache). So `low` is
124
+ * worth roughly 3.8x on the decode-bound part of a turn.
125
+ *
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
151
+ * here, the numbers are here, and the operator chooses:
152
+ *
153
+ * "models": { "llamaServer": { "agentDefaults": { "reasoningEffort": "medium" } } }
154
+ *
155
+ * Reports for every trial are in `baselines/` alongside this lane's others.
156
+ *
157
+ * SAMPLING is off for a different reason: it was measured and REJECTED. The
158
+ * hypothesis was that llama-server's chat-tuned defaults (temperature 1.0,
159
+ * top_k 20, top_p 0.95, min_p 0.05 — taken from the GGUF's own metadata)
160
+ * corrupt tool calls. Across the batteries run against the live runtime the
161
+ * shipping default did not drop a single call that greedy decoding kept. The
162
+ * knob exists for an operator with a different model; it is not a fix,
163
+ * because no defect was found to fix.
164
+ *
165
+ * `min_p` is deliberately absent even though the server honours it: it is not
166
+ * part of the Anthropic request schema, and this lane's carrier is
167
+ * `/v1/messages`. Offering a field that would be dropped in transit is worse
168
+ * than not offering it — see the reasoning-effort note in anthropic-shim.ts
169
+ * for the measurement that made that failure mode concrete.
170
+ */
171
+ export function resolveLocalAgentDefaults(cfg) {
172
+ const raw = readSection(cfg).agentDefaults;
173
+ if (typeof raw !== 'object' || raw === null || Array.isArray(raw))
174
+ return NO_LOCAL_AGENT_DEFAULTS;
175
+ const section = raw;
176
+ const effortRaw = str(section['reasoningEffort']);
177
+ const reasoningEffort = effortRaw !== undefined
178
+ && LOCAL_AGENT_REASONING_EFFORTS.includes(effortRaw)
179
+ ? effortRaw
180
+ : null;
181
+ return {
182
+ reasoningEffort,
183
+ temperature: num(section['temperature'], 0, 2) ?? null,
184
+ topP: num(section['topP'], 0, 1) ?? null,
185
+ topK: int(section['topK'], 1, 1_000) ?? null,
186
+ };
187
+ }
60
188
  function readSection(cfg) {
61
189
  const models = cfg?.['models'];
62
190
  if (typeof models !== 'object' || models === null)
@@ -210,6 +338,68 @@ export function buildLlamaServerArgs(runtime, modelPath) {
210
338
  // growing transcript every turn.
211
339
  '--cont-batching',
212
340
  '--cache-prompt',
341
+ // MEASURED, not assumed: without this flag `GET /metrics` answers
342
+ //
343
+ // 501 {"error":{"code":501,"message":"This server does not support
344
+ // metrics endpoint. Start it with `--metrics`", ...}}
345
+ //
346
+ // — llama-server's own instruction. `/props` and `/slots` answer fine, so
347
+ // a runbook that says "read /metrics" looks correct until someone
348
+ // actually does it, which is the worst kind of gap. It is the only
349
+ // endpoint that reports CUMULATIVE prompt/decode token counts and
350
+ // per-request timing histograms; `/slots` is a point-in-time view and
351
+ // cannot answer "how much of this session went into reprocessed prompt",
352
+ // which is exactly the question the prefix-cache bug turned on.
353
+ //
354
+ // The endpoint is read-only counters and inherits the same loopback gate
355
+ // as everything else here. NOTE the deliberate asymmetry with `--props`,
356
+ // which is NOT passed: that one enables POST /props, i.e. mutating global
357
+ // sampling on a live launchd-managed server from anything that can reach
358
+ // the port. Observability yes, remote mutation no.
359
+ '--metrics',
360
+ // CORS. llama-server's default is `--cors-origins *`, and it announces the
361
+ // consequence itself at startup: "CORS is set to allow all origins ('*')
362
+ // and no API key is set / this can be a security risk (cross-origin
363
+ // attacks)". That warning is correct and it is not theoretical. MEASURED
364
+ // against the live loopback server with its shipping defaults:
365
+ //
366
+ // GET /props, no Origin (control) -> Access-Control-Allow-Origin: (empty)
367
+ // GET /props, Origin: https://evil.example
368
+ // -> Access-Control-Allow-Origin: https://evil.example
369
+ // OPTIONS /v1/messages, same Origin -> Allow-Origin: https://evil.example
370
+ // Allow-Credentials: true
371
+ // Allow-Methods: GET, POST, DELETE, OPTIONS
372
+ // Allow-Headers: *
373
+ //
374
+ // The origin is ECHOED, so any page the operator visits in any browser can
375
+ // read the response: run inference on this machine, and read `/slots`,
376
+ // which carries the prompts of whatever the local lane is currently
377
+ // processing. Binding to loopback does not help — the browser is already
378
+ // on loopback. It mattered less when this was hand-started for an hour at
379
+ // a time; it is a KeepAlive launchd job now, up from login and restarted
380
+ // on crash.
381
+ //
382
+ // `localhost` is llama-server's own special value: reflect the Origin only
383
+ // when it is localhost. It closes the internet-origin hole completely.
384
+ //
385
+ // WHY THIS CANNOT BREAK THE LANE, measured rather than assumed: CORS is a
386
+ // browser mechanism and applies only to requests carrying an `Origin`
387
+ // header. A capture server put in llama-server's place recorded every
388
+ // request a real `claude` turn makes through this proxy — `HEAD
389
+ // /api/hello` and two `POST /v1/messages?beta=true` — and NONE of them
390
+ // carried an Origin. Nothing in the hub's own web UI fetches this port
391
+ // from a browser either; it renders status the hub server probed
392
+ // server-side. So no client of this runtime engages CORS at all.
393
+ //
394
+ // NOT `--api-key`, deliberately, and this was measured too. The same
395
+ // capture shows the lane sends `authorization: Bearer ollama` — the
396
+ // literal value of ANTHROPIC_AUTH_TOKEN that verse/adapters/claude.ts
397
+ // sets. llama-server's `--api-key` checks exactly that header, so turning
398
+ // it on would 401 every turn unless the proxy rewrote the header on the
399
+ // way through. That is a real change to the request path, not a flag, and
400
+ // it is not worth shipping untested alongside this one.
401
+ '--cors-origins',
402
+ 'localhost',
213
403
  ...runtime.extraArgs,
214
404
  ];
215
405
  }
@@ -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,OAA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AU,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"}
@@ -44,3 +44,18 @@ export type { OllamaBlobResolution, OllamaModelRef, ResolvedOllamaBlob } from '.
44
44
  export { argvBindsPort, argvMatchesRecord, findLlamaServersOnPort, modelPathFromArgv, processAlive, shouldReclaim, } from './process.js';
45
45
  export { clearOwnershipRecord, parseOwnershipRecord, readOwnershipRecord, writeOwnershipRecord, } from './record.js';
46
46
  export { LAUNCH_AGENT_LABEL, launchAgentPlistPath, launchAgentShimPath, localRuntimeDir, logsDir, ollamaModelsRoot, ownershipRecordPath, stderrLogPath, stdoutLogPath, } from './paths.js';
47
+ /**
48
+ * The Anthropic proxy as a supervised PROCESS.
49
+ *
50
+ * `ensureAnthropicProxy` (above) hosts the listener inside the calling
51
+ * process, which is right for an attended `start` and useless for a lane that
52
+ * has to be up at 3am. These are the pieces that give it a launchd job of its
53
+ * own: the invocation resolver (which reads the MODULE's location, never
54
+ * `process.argv[1]` — see proxy-invocation.ts for the defect that rule exists
55
+ * to prevent) and the agent install/uninstall.
56
+ */
57
+ export { ANTHROPIC_PROXY_HOST_FLAG, anthropicProxyHostArgv, anthropicProxyHostEnvironment, anthropicProxyHostInvocation, } from './proxy-invocation.js';
58
+ export type { AnthropicProxyHostOptions } from './proxy-invocation.js';
59
+ export { anthropicProxyAgentInstalled, anthropicProxyAgentLoaded, anthropicProxyLogPaths, buildAnthropicProxyPlist, buildAnthropicProxyShim, installAnthropicProxyAgent, uninstallAnthropicProxyAgent, } from './proxy-launchd.js';
60
+ export type { AnthropicProxyAgentSpec } from './proxy-launchd.js';
61
+ export { ANTHROPIC_PROXY_LAUNCH_AGENT_LABEL, anthropicProxyPlistPath, anthropicProxyShimPath, } from './paths.js';
@@ -36,4 +36,17 @@ export { blobBasenameForDigest, parseOllamaModelRef, resolveOllamaModelBlob, res
36
36
  export { argvBindsPort, argvMatchesRecord, findLlamaServersOnPort, modelPathFromArgv, processAlive, shouldReclaim, } from './process.js';
37
37
  export { clearOwnershipRecord, parseOwnershipRecord, readOwnershipRecord, writeOwnershipRecord, } from './record.js';
38
38
  export { LAUNCH_AGENT_LABEL, launchAgentPlistPath, launchAgentShimPath, localRuntimeDir, logsDir, ollamaModelsRoot, ownershipRecordPath, stderrLogPath, stdoutLogPath, } from './paths.js';
39
+ /**
40
+ * The Anthropic proxy as a supervised PROCESS.
41
+ *
42
+ * `ensureAnthropicProxy` (above) hosts the listener inside the calling
43
+ * process, which is right for an attended `start` and useless for a lane that
44
+ * has to be up at 3am. These are the pieces that give it a launchd job of its
45
+ * own: the invocation resolver (which reads the MODULE's location, never
46
+ * `process.argv[1]` — see proxy-invocation.ts for the defect that rule exists
47
+ * to prevent) and the agent install/uninstall.
48
+ */
49
+ export { ANTHROPIC_PROXY_HOST_FLAG, anthropicProxyHostArgv, anthropicProxyHostEnvironment, anthropicProxyHostInvocation, } from './proxy-invocation.js';
50
+ export { anthropicProxyAgentInstalled, anthropicProxyAgentLoaded, anthropicProxyLogPaths, buildAnthropicProxyPlist, buildAnthropicProxyShim, installAnthropicProxyAgent, uninstallAnthropicProxyAgent, } from './proxy-launchd.js';
51
+ export { ANTHROPIC_PROXY_LAUNCH_AGENT_LABEL, anthropicProxyPlistPath, anthropicProxyShimPath, } from './paths.js';
39
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/local-runtime/llama/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAcH,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,u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O,EACP,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/local-runtime/llama/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAcH,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,SAAS,EACT,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,8BAA8B,EAC9B,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AAGrB;;;;;GAKG;AACH,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGtF,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,wBAAwB,EACxB,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,OAAO,EACP,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,aAAa,GACd,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;GASG;AACH,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,kCAAkC,EAClC,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,YAAY,CAAC"}
@@ -28,8 +28,25 @@ export declare function logsDir(): string;
28
28
  export declare function stdoutLogPath(): string;
29
29
  /** Absolute stderr log path for the supervised runtime. */
30
30
  export declare function stderrLogPath(): string;
31
+ /**
32
+ * `~/.ashlr/local-runtime/anthropic-proxy-launch.sh` — the proxy job's shim.
33
+ *
34
+ * A SECOND shim rather than more flags on the llama-server one, because the
35
+ * two jobs have genuinely independent lifetimes: llama-server is a foreign
36
+ * binary that must keep running while the proxy is restarted for a config
37
+ * change, and a single job cannot supervise two processes.
38
+ */
39
+ export declare function anthropicProxyShimPath(): string;
40
+ /** Absolute stdout log path for the supervised Anthropic proxy. */
41
+ export declare function anthropicProxyStdoutLogPath(): string;
42
+ /** Absolute stderr log path for the supervised Anthropic proxy. */
43
+ export declare function anthropicProxyStderrLogPath(): string;
31
44
  /** launchd job label. Reverse-DNS, matching the hub's other agents. */
32
45
  export declare const LAUNCH_AGENT_LABEL = "ai.ashlr.local-runtime";
46
+ /** launchd job label for the Anthropic normalising proxy. */
47
+ export declare const ANTHROPIC_PROXY_LAUNCH_AGENT_LABEL = "ai.ashlr.anthropic-proxy";
48
+ /** `~/Library/LaunchAgents/ai.ashlr.anthropic-proxy.plist`. */
49
+ export declare function anthropicProxyPlistPath(): string;
33
50
  /**
34
51
  * `~/Library/LaunchAgents/ai.ashlr.local-runtime.plist`.
35
52
  *
@@ -44,8 +44,33 @@ export function stdoutLogPath() {
44
44
  export function stderrLogPath() {
45
45
  return join(logsDir(), 'local-runtime.err.log');
46
46
  }
47
+ /**
48
+ * `~/.ashlr/local-runtime/anthropic-proxy-launch.sh` — the proxy job's shim.
49
+ *
50
+ * A SECOND shim rather than more flags on the llama-server one, because the
51
+ * two jobs have genuinely independent lifetimes: llama-server is a foreign
52
+ * binary that must keep running while the proxy is restarted for a config
53
+ * change, and a single job cannot supervise two processes.
54
+ */
55
+ export function anthropicProxyShimPath() {
56
+ return join(localRuntimeDir(), 'anthropic-proxy-launch.sh');
57
+ }
58
+ /** Absolute stdout log path for the supervised Anthropic proxy. */
59
+ export function anthropicProxyStdoutLogPath() {
60
+ return join(logsDir(), 'anthropic-proxy.out.log');
61
+ }
62
+ /** Absolute stderr log path for the supervised Anthropic proxy. */
63
+ export function anthropicProxyStderrLogPath() {
64
+ return join(logsDir(), 'anthropic-proxy.err.log');
65
+ }
47
66
  /** launchd job label. Reverse-DNS, matching the hub's other agents. */
48
67
  export const LAUNCH_AGENT_LABEL = 'ai.ashlr.local-runtime';
68
+ /** launchd job label for the Anthropic normalising proxy. */
69
+ export const ANTHROPIC_PROXY_LAUNCH_AGENT_LABEL = 'ai.ashlr.anthropic-proxy';
70
+ /** `~/Library/LaunchAgents/ai.ashlr.anthropic-proxy.plist`. */
71
+ export function anthropicProxyPlistPath() {
72
+ return join(homedir(), 'Library', 'LaunchAgents', `${ANTHROPIC_PROXY_LAUNCH_AGENT_LABEL}.plist`);
73
+ }
49
74
  /**
50
75
  * `~/Library/LaunchAgents/ai.ashlr.local-runtime.plist`.
51
76
  *
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../../src/core/local-runtime/llama/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,iCAAiC;AACjC,MAAM,UAAU,SAAS;IACvB,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;AACnC,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC,SAAS,EAAE,EAAE,eAAe,CAAC,CAAC;AAC5C,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,mBAAmB;IACjC,OAAO,IAAI,CAAC,eAAe,EAAE,EAAE,mBAAmB,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,IAAI,CAAC,eAAe,EAAE,EAAE,wBAAwB,CAAC,CAAC;AAC3D,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,OAAO;IACrB,OAAO,IAAI,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AACnC,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,uBAAuB,CAAC,CAAC;AAClD,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,uBAAuB,CAAC,CAAC;AAClD,CAAC;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,IAAI,CAAC,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 * ## The defect this module exists to not repeat
5
+ *
6
+ * `verse-detached-proxy-wip` (commit c7853f0a) built the child argv from
7
+ * `process.argv[1]`, i.e. "re-run whatever script this process was started
8
+ * from, with proxy flags appended". That is correct exactly once — when the
9
+ * running process is the `ashlr` CLI — and wrong for every other caller. The
10
+ * Verse web server, which is the long-lived host this feature exists to serve,
11
+ * has its OWN argv[1]; the spawn therefore re-ran the Verse server with
12
+ * `--anthropic-port N` appended, which it ignored before exiting, and the
13
+ * parent reported `the Anthropic proxy host exited while starting`.
14
+ *
15
+ * The rule that follows, and the reason this file is separate from the
16
+ * supervisor: **the child is resolved from THIS MODULE'S OWN LOCATION, never
17
+ * from how the parent process happened to be launched.** `import.meta.url` is
18
+ * a property of the code; `argv[1]` is a property of the invocation. Only the
19
+ * first is stable across callers.
20
+ *
21
+ * ## Three shipping runtimes, three invocations
22
+ *
23
+ * Deliberately the same shape as {@link import('../../resources/probe-helper-invocation.js').probeHelperArgv},
24
+ * which solved this for the account probes, and it reuses that module's
25
+ * predicates rather than re-deriving the `/$bunfs/` sentinel:
26
+ *
27
+ * dev / tsx → `node --eval` with tsx registered, importing the sibling .ts
28
+ * npm dist → `node <sibling .js on disk>`
29
+ * Bun binary → this same binary re-entered on a fixed flag
30
+ *
31
+ * The Bun case exists because `bun build --compile` collapses every bundled
32
+ * module's `import.meta.url` onto `file:///$bunfs/root/<binary>`, a virtual
33
+ * root with no on-disk files — so the sibling-path spelling the other two
34
+ * runtimes use resolves to a path that cannot be spawned. That is the same
35
+ * defect this repo has shipped three times (the Codex probe, the Grok probe,
36
+ * and cutoff capture), which is why it is handled here on day one.
37
+ */
38
+ /**
39
+ * Internal re-entry flag for the compiled-binary case.
40
+ *
41
+ * Absent from command parsing, help output and completions, so it is
42
+ * unreachable from normal CLI use. Unlike the probe-helper flags it DOES take
43
+ * operands (`--port`, `--host`, `--upstream`), following the precedent of
44
+ * `--_cutoff-checkpoint-worker`. Every operand is re-validated by the host
45
+ * itself — the port through an integer range check, the bind host through
46
+ * `gateBindHost`, which no argument can talk out of loopback — so influence
47
+ * over this argv cannot widen the listener's exposure.
48
+ */
49
+ export declare const ANTHROPIC_PROXY_HOST_FLAG = "--_anthropic-proxy-host";
50
+ /**
51
+ * Build the argv that runs the Anthropic proxy host for the current runtime.
52
+ *
53
+ * `moduleUrl` defaults to this module's own URL and is a parameter only so the
54
+ * three branches can be unit-tested without stubbing `import.meta`, which is
55
+ * not stubbable. Callers should not pass it.
56
+ *
57
+ * The returned `command` is always `process.execPath`, which is the one path
58
+ * that is real on disk in all three runtimes.
59
+ */
60
+ export declare function anthropicProxyHostArgv(moduleUrl?: string): string[];
61
+ /** What the parent wants the child to serve. */
62
+ export interface AnthropicProxyHostOptions {
63
+ /** Bind host for the proxy. Still gated to loopback by the child. */
64
+ host?: string;
65
+ /** Port for the proxy itself. */
66
+ port?: number;
67
+ /** llama-server's port, i.e. what the proxy forwards to. */
68
+ upstreamPort?: number;
69
+ }
70
+ /**
71
+ * Configuration is passed to the child through the ENVIRONMENT, not argv.
72
+ *
73
+ * ## Measured, because the obvious spelling does not work
74
+ *
75
+ * The three runtimes disagree about argv in ways that silently corrupt an
76
+ * operand tail:
77
+ *
78
+ * `node <file> --port N` → operands begin at argv[2]
79
+ * `node --eval "…" -- --port N` → operands begin at argv[1]; without the
80
+ * `--`, node rejects the run outright
81
+ * with `node: bad option: --port`
82
+ * `<binary> --_flag --port N` → the CLI strips its own flag first
83
+ *
84
+ * Three different offsets and one hard failure, so any single `slice()` is
85
+ * wrong in at least one shipping runtime — and wrong in the quiet way, where
86
+ * the child starts on defaults and serves the wrong port.
87
+ *
88
+ * The environment has none of that: it is a flat map, identical in all three,
89
+ * and `config.ts` ALREADY defines these three variables with exactly the
90
+ * precedence wanted here (environment beats config beats default). So the
91
+ * child needs no argument plumbing at all — it calls
92
+ * `resolveLlamaRuntimeConfig` like everything else and gets the right answer,
93
+ * which keeps the single-source-of-truth rule that module is built around.
94
+ */
95
+ export declare function anthropicProxyHostEnvironment(options?: AnthropicProxyHostOptions, base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
96
+ /** The complete spawn description for the Anthropic proxy host. */
97
+ export declare function anthropicProxyHostInvocation(options?: AnthropicProxyHostOptions, moduleUrl?: string): {
98
+ command: string;
99
+ args: string[];
100
+ env: NodeJS.ProcessEnv;
101
+ };
@@ -0,0 +1,134 @@
1
+ /**
2
+ * How to spawn the Anthropic proxy host, from ANY caller.
3
+ *
4
+ * ## The defect this module exists to not repeat
5
+ *
6
+ * `verse-detached-proxy-wip` (commit c7853f0a) built the child argv from
7
+ * `process.argv[1]`, i.e. "re-run whatever script this process was started
8
+ * from, with proxy flags appended". That is correct exactly once — when the
9
+ * running process is the `ashlr` CLI — and wrong for every other caller. The
10
+ * Verse web server, which is the long-lived host this feature exists to serve,
11
+ * has its OWN argv[1]; the spawn therefore re-ran the Verse server with
12
+ * `--anthropic-port N` appended, which it ignored before exiting, and the
13
+ * parent reported `the Anthropic proxy host exited while starting`.
14
+ *
15
+ * The rule that follows, and the reason this file is separate from the
16
+ * supervisor: **the child is resolved from THIS MODULE'S OWN LOCATION, never
17
+ * from how the parent process happened to be launched.** `import.meta.url` is
18
+ * a property of the code; `argv[1]` is a property of the invocation. Only the
19
+ * first is stable across callers.
20
+ *
21
+ * ## Three shipping runtimes, three invocations
22
+ *
23
+ * Deliberately the same shape as {@link import('../../resources/probe-helper-invocation.js').probeHelperArgv},
24
+ * which solved this for the account probes, and it reuses that module's
25
+ * predicates rather than re-deriving the `/$bunfs/` sentinel:
26
+ *
27
+ * dev / tsx → `node --eval` with tsx registered, importing the sibling .ts
28
+ * npm dist → `node <sibling .js on disk>`
29
+ * Bun binary → this same binary re-entered on a fixed flag
30
+ *
31
+ * The Bun case exists because `bun build --compile` collapses every bundled
32
+ * module's `import.meta.url` onto `file:///$bunfs/root/<binary>`, a virtual
33
+ * root with no on-disk files — so the sibling-path spelling the other two
34
+ * runtimes use resolves to a path that cannot be spawned. That is the same
35
+ * defect this repo has shipped three times (the Codex probe, the Grok probe,
36
+ * and cutoff capture), which is why it is handled here on day one.
37
+ */
38
+ import { createRequire } from 'node:module';
39
+ import { fileURLToPath, pathToFileURL } from 'node:url';
40
+ import { bundledIntoSingleFileBinary, insideSingleFileBinaryRoot, } from '../../resources/probe-helper-invocation.js';
41
+ /**
42
+ * Internal re-entry flag for the compiled-binary case.
43
+ *
44
+ * Absent from command parsing, help output and completions, so it is
45
+ * unreachable from normal CLI use. Unlike the probe-helper flags it DOES take
46
+ * operands (`--port`, `--host`, `--upstream`), following the precedent of
47
+ * `--_cutoff-checkpoint-worker`. Every operand is re-validated by the host
48
+ * itself — the port through an integer range check, the bind host through
49
+ * `gateBindHost`, which no argument can talk out of loopback — so influence
50
+ * over this argv cannot widen the listener's exposure.
51
+ */
52
+ export const ANTHROPIC_PROXY_HOST_FLAG = '--_anthropic-proxy-host';
53
+ /** The sibling module that actually runs the listener. */
54
+ const HOST_MODULE_BASENAME = 'anthropic-proxy-process';
55
+ /**
56
+ * Build the argv that runs the Anthropic proxy host for the current runtime.
57
+ *
58
+ * `moduleUrl` defaults to this module's own URL and is a parameter only so the
59
+ * three branches can be unit-tested without stubbing `import.meta`, which is
60
+ * not stubbable. Callers should not pass it.
61
+ *
62
+ * The returned `command` is always `process.execPath`, which is the one path
63
+ * that is real on disk in all three runtimes.
64
+ */
65
+ export function anthropicProxyHostArgv(moduleUrl = import.meta.url) {
66
+ // Running from TypeScript source: the sibling is a .ts file, which bare
67
+ // `node` cannot execute. Register tsx in the child exactly as the account
68
+ // probes do, then import the sibling by URL.
69
+ if (moduleUrl.endsWith('.ts')) {
70
+ const loader = pathToFileURL(createRequire(moduleUrl).resolve('tsx/esm/api')).href;
71
+ const source = new URL(`./${HOST_MODULE_BASENAME}.ts`, moduleUrl).href;
72
+ return [
73
+ process.execPath,
74
+ '--input-type=module',
75
+ '--eval',
76
+ `import { register } from ${JSON.stringify(loader)}; register(); await import(${JSON.stringify(source)});`,
77
+ ];
78
+ }
79
+ // Inside a single-file bundle no sibling file exists on disk. `execPath` is
80
+ // the real binary and re-entering it on the fixed flag is the only spelling
81
+ // that resolves. Checked BEFORE the on-disk branch, because that branch
82
+ // would otherwise hand back a `/$bunfs/...` path that cannot be spawned.
83
+ if (bundledIntoSingleFileBinary(moduleUrl) || insideSingleFileBinaryRoot(moduleUrl)) {
84
+ return [process.execPath, ANTHROPIC_PROXY_HOST_FLAG];
85
+ }
86
+ // Ordinary compiled output: the sibling .js sits next to this file.
87
+ return [process.execPath, fileURLToPath(new URL(`./${HOST_MODULE_BASENAME}.js`, moduleUrl))];
88
+ }
89
+ /**
90
+ * Configuration is passed to the child through the ENVIRONMENT, not argv.
91
+ *
92
+ * ## Measured, because the obvious spelling does not work
93
+ *
94
+ * The three runtimes disagree about argv in ways that silently corrupt an
95
+ * operand tail:
96
+ *
97
+ * `node <file> --port N` → operands begin at argv[2]
98
+ * `node --eval "…" -- --port N` → operands begin at argv[1]; without the
99
+ * `--`, node rejects the run outright
100
+ * with `node: bad option: --port`
101
+ * `<binary> --_flag --port N` → the CLI strips its own flag first
102
+ *
103
+ * Three different offsets and one hard failure, so any single `slice()` is
104
+ * wrong in at least one shipping runtime — and wrong in the quiet way, where
105
+ * the child starts on defaults and serves the wrong port.
106
+ *
107
+ * The environment has none of that: it is a flat map, identical in all three,
108
+ * and `config.ts` ALREADY defines these three variables with exactly the
109
+ * precedence wanted here (environment beats config beats default). So the
110
+ * child needs no argument plumbing at all — it calls
111
+ * `resolveLlamaRuntimeConfig` like everything else and gets the right answer,
112
+ * which keeps the single-source-of-truth rule that module is built around.
113
+ */
114
+ export function anthropicProxyHostEnvironment(options = {}, base = process.env) {
115
+ const env = { ...base };
116
+ if (options.host !== undefined)
117
+ env['ASHLR_LOCAL_RUNTIME_HOST'] = options.host;
118
+ if (options.port !== undefined)
119
+ env['ASHLR_LOCAL_RUNTIME_ANTHROPIC_PORT'] = String(options.port);
120
+ if (options.upstreamPort !== undefined) {
121
+ env['ASHLR_LOCAL_RUNTIME_PORT'] = String(options.upstreamPort);
122
+ }
123
+ return env;
124
+ }
125
+ /** The complete spawn description for the Anthropic proxy host. */
126
+ export function anthropicProxyHostInvocation(options = {}, moduleUrl = import.meta.url) {
127
+ const [command, ...args] = anthropicProxyHostArgv(moduleUrl);
128
+ return {
129
+ command: command,
130
+ args,
131
+ env: anthropicProxyHostEnvironment(options),
132
+ };
133
+ }
134
+ //# sourceMappingURL=proxy-invocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy-invocation.js","sourceRoot":"","sources":["../../../../src/core/local-runtime/llama/proxy-invocation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,GAC3B,MAAM,4CAA4C,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,yBAAyB,CAAC;AAEnE,0DAA0D;AAC1D,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,UAAU,sBAAsB,CAAC,YAAoB,MAAM,CAAC,IAAI,CAAC,GAAG;IACxE,wEAAwE;IACxE,0EAA0E;IAC1E,6CAA6C;IAC7C,IAAI,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC;QACnF,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,KAAK,oBAAoB,KAAK,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC;QACvE,OAAO;YACL,OAAO,CAAC,QAAQ;YAChB,qBAAqB;YACrB,QAAQ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