@engenty/wizards-runtime 0.7.11 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +5 -1
  2. package/apps/runtime/dist/authoring/guide.js +14 -2
  3. package/apps/runtime/dist/cli/exec.js +4 -1
  4. package/apps/runtime/dist/connectors/builtin.js +4 -2
  5. package/apps/runtime/dist/connectors/index.js +35 -4
  6. package/apps/runtime/dist/connectors/smtp.js +221 -0
  7. package/apps/runtime/dist/db/migrations/tenant/0018_share_job.sql +18 -0
  8. package/apps/runtime/dist/db/migrations/tenant/meta/0018_snapshot.json +3460 -0
  9. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
  10. package/apps/runtime/dist/db/schema.js +19 -0
  11. package/apps/runtime/dist/docs/dev/index.md +25 -13
  12. package/apps/runtime/dist/docs/dev/meta.json +8 -2
  13. package/apps/runtime/dist/docs/dev/wizard-format/agent-steps.md +112 -0
  14. package/apps/runtime/dist/docs/dev/wizard-format/branches.md +63 -0
  15. package/apps/runtime/dist/docs/dev/wizard-format/film-steps.md +47 -0
  16. package/apps/runtime/dist/docs/dev/wizard-format/generate-steps.md +57 -0
  17. package/apps/runtime/dist/docs/dev/wizard-format/index.md +188 -0
  18. package/apps/runtime/dist/docs/dev/wizard-format/lists-and-connections.md +65 -0
  19. package/apps/runtime/dist/docs/dev/wizard-format/meta.json +19 -0
  20. package/apps/runtime/dist/docs/dev/wizard-format/pages-and-fields.md +102 -0
  21. package/apps/runtime/dist/docs/dev/wizard-format/review-and-result.md +64 -0
  22. package/apps/runtime/dist/docs/dev/wizard-format/templates.md +57 -0
  23. package/apps/runtime/dist/docs/dev/wizard-format/validate.md +63 -0
  24. package/apps/runtime/dist/docs/dev/wizard-format/views-and-widgets.md +103 -0
  25. package/apps/runtime/dist/docs/dev/wizard-format/wizard-file.md +147 -0
  26. package/apps/runtime/dist/docs/user/run.md +21 -4
  27. package/apps/runtime/dist/docs/user/steps.md +26 -1
  28. package/apps/runtime/dist/docs/user/test-and-share.md +3 -2
  29. package/apps/runtime/dist/engine/requirements.js +22 -7
  30. package/apps/runtime/dist/engine/runner.js +17 -8
  31. package/apps/runtime/dist/env.js +5 -0
  32. package/apps/runtime/dist/harness/antigravity.js +2 -10
  33. package/apps/runtime/dist/harness/claude.js +2 -10
  34. package/apps/runtime/dist/harness/codex.js +5 -11
  35. package/apps/runtime/dist/harness/cursor.js +2 -10
  36. package/apps/runtime/dist/harness/env.js +23 -0
  37. package/apps/runtime/dist/harness/index.js +6 -3
  38. package/apps/runtime/dist/routes/runs.js +106 -6
  39. package/apps/runtime/dist/routes/studio.js +12 -0
  40. package/apps/runtime/dist/sharing/agent.js +65 -0
  41. package/apps/runtime/dist/sharing/files.js +121 -0
  42. package/apps/runtime/dist/sharing/index.js +298 -0
  43. package/apps/runtime/dist/sharing/jobs.js +186 -0
  44. package/apps/runtime/dist/sharing/state.js +116 -0
  45. package/apps/runtime/dist/sharing/targets/browser.js +131 -0
  46. package/apps/runtime/dist/sharing/targets/connector.js +63 -0
  47. package/apps/runtime/dist/sharing/targets/email.js +98 -0
  48. package/apps/runtime/dist/sharing/targets/slack.js +54 -0
  49. package/apps/runtime/dist/sharing/targets/storage.js +164 -0
  50. package/apps/runtime/dist/sharing/types.js +13 -0
  51. package/apps/runtime/dist/texts.js +108 -0
  52. package/apps/runtime/dist/tools/browser.js +48 -0
  53. package/apps/runtime/dist/tools/connector.js +3 -2
  54. package/apps/runtime/dist/tools/store.js +18 -1
  55. package/apps/web/dist/assets/AboutDialog-CiiSwL4t.js +1 -0
  56. package/apps/web/dist/assets/{ChangelogDialog-CZrd-MgC.js → ChangelogDialog-BEyz7LNE.js} +1 -1
  57. package/apps/web/dist/assets/ChatView-9RkWts5F.js +10 -0
  58. package/apps/web/dist/assets/EditorPage-CCsKKcYo.js +4 -0
  59. package/apps/web/dist/assets/{FlowPreview-oX_Emm7u.js → FlowPreview-CLf8WHiG.js} +1 -1
  60. package/apps/web/dist/assets/{Harness-DiB8CBdY.js → Harness-jc3jpWvI.js} +2 -2
  61. package/apps/web/dist/assets/NewWizardChannels-BPGZ4pfP.js +1 -0
  62. package/apps/web/dist/assets/NewWizardPage-tidycL7Y.js +7 -0
  63. package/apps/web/dist/assets/OnboardingPage-DtVuaIuv.js +1 -0
  64. package/apps/web/dist/assets/ProjectPage-BsWgCP5z.js +1 -0
  65. package/apps/web/dist/assets/PublicRunner-CkA_etKX.js +1 -0
  66. package/apps/web/dist/assets/{ReadOnly-CD5YWvrW.js → ReadOnly-BVwbqvpi.js} +1 -1
  67. package/apps/web/dist/assets/RunDrawer-CkFpnWCC.js +4 -0
  68. package/apps/web/dist/assets/{RunnerView-BW1h4x63.js → RunnerView-CxTFM-lx.js} +1 -1
  69. package/apps/web/dist/assets/SettingsPage-DM1wNAE7.js +1 -0
  70. package/apps/web/dist/assets/SetupPage-BKnQqiab.js +1 -0
  71. package/apps/web/dist/assets/{SharePage-B6u9kS12.js → SharePage-CTTSudtp.js} +1 -1
  72. package/apps/web/dist/assets/changelog-DBEwyB1f.js +1 -0
  73. package/apps/web/dist/assets/{esm-C-ZWeuhU.js → esm-DtNAg8uF.js} +1 -1
  74. package/apps/web/dist/assets/index-V1M59Yez.css +1 -0
  75. package/apps/web/dist/assets/index-xIz8znhq.js +14 -0
  76. package/apps/web/dist/assets/{oss-credits-Bc05Qv5H.js → oss-credits-BWE03Xax.js} +1 -1
  77. package/apps/web/dist/assets/{phone-BjmhIKuT.js → phone-5SYD9OrJ.js} +1 -1
  78. package/apps/web/dist/assets/{settings-menu-Dpkp3f56.js → settings-menu-Bn5-7Lqk.js} +1 -1
  79. package/apps/web/dist/assets/ui-s39eGOtW.js +137 -0
  80. package/apps/web/dist/assets/{upload-JX9BcMTq.js → upload-Bevcvx5V.js} +1 -1
  81. package/apps/web/dist/assets/{wrench-BSxnPs2_.js → wrench-ZD5SCsz9.js} +1 -1
  82. package/apps/web/dist/index.html +3 -3
  83. package/apps/web/dist/mcp/flow.html +53 -53
  84. package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +22 -0
  85. package/node_modules/@engenty-wizards/shared/dist/definition.js +26 -0
  86. package/node_modules/@engenty-wizards/shared/dist/run.d.ts +6 -0
  87. package/node_modules/@engenty-wizards/shared/dist/run.js +2 -0
  88. package/node_modules/@engenty-wizards/shared/dist/sharing.d.ts +135 -0
  89. package/node_modules/@engenty-wizards/shared/dist/sharing.js +11 -0
  90. package/node_modules/@engenty-wizards/shared/dist/store.d.ts +8 -0
  91. package/package.json +2 -1
  92. package/plugin/.claude-plugin/plugin.json +1 -1
  93. package/apps/runtime/dist/docs/dev/wizard-format.md +0 -125
  94. package/apps/web/dist/assets/AboutDialog-CPRAlD2H.js +0 -1
  95. package/apps/web/dist/assets/ChatView-DVeERQdi.js +0 -10
  96. package/apps/web/dist/assets/EditorPage-DhUoKcss.js +0 -4
  97. package/apps/web/dist/assets/NewWizardChannels-Ba3XGpro.js +0 -1
  98. package/apps/web/dist/assets/NewWizardPage-C2Oh2sMM.js +0 -7
  99. package/apps/web/dist/assets/OnboardingPage-D_4ShWrL.js +0 -1
  100. package/apps/web/dist/assets/ProjectPage-C58rq50b.js +0 -1
  101. package/apps/web/dist/assets/PublicRunner-CE0ohzyd.js +0 -1
  102. package/apps/web/dist/assets/RunDrawer-Cd8-qHV7.js +0 -4
  103. package/apps/web/dist/assets/SettingsPage-ChYLv-MG.js +0 -1
  104. package/apps/web/dist/assets/SetupPage-hX7deF0g.js +0 -1
  105. package/apps/web/dist/assets/changelog-Dn9LT4MS.js +0 -1
  106. package/apps/web/dist/assets/index-4jH2mkp7.js +0 -14
  107. package/apps/web/dist/assets/index-BwW652E-.css +0 -1
  108. package/apps/web/dist/assets/ui-DMmT-cSO.js +0 -137
