@engenty/wizards-runtime 0.19.0 → 0.20.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 (166) hide show
  1. package/apps/runtime/dist/agents/architect.js +4 -4
  2. package/apps/runtime/dist/agents/studio-assistant.js +2 -31
  3. package/apps/runtime/dist/app.js +4 -4
  4. package/apps/runtime/dist/assistant/knows.js +2 -2
  5. package/apps/runtime/dist/auth/index.js +1 -1
  6. package/apps/runtime/dist/authoring/example.js +1 -1
  7. package/apps/runtime/dist/authoring/guide.js +35 -6
  8. package/apps/runtime/dist/broker/account.js +85 -16
  9. package/apps/runtime/dist/broker/call.js +137 -37
  10. package/apps/runtime/dist/broker/log.js +19 -5
  11. package/apps/runtime/dist/broker/rwx.js +12 -9
  12. package/apps/runtime/dist/connectors/index.js +52 -11
  13. package/apps/runtime/dist/connectors/person-connections.js +279 -0
  14. package/apps/runtime/dist/connectors/person-sign-ins.js +74 -3
  15. package/apps/runtime/dist/connectors/same-service.js +14 -0
  16. package/apps/runtime/dist/connectors/space-choice.js +116 -0
  17. package/apps/runtime/dist/connectors/space-connections.js +40 -2
  18. package/apps/runtime/dist/db/client.js +8 -0
  19. package/apps/runtime/dist/db/kept-accounts.js +88 -0
  20. package/apps/runtime/dist/db/migrations/tenant/0075_person_connection.sql +25 -0
  21. package/apps/runtime/dist/db/migrations/tenant/0076_clients_in_spaces.sql +28 -0
  22. package/apps/runtime/dist/db/migrations/tenant/0077_client_spaces_at_root.sql +21 -0
  23. package/apps/runtime/dist/db/migrations/tenant/meta/0075_snapshot.json +7859 -0
  24. package/apps/runtime/dist/db/migrations/tenant/meta/0076_snapshot.json +7859 -0
  25. package/apps/runtime/dist/db/migrations/tenant/meta/0077_snapshot.json +7859 -0
  26. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +21 -0
  27. package/apps/runtime/dist/db/schema.js +67 -16
  28. package/apps/runtime/dist/docs/dev/api.md +8 -8
  29. package/apps/runtime/dist/docs/dev/wizard-format/index.md +3 -1
  30. package/apps/runtime/dist/elements/caller.js +1 -1
  31. package/apps/runtime/dist/elements/knowledge.js +5 -5
  32. package/apps/runtime/dist/elements/wizards.js +7 -11
  33. package/apps/runtime/dist/engine/notices.js +13 -1
  34. package/apps/runtime/dist/engine/requirements.js +116 -3
  35. package/apps/runtime/dist/engine/run-needs.js +58 -0
  36. package/apps/runtime/dist/engine/runner.js +229 -23
  37. package/apps/runtime/dist/engine/starts.js +9 -0
  38. package/apps/runtime/dist/engine/types.js +5 -1
  39. package/apps/runtime/dist/harness/claude.js +3 -1
  40. package/apps/runtime/dist/manage.js +1 -1
  41. package/apps/runtime/dist/mcp/tools.js +3 -3
  42. package/apps/runtime/dist/plugins/runs.js +2 -1
  43. package/apps/runtime/dist/prompts/architect.md +3 -3
  44. package/apps/runtime/dist/prompts/authoring.md +17 -6
  45. package/apps/runtime/dist/prompts/goose.md +0 -5
  46. package/apps/runtime/dist/routes/api.js +9 -4
  47. package/apps/runtime/dist/routes/client-contract.js +2 -2
  48. package/apps/runtime/dist/routes/client-spaces.js +1 -16
  49. package/apps/runtime/dist/routes/connections.js +6 -1
  50. package/apps/runtime/dist/routes/marketplace.js +27 -7
  51. package/apps/runtime/dist/routes/plugins.js +1 -1
  52. package/apps/runtime/dist/routes/runs.js +157 -11
  53. package/apps/runtime/dist/routes/studio.js +42 -5
  54. package/apps/runtime/dist/services/client-portal.js +58 -49
  55. package/apps/runtime/dist/services/client-spaces.js +57 -125
  56. package/apps/runtime/dist/services/links.js +3 -3
  57. package/apps/runtime/dist/services/marketplace.js +6 -2
  58. package/apps/runtime/dist/services/members-studio.js +1 -1
  59. package/apps/runtime/dist/services/query-vectors.js +1 -1
  60. package/apps/runtime/dist/services/runs.js +19 -20
  61. package/apps/runtime/dist/services/space-parent.js +4 -11
  62. package/apps/runtime/dist/services/spaces.js +56 -47
  63. package/apps/runtime/dist/services/work-ai.js +3 -3
  64. package/apps/runtime/dist/services/work-chats.js +14 -6
  65. package/apps/runtime/dist/sharing/state.js +7 -3
  66. package/apps/runtime/dist/store/index.js +28 -8
  67. package/apps/runtime/dist/store/shared-lists.js +2 -2
  68. package/apps/runtime/dist/sync/hub.js +9 -5
  69. package/apps/runtime/dist/tools/connector.js +4 -2
  70. package/apps/web/dist/assets/{AboutDialog-BxT7chz8.js → AboutDialog-QWzpEK8M.js} +1 -1
  71. package/apps/web/dist/assets/{BlockEditor-BX8ZxxIc.js → BlockEditor-C44bI_ih.js} +1 -1
  72. package/apps/web/dist/assets/{Bundle-Dkpi5E6W.js → Bundle-DZyQ1FP7.js} +1 -1
  73. package/apps/web/dist/assets/CapabilitiesPage-DAr0-gN1.js +2 -0
  74. package/apps/web/dist/assets/{ChangelogDialog-j-vHLy-V.js → ChangelogDialog-CdHqJV2P.js} +1 -1
  75. package/apps/web/dist/assets/{CodeEditor-CfM2A-yS.js → CodeEditor-BRufUwu0.js} +1 -1
  76. package/apps/web/dist/assets/ConnectorsSection-BO6jHrYU.js +1 -0
  77. package/apps/web/dist/assets/EditorPage-Bx-fKnsY.js +3 -0
  78. package/apps/web/dist/assets/{FlowPreview-E0kuvM5n.js → FlowPreview-aj58c-gH.js} +1 -1
  79. package/apps/web/dist/assets/{LangSwitch-DhQmCtyY.js → LangSwitch-BNkytlus.js} +1 -1
  80. package/apps/web/dist/assets/Marketplace-D3hdvrkz.js +2 -0
  81. package/apps/web/dist/assets/NewWizardChannels-fveQcQlY.js +1 -0
  82. package/apps/web/dist/assets/NewWizardPage-BTX1g2t1.js +7 -0
  83. package/apps/web/dist/assets/OnboardingPage-DwF6KdQy.js +1 -0
  84. package/apps/web/dist/assets/ProtocolSection-YnJcMN9E.js +1 -0
  85. package/apps/web/dist/assets/PublicRunner-Bp4DxTrD.js +1 -0
  86. package/apps/web/dist/assets/{ReadOnly-CkToYpY5.js → ReadOnly-C6qmTD35.js} +1 -1
  87. package/apps/web/dist/assets/{Results-C9qxCpUQ.js → Results-BNuuBiwU.js} +1 -1
  88. package/apps/web/dist/assets/{RunDrawer-BRXH71U8.js → RunDrawer-CMgN-XTB.js} +1 -1
  89. package/apps/web/dist/assets/SettingsPage-CuUB26YJ.js +2 -0
  90. package/apps/web/dist/assets/SetupPage-llGzMVeH.js +1 -0
  91. package/apps/web/dist/assets/{SharePage-Boj1R928.js → SharePage-CgQp_PT6.js} +1 -1
  92. package/apps/web/dist/assets/SkillEditor-ARx8QPGp.js +1 -0
  93. package/apps/web/dist/assets/Skills-frfXXEcF.js +9 -0
  94. package/apps/web/dist/assets/SpacePage-Dv6ocsc_.js +2 -0
  95. package/apps/web/dist/assets/StudioHome-B0bZRm1L.js +1 -0
  96. package/apps/web/dist/assets/TableEditor-CfzTLmJF.js +7 -0
  97. package/apps/web/dist/assets/{UpdateCheck-DFor0F9T.js → UpdateCheck-D3QhfI5c.js} +2 -2
  98. package/apps/web/dist/assets/{brand-Ij-I_Lms.js → brand-DKuVyYhH.js} +1 -1
  99. package/apps/web/dist/assets/changelog-Db3nvWao.js +1 -0
  100. package/apps/web/dist/assets/{code-editor-BVgSljQq.js → code-editor-BLwDuQLI.js} +2 -2
  101. package/apps/web/dist/assets/host-C-AAp8Bz.js +69 -0
  102. package/apps/web/dist/assets/i18n-Dyi0kvaA.js +55 -0
  103. package/apps/web/dist/assets/index-CduFlFCp.css +1 -0
  104. package/apps/web/dist/assets/index-CtE0rJEL.js +102 -0
  105. package/apps/web/dist/assets/{read-aloud-pd-PWi_5.js → read-aloud-DGS8mWgC.js} +1 -1
  106. package/apps/web/dist/assets/session-EIDP3Wzc.js +1 -0
  107. package/apps/web/dist/assets/theme-B46aPLtX.js +14 -0
  108. package/apps/web/dist/assets/ui-DSgksc1H.js +16 -0
  109. package/apps/web/dist/assets/{useMutation-CUZC19i3.js → useMutation-fT44ij_b.js} +1 -1
  110. package/apps/web/dist/assets/{viewers-D-8HZrcq.js → viewers-DvA5VsXw.js} +2 -2
  111. package/apps/web/dist/index.html +18 -13
  112. package/apps/web/dist/mcp/flow.html +62 -62
  113. package/node_modules/@engenty/wizards-shared/dist/catalog-prompt.js +2 -2
  114. package/node_modules/@engenty/wizards-shared/dist/connectors.d.ts +67 -0
  115. package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +10324 -7
  116. package/node_modules/@engenty/wizards-shared/dist/definition.js +32 -6
  117. package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +17 -23
  118. package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +17 -23
  119. package/node_modules/@engenty/wizards-shared/dist/json-schema.js +3 -3
  120. package/node_modules/@engenty/wizards-shared/dist/marketplace-search.js +7 -1
  121. package/node_modules/@engenty/wizards-shared/dist/marketplace.d.ts +9 -2
  122. package/node_modules/@engenty/wizards-shared/dist/page-data.d.ts +72 -0
  123. package/node_modules/@engenty/wizards-shared/dist/page-data.js +5 -0
  124. package/node_modules/@engenty/wizards-shared/dist/page-look.d.ts +17 -0
  125. package/node_modules/@engenty/wizards-shared/dist/page-look.js +118 -0
  126. package/node_modules/@engenty/wizards-shared/dist/page-styles.d.ts +6 -0
  127. package/node_modules/@engenty/wizards-shared/dist/page-styles.js +98 -0
  128. package/node_modules/@engenty/wizards-shared/dist/page-texts.d.ts +36 -0
  129. package/node_modules/@engenty/wizards-shared/dist/page-texts.js +119 -0
  130. package/node_modules/@engenty/wizards-shared/dist/requires.js +2 -0
  131. package/node_modules/@engenty/wizards-shared/dist/run.d.ts +56 -1
  132. package/node_modules/@engenty/wizards-shared/dist/run.js +25 -0
  133. package/node_modules/@engenty/wizards-shared/dist/runner-texts.d.ts +27 -1
  134. package/node_modules/@engenty/wizards-shared/dist/runner-texts.js +26 -0
  135. package/node_modules/@engenty/wizards-shared/dist/store.d.ts +24 -1
  136. package/node_modules/@engenty/wizards-shared/dist/transition.d.ts +2 -1
  137. package/node_modules/@engenty/wizards-shared/dist/transition.js +10 -2
  138. package/node_modules/@engenty/wizards-shared/dist/wizard-text.js +1 -1
  139. package/package.json +1 -1
  140. package/plugin/.claude-plugin/plugin.json +1 -1
  141. package/plugin/plugin.json +1 -1
  142. package/apps/web/dist/assets/CapabilitiesPage-CfSb23wy.js +0 -2
  143. package/apps/web/dist/assets/ConnectorsSection-fRBZYfZu.js +0 -1
  144. package/apps/web/dist/assets/EditorPage-CrFyN_Qn.js +0 -3
  145. package/apps/web/dist/assets/Marketplace-BdkNOARm.js +0 -2
  146. package/apps/web/dist/assets/NewWizardChannels-BATgI9GR.js +0 -1
  147. package/apps/web/dist/assets/NewWizardPage-B5V5ScKh.js +0 -7
  148. package/apps/web/dist/assets/OnboardingPage-DWpDqlCi.js +0 -1
  149. package/apps/web/dist/assets/PreviewPane-Br2w92Wh.js +0 -7
  150. package/apps/web/dist/assets/ProtocolSection-DMCojdZu.js +0 -1
  151. package/apps/web/dist/assets/PublicRunner-Cjhfeqi3.js +0 -1
  152. package/apps/web/dist/assets/SettingsPage-Dobd7tAA.js +0 -2
  153. package/apps/web/dist/assets/SetupPage-BkMjwBlV.js +0 -1
  154. package/apps/web/dist/assets/SkillEditor-DtVRUYqS.js +0 -1
  155. package/apps/web/dist/assets/Skills-DK1Pv-Xh.js +0 -9
  156. package/apps/web/dist/assets/SpacePage-CjgBRkkw.js +0 -2
  157. package/apps/web/dist/assets/StudioHome-B5HcJJ4Q.js +0 -1
  158. package/apps/web/dist/assets/changelog-n9RARUzp.js +0 -1
  159. package/apps/web/dist/assets/host-BELYIPMT.js +0 -69
  160. package/apps/web/dist/assets/i18n-DPqdH1PJ.js +0 -55
  161. package/apps/web/dist/assets/index-CVZlO0z3.css +0 -1
  162. package/apps/web/dist/assets/index-wJZVaKLg.js +0 -10
  163. package/apps/web/dist/assets/runners-D9DHhaD9.js +0 -1
  164. package/apps/web/dist/assets/session-Mt-n8MI0.js +0 -1
  165. package/apps/web/dist/assets/theme-BQhQx_UL.js +0 -14
  166. package/apps/web/dist/assets/ui-D4qQLcbs.js +0 -16
