@engenty/wizards-runtime 0.9.2 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +34 -39
  2. package/apps/runtime/dist/assistant/docs.js +1 -1
  3. package/apps/runtime/dist/assistant/primer.js +2 -2
  4. package/apps/runtime/dist/db/migrations/tenant/0020_project_page.sql +1 -0
  5. package/apps/runtime/dist/db/migrations/tenant/meta/0020_snapshot.json +3475 -0
  6. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
  7. package/apps/runtime/dist/db/schema.js +2 -0
  8. package/apps/runtime/dist/docs/dev/api.md +1 -1
  9. package/apps/runtime/dist/docs/dev/integration/channels.md +4 -4
  10. package/apps/runtime/dist/docs/dev/integration/claude-code-plugin.md +1 -1
  11. package/apps/runtime/dist/docs/dev/integration/embed.md +1 -1
  12. package/apps/runtime/dist/docs/dev/integration/index.md +2 -3
  13. package/apps/runtime/dist/docs/dev/integration/link-and-share.md +1 -1
  14. package/apps/runtime/dist/docs/dev/integration/mcp-apps.md +1 -1
  15. package/apps/runtime/dist/docs/dev/integration/mcp.md +1 -1
  16. package/apps/runtime/dist/docs/dev/integration/meta.json +0 -1
  17. package/apps/runtime/dist/docs/dev/integration/openui.md +7 -3
  18. package/apps/runtime/dist/docs/dev/integration/results.md +1 -3
  19. package/apps/runtime/dist/docs/dev/plugins/routes.md +1 -1
  20. package/apps/runtime/dist/docs/dev/wizard-format/themes.md +2 -2
  21. package/apps/runtime/dist/docs/dev/wizard-format/validate.md +1 -1
  22. package/apps/runtime/dist/docs/meta.json +1 -1
  23. package/apps/runtime/dist/docs/{user → user-guide}/ai-apps.md +4 -5
  24. package/apps/runtime/dist/docs/{user → user-guide}/build-a-wizard.md +42 -37
  25. package/apps/runtime/dist/docs/{user → user-guide}/command-line.md +9 -8
  26. package/apps/runtime/dist/docs/{user → user-guide}/connectors.md +6 -6
  27. package/apps/runtime/dist/docs/{user → user-guide}/create-account.md +10 -11
  28. package/apps/runtime/dist/docs/{user → user-guide}/data.md +5 -5
  29. package/apps/runtime/dist/docs/{user → user-guide}/first-start.md +5 -5
  30. package/apps/runtime/dist/docs/{user → user-guide}/index.md +3 -3
  31. package/apps/runtime/dist/docs/{user → user-guide}/install.md +21 -25
  32. package/apps/runtime/dist/docs/{user → user-guide}/local-only.md +5 -6
  33. package/apps/runtime/dist/docs/{user → user-guide}/meta.json +0 -2
  34. package/apps/runtime/dist/docs/{user → user-guide}/models.md +13 -22
  35. package/apps/runtime/dist/docs/{user → user-guide}/plugins.md +2 -2
  36. package/apps/runtime/dist/docs/{user → user-guide}/run.md +21 -36
  37. package/apps/runtime/dist/docs/{user → user-guide}/server.md +1 -1
  38. package/apps/runtime/dist/docs/{user → user-guide}/space.md +17 -27
  39. package/apps/runtime/dist/docs/{user → user-guide}/steps.md +22 -34
  40. package/apps/runtime/dist/docs/{user → user-guide}/test-and-share.md +35 -76
  41. package/apps/runtime/dist/docs/{user → user-guide}/troubleshooting.md +3 -4
  42. package/apps/runtime/dist/engine/runner.js +7 -4
  43. package/apps/runtime/dist/manage.js +7 -0
  44. package/apps/runtime/dist/routes/runs.js +26 -0
  45. package/apps/runtime/dist/routes/studio.js +21 -2
  46. package/apps/runtime/dist/services/brand.js +20 -0
  47. package/apps/runtime/dist/services/errors.js +1 -0
  48. package/apps/runtime/dist/services/pages.js +262 -0
  49. package/apps/runtime/dist/services/projects.js +73 -2
  50. package/apps/runtime/dist/services/runners.js +12 -2
  51. package/apps/runtime/dist/services/runs.js +75 -1
  52. package/apps/runtime/dist/services/shipped-fonts.js +33 -0
  53. package/apps/runtime/dist/services/wizards.js +30 -1
  54. package/apps/web/dist/assets/AboutDialog-CsqUDxPv.js +1 -0
  55. package/apps/web/dist/assets/{ChangelogDialog-ClkjHGE_.js → ChangelogDialog-vV9nXOBV.js} +1 -1
  56. package/apps/web/dist/assets/EditorPage-CfmubDLB.js +4 -0
  57. package/apps/web/dist/assets/{FlowPreview-DZRkWedM.js → FlowPreview-DoBlokAp.js} +1 -1
  58. package/apps/web/dist/assets/{Harness-FiDeF3LX.js → Harness-GnlSI4-P.js} +2 -2
  59. package/apps/web/dist/assets/Marketplace-CYsq0K7A.js +2 -0
  60. package/apps/web/dist/assets/NewWizardChannels-DUS3dRCj.js +1 -0
  61. package/apps/web/dist/assets/NewWizardPage-Cm9ydfUW.js +7 -0
  62. package/apps/web/dist/assets/OnboardingPage-xI83C1V1.js +1 -0
  63. package/apps/web/dist/assets/PreviewPane-B-X0rChi.js +4 -0
  64. package/apps/web/dist/assets/ProjectPage-Bu6uD-Kb.js +1 -0
  65. package/apps/web/dist/assets/PublicRunner-BWBE74Kn.js +1 -0
  66. package/apps/web/dist/assets/{ReadOnly-I-Lm7a8y.js → ReadOnly-DKgWZ_1q.js} +1 -1
  67. package/apps/web/dist/assets/SettingsPage-B9euFl71.js +2 -0
  68. package/apps/web/dist/assets/SetupPage-C3XLbBTO.js +1 -0
  69. package/apps/web/dist/assets/SharePage-CSj1sAVS.js +1 -0
  70. package/apps/web/dist/assets/changelog-pnMcOVO_.js +1 -0
  71. package/apps/web/dist/assets/coins-D0MI0EKw.js +1 -0
  72. package/apps/web/dist/assets/esm-BdxDT9Km.js +7 -0
  73. package/apps/web/dist/assets/index-DtjKnB3s.css +1 -0
  74. package/apps/web/dist/assets/index-qc7o4bkp.js +14 -0
  75. package/apps/web/dist/assets/logo-CGNoptDg.js +1 -0
  76. package/apps/web/dist/assets/media-Cej-H610.js +1 -0
  77. package/apps/web/dist/assets/oss-credits-D7izqI_0.js +1 -0
  78. package/apps/web/dist/assets/{phone-BprN_SDS.js → phone-BZ-sPZr6.js} +1 -1
  79. package/apps/web/dist/assets/react-dom-hf6EcyAr.js +1 -0
  80. package/apps/web/dist/assets/runners-CED2yPuf.js +1 -0
  81. package/apps/web/dist/assets/session-DyndueX0.js +2 -0
  82. package/apps/web/dist/assets/settings-menu-C960R1kx.js +1 -0
  83. package/apps/web/dist/assets/theme-Zp5g-teI.js +11 -0
  84. package/apps/web/dist/assets/ui-DVkIZqDg.js +137 -0
  85. package/apps/web/dist/assets/{upload-Cvztyjuj.js → upload-HFTtsOaE.js} +1 -1
  86. package/apps/web/dist/assets/useMutation-D3zIOVOt.js +1 -0
  87. package/apps/web/dist/assets/volume-2-DazUIp6w.js +1 -0
  88. package/apps/web/dist/assets/{wrench-CWT9IGKq.js → wrench-BHe19Ol_.js} +1 -1
  89. package/apps/web/dist/index.html +11 -3
  90. package/apps/web/dist/mcp/flow.html +54 -54
  91. package/node_modules/@engenty/wizards/dist/plugin/studio.d.ts +3 -3
  92. package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +24 -0
  93. package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +24 -0
  94. package/node_modules/@engenty/wizards-shared/dist/projects.d.ts +36 -0
  95. package/node_modules/@engenty/wizards-shared/dist/projects.js +25 -0
  96. package/node_modules/@engenty/wizards-shared/dist/run.d.ts +3 -0
  97. package/node_modules/@engenty/wizards-shared/dist/run.js +6 -0
  98. package/node_modules/@engenty/wizards-shared/dist/theme.d.ts +7 -0
  99. package/node_modules/@engenty/wizards-shared/dist/theme.js +11 -0
  100. package/package.json +16 -3
  101. package/plugin/.claude-plugin/plugin.json +1 -1
  102. package/plugin/plugin.json +2 -2
  103. package/apps/runtime/dist/docs/dev/integration/wordpress.md +0 -10
  104. package/apps/runtime/dist/docs/user/assistant.md +0 -77
  105. package/apps/runtime/dist/docs/user/wordpress.md +0 -121
  106. package/apps/web/dist/assets/AboutDialog-BUdEn9X_.js +0 -1
  107. package/apps/web/dist/assets/EditorPage-j5HjqTMV.js +0 -4
  108. package/apps/web/dist/assets/NewWizardChannels-DeJP5h5I.js +0 -1
  109. package/apps/web/dist/assets/NewWizardPage-CIS3qNUz.js +0 -7
  110. package/apps/web/dist/assets/OnboardingPage-CoTYSubc.js +0 -1
  111. package/apps/web/dist/assets/ProjectPage-XVhe87S4.js +0 -1
  112. package/apps/web/dist/assets/PublicRunner-Bc-3e7UU.js +0 -1
  113. package/apps/web/dist/assets/RunDrawer-DXqyxTsm.js +0 -4
  114. package/apps/web/dist/assets/RunnerView-DeDApA-9.js +0 -1
  115. package/apps/web/dist/assets/SettingsPage-ChpDzJVn.js +0 -2
  116. package/apps/web/dist/assets/SetupPage-E5JoQMBM.js +0 -1
  117. package/apps/web/dist/assets/SharePage-DW1b2g9t.js +0 -1
  118. package/apps/web/dist/assets/changelog-DuSV2HiU.js +0 -1
  119. package/apps/web/dist/assets/esm-yMT-rSPa.js +0 -7
  120. package/apps/web/dist/assets/index-D9oqYYa8.css +0 -1
  121. package/apps/web/dist/assets/index-DfHH4icT.js +0 -14
  122. package/apps/web/dist/assets/oss-credits-6A3pxilr.js +0 -1
  123. package/apps/web/dist/assets/settings-menu-CVl54phq.js +0 -1
  124. package/apps/web/dist/assets/theme-DZZXa238.js +0 -11
  125. package/apps/web/dist/assets/ui-kIzOrA_W.js +0 -137
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  title: Test and share
3
3
  description: Try the wizard, publish it, and hand out its link or put it on a website.
