wizards 0.2.55 → 0.2.57

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 (123) hide show
  1. package/README.md +2 -2
  2. package/apps/runtime/dist/cli/autostart.js +1 -1
  3. package/apps/runtime/dist/cli/machine.js +5 -48
  4. package/apps/runtime/dist/cli/report.js +1 -1
  5. package/apps/runtime/dist/db/control-schema.js +13 -0
  6. package/apps/runtime/dist/db/migrations/control/0008_runner.sql +8 -0
  7. package/apps/runtime/dist/db/migrations/control/meta/0008_snapshot.json +505 -0
  8. package/apps/runtime/dist/db/migrations/control/meta/_journal.json +7 -0
  9. package/apps/runtime/dist/db/migrations/tenant/0014_run_answer.sql +2 -0
  10. package/apps/runtime/dist/db/migrations/tenant/meta/0014_snapshot.json +3154 -0
  11. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
  12. package/apps/runtime/dist/db/schema.js +4 -0
  13. package/apps/runtime/dist/docs/dev/index.md +4 -4
  14. package/apps/runtime/dist/docs/dev/plugins/connections.md +4 -3
  15. package/apps/runtime/dist/docs/dev/plugins/events.md +1 -0
  16. package/apps/runtime/dist/docs/dev/plugins/examples.md +10 -9
  17. package/apps/runtime/dist/docs/dev/plugins/index.md +4 -3
  18. package/apps/runtime/dist/docs/dev/plugins/layout.md +2 -1
  19. package/apps/runtime/dist/docs/dev/plugins/meta.json +0 -1
  20. package/apps/runtime/dist/docs/dev/plugins/quick-start.md +4 -3
  21. package/apps/runtime/dist/docs/dev/plugins/reference.md +36 -14
  22. package/apps/runtime/dist/docs/dev/plugins/reloading.md +5 -5
  23. package/apps/runtime/dist/docs/dev/plugins/routes.md +30 -6
  24. package/apps/runtime/dist/docs/dev/plugins/runners.md +15 -10
  25. package/apps/runtime/dist/docs/dev/plugins/server.md +16 -7
  26. package/apps/runtime/dist/docs/dev/plugins/shipping.md +4 -26
  27. package/apps/runtime/dist/docs/dev/plugins/space.md +66 -53
  28. package/apps/runtime/dist/docs/dev/plugins/starters.md +10 -7
  29. package/apps/runtime/dist/docs/dev/plugins/studio.md +33 -12
  30. package/apps/runtime/dist/docs/dev/plugins/styling.md +19 -9
  31. package/apps/runtime/dist/docs/dev/plugins/tables.md +6 -4
  32. package/apps/runtime/dist/docs/dev/plugins/tools.md +22 -12
  33. package/apps/runtime/dist/docs/dev/wizard-format.md +3 -2
  34. package/apps/runtime/dist/docs/user/ai-apps.md +3 -1
  35. package/apps/runtime/dist/docs/user/assistant.md +5 -3
  36. package/apps/runtime/dist/docs/user/build-a-wizard.md +14 -2
  37. package/apps/runtime/dist/docs/user/command-line.md +16 -14
  38. package/apps/runtime/dist/docs/user/connectors.md +17 -12
  39. package/apps/runtime/dist/docs/user/data.md +14 -9
  40. package/apps/runtime/dist/docs/user/first-start.md +13 -6
  41. package/apps/runtime/dist/docs/user/index.md +2 -1
  42. package/apps/runtime/dist/docs/user/install.md +19 -11
  43. package/apps/runtime/dist/docs/user/models.md +44 -22
  44. package/apps/runtime/dist/docs/user/plugins.md +9 -4
  45. package/apps/runtime/dist/docs/user/run.md +14 -9
  46. package/apps/runtime/dist/docs/user/server.md +7 -5
  47. package/apps/runtime/dist/docs/user/space.md +15 -8
  48. package/apps/runtime/dist/docs/user/steps.md +33 -13
  49. package/apps/runtime/dist/docs/user/test-and-share.md +41 -25
  50. package/apps/runtime/dist/docs/user/troubleshooting.md +15 -7
  51. package/apps/runtime/dist/docs/user/wordpress.md +59 -49
  52. package/apps/runtime/dist/engine/asks.js +53 -33
  53. package/apps/runtime/dist/engine/events.js +45 -1
  54. package/apps/runtime/dist/engine/owner.js +32 -0
  55. package/apps/runtime/dist/engine/runner.js +131 -97
  56. package/apps/runtime/dist/env.js +25 -3
  57. package/apps/runtime/dist/harness/apple.js +36 -21
  58. package/apps/runtime/dist/harness/claude.js +1 -1
  59. package/apps/runtime/dist/harness/model.js +2 -2
  60. package/apps/runtime/dist/index.js +13 -2
  61. package/apps/runtime/dist/limits.js +7 -4
  62. package/apps/runtime/dist/media/conversation.js +6 -5
  63. package/apps/runtime/dist/model-errors.js +22 -1
  64. package/apps/runtime/dist/models.js +30 -7
  65. package/apps/runtime/dist/plugins/pro-keys.js +1 -1
  66. package/apps/runtime/dist/plugins/pro-state.js +1 -1
  67. package/apps/runtime/dist/plugins/pro.js +1 -1
  68. package/apps/runtime/dist/plugins/runs.js +20 -15
  69. package/apps/runtime/dist/render/browser-path.js +54 -0
  70. package/apps/runtime/dist/routes/runs.js +67 -38
  71. package/apps/runtime/dist/routes/studio.js +7 -3
  72. package/apps/runtime/dist/services/api.js +3 -1
  73. package/apps/runtime/dist/services/package-file.js +8 -8
  74. package/apps/runtime/dist/services/runs.js +7 -8
  75. package/apps/runtime/dist/tenants/control.js +85 -7
  76. package/apps/runtime/dist/update.js +1 -1
  77. package/apps/web/dist/assets/AboutDialog-DEZCEQlN.js +1 -0
  78. package/apps/web/dist/assets/{ChangelogDialog-BLmJABe4.js → ChangelogDialog-CgnnJj4G.js} +1 -1
  79. package/apps/web/dist/assets/{ChatView-YAiOT6mt.js → ChatView-BnnKdwk4.js} +1 -1
  80. package/apps/web/dist/assets/{EditorPage-C0zMXwlF.js → EditorPage-CeDWjq4z.js} +2 -2
  81. package/apps/web/dist/assets/{FlowPreview-B4lbmeha.js → FlowPreview-Du028FI3.js} +1 -1
  82. package/apps/web/dist/assets/{Harness-_riwRD-c.js → Harness-CEPy4MEp.js} +1 -1
  83. package/apps/web/dist/assets/{Marketplace-B0Nki6J6.js → Marketplace-ms58DQJ9.js} +2 -2
  84. package/apps/web/dist/assets/{NewWizardPage-DkvGgROv.js → NewWizardPage-CEQSNXeZ.js} +1 -1
  85. package/apps/web/dist/assets/{ProjectPage-CFRIPset.js → ProjectPage-CXDpKoK2.js} +1 -1
  86. package/apps/web/dist/assets/{PublicRunner-QJuQB7ff.js → PublicRunner-DMmtmzBX.js} +1 -1
  87. package/apps/web/dist/assets/{ReadOnly-DiOfNtVr.js → ReadOnly-zQecD9OB.js} +1 -1
  88. package/apps/web/dist/assets/{RunDrawer-LjUX3yIv.js → RunDrawer-BIojYB0g.js} +1 -1
  89. package/apps/web/dist/assets/{RunnerView-DkJVfUeG.js → RunnerView-D8OGEoMl.js} +1 -1
  90. package/apps/web/dist/assets/SettingsPage-BlMZL4_d.js +1 -0
  91. package/apps/web/dist/assets/SetupPage-Doz9T3kv.js +1 -0
  92. package/apps/web/dist/assets/{SharePage-CCimr8XT.js → SharePage-DOJXdsyi.js} +1 -1
  93. package/apps/web/dist/assets/{brand-CwLcF9JR.js → brand-DIKyySmf.js} +1 -1
  94. package/apps/web/dist/assets/changelog-B1jhC7Fv.js +1 -0
  95. package/apps/web/dist/assets/{circle-alert-BEDKtkJy.js → circle-alert-B9b9Vb9k.js} +1 -1
  96. package/apps/web/dist/assets/{esm-BCwno33N.js → esm-D6fM9MdG.js} +1 -1
  97. package/apps/web/dist/assets/{index-Dq-Wj6Yo.js → index-nfRuCdVt.js} +4 -4
  98. package/apps/web/dist/assets/{lock-Ce2ofIWG.js → lock-BNvsUKTg.js} +1 -1
  99. package/apps/web/dist/assets/session-CSbo-pmx.js +1 -0
  100. package/apps/web/dist/assets/{settings-menu-DX0JnPBR.js → settings-menu-BGfn4LJE.js} +1 -1
  101. package/apps/web/dist/assets/{ui-mkL5nF_f.js → ui-FW7ypPI6.js} +1 -1
  102. package/apps/web/dist/assets/{upload-BfrqabpO.js → upload-MQ_24gSb.js} +1 -1
  103. package/apps/web/dist/assets/{volume-2-C3GeMqc-.js → volume-2-B1mj20eS.js} +1 -1
  104. package/apps/web/dist/index.html +6 -6
  105. package/apps/web/dist/install.sh +2 -2
  106. package/apps/web/dist/mcp/flow.html +1 -1
  107. package/modules/calls/dist/client.css +1 -1
  108. package/modules/sms/dist/client.css +1 -1
  109. package/modules/whatsapp/dist/client.css +1 -1
  110. package/node_modules/@engenty-wizards/shared/dist/definition.js +1 -0
  111. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.js +1 -0
  112. package/node_modules/@engenty-wizards/shared/dist/fit.js +1 -0
  113. package/node_modules/@engenty-wizards/shared/dist/run.d.ts +152 -2
  114. package/node_modules/@engenty-wizards/shared/dist/run.js +135 -1
  115. package/node_modules/@engenty-wizards/shared/dist/store.js +1 -0
  116. package/node_modules/@engenty-wizards/shared/dist/surface.js +1 -0
  117. package/package.json +2 -2
  118. package/apps/runtime/dist/docs/dev/plugins/pro-modules.md +0 -59
  119. package/apps/web/dist/assets/AboutDialog-BelD7JCn.js +0 -1
  120. package/apps/web/dist/assets/SettingsPage-BKZ1KLfP.js +0 -1
  121. package/apps/web/dist/assets/SetupPage-Rqlo16Lk.js +0 -1
  122. package/apps/web/dist/assets/changelog-Bg5ZBu5p.js +0 -1
  123. package/apps/web/dist/assets/session-BuVghS-e.js +0 -1
