wizards 0.7.2 → 0.7.4
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/README.md +7 -6
- package/apps/runtime/dist/assistant/primer.js +1 -1
- package/apps/runtime/dist/auth/device.js +13 -2
- package/apps/runtime/dist/cli/account.js +114 -21
- package/apps/runtime/dist/cli/connect.js +12 -7
- package/apps/runtime/dist/cli/machine.js +6 -5
- package/apps/runtime/dist/cli/main.js +1 -1
- package/apps/runtime/dist/cli/menu.js +1 -1
- package/apps/runtime/dist/cli/setup.js +6 -0
- package/apps/runtime/dist/cli/ui.js +26 -0
- package/apps/runtime/dist/docs/dev/plugins/examples.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/index.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/layout.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/quick-start.md +2 -2
- package/apps/runtime/dist/docs/dev/plugins/reference.md +4 -4
- package/apps/runtime/dist/docs/dev/plugins/runners.md +1 -1
- package/apps/runtime/dist/docs/dev/plugins/server.md +2 -2
- package/apps/runtime/dist/docs/dev/plugins/studio.md +2 -2
- package/apps/runtime/dist/docs/user/ai-apps.md +1 -1
- package/apps/runtime/dist/docs/user/command-line.md +1 -1
- package/apps/runtime/dist/docs/user/create-account.md +1 -1
- package/apps/runtime/dist/docs/user/first-start.md +7 -2
- package/apps/runtime/dist/docs/user/index.md +1 -1
- package/apps/runtime/dist/docs/user/install.md +2 -2
- package/apps/runtime/dist/docs/user/models.md +1 -1
- package/apps/runtime/dist/harness/antigravity.js +129 -0
- package/apps/runtime/dist/harness/apple.js +1 -0
- package/apps/runtime/dist/harness/index.js +2 -2
- package/apps/runtime/dist/harness/model.js +13 -5
- package/apps/runtime/dist/harness/types.js +2 -2
- package/apps/runtime/dist/mcp/seen.js +1 -1
- package/apps/runtime/dist/models.js +60 -2
- package/apps/runtime/dist/plugins/loader.js +10 -3
- package/apps/runtime/dist/routes/studio.js +34 -5
- package/apps/runtime/dist/texts.js +4 -0
- package/apps/web/dist/assets/AboutDialog-BI6487_s.js +1 -0
- package/apps/web/dist/assets/{ChangelogDialog-BqwKOr3c.js → ChangelogDialog-B63QWuUV.js} +1 -1
- package/apps/web/dist/assets/ChatView-BjQVHGjn.js +10 -0
- package/apps/web/dist/assets/EditorPage-DrprS19h.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-CpA_aX8t.js → FlowPreview-CusP7ci9.js} +1 -1
- package/apps/web/dist/assets/{Harness-BdBBdTrI.js → Harness-CCMqhtuk.js} +2 -2
- package/apps/web/dist/assets/{NewWizardChannels-B48OYt7I.js → NewWizardChannels-DpcWsST7.js} +1 -1
- package/apps/web/dist/assets/NewWizardPage-BXePNBa9.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-BtZ6sHJi.js +1 -0
- package/apps/web/dist/assets/ProjectPage-DHOL8FXt.js +1 -0
- package/apps/web/dist/assets/PublicRunner-BLRVe7G0.js +1 -0
- package/apps/web/dist/assets/{ReadOnly-CaxuDkrN.js → ReadOnly-BV8o_HtK.js} +1 -1
- package/apps/web/dist/assets/RunDrawer-D-T8pYfB.js +4 -0
- package/apps/web/dist/assets/{RunnerView-UGOmm2-Z.js → RunnerView-BinlRsGF.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-B6M-jFJw.js +1 -0
- package/apps/web/dist/assets/SetupPage-DI6c--4V.js +1 -0
- package/apps/web/dist/assets/{SharePage-BTiFkz8h.js → SharePage-C4cESaes.js} +1 -1
- package/apps/web/dist/assets/changelog-Dj_yd2vG.js +1 -0
- package/apps/web/dist/assets/{esm-CY-A_13f.js → esm-DXeMu8Lb.js} +1 -1
- package/apps/web/dist/assets/{index-B_aM-qZk.css → index-AfUa8xKD.css} +1 -1
- package/apps/web/dist/assets/index-yiE9Lun0.js +14 -0
- package/apps/web/dist/assets/{lock--JFmtLDU.js → lock-R_CfU0Xo.js} +1 -1
- package/apps/web/dist/assets/oss-credits-cZ9NUaLZ.js +1 -0
- package/apps/web/dist/assets/{phone-DMtADQ4-.js → phone-CgrIS4_-.js} +1 -1
- package/apps/web/dist/assets/settings-menu-2IMOOlLl.js +1 -0
- package/apps/web/dist/assets/ui-dzGvc3xk.js +137 -0
- package/apps/web/dist/assets/{upload-Bcpc3mDn.js → upload-BSuTilFF.js} +1 -1
- package/apps/web/dist/index.html +3 -3
- package/apps/web/dist/mcp/flow.html +2 -2
- package/node_modules/@engenty/wizards/package.json +11 -0
- package/node_modules/@engenty-wizards/shared/dist/run.d.ts +1 -0
- package/node_modules/@engenty-wizards/shared/dist/run.js +2 -0
- package/package.json +3 -3
- package/apps/runtime/dist/harness/gemini.js +0 -126
- package/apps/web/dist/assets/AboutDialog-BQ4jGHij.js +0 -1
- package/apps/web/dist/assets/ChatView-Q-Mk0N17.js +0 -10
- package/apps/web/dist/assets/EditorPage-_ZrAipdL.js +0 -3
- package/apps/web/dist/assets/NewWizardPage-Djq-7i5b.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-BLkXK6mf.js +0 -1
- package/apps/web/dist/assets/ProjectPage-Tp7oavbh.js +0 -1
- package/apps/web/dist/assets/PublicRunner-nh8U3BWB.js +0 -1
- package/apps/web/dist/assets/RunDrawer-DhlEkTSh.js +0 -4
- package/apps/web/dist/assets/SettingsPage-BkYXyrdN.js +0 -1
- package/apps/web/dist/assets/SetupPage-Bw6Hen_A.js +0 -1
- package/apps/web/dist/assets/changelog-B3yrut-H.js +0 -1
- package/apps/web/dist/assets/index-FEmK7XOw.js +0 -14
- package/apps/web/dist/assets/oss-credits-BJrR7BR1.js +0 -1
- package/apps/web/dist/assets/settings-menu-Dac4JUiM.js +0 -1
- package/apps/web/dist/assets/ui-CTXSFCzc.js +0 -137
- package/node_modules/@engenty-wizards/plugin-sdk/package.json +0 -11
- /package/node_modules/{@engenty-wizards/plugin-sdk/dist → @engenty/wizards/dist/plugin}/index.d.ts +0 -0
- /package/node_modules/{@engenty-wizards/plugin-sdk/dist → @engenty/wizards/dist/plugin}/index.js +0 -0
- /package/node_modules/{@engenty-wizards/plugin-sdk/dist → @engenty/wizards/dist/plugin}/studio.d.ts +0 -0
- /package/node_modules/{@engenty-wizards/plugin-sdk/dist → @engenty/wizards/dist/plugin}/studio.js +0 -0
- /package/node_modules/{@engenty-wizards/plugin-sdk/dist → @engenty/wizards/dist/plugin}/thread.d.ts +0 -0
- /package/node_modules/{@engenty-wizards/plugin-sdk/dist → @engenty/wizards/dist/plugin}/thread.js +0 -0
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
- **Share it with a link.** Anyone can run a wizard in the browser, on a phone too: camera,
|
|
22
22
|
code scan, voice notes, location and a drawn signature included. Results download as PDF,
|
|
23
23
|
Word, HTML, Markdown, PNG, MP4, MP3, CSV, Excel or JSON, or go out as a link.
|
|
24
|
-
- **Runs on your machine, on your subscription.** It uses Codex, Claude Code,
|
|
24
|
+
- **Runs on your machine, on your subscription.** It uses Codex, Claude Code, Antigravity
|
|
25
25
|
or Cursor Agent when one is installed and signed in, so no API key is needed. Or bring a key
|
|
26
26
|
(Vercel AI Gateway, OpenAI, Anthropic), or a local model through Ollama. Your wizards and
|
|
27
27
|
results stay in a folder on your machine.
|
|
@@ -49,7 +49,7 @@ first wizard in the browser. Links run day and night on the team’s credits.
|
|
|
49
49
|
|
|
50
50
|
## Install it on your computer
|
|
51
51
|
|
|
52
|
-
The same account on your own machine: it runs on your Claude, ChatGPT,
|
|
52
|
+
The same account on your own machine: it runs on your Claude, ChatGPT, Google AI or Cursor
|
|
53
53
|
subscription, reads your local files and browses for you, and what you publish keeps running in
|
|
54
54
|
the cloud behind the same links. On macOS or Linux, in a terminal:
|
|
55
55
|
|
|
@@ -63,12 +63,13 @@ It needs nothing but `curl` and `tar` and asks for no password. It brings its ow
|
|
|
63
63
|
Node you already have is left alone), installs engenty wizards into `~/.engenty/wizards` and
|
|
64
64
|
then walks you through the rest:
|
|
65
65
|
|
|
66
|
-
- **Your engenty account.** “Sign in now?”: a
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
- **Your engenty account.** “Sign in or create your account now?”: a link and a code, and
|
|
67
|
+
the browser for the sign-in, which also creates a new account (with your invitation code); what
|
|
68
|
+
you publish on this computer then runs in the cloud too. Esc while it waits, or say no, and
|
|
69
|
+
`wizards account sign-in` does it any time.
|
|
69
70
|
`--local` leaves the account out: nothing leaves the computer, links answer on it only
|
|
70
71
|
([local only](https://engenty.ai/docs/user/local-only)).
|
|
71
|
-
- **An AI client.** It looks for Codex, Claude Code,
|
|
72
|
+
- **An AI client.** It looks for Codex, Claude Code, Antigravity and Cursor Agent and
|
|
72
73
|
offers to install the missing ones – first the one whose app (Claude, ChatGPT, Cursor) is
|
|
73
74
|
on your Mac, as its subscription is most likely yours already. The first page of the studio
|
|
74
75
|
installs them too. Or use your account’s credits, an API key, [Ollama](https://ollama.com) or,
|
|
@@ -13,7 +13,7 @@ Words
|
|
|
13
13
|
- Space: what all wizards of a team know. Its page has four parts: Info & brand (title, about, logos, colours, assets, facts), Knowledge (pages, tables and files the AI steps look things up in, kept apart by typed categories), Data (tables and pages the wizards keep) and Results (finished runs).
|
|
14
14
|
- Model class: the kind of model a step needs (Classifier, Standard, High, Highest for text; Image, Video, Speech, Audio). Which model serves a class is a setting (Settings › Models), not part of the wizard.
|
|
15
15
|
|
|
16
|
-
Thinking: an installed AI client on the person's subscription (Claude Code, Codex,
|
|
16
|
+
Thinking: an installed AI client on the person's subscription (Claude Code, Codex, Antigravity, Cursor Agent), own API keys (OpenAI, Anthropic, Google, fal.ai, ElevenLabs, Replicate, Vercel AI Gateway), a local model (Ollama), or engenty credits from an account. Settings › Models shows which way serves each class and what is missing.
|
|
17
17
|
|
|
18
18
|
Sharing: Test runs a draft. Publish makes a version live behind a link. Share holds the link, the tag for a website, a QR code, channels (the page, the chat, and what plugins add: WhatsApp, SMS, calls) and the link's settings (on/off, runs per day, a new address). With an account, what is published on a local install also runs in the cloud, on the account's credits, while the computer is off.
|
|
19
19
|
|
|
@@ -55,7 +55,14 @@ export async function requestDeviceCode() {
|
|
|
55
55
|
interval: Math.max(1, data.interval ?? 5),
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
/** A pause that ends early when the signal aborts. */
|
|
59
|
+
const pause = (ms, signal) => new Promise((done) => {
|
|
60
|
+
const timer = setTimeout(done, ms);
|
|
61
|
+
signal?.addEventListener("abort", () => {
|
|
62
|
+
clearTimeout(timer);
|
|
63
|
+
done();
|
|
64
|
+
}, { once: true });
|
|
65
|
+
});
|
|
59
66
|
/**
|
|
60
67
|
* Asks the token endpoint until the person allowed the code in the browser, and keeps the
|
|
61
68
|
* tokens as the browser flow does. `authorization_pending` asks again after `interval`;
|
|
@@ -64,10 +71,14 @@ const pause = (ms) => new Promise((done) => setTimeout(done, ms));
|
|
|
64
71
|
*/
|
|
65
72
|
export async function waitForDeviceSignIn(code, options = {}) {
|
|
66
73
|
const wait = options.wait ?? pause;
|
|
74
|
+
const { signal } = options;
|
|
67
75
|
let interval = code.interval;
|
|
68
76
|
let failures = 0;
|
|
69
77
|
for (;;) {
|
|
70
|
-
await wait(interval * 1000);
|
|
78
|
+
await wait(interval * 1000, signal);
|
|
79
|
+
if (signal?.aborted) {
|
|
80
|
+
throw new DeviceSignInError("skipped", "Skipped the sign-in.");
|
|
81
|
+
}
|
|
71
82
|
if (Date.now() >= code.expiresAt) {
|
|
72
83
|
throw new DeviceSignInError("expired", "The code has expired. Start the sign-in again.");
|
|
73
84
|
}
|
|
@@ -62,7 +62,8 @@ export async function accountState() {
|
|
|
62
62
|
export function described(account, team, credits = true) {
|
|
63
63
|
const parts = [account.name || account.email];
|
|
64
64
|
if (team) {
|
|
65
|
-
|
|
65
|
+
// "Team Anna" and "New team" say it themselves: not "team Team Anna".
|
|
66
|
+
parts.push(/\bteam\b/i.test(team.name) ? team.name : `team ${team.name}`);
|
|
66
67
|
if (credits) {
|
|
67
68
|
parts.push(`${team.balanceCredits} credits`);
|
|
68
69
|
}
|
|
@@ -100,11 +101,58 @@ async function status() {
|
|
|
100
101
|
: dim(` (${host()} didn’t respond${team ? ", so this is from last time" : ""})`)}`);
|
|
101
102
|
return 0;
|
|
102
103
|
}
|
|
104
|
+
/** A code as people read it off a screen: ABCD-EFGH. */
|
|
105
|
+
export function groupedCode(code) {
|
|
106
|
+
const plain = code.replace(/[\s-]+/g, "").toUpperCase();
|
|
107
|
+
return plain.length === 8 ? `${plain.slice(0, 4)}-${plain.slice(4)}` : code;
|
|
108
|
+
}
|
|
109
|
+
/** Whether a new account needs an invitation code, as the account's own pages say. */
|
|
110
|
+
async function signupByCode() {
|
|
111
|
+
try {
|
|
112
|
+
const res = await fetch(`${env.local.accountUrl}/api/config`, {
|
|
113
|
+
signal: AbortSignal.timeout(3000),
|
|
114
|
+
});
|
|
115
|
+
return (await res.json()).signup === "code";
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Enter and Esc on a terminal while it waits for the browser (Ctrl-C stays the spinner's: it
|
|
123
|
+
* ends the command). Returns what gives the keys back.
|
|
124
|
+
*/
|
|
125
|
+
function onKeys(keys) {
|
|
126
|
+
const input = process.stdin;
|
|
127
|
+
if (!input.isTTY) {
|
|
128
|
+
return () => undefined;
|
|
129
|
+
}
|
|
130
|
+
const raw = input.isRaw;
|
|
131
|
+
input.setRawMode(true);
|
|
132
|
+
input.resume();
|
|
133
|
+
const read = (data) => {
|
|
134
|
+
const key = data.toString();
|
|
135
|
+
if (key === "\r" || key === "\n") {
|
|
136
|
+
keys.enter();
|
|
137
|
+
}
|
|
138
|
+
else if (key === "\x1b") {
|
|
139
|
+
keys.escape();
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
input.on("data", read);
|
|
143
|
+
return () => {
|
|
144
|
+
input.off("data", read);
|
|
145
|
+
input.setRawMode(raw);
|
|
146
|
+
input.pause();
|
|
147
|
+
};
|
|
148
|
+
}
|
|
103
149
|
/**
|
|
104
150
|
* The device flow on the terminal: the link and the code, the browser opened where there is
|
|
105
|
-
* one, then a wait while the person
|
|
151
|
+
* one, then a wait while the person signs in, or creates their account, and allows it. On a
|
|
152
|
+
* terminal, Enter opens the page again and Esc goes on without an account: someone without an
|
|
153
|
+
* invitation code yet is not stuck in the wait. Null when it ended without an account.
|
|
106
154
|
*/
|
|
107
|
-
async function deviceSignIn() {
|
|
155
|
+
async function deviceSignIn(interactive) {
|
|
108
156
|
let code;
|
|
109
157
|
try {
|
|
110
158
|
code = await requestDeviceCode();
|
|
@@ -113,24 +161,42 @@ async function deviceSignIn() {
|
|
|
113
161
|
p.log.error(err.message);
|
|
114
162
|
return null;
|
|
115
163
|
}
|
|
164
|
+
const shown = groupedCode(code.userCode);
|
|
165
|
+
// The complete link carries the code: the page only asks to check it.
|
|
116
166
|
const link = code.verificationUriComplete ?? code.verificationUri;
|
|
117
|
-
p.log.message(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
const
|
|
167
|
+
p.log.message(code.verificationUriComplete
|
|
168
|
+
? `Open ${cyan(link)}\nThe page shows the code ${bold(shown)}: check that it matches.`
|
|
169
|
+
: `Open ${cyan(link)} and enter the code ${bold(shown)}.`);
|
|
170
|
+
const opened = openBrowser(link);
|
|
171
|
+
const newHere = (await signupByCode())
|
|
172
|
+
? "New here? Create your account on that page with your invitation code, or join the waitlist there."
|
|
173
|
+
: "New here? Your account is created on that page.";
|
|
174
|
+
const keys = interactive ? "Enter opens the page again · Esc signs in later" : "";
|
|
175
|
+
p.log.message(dim([opened ? "The page opens in your browser." : "", newHere, keys].filter(Boolean).join("\n")));
|
|
176
|
+
const spinner = busy("Waiting for you in the browser…");
|
|
177
|
+
const later = new AbortController();
|
|
178
|
+
const release = interactive
|
|
179
|
+
? onKeys({ enter: () => void openBrowser(link), escape: () => later.abort() })
|
|
180
|
+
: () => undefined;
|
|
122
181
|
try {
|
|
123
|
-
const account = await waitForDeviceSignIn(code);
|
|
182
|
+
const account = await waitForDeviceSignIn(code, { signal: later.signal });
|
|
124
183
|
const overview = await accountOverview();
|
|
125
184
|
spinner.stop(`Signed in as ${described(account, overview?.tenant ?? null)}.`);
|
|
126
185
|
return account;
|
|
127
186
|
}
|
|
128
187
|
catch (err) {
|
|
188
|
+
if (err instanceof DeviceSignInError && err.reason === "skipped") {
|
|
189
|
+
spinner.stop("Not signed in yet.");
|
|
190
|
+
return null;
|
|
191
|
+
}
|
|
129
192
|
spinner.fail(err instanceof DeviceSignInError
|
|
130
193
|
? err.message
|
|
131
194
|
: `The sign-in didn’t work. ${err.message}`);
|
|
132
195
|
return null;
|
|
133
196
|
}
|
|
197
|
+
finally {
|
|
198
|
+
release();
|
|
199
|
+
}
|
|
134
200
|
}
|
|
135
201
|
/**
|
|
136
202
|
* A runtime that runs reads the account from the settings as it goes, but holds a few things
|
|
@@ -161,12 +227,20 @@ const SIGNED_IN = "your plan’s Pro modules load and your published wizards arr
|
|
|
161
227
|
async function signIn(paths, interactive) {
|
|
162
228
|
await ready();
|
|
163
229
|
const linked = await linkedAccount();
|
|
230
|
+
if (linked && isLocalOnly()) {
|
|
231
|
+
// Set up with --local by an older version, which kept the link: it only needs switching on.
|
|
232
|
+
joinedAccount(paths);
|
|
233
|
+
p.log.success(`Signed in as ${described(linked, await knownTeam(), false)} again.`);
|
|
234
|
+
await pickUp(paths, interactive, SIGNED_IN);
|
|
235
|
+
return 0;
|
|
236
|
+
}
|
|
164
237
|
if (linked) {
|
|
165
238
|
p.log.info(`Already signed in as ${described(linked, await knownTeam(), false)}. ${dim(`To switch accounts, run ${cmd("account sign-out")} first.`)}`);
|
|
166
239
|
return 0;
|
|
167
240
|
}
|
|
168
|
-
const account = await deviceSignIn();
|
|
241
|
+
const account = await deviceSignIn(interactive);
|
|
169
242
|
if (!account) {
|
|
243
|
+
p.log.info(dim(`To sign in later: ${cmd("account sign-in")}`));
|
|
170
244
|
return 1;
|
|
171
245
|
}
|
|
172
246
|
joinedAccount(paths);
|
|
@@ -174,15 +248,10 @@ async function signIn(paths, interactive) {
|
|
|
174
248
|
await pickUp(paths, interactive, SIGNED_IN);
|
|
175
249
|
return 0;
|
|
176
250
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
? "No account is connected, so there’s nothing to sign out of."
|
|
182
|
-
: "Not signed in.");
|
|
183
|
-
return 0;
|
|
184
|
-
}
|
|
185
|
-
const spinner = busy(`Signing out ${state.account.name || state.account.email}…`);
|
|
251
|
+
/**
|
|
252
|
+
* Ends the link to the account: the same as the studio's sign-out (DELETE /api/studio/account).
|
|
253
|
+
*/
|
|
254
|
+
async function disconnect() {
|
|
186
255
|
await unlink();
|
|
187
256
|
// The same as the studio's sign-out (DELETE /api/studio/account): what was sent to the cloud
|
|
188
257
|
// is forgotten, the entitlement goes with the account's plan, and models that ran on its
|
|
@@ -199,6 +268,19 @@ async function signOut(paths, interactive) {
|
|
|
199
268
|
if (models.localModelSettings().source === "account") {
|
|
200
269
|
await models.saveLocalModels({ source: "own" });
|
|
201
270
|
}
|
|
271
|
+
}
|
|
272
|
+
async function signOut(paths, interactive) {
|
|
273
|
+
await ready();
|
|
274
|
+
// A link kept from an older --local counts as well: it is still on this computer.
|
|
275
|
+
const linked = await linkedAccount();
|
|
276
|
+
if (!linked) {
|
|
277
|
+
console.log(isLocalOnly()
|
|
278
|
+
? "No account is connected, so there’s nothing to sign out of."
|
|
279
|
+
: "Not signed in.");
|
|
280
|
+
return 0;
|
|
281
|
+
}
|
|
282
|
+
const spinner = busy(`Signing out ${linked.name || linked.email}…`);
|
|
283
|
+
await disconnect();
|
|
202
284
|
spinner.stop("Signed out. Your wizards and results stay on this computer.");
|
|
203
285
|
await pickUp(paths, interactive, "it disconnects from the account");
|
|
204
286
|
return 0;
|
|
@@ -252,6 +334,14 @@ export async function accountMenu(paths) {
|
|
|
252
334
|
*/
|
|
253
335
|
export async function accountStep(paths, options, interactive) {
|
|
254
336
|
if (options.local) {
|
|
337
|
+
await ready();
|
|
338
|
+
const linked = await linkedAccount();
|
|
339
|
+
if (linked) {
|
|
340
|
+
// "Nothing leaves this computer" holds only without the link.
|
|
341
|
+
const spinner = busy(`Signing out ${linked.name || linked.email}…`);
|
|
342
|
+
await disconnect();
|
|
343
|
+
spinner.stop(`Signed out ${linked.name || linked.email}.`);
|
|
344
|
+
}
|
|
255
345
|
localOnly(paths);
|
|
256
346
|
p.log.warn(`No account: nothing leaves this computer. Your wizards, your space and results stay in ${tilde(settings(paths).dataDir)}. Links work only on this computer.`);
|
|
257
347
|
p.log.message(dim(`To connect an account any time: ${cmd("account sign-in")}`));
|
|
@@ -272,7 +362,10 @@ export async function accountStep(paths, options, interactive) {
|
|
|
272
362
|
p.log.info(dim(`To sign in later: ${cmd("account sign-in")}`));
|
|
273
363
|
return;
|
|
274
364
|
}
|
|
275
|
-
const answer = await p.confirm({
|
|
365
|
+
const answer = await p.confirm({
|
|
366
|
+
message: "Sign in or create your account now?",
|
|
367
|
+
initialValue: true,
|
|
368
|
+
});
|
|
276
369
|
if (p.isCancel(answer)) {
|
|
277
370
|
p.cancel(`Setup stopped. To run it again: ${cmd("setup")}`);
|
|
278
371
|
return "cancelled";
|
|
@@ -281,7 +374,7 @@ export async function accountStep(paths, options, interactive) {
|
|
|
281
374
|
p.log.info(dim(`To sign in later: ${cmd("account sign-in")}`));
|
|
282
375
|
return;
|
|
283
376
|
}
|
|
284
|
-
const account = await deviceSignIn();
|
|
377
|
+
const account = await deviceSignIn(interactive);
|
|
285
378
|
if (!account) {
|
|
286
379
|
p.log.info(dim(`To sign in later: ${cmd("account sign-in")}`));
|
|
287
380
|
return;
|
|
@@ -296,8 +296,10 @@ function claudeCode(paths) {
|
|
|
296
296
|
"add",
|
|
297
297
|
"--scope",
|
|
298
298
|
"user",
|
|
299
|
-
|
|
299
|
+
// The name before `-e`: claude's `-e` takes every value up to the next option, so a
|
|
300
|
+
// name after it is read as one more variable.
|
|
300
301
|
SERVER_NAME,
|
|
302
|
+
...Object.entries(server.env ?? {}).flatMap(([key, value]) => ["-e", `${key}=${value}`]),
|
|
301
303
|
"--",
|
|
302
304
|
server.command,
|
|
303
305
|
...server.args,
|
|
@@ -305,7 +307,9 @@ function claudeCode(paths) {
|
|
|
305
307
|
return { ok: true, message: "added with claude mcp add --scope user" };
|
|
306
308
|
}
|
|
307
309
|
catch (error) {
|
|
308
|
-
|
|
310
|
+
// claude's own words say what was wrong; "Command failed: …" only repeats the command.
|
|
311
|
+
const said = String(error.stderr ?? "").trim();
|
|
312
|
+
return { ok: false, message: (said || error.message).split("\n")[0] };
|
|
309
313
|
}
|
|
310
314
|
},
|
|
311
315
|
async disconnect() {
|
|
@@ -461,13 +465,14 @@ export function apps(paths) {
|
|
|
461
465
|
entry: stdioEntry,
|
|
462
466
|
}),
|
|
463
467
|
jsonApp({
|
|
464
|
-
id: "
|
|
465
|
-
name: "
|
|
468
|
+
id: "antigravity",
|
|
469
|
+
name: "Antigravity",
|
|
466
470
|
widgets: false,
|
|
467
|
-
|
|
468
|
-
|
|
471
|
+
// The app and its CLI (agy) read the same file.
|
|
472
|
+
file: join(home, ".gemini", "config", "mcp_config.json"),
|
|
473
|
+
marker: join(home, ".gemini", "config"),
|
|
469
474
|
at: ["mcpServers"],
|
|
470
|
-
entry:
|
|
475
|
+
entry: stdioEntry,
|
|
471
476
|
}),
|
|
472
477
|
goose(),
|
|
473
478
|
openClaw(paths),
|
|
@@ -27,11 +27,12 @@ export const CLIENTS = [
|
|
|
27
27
|
app: "Claude",
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
id: "
|
|
31
|
-
name: "
|
|
32
|
-
bin: "
|
|
33
|
-
account: "Google",
|
|
34
|
-
install: { kind: "
|
|
30
|
+
id: "antigravity",
|
|
31
|
+
name: "Antigravity",
|
|
32
|
+
bin: "agy",
|
|
33
|
+
account: "Google AI",
|
|
34
|
+
install: { kind: "script", url: "https://antigravity.google/cli/install.sh" },
|
|
35
|
+
app: "Antigravity",
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
38
|
id: "cursor",
|
|
@@ -167,7 +167,7 @@ async function main(argv) {
|
|
|
167
167
|
const first = !readInstallNote(paths).setupAt;
|
|
168
168
|
if (first && !args.yes && process.stdin.isTTY && process.stdout.isTTY) {
|
|
169
169
|
// You asked to start it: once the setup is done, it starts.
|
|
170
|
-
if (!(await setup(paths, setupOptions))) {
|
|
170
|
+
if (!(await setup(paths, { ...setupOptions, next: "start" }))) {
|
|
171
171
|
return 130;
|
|
172
172
|
}
|
|
173
173
|
}
|
|
@@ -127,7 +127,7 @@ function commands() {
|
|
|
127
127
|
*/
|
|
128
128
|
export async function menu(paths, setupOptions, help) {
|
|
129
129
|
if (!readInstallNote(paths).setupAt) {
|
|
130
|
-
if (!(await setup(paths, setupOptions))) {
|
|
130
|
+
if (!(await setup(paths, { ...setupOptions, next: "menu" }))) {
|
|
131
131
|
return 130;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -324,6 +324,12 @@ export async function setup(paths, options) {
|
|
|
324
324
|
unattended: !process.stdout.isTTY,
|
|
325
325
|
}, paths);
|
|
326
326
|
p.log.info(CHROME_APP);
|
|
327
|
+
if (options.next) {
|
|
328
|
+
p.outro(options.next === "start"
|
|
329
|
+
? "Setup is done. Starting engenty wizards…"
|
|
330
|
+
: `Setup is done. ${dim(`${cmd("help")} lists every command.`)}`);
|
|
331
|
+
return true;
|
|
332
|
+
}
|
|
327
333
|
await howToUse(paths);
|
|
328
334
|
return true;
|
|
329
335
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { homedir } from "node:os";
|
|
2
|
+
import { emitKeypressEvents } from "node:readline";
|
|
2
3
|
import { styleText } from "node:util";
|
|
3
4
|
import * as p from "@clack/prompts";
|
|
4
5
|
import { command } from "./home.js";
|
|
@@ -24,6 +25,7 @@ export function busy(message) {
|
|
|
24
25
|
if (!process.stdout.isTTY) {
|
|
25
26
|
return { stop: (text) => p.log.step(text), fail: (text) => p.log.warn(text) };
|
|
26
27
|
}
|
|
28
|
+
exitOnCtrlC();
|
|
27
29
|
const spinner = p.spinner();
|
|
28
30
|
spinner.start(message.replace(/…$/, ""));
|
|
29
31
|
return {
|
|
@@ -31,3 +33,27 @@ export function busy(message) {
|
|
|
31
33
|
fail: (text) => spinner.error(text),
|
|
32
34
|
};
|
|
33
35
|
}
|
|
36
|
+
let watching = false;
|
|
37
|
+
/**
|
|
38
|
+
* Ctrl-C under a spinner: clack ends the process itself, with code 0, as if all went well. The
|
|
39
|
+
* key is noted before clack sees it (this listener comes first), and the process ends with 130
|
|
40
|
+
* instead, as a command stopped by Ctrl-C does: `wizards setup && …` goes no further.
|
|
41
|
+
*/
|
|
42
|
+
function exitOnCtrlC() {
|
|
43
|
+
if (watching || !process.stdin.isTTY) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
watching = true;
|
|
47
|
+
let pressed = false;
|
|
48
|
+
emitKeypressEvents(process.stdin);
|
|
49
|
+
process.stdin.on("keypress", (_text, key) => {
|
|
50
|
+
if (key?.ctrl && key.name === "c") {
|
|
51
|
+
pressed = true;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
process.on("exit", () => {
|
|
55
|
+
if (pressed) {
|
|
56
|
+
process.exitCode = 130;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -16,7 +16,7 @@ PLUGINS_DIR=examples/plugins
|
|
|
16
16
|
posts a line to an address whenever a real run of a wizard reaches its end.
|
|
17
17
|
|
|
18
18
|
```ts
|
|
19
|
-
import type { WizardsPluginFactory } from "@engenty
|
|
19
|
+
import type { WizardsPluginFactory } from "@engenty/wizards/plugin";
|
|
20
20
|
|
|
21
21
|
const plugin: WizardsPluginFactory = (wizards) => {
|
|
22
22
|
const url = wizards.config.get("NOTIFY_URL");
|
|
@@ -37,7 +37,7 @@ loads them from their files and loads a plugin again when its files change.
|
|
|
37
37
|
| File | `src/plugin.ts`, or the one file a small plugin is | `ui/plugin.tsx`, built to `dist/client.js` and `dist/client.css` |
|
|
38
38
|
| Runs in | The runtime | The studio, after sign-in |
|
|
39
39
|
| Loaded | As TypeScript, no build | As the built script |
|
|
40
|
-
| Types | `@engenty
|
|
40
|
+
| Types | `@engenty/wizards/plugin` | `@engenty/wizards/plugin/studio` |
|
|
41
41
|
| Adds | Tools, runners, routes, tables, listeners, jobs, starters, accounts, Knowledge, the space’s block, index and assistant tools | Pages, icons in the app bar, sections of the settings and of the space page, parts of the space page, a runner’s settings and setup in the share dialog, cards in the assistant’s chat |
|
|
42
42
|
|
|
43
43
|
A plugin has one half or both. The studio half talks to the server half over the plugin’s own
|
|
@@ -83,7 +83,7 @@ A path in the manifest must stay inside the plugin’s folder.
|
|
|
83
83
|
|
|
84
84
|
| The plugin imports | It comes from |
|
|
85
85
|
|---|---|
|
|
86
|
-
| `@engenty
|
|
86
|
+
| `@engenty/wizards/plugin`, `@engenty/wizards/plugin/thread`, `zod`, `drizzle-orm`, `drizzle-orm/sqlite-core` | The runtime’s own copies, wherever the plugin’s file is |
|
|
87
87
|
| Its own files | Beside it, as TypeScript |
|
|
88
88
|
| Anything else | A `node_modules` the plugin brings beside it |
|
|
89
89
|
|
|
@@ -20,7 +20,7 @@ Start the app. It creates the folder if it is missing and watches it while it ru
|
|
|
20
20
|
Save this as `workdays.ts` in the plugins folder:
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
-
import { definePlugin } from "@engenty
|
|
23
|
+
import { definePlugin } from "@engenty/wizards/plugin";
|
|
24
24
|
import { z } from "zod";
|
|
25
25
|
|
|
26
26
|
export default definePlugin((wizards) => {
|
|
@@ -50,7 +50,7 @@ export default definePlugin((wizards) => {
|
|
|
50
50
|
|
|
51
51
|
- The file’s name is the plugin’s id: `workdays`.
|
|
52
52
|
- The tool’s full id is `workdays.count`.
|
|
53
|
-
- `@engenty
|
|
53
|
+
- `@engenty/wizards/plugin` and `zod` come from the app, so you don’t install anything.
|
|
54
54
|
|
|
55
55
|
## 3. See it
|
|
56
56
|
|
|
@@ -6,9 +6,9 @@ version: 0.5.0
|
|
|
6
6
|
|
|
7
7
|
## Server half
|
|
8
8
|
|
|
9
|
-
`import { definePlugin } from "@engenty
|
|
9
|
+
`import { definePlugin } from "@engenty/wizards/plugin"`
|
|
10
10
|
|
|
11
|
-
`import { ThreadDoor } from "@engenty
|
|
11
|
+
`import { ThreadDoor } from "@engenty/wizards/plugin/thread"`: a wizard run in a
|
|
12
12
|
messenger’s thread, one message at a time, for which a plugin brings the surface. See
|
|
13
13
|
[Runners](./runners.md#a-thread-door-from-the-sdk).
|
|
14
14
|
|
|
@@ -241,7 +241,7 @@ interface PluginRunEvent {
|
|
|
241
241
|
|
|
242
242
|
## Studio half
|
|
243
243
|
|
|
244
|
-
`import { defineStudioPlugin } from "@engenty
|
|
244
|
+
`import { defineStudioPlugin } from "@engenty/wizards/plugin/studio"`
|
|
245
245
|
|
|
246
246
|
The default export is a `StudioPlugin`: `(studio: StudioPluginContext) => void`.
|
|
247
247
|
|
|
@@ -340,7 +340,7 @@ In the install’s `.env`:
|
|
|
340
340
|
|
|
341
341
|
| | |
|
|
342
342
|
|---|---|
|
|
343
|
-
| `packages/
|
|
343
|
+
| `packages/wizards/src/plugin/` | The types, with their comments |
|
|
344
344
|
| `apps/runtime/src/plugins/` | Finding, loading, tables, events |
|
|
345
345
|
| `apps/runtime/src/routes/plugins.ts` | The addresses above; `apps/runtime/src/routes/api.ts` the ones for programs |
|
|
346
346
|
| `apps/web/src/plugins/` | The studio’s side |
|
|
@@ -175,7 +175,7 @@ That conversation is the same on every messenger; the SDK holds it, and a plugin
|
|
|
175
175
|
surface: how a question is drawn there, how a file is fetched.
|
|
176
176
|
|
|
177
177
|
```ts
|
|
178
|
-
import { ThreadDoor, type ThreadSurface } from "@engenty
|
|
178
|
+
import { ThreadDoor, type ThreadSurface } from "@engenty/wizards/plugin/thread";
|
|
179
179
|
|
|
180
180
|
const surface: ThreadSurface = {
|
|
181
181
|
runner: "sms",
|
|
@@ -8,7 +8,7 @@ The server half is a file whose default export is a function. The runtime calls
|
|
|
8
8
|
plugin loads and hands it `wizards`. The function registers what the plugin adds.
|
|
9
9
|
|
|
10
10
|
```ts
|
|
11
|
-
import { definePlugin } from "@engenty
|
|
11
|
+
import { definePlugin } from "@engenty/wizards/plugin";
|
|
12
12
|
|
|
13
13
|
export default definePlugin((wizards) => {
|
|
14
14
|
const { server } = wizards;
|
|
@@ -275,7 +275,7 @@ are no half-loaded plugins. Settings → Plugins shows the error, and the plugin
|
|
|
275
275
|
|
|
276
276
|
## Imports
|
|
277
277
|
|
|
278
|
-
`@engenty
|
|
278
|
+
`@engenty/wizards/plugin` (and `@engenty/wizards/plugin/thread`), `zod`, `drizzle-orm` and
|
|
279
279
|
`drizzle-orm/sqlite-core` come from the runtime’s own copies, so a schema or a table a plugin
|
|
280
280
|
makes is one the runtime understands. See [Files and manifest](./layout.md#dependencies) for
|
|
281
281
|
everything else.
|
|
@@ -9,7 +9,7 @@ sign-in and hands it `studio`. What the plugin draws is part of the studio: the
|
|
|
9
9
|
same router, the same components.
|
|
10
10
|
|
|
11
11
|
```tsx
|
|
12
|
-
import { defineStudioPlugin } from "@engenty
|
|
12
|
+
import { defineStudioPlugin } from "@engenty/wizards/plugin/studio";
|
|
13
13
|
import { Button, Card, Empty, Spinner } from "@engenty-wizards/web/ui";
|
|
14
14
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
15
15
|
import { Users } from "lucide-react";
|
|
@@ -339,7 +339,7 @@ there is one React and one router on the page:
|
|
|
339
339
|
| `react-router` | `Link`, `NavLink`, `Navigate`, `useNavigate`, `useParams`, `useLocation`, `useSearchParams` |
|
|
340
340
|
| `@tanstack/react-query` | `useQuery`, `useMutation`, `useQueryClient` |
|
|
341
341
|
| `@engenty-wizards/web/ui` | The studio’s components, see [Styles and components](./styling.md) |
|
|
342
|
-
| `@engenty
|
|
342
|
+
| `@engenty/wizards/plugin/studio` | `defineStudioPlugin` and the types |
|
|
343
343
|
|
|
344
344
|
Everything else a plugin imports is bundled into `client.js`. A package the plugin’s folder
|
|
345
345
|
does not have, such as `lucide-react`, comes from the studio’s.
|
|
@@ -32,7 +32,7 @@ has the WordPress plugin: see [WordPress](./wordpress.md).
|
|
|
32
32
|
| Cursor | yes | `cursor` |
|
|
33
33
|
| VS Code (Copilot) | yes | `vscode` |
|
|
34
34
|
| Windsurf | no | `windsurf` |
|
|
35
|
-
|
|
|
35
|
+
| Antigravity | no | `antigravity` |
|
|
36
36
|
| Goose | yes | `goose` |
|
|
37
37
|
| OpenClaw | no | `openclaw` |
|
|
38
38
|
| LM Studio | no | `lm-studio` |
|
|
@@ -32,7 +32,7 @@ version: 0.5.0
|
|
|
32
32
|
|---|---|
|
|
33
33
|
| `--yes`, `-y` | Asks nothing and installs nothing optional |
|
|
34
34
|
| `--local` | Sets up without an account, so nothing leaves this computer ([Local only](./local-only.md)) |
|
|
35
|
-
| `--client <name>` | Installs this AI client without asking: `codex`, `claude`, `
|
|
35
|
+
| `--client <name>` | Installs this AI client without asking: `codex`, `claude`, `antigravity`, `cursor` |
|
|
36
36
|
| `--no-open` | Starts without opening the browser |
|
|
37
37
|
| `--background`, `-s` | Starts it in the background (`--service` still works): detached from the terminal, and the command returns. `wizards stop` stops it, and its output goes to `logs/runtime.log` |
|
|
38
38
|
| `--version`, `-v` | Prints the version |
|
|
@@ -43,7 +43,7 @@ sentence, or start from a template. See [Build a wizard](./build-a-wizard.md).
|
|
|
43
43
|
## Also on your computer
|
|
44
44
|
|
|
45
45
|
The same account works on your own computer: you [install](./install.md) engenty wizards there
|
|
46
|
-
and sign in during the setup. It then runs on your Claude, ChatGPT,
|
|
46
|
+
and sign in during the setup. It then runs on your Claude, ChatGPT, Google AI or Cursor
|
|
47
47
|
subscription, reads your files and browses the web for you. What you publish there runs in the
|
|
48
48
|
cloud too, behind the same links. In the cloud studio that space is marked “Edited on your
|
|
49
49
|
computer.” and you only look at it there: you change it on your computer.
|
|
@@ -21,10 +21,10 @@ has a “Sign in” button that opens your browser for it. If you set engenty wi
|
|
|
21
21
|
| engenty credits | Your account’s credits, as in the cloud | An account signed in. Shown only then |
|
|
22
22
|
| Claude Code | Your Claude subscription | The client installed and signed in |
|
|
23
23
|
| Codex | Your ChatGPT subscription | The client installed and signed in |
|
|
24
|
-
|
|
|
24
|
+
| Antigravity | Your Google AI subscription | The client (`agy`) installed and signed in |
|
|
25
25
|
| Cursor Agent | Your Cursor subscription | The client installed and signed in |
|
|
26
26
|
| Apple Intelligence | The model on this Mac, without an account or the internet | A Mac with Apple silicon on macOS 26 or later, with Apple Intelligence switched on. Shown only on such a Mac |
|
|
27
|
-
| Your own keys |
|
|
27
|
+
| Your own keys | OpenAI, Anthropic, Google or Vercel AI Gateway, or a model on your computer | One API key, or [Ollama](https://ollama.com) running |
|
|
28
28
|
|
|
29
29
|
- **An AI client that is not installed** installs right on the page, in a terminal shown there.
|
|
30
30
|
It takes about a minute.
|
|
@@ -42,6 +42,11 @@ has a “Sign in” button that opens your browser for it. If you set engenty wi
|
|
|
42
42
|
After you connect, one short call checks that the model can be reached. The setup stays until
|
|
43
43
|
that call works. Then “Open the studio” takes you in.
|
|
44
44
|
|
|
45
|
+
With your own keys, each key has its own Test. It checks the key with the provider, stores it in
|
|
46
|
+
this computer’s keychain and sets that provider’s models for what no other key covers yet. One
|
|
47
|
+
key that works is enough. Which model does which job you change later under
|
|
48
|
+
[Settings → Models](./models.md).
|
|
49
|
+
|
|
45
50
|
## What an AI client does not cover
|
|
46
51
|
|
|
47
52
|
An installed AI client writes and reasons. Codex also makes images on your sign-in; with the
|
|
@@ -15,7 +15,7 @@ briefing, an invoice, a quote, a damage report.
|
|
|
15
15
|
| **Describe it** | You say in plain words what the wizard should do. The assistant builds the flow, and you see it as a diagram and can change any step. |
|
|
16
16
|
| **Let AI steps work** | They research the web, write, draw images, render video, read PDFs, scans and emails, build documents and dashboards, and write into other services. Anything that changes an account asks first. |
|
|
17
17
|
| **Share a link** | Anyone can run the wizard in a browser, on a phone too. Results download as PDF, Word, HTML, Markdown, PNG, MP4, MP3, CSV, Excel or JSON, or go out as a link. |
|
|
18
|
-
| **In the cloud, or on your computer** | You sign up and build in the browser, and links run on your team’s credits. Or you install it on your computer: there it runs on Codex, Claude Code,
|
|
18
|
+
| **In the cloud, or on your computer** | You sign up and build in the browser, and links run on your team’s credits. Or you install it on your computer: there it runs on Codex, Claude Code, Antigravity or Cursor Agent with your own subscription, on your own API keys or on a local model, and your files stay with you. |
|
|
19
19
|
|
|
20
20
|
## Where to start
|
|
21
21
|
|