@@ -127,6 +127,13 @@
127
127
  "when": 1792271496354,
128
128
  "tag": "0017_run_client",
129
129
  "breakpoints": true
130
+ },
131
+ {
132
+ "idx": 18,
133
+ "version": "6",
134
+ "when": 1792274808825,
135
+ "tag": "0018_share_job",
136
+ "breakpoints": true
130
137
  }
131
138
  ]
132
139
  }
@@ -189,6 +189,25 @@ export const deviceCall = sqliteTable("device_call", {
189
189
  answer: text("answer", { mode: "json" }).$type(),
190
190
  createdAt: createdAt(),
191
191
  }, (t) => [uniqueIndex("device_call_req").on(t.reqId), index("device_call_run").on(t.runId)]);
192
+ /** One result sent or published to a share target: what was asked, what happened, where it is. */
193
+ export const shareJob = sqliteTable("share_job", {
194
+ id: text("id").primaryKey(),
195
+ runId: text("run_id")
196
+ .notNull()
197
+ .references(() => run.id, { onDelete: "cascade" }),
198
+ tenantId: text("tenant_id").notNull(),
199
+ /** The share target's id, and its name and icon when it was sent. */
200
+ target: text("target").notNull(),
201
+ name: text("name").notNull(),
202
+ icon: text("icon").$type().notNull(),
203
+ status: text("status", { enum: ["running", "done", "failed", "cancelled"] }).notNull(),
204
+ request: text("request", { mode: "json" }).$type().notNull(),
205
+ events: text("events", { mode: "json" }).$type().notNull().default([]),
206
+ result: text("result", { mode: "json" }).$type(),
207
+ error: text("error"),
208
+ createdAt: createdAt(),
209
+ updatedAt: updatedAt(),
210
+ }, (t) => [index("share_job_run").on(t.runId, t.createdAt)]);
192
211
  /** What each step of a run cost, in credit micros: the measurements estimates are made from. */
