@engenty/wizards-runtime 0.12.1 → 0.13.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 (129) hide show
  1. package/apps/runtime/dist/agents/studio-assistant.js +42 -5
  2. package/apps/runtime/dist/app.js +15 -4
  3. package/apps/runtime/dist/credits/estimate.js +3 -3
  4. package/apps/runtime/dist/db/live-triggers.js +13 -3
  5. package/apps/runtime/dist/db/migrations/tenant/0027_space_skill.sql +48 -0
  6. package/apps/runtime/dist/db/migrations/tenant/meta/0027_snapshot.json +4120 -0
  7. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
  8. package/apps/runtime/dist/db/schema.js +31 -0
  9. package/apps/runtime/dist/docs/dev/skills.md +116 -0
  10. package/apps/runtime/dist/docs/dev/wizard-format/agent-steps.md +20 -2
  11. package/apps/runtime/dist/docs/user-guide/models.md +105 -30
  12. package/apps/runtime/dist/docs/user-guide/skills.md +85 -0
  13. package/apps/runtime/dist/docs/user-guide/together.md +15 -2
  14. package/apps/runtime/dist/engine/decide.js +1 -1
  15. package/apps/runtime/dist/engine/requirements.js +139 -11
  16. package/apps/runtime/dist/engine/runner.js +47 -5
  17. package/apps/runtime/dist/engine/steps.js +23 -6
  18. package/apps/runtime/dist/engine/template.js +17 -0
  19. package/apps/runtime/dist/harness/model.js +4 -0
  20. package/apps/runtime/dist/link-preview.js +9 -0
  21. package/apps/runtime/dist/live/views.js +2 -0
  22. package/apps/runtime/dist/manage.js +25 -0
  23. package/apps/runtime/dist/mcp/handler.js +55 -1
  24. package/apps/runtime/dist/mcp/seen.js +47 -0
  25. package/apps/runtime/dist/models.js +206 -11
  26. package/apps/runtime/dist/motion-graphics/step.js +2 -2
  27. package/apps/runtime/dist/prompts/goose.md +15 -7
  28. package/apps/runtime/dist/prompts/safety.md +18 -0
  29. package/apps/runtime/dist/prompts/step.md +20 -2
  30. package/apps/runtime/dist/prompts/tools.md +33 -0
  31. package/apps/runtime/dist/routes/marketplace.js +3 -3
  32. package/apps/runtime/dist/routes/runs.js +5 -0
  33. package/apps/runtime/dist/routes/skills.js +84 -0
  34. package/apps/runtime/dist/routes/studio.js +103 -4
  35. package/apps/runtime/dist/safety.js +60 -18
  36. package/apps/runtime/dist/services/manage-reports.js +3 -0
  37. package/apps/runtime/dist/services/marketplace.js +7 -31
  38. package/apps/runtime/dist/services/pages.js +6 -2
  39. package/apps/runtime/dist/services/shares.js +5 -0
  40. package/apps/runtime/dist/services/skills-registry.js +209 -0
  41. package/apps/runtime/dist/services/skills.js +478 -0
  42. package/apps/runtime/dist/services/spaces.js +15 -1
  43. package/apps/runtime/dist/sync/records.js +81 -1
  44. package/apps/runtime/dist/texts.js +45 -0
  45. package/apps/runtime/dist/tools/index.js +7 -4
  46. package/apps/runtime/dist/tools/net-guard.js +8 -4
  47. package/apps/runtime/dist/tools/skills.js +197 -0
  48. package/apps/web/dist/assets/AboutDialog-B-JxkELB.js +1 -0
  49. package/apps/web/dist/assets/{ChangelogDialog-BWaEdlt3.js → ChangelogDialog-SwyId00t.js} +1 -1
  50. package/apps/web/dist/assets/CodeEditor-BwZsk5Al.js +2 -0
  51. package/apps/web/dist/assets/EditorPage-DQ_2FOzI.js +3 -0
  52. package/apps/web/dist/assets/{FlowPreview-DXpzFBRj.js → FlowPreview-DtSpjVTl.js} +1 -1
  53. package/apps/web/dist/assets/Marketplace-DoH4YO3D.js +2 -0
  54. package/apps/web/dist/assets/{NewWizardChannels-B5wuTm7J.js → NewWizardChannels-Tgoexgj4.js} +1 -1
  55. package/apps/web/dist/assets/NewWizardPage-B24AF482.js +7 -0
  56. package/apps/web/dist/assets/OnboardingPage-BEvq4slJ.js +1 -0
  57. package/apps/web/dist/assets/PreviewPane-B_v7Y8R7.js +10 -0
  58. package/apps/web/dist/assets/ProjectPage-ClRuhFJo.js +10 -0
  59. package/apps/web/dist/assets/PublicRunner-MicrpVsv.js +1 -0
  60. package/apps/web/dist/assets/{ReadOnly-Cap_e5ke.js → ReadOnly-BXjv-MSv.js} +1 -1
  61. package/apps/web/dist/assets/SettingsPage-DY8O1r43.js +2 -0
  62. package/apps/web/dist/assets/SetupPage-BOVkVpMu.js +1 -0
  63. package/apps/web/dist/assets/{SharePage-DEeVGatD.js → SharePage-DXGzJSnR.js} +1 -1
  64. package/apps/web/dist/assets/SkillEditor-BzzTDeaU.js +1 -0
  65. package/apps/web/dist/assets/changelog-BLdS-0Bj.js +1 -0
  66. package/apps/web/dist/assets/code-xml-TwKzzMtA.js +1 -0
  67. package/apps/web/dist/assets/{dist-BwhPmMDu.js → dist-BdDd1FxP.js} +1 -1
  68. package/apps/web/dist/assets/dist-EBVTpvRr.js +10 -0
  69. package/apps/web/dist/assets/dist-GlRRx9Xl.js +1 -0
  70. package/apps/web/dist/assets/dist-H1UN89OA.js +1 -0
  71. package/apps/web/dist/assets/eye-Brd-xPUJ.js +1 -0
  72. package/apps/web/dist/assets/i18n-8-Sw11tB.js +55 -0
  73. package/apps/web/dist/assets/index-OsdQFHmh.js +49 -0
  74. package/apps/web/dist/assets/index-QPipX5Fi.css +1 -0
  75. package/apps/web/dist/assets/json-CEsfHdlZ.js +1 -0
  76. package/apps/web/dist/assets/{lock-D-CjMpqn.js → lock-C0uxcOlq.js} +1 -1
  77. package/apps/web/dist/assets/markdown-5-I9_izp.js +29 -0
  78. package/apps/web/dist/assets/{oss-credits-CUpVhKSr.js → oss-credits-DpRWUPjD.js} +1 -1
  79. package/apps/web/dist/assets/{phone-CXSrxw3H.js → phone-DhkHteoJ.js} +1 -1
  80. package/apps/web/dist/assets/{runners-D71NjXtA.js → runners-G-XYaDgR.js} +1 -1
  81. package/apps/web/dist/assets/{session-B2LtqeDq.js → session-BWI-KENJ.js} +1 -1
  82. package/apps/web/dist/assets/theme-D7krsx0_.js +11 -0
  83. package/apps/web/dist/assets/ui-DSXG3f49.js +83 -0
  84. package/apps/web/dist/assets/{upload-hLkuT3Q6.js → upload-BYZTwJTD.js} +1 -1
  85. package/apps/web/dist/assets/{useMutation-C3XBoSVf.js → useMutation-D0QP_k2-.js} +1 -1
  86. package/apps/web/dist/assets/{volume-2-DIxdTlaA.js → volume-2-CVHoxdGM.js} +1 -1
  87. package/apps/web/dist/index.html +9 -8
  88. package/apps/web/dist/mcp/flow.html +66 -66
  89. package/node_modules/@engenty/wizards/dist/plugin/studio.d.ts +3 -2
  90. package/node_modules/@engenty/wizards-shared/dist/assistant.d.ts +1 -0
  91. package/node_modules/@engenty/wizards-shared/dist/assistant.js +5 -0
  92. package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +107 -0
  93. package/node_modules/@engenty/wizards-shared/dist/definition.js +67 -4
  94. package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +18 -0
  95. package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +18 -0
  96. package/node_modules/@engenty/wizards-shared/dist/live.d.ts +1 -1
  97. package/node_modules/@engenty/wizards-shared/dist/marketplace.d.ts +0 -5
  98. package/node_modules/@engenty/wizards-shared/dist/run.d.ts +62 -0
  99. package/node_modules/@engenty/wizards-shared/dist/run.js +52 -0
  100. package/node_modules/@engenty/wizards-shared/dist/skills.d.ts +165 -0
  101. package/node_modules/@engenty/wizards-shared/dist/skills.js +346 -0
  102. package/node_modules/@engenty/wizards-shared/dist/sync.d.ts +4 -2
  103. package/node_modules/@engenty/wizards-shared/dist/sync.js +2 -1
  104. package/node_modules/@engenty/wizards-shared/dist/tiers.d.ts +195 -0
  105. package/node_modules/@engenty/wizards-shared/dist/tiers.js +98 -0
  106. package/package.json +7 -7
  107. package/plugin/.claude-plugin/plugin.json +1 -1
  108. package/plugin/plugin.json +1 -1
  109. package/apps/web/dist/assets/AboutDialog-uGYGy2R2.js +0 -1
  110. package/apps/web/dist/assets/CodeEditor-B5hV1IvK.js +0 -2
  111. package/apps/web/dist/assets/EditorPage-j9BOx5-V.js +0 -3
  112. package/apps/web/dist/assets/Marketplace-DSo6uZF6.js +0 -2
  113. package/apps/web/dist/assets/NewWizardPage-Ci1ZsTJk.js +0 -7
  114. package/apps/web/dist/assets/OnboardingPage-QkdluEZk.js +0 -1
  115. package/apps/web/dist/assets/PreviewPane-swAH89un.js +0 -10
  116. package/apps/web/dist/assets/ProjectPage-Djv5EOYU.js +0 -1
  117. package/apps/web/dist/assets/PublicRunner-Bt8gMxit.js +0 -1
  118. package/apps/web/dist/assets/SettingsPage-C2rmXm_Q.js +0 -2
  119. package/apps/web/dist/assets/SetupPage-CbqGgFPZ.js +0 -1
  120. package/apps/web/dist/assets/changelog-DAY6ZEyy.js +0 -1
  121. package/apps/web/dist/assets/dist-DVpDdhG9.js +0 -1
  122. package/apps/web/dist/assets/dist-DzdNG7Sf.js +0 -10
  123. package/apps/web/dist/assets/i18n-B3J2ypKu.js +0 -55
  124. package/apps/web/dist/assets/index-Dxwbli0m.css +0 -1
  125. package/apps/web/dist/assets/index-WY5lJ_-h.js +0 -49
  126. package/apps/web/dist/assets/json-D2GVvTXK.js +0 -1
  127. package/apps/web/dist/assets/markdown-DwdMW7q0.js +0 -29
  128. package/apps/web/dist/assets/theme-Dab079EV.js +0 -11
  129. package/apps/web/dist/assets/ui-DQX_CQ7c.js +0 -83
