@engenty/wizards-runtime 0.12.2 → 0.14.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 (328) hide show
  1. package/apps/runtime/dist/agents/architect.js +8 -7
  2. package/apps/runtime/dist/agents/goose-connections.js +82 -0
  3. package/apps/runtime/dist/agents/space-agent.js +9 -2
  4. package/apps/runtime/dist/agents/studio-assistant.js +126 -71
  5. package/apps/runtime/dist/agents/website.js +1 -1
  6. package/apps/runtime/dist/app.js +28 -3
  7. package/apps/runtime/dist/assistant/knows.js +6 -5
  8. package/apps/runtime/dist/authoring/guide.js +25 -5
  9. package/apps/runtime/dist/broker/account.js +166 -0
  10. package/apps/runtime/dist/broker/call.js +417 -0
  11. package/apps/runtime/dist/broker/caller.js +10 -0
  12. package/apps/runtime/dist/broker/grant.js +152 -0
  13. package/apps/runtime/dist/broker/host.js +51 -0
  14. package/apps/runtime/dist/broker/index.js +8 -0
  15. package/apps/runtime/dist/broker/kept.js +31 -0
  16. package/apps/runtime/dist/broker/log.js +240 -0
  17. package/apps/runtime/dist/broker/registry.js +9 -0
  18. package/apps/runtime/dist/broker/rwx.js +367 -0
  19. package/apps/runtime/dist/broker/send.js +189 -0
  20. package/apps/runtime/dist/connectors/builtin.js +1 -1
  21. package/apps/runtime/dist/connectors/external.js +38 -37
  22. package/apps/runtime/dist/connectors/index.js +30 -91
  23. package/apps/runtime/dist/connectors/mail.js +0 -8
  24. package/apps/runtime/dist/connectors/person-sign-ins.js +73 -0
  25. package/apps/runtime/dist/connectors/plugin-connections.js +65 -92
  26. package/apps/runtime/dist/connectors/smtp.js +1 -1
  27. package/apps/runtime/dist/connectors/space-connections.js +436 -0
  28. package/apps/runtime/dist/credits/estimate.js +3 -3
  29. package/apps/runtime/dist/db/adopt.js +3 -3
  30. package/apps/runtime/dist/db/client.js +9 -0
  31. package/apps/runtime/dist/db/live-triggers.js +65 -23
  32. package/apps/runtime/dist/db/migrations/tenant/0027_work_chats.sql +52 -0
  33. package/apps/runtime/dist/db/migrations/tenant/0028_chat_approvals.sql +17 -0
  34. package/apps/runtime/dist/db/migrations/tenant/0029_work_chats_live.sql +49 -0
  35. package/apps/runtime/dist/db/migrations/tenant/0031_space.sql +624 -0
  36. package/apps/runtime/dist/db/migrations/tenant/0032_rwx_rule.sql +18 -0
  37. package/apps/runtime/dist/db/migrations/tenant/0033_broker_log.sql +23 -0
  38. package/apps/runtime/dist/db/migrations/tenant/0034_space_connection.sql +35 -0
  39. package/apps/runtime/dist/db/migrations/tenant/0035_run_grant.sql +1 -0
  40. package/apps/runtime/dist/db/migrations/tenant/0036_approval_held_for.sql +1 -0
  41. package/apps/runtime/dist/db/migrations/tenant/0037_ways_out.sql +5 -0
  42. package/apps/runtime/dist/db/migrations/tenant/0038_heard.sql +11 -0
  43. package/apps/runtime/dist/db/migrations/tenant/0039_members_studio.sql +1 -0
  44. package/apps/runtime/dist/db/migrations/tenant/meta/0027_snapshot.json +383 -155
  45. package/apps/runtime/dist/db/migrations/tenant/meta/0028_snapshot.json +4468 -0
  46. package/apps/runtime/dist/db/migrations/tenant/meta/0029_snapshot.json +4475 -0
  47. package/apps/runtime/dist/db/migrations/tenant/meta/0030_snapshot.json +4629 -0
  48. package/apps/runtime/dist/db/migrations/tenant/meta/0031_snapshot.json +4629 -0
  49. package/apps/runtime/dist/db/migrations/tenant/meta/0032_snapshot.json +4757 -0
  50. package/apps/runtime/dist/db/migrations/tenant/meta/0033_snapshot.json +5039 -0
  51. package/apps/runtime/dist/db/migrations/tenant/meta/0034_snapshot.json +5022 -0
  52. package/apps/runtime/dist/db/migrations/tenant/meta/0035_snapshot.json +5029 -0
  53. package/apps/runtime/dist/db/migrations/tenant/meta/0036_snapshot.json +5037 -0
  54. package/apps/runtime/dist/db/migrations/tenant/meta/0037_snapshot.json +5076 -0
  55. package/apps/runtime/dist/db/migrations/tenant/meta/0038_snapshot.json +5145 -0
  56. package/apps/runtime/dist/db/migrations/tenant/meta/0039_snapshot.json +5153 -0
  57. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +86 -2
  58. package/apps/runtime/dist/db/schema.js +295 -72
  59. package/apps/runtime/dist/docs/dev/architecture.md +215 -0
  60. package/apps/runtime/dist/docs/dev/broker.md +298 -0
  61. package/apps/runtime/dist/docs/dev/index.md +5 -1
  62. package/apps/runtime/dist/docs/dev/integration/index.md +2 -0
  63. package/apps/runtime/dist/docs/dev/meta.json +3 -0
  64. package/apps/runtime/dist/docs/dev/plugins/connections.md +8 -5
  65. package/apps/runtime/dist/docs/dev/plugins/events.md +1 -1
  66. package/apps/runtime/dist/docs/dev/plugins/examples.md +1 -0
  67. package/apps/runtime/dist/docs/dev/plugins/index.md +2 -2
  68. package/apps/runtime/dist/docs/dev/plugins/reference.md +3 -2
  69. package/apps/runtime/dist/docs/dev/plugins/space.md +16 -6
  70. package/apps/runtime/dist/docs/dev/plugins/studio.md +2 -2
  71. package/apps/runtime/dist/docs/dev/plugins/tools.md +0 -1
  72. package/apps/runtime/dist/docs/dev/skills.md +16 -9
  73. package/apps/runtime/dist/docs/dev/wizard-format/agent-steps.md +59 -6
  74. package/apps/runtime/dist/docs/dev/wizard-format/lists-and-connections.md +17 -2
  75. package/apps/runtime/dist/docs/dev/wizard-format/templates.md +2 -0
  76. package/apps/runtime/dist/docs/dev/wizard-format/views-and-widgets.md +22 -2
  77. package/apps/runtime/dist/docs/user-guide/capabilities.md +132 -0
  78. package/apps/runtime/dist/docs/user-guide/cloud-sync.md +2 -0
  79. package/apps/runtime/dist/docs/user-guide/command-line.md +1 -0
  80. package/apps/runtime/dist/docs/user-guide/connectors.md +63 -7
  81. package/apps/runtime/dist/docs/user-guide/index.md +10 -1
  82. package/apps/runtime/dist/docs/user-guide/meta.json +6 -1
  83. package/apps/runtime/dist/docs/user-guide/models.md +105 -30
  84. package/apps/runtime/dist/docs/user-guide/protocol.md +80 -0
  85. package/apps/runtime/dist/docs/user-guide/skills.md +8 -4
  86. package/apps/runtime/dist/docs/user-guide/space.md +5 -4
  87. package/apps/runtime/dist/docs/user-guide/together.md +29 -2
  88. package/apps/runtime/dist/docs/user-guide/troubleshooting.md +2 -2
  89. package/apps/runtime/dist/docs/user-guide/work-mode.md +128 -0
  90. package/apps/runtime/dist/engenty/connections-external/build-connector.js +2 -5
  91. package/apps/runtime/dist/engenty/connections-external/importer/classify.js +72 -0
  92. package/apps/runtime/dist/engenty/connections-google/connectors/gmail.js +1 -1
  93. package/apps/runtime/dist/engenty/connections-microsoft/outlook.js +3 -2
  94. package/apps/runtime/dist/engenty/connections-sdk/types.js +2 -0
  95. package/apps/runtime/dist/engenty/connections-slack/connector.js +2 -1
  96. package/apps/runtime/dist/engine/decide.js +1 -1
  97. package/apps/runtime/dist/engine/requirements.js +139 -11
  98. package/apps/runtime/dist/engine/resources.js +43 -12
  99. package/apps/runtime/dist/engine/runner.js +121 -27
  100. package/apps/runtime/dist/engine/steps.js +42 -16
  101. package/apps/runtime/dist/engine/template.js +35 -1
  102. package/apps/runtime/dist/env.js +9 -4
  103. package/apps/runtime/dist/index.js +18 -2
  104. package/apps/runtime/dist/link-preview.js +9 -0
  105. package/apps/runtime/dist/live/feed.js +2 -2
  106. package/apps/runtime/dist/live/origin.js +2 -2
  107. package/apps/runtime/dist/live/views.js +51 -26
  108. package/apps/runtime/dist/manage.js +32 -0
  109. package/apps/runtime/dist/mcp/flow-app.js +1 -1
  110. package/apps/runtime/dist/mcp/handler.js +55 -1
  111. package/apps/runtime/dist/mcp/seen.js +47 -0
  112. package/apps/runtime/dist/mcp/tools.js +75 -34
  113. package/apps/runtime/dist/models.js +203 -12
  114. package/apps/runtime/dist/motion-graphics/project.js +8 -8
  115. package/apps/runtime/dist/motion-graphics/step.js +2 -2
  116. package/apps/runtime/dist/motion-graphics/tools.js +1 -1
  117. package/apps/runtime/dist/plugins/events.js +2 -2
  118. package/apps/runtime/dist/plugins/jobs.js +4 -1
  119. package/apps/runtime/dist/plugins/loader.js +2 -2
  120. package/apps/runtime/dist/prompts/architect.md +3 -3
  121. package/apps/runtime/dist/prompts/authoring.md +46 -12
  122. package/apps/runtime/dist/prompts/goose.md +14 -13
  123. package/apps/runtime/dist/prompts/mcp.md +6 -6
  124. package/apps/runtime/dist/prompts/safety.md +18 -0
  125. package/apps/runtime/dist/prompts/services.md +4 -4
  126. package/apps/runtime/dist/prompts/step.md +3 -3
  127. package/apps/runtime/dist/prompts/tools.md +39 -10
  128. package/apps/runtime/dist/routes/api.js +31 -20
  129. package/apps/runtime/dist/routes/broker.js +316 -0
  130. package/apps/runtime/dist/routes/connections.js +71 -0
  131. package/apps/runtime/dist/routes/delivery.js +25 -0
  132. package/apps/runtime/dist/routes/discover.js +17 -0
  133. package/apps/runtime/dist/routes/live.js +11 -1
  134. package/apps/runtime/dist/routes/marketplace.js +3 -3
  135. package/apps/runtime/dist/routes/person.js +4 -1
  136. package/apps/runtime/dist/routes/plugins.js +3 -1
  137. package/apps/runtime/dist/routes/rules.js +26 -0
  138. package/apps/runtime/dist/routes/runs.js +59 -33
  139. package/apps/runtime/dist/routes/skills.js +6 -6
  140. package/apps/runtime/dist/routes/studio.js +256 -148
  141. package/apps/runtime/dist/routes/work.js +199 -0
  142. package/apps/runtime/dist/safety.js +60 -18
  143. package/apps/runtime/dist/sandbox/index.js +27 -0
  144. package/apps/runtime/dist/services/access.js +38 -17
  145. package/apps/runtime/dist/services/api.js +38 -13
  146. package/apps/runtime/dist/services/architect.js +3 -3
  147. package/apps/runtime/dist/services/assistant-chats.js +9 -1
  148. package/apps/runtime/dist/services/brand.js +12 -12
  149. package/apps/runtime/dist/services/broker-bell.js +69 -0
  150. package/apps/runtime/dist/services/broker-notify.js +127 -0
  151. package/apps/runtime/dist/services/client-steps.js +79 -0
  152. package/apps/runtime/dist/services/cloud.js +42 -42
  153. package/apps/runtime/dist/services/command-risk.js +51 -0
  154. package/apps/runtime/dist/services/discover.js +85 -0
  155. package/apps/runtime/dist/services/knowledge-model.js +13 -13
  156. package/apps/runtime/dist/services/knowledge.js +117 -80
  157. package/apps/runtime/dist/services/manage-reports.js +77 -7
  158. package/apps/runtime/dist/services/marketplace.js +7 -31
  159. package/apps/runtime/dist/services/members-studio.js +165 -0
  160. package/apps/runtime/dist/services/onboarding.js +22 -22
  161. package/apps/runtime/dist/services/package-file.js +1 -1
  162. package/apps/runtime/dist/services/package.js +22 -22
  163. package/apps/runtime/dist/services/pages.js +13 -9
  164. package/apps/runtime/dist/services/runs.js +4 -3
  165. package/apps/runtime/dist/services/seen.js +55 -0
  166. package/apps/runtime/dist/services/shares.js +28 -13
  167. package/apps/runtime/dist/services/site.js +23 -23
  168. package/apps/runtime/dist/services/skills-registry.js +15 -15
  169. package/apps/runtime/dist/services/skills.js +44 -44
  170. package/apps/runtime/dist/services/space-categories.js +35 -35
  171. package/apps/runtime/dist/services/space-data.js +130 -111
  172. package/apps/runtime/dist/services/{project-files.js → space-files.js} +84 -75
  173. package/apps/runtime/dist/services/{project-index.js → space-index.js} +116 -73
  174. package/apps/runtime/dist/services/space-origin.js +19 -11
  175. package/apps/runtime/dist/services/spaces.js +478 -598
  176. package/apps/runtime/dist/services/synced-spaces.js +668 -0
  177. package/apps/runtime/dist/services/themes.js +15 -15
  178. package/apps/runtime/dist/services/widgets.js +6 -6
  179. package/apps/runtime/dist/services/wizards.js +112 -38
  180. package/apps/runtime/dist/services/work-ai.js +257 -0
  181. package/apps/runtime/dist/services/work-approvals.js +104 -0
  182. package/apps/runtime/dist/services/work-chats.js +908 -0
  183. package/apps/runtime/dist/services/work-connections.js +90 -0
  184. package/apps/runtime/dist/services/work-files.js +85 -0
  185. package/apps/runtime/dist/services/work-mastra.js +73 -0
  186. package/apps/runtime/dist/services/work-sandbox.js +42 -0
  187. package/apps/runtime/dist/sharing/files.js +14 -4
  188. package/apps/runtime/dist/sharing/index.js +40 -39
  189. package/apps/runtime/dist/sharing/jobs.js +67 -17
  190. package/apps/runtime/dist/sharing/targets/connector.js +10 -6
  191. package/apps/runtime/dist/sharing/targets/email.js +10 -8
  192. package/apps/runtime/dist/sharing/targets/slack.js +10 -8
  193. package/apps/runtime/dist/sharing/targets/storage.js +6 -4
  194. package/apps/runtime/dist/store/index.js +14 -3
  195. package/apps/runtime/dist/store/shared-lists.js +4 -2
  196. package/apps/runtime/dist/sync/apply.js +2 -2
  197. package/apps/runtime/dist/sync/client.js +113 -113
  198. package/apps/runtime/dist/sync/hub.js +41 -41
  199. package/apps/runtime/dist/sync/log.js +12 -12
  200. package/apps/runtime/dist/sync/records.js +118 -120
  201. package/apps/runtime/dist/texts.js +44 -2
  202. package/apps/runtime/dist/tools/connections.js +112 -0
  203. package/apps/runtime/dist/tools/connector.js +157 -67
  204. package/apps/runtime/dist/tools/index.js +31 -15
  205. package/apps/runtime/dist/tools/mail.js +40 -11
  206. package/apps/runtime/dist/tools/pages.js +11 -5
  207. package/apps/runtime/dist/tools/plugin.js +43 -7
  208. package/apps/runtime/dist/tools/skills.js +1 -1
  209. package/apps/runtime/dist/tools/{project.js → space.js} +30 -25
  210. package/apps/runtime/dist/tools/store.js +3 -2
  211. package/apps/runtime/dist/widgets/step.js +10 -10
  212. package/apps/web/dist/assets/AboutDialog-DgfeipUc.js +1 -0
  213. package/apps/web/dist/assets/CapabilitiesPage-BoYJvgIu.js +2 -0
  214. package/apps/web/dist/assets/{ChangelogDialog-CKLgFL6r.js → ChangelogDialog-Duab4zTO.js} +1 -1
  215. package/apps/web/dist/assets/{CodeEditor-B3nto_26.js → CodeEditor-nxoOt8ge.js} +1 -1
  216. package/apps/web/dist/assets/EditorPage-ZrgGpYMC.js +3 -0
  217. package/apps/web/dist/assets/{FlowPreview-zJCtixSi.js → FlowPreview-aMfwcPul.js} +1 -1
  218. package/apps/web/dist/assets/LangSwitch-DpD0inR4.js +1 -0
  219. package/apps/web/dist/assets/Marketplace-CpzD9pNQ.js +2 -0
  220. package/apps/web/dist/assets/NewWizardChannels-IB18afWN.js +1 -0
  221. package/apps/web/dist/assets/NewWizardPage-rYbcmPGG.js +7 -0
  222. package/apps/web/dist/assets/OnboardingPage-ztHT01ah.js +1 -0
  223. package/apps/web/dist/assets/PreviewPane-DviWTLfi.js +9 -0
  224. package/apps/web/dist/assets/PublicRunner-C2geZhhM.js +1 -0
  225. package/apps/web/dist/assets/ReadOnly-kSb_Kbdm.js +1 -0
  226. package/apps/web/dist/assets/SettingsPage-DM2h8N0J.js +2 -0
  227. package/apps/web/dist/assets/SetupPage-Wfyz6xH4.js +1 -0
  228. package/apps/web/dist/assets/SharePage-CyWQorWB.js +1 -0
  229. package/apps/web/dist/assets/SkillEditor-CqQMg2MC.js +1 -0
  230. package/apps/web/dist/assets/Skills-CnhpgoOA.js +9 -0
  231. package/apps/web/dist/assets/SpacePage-q4Bk3N7k.js +2 -0
  232. package/apps/web/dist/assets/UpdateCheck-C2CE6CC3.js +2 -0
  233. package/apps/web/dist/assets/changelog-B6hN1Cp7.js +1 -0
  234. package/apps/web/dist/assets/circle-alert-C8Ma-bPY.js +1 -0
  235. package/apps/web/dist/assets/circle-check-Bu9Z3mlJ.js +1 -0
  236. package/apps/web/dist/assets/code-editor-CfTGqOpp.js +2 -0
  237. package/apps/web/dist/assets/{code-xml-Hx7YxCg0.js → code-xml-B4kLFZSj.js} +1 -1
  238. package/apps/web/dist/assets/connection-sign-in-CIiv0t2p.js +1 -0
  239. package/apps/web/dist/assets/esm-Xwn4GtqG.js +7 -0
  240. package/apps/web/dist/assets/{eye-BkMFLnYu.js → eye-BpoKpIdt.js} +1 -1
  241. package/apps/web/dist/assets/host-BrP-ENHg.css +1 -0
  242. package/apps/web/dist/assets/host-DJ7-p0Sc.js +118 -0
  243. package/apps/web/dist/assets/i18n-BJ7Ld6O6.js +55 -0
  244. package/apps/web/dist/assets/index-D18DvnxX.css +1 -0
  245. package/apps/web/dist/assets/index-D2akynS-.js +10 -0
  246. package/apps/web/dist/assets/logo-BpnjXTRy.js +1 -0
  247. package/apps/web/dist/assets/oss-credits-IdX5bc71.js +1 -0
  248. package/apps/web/dist/assets/{phone-DMfwuh9V.js → phone-Ctvf-Am-.js} +1 -1
  249. package/apps/web/dist/assets/read-aloud-Da_RSm2S.js +1 -0
  250. package/apps/web/dist/assets/{runners-D5qz6b_s.js → runners-CyIvJIHr.js} +1 -1
  251. package/apps/web/dist/assets/scroll-text-ChrjRu9Y.js +1 -0
  252. package/apps/web/dist/assets/session-SXPtTWRK.js +2 -0
  253. package/apps/web/dist/assets/theme-CbTcTFWy.js +11 -0
  254. package/apps/web/dist/assets/ui-Uqnx1UpK.js +82 -0
  255. package/apps/web/dist/assets/{upload-DQJwLSGj.js → upload-BchUnQGV.js} +1 -1
  256. package/apps/web/dist/assets/{useMutation-C20c2EH3.js → useMutation-DEkZhp5c.js} +1 -1
  257. package/apps/web/dist/assets/{volume-2-CC5qamYT.js → volume-2-CU_oy81Z.js} +1 -1
  258. package/apps/web/dist/assets/with-selector-CoMyWBAX.js +1 -0
  259. package/apps/web/dist/index.html +17 -10
  260. package/apps/web/dist/mcp/flow.html +119 -64
  261. package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +20 -10
  262. package/node_modules/@engenty/wizards-shared/dist/assistant.d.ts +7 -1
  263. package/node_modules/@engenty/wizards-shared/dist/assistant.js +11 -1
  264. package/node_modules/@engenty/wizards-shared/dist/connectors.d.ts +236 -2
  265. package/node_modules/@engenty/wizards-shared/dist/connectors.js +52 -2
  266. package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +257 -8
  267. package/node_modules/@engenty/wizards-shared/dist/definition.js +113 -15
  268. package/node_modules/@engenty/wizards-shared/dist/discover.d.ts +21 -0
  269. package/node_modules/@engenty/wizards-shared/dist/discover.js +1 -0
  270. package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +38 -2
  271. package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +38 -2
  272. package/node_modules/@engenty/wizards-shared/dist/fit.js +1 -1
  273. package/node_modules/@engenty/wizards-shared/dist/json-schema.d.ts +1 -1
  274. package/node_modules/@engenty/wizards-shared/dist/json-schema.js +1 -1
  275. package/node_modules/@engenty/wizards-shared/dist/live.d.ts +2 -2
  276. package/node_modules/@engenty/wizards-shared/dist/live.js +1 -1
  277. package/node_modules/@engenty/wizards-shared/dist/marketplace.d.ts +0 -5
  278. package/node_modules/@engenty/wizards-shared/dist/marketplace.js +3 -1
  279. package/node_modules/@engenty/wizards-shared/dist/run.d.ts +115 -6
  280. package/node_modules/@engenty/wizards-shared/dist/run.js +135 -0
  281. package/node_modules/@engenty/wizards-shared/dist/runner-texts.d.ts +15 -1
  282. package/node_modules/@engenty/wizards-shared/dist/runner-texts.js +14 -0
  283. package/node_modules/@engenty/wizards-shared/dist/rwx.d.ts +42 -0
  284. package/node_modules/@engenty/wizards-shared/dist/rwx.js +29 -0
  285. package/node_modules/@engenty/wizards-shared/dist/skills.d.ts +1 -1
  286. package/node_modules/@engenty/wizards-shared/dist/space-data.d.ts +2 -2
  287. package/node_modules/@engenty/wizards-shared/dist/{projects.d.ts → spaces.d.ts} +39 -15
  288. package/node_modules/@engenty/wizards-shared/dist/{projects.js → spaces.js} +16 -9
  289. package/node_modules/@engenty/wizards-shared/dist/store.d.ts +7 -2
  290. package/node_modules/@engenty/wizards-shared/dist/surface.d.ts +35 -4
  291. package/node_modules/@engenty/wizards-shared/dist/surface.js +121 -3
  292. package/node_modules/@engenty/wizards-shared/dist/sync.d.ts +1 -1
  293. package/node_modules/@engenty/wizards-shared/dist/theme-look.js +1 -1
  294. package/node_modules/@engenty/wizards-shared/dist/tiers.d.ts +195 -0
  295. package/node_modules/@engenty/wizards-shared/dist/tiers.js +98 -0
  296. package/node_modules/@engenty/wizards-shared/dist/wizard-package.d.ts +2 -2
  297. package/node_modules/@engenty/wizards-shared/dist/wizard-package.js +3 -3
  298. package/package.json +4 -1
  299. package/plugin/.claude-plugin/plugin.json +1 -1
  300. package/plugin/plugin.json +1 -1
  301. package/plugin/skills/build-wizard/SKILL.md +1 -1
  302. package/apps/runtime/dist/services/projects.js +0 -473
  303. package/apps/web/dist/assets/AboutDialog-CLgnoYTI.js +0 -1
  304. package/apps/web/dist/assets/EditorPage-D9JDdAAI.js +0 -3
  305. package/apps/web/dist/assets/Marketplace-D4e0Oac9.js +0 -2
  306. package/apps/web/dist/assets/NewWizardChannels-B4N7GIYh.js +0 -1
  307. package/apps/web/dist/assets/NewWizardPage-Dpt0Mzk8.js +0 -7
  308. package/apps/web/dist/assets/OnboardingPage-CDoYVjRC.js +0 -1
  309. package/apps/web/dist/assets/PreviewPane-DPB5nEd5.js +0 -10
  310. package/apps/web/dist/assets/ProjectPage-408YOoNa.js +0 -10
  311. package/apps/web/dist/assets/PublicRunner-BZ66xdRX.js +0 -1
  312. package/apps/web/dist/assets/ReadOnly-C9oGMkUB.js +0 -1
  313. package/apps/web/dist/assets/SettingsPage-Dq3AZwJS.js +0 -2
  314. package/apps/web/dist/assets/SetupPage-CP3lbyZc.js +0 -1
  315. package/apps/web/dist/assets/SharePage-DdMm1Y8K.js +0 -1
  316. package/apps/web/dist/assets/SkillEditor-b5NMFB90.js +0 -1
  317. package/apps/web/dist/assets/changelog-82-DHogQ.js +0 -1
  318. package/apps/web/dist/assets/esm-BdxDT9Km.js +0 -7
  319. package/apps/web/dist/assets/i18n-CKKh3Pn0.js +0 -55
  320. package/apps/web/dist/assets/index-Cy2NHzAx.js +0 -49
  321. package/apps/web/dist/assets/index-wR_-1hfN.css +0 -1
  322. package/apps/web/dist/assets/lock-CGXM95Mi.js +0 -1
  323. package/apps/web/dist/assets/logo-CGNoptDg.js +0 -1
  324. package/apps/web/dist/assets/oss-credits-DpRWUPjD.js +0 -1
  325. package/apps/web/dist/assets/session-DRy0k0nh.js +0 -2
  326. package/apps/web/dist/assets/theme-DNPm6r4e.js +0 -11
  327. package/apps/web/dist/assets/ui-CwFQAfE-.js +0 -83
  328. /package/apps/runtime/dist/db/migrations/tenant/{0027_space_skill.sql → 0030_space_skill.sql} +0 -0