4
- version: 0.9.0
4
+ version: 0.9.3
5
5
  ---
6
6
 
7
7
  ## Test
8
8
 
9
- “Test” in the editor starts a run of the draft, just as a person would see it. Test runs are
10
- listed under “Runs”. A test spends what a real run spends: your model’s usage, or credits. A test
9
+ “Test” in the preview’s bar starts a run of the draft, just as a person would see it, in the
10
+ preview. “Test run” at the start of the row of steps comes back to it after you looked at a step.
11
+ Test runs are listed under “Runs”. A test spends what a real run spends: your model’s usage, or credits. A test
11
12
  run reads the wizard’s memory, but it writes into a copy of its own, which goes with the run.
12
13
 
13
14
  Where runs spend credits, each AI step shows an estimate. At first it is a formula. After five
@@ -16,8 +17,8 @@ runs it is measured from the latest ones.
16
17
  ## Publish
17
18
 
18
19
  A wizard goes live the first time you share it. “Share” publishes the draft as version 1 as the
19
- dialog opens, and the dialog says “Published when you shared it”. Nobody has the link yet, and
20
- “Only you” under “Access” keeps it closed. A draft with issues is not published: the dialog lists
20
+ dialog opens, and the dialog says “Published when you shared it”. Nobody has the link until you hand it
21
+ out, and “Only you” under “Access” switches it off. A draft with issues is not published: the dialog lists
21
22
  what to fix first, with “Let the assistant fix it”.