@@ -99,6 +99,13 @@
99
99
  "when": 1791728617995,
100
100
  "tag": "0013_run_origin",
101
101
  "breakpoints": true
102
+ },
103
+ {
104
+ "idx": 14,
105
+ "version": "6",
106
+ "when": 1791752213176,
107
+ "tag": "0014_run_answer",
108
+ "breakpoints": true
102
109
  }
103
110
  ]
104
111
  }
@@ -115,6 +115,10 @@ export const run = sqliteTable("run", {
115
115
  error: text("error"),
116
116
  /** What a running step is asking the person right now (a login, a code); null = nothing. */
117
117
  ask: text("ask", { mode: "json" }).$type(),
118
+ /** The person's answer to `ask`, written by the web for the runner that waits on it. */
119
+ answer: text("answer", { mode: "json" }).$type(),
120
+ /** An autopilot drives this test run (an MCP client fills its pages): it asks nobody. */
121
+ unattended: integer("unattended", { mode: "boolean" }).notNull().default(false),
118
122
  costMicros: integer("cost_micros").notNull().default(0),
119
123
  /** Set once the result is shared: `/s/<token>` shows it read-only. */
120
124
  shareToken: text("share_token"),
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Developer
3
3
  description: Extend engenty wizards with plugins — tools for AI steps, routes with their own tables, pages in the studio.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  engenty wizards is extended with **plugins**. A plugin adds to a runtime without changing its
@@ -23,7 +24,7 @@ editor and `wizards validate` are on [The wizard format](./wizard-format.md).
23
24
  ## What you need
24
25
 
25
26
  - An install of engenty wizards, or a checkout of
26
- [engenty/engenty-wizards](https://github.com/engenty/engenty-wizards).
27
+ [engenty/wizards](https://github.com/engenty/wizards).
27
28
  - TypeScript. A plugin's server half is read as TypeScript, without a build.
28
29
  - A checkout, if your plugin draws in the studio: its studio half is built with the studio's
29
30
  own tools.
@@ -34,6 +35,5 @@ These pages are about extending it. The code's own documents are in the reposito
34
35
 
35
36
  | | |
36
37
  |---|---|
37
- | [docs/development.md](https://github.com/engenty/engenty-wizards/blob/main/docs/development.md) | Run it from source, the checks, how it is built, releases |
38
- | [docs/manage-contract.md](https://github.com/engenty/engenty-wizards/blob/main/docs/manage-contract.md) | What a runtime and a Manage-App speak |
39
- | [docs/marketplace-contract.md](https://github.com/engenty/engenty-wizards/blob/main/docs/marketplace-contract.md) | What a runtime and the marketplace speak |
38
+ | [docs/development.md](https://github.com/engenty/wizards/blob/main/docs/development.md) | Run it from source, the checks, how it is built, releases |
39
+ | [docs/marketplace-contract.md](https://github.com/engenty/wizards/blob/main/docs/marketplace-contract.md) | What a runtime and the marketplace speak |
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Accounts
3
3
  description: Accounts a plugin connects for a space — a calendar, a mailbox — through the runtime's built-in connectors.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  A wizard's connections belong to the person who runs it. A plugin that works for the whole
@@ -19,7 +20,7 @@ const { url } = await server.connections.start({ space, connector: "google-calen
19
20
 
20
21
  // Later, in a route, a tool or a job:
21
22
  const [account] = await server.connections.list(space);
22
- const { events } = await server.connections.call(account.id, "list_events", {
23
+ const { events } = await server.connections.call<{ events: unknown[] }>(account.id, "list_events", {
23
24
  time_min: from,
24
25
  time_max: to,
25
26
  });
@@ -54,8 +55,8 @@ window.addEventListener("message", (event) => {
54
55
 
55
56
  - A second sign-in to the same account for the same space replaces the first one's tokens and
56
57
  actions; it does not add a second connection.
57
- - A local install without a Google client of its own connects Google through the Manage-App of
58
- the linked account. Without a linked account `start` throws an error with the status `409` and
58
+ - A local install without a Google client of its own connects Google through the linked
59
+ engenty account. Without a linked account `start` throws an error with the status `409` and
59
60
  the code `account`, whose message says what to do.
60
61
 
61
62
  ## What `call` refuses
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Events
3
3
  description: Do something when a run ends or a space changes — keep who it was, post a message, read a new document.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  A plugin can listen to runs that reach their end, and to spaces that change.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Examples
3
3
  description: Two plugins in the repository to read, run and copy.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  The repository has two example plugins. Load them from a checkout with one line in `.env.local`:
@@ -11,7 +12,7 @@ PLUGINS_DIR=examples/plugins
11
12
 
12
13
  ## notify: one file
13
14
 
14
- [examples/plugins/notify.ts](https://github.com/engenty/engenty-wizards/blob/main/examples/plugins/notify.ts)
15
+ [examples/plugins/notify.ts](https://github.com/engenty/wizards/blob/main/examples/plugins/notify.ts)
15
16
  posts a line to an address whenever a real run of a wizard reached its end.
16
17
 
17
18
  ```ts
@@ -47,7 +48,7 @@ export default plugin;
47
48
 
48
49
  ## run-log: both halves
49
50
 
50
- [examples/plugins/run-log](https://github.com/engenty/engenty-wizards/tree/main/examples/plugins/run-log)
51
+ [examples/plugins/run-log](https://github.com/engenty/wizards/tree/main/examples/plugins/run-log)
51
52
  keeps a line for every run that ended and shows them in the studio.
52
53
 
53
54
  | File | Shows |
@@ -56,9 +57,9 @@ keeps a line for every run that ended and shows them in the studio.
56
57
  | `migrations/0001_init.sql` | A table, `run_log_entry`, with an index |
57
58
  | `migrations/0002_space.sql` | A column added later: the space of each line |
58
59
  | `src/schema.ts` | The same table for Drizzle |
59
- | `src/plugin.ts` | A listener on all three events, two routes (one for admins only, one that filters by space) and a tool, `run-log.recent` |
60
+ | `src/plugin.ts` | A listener on the three run events (`run.done`, `run.failed`, `run.cancelled`), two routes (one for admins only, one that filters by space) and a tool, `run-log.recent` |
60
61
  | `ui/messages.ts` | Words in German and English |
61
- | `ui/plugin.tsx` | A section of the space page with the space's last runs, under Ergebnisse, a page with the whole log, and a section of the settings that empties the log |
62
+ | `ui/plugin.tsx` | A section of the space page with the space's last runs, under Results, a page with the whole log, and a section of the settings that empties the log |
62
63
  | `package.json` | A workspace package whose `build` script builds the studio half |
63
64
 
64
65
  Build its studio half once, or on every save:
@@ -74,8 +75,9 @@ node scripts/build-plugin.mjs examples/plugins/run-log --watch
74
75
  Then, in the studio:
75
76
 
76
77
  1. Test a wizard to its end.
77
- 2. The space's tile in the app bar → Ergebnisse shows "Runs" below the results: the last five runs of
78
- the space's wizards. Its last line opens the page with the whole log.
78
+ 2. The house icon in the app bar opens the space's page; under Results, "Runs" stands below the
79
+ results: the last five runs of the space's wizards. Its last line opens the page with the
80
+ whole log.
79
81
  3. Settings → Runs shows how many lines are kept and deletes them.
80
82
  4. An AI step can list the tool "Run log" and tell how the last runs ended.
81
83
 
@@ -93,7 +95,6 @@ The `contacts` plugin these pages build up, piece by piece:
93
95
 
94
96
  ## Tests to read
95
97
 
96
- [apps/runtime/test/plugins.test.ts](https://github.com/engenty/engenty-wizards/blob/main/apps/runtime/test/plugins.test.ts)
98
+ [apps/runtime/test/plugins.test.ts](https://github.com/engenty/wizards/blob/main/apps/runtime/test/plugins.test.ts)
97
99
  writes small plugins into a folder and exercises them: finding, loading, a plugin that fails,
98
- routes, tables per tenant, tools in a run, events, reloading. `managed.test.ts` beside it covers
99
- which tenant has which plugin.
100
+ routes, tables per tenant, tools in a run, events, reloading.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Plugins
3
3
  description: What a plugin is, what its two halves can add, and what it may touch.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  A plugin adds to a runtime without changing its code. The runtime finds plugins at start, loads
@@ -13,10 +14,10 @@ them from their files and loads one again when its files change.
13
14
  | A tool for AI steps | In a step's tool list, in the assistant's and the MCP authoring guide | [Tools](./tools.md) |
14
15
  | A runner: a door a wizard runs through, with the run API that drives runs from it | In the share dialog's channels, at `/w/<token>/<runner>`, on the wizard's first page | [Runners](./runners.md) |
15
16
  | A block and tools for every AI step of a space | In the steps' instructions | [The space](./space.md) |
16
- | Pages, tables and files of a space's Wissen, with Kategorien | In Wissen, and in what `project_search` finds | [The space](./space.md#wissen-a-plugin-writes) |
17
+ | Pages, tables and files of a space's Knowledge, with Kategorien | In Knowledge, and in what `project_search` finds | [The space](./space.md#knowledge-a-plugin-writes) |
17
18
  | Texts in a space's search index | In what `project_search` finds | [The space](./space.md#the-search-index) |
18
19
  | Tools of the studio's assistant, and their cards | In the assistant's chat, on every page | [The space](./space.md#tools-of-the-space-assistant) |
19
- | Routes | Below `/api/studio/plugins/<id>`; public ones below `/api/public/plugins/<id>` | [Routes](./routes.md) |
20
+ | Routes | Below `/api/studio/plugins/<id>`, for programs with a key below `/api/v1/plugins/<id>`; public ones below `/api/public/plugins/<id>` | [Routes](./routes.md) |
20
21
  | Tables | In every tenant's database | [Tables](./tables.md) |
21
22
  | A listener on runs that end and spaces that change | Nowhere: it works in the background | [Events](./events.md) |
22
23
  | A job, again and again | Nowhere: it works in the background | [The server half](./server.md#jobs) |
@@ -34,7 +35,7 @@ them from their files and loads one again when its files change.
34
35
  | Runs in | The runtime | The studio, after sign-in |
35
36
  | Loaded | As TypeScript, no build | As the built script |
36
37
  | Types | `@engenty-wizards/plugin-sdk` | `@engenty-wizards/plugin-sdk/studio` |
37
- | Adds | Tools, runners, routes, tables, listeners, jobs, starters, Wissen, the space's block, index and assistant tools | Pages, icons in the app bar, sections of the settings and of the space page, cards in the assistant's chat |
38
+ | Adds | Tools, runners, routes, tables, listeners, jobs, starters, accounts, Knowledge, the space's block, index and assistant tools | Pages, icons in the app bar, sections of the settings and of the space page, a runner's part of the share dialog, cards in the assistant's chat |
38
39
 
39
40
  A plugin has one half or both. The studio half talks to the server half over the plugin's own
40
41
  routes.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Files and manifest
3
3
  description: Where the runtime looks for plugins, what counts as one, and what engenty.plugin.json says.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  ## Where the runtime looks
@@ -81,7 +82,7 @@ A path in the manifest must stay inside the plugin's folder.
81
82
 
82
83
  | The plugin imports | It comes from |
83
84
  |---|---|
84
- | `@engenty-wizards/plugin-sdk`, `zod`, `drizzle-orm`, `drizzle-orm/sqlite-core` | The runtime's own copies, wherever the plugin's file is |
85
+ | `@engenty-wizards/plugin-sdk`, `@engenty-wizards/plugin-sdk/thread`, `zod`, `drizzle-orm`, `drizzle-orm/sqlite-core` | The runtime's own copies, wherever the plugin's file is |
85
86
  | Its own files | Beside it, as TypeScript |
86
87
  | Anything else | A `node_modules` the plugin brings beside it |
87
88
 
@@ -21,7 +21,6 @@
21
21
  "---Running---",
22
22
  "reloading",
23
23
  "shipping",
24
- "pro-modules",
25
24
  "---Reference---",
26
25
  "reference",
27
26
  "examples"
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Quick start
3
3
  description: A tool for AI steps in one file. No build, no restart.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  You write one file. The running app finds it, and every AI step can use the tool in it.
@@ -55,9 +56,9 @@ export default definePlugin((wizards) => {
55
56
 
56
57
  The app loaded the file the moment you saved it.
57
58
 
58
- - **Settings → Plugins** lists `workdays` with its tool "Working days".
59
- - **In the editor**, open an AI step: "Working days" is in its tool list, beside "Web search"
60
- and the other built-in tools.
59
+ - **Settings → Plugins** lists `workdays`, with `workdays.count` under "Tools for steps".
60
+ - **In the editor**, open an AI step: `workdays.count` is in its list of tools, beside
61
+ `web_search` and the other built-in ones; the line below the list names it "Working days".
61
62
  - **In the conversation**, ask for it: "Add a step that counts the working days between the two
62
63
  dates." The assistant knows the tool from its description.
63
64
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Reference
3
3
  description: Every call, type, address and setting of the plugin framework on one page.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  ## Server half
@@ -34,17 +35,19 @@ The default export is a `WizardsPluginFactory`: `(wizards: WizardsPluginApi) =>
34
35
  | `registerSpaceContext({ block, tools? })` | [The space](./space.md). `block(space): string \| null` |
35
36
  | `registerAssistantTool(tool: PluginAssistantTool)` | [The space](./space.md#tools-of-the-space-assistant) |
36
37
  | `index.put({ space, key, title, text, link? })`, `index.remove(space, key?)` | [The space](./space.md#the-search-index) |
38
+ | `spaceData.putCategories`, `.putPage`, `.putTable`, `.putFile`, `.putDocument`, `.list`, `.readPages`, `.files`, `.readFile`, `.remove`, `.summarize` | [The space](./space.md#knowledge-a-plugin-writes). Knowledge of a space: pages, tables and files under keys of the plugin's own, with their Kategorien; and the space's own pages and files to read |
37
39
  | `registerHttpRoute(route: PluginRoute)` | [Routes](./routes.md) |
38
40
  | `registerPublicRoute(route: PluginPublicRoute)` | [Routes](./routes.md#public-routes) |
39
41
  | `publicUrl(path): Promise<string>` | The full address of a public route for the current tenant |
40
42
  | `registerMigrations(folder: string)` | [Tables](./tables.md). The folder is relative to the plugin's |
41
43
  | `on(event, listener)` | [Events](./events.md). `event`: `"run.done"`, `"run.failed"`, `"run.cancelled"`, `"space.created"`, `"space.updated"`, `"space.deleted"`, `"space.file.ready"`, `"space.file.removed"` |
42
- | `every(name, everyMs, handler)` | [Jobs](./server.md#jobs). `handler({ tenantId, lastRun, signal })` |
44
+ | `every(name, everyMs, handler)` | [Jobs](./server.md#jobs). Per tenant that has the plugin, at most once per `everyMs` (a minute at least). `handler({ tenantId, lastRun, signal })` |
43
45
  | `web.fetch(url, init?)`, `web.read(url, { signal? })` | [The web](./server.md#the-web) |
44
46
  | `documents.parse({ data, name, mime }, { signal? })` | [Documents](./server.md#documents). `{ markdown, pages }` |
45
47
  | `getTenantDb(): PluginDb` | The current tenant's database, a Drizzle libSQL database |
46
48
  | `generate(request): Promise<{ text, object }>` | Asks a model of the current tenant: `prompt`, `system?`, `schema?`, `model?`, `maxOutputTokens?`, `signal?`. See [The server half](./server.md#asking-a-model) |
47
- | `connections.available(ids)`, `.start({ space, connector, actions })`, `.list(space)`, `.get(id)`, `.call(id, action, input)`, `.remove(id)` | [Accounts](./connections.md) |
49
+ | `connections.available(ids)`, `.start({ space, connector, actions })`, `.connect({ space, connector, actions, credentials })`, `.list(space)`, `.get(id)`, `.call(id, action, input)`, `.remove(id)` | [Accounts](./connections.md) |
50
+ | `secrets.seal(value): string`, `secrets.unseal(sealed)` | [Keys of the plugin's own](./server.md#keys-of-the-plugins-own). `unseal` gives null for a value sealed on another install |
48
51
  | `registerAssistantContext({ block })` | [The space](./space.md#the-assistant-on-the-plugins-own-page). `block(space): string \| null` |
49
52
  | `registerStarter(starter: PluginStarter)` | [Starters](./starters.md). Known as `<plugin id>.<starter id>` |
50
53
  | `onUnload(fn)` | Runs when the plugin unloads or loads again |
@@ -110,7 +113,8 @@ interface PluginRuns {
110
113
  answers?: Record<string, unknown>;
111
114
  runner?: string;
112
115
  }): Promise<{ runId: string; ticket: string; refused: { field: string; message: string }[] | null }>;
113
- report(runId: string, options?: { waitSeconds?: number }): Promise<PluginRunReport>;
116
+ report(runId: string, options?: { waitSeconds?: number; draft?: Record<string, unknown> }): Promise<PluginRunReport>;
117
+ wizards(runner: string): Promise<{ wizardId: string; token: string; title: string; lang: "de" | "en" }[]>;
114
118
  answerPage(runId: string, stepId: string, values: Record<string, unknown>): Promise<void>;
115
119
  review(runId: string, stepId: string, action: PluginReviewAction): Promise<void>;
116
120
  answerAsk(runId: string, askId: string, answer: "allow" | "skip"): Promise<void>;
@@ -118,9 +122,14 @@ interface PluginRuns {
118
122
  subscribe(runId: string, listener: (signal: PluginRunSignal) => void): () => void;
119
123
  handoffUrl(runId: string): Promise<string>;
120
124
  upload(runId: string, file: { data: Uint8Array | ArrayBuffer; mime: string; name: string }): Promise<{ assetId: string }>;
125
+ transcribe(runId: string, file: { data: Uint8Array | ArrayBuffer; mime: string }): Promise<{ text: string }>;
121
126
  }
122
127
  ```
123
128
 
129
+ `waitSeconds` is at most 45. `draft`: the answers a door has so far for the page shown, so a
130
+ field's `shown` follows them. `wizards(runner)`: the published wizards that switched the runner
131
+ on. `transcribe`: a recording of the person written down, charged to the run.
132
+
124
133
  `PluginRunReport` is what `get_run` gives an MCP client: status, the step, `waitingFor` (a
125
134
  page with its fields shown, a review, a question), outputs with signed links, cost,
126
135
  `browserUrl`. The types carry the fields.
@@ -220,6 +229,7 @@ The default export is a `StudioPlugin`: `(studio: StudioPluginContext) => void`.
220
229
  | `studio.registerPage({ path, component, wide? })` | A page at `/studio<path>` |
221
230
  | `studio.registerNav({ to, label, icon })` | An icon in the app bar. `label: () => string` |
222
231
  | `studio.registerSettingsSection({ id, label, icon, component, menu? })` | A section at `/studio/settings/<id>` |
232
+ | `studio.registerShareSection({ runner, component })` | [Runners](./runners.md#the-runners-part-of-the-share-dialog). The runner's own part of the share dialog, once it is switched on for a wizard. `component` gets `{ wizard: { id, title } }` |
223
233
  | `studio.registerAssistantCard({ tool, component })` | Draws a tool's result in the space assistant's chat. `component` gets `{ data, send }` |
224
234
  | `studio.registerSpaceSection({ id, group?, label, hint?, component })` | A section of a part of the space page at `/studio/space/<group>#<id>`; `group`: `info`, `knowledge` (default), `data` or `results` |
225
235
  | `studio.useCrumbs(items)` | A hook: the trail in the top bar for the page shown, `{ label, to? }[]`, instead of a heading of the page's own |
@@ -242,9 +252,9 @@ The default export is a `StudioPlugin`: `(studio: StudioPluginContext) => void`.
242
252
  | Tool id in a wizard | `<plugin id>.<tool name>` | `run-log.recent` |
243
253
  | Tool name for the model | The id with `_` for `.` and `-` | `run_log_recent` |
244
254
  | Starter id | Lower case, digits and `-`, starting with a letter, at most 40 characters | `book` |
245
- | Starter id in a list of templates | `<plugin id>.<starter id>` | `appointments.book` |
255
+ | Starter id in a list of templates | `<plugin id>.<starter id>` | `contacts.follow-up` |
246
256
  | Table name | Begins with the plugin's id | `run_log_entry` |
247
- | Runner id | Lower case, digits and `-`, at most 24 characters; not `steps`, `chat` or a sub-path of a wizard's address | `kiosk` |
257
+ | Runner id | Lower case, digits and `-`, starting with a letter, at most 24 characters; not `steps`, `chat` or a sub-path of a wizard's address | `kiosk` |
248
258
  | Element around what a plugin draws | `data-plugin="<plugin id>"` | |
249
259
 
250
260
  ## Addresses
@@ -253,18 +263,30 @@ All below `/api/studio/plugins`, all signed in:
253
263
 
254
264
  | Address | | Who |
255
265
  |---|---|---|
256
- | `GET /` | The tenant's plugins: id, name, version, tools, where the built files are, what did not load | Everyone |
266
+ | `GET /` | The tenant's plugins: id, name, version, description, tools, where the built files are, why a server half did not load; and what looked like a plugin and is none | Everyone; what is none: owners and admins, alone |
257
267
  | `ALL /<id>/…` | The plugin's own routes | Members of a tenant that has the plugin; `role: "admin"` routes owners and admins |
258
268
  | `GET /-/assets/<id>/client.js`, `/client.css` | The built studio half | Members of a tenant that has the plugin |
259
- | `GET /-/events` | A stream that says when a plugin loaded again | A runtime that runs alone |
260
-
261
- And public, nobody signed in: `/w/<token>/<runner>` serves a plugin's page runner for a wizard
262
- that switched it on (built; from source `/api/public/wizards/<token>/runners/<runner>`).
269
+ | `GET /-/events` | A stream that says when a plugin loaded again | Everyone, alone |
263
270
  | `POST /-/reload` | Loads every plugin again | Owners and admins, alone |
264
271
  | `POST /-/reload/<id>` | Loads one plugin again | Owners and admins, alone |
265
272
 
273
+ "Alone": where the runtime runs alone, not as the runtime of engenty.ai.
274
+
275
+ For programs, with an API key or an access token:
276
+
277
+ | Address | | Who |
278
+ |---|---|---|
279
+ | `ALL /api/v1/plugins/<id>/…` | The plugin's own routes, as the key's person. [With a key](./routes.md#with-a-key) | `GET` with `wizards:read`, the rest with `wizards:write`; `403` `plugin` where the account lacks the plugin |
280
+
281
+ And public, nobody signed in:
282
+
283
+ | Address | |
284
+ |---|---|
285
+ | `ALL /api/public/plugins/<id>/<ref>/…` | A plugin's public routes; `<ref>` names the tenant. `server.publicUrl` gives the full address |
286
+ | `/w/<token>/<runner>` | A plugin's page runner for a wizard that switched it on (built; from source `/api/public/wizards/<token>/runners/<runner>`) |
287
+
266
288
  The studio's addresses of a plugin: `/studio<path>` for its pages, `/studio/settings/<id>` for a
267
- section.
289
+ settings section, `/studio/space/<group>#<id>` for a section of the space page.
268
290
 
269
291
  ## Settings
270
292
 
@@ -273,8 +295,8 @@ In the install's `.env`:
273
295
  | Setting | | Default |
274
296
  |---|---|---|
275
297
  | `PLUGINS_DIR` | Folders to look for plugins in, comma-separated, besides the runtime's `modules/` | Installed app: `~/.engenty/wizards/plugins`. Checkout: none |
276
- | `PLUGINS_WATCH` | `0`: plugins do not load again when their files change | `1` where the runtime runs alone. Never as the runtime of a Manage-App |
277
- | `PLUGINS_DEFAULT` | Runtime of a Manage-App: ids of the plugins every tenant has | none |
298
+ | `PLUGINS_WATCH` | `0`: plugins do not load again when their files change | `1` |
299
+ | `PLUGIN_JOBS` | `0`: this runtime runs no jobs (`server.every`), for one whose jobs another process runs | `1` |
278
300
 
279
301
  ## Files
280
302
 
@@ -292,7 +314,7 @@ In the install's `.env`:
292
314
  |---|---|
293
315
  | `packages/plugin-sdk/src/` | The types, with their comments |
294
316
  | `apps/runtime/src/plugins/` | Finding, loading, tables, events |
295
- | `apps/runtime/src/routes/plugins.ts` | The addresses above |
317
+ | `apps/runtime/src/routes/plugins.ts` | The addresses above; `apps/runtime/src/routes/api.ts` the ones for programs |
296
318
  | `apps/web/src/plugins/` | The studio's side |
297
319
  | `scripts/build-plugin.mjs` | The build of a studio half |
298
320
  | `apps/runtime/test/plugins.test.ts` | Loading, routes, tools, tables per tenant, reloading |
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: While it runs
3
3
  description: Save a file and the plugin loads again — what reloads, what survives, and how to work on a plugin.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  A runtime that runs alone watches its plugins. You do not restart it while you write one.
@@ -66,10 +67,9 @@ A loop that needs no restart, from a checkout:
66
67
  4. Open the plugin's page in the studio and edit. The server half reloads on save; the page
67
68
  updates when the build finished.
68
69
 
69
- The runtime's log names the plugins it loaded at start (`plugins: contacts, workdays`) and
70
- prints why one did not load.
70
+ The runtime's log names the plugins it loaded at start, the ones that ship with it first
71
+ (`plugins: calls, sms, whatsapp, contacts, workdays`), and prints why one did not load.
71
72
 
72
- ## A runtime of a Manage-App
73
+ ## On engenty.ai
73
74
 
74
- Nothing reloads there: a reload would hit every tenant at once. A new version of a plugin comes
75
- with a new start of the runtime. See [Shipping](./shipping.md).
75
+ Nothing reloads there: a new version of a plugin comes with a new start of the service.
@@ -1,10 +1,11 @@
1
1
  ---
2
2
  title: Routes
3
3
  description: HTTP routes below the plugin's own address — signed in, inside the person's tenant.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
- A plugin's routes live below `/api/studio/plugins/<id>`. Every request is a signed-in person's,
7
- inside that person's tenant.
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.
8
9
 
9
10
  ```ts
10
11
  // GET /api/studio/plugins/contacts/
@@ -58,7 +59,7 @@ server.registerHttpRoute({
58
59
  |---|---|
59
60
  | Returns a value | `200` with the value as JSON. `undefined` becomes `null` |
60
61
  | Returns a `Response` | That response: a file, a redirect, another status |
61
- | Throws an error with a `status` and a `code` | That status with `{ "error": "<message>", "code": "<code>" }` |
62
+ | Throws an error with a `status` (400 to 599) and a `code` (a string) | That status with `{ "error": "<message>", "code": "<code>" }` |
62
63
  | Throws anything else | `500` with `{ "error": "The plugin failed.", "code": "plugin_failed" }`. The error itself is logged, not sent |
63
64
 
64
65
  Send a `code`, not a sentence for the person. The studio half says it in the person's language:
@@ -69,12 +70,35 @@ throw Object.assign(new Error("No such contact."), { status: 404, code: "no_cont
69
70
 
70
71
  ## Who can call a route
71
72
 
72
- - Only the studio, signed in. A request without a session gets `401` before it reaches the
73
- plugin.
74
- - Only people of a tenant that has the plugin. For any other tenant the address answers `404`.
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`.
75
77
  - Not the people who run a wizard on its link, and not the outside world. For a webhook of
76
78
  another service, a plugin has [public routes](#public-routes).
77
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 (on your own
84
+ install Settings → Integrate makes one, on engenty.ai the account) or an access token of
85
+ engenty.ai:
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. Without it: `403` with the code
96
+ `insufficient_scope`.
97
+ - A plugin the runtime has but the key's account does not answers `403` with the code `plugin`.
98
+ An id it 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
+
78
102
  ## Public routes
79
103
 
80
104
  A public route answers anyone: a CMS that says a page changed, another service's webhook. Its
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  title: Runners
3
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.2.56
4
5
  ---
5
6
 
6
- A runner is a way to run a wizard. The runtime has two: the stepped page at `/w/<token>` and
7
- the chat at `/w/<token>/chat`. A plugin adds more. The owner switches them on per wizard in
8
- the share dialog; the link opens the default, the others answer under their own address or
9
- from their own channel.
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 only where a speech model is set up. A plugin adds more. The
10
+ owner switches them on per wizard in the share dialog; the link opens the default, the others
11
+ answer under their own address or from their own channel.
10
12
 
11
13
  ## Register a runner
12
14
 
@@ -29,10 +31,11 @@ server.registerRunner({
29
31
 
30
32
  | | |
31
33
  |---|---|
32
- | `id` | Lower case, digits and `-`, at most 24 characters. The sub-path of the wizard's address |
34
+ | `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" |
35
+ | `label` | `{ de, en }`: its name in German and English |
33
36
  | `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 |
34
37
  | `capabilities` | What the runner takes in and shows; see below |
35
- | `page` | A page runner's handler: what `/w/<token>/<id>` answers with. Nobody is signed in |
38
+ | `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 |
36
39
  | `problem` | `() => string \| null`, may be async: why the runner cannot be used in the current tenant right now ("Not connected: Settings → WhatsApp"), asked inside the tenant whenever the studio lists the runners. With a problem the owner cannot switch it on |
37
40
 
38
41
  A page runner is served at `/w/<token>/<id>` for every wizard that switched it on. From
@@ -43,7 +46,8 @@ right address either way.
43
46
  ### Capabilities
44
47
 
45
48
  The runner declares; the runtime works out per wizard how far it gets, and the editor shows it:
46
- everything in the channel, hands off to the page at these steps, or not possible.
49
+ everything in the channel, hands off to the page at these steps, or not possible. A kind the
50
+ runtime does not know throws when the runner is registered.
47
51
 
48
52
  | Field | Says |
49
53
  |---|---|
@@ -93,10 +97,11 @@ server.registerPublicRoute({
93
97
  | `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 |
94
98
  | `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 |
95
99
  | `runs.upload(runId, { data, mime, name })` | A file of the person; the asset id goes into an image or file field with `answerPage` |
96
- | `runs.transcribe(runId, { data, mime })` | What is said in a recording of the person (a voice message), written down with the tenant's listener and charged to the run |
100
+ | `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 |
97
101
 
98
- A refused command throws an error with `code` (`invalid`, `refused`, `no_credits`) and the
99
- fields that did not fit, which a route passes on as it is.
102
+ A refused command throws an error with a `status` and a `code` (`not_found`, `invalid`,
103
+ `refused`, `no_credits`); an `invalid` one also carries the fields that did not fit as
104
+ `data.fields`. A route that lets it through answers that status with `{ error, code }`.
100
105
 
101
106
  ## What the person sees
102
107
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: The server half
3
3
  description: The function a plugin exports, what it is handed, and the rules it runs under.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  The server half is a file whose default export is a function. The runtime calls it once when the
@@ -36,16 +37,22 @@ export default definePlugin((wizards) => {
36
37
  | `registerTool(tool)` | A tool for AI steps | [Tools](./tools.md) |
37
38
  | `registerSpaceContext(context)` | A block and tools for every AI step of a space | [The space](./space.md) |
38
39
  | `registerAssistantTool(tool)` | A tool of the space assistant | [The space](./space.md#tools-of-the-space-assistant) |
39
- | `spaceData.putPage(input)`, `putTable`, `putFile`, `putDocument`, `putCategories`, … | Wissen of a space: pages, tables, files and Kategorien | [The space](./space.md#wissen-a-plugin-writes) |
40
+ | `registerAssistantContext(context)` | What the space assistant is told on the plugin's own page | [The space](./space.md#the-assistant-on-the-plugins-own-page) |
41
+ | `spaceData.putPage(input)`, `putTable`, `putFile`, `putDocument`, `putCategories`, … | Knowledge of a space: pages, tables, files and Kategorien | [The space](./space.md#knowledge-a-plugin-writes) |
40
42
  | `index.put(entry)`, `index.remove(space, key?)` | Texts in the space's search index | [The space](./space.md#the-search-index) |
41
43
  | `registerHttpRoute(route)` | A route below `/api/studio/plugins/<id>` | [Routes](./routes.md) |
42
44
  | `registerPublicRoute(route)`, `publicUrl(path)` | A route anyone may call, and its address | [Routes](./routes.md#public-routes) |
45
+ | `registerRunner(runner)` | A door a wizard runs through, beside the page and the chat | [Runners](./runners.md) |
46
+ | `runs.start(…)`, `report`, `answerPage`, … | Drives runs from the plugin's own door | [Runners](./runners.md#drive-a-run) |
47
+ | `speech.conversation()` | The tenant's realtime speech model, for a call | [Runners](./runners.md#a-call) |
43
48
  | `registerMigrations(folder)` | `.sql` files with the plugin's tables | [Tables](./tables.md) |
44
49
  | `on(event, listener)` | Called when a run ends or a space changes | [Events](./events.md) |
45
- | `connections.start(…)`, `list`, `call`, … | Accounts of a space, through the built-in connectors | [Accounts](./connections.md) |
50
+ | `connections.available(…)`, `start`, `connect`, `list`, `call`, … | Accounts of a space, through the built-in connectors | [Accounts](./connections.md) |
51
+ | `registerStarter(starter)` | A wizard the plugin brings as a template | [Starters](./starters.md) |
46
52
  | `every(name, everyMs, handler)` | A job, again and again | below |
47
53
  | `web.fetch(url, init?)`, `web.read(url)` | Requests to the web, guarded | below |
48
54
  | `documents.parse(file)` | A file as Markdown | below |
55
+ | `secrets.seal(value)`, `secrets.unseal(sealed)` | Keys of the plugin's own, sealed for a table | below |
49
56
  | `getTenantDb()` | The database of the tenant the current request, step or event belongs to | [Tables](./tables.md) |
50
57
  | `generate(request)` | Asks a model of the current tenant | below |
51
58
  | `onUnload(fn)` | Something to undo when the plugin unloads | below |
@@ -68,7 +75,7 @@ values in a [table](./tables.md).
68
75
 
69
76
  ## Tenants
70
77
 
71
- A runtime serves one tenant on a person's computer and many as the runtime of a Manage-App.
78
+ A runtime serves one tenant on a person's computer and many on engenty.ai.
72
79
  Either way a plugin never names a tenant:
73
80
 
74
81
  - A route, a tool and a listener each run inside one tenant.
@@ -116,6 +123,7 @@ server.every("refresh", 60 * 60_000, async ({ tenantId, lastRun, signal }) => {
116
123
 
117
124
  - The handler runs for every tenant that has the plugin, inside that tenant, at most once per
118
125
  `everyMs`. A minute is the least.
126
+ - A job's name is lower case, digits and `_`, once per plugin.
119
127
  - When it ran is kept: a restart does not start the count again. A runtime that was off runs a
120
128
  due job once when it starts, not once per turn it missed. A local install runs jobs while it
121
129
  runs.
@@ -137,9 +145,9 @@ const res = await server.web.fetch(`${origin}/sitemap.xml`, {
137
145
 
138
146
  - Both refuse addresses of this machine and of the local network, after a redirect too, as the
139
147
  runtime's own requests do.
140
- - `read` gives the page's text as Markdown and every link, absolute and each once. A page with
141
- hardly any text without its scripts is drawn in a browser first. `etag` and
142
- `lastModified` are what the server sent, for asking later whether the page changed. `jsonld`
148
+ - `read` gives the page's text as Markdown and its links, absolute and each once (up to
149
+ 2,000). A page with hardly any text without its scripts is drawn in a browser first. `etag`
150
+ and `lastModified` are what the server sent, for asking later whether the page changed. `jsonld`
143
151
  is the page's structured data (its `application/ld+json` blocks, parsed): a shop's product
144
152
  page says title, price, availability and image there exactly, without a model.
145
153
  - `fetch` is `fetch` behind the guard: for a sitemap, `robots.txt`, a question with
@@ -186,6 +194,7 @@ is mended.
186
194
 
187
195
  ## Imports
188
196
 
189
- `@engenty-wizards/plugin-sdk`, `zod`, `drizzle-orm` and `drizzle-orm/sqlite-core` come from the
197
+ `@engenty-wizards/plugin-sdk` (and `@engenty-wizards/plugin-sdk/thread`), `zod`, `drizzle-orm` and
198
+ `drizzle-orm/sqlite-core` come from the
190
199
  runtime's own copies, so a schema or a table a plugin makes is one the runtime understands. See
191
200
  [Files and manifest](./layout.md#dependencies) for everything else.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Shipping
3
3
  description: Hand a plugin to someone else, put it into a server's image, and decide which tenant has it.
4
+ version: 0.2.56
4
5
  ---
5
6
 
6
7
  ## To someone's install
@@ -61,34 +62,11 @@ installed app and in the Docker image. A module there is part of the open produc
61
62
  A plugin that is not part of the open product stays out of `modules/` and goes into a folder of
62
63
  `PLUGINS_DIR`.
63
64
 
64
- engenty's own closed plugins reach a local install as [Pro modules](./pro-modules): signed
65
- packages from the linked account, on while its plan includes them.
66
-
67
65
  ## Which tenant has a plugin
68
66
 
69
- | The runtime runs | A tenant has |
70
- |---|---|
71
- | Alone: one person's install, your own server | Every plugin the runtime loaded |
72
- | As the runtime of a Manage-App | The plugins in `PLUGINS_DEFAULT`, and the ones the Manage-App lists for that tenant |
73
-
74
- In a runtime of a Manage-App:
75
-
76
- - Plugins are installed by whoever runs the runtime, into the image or a folder of
77
- `PLUGINS_DIR`. A tenant cannot install one.
78
- - `PLUGINS_DEFAULT` is a comma-separated list of ids every tenant has.
79
- - The Manage-App switches further ones on per tenant: `modules` in its answer to
80
- `GET /v1/tenants/:id`
81
- ([manage-contract.md](https://github.com/engenty/engenty-wizards/blob/main/docs/manage-contract.md)).
82
- It learns which plugins a runtime carries from `GET /api/internal/plugins` (with the
83
- runtime's service key), so a plan's modules are picked from what exists.
84
- - For a tenant without a plugin, that plugin does not exist: no routes, no tools, no listeners,
85
- no studio half.
86
- - A plugin's tables are made in every tenant's database, whether the tenant has the plugin or
87
- not.
88
- - Nothing reloads while it runs.
89
-
90
- So one image serves tenants with different sets of plugins: the plugin is in the image, and the
91
- Manage-App decides who has it.
67
+ On an install of your own, on your computer or your own server, every tenant has every plugin
68
+ the runtime loaded. On engenty.ai the service installs the plugins and switches them on per
69
+ account; a person cannot install one there.
92
70
 
93
71
  ## Versions
94
72