@engenty/wizards-runtime 0.20.6 → 0.21.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 (336) hide show
  1. package/README.md +3 -3
  2. package/apps/runtime/dist/agents/studio-assistant.js +7 -3
  3. package/apps/runtime/dist/agents/subscription.js +4 -17
  4. package/apps/runtime/dist/app.js +4 -1
  5. package/apps/runtime/dist/cli/clients.js +6 -24
  6. package/apps/runtime/dist/cli/connect.js +2 -1
  7. package/apps/runtime/dist/cli/environment.js +3 -0
  8. package/apps/runtime/dist/cli/machine.js +1 -70
  9. package/apps/runtime/dist/cli/main.js +2 -1
  10. package/apps/runtime/dist/cli/ollama.js +1 -179
  11. package/apps/runtime/dist/cli/setup.js +8 -6
  12. package/apps/runtime/dist/docs/dev/licensing.md +15 -9
  13. package/apps/runtime/dist/docs/user-guide/command-line.md +3 -0
  14. package/apps/runtime/dist/elements/outside.js +2 -1
  15. package/apps/runtime/dist/engine/code-step.js +1 -1
  16. package/apps/runtime/dist/engine/decide.js +2 -2
  17. package/apps/runtime/dist/engine/input.js +1 -1
  18. package/apps/runtime/dist/engine/runner.js +1 -1
  19. package/apps/runtime/dist/engine/steps.js +27 -8
  20. package/apps/runtime/dist/engine/surface.js +1 -1
  21. package/apps/runtime/dist/engine/template.js +1 -1
  22. package/apps/runtime/dist/env.js +1 -0
  23. package/apps/runtime/dist/harness/clients.js +10 -1
  24. package/apps/runtime/dist/harness/index.js +15 -69
  25. package/apps/runtime/dist/harness/types.js +3 -2
  26. package/apps/runtime/dist/local-call.js +6 -0
  27. package/apps/runtime/dist/local-models.js +53 -157
  28. package/apps/runtime/dist/mcp/bridge.js +12 -55
  29. package/apps/runtime/dist/mcp/elements.js +39 -4
  30. package/apps/runtime/dist/mcp/handler.js +12 -0
  31. package/apps/runtime/dist/mcp/run-pages.js +238 -0
  32. package/apps/runtime/dist/mcp/run-tasks.js +157 -0
  33. package/apps/runtime/dist/mcp/runs.js +129 -0
  34. package/apps/runtime/dist/mcp/tools.js +4 -95
  35. package/apps/runtime/dist/models.js +74 -27
  36. package/apps/runtime/dist/prompts/mcp.md +4 -1
  37. package/apps/runtime/dist/render/downloads.js +1 -1
  38. package/apps/runtime/dist/render/shaped.js +1 -1
  39. package/apps/runtime/dist/routes/model-setup.js +77 -0
  40. package/apps/runtime/dist/routes/studio.js +8 -251
  41. package/apps/runtime/dist/services/space-categories.js +1 -1
  42. package/apps/runtime/dist/services/work-ai.js +10 -4
  43. package/apps/runtime/dist/texts.js +4 -6
  44. package/apps/runtime/dist/tools/connections.js +3 -0
  45. package/apps/runtime/dist/tools/harness.js +124 -0
  46. package/apps/web/dist/assets/AboutDialog-BSdAA4Wi.js +1 -0
  47. package/apps/web/dist/assets/{BlockEditor-CgjXTWly.js → BlockEditor-0noqMcAl.js} +1 -1
  48. package/apps/web/dist/assets/Bundle-Ctrq7lHH.js +1 -0
  49. package/apps/web/dist/assets/CapabilitiesPage-CZlVhBmU.js +2 -0
  50. package/apps/web/dist/assets/ChangelogDialog-BLCYV4jT.js +1 -0
  51. package/apps/web/dist/assets/{CodeEditor-2LyHbSre.js → CodeEditor-CpRn9BZq.js} +1 -1
  52. package/apps/web/dist/assets/ConnectorsSection-B4rRDlFo.js +1 -0
  53. package/apps/web/dist/assets/EditorPage-CXN-_zzG.js +3 -0
  54. package/apps/web/dist/assets/FlowPreview-DjQvcWxs.js +1 -0
  55. package/apps/web/dist/assets/LangSwitch-BuzsLp16.js +1 -0
  56. package/apps/web/dist/assets/LocalModels-BDfP2v5-.js +1 -0
  57. package/apps/web/dist/assets/Marketplace-4baBNzEc.js +2 -0
  58. package/apps/web/dist/assets/NewWizardChannels-B_xHm-bI.js +1 -0
  59. package/apps/web/dist/assets/NewWizardPage-BmZAY4zi.js +7 -0
  60. package/apps/web/dist/assets/OnboardingPage-fZq3WiTk.js +1 -0
  61. package/apps/web/dist/assets/ProtocolSection-v9wIxisg.js +1 -0
  62. package/apps/web/dist/assets/PublicRunner-BCh0VzAT.js +1 -0
  63. package/apps/web/dist/assets/{ReadOnly-CO3ndR23.js → ReadOnly-13stkvNz.js} +1 -1
  64. package/apps/web/dist/assets/Results-4gmguYzH.js +1 -0
  65. package/apps/web/dist/assets/RunDrawer-CeEldWRn.js +1 -0
  66. package/apps/web/dist/assets/SettingsPage-BsKRRlfP.js +2 -0
  67. package/apps/web/dist/assets/SetupPage-FgA5Kl8z.js +1 -0
  68. package/apps/web/dist/assets/SharePage-BlBW4oxl.js +1 -0
  69. package/apps/web/dist/assets/SkillEditor-9QSskfmY.js +1 -0
  70. package/apps/web/dist/assets/Skills-DdUAyNhR.js +9 -0
  71. package/apps/web/dist/assets/SpacePage-CHkNPuqt.js +2 -0
  72. package/apps/web/dist/assets/StudioHome-BwPD-inc.js +1 -0
  73. package/apps/web/dist/assets/TableEditor-Du1DhbEC.js +7 -0
  74. package/apps/web/dist/assets/UpdateCheck-DPr9NXq_.js +2 -0
  75. package/apps/web/dist/assets/brand-DY3lzrOd.js +2 -0
  76. package/apps/web/dist/assets/changelog-BSdb22c3.js +1 -0
  77. package/apps/web/dist/assets/code-editor-Bep_LzQ5.js +2 -0
  78. package/apps/web/dist/assets/host-DiZQ_uws.js +1 -0
  79. package/apps/web/dist/assets/host-Dw-sMUSd.js +54 -0
  80. package/apps/web/dist/assets/i18n-DVrYWJaj.js +55 -0
  81. package/apps/web/dist/assets/index-C2gxK14s.css +1 -0
  82. package/apps/web/dist/assets/index-lQ4JYHYQ.js +102 -0
  83. package/apps/web/dist/assets/oss-credits-BHy69wkx.js +1 -0
  84. package/apps/web/dist/assets/{read-aloud-CRFt5q6k.js → read-aloud-CBycd8TA.js} +1 -1
  85. package/apps/web/dist/assets/{session-RDdtfee2.js → session-BYLtgklo.js} +1 -1
  86. package/apps/web/dist/assets/terminal-DmGdMags.js +16 -0
  87. package/apps/web/dist/assets/texts-ClKS2xhh.js +1 -0
  88. package/apps/web/dist/assets/theme-DFDOMsVo.js +14 -0
  89. package/apps/web/dist/assets/ui-CW2I3ecu.js +1 -0
  90. package/apps/web/dist/assets/ui-DfVpZYIW.js +16 -0
  91. package/apps/web/dist/assets/{useMutation-BSffqL6W.js → useMutation-BnkuLlQC.js} +1 -1
  92. package/apps/web/dist/assets/viewers-C6FfRwG1.js +2 -0
  93. package/apps/web/dist/index.html +18 -16
  94. package/apps/web/dist/mcp/flow.html +129 -129
  95. package/node_modules/@engenty/{wizards-shared → chatviews}/dist/calc.js +1 -1
  96. package/node_modules/@engenty/chatviews/dist/chat/a2ui.d.ts +48 -0
  97. package/node_modules/@engenty/chatviews/dist/chat/a2ui.js +514 -0
  98. package/node_modules/@engenty/chatviews/dist/chat/check.d.ts +18 -0
  99. package/node_modules/@engenty/chatviews/dist/chat/check.js +97 -0
  100. package/node_modules/@engenty/chatviews/dist/chat/index.d.ts +3 -0
  101. package/node_modules/@engenty/chatviews/dist/chat/index.js +4 -0
  102. package/node_modules/@engenty/chatviews/dist/chat/library.d.ts +39 -0
  103. package/node_modules/@engenty/chatviews/dist/chat/library.js +314 -0
  104. package/node_modules/@engenty/{wizards-shared → chatviews}/dist/numbers.js +1 -1
  105. package/node_modules/@engenty/chatviews/dist/react/chat.d.ts +33 -0
  106. package/node_modules/@engenty/chatviews/dist/react/chat.js +150 -0
  107. package/node_modules/@engenty/chatviews/dist/react/field-looks.d.ts +39 -0
  108. package/node_modules/@engenty/chatviews/dist/react/field-looks.js +47 -0
  109. package/node_modules/@engenty/chatviews/dist/react/markdown.d.ts +5 -0
  110. package/node_modules/@engenty/chatviews/dist/react/markdown.js +11 -0
  111. package/node_modules/@engenty/chatviews/dist/react/no-devtools.d.ts +0 -0
  112. package/node_modules/@engenty/chatviews/dist/react/no-devtools.js +8 -0
  113. package/node_modules/@engenty/chatviews/dist/react/surface.d.ts +39 -0
  114. package/node_modules/@engenty/chatviews/dist/react/surface.js +552 -0
  115. package/node_modules/@engenty/chatviews/dist/react/texts.d.ts +39 -0
  116. package/node_modules/@engenty/chatviews/dist/react/texts.js +42 -0
  117. package/node_modules/@engenty/chatviews/dist/react/ui.d.ts +112 -0
  118. package/node_modules/@engenty/chatviews/dist/react/ui.js +212 -0
  119. package/node_modules/@engenty/{wizards-shared → chatviews}/dist/shape.js +1 -1
  120. package/node_modules/@engenty/{wizards-shared → chatviews}/dist/surface.js +1 -1
  121. package/node_modules/@engenty/chatviews/package.json +19 -0
  122. package/node_modules/@engenty/decision-model/dist/client.d.ts +76 -0
  123. package/node_modules/@engenty/decision-model/dist/client.js +188 -0
  124. package/node_modules/@engenty/decision-model/dist/index.d.ts +6 -0
  125. package/node_modules/@engenty/decision-model/dist/index.js +5 -0
  126. package/node_modules/@engenty/decision-model/dist/local.d.ts +11 -0
  127. package/node_modules/@engenty/decision-model/dist/local.js +116 -0
  128. package/node_modules/@engenty/decision-model/dist/resolve.d.ts +26 -0
  129. package/node_modules/@engenty/decision-model/dist/resolve.js +53 -0
  130. package/node_modules/@engenty/decision-model/dist/types.d.ts +80 -0
  131. package/node_modules/@engenty/decision-model/dist/types.js +6 -0
  132. package/node_modules/@engenty/decision-model/dist/validate.d.ts +9 -0
  133. package/node_modules/@engenty/decision-model/dist/validate.js +50 -0
  134. package/node_modules/@engenty/decision-model/dist/ways.d.ts +42 -0
  135. package/node_modules/@engenty/decision-model/dist/ways.js +72 -0
  136. package/node_modules/@engenty/decision-model/package.json +9 -0
  137. package/node_modules/@engenty/local-models/dist/bridge/index.d.ts +54 -0
  138. package/node_modules/@engenty/local-models/dist/bridge/index.js +117 -0
  139. package/node_modules/@engenty/local-models/dist/clients/antigravity.d.ts +37 -0
  140. package/{apps/runtime/dist/harness → node_modules/@engenty/local-models/dist/clients}/antigravity.js +68 -17
  141. package/node_modules/@engenty/local-models/dist/clients/claude.js +1 -0
  142. package/node_modules/@engenty/local-models/dist/clients/client.d.ts +3 -1
  143. package/node_modules/@engenty/local-models/dist/clients/client.js +1 -1
  144. package/node_modules/@engenty/local-models/dist/clients/codex.js +1 -0
  145. package/node_modules/@engenty/local-models/dist/clients/cursor.d.ts +2 -0
  146. package/node_modules/@engenty/local-models/dist/clients/cursor.js +13 -1
  147. package/node_modules/@engenty/local-models/dist/clients/index.d.ts +2 -1
  148. package/node_modules/@engenty/local-models/dist/clients/index.js +4 -2
  149. package/node_modules/@engenty/local-models/dist/clients/model.d.ts +4 -1
  150. package/node_modules/@engenty/local-models/dist/index.d.ts +2 -1
  151. package/node_modules/@engenty/local-models/dist/index.js +2 -1
  152. package/node_modules/@engenty/local-models/dist/lmstudio/api.d.ts +49 -0
  153. package/node_modules/@engenty/local-models/dist/lmstudio/api.js +101 -0
  154. package/node_modules/@engenty/local-models/dist/lmstudio/index.d.ts +3 -0
  155. package/node_modules/@engenty/local-models/dist/lmstudio/index.js +3 -0
  156. package/node_modules/@engenty/local-models/dist/lmstudio/load.d.ts +12 -0
  157. package/node_modules/@engenty/local-models/dist/lmstudio/load.js +100 -0
  158. package/node_modules/@engenty/local-models/dist/lmstudio/server.d.ts +3 -0
  159. package/node_modules/@engenty/local-models/dist/lmstudio/server.js +29 -0
  160. package/node_modules/@engenty/local-models/dist/mlx/helper.d.ts +54 -0
  161. package/node_modules/@engenty/local-models/dist/mlx/helper.js +149 -0
  162. package/node_modules/@engenty/local-models/dist/mlx/index.d.ts +3 -0
  163. package/node_modules/@engenty/local-models/dist/mlx/index.js +3 -0
  164. package/node_modules/@engenty/local-models/dist/mlx/server.d.ts +19 -0
  165. package/node_modules/@engenty/local-models/dist/mlx/server.js +82 -0
  166. package/node_modules/@engenty/local-models/dist/mlx/store.d.ts +16 -0
  167. package/node_modules/@engenty/local-models/dist/mlx/store.js +153 -0
  168. package/node_modules/@engenty/local-models/dist/ollama/api.d.ts +4 -37
  169. package/node_modules/@engenty/local-models/dist/ollama/api.js +1 -18
  170. package/node_modules/@engenty/local-models/dist/ollama/index.d.ts +2 -1
  171. package/node_modules/@engenty/local-models/dist/ollama/index.js +2 -1
  172. package/node_modules/@engenty/local-models/dist/ollama/model.d.ts +2 -0
  173. package/node_modules/@engenty/local-models/dist/ollama/model.js +1 -1
  174. package/node_modules/@engenty/local-models/dist/ollama/server.d.ts +3 -0
  175. package/node_modules/@engenty/local-models/dist/ollama/server.js +45 -0
  176. package/node_modules/@engenty/local-models/dist/probe.d.ts +11 -8
  177. package/node_modules/@engenty/local-models/dist/probe.js +16 -32
  178. package/node_modules/@engenty/local-models/dist/servers/index.d.ts +6 -0
  179. package/node_modules/@engenty/local-models/dist/servers/index.js +12 -0
  180. package/node_modules/@engenty/local-models/dist/servers/server.d.ts +84 -0
  181. package/node_modules/@engenty/local-models/dist/servers/server.js +38 -0
  182. package/node_modules/@engenty/local-models/package.json +5 -1
  183. package/node_modules/@engenty/model-setup/dist/catalog.d.ts +36 -0
  184. package/node_modules/@engenty/model-setup/dist/catalog.js +81 -0
  185. package/node_modules/@engenty/model-setup/dist/index.d.ts +3 -0
  186. package/node_modules/@engenty/model-setup/dist/index.js +3 -0
  187. package/node_modules/@engenty/model-setup/dist/offered.d.ts +7 -0
  188. package/node_modules/@engenty/model-setup/dist/offered.js +64 -0
  189. package/node_modules/@engenty/model-setup/dist/react/client.d.ts +46 -0
  190. package/node_modules/@engenty/model-setup/dist/react/client.js +147 -0
  191. package/node_modules/@engenty/model-setup/dist/react/columns.d.ts +78 -0
  192. package/node_modules/@engenty/model-setup/dist/react/columns.js +99 -0
  193. package/node_modules/@engenty/model-setup/dist/react/host.d.ts +31 -0
  194. package/node_modules/@engenty/model-setup/dist/react/host.js +48 -0
  195. package/node_modules/@engenty/model-setup/dist/react/index.d.ts +7 -0
  196. package/node_modules/@engenty/model-setup/dist/react/index.js +7 -0
  197. package/node_modules/@engenty/model-setup/dist/react/keys.d.ts +48 -0
  198. package/node_modules/@engenty/model-setup/dist/react/keys.js +74 -0
  199. package/node_modules/@engenty/model-setup/dist/react/local-models.d.ts +23 -0
  200. package/node_modules/@engenty/model-setup/dist/react/local-models.js +134 -0
  201. package/node_modules/@engenty/model-setup/dist/react/servers.d.ts +4 -0
  202. package/node_modules/@engenty/model-setup/dist/react/servers.js +13 -0
  203. package/node_modules/@engenty/model-setup/dist/react/terminal.d.ts +13 -0
  204. package/node_modules/@engenty/model-setup/dist/react/terminal.js +79 -0
  205. package/node_modules/@engenty/model-setup/dist/react/tone.d.ts +13 -0
  206. package/node_modules/@engenty/model-setup/dist/react/tone.js +66 -0
  207. package/node_modules/@engenty/model-setup/dist/server/apps.d.ts +12 -0
  208. package/node_modules/@engenty/model-setup/dist/server/apps.js +22 -0
  209. package/node_modules/@engenty/model-setup/dist/server/clients.d.ts +55 -0
  210. package/node_modules/@engenty/model-setup/dist/server/clients.js +96 -0
  211. package/node_modules/@engenty/model-setup/dist/server/index.d.ts +8 -0
  212. package/node_modules/@engenty/model-setup/dist/server/index.js +8 -0
  213. package/node_modules/@engenty/model-setup/dist/server/install.d.ts +24 -0
  214. package/node_modules/@engenty/model-setup/dist/server/install.js +68 -0
  215. package/node_modules/@engenty/model-setup/dist/server/lmstudio.d.ts +9 -0
  216. package/node_modules/@engenty/model-setup/dist/server/lmstudio.js +52 -0
  217. package/node_modules/@engenty/model-setup/dist/server/local-models.d.ts +47 -0
  218. package/node_modules/@engenty/model-setup/dist/server/local-models.js +164 -0
  219. package/node_modules/@engenty/model-setup/dist/server/models.d.ts +12 -0
  220. package/node_modules/@engenty/model-setup/dist/server/models.js +16 -0
  221. package/node_modules/@engenty/model-setup/dist/server/ollama.d.ts +22 -0
  222. package/node_modules/@engenty/model-setup/dist/server/ollama.js +146 -0
  223. package/node_modules/@engenty/model-setup/dist/server/routes.d.ts +51 -0
  224. package/node_modules/@engenty/model-setup/dist/server/routes.js +211 -0
  225. package/node_modules/@engenty/model-setup/dist/server/server-apps.d.ts +14 -0
  226. package/node_modules/@engenty/model-setup/dist/server/server-apps.js +24 -0
  227. package/node_modules/@engenty/model-setup/dist/server/terminal.d.ts +43 -0
  228. package/node_modules/@engenty/model-setup/dist/server/terminal.js +222 -0
  229. package/node_modules/@engenty/model-setup/dist/texts.d.ts +222 -0
  230. package/node_modules/@engenty/model-setup/dist/texts.js +222 -0
  231. package/node_modules/@engenty/model-setup/dist/types.d.ts +111 -0
  232. package/node_modules/@engenty/model-setup/dist/types.js +2 -0
  233. package/node_modules/@engenty/model-setup/package.json +12 -0
  234. package/node_modules/@engenty/search-index/dist/catalog-lexical.d.ts +14 -0
  235. package/node_modules/@engenty/search-index/dist/catalog-lexical.js +165 -0
  236. package/node_modules/@engenty/search-index/dist/catalog-rank.d.ts +33 -0
  237. package/node_modules/@engenty/search-index/dist/catalog-rank.js +99 -0
  238. package/node_modules/@engenty/search-index/dist/catalog-search.d.ts +40 -0
  239. package/node_modules/@engenty/search-index/dist/catalog-search.js +161 -0
  240. package/node_modules/@engenty/search-index/dist/chunks.d.ts +17 -0
  241. package/node_modules/@engenty/search-index/dist/chunks.js +164 -0
  242. package/node_modules/@engenty/search-index/dist/contracts.d.ts +135 -0
  243. package/node_modules/@engenty/search-index/dist/contracts.js +9 -0
  244. package/node_modules/@engenty/search-index/dist/embedder.d.ts +31 -0
  245. package/node_modules/@engenty/search-index/dist/embedder.js +82 -0
  246. package/node_modules/@engenty/search-index/dist/embedders/gemini.d.ts +11 -0
  247. package/node_modules/@engenty/search-index/dist/embedders/gemini.js +54 -0
  248. package/node_modules/@engenty/search-index/dist/embedders/index.d.ts +5 -0
  249. package/node_modules/@engenty/search-index/dist/embedders/index.js +5 -0
  250. package/node_modules/@engenty/search-index/dist/embedders/ollama.d.ts +12 -0
  251. package/node_modules/@engenty/search-index/dist/embedders/ollama.js +43 -0
  252. package/node_modules/@engenty/search-index/dist/embedders/openai.d.ts +11 -0
  253. package/node_modules/@engenty/search-index/dist/embedders/openai.js +36 -0
  254. package/node_modules/@engenty/search-index/dist/embedders/shared.d.ts +5 -0
  255. package/node_modules/@engenty/search-index/dist/embedders/shared.js +26 -0
  256. package/node_modules/@engenty/search-index/dist/embedders/ways.d.ts +16 -0
  257. package/node_modules/@engenty/search-index/dist/embedders/ways.js +90 -0
  258. package/node_modules/@engenty/search-index/dist/index.d.ts +10 -0
  259. package/node_modules/@engenty/search-index/dist/index.js +10 -0
  260. package/node_modules/@engenty/search-index/dist/payload.d.ts +13 -0
  261. package/node_modules/@engenty/search-index/dist/payload.js +51 -0
  262. package/node_modules/@engenty/search-index/dist/registry.d.ts +25 -0
  263. package/node_modules/@engenty/search-index/dist/registry.js +56 -0
  264. package/node_modules/@engenty/search-index/dist/scoring.d.ts +10 -0
  265. package/node_modules/@engenty/search-index/dist/scoring.js +45 -0
  266. package/node_modules/@engenty/search-index/dist/strategy.d.ts +6 -0
  267. package/node_modules/@engenty/search-index/dist/strategy.js +25 -0
  268. package/node_modules/@engenty/search-index/package.json +10 -0
  269. package/node_modules/@engenty/tool-harness/dist/harness.d.ts +70 -0
  270. package/node_modules/@engenty/tool-harness/dist/harness.js +170 -0
  271. package/node_modules/@engenty/tool-harness/dist/index.d.ts +5 -0
  272. package/node_modules/@engenty/tool-harness/dist/index.js +5 -0
  273. package/node_modules/@engenty/tool-harness/dist/judge.d.ts +8 -0
  274. package/node_modules/@engenty/tool-harness/dist/judge.js +39 -0
  275. package/node_modules/@engenty/tool-harness/dist/levels.d.ts +18 -0
  276. package/node_modules/@engenty/tool-harness/dist/levels.js +47 -0
  277. package/node_modules/@engenty/tool-harness/dist/model.d.ts +6 -0
  278. package/node_modules/@engenty/tool-harness/dist/model.js +60 -0
  279. package/node_modules/@engenty/tool-harness/dist/schema.d.ts +26 -0
  280. package/node_modules/@engenty/tool-harness/dist/schema.js +57 -0
  281. package/node_modules/@engenty/tool-harness/package.json +9 -0
  282. package/node_modules/@engenty/wizards-shared/dist/catalog-prompt.js +2 -1
  283. package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +10 -10
  284. package/node_modules/@engenty/wizards-shared/dist/definition.js +4 -4
  285. package/node_modules/@engenty/wizards-shared/dist/run-schema.js +1 -1
  286. package/node_modules/@engenty/wizards-shared/dist/run.d.ts +3 -1
  287. package/node_modules/@engenty/wizards-shared/dist/run.js +4 -0
  288. package/node_modules/@engenty/wizards-shared/dist/store.js +2 -1
  289. package/node_modules/@engenty/wizards-shared/dist/wizard-agents.d.ts +1 -1
  290. package/node_modules/@engenty/wizards-shared/dist/wizard-agents.js +1 -1
  291. package/node_modules/@engenty/wizards-shared/dist/wizard-text.js +2 -2
  292. package/package.json +11 -1
  293. package/plugin/.claude-plugin/plugin.json +1 -1
  294. package/plugin/plugin.json +1 -1
  295. package/apps/runtime/dist/harness/terminal.js +0 -201
  296. package/apps/web/dist/assets/AboutDialog-BRUwrfQH.js +0 -1
  297. package/apps/web/dist/assets/Bundle-C0u5HUZL.js +0 -1
  298. package/apps/web/dist/assets/CapabilitiesPage-C30knXsS.js +0 -2
  299. package/apps/web/dist/assets/ChangelogDialog-BkZQOAdl.js +0 -1
  300. package/apps/web/dist/assets/ConnectorsSection-CmXQD7zu.js +0 -1
  301. package/apps/web/dist/assets/EditorPage-LEbyNWmG.js +0 -3
  302. package/apps/web/dist/assets/FlowPreview-BXf4EKjU.js +0 -1
  303. package/apps/web/dist/assets/LangSwitch-BLB7dDce.js +0 -1
  304. package/apps/web/dist/assets/Marketplace-B3NoH5Va.js +0 -2
  305. package/apps/web/dist/assets/NewWizardChannels-CSn-9zHr.js +0 -1
  306. package/apps/web/dist/assets/NewWizardPage-B4wPfClS.js +0 -7
  307. package/apps/web/dist/assets/OnboardingPage-RawpCO9J.js +0 -1
  308. package/apps/web/dist/assets/ProtocolSection-s4mEL_pu.js +0 -1
  309. package/apps/web/dist/assets/PublicRunner-COatyxMi.js +0 -1
  310. package/apps/web/dist/assets/Results-CC1-mElv.js +0 -1
  311. package/apps/web/dist/assets/RunDrawer-DkmSXhad.js +0 -1
  312. package/apps/web/dist/assets/SettingsPage-DKs_fkNL.js +0 -2
  313. package/apps/web/dist/assets/SetupPage-RvmKCzF2.js +0 -1
  314. package/apps/web/dist/assets/SharePage-Drntg_oj.js +0 -1
  315. package/apps/web/dist/assets/SkillEditor-Ca_bzmjD.js +0 -1
  316. package/apps/web/dist/assets/Skills-BcgxuD15.js +0 -9
  317. package/apps/web/dist/assets/SpacePage-aZqYFttF.js +0 -2
  318. package/apps/web/dist/assets/StudioHome-Doua9Lyl.js +0 -1
  319. package/apps/web/dist/assets/TableEditor-Dbq3HZZS.js +0 -7
  320. package/apps/web/dist/assets/UpdateCheck-B7etUbUf.js +0 -2
  321. package/apps/web/dist/assets/brand-BIT7AumL.js +0 -2
  322. package/apps/web/dist/assets/changelog-BW79cVbx.js +0 -1
  323. package/apps/web/dist/assets/code-editor-CufyaUFC.js +0 -2
  324. package/apps/web/dist/assets/host-BXSxBoOH.js +0 -69
  325. package/apps/web/dist/assets/i18n-WXeVnv7i.js +0 -55
  326. package/apps/web/dist/assets/index-D1iL3986.css +0 -1
  327. package/apps/web/dist/assets/index-kDKA6ddy.js +0 -102
  328. package/apps/web/dist/assets/oss-credits-B3PXhamW.js +0 -1
  329. package/apps/web/dist/assets/theme-23bNrOQh.js +0 -14
  330. package/apps/web/dist/assets/ui-DkEhb2Rt.js +0 -16
  331. package/apps/web/dist/assets/viewers-CmGDpBjn.js +0 -2
  332. /package/apps/web/dist/assets/{host-BrP-ENHg.css → terminal-BrP-ENHg.css} +0 -0
  333. /package/node_modules/@engenty/{wizards-shared → chatviews}/dist/calc.d.ts +0 -0
  334. /package/node_modules/@engenty/{wizards-shared → chatviews}/dist/numbers.d.ts +0 -0
  335. /package/node_modules/@engenty/{wizards-shared → chatviews}/dist/shape.d.ts +0 -0
  336. /package/node_modules/@engenty/{wizards-shared → chatviews}/dist/surface.d.ts +0 -0
