@engenty/wizards-runtime 0.12.2 → 0.14.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/apps/runtime/dist/agents/architect.js +8 -7
- package/apps/runtime/dist/agents/goose-connections.js +82 -0
- package/apps/runtime/dist/agents/space-agent.js +9 -2
- package/apps/runtime/dist/agents/studio-assistant.js +126 -71
- package/apps/runtime/dist/agents/website.js +1 -1
- package/apps/runtime/dist/app.js +28 -3
- package/apps/runtime/dist/assistant/knows.js +6 -5
- package/apps/runtime/dist/authoring/guide.js +25 -5
- package/apps/runtime/dist/broker/account.js +166 -0
- package/apps/runtime/dist/broker/call.js +417 -0
- package/apps/runtime/dist/broker/caller.js +10 -0
- package/apps/runtime/dist/broker/grant.js +152 -0
- package/apps/runtime/dist/broker/host.js +51 -0
- package/apps/runtime/dist/broker/index.js +8 -0
- package/apps/runtime/dist/broker/kept.js +31 -0
- package/apps/runtime/dist/broker/log.js +240 -0
- package/apps/runtime/dist/broker/registry.js +9 -0
- package/apps/runtime/dist/broker/rwx.js +367 -0
- package/apps/runtime/dist/broker/send.js +189 -0
- package/apps/runtime/dist/connectors/builtin.js +1 -1
- package/apps/runtime/dist/connectors/external.js +38 -37
- package/apps/runtime/dist/connectors/index.js +30 -91
- package/apps/runtime/dist/connectors/mail.js +0 -8
- package/apps/runtime/dist/connectors/person-sign-ins.js +73 -0
- package/apps/runtime/dist/connectors/plugin-connections.js +65 -92
- package/apps/runtime/dist/connectors/smtp.js +1 -1
- package/apps/runtime/dist/connectors/space-connections.js +436 -0
- package/apps/runtime/dist/credits/estimate.js +3 -3
- package/apps/runtime/dist/db/adopt.js +3 -3
- package/apps/runtime/dist/db/client.js +9 -0
- package/apps/runtime/dist/db/live-triggers.js +65 -23
- package/apps/runtime/dist/db/migrations/tenant/0027_work_chats.sql +52 -0
- package/apps/runtime/dist/db/migrations/tenant/0028_chat_approvals.sql +17 -0
- package/apps/runtime/dist/db/migrations/tenant/0029_work_chats_live.sql +49 -0
- package/apps/runtime/dist/db/migrations/tenant/0031_space.sql +624 -0
- package/apps/runtime/dist/db/migrations/tenant/0032_rwx_rule.sql +18 -0
- package/apps/runtime/dist/db/migrations/tenant/0033_broker_log.sql +23 -0
- package/apps/runtime/dist/db/migrations/tenant/0034_space_connection.sql +35 -0
- package/apps/runtime/dist/db/migrations/tenant/0035_run_grant.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/0036_approval_held_for.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/0037_ways_out.sql +5 -0
- package/apps/runtime/dist/db/migrations/tenant/0038_heard.sql +11 -0
- package/apps/runtime/dist/db/migrations/tenant/0039_members_studio.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0027_snapshot.json +383 -155
- package/apps/runtime/dist/db/migrations/tenant/meta/0028_snapshot.json +4468 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0029_snapshot.json +4475 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0030_snapshot.json +4629 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0031_snapshot.json +4629 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0032_snapshot.json +4757 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0033_snapshot.json +5039 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0034_snapshot.json +5022 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0035_snapshot.json +5029 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0036_snapshot.json +5037 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0037_snapshot.json +5076 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0038_snapshot.json +5145 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0039_snapshot.json +5153 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +86 -2
- package/apps/runtime/dist/db/schema.js +295 -72
- package/apps/runtime/dist/docs/dev/architecture.md +215 -0
- package/apps/runtime/dist/docs/dev/broker.md +298 -0
- package/apps/runtime/dist/docs/dev/index.md +5 -1
- package/apps/runtime/dist/docs/dev/integration/index.md +2 -0
- package/apps/runtime/dist/docs/dev/meta.json +3 -0
- package/apps/runtime/dist/docs/dev/plugins/connections.md +8 -5
- package/apps/runtime/dist/docs/dev/plugins/events.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/examples.md +1 -0
- package/apps/runtime/dist/docs/dev/plugins/index.md +2 -2
- package/apps/runtime/dist/docs/dev/plugins/reference.md +3 -2
- package/apps/runtime/dist/docs/dev/plugins/space.md +16 -6
- package/apps/runtime/dist/docs/dev/plugins/studio.md +2 -2
- package/apps/runtime/dist/docs/dev/plugins/tools.md +0 -1
- package/apps/runtime/dist/docs/dev/skills.md +16 -9
- package/apps/runtime/dist/docs/dev/wizard-format/agent-steps.md +59 -6
- package/apps/runtime/dist/docs/dev/wizard-format/lists-and-connections.md +17 -2
- package/apps/runtime/dist/docs/dev/wizard-format/templates.md +2 -0
- package/apps/runtime/dist/docs/dev/wizard-format/views-and-widgets.md +22 -2
- package/apps/runtime/dist/docs/user-guide/capabilities.md +132 -0
- package/apps/runtime/dist/docs/user-guide/cloud-sync.md +2 -0
- package/apps/runtime/dist/docs/user-guide/command-line.md +1 -0
- package/apps/runtime/dist/docs/user-guide/connectors.md +63 -7
- package/apps/runtime/dist/docs/user-guide/index.md +10 -1
- package/apps/runtime/dist/docs/user-guide/meta.json +6 -1
- package/apps/runtime/dist/docs/user-guide/models.md +105 -30
- package/apps/runtime/dist/docs/user-guide/protocol.md +80 -0
- package/apps/runtime/dist/docs/user-guide/skills.md +8 -4
- package/apps/runtime/dist/docs/user-guide/space.md +5 -4
- package/apps/runtime/dist/docs/user-guide/together.md +29 -2
- package/apps/runtime/dist/docs/user-guide/troubleshooting.md +2 -2
- package/apps/runtime/dist/docs/user-guide/work-mode.md +128 -0
- package/apps/runtime/dist/engenty/connections-external/build-connector.js +2 -5
- package/apps/runtime/dist/engenty/connections-external/importer/classify.js +72 -0
- package/apps/runtime/dist/engenty/connections-google/connectors/gmail.js +1 -1
- package/apps/runtime/dist/engenty/connections-microsoft/outlook.js +3 -2
- package/apps/runtime/dist/engenty/connections-sdk/types.js +2 -0
- package/apps/runtime/dist/engenty/connections-slack/connector.js +2 -1
- package/apps/runtime/dist/engine/decide.js +1 -1
- package/apps/runtime/dist/engine/requirements.js +139 -11
- package/apps/runtime/dist/engine/resources.js +43 -12
- package/apps/runtime/dist/engine/runner.js +121 -27
- package/apps/runtime/dist/engine/steps.js +42 -16
- package/apps/runtime/dist/engine/template.js +35 -1
- package/apps/runtime/dist/env.js +9 -4
- package/apps/runtime/dist/index.js +18 -2
- package/apps/runtime/dist/link-preview.js +9 -0
- package/apps/runtime/dist/live/feed.js +2 -2
- package/apps/runtime/dist/live/origin.js +2 -2
- package/apps/runtime/dist/live/views.js +51 -26
- package/apps/runtime/dist/manage.js +32 -0
- package/apps/runtime/dist/mcp/flow-app.js +1 -1
- package/apps/runtime/dist/mcp/handler.js +55 -1
- package/apps/runtime/dist/mcp/seen.js +47 -0
- package/apps/runtime/dist/mcp/tools.js +75 -34
- package/apps/runtime/dist/models.js +203 -12
- package/apps/runtime/dist/motion-graphics/project.js +8 -8
- package/apps/runtime/dist/motion-graphics/step.js +2 -2
- package/apps/runtime/dist/motion-graphics/tools.js +1 -1
- package/apps/runtime/dist/plugins/events.js +2 -2
- package/apps/runtime/dist/plugins/jobs.js +4 -1
- package/apps/runtime/dist/plugins/loader.js +2 -2
- package/apps/runtime/dist/prompts/architect.md +3 -3
- package/apps/runtime/dist/prompts/authoring.md +46 -12
- package/apps/runtime/dist/prompts/goose.md +14 -13
- package/apps/runtime/dist/prompts/mcp.md +6 -6
- package/apps/runtime/dist/prompts/safety.md +18 -0
- package/apps/runtime/dist/prompts/services.md +4 -4
- package/apps/runtime/dist/prompts/step.md +3 -3
- package/apps/runtime/dist/prompts/tools.md +39 -10
- package/apps/runtime/dist/routes/api.js +31 -20
- package/apps/runtime/dist/routes/broker.js +316 -0
- package/apps/runtime/dist/routes/connections.js +71 -0
- package/apps/runtime/dist/routes/delivery.js +25 -0
- package/apps/runtime/dist/routes/discover.js +17 -0
- package/apps/runtime/dist/routes/live.js +11 -1
- package/apps/runtime/dist/routes/marketplace.js +3 -3
- package/apps/runtime/dist/routes/person.js +4 -1
- package/apps/runtime/dist/routes/plugins.js +3 -1
- package/apps/runtime/dist/routes/rules.js +26 -0
- package/apps/runtime/dist/routes/runs.js +59 -33
- package/apps/runtime/dist/routes/skills.js +6 -6
- package/apps/runtime/dist/routes/studio.js +256 -148
- package/apps/runtime/dist/routes/work.js +199 -0
- package/apps/runtime/dist/safety.js +60 -18
- package/apps/runtime/dist/sandbox/index.js +27 -0
- package/apps/runtime/dist/services/access.js +38 -17
- package/apps/runtime/dist/services/api.js +38 -13
- package/apps/runtime/dist/services/architect.js +3 -3
- package/apps/runtime/dist/services/assistant-chats.js +9 -1
- package/apps/runtime/dist/services/brand.js +12 -12
- package/apps/runtime/dist/services/broker-bell.js +69 -0
- package/apps/runtime/dist/services/broker-notify.js +127 -0
- package/apps/runtime/dist/services/client-steps.js +79 -0
- package/apps/runtime/dist/services/cloud.js +42 -42
- package/apps/runtime/dist/services/command-risk.js +51 -0
- package/apps/runtime/dist/services/discover.js +85 -0
- package/apps/runtime/dist/services/knowledge-model.js +13 -13
- package/apps/runtime/dist/services/knowledge.js +117 -80
- package/apps/runtime/dist/services/manage-reports.js +77 -7
- package/apps/runtime/dist/services/marketplace.js +7 -31
- package/apps/runtime/dist/services/members-studio.js +165 -0
- package/apps/runtime/dist/services/onboarding.js +22 -22
- package/apps/runtime/dist/services/package-file.js +1 -1
- package/apps/runtime/dist/services/package.js +22 -22
- package/apps/runtime/dist/services/pages.js +13 -9
- package/apps/runtime/dist/services/runs.js +4 -3
- package/apps/runtime/dist/services/seen.js +55 -0
- package/apps/runtime/dist/services/shares.js +28 -13
- package/apps/runtime/dist/services/site.js +23 -23
- package/apps/runtime/dist/services/skills-registry.js +15 -15
- package/apps/runtime/dist/services/skills.js +44 -44
- package/apps/runtime/dist/services/space-categories.js +35 -35
- package/apps/runtime/dist/services/space-data.js +130 -111
- package/apps/runtime/dist/services/{project-files.js → space-files.js} +84 -75
- package/apps/runtime/dist/services/{project-index.js → space-index.js} +116 -73
- package/apps/runtime/dist/services/space-origin.js +19 -11
- package/apps/runtime/dist/services/spaces.js +478 -598
- package/apps/runtime/dist/services/synced-spaces.js +668 -0
- package/apps/runtime/dist/services/themes.js +15 -15
- package/apps/runtime/dist/services/widgets.js +6 -6
- package/apps/runtime/dist/services/wizards.js +112 -38
- package/apps/runtime/dist/services/work-ai.js +257 -0
- package/apps/runtime/dist/services/work-approvals.js +104 -0
- package/apps/runtime/dist/services/work-chats.js +908 -0
- package/apps/runtime/dist/services/work-connections.js +90 -0
- package/apps/runtime/dist/services/work-files.js +85 -0
- package/apps/runtime/dist/services/work-mastra.js +73 -0
- package/apps/runtime/dist/services/work-sandbox.js +42 -0
- package/apps/runtime/dist/sharing/files.js +14 -4
- package/apps/runtime/dist/sharing/index.js +40 -39
- package/apps/runtime/dist/sharing/jobs.js +67 -17
- package/apps/runtime/dist/sharing/targets/connector.js +10 -6
- package/apps/runtime/dist/sharing/targets/email.js +10 -8
- package/apps/runtime/dist/sharing/targets/slack.js +10 -8
- package/apps/runtime/dist/sharing/targets/storage.js +6 -4
- package/apps/runtime/dist/store/index.js +14 -3
- package/apps/runtime/dist/store/shared-lists.js +4 -2
- package/apps/runtime/dist/sync/apply.js +2 -2
- package/apps/runtime/dist/sync/client.js +113 -113
- package/apps/runtime/dist/sync/hub.js +41 -41
- package/apps/runtime/dist/sync/log.js +12 -12
- package/apps/runtime/dist/sync/records.js +118 -120
- package/apps/runtime/dist/texts.js +44 -2
- package/apps/runtime/dist/tools/connections.js +112 -0
- package/apps/runtime/dist/tools/connector.js +157 -67
- package/apps/runtime/dist/tools/index.js +31 -15
- package/apps/runtime/dist/tools/mail.js +40 -11
- package/apps/runtime/dist/tools/pages.js +11 -5
- package/apps/runtime/dist/tools/plugin.js +43 -7
- package/apps/runtime/dist/tools/skills.js +1 -1
- package/apps/runtime/dist/tools/{project.js → space.js} +30 -25
- package/apps/runtime/dist/tools/store.js +3 -2
- package/apps/runtime/dist/widgets/step.js +10 -10
- package/apps/web/dist/assets/AboutDialog-DgfeipUc.js +1 -0
- package/apps/web/dist/assets/CapabilitiesPage-BoYJvgIu.js +2 -0
- package/apps/web/dist/assets/{ChangelogDialog-CKLgFL6r.js → ChangelogDialog-Duab4zTO.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-B3nto_26.js → CodeEditor-nxoOt8ge.js} +1 -1
- package/apps/web/dist/assets/EditorPage-ZrgGpYMC.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-zJCtixSi.js → FlowPreview-aMfwcPul.js} +1 -1
- package/apps/web/dist/assets/LangSwitch-DpD0inR4.js +1 -0
- package/apps/web/dist/assets/Marketplace-CpzD9pNQ.js +2 -0
- package/apps/web/dist/assets/NewWizardChannels-IB18afWN.js +1 -0
- package/apps/web/dist/assets/NewWizardPage-rYbcmPGG.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-ztHT01ah.js +1 -0
- package/apps/web/dist/assets/PreviewPane-DviWTLfi.js +9 -0
- package/apps/web/dist/assets/PublicRunner-C2geZhhM.js +1 -0
- package/apps/web/dist/assets/ReadOnly-kSb_Kbdm.js +1 -0
- package/apps/web/dist/assets/SettingsPage-DM2h8N0J.js +2 -0
- package/apps/web/dist/assets/SetupPage-Wfyz6xH4.js +1 -0
- package/apps/web/dist/assets/SharePage-CyWQorWB.js +1 -0
- package/apps/web/dist/assets/SkillEditor-CqQMg2MC.js +1 -0
- package/apps/web/dist/assets/Skills-CnhpgoOA.js +9 -0
- package/apps/web/dist/assets/SpacePage-q4Bk3N7k.js +2 -0
- package/apps/web/dist/assets/UpdateCheck-C2CE6CC3.js +2 -0
- package/apps/web/dist/assets/changelog-B6hN1Cp7.js +1 -0
- package/apps/web/dist/assets/circle-alert-C8Ma-bPY.js +1 -0
- package/apps/web/dist/assets/circle-check-Bu9Z3mlJ.js +1 -0
- package/apps/web/dist/assets/code-editor-CfTGqOpp.js +2 -0
- package/apps/web/dist/assets/{code-xml-Hx7YxCg0.js → code-xml-B4kLFZSj.js} +1 -1
- package/apps/web/dist/assets/connection-sign-in-CIiv0t2p.js +1 -0
- package/apps/web/dist/assets/esm-Xwn4GtqG.js +7 -0
- package/apps/web/dist/assets/{eye-BkMFLnYu.js → eye-BpoKpIdt.js} +1 -1
- package/apps/web/dist/assets/host-BrP-ENHg.css +1 -0
- package/apps/web/dist/assets/host-DJ7-p0Sc.js +118 -0
- package/apps/web/dist/assets/i18n-BJ7Ld6O6.js +55 -0
- package/apps/web/dist/assets/index-D18DvnxX.css +1 -0
- package/apps/web/dist/assets/index-D2akynS-.js +10 -0
- package/apps/web/dist/assets/logo-BpnjXTRy.js +1 -0
- package/apps/web/dist/assets/oss-credits-IdX5bc71.js +1 -0
- package/apps/web/dist/assets/{phone-DMfwuh9V.js → phone-Ctvf-Am-.js} +1 -1
- package/apps/web/dist/assets/read-aloud-Da_RSm2S.js +1 -0
- package/apps/web/dist/assets/{runners-D5qz6b_s.js → runners-CyIvJIHr.js} +1 -1
- package/apps/web/dist/assets/scroll-text-ChrjRu9Y.js +1 -0
- package/apps/web/dist/assets/session-SXPtTWRK.js +2 -0
- package/apps/web/dist/assets/theme-CbTcTFWy.js +11 -0
- package/apps/web/dist/assets/ui-Uqnx1UpK.js +82 -0
- package/apps/web/dist/assets/{upload-DQJwLSGj.js → upload-BchUnQGV.js} +1 -1
- package/apps/web/dist/assets/{useMutation-C20c2EH3.js → useMutation-DEkZhp5c.js} +1 -1
- package/apps/web/dist/assets/{volume-2-CC5qamYT.js → volume-2-CU_oy81Z.js} +1 -1
- package/apps/web/dist/assets/with-selector-CoMyWBAX.js +1 -0
- package/apps/web/dist/index.html +17 -10
- package/apps/web/dist/mcp/flow.html +119 -64
- package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +20 -10
- package/node_modules/@engenty/wizards-shared/dist/assistant.d.ts +7 -1
- package/node_modules/@engenty/wizards-shared/dist/assistant.js +11 -1
- package/node_modules/@engenty/wizards-shared/dist/connectors.d.ts +236 -2
- package/node_modules/@engenty/wizards-shared/dist/connectors.js +52 -2
- package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +257 -8
- package/node_modules/@engenty/wizards-shared/dist/definition.js +113 -15
- package/node_modules/@engenty/wizards-shared/dist/discover.d.ts +21 -0
- package/node_modules/@engenty/wizards-shared/dist/discover.js +1 -0
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +38 -2
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +38 -2
- package/node_modules/@engenty/wizards-shared/dist/fit.js +1 -1
- package/node_modules/@engenty/wizards-shared/dist/json-schema.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/json-schema.js +1 -1
- package/node_modules/@engenty/wizards-shared/dist/live.d.ts +2 -2
- package/node_modules/@engenty/wizards-shared/dist/live.js +1 -1
- package/node_modules/@engenty/wizards-shared/dist/marketplace.d.ts +0 -5
- package/node_modules/@engenty/wizards-shared/dist/marketplace.js +3 -1
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +115 -6
- package/node_modules/@engenty/wizards-shared/dist/run.js +135 -0
- package/node_modules/@engenty/wizards-shared/dist/runner-texts.d.ts +15 -1
- package/node_modules/@engenty/wizards-shared/dist/runner-texts.js +14 -0
- package/node_modules/@engenty/wizards-shared/dist/rwx.d.ts +42 -0
- package/node_modules/@engenty/wizards-shared/dist/rwx.js +29 -0
- package/node_modules/@engenty/wizards-shared/dist/skills.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/space-data.d.ts +2 -2
- package/node_modules/@engenty/wizards-shared/dist/{projects.d.ts → spaces.d.ts} +39 -15
- package/node_modules/@engenty/wizards-shared/dist/{projects.js → spaces.js} +16 -9
- package/node_modules/@engenty/wizards-shared/dist/store.d.ts +7 -2
- package/node_modules/@engenty/wizards-shared/dist/surface.d.ts +35 -4
- package/node_modules/@engenty/wizards-shared/dist/surface.js +121 -3
- package/node_modules/@engenty/wizards-shared/dist/sync.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/theme-look.js +1 -1
- package/node_modules/@engenty/wizards-shared/dist/tiers.d.ts +195 -0
- package/node_modules/@engenty/wizards-shared/dist/tiers.js +98 -0
- package/node_modules/@engenty/wizards-shared/dist/wizard-package.d.ts +2 -2
- package/node_modules/@engenty/wizards-shared/dist/wizard-package.js +3 -3
- package/package.json +4 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/plugin/skills/build-wizard/SKILL.md +1 -1
- package/apps/runtime/dist/services/projects.js +0 -473
- package/apps/web/dist/assets/AboutDialog-CLgnoYTI.js +0 -1
- package/apps/web/dist/assets/EditorPage-D9JDdAAI.js +0 -3
- package/apps/web/dist/assets/Marketplace-D4e0Oac9.js +0 -2
- package/apps/web/dist/assets/NewWizardChannels-B4N7GIYh.js +0 -1
- package/apps/web/dist/assets/NewWizardPage-Dpt0Mzk8.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-CDoYVjRC.js +0 -1
- package/apps/web/dist/assets/PreviewPane-DPB5nEd5.js +0 -10
- package/apps/web/dist/assets/ProjectPage-408YOoNa.js +0 -10
- package/apps/web/dist/assets/PublicRunner-BZ66xdRX.js +0 -1
- package/apps/web/dist/assets/ReadOnly-C9oGMkUB.js +0 -1
- package/apps/web/dist/assets/SettingsPage-Dq3AZwJS.js +0 -2
- package/apps/web/dist/assets/SetupPage-CP3lbyZc.js +0 -1
- package/apps/web/dist/assets/SharePage-DdMm1Y8K.js +0 -1
- package/apps/web/dist/assets/SkillEditor-b5NMFB90.js +0 -1
- package/apps/web/dist/assets/changelog-82-DHogQ.js +0 -1
- package/apps/web/dist/assets/esm-BdxDT9Km.js +0 -7
- package/apps/web/dist/assets/i18n-CKKh3Pn0.js +0 -55
- package/apps/web/dist/assets/index-Cy2NHzAx.js +0 -49
- package/apps/web/dist/assets/index-wR_-1hfN.css +0 -1
- package/apps/web/dist/assets/lock-CGXM95Mi.js +0 -1
- package/apps/web/dist/assets/logo-CGNoptDg.js +0 -1
- package/apps/web/dist/assets/oss-credits-DpRWUPjD.js +0 -1
- package/apps/web/dist/assets/session-DRy0k0nh.js +0 -2
- package/apps/web/dist/assets/theme-DNPm6r4e.js +0 -11
- package/apps/web/dist/assets/ui-CwFQAfE-.js +0 -83
- /package/apps/runtime/dist/db/migrations/tenant/{0027_space_skill.sql → 0030_space_skill.sql} +0 -0
|
@@ -13,15 +13,26 @@ import { type ObjectShape } from "./shape.js";
|
|
|
13
13
|
* path without a leading slash reads the row ("name"), one with a slash the whole data. A path
|
|
14
14
|
* may turn what it reads into words: `map` looks the value up (`{ "true": "im Kühlschrank" }`),
|
|
15
15
|
* `format` sets it into a text ("{} Min").
|
|
16
|
+
*
|
|
17
|
+
* A chat's view (Work, `show_view`) may also ask: a `Form` of `Field`s, a `Ref` to a thing of the
|
|
18
|
+
* space, a Button that asks the AI. A wizard asks on its pages, so its views take none of them.
|
|
16
19
|
*/
|
|
17
|
-
export declare const SURFACE_COMPONENTS: readonly ["Column", "Text", "List", "Row", "DetailGrid", "Badge", "Grid", "Metric", "Table", "Image", "BarChart", "LineChart", "DonutChart", "Actions", "Button", "Tabs", "Card", "Fold", "Group", "Chips", "Checklist", "Steps", "Link", "Callout"];
|
|
20
|
+
export declare const SURFACE_COMPONENTS: readonly ["Column", "Text", "List", "Row", "DetailGrid", "Badge", "Grid", "Metric", "Table", "Image", "BarChart", "LineChart", "DonutChart", "Actions", "Button", "Tabs", "Card", "Fold", "Group", "Chips", "Checklist", "Steps", "Link", "Callout", "Markdown", "Sources", "File", "Video", "Audio", "Gallery", "Ref", "Form", "Field"];
|
|
18
21
|
export type SurfaceComponentName = (typeof SURFACE_COMPONENTS)[number];
|
|
19
|
-
|
|
22
|
+
/**
|
|
23
|
+
* The kinds of a Field, the runner's own field kinds (definition.ts FIELD_KINDS) that need
|
|
24
|
+
* nothing of a run: no kept list, connection, line items or free slots.
|
|
25
|
+
*/
|
|
26
|
+
export declare const FORM_FIELD_KINDS: readonly ["text", "textarea", "number", "select", "multiselect", "date", "email", "url", "toggle", "color", "image", "file", "location", "audio", "signature"];
|
|
27
|
+
export type FormFieldKind = (typeof FORM_FIELD_KINDS)[number];
|
|
28
|
+
/** `ask` (a chat's view only): the person asks the AI the button's `prompt`, or its label. */
|
|
29
|
+
export declare const SURFACE_ACTIONS: readonly ["regenerate", "open", "ask"];
|
|
20
30
|
/** One component: its id, its kind, its children (ids, or a template repeated over an array). */
|
|
21
31
|
export declare const surfaceComponentSchema: z.ZodObject<{
|
|
22
32
|
id: z.ZodString;
|
|
23
33
|
component: z.ZodEnum<{
|
|
24
34
|
Actions: "Actions";
|
|
35
|
+
Audio: "Audio";
|
|
25
36
|
Badge: "Badge";
|
|
26
37
|
BarChart: "BarChart";
|
|
27
38
|
Button: "Button";
|
|
@@ -32,19 +43,27 @@ export declare const surfaceComponentSchema: z.ZodObject<{
|
|
|
32
43
|
Column: "Column";
|
|
33
44
|
DetailGrid: "DetailGrid";
|
|
34
45
|
DonutChart: "DonutChart";
|
|
46
|
+
Field: "Field";
|
|
47
|
+
File: "File";
|
|
35
48
|
Fold: "Fold";
|
|
49
|
+
Form: "Form";
|
|
50
|
+
Gallery: "Gallery";
|
|
36
51
|
Grid: "Grid";
|
|
37
52
|
Group: "Group";
|
|
38
53
|
Image: "Image";
|
|
39
54
|
LineChart: "LineChart";
|
|
40
55
|
Link: "Link";
|
|
41
56
|
List: "List";
|
|
57
|
+
Markdown: "Markdown";
|
|
42
58
|
Metric: "Metric";
|
|
59
|
+
Ref: "Ref";
|
|
43
60
|
Row: "Row";
|
|
61
|
+
Sources: "Sources";
|
|
44
62
|
Steps: "Steps";
|
|
45
63
|
Table: "Table";
|
|
46
64
|
Tabs: "Tabs";
|
|
47
65
|
Text: "Text";
|
|
66
|
+
Video: "Video";
|
|
48
67
|
}>;
|
|
49
68
|
children: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
50
69
|
path: z.ZodString;
|
|
@@ -56,6 +75,7 @@ export declare const surfaceComponentsSchema: z.ZodArray<z.ZodObject<{
|
|
|
56
75
|
id: z.ZodString;
|
|
57
76
|
component: z.ZodEnum<{
|
|
58
77
|
Actions: "Actions";
|
|
78
|
+
Audio: "Audio";
|
|
59
79
|
Badge: "Badge";
|
|
60
80
|
BarChart: "BarChart";
|
|
61
81
|
Button: "Button";
|
|
@@ -66,19 +86,27 @@ export declare const surfaceComponentsSchema: z.ZodArray<z.ZodObject<{
|
|
|
66
86
|
Column: "Column";
|
|
67
87
|
DetailGrid: "DetailGrid";
|
|
68
88
|
DonutChart: "DonutChart";
|
|
89
|
+
Field: "Field";
|
|
90
|
+
File: "File";
|
|
69
91
|
Fold: "Fold";
|
|
92
|
+
Form: "Form";
|
|
93
|
+
Gallery: "Gallery";
|
|
70
94
|
Grid: "Grid";
|
|
71
95
|
Group: "Group";
|
|
72
96
|
Image: "Image";
|
|
73
97
|
LineChart: "LineChart";
|
|
74
98
|
Link: "Link";
|
|
75
99
|
List: "List";
|
|
100
|
+
Markdown: "Markdown";
|
|
76
101
|
Metric: "Metric";
|
|
102
|
+
Ref: "Ref";
|
|
77
103
|
Row: "Row";
|
|
104
|
+
Sources: "Sources";
|
|
78
105
|
Steps: "Steps";
|
|
79
106
|
Table: "Table";
|
|
80
107
|
Tabs: "Tabs";
|
|
81
108
|
Text: "Text";
|
|
109
|
+
Video: "Video";
|
|
82
110
|
}>;
|
|
83
111
|
children: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodObject<{
|
|
84
112
|
path: z.ZodString;
|
|
@@ -96,9 +124,12 @@ export interface SurfaceIssue {
|
|
|
96
124
|
/**
|
|
97
125
|
* What can be wrong with a surface: an unknown or missing component, no root, a child that is
|
|
98
126
|
* not there, an id twice, a loop, a prop missing, and — given the data keys a run will provide,
|
|
99
|
-
* or the step's schema — a path into data nothing provides.
|
|
127
|
+
* or the step's schema — a path into data nothing provides. `chat`: a chat's view, which may ask
|
|
128
|
+
* (one Form, its Fields, Refs, `ask`).
|
|
100
129
|
*/
|
|
101
|
-
export declare function validateSurface(raw: unknown, data?: string[] | ObjectShape
|
|
130
|
+
export declare function validateSurface(raw: unknown, data?: string[] | ObjectShape, options?: {
|
|
131
|
+
chat?: boolean;
|
|
132
|
+
}): SurfaceIssue[];
|
|
102
133
|
/** A JSON pointer into data: "/suppliers/0/name". */
|
|
103
134
|
export declare function pointer(data: unknown, path: string): unknown;
|
|
104
135
|
/**
|
|
@@ -14,6 +14,9 @@ import { shapeAt } from "./shape.js";
|
|
|
14
14
|
* path without a leading slash reads the row ("name"), one with a slash the whole data. A path
|
|
15
15
|
* may turn what it reads into words: `map` looks the value up (`{ "true": "im Kühlschrank" }`),
|
|
16
16
|
* `format` sets it into a text ("{} Min").
|
|
17
|
+
*
|
|
18
|
+
* A chat's view (Work, `show_view`) may also ask: a `Form` of `Field`s, a `Ref` to a thing of the
|
|
19
|
+
* space, a Button that asks the AI. A wizard asks on its pages, so its views take none of them.
|
|
17
20
|
*/
|
|
18
21
|
export const SURFACE_COMPONENTS = [
|
|
19
22
|
"Column",
|
|
@@ -40,6 +43,15 @@ export const SURFACE_COMPONENTS = [
|
|
|
40
43
|
"Steps",
|
|
41
44
|
"Link",
|
|
42
45
|
"Callout",
|
|
46
|
+
"Markdown",
|
|
47
|
+
"Sources",
|
|
48
|
+
"File",
|
|
49
|
+
"Video",
|
|
50
|
+
"Audio",
|
|
51
|
+
"Gallery",
|
|
52
|
+
"Ref",
|
|
53
|
+
"Form",
|
|
54
|
+
"Field",
|
|
43
55
|
];
|
|
44
56
|
/** Components that hold others by id. */
|
|
45
57
|
const CONTAINERS = new Set([
|
|
@@ -50,7 +62,31 @@ const CONTAINERS = new Set([
|
|
|
50
62
|
"Card",
|
|
51
63
|
"Fold",
|
|
52
64
|
"Group",
|
|
65
|
+
"Form",
|
|
53
66
|
]);
|
|
67
|
+
/** Only a chat's view has these: a wizard asks on its pages, and its run has no space to open. */
|
|
68
|
+
const CHAT_ONLY = new Set(["Form", "Field", "Ref"]);
|
|
69
|
+
/**
|
|
70
|
+
* The kinds of a Field, the runner's own field kinds (definition.ts FIELD_KINDS) that need
|
|
71
|
+
* nothing of a run: no kept list, connection, line items or free slots.
|
|
72
|
+
*/
|
|
73
|
+
export const FORM_FIELD_KINDS = [
|
|
74
|
+
"text",
|
|
75
|
+
"textarea",
|
|
76
|
+
"number",
|
|
77
|
+
"select",
|
|
78
|
+
"multiselect",
|
|
79
|
+
"date",
|
|
80
|
+
"email",
|
|
81
|
+
"url",
|
|
82
|
+
"toggle",
|
|
83
|
+
"color",
|
|
84
|
+
"image",
|
|
85
|
+
"file",
|
|
86
|
+
"location",
|
|
87
|
+
"audio",
|
|
88
|
+
"signature",
|
|
89
|
+
];
|
|
54
90
|
/** The props each component needs. */
|
|
55
91
|
const REQUIRED = {
|
|
56
92
|
Text: ["text"],
|
|
@@ -73,8 +109,18 @@ const REQUIRED = {
|
|
|
73
109
|
Steps: ["items"],
|
|
74
110
|
Link: ["title", "items", "value", "view"],
|
|
75
111
|
Callout: ["text"],
|
|
112
|
+
Markdown: ["text"],
|
|
113
|
+
Sources: ["items"],
|
|
114
|
+
File: ["file"],
|
|
115
|
+
Video: ["src"],
|
|
116
|
+
Audio: ["src"],
|
|
117
|
+
Gallery: ["items"],
|
|
118
|
+
Ref: ["title", "open"],
|
|
119
|
+
Form: ["children", "submit"],
|
|
120
|
+
Field: ["name", "kind", "label"],
|
|
76
121
|
};
|
|
77
|
-
|
|
122
|
+
/** `ask` (a chat's view only): the person asks the AI the button's `prompt`, or its label. */
|
|
123
|
+
export const SURFACE_ACTIONS = ["regenerate", "open", "ask"];
|
|
78
124
|
const id = z.string().regex(/^[a-zA-Z][a-zA-Z0-9_-]{0,40}$/, "ids are letters, digits, _ and -");
|
|
79
125
|
/** One component: its id, its kind, its children (ids, or a template repeated over an array). */
|
|
80
126
|
export const surfaceComponentSchema = z.looseObject({
|
|
@@ -135,6 +181,10 @@ const ENTRY_KEYS = [
|
|
|
135
181
|
"groupKey",
|
|
136
182
|
"textKey",
|
|
137
183
|
"minutesKey",
|
|
184
|
+
"srcKey",
|
|
185
|
+
"captionKey",
|
|
186
|
+
"titleKey",
|
|
187
|
+
"urlKey",
|
|
138
188
|
];
|
|
139
189
|
/** A path as parts: "/days/0/label" from the data, "meals.slot" from the entry. */
|
|
140
190
|
const partsOf = (path) => (path.startsWith("/") ? path.slice(1) : path)
|
|
@@ -288,9 +338,10 @@ function shapeIssues(byId, root) {
|
|
|
288
338
|
/**
|
|
289
339
|
* What can be wrong with a surface: an unknown or missing component, no root, a child that is
|
|
290
340
|
* not there, an id twice, a loop, a prop missing, and — given the data keys a run will provide,
|
|
291
|
-
* or the step's schema — a path into data nothing provides.
|
|
341
|
+
* or the step's schema — a path into data nothing provides. `chat`: a chat's view, which may ask
|
|
342
|
+
* (one Form, its Fields, Refs, `ask`).
|
|
292
343
|
*/
|
|
293
|
-
export function validateSurface(raw, data) {
|
|
344
|
+
export function validateSurface(raw, data, options = {}) {
|
|
294
345
|
const dataKeys = Array.isArray(data) ? data : undefined;
|
|
295
346
|
const parsed = surfaceComponentsSchema.safeParse(raw);
|
|
296
347
|
if (!parsed.success) {
|
|
@@ -308,6 +359,7 @@ export function validateSurface(raw, data) {
|
|
|
308
359
|
if (!byId.has("root")) {
|
|
309
360
|
issues.push({ message: 'A surface has a component with id "root".' });
|
|
310
361
|
}
|
|
362
|
+
issues.push(...askIssues(components, byId, Boolean(options.chat)));
|
|
311
363
|
for (const c of components) {
|
|
312
364
|
for (const prop of REQUIRED[c.component] ?? []) {
|
|
313
365
|
if (c[prop] === undefined) {
|
|
@@ -370,6 +422,72 @@ export function validateSurface(raw, data) {
|
|
|
370
422
|
}
|
|
371
423
|
return data && !Array.isArray(data) ? [...issues, ...shapeIssues(byId, data)] : issues;
|
|
372
424
|
}
|
|
425
|
+
/** What a view may ask, and how: a chat's only, one Form, its Fields in it and named once. */
|
|
426
|
+
function askIssues(components, byId, chat) {
|
|
427
|
+
const issues = [];
|
|
428
|
+
if (!chat) {
|
|
429
|
+
for (const c of components) {
|
|
430
|
+
if (CHAT_ONLY.has(c.component)) {
|
|
431
|
+
issues.push({
|
|
432
|
+
message: `${c.component} "${c.id}" is for a chat's view; a wizard asks on its pages.`,
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
if (c.action === "ask") {
|
|
436
|
+
issues.push({ message: `"${c.id}": "ask" is for a chat's view.` });
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
return issues;
|
|
440
|
+
}
|
|
441
|
+
const forms = components.filter((c) => c.component === "Form");
|
|
442
|
+
if (forms.length > 1) {
|
|
443
|
+
issues.push({ message: "A view holds at most one Form." });
|
|
444
|
+
}
|
|
445
|
+
const inForm = new Set();
|
|
446
|
+
for (const form of forms) {
|
|
447
|
+
const kids = Array.isArray(form.children) ? form.children : [];
|
|
448
|
+
if (!Array.isArray(form.children)) {
|
|
449
|
+
issues.push({ message: `Form "${form.id}" names its Fields: children [ids].` });
|
|
450
|
+
}
|
|
451
|
+
const names = new Set();
|
|
452
|
+
for (const kid of kids) {
|
|
453
|
+
const field = byId.get(kid);
|
|
454
|
+
if (field && field.component !== "Field") {
|
|
455
|
+
issues.push({ message: `Form "${form.id}" holds Fields only, not ${field.component}.` });
|
|
456
|
+
}
|
|
457
|
+
inForm.add(kid);
|
|
458
|
+
const name = field?.name;
|
|
459
|
+
if (typeof name === "string") {
|
|
460
|
+
if (names.has(name)) {
|
|
461
|
+
issues.push({ message: `Form "${form.id}" names the field "${name}" twice.` });
|
|
462
|
+
}
|
|
463
|
+
names.add(name);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
for (const c of components) {
|
|
468
|
+
if (c.component !== "Field") {
|
|
469
|
+
continue;
|
|
470
|
+
}
|
|
471
|
+
const f = c;
|
|
472
|
+
if (!inForm.has(c.id)) {
|
|
473
|
+
issues.push({ message: `Field "${c.id}" sits in a Form.` });
|
|
474
|
+
}
|
|
475
|
+
if (typeof f.kind === "string" && !FORM_FIELD_KINDS.includes(f.kind)) {
|
|
476
|
+
issues.push({
|
|
477
|
+
message: `Field "${c.id}": kind is one of ${FORM_FIELD_KINDS.join(", ")}.`,
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
const options = f.options;
|
|
481
|
+
if ((f.kind === "select" || f.kind === "multiselect") &&
|
|
482
|
+
!(Array.isArray(options) && options.length && options.every((o) => typeof o === "string"))) {
|
|
483
|
+
issues.push({ message: `Field "${c.id}" (${f.kind}) needs "options": [texts].` });
|
|
484
|
+
}
|
|
485
|
+
if (typeof f.name === "string" && !/^[a-zA-Z][a-zA-Z0-9_]{0,40}$/.test(f.name)) {
|
|
486
|
+
issues.push({ message: `Field "${c.id}": name is letters, digits and _.` });
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
return issues;
|
|
490
|
+
}
|
|
373
491
|
/** A JSON pointer into data: "/suppliers/0/name". */
|
|
374
492
|
export function pointer(data, path) {
|
|
375
493
|
let at = data;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { luminance } from "./
|
|
1
|
+
import { luminance } from "./spaces.js";
|
|
2
2
|
import { BUILT_IN_THEMES, SHIPPED_FONTS, themeColors, themeOffered, } from "./theme.js";
|
|
3
3
|
// --- the look of a run ---------------------------------------------------------------------
|
|
4
4
|
// Which theme a wizard's pages show and how they look with it: the theme over the space's
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model tiers: the managed model lists of an organization with compliance needs, and how its
|
|
3
|
+
* admins share out the tier's models (its policy). The Manage-App serves both in
|
|
4
|
+
* `GET /v1/tenants/:id` and enforces them in its gateway (docs/manage-contract.md, "Model
|
|
5
|
+
* tiers"); the runtime shows them and names the class a step asks for. Behind `modelTiers`.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { type Effort, type Maker, type StepClass } from "./definition.js";
|
|
9
|
+
/** What a call is for: a run, the studio outside a run (Goose, the editor), a work chat. */
|
|
10
|
+
export type Purpose = "wizard" | "assistant" | "work";
|
|
11
|
+
/** Why a class is not offered in a tier. */
|
|
12
|
+
type TierReason = "unbound" | "region" | "retention" | "training" | "maker";
|
|
13
|
+
/** What a class (`high`, `anthropic/high`, `image`) runs on in a tier, or why it doesn't. */
|
|
14
|
+
export type TierClass = {
|
|
15
|
+
model: string;
|
|
16
|
+
name: string;
|
|
17
|
+
route: string | null;
|
|
18
|
+
region: string | null;
|
|
19
|
+
} | {
|
|
20
|
+
model: null;
|
|
21
|
+
name: string | null;
|
|
22
|
+
reason: TierReason;
|
|
23
|
+
};
|
|
24
|
+
/** A model the tier offers (`tier.models`): in its list and passing its rules now. */
|
|
25
|
+
export interface TierModel {
|
|
26
|
+
/** The catalog id: "anthropic/claude-sonnet-5.5". */
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
maker: string;
|
|
30
|
+
kind: "text" | "image" | "video" | "audio" | "speech";
|
|
31
|
+
/** The offered classes it runs on now: "standard", "anthropic/standard". */
|
|
32
|
+
classes: string[];
|
|
33
|
+
/** The efforts it takes; empty for none. */
|
|
34
|
+
efforts: Effort[];
|
|
35
|
+
/** In the tier's preselection: what the studio's choosers show after Auto. */
|
|
36
|
+
chooser: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface ModelTier {
|
|
39
|
+
id: string;
|
|
40
|
+
/** Shown in the studio: "EU Private". */
|
|
41
|
+
name: string;
|
|
42
|
+
/** Set by contract: the organization's owner can't pick another. */
|
|
43
|
+
locked: boolean;
|
|
44
|
+
rules: {
|
|
45
|
+
/** Where calls may run ("EU"); null: anywhere. */
|
|
46
|
+
regions: string[] | null;
|
|
47
|
+
zdr: boolean;
|
|
48
|
+
noTraining: boolean;
|
|
49
|
+
search: boolean;
|
|
50
|
+
/** An evaluation model may answer decisions. */
|
|
51
|
+
decisions: boolean;
|
|
52
|
+
};
|
|
53
|
+
/** Every class the gateway knows; one missing is not offered. */
|
|
54
|
+
classes: Record<string, TierClass>;
|
|
55
|
+
/** What the tier offers, the preselection first. */
|
|
56
|
+
models: TierModel[];
|
|
57
|
+
/** Every tier there is, in order, and whether the plan offers it. */
|
|
58
|
+
choices: {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
inPlan: boolean;
|
|
62
|
+
}[];
|
|
63
|
+
}
|
|
64
|
+
export interface PurposePolicy {
|
|
65
|
+
/** Way C: the classes and models people may pick; null: the whole tier. */
|
|
66
|
+
models: string[] | null;
|
|
67
|
+
/** Way B: the class or model a new step or chat starts on. */
|
|
68
|
+
default: string | null;
|
|
69
|
+
/** Way B: the highest effort people may set. */
|
|
70
|
+
effortCap: Effort | null;
|
|
71
|
+
/** Way C: the efforts offered per entry of `models`. */
|
|
72
|
+
efforts: Record<string, Effort[]> | null;
|
|
73
|
+
}
|
|
74
|
+
export interface ModelPolicy {
|
|
75
|
+
/** A: engenty picks · B: admins set defaults · C: approved models only. */
|
|
76
|
+
way: "A" | "B" | "C";
|
|
77
|
+
purposes: Record<Purpose, PurposePolicy>;
|
|
78
|
+
credits: boolean;
|
|
79
|
+
ownKeys: boolean;
|
|
80
|
+
/** A member's AI client on their own subscription, for Goose. */
|
|
81
|
+
subscriptions: boolean;
|
|
82
|
+
/** A model on a member's computer, for Goose. */
|
|
83
|
+
localModels: boolean;
|
|
84
|
+
/** Apps connected to a space over MCP: those with local models, those on subscriptions. */
|
|
85
|
+
apps: {
|
|
86
|
+
local: boolean;
|
|
87
|
+
subscriptions: boolean;
|
|
88
|
+
};
|
|
89
|
+
masking: boolean;
|
|
90
|
+
/** What else to mask, in the admins' words; saved, it turns into `maskLabels`. */
|
|
91
|
+
maskInstructions: string;
|
|
92
|
+
/** What the masking detector looks for besides personal data: `company`, `project name`. */
|
|
93
|
+
maskLabels: string[];
|
|
94
|
+
}
|
|
95
|
+
/** Masking instructions and the labels they turn into, as the Manage-App takes them. */
|
|
96
|
+
export declare const MAX_MASK_INSTRUCTIONS = 1000;
|
|
97
|
+
export declare const MAX_MASK_LABELS = 20;
|
|
98
|
+
export declare const MAX_MASK_LABEL_CHARS = 60;
|
|
99
|
+
/** The makers by company name, as a tier leaves one out: "EU Sovereign leaves out Anthropic". */
|
|
100
|
+
export declare const MAKER_COMPANIES: Record<Maker, string>;
|
|
101
|
+
/** The makers by their models' name, as a maker class reads: "Claude · High". */
|
|
102
|
+
export declare const MAKER_FAMILIES: Record<Maker, string>;
|
|
103
|
+
/** A tier's class id split: `anthropic/high` → maker and class; `video` → no maker. */
|
|
104
|
+
export declare function splitClassId(id: string): {
|
|
105
|
+
maker: Maker | null;
|
|
106
|
+
cls: string;
|
|
107
|
+
};
|
|
108
|
+
/** The class a pick of a model asks for: a maker class first, so it follows the tier's binding. */
|
|
109
|
+
export declare function pickClassOf(classes: string[]): string | null;
|
|
110
|
+
/**
|
|
111
|
+
* A pick of a chooser as the class a step or chat asks for: a class id as it is, a model id of
|
|
112
|
+
* `tier.models` as the class it runs on. Null where it is neither a level people pick (`low`,
|
|
113
|
+
* `standard`, `high`) nor a maker class the maker has.
|
|
114
|
+
*/
|
|
115
|
+
export declare function pickedClass(tier: ModelTier, id: string): {
|
|
116
|
+
maker: Maker | null;
|
|
117
|
+
cls: StepClass;
|
|
118
|
+
} | null;
|
|
119
|
+
/**
|
|
120
|
+
* What a call for a tier's class asks the gateway for (docs/manage-contract.md, "Model tiers"):
|
|
121
|
+
* the class, or the model it runs on where the purpose's way-C list approves that model and not
|
|
122
|
+
* the class.
|
|
123
|
+
*/
|
|
124
|
+
export declare function policyEntry(tier: ModelTier, policy: ModelPolicy | null, purpose: Purpose, classId: string): string;
|
|
125
|
+
/** Why a call was refused by the gateway for the organization's tier or policy. */
|
|
126
|
+
export type TierRefusalType = "outside_tier" | "not_in_policy";
|
|
127
|
+
/**
|
|
128
|
+
* A policy as the studio's admins save it, checked for its shape only: the Manage-App checks it
|
|
129
|
+
* against the plan and the tier and keeps what the way uses. The masking fields left out stay
|
|
130
|
+
* as saved.
|
|
131
|
+
*/
|
|
132
|
+
export declare const modelPolicySchema: z.ZodObject<{
|
|
133
|
+
way: z.ZodEnum<{
|
|
134
|
+
A: "A";
|
|
135
|
+
B: "B";
|
|
136
|
+
C: "C";
|
|
137
|
+
}>;
|
|
138
|
+
purposes: z.ZodObject<{
|
|
139
|
+
wizard: z.ZodObject<{
|
|
140
|
+
models: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
141
|
+
default: z.ZodNullable<z.ZodString>;
|
|
142
|
+
effortCap: z.ZodNullable<z.ZodEnum<{
|
|
143
|
+
high: "high";
|
|
144
|
+
low: "low";
|
|
145
|
+
medium: "medium";
|
|
146
|
+
}>>;
|
|
147
|
+
efforts: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEnum<{
|
|
148
|
+
high: "high";
|
|
149
|
+
low: "low";
|
|
150
|
+
medium: "medium";
|
|
151
|
+
}>>>>;
|
|
152
|
+
}, z.core.$strip>;
|
|
153
|
+
assistant: z.ZodObject<{
|
|
154
|
+
models: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
155
|
+
default: z.ZodNullable<z.ZodString>;
|
|
156
|
+
effortCap: z.ZodNullable<z.ZodEnum<{
|
|
157
|
+
high: "high";
|
|
158
|
+
low: "low";
|
|
159
|
+
medium: "medium";
|
|
160
|
+
}>>;
|
|
161
|
+
efforts: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEnum<{
|
|
162
|
+
high: "high";
|
|
163
|
+
low: "low";
|
|
164
|
+
medium: "medium";
|
|
165
|
+
}>>>>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
work: z.ZodObject<{
|
|
168
|
+
models: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
169
|
+
default: z.ZodNullable<z.ZodString>;
|
|
170
|
+
effortCap: z.ZodNullable<z.ZodEnum<{
|
|
171
|
+
high: "high";
|
|
172
|
+
low: "low";
|
|
173
|
+
medium: "medium";
|
|
174
|
+
}>>;
|
|
175
|
+
efforts: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodEnum<{
|
|
176
|
+
high: "high";
|
|
177
|
+
low: "low";
|
|
178
|
+
medium: "medium";
|
|
179
|
+
}>>>>;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
credits: z.ZodBoolean;
|
|
183
|
+
ownKeys: z.ZodBoolean;
|
|
184
|
+
subscriptions: z.ZodBoolean;
|
|
185
|
+
localModels: z.ZodBoolean;
|
|
186
|
+
apps: z.ZodObject<{
|
|
187
|
+
local: z.ZodBoolean;
|
|
188
|
+
subscriptions: z.ZodBoolean;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
masking: z.ZodBoolean;
|
|
191
|
+
maskInstructions: z.ZodOptional<z.ZodString>;
|
|
192
|
+
maskLabels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
export type ModelPolicyInput = z.infer<typeof modelPolicySchema>;
|
|
195
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model tiers: the managed model lists of an organization with compliance needs, and how its
|
|
3
|
+
* admins share out the tier's models (its policy). The Manage-App serves both in
|
|
4
|
+
* `GET /v1/tenants/:id` and enforces them in its gateway (docs/manage-contract.md, "Model
|
|
5
|
+
* tiers"); the runtime shows them and names the class a step asks for. Behind `modelTiers`.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { EFFORTS, MAKER_CLASSES, MAKERS, } from "./definition.js";
|
|
9
|
+
/** Masking instructions and the labels they turn into, as the Manage-App takes them. */
|
|
10
|
+
export const MAX_MASK_INSTRUCTIONS = 1000;
|
|
11
|
+
export const MAX_MASK_LABELS = 20;
|
|
12
|
+
export const MAX_MASK_LABEL_CHARS = 60;
|
|
13
|
+
/** The makers by company name, as a tier leaves one out: "EU Sovereign leaves out Anthropic". */
|
|
14
|
+
export const MAKER_COMPANIES = {
|
|
15
|
+
anthropic: "Anthropic",
|
|
16
|
+
openai: "OpenAI",
|
|
17
|
+
google: "Google",
|
|
18
|
+
mistral: "Mistral AI",
|
|
19
|
+
};
|
|
20
|
+
/** The makers by their models' name, as a maker class reads: "Claude · High". */
|
|
21
|
+
export const MAKER_FAMILIES = {
|
|
22
|
+
anthropic: "Claude",
|
|
23
|
+
openai: "GPT",
|
|
24
|
+
google: "Gemini",
|
|
25
|
+
mistral: "Mistral",
|
|
26
|
+
};
|
|
27
|
+
/** A tier's class id split: `anthropic/high` → maker and class; `video` → no maker. */
|
|
28
|
+
export function splitClassId(id) {
|
|
29
|
+
const [maker, cls] = id.split("/");
|
|
30
|
+
return cls && MAKERS.includes(maker)
|
|
31
|
+
? { maker: maker, cls }
|
|
32
|
+
: { maker: null, cls: id };
|
|
33
|
+
}
|
|
34
|
+
const LEVELS = ["low", "standard", "high", "highest"];
|
|
35
|
+
/** The class a pick of a model asks for: a maker class first, so it follows the tier's binding. */
|
|
36
|
+
export function pickClassOf(classes) {
|
|
37
|
+
const picked = classes.filter((id) => LEVELS.includes(splitClassId(id).cls));
|
|
38
|
+
return picked.find((id) => splitClassId(id).maker) ?? picked[0] ?? null;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A pick of a chooser as the class a step or chat asks for: a class id as it is, a model id of
|
|
42
|
+
* `tier.models` as the class it runs on. Null where it is neither a level people pick (`low`,
|
|
43
|
+
* `standard`, `high`) nor a maker class the maker has.
|
|
44
|
+
*/
|
|
45
|
+
export function pickedClass(tier, id) {
|
|
46
|
+
const model = tier.models.find((m) => m.id === id);
|
|
47
|
+
const classId = model ? pickClassOf(model.classes) : id;
|
|
48
|
+
if (!classId) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const { maker, cls } = splitClassId(classId);
|
|
52
|
+
if (!LEVELS.includes(cls)) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
// `highest` exists only as a maker class.
|
|
56
|
+
const fits = maker ? MAKER_CLASSES[maker].includes(cls) : cls !== "highest";
|
|
57
|
+
return fits ? { maker, cls: cls } : null;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* What a call for a tier's class asks the gateway for (docs/manage-contract.md, "Model tiers"):
|
|
61
|
+
* the class, or the model it runs on where the purpose's way-C list approves that model and not
|
|
62
|
+
* the class.
|
|
63
|
+
*/
|
|
64
|
+
export function policyEntry(tier, policy, purpose, classId) {
|
|
65
|
+
const list = policy?.way === "C" ? policy.purposes[purpose].models : null;
|
|
66
|
+
const model = tier.classes[classId]?.model;
|
|
67
|
+
return list && !list.includes(classId) && model && list.includes(model) ? model : classId;
|
|
68
|
+
}
|
|
69
|
+
const purposePolicySchema = z.object({
|
|
70
|
+
models: z.array(z.string().min(1).max(200)).max(100).nullable(),
|
|
71
|
+
default: z.string().min(1).max(200).nullable(),
|
|
72
|
+
effortCap: z.enum(EFFORTS).nullable(),
|
|
73
|
+
efforts: z.record(z.string(), z.array(z.enum(EFFORTS)).min(1)).nullable(),
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* A policy as the studio's admins save it, checked for its shape only: the Manage-App checks it
|
|
77
|
+
* against the plan and the tier and keeps what the way uses. The masking fields left out stay
|
|
78
|
+
* as saved.
|
|
79
|
+
*/
|
|
80
|
+
export const modelPolicySchema = z.object({
|
|
81
|
+
way: z.enum(["A", "B", "C"]),
|
|
82
|
+
purposes: z.object({
|
|
83
|
+
wizard: purposePolicySchema,
|
|
84
|
+
assistant: purposePolicySchema,
|
|
85
|
+
work: purposePolicySchema,
|
|
86
|
+
}),
|
|
87
|
+
credits: z.boolean(),
|
|
88
|
+
ownKeys: z.boolean(),
|
|
89
|
+
subscriptions: z.boolean(),
|
|
90
|
+
localModels: z.boolean(),
|
|
91
|
+
apps: z.object({ local: z.boolean(), subscriptions: z.boolean() }),
|
|
92
|
+
masking: z.boolean(),
|
|
93
|
+
maskInstructions: z.string().max(MAX_MASK_INSTRUCTIONS).optional(),
|
|
94
|
+
maskLabels: z
|
|
95
|
+
.array(z.string().trim().min(1).max(MAX_MASK_LABEL_CHARS))
|
|
96
|
+
.max(MAX_MASK_LABELS)
|
|
97
|
+
.optional(),
|
|
98
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/**
|
|
3
3
|
* A wizard as a file, `<title>.wizard`: a zip with `wizard.json` — the definition and what it
|
|
4
|
-
* needs from its
|
|
5
|
-
* accounts) and to the
|
|
4
|
+
* needs from its space, with the space's themes it names — and the workspace under `files/`. What belongs to people (runs, lists, connected
|
|
5
|
+
* accounts) and to the space (brand, credentials) stays where it is.
|
|
6
6
|
*/
|
|
7
7
|
export declare const PACKAGE_FORMAT = "engenty-wizard";
|
|
8
8
|
export declare const PACKAGE_MANIFEST = "wizard.json";
|
|
@@ -4,8 +4,8 @@ import { DEFINITION_VERSION } from "./definition.js";
|
|
|
4
4
|
import { MAX_WIZARD_THEMES, themeSchema } from "./theme.js";
|
|
5
5
|
/**
|
|
6
6
|
* A wizard as a file, `<title>.wizard`: a zip with `wizard.json` — the definition and what it
|
|
7
|
-
* needs from its
|
|
8
|
-
* accounts) and to the
|
|
7
|
+
* needs from its space, with the space's themes it names — and the workspace under `files/`. What belongs to people (runs, lists, connected
|
|
8
|
+
* accounts) and to the space (brand, credentials) stays where it is.
|
|
9
9
|
*/
|
|
10
10
|
export const PACKAGE_FORMAT = "engenty-wizard";
|
|
11
11
|
export const PACKAGE_MANIFEST = "wizard.json";
|
|
@@ -45,6 +45,6 @@ export const manifestSchema = z.object({
|
|
|
45
45
|
.default([]),
|
|
46
46
|
/** The space's themes the wizard names: a wizard file ships its looks with it. */
|
|
47
47
|
themes: z.array(themeSchema).max(MAX_WIZARD_THEMES).default([]),
|
|
48
|
-
/** The
|
|
48
|
+
/** The space's pages under `files/knowledge/`, when they were asked for: how many, and whether the cap cut some. */
|
|
49
49
|
knowledge: z.object({ pages: z.number().int(), truncated: z.boolean() }).optional(),
|
|
50
50
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@engenty/wizards-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Make a wish. Get your wizard. It guides you step by step. Let AI do the work. Runs on your machine, on the AI subscription you already have. The runtime, which `npx wizards` installs.",
|
|
5
5
|
"license": "FSL-1.1-MIT AND CC-BY-4.0",
|
|
6
6
|
"homepage": "https://engenty.ai",
|
|
@@ -51,8 +51,11 @@
|
|
|
51
51
|
"@hono/node-server": "2.1.3",
|
|
52
52
|
"@libsql/client": "0.18.0",
|
|
53
53
|
"@lydell/node-pty": "1.1.0",
|
|
54
|
+
"@mastra/ai-sdk": "1.11.2",
|
|
54
55
|
"@mastra/core": "1.80.0",
|
|
55
56
|
"@mastra/docker": "0.12.1",
|
|
57
|
+
"@mastra/libsql": "1.27.1",
|
|
58
|
+
"@mastra/memory": "1.39.1",
|
|
56
59
|
"@mastra/quickjs": "0.1.5",
|
|
57
60
|
"@modelcontextprotocol/client": "2.3.0",
|
|
58
61
|
"@modelcontextprotocol/ext-apps": "2.0.3",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wizards",
|
|
3
3
|
"displayName": "engenty wizards",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"description": "Build page-by-page AI wizards that people open on a shared link — designed, tested and published from Claude Code — run your published ones in the chat, and keep them in a pane beside it.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "engenty"
|
package/plugin/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "engenty-wizards",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"description": "Build page-by-page AI wizards that people open on a shared link, test and publish them from the chat, and run your published ones here.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "engenty",
|