@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.
- package/README.md +3 -3
- package/apps/runtime/dist/agents/studio-assistant.js +7 -3
- package/apps/runtime/dist/agents/subscription.js +4 -17
- 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 +1 -179
- package/apps/runtime/dist/cli/setup.js +8 -6
- package/apps/runtime/dist/docs/dev/licensing.md +15 -9
- package/apps/runtime/dist/docs/user-guide/command-line.md +3 -0
- 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/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/clients.js +10 -1
- package/apps/runtime/dist/harness/index.js +15 -69
- package/apps/runtime/dist/harness/types.js +3 -2
- package/apps/runtime/dist/local-call.js +6 -0
- package/apps/runtime/dist/local-models.js +53 -157
- 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 +74 -27
- 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 +10 -4
- 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-CO3ndR23.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/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 +68 -17
- package/node_modules/@engenty/local-models/dist/clients/claude.js +1 -0
- package/node_modules/@engenty/local-models/dist/clients/client.d.ts +3 -1
- package/node_modules/@engenty/local-models/dist/clients/client.js +1 -1
- package/node_modules/@engenty/local-models/dist/clients/codex.js +1 -0
- package/node_modules/@engenty/local-models/dist/clients/cursor.d.ts +2 -0
- package/node_modules/@engenty/local-models/dist/clients/cursor.js +13 -1
- package/node_modules/@engenty/local-models/dist/clients/index.d.ts +2 -1
- package/node_modules/@engenty/local-models/dist/clients/index.js +4 -2
- package/node_modules/@engenty/local-models/dist/clients/model.d.ts +4 -1
- package/node_modules/@engenty/local-models/dist/index.d.ts +2 -1
- package/node_modules/@engenty/local-models/dist/index.js +2 -1
- 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 +4 -37
- package/node_modules/@engenty/local-models/dist/ollama/api.js +1 -18
- package/node_modules/@engenty/local-models/dist/ollama/index.d.ts +2 -1
- package/node_modules/@engenty/local-models/dist/ollama/index.js +2 -1
- package/node_modules/@engenty/local-models/dist/ollama/model.d.ts +2 -0
- package/node_modules/@engenty/local-models/dist/ollama/model.js +1 -1
- 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 +11 -8
- package/node_modules/@engenty/local-models/dist/probe.js +16 -32
- 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 +5 -1
- 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 +11 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/runtime/dist/harness/terminal.js +0 -201
- package/apps/web/dist/assets/AboutDialog-BRUwrfQH.js +0 -1
- package/apps/web/dist/assets/Bundle-C0u5HUZL.js +0 -1
- package/apps/web/dist/assets/CapabilitiesPage-C30knXsS.js +0 -2
- package/apps/web/dist/assets/ChangelogDialog-BkZQOAdl.js +0 -1
- package/apps/web/dist/assets/ConnectorsSection-CmXQD7zu.js +0 -1
- package/apps/web/dist/assets/EditorPage-LEbyNWmG.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-CSn-9zHr.js +0 -1
- package/apps/web/dist/assets/NewWizardPage-B4wPfClS.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-RawpCO9J.js +0 -1
- package/apps/web/dist/assets/ProtocolSection-s4mEL_pu.js +0 -1
- package/apps/web/dist/assets/PublicRunner-COatyxMi.js +0 -1
- package/apps/web/dist/assets/Results-CC1-mElv.js +0 -1
- package/apps/web/dist/assets/RunDrawer-DkmSXhad.js +0 -1
- package/apps/web/dist/assets/SettingsPage-DKs_fkNL.js +0 -2
- package/apps/web/dist/assets/SetupPage-RvmKCzF2.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-aZqYFttF.js +0 -2
- package/apps/web/dist/assets/StudioHome-Doua9Lyl.js +0 -1
- package/apps/web/dist/assets/TableEditor-Dbq3HZZS.js +0 -7
- package/apps/web/dist/assets/UpdateCheck-B7etUbUf.js +0 -2
- package/apps/web/dist/assets/brand-BIT7AumL.js +0 -2
- package/apps/web/dist/assets/changelog-BW79cVbx.js +0 -1
- package/apps/web/dist/assets/code-editor-CufyaUFC.js +0 -2
- package/apps/web/dist/assets/host-BXSxBoOH.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-kDKA6ddy.js +0 -102
- package/apps/web/dist/assets/oss-credits-B3PXhamW.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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** How the setup installs an AI client: with npm into the host's own prefix, or by the vendor's script. */
|
|
2
|
+
export type ClientInstall = {
|
|
3
|
+
kind: "npm";
|
|
4
|
+
pkg: string;
|
|
5
|
+
}
|
|
6
|
+
/** `url` for `curl | bash`; `windows` for PowerShell's `irm | iex`. */
|
|
7
|
+
| {
|
|
8
|
+
kind: "script";
|
|
9
|
+
url: string;
|
|
10
|
+
windows: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const CLIENT_IDS: readonly ["codex", "claude", "antigravity", "cursor"];
|
|
13
|
+
export type ClientId = (typeof CLIENT_IDS)[number];
|
|
14
|
+
/** An AI client the setup offers. */
|
|
15
|
+
export interface ClientEntry {
|
|
16
|
+
id: ClientId;
|
|
17
|
+
name: string;
|
|
18
|
+
/** The name with its provider, where a list shows it: "Anthropic Claude Code". */
|
|
19
|
+
label: string;
|
|
20
|
+
bin: string;
|
|
21
|
+
/** The subscription it answers on. */
|
|
22
|
+
account: string;
|
|
23
|
+
install: ClientInstall;
|
|
24
|
+
/** The vendor's desktop app: on this computer, the person most likely has the subscription. */
|
|
25
|
+
app?: string;
|
|
26
|
+
}
|
|
27
|
+
/** The AI clients an app can think with, in the order the setup offers them. */
|
|
28
|
+
export declare const CLIENTS: readonly ClientEntry[];
|
|
29
|
+
export declare function clientEntry(id: string): ClientEntry | null;
|
|
30
|
+
/**
|
|
31
|
+
* The command the setup runs for a client, as the person would type it (PowerShell on Windows).
|
|
32
|
+
* `folder`: npm's prefix, where the host keeps the clients it installs.
|
|
33
|
+
*/
|
|
34
|
+
export declare function installCommand(client: ClientEntry, folder: string, platform: string): string;
|
|
35
|
+
/** PowerShell, for a command written for it: without the person's profile, scripts allowed. */
|
|
36
|
+
export declare const POWERSHELL: string[];
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export const CLIENT_IDS = ["codex", "claude", "antigravity", "cursor"];
|
|
2
|
+
/** The AI clients an app can think with, in the order the setup offers them. */
|
|
3
|
+
export const CLIENTS = [
|
|
4
|
+
{
|
|
5
|
+
id: "codex",
|
|
6
|
+
name: "Codex",
|
|
7
|
+
label: "OpenAI Codex",
|
|
8
|
+
bin: "codex",
|
|
9
|
+
account: "ChatGPT",
|
|
10
|
+
install: { kind: "npm", pkg: "@openai/codex" },
|
|
11
|
+
app: "ChatGPT",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: "claude",
|
|
15
|
+
name: "Claude Code",
|
|
16
|
+
label: "Anthropic Claude Code",
|
|
17
|
+
bin: "claude",
|
|
18
|
+
account: "Claude",
|
|
19
|
+
install: {
|
|
20
|
+
kind: "script",
|
|
21
|
+
url: "https://claude.ai/install.sh",
|
|
22
|
+
windows: "https://claude.ai/install.ps1",
|
|
23
|
+
},
|
|
24
|
+
app: "Claude",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "antigravity",
|
|
28
|
+
name: "Antigravity",
|
|
29
|
+
label: "Google Antigravity",
|
|
30
|
+
bin: "agy",
|
|
31
|
+
account: "Google AI",
|
|
32
|
+
install: {
|
|
33
|
+
kind: "script",
|
|
34
|
+
url: "https://antigravity.google/cli/install.sh",
|
|
35
|
+
windows: "https://antigravity.google/cli/install.ps1",
|
|
36
|
+
},
|
|
37
|
+
app: "Antigravity",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "cursor",
|
|
41
|
+
name: "Cursor Agent",
|
|
42
|
+
label: "Cursor Agent",
|
|
43
|
+
bin: "cursor-agent",
|
|
44
|
+
account: "Cursor",
|
|
45
|
+
install: {
|
|
46
|
+
kind: "script",
|
|
47
|
+
url: "https://cursor.com/install",
|
|
48
|
+
windows: "https://cursor.com/install?win32=true",
|
|
49
|
+
},
|
|
50
|
+
app: "Cursor",
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
export function clientEntry(id) {
|
|
54
|
+
return CLIENTS.find((client) => client.id === id) ?? null;
|
|
55
|
+
}
|
|
56
|
+
/** A word for the shell: quoted when it holds anything but plain characters. */
|
|
57
|
+
const shellWord = (word) => /^[\w@%+=:,./-]+$/.test(word) ? word : `'${word.replaceAll("'", "'\\''")}'`;
|
|
58
|
+
/** A word for PowerShell: in single quotes, which take everything but a single quote as it is. */
|
|
59
|
+
const powershellWord = (word) => /^[\w@%+=:,./\\-]+$/.test(word) ? word : `'${word.replaceAll("'", "''")}'`;
|
|
60
|
+
/**
|
|
61
|
+
* The command the setup runs for a client, as the person would type it (PowerShell on Windows).
|
|
62
|
+
* `folder`: npm's prefix, where the host keeps the clients it installs.
|
|
63
|
+
*/
|
|
64
|
+
export function installCommand(client, folder, platform) {
|
|
65
|
+
const windows = platform === "win32";
|
|
66
|
+
if (client.install.kind === "npm") {
|
|
67
|
+
const prefix = windows ? powershellWord(folder) : shellWord(folder);
|
|
68
|
+
return `npm install --global --prefix ${prefix} ${client.install.pkg}`;
|
|
69
|
+
}
|
|
70
|
+
return windows
|
|
71
|
+
? `irm ${powershellWord(client.install.windows)} | iex`
|
|
72
|
+
: `curl -fsSL ${client.install.url} | bash`;
|
|
73
|
+
}
|
|
74
|
+
/** PowerShell, for a command written for it: without the person's profile, scripts allowed. */
|
|
75
|
+
export const POWERSHELL = [
|
|
76
|
+
"powershell.exe",
|
|
77
|
+
"-NoProfile",
|
|
78
|
+
"-ExecutionPolicy",
|
|
79
|
+
"Bypass",
|
|
80
|
+
"-Command",
|
|
81
|
+
];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CLIENT_IDS, CLIENTS, type ClientEntry, type ClientId, type ClientInstall, clientEntry, installCommand, POWERSHELL, } from "./catalog.js";
|
|
2
|
+
export { OFFERED_MODELS } from "./offered.js";
|
|
3
|
+
export { type ClientSetupStatus, type HeldModel, type LocalModelsState, MODEL_JOBS, type ModelDownload, type ModelJob, type OfferedModel, type ServerStatus, type TerminalEvent, } from "./types.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ServerId } from "@engenty/local-models/servers";
|
|
2
|
+
import type { OfferedModel } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Models that write, by the server that runs them, for a host that asks no one for a list. The
|
|
5
|
+
* first that fits the computer is the one the setup suggests.
|
|
6
|
+
*/
|
|
7
|
+
export declare const OFFERED_MODELS: Record<ServerId, readonly OfferedModel[]>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const NOTES = {
|
|
2
|
+
qwen: {
|
|
3
|
+
en: "Writes, researches and uses tools well; for a Mac with 32 GB or more.",
|
|
4
|
+
de: "Schreibt, recherchiert und nutzt Werkzeuge gut; für einen Mac mit 32 GB oder mehr.",
|
|
5
|
+
},
|
|
6
|
+
gemmaLarge: {
|
|
7
|
+
en: "Google’s larger Gemma 4; reads images too.",
|
|
8
|
+
de: "Googles größeres Gemma 4; liest auch Bilder.",
|
|
9
|
+
},
|
|
10
|
+
gemma: {
|
|
11
|
+
en: "Enough for short texts and sorting; for a Mac with 16 GB.",
|
|
12
|
+
de: "Reicht für kurze Texte und Einordnen; für einen Mac mit 16 GB.",
|
|
13
|
+
},
|
|
14
|
+
small: {
|
|
15
|
+
en: "Small, with tools; for short answers on any Mac.",
|
|
16
|
+
de: "Klein, mit Werkzeugen; für kurze Antworten auf jedem Mac.",
|
|
17
|
+
},
|
|
18
|
+
gemmaSmall: {
|
|
19
|
+
en: "Small and quick; for short answers.",
|
|
20
|
+
de: "Klein und schnell; für kurze Antworten.",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Models that write, by the server that runs them, for a host that asks no one for a list. The
|
|
25
|
+
* first that fits the computer is the one the setup suggests.
|
|
26
|
+
*/
|
|
27
|
+
export const OFFERED_MODELS = {
|
|
28
|
+
ollama: [
|
|
29
|
+
{ name: "qwen3.8:27b", job: "text", size: 17.7, memory: 22, note: NOTES.qwen },
|
|
30
|
+
{ name: "gemma4:26b", job: "text", size: 18.7, memory: 22, note: NOTES.gemmaLarge },
|
|
31
|
+
{ name: "gemma4:12b", job: "text", size: 8, memory: 11, note: NOTES.gemma },
|
|
32
|
+
{ name: "gemma4:e4b", job: "text", size: 6.6, memory: 8, note: NOTES.gemmaSmall },
|
|
33
|
+
],
|
|
34
|
+
lmstudio: [
|
|
35
|
+
{ name: "qwen/qwen3.8-27b", job: "text", size: 16, memory: 20, note: NOTES.qwen },
|
|
36
|
+
{ name: "google/gemma-4-26b-a4b", job: "text", size: 16, memory: 20, note: NOTES.gemmaLarge },
|
|
37
|
+
{ name: "google/gemma-4-12b", job: "text", size: 7, memory: 10, note: NOTES.gemma },
|
|
38
|
+
{ name: "google/gemma-4-e4b", job: "text", size: 6, memory: 8, note: NOTES.gemmaSmall },
|
|
39
|
+
],
|
|
40
|
+
mlx: [
|
|
41
|
+
{
|
|
42
|
+
name: "mlx-community/Qwen3.8-27B-4bit",
|
|
43
|
+
job: "text",
|
|
44
|
+
size: 16.1,
|
|
45
|
+
memory: 20,
|
|
46
|
+
note: NOTES.qwen,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "mlx-community/gemma-4-26b-a4b-it-4bit",
|
|
50
|
+
job: "text",
|
|
51
|
+
size: 15.4,
|
|
52
|
+
memory: 19,
|
|
53
|
+
note: NOTES.gemmaLarge,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "mlx-community/gemma-4-12b-it-4bit",
|
|
57
|
+
job: "text",
|
|
58
|
+
size: 6.8,
|
|
59
|
+
memory: 10,
|
|
60
|
+
note: NOTES.gemma,
|
|
61
|
+
},
|
|
62
|
+
{ name: "mlx-community/Qwen3-4B-4bit", job: "text", size: 2.3, memory: 5, note: NOTES.small },
|
|
63
|
+
],
|
|
64
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ClientId } from "../catalog.js";
|
|
2
|
+
import type { ClientSetupStatus } from "../types.js";
|
|
3
|
+
import type { SetupChoice } from "./columns.js";
|
|
4
|
+
/** What a test call came to. */
|
|
5
|
+
export interface TestResult {
|
|
6
|
+
ok: boolean;
|
|
7
|
+
ref?: string;
|
|
8
|
+
reply?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
ms: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One short call, as the app would make it; the answer shows the way is open. `auto`: the call
|
|
14
|
+
* is made right away, as the setup tests by itself once a source is ready.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ModelTest({ auto }: {
|
|
17
|
+
auto?: boolean;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Installed clients first, and among each, the one whose app is on this computer; else in the
|
|
21
|
+
* catalog's order.
|
|
22
|
+
*/
|
|
23
|
+
export declare function rankClients<T extends Pick<ClientSetupStatus<ClientId>, "id" | "version" | "app">>(clients: readonly T[]): T[];
|
|
24
|
+
/**
|
|
25
|
+
* The clients the list opens with: those signed in. Where none is, those installed; where none is
|
|
26
|
+
* either, the first. The others are among the rest.
|
|
27
|
+
*/
|
|
28
|
+
export declare function foundClients<T extends Pick<ClientSetupStatus<ClientId>, "id" | "version" | "app" | "auth">>(clients: readonly T[]): T[];
|
|
29
|
+
/** The clients as rows of the list, the first one recommended. */
|
|
30
|
+
export declare function useClientChoices(clients: readonly ClientSetupStatus<ClientId>[]): SetupChoice[];
|
|
31
|
+
/** Where a client stands: its step, and what to do now. */
|
|
32
|
+
export declare function useClientStage(client: ClientSetupStatus | undefined, works: boolean): {
|
|
33
|
+
stage: number;
|
|
34
|
+
heading: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* One AI client on this computer: found with its version, how it is signed in, the sign-in
|
|
38
|
+
* itself in a terminal, and the test call. The setup and the settings both show it.
|
|
39
|
+
*/
|
|
40
|
+
export declare function ClientPanel({ client, autoTest, hint, }: {
|
|
41
|
+
client: ClientSetupStatus<ClientId>;
|
|
42
|
+
/** Make the test call without a click as soon as the client is signed in. */
|
|
43
|
+
autoTest?: boolean;
|
|
44
|
+
/** What the app does with it; the package's own line when none is given. */
|
|
45
|
+
hint?: string;
|
|
46
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, cn } from "@engenty/chatviews/react/ui";
|
|
3
|
+
import { Check, RefreshCw } from "lucide-react";
|
|
4
|
+
import { lazy, Suspense, useEffect, useRef, useState } from "react";
|
|
5
|
+
import { CLIENT_IDS } from "../catalog.js";
|
|
6
|
+
import { useCall, useSetupHost, useText } from "./host.js";
|
|
7
|
+
// The terminal is big and rarely needed: it loads when one opens.
|
|
8
|
+
const Terminal = lazy(() => import("./terminal.js"));
|
|
9
|
+
/**
|
|
10
|
+
* One short call, as the app would make it; the answer shows the way is open. `auto`: the call
|
|
11
|
+
* is made right away, as the setup tests by itself once a source is ready.
|
|
12
|
+
*/
|
|
13
|
+
export function ModelTest({ auto = false }) {
|
|
14
|
+
const host = useSetupHost();
|
|
15
|
+
const t = useText();
|
|
16
|
+
const test = useCall(async () => {
|
|
17
|
+
const result = await host.post("/models/test", {});
|
|
18
|
+
// A working call ends the setup: the page learns it.
|
|
19
|
+
if (result.ok) {
|
|
20
|
+
await host.changed();
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
});
|
|
24
|
+
const { run } = test;
|
|
25
|
+
const started = useRef(false);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (auto && !started.current) {
|
|
28
|
+
started.current = true;
|
|
29
|
+
void run();
|
|
30
|
+
}
|
|
31
|
+
}, [auto, run]);
|
|
32
|
+
const r = test.data;
|
|
33
|
+
const failed = test.error ?? (r && !r.ok ? (r.error ?? "") : undefined);
|
|
34
|
+
return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("p", { className: "text-[0.8125rem] text-ink-3", children: t("local.testHint") }), _jsx("div", { children: _jsx(Button, { variant: "secondary", busy: test.busy, onClick: () => void run(), children: t("local.test") }) }), r?.ok ? (_jsxs("p", { className: "flex items-start gap-2 text-[0.875rem] text-ink-2", children: [_jsx(Check, { className: "mt-0.5 size-4 shrink-0 text-moss" }), _jsx("span", { children: t("local.testOk", {
|
|
35
|
+
s: (r.ms / 1000).toFixed(1),
|
|
36
|
+
ref: r.ref ?? "",
|
|
37
|
+
reply: r.reply ?? "",
|
|
38
|
+
}) })] })) : null, failed !== undefined ? (_jsx("p", { className: "text-[0.875rem] text-rose", children: t("local.testFailed", { error: failed }) })) : null] }));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Installed clients first, and among each, the one whose app is on this computer; else in the
|
|
42
|
+
* catalog's order.
|
|
43
|
+
*/
|
|
44
|
+
export function rankClients(clients) {
|
|
45
|
+
const rank = (c) => (c.version === null ? 2 : 0) + (c.app ? 0 : 1);
|
|
46
|
+
return [...clients].sort((a, b) => rank(a) - rank(b) || CLIENT_IDS.indexOf(a.id) - CLIENT_IDS.indexOf(b.id));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The clients the list opens with: those signed in. Where none is, those installed; where none is
|
|
50
|
+
* either, the first. The others are among the rest.
|
|
51
|
+
*/
|
|
52
|
+
export function foundClients(clients) {
|
|
53
|
+
const ranked = rankClients(clients);
|
|
54
|
+
const signedIn = ranked.filter((c) => c.version !== null && c.auth !== "none");
|
|
55
|
+
if (signedIn.length) {
|
|
56
|
+
return signedIn;
|
|
57
|
+
}
|
|
58
|
+
const installed = ranked.filter((c) => c.version !== null);
|
|
59
|
+
return installed.length ? installed : ranked.slice(0, 1);
|
|
60
|
+
}
|
|
61
|
+
/** The clients as rows of the list, the first one recommended. */
|
|
62
|
+
export function useClientChoices(clients) {
|
|
63
|
+
const t = useText();
|
|
64
|
+
const found = foundClients(clients);
|
|
65
|
+
return rankClients(clients).map((client) => ({
|
|
66
|
+
id: client.id,
|
|
67
|
+
title: client.label,
|
|
68
|
+
description: t(`harness.desc.${client.id}`),
|
|
69
|
+
...(client === found[0] ? { badge: t("setup.recommended") } : {}),
|
|
70
|
+
...(found.includes(client) ? {} : { more: true }),
|
|
71
|
+
...(client.version === null
|
|
72
|
+
? { note: t("harness.notInstalled") }
|
|
73
|
+
: client.auth === "none"
|
|
74
|
+
? { note: t("harness.signedOut") }
|
|
75
|
+
: client.auth === "subscription"
|
|
76
|
+
? { note: t("harness.ready") }
|
|
77
|
+
: {}),
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
/** Where a client stands: its step, and what to do now. */
|
|
81
|
+
export function useClientStage(client, works) {
|
|
82
|
+
const t = useText();
|
|
83
|
+
if (works) {
|
|
84
|
+
return { stage: 2, heading: t("setup.h.done") };
|
|
85
|
+
}
|
|
86
|
+
if (!client) {
|
|
87
|
+
return { stage: 1, heading: t("setup.h.test") };
|
|
88
|
+
}
|
|
89
|
+
if (client.version === null) {
|
|
90
|
+
return { stage: 0, heading: t("setup.h.install", { name: client.name }) };
|
|
91
|
+
}
|
|
92
|
+
return client.auth === "none"
|
|
93
|
+
? { stage: 0, heading: t("setup.h.signIn", { name: client.name }) }
|
|
94
|
+
: { stage: 1, heading: t("setup.h.test") };
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* One AI client on this computer: found with its version, how it is signed in, the sign-in
|
|
98
|
+
* itself in a terminal, and the test call. The setup and the settings both show it.
|
|
99
|
+
*/
|
|
100
|
+
export function ClientPanel({ client, autoTest = false, hint, }) {
|
|
101
|
+
const host = useSetupHost();
|
|
102
|
+
const t = useText();
|
|
103
|
+
const { id } = client;
|
|
104
|
+
// The terminal runs the install or the sign-in; one of them at a time.
|
|
105
|
+
const [terminal, setTerminal] = useState(null);
|
|
106
|
+
const [ended, setEnded] = useState(null);
|
|
107
|
+
const recheck = useCall(async () => {
|
|
108
|
+
await host.post(`/harness/${id}/detect`);
|
|
109
|
+
await host.changed();
|
|
110
|
+
});
|
|
111
|
+
const open = async (job) => {
|
|
112
|
+
const started = await host.post(`/harness/${id}/${job}`, {
|
|
113
|
+
cols: 100,
|
|
114
|
+
rows: 24,
|
|
115
|
+
});
|
|
116
|
+
setTerminal({ id: started.terminal, job });
|
|
117
|
+
setEnded(null);
|
|
118
|
+
};
|
|
119
|
+
const install = useCall(() => open("install"));
|
|
120
|
+
const login = useCall(() => open("login"));
|
|
121
|
+
const signedIn = client.auth === "subscription";
|
|
122
|
+
const installed = client.version !== null;
|
|
123
|
+
// What the terminal was for is there and its command is over: it has done its job.
|
|
124
|
+
useEffect(() => {
|
|
125
|
+
if (ended !== null && (terminal?.job === "install" ? installed : signedIn)) {
|
|
126
|
+
setTerminal(null);
|
|
127
|
+
}
|
|
128
|
+
}, [signedIn, installed, ended, terminal?.job]);
|
|
129
|
+
const sub = t(`harness.sub.${id}`);
|
|
130
|
+
const again = (_jsxs(Button, { variant: "ghost", size: "sm", busy: recheck.busy, onClick: () => void recheck.run(), children: [_jsx(RefreshCw, { className: "size-3.5" }), " ", t("local.recheck")] }));
|
|
131
|
+
return (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx("p", { className: "text-[0.8125rem] text-ink-3", children: hint ??
|
|
132
|
+
t(client.images ? "harness.hintImages" : "harness.hint", { name: client.name, sub }) }), installed ? (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("p", { className: "flex items-center gap-2 text-[0.875rem] text-ink-2", children: [_jsx(Check, { className: "size-4 text-moss" }), t("harness.found", { name: client.name, version: client.version ?? "" })] }), _jsx("p", { className: cn("text-[0.8125rem]", signedIn ? "text-ink-3" : "text-rose"), children: signedIn
|
|
133
|
+
? t("harness.authSubscription", { sub })
|
|
134
|
+
: client.auth === "api_key"
|
|
135
|
+
? t("harness.authKey", { sub })
|
|
136
|
+
: t("harness.authNone") }), signedIn || terminal ? null : (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Button, { busy: login.busy, onClick: () => void login.run(), children: t("harness.signIn") }), again] })), login.error ? _jsx("p", { className: "text-[0.8125rem] text-rose", children: login.error }) : null] })) : (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("p", { className: "text-[0.875rem] text-rose", children: t("harness.missing", { name: client.name }) }), client.app ? (_jsx("p", { className: "text-[0.8125rem] text-ink-3", children: t("harness.appHere", { app: client.app, name: client.name, sub }) })) : null, terminal ? null : (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Button, { busy: install.busy, onClick: () => void install.run(), children: t("harness.installButton", { name: client.name }) }), again] })), install.error ? _jsx("p", { className: "text-[0.8125rem] text-rose", children: install.error }) : null, _jsxs("p", { className: "text-[0.8125rem] text-ink-3", children: [t("harness.install"), " ", _jsx("code", { className: "rounded bg-paper px-1.5 py-0.5 font-mono text-[0.75rem] text-ink-2", children: client.install })] })] })), terminal ? (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("p", { className: "text-[0.8125rem] text-ink-3", children: terminal.job === "install"
|
|
137
|
+
? t("harness.installing", { name: client.name })
|
|
138
|
+
: client.interactiveLogin
|
|
139
|
+
? t("harness.signInInteractive", { name: client.name, sub })
|
|
140
|
+
: t("harness.signingIn") }), _jsx(Suspense, { fallback: _jsx("div", { className: "h-[28rem] max-h-[60dvh] rounded-lg bg-[#0f1424]" }), children: _jsx(Terminal, { id: terminal.id, onDone: () => void recheck.run(), onExit: (code) => {
|
|
141
|
+
setEnded(code);
|
|
142
|
+
void recheck.run();
|
|
143
|
+
} }, terminal.id) }), _jsx("div", { className: "flex flex-wrap items-center gap-2", children: ended === null ? (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => {
|
|
144
|
+
void host.del(`/terminal/${terminal.id}`).catch(() => undefined);
|
|
145
|
+
setTerminal(null);
|
|
146
|
+
}, children: t("setup.cancel") })) : (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: () => setTerminal(null), children: t("setup.close") }), terminal.job === "install" ? (installed ? null : (_jsx("span", { className: "text-[0.8125rem] text-rose", children: t("harness.installEnded", { name: client.name }) }))) : signedIn ? null : (_jsx("span", { className: "text-[0.8125rem] text-rose", children: t("harness.loginEnded", { name: client.name }) }))] })) })] })) : null, installed ? (_jsx(ModelTest, { auto: autoTest && client.auth !== "none" }, `${id}:${client.auth}`)) : null] }));
|
|
147
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** One thing an app can think with, as a row of the list. */
|
|
3
|
+
export interface SetupChoice {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
/** Set on the row's edge: the choice the setup recommends. */
|
|
8
|
+
badge?: string;
|
|
9
|
+
/** How the choice stands right now, at the row's end. */
|
|
10
|
+
note?: string;
|
|
11
|
+
/** It cannot answer as it is: shown once the person asks for more. */
|
|
12
|
+
more?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function Choice({ choice, selected, onPick, }: {
|
|
15
|
+
choice: SetupChoice;
|
|
16
|
+
selected: boolean;
|
|
17
|
+
onPick: () => void;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Where the setup stands: what is chosen, its steps by name, then one dash per step. A step
|
|
21
|
+
* reached is green and checked, the one to do now amber, the ones ahead dim. The dashes fill
|
|
22
|
+
* like a strength meter: as many as the step the setup is on, amber on the way, all green once
|
|
23
|
+
* it works.
|
|
24
|
+
*/
|
|
25
|
+
export declare function Stages({ name, at, done }: {
|
|
26
|
+
name: string;
|
|
27
|
+
at: number;
|
|
28
|
+
done: boolean;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
/** The opened choice: what it is, where it stands, and what it needs. */
|
|
31
|
+
export interface SetupPanel {
|
|
32
|
+
name: string;
|
|
33
|
+
heading: string;
|
|
34
|
+
/** The step it is on: connect, test, done. */
|
|
35
|
+
stage: number;
|
|
36
|
+
works: boolean;
|
|
37
|
+
/** A figure on the box's corner; the heading keeps clear of it. */
|
|
38
|
+
figure?: ReactNode;
|
|
39
|
+
content: ReactNode;
|
|
40
|
+
/** Below the box: what goes on from here. */
|
|
41
|
+
footer?: ReactNode;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The setup: first only the question what the app thinks with, in the middle of the page. A
|
|
45
|
+
* choice steps the list aside and opens what that choice needs (the sign-in, the keys, the test
|
|
46
|
+
* call), its rows level with the list's.
|
|
47
|
+
*/
|
|
48
|
+
export declare function SetupColumns({ eyebrow, title, sub, figure, top, divider, choices, selected, marked, onPick, recheck, panel, hidden, }: {
|
|
49
|
+
eyebrow?: string;
|
|
50
|
+
title: string;
|
|
51
|
+
sub: string;
|
|
52
|
+
/** A figure that stands beside the choices while none is opened, small above them on a narrow page. */
|
|
53
|
+
figure?: ReactNode;
|
|
54
|
+
/** Above the choices: an account. A choice in it is picked with `pick`. */
|
|
55
|
+
top?: (pick: (id: string) => void) => ReactNode;
|
|
56
|
+
/** A line between what is above and the choices. */
|
|
57
|
+
divider?: {
|
|
58
|
+
label: string;
|
|
59
|
+
note: string;
|
|
60
|
+
};
|
|
61
|
+
choices: readonly SetupChoice[];
|
|
62
|
+
/** The choice in effect; null: none yet. */
|
|
63
|
+
selected: string | null;
|
|
64
|
+
/** The row that is lit: the one just clicked, at once; else the one in effect. */
|
|
65
|
+
marked: string | null;
|
|
66
|
+
onPick: (id: string) => Promise<unknown> | unknown;
|
|
67
|
+
/** Looks at the clients again; `note`: said beside it. */
|
|
68
|
+
recheck?: {
|
|
69
|
+
busy: boolean;
|
|
70
|
+
run: () => void;
|
|
71
|
+
note?: string | null;
|
|
72
|
+
};
|
|
73
|
+
panel: SetupPanel | null;
|
|
74
|
+
/** Something else stands in its place. */
|
|
75
|
+
hidden?: boolean;
|
|
76
|
+
}): import("react").JSX.Element;
|
|
77
|
+
/** Said once the test worked, above the way on. */
|
|
78
|
+
export declare function SetupReady(): import("react").JSX.Element;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button, cn } from "@engenty/chatviews/react/ui";
|
|
3
|
+
import { ArrowLeft, ArrowRight, Check, ChevronDown, RefreshCw } from "lucide-react";
|
|
4
|
+
import { useRef, useState } from "react";
|
|
5
|
+
import { useText } from "./host.js";
|
|
6
|
+
const EASE = "ease-[cubic-bezier(0.3,0.7,0.2,1)]";
|
|
7
|
+
/**
|
|
8
|
+
* A line of the list's heading: as wide as its text and shifted, not laid out, to the middle,
|
|
9
|
+
* so it keeps the column's full width and can travel to the left edge.
|
|
10
|
+
*/
|
|
11
|
+
const LINE = "relative w-fit max-w-full transition-[left,translate] duration-700 ease-[cubic-bezier(0.3,0.7,0.2,1)] motion-reduce:transition-none";
|
|
12
|
+
const LINE_MIDDLE = "left-1/2 -translate-x-1/2 text-center";
|
|
13
|
+
/** Beside an opened choice the lines stand at the left edge; on a narrow page the list is alone again and they stay in the middle. */
|
|
14
|
+
const LINE_LEFT = "max-lg:left-1/2 max-lg:-translate-x-1/2 max-lg:text-center lg:left-0 lg:translate-x-0 lg:text-left";
|
|
15
|
+
/** A step by its state: reached, the one to do now, still ahead. */
|
|
16
|
+
const STEP_DONE = "var(--step-done)";
|
|
17
|
+
const STEP_NOW = "var(--step-now)";
|
|
18
|
+
const STEP_LATER = "color-mix(in oklab, var(--on) 38%, transparent)";
|
|
19
|
+
export function Choice({ choice, selected, onPick, }) {
|
|
20
|
+
const { title, description, badge, note } = choice;
|
|
21
|
+
return (_jsxs("button", { type: "button", onClick: onPick, "aria-pressed": selected, className: cn("group relative flex w-full items-center gap-3 rounded-2xl px-4 py-3 text-left transition-[background-color,color,box-shadow] duration-300", selected
|
|
22
|
+
? "bg-(color:--pick) text-(color:--pick-ink) shadow-elevated"
|
|
23
|
+
: "bg-(color:--tile) ring-(color:--tile-ring) ring-1 hover:bg-(color:--tile-hover)"), children: [badge ? (_jsx("span", { className: "absolute -top-2.5 right-4 rounded-full bg-(color:--badge) px-2.5 py-[3px] font-semibold text-(color:--badge-ink) text-[0.6875rem] leading-none tracking-wide shadow-[0_2px_8px_oklch(0%_0_0/0.22)]", children: badge })) : null, _jsx("span", { className: cn("flex size-5 shrink-0 items-center justify-center rounded-full border transition-colors duration-300", selected ? "border-transparent bg-(color:--pick-mark)" : "border-(color:--on)/40"), children: selected ? _jsx(Check, { className: "size-3.5 text-(color:--pick)" }) : null }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "block font-medium text-[0.9375rem]", children: title }), _jsx("span", { className: cn("mt-0.5 block truncate text-[0.8125rem]", selected ? "opacity-70" : "text-(color:--on)/65"), children: description })] }), note ? (_jsx("span", { className: cn("shrink-0 text-[0.75rem]", selected ? "opacity-70" : "text-(color:--on)/65"), children: note })) : null, _jsx(ArrowRight, { className: cn("size-4 shrink-0 transition", selected
|
|
24
|
+
? "opacity-70"
|
|
25
|
+
: "text-(color:--on)/40 group-hover:translate-x-0.5 group-hover:text-(color:--on)/80") })] }));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Where the setup stands: what is chosen, its steps by name, then one dash per step. A step
|
|
29
|
+
* reached is green and checked, the one to do now amber, the ones ahead dim. The dashes fill
|
|
30
|
+
* like a strength meter: as many as the step the setup is on, amber on the way, all green once
|
|
31
|
+
* it works.
|
|
32
|
+
*/
|
|
33
|
+
export function Stages({ name, at, done }) {
|
|
34
|
+
const t = useText();
|
|
35
|
+
const stages = [t("setup.stage.connect"), t("setup.stage.test"), t("setup.stage.done")];
|
|
36
|
+
const level = done ? stages.length : at + 1;
|
|
37
|
+
return (_jsxs("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-2 font-medium text-[0.75rem] uppercase tracking-[0.14em]", children: [_jsx("span", { className: "text-(color:--on)/70", children: name }), _jsx("ol", { className: "flex flex-wrap items-center gap-x-3 gap-y-2", children: stages.map((stage, i) => {
|
|
38
|
+
const reached = done || i < at;
|
|
39
|
+
return (_jsxs("li", { "aria-current": !reached && i === at ? "step" : undefined, className: "flex items-center gap-1 transition-colors duration-500", style: { color: reached ? STEP_DONE : i === at ? STEP_NOW : STEP_LATER }, children: [reached ? _jsx(Check, { className: "size-3.5", strokeWidth: 3 }) : null, stage] }, stage));
|
|
40
|
+
}) }), _jsx("span", { "aria-hidden": "true", className: "flex gap-1.5", children: stages.map((stage, i) => (_jsx("span", { className: "h-[3px] w-5 rounded-full transition-colors duration-500", style: {
|
|
41
|
+
background: i < level
|
|
42
|
+
? done
|
|
43
|
+
? STEP_DONE
|
|
44
|
+
: STEP_NOW
|
|
45
|
+
: "color-mix(in oklab, var(--on) 22%, transparent)",
|
|
46
|
+
} }, stage))) })] }));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* On a narrow page the choices and the opened choice take turns; each starts at the top of
|
|
50
|
+
* whatever scrolls around them.
|
|
51
|
+
*/
|
|
52
|
+
function toTop(from) {
|
|
53
|
+
if (window.matchMedia("(max-width: 1023px)").matches) {
|
|
54
|
+
for (let el = from; el; el = el.parentElement) {
|
|
55
|
+
el.scrollTop = 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The setup: first only the question what the app thinks with, in the middle of the page. A
|
|
61
|
+
* choice steps the list aside and opens what that choice needs (the sign-in, the keys, the test
|
|
62
|
+
* call), its rows level with the list's.
|
|
63
|
+
*/
|
|
64
|
+
export function SetupColumns({ eyebrow, title, sub, figure, top, divider, choices, selected, marked, onPick, recheck, panel, hidden = false, }) {
|
|
65
|
+
const t = useText();
|
|
66
|
+
const root = useRef(null);
|
|
67
|
+
// A narrow page shows the opened choice alone; the person goes back to the choices from there.
|
|
68
|
+
const [listOpen, setListOpen] = useState(false);
|
|
69
|
+
const [moreOpen, setMoreOpen] = useState(false);
|
|
70
|
+
const rest = choices.filter((choice) => choice.more && choice.id !== marked);
|
|
71
|
+
const first = choices.filter((choice) => !rest.includes(choice));
|
|
72
|
+
// The rest comes after what stood there already: no row moves.
|
|
73
|
+
const shown = moreOpen ? [...first, ...rest] : first;
|
|
74
|
+
/** On a narrow page: the opened choice is all there is to see. */
|
|
75
|
+
const panelOnly = selected !== null && !listOpen;
|
|
76
|
+
const pick = async (id) => {
|
|
77
|
+
try {
|
|
78
|
+
await onPick(id);
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
setListOpen(false);
|
|
84
|
+
toTop(root.current);
|
|
85
|
+
};
|
|
86
|
+
return (_jsxs(_Fragment, { children: [figure ? (_jsxs(_Fragment, { children: [_jsx("div", { "aria-hidden": "true", className: cn("absolute top-6 left-1/2 z-10 origin-top -translate-x-1/2 transition-[opacity,scale,left] duration-500 motion-reduce:transition-none lg:top-[calc(6vh+5.25rem)] lg:origin-center lg:translate-x-0", EASE, selected
|
|
87
|
+
? "lg:pointer-events-none lg:left-[calc(50%-560px)] lg:scale-75 lg:opacity-0"
|
|
88
|
+
: "lg:left-[calc(50%-508px)] lg:scale-100 lg:opacity-100", panelOnly
|
|
89
|
+
? "max-lg:pointer-events-none max-lg:scale-[0.4] max-lg:opacity-0"
|
|
90
|
+
: "max-lg:scale-[0.6] max-lg:opacity-100"), children: _jsx("div", { className: "animate-rise", children: figure }) }), _jsx("div", { "aria-hidden": "true", className: cn("shrink-0 transition-[height] duration-500 motion-reduce:transition-none lg:h-0", EASE, panelOnly ? "max-lg:h-0" : "max-lg:h-[148px]") })] })) : null, _jsxs("div", { ref: root, className: cn("flex flex-col gap-10 lg:flex-row lg:items-start lg:gap-14", hidden ? "hidden" : ""), children: [_jsxs("section", { className: cn("flex w-full shrink-0 animate-rise flex-col lg:w-[32rem] lg:transition-[margin] lg:duration-700 motion-reduce:transition-none", EASE, selected ? "lg:ml-0" : "lg:ml-[calc(50%-16rem)]", panelOnly ? "max-lg:hidden" : ""), children: [_jsxs("div", { className: "flex flex-col lg:min-h-[6.5rem]", children: [eyebrow ? (_jsx("p", { className: cn(LINE, "font-medium text-(color:--on)/70 text-[0.75rem] uppercase tracking-[0.16em]", selected ? LINE_LEFT : LINE_MIDDLE), children: eyebrow })) : null, _jsx("h1", { className: cn(LINE, "mt-2 font-display font-semibold text-[1.625rem] leading-[1.08] tracking-[-0.02em] sm:text-[1.75rem]", selected ? LINE_LEFT : LINE_MIDDLE), children: title }), _jsx("p", { className: cn(LINE, "mt-2.5 text-(color:--on)/75 text-[0.9375rem] leading-relaxed", selected ? LINE_LEFT : LINE_MIDDLE), children: sub })] }), top?.((id) => void pick(id)), divider ? (_jsxs("div", { className: "mt-7", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("span", { className: "h-px flex-1 bg-(color:--on)/25" }), _jsx("span", { className: "font-medium text-(color:--on)/80 text-[0.75rem] uppercase tracking-[0.14em]", children: divider.label }), _jsx("span", { className: "h-px flex-1 bg-(color:--on)/25" })] }), _jsx("p", { className: "mt-2 text-center text-(color:--on)/65 text-[0.8125rem] leading-snug", children: divider.note })] })) : null, _jsx("div", { className: "mt-5 flex flex-col gap-2.5", children: shown.map((choice) => (_jsx(Choice, { choice: choice, selected: marked === choice.id, onPick: () => void pick(choice.id) }, choice.id))) }), rest.length ? (_jsx("div", { className: "mt-3 flex justify-center", children: _jsxs(Button, { variant: "ghost", size: "sm", "aria-expanded": moreOpen, onClick: () => setMoreOpen(!moreOpen), children: [_jsx(ChevronDown, { className: cn("size-3.5 transition-transform", moreOpen ? "rotate-180" : "") }), moreOpen ? t("setup.less") : t("setup.more")] }) })) : null, recheck ? (_jsxs("div", { className: "mt-1 flex flex-wrap items-center justify-center gap-x-2 gap-y-1 text-(color:--on)/60 text-[0.8125rem]", children: [_jsx("span", { children: recheck.note }), _jsxs(Button, { variant: "ghost", size: "sm", busy: recheck.busy, onClick: recheck.run, children: [_jsx(RefreshCw, { className: "size-3.5" }), " ", t("local.recheck")] })] })) : null] }), selected && panel ? (_jsxs("section", { className: cn("min-w-0 flex-1 animate-settle", listOpen ? "max-lg:hidden" : ""), children: [_jsxs("button", { type: "button", onClick: () => {
|
|
91
|
+
setListOpen(true);
|
|
92
|
+
toTop(root.current);
|
|
93
|
+
}, className: "-ml-1.5 mb-5 inline-flex items-center gap-1.5 rounded-full px-1.5 py-1 text-(color:--on)/80 text-[0.875rem] transition hover:text-(color:--on) lg:hidden", children: [_jsx(ArrowLeft, { className: "size-4" }), " ", t("setup.back")] }), _jsxs("div", { className: "relative", children: [panel.figure ? (_jsx("div", { "aria-hidden": "true", className: "absolute top-6 right-2 z-10", children: panel.figure })) : null, _jsxs("div", { className: "min-h-[6.5rem]", children: [_jsx(Stages, { name: panel.name, at: panel.stage, done: panel.works }), _jsx("h2", { className: cn("mt-2 animate-rise font-display font-semibold text-[clamp(28px,3vw,40px)] leading-[1.06] tracking-[-0.03em]", panel.figure ? "pr-32" : ""), children: panel.heading }, panel.heading)] }), _jsx("div", { className: "mt-5 rounded-2xl bg-(color:--panel) p-5 ring-(color:--panel-ring) ring-1 sm:p-6", children: panel.content }), panel.footer ? _jsx("div", { className: "mt-9", children: panel.footer }) : null] })] }, selected)) : null] })] }));
|
|
94
|
+
}
|
|
95
|
+
/** Said once the test worked, above the way on. */
|
|
96
|
+
export function SetupReady() {
|
|
97
|
+
const t = useText();
|
|
98
|
+
return (_jsxs("p", { className: "mb-3 flex animate-rise items-center gap-2 font-medium text-[0.9375rem]", style: { color: STEP_DONE }, children: [_jsx(Check, { className: "size-4", strokeWidth: 3 }), t("setup.ready")] }));
|
|
99
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type SetupText, type SetupVars } from "../texts.js";
|
|
3
|
+
import type { TerminalEvent } from "../types.js";
|
|
4
|
+
/** What the setup's parts need of the app that shows them. Paths are below the setup's routes. */
|
|
5
|
+
export interface SetupHostApi {
|
|
6
|
+
lang: "en" | "de";
|
|
7
|
+
post<T>(path: string, body?: unknown): Promise<T>;
|
|
8
|
+
put<T>(path: string, body: unknown): Promise<T>;
|
|
9
|
+
del(path: string): Promise<unknown>;
|
|
10
|
+
/** Follows a terminal until its end; the answer stops following. */
|
|
11
|
+
follow(terminal: string, on: (event: TerminalEvent) => void): () => void;
|
|
12
|
+
/** Opens a page in the person's own browser. */
|
|
13
|
+
open(url: string): void;
|
|
14
|
+
/** Something changed: a client was looked at again, a test worked, a key was kept. */
|
|
15
|
+
changed(): unknown;
|
|
16
|
+
}
|
|
17
|
+
export declare function SetupProvider({ host, children }: {
|
|
18
|
+
host: SetupHostApi;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
export declare function useSetupHost(): SetupHostApi;
|
|
22
|
+
/** The setup's words in the host's language. */
|
|
23
|
+
export declare function useText(): (key: SetupText, vars?: SetupVars) => string;
|
|
24
|
+
/** A call the person starts: whether it runs, what came of it. A newer call replaces an older one. */
|
|
25
|
+
export declare function useCall<A extends unknown[], T>(call: (...args: A) => Promise<T>): {
|
|
26
|
+
busy: boolean;
|
|
27
|
+
data?: T;
|
|
28
|
+
error?: string;
|
|
29
|
+
run: (...args: A) => Promise<T | undefined>;
|
|
30
|
+
reset: () => void;
|
|
31
|
+
};
|