wizards 0.7.4 → 0.7.6

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 (516) hide show
  1. package/bin/wizards.mjs +95 -26
  2. package/{apps/web/dist/install.sh → install.sh} +23 -5
  3. package/package.json +2 -58
  4. package/apps/runtime/dist/agents/architect.js +0 -444
  5. package/apps/runtime/dist/agents/studio-assistant.js +0 -883
  6. package/apps/runtime/dist/agents/subscription.js +0 -207
  7. package/apps/runtime/dist/agents/thought.js +0 -21
  8. package/apps/runtime/dist/agents/website.js +0 -480
  9. package/apps/runtime/dist/app.js +0 -359
  10. package/apps/runtime/dist/apple/wizards-apple +0 -0
  11. package/apps/runtime/dist/assistant/browser.js +0 -26
  12. package/apps/runtime/dist/assistant/docs.js +0 -158
  13. package/apps/runtime/dist/assistant/knows.js +0 -353
  14. package/apps/runtime/dist/assistant/primer.js +0 -26
  15. package/apps/runtime/dist/assistant/runs.js +0 -24
  16. package/apps/runtime/dist/auth/account.js +0 -175
  17. package/apps/runtime/dist/auth/device.js +0 -112
  18. package/apps/runtime/dist/auth/index.js +0 -358
  19. package/apps/runtime/dist/auth/keys.js +0 -55
  20. package/apps/runtime/dist/auth/local-ticket.js +0 -26
  21. package/apps/runtime/dist/authoring/example.js +0 -74
  22. package/apps/runtime/dist/authoring/guide.js +0 -433
  23. package/apps/runtime/dist/authoring/ops.js +0 -117
  24. package/apps/runtime/dist/browser/fast/action-space.js +0 -160
  25. package/apps/runtime/dist/browser/fast/classifier.js +0 -91
  26. package/apps/runtime/dist/browser/fast/decide.js +0 -171
  27. package/apps/runtime/dist/browser/fast/driver.js +0 -141
  28. package/apps/runtime/dist/browser/fast/instructions.js +0 -33
  29. package/apps/runtime/dist/browser/fast/run.js +0 -249
  30. package/apps/runtime/dist/browser/fast/span-picker.js +0 -153
  31. package/apps/runtime/dist/browser/fast/text-helper.js +0 -178
  32. package/apps/runtime/dist/browser/snapshot.js +0 -335
  33. package/apps/runtime/dist/cli/account.js +0 -385
  34. package/apps/runtime/dist/cli/autostart.js +0 -182
  35. package/apps/runtime/dist/cli/autoupdate.js +0 -221
  36. package/apps/runtime/dist/cli/clients.js +0 -44
  37. package/apps/runtime/dist/cli/connect.js +0 -540
  38. package/apps/runtime/dist/cli/environment.js +0 -93
  39. package/apps/runtime/dist/cli/exec.js +0 -45
  40. package/apps/runtime/dist/cli/features.js +0 -50
  41. package/apps/runtime/dist/cli/home.js +0 -88
  42. package/apps/runtime/dist/cli/install-env.js +0 -33
  43. package/apps/runtime/dist/cli/machine.js +0 -107
  44. package/apps/runtime/dist/cli/main.js +0 -222
  45. package/apps/runtime/dist/cli/mcp.js +0 -136
  46. package/apps/runtime/dist/cli/menu.js +0 -202
  47. package/apps/runtime/dist/cli/processes.js +0 -72
  48. package/apps/runtime/dist/cli/report.js +0 -66
  49. package/apps/runtime/dist/cli/setup.js +0 -335
  50. package/apps/runtime/dist/cli/start.js +0 -276
  51. package/apps/runtime/dist/cli/status.js +0 -203
  52. package/apps/runtime/dist/cli/ui.js +0 -59
  53. package/apps/runtime/dist/cli/uninstall-main.js +0 -20
  54. package/apps/runtime/dist/cli/uninstall.js +0 -231
  55. package/apps/runtime/dist/cli/update.js +0 -86
  56. package/apps/runtime/dist/cli/validate.js +0 -75
  57. package/apps/runtime/dist/cli/versions.js +0 -106
  58. package/apps/runtime/dist/connectors/builtin.js +0 -86
  59. package/apps/runtime/dist/connectors/external.js +0 -409
  60. package/apps/runtime/dist/connectors/gmail.js +0 -107
  61. package/apps/runtime/dist/connectors/imap.js +0 -261
  62. package/apps/runtime/dist/connectors/index.js +0 -325
  63. package/apps/runtime/dist/connectors/mail.js +0 -72
  64. package/apps/runtime/dist/connectors/outlook.js +0 -90
  65. package/apps/runtime/dist/connectors/plugin-connections.js +0 -343
  66. package/apps/runtime/dist/connectors/via-account.js +0 -65
  67. package/apps/runtime/dist/credits/credits.js +0 -100
  68. package/apps/runtime/dist/credits/estimate.js +0 -152
  69. package/apps/runtime/dist/db/adopt.js +0 -149
  70. package/apps/runtime/dist/db/client.js +0 -173
  71. package/apps/runtime/dist/db/control-schema.js +0 -133
  72. package/apps/runtime/dist/db/migrations/control/0000_last_absorbing_man.sql +0 -47
  73. package/apps/runtime/dist/db/migrations/control/0001_gorgeous_nicolaos.sql +0 -41
  74. package/apps/runtime/dist/db/migrations/control/0002_secret_penance.sql +0 -1
  75. package/apps/runtime/dist/db/migrations/control/0003_nasty_mordo.sql +0 -3
  76. package/apps/runtime/dist/db/migrations/control/0004_breezy_eddie_brock.sql +0 -6
  77. package/apps/runtime/dist/db/migrations/control/0005_chilly_oracle.sql +0 -1
  78. package/apps/runtime/dist/db/migrations/control/0006_sleepy_mojo.sql +0 -1
  79. package/apps/runtime/dist/db/migrations/control/0007_common_the_hand.sql +0 -15
  80. package/apps/runtime/dist/db/migrations/control/0008_runner.sql +0 -8
  81. package/apps/runtime/dist/db/migrations/control/0009_plugin_claim.sql +0 -9
  82. package/apps/runtime/dist/db/migrations/control/0010_tan_snowbird.sql +0 -6
  83. package/apps/runtime/dist/db/migrations/control/meta/0000_snapshot.json +0 -311
  84. package/apps/runtime/dist/db/migrations/control/meta/0001_snapshot.json +0 -599
  85. package/apps/runtime/dist/db/migrations/control/meta/0002_snapshot.json +0 -607
  86. package/apps/runtime/dist/db/migrations/control/meta/0003_snapshot.json +0 -311
  87. package/apps/runtime/dist/db/migrations/control/meta/0004_snapshot.json +0 -350
  88. package/apps/runtime/dist/db/migrations/control/meta/0005_snapshot.json +0 -358
  89. package/apps/runtime/dist/db/migrations/control/meta/0006_snapshot.json +0 -365
  90. package/apps/runtime/dist/db/migrations/control/meta/0007_snapshot.json +0 -460
  91. package/apps/runtime/dist/db/migrations/control/meta/0008_snapshot.json +0 -505
  92. package/apps/runtime/dist/db/migrations/control/meta/0009_snapshot.json +0 -561
  93. package/apps/runtime/dist/db/migrations/control/meta/0010_snapshot.json +0 -600
  94. package/apps/runtime/dist/db/migrations/control/meta/_journal.json +0 -83
  95. package/apps/runtime/dist/db/migrations/tenant/0000_eminent_freak.sql +0 -188
  96. package/apps/runtime/dist/db/migrations/tenant/0001_salty_master_chief.sql +0 -1
  97. package/apps/runtime/dist/db/migrations/tenant/0002_cloudy_firebird.sql +0 -1
  98. package/apps/runtime/dist/db/migrations/tenant/0003_brown_warbound.sql +0 -52
  99. package/apps/runtime/dist/db/migrations/tenant/0004_romantic_nocturne.sql +0 -6
  100. package/apps/runtime/dist/db/migrations/tenant/0005_reflective_forgotten_one.sql +0 -2
  101. package/apps/runtime/dist/db/migrations/tenant/0006_hard_war_machine.sql +0 -30
  102. package/apps/runtime/dist/db/migrations/tenant/0007_space_data.sql +0 -43
  103. package/apps/runtime/dist/db/migrations/tenant/0008_run_event_note.sql +0 -1
  104. package/apps/runtime/dist/db/migrations/tenant/0009_knowledge.sql +0 -104
  105. package/apps/runtime/dist/db/migrations/tenant/0010_plugin_connection.sql +0 -15
  106. package/apps/runtime/dist/db/migrations/tenant/0011_runners.sql +0 -2
  107. package/apps/runtime/dist/db/migrations/tenant/0012_assistant_chat.sql +0 -40
  108. package/apps/runtime/dist/db/migrations/tenant/0013_run_origin.sql +0 -1
  109. package/apps/runtime/dist/db/migrations/tenant/0014_run_answer.sql +0 -2
  110. package/apps/runtime/dist/db/migrations/tenant/0015_device_calls.sql +0 -13
  111. package/apps/runtime/dist/db/migrations/tenant/0016_even_trish_tilby.sql +0 -12
  112. package/apps/runtime/dist/db/migrations/tenant/meta/0000_snapshot.json +0 -1323
  113. package/apps/runtime/dist/db/migrations/tenant/meta/0001_snapshot.json +0 -1330
  114. package/apps/runtime/dist/db/migrations/tenant/meta/0002_snapshot.json +0 -1337
  115. package/apps/runtime/dist/db/migrations/tenant/meta/0003_snapshot.json +0 -1605
  116. package/apps/runtime/dist/db/migrations/tenant/meta/0004_snapshot.json +0 -1645
  117. package/apps/runtime/dist/db/migrations/tenant/meta/0005_snapshot.json +0 -1659
  118. package/apps/runtime/dist/db/migrations/tenant/meta/0006_snapshot.json +0 -1696
  119. package/apps/runtime/dist/db/migrations/tenant/meta/0007_snapshot.json +0 -2012
  120. package/apps/runtime/dist/db/migrations/tenant/meta/0008_snapshot.json +0 -2019
  121. package/apps/runtime/dist/db/migrations/tenant/meta/0009_snapshot.json +0 -2837
  122. package/apps/runtime/dist/db/migrations/tenant/meta/0010_snapshot.json +0 -2942
  123. package/apps/runtime/dist/db/migrations/tenant/meta/0011_snapshot.json +0 -2956
  124. package/apps/runtime/dist/db/migrations/tenant/meta/0012_snapshot.json +0 -3132
  125. package/apps/runtime/dist/db/migrations/tenant/meta/0013_snapshot.json +0 -3139
  126. package/apps/runtime/dist/db/migrations/tenant/meta/0014_snapshot.json +0 -3154
  127. package/apps/runtime/dist/db/migrations/tenant/meta/0015_snapshot.json +0 -3243
  128. package/apps/runtime/dist/db/migrations/tenant/meta/0016_snapshot.json +0 -3326
  129. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +0 -125
  130. package/apps/runtime/dist/db/schema.js +0 -602
  131. package/apps/runtime/dist/debug.js +0 -196
  132. package/apps/runtime/dist/docs/dev/index.md +0 -41
  133. package/apps/runtime/dist/docs/dev/meta.json +0 -7
  134. package/apps/runtime/dist/docs/dev/plugins/connections.md +0 -74
  135. package/apps/runtime/dist/docs/dev/plugins/events.md +0 -89
  136. package/apps/runtime/dist/docs/dev/plugins/examples.md +0 -101
  137. package/apps/runtime/dist/docs/dev/plugins/index.md +0 -78
  138. package/apps/runtime/dist/docs/dev/plugins/layout.md +0 -90
  139. package/apps/runtime/dist/docs/dev/plugins/meta.json +0 -28
  140. package/apps/runtime/dist/docs/dev/plugins/quick-start.md +0 -94
  141. package/apps/runtime/dist/docs/dev/plugins/reference.md +0 -348
  142. package/apps/runtime/dist/docs/dev/plugins/reloading.md +0 -76
  143. package/apps/runtime/dist/docs/dev/plugins/routes.md +0 -185
  144. package/apps/runtime/dist/docs/dev/plugins/runners.md +0 -230
  145. package/apps/runtime/dist/docs/dev/plugins/server.md +0 -281
  146. package/apps/runtime/dist/docs/dev/plugins/shipping.md +0 -79
  147. package/apps/runtime/dist/docs/dev/plugins/space.md +0 -297
  148. package/apps/runtime/dist/docs/dev/plugins/starters.md +0 -70
  149. package/apps/runtime/dist/docs/dev/plugins/studio.md +0 -363
  150. package/apps/runtime/dist/docs/dev/plugins/styling.md +0 -129
  151. package/apps/runtime/dist/docs/dev/plugins/tables.md +0 -104
  152. package/apps/runtime/dist/docs/dev/plugins/tools.md +0 -139
  153. package/apps/runtime/dist/docs/dev/wizard-format.md +0 -121
  154. package/apps/runtime/dist/docs/meta.json +0 -3
  155. package/apps/runtime/dist/docs/user/ai-apps.md +0 -112
  156. package/apps/runtime/dist/docs/user/assistant.md +0 -77
  157. package/apps/runtime/dist/docs/user/build-a-wizard.md +0 -116
  158. package/apps/runtime/dist/docs/user/command-line.md +0 -83
  159. package/apps/runtime/dist/docs/user/connectors.md +0 -90
  160. package/apps/runtime/dist/docs/user/create-account.md +0 -52
  161. package/apps/runtime/dist/docs/user/data.md +0 -66
  162. package/apps/runtime/dist/docs/user/first-start.md +0 -60
  163. package/apps/runtime/dist/docs/user/index.md +0 -49
  164. package/apps/runtime/dist/docs/user/install.md +0 -121
  165. package/apps/runtime/dist/docs/user/local-only.md +0 -42
  166. package/apps/runtime/dist/docs/user/meta.json +0 -32
  167. package/apps/runtime/dist/docs/user/models.md +0 -156
  168. package/apps/runtime/dist/docs/user/plugins.md +0 -71
  169. package/apps/runtime/dist/docs/user/run.md +0 -98
  170. package/apps/runtime/dist/docs/user/server.md +0 -52
  171. package/apps/runtime/dist/docs/user/space.md +0 -126
  172. package/apps/runtime/dist/docs/user/steps.md +0 -220
  173. package/apps/runtime/dist/docs/user/test-and-share.md +0 -224
  174. package/apps/runtime/dist/docs/user/troubleshooting.md +0 -67
  175. package/apps/runtime/dist/docs/user/wordpress.md +0 -121
  176. package/apps/runtime/dist/documents/parse.js +0 -246
  177. package/apps/runtime/dist/engenty/connections-external/build-connector.js +0 -193
  178. package/apps/runtime/dist/engenty/connections-external/errors.js +0 -11
  179. package/apps/runtime/dist/engenty/connections-external/import-service.js +0 -270
  180. package/apps/runtime/dist/engenty/connections-external/importer/classify.js +0 -34
  181. package/apps/runtime/dist/engenty/connections-external/importer/map-auth.js +0 -185
  182. package/apps/runtime/dist/engenty/connections-external/importer/normalize-mcp.js +0 -63
  183. package/apps/runtime/dist/engenty/connections-external/importer/normalize-openapi.js +0 -130
  184. package/apps/runtime/dist/engenty/connections-external/invoke/http-invoker.js +0 -143
  185. package/apps/runtime/dist/engenty/connections-external/invoke/mcp-client.js +0 -143
  186. package/apps/runtime/dist/engenty/connections-external/net/guarded-fetch.js +0 -119
  187. package/apps/runtime/dist/engenty/connections-external/oauth-dcr.js +0 -88
  188. package/apps/runtime/dist/engenty/connections-external/registry-client.js +0 -336
  189. package/apps/runtime/dist/engenty/connections-external/registry-source.js +0 -82
  190. package/apps/runtime/dist/engenty/connections-external/types.js +0 -7
  191. package/apps/runtime/dist/engenty/connections-github/connector.js +0 -209
  192. package/apps/runtime/dist/engenty/connections-google/connectors/calendar.js +0 -381
  193. package/apps/runtime/dist/engenty/connections-google/connectors/contacts.js +0 -94
  194. package/apps/runtime/dist/engenty/connections-google/connectors/drive.js +0 -290
  195. package/apps/runtime/dist/engenty/connections-google/connectors/gmail.js +0 -567
  196. package/apps/runtime/dist/engenty/connections-google/definitions.js +0 -11
  197. package/apps/runtime/dist/engenty/connections-google/shared.js +0 -73
  198. package/apps/runtime/dist/engenty/connections-hubspot/connector.js +0 -140
  199. package/apps/runtime/dist/engenty/connections-microsoft/action.js +0 -17
  200. package/apps/runtime/dist/engenty/connections-microsoft/graph.js +0 -114
  201. package/apps/runtime/dist/engenty/connections-microsoft/onedrive.js +0 -286
  202. package/apps/runtime/dist/engenty/connections-microsoft/outlook.js +0 -492
  203. package/apps/runtime/dist/engenty/connections-s3/s3.js +0 -328
  204. package/apps/runtime/dist/engenty/connections-sdk/files-capability.js +0 -86
  205. package/apps/runtime/dist/engenty/connections-sdk/oauth2.js +0 -150
  206. package/apps/runtime/dist/engenty/connections-sdk/registry.js +0 -89
  207. package/apps/runtime/dist/engenty/connections-sdk/storage-capability.js +0 -84
  208. package/apps/runtime/dist/engenty/connections-sdk/types.js +0 -30
  209. package/apps/runtime/dist/engenty/connections-slack/connector.js +0 -360
  210. package/apps/runtime/dist/engenty/csv-import/csv-matrix.js +0 -178
  211. package/apps/runtime/dist/engenty/csv-import/import-sources.js +0 -87
  212. package/apps/runtime/dist/engenty/csv-import/parse-csv.js +0 -129
  213. package/apps/runtime/dist/engenty/csv-import/serialize-csv.js +0 -20
  214. package/apps/runtime/dist/engenty/csv-import/types.js +0 -1
  215. package/apps/runtime/dist/engenty/csv-import/xlsx-workbook.js +0 -159
  216. package/apps/runtime/dist/engenty/doc-converter/interface.js +0 -9
  217. package/apps/runtime/dist/engenty/doc-converter/page-break.js +0 -92
  218. package/apps/runtime/dist/engenty/doc-converter/providers/local/index.js +0 -72
  219. package/apps/runtime/dist/engenty/document-scanner/schemas/classifier.js +0 -30
  220. package/apps/runtime/dist/engenty/document-scanner/schemas/index.js +0 -4
  221. package/apps/runtime/dist/engenty/document-scanner/schemas/invoice.js +0 -73
  222. package/apps/runtime/dist/engenty/document-scanner/schemas/receipt.js +0 -63
  223. package/apps/runtime/dist/engenty/document-scanner/schemas/shared.js +0 -40
  224. package/apps/runtime/dist/engenty/search-index/chunks.js +0 -164
  225. package/apps/runtime/dist/engenty/search-index/contracts.js +0 -9
  226. package/apps/runtime/dist/engenty/shims/connections-sdk.js +0 -39
  227. package/apps/runtime/dist/engenty/shims/plugin-sdk.js +0 -1
  228. package/apps/runtime/dist/engenty/shims/web-ingest.js +0 -19
  229. package/apps/runtime/dist/engenty/web-ingest/ssrf.js +0 -277
  230. package/apps/runtime/dist/engine/asks.js +0 -82
  231. package/apps/runtime/dist/engine/decide.js +0 -82
  232. package/apps/runtime/dist/engine/device.js +0 -194
  233. package/apps/runtime/dist/engine/events.js +0 -128
  234. package/apps/runtime/dist/engine/input.js +0 -208
  235. package/apps/runtime/dist/engine/owner.js +0 -32
  236. package/apps/runtime/dist/engine/prepare.js +0 -90
  237. package/apps/runtime/dist/engine/push.js +0 -58
  238. package/apps/runtime/dist/engine/requirements.js +0 -355
  239. package/apps/runtime/dist/engine/resources.js +0 -198
  240. package/apps/runtime/dist/engine/runner.js +0 -970
  241. package/apps/runtime/dist/engine/steps.js +0 -1000
  242. package/apps/runtime/dist/engine/surface.js +0 -91
  243. package/apps/runtime/dist/engine/template.js +0 -240
  244. package/apps/runtime/dist/engine/types.js +0 -4
  245. package/apps/runtime/dist/env.js +0 -295
  246. package/apps/runtime/dist/features.js +0 -123
  247. package/apps/runtime/dist/files/blobs.js +0 -22
  248. package/apps/runtime/dist/files/objects.js +0 -86
  249. package/apps/runtime/dist/files/storage.js +0 -120
  250. package/apps/runtime/dist/files/web-images.js +0 -101
  251. package/apps/runtime/dist/film/project.js +0 -257
  252. package/apps/runtime/dist/film/skills.js +0 -91
  253. package/apps/runtime/dist/film/sounds.js +0 -122
  254. package/apps/runtime/dist/film/step.js +0 -289
  255. package/apps/runtime/dist/film/tools.js +0 -99
  256. package/apps/runtime/dist/geocode.js +0 -58
  257. package/apps/runtime/dist/harness/antigravity.js +0 -129
  258. package/apps/runtime/dist/harness/apple.js +0 -270
  259. package/apps/runtime/dist/harness/claude.js +0 -147
  260. package/apps/runtime/dist/harness/codex.js +0 -229
  261. package/apps/runtime/dist/harness/cursor.js +0 -93
  262. package/apps/runtime/dist/harness/env.js +0 -124
  263. package/apps/runtime/dist/harness/index.js +0 -95
  264. package/apps/runtime/dist/harness/model.js +0 -279
  265. package/apps/runtime/dist/harness/prompt.js +0 -121
  266. package/apps/runtime/dist/harness/terminal.js +0 -194
  267. package/apps/runtime/dist/harness/types.js +0 -7
  268. package/apps/runtime/dist/index.js +0 -113
  269. package/apps/runtime/dist/limits.js +0 -81
  270. package/apps/runtime/dist/link-preview.js +0 -60
  271. package/apps/runtime/dist/log.js +0 -106
  272. package/apps/runtime/dist/manage.js +0 -249
  273. package/apps/runtime/dist/mcp/auth.js +0 -161
  274. package/apps/runtime/dist/mcp/bridge.js +0 -59
  275. package/apps/runtime/dist/mcp/flow-app.js +0 -97
  276. package/apps/runtime/dist/mcp/handler.js +0 -54
  277. package/apps/runtime/dist/mcp/scopes.js +0 -14
  278. package/apps/runtime/dist/mcp/seen.js +0 -65
  279. package/apps/runtime/dist/mcp/tools.js +0 -572
  280. package/apps/runtime/dist/media/conversation.js +0 -167
  281. package/apps/runtime/dist/media/ffmpeg.js +0 -121
  282. package/apps/runtime/dist/media/generate.js +0 -120
  283. package/apps/runtime/dist/media/marking.js +0 -121
  284. package/apps/runtime/dist/media/transcribe.js +0 -198
  285. package/apps/runtime/dist/model-errors.js +0 -42
  286. package/apps/runtime/dist/models.js +0 -1164
  287. package/apps/runtime/dist/plugin.js +0 -61
  288. package/apps/runtime/dist/plugins/channels.js +0 -78
  289. package/apps/runtime/dist/plugins/claims.js +0 -56
  290. package/apps/runtime/dist/plugins/discovery.js +0 -155
  291. package/apps/runtime/dist/plugins/events.js +0 -63
  292. package/apps/runtime/dist/plugins/jobs.js +0 -64
  293. package/apps/runtime/dist/plugins/loader.js +0 -508
  294. package/apps/runtime/dist/plugins/migrations.js +0 -69
  295. package/apps/runtime/dist/plugins/pro-keys.js +0 -34
  296. package/apps/runtime/dist/plugins/pro-state.js +0 -83
  297. package/apps/runtime/dist/plugins/pro.js +0 -310
  298. package/apps/runtime/dist/plugins/public.js +0 -44
  299. package/apps/runtime/dist/plugins/registry.js +0 -122
  300. package/apps/runtime/dist/plugins/runs.js +0 -210
  301. package/apps/runtime/dist/render/browser-path.js +0 -54
  302. package/apps/runtime/dist/render/chromium.js +0 -98
  303. package/apps/runtime/dist/render/convert.js +0 -158
  304. package/apps/runtime/dist/render/downloads.js +0 -299
  305. package/apps/runtime/dist/render/guard.js +0 -25
  306. package/apps/runtime/dist/render/shaped.js +0 -137
  307. package/apps/runtime/dist/routes/api.js +0 -440
  308. package/apps/runtime/dist/routes/debug.js +0 -42
  309. package/apps/runtime/dist/routes/delivery.js +0 -90
  310. package/apps/runtime/dist/routes/internal.js +0 -81
  311. package/apps/runtime/dist/routes/lang.js +0 -25
  312. package/apps/runtime/dist/routes/marketplace.js +0 -43
  313. package/apps/runtime/dist/routes/plugin-public.js +0 -113
  314. package/apps/runtime/dist/routes/plugins.js +0 -212
  315. package/apps/runtime/dist/routes/runs.js +0 -1422
  316. package/apps/runtime/dist/routes/studio.js +0 -1629
  317. package/apps/runtime/dist/routes/wizard-stream.js +0 -30
  318. package/apps/runtime/dist/running.js +0 -39
  319. package/apps/runtime/dist/sandbox/docker.js +0 -75
  320. package/apps/runtime/dist/sandbox/index.js +0 -23
  321. package/apps/runtime/dist/sandbox/types.js +0 -1
  322. package/apps/runtime/dist/secrets/crypto.js +0 -28
  323. package/apps/runtime/dist/secrets/signing.js +0 -52
  324. package/apps/runtime/dist/secrets/vault.js +0 -59
  325. package/apps/runtime/dist/services/access.js +0 -88
  326. package/apps/runtime/dist/services/api.js +0 -248
  327. package/apps/runtime/dist/services/architect.js +0 -95
  328. package/apps/runtime/dist/services/assistant-chats.js +0 -311
  329. package/apps/runtime/dist/services/brand.js +0 -85
  330. package/apps/runtime/dist/services/cloud.js +0 -456
  331. package/apps/runtime/dist/services/draft-events.js +0 -27
  332. package/apps/runtime/dist/services/engenty-shapes.js +0 -71
  333. package/apps/runtime/dist/services/errors.js +0 -29
  334. package/apps/runtime/dist/services/files.js +0 -178
  335. package/apps/runtime/dist/services/knowledge-model.js +0 -559
  336. package/apps/runtime/dist/services/knowledge.js +0 -721
  337. package/apps/runtime/dist/services/links.js +0 -16
  338. package/apps/runtime/dist/services/marketplace.js +0 -492
  339. package/apps/runtime/dist/services/onboarding.js +0 -152
  340. package/apps/runtime/dist/services/package-file.js +0 -82
  341. package/apps/runtime/dist/services/package.js +0 -170
  342. package/apps/runtime/dist/services/profile.js +0 -51
  343. package/apps/runtime/dist/services/project-files.js +0 -439
  344. package/apps/runtime/dist/services/project-index.js +0 -707
  345. package/apps/runtime/dist/services/projects.js +0 -387
  346. package/apps/runtime/dist/services/relevance.js +0 -58
  347. package/apps/runtime/dist/services/runners.js +0 -178
  348. package/apps/runtime/dist/services/runs.js +0 -524
  349. package/apps/runtime/dist/services/shares.js +0 -130
  350. package/apps/runtime/dist/services/site.js +0 -270
  351. package/apps/runtime/dist/services/space-categories.js +0 -861
  352. package/apps/runtime/dist/services/space-data.js +0 -792
  353. package/apps/runtime/dist/services/space-origin.js +0 -207
  354. package/apps/runtime/dist/services/spaces.js +0 -656
  355. package/apps/runtime/dist/services/translations.js +0 -306
  356. package/apps/runtime/dist/services/widgets.js +0 -34
  357. package/apps/runtime/dist/services/wizard-icon.js +0 -157
  358. package/apps/runtime/dist/services/wizards.js +0 -420
  359. package/apps/runtime/dist/settings.js +0 -16
  360. package/apps/runtime/dist/store/errors.js +0 -4
  361. package/apps/runtime/dist/store/index.js +0 -299
  362. package/apps/runtime/dist/store/shared-lists.js +0 -123
  363. package/apps/runtime/dist/tenants/control.js +0 -238
  364. package/apps/runtime/dist/tenants/tenant.js +0 -26
  365. package/apps/runtime/dist/texts.js +0 -207
  366. package/apps/runtime/dist/tools/browser.js +0 -703
  367. package/apps/runtime/dist/tools/connector.js +0 -204
  368. package/apps/runtime/dist/tools/index.js +0 -291
  369. package/apps/runtime/dist/tools/mail.js +0 -104
  370. package/apps/runtime/dist/tools/net-guard.js +0 -170
  371. package/apps/runtime/dist/tools/pages.js +0 -81
  372. package/apps/runtime/dist/tools/plugin.js +0 -180
  373. package/apps/runtime/dist/tools/project.js +0 -154
  374. package/apps/runtime/dist/tools/shared.js +0 -69
  375. package/apps/runtime/dist/tools/store.js +0 -238
  376. package/apps/runtime/dist/update.js +0 -113
  377. package/apps/runtime/dist/widgets/bundle.js +0 -99
  378. package/apps/runtime/dist/widgets/render.js +0 -329
  379. package/apps/runtime/dist/widgets/runtime.js +0 -108
  380. package/apps/runtime/dist/widgets/script.js +0 -30
  381. package/apps/runtime/dist/widgets/step.js +0 -223
  382. package/apps/web/dist/ai-labels/ai-black.svg +0 -20
  383. package/apps/web/dist/ai-labels/ai-generated-black.svg +0 -31
  384. package/apps/web/dist/ai-labels/ai-generated-white.svg +0 -32
  385. package/apps/web/dist/ai-labels/ai-modified-black.svg +0 -30
  386. package/apps/web/dist/ai-labels/ai-modified-white.svg +0 -31
  387. package/apps/web/dist/ai-labels/ai-white.svg +0 -21
  388. package/apps/web/dist/assets/AboutDialog-BI6487_s.js +0 -1
  389. package/apps/web/dist/assets/ChangelogDialog-B63QWuUV.js +0 -1
  390. package/apps/web/dist/assets/ChatView-BjQVHGjn.js +0 -10
  391. package/apps/web/dist/assets/EditorPage-DrprS19h.js +0 -3
  392. package/apps/web/dist/assets/FlowPreview-CusP7ci9.js +0 -1
  393. package/apps/web/dist/assets/Harness-BrP-ENHg.css +0 -1
  394. package/apps/web/dist/assets/Harness-CCMqhtuk.js +0 -16
  395. package/apps/web/dist/assets/NewWizardChannels-DpcWsST7.js +0 -1
  396. package/apps/web/dist/assets/NewWizardPage-BXePNBa9.js +0 -7
  397. package/apps/web/dist/assets/OnboardingPage-BtZ6sHJi.js +0 -1
  398. package/apps/web/dist/assets/ProjectPage-DHOL8FXt.js +0 -1
  399. package/apps/web/dist/assets/PublicRunner-BLRVe7G0.js +0 -1
  400. package/apps/web/dist/assets/ReadOnly-BV8o_HtK.js +0 -1
  401. package/apps/web/dist/assets/RunDrawer-D-T8pYfB.js +0 -4
  402. package/apps/web/dist/assets/RunnerView-BinlRsGF.js +0 -1
  403. package/apps/web/dist/assets/SettingsPage-B6M-jFJw.js +0 -1
  404. package/apps/web/dist/assets/SetupPage-DI6c--4V.js +0 -1
  405. package/apps/web/dist/assets/SharePage-C4cESaes.js +0 -1
  406. package/apps/web/dist/assets/changelog-Dj_yd2vG.js +0 -1
  407. package/apps/web/dist/assets/engenty-eXZ-EAwd.js +0 -1
  408. package/apps/web/dist/assets/esm-DXeMu8Lb.js +0 -7
  409. package/apps/web/dist/assets/fluffy-engenty-ClRou7yu.js +0 -456
  410. package/apps/web/dist/assets/index-AfUa8xKD.css +0 -1
  411. package/apps/web/dist/assets/index-yiE9Lun0.js +0 -14
  412. package/apps/web/dist/assets/jsx-runtime-BNakU3Ej.js +0 -1
  413. package/apps/web/dist/assets/lock-R_CfU0Xo.js +0 -1
  414. package/apps/web/dist/assets/oss-credits-cZ9NUaLZ.js +0 -1
  415. package/apps/web/dist/assets/pdfmake-Cx9scTbD.js +0 -228
  416. package/apps/web/dist/assets/phone-CgrIS4_-.js +0 -1
  417. package/apps/web/dist/assets/preload-helper-CNEI7N0N.js +0 -1
  418. package/apps/web/dist/assets/qr-scanner-worker.min-CJaXo3yu.js +0 -98
  419. package/apps/web/dist/assets/qr-scanner.min-C_UI0gH-.js +0 -1
  420. package/apps/web/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
  421. package/apps/web/dist/assets/settings-menu-2IMOOlLl.js +0 -1
  422. package/apps/web/dist/assets/ui-dzGvc3xk.js +0 -137
  423. package/apps/web/dist/assets/upload-BSuTilFF.js +0 -1
  424. package/apps/web/dist/assets/vfs_fonts-DllDSYt1.js +0 -1
  425. package/apps/web/dist/embed.js +0 -266
  426. package/apps/web/dist/favicon.svg +0 -1
  427. package/apps/web/dist/icons/apple-touch-icon.png +0 -0
  428. package/apps/web/dist/icons/icon-192.png +0 -0
  429. package/apps/web/dist/icons/icon-512.png +0 -0
  430. package/apps/web/dist/icons/icon-maskable-512.png +0 -0
  431. package/apps/web/dist/index.html +0 -48
  432. package/apps/web/dist/manifest.webmanifest +0 -21
  433. package/apps/web/dist/mcp/flow.html +0 -980
  434. package/apps/web/dist/sw.js +0 -15
  435. package/modules/README.md +0 -15
  436. package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +0 -1150
  437. package/node_modules/@engenty/wizards/dist/plugin/index.js +0 -4
  438. package/node_modules/@engenty/wizards/dist/plugin/studio.d.ts +0 -322
  439. package/node_modules/@engenty/wizards/dist/plugin/studio.js +0 -4
  440. package/node_modules/@engenty/wizards/dist/plugin/thread.d.ts +0 -174
  441. package/node_modules/@engenty/wizards/dist/plugin/thread.js +0 -821
  442. package/node_modules/@engenty/wizards/package.json +0 -11
  443. package/node_modules/@engenty-wizards/shared/dist/assistant.d.ts +0 -174
  444. package/node_modules/@engenty-wizards/shared/dist/assistant.js +0 -65
  445. package/node_modules/@engenty-wizards/shared/dist/changes.d.ts +0 -22
  446. package/node_modules/@engenty-wizards/shared/dist/changes.js +0 -61
  447. package/node_modules/@engenty-wizards/shared/dist/connectors.d.ts +0 -77
  448. package/node_modules/@engenty-wizards/shared/dist/connectors.js +0 -2
  449. package/node_modules/@engenty-wizards/shared/dist/decision.d.ts +0 -76
  450. package/node_modules/@engenty-wizards/shared/dist/decision.js +0 -147
  451. package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +0 -2922
  452. package/node_modules/@engenty-wizards/shared/dist/definition.js +0 -1920
  453. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-format.d.ts +0 -5
  454. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-format.js +0 -132
  455. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-value.d.ts +0 -11
  456. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-value.js +0 -209
  457. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.d.ts +0 -532
  458. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.js +0 -217
  459. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/index.d.ts +0 -3
  460. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/index.js +0 -3
  461. package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-lexical.d.ts +0 -14
  462. package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-lexical.js +0 -166
  463. package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-rank.d.ts +0 -33
  464. package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-rank.js +0 -99
  465. package/node_modules/@engenty-wizards/shared/dist/feature-flags.d.ts +0 -78
  466. package/node_modules/@engenty-wizards/shared/dist/feature-flags.js +0 -70
  467. package/node_modules/@engenty-wizards/shared/dist/features.d.ts +0 -41
  468. package/node_modules/@engenty-wizards/shared/dist/features.js +0 -89
  469. package/node_modules/@engenty-wizards/shared/dist/fit.d.ts +0 -71
  470. package/node_modules/@engenty-wizards/shared/dist/fit.js +0 -382
  471. package/node_modules/@engenty-wizards/shared/dist/json-schema.d.ts +0 -14
  472. package/node_modules/@engenty-wizards/shared/dist/json-schema.js +0 -66
  473. package/node_modules/@engenty-wizards/shared/dist/knowledge.d.ts +0 -199
  474. package/node_modules/@engenty-wizards/shared/dist/knowledge.js +0 -68
  475. package/node_modules/@engenty-wizards/shared/dist/marketplace-entry.d.ts +0 -35
  476. package/node_modules/@engenty-wizards/shared/dist/marketplace-entry.js +0 -107
  477. package/node_modules/@engenty-wizards/shared/dist/marketplace-search.d.ts +0 -20
  478. package/node_modules/@engenty-wizards/shared/dist/marketplace-search.js +0 -136
  479. package/node_modules/@engenty-wizards/shared/dist/marketplace.d.ts +0 -227
  480. package/node_modules/@engenty-wizards/shared/dist/marketplace.js +0 -354
  481. package/node_modules/@engenty-wizards/shared/dist/merge.d.ts +0 -7
  482. package/node_modules/@engenty-wizards/shared/dist/merge.js +0 -40
  483. package/node_modules/@engenty-wizards/shared/dist/numbers.d.ts +0 -24
  484. package/node_modules/@engenty-wizards/shared/dist/numbers.js +0 -54
  485. package/node_modules/@engenty-wizards/shared/dist/projects.d.ts +0 -224
  486. package/node_modules/@engenty-wizards/shared/dist/projects.js +0 -319
  487. package/node_modules/@engenty-wizards/shared/dist/providers.d.ts +0 -101
  488. package/node_modules/@engenty-wizards/shared/dist/providers.js +0 -390
  489. package/node_modules/@engenty-wizards/shared/dist/run.d.ts +0 -680
  490. package/node_modules/@engenty-wizards/shared/dist/run.js +0 -620
  491. package/node_modules/@engenty-wizards/shared/dist/runner-texts.d.ts +0 -546
  492. package/node_modules/@engenty-wizards/shared/dist/runner-texts.js +0 -523
  493. package/node_modules/@engenty-wizards/shared/dist/runners.d.ts +0 -93
  494. package/node_modules/@engenty-wizards/shared/dist/runners.js +0 -146
  495. package/node_modules/@engenty-wizards/shared/dist/shape.d.ts +0 -102
  496. package/node_modules/@engenty-wizards/shared/dist/shape.js +0 -318
  497. package/node_modules/@engenty-wizards/shared/dist/space-data.d.ts +0 -89
  498. package/node_modules/@engenty-wizards/shared/dist/space-data.js +0 -47
  499. package/node_modules/@engenty-wizards/shared/dist/store.d.ts +0 -117
  500. package/node_modules/@engenty-wizards/shared/dist/store.js +0 -81
  501. package/node_modules/@engenty-wizards/shared/dist/surface.d.ts +0 -115
  502. package/node_modules/@engenty-wizards/shared/dist/surface.js +0 -442
  503. package/node_modules/@engenty-wizards/shared/dist/texts.d.ts +0 -45
  504. package/node_modules/@engenty-wizards/shared/dist/texts.js +0 -54
  505. package/node_modules/@engenty-wizards/shared/dist/translation.d.ts +0 -23
  506. package/node_modules/@engenty-wizards/shared/dist/translation.js +0 -154
  507. package/node_modules/@engenty-wizards/shared/dist/wizard-package.d.ts +0 -48
  508. package/node_modules/@engenty-wizards/shared/dist/wizard-package.js +0 -49
  509. package/node_modules/@engenty-wizards/shared/dist/workspace.d.ts +0 -16
  510. package/node_modules/@engenty-wizards/shared/dist/workspace.js +0 -51
  511. package/node_modules/@engenty-wizards/shared/package.json +0 -10
  512. package/plugin/.claude-plugin/plugin.json +0 -9
  513. package/plugin/.mcp.json +0 -8
  514. package/plugin/commands/wizard.md +0 -8
  515. package/plugin/skills/build-wizard/SKILL.md +0 -27
  516. package/plugin/skills/use-wizard/SKILL.md +0 -18
