@engenty/wizards-runtime 0.11.4 → 0.11.5

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 (78) hide show
  1. package/apps/runtime/dist/agents/architect.js +3 -5
  2. package/apps/runtime/dist/agents/studio-assistant.js +1 -3
  3. package/apps/runtime/dist/assistant/knows.js +1 -1
  4. package/apps/runtime/dist/authoring/guide.js +2 -8
  5. package/apps/runtime/dist/credits/estimate.js +1 -1
  6. package/apps/runtime/dist/db/migrations/tenant/0025_drop_mcp_servers.sql +1 -0
  7. package/apps/runtime/dist/db/migrations/tenant/meta/0025_snapshot.json +3959 -0
  8. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
  9. package/apps/runtime/dist/db/schema.js +0 -4
  10. package/apps/runtime/dist/docs/dev/plugins/events.md +2 -2
  11. package/apps/runtime/dist/docs/dev/wizard-format/agent-steps.md +1 -2
  12. package/apps/runtime/dist/docs/dev/wizard-format/wizard-file.md +6 -8
  13. package/apps/runtime/dist/docs/user-guide/cloud-sync.md +2 -2
  14. package/apps/runtime/dist/docs/user-guide/connectors.md +1 -10
  15. package/apps/runtime/dist/docs/user-guide/steps.md +2 -3
  16. package/apps/runtime/dist/engine/steps.js +126 -131
  17. package/apps/runtime/dist/live/views.js +1 -3
  18. package/apps/runtime/dist/mcp/tools.js +1 -1
  19. package/apps/runtime/dist/services/architect.js +0 -1
  20. package/apps/runtime/dist/services/package-file.js +0 -1
  21. package/apps/runtime/dist/services/package.js +0 -10
  22. package/apps/runtime/dist/services/projects.js +1 -31
  23. package/apps/runtime/dist/services/spaces.js +5 -23
  24. package/apps/runtime/dist/sync/records.js +0 -9
  25. package/apps/runtime/dist/tools/index.js +0 -28
  26. package/apps/web/dist/assets/{AboutDialog-B7ThTqw4.js → AboutDialog-B525L37O.js} +1 -1
  27. package/apps/web/dist/assets/{ChangelogDialog-DBpXTjxr.js → ChangelogDialog-gInSm1Xe.js} +1 -1
  28. package/apps/web/dist/assets/{CodeEditor-BTcAUlGY.js → CodeEditor-C0TmdCrb.js} +1 -1
  29. package/apps/web/dist/assets/EditorPage-7t3vhZi6.js +3 -0
  30. package/apps/web/dist/assets/{FlowPreview-Sjnlj0OO.js → FlowPreview-BBN-APkG.js} +1 -1
  31. package/apps/web/dist/assets/{Harness-BKl73EG5.js → Harness-fAoC908y.js} +1 -1
  32. package/apps/web/dist/assets/Marketplace-CotMMcJ-.js +2 -0
  33. package/apps/web/dist/assets/{NewWizardChannels-DarxdQRt.js → NewWizardChannels-X32lBGMf.js} +1 -1
  34. package/apps/web/dist/assets/{NewWizardPage-BCoPZjp5.js → NewWizardPage-DMoqDhsh.js} +1 -1
  35. package/apps/web/dist/assets/{OnboardingPage-qV_YA_mZ.js → OnboardingPage-BjZy-bhI.js} +1 -1
  36. package/apps/web/dist/assets/{PreviewPane-B5_GY6Cv.js → PreviewPane-Bt-ForJG.js} +2 -2
  37. package/apps/web/dist/assets/{ProjectPage-Bcc81_KO.js → ProjectPage-B5a-nod-.js} +1 -1
  38. package/apps/web/dist/assets/{PublicRunner-hlxaESAv.js → PublicRunner-Cq_XzX54.js} +1 -1
  39. package/apps/web/dist/assets/{ReadOnly-BUnTzhA3.js → ReadOnly-DX3beZJz.js} +1 -1
  40. package/apps/web/dist/assets/SettingsPage-DPuwA3QL.js +2 -0
  41. package/apps/web/dist/assets/{SetupPage-DAgnVxDA.js → SetupPage-BI9bgEkI.js} +1 -1
  42. package/apps/web/dist/assets/{SharePage-aKBNZDby.js → SharePage-Ch-1oLBs.js} +1 -1
  43. package/apps/web/dist/assets/changelog-BlJc9UFS.js +1 -0
  44. package/apps/web/dist/assets/{coins-C8RAtYAu.js → coins-D_yN56kT.js} +1 -1
  45. package/apps/web/dist/assets/i18n-Dy3fTQM3.js +55 -0
  46. package/apps/web/dist/assets/{index-BdwA-8jc.js → index-Dt1Ps3ge.js} +5 -5
  47. package/apps/web/dist/assets/{index-DQc1EITf.css → index-rX7eCvWh.css} +1 -1
  48. package/apps/web/dist/assets/oss-credits-CZT1KRIp.js +1 -0
  49. package/apps/web/dist/assets/{phone-DTuPPVhC.js → phone-DxC6eM6O.js} +1 -1
  50. package/apps/web/dist/assets/{runners-BcK_yEKU.js → runners-SQHfvvNQ.js} +1 -1
  51. package/apps/web/dist/assets/{session-C7ciCzbV.js → session-4CTNIlai.js} +1 -1
  52. package/apps/web/dist/assets/{settings-menu-b7am2SP5.js → settings-menu-B0af5EBE.js} +1 -1
  53. package/apps/web/dist/assets/{theme-BOAjs_xb.js → theme-mtamawa_.js} +1 -1
  54. package/apps/web/dist/assets/{ui-DKK_O65k.js → ui-CL8v8Goa.js} +1 -1
  55. package/apps/web/dist/assets/{upload-Cbcw8l_0.js → upload-DXJQU2lL.js} +1 -1
  56. package/apps/web/dist/assets/{useMutation-D8Bpwvs1.js → useMutation-DwRYrG3V.js} +1 -1
  57. package/apps/web/dist/assets/{volume-2-CgRP_A7r.js → volume-2-CYbbBiXP.js} +1 -1
  58. package/apps/web/dist/assets/{wrench-me5bf7bd.js → wrench-D8lG2BH7.js} +1 -1
  59. package/apps/web/dist/index.html +9 -9
  60. package/apps/web/dist/mcp/flow.html +3 -3
  61. package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +0 -4
  62. package/node_modules/@engenty/wizards-shared/dist/definition.js +0 -3
  63. package/node_modules/@engenty/wizards-shared/dist/fit.d.ts +1 -1
  64. package/node_modules/@engenty/wizards-shared/dist/fit.js +0 -4
  65. package/node_modules/@engenty/wizards-shared/dist/marketplace.js +2 -2
  66. package/node_modules/@engenty/wizards-shared/dist/run.d.ts +0 -2
  67. package/node_modules/@engenty/wizards-shared/dist/run.js +0 -4
  68. package/node_modules/@engenty/wizards-shared/dist/wizard-package.d.ts +0 -4
  69. package/node_modules/@engenty/wizards-shared/dist/wizard-package.js +0 -5
  70. package/package.json +1 -2
  71. package/plugin/.claude-plugin/plugin.json +1 -1
  72. package/plugin/plugin.json +1 -1
  73. package/apps/web/dist/assets/EditorPage-B_cFXR-B.js +0 -3
  74. package/apps/web/dist/assets/Marketplace-BNu-Hjzu.js +0 -2
  75. package/apps/web/dist/assets/SettingsPage-BoA-ykQU.js +0 -2
  76. package/apps/web/dist/assets/changelog-DwJOKc4z.js +0 -1
  77. package/apps/web/dist/assets/i18n-Bq6dt_qv.js +0 -55
  78. package/apps/web/dist/assets/oss-credits-C6bPkfSE.js +0 -1
