wizards 0.2.46 → 0.2.48

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 (130) hide show
  1. package/apps/runtime/dist/agents/{project-assistant.js → studio-assistant.js} +199 -69
  2. package/apps/runtime/dist/agents/website.js +25 -2
  3. package/apps/runtime/dist/app.js +5 -1
  4. package/apps/runtime/dist/assistant/browser.js +26 -0
  5. package/apps/runtime/dist/assistant/docs.js +158 -0
  6. package/apps/runtime/dist/assistant/knows.js +325 -0
  7. package/apps/runtime/dist/assistant/primer.js +26 -0
  8. package/apps/runtime/dist/authoring/guide.js +5 -0
  9. package/apps/runtime/dist/cli/features.js +50 -0
  10. package/apps/runtime/dist/cli/main.js +4 -1
  11. package/apps/runtime/dist/connectors/plugin-connections.js +123 -29
  12. package/apps/runtime/dist/db/migrations/tenant/0012_assistant_chat.sql +40 -0
  13. package/apps/runtime/dist/db/migrations/tenant/meta/0012_snapshot.json +3132 -0
  14. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
  15. package/apps/runtime/dist/db/schema.js +30 -0
  16. package/apps/runtime/dist/docs/dev/index.md +34 -0
  17. package/apps/runtime/dist/docs/dev/meta.json +7 -0
  18. package/apps/runtime/dist/docs/dev/plugins/connections.md +70 -0
  19. package/apps/runtime/dist/docs/dev/plugins/events.md +86 -0
  20. package/apps/runtime/dist/docs/dev/plugins/examples.md +99 -0
  21. package/apps/runtime/dist/docs/dev/plugins/index.md +72 -0
  22. package/apps/runtime/dist/docs/dev/plugins/layout.md +88 -0
  23. package/apps/runtime/dist/docs/dev/plugins/meta.json +29 -0
  24. package/apps/runtime/dist/docs/dev/plugins/pro-modules.md +59 -0
  25. package/apps/runtime/dist/docs/dev/plugins/quick-start.md +92 -0
  26. package/apps/runtime/dist/docs/dev/plugins/reference.md +298 -0
  27. package/apps/runtime/dist/docs/dev/plugins/reloading.md +75 -0
  28. package/apps/runtime/dist/docs/dev/plugins/routes.md +123 -0
  29. package/apps/runtime/dist/docs/dev/plugins/runners.md +184 -0
  30. package/apps/runtime/dist/docs/dev/plugins/server.md +191 -0
  31. package/apps/runtime/dist/docs/dev/plugins/shipping.md +98 -0
  32. package/apps/runtime/dist/docs/dev/plugins/space.md +260 -0
  33. package/apps/runtime/dist/docs/dev/plugins/starters.md +62 -0
  34. package/apps/runtime/dist/docs/dev/plugins/studio.md +261 -0
  35. package/apps/runtime/dist/docs/dev/plugins/styling.md +109 -0
  36. package/apps/runtime/dist/docs/dev/plugins/tables.md +102 -0
  37. package/apps/runtime/dist/docs/dev/plugins/tools.md +128 -0
  38. package/apps/runtime/dist/docs/meta.json +3 -0
  39. package/apps/runtime/dist/docs/user/ai-apps.md +99 -0
  40. package/apps/runtime/dist/docs/user/assistant.md +52 -0
  41. package/apps/runtime/dist/docs/user/build-a-wizard.md +79 -0
  42. package/apps/runtime/dist/docs/user/command-line.md +76 -0
  43. package/apps/runtime/dist/docs/user/connectors.md +80 -0
  44. package/apps/runtime/dist/docs/user/data.md +61 -0
  45. package/apps/runtime/dist/docs/user/first-start.md +42 -0
  46. package/apps/runtime/dist/docs/user/index.md +45 -0
  47. package/apps/runtime/dist/docs/user/install.md +76 -0
  48. package/apps/runtime/dist/docs/user/meta.json +29 -0
  49. package/apps/runtime/dist/docs/user/models.md +100 -0
  50. package/apps/runtime/dist/docs/user/plugins.md +61 -0
  51. package/apps/runtime/dist/docs/user/run.md +92 -0
  52. package/apps/runtime/dist/docs/user/server.md +50 -0
  53. package/apps/runtime/dist/docs/user/space.md +97 -0
  54. package/apps/runtime/dist/docs/user/steps.md +196 -0
  55. package/apps/runtime/dist/docs/user/test-and-share.md +210 -0
  56. package/apps/runtime/dist/docs/user/troubleshooting.md +57 -0
  57. package/apps/runtime/dist/engine/runner.js +12 -5
  58. package/apps/runtime/dist/features.js +123 -0
  59. package/apps/runtime/dist/manage.js +24 -0
  60. package/apps/runtime/dist/plugins/discovery.js +11 -0
  61. package/apps/runtime/dist/plugins/loader.js +12 -0
  62. package/apps/runtime/dist/routes/internal.js +3 -0
  63. package/apps/runtime/dist/routes/studio.js +126 -73
  64. package/apps/runtime/dist/services/assistant-chats.js +267 -0
  65. package/apps/runtime/dist/services/project-index.js +1 -1
  66. package/apps/runtime/dist/services/space-origin.js +45 -2
  67. package/apps/web/dist/assets/{AboutDialog-DkY1j7k6.js → AboutDialog-CuiVGknS.js} +1 -1
  68. package/apps/web/dist/assets/{ChangelogDialog-820LI5Jt.js → ChangelogDialog-DCEQD3Jd.js} +1 -1
  69. package/apps/web/dist/assets/ChatView-DFxrG2PD.js +10 -0
  70. package/apps/web/dist/assets/EditorPage-B5rzKNMy.js +3 -0
  71. package/apps/web/dist/assets/{FlowPreview-ChXfiMn_.js → FlowPreview-CYoR5DRY.js} +1 -1
  72. package/apps/web/dist/assets/{Harness-CfUfchNw.js → Harness-DAR1u4Dk.js} +1 -1
  73. package/apps/web/dist/assets/HomePage-BnYdh_Nx.js +1 -0
  74. package/apps/web/dist/assets/Marketplace-BDQNwMDB.js +2 -0
  75. package/apps/web/dist/assets/{NewWizardPage-C3NqEGmg.js → NewWizardPage-DztTEUlG.js} +1 -1
  76. package/apps/web/dist/assets/ProjectPage-B7-Lqx9a.js +2 -0
  77. package/apps/web/dist/assets/PublicRunner-CaH3bHHd.js +1 -0
  78. package/apps/web/dist/assets/{ReadOnly-C9P9aiU6.js → ReadOnly-DnB47DQC.js} +1 -1
  79. package/apps/web/dist/assets/RunDrawer-Dv0KRqGA.js +4 -0
  80. package/apps/web/dist/assets/RunnerView-Bzwv1u4j.js +2 -0
  81. package/apps/web/dist/assets/SettingsPage-oVO7CKvc.js +1 -0
  82. package/apps/web/dist/assets/SetupPage-D--8cWA0.js +1 -0
  83. package/apps/web/dist/assets/{SharePage-D5AvnhlY.js → SharePage-DjU08q7T.js} +1 -1
  84. package/apps/web/dist/assets/ThemeSwitch-C3EJRN06.js +1 -0
  85. package/apps/web/dist/assets/arrow-right-F7X_SjK9.js +1 -0
  86. package/apps/web/dist/assets/changelog-BRoVI_JJ.js +1 -0
  87. package/apps/web/dist/assets/{circle-alert-CPo3Naay.js → circle-alert-DdpaAYgd.js} +1 -1
  88. package/apps/web/dist/assets/{definition-CQGiBQ4X.js → definition-CHacJYmI.js} +2 -2
  89. package/apps/web/dist/assets/{external-link-CpU8aJY2.js → external-link-Dfc1VFvS.js} +1 -1
  90. package/apps/web/dist/assets/index-CX_yxZVQ.js +79 -0
  91. package/apps/web/dist/assets/index-Dr0bv52Q.css +1 -0
  92. package/apps/web/dist/assets/{lock-C_WlXIQ0.js → lock-Bu1wDFs8.js} +1 -1
  93. package/apps/web/dist/assets/{refresh-cw-Cli5WGnW.js → refresh-cw-BUDPOT39.js} +1 -1
  94. package/apps/web/dist/assets/{session-miDEdw2c.js → session-Blj2os_v.js} +1 -1
  95. package/apps/web/dist/assets/{settings-menu-ROT8Lbbj.js → settings-menu-BvxRnNtf.js} +1 -1
  96. package/apps/web/dist/assets/{sparkles-CP5H-O1E.js → sparkles-DWGJluyV.js} +1 -1
  97. package/apps/web/dist/assets/{trash-DU-hZpV0.js → trash-D9UB6TtS.js} +1 -1
  98. package/apps/web/dist/assets/ui-GsuU9WTj.js +9 -0
  99. package/apps/web/dist/assets/{upload-DMq5N6Fw.js → upload-BngimDBR.js} +1 -1
  100. package/apps/web/dist/assets/{volume-2-0SfkvOho.js → volume-2-BZju_bOP.js} +1 -1
  101. package/apps/web/dist/index.html +11 -11
  102. package/apps/web/dist/mcp/flow.html +51 -51
  103. package/node_modules/@engenty-wizards/plugin-sdk/dist/index.d.ts +103 -7
  104. package/node_modules/@engenty-wizards/plugin-sdk/dist/studio.d.ts +58 -4
  105. package/node_modules/@engenty-wizards/shared/dist/assistant.d.ts +113 -0
  106. package/node_modules/@engenty-wizards/shared/dist/assistant.js +55 -0
  107. package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +56 -1
  108. package/node_modules/@engenty-wizards/shared/dist/definition.js +94 -4
  109. package/node_modules/@engenty-wizards/shared/dist/feature-flags.d.ts +54 -0
  110. package/node_modules/@engenty-wizards/shared/dist/feature-flags.js +46 -0
  111. package/node_modules/@engenty-wizards/shared/dist/features.d.ts +36 -0
  112. package/node_modules/@engenty-wizards/shared/dist/features.js +78 -0
  113. package/node_modules/@engenty-wizards/shared/dist/run.d.ts +3 -1
  114. package/package.json +1 -1
  115. package/apps/web/dist/assets/ChatView-DBl0iRMg.js +0 -10
  116. package/apps/web/dist/assets/EditorPage-BwJ-hqPg.js +0 -3
  117. package/apps/web/dist/assets/HomePage-BG5OZJkv.js +0 -1
  118. package/apps/web/dist/assets/Marketplace-BWhUJ4UX.js +0 -2
  119. package/apps/web/dist/assets/ProjectPage-Btf0TeP_.js +0 -2
  120. package/apps/web/dist/assets/PublicRunner-BxYinn04.js +0 -1
  121. package/apps/web/dist/assets/RunDrawer-DfnEMPTq.js +0 -4
  122. package/apps/web/dist/assets/RunnerView-CLrGb-oq.js +0 -2
  123. package/apps/web/dist/assets/SettingsPage-FWH84btd.js +0 -1
  124. package/apps/web/dist/assets/SetupPage-BI0kUNVW.js +0 -1
  125. package/apps/web/dist/assets/ThemeSwitch-C1qYFoYP.js +0 -1
  126. package/apps/web/dist/assets/arrow-right-Dpp_mpHe.js +0 -1
  127. package/apps/web/dist/assets/changelog-B6QMrVxX.js +0 -1
  128. package/apps/web/dist/assets/index-CIO9W4pe.js +0 -78
  129. package/apps/web/dist/assets/index-DKHClEy3.css +0 -1
  130. package/apps/web/dist/assets/ui-D92EkdEB.js +0 -9