@@ -0,0 +1,72 @@
1
+ // The ways to a decision model. All of them take the same System One request
2
+ // and differ only in address, key and model name: Jev through the Vercel AI
3
+ // Gateway, Jev on TypeSafe's own API, or Clef-flash (or Clef) in Ollama.
4
+ import { AI_GATEWAY_API_KEY_ENV, DEFAULT_TYPESAFE_BASE_URL, DEFAULT_TYPESAFE_MODEL, TYPESAFE_API_KEY_ENV, TypeSafeClient, VERCEL_JEV_MODEL, VERCEL_TYPESAFE_BASE_URL, } from "./client.js";
5
+ import { localWay } from "./local.js";
6
+ export const OLLAMA_BASE_URL_ENV = "OLLAMA_BASE_URL";
7
+ /** The ways, in the order `auto` tries them. */
8
+ export const DECISION_WAYS = ["gateway", "typesafe", "local"];
9
+ export const DECISION_CHOICES = ["auto", ...DECISION_WAYS, "off"];
10
+ /** The env slice the package reads, from a `process.env`-like reader. */
11
+ export function decisionEnvFrom(readEnv = (key) => globalThis.process?.env?.[key]) {
12
+ return {
13
+ gatewayKey: readEnv(AI_GATEWAY_API_KEY_ENV),
14
+ ollamaUrl: readEnv(OLLAMA_BASE_URL_ENV),
15
+ typesafeKey: readEnv(TYPESAFE_API_KEY_ENV),
16
+ };
17
+ }
18
+ function keyed(way, key, baseUrl, model) {
19
+ return (_env, options = {}) => {
20
+ const apiKey = key?.trim();
21
+ if (!apiKey) {
22
+ return Promise.resolve(null);
23
+ }
24
+ const client = new TypeSafeClient({ apiKey, baseUrl, model, ...options });
25
+ return Promise.resolve({
26
+ way,
27
+ model,
28
+ systemOne: (request) => client.systemOne(request),
29
+ });
30
+ };
31
+ }
32
+ const gatewayWay = {
33
+ way: "gateway",
34
+ open: (env, options) => keyed("gateway", env.gatewayKey, VERCEL_TYPESAFE_BASE_URL, VERCEL_JEV_MODEL)(env, options),
35
+ };
36
+ const typesafeWay = {
37
+ way: "typesafe",
38
+ open: (env, options) => keyed("typesafe", env.typesafeKey, DEFAULT_TYPESAFE_BASE_URL, DEFAULT_TYPESAFE_MODEL)(env, options),
39
+ };
40
+ const BUILT_IN = {
41
+ gateway: gatewayWay,
42
+ local: localWay,
43
+ typesafe: typesafeWay,
44
+ };
45
+ /** The decision model one way reaches; null where that way has none. */
46
+ export function decisionBy(way, env, options) {
47
+ return BUILT_IN[way].open(env, options);
48
+ }
49
+ /**
50
+ * The decision model a choice names: `auto` is the first way that opens, the
51
+ * built-in ones in order, then the host's `extra`; `off` and a way that has
52
+ * none are null. What follows null is the host's.
53
+ */
54
+ export async function decisionOf(choice, env, extra = [], options) {
55
+ if (choice === "off") {
56
+ return null;
57
+ }
58
+ const ways = [...DECISION_WAYS.map((w) => BUILT_IN[w]), ...extra];
59
+ for (const way of choice === "auto" ? ways : ways.filter((w) => w.way === choice)) {
60
+ const found = await way.open(env, options);
61
+ if (found) {
62
+ return found;
63
+ }
64
+ }
65
+ return null;
66
+ }
67
+ /** Which ways have a decision model now: for a settings page. */
68
+ export async function decisionReady(env, extra = [], options) {
69
+ const ways = [...DECISION_WAYS.map((w) => BUILT_IN[w]), ...extra];
70
+ const found = await Promise.all(ways.map(async (w) => [w.way, Boolean(await w.open(env, options))]));
71
+ return Object.fromEntries(found);
72
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@engenty/decision-model",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": "./dist/index.js"
8
+ }
9
+ }
@@ -0,0 +1,54 @@
1
+ import { type CallToolResult } from "@modelcontextprotocol/server";
2
+ import type { Bridge, BridgeTool } from "../clients/model.js";
3
+ /**
4
+ * The tools of one model call or one turn, served over MCP to an installed client (Claude Code,
5
+ * Codex, Cursor Agent) while it answers. Each open bridge has a token; the host mounts one route
6
+ * that answers them all and takes the token from the path or from the bearer header. A bridge
7
+ * opens with its call or turn and closes with it: a closed token is not found.
8
+ *
9
+ * Only MCP happens here: list the tools, call one, turn its result into MCP content. What a person
10
+ * sees of a call (an activity line, a card that asks, a held approval) is the host's, in the
11
+ * tool's `execute`.
12
+ */
13
+ export type { Bridge, BridgeTool } from "../clients/model.js";
14
+ /** One open bridge: its token and how to close it. */
15
+ export interface OpenBridge {
16
+ token: string;
17
+ close(): void;
18
+ }
19
+ /**
20
+ * A tool's result as MCP content. With `toModelOutput`, what it shapes: `text`, `json`, `content`
21
+ * (text and pictures), `error-text` and `error-json` as a failed result. Without it, a string as
22
+ * text and anything else as JSON.
23
+ */
24
+ export declare function contentOf(tool: Pick<BridgeTool, "toModelOutput">, output: unknown): CallToolResult;
25
+ /** The bearer token of a request, or an empty string. */
26
+ export declare function bearerOf(request: Request): string;
27
+ /** The bridges a host has open, and the one route that answers them all. */
28
+ export declare class Bridges {
29
+ private readonly open_;
30
+ private readonly name;
31
+ private readonly version;
32
+ constructor(options?: {
33
+ name?: string;
34
+ version?: string;
35
+ });
36
+ /**
37
+ * Opens the tools of one call or turn. `token`: the host's own; left out, 24 random bytes. The
38
+ * tools run in the async context of the code that opens the bridge (its tenant, its person),
39
+ * however the client's requests arrive.
40
+ */
41
+ open(tools: BridgeTool[], options?: {
42
+ token?: string;
43
+ }): OpenBridge;
44
+ /**
45
+ * Answers one MCP request of an open bridge. The token is `token` where the host took it from
46
+ * the path, else the request's bearer. A closed or unknown token is not found.
47
+ */
48
+ fetch(request: Request, token?: string): Promise<Response>;
49
+ /**
50
+ * The `bridge` of ClientModel: each call opens its tools at `<baseUrl>/<token>`, for clients
51
+ * that take a URL and no header. The host routes `<baseUrl>/:token` to `fetch`.
52
+ */
53
+ at(baseUrl: string): Bridge;
54
+ }
@@ -0,0 +1,117 @@
1
+ import { AsyncLocalStorage } from "node:async_hooks";
2
+ import { randomBytes } from "node:crypto";
3
+ import { createMcpHandler, fromJsonSchema, McpServer, } from "@modelcontextprotocol/server";
4
+ const textOf = (value) => typeof value === "string" ? value : JSON.stringify(value ?? null);
5
+ /** One part of a tool's `content` output as an MCP block: text, or a picture. */
6
+ function blockOf(part) {
7
+ if (part.type === "text") {
8
+ return { type: "text", text: part.text ?? "" };
9
+ }
10
+ if ((part.type === "image-data" || part.type === "file-data" || part.type === "media") &&
11
+ (part.type === "image-data" || part.mediaType?.startsWith("image/"))) {
12
+ return { type: "image", data: part.data ?? "", mimeType: part.mediaType ?? "image/png" };
13
+ }
14
+ return { type: "text", text: textOf(part) };
15
+ }
16
+ /**
17
+ * A tool's result as MCP content. With `toModelOutput`, what it shapes: `text`, `json`, `content`
18
+ * (text and pictures), `error-text` and `error-json` as a failed result. Without it, a string as
19
+ * text and anything else as JSON.
20
+ */
21
+ export function contentOf(tool, output) {
22
+ const shaped = (tool.toModelOutput?.(output) ?? undefined);
23
+ if (!shaped || typeof shaped !== "object" || !("type" in shaped)) {
24
+ return { content: [{ type: "text", text: textOf(output) }] };
25
+ }
26
+ switch (shaped.type) {
27
+ case "content":
28
+ return { content: (shaped.value ?? []).map(blockOf) };
29
+ case "error-text":
30
+ case "error-json":
31
+ return { isError: true, content: [{ type: "text", text: textOf(shaped.value) }] };
32
+ case "text":
33
+ case "json":
34
+ return { content: [{ type: "text", text: textOf(shaped.value) }] };
35
+ default:
36
+ return { content: [{ type: "text", text: textOf(output) }] };
37
+ }
38
+ }
39
+ const notFound = () => Response.json({ jsonrpc: "2.0", id: null, error: { code: -32001, message: "This call is over." } }, { status: 404 });
40
+ /** The bearer token of a request, or an empty string. */
41
+ export function bearerOf(request) {
42
+ const header = request.headers.get("authorization") ?? "";
43
+ return /^bearer\s+/i.test(header) ? header.replace(/^bearer\s+/i, "").trim() : "";
44
+ }
45
+ /** The bridges a host has open, and the one route that answers them all. */
46
+ export class Bridges {
47
+ open_ = new Map();
48
+ name;
49
+ version;
50
+ constructor(options = {}) {
51
+ this.name = options.name ?? "step";
52
+ this.version = options.version ?? "1";
53
+ }
54
+ /**
55
+ * Opens the tools of one call or turn. `token`: the host's own; left out, 24 random bytes. The
56
+ * tools run in the async context of the code that opens the bridge (its tenant, its person),
57
+ * however the client's requests arrive.
58
+ */
59
+ open(tools, options = {}) {
60
+ const token = options.token ?? randomBytes(24).toString("base64url");
61
+ const inCall = AsyncLocalStorage.snapshot();
62
+ const closed = new AbortController();
63
+ const handler = createMcpHandler(() => {
64
+ const server = new McpServer({ name: this.name, version: this.version }, { capabilities: { tools: {} } });
65
+ for (const tool of tools) {
66
+ server.registerTool(tool.name, {
67
+ description: tool.description,
68
+ inputSchema: fromJsonSchema(tool.inputSchema),
69
+ }, (async (args, ctx) => {
70
+ const signal = ctx?.mcpReq?.signal
71
+ ? AbortSignal.any([closed.signal, ctx.mcpReq.signal])
72
+ : closed.signal;
73
+ try {
74
+ return contentOf(tool, await inCall(() => tool.execute(args, { signal })));
75
+ }
76
+ catch (err) {
77
+ return {
78
+ isError: true,
79
+ content: [{ type: "text", text: err?.message ?? String(err) }],
80
+ };
81
+ }
82
+ }));
83
+ }
84
+ return server;
85
+ }, { legacy: "stateless" });
86
+ this.open_.set(token, { handler, closed });
87
+ return {
88
+ token,
89
+ close: () => {
90
+ const entry = this.open_.get(token);
91
+ if (entry) {
92
+ this.open_.delete(token);
93
+ entry.closed.abort();
94
+ }
95
+ },
96
+ };
97
+ }
98
+ /**
99
+ * Answers one MCP request of an open bridge. The token is `token` where the host took it from
100
+ * the path, else the request's bearer. A closed or unknown token is not found.
101
+ */
102
+ fetch(request, token) {
103
+ const entry = this.open_.get(token ?? bearerOf(request));
104
+ return entry ? entry.handler.fetch(request) : Promise.resolve(notFound());
105
+ }
106
+ /**
107
+ * The `bridge` of ClientModel: each call opens its tools at `<baseUrl>/<token>`, for clients
108
+ * that take a URL and no header. The host routes `<baseUrl>/:token` to `fetch`.
109
+ */
110
+ at(baseUrl) {
111
+ const base = baseUrl.replace(/\/+$/, "");
112
+ return (tools) => {
113
+ const bridge = this.open(tools);
114
+ return { url: `${base}/${bridge.token}`, close: bridge.close };
115
+ };
116
+ }
117
+ }
@@ -0,0 +1,37 @@
1
+ import type { Client } from "./client.js";
2
+ import { type Effort } from "./model.js";
3
+ /**
4
+ * Antigravity CLI: `agy` answers on the Google sign-in it cached — the Google AI subscription,
5
+ * which Gemini CLI no longer serves. The prompt goes on stdin as one stream-json message, the
6
+ * instructions in front of it: the client reads no system prompt and no rules of a folder it
7
+ * does not trust. It searches the web and reads the call's files with its own tools; the step's
8
+ * tools it cannot take, as it reads MCP servers only from the person's own config. The answer
9
+ * is checked against the schema by the client itself.
10
+ */
11
+ export declare const AGY_BIN: string;
12
+ /**
13
+ * The model of that name at the effort a call asks for: the models carry their effort in the
14
+ * name, `gemini-3.8-flash-<low|medium|high>`.
15
+ */
16
+ export declare function withEffort(model: string, effort?: Effort): string;
17
+ /** The `result` event of `agy --output-format stream-json`. */
18
+ export interface AntigravityResult {
19
+ conversation_id?: string;
20
+ status?: string;
21
+ response?: string;
22
+ error?: string;
23
+ structured_output?: unknown;
24
+ num_turns?: number;
25
+ duration_seconds?: number;
26
+ usage?: {
27
+ input_tokens?: number;
28
+ output_tokens?: number;
29
+ thinking_tokens?: number;
30
+ cache_read_tokens?: number;
31
+ };
32
+ }
33
+ /** The client's result among the events it prints; null when it printed none. */
34
+ export declare function antigravityAnswer(stdout: string): AntigravityResult | null;
35
+ /** The instructions in front of the prompt: the client takes one message and nothing besides. */
36
+ export declare function antigravityMessage(system: string, request: string): string;
37
+ export declare const antigravity: Client;
@@ -1,7 +1,10 @@
1
1
  import { writeFileSync } from "node:fs";
