@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
package/README.md CHANGED
@@ -228,13 +228,13 @@ and is a site of its own: `pnpm dev:docs`.
228
228
 
229
229
  ## License
230
230
 
231
- The wizard format, the runner and four libraries are MIT. The rest of the code is FSL-1.1-MIT.
231
+ The wizard format, the runner and the libraries are MIT. The rest of the code is FSL-1.1-MIT.
232
232
 
233
233
  | What | Licence |
234
234
  |---|---|
235
- | The wizard format: the eighteen files of `packages/shared` that define a wizard, read it and pack it as a `.wizard` file | MIT or FSL-1.1-MIT, your choice ([LICENSE-MIT](packages/shared/LICENSE-MIT)) |
235
+ | The wizard format: the fifteen files of `packages/shared` that define a wizard, read it and pack it as a `.wizard` file | MIT or FSL-1.1-MIT, your choice ([LICENSE-MIT](packages/shared/LICENSE-MIT)) |
236
236
  | The runner, `packages/runner` | MIT ([LICENSE](packages/runner/LICENSE)) |
237
- | The libraries `@engenty/decision-model`, `@engenty/search-index`, `@engenty/search-libsql`, `@engenty/goose`, `@engenty/vault`, `@engenty/plugins`, `@engenty/browser` and `@engenty/local-models` on npm, in `packages/decision-model`, `packages/search-index`, `packages/search-libsql`, `packages/goose`, `packages/vault`, `packages/plugins`, `packages/browser` and `packages/local-models` | MIT (the `LICENSE` in each folder) |
237
+ | The libraries `@engenty/chatviews`, `@engenty/decision-model`, `@engenty/search-index`, `@engenty/search-libsql`, `@engenty/tool-harness`, `@engenty/goose`, `@engenty/vault`, `@engenty/plugins`, `@engenty/browser`, `@engenty/local-models` and `@engenty/model-setup` on npm, in `packages/chatviews`, `packages/decision-model`, `packages/search-index`, `packages/search-libsql`, `packages/tool-harness`, `packages/goose`, `packages/vault`, `packages/plugins`, `packages/browser`, `packages/local-models` and `packages/model-setup` | MIT (the `LICENSE` in each folder) |
238
238
  | The plugin for the AI apps, `plugin/`, without the engenty figures in it | MIT ([LICENSE](plugin/LICENSE)) |
239
239
  | Everything else: the studio, the runtime, the `wizards` command, `@engenty/wizards` on npm | FSL-1.1-MIT ([LICENSE](LICENSE)) |
240
240
  | The engenty figures as artwork | CC BY 4.0 ([LICENSE-FIGURES](LICENSE-FIGURES)) |
@@ -29,6 +29,7 @@ import { CORE, kindsOf, listSources, proposeSource, takeSource, } from "../servi
29
29
  import { ownedSpace, updateSpace } from "../services/spaces.js";
30
30
  import { currentTenant } from "../tenants/tenant.js";
31
31
  import { serverText } from "../texts.js";
32
+ import { harnessed, harnessedModel, oneOfMany } from "../tools/harness.js";
32
33
  import { assistantPageOf, assistantToolsOf } from "../tools/plugin.js";
33
34
  import { attempt as attemptTool, imageOutput } from "../tools/shared.js";
34
35
  import { gatewayWebSearch } from "../tools/web-search.js";
@@ -968,12 +969,14 @@ export async function runStudioAssistant(input) {
968
969
  tools.web_search = gatewayTools.perplexitySearch({ maxResults: 6 });
969
970
  }
970
971
  const instructions = system(switches.capabilities === true);
972
+ // The person's connections and the plugins' tools: many, and few of them in one chat.
973
+ const harness = harnessed(tools, resolved, (_name, tool) => oneOfMany(tool));
971
974
  const agent = spaceAgent({
972
975
  id: "studio-assistant",
973
976
  name: "Studio assistant",
974
977
  instructions,
975
- resolved,
976
- tools,
978
+ resolved: harnessedModel(resolved),
979
+ tools: harness.tools,
977
980
  });
978
981
  const page = input.page;
979
982
  const pluginPage = page?.plugin && space
@@ -1020,6 +1023,7 @@ export async function runStudioAssistant(input) {
1020
1023
  : part === "skills"
1021
1024
  ? prompt("goose", "turn.skills_empty")
1022
1025
  : "",
1026
+ await harness.hint(input.message, input.signal),
1023
1027
  input.message,
1024
1028
  ]
1025
1029
  .filter(Boolean)
@@ -1029,7 +1033,7 @@ export async function runStudioAssistant(input) {
1029
1033
  system: instructions,
1030
1034
  context,
1031
1035
  history: history.messages.map((m) => ({ role: m.role, chars: m.content.length })),
1032
- tools: toolSizes(tools),
1036
+ tools: toolSizes(harness.tools),
1033
1037
  });