@@ -0,0 +1,36 @@
1
+ declare const de: {
2
+ start: string;
3
+ youGet: string;
4
+ youDo: string;
5
+ howItGoes: string;
6
+ noAccount: string;
7
+ wizards: (n: number) => string;
8
+ minutes: (m: number) => string;
9
+ minutesLong: (m: number) => string;
10
+ minutesRange: (a: number, b: number) => string;
11
+ task: (fields: number, reviews: number, uploads: boolean) => string;
12
+ short: (fields: number, uploads: boolean) => string;
13
+ all: string;
14
+ /** What a result is (`resultKind`), as the marketplace names it; a dashboard is a widget here. */
15
+ kind: Record<string, string>;
16
+ example: string;
17
+ exampleNote: string;
18
+ pause: string;
19
+ download: string;
20
+ imprint: string;
21
+ page: string;
22
+ poweredBy: string;
23
+ nothing: string;
24
+ nothingNote: string;
25
+ whatIs: string;
26
+ paused: string;
27
+ pausedNote: string;
28
+ down: string;
29
+ downNote: string;
30
+ notBuilt: string;
31
+ notBuiltNote: string;
32
+ back: string;
33
+ };
34
+ export type Texts = typeof de;
35
+ export declare const textsOf: (lang: string, form?: "du" | "sie") => Texts;
36
+ export {};
@@ -0,0 +1,119 @@
1
+ // Every word a visitor reads on a team's page, in the page's language (docs/copy-style.md in the
2
+ // open repository: calm, one idea per sentence). The reader is "du" as everywhere, unless the
3
+ // team chose "Sie" for its page: its visitors are its customers, and the team knows how it
4
+ // speaks to them.
5
+ const de = {
6
+ start: "Los geht's",
7
+ youGet: "Du bekommst",
8
+ youDo: "Du machst",
9
+ howItGoes: "So läuft es",
10
+ noAccount: "Kein Konto nötig",
11
+ wizards: (n) => (n === 1 ? "1 Wizard" : `${n} Wizards`),
12
+ minutes: (m) => `etwa ${m} Min`,
13
+ minutesLong: (m) => `etwa ${m} Minuten`,
14
+ minutesRange: (a, b) => (a === b ? `etwa ${a} Minuten` : `${a} bis ${b} Minuten`),
15
+ task: (fields, reviews, uploads) => {
16
+ const parts = [
17
+ uploads ? "Dateien hochladen" : "",
18
+ fields ? `${fields} ${fields === 1 ? "Frage" : "Fragen"} beantworten` : "",
19
+ reviews ? `${reviews === 1 ? "einen Entwurf" : `${reviews} Entwürfe`} prüfen` : "",
20
+ ].filter(Boolean);
21
+ return parts.length ? join(parts, "und") : "Nur starten";
22
+ },
23
+ short: (fields, uploads) => [uploads ? "Dateien" : "", fields ? `${fields} ${fields === 1 ? "Frage" : "Fragen"}` : ""]
24
+ .filter(Boolean)
25
+ .join(", "),
26
+ all: "Alle Wizards",
27
+ /** What a result is (`resultKind`), as the marketplace names it; a dashboard is a widget here. */
28
+ kind: {
29
+ text: "Text",
30
+ document: "Dokument",
31
+ table: "Tabelle",
32
+ image: "Bild",
33
+ video: "Video",
34
+ audio: "Audio",
35
+ dashboard: "Widget",
36
+ },
37
+ example: "Beispiel ansehen",
38
+ exampleNote: "Ein Lauf, den das Team geteilt hat.",
39
+ pause: "Pausieren geht jederzeit, auf diesem Gerät geht es weiter.",
40
+ download: "Zum Herunterladen, oder du schickst sie direkt aus dem Wizard.",
41
+ imprint: "Impressum",
42
+ page: "Seite",
43
+ poweredBy: "Wizards von engenty",
44
+ nothing: "Hier ist noch nichts.",
45
+ nothingNote: "Diese Adresse hat noch keine öffentliche Seite. Teams bauen ihre Wizards mit engenty wizards und zeigen sie hier.",
46
+ whatIs: "Was ist engenty wizards?",
47
+ paused: "Diese Seite ist pausiert.",
48
+ pausedNote: "Das Team kümmert sich darum. Bitte später wieder vorbeischauen.",
49
+ down: "Diese Seite ist gerade nicht erreichbar.",
50
+ downNote: "Bitte in einer Minute noch einmal versuchen.",
51
+ notBuilt: "Demo: Dieser Wizard ist noch nicht gebaut.",
52
+ notBuiltNote: "Auf der echten Seite führt der Knopf zum Wizard.",
53
+ back: "Zurück zur Seite",
54
+ };
55
+ const en = {
56
+ start: "Start",
57
+ youGet: "You get",
58
+ youDo: "You do",
59
+ howItGoes: "How it goes",
60
+ noAccount: "No account needed",
61
+ wizards: (n) => (n === 1 ? "1 wizard" : `${n} wizards`),
62
+ minutes: (m) => `about ${m} min`,
63
+ minutesLong: (m) => `about ${m} minutes`,
64
+ minutesRange: (a, b) => (a === b ? `about ${a} minutes` : `${a} to ${b} minutes`),
65
+ task: (fields, reviews, uploads) => {
66
+ const parts = [
67
+ uploads ? "upload your files" : "",
68
+ fields ? `answer ${fields} ${fields === 1 ? "question" : "questions"}` : "",
69
+ reviews ? `check ${reviews === 1 ? "one draft" : `${reviews} drafts`}` : "",
70
+ ].filter(Boolean);
71
+ const text = parts.length ? join(parts, "and") : "just start";
72
+ return text.charAt(0).toUpperCase() + text.slice(1);
73
+ },
74
+ short: (fields, uploads) => [uploads ? "Files" : "", fields ? `${fields} ${fields === 1 ? "question" : "questions"}` : ""]
75
+ .filter(Boolean)
76
+ .join(", "),
77
+ all: "All wizards",
78
+ kind: {
79
+ text: "Text",
80
+ document: "Document",
81
+ table: "Table",
82
+ image: "Image",
83
+ video: "Video",
84
+ audio: "Audio",
85
+ dashboard: "Widget",
86
+ },
87
+ example: "See an example",
88
+ exampleNote: "A run the team shared.",
89
+ pause: "You can stop at any time and continue on this device.",
90
+ download: "To download, or you send them straight from the wizard.",
91
+ imprint: "Imprint",
92
+ page: "Page",
93
+ poweredBy: "Wizards by engenty",
94
+ nothing: "There is nothing here yet.",
95
+ nothingNote: "This address has no public page yet. Teams build their wizards with engenty wizards and show them here.",
96
+ whatIs: "What is engenty wizards?",
97
+ paused: "This page is paused.",
98
+ pausedNote: "The team is looking into it. Come back later.",
99
+ down: "This page can't be reached right now.",
100
+ downNote: "Try again in a minute.",
101
+ notBuilt: "Demo: this wizard isn't built yet.",
102
+ notBuiltNote: "On a real page the button leads to the wizard.",
103
+ back: "Back to the page",
104
+ };
105
+ /** The German page in the formal form: only the words that address the reader change. */
106
+ const deSie = {
107
+ youGet: "Sie bekommen",
108
+ youDo: "Sie machen",
109
+ download: "Zum Herunterladen, oder Sie schicken sie direkt aus dem Wizard.",
110
+ pause: "Pausieren geht jederzeit, auf diesem Gerät geht es weiter.",
111
+ };
112
+ /** "a, b und c" */
113
+ function join(parts, and) {
114
+ if (parts.length < 2) {
115
+ return parts[0] ?? "";
116
+ }
117
+ return `${parts.slice(0, -1).join(", ")} ${and} ${parts[parts.length - 1]}`;
118
+ }
119
+ export const textsOf = (lang, form) => lang === "en" ? en : form === "sie" ? { ...de, ...deSie } : de;
@@ -190,6 +190,7 @@ export function requiresOf(def, agents, paths) {
190
190
  // A code step, or a function tool of the wizard or of one of its agents: its own code runs.
191
191
  code ||= def.steps.some((s) => s.type === "code") || wizardToolsUsed(def).length > 0;
192
192
  const connections = sorted((def.connections ?? []).flatMap((c) => (c.kind ? [c.kind] : [])));
193
+ const connectors = sorted((def.connections ?? []).flatMap((c) => (c.connector ? [c.connector] : [])));
193
194
  const features = [
194
195
  ...(code ? ["codeSteps"] : []),
195
196
  ...(durable ? ["durableRuns"] : []),
@@ -204,6 +205,7 @@ export function requiresOf(def, agents, paths) {
204
205
  : {}),
205
206
  plugins: pluginsOf(def, needs),
206
207
  connections,
208
+ connectors,
207
209
  features: [...features].sort(),
208
210
  ...(def.data ? { data: def.data.scope } : {}),
209
211
  ...(optionalModels.size ? { optional: { models: sorted(optionalModels) } } : {}),
@@ -1,11 +1,13 @@
1
1
  import { type AheadForm, type CardOption, type EngentyCostume, type Format, type Lang, type ModelClass, type Step, type WizardDefinition } from "./definition.js";
2
2
  import type { ShareJobView } from "./sharing.js";
3
3
  import type { StartEvent } from "./starts.js";
4
- import type { ConnectionView, ListDef, ListRow } from "./store.js";
4
+ import type { ConnectionKind, ConnectionView, ListDef, ListRow } from "./store.js";
5
5
  import type { Surface } from "./surface.js";
6
6
  import { type Gap, type Texts, type TextTable } from "./texts.js";
7
7
  import type { ThemeColours, ThemeEffect, ThemeShape } from "./theme.js";
8
8
  export type RunStatus = "waiting_input" | "sleeping" | "waiting_signal" | "running" | "done" | "failed" | "cancelled";
9
+ /** The statuses a run stays in once it is over; any other is still going, a wait included. */
10
+ export declare const RUN_ENDED: ReadonlySet<RunStatus>;
9
11
  /** A person can step back from these; `RunView.canBack` and `goBack` read this one list. */
10
12
  export declare const CAN_GO_BACK: ReadonlySet<RunStatus>;
11
13
  export interface AssetRef {
@@ -172,6 +174,8 @@ export interface RunState {
172
174
  /**
173
175
  * A run that sleeps for something other than a `wait` step. `retry`: the step tries again at
174
176
  * `wakeAt`. `credits`, `sign_in`: it waits for a person, and looks at `wakeAt` whether they acted.
177
+ * `connection`: the wizard's connection (its id in `connections`) the sign-in is for; none where
178
+ * the sign-in is no connection's.
175
179
  */
176
180
  export type RunPause = {
177
181
  kind: "retry";
@@ -180,6 +184,18 @@ export type RunPause = {
180
184
  } | {
181
185
  kind: "sign_in";
182
186
  service: string;
187
+ connection?: string;
188
+ };
189
+ /**
190
+ * What a run that waits for a sign-in to one of the wizard's connections offers this viewer.
191
+ * `connection`: the connect card, for the person whose run it is: the wizard's own account, or
192
+ * their own sign-in to a connection of the space where each person signs in. `admin`: the
193
+ * connection signs in as the space, and an admin of the space signs it in again.
194
+ */
195
+ export type RunSignIn = {
196
+ connection: ConnectionView;
197
+ } | {
198
+ admin: true;
183
199
  };
184
200
  /** What a decision over a step's `ask` branches found. */
185
201
  export interface BranchDecision {
@@ -387,6 +403,8 @@ declare const NOTES_EN: {
387
403
  readonly stepRetries: "This step didn’t work this time. It tries again by itself in about {minutes} min.";
388
404
  readonly stepWaitsCredits: "This wizard has run out of credits for now. It goes on by itself once there are credits again.";
389
405
  readonly stepWaitsSignIn: "{service} needs a new sign-in. This step goes on by itself after that.";
406
+ readonly stepWaitsConnect: "{service} isn’t connected yet. This step goes on by itself once it is.";
407
+ readonly stepWaitsAdminSignIn: "{service} needs a new sign-in by an admin of the space. This step goes on by itself after that.";
390
408
  readonly stepFailedGoesOn: "This step didn’t work, so the wizard goes on with “{step}”.";
391
409
  readonly signalKeyEmpty: "This step waits for a signal, but “{key}” came out empty.";
392
410
  readonly signalCame: "The event arrived.";
@@ -398,6 +416,13 @@ declare const NOTES_EN: {
398
416
  readonly waitsOff: "This wizard has a wait step, and those aren’t turned on here yet.";
399
417
  readonly codeStepsOff: "This wizard runs code of its own, and that isn’t turned on here yet.";
400
418
  readonly pluginsMissing: "This wizard needs {plugins}, which isn’t installed here.";
419
+ readonly connectorsCantConnect: "{connectors} can’t connect here yet.";
420
+ readonly connectorNeedsSettings: "To connect {connector}, engenty wizards needs {settings} here.";
421
+ readonly connectorNotInSpace: "This space has no connector “{connector}”.";
422
+ readonly connectorsInstead: {
423
+ readonly one: "{connectors} connects instead.";
424
+ readonly other: "{connectors} connect instead.";
425
+ };
401
426
  readonly codeMissing: "The code “{entry}” isn’t in the wizard’s files.";
402
427
  readonly codeFailed: "The code stopped with an error: {detail}";
403
428
  readonly codeOutputUnfit: "The code returned something other than this step declares: {detail}";
@@ -773,6 +798,7 @@ declare const NOTES_EN: {
773
798
  readonly one: "{count} other detail";
774
799
  readonly other: "{count} other details";
775
800
  };
801
+ readonly unwatchedNeedsChoice: "This wizard can’t start on its own yet. An admin chooses which connection it uses for {service}, in the wizard’s settings.";
776
802
  };
777
803
  export type RunNoteCode = keyof typeof NOTES_EN;
778
804
  export declare const RUN_NOTES: Texts<RunNoteCode>;
@@ -875,6 +901,8 @@ export interface RunView {
875
901
  wakeAt: string | null;
876
902
  /** Why it sleeps, where that is no `wait` step. */
877
903
  pause: RunPause | null;
904
+ /** While it waits for a sign-in to one of the wizard's connections: what this viewer can do. */
905
+ signIn: RunSignIn | null;
878
906
  /** Who a run that waits for a signal waits to hear from; null otherwise. */
879
907
  waitsFor: string | null;
880
908
  /**
@@ -960,6 +988,12 @@ export interface RunView {
960
988
  lists: ShownList[];
961
989
  /** The wizard's connections with what the person has connected. */
962
990
  connections: ConnectionView[];
991
+ /**
992
+ * The accounts the run needs before it goes on and has none for, for the person whose run it
993
+ * is: at its start those of the steps every run passes, later the one of the step it waits at.
994
+ * The runner shows the connect card for them before anything else.
995
+ */
996
+ connect: ConnectionView[];
963
997
  /** The wizard keeps things for the person between runs (lists, files, accounts). */
964
998
  keeps: boolean;
965
999
  /** Set once the result is shared. */
@@ -1112,6 +1146,27 @@ export interface MissingModel {
1112
1146
  /** A step that needs it lies on every path: the run cannot start. */
1113
1147
  blocking: boolean;
1114
1148
  }
1149
+ /**
1150
+ * A connection a wizard needs where some of its connectors can't connect here, with the steps
1151
+ * that use it. Kind `mail` is served as long as one of its connectors connects.
1152
+ */
1153
+ export interface MissingConnection {
1154
+ /** The connection's id in the definition. */
1155
+ id: string;
1156
+ /** Its title, else the name of the one connector it names; null: its `kind` names it. */
1157
+ name: string | null;
1158
+ kind: ConnectionKind | null;
1159
+ /** The connectors that can't connect here, by id. */
1160
+ connectors: string[];
1161
+ /** Why, as the person reads it: which connectors can't connect, and what they need. */
1162
+ problem: string;
1163
+ steps: {
1164
+ id: string;
1165
+ title: string;
1166
+ }[];
1167
+ /** No connector of it connects, and a step on every path uses it: the run cannot start. */
1168
+ blocking: boolean;
1169
+ }
1115
1170
  /** A page's choice whose values lead to a step this runtime has no model for. */
1116
1171
  export interface ClosedChoice {
1117
1172
  /** The options (or a toggle's true / false) that lead there; empty = the field as a whole. */
@@ -1,6 +1,8 @@
1
1
  // SPDX-License-Identifier: FSL-1.1-MIT OR MIT
2
2
  import { isLang, } from "./definition.js";
3
3
  import { lineText, textOf } from "./texts.js";
4
+ /** The statuses a run stays in once it is over; any other is still going, a wait included. */
5
+ export const RUN_ENDED = new Set(["done", "failed", "cancelled"]);
4
6
  /** A person can step back from these; `RunView.canBack` and `goBack` read this one list. */
5
7
  export const CAN_GO_BACK = new Set(["waiting_input", "done", "failed"]);
6
8
  /**
@@ -110,6 +112,8 @@ const NOTES_EN = {
110
112
  stepRetries: "This step didn’t work this time. It tries again by itself in about {minutes} min.",
111
113
  stepWaitsCredits: "This wizard has run out of credits for now. It goes on by itself once there are credits again.",
112
114
  stepWaitsSignIn: "{service} needs a new sign-in. This step goes on by itself after that.",
115
+ stepWaitsConnect: "{service} isn’t connected yet. This step goes on by itself once it is.",
116
+ stepWaitsAdminSignIn: "{service} needs a new sign-in by an admin of the space. This step goes on by itself after that.",
113
117
  stepFailedGoesOn: "This step didn’t work, so the wizard goes on with “{step}”.",
114
118
  signalKeyEmpty: "This step waits for a signal, but “{key}” came out empty.",
115
119
  signalCame: "The event arrived.",
@@ -121,6 +125,13 @@ const NOTES_EN = {
121
125
  waitsOff: "This wizard has a wait step, and those aren’t turned on here yet.",
122
126
  codeStepsOff: "This wizard runs code of its own, and that isn’t turned on here yet.",
123
127
  pluginsMissing: "This wizard needs {plugins}, which isn’t installed here.",
128
+ connectorsCantConnect: "{connectors} can’t connect here yet.",
129
+ connectorNeedsSettings: "To connect {connector}, engenty wizards needs {settings} here.",
130
+ connectorNotInSpace: "This space has no connector “{connector}”.",
131
+ connectorsInstead: {
132
+ one: "{connectors} connects instead.",
133
+ other: "{connectors} connect instead.",
134
+ },
124
135
  codeMissing: "The code “{entry}” isn’t in the wizard’s files.",
125
136
  codeFailed: "The code stopped with an error: {detail}",
126
137
  codeOutputUnfit: "The code returned something other than this step declares: {detail}",
@@ -471,6 +482,7 @@ const NOTES_EN = {
471
482
  maskedContract: { one: "{count} contract number", other: "{count} contract numbers" },
472
483
  maskedTerm: { one: "{count} term of your own", other: "{count} terms of your own" },
473
484
  maskedOther: { one: "{count} other detail", other: "{count} other details" },
485
+ unwatchedNeedsChoice: "This wizard can’t start on its own yet. An admin chooses which connection it uses for {service}, in the wizard’s settings.",
474
486
  };
475
487
  const NOTES_DE = {
476
488
  entry: "Eintrag {n} von {total}",
@@ -571,6 +583,8 @@ const NOTES_DE = {
571
583
  stepRetries: "Dieser Schritt hat gerade nicht geklappt. Er versucht es in etwa {minutes} Min. von selbst noch einmal.",
572
584
  stepWaitsCredits: "Das Guthaben dieses Wizards ist aufgebraucht. Er macht von selbst weiter, sobald wieder Guthaben da ist.",
573
585
  stepWaitsSignIn: "{service} braucht eine neue Anmeldung. Danach macht dieser Schritt von selbst weiter.",
586
+ stepWaitsConnect: "{service} ist noch nicht verbunden. Sobald das passiert, macht dieser Schritt von selbst weiter.",
587
+ stepWaitsAdminSignIn: "{service} braucht eine neue Anmeldung durch einen Admin des Space. Danach macht dieser Schritt von selbst weiter.",
574
588
  stepFailedGoesOn: "Dieser Schritt hat nicht geklappt, darum macht der Wizard mit „{step}“ weiter.",
575
589
  signalKeyEmpty: "Dieser Schritt wartet auf ein Ereignis, aber „{key}“ ist leer.",
576
590
  signalCame: "Ereignis angekommen.",
@@ -582,6 +596,16 @@ const NOTES_DE = {
582
596
  waitsOff: "Dieser Wizard hat einen Warten-Schritt, und die sind hier noch nicht eingeschaltet.",
583
597
  codeStepsOff: "Dieser Wizard führt eigenen Code aus, und das ist hier noch nicht eingeschaltet.",
584
598
  pluginsMissing: "Dieser Wizard braucht {plugins}, und das ist hier nicht installiert.",
599
+ connectorsCantConnect: {
600
+ one: "{connectors} lässt sich hier noch nicht verbinden.",
601
+ other: "{connectors} lassen sich hier noch nicht verbinden.",
602
+ },
603
+ connectorNeedsSettings: "Um {connector} zu verbinden, braucht engenty wizards hier {settings}.",
604
+ connectorNotInSpace: "Diesem Space fehlt der Connector „{connector}“.",
605
+ connectorsInstead: {
606
+ one: "Stattdessen lässt sich {connectors} verbinden.",
607
+ other: "Stattdessen lassen sich {connectors} verbinden.",
608
+ },
585
609
  codeMissing: "Der Code „{entry}“ fehlt in den Dateien des Wizards.",
586
610
  codeFailed: "Der Code ist mit einem Fehler stehen geblieben: {detail}",
587
611
  codeOutputUnfit: "Der Code hat etwas anderes zurückgegeben, als dieser Schritt angibt: {detail}",
@@ -924,6 +948,7 @@ const NOTES_DE = {
924
948
  maskedContract: { one: "{count} Vertragsnummer", other: "{count} Vertragsnummern" },
925
949
  maskedTerm: { one: "{count} eigener Begriff", other: "{count} eigene Begriffe" },
926
950
  maskedOther: { one: "{count} andere Angabe", other: "{count} andere Angaben" },
951
+ unwatchedNeedsChoice: "Dieser Wizard kann noch nicht von selbst starten. Ein Admin wählt in den Einstellungen des Wizards, welche Verbindung er für {service} nutzt.",
927
952
  };
928
953
  export const RUN_NOTES = { en: NOTES_EN, de: NOTES_DE };
929
954
  export function isNoteTime(value) {
@@ -86,6 +86,7 @@ declare const en: {
86
86
  "run.retryAt": string;
87
87
  "run.waitsCredits": string;
88
88
  "run.waitsSignIn": string;
89
+ "run.waitsAdminSignIn": string;
89
90
  "run.waitsSignal": string;
90
91
  "run.waitsSignalFrom": string;
91
92
  "run.waitsAtMost": string;
@@ -109,10 +110,22 @@ declare const en: {
109
110
  "camera.done": string;
110
111
  "camera.denied": string;
111
112
  "connect.go": string;
113
+ "connect.signIn": string;
112
114
  "connect.connected": string;
113
115
  "connect.disconnect": string;
114
116
  "connect.none": string;
115
117
  "connect.openLink": string;
118
+ "connect.first": string;
119
+ "connect.mailbox": string;
120
+ "connect.notChosen": string;
121
+ "connect.firstWhy": string;
122
+ "connect.choose": string;
123
+ "connect.yours": string;
124
+ "connect.ofSpace": string;
125
+ "connect.another": string;
126
+ "connect.change": string;
127
+ "connect.forSpace": string;
128
+ "connect.forSpaceWhy": string;
116
129
  "list.empty": string;
117
130
  "list.delete": string;
118
131
  "ask.typeInto": string;
@@ -396,6 +409,7 @@ export declare const RUNNER_TEXTS: {
396
409
  "run.retryAt": string;
397
410
  "run.waitsCredits": string;
398
411
  "run.waitsSignIn": string;
412
+ "run.waitsAdminSignIn": string;
399
413
  "run.waitsSignal": string;
400
414
  "run.waitsSignalFrom": string;
401
415
  "run.waitsAtMost": string;
@@ -419,10 +433,22 @@ export declare const RUNNER_TEXTS: {
419
433
  "camera.done": string;
420
434
  "camera.denied": string;
421
435
  "connect.go": string;
436
+ "connect.signIn": string;
422
437
  "connect.connected": string;
423
438
  "connect.disconnect": string;
424
439
  "connect.none": string;
425
440
  "connect.openLink": string;
441
+ "connect.first": string;
442
+ "connect.mailbox": string;
443
+ "connect.notChosen": string;
444
+ "connect.firstWhy": string;
445
+ "connect.choose": string;
446
+ "connect.yours": string;
447
+ "connect.ofSpace": string;
448
+ "connect.another": string;
449
+ "connect.change": string;
450
+ "connect.forSpace": string;
451
+ "connect.forSpaceWhy": string;
426
452
  "list.empty": string;
427
453
  "list.delete": string;
428
454
  "ask.typeInto": string;
@@ -615,6 +641,6 @@ export declare const RUNNER_TEXTS: {
615
641
  "video.you": string;
616
642
  "nav.language": string;
617
643
  };
618
- de: Record<"ai.generated" | "ai.modified" | "ai.publish" | "ask.again" | "ask.againAllow" | "ask.againDeny" | "ask.againHint" | "ask.allow" | "ask.allowRest" | "ask.deny" | "ask.done" | "ask.down" | "ask.hide" | "ask.pictureHint" | "ask.private" | "ask.remember" | "ask.signIn" | "ask.skip" | "ask.typeInto" | "ask.up" | "ask.wants" | "browser.driving" | "browser.handBack" | "browser.takeOver" | "camera.asking" | "camera.clipHint" | "camera.denied" | "camera.done" | "camera.flip" | "camera.hint" | "camera.hintMany" | "camera.native" | "camera.photo" | "camera.pick" | "camera.record" | "camera.recording" | "camera.shoot" | "camera.stop" | "camera.taken" | "camera.title" | "camera.torch" | "camera.video" | "cards.open" | "cards.pick" | "cards.picked" | "chat.above" | "chat.badEmail" | "chat.badNumber" | "chat.badUrl" | "chat.change" | "chat.checked" | "chat.connected" | "chat.dictate" | "chat.dictateStop" | "chat.file" | "chat.files" | "chat.listening" | "chat.micDenied" | "chat.placeholder" | "chat.readAloud" | "chat.readAloudOff" | "chat.required" | "chat.rows" | "chat.send" | "chat.skip" | "chat.skipped" | "chat.transcribing" | "chat.voice" | "check.noFile" | "check.noPreview" | "check.onlyOpen" | "check.progress" | "check.reopen" | "common.cancel" | "common.close" | "common.offline" | "common.retry" | "connect.connected" | "connect.disconnect" | "connect.go" | "connect.none" | "connect.openLink" | "data.add" | "data.close" | "data.copy" | "data.download" | "data.edit" | "data.json" | "data.menu" | "data.missing" | "data.modes" | "data.no" | "data.open" | "data.remove" | "data.save" | "data.saved" | "data.schema" | "data.view" | "data.yes" | "install.add" | "install.app" | "install.bookmark" | "install.bookmark.mac" | "install.bookmark.pc" | "install.ios" | "list.delete" | "list.empty" | "location.accuracy" | "location.denied" | "location.label" | "location.locating" | "location.manual" | "location.map" | "location.refining" | "location.remove" | "location.use" | "location.why" | "nav.language" | "notify.ask" | "notify.blocked" | "notify.done" | "notify.needsYou" | "notify.next" | "notify.on" | "notify.onHint" | "notify.quiet" | "notify.why" | "output.preview" | "package.badJson" | "package.newer" | "package.noManifest" | "package.unreadable" | "question.asks" | "question.later" | "question.placeholder" | "question.send" | "result.translate" | "run.accept" | "run.addRow" | "run.again" | "run.answerBy" | "run.answeredByOther" | "run.answeredByTeam" | "run.approve" | "run.awake" | "run.back" | "run.camera" | "run.cancelled" | "run.closed" | "run.cls.account" | "run.cls.audio" | "run.cls.image" | "run.cls.speech" | "run.cls.text" | "run.cls.video" | "run.copy" | "run.decisionNote" | "run.decline" | "run.edit" | "run.elapsed" | "run.elsewhere" | "run.failed" | "run.feedbackPick" | "run.feedbackPlaceholder" | "run.feedbackTarget" | "run.filesMin" | "run.filesOf" | "run.goesOn" | "run.goesOnSoon" | "run.leavePage" | "run.less" | "run.madeWith" | "run.maxFiles" | "run.more" | "run.moveFile" | "run.moveFileHint" | "run.net" | "run.next" | "run.no" | "run.notFound" | "run.notSaved" | "run.openFull" | "run.orAs" | "run.pickItem" | "run.pickedItem" | "run.print" | "run.regenerateAll" | "run.regenerateGo" | "run.regeneratePicked" | "run.removeFile" | "run.resume" | "run.retry" | "run.retryAt" | "run.saving" | "run.share" | "run.shareFile" | "run.shareNow" | "run.start" | "run.total" | "run.unavailable" | "run.upload" | "run.uploadMore" | "run.uploadTouch" | "run.uploading" | "run.vat" | "run.waitsAtMost" | "run.waitsCredits" | "run.waitsSignIn" | "run.waitsSignal" | "run.waitsSignalFrom" | "run.withdraw" | "run.withdrawAsk" | "run.working" | "run.yes" | "scan.asking" | "scan.button" | "scan.fromPhoto" | "scan.hint" | "scan.hintQr" | "scan.miss" | "scan.title" | "scan.typeInstead" | "share.copied" | "sign.accept" | "sign.again" | "sign.clear" | "sign.hint" | "sign.open" | "sign.pad" | "sign.remove" | "slot.later" | "slot.none" | "store.confirmDelete" | "store.delete" | "store.empty" | "store.explain" | "store.files" | "store.open" | "store.rows" | "store.signIns" | "store.title" | "surface.allDone" | "surface.close" | "surface.done" | "surface.file" | "surface.files" | "surface.foundIn" | "surface.openFile" | "surface.required" | "surface.sending" | "surface.sentBy" | "talk.camera" | "talk.cameraDenied" | "talk.cameraOff" | "talk.connecting" | "talk.failed" | "talk.hint" | "talk.joinHint" | "talk.listening" | "talk.live" | "talk.speaking" | "talk.start" | "talk.stop" | "translation.failed" | "translation.machine" | "translation.showOriginal" | "translation.showTranslated" | "translation.working" | "video.cameraOff" | "video.ended" | "video.flip" | "video.hint" | "video.join" | "video.leave" | "video.mute" | "video.rejoin" | "video.unmute" | "video.you" | "voice.again" | "voice.denied" | "voice.left" | "voice.noRecorder" | "voice.pick" | "voice.recording" | "voice.remove" | "voice.start" | "voice.stop" | "voice.why", Line>;
644
+ de: Record<"ai.generated" | "ai.modified" | "ai.publish" | "ask.again" | "ask.againAllow" | "ask.againDeny" | "ask.againHint" | "ask.allow" | "ask.allowRest" | "ask.deny" | "ask.done" | "ask.down" | "ask.hide" | "ask.pictureHint" | "ask.private" | "ask.remember" | "ask.signIn" | "ask.skip" | "ask.typeInto" | "ask.up" | "ask.wants" | "browser.driving" | "browser.handBack" | "browser.takeOver" | "camera.asking" | "camera.clipHint" | "camera.denied" | "camera.done" | "camera.flip" | "camera.hint" | "camera.hintMany" | "camera.native" | "camera.photo" | "camera.pick" | "camera.record" | "camera.recording" | "camera.shoot" | "camera.stop" | "camera.taken" | "camera.title" | "camera.torch" | "camera.video" | "cards.open" | "cards.pick" | "cards.picked" | "chat.above" | "chat.badEmail" | "chat.badNumber" | "chat.badUrl" | "chat.change" | "chat.checked" | "chat.connected" | "chat.dictate" | "chat.dictateStop" | "chat.file" | "chat.files" | "chat.listening" | "chat.micDenied" | "chat.placeholder" | "chat.readAloud" | "chat.readAloudOff" | "chat.required" | "chat.rows" | "chat.send" | "chat.skip" | "chat.skipped" | "chat.transcribing" | "chat.voice" | "check.noFile" | "check.noPreview" | "check.onlyOpen" | "check.progress" | "check.reopen" | "common.cancel" | "common.close" | "common.offline" | "common.retry" | "connect.another" | "connect.change" | "connect.choose" | "connect.connected" | "connect.disconnect" | "connect.first" | "connect.firstWhy" | "connect.forSpace" | "connect.forSpaceWhy" | "connect.go" | "connect.mailbox" | "connect.none" | "connect.notChosen" | "connect.ofSpace" | "connect.openLink" | "connect.signIn" | "connect.yours" | "data.add" | "data.close" | "data.copy" | "data.download" | "data.edit" | "data.json" | "data.menu" | "data.missing" | "data.modes" | "data.no" | "data.open" | "data.remove" | "data.save" | "data.saved" | "data.schema" | "data.view" | "data.yes" | "install.add" | "install.app" | "install.bookmark" | "install.bookmark.mac" | "install.bookmark.pc" | "install.ios" | "list.delete" | "list.empty" | "location.accuracy" | "location.denied" | "location.label" | "location.locating" | "location.manual" | "location.map" | "location.refining" | "location.remove" | "location.use" | "location.why" | "nav.language" | "notify.ask" | "notify.blocked" | "notify.done" | "notify.needsYou" | "notify.next" | "notify.on" | "notify.onHint" | "notify.quiet" | "notify.why" | "output.preview" | "package.badJson" | "package.newer" | "package.noManifest" | "package.unreadable" | "question.asks" | "question.later" | "question.placeholder" | "question.send" | "result.translate" | "run.accept" | "run.addRow" | "run.again" | "run.answerBy" | "run.answeredByOther" | "run.answeredByTeam" | "run.approve" | "run.awake" | "run.back" | "run.camera" | "run.cancelled" | "run.closed" | "run.cls.account" | "run.cls.audio" | "run.cls.image" | "run.cls.speech" | "run.cls.text" | "run.cls.video" | "run.copy" | "run.decisionNote" | "run.decline" | "run.edit" | "run.elapsed" | "run.elsewhere" | "run.failed" | "run.feedbackPick" | "run.feedbackPlaceholder" | "run.feedbackTarget" | "run.filesMin" | "run.filesOf" | "run.goesOn" | "run.goesOnSoon" | "run.leavePage" | "run.less" | "run.madeWith" | "run.maxFiles" | "run.more" | "run.moveFile" | "run.moveFileHint" | "run.net" | "run.next" | "run.no" | "run.notFound" | "run.notSaved" | "run.openFull" | "run.orAs" | "run.pickItem" | "run.pickedItem" | "run.print" | "run.regenerateAll" | "run.regenerateGo" | "run.regeneratePicked" | "run.removeFile" | "run.resume" | "run.retry" | "run.retryAt" | "run.saving" | "run.share" | "run.shareFile" | "run.shareNow" | "run.start" | "run.total" | "run.unavailable" | "run.upload" | "run.uploadMore" | "run.uploadTouch" | "run.uploading" | "run.vat" | "run.waitsAdminSignIn" | "run.waitsAtMost" | "run.waitsCredits" | "run.waitsSignIn" | "run.waitsSignal" | "run.waitsSignalFrom" | "run.withdraw" | "run.withdrawAsk" | "run.working" | "run.yes" | "scan.asking" | "scan.button" | "scan.fromPhoto" | "scan.hint" | "scan.hintQr" | "scan.miss" | "scan.title" | "scan.typeInstead" | "share.copied" | "sign.accept" | "sign.again" | "sign.clear" | "sign.hint" | "sign.open" | "sign.pad" | "sign.remove" | "slot.later" | "slot.none" | "store.confirmDelete" | "store.delete" | "store.empty" | "store.explain" | "store.files" | "store.open" | "store.rows" | "store.signIns" | "store.title" | "surface.allDone" | "surface.close" | "surface.done" | "surface.file" | "surface.files" | "surface.foundIn" | "surface.openFile" | "surface.required" | "surface.sending" | "surface.sentBy" | "talk.camera" | "talk.cameraDenied" | "talk.cameraOff" | "talk.connecting" | "talk.failed" | "talk.hint" | "talk.joinHint" | "talk.listening" | "talk.live" | "talk.speaking" | "talk.start" | "talk.stop" | "translation.failed" | "translation.machine" | "translation.showOriginal" | "translation.showTranslated" | "translation.working" | "video.cameraOff" | "video.ended" | "video.flip" | "video.hint" | "video.join" | "video.leave" | "video.mute" | "video.rejoin" | "video.unmute" | "video.you" | "voice.again" | "voice.denied" | "voice.left" | "voice.noRecorder" | "voice.pick" | "voice.recording" | "voice.remove" | "voice.start" | "voice.stop" | "voice.why", Line>;
619
645
  };
620
646
  export {};
@@ -90,6 +90,7 @@ const de = {
90
90
  "run.retryAt": "Hat gerade nicht geklappt. Neuer Versuch am {date}, um {time}",
91
91
  "run.waitsCredits": "Das Guthaben ist aufgebraucht. Es geht von selbst weiter, sobald wieder welches da ist",
92
92
  "run.waitsSignIn": "{service} braucht eine neue Anmeldung. Danach geht es von selbst weiter",
93
+ "run.waitsAdminSignIn": "{service} braucht eine neue Anmeldung durch einen Admin des Space. Danach geht es von selbst weiter",
93
94
  "run.waitsSignal": "Wartet auf ein Ereignis",
94
95
  "run.waitsSignalFrom": "Wartet auf ein Ereignis von {who}",
95
96
  "run.waitsAtMost": "{waits}, höchstens bis {date}",
@@ -113,10 +114,22 @@ const de = {
113
114
  "camera.done": "Fertig",
114
115
  "camera.denied": "Die Kamera ist für diese Seite nicht freigegeben. Erlaube sie in den Website-Einstellungen deines Browsers (Schloss-Symbol in der Adresszeile) – oder nimm das Foto mit der Kamera-App auf.",
115
116
  "connect.go": "Verbinden",
117
+ "connect.signIn": "Bei {name} anmelden",
116
118
  "connect.connected": "Verbunden über {name}",
117
119
  "connect.disconnect": "Trennen",
118
120
  "connect.none": "Auf diesem Server ist noch kein Anbieter zum Verbinden eingerichtet.",
119
121
  "connect.openLink": "Anmeldung in neuem Tab öffnen",
122
+ "connect.first": "Verbinde {name}",
123
+ "connect.mailbox": "dein Postfach",
124
+ "connect.notChosen": "Noch keine gewählt",
125
+ "connect.firstWhy": "Das braucht dieser Wizard, bevor er loslegt.",
126
+ "connect.choose": "Welche Verbindung soll dieser Wizard für {name} nutzen?",
127
+ "connect.yours": "Deine",
128
+ "connect.ofSpace": "Verbindung des Space „{name}“",
129
+ "connect.another": "Weitere verbinden",
130
+ "connect.change": "Ändern",
131
+ "connect.forSpace": "Für den Space verbinden",
132
+ "connect.forSpaceWhy": "Dann gehört die Verbindung dem Space, mit seinen Regeln, und dieser Wizard nutzt sie für alle.",
120
133
  "list.empty": "Noch keine Einträge.",
121
134
  "list.delete": "Zeile löschen",
122
135
  "ask.typeInto": "Text in die Seite tippen …",
@@ -383,6 +396,7 @@ const en = {
383
396
  "run.retryAt": "That didn’t work just now. It tries again {date} at {time}",
384
397
  "run.waitsCredits": "Out of credits for now. This goes on by itself once there are credits again",
385
398
  "run.waitsSignIn": "{service} needs a new sign-in. This goes on by itself after that",
399
+ "run.waitsAdminSignIn": "{service} needs a new sign-in by an admin of the space. This goes on by itself after that",
386
400
  "run.waitsSignal": "Waiting for an event",
387
401
  "run.waitsSignalFrom": "Waiting for an event from {who}",
388
402
  "run.waitsAtMost": "{waits}, until {date} at the latest",
@@ -406,10 +420,22 @@ const en = {
406
420
  "camera.done": "Done",
407
421
  "camera.denied": "The camera isn’t allowed for this page. Allow it in your browser’s site settings (the lock icon in the address bar) – or take the photo with your camera app.",
408
422
  "connect.go": "Connect",
423
+ "connect.signIn": "Sign in to {name}",
409
424
  "connect.connected": "Connected through {name}",
410
425
  "connect.disconnect": "Disconnect",
411
426
  "connect.none": "This server has no provider for connecting accounts yet.",
412
427
  "connect.openLink": "Click here to open the sign-in in a new tab",
428
+ "connect.first": "Connect {name}",
429
+ "connect.mailbox": "your mailbox",
430
+ "connect.notChosen": "None chosen yet",
431
+ "connect.firstWhy": "This wizard needs it before it starts.",
432
+ "connect.choose": "Which connection should this wizard use for {name}?",
433
+ "connect.yours": "Yours",
434
+ "connect.ofSpace": "The space’s connection “{name}”",
435
+ "connect.another": "Connect another",
436
+ "connect.change": "Change",
437
+ "connect.forSpace": "Connect for the space",
438
+ "connect.forSpaceWhy": "The connection then belongs to the space, under its rules, and this wizard uses it for everyone.",
413
439
  "list.empty": "No entries yet.",
414
440
  "list.delete": "Delete row",
415
441
  "ask.typeInto": "Type into the page…",
@@ -97,13 +97,36 @@ export interface ConnectionView {
97
97
  connector: string | null;
98
98
  title: string | null;
99
99
  description: string | null;
100
- /** Set when the person has connected an account. */
100
+ /** The account the run uses for it; null: none yet, or several and none chosen. */
101
101
  account: {
102
102
  connector: string;
103
103
  label: string;
104
104
  connectedAt: string;
105
105
  } | null;
106
+ /**
107
+ * The accounts the run may use for it (docs/plans/run-connections.md): the person's own and the
108
+ * space's connections. With several and none in use the person chooses one of them.
109
+ */
110
+ candidates: ConnectionCandidate[];
106
111
  connectors: ConnectorOption[];
112
+ /**
113
+ * The connectors (`connectors`, by id) the viewer may connect for the space instead of for
114
+ * themselves: an admin of the space. Empty for anyone else.
115
+ */
116
+ forSpace?: string[];
117
+ }
118
+ /** An account a run may use for a need. */
119
+ export interface ConnectionCandidate {
120
+ id: string;
121
+ /** `person`: the account of the person whose run it is; `space`: a connection of the space. */
122
+ owner: "person" | "space";
123
+ /** The account as the provider names it: its address. */
124
+ label: string;
125
+ /** A connection of the space: its name there. */
126
+ name: string | null;
127
+ connector: string;
128
+ /** The run uses this one. */
129
+ chosen: boolean;
107
130
  }
108
131
  /** One list as a Markdown table of raw cell values — what a model reads. */
109
132
  export declare function listAsMarkdown(def: ListDef, rows: ListRow[], limit?: number): string;
@@ -36,10 +36,11 @@ export type FlowFailure =
36
36
  | {
37
37
  class: "credits";
38
38
  }
39
- /** A sign-in ran out: the run waits for the person to sign in again. */
39
+ /** A sign-in ran out: the run waits for the person to sign in again, to `connection` if it names one. */
40
40
  | {
41
41
  class: "sign_in";
42
42
  service: string;
43
+ connection?: string;
43
44
  }
44
45
  /** Anything else. */
45
46
  | {
@@ -17,7 +17,7 @@
17
17
  * with `resume`, where the log says so and that step's own work comes first.
18
18
  */
19
19
  import { branchValues, followRules, loopKey, otherwiseOf, waitDurationMs, } from "./definition.js";
20
- import { CAN_GO_BACK, note, } from "./run.js";
20
+ import { CAN_GO_BACK, note, RUN_ENDED, } from "./run.js";
21
21
  /** An event the run can't take as it stands. */
22
22
  export class FlowRefused extends Error {
23
23
  code;
@@ -175,6 +175,10 @@ export function transition(def, run, event, host) {
175
175
  }
176
176
  return standAt(def, state, run.cursor, host);
177
177
  case "cancel":
178
+ // A run that is over stays as it ended.
179
+ if (RUN_ENDED.has(run.status)) {
180
+ throw new FlowRefused("runBusy");
181
+ }
178
182
  return settle(run.cursor, "cancelled", state, null, { kind: "end" });
179
183
  }
180
184
  }
@@ -250,7 +254,11 @@ function failed(def, state, event, host) {
250
254
  if (failure.class === "credits" || failure.class === "sign_in") {
251
255
  const pause = failure.class === "credits"
252
256
  ? { kind: "credits" }
253
- : { kind: "sign_in", service: failure.service };
257
+ : {
258
+ kind: "sign_in",
259
+ service: failure.service,
260
+ ...(failure.connection ? { connection: failure.connection } : {}),
261
+ };
254
262
  if (host.now - Date.parse(retries.since) > FLOW_LIMITS.personWaitMaxMs) {
255
263
  delete state.pause;
256
264
  delete state.retries;
@@ -43,7 +43,7 @@ const COMPONENTS = new Set(SURFACE_COMPONENTS);
43
43
  * schema needs): the parser adds them, the printer leaves them out.
44
44
  */
45
45
  const DEFAULTS = {
46
- wizard: { version: 1, description: "", avatar: "round" },
46
+ wizard: { version: "0.2.0", description: "", avatar: "round" },
47
47
  agent: { instructions: "", tools: [], output: { format: "markdown" } },
48
48
  tool: { output: {} },
49
49
  widget: { data: {} },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@engenty/wizards-runtime",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Make a wish. Get your wizard. It guides you step by step. Let AI do the work. Runs on your machine, on the AI subscription you already have. The runtime, which `npx wizards` installs.",
5
5
  "license": "FSL-1.1-MIT AND CC-BY-4.0",
6
6
  "homepage": "https://engenty.ai",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wizards",
3
3
  "displayName": "engenty wizards",
4
- "version": "0.19.0",
4
+ "version": "0.20.0",
5
5
  "description": "Build page-by-page AI wizards that people open on a shared link — designed, tested and published from Claude Code — run your published ones in the chat, and keep them in a pane beside it.",
6
6
  "author": {
7
7
  "name": "engenty"