wizards 0.1.9

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 (308) hide show
  1. package/LICENSE +110 -0
  2. package/README.md +170 -0
  3. package/apps/runtime/dist/agents/architect.js +453 -0
  4. package/apps/runtime/dist/agents/project-assistant.js +354 -0
  5. package/apps/runtime/dist/agents/subscription.js +206 -0
  6. package/apps/runtime/dist/agents/thought.js +21 -0
  7. package/apps/runtime/dist/agents/website.js +197 -0
  8. package/apps/runtime/dist/app.js +153 -0
  9. package/apps/runtime/dist/auth/account.js +121 -0
  10. package/apps/runtime/dist/auth/index.js +329 -0
  11. package/apps/runtime/dist/auth/keys.js +55 -0
  12. package/apps/runtime/dist/auth/local-ticket.js +23 -0
  13. package/apps/runtime/dist/authoring/example.js +73 -0
  14. package/apps/runtime/dist/authoring/guide.js +259 -0
  15. package/apps/runtime/dist/authoring/ops.js +117 -0
  16. package/apps/runtime/dist/cli/autostart.js +134 -0
  17. package/apps/runtime/dist/cli/clients.js +44 -0
  18. package/apps/runtime/dist/cli/environment.js +81 -0
  19. package/apps/runtime/dist/cli/exec.js +45 -0
  20. package/apps/runtime/dist/cli/home.js +74 -0
  21. package/apps/runtime/dist/cli/machine.js +145 -0
  22. package/apps/runtime/dist/cli/main.js +125 -0
  23. package/apps/runtime/dist/cli/setup.js +273 -0
  24. package/apps/runtime/dist/cli/start.js +190 -0
  25. package/apps/runtime/dist/cli/status.js +120 -0
  26. package/apps/runtime/dist/cli/ui.js +12 -0
  27. package/apps/runtime/dist/cli/update.js +58 -0
  28. package/apps/runtime/dist/connectors/builtin.js +70 -0
  29. package/apps/runtime/dist/connectors/external.js +400 -0
  30. package/apps/runtime/dist/connectors/gmail.js +107 -0
  31. package/apps/runtime/dist/connectors/imap.js +217 -0
  32. package/apps/runtime/dist/connectors/index.js +266 -0
  33. package/apps/runtime/dist/connectors/mail.js +72 -0
  34. package/apps/runtime/dist/connectors/outlook.js +90 -0
  35. package/apps/runtime/dist/credits/credits.js +103 -0
  36. package/apps/runtime/dist/credits/estimate.js +132 -0
  37. package/apps/runtime/dist/db/adopt.js +149 -0
  38. package/apps/runtime/dist/db/client.js +146 -0
  39. package/apps/runtime/dist/db/control-schema.js +70 -0
  40. package/apps/runtime/dist/db/migrations/control/0000_last_absorbing_man.sql +47 -0
  41. package/apps/runtime/dist/db/migrations/control/0001_gorgeous_nicolaos.sql +41 -0
  42. package/apps/runtime/dist/db/migrations/control/0002_secret_penance.sql +1 -0
  43. package/apps/runtime/dist/db/migrations/control/0003_nasty_mordo.sql +3 -0
  44. package/apps/runtime/dist/db/migrations/control/0004_breezy_eddie_brock.sql +6 -0
  45. package/apps/runtime/dist/db/migrations/control/meta/0000_snapshot.json +311 -0
  46. package/apps/runtime/dist/db/migrations/control/meta/0001_snapshot.json +599 -0
  47. package/apps/runtime/dist/db/migrations/control/meta/0002_snapshot.json +607 -0
  48. package/apps/runtime/dist/db/migrations/control/meta/0003_snapshot.json +311 -0
  49. package/apps/runtime/dist/db/migrations/control/meta/0004_snapshot.json +350 -0
  50. package/apps/runtime/dist/db/migrations/control/meta/_journal.json +41 -0
  51. package/apps/runtime/dist/db/migrations/tenant/0000_eminent_freak.sql +188 -0
  52. package/apps/runtime/dist/db/migrations/tenant/0001_salty_master_chief.sql +1 -0
  53. package/apps/runtime/dist/db/migrations/tenant/0002_cloudy_firebird.sql +1 -0
  54. package/apps/runtime/dist/db/migrations/tenant/0003_brown_warbound.sql +52 -0
  55. package/apps/runtime/dist/db/migrations/tenant/0004_romantic_nocturne.sql +6 -0
  56. package/apps/runtime/dist/db/migrations/tenant/meta/0000_snapshot.json +1323 -0
  57. package/apps/runtime/dist/db/migrations/tenant/meta/0001_snapshot.json +1330 -0
  58. package/apps/runtime/dist/db/migrations/tenant/meta/0002_snapshot.json +1337 -0
  59. package/apps/runtime/dist/db/migrations/tenant/meta/0003_snapshot.json +1605 -0
  60. package/apps/runtime/dist/db/migrations/tenant/meta/0004_snapshot.json +1645 -0
  61. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +41 -0
  62. package/apps/runtime/dist/db/schema.js +278 -0
  63. package/apps/runtime/dist/documents/parse.js +230 -0
  64. package/apps/runtime/dist/engenty/connections-external/build-connector.js +193 -0
  65. package/apps/runtime/dist/engenty/connections-external/errors.js +11 -0
  66. package/apps/runtime/dist/engenty/connections-external/import-service.js +270 -0
  67. package/apps/runtime/dist/engenty/connections-external/importer/classify.js +34 -0
  68. package/apps/runtime/dist/engenty/connections-external/importer/map-auth.js +185 -0
  69. package/apps/runtime/dist/engenty/connections-external/importer/normalize-mcp.js +63 -0
  70. package/apps/runtime/dist/engenty/connections-external/importer/normalize-openapi.js +130 -0
  71. package/apps/runtime/dist/engenty/connections-external/invoke/http-invoker.js +143 -0
  72. package/apps/runtime/dist/engenty/connections-external/invoke/mcp-client.js +143 -0
  73. package/apps/runtime/dist/engenty/connections-external/net/guarded-fetch.js +119 -0
  74. package/apps/runtime/dist/engenty/connections-external/oauth-dcr.js +88 -0
  75. package/apps/runtime/dist/engenty/connections-external/registry-client.js +336 -0
  76. package/apps/runtime/dist/engenty/connections-external/registry-source.js +82 -0
  77. package/apps/runtime/dist/engenty/connections-external/types.js +7 -0
  78. package/apps/runtime/dist/engenty/connections-github/connector.js +209 -0
  79. package/apps/runtime/dist/engenty/connections-google/connectors/calendar.js +359 -0
  80. package/apps/runtime/dist/engenty/connections-google/connectors/contacts.js +94 -0
  81. package/apps/runtime/dist/engenty/connections-google/connectors/drive.js +290 -0
  82. package/apps/runtime/dist/engenty/connections-google/connectors/gmail.js +567 -0
  83. package/apps/runtime/dist/engenty/connections-google/definitions.js +11 -0
  84. package/apps/runtime/dist/engenty/connections-google/shared.js +73 -0
  85. package/apps/runtime/dist/engenty/connections-hubspot/connector.js +140 -0
  86. package/apps/runtime/dist/engenty/connections-microsoft/action.js +17 -0
  87. package/apps/runtime/dist/engenty/connections-microsoft/graph.js +114 -0
  88. package/apps/runtime/dist/engenty/connections-microsoft/onedrive.js +286 -0
  89. package/apps/runtime/dist/engenty/connections-microsoft/outlook.js +464 -0
  90. package/apps/runtime/dist/engenty/connections-s3/s3.js +328 -0
  91. package/apps/runtime/dist/engenty/connections-sdk/files-capability.js +86 -0
  92. package/apps/runtime/dist/engenty/connections-sdk/oauth2.js +150 -0
  93. package/apps/runtime/dist/engenty/connections-sdk/registry.js +89 -0
  94. package/apps/runtime/dist/engenty/connections-sdk/storage-capability.js +84 -0
  95. package/apps/runtime/dist/engenty/connections-sdk/types.js +30 -0
  96. package/apps/runtime/dist/engenty/connections-slack/connector.js +360 -0
  97. package/apps/runtime/dist/engenty/csv-import/csv-matrix.js +178 -0
  98. package/apps/runtime/dist/engenty/csv-import/import-sources.js +87 -0
  99. package/apps/runtime/dist/engenty/csv-import/parse-csv.js +129 -0
  100. package/apps/runtime/dist/engenty/csv-import/serialize-csv.js +20 -0
  101. package/apps/runtime/dist/engenty/csv-import/types.js +1 -0
  102. package/apps/runtime/dist/engenty/csv-import/xlsx-workbook.js +159 -0
  103. package/apps/runtime/dist/engenty/doc-converter/interface.js +9 -0
  104. package/apps/runtime/dist/engenty/doc-converter/page-break.js +92 -0
  105. package/apps/runtime/dist/engenty/doc-converter/providers/local/index.js +72 -0
  106. package/apps/runtime/dist/engenty/document-scanner/schemas/classifier.js +30 -0
  107. package/apps/runtime/dist/engenty/document-scanner/schemas/index.js +4 -0
  108. package/apps/runtime/dist/engenty/document-scanner/schemas/invoice.js +73 -0
  109. package/apps/runtime/dist/engenty/document-scanner/schemas/receipt.js +63 -0
  110. package/apps/runtime/dist/engenty/document-scanner/schemas/shared.js +40 -0
  111. package/apps/runtime/dist/engenty/search-index/chunks.js +164 -0
  112. package/apps/runtime/dist/engenty/search-index/contracts.js +9 -0
  113. package/apps/runtime/dist/engenty/shims/connections-sdk.js +39 -0
  114. package/apps/runtime/dist/engenty/shims/plugin-sdk.js +1 -0
  115. package/apps/runtime/dist/engenty/shims/web-ingest.js +3 -0
  116. package/apps/runtime/dist/engenty/web-ingest/ssrf.js +277 -0
  117. package/apps/runtime/dist/engine/asks.js +60 -0
  118. package/apps/runtime/dist/engine/events.js +46 -0
  119. package/apps/runtime/dist/engine/input.js +170 -0
  120. package/apps/runtime/dist/engine/prepare.js +51 -0
  121. package/apps/runtime/dist/engine/requirements.js +124 -0
  122. package/apps/runtime/dist/engine/resources.js +89 -0
  123. package/apps/runtime/dist/engine/runner.js +560 -0
  124. package/apps/runtime/dist/engine/steps.js +598 -0
  125. package/apps/runtime/dist/engine/template.js +183 -0
  126. package/apps/runtime/dist/engine/types.js +3 -0
  127. package/apps/runtime/dist/env.js +224 -0
  128. package/apps/runtime/dist/files/blobs.js +22 -0
  129. package/apps/runtime/dist/files/objects.js +86 -0
  130. package/apps/runtime/dist/files/storage.js +95 -0
  131. package/apps/runtime/dist/geocode.js +58 -0
  132. package/apps/runtime/dist/harness/claude.js +138 -0
  133. package/apps/runtime/dist/harness/codex.js +228 -0
  134. package/apps/runtime/dist/harness/cursor.js +93 -0
  135. package/apps/runtime/dist/harness/env.js +124 -0
  136. package/apps/runtime/dist/harness/gemini.js +126 -0
  137. package/apps/runtime/dist/harness/index.js +99 -0
  138. package/apps/runtime/dist/harness/model.js +267 -0
  139. package/apps/runtime/dist/harness/prompt.js +121 -0
  140. package/apps/runtime/dist/harness/terminal.js +193 -0
  141. package/apps/runtime/dist/harness/types.js +7 -0
  142. package/apps/runtime/dist/index.js +76 -0
  143. package/apps/runtime/dist/limits.js +57 -0
  144. package/apps/runtime/dist/link-preview.js +59 -0
  145. package/apps/runtime/dist/manage.js +151 -0
  146. package/apps/runtime/dist/mcp/auth.js +102 -0
  147. package/apps/runtime/dist/mcp/bridge.js +59 -0
  148. package/apps/runtime/dist/mcp/handler.js +42 -0
  149. package/apps/runtime/dist/mcp/scopes.js +5 -0
  150. package/apps/runtime/dist/mcp/tools.js +401 -0
  151. package/apps/runtime/dist/media/ffmpeg.js +121 -0
  152. package/apps/runtime/dist/media/generate.js +120 -0
  153. package/apps/runtime/dist/media/marking.js +121 -0
  154. package/apps/runtime/dist/media/transcribe.js +30 -0
  155. package/apps/runtime/dist/model-errors.js +3 -0
  156. package/apps/runtime/dist/models.js +489 -0
  157. package/apps/runtime/dist/plugin.js +61 -0
  158. package/apps/runtime/dist/render/chromium.js +85 -0
  159. package/apps/runtime/dist/render/convert.js +161 -0
  160. package/apps/runtime/dist/render/downloads.js +277 -0
  161. package/apps/runtime/dist/render/guard.js +25 -0
  162. package/apps/runtime/dist/routes/api.js +74 -0
  163. package/apps/runtime/dist/routes/delivery.js +52 -0
  164. package/apps/runtime/dist/routes/internal.js +49 -0
  165. package/apps/runtime/dist/routes/marketplace.js +36 -0
  166. package/apps/runtime/dist/routes/runs.js +805 -0
  167. package/apps/runtime/dist/routes/studio.js +702 -0
  168. package/apps/runtime/dist/routes/wizard-stream.js +30 -0
  169. package/apps/runtime/dist/running.js +39 -0
  170. package/apps/runtime/dist/sandbox/agentos.js +191 -0
  171. package/apps/runtime/dist/sandbox/docker.js +77 -0
  172. package/apps/runtime/dist/sandbox/index.js +30 -0
  173. package/apps/runtime/dist/sandbox/types.js +1 -0
  174. package/apps/runtime/dist/secrets/crypto.js +28 -0
  175. package/apps/runtime/dist/secrets/signing.js +34 -0
  176. package/apps/runtime/dist/secrets/vault.js +59 -0
  177. package/apps/runtime/dist/services/architect.js +92 -0
  178. package/apps/runtime/dist/services/brand.js +20 -0
  179. package/apps/runtime/dist/services/cloud.js +52 -0
  180. package/apps/runtime/dist/services/draft-events.js +27 -0
  181. package/apps/runtime/dist/services/errors.js +24 -0
  182. package/apps/runtime/dist/services/files.js +129 -0
  183. package/apps/runtime/dist/services/links.js +16 -0
  184. package/apps/runtime/dist/services/marketplace.js +292 -0
  185. package/apps/runtime/dist/services/package.js +202 -0
  186. package/apps/runtime/dist/services/profile.js +23 -0
  187. package/apps/runtime/dist/services/project-files.js +266 -0
  188. package/apps/runtime/dist/services/project-index.js +109 -0
  189. package/apps/runtime/dist/services/projects.js +181 -0
  190. package/apps/runtime/dist/services/runs.js +224 -0
  191. package/apps/runtime/dist/services/shares.js +129 -0
  192. package/apps/runtime/dist/services/widgets.js +34 -0
  193. package/apps/runtime/dist/services/wizards.js +342 -0
  194. package/apps/runtime/dist/settings.js +16 -0
  195. package/apps/runtime/dist/store/index.js +279 -0
  196. package/apps/runtime/dist/tenants/control.js +106 -0
  197. package/apps/runtime/dist/tenants/tenant.js +26 -0
  198. package/apps/runtime/dist/tools/browser.js +380 -0
  199. package/apps/runtime/dist/tools/connector.js +204 -0
  200. package/apps/runtime/dist/tools/index.js +234 -0
  201. package/apps/runtime/dist/tools/mail.js +104 -0
  202. package/apps/runtime/dist/tools/net-guard.js +59 -0
  203. package/apps/runtime/dist/tools/project.js +53 -0
  204. package/apps/runtime/dist/tools/shared.js +42 -0
  205. package/apps/runtime/dist/tools/store.js +238 -0
  206. package/apps/runtime/dist/update.js +118 -0
  207. package/apps/runtime/dist/widgets/bundle.js +99 -0
  208. package/apps/runtime/dist/widgets/render.js +312 -0
  209. package/apps/runtime/dist/widgets/runtime.js +84 -0
  210. package/apps/runtime/dist/widgets/script.js +30 -0
  211. package/apps/runtime/dist/widgets/step.js +192 -0
  212. package/apps/web/dist/ai-labels/ai-black.svg +20 -0
  213. package/apps/web/dist/ai-labels/ai-generated-black.svg +31 -0
  214. package/apps/web/dist/ai-labels/ai-generated-white.svg +32 -0
  215. package/apps/web/dist/ai-labels/ai-modified-black.svg +30 -0
  216. package/apps/web/dist/ai-labels/ai-modified-white.svg +31 -0
  217. package/apps/web/dist/ai-labels/ai-white.svg +21 -0
  218. package/apps/web/dist/assets/ChangelogDialog-O00vEnbm.js +1 -0
  219. package/apps/web/dist/assets/ChatPanel-CH9ry0Hp.js +1 -0
  220. package/apps/web/dist/assets/CreditsDialog-DRzecwUw.js +1 -0
  221. package/apps/web/dist/assets/EditorPage-BRnBf02Q.js +2 -0
  222. package/apps/web/dist/assets/FlowPreview-DDOj8IAH.js +1 -0
  223. package/apps/web/dist/assets/HomePage-CAGTTG3N.js +1 -0
  224. package/apps/web/dist/assets/ImportWizard-0RRrAnX3.js +1 -0
  225. package/apps/web/dist/assets/LocalRuntime-BrP-ENHg.css +1 -0
  226. package/apps/web/dist/assets/LocalRuntime-C-TBYrzs.js +16 -0
  227. package/apps/web/dist/assets/NewWizardPage-kI90h3_9.js +2 -0
  228. package/apps/web/dist/assets/PublicRunner-CKRDeIVd.js +1 -0
  229. package/apps/web/dist/assets/RunnerView-Rc4H8wYH.js +2 -0
  230. package/apps/web/dist/assets/SettingsPage-CESMuZxq.js +2 -0
  231. package/apps/web/dist/assets/SetupPage-D1rrYU14.js +1 -0
  232. package/apps/web/dist/assets/SharePage-COTAmOgh.js +1 -0
  233. package/apps/web/dist/assets/api-BY28cjGY.js +10 -0
  234. package/apps/web/dist/assets/arrow-left-UpjOBfQp.js +1 -0
  235. package/apps/web/dist/assets/arrow-right-CucQycEy.js +1 -0
  236. package/apps/web/dist/assets/changelog-p3wsaDDS.js +1 -0
  237. package/apps/web/dist/assets/check-Bjx41xbB.js +1 -0
  238. package/apps/web/dist/assets/createLucideIcon-DBu2Ovxj.js +1 -0
  239. package/apps/web/dist/assets/definition-cy7uvY5L.js +55 -0
  240. package/apps/web/dist/assets/engenty-CWIFpgKq.js +1 -0
  241. package/apps/web/dist/assets/esm-D1OEhjTK.js +7 -0
  242. package/apps/web/dist/assets/external-link-CRg6DVdO.js +1 -0
  243. package/apps/web/dist/assets/fluffy-engenty-CJ3wCQgT.js +456 -0
  244. package/apps/web/dist/assets/index-CQ_q9iMO.css +1 -0
  245. package/apps/web/dist/assets/index-D0gxh90t.js +10 -0
  246. package/apps/web/dist/assets/jsx-runtime-Dk72oS4N.js +1 -0
  247. package/apps/web/dist/assets/meta-BbSdtTUa.js +1 -0
  248. package/apps/web/dist/assets/mic-CeqQ89Dj.js +1 -0
  249. package/apps/web/dist/assets/oss-credits-cPuZUFHD.js +1 -0
  250. package/apps/web/dist/assets/outputs-D6pxH6ve.js +69 -0
  251. package/apps/web/dist/assets/plus-HA210wXA.js +1 -0
  252. package/apps/web/dist/assets/preload-helper-CNEI7N0N.js +1 -0
  253. package/apps/web/dist/assets/qr-scanner-worker.min-CJaXo3yu.js +98 -0
  254. package/apps/web/dist/assets/qr-scanner.min-C_UI0gH-.js +1 -0
  255. package/apps/web/dist/assets/type-BzYgVWKL.js +1 -0
  256. package/apps/web/dist/assets/ui-Ddwl35A6.js +1 -0
  257. package/apps/web/dist/assets/upload-DsgLfQ3U.js +1 -0
  258. package/apps/web/dist/assets/video-Dk1fuTDl.js +1 -0
  259. package/apps/web/dist/assets/wand-sparkles-Bf97fs8T.js +1 -0
  260. package/apps/web/dist/embed.js +102 -0
  261. package/apps/web/dist/favicon.svg +1 -0
  262. package/apps/web/dist/icons/apple-touch-icon.png +0 -0
  263. package/apps/web/dist/icons/icon-192.png +0 -0
  264. package/apps/web/dist/icons/icon-512.png +0 -0
  265. package/apps/web/dist/icons/icon-maskable-512.png +0 -0
  266. package/apps/web/dist/index.html +46 -0
  267. package/apps/web/dist/install.sh +532 -0
  268. package/apps/web/dist/manifest.webmanifest +20 -0
  269. package/apps/web/dist/sw.js +15 -0
  270. package/bin/wizards.mjs +13 -0
  271. package/node_modules/@engenty-wizards/shared/dist/connectors.d.ts +77 -0
  272. package/node_modules/@engenty-wizards/shared/dist/connectors.js +2 -0
  273. package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +1415 -0
  274. package/node_modules/@engenty-wizards/shared/dist/definition.js +762 -0
  275. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-format.d.ts +5 -0
  276. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-format.js +132 -0
  277. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-value.d.ts +11 -0
  278. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-value.js +209 -0
  279. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.d.ts +532 -0
  280. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.js +216 -0
  281. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/index.d.ts +3 -0
  282. package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/index.js +3 -0
  283. package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-lexical.d.ts +14 -0
  284. package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-lexical.js +166 -0
  285. package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-rank.d.ts +33 -0
  286. package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-rank.js +99 -0
  287. package/node_modules/@engenty-wizards/shared/dist/marketplace-entry.d.ts +35 -0
  288. package/node_modules/@engenty-wizards/shared/dist/marketplace-entry.js +86 -0
  289. package/node_modules/@engenty-wizards/shared/dist/marketplace-search.d.ts +20 -0
  290. package/node_modules/@engenty-wizards/shared/dist/marketplace-search.js +133 -0
  291. package/node_modules/@engenty-wizards/shared/dist/marketplace.d.ts +298 -0
  292. package/node_modules/@engenty-wizards/shared/dist/marketplace.js +211 -0
  293. package/node_modules/@engenty-wizards/shared/dist/merge.d.ts +7 -0
  294. package/node_modules/@engenty-wizards/shared/dist/merge.js +40 -0
  295. package/node_modules/@engenty-wizards/shared/dist/projects.d.ts +74 -0
  296. package/node_modules/@engenty-wizards/shared/dist/projects.js +96 -0
  297. package/node_modules/@engenty-wizards/shared/dist/run.d.ts +219 -0
  298. package/node_modules/@engenty-wizards/shared/dist/run.js +1 -0
  299. package/node_modules/@engenty-wizards/shared/dist/store.d.ts +100 -0
  300. package/node_modules/@engenty-wizards/shared/dist/store.js +44 -0
  301. package/node_modules/@engenty-wizards/shared/dist/workspace.d.ts +16 -0
  302. package/node_modules/@engenty-wizards/shared/dist/workspace.js +51 -0
  303. package/node_modules/@engenty-wizards/shared/package.json +10 -0
  304. package/package.json +62 -0
  305. package/plugin/.claude-plugin/plugin.json +9 -0
  306. package/plugin/.mcp.json +8 -0
  307. package/plugin/commands/wizard.md +8 -0
  308. package/plugin/skills/build-wizard/SKILL.md +27 -0
