@engenty/wizards-runtime 0.20.5 → 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.
- package/README.md +3 -3
- package/apps/runtime/dist/agents/studio-assistant.js +7 -3
- package/apps/runtime/dist/agents/subscription.js +20 -25
- package/apps/runtime/dist/app.js +4 -1
- package/apps/runtime/dist/cli/clients.js +6 -24
- package/apps/runtime/dist/cli/connect.js +2 -1
- package/apps/runtime/dist/cli/environment.js +3 -0
- package/apps/runtime/dist/cli/machine.js +1 -70
- package/apps/runtime/dist/cli/main.js +2 -1
- package/apps/runtime/dist/cli/ollama.js +7 -254
- package/apps/runtime/dist/cli/setup.js +12 -9
- package/apps/runtime/dist/decision-model.js +1 -4
- package/apps/runtime/dist/docs/dev/licensing.md +20 -9
- package/apps/runtime/dist/docs/user-guide/command-line.md +5 -2
- package/apps/runtime/dist/elements/outside.js +2 -1
- package/apps/runtime/dist/engine/code-step.js +1 -1
- package/apps/runtime/dist/engine/decide.js +2 -2
- package/apps/runtime/dist/engine/device.js +3 -2
- package/apps/runtime/dist/engine/input.js +1 -1
- package/apps/runtime/dist/engine/runner.js +1 -1
- package/apps/runtime/dist/engine/steps.js +27 -8
- package/apps/runtime/dist/engine/surface.js +1 -1
- package/apps/runtime/dist/engine/template.js +1 -1
- package/apps/runtime/dist/env.js +1 -0
- package/apps/runtime/dist/harness/apple.js +4 -3
- package/apps/runtime/dist/harness/clients.js +117 -0
- package/apps/runtime/dist/harness/index.js +32 -87
- package/apps/runtime/dist/harness/model.js +32 -270
- package/apps/runtime/dist/harness/prompt.js +6 -120
- package/apps/runtime/dist/harness/types.js +5 -3
- package/apps/runtime/dist/local-call.js +6 -0
- package/apps/runtime/dist/local-models.js +53 -177
- package/apps/runtime/dist/mcp/bridge.js +12 -55
- package/apps/runtime/dist/mcp/elements.js +39 -4
- package/apps/runtime/dist/mcp/handler.js +12 -0
- package/apps/runtime/dist/mcp/run-pages.js +238 -0
- package/apps/runtime/dist/mcp/run-tasks.js +157 -0
- package/apps/runtime/dist/mcp/runs.js +129 -0
- package/apps/runtime/dist/mcp/tools.js +4 -95
- package/apps/runtime/dist/models.js +82 -32
- package/apps/runtime/dist/motion-graphics/step.js +2 -2
- package/apps/runtime/dist/prompts/mcp.md +4 -1
- package/apps/runtime/dist/render/downloads.js +1 -1
- package/apps/runtime/dist/render/shaped.js +1 -1
- package/apps/runtime/dist/routes/model-setup.js +77 -0
- package/apps/runtime/dist/routes/studio.js +8 -251
- package/apps/runtime/dist/services/space-categories.js +1 -1
- package/apps/runtime/dist/services/work-ai.js +11 -5
- package/apps/runtime/dist/texts.js +4 -6
- package/apps/runtime/dist/tools/connections.js +3 -0
- package/apps/runtime/dist/tools/harness.js +124 -0
- package/apps/web/dist/assets/AboutDialog-BSdAA4Wi.js +1 -0
- package/apps/web/dist/assets/{BlockEditor-CgjXTWly.js → BlockEditor-0noqMcAl.js} +1 -1
- package/apps/web/dist/assets/Bundle-Ctrq7lHH.js +1 -0
- package/apps/web/dist/assets/CapabilitiesPage-CZlVhBmU.js +2 -0
- package/apps/web/dist/assets/ChangelogDialog-BLCYV4jT.js +1 -0
- package/apps/web/dist/assets/{CodeEditor-2LyHbSre.js → CodeEditor-CpRn9BZq.js} +1 -1
- package/apps/web/dist/assets/ConnectorsSection-B4rRDlFo.js +1 -0
- package/apps/web/dist/assets/EditorPage-CXN-_zzG.js +3 -0
- package/apps/web/dist/assets/FlowPreview-DjQvcWxs.js +1 -0
- package/apps/web/dist/assets/LangSwitch-BuzsLp16.js +1 -0
- package/apps/web/dist/assets/LocalModels-BDfP2v5-.js +1 -0
- package/apps/web/dist/assets/Marketplace-4baBNzEc.js +2 -0
- package/apps/web/dist/assets/NewWizardChannels-B_xHm-bI.js +1 -0
- package/apps/web/dist/assets/NewWizardPage-BmZAY4zi.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-fZq3WiTk.js +1 -0
- package/apps/web/dist/assets/ProtocolSection-v9wIxisg.js +1 -0
- package/apps/web/dist/assets/PublicRunner-BCh0VzAT.js +1 -0
- package/apps/web/dist/assets/{ReadOnly-CbvEK0rz.js → ReadOnly-13stkvNz.js} +1 -1
- package/apps/web/dist/assets/Results-4gmguYzH.js +1 -0
- package/apps/web/dist/assets/RunDrawer-CeEldWRn.js +1 -0
- package/apps/web/dist/assets/SettingsPage-BsKRRlfP.js +2 -0
- package/apps/web/dist/assets/SetupPage-FgA5Kl8z.js +1 -0
- package/apps/web/dist/assets/SharePage-BlBW4oxl.js +1 -0
- package/apps/web/dist/assets/SkillEditor-9QSskfmY.js +1 -0
- package/apps/web/dist/assets/Skills-DdUAyNhR.js +9 -0
- package/apps/web/dist/assets/SpacePage-CHkNPuqt.js +2 -0
- package/apps/web/dist/assets/StudioHome-BwPD-inc.js +1 -0
- package/apps/web/dist/assets/TableEditor-Du1DhbEC.js +7 -0
- package/apps/web/dist/assets/UpdateCheck-DPr9NXq_.js +2 -0
- package/apps/web/dist/assets/brand-DY3lzrOd.js +2 -0
- package/apps/web/dist/assets/changelog-BSdb22c3.js +1 -0
- package/apps/web/dist/assets/code-editor-Bep_LzQ5.js +2 -0
- package/apps/web/dist/assets/host-DiZQ_uws.js +1 -0
- package/apps/web/dist/assets/host-Dw-sMUSd.js +54 -0
- package/apps/web/dist/assets/i18n-DVrYWJaj.js +55 -0
- package/apps/web/dist/assets/index-C2gxK14s.css +1 -0
- package/apps/web/dist/assets/index-lQ4JYHYQ.js +102 -0
- package/apps/web/dist/assets/oss-credits-BHy69wkx.js +1 -0
- package/apps/web/dist/assets/{read-aloud-CRFt5q6k.js → read-aloud-CBycd8TA.js} +1 -1
- package/apps/web/dist/assets/{session-RDdtfee2.js → session-BYLtgklo.js} +1 -1
- package/apps/web/dist/assets/terminal-DmGdMags.js +16 -0
- package/apps/web/dist/assets/texts-ClKS2xhh.js +1 -0
- package/apps/web/dist/assets/theme-DFDOMsVo.js +14 -0
- package/apps/web/dist/assets/ui-CW2I3ecu.js +1 -0
- package/apps/web/dist/assets/ui-DfVpZYIW.js +16 -0
- package/apps/web/dist/assets/{useMutation-BSffqL6W.js → useMutation-BnkuLlQC.js} +1 -1
- package/apps/web/dist/assets/viewers-C6FfRwG1.js +2 -0
- package/apps/web/dist/index.html +18 -16
- package/apps/web/dist/mcp/flow.html +129 -129
- package/bin/bot-tunnel.mjs +375 -0
- package/bin/bot.mjs +494 -69
- package/node_modules/@engenty/{wizards-shared → chatviews}/dist/calc.js +1 -1
- package/node_modules/@engenty/chatviews/dist/chat/a2ui.d.ts +48 -0
- package/node_modules/@engenty/chatviews/dist/chat/a2ui.js +514 -0
- package/node_modules/@engenty/chatviews/dist/chat/check.d.ts +18 -0
- package/node_modules/@engenty/chatviews/dist/chat/check.js +97 -0
- package/node_modules/@engenty/chatviews/dist/chat/index.d.ts +3 -0
- package/node_modules/@engenty/chatviews/dist/chat/index.js +4 -0
- package/node_modules/@engenty/chatviews/dist/chat/library.d.ts +39 -0
- package/node_modules/@engenty/chatviews/dist/chat/library.js +314 -0
- package/node_modules/@engenty/{wizards-shared → chatviews}/dist/numbers.js +1 -1
- package/node_modules/@engenty/chatviews/dist/react/chat.d.ts +33 -0
- package/node_modules/@engenty/chatviews/dist/react/chat.js +150 -0
- package/node_modules/@engenty/chatviews/dist/react/field-looks.d.ts +39 -0
- package/node_modules/@engenty/chatviews/dist/react/field-looks.js +47 -0
- package/node_modules/@engenty/chatviews/dist/react/markdown.d.ts +5 -0
- package/node_modules/@engenty/chatviews/dist/react/markdown.js +11 -0
- package/node_modules/@engenty/chatviews/dist/react/no-devtools.d.ts +0 -0
- package/node_modules/@engenty/chatviews/dist/react/no-devtools.js +8 -0
- package/node_modules/@engenty/chatviews/dist/react/surface.d.ts +39 -0
- package/node_modules/@engenty/chatviews/dist/react/surface.js +552 -0
- package/node_modules/@engenty/chatviews/dist/react/texts.d.ts +39 -0
- package/node_modules/@engenty/chatviews/dist/react/texts.js +42 -0
- package/node_modules/@engenty/chatviews/dist/react/ui.d.ts +112 -0
- package/node_modules/@engenty/chatviews/dist/react/ui.js +212 -0
- package/node_modules/@engenty/{wizards-shared → chatviews}/dist/shape.js +1 -1
- package/node_modules/@engenty/{wizards-shared → chatviews}/dist/surface.js +1 -1
- package/node_modules/@engenty/chatviews/package.json +19 -0
- package/node_modules/@engenty/decision-model/dist/client.d.ts +76 -0
- package/node_modules/@engenty/decision-model/dist/client.js +188 -0
- package/node_modules/@engenty/decision-model/dist/index.d.ts +6 -0
- package/node_modules/@engenty/decision-model/dist/index.js +5 -0
- package/node_modules/@engenty/decision-model/dist/local.d.ts +11 -0
- package/node_modules/@engenty/decision-model/dist/local.js +116 -0
- package/node_modules/@engenty/decision-model/dist/resolve.d.ts +26 -0
- package/node_modules/@engenty/decision-model/dist/resolve.js +53 -0
- package/node_modules/@engenty/decision-model/dist/types.d.ts +80 -0
- package/node_modules/@engenty/decision-model/dist/types.js +6 -0
- package/node_modules/@engenty/decision-model/dist/validate.d.ts +9 -0
- package/node_modules/@engenty/decision-model/dist/validate.js +50 -0
- package/node_modules/@engenty/decision-model/dist/ways.d.ts +42 -0
- package/node_modules/@engenty/decision-model/dist/ways.js +72 -0
- package/node_modules/@engenty/decision-model/package.json +9 -0
- package/node_modules/@engenty/local-models/dist/bridge/index.d.ts +54 -0
- package/node_modules/@engenty/local-models/dist/bridge/index.js +117 -0
- package/node_modules/@engenty/local-models/dist/clients/antigravity.d.ts +37 -0
- package/{apps/runtime/dist/harness → node_modules/@engenty/local-models/dist/clients}/antigravity.js +72 -17
- package/node_modules/@engenty/local-models/dist/clients/chat.d.ts +89 -0
- package/node_modules/@engenty/local-models/dist/clients/chat.js +22 -0
- package/node_modules/@engenty/local-models/dist/clients/claude.d.ts +32 -0
- package/node_modules/@engenty/local-models/dist/clients/claude.js +239 -0
- package/node_modules/@engenty/local-models/dist/clients/client.d.ts +31 -0
- package/node_modules/@engenty/local-models/dist/clients/client.js +2 -0
- package/node_modules/@engenty/local-models/dist/clients/codex.d.ts +35 -0
- package/node_modules/@engenty/local-models/dist/clients/codex.js +254 -0
- package/node_modules/@engenty/local-models/dist/clients/cursor.d.ts +35 -0
- package/node_modules/@engenty/local-models/dist/clients/cursor.js +192 -0
- package/node_modules/@engenty/local-models/dist/clients/detect.d.ts +18 -0
- package/node_modules/@engenty/local-models/dist/clients/detect.js +34 -0
- package/node_modules/@engenty/local-models/dist/clients/env.d.ts +66 -0
- package/{apps/runtime/dist/harness → node_modules/@engenty/local-models/dist/clients}/env.js +62 -31
- package/node_modules/@engenty/local-models/dist/clients/failure.d.ts +26 -0
- package/node_modules/@engenty/local-models/dist/clients/failure.js +35 -0
- package/node_modules/@engenty/local-models/dist/clients/index.d.ts +15 -0
- package/node_modules/@engenty/local-models/dist/clients/index.js +18 -0
- package/node_modules/@engenty/local-models/dist/clients/model.d.ts +129 -0
- package/node_modules/@engenty/local-models/dist/clients/model.js +225 -0
- package/node_modules/@engenty/local-models/dist/clients/prompt.d.ts +36 -0
- package/node_modules/@engenty/local-models/dist/clients/prompt.js +123 -0
- package/node_modules/@engenty/local-models/dist/clients/run.d.ts +15 -0
- package/node_modules/@engenty/local-models/dist/clients/run.js +41 -0
- package/node_modules/@engenty/local-models/dist/index.d.ts +4 -0
- package/node_modules/@engenty/local-models/dist/index.js +4 -0
- package/node_modules/@engenty/local-models/dist/lmstudio/api.d.ts +49 -0
- package/node_modules/@engenty/local-models/dist/lmstudio/api.js +101 -0
- package/node_modules/@engenty/local-models/dist/lmstudio/index.d.ts +3 -0
- package/node_modules/@engenty/local-models/dist/lmstudio/index.js +3 -0
- package/node_modules/@engenty/local-models/dist/lmstudio/load.d.ts +12 -0
- package/node_modules/@engenty/local-models/dist/lmstudio/load.js +100 -0
- package/node_modules/@engenty/local-models/dist/lmstudio/server.d.ts +3 -0
- package/node_modules/@engenty/local-models/dist/lmstudio/server.js +29 -0
- package/node_modules/@engenty/local-models/dist/mlx/helper.d.ts +54 -0
- package/node_modules/@engenty/local-models/dist/mlx/helper.js +149 -0
- package/node_modules/@engenty/local-models/dist/mlx/index.d.ts +3 -0
- package/node_modules/@engenty/local-models/dist/mlx/index.js +3 -0
- package/node_modules/@engenty/local-models/dist/mlx/server.d.ts +19 -0
- package/node_modules/@engenty/local-models/dist/mlx/server.js +82 -0
- package/node_modules/@engenty/local-models/dist/mlx/store.d.ts +16 -0
- package/node_modules/@engenty/local-models/dist/mlx/store.js +153 -0
- package/node_modules/@engenty/local-models/dist/ollama/api.d.ts +37 -0
- package/node_modules/@engenty/local-models/dist/ollama/api.js +147 -0
- package/node_modules/@engenty/local-models/dist/ollama/index.d.ts +3 -0
- package/node_modules/@engenty/local-models/dist/ollama/index.js +3 -0
- package/node_modules/@engenty/local-models/dist/ollama/model.d.ts +54 -0
- package/node_modules/@engenty/local-models/dist/ollama/model.js +302 -0
- package/node_modules/@engenty/local-models/dist/ollama/server.d.ts +3 -0
- package/node_modules/@engenty/local-models/dist/ollama/server.js +45 -0
- package/node_modules/@engenty/local-models/dist/probe.d.ts +57 -0
- package/node_modules/@engenty/local-models/dist/probe.js +174 -0
- package/node_modules/@engenty/local-models/dist/servers/index.d.ts +6 -0
- package/node_modules/@engenty/local-models/dist/servers/index.js +12 -0
- package/node_modules/@engenty/local-models/dist/servers/server.d.ts +84 -0
- package/node_modules/@engenty/local-models/dist/servers/server.js +38 -0
- package/node_modules/@engenty/local-models/package.json +16 -0
- package/node_modules/@engenty/model-setup/dist/catalog.d.ts +36 -0
- package/node_modules/@engenty/model-setup/dist/catalog.js +81 -0
- package/node_modules/@engenty/model-setup/dist/index.d.ts +3 -0
- package/node_modules/@engenty/model-setup/dist/index.js +3 -0
- package/node_modules/@engenty/model-setup/dist/offered.d.ts +7 -0
- package/node_modules/@engenty/model-setup/dist/offered.js +64 -0
- package/node_modules/@engenty/model-setup/dist/react/client.d.ts +46 -0
- package/node_modules/@engenty/model-setup/dist/react/client.js +147 -0
- package/node_modules/@engenty/model-setup/dist/react/columns.d.ts +78 -0
- package/node_modules/@engenty/model-setup/dist/react/columns.js +99 -0
- package/node_modules/@engenty/model-setup/dist/react/host.d.ts +31 -0
- package/node_modules/@engenty/model-setup/dist/react/host.js +48 -0
- package/node_modules/@engenty/model-setup/dist/react/index.d.ts +7 -0
- package/node_modules/@engenty/model-setup/dist/react/index.js +7 -0
- package/node_modules/@engenty/model-setup/dist/react/keys.d.ts +48 -0
- package/node_modules/@engenty/model-setup/dist/react/keys.js +74 -0
- package/node_modules/@engenty/model-setup/dist/react/local-models.d.ts +23 -0
- package/node_modules/@engenty/model-setup/dist/react/local-models.js +134 -0
- package/node_modules/@engenty/model-setup/dist/react/servers.d.ts +4 -0
- package/node_modules/@engenty/model-setup/dist/react/servers.js +13 -0
- package/node_modules/@engenty/model-setup/dist/react/terminal.d.ts +13 -0
- package/node_modules/@engenty/model-setup/dist/react/terminal.js +79 -0
- package/node_modules/@engenty/model-setup/dist/react/tone.d.ts +13 -0
- package/node_modules/@engenty/model-setup/dist/react/tone.js +66 -0
- package/node_modules/@engenty/model-setup/dist/server/apps.d.ts +12 -0
- package/node_modules/@engenty/model-setup/dist/server/apps.js +22 -0
- package/node_modules/@engenty/model-setup/dist/server/clients.d.ts +55 -0
- package/node_modules/@engenty/model-setup/dist/server/clients.js +96 -0
- package/node_modules/@engenty/model-setup/dist/server/index.d.ts +8 -0
- package/node_modules/@engenty/model-setup/dist/server/index.js +8 -0
- package/node_modules/@engenty/model-setup/dist/server/install.d.ts +24 -0
- package/node_modules/@engenty/model-setup/dist/server/install.js +68 -0
- package/node_modules/@engenty/model-setup/dist/server/lmstudio.d.ts +9 -0
- package/node_modules/@engenty/model-setup/dist/server/lmstudio.js +52 -0
- package/node_modules/@engenty/model-setup/dist/server/local-models.d.ts +47 -0
- package/node_modules/@engenty/model-setup/dist/server/local-models.js +164 -0
- package/node_modules/@engenty/model-setup/dist/server/models.d.ts +12 -0
- package/node_modules/@engenty/model-setup/dist/server/models.js +16 -0
- package/node_modules/@engenty/model-setup/dist/server/ollama.d.ts +22 -0
- package/node_modules/@engenty/model-setup/dist/server/ollama.js +146 -0
- package/node_modules/@engenty/model-setup/dist/server/routes.d.ts +51 -0
- package/node_modules/@engenty/model-setup/dist/server/routes.js +211 -0
- package/node_modules/@engenty/model-setup/dist/server/server-apps.d.ts +14 -0
- package/node_modules/@engenty/model-setup/dist/server/server-apps.js +24 -0
- package/node_modules/@engenty/model-setup/dist/server/terminal.d.ts +43 -0
- package/node_modules/@engenty/model-setup/dist/server/terminal.js +222 -0
- package/node_modules/@engenty/model-setup/dist/texts.d.ts +222 -0
- package/node_modules/@engenty/model-setup/dist/texts.js +222 -0
- package/node_modules/@engenty/model-setup/dist/types.d.ts +111 -0
- package/node_modules/@engenty/model-setup/dist/types.js +2 -0
- package/node_modules/@engenty/model-setup/package.json +12 -0
- package/node_modules/@engenty/search-index/dist/catalog-lexical.d.ts +14 -0
- package/node_modules/@engenty/search-index/dist/catalog-lexical.js +165 -0
- package/node_modules/@engenty/search-index/dist/catalog-rank.d.ts +33 -0
- package/node_modules/@engenty/search-index/dist/catalog-rank.js +99 -0
- package/node_modules/@engenty/search-index/dist/catalog-search.d.ts +40 -0
- package/node_modules/@engenty/search-index/dist/catalog-search.js +161 -0
- package/node_modules/@engenty/search-index/dist/chunks.d.ts +17 -0
- package/node_modules/@engenty/search-index/dist/chunks.js +164 -0
- package/node_modules/@engenty/search-index/dist/contracts.d.ts +135 -0
- package/node_modules/@engenty/search-index/dist/contracts.js +9 -0
- package/node_modules/@engenty/search-index/dist/embedder.d.ts +31 -0
- package/node_modules/@engenty/search-index/dist/embedder.js +82 -0
- package/node_modules/@engenty/search-index/dist/embedders/gemini.d.ts +11 -0
- package/node_modules/@engenty/search-index/dist/embedders/gemini.js +54 -0
- package/node_modules/@engenty/search-index/dist/embedders/index.d.ts +5 -0
- package/node_modules/@engenty/search-index/dist/embedders/index.js +5 -0
- package/node_modules/@engenty/search-index/dist/embedders/ollama.d.ts +12 -0
- package/node_modules/@engenty/search-index/dist/embedders/ollama.js +43 -0
- package/node_modules/@engenty/search-index/dist/embedders/openai.d.ts +11 -0
- package/node_modules/@engenty/search-index/dist/embedders/openai.js +36 -0
- package/node_modules/@engenty/search-index/dist/embedders/shared.d.ts +5 -0
- package/node_modules/@engenty/search-index/dist/embedders/shared.js +26 -0
- package/node_modules/@engenty/search-index/dist/embedders/ways.d.ts +16 -0
- package/node_modules/@engenty/search-index/dist/embedders/ways.js +90 -0
- package/node_modules/@engenty/search-index/dist/index.d.ts +10 -0
- package/node_modules/@engenty/search-index/dist/index.js +10 -0
- package/node_modules/@engenty/search-index/dist/payload.d.ts +13 -0
- package/node_modules/@engenty/search-index/dist/payload.js +51 -0
- package/node_modules/@engenty/search-index/dist/registry.d.ts +25 -0
- package/node_modules/@engenty/search-index/dist/registry.js +56 -0
- package/node_modules/@engenty/search-index/dist/scoring.d.ts +10 -0
- package/node_modules/@engenty/search-index/dist/scoring.js +45 -0
- package/node_modules/@engenty/search-index/dist/strategy.d.ts +6 -0
- package/node_modules/@engenty/search-index/dist/strategy.js +25 -0
- package/node_modules/@engenty/search-index/package.json +10 -0
- package/node_modules/@engenty/tool-harness/dist/harness.d.ts +70 -0
- package/node_modules/@engenty/tool-harness/dist/harness.js +170 -0
- package/node_modules/@engenty/tool-harness/dist/index.d.ts +5 -0
- package/node_modules/@engenty/tool-harness/dist/index.js +5 -0
- package/node_modules/@engenty/tool-harness/dist/judge.d.ts +8 -0
- package/node_modules/@engenty/tool-harness/dist/judge.js +39 -0
- package/node_modules/@engenty/tool-harness/dist/levels.d.ts +18 -0
- package/node_modules/@engenty/tool-harness/dist/levels.js +47 -0
- package/node_modules/@engenty/tool-harness/dist/model.d.ts +6 -0
- package/node_modules/@engenty/tool-harness/dist/model.js +60 -0
- package/node_modules/@engenty/tool-harness/dist/schema.d.ts +26 -0
- package/node_modules/@engenty/tool-harness/dist/schema.js +57 -0
- package/node_modules/@engenty/tool-harness/package.json +9 -0
- package/node_modules/@engenty/wizards-shared/dist/catalog-prompt.js +2 -1
- package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +10 -10
- package/node_modules/@engenty/wizards-shared/dist/definition.js +4 -4
- package/node_modules/@engenty/wizards-shared/dist/run-schema.js +1 -1
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +3 -1
- package/node_modules/@engenty/wizards-shared/dist/run.js +4 -0
- package/node_modules/@engenty/wizards-shared/dist/store.js +2 -1
- package/node_modules/@engenty/wizards-shared/dist/wizard-agents.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/wizard-agents.js +1 -1
- package/node_modules/@engenty/wizards-shared/dist/wizard-text.js +2 -2
- package/package.json +13 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/runtime/dist/agents/chat-clients.js +0 -344
- package/apps/runtime/dist/harness/claude.js +0 -141
- package/apps/runtime/dist/harness/codex.js +0 -222
- package/apps/runtime/dist/harness/cursor.js +0 -89
- package/apps/runtime/dist/harness/terminal.js +0 -201
- package/apps/web/dist/assets/AboutDialog-DM_2-iLP.js +0 -1
- package/apps/web/dist/assets/Bundle-C0u5HUZL.js +0 -1
- package/apps/web/dist/assets/CapabilitiesPage-DxRUERr-.js +0 -2
- package/apps/web/dist/assets/ChangelogDialog-Cyn3LAch.js +0 -1
- package/apps/web/dist/assets/ConnectorsSection-BYOrwccO.js +0 -1
- package/apps/web/dist/assets/EditorPage-BFUQzJpN.js +0 -3
- package/apps/web/dist/assets/FlowPreview-BXf4EKjU.js +0 -1
- package/apps/web/dist/assets/LangSwitch-BLB7dDce.js +0 -1
- package/apps/web/dist/assets/Marketplace-B3NoH5Va.js +0 -2
- package/apps/web/dist/assets/NewWizardChannels-DhmYe2C8.js +0 -1
- package/apps/web/dist/assets/NewWizardPage-MGKJVDp2.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-RawpCO9J.js +0 -1
- package/apps/web/dist/assets/ProtocolSection-B1MshkAx.js +0 -1
- package/apps/web/dist/assets/PublicRunner-COatyxMi.js +0 -1
- package/apps/web/dist/assets/Results-DI4EHtkh.js +0 -1
- package/apps/web/dist/assets/RunDrawer-xXcbQ9wP.js +0 -1
- package/apps/web/dist/assets/SettingsPage-BcqqYDqw.js +0 -2
- package/apps/web/dist/assets/SetupPage-DG3fJ6fk.js +0 -1
- package/apps/web/dist/assets/SharePage-Drntg_oj.js +0 -1
- package/apps/web/dist/assets/SkillEditor-Ca_bzmjD.js +0 -1
- package/apps/web/dist/assets/Skills-BcgxuD15.js +0 -9
- package/apps/web/dist/assets/SpacePage-CzQAEQj8.js +0 -2
- package/apps/web/dist/assets/StudioHome-DWTDTslp.js +0 -1
- package/apps/web/dist/assets/TableEditor-DirMDIGk.js +0 -7
- package/apps/web/dist/assets/UpdateCheck-C6GlE6Am.js +0 -2
- package/apps/web/dist/assets/brand-BIT7AumL.js +0 -2
- package/apps/web/dist/assets/changelog-CMovB3yB.js +0 -1
- package/apps/web/dist/assets/code-editor-CufyaUFC.js +0 -2
- package/apps/web/dist/assets/host-DNvnJXoi.js +0 -69
- package/apps/web/dist/assets/i18n-WXeVnv7i.js +0 -55
- package/apps/web/dist/assets/index-D1iL3986.css +0 -1
- package/apps/web/dist/assets/index-DOq0CvXM.js +0 -102
- package/apps/web/dist/assets/oss-credits-C4SGbRkz.js +0 -1
- package/apps/web/dist/assets/theme-23bNrOQh.js +0 -14
- package/apps/web/dist/assets/ui-DkEhb2Rt.js +0 -16
- package/apps/web/dist/assets/viewers-CmGDpBjn.js +0 -2
- /package/apps/web/dist/assets/{host-BrP-ENHg.css → terminal-BrP-ENHg.css} +0 -0
- /package/node_modules/@engenty/{wizards-shared → chatviews}/dist/calc.d.ts +0 -0
- /package/node_modules/@engenty/{wizards-shared → chatviews}/dist/numbers.d.ts +0 -0
- /package/node_modules/@engenty/{wizards-shared → chatviews}/dist/shape.d.ts +0 -0
- /package/node_modules/@engenty/{wizards-shared → chatviews}/dist/surface.d.ts +0 -0
|
@@ -2,16 +2,19 @@ import { appendFileSync, existsSync, readFileSync } from "node:fs";
|
|
|
2
2
|
import { homedir, totalmem } from "node:os";
|
|
3
3
|
import { delimiter, join } from "node:path";
|
|
4
4
|
import * as p from "@clack/prompts";
|
|
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";
|
|
5
8
|
import { LOCAL_DECISION_MODEL } from "../decision-model.js";
|
|
6
9
|
import { installAll, ON_DEMAND } from "../on-demand.js";
|
|
7
10
|
import { accountStep } from "./account.js";
|
|
8
11
|
import { autostartForStatus, setAutostart } from "./autostart.js";
|
|
9
|
-
import { installClient
|
|
12
|
+
import { installClient } from "./clients.js";
|
|
10
13
|
import { appStates, connectApps } from "./connect.js";
|
|
11
14
|
import { runLogged } from "./exec.js";
|
|
12
15
|
import { command, installedByScript, isCheckout, layout, packageVersion, readInstallNote, writeInstallNote, } from "./home.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
16
|
+
import { detectClients, findChrome, findFfmpeg, findOnPath } from "./machine.js";
|
|
17
|
+
import { DECISION_MODEL_GB, decisionModelProblem, localOllama, servesDecisions } from "./ollama.js";
|
|
15
18
|
import { runningRuntime, settings } from "./start.js";
|
|
16
19
|
import { badge, busy, cmd, cyan, dim, tilde } from "./ui.js";
|
|
17
20
|
/** The studio as an app of its own: Chrome (or Edge) installs it from the page. */
|
|
@@ -25,7 +28,7 @@ function cancelled(value) {
|
|
|
25
28
|
}
|
|
26
29
|
async function install(client, paths) {
|
|
27
30
|
const task = p.taskLog({ title: `Installing ${client.name}`, limit: 6 });
|
|
28
|
-
task.message(dim(installCommand(client, paths)));
|
|
31
|
+
task.message(dim(installCommand(client, paths.clients, process.platform)));
|
|
29
32
|
const { code, tail } = await installClient(client, paths, (line) => task.message(line));
|
|
30
33
|
const installed = (await detectClients(paths)).find((state) => state.client.id === client.id);
|
|
31
34
|
if (code === 0 && installed?.path) {
|
|
@@ -186,7 +189,7 @@ const gb = (bytes) => (bytes / 2 ** 30).toFixed(1);
|
|
|
186
189
|
* download of about 11 GB.
|
|
187
190
|
*/
|
|
188
191
|
async function decisionModelStep(paths, interactive) {
|
|
189
|
-
const state = await
|
|
192
|
+
const state = await localOllama();
|
|
190
193
|
if (state.version && !servesDecisions(state.version)) {
|
|
191
194
|
p.log.warn(`Ollama ${state.version} is too old for a decision model (it needs 0.35 or newer).\n${dim(`Update Ollama, then run ${cmd("setup")} again.`)}`);
|
|
192
195
|
return;
|
|
@@ -236,7 +239,7 @@ async function decisionModelStep(paths, interactive) {
|
|
|
236
239
|
if (!task) {
|
|
237
240
|
p.log.info("Ollama’s own installer runs now and asks for your password.");
|
|
238
241
|
}
|
|
239
|
-
const outcome = await installOllama(paths, (line) => task?.message(line));
|
|
242
|
+
const outcome = await installOllama(paths.logs, (line) => task?.message(line));
|
|
240
243
|
if (!outcome.ok) {
|
|
241
244
|
const text = `Ollama didn’t install. ${outcome.message}`;
|
|
242
245
|
task ? task.error(text) : p.log.error(text);
|
|
@@ -245,7 +248,7 @@ async function decisionModelStep(paths, interactive) {
|
|
|
245
248
|
const installed = `Ollama installed ${dim(tilde(outcome.message))}`;
|
|
246
249
|
task ? task.success(installed) : p.log.success(installed);
|
|
247
250
|
// Linux's installer starts it as a service already.
|
|
248
|
-
({ path: ollama, version } = await
|
|
251
|
+
({ path: ollama, version } = await localOllama());
|
|
249
252
|
}
|
|
250
253
|
if (!version) {
|
|
251
254
|
if (appAsksForPassword(ollama)) {
|
|
@@ -253,7 +256,7 @@ async function decisionModelStep(paths, interactive) {
|
|
|
253
256
|
}
|
|
254
257
|
const spinner = p.spinner();
|
|
255
258
|
spinner.start("Waiting for Ollama");
|
|
256
|
-
version = await startOllama(ollama, paths);
|
|
259
|
+
version = await startOllama(ollama, paths.logs);
|
|
257
260
|
if (!version) {
|
|
258
261
|
spinner.error(`Ollama isn’t answering. Start it, then run ${cmd("setup")} again.`);
|
|
259
262
|
return;
|
|
@@ -267,7 +270,7 @@ async function decisionModelStep(paths, interactive) {
|
|
|
267
270
|
const spinner = p.spinner();
|
|
268
271
|
spinner.start(`Downloading ${model}`);
|
|
269
272
|
try {
|
|
270
|
-
await pullModel(model, (done, total) => spinner.message(`Downloading ${model} ${gb(done)} of ${gb(total)} GB`));
|
|
273
|
+
await pullModel(ollamaAddress(), model, (done, total) => spinner.message(`Downloading ${model} ${gb(done)} of ${gb(total)} GB`));
|
|
271
274
|
spinner.stop(`Decision model: ${model} ${dim(`in Ollama ${version}`)}`);
|
|
272
275
|
}
|
|
273
276
|
catch (error) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ollamaRoot } from "@engenty/local-models/ollama";
|
|
1
2
|
/**
|
|
2
3
|
* A decision model on the person's own machine: Cloudflare's Clef-flash (open weights, Apache
|
|
3
4
|
* 2.0), which Ollama 0.35 and newer serves at /v1/systemone with the same questions and answers
|
|
@@ -6,10 +7,6 @@
|
|
|
6
7
|
*/
|
|
7
8
|
/** The model the setup pulls. Clef, its larger sibling, is taken as well where it is there. */
|
|
8
9
|
export const LOCAL_DECISION_MODEL = "clef-flash";
|
|
9
|
-
/** Ollama's own address from the one the runtime uses for its OpenAI-style API (…/v1). */
|
|
10
|
-
export function ollamaRoot(url) {
|
|
11
|
-
return url.trim().replace(/\/+$/, "").replace(/\/v1$/, "");
|
|
12
|
-
}
|
|
13
10
|
/** The decision model among the models Ollama lists: Clef-flash, else Clef. */
|
|
14
11
|
export function decisionModelIn(names) {
|
|
15
12
|
const named = (base) => names.find((n) => n === base || n.startsWith(`${base}:`));
|
|
@@ -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 |
|
|
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` and `@engenty/
|
|
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
|
|
24
|
+
These fifteen files define a wizard, read it and pack it as a `.wizard` file:
|
|
25
25
|
|
|
26
|
-
- `definition.ts`, `fit.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`, `
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
@@ -62,6 +65,14 @@ Seven libraries go to npm with each release, at its version:
|
|
|
62
65
|
- `@engenty/browser`: a browser for agents on Mastra’s agent-browser provider: its tools for any
|
|
63
66
|
tool system, none that runs the model’s JavaScript, and a private fill that types a password
|
|
64
67
|
or a code only into a field on the expected website
|
|
68
|
+
- `@engenty/local-models`: the models on a person’s own computer: Ollama (its models, what each
|
|
69
|
+
can do, which fits the memory, downloads, and a model on its own chat API with the context
|
|
70
|
+
length set), the AI clients signed in on their subscription (Claude Code, Codex, Cursor
|
|
71
|
+
Agent: found, signed in, run headless as a model or as a chat with one MCP server), and a
|
|
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
|
|
65
76
|
|
|
66
77
|
They depend only on each other and on packages under MIT or a licence as permissive.
|
|
67
78
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Command line
|
|
3
3
|
description: The wizards command – start, setup, status, update – and the settings file on your computer.
|
|
4
|
-
version: 0.20.
|
|
4
|
+
version: 0.20.5
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## Commands
|
|
@@ -28,7 +28,7 @@ version: 0.20.4
|
|
|
28
28
|
| `wizards disconnect [app …]` | Takes them out again |
|
|
29
29
|
| `wizards mcp` | Runs the MCP server over stdio. AI apps start it; you don’t |
|
|
30
30
|
| `wizards uninstall` | Takes engenty wizards off this computer. It shows what it will remove first and asks about your data on its own; your data is kept unless you choose to delete it. `--dry-run` only shows the plan, `--yes` asks nothing and keeps your data, `--yes --delete-data` deletes it too. See [Remove](./install.md#remove) |
|
|
31
|
-
| `wizards bot` | Installs [wizards.bot](https://github.com/engenty/wizards-bot), your own agent in a home of your own, on this computer. It doesn’t need engenty wizards: `npx wizards bot install` works on its own. `install` puts the home into `~/.engenty/wizards/bot`, starts it with your computer on port 4748 (or the next free one; 4747 stays free for the wizards.bot Mac app) and opens its setup. `install <folder>`, for example `install .` or `install ./test01`, puts a home of its own into that folder, beside the others: its program, its data, its port and its service. Every other command takes the folder after it too; without one, it means the home in `~/.engenty/wizards`. `setup` opens the setup again and shows a code for your phone. `setup --link <address> <code>` links this computer to your home on wizards.bot, so it uses this computer’s models while this computer is on. `status` shows the home and a line for each home in a folder. `stop` stops a home until you log in again or `start` it. `tunnel` puts a home on the internet with
|
|
31
|
+
| `wizards bot` | Installs [wizards.bot](https://github.com/engenty/wizards-bot), your own agent in a home of your own, on this computer. It doesn’t need engenty wizards: `npx wizards bot install` works on its own. `install` puts the home into `~/.engenty/wizards/bot`, starts it with your computer on port 4748 (or the next free one; 4747 stays free for the wizards.bot Mac app) and opens its setup. `install <folder>`, for example `install .` or `install ./test01`, puts a home of its own into that folder, beside the others: its program, its data, its port and its service. Every other command takes the folder after it too; without one, it means the home in `~/.engenty/wizards`. `setup` opens the setup again and shows a code for your phone. `setup --link <address> <code>` links this computer to your home on wizards.bot, so it uses this computer’s models while this computer is on. `status` shows the home and a line for each home in a folder. `stop` stops a home until you log in again or `start` it. `tunnel` puts a home on the internet at `https://<name>.wizards.host`, once a device is paired with it. It needs no account: the name, like `k7qf2mxd3a.wizards.host`, comes from a key the tunnel keeps in the home’s `tunnel/claim.pem`, and the same key gets the same name back after `tunnel --off`. `tunnel --account` gives the home your team’s address instead, after you sign in to your wizards account (`--name test01` with it gives a second home `test01.<team>.wizards.host`). The connection goes out from your computer through our relay, and its encryption ends on your computer, so the relay can’t read it. `tunnel --tailscale` uses Tailscale Funnel instead, and `tunnel --off` takes either off again. `update` and `uninstall` do what they say. Your home’s data stays unless you add `--purge`, which asks first. On Windows it isn’t available yet |
|
|
32
32
|
| `wizards move-files` | Once, after the update to 0.16: moves the files of your spaces (logos, assets, documents) to where they are kept now, by their content, so the same file is stored once. Until then they don’t open. Running it again moves only what is left |
|
|
33
33
|
| `wizards move-folder-sources` | Once, with Dateien and the new Wissen switched on: each folder the Sources plugin read into Wissen becomes a mounted folder in Dateien, and Wissen takes it from there. What you changed by hand stays yours. Running it again converts only what is left |
|
|
34
34
|
| `wizards validate <path …>` | Checks wizards without the studio: `.wizard` files, unpacked wizard files, or a wizard’s JSON. `--json` prints the problems as JSON |
|
|
@@ -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
|
-
|
|
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 {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { parseJsonAnswer, renderPrompt } from "@engenty/local-models/clients";
|
|
1
2
|
import { and, asc, eq, isNull } from "drizzle-orm";
|
|
2
3
|
import { nanoid } from "nanoid";
|
|
3
4
|
import { db, schema } from "../db/client.js";
|
|
4
|
-
import {
|
|
5
|
+
import { CLIENT_WORDS } from "../harness/prompt.js";
|
|
5
6
|
/** An offer not renewed for this long is forgotten: the person left the run. */
|
|
6
7
|
const OFFER_TTL_MS = 30 * 60_000;
|
|
7
8
|
/** How long the phone has to answer before the runtime thinks on its own. */
|
|
@@ -117,7 +118,7 @@ export class DeviceModel {
|
|
|
117
118
|
if (format !== "text" && format !== "json") {
|
|
118
119
|
return null;
|
|
119
120
|
}
|
|
120
|
-
const { system, prompt, warnings } = renderPrompt(options.prompt);
|
|
121
|
+
const { system, prompt, warnings } = renderPrompt(options.prompt, undefined, CLIENT_WORDS);
|
|
121
122
|
if (warnings.length || system.length + prompt.length > this.maxChars) {
|
|
122
123
|
return null;
|
|
123
124
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { readNumber } from "@engenty/chatviews/numbers";
|
|
1
2
|
import { isDecidedField, isLang, isLocationValue, MAX_FILES, offeredSlot, shownFields, } from "@engenty/wizards-shared/definition";
|
|
2
|
-
import { readNumber } from "@engenty/wizards-shared/numbers";
|
|
3
3
|
import { note, saidText } from "@engenty/wizards-shared/run";
|
|
4
4
|
/** The field errors in a language, for whoever reads them. */
|
|
5
5
|
export function fieldErrorsIn(errors, lang) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
+
import { fitData } from "@engenty/chatviews/shape";
|
|
3
4
|
import { marginOf, } from "@engenty/wizards-shared/decision";
|
|
4
5
|
import { allFields, branchValues, cardsFromData, conditionMatches, dataRef, followRules, formatsFor, formNeeds, isDataStep, isDecidedField, LIST_FORMATS, listRef, MAX_SHOWN_FIELDS, optionsFromData, outputOf, RUN_DONE_SIGNAL, sectionOf, sectionsOf, signalMissing, textLang, waitDurationMs, whenCalc, whenNames, whenValue, wizardLang, } from "@engenty/wizards-shared/definition";
|
|
5
6
|
import { agentsMismatch, requiresOf, withRequires } from "@engenty/wizards-shared/requires";
|
|
6
7
|
import { CAN_GO_BACK, isNoteTime, note, RUN_ENDED, saidText, } from "@engenty/wizards-shared/run";
|
|
7
8
|
import { CONVERSATION_RUNNERS, DEFAULT_RUNNER_SETTINGS } from "@engenty/wizards-shared/runners";
|
|
8
|
-
import { fitData } from "@engenty/wizards-shared/shape";
|
|
9
9
|
import { FlowRefused, transition, } from "@engenty/wizards-shared/transition";
|
|
10
10
|
import { machineTranslated, translateDefinition } from "@engenty/wizards-shared/translation";
|
|
11
11
|
import { wizardAgentsUsed } from "@engenty/wizards-shared/wizard-code";
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { fitData, labelOf, recordsOf, shapeJsonSchema, shapeLines, shapeZod, titleKey, } from "@engenty/chatviews/shape";
|
|
2
|
+
import { validateSurface } from "@engenty/chatviews/surface";
|
|
1
3
|
import { pOf } from "@engenty/wizards-shared/decision";
|
|
2
4
|
import { allFields, classIdOf, dataRef, decisionAsAgent, langNameEn, localeOf, stepShape, templateRefs, textClassOf, wizardLang, } from "@engenty/wizards-shared/definition";
|
|
3
5
|
import { note as runNote } from "@engenty/wizards-shared/run";
|
|
4
|
-
import { fitData, labelOf, recordsOf, shapeJsonSchema, shapeLines, shapeZod, titleKey, } from "@engenty/wizards-shared/shape";
|
|
5
6
|
import { mainLogo, ruleLines, runTheme } from "@engenty/wizards-shared/spaces";
|
|
6
|
-
import { validateSurface, } from "@engenty/wizards-shared/surface";
|
|
7
7
|
import { Agent } from "@mastra/core/agent";
|
|
8
8
|
import { generateText, jsonSchema, Output, parsePartialJson } from "ai";
|
|
9
9
|
import { subjectsOf } from "../broker/rwx.js";
|
|
10
10
|
import { extFor, loadAsset, loadAssetText } from "../files/storage.js";
|
|
11
11
|
import { snapshotHtmlImages } from "../files/web-images.js";
|
|
12
|
+
import { withLocalCall } from "../local-call.js";
|
|
12
13
|
import { generateImageMedia, generateSpeechMedia, generateVideoMedia, } from "../media/generate.js";
|
|
13
14
|
import { markMedia } from "../media/marking.js";
|
|
14
15
|
import { agentModel, attachTools, costOf, isHarnessVendor, keepsOwnLoop, takesTools, textModel, totalUsage, } from "../models.js";
|
|
@@ -222,6 +223,23 @@ function foundLines(step, ctx) {
|
|
|
222
223
|
},
|
|
223
224
|
};
|
|
224
225
|
}
|
|
226
|
+
/** From how many tokens on a run says that a local model reads them: below, it takes a moment. */
|
|
227
|
+
const LONG_READ = 1_500;
|
|
228
|
+
/** Says in the run's log once what a local model does before it answers: it can take a minute. */
|
|
229
|
+
function waitingLines(ctx) {
|
|
230
|
+
const told = new Set();
|
|
231
|
+
return (waiting) => {
|
|
232
|
+
const code = waiting?.state === "loading"
|
|
233
|
+
? "loadsModel"
|
|
234
|
+
: waiting?.state === "reading" && (waiting.total ?? 0) >= LONG_READ
|
|
235
|
+
? "modelReads"
|
|
236
|
+
: null;
|
|
237
|
+
if (code && !told.has(code)) {
|
|
238
|
+
told.add(code);
|
|
239
|
+
void ctx.emit("info", { code }).catch(() => undefined);
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
}
|
|
225
243
|
/** Runs a json step's agent as a stream, with `foundLines`. Returns what `generate` would: the text, the steps and the usage. */
|
|
226
244
|
async function streamWithProgress(agent, message, options, step, ctx) {
|
|
227
245
|
const found = foundLines(step, ctx);
|
|
@@ -631,8 +649,9 @@ export async function runAgentStep(step, ctx, decision = false, agentPart) {
|
|
|
631
649
|
]
|
|
632
650
|
: request;
|
|
633
651
|
let result;
|
|
652
|
+
const local = { onWaiting: waitingLines(ctx) };
|
|
634
653
|
if (turn) {
|
|
635
|
-
const end = await durableTurn(turn, ctx, {
|
|
654
|
+
const end = await withLocalCall(local, () => durableTurn(turn, ctx, {
|
|
636
655
|
instructions: system,
|
|
637
656
|
model: agentModel(resolved),
|
|
638
657
|
tools,
|
|
@@ -642,7 +661,7 @@ export async function runAgentStep(step, ctx, decision = false, agentPart) {
|
|
|
642
661
|
// Each model step is booked as it ends: a crash neither repeats nor loses the ones before it.
|
|
643
662
|
onStepUsage: (usage) => ctx.chargeUsd(costOf(resolved, usage)),
|
|
644
663
|
onText: step.output.format === "json" ? foundLines(step, ctx).text : undefined,
|
|
645
|
-
});
|
|
664
|
+
}));
|
|
646
665
|
assets.splice(0, assets.length, ...end.assets);
|
|
647
666
|
result = { text: end.text, steps: [{ text: end.closing }] };
|
|
648
667
|
}
|
|
@@ -655,10 +674,10 @@ export async function runAgentStep(step, ctx, decision = false, agentPart) {
|
|
|
655
674
|
tools,
|
|
656
675
|
});
|
|
657
676
|
// A json step streams, so the person sees its entries as they are written (`found`).
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
677
|
+
const options = { maxSteps, abortSignal: ctx.signal };
|
|
678
|
+
result = await withLocalCall(local, () => step.output.format === "json"
|
|
679
|
+
? streamWithProgress(agent, message, options, step, ctx)
|
|
680
|
+
: agent.generate(message, options));
|
|
662
681
|
await ctx.chargeUsd(costOf(resolved, await totalUsage(result)));
|
|
663
682
|
}
|
|
664
683
|
// `result.text` strings together what the model said between tool calls ("I open the page …").
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { validateSurface } from "@engenty/chatviews/surface";
|
|
1
2
|
import { assembleSurface, dataRef, listRef, } from "@engenty/wizards-shared/definition";
|
|
2
3
|
import { note } from "@engenty/wizards-shared/run";
|
|
3
|
-
import { validateSurface } from "@engenty/wizards-shared/surface";
|
|
4
4
|
import { decide } from "./decide.js";
|
|
5
5
|
import { answersAsText, resolveRef } from "./template.js";
|
|
6
6
|
import { StepError } from "./types.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { formatMoney } from "@engenty/chatviews/numbers";
|
|
1
2
|
import { allFields, isAudioValue, isLocationValue, itemsTotals, localeOf, locationText, wizardLang, } from "@engenty/wizards-shared/definition";
|
|
2
|
-
import { formatMoney } from "@engenty/wizards-shared/numbers";
|
|
3
3
|
import { fontLicenseWords, gradientCss, textStyleLine, } from "@engenty/wizards-shared/spaces";
|
|
4
4
|
import { listAsMarkdown } from "@engenty/wizards-shared/store";
|
|
5
5
|
import { prompt } from "../prompts.js";
|
package/apps/runtime/dist/env.js
CHANGED
|
@@ -216,6 +216,7 @@ export const env = {
|
|
|
216
216
|
*/
|
|
217
217
|
browserFastLoop: str("BROWSER_FAST_LOOP") !== "off",
|
|
218
218
|
ollamaUrl: str("OLLAMA_URL", "http://127.0.0.1:11434/v1"),
|
|
219
|
+
lmstudioUrl: str("LMSTUDIO_URL", "http://127.0.0.1:1234/v1"),
|
|
219
220
|
/** What each model class runs on when this runtime resolves classes itself (own keys, Ollama). */
|
|
220
221
|
models: {
|
|
221
222
|
classifier: str("MODEL_CLASSIFIER", "deepseek/deepseek-v4.1-flash"),
|
|
@@ -2,13 +2,14 @@ import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
|
2
2
|
import { release } from "node:os";
|
|
3
3
|
import { dirname, join, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { ClientModel, lastJson, runClient, } from "@engenty/local-models/clients";
|
|
5
6
|
import { langOf, SPEECH_LOCALES } from "@engenty/wizards-shared/definition";
|
|
6
7
|
import { nanoid } from "nanoid";
|
|
7
8
|
import { env } from "../env.js";
|
|
8
9
|
import { ffmpeg, hasFfmpeg } from "../media/ffmpeg.js";
|
|
9
10
|
import { ModelUnavailableError, NotedError } from "../model-errors.js";
|
|
10
11
|
import { prompt } from "../prompts.js";
|
|
11
|
-
import {
|
|
12
|
+
import { modelOptions } from "./model.js";
|
|
12
13
|
/**
|
|
13
14
|
* Apple Intelligence on this Mac as a model: the on-device foundation model of macOS 26, run
|
|
14
15
|
* through `wizards-apple` (apps/runtime/apple/main.swift) — one process per call, as every
|
|
@@ -130,7 +131,7 @@ export function appleFailure(error) {
|
|
|
130
131
|
function appleFailed(detail) {
|
|
131
132
|
return new NotedError({ code: "appleFailed", params: { detail: detail.slice(0, 480) } });
|
|
132
133
|
}
|
|
133
|
-
class AppleModel extends
|
|
134
|
+
class AppleModel extends ClientModel {
|
|
134
135
|
provider = "apple";
|
|
135
136
|
/** The model keeps to the schema itself (guided generation). */
|
|
136
137
|
nativeSchema = true;
|
|
@@ -163,7 +164,7 @@ class AppleModel extends HarnessModel {
|
|
|
163
164
|
}
|
|
164
165
|
/** `apple:default` or `apple:tagging` as a language model. */
|
|
165
166
|
export function appleModel(alias) {
|
|
166
|
-
return new AppleModel(APPLE, alias || "default");
|
|
167
|
+
return new AppleModel(APPLE, alias || "default", modelOptions(APPLE));
|
|
167
168
|
}
|
|
168
169
|
/** The Mac's own language: what a voice note is most likely in, unless the call names one. */
|
|
169
170
|
function systemLocale() {
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { existsSync, readdirSync, readFileSync, rmSync, statSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { CLIENTS, ClientImageModel, CODEX_BIN, clientFailure, codexAnswer, codexExecArgs, resolveEnv, runClient, } from "@engenty/local-models/clients";
|
|
5
|
+
import { note } from "@engenty/wizards-shared/run";
|
|
6
|
+
import { prompt } from "../prompts.js";
|
|
7
|
+
import { modelOptions } from "./model.js";
|
|
8
|
+
/**
|
|
9
|
+
* Claude Code, Codex, Antigravity and Cursor Agent as the runtime runs them: the clients of
|
|
10
|
+
* @engenty/local-models/clients with the model each text class runs on, what the person reads
|
|
11
|
+
* when the account cannot pay, and Codex's images.
|
|
12
|
+
*/
|
|
13
|
+
/** A client of the package as a harness of the runtime. */
|
|
14
|
+
function harnessOf(client, extra) {
|
|
15
|
+
const h = {
|
|
16
|
+
id: client.id,
|
|
17
|
+
name: client.name,
|
|
18
|
+
bin: client.bin,
|
|
19
|
+
passThrough: client.passThrough,
|
|
20
|
+
keyVars: client.keyVars,
|
|
21
|
+
auth: (env) => client.auth(env),
|
|
22
|
+
version: (env) => client.version(env),
|
|
23
|
+
login: client.login,
|
|
24
|
+
model: (alias, effort) => client.model(alias, { ...modelOptions(h), effort }),
|
|
25
|
+
...extra,
|
|
26
|
+
};
|
|
27
|
+
return h;
|
|
28
|
+
}
|
|
29
|
+
export const claude = harnessOf(CLIENTS.claude, {
|
|
30
|
+
classes: { classifier: "haiku", low: "sonnet", standard: "opus", high: "opus" },
|
|
31
|
+
exhausted: note("anthropicAccountClaudeCode"),
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Models a ChatGPT sign-in runs (checked 2026-10-04): Luna for small calls, Sol as the
|
|
35
|
+
* workhorse, Astra for the hardest work. A binding `codex/<model>` names another;
|
|
36
|
+
* `codex/default` = the model the client picks itself.
|
|
37
|
+
*/
|
|
38
|
+
const CODEX_CLASSES = {
|
|
39
|
+
classifier: "gpt-6-luna",
|
|
40
|
+
low: "gpt-6.1-sol",
|
|
41
|
+
standard: "gpt-6.1-sol",
|
|
42
|
+
high: "gpt-6-astra",
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Images: `codex exec` with the built-in image tool, the reference photos attached with `-i`.
|
|
46
|
+
* Codex keeps what it made under CODEX_HOME/generated_images/<thread>; the file is read from
|
|
47
|
+
* there and that folder removed. `codex/image` runs the tool on the low class's model.
|
|
48
|
+
*/
|
|
49
|
+
class CodexImageModel extends ClientImageModel {
|
|
50
|
+
provider = "codex";
|
|
51
|
+
async invoke(call) {
|
|
52
|
+
const request = [
|
|
53
|
+
call.prompt,
|
|
54
|
+
call.files.length ? prompt("services", "harness.codex_image.edit") : "",
|
|
55
|
+
call.aspectRatio ? `Aspect ratio: ${call.aspectRatio}.` : "",
|
|
56
|
+
prompt("services", "harness.codex_image.once"),
|
|
57
|
+
]
|
|
58
|
+
.filter(Boolean)
|
|
59
|
+
.join("\n\n");
|
|
60
|
+
const args = [
|
|
61
|
+
...codexExecArgs(call.dir, false),
|
|
62
|
+
"-m",
|
|
63
|
+
this.modelId === "image" ? CODEX_CLASSES.low : this.modelId,
|
|
64
|
+
];
|
|
65
|
+
for (const file of call.files) {
|
|
66
|
+
args.push("-i", file);
|
|
67
|
+
}
|
|
68
|
+
const { env } = await resolveEnv(CLIENTS.codex);
|
|
69
|
+
const { stdout, stderr, code } = await runClient(CODEX_BIN, args, {
|
|
70
|
+
cwd: call.dir,
|
|
71
|
+
env,
|
|
72
|
+
signal: call.signal,
|
|
73
|
+
stdin: request,
|
|
74
|
+
});
|
|
75
|
+
const { answer, failure } = codexAnswer(stdout);
|
|
76
|
+
if (failure || !answer?.sessionId) {
|
|
77
|
+
throw clientFailure(this.client, failure ?? stderr.trim() ?? `exit ${code}`);
|
|
78
|
+
}
|
|
79
|
+
const folder = join(env.CODEX_HOME?.trim() || join(homedir(), ".codex"), "generated_images", answer.sessionId);
|
|
80
|
+
try {
|
|
81
|
+
const made = existsSync(folder)
|
|
82
|
+
? readdirSync(folder)
|
|
83
|
+
.filter((f) => /\.(png|jpe?g|webp)$/i.test(f))
|
|
84
|
+
.map((f) => join(folder, f))
|
|
85
|
+
.sort((a, b) => statSync(b).mtimeMs - statSync(a).mtimeMs)
|
|
86
|
+
: [];
|
|
87
|
+
if (!made[0]) {
|
|
88
|
+
throw new Error(`Codex made no image: ${answer.text.slice(0, 300)}`);
|
|
89
|
+
}
|
|
90
|
+
return new Uint8Array(readFileSync(made[0]));
|
|
91
|
+
}
|
|
92
|
+
finally {
|
|
93
|
+
rmSync(folder, { recursive: true, force: true });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export const codex = harnessOf(CLIENTS.codex, {
|
|
98
|
+
classes: CODEX_CLASSES,
|
|
99
|
+
exhausted: note("chatgptAccountCodexSigned"),
|
|
100
|
+
image: {
|
|
101
|
+
alias: "image",
|
|
102
|
+
model: (alias) => new CodexImageModel(codex, alias || "image", modelOptions(codex)),
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
/** The models carry their effort in the name (`withEffort`). */
|
|
106
|
+
export const antigravity = harnessOf(CLIENTS.antigravity, {
|
|
107
|
+
classes: {
|
|
108
|
+
classifier: "gemini-3.8-flash-low",
|
|
109
|
+
low: "gemini-3.8-flash-medium",
|
|
110
|
+
standard: "gemini-3.8-flash-high",
|
|
111
|
+
high: "gemini-3.8-flash-high",
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
/** "auto" = the model the client picks itself; a binding `cursor/<model>` names one. */
|
|
115
|
+
export const cursor = harnessOf(CLIENTS.cursor, {
|
|
116
|
+
classes: { classifier: "auto", low: "auto", standard: "auto", high: "auto" },
|
|
117
|
+
});
|