@@ -38,9 +38,10 @@ export interface StudioSettingsSection {
38
38
  /**
39
39
  * The parts of the space page: `info` (who the space is: its title, what it does, its facts),
40
40
  * `brand` (how it looks: its logos, colours, type and assets), `knowledge` (its documents and what its steps search), `data` (what its wizards keep), `page`
41
- * (its public page at `<organization>.wizards.page/<slug>`) and `results` (what its runs produced).
41
+ * (its public page at `<organization>.wizards.page/<slug>`), `results` (what its runs produced) and
42
+ * `skills` (instructions its wizards follow, behind the `skills` switch).
42
43
  */
43
- export type StudioSpaceGroup = "info" | "brand" | "knowledge" | "data" | "page" | "results";
44
+ export type StudioSpaceGroup = "info" | "brand" | "knowledge" | "data" | "page" | "results" | "skills";
44
45
  /**
45
46
  * A section of the space page, in one of its parts, below the part's own sections. The studio
46
47
  * draws its heading and hint above it, and its entry in the part's menu under the plugin's name;
@@ -65,6 +65,7 @@ export declare const assistantTurnSchema: z.ZodObject<{
65
65
  }, z.core.$strip>>>;
66
66
  debug: z.ZodOptional<z.ZodBoolean>;
67
67
  extra: z.ZodOptional<z.ZodBoolean>;
68
+ model: z.ZodOptional<z.ZodString>;
68
69
  }, z.core.$strip>;
69
70
  export type AssistantTurn = z.input<typeof assistantTurnSchema>;
70
71
  /**
@@ -54,6 +54,11 @@ export const assistantTurnSchema = z.object({
54
54
  debug: z.boolean().optional(),
55
55
  /** Extra effort: the chat works with its more capable model. Off where the field is left out. */
56
56
  extra: z.boolean().optional(),
57
+ /**
58
+ * The class the person picked in an organization with a model tier (`anthropic/high`,
59
+ * `standard`), from what its policy allows for Goose; left out, the chat's own way answers.
60
+ */
61
+ model: z.string().max(80).optional(),
57
62
  });