193
212
  export const runCost = sqliteTable("run_cost", {
194
213
  runId: text("run_id")
@@ -1,33 +1,45 @@
1
1
  ---
2
2
  title: Developer
3
- description: Extend engenty wizards with plugins – tools for AI steps, routes with their own tables, pages in the studio.
4
- version: 0.7.3
3
+ description: The wizard format, wizards in other systems and the runner, and plugins that extend engenty wizards.
4
+ version: 0.7.10
5
5
  ---
6
6
 
7
- You extend engenty wizards with **plugins**. A plugin adds to a runtime without changing its
8
- code, and the runtime loads it from its files while it runs.
7
+ These pages are for people who write wizards as files, bring them into other systems or extend
8
+ engenty wizards. A wizard is one JSON document. The runner shows it to people page by page, on
9
+ its own page, on a website, in a chat or in your own app.
9
10
 
10
11
  ## Start here
11
12
 
12
13
  | | |
13
14
  |---|---|
14
- | [What a plugin is](./plugins/index.md) | The two halves, what each can add and what a plugin may touch |
15
- | [Quick start](./plugins/quick-start.md) | A tool for AI steps in one file that works in two minutes |
16
- | [Reference](./plugins/reference.md) | Every call, type, address and setting |
17
- | [Examples](./plugins/examples.md) | Two plugins to read and copy |
15
+ | [The wizard format](./wizard-format/index.md) | A wizard as JSON: its steps, fields, templates and branches |
16
+ | [JSON Schema](./wizard-format/validate.md) | The JSON Schema for your editor and `wizards validate` |
17
+ | [Integration](./integration/index.md) | A published wizard for people, for AI apps and for your own code |
18
+ | [Your own UI](./integration/own-ui.md) | Your app draws the run with `@engenty-wizards/runner` |
19
+ | [Plugins](./plugins/index.md) | Tools for AI steps, routes with their own tables, pages in the studio |
18
20
  | [The API](./api.md) | What a program may rely on, what is private, and how a client names itself |
19
21
 
20
22
  ## Wizards as files
21
23
 
22
- A wizard is JSON, and it travels as a `.wizard` file. [The wizard format](./wizard-format.md)
23
- describes the format, the JSON Schema for your editor and `wizards validate`.
24
+ A wizard is JSON, and it travels as a `.wizard` file. [The wizard format](./wizard-format/index.md)
25
+ describes every step type and field, the `.wizard` file, the JSON Schema for your editor and
26
+ `wizards validate`.
24
27
 
25
28
  ## Wizards in other systems
26
29
 
27
30
  [Integration](./integration/index.md) shows how a published wizard reaches other systems: people
28
- over a link, a website or a channel, AI apps over MCP, and your own code.
31
+ over a link, a website or a channel, AI apps over MCP, and your own code with the runner.
32
+
33
+ ## Plugins
34
+
35
+ A plugin adds to a runtime without changing its code, and the runtime loads it from its files
36
+ while it runs. Start with [What a plugin is](./plugins/index.md) or the
37
+ [Quick start](./plugins/quick-start.md): a tool for AI steps in one file that works in two
38
+ minutes. The [Reference](./plugins/reference.md) lists every call, type, address and setting,
39
+ and [Examples](./plugins/examples.md) has two plugins to read and copy.
40
+
41
+ ## What you need for a plugin
29
42
 
30
- ## What you need
31
43
 
32
44
  - engenty wizards on your computer, or a checkout of
33
45
  [engenty/wizards](https://github.com/engenty/wizards).
@@ -37,7 +49,7 @@ over a link, a website or a channel, AI apps over MCP, and your own code.
37
49
 
38
50
  ## Working on engenty wizards itself
39
51
 
40
- These pages are about extending engenty wizards. The documents about its own code are in the
52
+ These pages are about wizards and plugins. The documents about its own code are in the
41
53
  repository:
42
54
 
43
55
  | | |
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "title": "Developer",
3
- "description": "Extend engenty wizards with plugins: tools for AI steps, routes with their own tables, pages in the studio.",
3
+ "description": "The wizard format, wizards in other systems and the runner, and plugins that extend engenty wizards.",
4
4
  "root": true,
5
5
  "icon": "SquareTerminal",
6
- "pages": ["index", "wizard-format", "plugins", "integration", "api"]
6
+ "pages": [
7
+ "index",
8
+ "wizard-format",
9
+ "integration",
10
+ "plugins",
11
+ "api"
12
+ ]
7
13
  }
@@ -0,0 +1,112 @@
1
+ ---
2
+ title: Agent steps
3
+ description: An AI step's instructions, tools, output, model class, decisions, and one run per entry.
4
+ version: 0.7.10
5
+ ---
6
+
7
+ An `agent` step is an AI step. It reads its `instructions`, may call tools, and returns its
8
+ output.
9
+
10
+ ```json
11
+ {
12
+ "id": "research", "type": "agent", "title": "Look it up",
13
+ "working": "Searching the web…",
14
+ "instructions": "Find three current facts about {{topic}}, each with its source.",
15
+ "tools": ["web_search", "web_fetch"],
16
+ "output": { "format": "markdown" },
17
+ "model": "high"
18
+ }
19
+ ```
20
+
21
+ `working` is the line the person sees while the step runs. `instructions` is a template. See
22
+ [Templates](./templates.md).
23
+
24
+ ## Tools
25
+
26
+ | Key | What the step may use |
27
+ |---|---|
28
+ | `tools` | Built-in tools: `web_search`, `web_fetch`, `browser`, `sandbox`, `image`, `http`, `pages`, `code`. A plugin’s tool by its full id, `<plugin>.<tool>` |
29
+ | `mcp` | Ids of the space’s connected systems (MCP servers) |
30
+ | `connections` | Ids of the wizard’s connections. See [Lists and connections](./lists-and-connections.md) |
31
+
32
+ A wizard that names a plugin’s tool runs only where that plugin is installed. See
33
+ [Tools](../plugins/tools.md).
34
+
35
+ Every agent step also has a few tools without listing them: it reads and writes the wizard’s
36
+ lists, reads uploads and documents, and searches the space’s Knowledge.
37
+
38
+ ## Output
39
+
40
+ `output.format` is `text`, `markdown` (the default) or `json`. A `json` step says what it returns
41
+ with `fields`, one level of keys:
42
+
43
+ ```json
44
+ "output": {
45
+ "format": "json",
46
+ "fields": [
47
+ { "id": "summary", "kind": "text", "description": "Two sentences" },
48
+ { "id": "offers", "kind": "table", "columns": ["name", "price", "url"] },
49
+ { "id": "urgent", "kind": "yesno", "description": "Is the request urgent?" }
50
+ ]
51
+ }
52
+ ```
53
+
54
+ | Kind | What it holds |
55
+ |---|---|
56
+ | `text`, `number` | A text, a number |
57
+ | `list` | A list of texts |
58
+ | `table` | Rows. `columns` fixes the keys every row has |
59
+ | `yesno` | `true` or `false`: the answer to the question in `description` |
60
+ | `choice` | One of `options` |
61
+ | `score` | One level of `options`, lowest first, at most ten |
62
+
63
+ For nested data, such as days that hold meals, use `schema` instead of `fields`. A step has one of
64
+ the two. `surface` gives the result a view of its own. Both are described on
65
+ [Views and widgets](./views-and-widgets.md#a-view-of-an-agent-steps-result).
66
+
67
+ Later steps read a `json` step’s keys as `steps.<id>.<key>`.
68
+
69
+ ## Model class and effort
70
+
71
+ A step names the kind of model it needs, never a model. Which model serves a class is set
72
+ outside the wizard.
73
+
74
+ | `model` | For |
75
+ |---|---|
76
+ | `classifier` | Routing, yes or no, picking from options, a few values from a text |
77
+ | `standard` | Short copy, calling an API, reformatting |
78
+ | `high` | Research with tools, long documents, reasoning over many sources. The default |
79
+ | `highest` | Hard reasoning or writing code. Several times the cost of `high` |
80
+
81
+ `effort` (`low`, `medium`, `high`) tells the model how hard to think, where the bound model can be
82
+ told. Leave it out unless a step is clearly simple or clearly hard.
83
+
84
+ ## Decisions
85
+
86
+ A `classifier` step with no tools whose `json` output holds only `yesno`, `choice` and `score`
87
+ fields is a decision. It is answered in one fast, cheap call. A branch reads its answer, and
88
+ `steps.<id>.<field>.p` is how sure it is, from 0 to 1. See [Branches and loops](./branches.md).
89
+
90
+ ## A plugin tool without a model
91
+
92
+ `call` runs one tool of a plugin once, with these inputs and no model. Its answer is the step’s
93
+ `json` output, as it is. `instructions` stay empty.
94
+
95
+ ```json
96
+ {
97
+ "id": "free", "type": "agent", "title": "Free times",
98
+ "call": { "tool": "appointments.availability", "input": { "duration_minutes": 30, "days": 14 } },
99
+ "output": { "format": "json", "fields": [{ "id": "slots", "kind": "table", "columns": ["start", "end", "label"] }] }
100
+ }
101
+ ```
102
+
103
+ Use it for data a later page shows unchanged. String inputs are templates.
104
+
105
+ ## One run per entry
106
+
107
+ `each` runs the step once per entry, at most twenty times. It names a table or list output
108
+ (`steps.<id>.<key>`) or a stored list (`lists.<id>`). The instructions read the entry as
109
+ `{{item.<column>}}`, and `{{index}}` and `{{count}}` say where the run is.
110
+
111
+ The output is one table, `steps.<id>.rows`: the entry’s columns plus the step’s output fields,
112
+ one row per entry.
@@ -0,0 +1,63 @@
1
+ ---
2
+ title: Branches and loops
3
+ description: A step's next rules, the conditions they test, decisions in words, and loops back.
4
+ version: 0.7.10
5
+ ---
6
+
7
+ Steps run from top to bottom. A step’s `next` sends the run elsewhere:
8
+
9
+ ```json
10
+ "next": [
11
+ { "when": { "field": "steps.check.refund", "op": "equals", "value": true }, "goto": "refund" },
12
+ { "ask": "The person wants an exchange", "goto": "exchange" },
13
+ { "goto": "done" }
14
+ ]
15
+ ```
16
+
17
+ | Rule | Holds when |
18
+ |---|---|
19
+ | `{ when, goto }` | The condition holds |
20
+ | `{ ask, goto }` | A decision finds the statement true of the run |
21
+ | `{ goto }` | No other rule holds: the step’s “otherwise”, one per step |
22
+
23
+ `goto` is a step id or `end`. The first `when` rule that holds wins. After that, all `ask` rules of
24
+ the step are decided together in one cheap call. When none holds, the otherwise rule sends the
25
+ run on, and without one the next step in the list follows.
26
+
27
+ A rule has `when` or `ask`, not both. Use `ask` where a rule on one field cannot say it.
28
+
29
+ ## Conditions
30
+
31
+ ```json
32
+ { "field": "budget", "op": "gt", "value": 1000 }
33
+ ```
34
+
35
+ `field` is a page field’s id, an output of an agent step as `steps.<id>.<field>`, or how many rows
36
+ a stored list has as `lists.<id>.count`. A list of conditions holds when every one holds.
37
+
38
+ | `op` | Holds when the value |
39
+ |---|---|
40
+ | `equals`, `notEquals` | Is, or is not, `value` |
41
+ | `in` | Is one of a list of values |
42
+ | `empty`, `notEmpty` | Is empty, or is not |
43
+ | `gt`, `lt` | Is greater or less than a number |
44
+ | `contains` | Holds `value`: a multiselect, a list output or a text |
45
+
46
+ A decision’s answer has a probability: `steps.<id>.<field>.p`, from 0 to 1. A rule can test it,
47
+ for example `{ "field": "steps.check.urgent.p", "op": "gt", "value": 0.8 }`.
48
+
49
+ The same conditions show or hide fields on a page. See
50
+ [Pages and fields](./pages-and-fields.md#fields-that-show-only-when-they-fit).
51
+
52
+ ## A step only some runs take
53
+
54
+ Put it right after the step that branches to it. That step’s otherwise rule leads every other run
55
+ past it, and the step itself goes on as the next in the list.
56
+
57
+ ## Loops
58
+
59
+ A rule that goes back to an earlier step is a loop, for example “improve it until the check
60
+ passes”. The step that runs again sees what it made last time.
61
+
62
+ `max` says how often a rule may send the run on in one run, up to 50. Afterwards it is skipped.
63
+ Without `max`, a loop is taken at most ten times.
@@ -0,0 +1,47 @@
1
+ ---
2
+ title: Films
3
+ description: A film step has the AI client on your computer write a film as code, and the runtime renders it.
4
+ version: 0.7.10
5
+ ---
6
+
7
+ A `film` step makes a motion-graphics film. The AI client on your computer (Claude Code) writes
8
+ the film as HTML, CSS and JavaScript in a folder of its own. It looks at its frames and fixes
9
+ them, and engenty wizards renders the MP4.
10
+
11
+ A film step runs only where Claude Code is set up as your AI subscription. It never runs on
12
+ credits or in the cloud, and it takes 5 to 40 minutes.
13
+
14
+ ```json
15
+ {
16
+ "id": "film", "type": "film", "title": "Make the film",
17
+ "brief": "A 30-second explainer of {{product}}, calm and bright. Use the voice-over.",
18
+ "kit": "kits/explainer.zip",
19
+ "inputs": { "voice": "steps.voice", "script": "steps.script" },
20
+ "format": "16:9", "seconds": 30
21
+ }
22
+ ```
23
+
24
+ | Key | What it does |
25
+ |---|---|
26
+ | `brief` | What the film is: story, look, what to use. A template |
27
+ | `skills` | Skill packages the client reads. The default is `["hyperframes"]`. A workspace package is `skills/<name>`, a folder with a `SKILL.md` |
28
+ | `kit` | A style kit in the workspace, as a `.zip`: a showreel made once with its rules, helpers and stills. Every film of the wizard is made to it |
29
+ | `inputs` | What the film is made from: a name (lowercase letters, digits, `-`) → a field id or `steps.<id>` |
30
+ | `format` | `16:9` (the default), `9:16` or `1:1` |
31
+ | `from` | `steps.<id>` of an earlier film step. This film starts from that one’s code and lays it out for its own format |
32
+ | `seconds` | About how long the film runs, 3 to 600 |
33
+ | `model`, `effort` | The model class, `standard` by default. The kit carries the craft |
34
+
35
+ Files among the inputs (uploads, voice lines, pictures) are copied into `input/<name>/`. Text is
36
+ written to `input/<name>.md`, JSON to `input/<name>.json`.
37
+
38
+ ## A film in steps
39
+
40
+ A film that convinces is made in stages, each with its own review:
41
+
42
+ 1. An agent step writes the research and the script.
43
+ 2. A `generate` step with `asset` `voice` reads the whole script.
44
+ 3. The film step makes the film from the voice, the pictures and the script.
45
+
46
+ The film step finds the word timings in the voice-over itself. Sounds come from a fixed catalog.
47
+ A film leaves the page as a video file, so it shows the EU’s “AI” label in the picture.
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: Images, video and documents
3
+ description: A generate step makes an image, a video, a voice-over, a document or a dashboard.
4
+ version: 0.7.10
5
+ ---
6
+
7
+ A `generate` step makes one thing, named by `asset`. Its `prompt` is a template. See
8
+ [Templates](./templates.md).
9
+
10
+ ```json
11
+ {
12
+ "id": "visual", "type": "generate", "title": "Draw the image", "asset": "image",
13
+ "working": "Drawing the image…",
14
+ "prompt": "A striking image for this post: {{steps.post}}. No text in the image.",
15
+ "options": { "aspectRatio": "16:9", "style": "modern editorial, high contrast" }
16
+ }
17
+ ```
18
+
19
+ | `asset` | What `prompt` is | `options` |
20
+ |---|---|---|
21
+ | `image` | What the picture shows | `aspectRatio`, `style` |
22
+ | `video` | What the clip shows | `aspectRatio`, `duration` (4 to 10 seconds), `resolution` (`720p`, the default, or `480p`), `style` |
23
+ | `voice` | The exact text that is read aloud | `style`: how to speak, for example “calm, warm” |
24
+ | `document` | The brief | `template`: `invoice`, `offer`, `briefing`, `letter`, `report` or `free` |
25
+ | `dashboard` | The brief | |
26
+
27
+ `aspectRatio` is `1:1`, `16:9`, `9:16`, `4:5`, `3:2` or `2:3`. A `document` or `dashboard` step
28
+ takes `model` and `effort` like an [agent step](./agent-steps.md#model-class-and-effort). Images
29
+ and video use the image and video class.
30
+
31
+ ## Starting from a picture
32
+
33
+ `referenceImage` is the image an image or video starts from. It names an earlier `image` field,
34
+ or an earlier step that made images.
35
+
36
+ ## One result per entry
37
+
38
+ `each` makes one image or video per entry, at most eight. It names an `image` field with several
39
+ uploads, an earlier step that made several images, or a table of an agent step
40
+ (`steps.<id>.<key>`). The prompt reads the entry as `{{item.<column>}}`, `{{index}}` and
41
+ `{{count}}`. With `each` the prompt goes to the model as written, so let the agent step that makes
42
+ the table write complete descriptions.
43
+
44
+ With `referenceImage` naming as many images, entry 3 starts from the third image. In a review the
45
+ person can make single results again.
46
+
47
+ ## Photos and signatures in documents
48
+
49
+ A document step can place the photos of an earlier `image` field and a `signature`. Say in its
50
+ prompt where they go. Pictures from the web in a document (`<img src="https://…">`) are fetched
51
+ once when the step runs and kept with the run.
52
+
53
+ ## AI labels
54
+
55
+ Images, clips and voice-overs carry the marking of AI media (EU AI Act, Art. 50) in their file
56
+ metadata. The runner lays the EU’s “AI” label over them. Never ask an image step to draw a label
57
+ into the picture.
@@ -0,0 +1,188 @@
1
+ ---
2
+ title: The wizard format
3
+ description: A wizard as one JSON document, what its keys mean, and where each part is described.
4
+ version: 0.7.10
5
+ ---
6
+
7
+ A wizard is one JSON document, its **definition**. The studio exports it as a `.wizard` file
8
+ and imports one back. You can write either by hand or with a tool, check it in your editor
9
+ against its [JSON Schema](#json-schema), and check it completely with `wizards validate`.
10
+
11
+ The code that defines the format and checks it is also under the
12
+ [MIT licence](https://github.com/engenty/wizards/blob/main/packages/shared/LICENSE-MIT), so any
13
+ tool may read and write wizards.
14
+
15
+ ## The definition
16
+
17
+ ```json
18
+ {
19
+ "$schema": "https://engenty.ai/schema/v1/wizard.json",
20
+ "version": 1,
21
+ "title": "Create an invoice",
22
+ "description": "A finished invoice from a few details.",
23
+ "avatar": "round",
24
+ "lang": "en",
25
+ "steps": [ … ]
26
+ }
27
+ ```
28
+
29
+ | Key | What it holds |
30
+ |---|---|
31
+ | `version` | The version of the format, `1`. See [Version](#version) |
32
+ | `title` | What people get, short. See [Title, description and intro](#title-description-and-intro) |
33
+ | `description` | One sentence about the wizard |
34
+ | `avatar` | The engenty shown to people. See [The avatar](#the-avatar) |
35
+ | `intro` | One sentence in the wizard’s voice, in the chat |
36
+ | `lang` | The language the wizard speaks, as a two-letter code. See [Languages](#languages) |
37
+ | `lists` | Tables the wizard keeps between runs. See [Lists and connections](./lists-and-connections.md) |
38
+ | `connections` | Accounts the person connects during a run. See [Lists and connections](./lists-and-connections.md) |
39
+ | `steps` | What the run does, from top to bottom |
40
+
41
+ ## JSON Schema
42
+
43
+ | For | Schema |
44
+ |---|---|
45
+ | A definition | [`https://engenty.ai/schema/v1/wizard.json`](https://engenty.ai/schema/v1/wizard.json) |
46
+ | `wizard.json` in a `.wizard` file | [`https://engenty.ai/schema/v1/wizard-package.json`](https://engenty.ai/schema/v1/wizard-package.json) |
47
+
48
+ Put the address under `"$schema"`, as in the example above. Editors such as VS Code then
49
+ complete keys and mark mistakes as you type. [JSON Schema and validation](./validate.md) says
50
+ what the schema checks and what only `wizards validate` can.
51
+
52
+ ## Title, description and intro
53
+
54
+ | Key | Where people read it | How to write it |
55
+ |---|---|---|
56
+ | `title` | On the wizard’s page, in its chat, in the link preview, in the studio and the marketplace, and in AI apps over MCP | What people get, in a few words: “Create an invoice” |
57
+ | `description` | Under the title, as the chat’s first line and in the link preview. AI apps read it to pick the wizard | One sentence on what comes out |
58
+ | `intro` | In the chat, after the description | One sentence in the wizard’s own voice: “Show me your fridge.” |
59
+
60
+ `title` is required. `description` may be empty and `intro` left out. All three are written in
61
+ the wizard’s language and translated with it. See [Languages](#languages).
62
+
63
+ ## The avatar
64
+
65
+ `avatar` names the engenty that stands for the wizard: the one-eyed figure on its pages, in its
66
+ chat and calls, and in the studio’s and marketplace’s lists. It is one of ten shapes:
67
+
68
+ `round` (the default), `drop`, `dome`, `flame`, `oval`, `bean`, `pebble`, `sprout`, `tower` and
69
+ `wedge`.
70
+
71
+ The list is fixed. Any other value is an error in the JSON Schema and in `wizards validate`, and
72
+ a wizard cannot bring a picture of its own. Each shape has its own colour.
73
+
74
+ Every shape is in [`assets/engenty/`](https://github.com/engenty/wizards/tree/main/assets/engenty)
75
+ as a 512 × 512 PNG on a transparent ground. Seven of them also come wearing Goose’s flight
76
+ helmet. The figures are under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): you
77
+ may use, change and share them, commercially too, with credit:
78
+
79
+ ```text
80
+ engenty figures © Thru The Heart Creative GmbH - Matthias Platzer, CC BY 4.0, engenty.ai
81
+ ```
82
+
83
+ Using a figure or the name engenty as your own brand, logo or mascot needs permission. See
84
+ [TRADEMARKS.md](https://github.com/engenty/wizards/blob/main/TRADEMARKS.md).
85
+
86
+ ## Languages
87
+
88
+ A definition is written in one language, and `lang` names it. Any real language works: `en`,
89
+ `de`, `it`, `fr` and so on. It sets the runner’s own words and how numbers and dates are written.
90
+ The schema checks the shape of the code. `wizards validate` and the studio check that it names a
91
+ real language. Without `lang`, the language is read from the wizard’s own words, and English is
92
+ the default where they are not clearly German.
93
+
94
+ People who read another language can read the wizard in theirs. The runner offers their
95
+ language, from the browser or the time zone, and translates the wizard on request. AI steps then
96
+ write in that language too. The translation is kept with the wizard in the space, not in the
97
+ definition. These are never translated:
98
+
99
+ - ids, branches and their `ask` statements
100
+ - the instructions of AI steps and `{{…}}` placeholders
101
+ - the values of choices: a choice shows a translated label and keeps its value
102
+
103
+ In the studio, Share → Settings has “Offer a translation”. It turns translation on or off for the
104
+ wizard, and each language can be edited line by line there.
105
+
106
+ ## Version
107
+
108
+ `version` is the version of the format the definition is written in, not of the wizard. It is
109
+ `1` today, and `1` is the default when it is left out.
110
+
111
+ It changes only with a breaking change to the format. The schemas of each version stay online in
112
+ their own folder (`/schema/v1/`, `/schema/v2/`, …). An app reads only the versions it knows: it
113
+ refuses a wizard of a newer version instead of running it the wrong way.
114
+
115
+ The versions of a wizard itself, its drafts and what is published, are kept in the studio, not
116
+ in the definition.
117
+
118
+ ## Steps
119
+
120
+ Every step has an `id`, a `title`, an optional `description` and an optional `next`. Ids are
121
+ letters, digits and `_`, start with a letter and are unique in the wizard. The last step is
122
+ always a `result` step.
123
+
124
+ | Type | What it does | Page |
125
+ |---|---|---|
126
+ | `page` | Asks the person, one to five fields | [Pages and fields](./pages-and-fields.md) |
127
+ | `agent` | An AI step: researches, writes, decides, calls tools | [Agent steps](./agent-steps.md) |
128
+ | `generate` | Makes an image, a video, a voice-over, a document or a dashboard | [Images, video and documents](./generate-steps.md) |
129
+ | `surface` | Shows a view built from the surface catalog | [Views and widgets](./views-and-widgets.md) |
130
+ | `widget` | Shows an HTML app from the wizard’s workspace | [Views and widgets](./views-and-widgets.md) |
131
+ | `film` | Has the AI client on your computer make a film | [Films](./film-steps.md) |
132
+ | `review` | Shows earlier results to check, change or make again | [Review and result](./review-and-result.md) |
133
+ | `result` | The last page: the message and the downloads | [Review and result](./review-and-result.md) |
134
+
135
+ Steps run from top to bottom unless a step’s `next` sends the run elsewhere. See
136
+ [Branches and loops](./branches.md). Steps read what came before through templates such as
137
+ `{{topic}}` and `{{steps.post}}`. See [Templates](./templates.md).
138
+
139
+ ## A complete wizard
140
+
141
+ ```json
142
+ {
143
+ "version": 1,
144
+ "title": "X post with an image",
145
+ "description": "Turns a topic into a finished post with an image.",
146
+ "avatar": "flame",
147
+ "lang": "en",
148
+ "steps": [
149
+ {
150
+ "id": "about", "type": "page", "title": "What is it about?",
151
+ "fields": [
152
+ { "id": "topic", "label": "Topic or occasion", "kind": "textarea", "required": true },
153
+ { "id": "tone", "label": "Tone", "kind": "select",
154
+ "options": ["Casual", "Professional", "Funny"], "default": "Casual" }
155
+ ]
156
+ },
157
+ {
158
+ "id": "post", "type": "agent", "title": "Write the post", "model": "standard",
159
+ "instructions": "Write a post for X on {{topic}}. Tone: {{tone}}. At most 270 characters.",
160
+ "tools": [], "output": { "format": "text" }
161
+ },
162
+ {
163
+ "id": "visual", "type": "generate", "title": "Draw the image", "asset": "image",
164
+ "prompt": "A striking image for this post: {{steps.post}}. No text in the image.",
165
+ "options": { "aspectRatio": "16:9" }
166
+ },
167
+ {
168
+ "id": "check", "type": "review", "title": "Does this work?",
169
+ "show": ["post", "visual"], "edit": true, "regenerate": true
170
+ },
171
+ {
172
+ "id": "done", "type": "result", "title": "Ready to post",
173
+ "deliverables": [
174
+ { "from": "post", "label": "Post", "formats": ["txt", "md"] },
175
+ { "from": "visual", "label": "Image", "formats": ["png"] }
176
+ ]
177
+ }
178
+ ]
179
+ }
180
+ ```
181
+
182
+ The studio’s MCP tool `get_authoring_guide` gives an AI client the same format with its rules
183
+ for good wizards.
184
+
185
+ ## Files and checks
186
+
187
+ - [The .wizard file](./wizard-file.md): what the zip holds and what the import takes.
188
+ - [JSON Schema and validation](./validate.md): the JSON Schema for your editor and `wizards validate`.
@@ -0,0 +1,65 @@
1
+ ---
2
+ title: Lists and connections
3
+ description: Tables a wizard keeps between runs, and accounts the person connects.
4
+ version: 0.7.10
5
+ ---
6
+
7
+ ## Lists
8
+
9
+ A list is a table the wizard keeps between runs, one for each person who runs it. A wizard has up
10
+ to 12.
11
+
12
+ ```json
13
+ "lists": [{
14
+ "id": "contacts", "title": "Contacts", "key": "email",
15
+ "columns": [
16
+ { "id": "name", "name": "Name", "type": "text" },
17
+ { "id": "email", "name": "Email", "type": "text" },
18
+ { "id": "since", "name": "Since", "type": "date", "format": { "kind": "date" } }
19
+ ]
20
+ }]
21
+ ```
22
+
23
+ | Key | What it does |
24
+ |---|---|
25
+ | `columns` | `id`, `name` (what people read), `type` and `format` |
26
+ | `key` | The column that identifies a row. Saving a row with a known key updates it |
27
+ | `shared` | One list for every run, such as leads or sign-ups |
28
+ | `check` | The person goes through the rows one by one in a review |
29
+
30
+ Column types are `text`, `number` (`integer`, `decimal`, `percent` or `currency`), `date`
31
+ (`date` or `datetime`), `select` (with `options`) and `boolean`.
32
+
33
+ Agent steps read and write lists with their own tools. Templates read a list as
34
+ `{{lists.<id>}}`, conditions as `lists.<id>.count`. A `list` field shows it on a page, a review
35
+ shows it with `lists.<id>` in `show`.
36
+
37
+ A `shared` list is never shown to the person running the wizard, who would see what others gave.
38
+ It shows in the studio under Space → Data.
39
+
40
+ `check` has `file`, a text column holding the path of a kept file, which shows beside the row. It
41
+ has `status`, a select column whose options are the answers. Its first option means “not looked
42
+ at yet”.
43
+
44
+ ## Connections
45
+
46
+ A connection is an account the person connects during a run. It is kept for their next run. A
47
+ wizard has up to 12.
48
+
49
+ ```json
50
+ "connections": [
51
+ { "id": "inbox", "kind": "mail", "title": "Your mailbox" },
52
+ { "id": "crm", "connector": "hubspot", "actions": ["search_contacts", "create_note"],
53
+ "policy": { "create_note": "ask" } }
54
+ ]
55
+ ```
56
+
57
+ | Key | What it does |
58
+ |---|---|
59
+ | `kind` | `mail`: any mailbox, over Gmail, Outlook or IMAP. Steps only read it |
60
+ | `connector` | Instead of `kind`: a built-in connector or one imported into the space |
61
+ | `actions` | The connector’s actions steps may use. By default those that only read |
62
+ | `policy` | Per action: `allow` runs it, `ask` asks the person first. By default reading is allowed and writing asks |
63
+
64
+ A page field of kind `connection` asks the person to connect. The agent step lists the connection
65
+ in `connections` and gets its actions as tools.