@@ -1,185 +0,0 @@
1
- ---
2
- title: Routes
3
- description: HTTP routes below the plugin's own address – signed in, inside the person's tenant.
4
- version: 0.5.0
5
- ---
6
-
7
- A plugin’s routes live below `/api/studio/plugins/<id>`, and for programs with a key below
8
- `/api/v1/plugins/<id>`. Every request is a signed-in person’s, inside that person’s tenant.
9
-
10
- ```ts
11
- // GET /api/studio/plugins/contacts/
12
- server.registerHttpRoute({
13
- method: "GET",
14
- path: "/",
15
- handler: async () => ({
16
- contacts: await db().select().from(person).orderBy(desc(person.seenAt)).limit(200),
17
- }),
18
- });
19
-
20
- // DELETE /api/studio/plugins/contacts/42
21
- server.registerHttpRoute({
22
- method: "DELETE",
23
- path: "/:id",
24
- role: "admin",
25
- handler: async ({ params }) => {
26
- const [gone] = await db()
27
- .delete(person)
28
- .where(eq(person.id, Number(params.id)))
29
- .returning();
30
- if (!gone) {
31
- throw Object.assign(new Error("No such contact."), { status: 404, code: "no_contact" });
32
- }
33
- return { ok: true };
34
- },
35
- });
36
- ```
37
-
38
- | Field | |
39
- |---|---|
40
- | `method` | `GET`, `POST`, `PUT`, `PATCH` or `DELETE` |
41
- | `path` | `/`, `/items`, `/items/:id`. A `:name` part matches one segment |
42
- | `role` | `"admin"`: owners and admins only; others get `403`. Default: every member of the tenant |
43
- | `handler(request)` | Answers with a value, sent as JSON, or with a `Response` |
44
-
45
- ## The request
46
-
47
- | | |
48
- |---|---|
49
- | `request.params` | What the `:name` parts matched |
50
- | `request.query` | The query string, as `URLSearchParams` |
51
- | `request.json()` | The body as JSON. An empty body is `{}` |
52
- | `request.user` | `{ id, tenantId, role, name, email }`: the signed-in person. `role` is `owner`, `admin` or `member` |
53
- | `request.path` | The address below the plugin’s own |
54
- | `request.request` | The web `Request` as it came in: headers, a body that is not JSON |
55
-
56
- ## The answer
57
-
58
- | The handler | The client gets |
59
- |---|---|
60
- | Returns a value | `200` with the value as JSON. `undefined` becomes `null` |
61
- | Returns a `Response` | That response: a file, a redirect, another status |
62
- | Throws an error with a `status` (400 to 599) and a `code` (a string) | That status with `{ "error": "<message>", "code": "<code>" }` |
63
- | Throws anything else | `500` with `{ "error": "The plugin failed.", "code": "plugin_failed" }`. The error itself is logged, not sent |
64
-
65
- Send a `code`, not a sentence for the person. The studio half says it in the person’s language:
66
-
67
- ```ts
68
- throw Object.assign(new Error("No such contact."), { status: 404, code: "no_contact" });
69
- ```
70
-
71
- ## Who can call a route
72
-
73
- - The studio, signed in. A request without a session gets `401` before it reaches the plugin.
74
- - A program with a key, at a second address: [With a key](#with-a-key).
75
- - Only people of a tenant that has the plugin. For any other tenant the studio’s address
76
- answers `404`.
77
- - Not the people who run a wizard on its link, and not the outside world. For a webhook of
78
- another service, a plugin has [public routes](#public-routes).
79
-
80
- ## With a key
81
-
82
- A program that is not the studio, such as the [WordPress plugin](../../user/wordpress.md),
83
- calls the same routes below `/api/v1/plugins/<id>`. It signs in with an API key or with an
84
- access token of engenty.ai. On a runtime that runs alone, you create the key under Settings →
85
- Integrate; on engenty.ai, in your account:
86
-
87
- ```bash
88
- curl -H "Authorization: Bearer $KEY" https://wizards.example.com/api/v1/plugins/contacts/
89
- ```
90
-
91
- - The route runs as the key’s person, inside that person’s tenant: `request.user` is that
92
- person, with the role. A `role: "admin"` route answers a member’s key with `403`. `name` and
93
- `email` can be empty.
94
- - `GET` needs the scope `wizards:read`, every other method `wizards:write`. A key has every
95
- scope, a token the ones the person granted. A call without the scope gets `403` with the code
96
- `insufficient_scope`.
97
- - A plugin that the runtime has but the key’s account does not have answers `403` with the code
98
- `plugin`. An id the runtime does not know answers `404`.
99
- - `x-api-key: <key>` works in place of the `Authorization` header.
100
- - The answers and errors are the same as at the studio’s address.
101
-
102
- ## Public routes
103
-
104
- A public route answers anyone: a CMS that says a page changed, another service’s webhook. Its
105
- address names the tenant without giving its id away; the plugin hands it out:
106
-
107
- ```ts
108
- server.registerPublicRoute({
109
- method: "POST",
110
- path: "/signal/:token",
111
- handler: async ({ params, tenantId, json }) => {
112
- const source = await sourceByToken(params.token);
113
- if (!source) {
114
- throw Object.assign(new Error("Unknown."), { status: 404, code: "unknown" });
115
- }
116
- await refreshSoon(source, await json());
117
- return { ok: true };
118
- },
119
- });
120
-
121
- // In a route of the studio: the address to paste into the CMS.
122
- const address = await server.publicUrl(`/signal/${source.token}`);
123
- // https://…/api/public/plugins/<id>/<ref>/signal/<token>
124
- ```
125
-
126
- - Nobody is signed in. Check a secret of your own: a token in the address, a signature of the
127
- body. Keep only a hash of it.
128
- - The handler runs inside the tenant of the address: `server.getTenantDb()` is its database.
129
- - `publicUrl` gives the same address for a tenant every time.
130
- - A body is taken up to 4 MB. Answers and errors work as for the plugin’s other routes.
131
- - A tenant without the plugin, or a suspended one, answers `404`.
132
-
133
- ## Shared routes
134
-
135
- Some services post to one webhook for everyone: one account of the runtime’s, one app. A shared
136
- route has one address for all tenants, and the call itself says which tenant it is for, with
137
- the ref the plugin handed the service before:
138
-
139
- ```ts
140
- // Handed to the service with the call it is about to make: names the tenant.
141
- const ref = await server.publicRef();
142
-
143
- server.registerSharedRoute({
144
- method: "POST",
145
- path: "/incoming",
146
- handler: async ({ request, inTenant }) => {
147
- const raw = await request.text();
148
- if (!signedByTheService(raw, request.headers)) {
149
- throw Object.assign(new Error("Bad signature."), { status: 401, code: "bad_signature" });
150
- }
151
- const event = JSON.parse(raw);
152
- return inTenant(event.ref, () => pickUp(event));
153
- },
154
- });
155
-
156
- // The address to enter at the service, once: the same for every tenant.
157
- server.sharedUrl("/incoming");
158
- // https://…/api/public/plugins/<id>/shared/incoming
159
- ```
160
-
161
- - The handler runs outside any tenant: check the service’s signature, then call `inTenant`.
162
- - `inTenant(ref, work)` runs `work` inside the tenant of that ref, as a public route of the
163
- tenant would run. A ref no tenant has, a suspended tenant and one without the plugin throw
164
- `404` / `not_found`.
165
- - `publicRef()` is the part of `publicUrl` that names the tenant; it is the same every time.
166
- - A body is taken up to 4 MB, as on a public route.
167
- - Where the call does not carry a ref (a keyword written to a number every tenant shares),
168
- [`server.claims`](./server.md#keys-across-tenants) finds it: `holder(key)` is the ref of the
169
- tenant that holds the key.
170
-
171
- ## From the studio half
172
-
173
- `studio.api` calls the plugin’s own routes and gives the parsed JSON:
174
-
175
- ```ts
176
- const { contacts } = await studio.api.get<{ contacts: Person[] }>("/");
177
- await studio.api.del(`/${id}`);
178
- ```
179
-
180
- See [The studio half](./studio.md#the-plugins-own-routes).
181
-
182
- ## Addresses that are taken
183
-
184
- `/api/studio/plugins/-/…` is the runtime’s own part: the built files, reloading. No plugin is
185
- called `-`, so the two never meet.
@@ -1,230 +0,0 @@
1
- ---
2
- title: Runners
3
- description: A door a wizard runs through, beside the page and the chat (a call, a messenger, a kiosk), and the run API that drives runs from it.
4
- version: 0.5.0
5
- ---
6
-
7
- A runner is a way to run a wizard. The runtime has four: the stepped page at `/w/<token>`, the
8
- chat at `/w/<token>/chat`, live voice at `/w/<token>/talk` and the video call at
9
- `/w/<token>/video`. The last two are there only where a speech model is set up. A plugin adds
10
- more. The owner picks them per wizard when it is made, and later under “Change” in the share
11
- dialog. The link opens the first page runner that is on; the others answer under their own
12
- address or from their own channel.
13
-
14
- ## Register a runner
15
-
16
- ```ts
17
- server.registerRunner({
18
- id: "kiosk",
19
- label: { de: "Kiosk", en: "Kiosk" },
20
- kind: "page",
21
- capabilities: {
22
- input: ["text", "select", "multiselect", "toggle", "number", "date"],
23
- output: { shows: ["text", "image"], pictures: ["dashboard", "widget"] },
24
- asks: ["confirm"],
25
- review: ["accept", "regenerate"],
26
- waits: true,
27
- handoff: ["screen"],
28
- },
29
- page: ({ wizard, path, query }) => new Response(renderKiosk(wizard, path, query)),
30
- });
31
- ```
32
-
33
- | | |
34
- |---|---|
35
- | `id` | Lower case, digits and `-`, starting with a letter, at most 24 characters. The sub-path of the wizard’s address. Not one of the built-in runners (`steps`, `chat`, `talk`, `video`), `runs` or `icons`: such an id throws “is taken” |
36
- | `label` | `{ de, en }`: its name in German and English |
37
- | `kind` | `page`: the person opens an address. `channel`: the runner has an address of its own (a number, a bot) and drives runs from its webhooks |
38
- | `capabilities` | What the runner takes in and shows; see below |
39
- | `page` | A page runner’s handler: what `/w/<token>/<id>` answers with. Nobody is signed in. A page runner without one throws when it is registered |
40
- | `problem` | `() => string \| { text, kind?, note?, plan? } \| null`, may be async: why the runner cannot be used in the current tenant right now (“Not connected: Settings → WhatsApp”). The runtime asks it inside the tenant whenever the studio lists the runners, and a runner with a problem can’t be switched on. A text is something to set up: the share dialog’s row says “Not set up yet” and offers “Set up”. An object says its `kind`: `setup` (the same), `waiting` (asked for and waiting for someone else; the row says “Waiting” and has no button) or `plan` (the tenant’s plan does not have it; the row says “Not in your plan” and offers “See {plan}” with the `plan` it names, else “See the plans”). `note` (`{ de, en }`) is what the row says instead (“Number requested”, “From Pro”) |
41
- | `address` | A channel runner: `(wizard: { id, title, token }) => { number?, keyword?, link? } \| null`, may be async. Where a person reaches that wizard: the number, the keyword that picks it there, and a link that opens the channel with the keyword written (`sms:…`, `https://wa.me/…`). The share dialog shows the keyword and number under the runner’s name, copies the link (else the number) and offers the link as a QR code. Asked for each wizard that has the runner on; null while it is not set up |
42
-
43
- A page runner is served at `/w/<token>/<id>` for every wizard that switched it on. When you run
44
- from source, where Vite serves the pages, the same handler answers at
45
- `/api/public/wizards/<token>/runners/<id>`; the public wizard’s `runners` list carries the
46
- right address either way.
47
-
48
- ### Capabilities
49
-
50
- The runner declares what it can do. The runtime works out per wizard how far it gets:
51
- everything in the channel, a hand-off to the run page at some steps, or not possible. Where it is
52
- not possible, the share dialog’s row says “Not possible:” with the steps. A kind the runtime does
53
- not know throws when the runner is registered.
54
-
55
- | Field | Says |
56
- |---|---|
57
- | `input` | The field kinds the runner asks itself. Any other field hands off to the run page |
58
- | `output.shows` | What it shows as it is: `text`, `data`, `image`, `video`, `voice`, `document`, `dashboard`, `widget`, `film`, `surface` |
59
- | `output.pictures` | What it shows as a picture with a link to the real thing. Anything else is a link |
60
- | `asks` | `confirm` for a running step that asks before it changes something; `login` only where a browser types the sign-in |
61
- | `review` | `accept`, `regenerate`, `edit` |
62
- | `waits` | Whether it stays through a step that takes minutes. A runner that can’t is not possible for such wizards |
63
- | `handoff` | How a link to the run page reaches the person: `screen`, `thread`, `sms`, `push`. A runner with none cannot hand off |
64
-
65
- ## Drive a run
66
-
67
- `server.runs` holds the functions behind the MCP tools, for the plugin’s own door. A run
68
- started here is a live run of the published wizard for a person of that door.
69
-
70
- ```ts
71
- server.registerPublicRoute({
72
- method: "POST",
73
- path: "/call/:token",
74
- handler: async ({ params, json }) => {
75
- const { from, said } = await json<{ from: string; said: string }>();
76
- const { runId, ticket, refused } = await server.runs.start({
77
- token: params.token,
78
- person: { channel: "phone", id: from },
79
- answers: { name: said },
80
- });
81
- const report = await server.runs.report(runId, { waitSeconds: 20 });
82
- if (report.waitingFor && "page" in report.waitingFor) {
83
- // Ask the next field; fields with inChat=false need the run page.
84
- const link = await server.runs.handoffUrl(runId);
85
- }
86
- return { runId, ticket, refused, report };
87
- },
88
- });
89
- ```
90
-
91
- | Call | |
92
- |---|---|
93
- | `runs.start({ token \| wizardId, person, answers?, runner? })` | Starts a live run. `person` names who it is for on the door; the runtime keeps a hash of it as the run’s visitor, so what the wizard remembers is theirs on the run page too. `answers` fills the first page; what did not fit comes back as `refused`. Gives the run’s ticket |
94
- | `runs.report(runId, { waitSeconds?, draft? })` | The run as it stands: `lang`, `waitingFor` (a page with the fields shown and what they know, a review, a question), outputs with signed links and a `picture` (a PNG of a document, a dashboard or a widget), cost, `browserUrl`. Waits up to 45 seconds while the run works. A door that asks a page one field at a time passes what it has as `draft`: a field’s `shown` then follows those answers, as the form on the screen does |
95
- | `runs.wizards(runner)` | The published wizards of the tenant that switched the runner on: what the door offers, with `token`, `title` and `lang` |
96
- | `runs.answerPage(runId, stepId, values)` | Fills the page the run waits for |
97
- | `runs.review(runId, stepId, action)` | Accepts a review, or asks for one of the shown steps again with a note |
98
- | `runs.answerAsk(runId, askId, "allow" \| "skip")` | Answers a running step’s question. A sign-in cannot be answered here: hand off |
99
- | `runs.control(runId, "back" \| "retry" \| "cancel")` | |
100
- | `runs.subscribe(runId, listener)` | Hears every change of the run: its events with their note in both languages, or a status change. Returns the function that stops it |
101
- | `runs.handoffUrl(runId)` | The run page with the run’s ticket: the link to send for what the door cannot do. The person who opens it and the door’s person are one to the wizard |
102
- | `runs.upload(runId, { data, mime, name })` | A file of the person; the asset id goes into an image or file field with `answerPage` |
103
- | `runs.transcribe(runId, { data, mime })` | What is said in a recording of the person (a voice message), written down with the tenant’s audio model and charged to the run. Up to 10 MB |
104
-
105
- A refused command throws an error with a `status` and a `code` (`not_found`, `invalid`,
106
- `refused`, `no_credits`); an `invalid` one also carries the fields that did not fit as
107
- `data.fields`. A route that lets it through answers that status with `{ error, code }`.
108
-
109
- ## What the person sees
110
-
111
- - The wizard’s first page offers the runners that are on beside “Let’s go”.
112
- - A hand-off is a link to the same run; nothing is asked twice. The run page knows the
113
- door’s person through the run, and “What this wizard remembers” is theirs there too.
114
- - The space’s results carry the door a run came through.
115
-
116
- ## The runner’s part of the share dialog
117
-
118
- The row of a channel runner, with its number, keyword, link and QR code, comes from its
119
- `address`. What the owner changes per wizard, such as the keyword, the studio half registers as
120
- a section, and the share dialog draws it under its gear while the runner is on and set up:
121
-
122
- ```tsx
123
- studio.registerShareSection({ runner: "whatsapp", component: ShareSection });
124
-
125
- function ShareSection({ wizard }: StudioShareSectionProps) {
126
- // wizard: { id, title }; the plugin's own routes hold the rest.
127
- }
128
- ```
129
-
130
- One section per runner. After a change, invalidating the query `["wizard-runners", wizard.id]`
131
- redraws the row. The settings a channel needs once per tenant (the number, the token)
132
- go into a [settings section](./studio.md).
133
-
134
- ### Setting up inside the dialog
135
-
136
- “Set up” in a row opens the plugin’s settings section, unless the studio half registers a
137
- setup. That setup opens inside the dialog instead, as a view with a back arrow, at the dialog’s
138
- height:
139
-
140
- ```tsx
141
- studio.registerShareSetup({
142
- runner: "sms",
143
- title: () => t("setupTitle"),
144
- component: Setup,
145
- notice: Notice,
146
- });
147
-
148
- function Setup({ wizard, Actions, done }: StudioShareSetupProps) {
149
- return (
150
- <>
151
- <p>…</p>
152
- <Actions>
153
- <Button onClick={() => ask.mutate()}>{t("request")}</Button>
154
- </Actions>
155
- </>
156
- );
157
- // done({ title: t("requested"), text: "…", tone: "waiting" }) goes back.
158
- }
159
- ```
160
-
161
- | | |
162
- |---|---|
163
- | `title` | The view’s heading, a function: the language can change |
164
- | `component` | Gets `{ wizard: { id, title }, Actions, done }`. What it renders inside `Actions` goes to the foot of the dialog, where the dialog’s own buttons are. `done(banner?)` goes back to the main view and asks the rows again; `banner` (`{ title, text?, tone? }`, `tone` `done` green or `waiting` plain) shows on top |
165
- | `notice` | Optional: a banner above the rows while the runner has news (“Your number is here”), drawn by the plugin. It draws nothing while there is no news. It gets `{ wizard, open }`; `open()` opens the setup. The dialog shows the banner of the first runner that is on |
166
-
167
- One setup per runner. A setup that asks the server for something calls the plugin’s own routes;
168
- the rows show what `problem` answers after `done`.
169
-
170
- ## A thread door from the SDK
171
-
172
- A messenger runs a wizard one message at a time: a field per question, options to tap or to
173
- number, a link to the screen for what the thread cannot take, the result as pictures and links.
174
- That conversation is the same on every messenger; the SDK holds it, and a plugin brings the
175
- surface: how a question is drawn there, how a file is fetched.
176
-
177
- ```ts
178
- import { ThreadDoor, type ThreadSurface } from "@engenty/wizards/plugin/thread";
179
-
180
- const surface: ThreadSurface = {
181
- runner: "sms",
182
- asks: ["text", "number", "select", "multiselect", "toggle", "date", "email", "url", "location"],
183
- async send(thread, prompt) {
184
- // prompt.kind: "text" | "choice" | "location" | "link" | "media": draw it as the channel allows.
185
- await twilio.send(thread.id, toText(prompt, thread.state.lang));
186
- },
187
- };
188
-
189
- const door = new ThreadDoor({ runs: server.runs, surface, offered, watch, unwatch, log });
190
- // A webhook: door.inbound(thread, message). A run that changed: door.resume(thread).
191
- ```
192
-
193
- | | |
194
- |---|---|
195
- | `ThreadSurface.asks` | The field kinds the thread asks itself; a page with any other field goes to the screen as a link |
196
- | `send(thread, prompt)` | A `choice` is drawn as buttons, a list or numbered lines; a typed number or title counts as a tap, the door works that out. `link` and `media` carry a URL |
197
- | `media(ref)` | A file the person sent, by what the webhook named; without it files hand off |
198
- | `mayDeliver`, `reach` | A messenger with a window (WhatsApp’s 24 hours): whether a free message may go out now, and the link by other means when not |
199
- | `offered()` | The wizards switched on for the runner (`runs.wizards`) with their keywords; a keyword in the thread starts its wizard, else the door offers the menu |
200
- | `watch(thread)`, `unwatch(runId)` | Hear the run (`runs.subscribe`) and call `door.resume` when it moves; the plugin keeps the subscriptions |
201
- | `Thread` | `{ id, name, runId, state, lastInboundAt, lastMessageId }`: the plugin keeps it in a table per person and hands it to the door before and after |
202
-
203
- Once a wizard runs, the door speaks the wizard’s language. Before that, it speaks the language
204
- all offered wizards share; when they differ, it keeps the language it spoke last, which is
205
- English in a new thread.
206
-
207
- A messenger plugin is a surface of this door: the webhook on a public route, the keyword table,
208
- the number and the keyword in the share dialog are the plugin’s; buttons and lists, or numbered
209
- lines and links, are its surface.
210
-
211
- ## A call
212
-
213
- A call has no thread and no screen: the person talks with a realtime speech model, and the
214
- model fills the run through tools, as the chat’s live voice does in the browser. The runtime
215
- hands a plugin the tenant’s speech model for it:
216
-
217
- ```ts
218
- const { apiKey, model } = await server.speech.conversation();
219
- // Throws with the status 503 and the code `no_model` while no OpenAI key is set under Models.
220
- ```
221
-
222
- A call plugin keeps the audio out of the runtime: the telephony provider hands the call to the
223
- speech model’s SIP endpoint with a token in a header, the model’s provider posts the incoming
224
- call to the plugin’s public route, and the plugin accepts it with the wizard’s rules and tools
225
- and answers the model’s tool calls over a WebSocket, driving the run with `server.runs`. What a
226
- voice cannot take goes out as a link.
227
-
228
- ## Not there yet
229
-
230
- - An event when a wizard is published, for a runner that prepares something per wizard.