58
63
  /**
59
64
  * A message the person writes while a turn runs (POST /api/studio/assistant/run/:runId/signal):
@@ -126,6 +126,29 @@ export declare const TEXT_CLASSES: readonly ["classifier", "low", "standard", "h
126
126
  export type TextClass = (typeof TEXT_CLASSES)[number];
127
127
  export declare const MODEL_CLASSES: readonly ["classifier", "low", "standard", "high", "image", "video", "audio", "speech"];
128
128
  export type ModelClass = (typeof MODEL_CLASSES)[number];
129
+ /**
130
+ * The makers a step may name next to its class (`maker`), and each one's classes. With a maker
131
+ * the step asks for `wizards/<maker>/<class>`: the organization's tier binds it to one of that
132
+ * maker's models, never another maker's. `highest` is the top line some makers have; it exists
133
+ * only with a maker. The classifier class takes none.
134
+ */
135
+ export declare const MAKERS: readonly ["anthropic", "openai", "google", "mistral"];
136
+ export type Maker = (typeof MAKERS)[number];
137
+ export declare const STEP_CLASSES: readonly ["classifier", "low", "standard", "high", "highest"];
138
+ export type StepClass = (typeof STEP_CLASSES)[number];
139
+ export declare const MAKER_CLASSES: Record<Maker, readonly StepClass[]>;
140
+ /** The text class a step runs on where no maker class can be asked for: `highest` is `high` there. */
141
+ export declare function textClassOf(model: StepClass): TextClass;
142
+ /** What the gateway is asked for: `<maker>/<class>` with a maker, else the class. */
143
+ export declare function classIdOf(step: {
144
+ model?: StepClass;
145
+ maker?: Maker;
146
+ }, fallback: TextClass): string;
147
+ /** Why a step's maker and class don't go together; null where they do. */
148
+ export declare function makerProblem(step: {
149
+ model?: StepClass;
150
+ maker?: Maker;
151
+ }): string | null;
129
152
  /** How hard the model should think, where the bound model can be told. */
130
153
  export declare const EFFORTS: readonly ["low", "medium", "high"];
131
154
  export type Effort = (typeof EFFORTS)[number];