@@ -0,0 +1,109 @@
1
+ ---
2
+ title: Styles and components
3
+ description: The studio's components, Tailwind against the studio's theme, and why a plugin's styles never leak.
4
+ ---
5
+
6
+ A plugin's page should look like the studio. Two things make that easy: the studio's components
7
+ and its theme.
8
+
9
+ ## Components
10
+
11
+ `@engenty-wizards/web/ui` is what the studio itself is drawn with:
12
+
13
+ | Component | For | Props beside the element's own |
14
+ |---|---|---|
15
+ | `Button` | An action | `variant`: `primary` (default), `secondary`, `ghost`, `quiet`, `danger` · `size`: `sm`, `md`, `lg` · `busy` |
16
+ | `IconButton` | An action that is only an icon | `label`: its name for screen readers and the tooltip |
17
+ | `Input`, `Textarea` | Text. The textarea grows with its content | `minRows`, `maxRows` on the textarea |
18
+ | `Select` | One of a list | `value`, `onChange(value)`, `options: { value, label, disabled? }[]`, `placeholder` |
19
+ | `Segmented` | One or several of a few | `value`, `onChange`, `options: string[]`, `multi` |
20
+ | `Switch` | On or off | `checked`, `onChange(checked)`, `label` |
21
+ | `Swatch` | A colour | The native colour input's |
22
+ | `Label` | A field's label | `hint`, `required` |
23
+ | `Card` | A surface | |
24
+ | `Chip` | A state in a word | `tone`: `neutral` (default), `live`, `warn`, `ember` |
25
+ | `DatePicker` | A date from a month | `value` ("YYYY-MM-DD" or ""), `onChange`, `min`, `max`, `clearable` |
26
+ | `DateRangePicker` | A day or a period in one month: the first click is the start, the second the end | `from`, `to`, `onChange({ from, to })`, `min`, `max` |
27
+ | `TimePicker` | A time of day from an hour and a minute column; arrow keys on the field move it by `step` | `value` ("HH:MM" or ""), `onChange`, `step` (minutes, default 5), `compact` (narrow, no clock) |
28
+ | `PageMenu` | A page's own menu: a list at the side with one level below that slides in, tabs on a phone | `title`, `entries` ({ id, label, icon, to, entries? }), `current`, `footer` |
29
+ | `Composer` | The field a message is written in: text, dictation, files, send | `onSend(text, files)` (false keeps the draft), `placeholder`, `disabled`, `attach`, `floating` |
30
+ | `Dialog` | A modal | `open`, `onClose`, `title`, `wide` |
31
+ | `Spinner`, `Empty` | Loading, and nothing there yet | |
32
+ | `cn(...)` | Joins class names, skipping what is false | |
33
+
34
+ ```tsx
35
+ import { Button, Card, Chip, Label, Input } from "@engenty-wizards/web/ui";
36
+
37
+ <Card className="flex flex-col gap-4 p-5">
38
+ <Label hint="Where the message goes.">Address</Label>
39
+ <Input value={url} onChange={(e) => setUrl(e.target.value)} />
40
+ <div className="flex items-center gap-3">
41
+ <Button busy={save.isPending} onClick={() => save.mutate()}>Save</Button>
42
+ <Chip tone="live">connected</Chip>
43
+ </div>
44
+ </Card>
45
+ ```
46
+
47
+ Icons are from `lucide-react`.
48
+
49
+ ## Tailwind
50
+
51
+ A plugin writes Tailwind classes, as the studio does. The build collects the classes the
52
+ plugin's files use into `dist/client.css`.
53
+
54
+ The theme's names are the studio's:
55
+
56
+ | | Names |
57
+ |---|---|
58
+ | Surfaces | `bg-paper`, `bg-paper-2`, `bg-paper-3`, `bg-card`, `bg-popover`, `bg-accent` |
59
+ | Text | `text-ink`, `text-ink-2`, `text-ink-3`, `text-ink-4` |
60
+ | Lines | `border-border`, `border-border-soft`, `ring-border-soft` |
61
+ | The accent | `ember`, `ember-strong`, `ember-tint`; `primary`, `primary-foreground` |
62
+ | States | `moss` and `moss-tint` (good), `amber` and `amber-tint` (attention), `rose` and `rose-tint` (danger), `cobalt` and `cobalt-tint` (information) |
63
+ | Type | `font-sans`, `font-display` (headings), `font-mono` |
64
+ | Corners | `rounded-sm` to `rounded-3xl`, from the theme's radius |
65
+ | Shadows | `shadow-soft`, `shadow-elevated`, `shadow-overlay` |
66
+ | Variants | `dark:` and `coarse:` (a finger, not a mouse) beside Tailwind's own |
67
+
68
+ The full list is
69
+ [apps/web/src/styles/theme.css](https://github.com/engenty/engenty-wizards/blob/main/apps/web/src/styles/theme.css).
70
+
71
+ ## Rules
72
+
73
+ - **Colours come from the names.** Dark is derived from the theme's values, not a fixed
74
+ palette. A literal colour (`#1a1a1a`, `text-gray-700`) breaks in the other theme.
75
+ - **Check both themes.** The user menu switches between light and dark.
76
+ - **Touch targets.** `coarse:min-h-11` gives a control the 44 px a finger needs. The studio's
77
+ components do that themselves.
78
+ - **Do not style outside your own part.** It would not work anyway: see below.
79
+
80
+ ## Why a plugin's styles never leak
81
+
82
+ `client.css` is built so that it cannot change how the studio looks:
83
+
84
+ - Every rule applies only inside what the plugin draws. The studio wraps each page and section
85
+ of a plugin in an element with `data-plugin="<id>"`, and every rule of `client.css` is nested
86
+ below that.
87
+ - The rules sit in a layer above the studio's utilities, so inside the plugin's part the
88
+ plugin's stylesheet decides.
89
+ - The theme is used by reference: `client.css` carries the names' uses, none of the variables
90
+ and no resets.
91
+
92
+ ## Your own CSS
93
+
94
+ A stylesheet imported in `ui/plugin.tsx` lands in `client.css` as it is:
95
+
96
+ ```tsx
97
+ import "./contacts.css";
98
+ ```
99
+
100
+ It is not nested for you. Begin its class names with the plugin's id (`.contacts-chart`) and use
101
+ the theme's variables for colours: `var(--ink-2)`, `var(--paper-2)`, `var(--ember)`.
102
+
103
+ ## The theme is a contract
104
+
105
+ A plugin is built against the names of the theme at the time of its build. A name that is
106
+ renamed or removed in a later release breaks plugins built before, without an error: the class
107
+ is simply not there. Whoever changes `theme.css` treats its names as a contract for that reason.
108
+ If you build against a name a release added, say in your plugin's description which release it
109
+ needs.
@@ -0,0 +1,102 @@
1
+ ---
2
+ title: Tables
3
+ description: A plugin's own tables in every tenant's database — SQL files that run once, and Drizzle to read and write.
4
+ ---
5
+
6
+ Every tenant has a database of its own (libSQL, the SQLite dialect). A plugin's tables are made
7
+ in each of them, from `.sql` files the plugin brings.
8
+
9
+ ## 1. The table, as SQL
10
+
11
+ `migrations/0001_init.sql`:
12
+
13
+ ```sql
14
+ CREATE TABLE contacts_person (
15
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
16
+ email TEXT NOT NULL UNIQUE,
17
+ name TEXT,
18
+ wizard TEXT NOT NULL,
19
+ seen_at INTEGER NOT NULL
20
+ );
21
+ ```
22
+
23
+ Register the folder when the plugin loads:
24
+
25
+ ```ts
26
+ server.registerMigrations("migrations");
27
+ ```
28
+
29
+ ## 2. The table, for Drizzle
30
+
31
+ `src/schema.ts` describes the same table, so queries are typed:
32
+
33
+ ```ts
34
+ import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
35
+
36
+ export const person = sqliteTable("contacts_person", {
37
+ id: integer("id").primaryKey({ autoIncrement: true }),
38
+ email: text("email").notNull().unique(),
39
+ name: text("name"),
40
+ wizard: text("wizard").notNull(),
41
+ seenAt: integer("seen_at", { mode: "timestamp_ms" }).notNull(),
42
+ });
43
+ ```
44
+
45
+ The runtime does not read this file. It is yours: keep it in step with the SQL by hand.
46
+
47
+ ## 3. Read and write
48
+
49
+ `server.getTenantDb()` is the database of the tenant the current request, step or event belongs
50
+ to, as a Drizzle database:
51
+
52
+ ```ts
53
+ import { desc, eq } from "drizzle-orm";
54
+ import { person } from "./schema";
55
+
56
+ const db = () => server.getTenantDb();
57
+
58
+ const newest = await db().select().from(person).orderBy(desc(person.seenAt)).limit(200);
59
+
60
+ await db()
61
+ .insert(person)
62
+ .values({ email, name, wizard, seenAt: new Date() })
63
+ .onConflictDoUpdate({ target: person.email, set: { name, wizard, seenAt: new Date() } });
64
+
65
+ await db().delete(person).where(eq(person.id, id));
66
+ ```
67
+
68
+ Call `getTenantDb()` inside the handler, the tool or the listener. Outside of them there is no
69
+ tenant.
70
+
71
+ ## How the files run
72
+
73
+ | | |
74
+ |---|---|
75
+ | Once | Each `.sql` file runs once per tenant database. The table `plugin_migration` records which ran |
76
+ | In order | By file name: `0001_init.sql`, `0002_note.sql` |
77
+ | Whole or not | A file and its record go in together or not at all. A file may hold several statements |
78
+ | When | A database gets the files when it opens. The open ones get them when the plugin loads, also when it loads again with a new file |
79
+ | Never back | Nothing is taken back. Unloading or removing a plugin leaves its tables and rows |
80
+
81
+ A file that fails is logged with the plugin's id and the file's name, and the files after it
82
+ wait for that database until it is mended. The tenant's database still opens.
83
+
84
+ ## Rules
85
+
86
+ - **Begin table names with the plugin's id**: `contacts_person`. All plugins and the runtime
87
+ share the database. A `-` in the id becomes `_`.
88
+ - **Never change a file that ran.** It will not run again. Add a new file:
89
+
90
+ ```sql
91
+ ALTER TABLE contacts_person ADD COLUMN phone TEXT;
92
+ ```
93
+
94
+ - **Do not touch the runtime's own tables** in a migration. Their shape changes with releases.
95
+ - **Dates** are integers in milliseconds (`mode: "timestamp_ms"`); they leave a route as ISO
96
+ strings.
97
+
98
+ ## The runtime's own data
99
+
100
+ `getTenantDb()` reaches the whole tenant database, the runtime's tables included. They are not
101
+ a public interface: a release can rename a column. A plugin that must know about runs listens
102
+ to [run events](./events.md) and keeps what it needs in its own table.
@@ -0,0 +1,128 @@
1
+ ---
2
+ title: Tools
3
+ description: A tool an AI step can call — how to register it, how a wizard lists it, and what the model sees.
4
+ ---
5
+
6
+ A tool is a function an AI step may call while it works. The model decides when, from the
7
+ tool's description.
8
+
9
+ ```ts
10
+ server.registerTool({
11
+ name: "lookup",
12
+ title: "Contacts",
13
+ description:
14
+ "Looks a person up by e-mail among the people who ran a wizard of this project before.",
15
+ inputSchema: z.object({ email: z.string().email() }),
16
+ execute: async ({ email }) => {
17
+ const [found] = await db()
18
+ .select()
19
+ .from(person)
20
+ .where(eq(person.email, email.toLowerCase()));
21
+ return found ? { known: true, name: found.name, lastWizard: found.wizard } : { known: false };
22
+ },
23
+ });
24
+ ```
25
+
26
+ | Field | |
27
+ |---|---|
28
+ | `name` | Lower case, digits and `_`, starting with a letter, at most 40 characters. Unique in the plugin |
29
+ | `title` | What the editor calls it. Default: the name |
30
+ | `description` | For the model: what the tool does and when to use it. The assistant reads it too when it builds a wizard |
31
+ | `inputSchema` | A zod schema. `.describe()` on a field tells the model what to put there |
32
+ | `execute(input, step)` | Returns what the model gets back: anything that can be JSON |
33
+
34
+ ## Names
35
+
36
+ | Where | The tool is called |
37
+ |---|---|
38
+ | A step's `tools` in a wizard | `contacts.lookup`: `<plugin id>.<tool name>` |
39
+ | The model | `contacts_lookup`. A `-` in the plugin's id becomes `_`: `run-log.recent` is `run_log_recent` |
40
+ | The editor | Its `title` |
41
+
42
+ ## What `execute` knows
43
+
44
+ The second argument is the step that calls the tool:
45
+
46
+ | | |
47
+ |---|---|
48
+ | `step.runId`, `step.stepId` | The run and the step |
49
+ | `step.tenantId` | The tenant |
50
+ | `step.project` | `{ id, name }` |
51
+ | `step.wizard` | `{ id, title }` |
52
+ | `step.mode` | `"test"` for a test run from the studio, else `"live"`. Keep what a test makes apart: a booking, a message to someone outside |
53
+ | `step.signal` | Aborted when the run is cancelled. Pass it to `fetch` |
54
+ | `step.emit(message)` | Tells the person what the step is doing right now |
55
+
56
+ `server.getTenantDb()` inside `execute` is the database of the tenant the run belongs to.
57
+
58
+ ```ts
59
+ execute: async ({ url }, step) => {
60
+ await step.emit("Asking the price list …");
61
+ const response = await fetch(url, { signal: step.signal });
62
+ return response.json();
63
+ },
64
+ ```
65
+
66
+ ## Errors
67
+
68
+ An error thrown in `execute` does not fail the step. The model gets `{ "error": "<message>" }`
69
+ as the tool's result, with the first 400 characters of the message, and can try again or work
70
+ around it. Throw an error whose message says what was wrong with the input.
71
+
72
+ ## In a wizard
73
+
74
+ A step lists the tool beside the built-in ones:
75
+
76
+ ```json
77
+ "tools": ["web_search", "contacts.lookup"]
78
+ ```
79
+
80
+ - The editor offers the tools of the tenant's plugins in every AI step.
81
+ - The assistant and the MCP authoring guide list them with their descriptions.
82
+ - A draft that names a tool this tenant does not have shows an issue.
83
+ - A run fails at the step that names one. A wizard that uses a plugin's tool runs only where
84
+ that plugin is installed: think of that before you publish a wizard to the cloud or export it.
85
+
86
+ ### Called without a model
87
+
88
+ Where a step only fetches data and hands it on unchanged, it calls the tool itself: no model
89
+ picks the tool, and none copies its answer.
90
+
91
+ ```json
92
+ {
93
+ "id": "free",
94
+ "type": "agent",
95
+ "title": "Freie Termine",
96
+ "call": {
97
+ "tool": "appointments.availability",
98
+ "input": { "duration_minutes": "{{steps.assess.dauer}}", "days": 21 }
99
+ },
100
+ "output": {
101
+ "format": "json",
102
+ "fields": [{ "id": "slots", "kind": "table", "columns": ["start", "end", "label"] }]
103
+ }
104
+ }
105
+ ```
106
+
107
+ - The tool's answer is the step's json output, as it is. `output.fields` name the keys later
108
+ steps read, so the editor and the checks know them.
109
+ - String inputs are templates. A filled-in whole number or `true`/`false` is passed as one; an
110
+ empty one is left out. The input is checked against the tool's schema.
111
+ - What the tool throws is the step's error.
112
+ - It costs no credits and answers as fast as the tool: the free times of a calendar in under a
113
+ second instead of half a minute.
114
+
115
+ ## While a step runs
116
+
117
+ A step that is running keeps the tools it started with. A plugin that loads again changes the
118
+ tools of the next step.
119
+
120
+ ## Write a good tool
121
+
122
+ - One job per tool. Two small tools are easier for a model to choose between than one with a
123
+ `mode` field.
124
+ - Describe the result as well as the input: "returns the working days as a number".
125
+ - Return data, not prose. The step writes the sentences.
126
+ - Bound what it returns: a `limit` with a maximum, the newest 50 rows.
127
+ - A tool that changes something outside says so in its description. There is no
128
+ ask-the-person-first for plugin tools: the step runs them without asking.
@@ -0,0 +1,3 @@
1
+ {
2
+ "pages": ["user", "dev"]
3
+ }
@@ -0,0 +1,99 @@
1
+ ---
2
+ title: AI apps
3
+ description: Run and build your wizards inside Claude Desktop, Cursor, Codex and other AI apps.
4
+ ---
5
+
6
+ Settings → Integrate brings your wizards to where you work. engenty wizards is an MCP server:
7
+ an AI app that adds it gets the tools to find, run and build wizards.
8
+
9
+ ## What an app can do
10
+
11
+ | In the chat | How |
12
+ |---|---|
13
+ | Run a wizard | "Start one of my engenty wizards." The app asks the wizard's questions, shows the review and hands over the downloads. Only published wizards run |
14
+ | See the wizard itself | Apps that show MCP Apps show the wizard as a widget, page by page, and you answer there |
15
+ | Build a wizard | "Use engenty wizards to build a wizard that reads amount, date and sender from an invoice PDF." |
16
+ | Change one | Create, change and publish wizards, find templates and connectors, read and write a wizard's files |
17
+
18
+ - A run in a chat spends what any run of the wizard spends, and so does a test run.
19
+ - What a chat cannot fill in — files, recordings, signatures, line items — is done on the run's
20
+ page in the browser. The app hands you the link.
21
+ - What an app writes shows up live in an open editor, marked with the app's name.
22
+
23
+ ## Apps
24
+
25
+ | App | Shows the wizard as a widget | Name for the command |
26
+ |---|---|---|
27
+ | Claude Desktop | yes | `claude-desktop` |
28
+ | Claude Code | no, a run comes as text | `claude-code` |
29
+ | Codex · ChatGPT app | no | `codex` |
30
+ | Cursor | yes | `cursor` |
31
+ | VS Code (Copilot) | yes | `vscode` |
32
+ | Windsurf | no | `windsurf` |
33
+ | Gemini CLI | no | `gemini` |
34
+ | Goose | yes | `goose` |
35
+ | OpenClaw | no | `openclaw` |
36
+ | LM Studio | no | `lm-studio` |
37
+ | claude.ai, ChatGPT | yes | not on your computer, see below |
38
+
39
+ ## Add an app
40
+
41
+ Pick the app on the Integrate page. "Where does the app run?" has two answers:
42
+
43
+ | | On this computer | At the address |
44
+ |---|---|---|
45
+ | For | An app on the computer engenty wizards is installed on | An app anywhere the address can be reached |
46
+ | Sign-in | None. No key, no port | A key |
47
+ | How | "Add to …" writes engenty wizards into the app's settings | The page shows the command or the config entry to paste |
48
+ | Needs | Nothing running: the app starts engenty wizards itself | engenty wizards running at that address |
49
+
50
+ From a terminal, the same as "On this computer":
51
+
52
+ ```bash
53
+ wizards connect
54
+ ```
55
+
56
+ That adds every AI app found on the computer. Name apps to add only those, and take one out
57
+ again with `disconnect`:
58
+
59
+ ```bash
60
+ wizards connect cursor codex
61
+ wizards disconnect cursor
62
+ ```
63
+
64
+ - The file an app's settings were in before is kept beside it as `<file>.before-engenty`.
65
+ - Quit Claude Desktop before you add it: it writes its settings from memory while it runs.
66
+ - A settings file that is not plain JSON is left alone. The command prints the entry to paste.
67
+
68
+ ## Test it
69
+
70
+ "Test" on the app's panel waits for three things and ticks each off:
71
+
72
+ 1. **The app checks in.** Quit the app completely and start it again, or reload its MCP servers.
73
+ 2. **It called a tool.** In a new chat, write: "Which wizards do I have in engenty?"
74
+ 3. **It showed the wizard as a widget**, in apps that can. Write: "Start one of my engenty
75
+ wizards."
76
+
77
+ ## Apps on the web
78
+
79
+ claude.ai and ChatGPT connect from their makers' servers. They cannot reach your computer: for
80
+ them a wizard runs on engenty.ai. There they sign in in the browser on first use; no key. On
81
+ your computer, use "On this computer" or an app that runs there.
82
+
83
+ ## Keys
84
+
85
+ "At the address" signs an app in with a key. The key is shown once and goes straight into the
86
+ command the page shows.
87
+
88
+ - Each key signs one app in and has every right: treat it like a password.
89
+ - The page lists the keys with their last use. Delete a key and that app is signed out.
90
+
91
+ ## The Claude Code plugin
92
+
93
+ With a public https address, Claude Code can also install a plugin. It adds the `/wizard`
94
+ command and the skills to build and to use wizards:
95
+
96
+ ```bash
97
+ claude plugin marketplace add <your address>/api/claude-plugin/marketplace.json
98
+ claude plugin install engenty-wizards@engenty
99
+ ```
@@ -0,0 +1,52 @@
1
+ ---
2
+ title: The assistant
3
+ description: The chat at the bottom of every studio page. It knows the app, sees the page you are on, shows you where things are and fills the space in.
4
+ ---
5
+
6
+ The assistant stands at the bottom of every page of the studio but the editor, which has a
7
+ conversation of its own. It thinks with what the studio thinks with: your subscription, your
8
+ keys or credits ([Models and account](./models.md)).
9
+
10
+ | Ask it | It |
11
+ |---|---|
12
+ | How something works | Reads this guide (the version you installed) and links the page |
13
+ | Where something is | Opens the page and points at the place |
14
+ | About your account | Looks up your plan, credits and what you used; it never buys or upgrades |
15
+ | About templates | Searches the gallery |
16
+ | About your wizards | Looks at their runs, the failed ones too |
17
+ | To fill in the space | Reads a website or your files ([Space](./space.md#have-it-filled-in)) |
18
+
19
+ It sees the page you write from: where you are, what is open and what the page shows. It may put
20
+ a value into a field for you; you check it and save. It does not press buttons.
21
+
22
+ ## Where it stands
23
+
24
+ | | |
25
+ |---|---|
26
+ | At the bottom | The default. Click the field or the engenty, and the chat rises above it |
27
+ | Small | The engenty at the lower right; a click opens the chat beside it. Data and Results keep it small |
28
+ | Sidebar | Beside the page, on a window wide enough for both |
29
+
30
+ The buttons in the chat's header switch between them; the studio remembers your choice.
31
+
32
+ ## One chat
33
+
34
+ You have one chat, the same on every page and in every space, after a reload and on another
35
+ device. Nobody else in the team sees it.
36
+
37
+ - **New chat** (the menu at the chat's name) closes the chat with a short summary and starts an
38
+ empty one. The assistant keeps the summaries of your last chats in mind.
39
+ - **Earlier chats** lists the closed ones to read. Ask about something you discussed before, and
40
+ the assistant searches them.
41
+
42
+ ## Live chat
43
+
44
+ **Talk** stands where Send does while the field is empty. The chat becomes a call: you speak, a
45
+ pause sends what you said, and the answer is read aloud. Then it listens again; talking over it
46
+ stops its voice.
47
+
48
+ - Chrome and Safari turn your speech into text themselves. Other browsers record, and your
49
+ model for voice notes writes it down.
50
+ - The answer is read with your computer's voices, or with the speech model where one is set up
51
+ (the speaker button in the call).
52
+ - Everything said stays in the chat as messages.
@@ -0,0 +1,79 @@
1
+ ---
2
+ title: Build a wizard
3
+ description: Describe what the wizard should do, or start from a template. Then change it in the conversation or step by step.
4
+ ---
5
+
6
+ ## Start one
7
+
8
+ "New wizard" on the studio's first page gives three ways in:
9
+
10
+ | Way | How |
11
+ |---|---|
12
+ | Describe it | Answer "What should your wizard do?" in your own words and press "Build wizard" |
13
+ | A template | Pick one below the text field. Search, or narrow by industry, result and capability |
14
+ | A package | "Import a wizard package" takes a `.wizard` file someone exported |
15
+
16
+ A description that works says who enters what, what the wizard does with it, and what comes out:
17
+
18
+ > Customers enter their product and audience, the wizard researches competitors and writes a
19
+ > positioning briefing as a PDF.
20
+
21
+ You can change everything afterwards.
22
+
23
+ ### Templates
24
+
25
+ - A template shows how the wizard runs, how long a run takes, what it costs and what it needs
26
+ before you start from it.
27
+ - "Not set up here" names a model this install has no way to yet, for example video. Set it up
28
+ under [Models & account](./models.md), or pick another template.
29
+ - A star keeps a template on this computer, ready without a connection.
30
+ - A wizard started from a template is your copy. Later changes to the template do not touch it.
31
+
32
+ ## The editor
33
+
34
+ | Part | What it is for |
35
+ |---|---|
36
+ | The diagram, left | The steps as a flow with their branches. Click a step to open it |
37
+ | Conversation | Say what should change. The assistant edits the flow and tells you what it did |
38
+ | Steps | One step at a time: its texts, fields, tools and model class. Move it up or down, or delete it |
39
+ | Files | What the wizard needs on every run: widget code, libraries, price lists. Upload your own or let the assistant write them |
40
+ | Runs | The test runs and live runs of this wizard |
41
+
42
+ ### In the conversation
43
+
44
+ - Write what should be different: "Ask for the delivery date on the first page", "Add a review
45
+ before the PDF".
46
+ - Attach files the assistant should look at: an example document, a price list, a screenshot.
47
+ - Dictate instead of typing with the microphone button.
48
+ - If the connection drops, what was already built is saved. Send the message again.
49
+
50
+ ### Step by step
51
+
52
+ Open a step from the diagram or under "Steps". What you can set depends on its type: see
53
+ [Steps](./steps.md).
54
+
55
+ ## When the wizard needs fixes
56
+
57
+ A draft may be incomplete while you work on it. Before you test or share, the editor lists what
58
+ is missing, for example a step that uses an answer asked only later, or a tool that is not
59
+ installed here.
60
+ "Let the assistant fix it" hands that list to the conversation.
61
+
62
+ If a step needs a model this install has no way to, the editor says which. A wizard whose every
63
+ path needs it cannot start; if only one branch needs it, choose another path when testing.
64
+
65
+ ## What makes a good wizard
66
+
67
+ - Write for people who are not technical: plain words, titles phrased as questions.
68
+ - Few pages, one theme per page, at most five fields. Ask only what the result needs.
69
+ - Put a review before anything expensive, such as video, and before the final result.
70
+ - Let the phone do the typing: a photo instead of a description, the location instead of an
71
+ address form, a voice note instead of a long text.
72
+ - Money belongs in a line-items field. The wizard computes net, VAT and total itself; a model
73
+ never does.
74
+ - Facts from the web need a research step before the step that writes.
75
+
76
+ ## Take it with you
77
+
78
+ The download icon in the editor's top bar exports the wizard as a package (`.wizard`): its steps
79
+ and its files. "Import" on the first page of any studio takes it in.
@@ -0,0 +1,76 @@
1
+ ---
2
+ title: Command line
3
+ description: The wizards command — start, setup, status, update — and the install's settings file.
4
+ ---
5
+
6
+ ## Commands
7
+
8
+ | Command | Does |
9
+ |---|---|
10
+ | `wizards` | What runs, and a menu: start, stop, restart, update, start at login, connect, status, setup, help. The first time, the setup runs first. Needs a terminal |
11
+ | `wizards start` | Starts it and opens the studio. It runs in that terminal; Ctrl-C stops it |
12
+ | `wizards studio` | Opens the studio in your browser. When it does not run, it starts as a service first |
13
+ | `wizards setup` | The guided setup again: an AI client to think with, ffmpeg, start at login |
14
+ | `wizards open` | Lets this browser into the running studio. `--print` only shows the link |
15
+ | `wizards status` | What is installed and what runs |
16
+ | `wizards doctor` | Status, and what is wrong |
17
+ | `wizards logs [n]` | The last lines the running install printed (100, or `n`); keys and tokens are taken out |
18
+ | `wizards report` | Sends status, model settings (never a key) and the last 500 log lines to your [linked account](./models.md), so support can look at what went wrong. Nothing is sent unless you run it. The command names the report's id |
19
+ | `wizards stop` | Stops it. The data is kept |
20
+ | `wizards restart` | Stops it and starts it again; after an update, the new version |
21
+ | `wizards update` | Installs the newest version |
22
+ | `wizards autostart on` / `off` | Starts it at login, or no longer. A LaunchAgent on macOS, a systemd user service on Linux |
23
+ | `wizards connect [app …]` | Adds your wizards to your [AI apps](./ai-apps.md): every app found, or the ones you name |
24
+ | `wizards disconnect [app …]` | Takes them out again |
25
+ | `wizards mcp` | The MCP server over stdio. AI apps start it; you do not |
26
+
27
+ | Option | Does |
28
+ |---|---|
29
+ | `--yes`, `-y` | Asks nothing and installs nothing optional |
30
+ | `--client <name>` | Installs this AI client without asking: `codex`, `claude`, `gemini`, `cursor` |
31
+ | `--no-open` | Starts without opening the browser |
32
+ | `--service`, `-s` | Starts it as a service: detached from the terminal, and the command returns. `wizards stop` stops it; its output goes to `logs/runtime.log` |
33
+ | `--version`, `--help` | |
34
+
35
+ Started in a terminal, it runs while that terminal is open; Ctrl-C stops it. With
36
+ `wizards start --service` it keeps running after the terminal closes. If it already
37
+ runs, `wizards start` opens the running one instead of starting a second.
38
+
39
+ ## Where things are
40
+
41
+ | Path | Holds |
42
+ |---|---|
43
+ | `~/.engenty/wizards` | The install. `ENGENTY_HOME` moves `~/.engenty` |
44
+ | `~/.engenty/wizards/data` | Your wizards, results and files. See [Your data](./data.md) |
45
+ | `~/.engenty/wizards/.env` | The settings file |
46
+ | `~/.engenty/wizards/plugins` | [Plugins](./plugins.md) of this install |
47
+ | `~/.engenty/wizards/logs` | Logs: `update.log`, and `runtime.log` when it runs as a service |
48
+ | `~/.local/bin/wizards` | The command |
49
+
50
+ ## Settings
51
+
52
+ Most settings are in the studio. The settings file `~/.engenty/wizards/.env` holds what the
53
+ studio does not: one `NAME=value` per line. Restart after a change.
54
+
55
+ | Setting | Does | Default |
56
+ |---|---|---|
57
+ | `APP_URL` | The address you open. Links and sign-ins use it | `http://localhost:24368` |
58
+ | `API_PORT` | The port | `24368`; the next free one if taken |
59
+ | `CHROME_PATH` | Chrome or Chromium for PDF and PNG exports and browser steps | The installed Google Chrome |
60
+ | `FFMPEG_PATH` | ffmpeg for MP4 videos | `ffmpeg` |
61
+ | `OLLAMA_URL` | Where Ollama answers | `http://127.0.0.1:11434/v1` |
62
+ | `PLUGINS_DIR` | Folders with plugins, comma-separated | `~/.engenty/wizards/plugins` |
63
+ | `PLUGINS_WATCH` | `0`: plugins no longer load again when their files change | `1` |
64
+ | `GEOCODER_URL` | Names the place of a location (street, town). Unset, a location is coordinates only and no position leaves your computer | unset |
65
+ | `LIMIT_DEFAULT_DAILY_RUNS` | Runs a day a shared link allows unless the wizard says otherwise | `50` |
66
+ | `LIMIT_VISITOR_RUNS_PER_HOUR` | Runs an hour one visitor can start | `6` |
67
+ | `RESULT_TTL_DAYS` | Days the result of a run over a wizard's link is kept | `7` |
68
+ | `STORE_TTL_DAYS` | Days what a wizard keeps for a person stays when unused | `400` |
69
+
70
+ The OAuth clients of the built-in connectors go here too: see [Connectors](./connectors.md).
71
+ Every setting, with what it is for, is in
72
+ [.env.example](https://github.com/engenty/engenty-wizards/blob/main/.env.example).
73
+
74
+ The command line hands the app only a short list of your terminal's variables. A key your shell
75
+ exports for another project does not reach it: put it into the settings file, or enter it in
76
+ the studio.