1034
1038
  let reply = "";
1035
1039
  // Where the part the result holds begins: a message written meanwhile cuts the answer there.
@@ -1,10 +1,9 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import { randomUUID } from "node:crypto";
3
- import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
4
- import { homedir } from "node:os";
3
+ import { mkdirSync, rmSync, writeFileSync } from "node:fs";
5
4
  import { dirname, join } from "node:path";
6
5
  import { createInterface } from "node:readline";
7
- import { CLIENT_IDS, CLIENTS, cursorWorkspace, resolveEnv, } from "@engenty/local-models/clients";
6
+ import { CLIENT_IDS, CLIENTS, cursorWorkspace, ownCursorServers, resolveEnv, } from "@engenty/local-models/clients";
8
7
  import { note } from "@engenty/wizards-shared/run";
9
8
  import { internalKey } from "../auth/keys.js";
10
9
  import { env } from "../env.js";
@@ -19,8 +18,8 @@ import { ServiceError } from "../services/errors.js";
19
18
  import { deleteSetting, readSetting, writeSetting } from "../settings.js";
20
19
  import { serverText } from "../texts.js";
21
20
  import { thoughtLine } from "./thought.js";
22
- /** The clients whose subscription can answer the studio chat. */
23
- const SUBSCRIPTION_CLIENTS = CLIENT_IDS;
21
+ /** The clients whose subscription can answer the studio chat: those that take its MCP tools. */
22
+ const SUBSCRIPTION_CLIENTS = CLIENT_IDS.filter((id) => CLIENTS[id].tools);
24
23
  /** The environment variable Codex reads this server's bearer key from. */
25
24
  const CODEX_KEY_VAR = "WIZARDS_MCP_KEY";
26
25
  /** This server's MCP server, as the clients know it. */
@@ -50,18 +49,6 @@ function mcpConfig() {
50
49
  }), { mode: 0o600 });
51
50
  return file;
52
51
  }
53
- /** The server names in the person's own Cursor config, which the chat's workspace denies. */
54
- function ownCursorServers() {
55
- const file = join(homedir(), ".cursor", "mcp.json");
56
- try {
57
- return existsSync(file)
58
- ? Object.keys(JSON.parse(readFileSync(file, "utf8")).mcpServers ?? {})
59
- : [];
60
- }
61
- catch {
62
- return [];
63
- }
64
- }
65
52
  const SYSTEM = (wizardId) => `${prompt("architect", "persona")}\n\n${prompt("architect", "subscription.system", { wizard_id: wizardId })}\n\n${contentPolicy()}`;
66
53
  const BUILDING = /edit_wizard|write_wizard|write_file|delete_file|create_wizard/;