2
2
  import { join } from "node:path";
3
- import { ClientModel, clientFailure, probeVersion, resolveEnv, run, runClient, } from "@engenty/local-models/clients";
4
- import { modelOptions } from "./model.js";
3
+ import { parseLine } from "./chat.js";
4
+ import { probeVersion, resolveEnv, run } from "./env.js";
5
+ import { clientFailure } from "./failure.js";
6
+ import { ClientModel } from "./model.js";
7
+ import { runClient } from "./run.js";
5
8
  /**
6
9
  * Antigravity CLI: `agy` answers on the Google sign-in it cached — the Google AI subscription,
7
10
  * which Gemini CLI no longer serves. The prompt goes on stdin as one stream-json message, the
@@ -11,14 +14,10 @@ import { modelOptions } from "./model.js";
11
14
  * is checked against the schema by the client itself.
12
15
  */
13
16
  export const AGY_BIN = process.env.AGY_BIN?.trim() || "agy";
14
- /** The models carry their effort in the name: `gemini-3.8-flash-<low|medium|high>`. */
15
- const CLASSES = {
16
- classifier: "gemini-3.8-flash-low",
17
- low: "gemini-3.8-flash-medium",
18
- standard: "gemini-3.8-flash-high",
19
- high: "gemini-3.8-flash-high",
20
- };
21
- /** The model of that name at the effort a step asks for, where the name carries one. */
17
+ /**
18
+ * The model of that name at the effort a call asks for: the models carry their effort in the
19
+ * name, `gemini-3.8-flash-<low|medium|high>`.
20
+ */
22
21
  export function withEffort(model, effort) {
23
22
  return effort ? model.replace(/-(low|medium|high)$/, `-${effort}`) : model;
24
23
  }