@@ -610,9 +633,16 @@ export declare const agentStepSchema: z.ZodObject<{
610
633
  model: z.ZodOptional<z.ZodEnum<{
611
634
  classifier: "classifier";
612
635
  high: "high";
636
+ highest: "highest";
613
637
  low: "low";
614
638
  standard: "standard";
615
639
  }>>;
640
+ maker: z.ZodOptional<z.ZodEnum<{
641
+ anthropic: "anthropic";
642
+ google: "google";
643
+ mistral: "mistral";
644
+ openai: "openai";
645
+ }>>;
616
646
  effort: z.ZodOptional<z.ZodEnum<{
617
647
  high: "high";
618
648
  low: "low";
@@ -695,9 +725,16 @@ export declare const generateStepSchema: z.ZodObject<{
695
725
  model: z.ZodOptional<z.ZodEnum<{
696
726
  classifier: "classifier";
697
727
  high: "high";
728
+ highest: "highest";
698
729
  low: "low";
699
730
  standard: "standard";
700
731
  }>>;
732
+ maker: z.ZodOptional<z.ZodEnum<{
733
+ anthropic: "anthropic";
734
+ google: "google";
735
+ mistral: "mistral";
736
+ openai: "openai";
737
+ }>>;
701
738
  effort: z.ZodOptional<z.ZodEnum<{
702
739
  high: "high";
703
740
  low: "low";
@@ -819,9 +856,16 @@ export declare const motionGraphicsStepSchema: z.ZodObject<{
819
856
  model: z.ZodOptional<z.ZodEnum<{
820
857
  classifier: "classifier";
821
858
  high: "high";
859
+ highest: "highest";
822
860
  low: "low";
823
861
  standard: "standard";
824
862
  }>>;
863
+ maker: z.ZodOptional<z.ZodEnum<{
864
+ anthropic: "anthropic";
865
+ google: "google";
866
+ mistral: "mistral";
867
+ openai: "openai";
868
+ }>>;
825
869
  effort: z.ZodOptional<z.ZodEnum<{
826
870
  high: "high";
827
871
  low: "low";
@@ -1369,9 +1413,16 @@ export declare const stepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1369
1413
  model: z.ZodOptional<z.ZodEnum<{
1370
1414
  classifier: "classifier";
1371
1415
  high: "high";
1416
+ highest: "highest";
1372
1417
  low: "low";
1373
1418
  standard: "standard";
1374
1419
  }>>;
1420
+ maker: z.ZodOptional<z.ZodEnum<{
1421
+ anthropic: "anthropic";
1422
+ google: "google";
1423
+ mistral: "mistral";
1424
+ openai: "openai";
1425
+ }>>;
1375
1426
  effort: z.ZodOptional<z.ZodEnum<{
1376
1427
  high: "high";
1377
1428
  low: "low";
@@ -1453,9 +1504,16 @@ export declare const stepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1453
1504
  model: z.ZodOptional<z.ZodEnum<{
1454
1505
  classifier: "classifier";
1455
1506
  high: "high";
1507
+ highest: "highest";
1456
1508
  low: "low";
1457
1509
  standard: "standard";
1458
1510
  }>>;
1511
+ maker: z.ZodOptional<z.ZodEnum<{
1512
+ anthropic: "anthropic";
1513
+ google: "google";
1514
+ mistral: "mistral";
1515
+ openai: "openai";
1516
+ }>>;
1459
1517
  effort: z.ZodOptional<z.ZodEnum<{
1460
1518
  high: "high";
1461
1519
  low: "low";
@@ -1679,9 +1737,16 @@ export declare const stepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1679
1737
  model: z.ZodOptional<z.ZodEnum<{
1680
1738
  classifier: "classifier";
1681
1739
  high: "high";
1740
+ highest: "highest";
1682
1741
  low: "low";
1683
1742
  standard: "standard";
1684
1743
  }>>;
1744
+ maker: z.ZodOptional<z.ZodEnum<{
1745
+ anthropic: "anthropic";
1746
+ google: "google";
1747
+ mistral: "mistral";
1748
+ openai: "openai";
1749
+ }>>;
1685
1750
  effort: z.ZodOptional<z.ZodEnum<{
1686
1751
  high: "high";
1687
1752
  low: "low";
@@ -2392,9 +2457,16 @@ export declare const currentWizardSchema: z.ZodObject<{
2392
2457
  model: z.ZodOptional<z.ZodEnum<{
2393
2458
  classifier: "classifier";
2394
2459
  high: "high";
2460
+ highest: "highest";
2395
2461
  low: "low";
2396
2462
  standard: "standard";
2397
2463
  }>>;
2464
+ maker: z.ZodOptional<z.ZodEnum<{
2465
+ anthropic: "anthropic";
2466
+ google: "google";
2467
+ mistral: "mistral";
2468
+ openai: "openai";
2469
+ }>>;
2398
2470
  effort: z.ZodOptional<z.ZodEnum<{
2399
2471
  high: "high";
2400
2472
  low: "low";
@@ -2476,9 +2548,16 @@ export declare const currentWizardSchema: z.ZodObject<{
2476
2548
  model: z.ZodOptional<z.ZodEnum<{
2477
2549
  classifier: "classifier";
2478
2550
  high: "high";
2551
+ highest: "highest";
2479
2552
  low: "low";
2480
2553
  standard: "standard";
2481
2554
  }>>;
2555
+ maker: z.ZodOptional<z.ZodEnum<{
2556
+ anthropic: "anthropic";
2557
+ google: "google";
2558
+ mistral: "mistral";
2559
+ openai: "openai";
2560
+ }>>;
2482
2561
  effort: z.ZodOptional<z.ZodEnum<{
2483
2562
  high: "high";
2484
2563
  low: "low";
@@ -2702,9 +2781,16 @@ export declare const currentWizardSchema: z.ZodObject<{
2702
2781
  model: z.ZodOptional<z.ZodEnum<{
2703
2782
  classifier: "classifier";
2704
2783
  high: "high";
2784
+ highest: "highest";
2705
2785
  low: "low";
2706
2786
  standard: "standard";
2707
2787
  }>>;
2788
+ maker: z.ZodOptional<z.ZodEnum<{
2789
+ anthropic: "anthropic";
2790
+ google: "google";
2791
+ mistral: "mistral";
2792
+ openai: "openai";
2793
+ }>>;
2708
2794
  effort: z.ZodOptional<z.ZodEnum<{
2709
2795
  high: "high";
2710
2796
  low: "low";
@@ -3233,9 +3319,16 @@ export declare const wizardSchema: z.ZodPreprocess<z.ZodObject<{
3233
3319
  model: z.ZodOptional<z.ZodEnum<{
3234
3320
  classifier: "classifier";
3235
3321
  high: "high";
3322
+ highest: "highest";
3236
3323
  low: "low";
3237
3324
  standard: "standard";
3238
3325
  }>>;
3326
+ maker: z.ZodOptional<z.ZodEnum<{
3327
+ anthropic: "anthropic";
3328
+ google: "google";
3329
+ mistral: "mistral";
3330
+ openai: "openai";
3331
+ }>>;
3239
3332
  effort: z.ZodOptional<z.ZodEnum<{
3240
3333
  high: "high";
3241
3334
  low: "low";
@@ -3317,9 +3410,16 @@ export declare const wizardSchema: z.ZodPreprocess<z.ZodObject<{
3317
3410
  model: z.ZodOptional<z.ZodEnum<{
3318
3411
  classifier: "classifier";
3319
3412
  high: "high";
3413
+ highest: "highest";
3320
3414
  low: "low";
3321
3415
  standard: "standard";
3322
3416
  }>>;
3417
+ maker: z.ZodOptional<z.ZodEnum<{
3418
+ anthropic: "anthropic";
3419
+ google: "google";
3420
+ mistral: "mistral";
3421
+ openai: "openai";
3422
+ }>>;
3323
3423
  effort: z.ZodOptional<z.ZodEnum<{
3324
3424
  high: "high";
3325
3425
  low: "low";
@@ -3543,9 +3643,16 @@ export declare const wizardSchema: z.ZodPreprocess<z.ZodObject<{
3543
3643
  model: z.ZodOptional<z.ZodEnum<{
3544
3644
  classifier: "classifier";
3545
3645
  high: "high";
3646
+ highest: "highest";
3546
3647
  low: "low";
3547
3648
  standard: "standard";
3548
3649
  }>>;
3650
+ maker: z.ZodOptional<z.ZodEnum<{
3651
+ anthropic: "anthropic";
3652
+ google: "google";
3653
+ mistral: "mistral";
3654
+ openai: "openai";
3655
+ }>>;
3549
3656
  effort: z.ZodOptional<z.ZodEnum<{
3550
3657
  high: "high";
3551
3658
  low: "low";
@@ -336,6 +336,49 @@ export function pluginToolOf(id) {
336
336
  */
337
337
  export const TEXT_CLASSES = ["classifier", "low", "standard", "high"];
338
338
  export const MODEL_CLASSES = [...TEXT_CLASSES, "image", "video", "audio", "speech"];
339
+ /**
340
+ * The makers a step may name next to its class (`maker`), and each one's classes. With a maker
341
+ * the step asks for `wizards/<maker>/<class>`: the organization's tier binds it to one of that
342
+ * maker's models, never another maker's. `highest` is the top line some makers have; it exists
343
+ * only with a maker. The classifier class takes none.
344
+ */
345
+ export const MAKERS = ["anthropic", "openai", "google", "mistral"];
346
+ export const STEP_CLASSES = [...TEXT_CLASSES, "highest"];
347
+ export const MAKER_CLASSES = {
348
+ anthropic: ["low", "standard", "high", "highest"],
349
+ openai: ["low", "standard", "high", "highest"],
350
+ google: ["low", "standard", "high"],
351
+ mistral: ["low", "high"],
352
+ };
353
+ /** The text class a step runs on where no maker class can be asked for: `highest` is `high` there. */
354
+ export function textClassOf(model) {
355
+ return model === "highest" ? "high" : model;
356
+ }
357
+ /** What the gateway is asked for: `<maker>/<class>` with a maker, else the class. */
358
+ export function classIdOf(step, fallback) {
359
+ const model = step.model ?? fallback;
360
+ return step.maker ? `${step.maker}/${model}` : textClassOf(model);
361
+ }
362
+ /** Why a step's maker and class don't go together; null where they do. */
363
+ export function makerProblem(step) {
364
+ if (!step.maker) {
365
+ return step.model === "highest"
366
+ ? `The class "highest" needs a maker: ${makersWith("highest").join(" or ")}.`
367
+ : null;
368
+ }
369
+ if (!step.model) {
370
+ return `A step with a maker names its class too: one of ${MAKER_CLASSES[step.maker].join(", ")}.`;
371
+ }
372
+ if (step.model === "classifier") {
373
+ return "The classifier class takes no maker.";
374
+ }
375
+ return MAKER_CLASSES[step.maker].includes(step.model)
376
+ ? null
377
+ : `"${step.maker}" has no class "${step.model}": it has ${MAKER_CLASSES[step.maker].join(", ")}.`;
378
+ }
379
+ function makersWith(model) {
380
+ return MAKERS.filter((maker) => MAKER_CLASSES[maker].includes(model));
381
+ }
339
382
  /** How hard the model should think, where the bound model can be told. */
340
383
  export const EFFORTS = ["low", "medium", "high"];
341
384
  export const ASSET_KINDS = ["image", "video", "voice", "document", "dashboard"];
@@ -567,7 +610,9 @@ export const agentStepSchema = z.object({
567
610
  })
568
611
  .default({ format: "markdown" }),
569
612
  /** The model class the step needs; default `standard`. The model itself is bound elsewhere. */
570
- model: z.enum(TEXT_CLASSES).optional(),
613
+ model: z.enum(STEP_CLASSES).optional(),
614
+ /** The maker whose model runs the class; without one the organization's tier picks it. */
615
+ maker: z.enum(MAKERS).optional(),
571
616
  effort: z.enum(EFFORTS).optional(),
572
617
  /** Shown to the person while it works. */
573
618
  /**
@@ -610,7 +655,9 @@ export const generateStepSchema = z.object({
610
655
  */
611
656
  each: z.string().optional(),
612
657
  /** For document/dashboard: the model class that writes it; default `standard`. */
613
- model: z.enum(TEXT_CLASSES).optional(),
658
+ model: z.enum(STEP_CLASSES).optional(),
659
+ /** The maker whose model runs the class; without one the organization's tier picks it. */
660
+ maker: z.enum(MAKERS).optional(),
614
661
  effort: z.enum(EFFORTS).optional(),
615
662
  working: z.string().optional(),
616
663
  });
@@ -685,7 +732,9 @@ export const motionGraphicsStepSchema = z.object({
685
732
  /** About how long the video runs, in seconds. */
686
733
  seconds: z.number().int().min(3).max(600).optional(),
687
734
  /** The model class; default `low` — the kit carries the craft. */
688
- model: z.enum(TEXT_CLASSES).optional(),
735
+ model: z.enum(STEP_CLASSES).optional(),
736
+ /** The maker whose model runs the class; without one the organization's tier picks it. */
737
+ maker: z.enum(MAKERS).optional(),
689
738
  effort: z.enum(EFFORTS).optional(),
690
739
  working: z.string().optional(),
691
740
  });
@@ -885,7 +934,8 @@ export function upgradeDefinition(raw, unversioned = 1) {
885
934
  return { ...def, version: DEFINITION_VERSION, steps };
886
935
  }
887
936
  /** A definition of this version, as it is written: what the JSON Schema describes. */
888
- export const currentWizardSchema = z.object({
937
+ export const currentWizardSchema = z
938
+ .object({
889
939
  version: z.literal(DEFINITION_VERSION).default(DEFINITION_VERSION),
890
940
  title: z.string().min(1),
891
941
  description: z.string().default(""),
@@ -916,6 +966,19 @@ export const currentWizardSchema = z.object({
916
966
  */
917
967
  themes: z.array(z.string().regex(THEME_ID)).max(8).optional(),
918
968
  steps: z.array(stepSchema).min(1),
969
+ })
970
+ .superRefine((def, ctx) => {
971
+ def.steps.forEach((step, i) => {
972
+ const classed = step.type === "agent" || step.type === "generate" || step.type === "motion-graphics";
973
+ const problem = classed ? makerProblem(step) : null;
974
+ if (classed && problem) {
975
+ ctx.addIssue({
976
+ code: "custom",
977
+ path: ["steps", i, step.maker ? "maker" : "model"],
978
+ message: problem,
979
+ });
980
+ }
981
+ });
919
982
  });
920
983
  /** A definition of any version this app reads, brought to this one. */
921
984
  export const wizardSchema = z.preprocess((raw) => upgradeDefinition(raw), currentWizardSchema);
@@ -105,6 +105,12 @@ export declare const FEATURES: {
105
105
  readonly label: "WordPress plugin";
106
106
  readonly hint: "The plugin for WordPress sites, and a wizard as a package for one: offered in the share dialog and under Settings → Integrate.";
107
107
  };
108
+ readonly skills: {
109
+ readonly kind: "release";
110
+ readonly default: false;
111
+ readonly label: "Skills";
112
+ readonly hint: "Skills in a space's sources: from skills.sh, uploaded or written; always on in every AI step, or read by a wizard when it needs one.";
113
+ };
108
114
  readonly plugins: {
109
115
  readonly kind: "release";
110
116
  readonly default: false;
@@ -117,6 +123,18 @@ export declare const FEATURES: {
117
123
  readonly label: "Goose";
118
124
  readonly hint: "The studio's assistant: its chat at the foot of the page and in the sidebar.";
119
125
  };
126
+ readonly modelTiers: {
127
+ readonly kind: "release";
128
+ readonly default: false;
129
+ readonly label: "Model tiers";
130
+ readonly hint: "The organization's model tier: steps may name a maker, calls say what they are for, and the studio shows what each class runs on in the tier.";
131
+ };
132
+ readonly customDomains: {
133
+ readonly kind: "release";
134
+ readonly default: false;
135
+ readonly label: "Own domains";
136
+ readonly hint: "Settings › Allgemein: the organization's wizards under a domain of its own, once a TXT record confirms it.";
137
+ };
120
138
  readonly ownKeys: {
121
139
  readonly kind: "plan";
122
140
  readonly default: true;
@@ -97,6 +97,12 @@ export const FEATURES = {
97
97
  label: "WordPress plugin",
98
98
  hint: "The plugin for WordPress sites, and a wizard as a package for one: offered in the share dialog and under Settings → Integrate.",
99
99
  },
100
+ skills: {
101
+ kind: "release",
102
+ default: false,
103
+ label: "Skills",
104
+ hint: "Skills in a space's sources: from skills.sh, uploaded or written; always on in every AI step, or read by a wizard when it needs one.",
105
+ },
100
106
  plugins: {
101
107
  kind: "release",
102
108
  default: false,
@@ -109,6 +115,18 @@ export const FEATURES = {
109
115
  label: "Goose",
110
116
  hint: "The studio's assistant: its chat at the foot of the page and in the sidebar.",
111
117
  },
118
+ modelTiers: {
119
+ kind: "release",
120
+ default: false,
121
+ label: "Model tiers",
122
+ hint: "The organization's model tier: steps may name a maker, calls say what they are for, and the studio shows what each class runs on in the tier.",
123
+ },
124
+ customDomains: {
125
+ kind: "release",
126
+ default: false,
127
+ label: "Own domains",
128
+ hint: "Settings › Allgemein: the organization's wizards under a domain of its own, once a TXT record confirms it.",
129
+ },
112
130
  ownKeys: {
113
131
  kind: "plan",
114
132
  default: true,
@@ -3,7 +3,7 @@
3
3
  * in the tenant's `live_change` feed, and an open studio hears of it. The kinds start equal to
4
4
  * the two-way sync's; they are their own list so a kind can be live without syncing.
5
5
  */
6
- export declare const LIVE_KINDS: readonly ["space", "wizard", "translation", "message", "page", "table", "row", "category", "file", "connector", "presence"];
6
+ export declare const LIVE_KINDS: readonly ["space", "wizard", "translation", "message", "page", "table", "row", "category", "file", "connector", "skill", "presence"];
7
7
  export type LiveKind = (typeof LIVE_KINDS)[number];
8
8
  /** `put`: the item was added or changed. `del`: the item itself was deleted. */
9
9
  export type LiveOp = "put" | "del";
@@ -115,11 +115,6 @@ export interface MarketplaceSummary {
115
115
  updatedAt: string;
116
116
  /** One of the entries an app keeps for offline use without being asked. */
117
117
  starter: boolean;
118
- /**
119
- * The level from which a team's catalog shows it (Manage's levels, 1 to 5). A marketplace older
120
- * than this field leaves it out: read it as 1.
121
- */
122
- level?: number;
123
118
  /** Shown first, under "Recommended". Left out by an older marketplace: not featured. */
124
119
  featured?: boolean;
125
120
  /** The language of `title` and `pitch`; the entry's own where it is not translated. */
@@ -45,6 +45,10 @@ export interface RunState {
45
45
  history: string[];
46
46
  /** Regenerate notes per step. */
47
47
  notes: Record<string, string>;
48
+ /** A guest's run: a hash of the answers the input check passed, so the same are not asked again. */
49
+ inputChecked?: string;
50
+ /** What the content rules stopped, where they stopped the run (safety.ts ContentKind). */
51
+ blocked?: string;
48
52
  /** Steps that make several results: the entries (from 0) to make again; the others stay. */
49
53
  redo?: Record<string, number[]>;
50
54
  /** The step whose `ask` branches are being decided; the run waits on that decision. */
@@ -223,6 +227,7 @@ declare const NOTES_EN: {
223
227
  readonly searchesDocuments: "Searching the documents: {query}";
224
228
  readonly searchesKnowledge: "Searching knowledge: {query} – {relevant} of {candidates} fit";
225
229
  readonly listsKnowledge: "Listing knowledge";
230
+ readonly readsSkill: "Reading the skill {name}";
226
231
  readonly searchesMail: "Searching {label}";
227
232
  readonly savesReceipts: {
228
233
  readonly one: "Saving {count} receipt from {label}";
@@ -493,6 +498,58 @@ declare const NOTES_EN: {
493
498
  readonly makesVideos: "videos";
494
499
  readonly makesSpeech: "speech";
495
500
  readonly makesVoiceNotes: "voice notes";
501
+ readonly makesDecisions: "decisions";
502
+ readonly makesSearch: "search";
503
+ readonly tierLeavesOutMaker: "{tier}, your organization’s tier, leaves out {maker}. Pick another maker in the Inspector.";
504
+ readonly tierOffersNo: "{tier}, your organization’s tier, offers no model for {what}.";
505
+ readonly tierOffersNoWhy: "{tier}, your organization’s tier, offers no model for {what} ({why}).";
506
+ readonly tierWhyUnbound: "none is bound yet";
507
+ readonly tierWhyRegion: "no route in the tier’s regions";
508
+ readonly tierWhyRetention: "{model} keeps data on every route";
509
+ readonly tierWhyTraining: "{model} may train on what it gets";
510
+ readonly tierRefused: "Didn’t run: {problem} Change the step, or ask an admin.";
511
+ readonly tierNoSearch: "{tier}, your organization’s tier, allows no web search. This step runs without it.";
512
+ readonly notInPolicy: "Didn’t run: your organization’s admins haven’t approved {what} for wizards. Pick an approved model in the Inspector, or ask an admin.";
513
+ readonly masked: {
514
+ readonly one: "{count} personal detail masked and put back in the answer: {kinds}";
515
+ readonly other: "{count} personal details masked and put back in the answer: {kinds}";
516
+ };
517
+ readonly maskedPerson: {
518
+ readonly one: "{count} name";
519
+ readonly other: "{count} names";
520
+ };
521
+ readonly maskedEmail: {
522
+ readonly one: "{count} e-mail address";
523
+ readonly other: "{count} e-mail addresses";
524
+ };
525
+ readonly maskedPhone: {
526
+ readonly one: "{count} phone number";
527
+ readonly other: "{count} phone numbers";
528
+ };
529
+ readonly maskedIban: {
530
+ readonly one: "{count} IBAN";
531
+ readonly other: "{count} IBANs";
532
+ };
533
+ readonly maskedId: {
534
+ readonly one: "{count} ID number";
535
+ readonly other: "{count} ID numbers";
536
+ };
537
+ readonly maskedAddress: {
538
+ readonly one: "{count} address";
539
+ readonly other: "{count} addresses";
540
+ };
541
+ readonly maskedContract: {
542
+ readonly one: "{count} contract number";
543
+ readonly other: "{count} contract numbers";
544
+ };
545
+ readonly maskedTerm: {
546
+ readonly one: "{count} term of your own";
547
+ readonly other: "{count} terms of your own";
548
+ };
549
+ readonly maskedOther: {
550
+ readonly one: "{count} other detail";
551
+ readonly other: "{count} other details";
552
+ };
496
553
  };
497
554
  export type RunNoteCode = keyof typeof NOTES_EN;
498
555
  export declare const RUN_NOTES: Texts<RunNoteCode>;
@@ -723,6 +780,11 @@ export interface StepEstimate {
723
780
  /** A model class a wizard needs that this runtime cannot serve, with the steps that call it. */
724
781
  export interface MissingModel {
725
782
  cls: ModelClass;
783
+ /**
784
+ * The class as the organization's model tier names it (`anthropic/highest`, `video`), where
785
+ * the tier doesn't offer it; only admins can change that.
786
+ */
787
+ tierClass?: string;
726
788
  /** Why the class cannot run, as the person reads it. */
727
789
  problem: string;
728
790
  steps: {
@@ -55,6 +55,7 @@ const NOTES_EN = {
55
55
  searchesDocuments: "Searching the documents: {query}",
56
56
  searchesKnowledge: "Searching knowledge: {query} – {relevant} of {candidates} fit",
57
57
  listsKnowledge: "Listing knowledge",
58
+ readsSkill: "Reading the skill {name}",
58
59
  searchesMail: "Searching {label}",
59
60
  savesReceipts: {
60
61
  one: "Saving {count} receipt from {label}",
@@ -322,6 +323,31 @@ const NOTES_EN = {
322
323
  makesVideos: "videos",
323
324
  makesSpeech: "speech",
324
325
  makesVoiceNotes: "voice notes",
326
+ makesDecisions: "decisions",
327
+ makesSearch: "search",
328
+ tierLeavesOutMaker: "{tier}, your organization’s tier, leaves out {maker}. Pick another maker in the Inspector.",
329
+ tierOffersNo: "{tier}, your organization’s tier, offers no model for {what}.",
330
+ tierOffersNoWhy: "{tier}, your organization’s tier, offers no model for {what} ({why}).",
331
+ tierWhyUnbound: "none is bound yet",
332
+ tierWhyRegion: "no route in the tier’s regions",
333
+ tierWhyRetention: "{model} keeps data on every route",
334
+ tierWhyTraining: "{model} may train on what it gets",
335
+ tierRefused: "Didn’t run: {problem} Change the step, or ask an admin.",
336
+ tierNoSearch: "{tier}, your organization’s tier, allows no web search. This step runs without it.",
337
+ notInPolicy: "Didn’t run: your organization’s admins haven’t approved {what} for wizards. Pick an approved model in the Inspector, or ask an admin.",
338
+ masked: {
339
+ one: "{count} personal detail masked and put back in the answer: {kinds}",
340
+ other: "{count} personal details masked and put back in the answer: {kinds}",
341
+ },
342
+ maskedPerson: { one: "{count} name", other: "{count} names" },
343
+ maskedEmail: { one: "{count} e-mail address", other: "{count} e-mail addresses" },
344
+ maskedPhone: { one: "{count} phone number", other: "{count} phone numbers" },
345
+ maskedIban: { one: "{count} IBAN", other: "{count} IBANs" },
346
+ maskedId: { one: "{count} ID number", other: "{count} ID numbers" },
347
+ maskedAddress: { one: "{count} address", other: "{count} addresses" },
348
+ maskedContract: { one: "{count} contract number", other: "{count} contract numbers" },
349
+ maskedTerm: { one: "{count} term of your own", other: "{count} terms of your own" },
350
+ maskedOther: { one: "{count} other detail", other: "{count} other details" },
325
351
  };
326
352
  const NOTES_DE = {
327
353
  entry: "Eintrag {n} von {total}",
@@ -370,6 +396,7 @@ const NOTES_DE = {
370
396
  searchesDocuments: "Sucht in den Dokumenten: {query}",
371
397
  searchesKnowledge: "Sucht in Wissen: {query} – {relevant} von {candidates} passen",
372
398
  listsKnowledge: "Listet Wissen",
399
+ readsSkill: "Liest den Skill {name}",
373
400
  searchesMail: "Durchsucht {label}",
374
401
  savesReceipts: {
375
402
  one: "Speichert {count} Beleg aus {label}",
@@ -631,6 +658,31 @@ const NOTES_DE = {
631
658
  makesVideos: "Videos",
632
659
  makesSpeech: "Sprachausgabe",
633
660
  makesVoiceNotes: "Sprachnotizen",
661
+ makesDecisions: "Entscheidungen",
662
+ makesSearch: "die Suche",
663
+ tierLeavesOutMaker: "{tier}, die Modellstufe deiner Organisation, lässt {maker} aus. Wähl im Inspector einen anderen Hersteller.",
664
+ tierOffersNo: "{tier}, die Modellstufe deiner Organisation, hat kein Modell für {what}.",
665
+ tierOffersNoWhy: "{tier}, die Modellstufe deiner Organisation, hat kein Modell für {what} ({why}).",
666
+ tierWhyUnbound: "noch keines festgelegt",
667
+ tierWhyRegion: "kein Weg in den Regionen der Stufe",
668
+ tierWhyRetention: "{model} speichert Daten auf jedem Weg",
669
+ tierWhyTraining: "{model} darf mit den Daten trainieren",
670
+ tierRefused: "Nicht gelaufen: {problem} Ändere den Schritt oder frag die Admins.",
671
+ tierNoSearch: "{tier}, die Modellstufe deiner Organisation, erlaubt keine Websuche. Dieser Schritt läuft ohne sie.",
672
+ notInPolicy: "Nicht gelaufen: Die Admins deiner Organisation haben {what} für Wizards nicht freigegeben. Wähl im Inspector ein freigegebenes Modell oder frag die Admins.",
673
+ masked: {
674
+ one: "{count} persönliche Angabe maskiert und in der Antwort wieder eingesetzt: {kinds}",
675
+ other: "{count} persönliche Angaben maskiert und in der Antwort wieder eingesetzt: {kinds}",
676
+ },
677
+ maskedPerson: { one: "{count} Name", other: "{count} Namen" },
678
+ maskedEmail: { one: "{count} E-Mail-Adresse", other: "{count} E-Mail-Adressen" },
679
+ maskedPhone: { one: "{count} Telefonnummer", other: "{count} Telefonnummern" },
680
+ maskedIban: { one: "{count} IBAN", other: "{count} IBANs" },
681
+ maskedId: { one: "{count} Ausweisnummer", other: "{count} Ausweisnummern" },
682
+ maskedAddress: { one: "{count} Adresse", other: "{count} Adressen" },
683
+ maskedContract: { one: "{count} Vertragsnummer", other: "{count} Vertragsnummern" },
684
+ maskedTerm: { one: "{count} eigener Begriff", other: "{count} eigene Begriffe" },
685
+ maskedOther: { one: "{count} andere Angabe", other: "{count} andere Angaben" },
634
686
  };
635
687
  export const RUN_NOTES = { en: NOTES_EN, de: NOTES_DE };
636
688
  /** A note: a line of `RUN_NOTES`, said in whichever language the reader reads. */