@@ -5,7 +5,7 @@ import { isTextMime } from "@engenty/wizards-shared/workspace";
5
5
  import { Agent } from "@mastra/core/agent";
6
6
  import { createTool } from "@mastra/core/tools";
7
7
  import { z } from "zod";
8
- import { connectorsLine, exampleWizard, mcpServersLine, PRINCIPLES, pluginToolsLine, SCHEMA_DOC, WIDGET_GUIDE, } from "../authoring/guide.js";
8
+ import { connectorsLine, exampleWizard, PRINCIPLES, pluginToolsLine, SCHEMA_DOC, WIDGET_GUIDE, } from "../authoring/guide.js";
9
9
  import { wizardOpSchema } from "../authoring/ops.js";
10
10
  import { importFromRegistry, listConnectors, searchRegistry } from "../connectors/external.js";
11
11
  import { agentModel, attachTools, chatModel, costOf, gatewayTools, totalUsage, } from "../models.js";
@@ -21,7 +21,7 @@ import { attempt as attemptTool, imageOutput } from "../tools/shared.js";
21
21
  import { runScript } from "../widgets/script.js";
22
22
  import { thoughtLine } from "./thought.js";
23
23
  const MAX_STEPS = 45;
24
- function systemPrompt(mcp, connectors, pluginTools) {
24
+ function systemPrompt(connectors, pluginTools) {
25
25
  return `You design wizards for "engenty wizards": a page-by-page flow an end user walks through, where AI steps research, write, draw images, render video, build documents, dashboards and interactive widgets, or write into other systems.
26
26
 
27
27
  You talk to the ADMIN who builds the wizard. Answer in the admin's language, briefly and warmly. Never mention JSON, ids, schemas, files or templates to them — talk about pages, questions, steps, the widget and results.
@@ -33,8 +33,6 @@ ${WIDGET_GUIDE}
33
33
  Surface catalog (for surface steps and output.surface):
34
34
  ${SURFACE_GUIDE}
35
35
 
36
- ${mcpServersLine(mcp)}
37
-
38
36
  ${connectorsLine(connectors)}${pluginToolsLine(pluginTools)}
39
37
 
40
38
  Example of a complete wizard:
@@ -334,7 +332,7 @@ export async function runArchitect(input) {
334
332
  // The system prompt is long and identical on every turn: cache it.
335
333
  instructions: {
336
334
  role: "system",
337
- content: systemPrompt(input.mcpServers, input.connectors, await pluginToolsOf(currentTenant())),
335
+ content: systemPrompt(input.connectors, await pluginToolsOf(currentTenant())),
338
336
  providerOptions: { anthropic: { cacheControl: { type: "ephemeral" } } },
339
337
  },
340
338
  model: agentModel(resolved),
@@ -698,9 +698,7 @@ export async function runStudioAssistant(input) {
698
698
  const tools = {
699
699
  ...knowsTools({
700
700
  user: input.user,
701
- project: project
702
- ? { id: project.id, name: project.name, mcpServers: project.mcpServers }
703
- : null,
701
+ project: project ? { id: project.id, name: project.name } : null,
704
702
  lang: input.lang,
705
703
  chatId: input.chat.id,
706
704
  doing: (label) => input.onActivity?.(label),
@@ -68,7 +68,7 @@ export function knowsTools(ctx) {
68
68
  inputSchema: z.object({ from: z.number().int().min(0).optional() }),
69
69
  execute: ({ from }) => attempt(async () => {
70
70
  ctx.doing(serverText(ctx.lang, "doingAuthoringGuide"));
71
- const guide = authoringGuide(ctx.project?.mcpServers ?? [], ctx.project ? await listConnectors(ctx.project.id) : [], await pluginToolsOf(user.tenantId));
71
+ const guide = authoringGuide(ctx.project ? await listConnectors(ctx.project.id) : [], await pluginToolsOf(user.tenantId));
72
72
  const start = Math.min(from ?? 0, guide.length);
73
73
  return {
74
74
  text: guide.slice(start, start + 14_000),
@@ -153,7 +153,6 @@ type AgentStep = {
153
153
  // data (free appointment times) — it answers in a second instead of half a minute.
154
154
  // String inputs are templates; a filled-in whole number or true/false is passed as one.
155
155
  tools: ("web_search"|"web_fetch"|"browser"|"sandbox"|"image"|"http"|"pages"|"code")[]
156
- mcp?: string[] // ids of the project's MCP servers this step may use
157
156
  connections?: string[] // ids of wizard connections this step may read (mail → mail_search, mail_read, mail_save)
158
157
  output: { format: "text"|"markdown"|"json", fields?: { id, kind: "text"|"number"|"list"|"table"|"yesno"|"choice"|"score", description, columns?: string[], options?: string[] }[], schema?: Schema, surface?: SurfaceComponent[] | true }
159
158
  // "score" answers its description on the scale in options, lowest first ("low", "medium", "high")
@@ -350,7 +349,7 @@ How good wizards look:
350
349
  - Money/totals: use an "items" field with vat — the runner computes totals; documents must use {{items}} verbatim. Never let a model compute totals.
351
350
  - Facts from the web need an agent step with web_search + web_fetch BEFORE writing; documents then cite those notes.
352
351
  - Live data with a free public JSON API (weather and wind: api.open-meteo.com; sunrise/sunset is in it too) → an agent step with the http tool and model "low" that calls the API and returns json. Far cheaper and more exact than web research; use web research only when no API exists.
353
- - Writing into other systems (CRM, database, spreadsheet, website): an agent step with the matching mcp server, http, or browser tool, preceded by a review step. Such a step hands over an earlier step's output as a file by naming it "result:<stepId>.<format>" — to browser_upload, or as "file:result:<stepId>.<format>" where a connector action takes "*_base64".
352
+ - Writing into other systems (CRM, database, spreadsheet, website): an agent step with the matching connector, http, or browser tool, preceded by a review step. Such a step hands over an earlier step's output as a file by naming it "result:<stepId>.<format>" — to browser_upload, or as "file:result:<stepId>.<format>" where a connector action takes "*_base64".
354
353
  - Sending the finished result on (mail it, file it in a cloud folder, post it on social media or a website, put it into an ads account): do not build a step for it. Put the targets into the result step's "share": the person sees the result first and sends it with one button. Build an agent step only when the wizard must write somewhere without being asked.
355
354
  ${sandboxGuideLine()}
356
355
  - Remembering between runs ("merke dir", "führe eine Liste"): declare a list and let an agent step save into it with list_write; a later run reads it as {{lists.id}} or list_read. Give it a key column so known rows are updated, not duplicated. Never make the person re-upload last time's result.
@@ -431,14 +430,11 @@ export function pluginToolsLine(tools) {
431
430
  const lines = tools.map((t) => `- ${t.id} — ${t.description}`);
432
431
  return `\n\nTools of this app's plugins. An agent step lists one in "tools" by its full id, next to the built-in ones; a wizard that uses one runs only where that plugin is installed:\n${lines.join("\n")}`;
433
432
  }
434
- export function mcpServersLine(mcp) {
435
- return `Project MCP servers available to agent steps: ${mcp.length ? mcp.map((m) => `${m.id} (${m.name})`).join(", ") : "none — if the admin wants to write into an external system that needs one, build the step with http or browser, and tell them they can connect a server in the project settings"}.`;
436
- }
437
433
  export function exampleWizard() {
438
434
  return JSON.stringify(EXAMPLE_WIZARD, null, 2);
439
435
  }
440
436
  /** The guide an MCP client reads before it writes a wizard. */
441
- export function authoringGuide(mcp, connectors = [], pluginTools = []) {
437
+ export function authoringGuide(connectors = [], pluginTools = []) {
442
438
  return `engenty wizards: a wizard is a page-by-page flow an end user walks through on a shared link. Pages ask questions; AI steps research, write, draw images, render video, build documents and dashboards, or write into other systems. You author the wizard as JSON; the person who asked you is the ADMIN, the people who later open the link are END USERS.
443
439
 
444
440
  ${SCHEMA_DOC}
@@ -448,8 +444,6 @@ ${WIDGET_GUIDE}
448
444
  Surface catalog (for surface steps and output.surface):
449
445
  ${SURFACE_GUIDE}
450
446
 
451
- ${mcpServersLine(mcp)}
452
-
453
447
  ${connectorsLine(connectors)}${pluginToolsLine(pluginTools)}
454
448
 
455
449
  Models: a step names the KIND of model it needs, never a model. Pick the cheapest class that does the job:
@@ -47,7 +47,7 @@ function stepFormula(step, catalog) {
47
47
  }
48
48
  const shape = step.tools.includes("browser")
49
49
  ? TOKENS.browser
50
- : step.tools.length || step.mcp?.length || step.connections?.length
50
+ : step.tools.length || step.connections?.length
51
51
  ? TOKENS.tools
52
52
  : TOKENS.plain;
53
53
  // A step with `each` runs once per entry; until it has run, three stand in.
@@ -0,0 +1 @@
1
+ ALTER TABLE `project` DROP COLUMN `mcp_servers`;