@@ -72,8 +71,7 @@ class AntigravityModel extends ClientModel {
72
71
  "stream-json",
73
72
  "--output-format",
74
73
  "stream-json",
75
- "--model",
76
- withEffort(this.modelId, call.effort),
74
+ ...(this.modelId === "default" ? [] : ["--model", withEffort(this.modelId, call.effort)]),
77
75
  "--disable-slash-commands",
78
76
  ];
79
77
  if (call.schema) {
@@ -109,17 +107,70 @@ class AntigravityModel extends ClientModel {
109
107
  };
110
108
  }
111
109
  }
110
+ /** In a chat it only writes: no command, no file, no page, none of the person's own MCP servers. */
111
+ const CHAT_SETTINGS = JSON.stringify({
112
+ permissions: {
113
+ deny: [
114
+ "command(*)",
115
+ "read_file(*)",
116
+ "write_file(*)",
117
+ "read_url(*)",
118
+ "execute_url(*)",
119
+ "download_url(*)",
120
+ "mcp(*)",
121
+ ],
122
+ },
123
+ });
112
124
  export const antigravity = {
113
125
  ...spec,
114
126
  id: "antigravity",
115
127
  name: "Antigravity",
116
128
  bin: AGY_BIN,
117
- classes: CLASSES,
129
+ tools: false,
118
130
  version: (env) => probeVersion(AGY_BIN, env, (stdout) => stdout.trim().split("\n").pop()?.trim() || null),
119
131
  // No login command: the client asks for the Google sign-in when it starts without one.
120
132
  login: { args: [], interactive: true },
121
- model: (alias, effort) => new AntigravityModel(antigravity, alias || CLASSES.low, {
122
- ...modelOptions(antigravity),
123
- effort,
124
- }),
133
+ model: (alias, options) => new AntigravityModel(antigravity, alias || "default", options),
134
+ args: (call) => [
135
+ "--input-format",
136
+ "stream-json",
137
+ "--output-format",
138
+ "stream-json",
139
+ "--disable-slash-commands",
140
+ "--mode",
141
+ "plan",
142
+ "--settings",
143
+ CHAT_SETTINGS,
144
+ ...(call.model ? ["--model", call.model] : []),
145
+ ...(call.session ? ["--conversation", call.session] : []),
146
+ ],
147
+ // A conversation it continues has read the instructions.
148
+ stdin: (call) => antigravityMessage(call.session ? "" : call.system, call.message),
149
+ events(line) {
150
+ const event = parseLine(line);
151
+ const out = [];
152
+ if (event?.event === "init" && event.conversation_id) {
153
+ out.push({ kind: "session", id: event.conversation_id });
154
+ }
155
+ else if (event?.event === "step_update") {
156
+ const { step_type, text_delta } = event.step_update ?? {};
157
+ if (step_type === "agent_response" && text_delta) {
158
+ out.push({ kind: "writing", text: text_delta });
159
+ }
160
+ }
161
+ else if (event?.event === "result" && event.result) {
162
+ const { conversation_id, status, error, response } = event.result;
163
+ if (conversation_id) {
164
+ out.push({ kind: "session", id: conversation_id });
165
+ }
166
+ if (status !== "SUCCESS") {
167
+ out.push({ kind: "failure", detail: error || status || "error" });
168
+ }
169
+ else if (response) {
170
+ out.push({ kind: "result", text: response });
171
+ }
172
+ }
173
+ return out;
174
+ },
175
+ signedOut: (detail) => /authenticat|log ?in|logged in|sign in|unauthori[sz]ed|\b401\b/i.test(detail),
125
176
  };