@@ -516,7 +516,7 @@ export const gmailConnector = defineConnector({
516
516
  }),
517
517
  connectorAction({
518
518
  description: "Send an email via Gmail immediately (plain text). This delivers mail to the recipients — irreversible.",
519
- group: "destructive",
519
+ group: "send",
520
520
  handler: async (input, ctx) => {
521
521
  const result = await googleJson(ctx, `${GMAIL_API}/messages/send`, {
522
522
  body: JSON.stringify({ raw: buildRawMessage(input) }),
@@ -428,10 +428,10 @@ export const microsoftOutlookConnector = defineConnector({
428
428
  },
429
429
  summary: "Update a calendar event",
430
430
  }),
431
- // ── destructive ─────────────────────────────────────────────────────
431
+ // ── send ────────────────────────────────────────────────────────────
432
432
  action({
433
433
  description: "Send an email immediately on behalf of the connected account.",
434
- group: "destructive",
434
+ group: "send",
435
435
  id: "send_message",
436
436
  inputSchema: z.object({
437
437
  ...messageDraftFields,
@@ -453,6 +453,7 @@ export const microsoftOutlookConnector = defineConnector({
453
453
  },
454
454
  summary: "Send an email",
455
455
  }),
456
+ // ── destructive ─────────────────────────────────────────────────────
456
457
  action({
457
458
  description: "Delete a message (moves it to the Deleted Items folder; recoverable from there).",
458
459
  group: "destructive",
@@ -1,12 +1,14 @@
1
1
  export const ACTION_GROUP_CONTRACTS = {
2
2
  read: { idempotent: true, requiresApproval: false, riskLevel: "low" },
3
3
  write: { idempotent: false, requiresApproval: true, riskLevel: "medium" },
4
+ send: { idempotent: false, requiresApproval: true, riskLevel: "high" },
4
5
  destructive: { idempotent: false, requiresApproval: true, riskLevel: "high" },
5
6
  };
6
7
  /** Default connection policy per group when the user has not overridden it. */
7
8
  export const ACTION_GROUP_DEFAULT_POLICY = {
8
9
  read: "allow",
9
10
  write: "ask",
11
+ send: "ask",
10
12
  destructive: "ask",
11
13
  };
12
14
  export function connectorOperationId(connector, actionId) {
@@ -260,7 +260,8 @@ const actions = [
260
260
  },
261
261
  {
262
262
  description: "Post a message to a Slack channel (or as a thread reply) as the connected user.",
263
- group: "write",
263
+ // Others read it: a post is a send, not a change.
264
+ group: "send",
264
265
  handler: async (input, ctx) => {
265
266
  const args = postMessageInput.parse(input);
266
267
  const data = await slackApi(ctx, "chat.postMessage", {
@@ -12,7 +12,7 @@ function stateText(state) {
12
12
  return text.length > MAX_STATE_CHARS ? `${text.slice(0, MAX_STATE_CHARS)}…` : text;
13
13
  }
14
14
  async function askSystemOne(input, signal) {
15
- const access = await systemOneAccess().catch(() => null);
15
+ const access = await systemOneAccess(input.call).catch(() => null);
16
16
  if (!access) {
17
17
  return {};
18
18
  }
@@ -1,7 +1,9 @@
1
- import { conditionMatches, conditionsOf, isDecidedField, isDecisionStep, isOtherwise, MODEL_CLASSES, } from "@engenty/wizards-shared/definition";
1
+ import { classIdOf, conditionMatches, conditionsOf, isDecidedField, isDecisionStep, isOtherwise, MODEL_CLASSES, textClassOf, } from "@engenty/wizards-shared/definition";
2
2
  import { closedChoicesFor, openValue, otherwiseIndex, unavoidableFrom, unavoidableSteps, } from "@engenty/wizards-shared/fit";
3
+ import { CLASS_NAMES } from "@engenty/wizards-shared/providers";
3
4
  import { note, saidText } from "@engenty/wizards-shared/run";
4
- import { classProblem, motionClient } from "../models.js";
5
+ import { MAKER_COMPANIES, MAKER_FAMILIES, splitClassId, } from "@engenty/wizards-shared/tiers";
6
+ import { classProblem, currentTier, motionClient, tierRefusal } from "../models.js";
5
7
  // The steps every run passes through, and the choices that lead around a missing model, are
6
8
  // pure and shared (packages/shared/src/fit.ts): the standalone check uses the same.
7
9
  export { openValue, unavoidableFrom, unavoidableSteps };
@@ -29,7 +31,7 @@ function ownClasses(step) {
29
31
  if (isDecisionStep(step)) {
30
32
  return ["classifier"];
31
33
  }
32
- const classes = [step.model ?? "standard"];
34
+ const classes = [textClassOf(step.model ?? "standard")];
33
35
  if (step.tools.includes("image")) {
34
36
  classes.push("image");
35
37
  }
@@ -50,10 +52,10 @@ function ownClasses(step) {
50
52
  case "voice":
51
53
  return ["speech"];
52
54
  default:
53
- return [step.model ?? "standard"];
55
+ return [textClassOf(step.model ?? "standard")];
54
56
  }
55
57
  case "motion-graphics":
56
- return [step.model ?? "low"];
58
+ return [textClassOf(step.model ?? "low")];
57
59
  case "page":
58
60
  // A voice note the page asks for is listened to before the next step reads it.
59
61
  return step.fields.some((f) => f.kind === "audio" && f.required) ? ["audio"] : [];
@@ -216,10 +218,119 @@ export function mostAlongOnePath(def, cost, closed = new Set()) {
216
218
  };
217
219
  return walk(closed) ?? walk(new Set()) ?? def.steps.reduce((sum, s) => sum + cost(s), 0);
218
220
  }
219
- /** The steps that call a class this runtime cannot serve. */
221
+ /** The steps that call a class this runtime cannot serve, or the organization's tier doesn't offer. */
220
222
  export async function stepsWithoutModel(def) {
221
223
  const missing = await missingClasses();
222
- return new Set(def.steps.filter((s) => stepClasses(s).some((cls) => missing.has(cls))).map((s) => s.id));
224
+ const tier = await currentTier();
225
+ return new Set(def.steps
226
+ .filter((s) => stepClasses(s).some((cls) => missing.has(cls) || (tier && tierProblem(tier, tierClassOf(s, cls)))))
227
+ .map((s) => s.id));
228
+ }
229
+ /**
230
+ * The class a step asks the gateway for, as the tier names it: `anthropic/highest` where the
231
+ * step names a maker for its own text class, else the class.
232
+ */
233
+ export function tierClassOf(step, cls) {
234
+ if (!("maker" in step) || !step.maker || cls === "classifier") {
235
+ return cls;
236
+ }
237
+ const own = step.model ?? cls;
238
+ return textClassOf(own) === cls ? classIdOf({ model: own, maker: step.maker }, "standard") : cls;
239
+ }
240
+ /** What a tier's class id makes, as a note's gap: "videos", "Claude · High". */
241
+ export function tierClassWhat(id) {
242
+ const { maker, cls } = splitClassId(id);
243
+ const name = cls === "highest" ? "Highest" : CLASS_NAMES[cls];
244
+ if (maker) {
245
+ return `${MAKER_FAMILIES[maker]} · ${name ?? cls}`;
246
+ }
247
+ switch (cls) {
248
+ case "image":
249
+ return note("makesImages");
250
+ case "video":
251
+ return note("makesVideos");
252
+ case "speech":
253
+ return note("makesSpeech");
254
+ case "audio":
255
+ return note("makesVoiceNotes");
256
+ case "classifier":
257
+ return note("makesDecisions");
258
+ case "embedding":
259
+ return note("makesSearch");
260
+ default:
261
+ return name ?? cls;
262
+ }
263
+ }
264
+ /**
265
+ * What a step the gateway refused for the organization's tier or policy says: the class and the
266
+ * tier, or that the admins haven't approved it. Null for any other failure.
267
+ */
268
+ export async function tierRefusalSaid(err) {
269
+ const refused = tierRefusal(err);
270
+ if (!refused) {
271
+ return null;
272
+ }
273
+ const what = refused.cls ? tierClassWhat(refused.cls) : note("thisModel");
274
+ if (refused.type === "not_in_policy") {
275
+ return note("notInPolicy", { what });
276
+ }
277
+ const tier = await currentTier();
278
+ const problem = (tier && refused.cls ? tierProblem(tier, refused.cls) : null) ??
279
+ note("tierOffersNo", { tier: refused.tier ?? tier?.name ?? "", what });
280
+ return note("tierRefused", { problem });
281
+ }
282
+ const MASKED_KINDS = {
283
+ person: "maskedPerson",
284
+ email: "maskedEmail",
285
+ phone: "maskedPhone",
286
+ iban: "maskedIban",
287
+ id: "maskedId",
288
+ address: "maskedAddress",
289
+ contract: "maskedContract",
290
+ term: "maskedTerm",
291
+ };
292
+ /** The Log line of what the gateway masked in a step's calls, from its counts per kind. */
293
+ export function maskedNote(counts) {
294
+ const kinds = [];
295
+ let other = 0;
296
+ for (const [kind, count] of Object.entries(counts)) {
297
+ const code = MASKED_KINDS[kind];
298
+ if (code) {
299
+ kinds.push(note(code, { count }));
300
+ }
301
+ else {
302
+ other += count;
303
+ }
304
+ }
305
+ if (other) {
306
+ kinds.push(note("maskedOther", { count: other }));
307
+ }
308
+ const count = Object.values(counts).reduce((sum, n) => sum + n, 0);
309
+ return note("masked", { count, kinds });
310
+ }
311
+ /** Why the organization's tier doesn't serve a class; null where it does. */
312
+ export function tierProblem(tier, id) {
313
+ const entry = tier.classes[id];
314
+ const what = tierClassWhat(id);
315
+ if (!entry) {
316
+ return note("tierOffersNo", { tier: tier.name, what });
317
+ }
318
+ if (entry.model !== null) {
319
+ return null;
320
+ }
321
+ const { maker } = splitClassId(id);
322
+ if (entry.reason === "maker" && maker) {
323
+ return note("tierLeavesOutMaker", { tier: tier.name, maker: MAKER_COMPANIES[maker] });
324
+ }
325
+ const model = entry.name ?? note("thisModel");
326
+ const why = entry.reason === "region"
327
+ ? note("tierWhyRegion")
328
+ : entry.reason === "retention"
329
+ ? note("tierWhyRetention", { model })
330
+ : entry.reason === "training"
331
+ ? note("tierWhyTraining", { model })
332
+ : note("tierWhyUnbound");
333
+ return note("tierOffersNoWhy", { tier: tier.name, what, why });
223
334
  }
224
335
  /** The classes this wizard needs that this runtime cannot serve, in a language; empty = every step can run. */
225
336
  export async function missingModels(def, lang = "en") {
@@ -228,22 +339,39 @@ export async function missingModels(def, lang = "en") {
228
339
  /** The classes this wizard needs that this runtime cannot serve; empty = every step can run. */
229
340
  export async function missingModelsSaid(def) {
230
341
  const unavoidable = unavoidableSteps(def);
342
+ const tier = await currentTier();
231
343
  const needs = new Map();
344
+ // What the organization's tier doesn't offer is missing whatever this runtime could serve.
345
+ const outside = new Map();
346
+ const use = (step, cls, required) => {
347
+ const id = tier ? tierClassOf(step, cls) : cls;
348
+ const problem = tier ? tierProblem(tier, id) : null;
349
+ if (!problem) {
350
+ needs.set(cls, [...(needs.get(cls) ?? []), { step, required }]);
351
+ return;
352
+ }
353
+ const entry = outside.get(id) ?? { cls, tierClass: id, problem, steps: [], blocking: false };
354
+ if (!entry.steps.some((s) => s.id === step.id)) {
355
+ entry.steps.push({ id: step.id, title: step.title });
356
+ }
357
+ entry.blocking ||= required && unavoidable.has(step.id);
358
+ outside.set(id, entry);
359
+ };
232
360
  for (const step of def.steps) {
233
361
  for (const cls of new Set(stepClasses(step))) {
234
- needs.set(cls, [...(needs.get(cls) ?? []), { step, required: true }]);
362
+ use(step, cls, true);
235
363
  }
236
364
  for (const cls of optionalStepClasses(step)) {
237
- needs.set(cls, [...(needs.get(cls) ?? []), { step, required: false }]);
365
+ use(step, cls, false);
238
366
  }
239
367
  }
240
- const missing = [];
368
+ const missing = [...outside.values()];
241
369
  // A video runs on an installed client only, whatever serves its class otherwise.
242
370
  for (const step of def.steps) {
243
371
  if (step.type !== "motion-graphics") {
244
372
  continue;
245
373
  }
246
- const cls = step.model ?? "low";
374
+ const cls = textClassOf(step.model ?? "low");
247
375
  const found = await motionClient(cls);
248
376
  if ("problem" in found) {
249
377
  missing.push({
@@ -1,10 +1,26 @@
1
+ import { brokerSecret, reachesOutside, whoOf } from "../broker/index.js";
1
2
  import { webContext } from "../render/chromium.js";
2
- import { createSandbox } from "../sandbox/index.js";
3
- import { getSecret, putSecret } from "../store/index.js";
3
+ import { guestRun } from "../safety.js";
4
+ import { guestSandboxEngine, sandboxEngine, } from "../sandbox/index.js";
5
+ import { putSecret } from "../store/index.js";
4
6
  /** Sign-ins the person asked the wizard to keep, as Playwright storage state. */
5
7
  const SESSION_SLOT = "browser";
8
+ reachesOutside("browser_session", {
9
+ connection: SESSION_SLOT,
10
+ action: "read_secret",
11
+ kind: "read",
12
+ });
6
13
  /** A person who took the browser over and does nothing on it this long hands it back. */
7
14
  const SEAT_IDLE_MS = 3 * 60_000;
15
+ /**
16
+ * The sandbox engine of a run: a member's (a `userId`) and a Work chat's is the server's
17
+ * (`SANDBOX`); a guest's – a live run with a visitor and no user, a plugin door's among them –
18
+ * is `SANDBOX_GUESTS`: agentOS when it is ready, else none, never Docker. The one place where a
19
+ * run's engine is picked (docs/plans/capabilities.md, A1).
20
+ */
21
+ export function runSandboxEngine(run) {
22
+ return guestRun(run) ? guestSandboxEngine() : sandboxEngine();
23
+ }
8
24
  /**
9
25
  * What a run holds while an agent works: a browser context and a sandbox, both made on first
10
26
  * use and released when the run stops running.
@@ -14,6 +30,8 @@ export class RunResources {
14
30
  context = null;
15
31
  page = null;
16
32
  sandbox = null;
33
+ /** The engine this run's sandbox is made on; null until bound, or when the run has none. */
34
+ engine = null;
17
35
  scope = null;
18
36
  /** Changes the person allowed for the rest of this run, as "<connection>:<action>". */
19
37
  allowed = new Set();
@@ -27,19 +45,29 @@ export class RunResources {
27
45
  constructor(runId) {
28
46
  this.runId = runId;
29
47
  }
30
- /** Whose store kept sign-ins are read from and written to. */
31
- bind(scope) {
48
+ /** Whose store kept sign-ins are read from and written to, and whose run this is. */
49
+ bind(scope, run) {
32
50
  this.scope = scope;
51
+ this.engine = runSandboxEngine(run);
52
+ }
53
+ /** What this run's sandbox runs, or null when the run has none (a guest's, or `SANDBOX=off`). */
54
+ sandboxCapabilities() {
55
+ return this.engine?.capabilities() ?? null;
33
56
  }
34
57
  async browserContext() {
35
58
  if (!this.context) {
36
- const kept = this.scope
37
- ? await getSecret(this.scope, SESSION_SLOT).catch(() => null)
38
- : null;
39
- this.context = await webContext({
40
- locale: "de-DE",
41
- ...(kept ? { storageState: kept.data } : {}),
42
- });
59
+ const make = (kept) => webContext({ locale: "de-DE", ...(kept ? { storageState: kept } : {}) });
60
+ // The kept sign-ins are read through the broker: only the browser context sees them.
61
+ const scope = this.scope;
62
+ this.context = scope
63
+ ? await brokerSecret({
64
+ who: whoOf(scope.holder),
65
+ where: { runId: this.runId, wizardId: scope.wizardId },
66
+ scope,
67
+ slot: SESSION_SLOT,
68
+ handler: make,
69
+ }).catch(() => make(null))
70
+ : await make(null);
43
71
  }
44
72
  return this.context;
45
73
  }
@@ -158,7 +186,10 @@ export class RunResources {
158
186
  }
159
187
  }
160
188
  sandboxHandle() {
161
- this.sandbox ??= createSandbox(this.runId);
189
+ if (!this.engine) {
190
+ throw new Error("This run has no sandbox.");
191
+ }
192
+ this.sandbox ??= this.engine.create(this.runId);
162
193
  return this.sandbox;
163
194
  }
164
195
  async release() {