22
23
 
23
24
  After that, the editor’s top bar shows “Publish changes” whenever the draft differs from the
@@ -39,7 +40,7 @@ the first share. The editor’s top bar and the wizard’s card on the start pag
39
40
  | “Live · 1 note” | It runs in the cloud, but one step does less there (see “Share”) |
40
41
  | “Local” | It is published on your computer without an account. The link only answers on this computer, while engenty wizards is running |
41
42
  | “On its way to the cloud” | The version hasn’t arrived on engenty.ai yet. The studio tries again by itself |
42
- | “Not in the cloud” | engenty.ai doesn’t run this version. “Share” says why and what helps |
43
+ | “Not in the cloud” | engenty.ai runs no version of it. “Share” says why and what helps. If an older version still runs there, the chip shows that version in amber with a crossed-out cloud |
43
44
 
44
45
  On a card, “Link” copies the address others can open, and the arrow opens it. A wizard that
45
46
  runs only on this computer has no address for others. Its “Link” says so and explains how an
@@ -52,77 +53,38 @@ The ⋯ menu on a card and in the editor has “Duplicate”, “Export as a wiz
52
53
 
53
54
  “Share” says who may open the wizard and how others reach it, and it copies the link.
54
55
 
56
+ ![The share dialog with numbered parts: Access, How others reach it, QR code, Website, Copy link and the settings gear. On this computer without an account, a box above offers “Sign in” and “Create account”](../../assets/guide-share.png)
57
+
55
58
  | Part | Does |
56
59
  |---|---|
