@engenty/wizards-runtime 0.9.6 → 0.9.8
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.
- package/apps/runtime/dist/agents/architect.js +5 -3
- package/apps/runtime/dist/agents/chat-clients.js +299 -0
- package/apps/runtime/dist/agents/company.js +111 -0
- package/apps/runtime/dist/agents/studio-assistant.js +8 -4
- package/apps/runtime/dist/agents/subscription.js +163 -134
- package/apps/runtime/dist/agents/website.js +571 -53
- package/apps/runtime/dist/app.js +6 -3
- package/apps/runtime/dist/assistant/knows.js +5 -5
- package/apps/runtime/dist/assistant/primer.js +4 -4
- package/apps/runtime/dist/auth/account.js +12 -12
- package/apps/runtime/dist/auth/keys.js +18 -8
- package/apps/runtime/dist/authoring/example.js +2 -2
- package/apps/runtime/dist/authoring/guide.js +11 -11
- package/apps/runtime/dist/cli/account.js +20 -18
- package/apps/runtime/dist/cli/features.js +3 -3
- package/apps/runtime/dist/cli/ui.js +6 -0
- package/apps/runtime/dist/credits/estimate.js +5 -5
- package/apps/runtime/dist/db/adopt.js +4 -3
- package/apps/runtime/dist/db/migrations/control/0011_model_classes.sql +11 -0
- package/apps/runtime/dist/db/migrations/control/meta/0011_snapshot.json +600 -0
- package/apps/runtime/dist/db/migrations/control/meta/_journal.json +7 -0
- package/apps/runtime/dist/db/migrations/tenant/0021_model_classes.sql +41 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0021_snapshot.json +3475 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
- package/apps/runtime/dist/db/schema.js +1 -1
- package/apps/runtime/dist/docs/dev/plugins/index.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/quick-start.md +2 -2
- package/apps/runtime/dist/docs/dev/plugins/server.md +4 -4
- package/apps/runtime/dist/docs/dev/plugins/studio.md +1 -1
- package/apps/runtime/dist/docs/dev/wizard-format/agent-steps.md +9 -5
- package/apps/runtime/dist/docs/dev/wizard-format/film-steps.md +2 -2
- package/apps/runtime/dist/docs/dev/wizard-format/index.md +14 -8
- package/apps/runtime/dist/docs/user-guide/ai-apps.md +1 -1
- package/apps/runtime/dist/docs/user-guide/command-line.md +1 -1
- package/apps/runtime/dist/docs/user-guide/create-account.md +6 -6
- package/apps/runtime/dist/docs/user-guide/first-start.md +1 -1
- package/apps/runtime/dist/docs/user-guide/index.md +5 -5
- package/apps/runtime/dist/docs/user-guide/models.md +35 -20
- package/apps/runtime/dist/docs/user-guide/space.md +1 -1
- package/apps/runtime/dist/docs/user-guide/steps.md +6 -6
- package/apps/runtime/dist/documents/parse.js +1 -1
- package/apps/runtime/dist/engine/requirements.js +11 -11
- package/apps/runtime/dist/engine/steps.js +4 -4
- package/apps/runtime/dist/env.js +4 -4
- package/apps/runtime/dist/features.js +4 -4
- package/apps/runtime/dist/film/step.js +1 -1
- package/apps/runtime/dist/harness/antigravity.js +3 -3
- package/apps/runtime/dist/harness/apple.js +1 -1
- package/apps/runtime/dist/harness/claude.js +2 -2
- package/apps/runtime/dist/harness/codex.js +3 -3
- package/apps/runtime/dist/harness/cursor.js +5 -1
- package/apps/runtime/dist/manage.js +4 -4
- package/apps/runtime/dist/mcp/auth.js +1 -1
- package/apps/runtime/dist/mcp/tools.js +6 -3
- package/apps/runtime/dist/models.js +139 -15
- package/apps/runtime/dist/plugins/loader.js +1 -1
- package/apps/runtime/dist/routes/lang.js +13 -4
- package/apps/runtime/dist/routes/runs.js +1 -1
- package/apps/runtime/dist/routes/studio.js +81 -41
- package/apps/runtime/dist/services/access.js +3 -3
- package/apps/runtime/dist/services/architect.js +4 -2
- package/apps/runtime/dist/services/assistant-chats.js +11 -2
- package/apps/runtime/dist/services/brand.js +1 -1
- package/apps/runtime/dist/services/knowledge-model.js +1 -1
- package/apps/runtime/dist/services/marketplace.js +3 -1
- package/apps/runtime/dist/services/onboarding.js +268 -48
- package/apps/runtime/dist/services/pages.js +17 -15
- package/apps/runtime/dist/services/project-files.js +1 -1
- package/apps/runtime/dist/services/translations.js +2 -2
- package/apps/runtime/dist/services/wizards.js +4 -4
- package/apps/runtime/dist/sharing/agent.js +1 -1
- package/apps/runtime/dist/texts.js +54 -8
- package/apps/web/dist/assets/{AboutDialog-CZr1JFvY.js → AboutDialog-B_Ixp_Tb.js} +1 -1
- package/apps/web/dist/assets/{ChangelogDialog-0pKHVdhu.js → ChangelogDialog-BpEIbAZ8.js} +1 -1
- package/apps/web/dist/assets/EditorPage-CKHY4hn4.js +4 -0
- package/apps/web/dist/assets/{FlowPreview-BZZvY5U9.js → FlowPreview-APXdRflR.js} +1 -1
- package/apps/web/dist/assets/{Harness-DPRw6BmX.js → Harness-BsGXMlLg.js} +2 -2
- package/apps/web/dist/assets/Marketplace-Dr-Qnb-F.js +2 -0
- package/apps/web/dist/assets/{NewWizardChannels-K5vfNzaC.js → NewWizardChannels-0JrRdUFd.js} +1 -1
- package/apps/web/dist/assets/NewWizardPage-9igFL5O8.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-BcK9FUnU.js +1 -0
- package/apps/web/dist/assets/PreviewPane-X4LBqA0D.js +4 -0
- package/apps/web/dist/assets/ProjectPage-CG0i-KhR.js +1 -0
- package/apps/web/dist/assets/{PublicRunner-_N7DyvWj.js → PublicRunner-CZR1ziQ4.js} +1 -1
- package/apps/web/dist/assets/{ReadOnly-CQ8lWsnZ.js → ReadOnly-BraZbEG_.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-Bw4tdoV7.js +2 -0
- package/apps/web/dist/assets/SetupPage-CvkE2aKx.js +1 -0
- package/apps/web/dist/assets/{SharePage-BXkykFJC.js → SharePage-Dk7zC5Zo.js} +1 -1
- package/apps/web/dist/assets/changelog-DDXnAaHm.js +1 -0
- package/apps/web/dist/assets/{coins-Bo9_D-7S.js → coins-391m1e4_.js} +1 -1
- package/apps/web/dist/assets/index-BTUtot4r.js +14 -0
- package/apps/web/dist/assets/index-DcUL6teA.css +1 -0
- package/apps/web/dist/assets/{phone-BPybLMSm.js → phone-DvgrtyNO.js} +1 -1
- package/apps/web/dist/assets/{runners-53tvGeez.js → runners-4OBelIgF.js} +1 -1
- package/apps/web/dist/assets/{session-DvW7auj-.js → session-DvnGHbDz.js} +1 -1
- package/apps/web/dist/assets/{settings-menu-tSPDYTfT.js → settings-menu-xK9A-gaP.js} +1 -1
- package/apps/web/dist/assets/theme-D3yDT4QT.js +11 -0
- package/apps/web/dist/assets/ui-BVQk2DtW.js +137 -0
- package/apps/web/dist/assets/{upload-Ct_-rz05.js → upload-BgXbzG6C.js} +1 -1
- package/apps/web/dist/assets/{useMutation-DM9Anfo-.js → useMutation-DkwSQWoD.js} +1 -1
- package/apps/web/dist/assets/{volume-2-CHuzf68z.js → volume-2-DHGoe3Cg.js} +1 -1
- package/apps/web/dist/assets/{wrench-BAgonupx.js → wrench-Cf_aE3O0.js} +1 -1
- package/apps/web/dist/index.html +8 -8
- package/apps/web/dist/mcp/flow.html +56 -56
- package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +2 -2
- package/node_modules/@engenty/wizards/dist/plugin/studio.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/assistant.d.ts +6 -0
- package/node_modules/@engenty/wizards-shared/dist/assistant.js +2 -0
- package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +876 -18
- package/node_modules/@engenty/wizards-shared/dist/definition.js +61 -11
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +5 -5
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +5 -5
- package/node_modules/@engenty/wizards-shared/dist/features.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/features.js +1 -1
- package/node_modules/@engenty/wizards-shared/dist/json-schema.js +3 -3
- package/node_modules/@engenty/wizards-shared/dist/projects.d.ts +1 -1
- package/node_modules/@engenty/wizards-shared/dist/projects.js +2 -2
- package/node_modules/@engenty/wizards-shared/dist/providers.d.ts +38 -1
- package/node_modules/@engenty/wizards-shared/dist/providers.js +65 -13
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +2 -2
- package/node_modules/@engenty/wizards-shared/dist/run.js +4 -4
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/web/dist/assets/EditorPage-_qnWDno2.js +0 -4
- package/apps/web/dist/assets/Marketplace-BwbLRU2n.js +0 -2
- package/apps/web/dist/assets/NewWizardPage-zYwDoQTe.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-jFgWaWJV.js +0 -1
- package/apps/web/dist/assets/PreviewPane-D5Kn9Ila.js +0 -4
- package/apps/web/dist/assets/ProjectPage-CyeEBVGi.js +0 -1
- package/apps/web/dist/assets/SettingsPage-haivwaZK.js +0 -2
- package/apps/web/dist/assets/SetupPage-Dy8KeG7z.js +0 -1
- package/apps/web/dist/assets/changelog-XRs8voQT.js +0 -1
- package/apps/web/dist/assets/index-CXA_do-X.js +0 -14
- package/apps/web/dist/assets/index-DG0i3S-z.css +0 -1
- package/apps/web/dist/assets/theme-CWGl7LyL.js +0 -11
- package/apps/web/dist/assets/ui-Bk08zclS.js +0 -137
|
@@ -44,6 +44,15 @@ export function langOf(tag) {
|
|
|
44
44
|
const code = tag?.trim().toLowerCase().split(/[-_]/)[0];
|
|
45
45
|
return isLang(code) ? code : null;
|
|
46
46
|
}
|
|
47
|
+
/** Whether the reader's English is British: the first English one of their languages is en-GB (or en-UK). */
|
|
48
|
+
export function britishEnglish(languages) {
|
|
49
|
+
const english = languages.find((tag) => langOf(tag) === "en");
|
|
50
|
+
return /^en[-_](gb|uk)\b/i.test(english?.trim() ?? "");
|
|
51
|
+
}
|
|
52
|
+
/** English as a British reader spells it: "organisation" where the copy says "organization". */
|
|
53
|
+
export function britishSpelling(text) {
|
|
54
|
+
return text.replace(/([Oo])rganiz/g, "$1rganis");
|
|
55
|
+
}
|
|
47
56
|
/**
|
|
48
57
|
* The main language of each European country. It holds languages engenty does not speak yet:
|
|
49
58
|
* `langOf` passes over them until they join `LANGS`.
|
|
@@ -321,10 +330,11 @@ export function pluginToolOf(id) {
|
|
|
321
330
|
: null;
|
|
322
331
|
}
|
|
323
332
|
/**
|
|
324
|
-
* The
|
|
325
|
-
* outside the wizard (the model-gateway, or the settings of a
|
|
333
|
+
* The model classes a step can ask for (its `model`), cheapest first. A step names a class;
|
|
334
|
+
* which model serves it is bound outside the wizard (the model-gateway, or the settings of a
|
|
335
|
+
* runtime that runs alone).
|
|
326
336
|
*/
|
|
327
|
-
export const TEXT_CLASSES = ["classifier", "
|
|
337
|
+
export const TEXT_CLASSES = ["classifier", "low", "standard", "high"];
|
|
328
338
|
export const MODEL_CLASSES = [...TEXT_CLASSES, "image", "video", "audio", "speech"];
|
|
329
339
|
/** How hard the model should think, where the bound model can be told. */
|
|
330
340
|
export const EFFORTS = ["low", "medium", "high"];
|
|
@@ -558,7 +568,7 @@ export const agentStepSchema = z.object({
|
|
|
558
568
|
surface: z.union([z.boolean(), surfaceComponentsSchema]).optional(),
|
|
559
569
|
})
|
|
560
570
|
.default({ format: "markdown" }),
|
|
561
|
-
/** The
|
|
571
|
+
/** The model class the step needs; default `standard`. The model itself is bound elsewhere. */
|
|
562
572
|
model: z.enum(TEXT_CLASSES).optional(),
|
|
563
573
|
effort: z.enum(EFFORTS).optional(),
|
|
564
574
|
/** Shown to the person while it works. */
|
|
@@ -601,7 +611,7 @@ export const generateStepSchema = z.object({
|
|
|
601
611
|
* `referenceImage` gives each entry its own image when it holds as many.
|
|
602
612
|
*/
|
|
603
613
|
each: z.string().optional(),
|
|
604
|
-
/** For document/dashboard: the
|
|
614
|
+
/** For document/dashboard: the model class that writes it; default `standard`. */
|
|
605
615
|
model: z.enum(TEXT_CLASSES).optional(),
|
|
606
616
|
effort: z.enum(EFFORTS).optional(),
|
|
607
617
|
working: z.string().optional(),
|
|
@@ -676,7 +686,7 @@ export const filmStepSchema = z.object({
|
|
|
676
686
|
from: z.string().optional(),
|
|
677
687
|
/** About how long the film runs, in seconds. */
|
|
678
688
|
seconds: z.number().int().min(3).max(600).optional(),
|
|
679
|
-
/** The
|
|
689
|
+
/** The model class; default `low` — the kit carries the craft. */
|
|
680
690
|
model: z.enum(TEXT_CLASSES).optional(),
|
|
681
691
|
effort: z.enum(EFFORTS).optional(),
|
|
682
692
|
working: z.string().optional(),
|
|
@@ -839,9 +849,46 @@ export const connectionSchema = z.object({
|
|
|
839
849
|
title: z.string().optional(),
|
|
840
850
|
description: z.string().optional(),
|
|
841
851
|
});
|
|
842
|
-
/**
|
|
843
|
-
|
|
844
|
-
|
|
852
|
+
/**
|
|
853
|
+
* The version of the definition this app writes; raised only by a breaking change. It reads the
|
|
854
|
+
* earlier ones too (`upgradeDefinition`). Version 1 named the text classes one step lower: its
|
|
855
|
+
* `standard`, `high` and `highest` are `low`, `standard` and `high` since version 2.
|
|
856
|
+
*/
|
|
857
|
+
export const DEFINITION_VERSION = 2;
|
|
858
|
+
const CLASSES_OF_VERSION_1 = {
|
|
859
|
+
standard: "low",
|
|
860
|
+
high: "standard",
|
|
861
|
+
highest: "high",
|
|
862
|
+
};
|
|
863
|
+
/**
|
|
864
|
+
* A definition of an earlier version, brought to this one; anything else comes back as it is.
|
|
865
|
+
* One without a version is of version 1, unless `unversioned` says which one its writer read:
|
|
866
|
+
* a model that wrote it from today's authoring guide writes today's (`DEFINITION_VERSION`).
|
|
867
|
+
*/
|
|
868
|
+
export function upgradeDefinition(raw, unversioned = 1) {
|
|
869
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
|
|
870
|
+
return raw;
|
|
871
|
+
}
|
|
872
|
+
const def = raw;
|
|
873
|
+
const version = def.version ?? unversioned;
|
|
874
|
+
if (version === DEFINITION_VERSION) {
|
|
875
|
+
return def.version === undefined ? { ...def, version } : def;
|
|
876
|
+
}
|
|
877
|
+
if (version !== 1) {
|
|
878
|
+
return raw;
|
|
879
|
+
}
|
|
880
|
+
const steps = Array.isArray(def.steps)
|
|
881
|
+
? def.steps.map((step) => {
|
|
882
|
+
const model = step?.model;
|
|
883
|
+
return typeof model === "string" && CLASSES_OF_VERSION_1[model]
|
|
884
|
+
? { ...step, model: CLASSES_OF_VERSION_1[model] }
|
|
885
|
+
: step;
|
|
886
|
+
})
|
|
887
|
+
: def.steps;
|
|
888
|
+
return { ...def, version: DEFINITION_VERSION, steps };
|
|
889
|
+
}
|
|
890
|
+
/** A definition of this version, as it is written: what the JSON Schema describes. */
|
|
891
|
+
export const currentWizardSchema = z.object({
|
|
845
892
|
version: z.literal(DEFINITION_VERSION).default(DEFINITION_VERSION),
|
|
846
893
|
title: z.string().min(1),
|
|
847
894
|
description: z.string().default(""),
|
|
@@ -873,6 +920,8 @@ export const wizardSchema = z.object({
|
|
|
873
920
|
themes: z.array(z.string().regex(THEME_ID)).max(8).optional(),
|
|
874
921
|
steps: z.array(stepSchema).min(1),
|
|
875
922
|
});
|
|
923
|
+
/** A definition of any version this app reads, brought to this one. */
|
|
924
|
+
export const wizardSchema = z.preprocess((raw) => upgradeDefinition(raw), currentWizardSchema);
|
|
876
925
|
export const INTERACTIVE = new Set(["page", "review", "result"]);
|
|
877
926
|
/** Which formats each producing step can be downloaded in. */
|
|
878
927
|
export function formatsFor(step) {
|
|
@@ -1973,6 +2022,7 @@ function keepsAll(given, read) {
|
|
|
1973
2022
|
}
|
|
1974
2023
|
/** True when this app's schema reads the definition without losing anything of it. */
|
|
1975
2024
|
export function readable(definition) {
|
|
1976
|
-
const
|
|
1977
|
-
|
|
2025
|
+
const upgraded = upgradeDefinition(definition);
|
|
2026
|
+
const parsed = currentWizardSchema.safeParse(upgraded);
|
|
2027
|
+
return parsed.success && keepsAll(upgraded, parsed.data);
|
|
1978
2028
|
}
|
|
@@ -18,7 +18,7 @@ export interface FeatureDeclaration {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* One entry per flag. `kind: "release"`: on or off for everyone by default, turned on for a
|
|
21
|
-
*
|
|
21
|
+
* organization or a machine before the default flips. `kind: "plan"`: on until a plan says `false`.
|
|
22
22
|
*/
|
|
23
23
|
export declare const FEATURES: {
|
|
24
24
|
readonly account: {
|
|
@@ -42,8 +42,8 @@ export declare const FEATURES: {
|
|
|
42
42
|
readonly teamPlans: {
|
|
43
43
|
readonly kind: "release";
|
|
44
44
|
readonly default: false;
|
|
45
|
-
readonly label: "
|
|
46
|
-
readonly hint: "The
|
|
45
|
+
readonly label: "Organization plans";
|
|
46
|
+
readonly hint: "The organization page in the cloud studio, and plans that carry this switch on the account pages.";
|
|
47
47
|
};
|
|
48
48
|
readonly brandSections: {
|
|
49
49
|
readonly kind: "release";
|
|
@@ -79,7 +79,7 @@ export declare const FEATURES: {
|
|
|
79
79
|
readonly kind: "release";
|
|
80
80
|
readonly default: false;
|
|
81
81
|
readonly label: "Public page";
|
|
82
|
-
readonly hint: "A space's page at the
|
|
82
|
+
readonly hint: "A space's page at the organization's address on wizards.page: its part in the space, the share dialog's switch.";
|
|
83
83
|
};
|
|
84
84
|
readonly wordpress: {
|
|
85
85
|
readonly kind: "release";
|
|
@@ -97,6 +97,6 @@ export declare const FEATURES: {
|
|
|
97
97
|
readonly kind: "plan";
|
|
98
98
|
readonly default: true;
|
|
99
99
|
readonly label: "Own API keys";
|
|
100
|
-
readonly hint: "The
|
|
100
|
+
readonly hint: "The organization puts its providers' keys into the cloud studio instead of running on credits.";
|
|
101
101
|
};
|
|
102
102
|
};
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
12
12
|
* One entry per flag. `kind: "release"`: on or off for everyone by default, turned on for a
|
|
13
|
-
*
|
|
13
|
+
* organization or a machine before the default flips. `kind: "plan"`: on until a plan says `false`.
|
|
14
14
|
*/
|
|
15
15
|
export const FEATURES = {
|
|
16
16
|
account: {
|
|
@@ -34,8 +34,8 @@ export const FEATURES = {
|
|
|
34
34
|
teamPlans: {
|
|
35
35
|
kind: "release",
|
|
36
36
|
default: false,
|
|
37
|
-
label: "
|
|
38
|
-
hint: "The
|
|
37
|
+
label: "Organization plans",
|
|
38
|
+
hint: "The organization page in the cloud studio, and plans that carry this switch on the account pages.",
|
|
39
39
|
},
|
|
40
40
|
brandSections: {
|
|
41
41
|
kind: "release",
|
|
@@ -71,7 +71,7 @@ export const FEATURES = {
|
|
|
71
71
|
kind: "release",
|
|
72
72
|
default: false,
|
|
73
73
|
label: "Public page",
|
|
74
|
-
hint: "A space's page at the
|
|
74
|
+
hint: "A space's page at the organization's address on wizards.page: its part in the space, the share dialog's switch.",
|
|
75
75
|
},
|
|
76
76
|
wordpress: {
|
|
77
77
|
kind: "release",
|
|
@@ -89,6 +89,6 @@ export const FEATURES = {
|
|
|
89
89
|
kind: "plan",
|
|
90
90
|
default: true,
|
|
91
91
|
label: "Own API keys",
|
|
92
|
-
hint: "The
|
|
92
|
+
hint: "The organization puts its providers' keys into the cloud studio instead of running on credits.",
|
|
93
93
|
},
|
|
94
94
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FEATURES, type FeatureDeclaration } from "./feature-flags.js";
|
|
2
2
|
/**
|
|
3
3
|
* Feature switches: how a flag of feature-flags.ts (or a plugin's manifest) gets its value.
|
|
4
|
-
* The runtime resolves them from the defaults, what the Manage-App says for the
|
|
4
|
+
* The runtime resolves them from the defaults, what the Manage-App says for the organization or the
|
|
5
5
|
* linked account, and this install's `.features` file; the studio and plugins read the result.
|
|
6
6
|
*/
|
|
7
7
|
export { FEATURES, type FeatureDeclaration };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FEATURES } from "./feature-flags.js";
|
|
2
2
|
/**
|
|
3
3
|
* Feature switches: how a flag of feature-flags.ts (or a plugin's manifest) gets its value.
|
|
4
|
-
* The runtime resolves them from the defaults, what the Manage-App says for the
|
|
4
|
+
* The runtime resolves them from the defaults, what the Manage-App says for the organization or the
|
|
5
5
|
* linked account, and this install's `.features` file; the studio and plugins read the result.
|
|
6
6
|
*/
|
|
7
7
|
export { FEATURES };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { currentWizardSchema, DEFINITION_VERSION } from "./definition.js";
|
|
3
3
|
import { themeSchema } from "./theme.js";
|
|
4
4
|
import { manifestSchema, PACKAGE_SCHEMA_URL, THEME_SCHEMA_URL, WIZARD_SCHEMA_URL, } from "./wizard-package.js";
|
|
5
5
|
const DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
@@ -44,7 +44,7 @@ export function wizardJsonSchema() {
|
|
|
44
44
|
$comment: LICENSE_COMMENT,
|
|
45
45
|
title: "engenty.wizards wizard definition",
|
|
46
46
|
description: `A wizard's definition, version ${DEFINITION_VERSION}. Checked by \`wizards validate\`, which also checks what this schema cannot say: ids, references between steps and templates.`,
|
|
47
|
-
...withSchemaProperty(generate(
|
|
47
|
+
...withSchemaProperty(generate(currentWizardSchema)),
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
/** `wizard.json` in a `.wizard` package: the definition with what it needs from its project. */
|
|
@@ -62,7 +62,7 @@ export function packageJsonSchema() {
|
|
|
62
62
|
...properties,
|
|
63
63
|
definition: { $ref: "#/$defs/definition" },
|
|
64
64
|
},
|
|
65
|
-
$defs: { definition: withSchemaProperty(generate(
|
|
65
|
+
$defs: { definition: withSchemaProperty(generate(currentWizardSchema)) },
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
/** A theme: how a wizard's pages look, values only (docs/plans/themes.md). Versioned apart from the wizard's. */
|
|
@@ -23,7 +23,7 @@ export type PageLang = (typeof PAGE_LANGS)[number];
|
|
|
23
23
|
export type PageForm = "du" | "sie";
|
|
24
24
|
export interface ProjectPage {
|
|
25
25
|
on: boolean;
|
|
26
|
-
/** Its address under the
|
|
26
|
+
/** Its address under the organization's: `<organization>.wizards.page/<slug>`. */
|
|
27
27
|
slug: string;
|
|
28
28
|
/** The name on the page; the space's own name never shows. */
|
|
29
29
|
title: string;
|
|
@@ -80,9 +80,9 @@ export const BASIC_FACTS = [
|
|
|
80
80
|
"iban",
|
|
81
81
|
];
|
|
82
82
|
// --- the public page -----------------------------------------------------------------
|
|
83
|
-
// A space's page at `<
|
|
83
|
+
// A space's page at `<organization>.wizards.page/<slug>` (docs/plans/wizards-page-launch.md in the
|
|
84
84
|
// Manage repository): what the space says there and which of its wizards it lists. One space per
|
|
85
|
-
//
|
|
85
|
+
// organization has it on. Nothing of it sits on a wizard; the teasers come from the published definitions.
|
|
86
86
|
export const PAGE_LANGS = ["de", "en"];
|
|
87
87
|
export const PAGE_LIMITS = { slug: 48, title: 80, headline: 160, intro: 600 };
|
|
88
88
|
/** A page's address: lower-case letters a–z, digits and hyphens, not at the start or end. */
|
|
@@ -9,7 +9,44 @@ export type ModelCapability = (typeof MODEL_CAPABILITIES)[number];
|
|
|
9
9
|
export declare const CAPABILITY_CLASSES: Record<ModelCapability, readonly ModelClass[]>;
|
|
10
10
|
export declare function capabilityOf(cls: ModelClass): ModelCapability;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* What a model can do, as the AI Gateway's catalog says it (its tags and context window):
|
|
13
|
+
* calls tools, answers in a JSON shape, reads images, reasons before it answers.
|
|
14
|
+
*/
|
|
15
|
+
export interface ModelTraits {
|
|
16
|
+
tools: boolean;
|
|
17
|
+
json: boolean;
|
|
18
|
+
vision: boolean;
|
|
19
|
+
reasoning: boolean;
|
|
20
|
+
/** Tokens it reads at most; null where the catalog does not say. */
|
|
21
|
+
context: number | null;
|
|
22
|
+
}
|
|
23
|
+
/** The text classes by name, the same in every language. */
|
|
24
|
+
export declare const CLASS_NAMES: Record<TextClass, string>;
|
|
25
|
+
/** A minimum a text class asks of its model. */
|
|
26
|
+
export declare const MODEL_NEEDS: readonly ["tools", "json", "vision", "reasoning", "context"];
|
|
27
|
+
export type ModelNeed = (typeof MODEL_NEEDS)[number];
|
|
28
|
+
export interface ClassNeeds {
|
|
29
|
+
needs: Exclude<ModelNeed, "context">[];
|
|
30
|
+
/** Tokens the model must read at least. */
|
|
31
|
+
context: number;
|
|
32
|
+
/** Without these the class cannot work at all: a binding to a model that lacks one is refused. */
|
|
33
|
+
blocks: ModelNeed[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* What a model must be able to do to serve a text class. Classifier: decisions and values pulled
|
|
37
|
+
* out of text, in JSON. Low: short copy, API calls, a look at a picture or a PDF. Standard: AI
|
|
38
|
+
* steps with tools and pictures, and Goose. High: the build chat, which writes code and looks at
|
|
39
|
+
* screenshots. Goose and the build chat cannot work without tools.
|
|
40
|
+
*/
|
|
41
|
+
export declare const CLASS_NEEDS: Record<TextClass, ClassNeeds>;
|
|
42
|
+
/** A model's traits from an AI Gateway catalog entry: its tags and context window. */
|
|
43
|
+
export declare function traitsOf(tags: readonly string[], context: number | null | undefined): ModelTraits;
|
|
44
|
+
/** What of a class's minimums a model lacks; empty where it has them all. */
|
|
45
|
+
export declare function missingNeeds(cls: TextClass, traits: ModelTraits): ModelNeed[];
|
|
46
|
+
/** Of what a model lacks, what keeps its class from working at all. */
|
|
47
|
+
export declare function blockingNeeds(cls: TextClass, missing: readonly ModelNeed[]): ModelNeed[];
|
|
48
|
+
/**
|
|
49
|
+
* A binding that sends a class to the credits of the account (or of the organization in the cloud),
|
|
13
50
|
* whatever keys are there; engenty picks the model. `credits:<model>` names the model, as the
|
|
14
51
|
* gateway lists it (`fal:fal-ai/flux/schnell`, `elevenlabs:eleven_multilingual_v2`,
|
|
15
52
|
* `google/veo-3.1-fast-generate-001`).
|
|
@@ -5,7 +5,7 @@ import { textOf } from "./texts.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export const MODEL_CAPABILITIES = ["text", "image", "video", "speech", "listening"];
|
|
7
7
|
export const CAPABILITY_CLASSES = {
|
|
8
|
-
text: ["classifier", "
|
|
8
|
+
text: ["classifier", "low", "standard", "high"],
|
|
9
9
|
image: ["image"],
|
|
10
10
|
video: ["video"],
|
|
11
11
|
speech: ["speech"],
|
|
@@ -14,8 +14,52 @@ export const CAPABILITY_CLASSES = {
|
|
|
14
14
|
export function capabilityOf(cls) {
|
|
15
15
|
return Object.keys(CAPABILITY_CLASSES).find((c) => CAPABILITY_CLASSES[c].includes(cls));
|
|
16
16
|
}
|
|
17
|
+
/** The text classes by name, the same in every language. */
|
|
18
|
+
export const CLASS_NAMES = {
|
|
19
|
+
classifier: "Classifier",
|
|
20
|
+
low: "Low",
|
|
21
|
+
standard: "Standard",
|
|
22
|
+
high: "High",
|
|
23
|
+
};
|
|
24
|
+
/** A minimum a text class asks of its model. */
|
|
25
|
+
export const MODEL_NEEDS = ["tools", "json", "vision", "reasoning", "context"];
|
|
17
26
|
/**
|
|
18
|
-
*
|
|
27
|
+
* What a model must be able to do to serve a text class. Classifier: decisions and values pulled
|
|
28
|
+
* out of text, in JSON. Low: short copy, API calls, a look at a picture or a PDF. Standard: AI
|
|
29
|
+
* steps with tools and pictures, and Goose. High: the build chat, which writes code and looks at
|
|
30
|
+
* screenshots. Goose and the build chat cannot work without tools.
|
|
31
|
+
*/
|
|
32
|
+
export const CLASS_NEEDS = {
|
|
33
|
+
classifier: { needs: ["json"], context: 32_000, blocks: [] },
|
|
34
|
+
low: { needs: ["tools", "json", "vision"], context: 64_000, blocks: [] },
|
|
35
|
+
standard: { needs: ["tools", "json", "vision"], context: 128_000, blocks: ["tools"] },
|
|
36
|
+
high: { needs: ["tools", "json", "vision", "reasoning"], context: 200_000, blocks: ["tools"] },
|
|
37
|
+
};
|
|
38
|
+
/** A model's traits from an AI Gateway catalog entry: its tags and context window. */
|
|
39
|
+
export function traitsOf(tags, context) {
|
|
40
|
+
return {
|
|
41
|
+
tools: tags.includes("tool-use"),
|
|
42
|
+
json: tags.includes("structured-output"),
|
|
43
|
+
vision: tags.includes("vision"),
|
|
44
|
+
reasoning: tags.includes("reasoning"),
|
|
45
|
+
context: typeof context === "number" && context > 0 ? context : null,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/** What of a class's minimums a model lacks; empty where it has them all. */
|
|
49
|
+
export function missingNeeds(cls, traits) {
|
|
50
|
+
const want = CLASS_NEEDS[cls];
|
|
51
|
+
const missing = want.needs.filter((need) => !traits[need]);
|
|
52
|
+
if (traits.context !== null && traits.context < want.context) {
|
|
53
|
+
missing.push("context");
|
|
54
|
+
}
|
|
55
|
+
return missing;
|
|
56
|
+
}
|
|
57
|
+
/** Of what a model lacks, what keeps its class from working at all. */
|
|
58
|
+
export function blockingNeeds(cls, missing) {
|
|
59
|
+
return missing.filter((need) => CLASS_NEEDS[cls].blocks.includes(need));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A binding that sends a class to the credits of the account (or of the organization in the cloud),
|
|
19
63
|
* whatever keys are there; engenty picks the model. `credits:<model>` names the model, as the
|
|
20
64
|
* gateway lists it (`fal:fal-ai/flux/schnell`, `elevenlabs:eleven_multilingual_v2`,
|
|
21
65
|
* `google/veo-3.1-fast-generate-001`).
|
|
@@ -107,9 +151,9 @@ export const PROVIDERS = [
|
|
|
107
151
|
keyPlaceholder: "sk-…",
|
|
108
152
|
text: {
|
|
109
153
|
classifier: "openai:gpt-5.4-mini",
|
|
110
|
-
|
|
154
|
+
low: "openai:gpt-5.4-mini",
|
|
155
|
+
standard: "openai:gpt-5.5",
|
|
111
156
|
high: "openai:gpt-5.5",
|
|
112
|
-
highest: "openai:gpt-5.5",
|
|
113
157
|
},
|
|
114
158
|
models: {
|
|
115
159
|
text: [
|
|
@@ -149,9 +193,9 @@ export const PROVIDERS = [
|
|
|
149
193
|
keyPlaceholder: "sk-ant-…",
|
|
150
194
|
text: {
|
|
151
195
|
classifier: "anthropic:claude-haiku-4-5",
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
196
|
+
low: "anthropic:claude-haiku-4-5",
|
|
197
|
+
standard: "anthropic:claude-sonnet-5-5",
|
|
198
|
+
high: "anthropic:claude-opus-5-5",
|
|
155
199
|
},
|
|
156
200
|
models: {
|
|
157
201
|
text: [
|
|
@@ -177,9 +221,9 @@ export const PROVIDERS = [
|
|
|
177
221
|
keyPlaceholder: "AIza…",
|
|
178
222
|
text: {
|
|
179
223
|
classifier: "google:gemini-flash-lite-latest",
|
|
180
|
-
|
|
224
|
+
low: "google:gemini-flash-latest",
|
|
225
|
+
standard: "google:gemini-pro-latest",
|
|
181
226
|
high: "google:gemini-pro-latest",
|
|
182
|
-
highest: "google:gemini-pro-latest",
|
|
183
227
|
},
|
|
184
228
|
models: {
|
|
185
229
|
text: [
|
|
@@ -329,14 +373,22 @@ export const PROVIDERS = [
|
|
|
329
373
|
about: "about.gateway",
|
|
330
374
|
keyUrl: "https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai-gateway%2Fapi-keys",
|
|
331
375
|
keyPlaceholder: "vck_…",
|
|
376
|
+
// Economical models that meet each class's minimums (CLASS_NEEDS).
|
|
332
377
|
text: {
|
|
333
|
-
classifier: "
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
378
|
+
classifier: "deepseek/deepseek-v4.1-flash",
|
|
379
|
+
low: "deepseek/deepseek-v4.1-flash",
|
|
380
|
+
standard: "deepseek/deepseek-v4.1-flash",
|
|
381
|
+
high: "moonshotai/kimi-k3",
|
|
337
382
|
},
|
|
338
383
|
models: {
|
|
339
384
|
text: [
|
|
385
|
+
{
|
|
386
|
+
ref: "deepseek/deepseek-v4.1-flash",
|
|
387
|
+
label: "DeepSeek V4.1 Flash",
|
|
388
|
+
note: "fastLowCost",
|
|
389
|
+
},
|
|
390
|
+
{ ref: "moonshotai/kimi-k3", label: "Kimi K3" },
|
|
391
|
+
{ ref: "zai/glm-5.3", label: "GLM 5.3" },
|
|
340
392
|
{
|
|
341
393
|
ref: "anthropic/claude-haiku-4.5",
|
|
342
394
|
label: "Claude Haiku 4.5",
|
|
@@ -358,7 +358,7 @@ declare const NOTES_EN: {
|
|
|
358
358
|
};
|
|
359
359
|
readonly twoEntriesSameKey: "Two entries have the same key.";
|
|
360
360
|
readonly pageSlugInvalid: "A page address holds lower-case letters a–z, digits and hyphens.";
|
|
361
|
-
readonly pageSlugTaken: "Another space of your
|
|
361
|
+
readonly pageSlugTaken: "Another space of your organization has this address.";
|
|
362
362
|
readonly pageTaken: "The page is already at “{space}”.";
|
|
363
363
|
readonly notDeleteLastSpace: "You can’t delete the last space.";
|
|
364
364
|
readonly notFound: "This doesn’t exist or was deleted.";
|
|
@@ -410,7 +410,7 @@ declare const NOTES_EN: {
|
|
|
410
410
|
readonly pageNeedsTitle: "A page needs a title.";
|
|
411
411
|
readonly unknownSpace: "There’s no space “{space}”.";
|
|
412
412
|
readonly noParentPage: "There’s no page with the key “{parent}” to put this page under.";
|
|
413
|
-
readonly
|
|
413
|
+
readonly onlyOrganizationAdmins: "Only organization admins can do that. As a member, you can edit the wizards that already exist.";
|
|
414
414
|
readonly spaceEditedLocally: "You edit this space in engenty wizards on your computer, not here.";
|
|
415
415
|
readonly wizardsRunOncePublished: "Wizards run here once you publish them in engenty wizards on your computer. You build and edit them there.";
|
|
416
416
|
readonly logoImagePngSvg: "A logo is an image (PNG, SVG, JPEG, WebP).";
|
|
@@ -187,7 +187,7 @@ const NOTES_EN = {
|
|
|
187
187
|
},
|
|
188
188
|
twoEntriesSameKey: "Two entries have the same key.",
|
|
189
189
|
pageSlugInvalid: "A page address holds lower-case letters a–z, digits and hyphens.",
|
|
190
|
-
pageSlugTaken: "Another space of your
|
|
190
|
+
pageSlugTaken: "Another space of your organization has this address.",
|
|
191
191
|
pageTaken: "The page is already at “{space}”.",
|
|
192
192
|
notDeleteLastSpace: "You can’t delete the last space.",
|
|
193
193
|
notFound: "This doesn’t exist or was deleted.",
|
|
@@ -239,7 +239,7 @@ const NOTES_EN = {
|
|
|
239
239
|
pageNeedsTitle: "A page needs a title.",
|
|
240
240
|
unknownSpace: "There’s no space “{space}”.",
|
|
241
241
|
noParentPage: "There’s no page with the key “{parent}” to put this page under.",
|
|
242
|
-
|
|
242
|
+
onlyOrganizationAdmins: "Only organization admins can do that. As a member, you can edit the wizards that already exist.",
|
|
243
243
|
spaceEditedLocally: "You edit this space in engenty wizards on your computer, not here.",
|
|
244
244
|
wizardsRunOncePublished: "Wizards run here once you publish them in engenty wizards on your computer. You build and edit them there.",
|
|
245
245
|
logoImagePngSvg: "A logo is an image (PNG, SVG, JPEG, WebP).",
|
|
@@ -490,7 +490,7 @@ const NOTES_DE = {
|
|
|
490
490
|
},
|
|
491
491
|
twoEntriesSameKey: "Zwei Einträge haben denselben Schlüssel.",
|
|
492
492
|
pageSlugInvalid: "Eine Seitenadresse besteht aus Kleinbuchstaben a–z, Ziffern und Bindestrichen.",
|
|
493
|
-
pageSlugTaken: "Ein anderer Space
|
|
493
|
+
pageSlugTaken: "Ein anderer Space deiner Organisation hat diese Adresse.",
|
|
494
494
|
pageTaken: "Die Seite ist schon bei „{space}“.",
|
|
495
495
|
notDeleteLastSpace: "Der letzte Space lässt sich nicht löschen.",
|
|
496
496
|
notFound: "Das gibt es nicht oder nicht mehr.",
|
|
@@ -542,7 +542,7 @@ const NOTES_DE = {
|
|
|
542
542
|
pageNeedsTitle: "Eine Seite braucht einen Titel.",
|
|
543
543
|
unknownSpace: "Den Space „{space}“ gibt es nicht.",
|
|
544
544
|
noParentPage: "Es gibt keine Seite mit dem Schlüssel „{parent}“, unter die diese Seite könnte.",
|
|
545
|
-
|
|
545
|
+
onlyOrganizationAdmins: "Das dürfen nur Admins der Organisation. Als Mitglied bearbeitest du die Wizards, die es schon gibt.",
|
|
546
546
|
spaceEditedLocally: "Diesen Space bearbeitest du in engenty wizards auf deinem Computer, nicht hier.",
|
|
547
547
|
wizardsRunOncePublished: "Hier laufen die Wizards, die du in engenty wizards auf deinem Computer veröffentlichst. Gebaut und bearbeitet wird dort.",
|
|
548
548
|
logoImagePngSvg: "Ein Logo ist ein Bild (PNG, SVG, JPEG, WebP).",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@engenty/wizards-runtime",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"description": "Make a wish. Get your wizard. It guides you step by step. Let AI do the work. Runs on your machine, on the AI subscription you already have. The runtime, which `npx wizards` installs.",
|
|
5
5
|
"license": "FSL-1.1-MIT AND CC-BY-4.0",
|
|
6
6
|
"homepage": "https://engenty.ai",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wizards",
|
|
3
3
|
"displayName": "engenty wizards",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.8",
|
|
5
5
|
"description": "Build page-by-page AI wizards that people open on a shared link — designed, tested and published from Claude Code — run your published ones in the chat, and keep them in a pane beside it.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "engenty"
|
package/plugin/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "engenty-wizards",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.8",
|
|
5
5
|
"description": "Build page-by-page AI wizards that people open on a shared link, test and publish them from the chat, and run your published ones here.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "engenty",
|