@@ -126,6 +126,7 @@ export const claude = {
126
126
  id: "claude",
127
127
  name: "Claude Code",
128
128
  bin: CLAUDE_BIN,
129
+ tools: true,
129
130
  version: (env) => probeVersion(CLAUDE_BIN, env, (stdout) => stdout.trim().split(/\s+/)[0] || stdout.trim()),
130
131
  login: { args: ["auth", "login"], interactive: false },
131
132
  model: (alias, options) => new ClaudeCodeModel(claude, alias || "sonnet", options),
@@ -3,7 +3,7 @@ import type { EnvSpec } from "./env.js";
3
3
  import type { ClientMeta } from "./failure.js";
4
4
  import type { ClientModel, ClientModelOptions } from "./model.js";
5
5
  /** The AI clients a person signs in to with their own subscription. */
6
- export declare const CLIENT_IDS: readonly ["claude", "codex", "cursor"];
6
+ export declare const CLIENT_IDS: readonly ["claude", "codex", "antigravity", "cursor"];
7
7
  export type ClientId = (typeof CLIENT_IDS)[number];
8
8
  /**
9
9
  * An AI client installed on this computer that answers on the person's own subscription or
@@ -14,6 +14,8 @@ export type ClientId = (typeof CLIENT_IDS)[number];
14
14
  export interface Client extends EnvSpec, ChatClient, ClientMeta {
15
15
  id: ClientId;
16
16
  bin: string;
17
+ /** It takes the host's MCP server in a chat; without it, it only writes. */
18
+ tools: boolean;
17
19
  /** Null: not installed. Throws ProbeUndecided when the probe could not finish on a busy machine. */
18
20
  version(env: NodeJS.ProcessEnv): Promise<string | null>;
19
21
  /**
@@ -1,2 +1,2 @@
1
1
  /** The AI clients a person signs in to with their own subscription. */
2
- export const CLIENT_IDS = ["claude", "codex", "cursor"];
2
+ export const CLIENT_IDS = ["claude", "codex", "antigravity", "cursor"];
@@ -155,6 +155,7 @@ export const codex = {
155
155
  id: "codex",
156
156
  name: "Codex",
157
157
  bin: CODEX_BIN,
158
+ tools: true,
158
159
  version: (env) => probeVersion(CODEX_BIN, env, (stdout) => {
159
160
  const words = stdout.trim().split(/\s+/);
160
161
  return words[words.length - 1] || null;
@@ -31,3 +31,5 @@ export declare function cursorWorkspace(input: {
31
31
  /** The server names in the person's own ~/.cursor/mcp.json. */
32
32
  ownServers: string[];
33
33
  }): Record<string, string>;
34
+ /** The server names in the person's own ~/.cursor/mcp.json, which a chat's workspace denies. */
35
+ export declare function ownCursorServers(home?: string): string[];
@@ -1,4 +1,5 @@
1
- import { mkdirSync, writeFileSync } from "node:fs";
1
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
+ import { homedir } from "node:os";
2
3
  import { join } from "node:path";
3
4
  import { issuesIn, parseLine, record } from "./chat.js";
4
5
  import { probeVersion, resolveEnv, run } from "./env.js";
@@ -79,6 +80,7 @@ export const cursor = {
79
80
  id: "cursor",
80
81
  name: "Cursor Agent",
81
82
  bin: CURSOR_BIN,
83
+ tools: true,
82
84
  version: (env) => probeVersion(CURSOR_BIN, env, (stdout) => stdout.trim().split("\n").pop()?.trim() || null),
83
85
  login: { args: ["login"], interactive: false },
84
86
  model: (alias, options) => new CursorModel(cursor, alias || "auto", options),
@@ -178,3 +180,13 @@ export function cursorWorkspace(input) {
178
180
  }),
179
181
  };
180
182
  }
183
+ /** The server names in the person's own ~/.cursor/mcp.json, which a chat's workspace denies. */
184
+ export function ownCursorServers(home = homedir()) {
185
+ try {
186
+ const config = JSON.parse(readFileSync(join(home, ".cursor", "mcp.json"), "utf8"));
187
+ return Object.keys(config.mcpServers ?? {});
188
+ }
189
+ catch {
190
+ return [];
191
+ }
192
+ }
@@ -1,9 +1,10 @@
1
1
  import type { Client, ClientId } from "./client.js";
2
+ export { AGY_BIN, type AntigravityResult, antigravity, antigravityAnswer, antigravityMessage, withEffort, } from "./antigravity.js";
2
3
  export { type ChatCall, type ChatClient, type ChatEvent, type ChatMcp, issuesIn, } from "./chat.js";
3
4
  export { CLAUDE_BIN, type ClaudeResult, claude, claudeAnswer } from "./claude.js";
4
5
  export { CLIENT_IDS, type Client, type ClientId } from "./client.js";
5
6
  export { CODEX_BIN, type CodexEvent, codex, codexAnswer, codexExecArgs } from "./codex.js";
6
- export { CURSOR_BIN, type CursorResult, cursor, cursorWorkspace } from "./cursor.js";
7
+ export { CURSOR_BIN, type CursorResult, cursor, cursorWorkspace, ownCursorServers, } from "./cursor.js";
7
8
  export { type ClientStatus, type Detectable, detectClient } from "./detect.js";
8
9
  export { type ClientAuth, clientEnv, type EnvSpec, forgetEnv, freshAuth, loginEnv, loginShellEnv, ProbeUndecided, probeVersion, type ResolvedEnv, resolveEnv, run, setClientFolders, stripKeys, } from "./env.js";
9
10
  export { ClientFailure, type ClientMeta, clientFailure, type FailureCode, failureCode, } from "./failure.js";
@@ -1,11 +1,13 @@
1
+ import { antigravity } from "./antigravity.js";
1
2
  import { claude } from "./claude.js";
2
3
  import { codex } from "./codex.js";
3
4
  import { cursor } from "./cursor.js";
5
+ export { AGY_BIN, antigravity, antigravityAnswer, antigravityMessage, withEffort, } from "./antigravity.js";
4
6
  export { issuesIn, } from "./chat.js";
5
7
  export { CLAUDE_BIN, claude, claudeAnswer } from "./claude.js";
6
8
  export { CLIENT_IDS } from "./client.js";
7
9
  export { CODEX_BIN, codex, codexAnswer, codexExecArgs } from "./codex.js";
8
- export { CURSOR_BIN, cursor, cursorWorkspace } from "./cursor.js";
10
+ export { CURSOR_BIN, cursor, cursorWorkspace, ownCursorServers, } from "./cursor.js";
9
11
  export { detectClient } from "./detect.js";
10
12
  export { clientEnv, forgetEnv, freshAuth, loginEnv, loginShellEnv, ProbeUndecided, probeVersion, resolveEnv, run, setClientFolders, stripKeys, } from "./env.js";
11
13
  export { ClientFailure, clientFailure, failureCode, } from "./failure.js";
@@ -13,4 +15,4 @@ export { ClientImageModel, ClientModel, } from "./model.js";
13
15
  export { DEFAULT_WORDS, extensionOf, jsonInstruction, parseJsonAnswer, renderPrompt, } from "./prompt.js";
14
16
  export { lastJson, runClient } from "./run.js";
15
17
  /** The clients, by id. */
16
- export const CLIENTS = { claude, codex, cursor };
18
+ export const CLIENTS = { claude, codex, antigravity, cursor };
@@ -27,7 +27,10 @@ export interface BridgeTool {
27
27
  description?: string;
28
28
  /** JSON Schema of the input, as the model call declares it. */
29
29
  inputSchema: Record<string, unknown>;
30
- execute(input: unknown): Promise<unknown>;
30
+ /** `signal`: aborted when the bridge closes or the client gives the call up. */
31
+ execute(input: unknown, options?: {
32
+ signal?: AbortSignal;
33
+ }): Promise<unknown>;
31
34
  /** What the model gets to see of a result where a tool shapes it (a screenshot, say). */
32
35
  toModelOutput?: (output: unknown) => unknown;
33
36
  }
@@ -1,3 +1,4 @@
1
1
  export { CLIENT_IDS, CLIENTS, type Client, type ClientId, detectClient } from "./clients/index.js";
2
- export { fits, type InstalledModel, installedModels, ollamaModel, ollamaRoot, ollamaState, pullModel, } from "./ollama/index.js";
2
+ export { ollamaModel } from "./ollama/index.js";
3
3
  export { type ProbeResult, type ProbeSource, type ProbeState, probe } from "./probe.js";
4
+ export { fits, type InstalledModel, type LocalServer, SERVER_IDS, SERVERS, type ServerId, } from "./servers/index.js";
@@ -1,3 +1,4 @@
1
1
  export { CLIENT_IDS, CLIENTS, detectClient } from "./clients/index.js";
2
- export { fits, installedModels, ollamaModel, ollamaRoot, ollamaState, pullModel, } from "./ollama/index.js";
2
+ export { ollamaModel } from "./ollama/index.js";
3
3
  export { probe } from "./probe.js";
4
+ export { fits, SERVER_IDS, SERVERS, } from "./servers/index.js";
@@ -0,0 +1,49 @@
1
+ import { type InstalledModel, type ServerOptions, type ServerState } from "../servers/server.js";
2
+ /**
3
+ * LM Studio on a computer, through its own REST API (`/api/v1/…`, LM Studio 0.4.0 and newer): the
4
+ * models it holds, downloads, and a model loaded with the context length a caller needs. Where
5
+ * its server wants a token, LM_API_TOKEN is it.
6
+ */
7
+ /** Where LM Studio answers when nothing names another address. */
8
+ export declare const LMSTUDIO_DEFAULT = "http://127.0.0.1:1234";
9
+ /** LM Studio's root address, from its root or the OpenAI-compatible `…/v1`. */
10
+ export declare function lmStudioRoot(url: string): string;
11
+ /** Where LM Studio answers for this process: LMSTUDIO_URL (a root or `…/v1`), else its default. */
12
+ export declare function lmStudioAddress(env?: NodeJS.ProcessEnv): string;
13
+ /** A request's headers: the token, where there is one. */
14
+ export declare function lmStudioHeaders(env?: NodeJS.ProcessEnv): Record<string, string>;
15
+ /** A model as `GET /api/v1/models` lists it. */
16
+ export interface ListedModel {
17
+ type: "llm" | "embedding" | "decision";
18
+ key: string;
19
+ quantization?: {
20
+ name?: string | null;
21
+ } | null;
22
+ size_bytes: number;
23
+ loaded_instances?: {
24
+ id: string;
25
+ config?: {
26
+ context_length?: number;
27
+ };
28
+ }[];
29
+ max_context_length?: number | null;
30
+ format?: "gguf" | "mlx" | null;
31
+ capabilities?: {
32
+ vision?: boolean;
33
+ trained_for_tool_use?: boolean;
34
+ reasoning?: {
35
+ allowed_options?: string[];
36
+ };
37
+ };
38
+ decision_type?: string;
39
+ }
40
+ /** The models as LM Studio lists them; null where it does not answer. */
41
+ export declare function listedModels(url: string, { fetch: doFetch }?: ServerOptions): Promise<ListedModel[] | null>;
42
+ export declare function lmStudioState(url: string, { fetch: doFetch }?: ServerOptions): Promise<ServerState>;
43
+ /** The models of the LM Studio at `url`; empty where it does not answer. */
44
+ export declare function lmStudioModels(url: string, options?: ServerOptions): Promise<InstalledModel[]>;
45
+ /** Downloads a model of LM Studio's catalog, or by its Hugging Face address; asked again each second. */
46
+ export declare function lmStudioDownload(url: string, model: string, onProgress: (done: number, total: number) => void, { fetch: doFetch, signal, every, }?: ServerOptions & {
47
+ signal?: AbortSignal;
48
+ every?: number;
49
+ }): Promise<void>;