57
- | Access | With “Anyone with the link”, anyone can open and fill it in, up to the runs a day set under “Settings”. “Only you” switches the link off: everyone else sees a notice, and you test in the studio |
58
- | How others reach it | The channels the wizard runs as (see below), grouped by kind: in the browser, on the phone, by message. A browser channel has its own link, and a message channel its keyword and number. Each row copies its own. “Change” lets you choose the channels, from the same list as for a new wizard |
59
- | QR code | One of the links as a QR code to download or print, and the wizard’s ID for the mobile app |
60
- | Website | The code for a website (see below). For WordPress, it offers the plugin, or the wizard as a package that runs without an account, with what it lacks there: see [WordPress](./wordpress.md#without-an-account) |
61
- | Copy link | The link people open. It opens the first browser channel, and the wizard offers the others on its first page |
62
- | Settings (the gear) | “Limit per day” (50 runs unless you change it, with what that costs at most), each message channel’s keyword, and “Create a new link”: the old link and its QR code stop working, in the cloud too |
63
-
64
- Where the draft has changes, the dialog says so at the top and leads to “Publish changes”.
60
+ | 1 · Access | With “Anyone with the link”, anyone can open and fill it in, up to the runs a day set under “Settings”. “Only you” switches the link off: everyone else sees a notice, and you test in the studio |
61
+ | 2 · How others reach it | The ways the wizard runs (see below). Each row copies its own link. “Change” lets you choose them, from the same list as for a new wizard |
62
+ | 3 · QR code | One of the links as a QR code to download or print |
63
+ | 4 · Website | The code for a website (see below) |
64
+ | 5 · Copy link | The link people open. It opens the first way that is on, and the wizard offers the other on its first page |
65
+ | 6 · Settings (the gear) | “Limit per day” (50 runs unless you change it, with what that costs at most), “Offer a translation” (a machine translation per language, which you can edit), and “Create a new link”: the old link and its QR code stop working, in the cloud too |
66
+
67
+ The picture is from a computer without an account: the box at the top offers “Sign in” and
68
+ “Create account”, and “Access” says “Only on this computer” (see
69
+ [Who can open the link](#who-can-open-the-link)). Where the draft has changes, the dialog says so
70
+ at the top and leads to “Publish changes”.
65
71
 
66
72
  One visitor can start 6 runs an hour.
67
73
 
68
- ### Channels
69
-
70
- A wizard can run page by page, as a chat, as a live conversation on top of the chat, or as a
71
- video call on a stage with the chat beside it. In a conversation or a call, the person talks,
72
- and the wizard talks back and sees the camera. For now, both need an OpenAI API key under
73
- Models. A plugin can add further ways, such as a kiosk page or a messenger.
74
+ ### Page by page or as a chat
74
75
 
75
- A wizard you start on the “New wizard” page runs step by step unless you choose more under “How
76
+ A wizard can run page by page or as a chat. A wizard you start on the “New wizard” page runs step by step unless you choose more under “How
76
77
  should it run?”. A wizard without its own choice, such as one from a template or an import, has
77
- the step-by-step page and the chat switched on. You can change the channels later under “Change”
78
- in the share dialog.
79
-
80
- Where a channel can’t take a step, the step goes to the wizard’s page. The person gets a link for
81
- a photo, a signature or a sign-in, and comes back afterwards. If nobody can hand a step off (for
82
- example, one that takes minutes on a channel that can’t wait), the row shows “Not possible: …”
83
- under the channel’s name. A channel that still needs something says so in its row:
84
-
85
- | The row says | What you can do |
86
- |---|---|
87
- | “Not set up yet” | “Set up” opens the channel’s settings inside the dialog. “Back” returns to the rows |
88
- | “Waiting” | Nothing for now. The channel is waiting for something, for example a number that was requested |
89
- | “Not in your plan” | “See {plan}” or “See the plans” shows the plan that has it |
78
+ the step-by-step page and the chat switched on. You can change that later under “Change” in the
79
+ share dialog.
90
80
 
91
- The cards on the start page show the channels that are on as small icons, the link’s channel
92
- first. Once wizards with two or more statuses are in the space, a row of pills above the cards
81
+ The cards on the start page show the ways that are on as small icons, the link’s own first. Once wizards with two or more statuses are in the space, a row of pills above the cards
93
82
  narrows them to one status: “Draft”, “Local”, “Live” or “Not in the cloud”.
94
83
 
95
- The link opens the first browser channel that is on. The others answer under their own address
96
- (`/steps`, `/chat`, `/talk` for live voice, `/video` for the video call) and are offered on the
97
- wizard’s first page, for example “Or: Chat”. An address that is switched off sends people to
84
+ The link opens the first way that is on. The other answers under its own address (`/steps` or
85
+ `/chat`) and is offered on the wizard’s first page, for example “Or: Chat”. An address that is switched off sends people to
98
86
  the link instead.
99
87
 
100
- ### WhatsApp, SMS and calls
101
-
102
- On engenty.ai a wizard can also run in a WhatsApp chat, by text message and as a phone call,
103
- where the team’s plan includes them. These channels are not part of the open source engenty
104
- wizards. On your computer, you get them through your account in the cloud.
105
-
106
- When you switch one on for a wizard, its row in the share dialog shows the number and the
107
- **keyword**. Whoever sends the keyword to the number starts the wizard. “Link” copies a link that
108
- writes the message, and the QR code view draws it. You change the keyword under “Settings”.
109
-
110
- - **WhatsApp**: one field per message, buttons for up to three choices and a list for more. The
111
- person sends a photo or a file in the chat, “send location” for a place, and a voice message
112
- for a text field. A free message can go out within 24 hours of the person’s last one. A wizard
113
- that finishes later reaches back with an approved template, or waits for the person’s next
114
- message.
115
- - **SMS**: text only. Choices come as numbered lines, answered with the number, and a place as a
116
- typed address. Long texts come as their gist, and every picture, document and the whole result
117
- as links.
118
- - **Calls**: the speech model talks, as the chat’s live voice does. It asks for one field at a
119
- time, reads out the choices and reads email addresses and numbers back. If several wizards are
120
- on for calls, the call first asks which one.
121
-
122
- What a channel can’t take (a signature or a sign-in, and by text or phone also a photo or a
123
- file) arrives as a link to the wizard’s page. The conversation goes on once it has been filled in
124
- there. “stop” ends a run in a chat, and the keyword starts a new one.
125
-
126
88
  ### Who can open the link
127
89
 
128
90
  engenty wizards on your computer only answers on `localhost`. The link works on that computer,
@@ -135,8 +97,7 @@ not for anyone else. To let others run the wizard:
135
97
 
136
98
  ### In the cloud
137
99
 
138
- Once you sign in to an account under Settings → Account, every version that goes live also
139
- arrives on engenty.ai. Your avatar then carries a small cloud, and its menu says “Connected to
100
+ Once you sign in to an account under Settings → Account, your avatar carries a small cloud, and its menu says “Connected to
140
101
  engenty.ai” with your credits. The share dialog gives the wizard’s address at engenty.ai, which
141
102
  stays the same when you publish again. Where the cloud doesn’t run this version, the dialog says
142
103
  so at the top:
@@ -148,7 +109,7 @@ so at the top:
148
109
 
149
110
  Without an account, the dialog says that the wizard runs only on this computer (“Only on this
150
111
  computer” under “Access”). It greys out the ways others reach it and offers “Sign in” and “Create
151
- account”. “Website” still gives you the WordPress package.
112
+ account”.
152
113
 
153
114
  What goes to the cloud and what stays:
154
115
 
@@ -156,8 +117,8 @@ What goes to the cloud and what stays:
156
117
  |---|---|
157
118
  | The published version and its files | Drafts and the chat with the assistant |
158
119
  | The space’s name, what it says about itself, its colours, facts and logo | Runs and results on your computer |
159
- | The space’s own tables and pages | What the wizards keep: their lists and notes |
160
- | How the link is shared: on or off, runs a day, channels | Connected accounts, keys, the space’s knowledge and its connected systems |
120
+ | The pages and tables of Knowledge, with their categories | What the wizards keep: their lists and notes |
121
+ | How the link is shared: on or off, runs a day, page or chat | Connected accounts, keys, the space’s documents and its connected systems |
161
122
 
162
123
  At engenty.ai/studio you see the space and its runs there. A small laptop icon marks the space,
163
124
  and a note says “You edit this space in engenty wizards on your computer.” The studio there
@@ -193,7 +154,9 @@ has both the step-by-step page and the chat on, you first choose what the websit
193
154
  <script async src="https://example.com/embed.js" data-wizard="TOKEN" data-mode="bubble" data-label="Questions?" data-text="A quote in 2 minutes"></script>
194
155
  ```
195
156
 
196
- The code only works once the wizard is published and open to anyone with the link. A chat in the
157
+ The dialog gives the code once the wizard is published, open to anyone with the link, and
158
+ reachable by others: on your computer that takes an account (see
159
+ [Who can open the link](#who-can-open-the-link)). Until then it says so instead. A chat in the
197
160
  page that is switched off for the wizard shows the step-by-step page instead. The chat button
198
161
  always opens the chat.
199
162
 
@@ -210,9 +173,6 @@ Your website’s own styles reach the button through the class `engenty-wizard-b
210
173
  button through `engenty-wizard-launcher` and the bubble through `engenty-wizard-bubble`. A page
211
174
  shows only one bubble: a second bubble tag does nothing.
212
175
 
213
- On WordPress the plugin writes this code for you, and its results show the page: see
214
- [WordPress](./wordpress.md).
215
-
216
176
  ## Results people share
217
177
 
218
178
  On the result page, a person can share what they got as a link. The result of a run over the
@@ -222,5 +182,4 @@ website: see [Share a result](./run.md#share-a-result).
222
182
 
223
183
  ## Move a wizard
224
184
 
225
- Export it as a wizard file (`.wizard`) from its ⋯ menu, and import it in another studio or in
226
- the WordPress plugin. See [Build a wizard](./build-a-wizard.md#take-it-with-you).
185
+ Export it as a wizard file (`.wizard`) from its ⋯ menu, and import it in another studio. See [Build a wizard](./build-a-wizard.md#take-it-with-you).
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: Troubleshooting
3
3
  description: What to do when a link no longer works, a client shows as not signed in, or an export fails.
4
- version: 0.5.0
4
+ version: 0.9.3
5
5
  ---
6
6
 
7
7
  `wizards doctor` checks engenty wizards on your computer and says what is wrong. Start there.
@@ -35,16 +35,15 @@ version: 0.5.0
35
35
 
36
36
  | What you see | What to do |
37
37
  |---|---|
38
- | PDF or PNG export, or a step on a website, fails | `wizards doctor` names the browser engenty wizards uses. Install Chrome, Edge or Chromium (on a Mac also Brave), or set `CHROME_PATH` to one; see [Settings](./command-line.md#settings) |
38
+ | PDF or PNG export, or a step on a website, fails | `wizards doctor` names the browser engenty wizards uses. Install Chrome, Edge or Chromium (on a Mac and on Windows also Brave), or set `CHROME_PATH` to one; see [Settings](./command-line.md#settings) |
39
39
  | A widget offers no video | Install ffmpeg, or set `FFMPEG_PATH` |
40
40
  | “This wizard isn’t available right now.” | The link is switched off, or the account the wizard runs on has no credits left. See [Test and share](./test-and-share.md) |
41
41
  | “This wizard has reached its limit for today. Try again tomorrow.” | The link’s runs for the day are used up; the day starts at midnight UTC. Raise “Limit per day” under Settings (the gear) in the share dialog |
42
42
  | “You’ve started a lot of runs just now. Try again in an hour.” | One visitor started more runs in an hour than the link allows (`LIMIT_VISITOR_RUNS_PER_HOUR`, see [Settings](./command-line.md#settings)) |
43
43
  | “This wizard doesn’t exist or was deleted.” | It is not published, or its link was replaced by a new one |
44
44
  | Others can’t open the link | engenty wizards on your computer answers on `localhost` only. See [who can open the link](./test-and-share.md#who-can-open-the-link) |
45
- | The chat has no phone button, or “Join” stays grey | A live conversation needs “Live voice” or “Video call” switched on for the wizard (see [Channels](./test-and-share.md#channels); your own test run always has it) and an OpenAI API key under Settings → Models |
46
45
  | The camera, microphone or location doesn’t work | Allow it in the browser’s site settings (the lock icon in the address bar) |
47
- | A connector says “not set up” | engenty wizards needs an OAuth client for it. See [Connectors](./connectors.md) |
46
+ | A built-in connector is missing from Settings → Connectors | It needs an OAuth client in the settings file. See [Connectors](./connectors.md) |
48
47
  | A step stops at a plugin’s tool | That plugin is not installed here. See [Plugins](./plugins.md) |
49
48
 
50
49
  ## Updating
@@ -19,6 +19,7 @@ import { conversationAvailable, freeTierRefusal, freeTierText, ModelUnavailableE
19
19
  import { runEnded } from "../plugins/events.js";
20
20
  import { projectFiles } from "../services/project-files.js";
21
21
  import { projectProfile } from "../services/projects.js";
22
+ import { switchedOffRunners } from "../services/runners.js";
22
23
  import { storedTranslation } from "../services/translations.js";
23
24
  import { latestShareJob } from "../sharing/state.js";
24
25
  import { listRows, listSecrets, scopeOf } from "../store/index.js";
@@ -864,11 +865,13 @@ function prefillOf(step, run, closed) {
864
865
  return out;
865
866
  }
866
867
  /**
867
- * Whether a run may hold a live conversation: a speech model is set up, and the wizard has live
868
- * voice or video switched on. Its owner's test run always may.
868
+ * Whether a run may hold a live conversation: live voice or video call is switched on for the
869
+ * tenant, a speech model is set up, and the wizard has one of them on. Its owner's test run
870
+ * always may, where one of them is switched on.
869
871
  */
870
872
  export async function talkAllowed(run) {
871
- if (!(await conversationAvailable())) {
873
+ const off = await switchedOffRunners();
874
+ if (CONVERSATION_RUNNERS.every((id) => off.has(id)) || !(await conversationAvailable())) {
872
875
  return false;
873
876
  }
874
877
  if (run.mode === "test") {
@@ -876,7 +879,7 @@ export async function talkAllowed(run) {
876
879
  }
877
880
  const w = await db.query.wizard.findFirst({ where: eq(schema.wizard.id, run.wizardId) });
878
881
  const { enabled } = w?.runners ?? DEFAULT_RUNNER_SETTINGS;
879
- return enabled.some((id) => CONVERSATION_RUNNERS.includes(id));
882
+ return enabled.some((id) => CONVERSATION_RUNNERS.includes(id) && !off.has(id));
880
883
  }
881
884
  export async function runView(run, brand) {
882
885
  // In the viewer's language every text of the view is the translation; ids and values stay.
@@ -223,6 +223,13 @@ export async function withdrawChannelRequest(id) {
223
223
  export function bookChannelUsage(id, input) {
224
224
  return call("POST", `/v1/tenants/${encodeURIComponent(id)}/channels/usage`, input);
225
225
  }
226
+ /**
227
+ * The team's public page data, whole (services/pages.ts): Manage keeps it and serves the page at
228
+ * `<slug>.<PAGES_DOMAIN>`. What it answers names the page's address.
229
+ */
230
+ export function putPages(tenantId, data) {
231
+ return call("PUT", `/v1/pages/${encodeURIComponent(tenantId)}`, data);
232
+ }
226
233
  /** A push to the mobile app on one device; the Manage-App holds the APNs and FCM keys. */
227
234
  export function pushToDevice(input) {
228
235
  return call("POST", "/v1/push", input);
@@ -38,6 +38,7 @@ import { brandView } from "../services/brand.js";
38
38
  import { ServiceError } from "../services/errors.js";
39
39
  import { publicRunners, servePageRunner } from "../services/runners.js";
40
40
  import { sharedRun, shareImage, shareRun, shareView, unshareRun } from "../services/shares.js";
41
+ import { shippedFontCss, shippedFontFile } from "../services/shipped-fonts.js";
41
42
  import { isLangCode, storedTranslation, translateResult, translationFor, uiTexts, } from "../services/translations.js";
42
43
  import { isIconFile, wizardAvatarSvg, wizardIcon } from "../services/wizard-icon.js";
43
44
  import { shareOverview } from "../sharing/index.js";
@@ -489,6 +490,31 @@ export const publicRoutes = new Hono()
489
490
  // An SVG logo is shown, never run.
490
491
  "content-security-policy": "sandbox",
491
492
  });
493
+ })
494
+ // The fonts the runner ships, for a theme shown in a host's own page: any origin may load them.
495
+ .get("/fonts/shipped/:sheet{[a-z0-9-]+\\.css}", async (c) => {
496
+ const css = await shippedFontCss(c.req.param("sheet").replace(/\.css$/, ""));
497
+ if (css === null) {
498
+ return c.notFound();
499
+ }
500
+ return c.body(css, 200, {
501
+ "content-type": "text/css; charset=utf-8",
502
+ "cache-control": "public, max-age=86400",
503
+ "access-control-allow-origin": "*",
504
+ });
505
+ })
506
+ .get("/fonts/shipped/files/:file", async (c) => {
507
+ const file = c.req.param("file");
508
+ const data = await shippedFontFile(file);
509
+ if (!data) {
510
+ return c.notFound();
511
+ }
512
+ return c.body(new Uint8Array(data), 200, {
513
+ "content-type": file.endsWith(".woff2") ? "font/woff2" : "font/woff",
514
+ "cache-control": "public, max-age=604800",
515
+ "access-control-allow-origin": "*",
516
+ "cross-origin-resource-policy": "cross-origin",
517
+ });
492
518
  })
493
519
  // A brand font's own file, while its space's brand names it: run pages, embeds and hosts'
494
520
  // frames load it from here, so any origin may.
@@ -43,7 +43,7 @@ import { HTML_RESPONSE_CSP } from "../render/guard.js";
43
43
  import { isAdminRole, mayBuild, mayCreate, projectWritable, requireAdmin, requireWritable, } from "../services/access.js";
44
44
  import { architectTurn } from "../services/architect.js";
45
45
  import { addMessage, assistantLayout, currentChat, earlierChats, foldChat, newChat, openChat, readChat, turnHistory, } from "../services/assistant-chats.js";
46
- import { describeGradient } from "../services/brand.js";
46
+ import { describeGradient, themeLooks } from "../services/brand.js";
47
47
  import { checkForCloud, cloudLinked, cloudSpaces, cloudState, forgetCloud, publishAndSync, pushSharing, removeFromCloud, replaceCloudSpaces, rotateInCloud, syncToCloud, } from "../services/cloud.js";
48
48
  import { notFound, ServiceError } from "../services/errors.js";
49
49
  import { deleteFile, listFiles, readFile, writeFile } from "../services/files.js";
@@ -51,12 +51,13 @@ import { categoryContents, listKnowledge, resolvePath, valueContents, } from "..
51
51
  import { writeSummary } from "../services/knowledge-model.js";
52
52
  import { applyWebsite, finishOnboarding, needsOnboarding } from "../services/onboarding.js";
53
53
  import { exportWizard, importWizard } from "../services/package.js";
54
+ import { pagePreview } from "../services/pages.js";
54
55
  import { profileSchema, saveProfile, saveUserLang, userLang, userProfile, } from "../services/profile.js";
55
56
  import { addProjectFile, addProjectFileFromUrl, fileView, orderProjectFiles, projectFile, projectFileContent, projectFiles, reindexProjectFile, removeProjectFile, updateProjectFile, } from "../services/project-files.js";
56
57
  import { documentText, queueIndex, searchKnowledge } from "../services/project-index.js";
57
58
  import { createProject, deleteProject, gradientSchema, listProjects, maskedServers, ownedProject, projectLimitOrNull, projectPatchSchema, updateProject, } from "../services/projects.js";
58
59
  import { runnersOf, wizardRunners } from "../services/runners.js";
59
- import { listResults, listRuns, startTestRun } from "../services/runs.js";
60
+ import { draftStepView, listResults, listRuns, startTestRun } from "../services/runs.js";
60
61
  import { addCategoryValue, categoryRow, categoryValue, deleteCategory, deleteCategoryValue, mergeCategoryValues, orderCategoryValues, putCategory, renameCategoryValue, setItemCategory, updateCategory, } from "../services/space-categories.js";
61
62
  import { addTableRow, createPage, createTable, deletePage, deleteTable, deleteTableRows, getPage, getTable, listSpaceData, orderSubPages, updatePage, updateTable, updateTableRow, } from "../services/space-data.js";
62
63
  import { deleteTheme, listThemes, saveTheme } from "../services/themes.js";
@@ -236,6 +237,10 @@ export const studio = new Hono()
236
237
  role: user.role,
237
238
  /** The plan the team is on; null alone, or where the Manage-App names none. */
238
239
  plan: info?.plan ?? null,
240
+ /** The team's address for its public page (`acme.wizards.page`); null alone, or behind its switch. */
241
+ pagesHost: feature("pages", { ...info?.features, ...person?.features })
242
+ ? (info?.pagesHost ?? null)
243
+ : null,
239
244
  },
240
245
  /** The feature switches: the code's defaults, what the Manage-App says of the team and the person, this install's file. */
241
246
  features: features(managed ? { ...info?.features, ...person?.features } : overview?.tenant.features),
@@ -508,6 +513,8 @@ export const studio = new Hono()
508
513
  name: p.name,
509
514
  brand: p.brand,
510
515
  facts: p.facts,
516
+ /** The space's public page; null until it is set up. */
517
+ page: p.page ?? null,
511
518
  mcpServers: maskedServers(p),
512
519
  wizardCount: p.wizardCount,
513
520
  /** `local`: synced from a local install, where it is changed. */
@@ -524,6 +531,11 @@ export const studio = new Hono()
524
531
  const patch = projectPatchSchema.parse(await c.req.json());
525
532
  await updateProject(c.get("user").id, c.req.param("id"), patch);
526
533
  return c.json({ ok: true });
534
+ })
535
+ // The team's public page as Manage will draw it, for the preview beside the page's fields.
536
+ .get("/projects/:id/page", async (c) => {
537
+ await ownedProject(c.get("user").id, c.req.param("id"));
538
+ return c.json(await pagePreview());
527
539
  })
528
540
  // --- the space's themes: how its wizards' pages look (docs/plans/themes.md) ---
529
541
  .get("/projects/:id/themes", async (c) => c.json(await listThemes(c.get("user").id, c.req.param("id"))))
@@ -1240,6 +1252,13 @@ export const studio = new Hono()
1240
1252
  })
1241
1253
  .post("/wizards/:id/test-runs", async (c) => c.json(await startTestRun(c.get("user").id, c.req.param("id"))))
1242
1254
  .get("/wizards/:id/runs", async (c) => c.json(await listRuns(c.get("user").id, c.req.param("id"))))
1255
+ // One step of the draft as a run shows it: the preview of the step chosen.
1256
+ .get("/wizards/:id/steps/:stepId/view", async (c) => c.json(await draftStepView(c.get("user").id, c.req.param("id"), c.req.param("stepId"), c.req.query("lang") ?? null)))
1257
+ // The looks of the themes the draft offers: what the test run's preview switches between.
1258
+ .get("/wizards/:id/looks", async (c) => {
1259
+ const w = await ownedWizard(c.get("user").id, c.req.param("id"));
1260
+ return c.json({ looks: await themeLooks(w.projectId, w.draft.themes) });
1261
+ })
1243
1262
  // --- workspace -------------------------------------------------------------
1244
1263
  .get("/wizards/:id/files", async (c) => c.json(await listFiles(c.get("user").id, c.req.param("id"))))
1245
1264
  .get("/wizards/:id/files/:path{.+}", async (c) => {
@@ -35,6 +35,26 @@ export async function brandView(projectId, chain, asked) {
35
35
  theme,
36
36
  };
37
37
  }
38
+ /**
39
+ * The looks of the themes a wizard offers, in its order: what the studio's preview switches
40
+ * between. A theme the space no longer has is left out.
41
+ */
42
+ export async function themeLooks(projectId, chain) {
43
+ const p = await db.query.project.findFirst({ where: eq(schema.project.id, projectId) });
44
+ const brand = runTheme(p?.brand ?? {});
45
+ return (chain ?? []).flatMap((id) => {
46
+ const theme = chosenTheme([id], p?.themes ?? []);
47
+ return theme
48
+ ? [
49
+ {
50
+ id,
51
+ name: typeof theme === "string" ? null : theme.name,
52
+ theme: themedLook(brand, theme),
53
+ },
54
+ ]
55
+ : [];
56
+ });
57
+ }
38
58
  const HEX = /^#[0-9a-f]{6}$/i;
39
59
  // Bounds are checked after the answer: not every model takes them in a schema.
40
60
  const gradientAnswer = z.object({
@@ -7,6 +7,7 @@ const STATUS = {
7
7
  revision_conflict: 409,
8
8
  no_credits: 402,
9
9
  refused: 400,
10
+ page_taken: 409,
10
11
  read_only: 403,
11
12
  forbidden: 403,
12
13
  };