@@ -0,0 +1,532 @@
1
+ #!/usr/bin/env bash
2
+ # engenty wizards — installer for macOS and Linux.
3
+ #
4
+ # curl -fsSL https://engenty.ai/install.sh | bash
5
+ #
6
+ # It needs curl and tar, nothing else, and asks for no password. Everything goes into
7
+ # ~/.engenty/wizards (ENGENTY_HOME moves it):
8
+ #
9
+ # tools/node-v<version>/ its own Node; a Node you already have is left alone
10
+ # runtime/ the package `wizards`, from the GitHub release
11
+ # bin/wizards the command, linked into ~/.local/bin
12
+ # data/ your wizards and results (made at the first start)
13
+ #
14
+ # Then the guided setup runs (`wizards setup`): an AI client to think with, ffmpeg,
15
+ # starting at login. Running the installer again updates an install; your data is
16
+ # kept.
17
+ #
18
+ # --yes ask nothing and install nothing optional
19
+ # --no-setup only Node, the runtime and the command (what `update` runs)
20
+ # --version <v> this version instead of the newest
21
+ # --no-link do not link the command into ~/.local/bin
22
+ #
23
+ # For tests: ENGENTY_WIZARDS_PACKAGE (an npm spec or a tarball instead of the release's
24
+ # package), ENGENTY_WIZARDS_NODE_VERSION, ENGENTY_WIZARDS_NO_LINK=1 (as --no-link).
25
+ #
26
+ # Written for the bash 3.2 that macOS ships. Nothing here reads stdin: the script itself may be
27
+ # arriving through it.
28
+ set -Eeuo pipefail
29
+
30
+ NODE_VERSION="${ENGENTY_WIZARDS_NODE_VERSION:-24.14.0}"
31
+ PACKAGE_NAME="wizards"
32
+ # What the package and the command were called up to 0.1.8.
33
+ OLD_NAME="engenty-wizards"
34
+ RELEASES="https://github.com/engenty/engenty-wizards/releases"
35
+
36
+ main() {
37
+ YES=0
38
+ SETUP=1
39
+ LINK=1
40
+ [ -n "${ENGENTY_WIZARDS_NO_LINK:-}" ] && LINK=0
41
+ VERSION=""
42
+ while [ $# -gt 0 ]; do
43
+ case "$1" in
44
+ --yes | -y) YES=1 ;;
45
+ --no-setup) SETUP=0 ;;
46
+ --no-link) LINK=0 ;;
47
+ --version)
48
+ shift
49
+ VERSION="${1:-}"
50
+ [ -n "$VERSION" ] || die "--version needs a version, e.g. --version 0.1.0"
51
+ ;;
52
+ --help | -h)
53
+ usage
54
+ exit 0
55
+ ;;
56
+ *) die "Unknown option $1" ;;
57
+ esac
58
+ shift
59
+ done
60
+
61
+ BASE="${ENGENTY_HOME:-$HOME/.engenty}"
62
+ HOME_DIR="$BASE/wizards"
63
+ LOG="$HOME_DIR/logs/install.log"
64
+ NODE_DIR="$HOME_DIR/tools/node-v$NODE_VERSION"
65
+ WRAPPER="$HOME_DIR/bin/wizards"
66
+ LOCAL_BIN="$HOME/.local/bin"
67
+
68
+ style
69
+ trap 'printf "%s" "$SHOW"' EXIT
70
+ trap 'failed' ERR
71
+
72
+ command -v curl >/dev/null 2>&1 || die "curl is needed and was not found."
73
+ command -v tar >/dev/null 2>&1 || die "tar is needed and was not found."
74
+ mkdir -p "$HOME_DIR/logs" "$HOME_DIR/tools" "$HOME_DIR/bin"
75
+ printf '\n--- %s install.sh\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" >>"$LOG"
76
+
77
+ banner
78
+ printf '%s Installing into %s\n%s\n' "${GRAY}┌$RESET" "$BOLD$(tilde "$HOME_DIR")$RESET" "$BAR"
79
+ platform
80
+ package
81
+ node
82
+ runtime
83
+ command_link
84
+ old_command
85
+ if [ "$SETUP" = 1 ]; then
86
+ printf '%s %s\n\n' "${GRAY}└$RESET" "Installed. The setup follows."
87
+ printf '%s' "$SHOW"
88
+ trap - EXIT ERR
89
+ # The questions need a terminal; stdin may be the pipe this script came through.
90
+ if [ "$YES" = 1 ] || [ "$TTY" != 1 ] || ! (exec </dev/tty) 2>/dev/null; then
91
+ exec "$WRAPPER" setup --yes </dev/null
92
+ fi
93
+ exec "$WRAPPER" setup </dev/tty
94
+ fi
95
+ printf '%s %s\n' "${GRAY}└$RESET" "Installed engenty wizards $INSTALLED."
96
+ }
97
+
98
+ usage() {
99
+ cat <<'USAGE'
100
+ engenty wizards — installer for macOS and Linux
101
+
102
+ curl -fsSL https://engenty.ai/install.sh | bash
103
+ curl -fsSL https://engenty.ai/install.sh | bash -s -- --yes
104
+
105
+ Puts its own Node, the runtime and the `wizards` command into ~/.engenty/wizards
106
+ (ENGENTY_HOME moves it), then runs the guided setup. Run it again to update.
107
+
108
+ --yes ask nothing and install nothing optional
109
+ --no-setup only Node, the runtime and the command
110
+ --version <v> this version instead of the newest
111
+ --no-link do not link the command into ~/.local/bin
112
+
113
+ To remove it: delete ~/.engenty/wizards (your wizards and results are in its data/ folder)
114
+ and ~/.local/bin/wizards.
115
+ USAGE
116
+ }
117
+
118
+ # --- how it looks ----------------------------------------------------------------------------
119
+
120
+ style() {
121
+ TTY=0
122
+ RESET="" BOLD="" DIM="" GRAY="" GREEN="" RED="" ORANGE="" MAGENTA="" HIDE="" SHOW=""
123
+ if [ -t 1 ] && [ -z "${NO_COLOR:-}" ] && [ "${TERM:-dumb}" != "dumb" ]; then
124
+ TTY=1
125
+ RESET=$'\033[0m' BOLD=$'\033[1m' DIM=$'\033[2m' GRAY=$'\033[90m' GREEN=$'\033[32m'
126
+ RED=$'\033[31m' ORANGE=$'\033[38;2;224;83;27m' MAGENTA=$'\033[35m'
127
+ HIDE=$'\033[?25l' SHOW=$'\033[?25h'
128
+ fi
129
+ BAR="${GRAY}│$RESET"
130
+ FRAMES=(◒ ◐ ◓ ◑)
131
+ }
132
+
133
+ # The tall engenty, the rose one with one eye, in pixels: two rows of them make one line of half
134
+ # blocks. . nothing R rose r its shade K the mouth. The eye goes on top.
135
+ ENGENTY=(
136
+ "....R...."
137
+ "...RRR..."
138
+ "..RRRRR.."
139
+ "..RRRRR.."
140
+ ".RRRRRRr."
141
+ ".RRRRRRr."
142
+ "RRRRRRRRr"
143
+ "RRRRRRRRr"
144
+ "RRRRRRRRr"
145
+ "RRRRRRRRr"
146
+ ".RRRKRRr."
147
+ ".RRRRRRr."
148
+ ".rRRRRrr."
149
+ "..rrrrr.."
150
+ )
151
+ # Its tip swaying to one side or the other, like a flame.
152
+ ENGENTY_LEFT=("...R....." "..RRR...." "..RRRR..." ".RRRRRR..")
153
+ ENGENTY_RIGHT=(".....R..." "....RRR.." "...RRRR.." "..RRRRRR.")
154
+
155
+ # The eye: five rows of five pixels from the body's fifth row. W white, K pupil, . the body.
156
+ eye_rows() {
157
+ case "$1" in
158
+ left) EYE=(".WWW." "WWWWW" "KKWWW" "KKWWW" ".WWW.") ;;
159
+ right) EYE=(".WWW." "WWWWW" "WWWKK" "WWWKK" ".WWW.") ;;
160
+ up) EYE=(".WKK." "WWKKW" "WWWWW" "WWWWW" ".WWW.") ;;
161
+ shut) EYE=("....." "....." "K...K" ".KKK." ".....") ;;
162
+ *) EYE=(".WWW." "WWWWW" "WWKKW" "WWKKW" ".WWW.") ;;
163
+ esac
164
+ }
165
+
166
+ # Sets C to the colour of a pixel, as a foreground (3) or background (4) parameter.
167
+ pixel_colour() {
168
+ case "$1" in
169
+ R) C="${2}8;2;240;36;86" ;;
170
+ r) C="${2}8;2;188;18;62" ;;
171
+ W) C="${2}8;2;255;255;255" ;;
172
+ K) C="${2}8;2;46;8;20" ;;
173
+ S) C="${2}8;2;96;96;96" ;;
174
+ esac
175
+ }
176
+
177
+ # One picture of the engenty, into PICTURE: 9 lines of 9 columns. $1 the tip (still, left,
178
+ # right), $2 the eye, $3 how many pixels it is off the ground (0 to 2).
179
+ engenty_picture() {
180
+ local tip="$1" lift="${3:-0}" rows=() y x row top bottom line pixel
181
+ eye_rows "$2"
182
+ # Two rows of air for a hop, fourteen of engenty, its shadow and a row below that.
183
+ for y in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17; do
184
+ row="........."
185
+ if [ "$y" -ge $((2 - lift)) ] && [ "$y" -lt $((16 - lift)) ]; then
186
+ x=$((y - 2 + lift))
187
+ row="${ENGENTY[x]}"
188
+ [ "$tip" = left ] && [ "$x" -lt 4 ] && row="${ENGENTY_LEFT[x]}"
189
+ [ "$tip" = right ] && [ "$x" -lt 4 ] && row="${ENGENTY_RIGHT[x]}"
190
+ if [ "$x" -ge 4 ] && [ "$x" -lt 9 ]; then
191
+ pixel="${EYE[x - 4]}"
192
+ line=""
193
+ for top in 0 1 2 3 4; do
194
+ if [ "${pixel:top:1}" = "." ]; then line="$line${row:top+2:1}"; else line="$line${pixel:top:1}"; fi
195
+ done
196
+ row="${row:0:2}$line${row:7}"
197
+ fi
198
+ fi
199
+ # The shadow shrinks as the engenty leaves the ground.
200
+ if [ "$y" = 16 ]; then
201
+ case "$lift" in
202
+ 0) row="..SSSSS.." ;;
203
+ 1) row="...SSS..." ;;
204
+ *) row="....S...." ;;
205
+ esac
206
+ fi
207
+ rows+=("$row")
208
+ done
209
+ PICTURE=()
210
+ for y in 0 2 4 6 8 10 12 14 16; do
211
+ line=""
212
+ for x in 0 1 2 3 4 5 6 7 8; do
213
+ top="${rows[y]:x:1}"
214
+ bottom="${rows[y + 1]:x:1}"
215
+ if [ "$top" = "." ] && [ "$bottom" = "." ]; then
216
+ line="$line$RESET "
217
+ elif [ "$top" = "$bottom" ]; then
218
+ pixel_colour "$top" 3
219
+ line="$line$RESET"$'\033['"${C}m█"
220
+ elif [ "$top" = "." ]; then
221
+ pixel_colour "$bottom" 3
222
+ line="$line$RESET"$'\033['"${C}m▄"
223
+ elif [ "$bottom" = "." ]; then
224
+ pixel_colour "$top" 3
225
+ line="$line$RESET"$'\033['"${C}m▀"
226
+ else
227
+ pixel_colour "$top" 3
228
+ top="$C"
229
+ pixel_colour "$bottom" 4
230
+ line="$line$RESET"$'\033['"$top;${C}m▀"
231
+ fi
232
+ done
233
+ PICTURE+=("$line$RESET")
234
+ done
235
+ }
236
+
237
+ # Prints a picture with the name beside it, over the one before, and holds it for $4 seconds.
238
+ banner_frame() {
239
+ local i=0 line
240
+ engenty_picture "$1" "$2" "$3"
241
+ [ -n "${BANNER_DRAWN:-}" ] && printf '\033[9A'
242
+ BANNER_DRAWN=1
243
+ for line in "${PICTURE[@]}"; do
244
+ printf '\r %s' "$line"
245
+ case "$i" in
246
+ 3) printf ' %sengenty wizards%s' "$BOLD" "$RESET" ;;
247
+ 4) printf ' %sMake a wish. Get your wizard.%s' "$DIM" "$RESET" ;;
248
+ 5) printf ' %sIt guides you step by step.%s' "$DIM" "$RESET" ;;
249
+ 6) printf ' %sLet AI do the work.%s' "$DIM" "$RESET" ;;
250
+ esac
251
+ printf '\n'
252
+ i=$((i + 1))
253
+ done
254
+ sleep "$4"
255
+ }
256
+
257
+ banner() {
258
+ # Only on a terminal: `update` from the studio reads plain lines.
259
+ if [ "$TTY" != 1 ]; then
260
+ return
261
+ fi
262
+ printf '\n%s' "$HIDE"
263
+ # It wakes up, looks around, hops and blinks: a second and a half.
264
+ banner_frame still shut 0 .25
265
+ banner_frame still open 0 .2
266
+ banner_frame still left 0 .18
267
+ banner_frame still right 0 .18
268
+ banner_frame still open 0 .1
269
+ banner_frame still up 1 .07
270
+ banner_frame left up 2 .1
271
+ banner_frame still open 1 .07
272
+ banner_frame right open 0 .09
273
+ banner_frame left open 0 .09
274
+ banner_frame still open 0 .12
275
+ banner_frame still shut 0 .06
276
+ banner_frame still open 0 0
277
+ printf '%s\n' "$SHOW"
278
+ }
279
+
280
+ tilde() {
281
+ case "$1" in
282
+ "$HOME"/*) printf '~%s' "${1#"$HOME"}" ;;
283
+ *) printf '%s' "$1" ;;
284
+ esac
285
+ }
286
+
287
+ # A finished step: the green diamond, what it was, and a detail in gray.
288
+ done_step() {
289
+ [ "$TTY" = 1 ] && printf '\r\033[K'
290
+ printf '%s %s' "${GREEN}◇$RESET" "$1"
291
+ [ -n "${2:-}" ] && printf ' %s' "$DIM$2$RESET"
292
+ printf '\n%s\n' "$BAR"
293
+ }
294
+
295
+ die() {
296
+ printf '%s' "${SHOW:-}"
297
+ [ "${TTY:-0}" = 1 ] && printf '\r\033[K'
298
+ printf '%s %s\n' "${RED:-}■${RESET:-}" "$1" >&2
299
+ trap - EXIT ERR
300
+ exit 1
301
+ }
302
+
303
+ failed() {
304
+ local tail=""
305
+ [ -f "$LOG" ] && tail="$(tail -n 12 "$LOG" 2>/dev/null | sed 's/^/ /')"
306
+ [ -n "$tail" ] && printf '\n%s\n' "$DIM$tail$RESET" >&2
307
+ die "${STEP:-The installer} failed. The whole log: $(tilde "$LOG")"
308
+ }
309
+
310
+ # Runs a command with a spinner and the seconds it takes; its output goes to the log.
311
+ spin() {
312
+ local label="$1" pid i=0 started=$SECONDS
313
+ shift
314
+ if [ "$TTY" != 1 ]; then
315
+ "$@" >>"$LOG" 2>&1 </dev/null
316
+ return
317
+ fi
318
+ "$@" >>"$LOG" 2>&1 </dev/null &
319
+ pid=$!
320
+ printf '%s' "$HIDE"
321
+ while kill -0 "$pid" 2>/dev/null; do
322
+ printf '\r\033[K%s %s %s' "$MAGENTA${FRAMES[i % 4]}$RESET" "$label" "$DIM$((SECONDS - started))s$RESET"
323
+ i=$((i + 1))
324
+ sleep 0.12
325
+ done
326
+ printf '%s' "$SHOW"
327
+ wait "$pid"
328
+ }
329
+
330
+ # Downloads a file with a bar that fills as it arrives.
331
+ download() {
332
+ local url="$1" dest="$2" label="$3" pid total size filled i bar
333
+ if [ "$TTY" != 1 ]; then
334
+ curl -fsSL "$url" -o "$dest" 2>>"$LOG" </dev/null
335
+ return
336
+ fi
337
+ total="$(curl -fsSIL "$url" 2>/dev/null </dev/null | tr -d '\r' |
338
+ awk 'tolower($1) == "content-length:" { n = $2 } END { print n + 0 }' || true)"
339
+ : >"$dest"
340
+ curl -fsSL "$url" -o "$dest" 2>>"$LOG" </dev/null &
341
+ pid=$!
342
+ printf '%s' "$HIDE"
343
+ while kill -0 "$pid" 2>/dev/null; do
344
+ size="$(wc -c <"$dest" 2>/dev/null | tr -d ' ')"
345
+ if [ "${total:-0}" -gt 0 ]; then
346
+ filled=$((${size:-0} * 24 / total))
347
+ [ "$filled" -gt 24 ] && filled=24
348
+ bar=""
349
+ i=0
350
+ while [ "$i" -lt 24 ]; do
351
+ if [ "$i" -lt "$filled" ]; then bar="${bar}█"; else bar="${bar}░"; fi
352
+ i=$((i + 1))
353
+ done
354
+ printf '\r\033[K%s %s %s %s' "${MAGENTA}◒$RESET" "$label" "$ORANGE$bar$RESET" \
355
+ "$DIM$((${size:-0} / 1048576)) of $((total / 1048576)) MB$RESET"
356
+ else
357
+ printf '\r\033[K%s %s %s' "${MAGENTA}◒$RESET" "$label" "$DIM$((${size:-0} / 1048576)) MB$RESET"
358
+ fi
359
+ sleep 0.1
360
+ done
361
+ printf '%s' "$SHOW"
362
+ wait "$pid"
363
+ }
364
+
365
+ # --- the steps -------------------------------------------------------------------------------
366
+
367
+ platform() {
368
+ STEP="Looking at this machine"
369
+ local system machine name
370
+ system="$(uname -s)"
371
+ machine="$(uname -m)"
372
+ case "$system" in
373
+ Darwin)
374
+ OS=darwin
375
+ name="macOS $(sw_vers -productVersion 2>/dev/null || true)"
376
+ # A terminal under Rosetta says x86_64 on a Mac with Apple silicon.
377
+ [ "$(sysctl -n sysctl.proc_translated 2>/dev/null || true)" = "1" ] && machine=arm64
378
+ ;;
379
+ Linux)
380
+ OS=linux
381
+ name="Linux"
382
+ # Node's own builds need glibc.
383
+ if (ldd --version 2>&1 || true) | grep -qi musl; then
384
+ die "This Linux uses musl (Alpine). Use the Docker image instead: https://github.com/engenty/engenty-wizards#run-it-on-a-server"
385
+ fi
386
+ ;;
387
+ *) die "$system is not supported: macOS and Linux are. On Windows, use WSL." ;;
388
+ esac
389
+ case "$machine" in
390
+ arm64 | aarch64) ARCH=arm64 ;;
391
+ x86_64 | amd64) ARCH=x64 ;;
392
+ *) die "$machine is not supported: arm64 and x64 are." ;;
393
+ esac
394
+ done_step "$name on $ARCH"
395
+ }
396
+
397
+ sha256_of() {
398
+ if command -v shasum >/dev/null 2>&1; then
399
+ shasum -a 256 "$1" | awk '{ print $1 }'
400
+ else
401
+ sha256sum "$1" | awk '{ print $1 }'
402
+ fi
403
+ }
404
+
405
+ node() {
406
+ STEP="Installing Node $NODE_VERSION"
407
+ if [ -x "$NODE_DIR/bin/node" ] && [ "$("$NODE_DIR/bin/node" --version 2>/dev/null)" = "v$NODE_VERSION" ]; then
408
+ ln -sfn "node-v$NODE_VERSION" "$HOME_DIR/tools/node"
409
+ done_step "Node $NODE_VERSION" "already here"
410
+ return
411
+ fi
412
+ local name="node-v$NODE_VERSION-$OS-$ARCH" dist="https://nodejs.org/dist/v$NODE_VERSION" tmp expected actual
413
+ tmp="$(mktemp -d "$HOME_DIR/tools/.node.XXXXXX")"
414
+ download "$dist/$name.tar.gz" "$tmp/node.tar.gz" "Downloading Node $NODE_VERSION"
415
+ # The file must be the one nodejs.org lists.
416
+ expected="$(curl -fsSL "$dist/SHASUMS256.txt" 2>>"$LOG" </dev/null | awk -v file="$name.tar.gz" '$2 == file { print $1 }')"
417
+ actual="$(sha256_of "$tmp/node.tar.gz")"
418
+ if [ -z "$expected" ] || [ "$expected" != "$actual" ]; then
419
+ rm -rf "$tmp"
420
+ die "The Node download does not match its checksum from nodejs.org."
421
+ fi
422
+ mkdir -p "$tmp/node"
423
+ spin "Unpacking Node $NODE_VERSION" tar -xzf "$tmp/node.tar.gz" -C "$tmp/node" --strip-components 1
424
+ # The headers are for compiling addons, which nothing here does: a third of Node's size.
425
+ rm -rf "$tmp/node/include"
426
+ rm -rf "$NODE_DIR"
427
+ mv "$tmp/node" "$NODE_DIR"
428
+ rm -rf "$tmp"
429
+ ln -sfn "node-v$NODE_VERSION" "$HOME_DIR/tools/node"
430
+ # An older Node of ours is not needed any more.
431
+ for old in "$HOME_DIR"/tools/node-v*; do
432
+ [ "$old" = "$NODE_DIR" ] || rm -rf "$old"
433
+ done
434
+ done_step "Node $NODE_VERSION" "$(tilde "$HOME_DIR/tools/node"), checksum from nodejs.org matches"
435
+ }
436
+
437
+ # GitHub answers /releases/latest with the address of the newest release: …/tag/v1.2.3
438
+ latest_version() {
439
+ curl -fsSLI -o /dev/null -w '%{url_effective}' "$RELEASES/latest" 2>>"$LOG" </dev/null |
440
+ sed -n 's#.*/tag/v##p'
441
+ }
442
+
443
+ # What gets installed, decided before anything is downloaded. The package is not on npm yet: it
444
+ # is the tarball of the GitHub release, which npm installs like one from its registry; what it
445
+ # depends on comes from the registry.
446
+ package() {
447
+ STEP="Looking for the newest release"
448
+ SPEC="${ENGENTY_WIZARDS_PACKAGE:-}"
449
+ if [ -n "$SPEC" ]; then
450
+ return
451
+ fi
452
+ if [ -z "$VERSION" ]; then
453
+ VERSION="$(latest_version || true)"
454
+ fi
455
+ if [ -z "$VERSION" ]; then
456
+ die "No release of engenty wizards was found at $RELEASES."
457
+ fi
458
+ case "$VERSION" in
459
+ 0.0.* | 0.1.[0-8])
460
+ die "Version $VERSION holds the package under its old name, $OLD_NAME. This installer installs 0.1.9 and newer."
461
+ ;;
462
+ esac
463
+ SPEC="$RELEASES/download/v$VERSION/$PACKAGE_NAME-$VERSION.tgz"
464
+ }
465
+
466
+ runtime() {
467
+ STEP="Installing engenty wizards"
468
+ # An install of the package under its old name is replaced, not kept beside the new one.
469
+ if [ -d "$HOME_DIR/runtime/node_modules/$OLD_NAME" ]; then
470
+ rm -rf "$HOME_DIR/runtime"
471
+ fi
472
+ mkdir -p "$HOME_DIR/runtime"
473
+ # npm is a script that asks for `node`: ours comes first on the PATH. No install scripts run;
474
+ # the runtime works without them. --legacy-peer-deps: the dependencies as the package names
475
+ # them and no peers on top, which nothing here uses (about 70 MB less).
476
+ spin "Installing engenty wizards (about 650 MB on disk, a minute or two)" \
477
+ env PATH="$NODE_DIR/bin:$PATH" "$NODE_DIR/bin/npm" install --prefix "$HOME_DIR/runtime" \
478
+ --omit=dev --ignore-scripts --legacy-peer-deps --no-audit --no-fund --loglevel=error "$SPEC"
479
+ INSTALLED="$(MANIFEST="$HOME_DIR/runtime/node_modules/$PACKAGE_NAME/package.json" \
480
+ "$NODE_DIR/bin/node" -p 'require(process.env.MANIFEST).version')"
481
+ done_step "engenty wizards $INSTALLED" "$(tilde "$HOME_DIR/runtime")"
482
+ }
483
+
484
+ command_link() {
485
+ STEP="Writing the command"
486
+ {
487
+ printf '#!/bin/sh\n# engenty wizards — written by install.sh; running the installer again rewrites it.\n'
488
+ # An install outside ~/.engenty finds its folder again through the command.
489
+ if [ "$BASE" != "$HOME/.engenty" ]; then
490
+ # shellcheck disable=SC2016
491
+ printf 'export ENGENTY_HOME="${ENGENTY_HOME:-%s}"\n' "$BASE"
492
+ fi
493
+ printf 'exec "%s" "%s" "$@"\n' "$HOME_DIR/tools/node/bin/node" \
494
+ "$HOME_DIR/runtime/node_modules/$PACKAGE_NAME/bin/wizards.mjs"
495
+ } >"$WRAPPER"
496
+ chmod 755 "$WRAPPER"
497
+ if [ "$LINK" != 1 ]; then
498
+ done_step "Command" "$(tilde "$WRAPPER")"
499
+ return
500
+ fi
501
+ local link="$LOCAL_BIN/wizards"
502
+ mkdir -p "$LOCAL_BIN"
503
+ # Something else of that name is not ours to replace.
504
+ if [ -e "$link" ] && [ ! -L "$link" ]; then
505
+ done_step "Command" "$(tilde "$WRAPPER") ($(tilde "$link") exists and was left as it is)"
506
+ return
507
+ fi
508
+ ln -sfn "$WRAPPER" "$link"
509
+ done_step "Command" "$(tilde "$link")"
510
+ }
511
+
512
+ # The command under its old name: its file, its link, and a login item that would keep
513
+ # starting it. The login item is written again by the command itself.
514
+ old_command() {
515
+ local old="$HOME_DIR/bin/$OLD_NAME" link="$LOCAL_BIN/$OLD_NAME" item
516
+ [ -e "$old" ] || return 0
517
+ STEP="Renaming the command"
518
+ rm -f "$old"
519
+ if [ -L "$link" ] && [ "$(readlink "$link")" = "$old" ]; then
520
+ rm -f "$link"
521
+ fi
522
+ for item in "$HOME/Library/LaunchAgents/com.engenty.wizards.login.plist" \
523
+ "${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user/engenty-wizards.service"; do
524
+ if grep -qF "$old" "$item" 2>/dev/null; then
525
+ "$WRAPPER" autostart on >>"$LOG" 2>&1 </dev/null || true
526
+ break
527
+ fi
528
+ done
529
+ done_step "Command" "$OLD_NAME is now wizards"
530
+ }
531
+
532
+ main "$@"
@@ -0,0 +1,20 @@
1
+ {
2
+ "id": "./",
3
+ "name": "engenty wizards",
4
+ "short_name": "wizards",
5
+ "start_url": "./",
6
+ "scope": "./",
7
+ "display": "standalone",
8
+ "background_color": "#faf8f5",
9
+ "theme_color": "#faf8f5",
10
+ "icons": [
11
+ { "src": "icons/icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
12
+ { "src": "icons/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" },
13
+ {
14
+ "src": "icons/icon-maskable-512.png",
15
+ "sizes": "512x512",
16
+ "type": "image/png",
17
+ "purpose": "maskable"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,15 @@
1
+ // Shows "your wizard is done" on phones, where a page may only notify through a service worker.
2
+ // No fetch handler: nothing is cached, every request goes to the network as before.
3
+ self.addEventListener("install", () => self.skipWaiting());
4
+ self.addEventListener("activate", (event) => event.waitUntil(self.clients.claim()));
5
+
6
+ self.addEventListener("notificationclick", (event) => {
7
+ event.notification.close();
8
+ const url = event.notification.data?.url;
9
+ event.waitUntil(
10
+ self.clients.matchAll({ type: "window", includeUncontrolled: true }).then((windows) => {
11
+ const open = windows.find((w) => url && w.url.startsWith(url)) ?? windows[0];
12
+ return open ? open.focus() : url ? self.clients.openWindow(url) : undefined;
13
+ }),
14
+ );
15
+ });
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ // The `wizards` command. Kept to what every Node understands, so that an old one gets
3
+ // a sentence instead of a syntax error.
4
+ const [major, minor] = process.versions.node.split(".").map(Number);
5
+ if (major < 24 || (major === 24 && minor < 11)) {
6
+ console.error(
7
+ `engenty wizards needs Node.js 24.11 or newer; this is ${process.version}.\n` +
8
+ "The installer brings its own and leaves yours alone:\n\n" +
9
+ " curl -fsSL https://engenty.ai/install.sh | bash\n",
10
+ );
11
+ process.exit(1);
12
+ }
13
+ await import("../apps/runtime/dist/cli/main.js");
@@ -0,0 +1,77 @@
1
+ /** Imported connectors as the studio shows them: a service of a project, with its actions. */
2
+ export type ActionGroup = "read" | "write" | "destructive";
3
+ export interface ConnectorActionView {
4
+ id: string;
5
+ summary: string;
6
+ group: ActionGroup;
7
+ }
8
+ export interface ConnectorView {
9
+ id: string;
10
+ name: string;
11
+ domain: string;
12
+ /** Where it comes from: shipped with the product, or imported from a spec or an MCP server. */
13
+ sourceKind: "builtin" | "openapi" | "mcp";
14
+ sourceUrl: string;
15
+ toolPrefix: string;
16
+ /** Whether a person can connect an account right now. */
17
+ usable: boolean;
18
+ /** Built-in OAuth connectors that are not usable: the settings the server still needs. */
19
+ missingSetup: string | null;
20
+ /** How a person connects their account. */
21
+ auth: "none" | "oauth2" | "api_key";
22
+ /** OAuth without client credentials and without self-registration: connecting cannot work yet. */
23
+ needsOAuthClient: boolean;
24
+ /** An MCP server that lists its tools only to a signed-in account: none are known yet. */
25
+ toolsPending: boolean;
26
+ actions: ConnectorActionView[];
27
+ importedAt: string;
28
+ refreshedAt: string | null;
29
+ }
30
+ export interface RegistryHit {
31
+ domain: string;
32
+ name: string;
33
+ description: string;
34
+ kinds: string[];
35
+ }
36
+ /** One way a registry service can be imported: an OpenAPI spec or an MCP server. */
37
+ export interface RegistrySource {
38
+ sourceKind: "openapi" | "mcp";
39
+ sourceUrl: string;
40
+ name: string | null;
41
+ /** Why this source cannot be imported; null = it can. */
42
+ blocked: string | null;
43
+ auth: string;
44
+ suggestedId: string;
45
+ suggestedToolPrefix: string;
46
+ }
47
+ export interface RegistryService {
48
+ domain: string;
49
+ summary: string | null;
50
+ sources: RegistrySource[];
51
+ /** How to get a credential, in the provider's words. */
52
+ credentials: {
53
+ label: string;
54
+ setup: string | null;
55
+ url: string | null;
56
+ }[];
57
+ }
58
+ export interface SourcePreview {
59
+ title: string | null;
60
+ actions: ConnectorActionView[];
61
+ blockers: string[];
62
+ /** Actions beyond the per-connector cap. */
63
+ dropped: number;
64
+ toolsPending: boolean;
65
+ }
66
+ export interface ImportRequest {
67
+ domain: string;
68
+ sourceKind: "openapi" | "mcp";
69
+ sourceUrl: string;
70
+ id: string;
71
+ toolPrefix: string;
72
+ name?: string;
73
+ /** Only these actions; default all. */
74
+ actions?: string[];
75
+ oauthClientId?: string;
76
+ oauthClientSecret?: string;
77
+ }
@@ -0,0 +1,2 @@
1
+ /** Imported connectors as the studio shows them: a service of a project, with its actions. */
2
+ export {};