67
54
  const ACTIVITY = [
@@ -2,6 +2,7 @@ import { existsSync } from "node:fs";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import { dirname, join, resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
+ import { TerminalError } from "@engenty/model-setup/server";
5
6
  import { BUILT_IN_RUNNERS, RUNNER_ID } from "@engenty/wizards-shared/runners";
6
7
  import { serveStatic } from "@hono/node-server/serve-static";
7
8
  import { and, eq } from "drizzle-orm";
@@ -39,6 +40,7 @@ import { internalRoutes } from "./routes/internal.js";
39
40
  import { notFoundAnswer, requestLang, say, spelledFor } from "./routes/lang.js";
40
41
  import { liveRoutes } from "./routes/live.js";
41
42
  import { marketplaceGuest, marketplaceStudio } from "./routes/marketplace.js";
43
+ import { terminalRefused } from "./routes/model-setup.js";
42
44
  import { organizationRoutes } from "./routes/organization.js";
43
45
  import { peerRoutes } from "./routes/peer.js";
44
46
  import { personRoutes } from "./routes/person.js";
@@ -77,7 +79,8 @@ app.use("*", async (c, next) => {
77
79
  done();
78
80
  }
79
81
  });
80
- app.onError((err, c) => {
82
+ app.onError((thrown, c) => {
83
+ const err = thrown instanceof TerminalError ? terminalRefused(thrown) : thrown;
81
84
  if (err instanceof ServiceError) {
82
85
  const body = err.toJSON(requestLang(c));
83
86
  return c.json({ ...body, error: spelledFor(c, body.error) }, err.status);
@@ -1,31 +1,9 @@
1
1
  import { mkdirSync } from "node:fs";
2
2
  import { delimiter, dirname, join } from "node:path";
3
+ import { installCommand, POWERSHELL } from "@engenty/model-setup";
3
4
  import { runtimePath, withPath } from "./environment.js";
4
5
  import { runLogged } from "./exec.js";
5
6
  import { findOnPath } from "./machine.js";
6
- /** A word for the shell: quoted when it holds anything but plain characters. */
7
- const shellWord = (word) => /^[\w@%+=:,./-]+$/.test(word) ? word : `'${word.replaceAll("'", "'\\''")}'`;
8
- /** A word for PowerShell: in single quotes, which take everything but a single quote as it is. */
9
- const powershellWord = (word) => /^[\w@%+=:,./\\-]+$/.test(word) ? word : `'${word.replaceAll("'", "''")}'`;
10
- /** The command the setup runs for a client, as the person would type it (PowerShell on Windows). */
11
- export function installCommand(client, paths, platform = process.platform) {
12
- const windows = platform === "win32";
13
- if (client.install.kind === "npm") {
14
- const prefix = windows ? powershellWord(paths.clients) : shellWord(paths.clients);
15
- return `npm install --global --prefix ${prefix} ${client.install.pkg}`;
16
- }
17
- return windows
18
- ? `irm ${powershellWord(client.install.windows)} | iex`
19
- : `curl -fsSL ${client.install.url} | bash`;
20
- }
21
- /** PowerShell, for a command written for it: without the person's profile, scripts allowed. */
22
- export const POWERSHELL = [
23
- "powershell.exe",
24
- "-NoProfile",
25
- "-ExecutionPolicy",
26
- "Bypass",
27
- "-Command",
28
- ];
29
7
  /**
30
8
  * Installs an AI client. One that comes from npm goes into the install's own prefix
31
9
  * (`clients/`), with the npm of the Node that runs this command: nothing of the person's own
@@ -36,7 +14,11 @@ export function installClient(client, paths, onLine) {
36
14
  const env = withPath(process.env, runtimePath(paths, process.env));
37
15
  if (client.install.kind === "script" && process.platform === "win32") {
38
16
  const [shell, ...args] = POWERSHELL;
39
- return runLogged(shell, [...args, installCommand(client, paths)], { env, logFile, onLine });
17
+ return runLogged(shell, [...args, installCommand(client, paths.clients, process.platform)], {
18
+ env,
19
+ logFile,
20
+ onLine,
21
+ });
40
22
  }
41
23
  if (client.install.kind === "script") {
42
24
  return runLogged("bash", ["-c", `set -o pipefail; curl -fsSL ${client.install.url} | bash`], {
@@ -3,8 +3,9 @@ import { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from
3
3
  import { homedir } from "node:os";
4
4
  import { delimiter, dirname, join } from "node:path";
5
5
  import { promisify } from "node:util";
6
+ import { macAppPresent } from "@engenty/model-setup/server";
6
7
  import { commandFile, installedByScript, installedScript, packageRoot, } from "./home.js";
7
- import { findOnPath, macAppPresent } from "./machine.js";
8
+ import { findOnPath } from "./machine.js";
8
9
  import { bad, cmd, dim, ok, tilde } from "./ui.js";
9
10
  const run = promisify(execFile);
10
11
  /**
@@ -33,6 +33,9 @@ const INHERITED = new Set([
33
33
  "CHROME_PATH",
34
34
  "FFMPEG_PATH",
35
35
  "OLLAMA_URL",
36
+ "LMSTUDIO_URL",
37
+ "LM_API_TOKEN",
38
+ "MLX_MODELS",
36
39
  "SANDBOX",
37
40
  "SANDBOX_ENABLED",
38
41
  "SANDBOX_IMAGE",
@@ -1,78 +1,9 @@
1
- import { existsSync } from "node:fs";
2
- import { homedir } from "node:os";
3
- import { join } from "node:path";
1
+ import { CLIENTS } from "@engenty/model-setup";
4
2
  // The search for a browser is shared with env.ts, so the runtime uses the one the setup found.
5
3
  import { findChrome, findOnPath } from "../render/browser-path.js";
6
4
  import { runtimePath, withPath } from "./environment.js";
7
5
  import { runFile as run } from "./exec.js";
8
6
  export { findChrome, findOnPath };
9
- /** The AI clients the runtime can think with, in the order its own setup offers them. */
10
- export const CLIENTS = [
11
- {
12
- id: "codex",
13
- name: "Codex",
14
- bin: "codex",
15
- account: "ChatGPT",
16
- install: { kind: "npm", pkg: "@openai/codex" },
17
- app: "ChatGPT",
18
- },
19
- {
20
- id: "claude",
21
- name: "Claude Code",
22
- bin: "claude",
23
- account: "Claude",
24
- install: {
25
- kind: "script",
26
- url: "https://claude.ai/install.sh",
27
- windows: "https://claude.ai/install.ps1",
28
- },
29
- app: "Claude",
30
- },
31
- {
32
- id: "antigravity",
33
- name: "Antigravity",
34
- bin: "agy",
35
- account: "Google AI",
36
- install: {
37
- kind: "script",
38
- url: "https://antigravity.google/cli/install.sh",
39
- windows: "https://antigravity.google/cli/install.ps1",
40
- },
41
- app: "Antigravity",
42
- },
43
- {
44
- id: "cursor",
45
- name: "Cursor Agent",
46
- bin: "cursor-agent",
47
- account: "Cursor",
48
- install: {
49
- kind: "script",
50
- url: "https://cursor.com/install",
51
- windows: "https://cursor.com/install?win32=true",
52
- },
53
- app: "Cursor",
54
- },
55
- ];
56
- const APP_ROOTS = ["/Applications", join(homedir(), "Applications")];
57
- /** Whether `<name>.app` is in one of the Mac's Applications folders. */
58
- export function macAppPresent(name, roots = APP_ROOTS) {
59
- return roots.some((root) => existsSync(join(root, `${name}.app`)));
60
- }
61
- /** The client's desktop app, when it is on this Mac: its name, e.g. "Claude". */
62
- export function vendorApp(client, roots = APP_ROOTS) {
63
- if (process.platform !== "darwin" || !client.app) {
64
- return null;
65
- }
66
- return macAppPresent(client.app, roots) ? client.app : null;
67
- }
68
- /**
69
- * The client the setup suggests among those not installed: the one whose app is on this Mac —
70
- * its subscription is most likely already paid for — else the first.
71
- */
72
- export function suggestedClient(missing) {
73
- return missing.find((state) => vendorApp(state.client)) ?? missing[0] ?? null;
74
- }
75
- /** The first file of that name on a PATH that may be run. */
76
7
  /** What a command prints for `--version`: its last word that looks like one. */
77
8
  async function versionOf(file, path) {
78
9
  try {
@@ -1,4 +1,5 @@
1
1
  // First: drops Node's `localStorage` before a dependency reads it (no-webstorage.ts).
2
+ import { CLIENTS } from "@engenty/model-setup";
2
3
  import "../no-webstorage.js";
3
4
  import "./install-env.js";
4
5
  import { accountCommand } from "./account.js";
@@ -7,7 +8,7 @@ import { findExternal, runExternal } from "./external.js";
7
8
  import { featuresCommand } from "./features.js";
8
9
  import { command, layout, packageVersion, readInstallNote } from "./home.js";
9
10
  import { startedIn } from "./install-env.js";
10
- import { CLIENTS, nodeIsCurrent } from "./machine.js";
11
+ import { nodeIsCurrent } from "./machine.js";
11
12
  import { mcp } from "./mcp.js";
12
13
  import { menu } from "./menu.js";
13
14
  import { logsCommand, reportCommand } from "./report.js";
@@ -1,52 +1,10 @@
1
- import { spawn } from "node:child_process";
2
- import { accessSync, constants, existsSync, mkdirSync, mkdtempSync, openSync, realpathSync, rmSync, } from "node:fs";
3
- import { statfs } from "node:fs/promises";
4
- import { homedir, tmpdir } from "node:os";
5
- import { join } from "node:path";
6
- import { setTimeout as sleep } from "node:timers/promises";
7
1
  import { ollamaAddress, ollamaState } from "@engenty/local-models/ollama";
2
+ import { findOllama } from "@engenty/model-setup/server";
8
3
  import { decisionModelIn } from "../decision-model.js";
9
- import { runLogged } from "./exec.js";
10
- import { findOnPath } from "./machine.js";
11
4
  /** The first Ollama that answers decision questions at /v1/systemone. */
12
5
  const DECISIONS_SINCE = [0, 35, 0];
13
6
  /** What Clef-flash takes on disk, and about as much memory while it answers, in GB. */
14
7
  export const DECISION_MODEL_GB = 11;
15
- /** The Ollama app on a Mac: its server and its command are inside it. */
16
- const MAC_APPS = ["/Applications/Ollama.app", join(homedir(), "Applications", "Ollama.app")];
17
- const MAC_DOWNLOAD = "https://ollama.com/download/Ollama-darwin.zip";
18
- /** Ollama's own installer on Linux: it puts the server in a systemd service, with sudo. */
19
- const LINUX_SCRIPT = "https://ollama.com/install.sh";
20
- /**
21
- * What that installer needs and a fresh Debian lacks: zstd, to unpack Ollama. Installed first
22
- * with the system's package manager, under the same password.
23
- */
24
- const LINUX_ZSTD = [
25
- "if ! command -v zstd >/dev/null 2>&1; then",
26
- " if command -v apt-get >/dev/null 2>&1; then sudo apt-get update -qq && sudo apt-get install -y -qq zstd",
27
- " elif command -v dnf >/dev/null 2>&1; then sudo dnf install -y -q zstd",
28
- " elif command -v pacman >/dev/null 2>&1; then sudo pacman -S --noconfirm --needed zstd",
29
- " elif command -v zypper >/dev/null 2>&1; then sudo zypper --non-interactive install zstd",
30
- " fi",
31
- "fi",
32
- ].join("\n");
33
- function executable(file) {
34
- try {
35
- accessSync(file, constants.X_OK);
36
- return true;
37
- }
38
- catch {
39
- return false;
40
- }
41
- }
42
- /** The `ollama` command: on the PATH, or inside the app on a Mac that never linked it. */
43
- export function findOllama(env = process.env) {
44
- const onPath = findOnPath("ollama", env.PATH ?? "");
45
- if (onPath || process.platform !== "darwin") {
46
- return onPath;
47
- }
48
- return (MAC_APPS.map((app) => join(app, "Contents", "Resources", "ollama")).find(executable) ?? null);
49
- }
50
8
  /** Ollama on this computer: its command, the server that answers at OLLAMA_URL, and its decision model. */
51
9
  export async function localOllama(env = process.env) {
52
10
  const { version, models } = await ollamaState(ollamaAddress(env));
@@ -63,142 +21,6 @@ export function servesDecisions(version) {
63
21
  }
64
22
  return true;
65
23
  }
66
- /** Free space where Ollama keeps its models (the home folder), in GB. */
67
- export async function freeGb(dir = homedir()) {
68
- try {
69
- const stats = await statfs(dir);
70
- return Math.floor((stats.bavail * stats.bsize) / 2 ** 30);
71
- }
72
- catch {
73
- return null;
74
- }
75
- }
76
- /** The app an `ollama` command belongs to on a Mac; null for one from Homebrew or elsewhere. */
77
- function macApp(path) {
78
- if (process.platform !== "darwin") {
79
- return null;
80
- }
81
- if (!path) {
82
- return MAC_APPS.find((app) => existsSync(app)) ?? null;
83
- }
84
- try {
85
- const real = realpathSync(path);
86
- const at = real.indexOf(".app/");
87
- return at > 0 ? real.slice(0, at + 4) : null;
88
- }
89
- catch {
90
- return null;
91
- }
92
- }
93
- /**
94
- * Installs Ollama. On a Mac its app goes into Applications (~/Applications where that is not
95
- * writable) and asks for no password; on Linux Ollama's own script runs in this terminal and
96
- * asks for one, as it installs a system service.
97
- */
98
- export async function installOllama(paths, onLine) {
99
- const logFile = join(paths.logs, "install.log");
100
- if (process.platform === "darwin") {
101
- let target = "/Applications";
102
- try {
103
- accessSync(target, constants.W_OK);
104
- }
105
- catch {
106
- target = join(homedir(), "Applications");
107
- mkdirSync(target, { recursive: true });
108
- }
109
- const tmp = mkdtempSync(join(tmpdir(), "ollama-"));
110
- try {
111
- const zip = join(tmp, "Ollama.zip");
112
- const download = await runLogged("curl", ["-fsSL", MAC_DOWNLOAD, "-o", zip], {
113
- logFile,
114
- onLine,
115
- });
116
- if (download.code !== 0) {
117
- return { ok: false, message: `The download failed. ${lastLine(download.tail)}` };
118
- }
119
- const unpack = await runLogged("ditto", ["-x", "-k", zip, target], { logFile, onLine });
120
- if (unpack.code !== 0) {
121
- return { ok: false, message: `It could not be unpacked. ${lastLine(unpack.tail)}` };
122
- }
123
- return { ok: true, message: join(target, "Ollama.app") };
124
- }
125
- finally {
126
- rmSync(tmp, { recursive: true, force: true });
127
- }
128
- }
129
- if (process.platform === "linux") {
130
- const code = await new Promise((resolve) => {
131
- const child = spawn("sh", ["-c", `${LINUX_ZSTD}\ncurl -fsSL ${LINUX_SCRIPT} | sh`], {
132
- stdio: "inherit",
133
- });
134
- child.on("error", () => resolve(127));
135
- child.on("close", (status) => resolve(status ?? 1));
136
- });
137
- return code === 0
138
- ? { ok: true, message: findOllama() ?? "ollama" }
139
- : { ok: false, message: `Ollama’s installer stopped (exit ${code}).` };
140
- }
141
- return { ok: false, message: "Ollama is installed by this setup on macOS and Linux only." };
142
- }
143
- const lastLine = (text) => text.split("\n").pop() ?? "";
144
- /**
145
- * Whether the Ollama app asks for the Mac's password when it starts: the first time, it wants to
146
- * link its `ollama` command into /usr/local/bin, and its server waits for the answer (cancel
147
- * works too). Not once that link points into the app.
148
- */
149
- export function appAsksForPassword(path) {
150
- const app = macApp(path);
151
- if (!app) {
152
- return false;
153
- }
154
- try {
155
- return realpathSync("/usr/local/bin/ollama") !== join(app, "Contents", "Resources", "ollama");
156
- }
157
- catch {
158
- return true;
159
- }
160
- }
161
- /**
162
- * Starts Ollama's server where it does not run: the app on a Mac (it then starts at login by
163
- * itself), Homebrew's service, else `ollama serve` in the background. Its version once it
164
- * answers; null where it does not in time — three minutes for the app, which may wait for a
165
- * password, half a minute otherwise.
166
- */
167
- export async function startOllama(path, paths) {
168
- const logFile = join(paths.logs, "install.log");
169
- const app = macApp(path);
170
- const brew = findOnPath("brew", process.env.PATH ?? "");
171
- let real = path ?? "";
172
- try {
173
- real = path ? realpathSync(path) : "";
174
- }
175
- catch {
176
- // a dangling link: started as it is
177
- }
178
- if (app) {
179
- await runLogged("open", ["-g", app], { logFile });
180
- }
181
- else if (brew && real.includes("/Cellar/ollama/")) {
182
- await runLogged(brew, ["services", "start", "ollama"], { logFile });
183
- }
184
- else if (path) {
185
- mkdirSync(paths.logs, { recursive: true });
186
- const out = openSync(join(paths.logs, "ollama.log"), "a");
187
- spawn(path, ["serve"], { detached: true, stdio: ["ignore", out, out] }).unref();
188
- }
189
- else {
190
- return null;
191
- }
192
- const deadline = Date.now() + (app ? 180_000 : 30_000);
193
- while (Date.now() < deadline) {
194
- const { version } = await localOllama();
195
- if (version) {
196
- return version;
197
- }
198
- await sleep(500);
199
- }
200
- return null;
201
- }
202
24
  /**
203
25
  * Whether Ollama runs the model: one question it has to answer. Null when it does; otherwise
204
26
  * Ollama's reason, such as a newer Ollama that no longer runs a model in the format it was pulled
@@ -3,16 +3,18 @@ import { homedir, totalmem } from "node:os";
3
3
  import { delimiter, join } from "node:path";
4
4
  import * as p from "@clack/prompts";
5
5
  import { ollamaAddress, pullModel } from "@engenty/local-models/ollama";
6
+ import { CLIENTS, installCommand } from "@engenty/model-setup";
7
+ import { appAsksForPassword, freeGb, installOllama, startOllama, suggestedClient, vendorApp, } from "@engenty/model-setup/server";
6
8
  import { LOCAL_DECISION_MODEL } from "../decision-model.js";
7
9
  import { installAll, ON_DEMAND } from "../on-demand.js";
8
10
  import { accountStep } from "./account.js";
9
11
  import { autostartForStatus, setAutostart } from "./autostart.js";
10
- import { installClient, installCommand } from "./clients.js";
12
+ import { installClient } from "./clients.js";
11
13
  import { appStates, connectApps } from "./connect.js";
12
14
  import { runLogged } from "./exec.js";
13
15
  import { command, installedByScript, isCheckout, layout, packageVersion, readInstallNote, writeInstallNote, } from "./home.js";
14
- import { CLIENTS, detectClients, findChrome, findFfmpeg, findOnPath, suggestedClient, vendorApp, } from "./machine.js";
15
- import { appAsksForPassword, DECISION_MODEL_GB, decisionModelProblem, freeGb, installOllama, localOllama, servesDecisions, startOllama, } from "./ollama.js";
16
+ import { detectClients, findChrome, findFfmpeg, findOnPath } from "./machine.js";
17
+ import { DECISION_MODEL_GB, decisionModelProblem, localOllama, servesDecisions } from "./ollama.js";
16
18
  import { runningRuntime, settings } from "./start.js";
17
19
  import { badge, busy, cmd, cyan, dim, tilde } from "./ui.js";
18
20
  /** The studio as an app of its own: Chrome (or Edge) installs it from the page. */
@@ -26,7 +28,7 @@ function cancelled(value) {
26
28
  }
27
29
  async function install(client, paths) {
28
30
  const task = p.taskLog({ title: `Installing ${client.name}`, limit: 6 });
29
- task.message(dim(installCommand(client, paths)));
31
+ task.message(dim(installCommand(client, paths.clients, process.platform)));
30
32
  const { code, tail } = await installClient(client, paths, (line) => task.message(line));
31
33
  const installed = (await detectClients(paths)).find((state) => state.client.id === client.id);
32
34
  if (code === 0 && installed?.path) {
@@ -237,7 +239,7 @@ async function decisionModelStep(paths, interactive) {
237
239
  if (!task) {
238
240
  p.log.info("Ollama’s own installer runs now and asks for your password.");
239
241
  }
240
- const outcome = await installOllama(paths, (line) => task?.message(line));
242
+ const outcome = await installOllama(paths.logs, (line) => task?.message(line));
241
243
  if (!outcome.ok) {
242
244
  const text = `Ollama didn’t install. ${outcome.message}`;
243
245
  task ? task.error(text) : p.log.error(text);
@@ -254,7 +256,7 @@ async function decisionModelStep(paths, interactive) {
254
256
  }
255
257
  const spinner = p.spinner();
256
258
  spinner.start("Waiting for Ollama");
257
- version = await startOllama(ollama, paths);
259
+ version = await startOllama(ollama, paths.logs);
258
260
  if (!version) {
259
261
  spinner.error(`Ollama isn’t answering. Start it, then run ${cmd("setup")} again.`);
260
262
  return;
@@ -14,18 +14,18 @@ Use it, change it and share it in any app, open or closed. Keep the licence text
14
14
 
15
15
  | Part | Where | Licence |
16
16
  |---|---|---|
17
- | The wizard format | eighteen files in `packages/shared/src` | MIT or FSL-1.1-MIT, your choice ([LICENSE-MIT](https://github.com/engenty/wizards/blob/main/packages/shared/LICENSE-MIT)) |
17
+ | The wizard format | fifteen files in `packages/shared/src` | MIT or FSL-1.1-MIT, your choice ([LICENSE-MIT](https://github.com/engenty/wizards/blob/main/packages/shared/LICENSE-MIT)) |
18
18
  | The runner | `@engenty/wizards-runner` in `packages/runner` | MIT ([LICENSE](https://github.com/engenty/wizards/blob/main/packages/runner/LICENSE)) |
19
19
  | The plugin for the AI apps | `plugin/`, without the engenty figures in it | MIT ([LICENSE](https://github.com/engenty/wizards/blob/main/plugin/LICENSE)) |
20
- | The libraries | `@engenty/decision-model`, `@engenty/search-index`, `@engenty/search-libsql`, `@engenty/goose`, `@engenty/vault`, `@engenty/plugins`, `@engenty/browser` and `@engenty/local-models` in `packages/` | MIT (the `LICENSE` in each folder) |
20
+ | The libraries | `@engenty/chatviews`, `@engenty/decision-model`, `@engenty/search-index`, `@engenty/search-libsql`, `@engenty/tool-harness`, `@engenty/goose`, `@engenty/vault`, `@engenty/plugins`, `@engenty/browser`, `@engenty/local-models` and `@engenty/model-setup` in `packages/` | MIT (the `LICENSE` in each folder) |
21
21
 
22
22
  ### The wizard format
23
23
 
24
- These eighteen files define a wizard, read it and pack it as a `.wizard` file:
24
+ These fifteen files define a wizard, read it and pack it as a `.wizard` file:
25
25
 
26
- - `definition.ts`, `fit.ts`, `numbers.ts`, `run.ts`, `runner-texts.ts`, `shape.ts`
26
+ - `definition.ts`, `fit.ts`, `run.ts`, `runner-texts.ts`
27
27
  - `run-schema.ts`: what a wizard takes and gives, as JSON Schema
28
- - `sharing.ts`, `store.ts`, `surface.ts`, `texts.ts`, `translation.ts`
28
+ - `sharing.ts`, `store.ts`, `texts.ts`, `translation.ts`
29
29
  - `theme.ts`: a theme’s values, which a `.wizard` file carries
30
30
  - `wizard-data.ts`: the SQL of a wizard’s own data, read and checked
31
31
  - `wizard-package.ts`: the `.wizard` file and its `wizard.json`
@@ -33,8 +33,8 @@ These eighteen files define a wizard, read it and pack it as a `.wizard` file:
33
33
 
34
34
  Each says `SPDX-License-Identifier: FSL-1.1-MIT OR MIT` in its first line, and you choose which
35
35
  of the two licences you take them under. Take MIT, and you can use the format in any tool: an
36
- editor, a converter, your own runtime. The files import only each other and zod, so they work
37
- without the rest of engenty wizards.
36
+ editor, a converter, your own runtime. The files import only each other, zod and `@engenty/chatviews` (MIT: the views, the calc
37
+ language and the shapes of data), so they work without the rest of engenty wizards.
38
38
 
39
39
  ### The runner
40
40
 
@@ -44,12 +44,15 @@ MIT, the format files it bundles included. Your own app can draw runs with it
44
44
 
45
45
  ### The libraries
46
46
 
47
- Eight libraries go to npm with each release, at its version:
47
+ Eleven libraries go to npm with each release, at its version:
48
48
 
49
49
  - `@engenty/decision-model`: one request to a decision model, by whichever way is set up (the
50
50
  Vercel AI Gateway, TypeSafe’s API or Ollama)
51
- - `@engenty/search-index`: what every search index meets, chunks, scoring and embedders
51
+ - `@engenty/search-index`: what every search index meets, chunks, scoring, embedders and the ways
52
+ to one, and a search over a catalogue in memory by words and meaning
52
53
  - `@engenty/search-libsql`: a search index on libSQL, full text and vectors
54
+ - `@engenty/tool-harness`: one harness around an agent’s tools: the few it always has, a search
55
+ for the rest, one call that runs what was found, and what a model of which level may use
53
56
  - `@engenty/goose`: Goose, the copilot: a chat with tools and adapters for the Anthropic and
54
57
  OpenAI SDKs and the Vercel AI SDK
55
58
  - `@engenty/vault`: secrets sealed with AES-256-GCM and bound to where they belong, key rings
@@ -67,6 +70,9 @@ Eight libraries go to npm with each release, at its version:
67
70
  length set), the AI clients signed in on their subscription (Claude Code, Codex, Cursor
68
71
  Agent: found, signed in, run headless as a model or as a chat with one MCP server), and a
69
72
  short real call that says whether each answers
73
+ - `@engenty/model-setup`: the setup in which a person picks what an app thinks with, shared by
74
+ engenty wizards and wizards.bot: the AI clients it offers, how each is found, installed and
75
+ signed in through a terminal in the page, and the routes the page asks
70
76
 
71
77
  They depend only on each other and on packages under MIT or a licence as permissive.
72
78
 
@@ -77,6 +77,9 @@ the studio doesn’t: one `NAME=value` per line. Restart engenty wizards after a
77
77
  | `SANDBOX_DATA_URL` | The HTTPS address where the sandbox reaches engenty wizards for a wizard’s own database | `PUBLIC_URL` when it is HTTPS |
78
78
  | `SANDBOX_GUESTS` | The sandbox for runs by people without an account – a wizard’s link, WhatsApp, SMS: `off` or `agentos`, never Docker. With `off`, such a run works without code and says so in its log; with `agentos`, only when agentOS is installed. Your own runs keep the server’s sandbox | `off` |
79
79
  | `OLLAMA_URL` | Where Ollama answers | `http://127.0.0.1:11434/v1` |
80
+ | `LMSTUDIO_URL` | Where LM Studio answers | `http://127.0.0.1:1234/v1` |
81
+ | `LM_API_TOKEN` | LM Studio’s API token, where its server asks for one | none |
82
+ | `MLX_MODELS` | The folder of MLX’s models (Mac with Apple silicon) | `~/.engenty/models/mlx` |
80
83
  | `PLUGINS_DIR` | Folders with plugins, comma-separated. If you set it, it replaces the default | `~/.engenty/wizards/plugins` |
81
84
  | `PLUGINS_WATCH` | With `0`, plugins no longer load again when their files change | `1` |
82
85
  | `GEOCODER_URL` | Finds the place of a location (street, town). If it is not set, a location is only coordinates, and no position leaves your computer | not set |
@@ -91,7 +91,8 @@ export async function callOutside(who, spaceId, name, input, signal) {
91
91
  }
92
92
  try {
93
93
  const result = await tool.execute(data);
94
- if (result && typeof result === "object" && "error" in result) {
94
+ // A run's report carries `error: null` while nothing failed.
95
+ if (result && typeof result === "object" && "error" in result && result.error != null) {
95
96
  const { error, ...data } = result;
96
97
  return { ok: false, error, data };
97
98
  }
@@ -1,6 +1,6 @@
1
+ import { fitData, recordsOf, shapeZod, } from "@engenty/chatviews/shape";
1
2
  import { dataRef, stepShape } from "@engenty/wizards-shared/definition";
2
3
  import { note } from "@engenty/wizards-shared/run";
3
- import { fitData, recordsOf, shapeZod, } from "@engenty/wizards-shared/shape";
4
4
  import { snapshotFile } from "../services/files.js";
5
5
  import { runStepData } from "./data-step.js";
6
6
  import { moduleBody, quickJs, WIZARD_CODE_MEMORY_MB } from "./quickjs.js";
@@ -74,8 +74,8 @@ export async function decide(input) {
74
74
  if (!Object.keys(open).length) {
75
75
  return { answers, source: "systemone" };
76
76
  }
77
- if (signal?.aborted) {
78
- throw new DecisionError("No answer in time.");
77
+ if (signal?.aborted || input.modelOnly) {
78
+ throw new DecisionError(signal?.aborted ? "No answer in time." : "The decision model left it open.");
79
79
  }
80
80
  const filled = await askLanguageModel(input, open, signal);
81
81
  return {