wizards 0.2.61 → 0.3.1
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/app.js +122 -83
- package/apps/runtime/dist/engine/runner.js +1 -1
- package/apps/runtime/dist/env.js +23 -6
- package/apps/runtime/dist/index.js +3 -3
- package/apps/runtime/dist/link-preview.js +3 -3
- package/apps/runtime/dist/mcp/flow-app.js +5 -2
- package/apps/runtime/dist/plugins/public.js +1 -1
- package/apps/runtime/dist/routes/api.js +1 -1
- package/apps/runtime/dist/routes/runs.js +5 -2
- package/apps/runtime/dist/services/api.js +2 -2
- package/apps/runtime/dist/services/runners.js +1 -1
- package/apps/runtime/dist/services/shares.js +2 -2
- package/apps/runtime/dist/services/wizards.js +1 -1
- package/apps/web/dist/assets/{AboutDialog-OEVFZuMQ.js → AboutDialog-rEV1tY7v.js} +1 -1
- package/apps/web/dist/assets/{ChangelogDialog-6xNrjOIm.js → ChangelogDialog-no0Qp8Xx.js} +1 -1
- package/apps/web/dist/assets/ChatView--IperikB.js +10 -0
- package/apps/web/dist/assets/EditorPage-ogKP-1WD.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-COK6Z3jV.js → FlowPreview-BFfYNi_w.js} +1 -1
- package/apps/web/dist/assets/{Harness-DrnkZ8kf.js → Harness-WF0mxIv3.js} +2 -2
- package/apps/web/dist/assets/{Marketplace-CmeAQDOY.js → Marketplace-CuE6WgnO.js} +2 -2
- package/apps/web/dist/assets/{NewWizardPage-BBaIaspG.js → NewWizardPage-DVG3ABgm.js} +1 -1
- package/apps/web/dist/assets/ProjectPage-CkPTmzYS.js +2 -0
- package/apps/web/dist/assets/PublicRunner-DRH7BXnH.js +1 -0
- package/apps/web/dist/assets/{ReadOnly-B--cynCf.js → ReadOnly-Bxbgr2n2.js} +1 -1
- package/apps/web/dist/assets/RunDrawer-D46YTsXi.js +4 -0
- package/apps/web/dist/assets/{RunnerView-Dzz0vC_M.js → RunnerView-EpmDp2lS.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-CIimi5gU.js +1 -0
- package/apps/web/dist/assets/SetupPage-K4aU8yPc.js +1 -0
- package/apps/web/dist/assets/SharePage-A97exWhO.js +1 -0
- package/apps/web/dist/assets/{brand-ClxXyg-d.js → brand-cgisQRwA.js} +1 -1
- package/apps/web/dist/assets/changelog-DO6Z2SDc.js +1 -0
- package/apps/web/dist/assets/{circle-alert-CyjKeZm5.js → circle-alert-R2GwpaDI.js} +1 -1
- package/apps/web/dist/assets/{esm-C0TPPvNu.js → esm-C_f_4oeZ.js} +1 -1
- package/apps/web/dist/assets/index-DIF70pQf.js +11 -0
- package/apps/web/dist/assets/{lock-D5tH2Lqc.js → lock-BqMtfg3I.js} +1 -1
- package/apps/web/dist/assets/{session-DEXxyxEc.js → session-Dej-L4l9.js} +1 -1
- package/apps/web/dist/assets/{settings-menu-vtL00p0G.js → settings-menu-mxakooyx.js} +1 -1
- package/apps/web/dist/assets/{ui-SKtUMhUq.js → ui-aWLrX8hF.js} +2 -2
- package/apps/web/dist/assets/{upload-hT54Sh8P.js → upload-CNYeHI5s.js} +1 -1
- package/apps/web/dist/assets/{volume-2-BX_wS3Lh.js → volume-2-B7cfghgd.js} +1 -1
- package/apps/web/dist/index.html +6 -6
- package/package.json +1 -1
- package/apps/web/dist/assets/ChatView-3ESCXBad.js +0 -10
- package/apps/web/dist/assets/EditorPage-DEWSbQzj.js +0 -3
- package/apps/web/dist/assets/ProjectPage-7WwZ4ier.js +0 -2
- package/apps/web/dist/assets/PublicRunner-DL3Zdyyp.js +0 -1
- package/apps/web/dist/assets/RunDrawer-DhKe5qPM.js +0 -4
- package/apps/web/dist/assets/SettingsPage-CaTwyuf_.js +0 -1
- package/apps/web/dist/assets/SetupPage-BqW4ZghT.js +0 -1
- package/apps/web/dist/assets/SharePage-CYtDkLLD.js +0 -1
- package/apps/web/dist/assets/changelog-CUTIPZpA.js +0 -1
- package/apps/web/dist/assets/index-CsKV2ZNO.js +0 -11
package/apps/runtime/dist/app.js
CHANGED
|
@@ -35,6 +35,9 @@ import { ServiceError } from "./services/errors.js";
|
|
|
35
35
|
import { servePageRunner } from "./services/runners.js";
|
|
36
36
|
import { tenantOfLink, tenantStatus } from "./tenants/control.js";
|
|
37
37
|
const app = new Hono();
|
|
38
|
+
// Which halves this process serves (RUNTIME_ROLE): the studio's routes, the doors' routes, or
|
|
39
|
+
// both. What both need — health, config, the runs' API, the connect callback — is always there.
|
|
40
|
+
const { serves } = env;
|
|
38
41
|
app.onError((err, c) => {
|
|
39
42
|
if (err instanceof ServiceError) {
|
|
40
43
|
return c.json(err.toJSON(), err.status);
|
|
@@ -130,76 +133,89 @@ app.post("/api/log", bodyLimit({ maxSize: 8 * 1024 }), async (c) => {
|
|
|
130
133
|
}
|
|
131
134
|
return c.json({ ok: true });
|
|
132
135
|
});
|
|
133
|
-
|
|
136
|
+
if (serves.studio) {
|
|
137
|
+
app.route("/api", authRoutes);
|
|
138
|
+
}
|
|
134
139
|
app.get("/api/config", (c) => c.json({
|
|
135
140
|
mode: managed ? "managed" : "local",
|
|
136
141
|
devLogin: !managed && env.devLogin,
|
|
137
142
|
/** The product's own site, for a runtime that runs alone. */
|
|
138
143
|
site: managed ? null : env.local.cloudUrl,
|
|
144
|
+
/** Where the wizards' pages are: the studio makes their links with it. */
|
|
145
|
+
publicUrl: env.publicUrl,
|
|
139
146
|
/** The feature switches before anyone is signed in: the code's, the environment's, the file's. */
|
|
140
147
|
features: features(),
|
|
141
148
|
}));
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
if (serves.studio) {
|
|
150
|
+
// OAuth discovery for MCP clients (RFC 9728): the Manage-App is the authorization server.
|
|
151
|
+
app.get("/.well-known/oauth-protected-resource/*", async (c) => {
|
|
152
|
+
if (!managed) {
|
|
153
|
+
return c.notFound();
|
|
154
|
+
}
|
|
155
|
+
const d = await discovery();
|
|
156
|
+
return c.json({
|
|
157
|
+
resource: MCP_RESOURCE,
|
|
158
|
+
authorization_servers: [d.issuer],
|
|
159
|
+
scopes_supported: SCOPES,
|
|
160
|
+
bearer_methods_supported: ["header"],
|
|
161
|
+
});
|
|
153
162
|
});
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
app
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
163
|
+
}
|
|
164
|
+
if (serves.doors) {
|
|
165
|
+
// The mobile app opens this runtime's wizard and result links (Universal Links, App Links).
|
|
166
|
+
app.get("/.well-known/apple-app-site-association", (c) => {
|
|
167
|
+
if (!env.mobile.iosAppIds.length) {
|
|
168
|
+
return c.notFound();
|
|
169
|
+
}
|
|
170
|
+
const paths = [`${basePath}/w/*`, `${basePath}/s/*`];
|
|
171
|
+
return c.json({
|
|
172
|
+
applinks: {
|
|
173
|
+
details: [
|
|
174
|
+
{
|
|
175
|
+
appIDs: env.mobile.iosAppIds,
|
|
176
|
+
components: paths.map((path) => ({ "/": path })),
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
});
|
|
170
181
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
182
|
+
app.get("/.well-known/assetlinks.json", (c) => {
|
|
183
|
+
if (!env.mobile.androidCertSha256.length) {
|
|
184
|
+
return c.notFound();
|
|
185
|
+
}
|
|
186
|
+
return c.json([
|
|
187
|
+
{
|
|
188
|
+
relation: ["delegate_permission/common.handle_all_urls"],
|
|
189
|
+
target: {
|
|
190
|
+
namespace: "android_app",
|
|
191
|
+
package_name: env.mobile.androidPackage,
|
|
192
|
+
sha256_cert_fingerprints: env.mobile.androidCertSha256,
|
|
193
|
+
},
|
|
183
194
|
},
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
195
|
+
]);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
if (serves.studio) {
|
|
199
|
+
/** Studio requests act as the signed-in person, inside that person's tenant. */
|
|
200
|
+
app.use("/api/studio/*", async (c, next) => {
|
|
201
|
+
const user = await principalOf(c);
|
|
202
|
+
if (!user) {
|
|
203
|
+
return c.json({ error: "unauthorized" }, 401);
|
|
204
|
+
}
|
|
205
|
+
if ((await tenantStatus(user.tenantId)) === "suspended") {
|
|
206
|
+
return c.json({ error: "Dieses Konto ist gesperrt.", code: "suspended" }, 403);
|
|
207
|
+
}
|
|
208
|
+
c.set("user", user);
|
|
209
|
+
return withTenant(user.tenantId, () => asRole(user.role, next));
|
|
210
|
+
});
|
|
211
|
+
const mcp = mcpHandler();
|
|
212
|
+
app.on(["GET", "POST", "DELETE"], "/api/mcp", (c) => mcp(c.req.raw));
|
|
213
|
+
}
|
|
214
|
+
if (serves.runner) {
|
|
215
|
+
// The tools of one model call, for the installed Claude Code while it answers that call: the
|
|
216
|
+
// call runs in this process, so its bridge is here.
|
|
217
|
+
app.on(["GET", "POST", "DELETE"], "/api/mcp/bridge/:token", (c) => bridgeRequest(c.req.param("token"), c.req.raw));
|
|
218
|
+
}
|
|
203
219
|
// What visitors send is read before anyone is known: a body is taken only up to a size. A page's
|
|
204
220
|
// answers are text; an upload is a photo, a recording or a clip from a phone (routes/delivery.ts).
|
|
205
221
|
const tooLarge = (max) => bodyLimit({
|
|
@@ -208,27 +224,35 @@ const tooLarge = (max) => bodyLimit({
|
|
|
208
224
|
});
|
|
209
225
|
const answers = tooLarge(4 * 1024 * 1024);
|
|
210
226
|
const upload = tooLarge(48 * 1024 * 1024);
|
|
211
|
-
|
|
212
|
-
app.
|
|
227
|
+
// The runs' API serves both halves: a maker's test run in the studio, a visitor's run on a
|
|
228
|
+
// wizard's page, the widget an AI app shows. Who may see a run is decided per request.
|
|
213
229
|
app.use("/api/runs/*", (c, next) => /\/uploads$/.test(c.req.path) ? upload(c, next) : answers(c, next));
|
|
214
|
-
|
|
215
|
-
app.route("/api/studio/
|
|
216
|
-
app.route("/api/studio/
|
|
217
|
-
app.route("/api/studio",
|
|
218
|
-
app.route("/api/
|
|
230
|
+
if (serves.studio) {
|
|
231
|
+
app.route("/api/studio/wizards", wizardStream);
|
|
232
|
+
app.route("/api/studio/marketplace", marketplaceStudio);
|
|
233
|
+
app.route("/api/studio/plugins", pluginRoutes);
|
|
234
|
+
app.route("/api/studio", studio);
|
|
235
|
+
app.route("/api/v1", apiRoutes);
|
|
236
|
+
app.route("/api/local/debug", localDebugRoutes);
|
|
237
|
+
}
|
|
219
238
|
app.route("/api/internal", internalRoutes);
|
|
220
|
-
|
|
221
|
-
app.
|
|
222
|
-
app.
|
|
239
|
+
if (serves.doors) {
|
|
240
|
+
app.use("/api/public/*", answers);
|
|
241
|
+
app.use("/api/shares/*", answers);
|
|
242
|
+
app.route("/api/public/plugins", publicPluginRoutes);
|
|
243
|
+
app.route("/api/public", publicRoutes);
|
|
244
|
+
app.route("/api/shares", shareRoutes);
|
|
245
|
+
}
|
|
223
246
|
app.route("/api/runs", runRoutes);
|
|
224
|
-
app.route("/api/shares", shareRoutes);
|
|
225
247
|
app.route("/api/connect", connectCallback);
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
app.get(
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
});
|
|
248
|
+
if (serves.studio) {
|
|
249
|
+
// The Claude Code plugin of this deployment: `claude plugin marketplace add <APP_URL>/api/claude-plugin/marketplace.json`.
|
|
250
|
+
app.get("/api/claude-plugin/marketplace.json", async (c) => c.json(await pluginMarketplace()));
|
|
251
|
+
app.get(`/api/claude-plugin/${PLUGIN_NAME}.zip`, async (c) => {
|
|
252
|
+
const { zip } = await pluginArchive();
|
|
253
|
+
return c.body(new Uint8Array(zip), 200, { "content-type": "application/zip" });
|
|
254
|
+
});
|
|
255
|
+
}
|
|
232
256
|
app.all("/api/*", (c) => c.json({ error: "not found" }, 404));
|
|
233
257
|
/**
|
|
234
258
|
* `/w/<token>/<runner>`: a plugin's page runner, where the tenant has it and the wizard offers
|
|
@@ -274,19 +298,34 @@ async function previewFor(path) {
|
|
|
274
298
|
* pages are `/w/<token>` and `/s/<token>`. Of the root only what others fetch there is served:
|
|
275
299
|
* the installer, the embed script for websites, and the service worker of public wizards. The
|
|
276
300
|
* rest of the root belongs to others (the landing page); a runtime alone sends `/` to the studio.
|
|
301
|
+
* The app's files are served by both halves: a wizard's page loads its scripts from `/studio`
|
|
302
|
+
* too. Which pages a half answers follows its role.
|
|
277
303
|
*/
|
|
278
304
|
const webDir = resolve(dirname(fileURLToPath(import.meta.url)), "../../web/dist");
|
|
279
|
-
const
|
|
280
|
-
const
|
|
305
|
+
const STUDIO_FILES = ["/install.sh"];
|
|
306
|
+
const DOORS_FILES = ["/embed.js", "/sw.js"];
|
|
307
|
+
const PAGES = new RegExp(`^/(${[...(serves.studio ? ["studio(/|$)"] : []), ...(serves.doors ? ["w/", "s/"] : [])].join("|")})`);
|
|
281
308
|
if (existsSync(webDir)) {
|
|
282
|
-
for (const file of
|
|
309
|
+
for (const file of serves.studio ? STUDIO_FILES : []) {
|
|
283
310
|
app.get(file, serveStatic({ root: webDir }));
|
|
284
311
|
}
|
|
312
|
+
for (const file of serves.doors ? DOORS_FILES : []) {
|
|
313
|
+
app.get(file, serveStatic({ root: webDir }));
|
|
314
|
+
}
|
|
315
|
+
if (!serves.studio) {
|
|
316
|
+
// The doors serve the app's files below `/studio`, not its start page.
|
|
317
|
+
app.get("/studio", (c) => c.text("Not found", 404));
|
|
318
|
+
app.get("/studio/", (c) => c.text("Not found", 404));
|
|
319
|
+
}
|
|
285
320
|
app.use("/studio/*", serveStatic({ root: webDir, rewriteRequestPath: (path) => path.slice("/studio".length) }));
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
321
|
+
if (serves.studio) {
|
|
322
|
+
app.get("/", (c) => c.redirect(`${basePath}/studio/`));
|
|
323
|
+
}
|
|
324
|
+
if (serves.doors) {
|
|
325
|
+
// A plugin's page runner lives at the wizard's address: `/w/<token>/<runner>`, before the app's page.
|
|
326
|
+
app.all("/w/:token/:runner/*", (c, next) => pluginRunnerPage(c, next));
|
|
327
|
+
app.all("/w/:token/:runner", (c, next) => pluginRunnerPage(c, next));
|
|
328
|
+
}
|
|
290
329
|
app.get("*", async (c) => {
|
|
291
330
|
if (!PAGES.test(c.req.path)) {
|
|
292
331
|
return c.text("Not found", 404);
|
|
@@ -887,7 +887,7 @@ export async function runView(run, brand) {
|
|
|
887
887
|
? await connectionViews(def.connections ?? [], scopeOf(run), await projectIdOf(run))
|
|
888
888
|
: [],
|
|
889
889
|
keeps: Boolean(def.lists?.length || def.connections?.length),
|
|
890
|
-
shareUrl: run.shareToken ? `${env.
|
|
890
|
+
shareUrl: run.shareToken ? `${env.publicUrl}/s/${run.shareToken}` : null,
|
|
891
891
|
expiresAt: run.expiresAt?.toISOString() ?? null,
|
|
892
892
|
};
|
|
893
893
|
}
|
package/apps/runtime/dist/env.js
CHANGED
|
@@ -93,13 +93,16 @@ const port = num("API_PORT", 24368);
|
|
|
93
93
|
/** From source the Vite dev server on :5181 serves the pages; built, this server does. */
|
|
94
94
|
const fromSource = import.meta.url.endsWith(".ts");
|
|
95
95
|
const sandboxImage = str("SANDBOX_IMAGE", "engenty-sandbox:latest");
|
|
96
|
+
const ROLES = ["studio", "doors", "web", "runner", "all"];
|
|
96
97
|
function role() {
|
|
97
98
|
const given = str("RUNTIME_ROLE", "all");
|
|
98
|
-
if (given
|
|
99
|
-
throw new Error(`RUNTIME_ROLE must be
|
|
99
|
+
if (!ROLES.includes(given)) {
|
|
100
|
+
throw new Error(`RUNTIME_ROLE must be one of ${ROLES.join(", ")}, not "${given}"`);
|
|
100
101
|
}
|
|
101
102
|
return given;
|
|
102
103
|
}
|
|
104
|
+
/** The origin people open, e.g. https://wizards.localhost — auth callbacks and links use it. */
|
|
105
|
+
const appUrl = str("APP_URL", fromSource ? "http://localhost:5181" : `http://localhost:${port}`).replace(/\/$/, "");
|
|
103
106
|
export const env = {
|
|
104
107
|
production: process.env.NODE_ENV === "production",
|
|
105
108
|
/** Running from source: Vite serves the pages, this server only `/api`. */
|
|
@@ -108,18 +111,32 @@ export const env = {
|
|
|
108
111
|
/** Listen address; a runtime that runs alone stays on the loopback interface. */
|
|
109
112
|
host: str("API_HOST", manageUrl ? "0.0.0.0" : "127.0.0.1"),
|
|
110
113
|
/**
|
|
111
|
-
* What this process does
|
|
112
|
-
*
|
|
114
|
+
* What this process does. `studio`: the makers' half (authoring, publishing, sign-in, MCP, the
|
|
115
|
+
* studio's pages). `doors`: the customers' half (wizard pages, their API, shared results, the
|
|
116
|
+
* plugins' public routes). `web`: both halves. `runner`: takes the runs that wait and drives
|
|
117
|
+
* them (it serves the routes too, for what the web hands it). `all`: everything in one process
|
|
118
|
+
* (a runtime that runs alone). docs/plans/runner-process.md.
|
|
113
119
|
*/
|
|
114
120
|
role: role(),
|
|
121
|
+
/** Which parts this process serves, from its role. */
|
|
122
|
+
serves: {
|
|
123
|
+
studio: ["studio", "web", "runner", "all"].includes(role()),
|
|
124
|
+
doors: ["doors", "web", "runner", "all"].includes(role()),
|
|
125
|
+
runner: ["runner", "all"].includes(role()),
|
|
126
|
+
},
|
|
115
127
|
runner: {
|
|
116
128
|
/** This runner's name in the control database; a new one each start. */
|
|
117
129
|
id: `${hostname()}-${randomBytes(3).toString("hex")}`,
|
|
118
130
|
/** Where the web reaches this runner (the browser's screen of a run it holds). */
|
|
119
131
|
url: str("RUNNER_URL").replace(/\/$/, ""),
|
|
120
132
|
},
|
|
121
|
-
|
|
122
|
-
|
|
133
|
+
appUrl,
|
|
134
|
+
/**
|
|
135
|
+
* Where the wizards' pages live (`/w/<token>`, `/s/<token>`, the embed script): the doors'
|
|
136
|
+
* origin, when they are served apart from the studio. Links to a wizard, a result or a public
|
|
137
|
+
* file carry it. Default: APP_URL, the same origin.
|
|
138
|
+
*/
|
|
139
|
+
publicUrl: str("PUBLIC_URL", appUrl).replace(/\/$/, ""),
|
|
123
140
|
/** More host names this server answers under, besides APP_URL's and the loopback names. */
|
|
124
141
|
allowedHosts: list("ALLOWED_HOSTS"),
|
|
125
142
|
dataDir,
|
|
@@ -56,7 +56,7 @@ function withoutBasePath(request) {
|
|
|
56
56
|
const server = serve({ fetch: withoutBasePath, port: env.port, hostname: env.host }, (info) => {
|
|
57
57
|
console.log(`engenty wizards on :${info.port} — ${env.appUrl}`);
|
|
58
58
|
const entry = localEntryUrl();
|
|
59
|
-
if (entry && !env.local.accessKey) {
|
|
59
|
+
if (entry && !env.local.accessKey && env.serves.studio) {
|
|
60
60
|
console.log(`Open the studio: ${entry}`);
|
|
61
61
|
}
|
|
62
62
|
if (!managed) {
|
|
@@ -70,7 +70,7 @@ const server = serve({ fetch: withoutBasePath, port: env.port, hostname: env.hos
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
// A runner takes the runs in line, those a stopped process left behind first (RUNTIME_ROLE).
|
|
73
|
-
if (env.
|
|
73
|
+
if (env.serves.runner) {
|
|
74
74
|
await registerRunner();
|
|
75
75
|
setInterval(() => void registerRunner().catch(() => undefined), 10_000).unref();
|
|
76
76
|
startRunner();
|
|
@@ -94,7 +94,7 @@ if (!managed) {
|
|
|
94
94
|
async function shutdown(code = 0) {
|
|
95
95
|
clearRunning(env.dataDir);
|
|
96
96
|
server.close();
|
|
97
|
-
if (env.
|
|
97
|
+
if (env.serves.runner) {
|
|
98
98
|
// The runs go back in line for another runner; their steps start afresh there.
|
|
99
99
|
await stopRunner();
|
|
100
100
|
await forgetRunner().catch(() => undefined);
|
|
@@ -35,8 +35,8 @@ export async function linkPreview(path) {
|
|
|
35
35
|
return tags({
|
|
36
36
|
title: view.title === view.wizard.title ? view.title : `${view.title} · ${view.wizard.title}`,
|
|
37
37
|
description: view.message ?? view.wizard.description,
|
|
38
|
-
url: `${env.
|
|
39
|
-
image: `${env.
|
|
38
|
+
url: `${env.publicUrl}/s/${share[1]}`,
|
|
39
|
+
image: `${env.publicUrl}/api/shares/${share[1]}/image`,
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
const wizard = path.match(/^\/w\/([A-Za-z0-9_-]+)(\/chat)?\/?$/);
|
|
@@ -52,7 +52,7 @@ export async function linkPreview(path) {
|
|
|
52
52
|
? tags({
|
|
53
53
|
title: v.definition.title,
|
|
54
54
|
description: v.definition.description,
|
|
55
|
-
url: `${env.
|
|
55
|
+
url: `${env.publicUrl}/w/${wizard[1]}${wizard[2] ?? ""}`,
|
|
56
56
|
})
|
|
57
57
|
: null;
|
|
58
58
|
}
|
|
@@ -30,7 +30,8 @@ const FLOW_APP_HTML = readWidget();
|
|
|
30
30
|
*/
|
|
31
31
|
export const FLOW_APP_URI = `ui://engenty-wizards/flow-${createHash("sha256").update(FLOW_APP_HTML).digest("hex").slice(0, 10)}.html`;
|
|
32
32
|
export function registerFlowApp(server) {
|
|
33
|
-
|
|
33
|
+
// The widget reaches the run on the doors: their origin.
|
|
34
|
+
const origin = new URL(env.publicUrl).origin;
|
|
34
35
|
registerAppResource(server, "Wizard flow", FLOW_APP_URI, {
|
|
35
36
|
description: "A wizard as a diagram, and a run on it.",
|
|
36
37
|
mimeType: RESOURCE_MIME_TYPE,
|
|
@@ -79,7 +80,9 @@ export async function flowView(userId, wizardId, options = {}) {
|
|
|
79
80
|
},
|
|
80
81
|
definition,
|
|
81
82
|
run: options.run,
|
|
82
|
-
runtime: options.run
|
|
83
|
+
runtime: options.run
|
|
84
|
+
? { base: env.publicUrl, ticket: runTicket(options.run.runId) }
|
|
85
|
+
: undefined,
|
|
83
86
|
};
|
|
84
87
|
}
|
|
85
88
|
/** A tool's `_meta` that opens the widget with the tool's result. */
|
|
@@ -20,7 +20,7 @@ export async function publicUrlOf(plugin, path) {
|
|
|
20
20
|
row = (await controlDb.query.pluginAddress.findFirst({ where }));
|
|
21
21
|
}
|
|
22
22
|
const rest = path.startsWith("/") ? path : `/${path}`;
|
|
23
|
-
return `${env.
|
|
23
|
+
return `${env.publicUrl}/api/public/plugins/${plugin}/${row.ref}${rest === "/" ? "" : rest}`;
|
|
24
24
|
}
|
|
25
25
|
/** The tenant a plugin's public address belongs to. */
|
|
26
26
|
export async function tenantOfAddress(plugin, ref) {
|
|
@@ -139,7 +139,7 @@ export const apiRoutes = new Hono()
|
|
|
139
139
|
client: who.client,
|
|
140
140
|
urls: {
|
|
141
141
|
app: env.appUrl,
|
|
142
|
-
embed: `${env.
|
|
142
|
+
embed: `${env.publicUrl}/embed.js`,
|
|
143
143
|
studio: `${env.appUrl}/studio`,
|
|
144
144
|
newWizard: `${env.appUrl}/studio/new`,
|
|
145
145
|
space: `${env.appUrl}/studio/space`,
|
|
@@ -216,7 +216,7 @@ export const publicRoutes = new Hono()
|
|
|
216
216
|
codeMissed(ip);
|
|
217
217
|
return c.json({ error: "not found" }, 404);
|
|
218
218
|
}
|
|
219
|
-
return c.json({ token: found.token, url: `${env.
|
|
219
|
+
return c.json({ token: found.token, url: `${env.publicUrl}/w/${found.token}` });
|
|
220
220
|
})
|
|
221
221
|
.use("/wizards/:token", wizardLink)
|
|
222
222
|
.use("/wizards/:token/*", wizardLink)
|
|
@@ -1103,7 +1103,10 @@ export const connectCallback = new Hono().get("/callback", async (c) => {
|
|
|
1103
1103
|
<body style="font:16px system-ui;display:grid;place-items:center;height:100vh;margin:0;color:#333">
|
|
1104
1104
|
<p>${message}</p>
|
|
1105
1105
|
<script>
|
|
1106
|
-
|
|
1106
|
+
// The opener is the studio or a wizard's page: each origin gets the word, the wrong one drops it.
|
|
1107
|
+
for (const origin of ${JSON.stringify([...new Set([env.appUrl, env.publicUrl])])}) {
|
|
1108
|
+
try { window.opener && window.opener.postMessage({ type: "wizards:connected", ok: ${ok} }, origin); } catch (e) {}
|
|
1109
|
+
}
|
|
1107
1110
|
setTimeout(function () { window.close(); }, ${ok ? 300 : 4000});
|
|
1108
1111
|
</script>`);
|
|
1109
1112
|
});
|
|
@@ -54,7 +54,7 @@ export async function apiSpaceDetails(userId, spaceId) {
|
|
|
54
54
|
about: p.brand.about ?? "",
|
|
55
55
|
colors: p.brand.colors ?? [],
|
|
56
56
|
facts: p.facts.map(({ label, value }) => ({ label, value })),
|
|
57
|
-
logoUrl: logo ? `${env.
|
|
57
|
+
logoUrl: logo ? `${env.publicUrl}/api/public/logos/${logo}` : null,
|
|
58
58
|
knowledge: await knowledgeCounts(p.id),
|
|
59
59
|
writable: await projectWritable(p),
|
|
60
60
|
studioUrl: `${env.appUrl}/studio/space`,
|
|
@@ -97,7 +97,7 @@ export async function apiWizards(userId, spaceId) {
|
|
|
97
97
|
shareUrl: live ? shareUrl(w.shareToken) : null,
|
|
98
98
|
shareEnabled: w.shareEnabled,
|
|
99
99
|
iconUrl: live
|
|
100
|
-
? `${env.
|
|
100
|
+
? `${env.publicUrl}/api/public/wizards/${w.shareToken}/icons/icon-192.png`
|
|
101
101
|
: null,
|
|
102
102
|
available: Boolean(live) && !reason,
|
|
103
103
|
unavailableReason: reason && noteText(reason, wizardLang(def)),
|
|
@@ -82,7 +82,7 @@ export function runnerUrl(w, runner, settings) {
|
|
|
82
82
|
}
|
|
83
83
|
if (runner.plugin && env.fromSource) {
|
|
84
84
|
// From source Vite serves /w/*: a plugin's page is reached on this server's own address.
|
|
85
|
-
return `${env.
|
|
85
|
+
return `${env.publicUrl}/api/public/wizards/${w.shareToken}/runners/${runner.id}`;
|
|
86
86
|
}
|
|
87
87
|
return runner.id === settings.default
|
|
88
88
|
? shareUrl(w.shareToken)
|
|
@@ -8,7 +8,7 @@ import { htmlToPng } from "../render/convert.js";
|
|
|
8
8
|
import { dropLinks, dropRuns, putLink } from "../tenants/control.js";
|
|
9
9
|
import { brandView } from "./brand.js";
|
|
10
10
|
import { ServiceError } from "./errors.js";
|
|
11
|
-
export const shareUrlFor = (token) => `${env.
|
|
11
|
+
export const shareUrlFor = (token) => `${env.publicUrl}/s/${token}`;
|
|
12
12
|
/** Shares a finished run. Idempotent: the same run keeps the same link. */
|
|
13
13
|
export async function shareRun(run) {
|
|
14
14
|
if (run.status !== "done") {
|
|
@@ -71,7 +71,7 @@ export async function shareView(run) {
|
|
|
71
71
|
shown,
|
|
72
72
|
createdAt: run.createdAt.toISOString(),
|
|
73
73
|
expiresAt: run.expiresAt?.toISOString() ?? null,
|
|
74
|
-
wizardUrl: w?.shareEnabled && w.publishedVersion !== null ? `${env.
|
|
74
|
+
wizardUrl: w?.shareEnabled && w.publishedVersion !== null ? `${env.publicUrl}/w/${w.shareToken}` : null,
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
@@ -32,7 +32,7 @@ const BLANK = {
|
|
|
32
32
|
],
|
|
33
33
|
};
|
|
34
34
|
export const studioUrl = (wizardId) => `${env.appUrl}/studio/edit/${wizardId}`;
|
|
35
|
-
export const shareUrl = (token) => `${env.
|
|
35
|
+
export const shareUrl = (token) => `${env.publicUrl}/w/${token}`;
|
|
36
36
|
const newShareToken = () => nanoid(14);
|
|
37
37
|
export async function ownedWizard(_userId, wizardId) {
|
|
38
38
|
const w = await db.query.wizard.findFirst({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{t as r}from"./logo-C4V2_3Ar.js";import{t as i}from"./preload-helper-CNEI7N0N.js";import{Ct as a,Tt as o,Wt as s,Yt as c,_t as l,ct as u,lt as d,mt as f,ot as p,st as m,xt as h,yt as g}from"./ui-SKtUMhUq.js";import{H as _,U as v,et as y}from"./index-CsKV2ZNO.js";import{c as b,f as x}from"./settings-menu-vtL00p0G.js";import{ReleaseNotes as S,loadReleases as C,releaseDate as w,releaseLabel as T}from"./ChangelogDialog-6xNrjOIm.js";var E=e(t(),1),D=[{name:`engenty wizards`,description:{de:`KI-Wizards aus einer Beschreibung, mit einem Link geteilt.`,en:`AI wizards built from a description, shared with a link.`},homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:{de:`Konnektoren, Datentabellen, Suche und die Engenties stammen aus dem engenty-Framework.`,en:`Connectors, data tables, search and the engenties come from the engenty framework.`},homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],O=[{name:`Mastra`,description:{de:`Agent-Framework hinter den KI-Schritten.`,en:`Agent framework behind the AI steps.`},homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:{de:`Modell-Aufrufe für Text, Bild, Video und Sprache.`,en:`Model calls for text, image, video and speech.`},homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:{de:`MCP-Server zum Bauen von Wizards, MCP-Client für Werkzeuge der Schritte.`,en:`MCP server for building wizards, MCP client for the steps' tools.`},homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:{de:`HTTP-API der Runtime.`,en:`The runtime's HTTP API.`},homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:{de:`Schema und Migrationen der Datenbanken.`,en:`Schema and migrations of the databases.`},homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:{de:`Eine Datenbank je Mandant, lokal als Datei oder bei Turso.`,en:`One database per tenant, a local file or at Turso.`},homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:{de:`Browser-Schritte sowie PDF- und PNG-Export.`,en:`Browser steps and the PDF and PNG export.`},homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`agentOS`,description:{de:`Sandbox für Code-Schritte ohne Docker.`,en:`Sandbox for code steps without Docker.`},homepage:`https://github.com/rivet-dev/agentos`,license:`Apache-2.0`},{name:`React`,description:{de:`UI-Bibliothek der Web-App.`,en:`UI library of the web app.`},homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:{de:`Build-Werkzeug der Web-App.`,en:`Build tool of the web app.`},homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:{de:`Styling der Oberfläche.`,en:`Styling of the interface.`},homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:{de:`Das Diagramm der Schritte im Editor.`,en:`The diagram of steps in the editor.`},homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:{de:`Server-Daten in der Web-App.`,en:`Server data in the web app.`},homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:{de:`Das Terminal auf der Seite, in dem sich KI-Clients anmelden.`,en:`The terminal on the page where AI clients sign in.`},homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:{de:`Icons.`,en:`Icons.`},homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:{de:`Schrift der Oberfläche.`,en:`Typeface of the interface.`},homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:{de:`Schrift der Überschriften.`,en:`Typeface of the headings.`},homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:{de:`Erzeugt den Changelog aus den Commits.`,en:`Generates the changelog from the commits.`},homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],k=e(n(),1),A=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function j({name:e,homepage:t,version:n,license:r,description:i}){return(0,k.jsxs)(`li`,{className:`py-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,k.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 font-medium text-[0.875rem] text-ink underline-offset-4 hover:underline`,children:[e,(0,k.jsx)(s,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,k.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,k.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function M({title:e,hint:t,children:n}){return(0,k.jsxs)(`section`,{className:`mt-6`,children:[(0,k.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,k.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function N({credits:e}){return(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,k.jsx)(j,{name:e.name,homepage:e.homepage,license:e.license,description:e.description[h]},e.name))})}function P({label:e,packages:t}){return(0,k.jsxs)(`div`,{className:`mt-4`,children:[(0,k.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,k.jsx)(j,{...e},e.name))})]})}function F({active:e}){let[t,n]=(0,E.useState)(null),[r,o]=(0,E.useState)(``);(0,E.useEffect)(()=>{if(!e||t)return;let r=!1;return i(()=>import(`./oss-credits-BQQX0kvk.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,E.useEffect)(()=>{e||o(``)},[e]);let s=r.trim().toLowerCase(),c=e=>s?e.filter(e=>A(s,e.name,e.license,e.description.de,e.description.en)):e,l=e=>s?e.filter(e=>A(s,e.name,e.license,e.version)):e,u=c(D),p=c(O),h=t?[{id:`shared`,label:a(`about.creditsShared`),packages:l(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:l(e.packages)}))].filter(e=>e.packages.length>0):[],g=u.length===0&&p.length===0&&h.length===0;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:a(`about.creditsHint`)}),(0,k.jsx)(d,{type:`search`,value:r,placeholder:a(`about.search`),onChange:e=>o(e.target.value)}),u.length>0?(0,k.jsx)(M,{title:a(`about.creditsProduct`),children:(0,k.jsx)(N,{credits:u})}):null,p.length>0?(0,k.jsx)(M,{title:a(`about.creditsBuiltWith`),children:(0,k.jsx)(N,{credits:p})}):null,t===null?(0,k.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,k.jsx)(f,{})}):h.length>0?(0,k.jsx)(M,{title:a(`about.creditsDeps`),hint:s?void 0:a(`about.creditsDepsHint`),children:h.map(e=>(0,k.jsx)(P,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,k.jsx)(m,{children:a(`about.noMatches`)}):null]})}var I=[`new`,`earlier`,`credits`],L=e=>a(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),R=e=>e===1?a(`about.change`):a(`about.changes`,{n:e});function z({open:e,onClose:t,me:n}){let i=n?.mode===`local`,{data:s,latest:d}=v(i&&e),[m,h]=(0,E.useState)(null),[D,O]=(0,E.useState)(`new`),A=x(I.indexOf(D)),j=s?.newer&&d?d:y;(0,E.useEffect)(()=>{if(!e)return;let t=!1;return h(null),C(j===`0.2.61`?void 0:j).then(e=>{t||h(e)}),()=>{t=!0}},[e,j]);let M=m?.find(e=>e.version===`v${j}`)??m?.[0]??null,N=m?.filter(e=>e!==M)??[],P=i?s?.kind??null:`cloud`;return(0,k.jsxs)(p,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,k.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,k.jsx)(u,{label:a(`common.close`),onClick:t,children:(0,k.jsx)(o,{className:`size-4`})})}),(0,k.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,k.jsx)(r,{size:96}),(0,k.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,k.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,k.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,k.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[a(`about.version`,{v:y}),P?` · ${a(`about.kind.${P}`)}`:``]})]}),i?(0,k.jsx)(`div`,{className:`mt-5`,children:(0,k.jsx)(_,{enabled:e})}):null,(0,k.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,k.jsx)(l,{value:D,onChange:O,options:I.map(e=>({id:e,label:L(e)})),label:a(`about.title`)})}),(0,k.jsxs)(`div`,{className:g(`mt-5`,b(A)),children:[D===`new`?m===null?(0,k.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,k.jsx)(f,{})}):M?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[T(M),(0,k.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:w(M)})]}),(0,k.jsx)(`div`,{className:`mt-3`,children:(0,k.jsx)(S,{release:M})})]}):(0,k.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:a(`about.changelogEmpty`)}):null,D===`earlier`?(0,k.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:N.map(e=>(0,k.jsxs)(`details`,{className:`group/r py-2`,children:[(0,k.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,k.jsx)(c,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,k.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:T(e)}),(0,k.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:w(e)}),(0,k.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:R(e.commits.length)})]}),(0,k.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,k.jsx)(S,{release:e})})]},e.version??`unreleased`))}):null,D===`credits`?(0,k.jsx)(F,{active:!0}):null]},D)]})}export{z as AboutDialog};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{t as r}from"./logo-C4V2_3Ar.js";import{t as i}from"./preload-helper-CNEI7N0N.js";import{Ct as a,Dt as o,Kt as s,Tt as c,Zt as l,ct as u,dt as d,gt as f,lt as p,ut as m,xt as h,yt as g}from"./ui-aWLrX8hF.js";import{H as _,U as v,et as y}from"./index-DIF70pQf.js";import{c as b,f as x}from"./settings-menu-mxakooyx.js";import{ReleaseNotes as S,loadReleases as C,releaseDate as w,releaseLabel as T}from"./ChangelogDialog-no0Qp8Xx.js";var E=e(t(),1),D=[{name:`engenty wizards`,description:{de:`KI-Wizards aus einer Beschreibung, mit einem Link geteilt.`,en:`AI wizards built from a description, shared with a link.`},homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:{de:`Konnektoren, Datentabellen, Suche und die Engenties stammen aus dem engenty-Framework.`,en:`Connectors, data tables, search and the engenties come from the engenty framework.`},homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],O=[{name:`Mastra`,description:{de:`Agent-Framework hinter den KI-Schritten.`,en:`Agent framework behind the AI steps.`},homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:{de:`Modell-Aufrufe für Text, Bild, Video und Sprache.`,en:`Model calls for text, image, video and speech.`},homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:{de:`MCP-Server zum Bauen von Wizards, MCP-Client für Werkzeuge der Schritte.`,en:`MCP server for building wizards, MCP client for the steps' tools.`},homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:{de:`HTTP-API der Runtime.`,en:`The runtime's HTTP API.`},homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:{de:`Schema und Migrationen der Datenbanken.`,en:`Schema and migrations of the databases.`},homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:{de:`Eine Datenbank je Mandant, lokal als Datei oder bei Turso.`,en:`One database per tenant, a local file or at Turso.`},homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:{de:`Browser-Schritte sowie PDF- und PNG-Export.`,en:`Browser steps and the PDF and PNG export.`},homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`agentOS`,description:{de:`Sandbox für Code-Schritte ohne Docker.`,en:`Sandbox for code steps without Docker.`},homepage:`https://github.com/rivet-dev/agentos`,license:`Apache-2.0`},{name:`React`,description:{de:`UI-Bibliothek der Web-App.`,en:`UI library of the web app.`},homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:{de:`Build-Werkzeug der Web-App.`,en:`Build tool of the web app.`},homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:{de:`Styling der Oberfläche.`,en:`Styling of the interface.`},homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:{de:`Das Diagramm der Schritte im Editor.`,en:`The diagram of steps in the editor.`},homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:{de:`Server-Daten in der Web-App.`,en:`Server data in the web app.`},homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:{de:`Das Terminal auf der Seite, in dem sich KI-Clients anmelden.`,en:`The terminal on the page where AI clients sign in.`},homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:{de:`Icons.`,en:`Icons.`},homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:{de:`Schrift der Oberfläche.`,en:`Typeface of the interface.`},homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:{de:`Schrift der Überschriften.`,en:`Typeface of the headings.`},homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:{de:`Erzeugt den Changelog aus den Commits.`,en:`Generates the changelog from the commits.`},homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],k=e(n(),1),A=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function j({name:e,homepage:t,version:n,license:r,description:i}){return(0,k.jsxs)(`li`,{className:`py-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,k.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 font-medium text-[0.875rem] text-ink underline-offset-4 hover:underline`,children:[e,(0,k.jsx)(s,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,k.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,k.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function M({title:e,hint:t,children:n}){return(0,k.jsxs)(`section`,{className:`mt-6`,children:[(0,k.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,k.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function N({credits:e}){return(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,k.jsx)(j,{name:e.name,homepage:e.homepage,license:e.license,description:e.description[a]},e.name))})}function P({label:e,packages:t}){return(0,k.jsxs)(`div`,{className:`mt-4`,children:[(0,k.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,k.jsx)(j,{...e},e.name))})]})}function F({active:e}){let[t,n]=(0,E.useState)(null),[r,a]=(0,E.useState)(``);(0,E.useEffect)(()=>{if(!e||t)return;let r=!1;return i(()=>import(`./oss-credits-BQQX0kvk.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,E.useEffect)(()=>{e||a(``)},[e]);let o=r.trim().toLowerCase(),s=e=>o?e.filter(e=>A(o,e.name,e.license,e.description.de,e.description.en)):e,l=e=>o?e.filter(e=>A(o,e.name,e.license,e.version)):e,u=s(D),m=s(O),h=t?[{id:`shared`,label:c(`about.creditsShared`),packages:l(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:l(e.packages)}))].filter(e=>e.packages.length>0):[],g=u.length===0&&m.length===0&&h.length===0;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:c(`about.creditsHint`)}),(0,k.jsx)(d,{type:`search`,value:r,placeholder:c(`about.search`),onChange:e=>a(e.target.value)}),u.length>0?(0,k.jsx)(M,{title:c(`about.creditsProduct`),children:(0,k.jsx)(N,{credits:u})}):null,m.length>0?(0,k.jsx)(M,{title:c(`about.creditsBuiltWith`),children:(0,k.jsx)(N,{credits:m})}):null,t===null?(0,k.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,k.jsx)(f,{})}):h.length>0?(0,k.jsx)(M,{title:c(`about.creditsDeps`),hint:o?void 0:c(`about.creditsDepsHint`),children:h.map(e=>(0,k.jsx)(P,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,k.jsx)(p,{children:c(`about.noMatches`)}):null]})}var I=[`new`,`earlier`,`credits`],L=e=>c(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),R=e=>e===1?c(`about.change`):c(`about.changes`,{n:e});function z({open:e,onClose:t,me:n}){let i=n?.mode===`local`,{data:a,latest:s}=v(i&&e),[d,p]=(0,E.useState)(null),[D,O]=(0,E.useState)(`new`),A=x(I.indexOf(D)),j=a?.newer&&s?s:y;(0,E.useEffect)(()=>{if(!e)return;let t=!1;return p(null),C(j===`0.3.1`?void 0:j).then(e=>{t||p(e)}),()=>{t=!0}},[e,j]);let M=d?.find(e=>e.version===`v${j}`)??d?.[0]??null,N=d?.filter(e=>e!==M)??[],P=i?a?.kind??null:`cloud`;return(0,k.jsxs)(u,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,k.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,k.jsx)(m,{label:c(`common.close`),onClick:t,children:(0,k.jsx)(o,{className:`size-4`})})}),(0,k.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,k.jsx)(r,{size:96}),(0,k.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,k.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,k.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,k.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[c(`about.version`,{v:y}),P?` · ${c(`about.kind.${P}`)}`:``]})]}),i?(0,k.jsx)(`div`,{className:`mt-5`,children:(0,k.jsx)(_,{enabled:e})}):null,(0,k.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,k.jsx)(g,{value:D,onChange:O,options:I.map(e=>({id:e,label:L(e)})),label:c(`about.title`)})}),(0,k.jsxs)(`div`,{className:h(`mt-5`,b(A)),children:[D===`new`?d===null?(0,k.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,k.jsx)(f,{})}):M?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[T(M),(0,k.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:w(M)})]}),(0,k.jsx)(`div`,{className:`mt-3`,children:(0,k.jsx)(S,{release:M})})]}):(0,k.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:c(`about.changelogEmpty`)}):null,D===`earlier`?(0,k.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:N.map(e=>(0,k.jsxs)(`details`,{className:`group/r py-2`,children:[(0,k.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,k.jsx)(l,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,k.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:T(e)}),(0,k.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:w(e)}),(0,k.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:R(e.commits.length)})]}),(0,k.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,k.jsx)(S,{release:e})})]},e.version??`unreleased`))}):null,D===`credits`?(0,k.jsx)(F,{active:!0}):null]},D)]})}export{z as AboutDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{t as r}from"./preload-helper-CNEI7N0N.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{t as r}from"./preload-helper-CNEI7N0N.js";import{Tt as i,ct as a,dt as o,gt as s,lt as c,xt as l}from"./ui-aWLrX8hF.js";var u=e(t(),1),d=e(n(),1);function f(e){switch(e.group){case`Added`:return{label:`NEW`,dot:`bg-moss`};case`Fixed`:return{label:`FIXED`,dot:`bg-amber`};case`Changed`:return{label:`CHANGED`,dot:`bg-cobalt`};case`Performance`:return{label:`PERFORMANCE`,dot:`bg-ember`};case`Deploy`:return{label:`DEPLOY`,dot:`bg-ink-4`};case`Docs`:return{label:`DOCS`,dot:`bg-ink-4`};default:return{label:`OTHER`,dot:`bg-ink-4`}}}var p=e=>e.version?e.version.replace(/^v/,``):i(`about.unreleased`),m=e=>e.timestamp?new Date(e.timestamp*1e3).toISOString().slice(0,10):``,h=e=>e.charAt(0).toUpperCase()+e.slice(1);function g(e,t){let n=t.trim().toLowerCase();if(!n)return e;let r=[];for(let t of e){if(`${p(t)} ${m(t)}`.toLowerCase().includes(n)){r.push(t);continue}let e=t.commits.filter(e=>`${f(e).label} ${e.scope??``} ${e.message}`.toLowerCase().includes(n));e.length>0&&r.push({...t,commits:e})}return r}async function _(e){if(e)try{let t=await fetch(`https://raw.githubusercontent.com/engenty/engenty-wizards/v${e}/apps/web/src/about/changelog.json`,{signal:AbortSignal.timeout(5e3)});if(t.ok)return await t.json()}catch{}return(await r(async()=>{let{default:e}=await import(`./changelog-DO6Z2SDc.js`);return{default:e}},[])).default}function v({release:e}){return(0,d.jsx)(`ul`,{className:`flex flex-col gap-2`,children:e.commits.map(e=>{let t=f(e);return(0,d.jsxs)(`li`,{className:`flex items-start gap-2.5 text-[0.875rem]`,children:[(0,d.jsx)(`span`,{className:l(`mt-[7px] size-1.5 shrink-0 rounded-full`,t.dot)}),(0,d.jsxs)(`span`,{className:`min-w-0 text-ink-2`,children:[(0,d.jsxs)(`span`,{className:`font-semibold text-[0.75rem] text-ink tracking-wide`,children:[t.label,e.scope?` [${e.scope}]`:``]}),` `,h(e.message),e.breaking?(0,d.jsx)(`span`,{className:`ml-1.5 rounded-full bg-rose-tint px-1.5 py-0.5 font-medium text-[0.75rem] text-rose`,children:i(`about.breaking`)}):null]})]},e.id)})})}function y({open:e,onClose:t,version:n}){let[r,l]=(0,u.useState)(null),[f,h]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||r)return;let t=!1;return _(n).then(e=>{t||l(e)}),()=>{t=!0}},[e,r,n]),(0,u.useEffect)(()=>{e||h(``)},[e]);let y=r?g(r,f):[];return(0,d.jsxs)(a,{open:e,onClose:t,title:i(`about.changelog`),wide:!0,height:`tall`,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[0.875rem] text-ink-3`,children:i(`about.changelogHint`)}),r===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(s,{})}):r.length===0?(0,d.jsx)(c,{children:i(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o,{type:`search`,value:f,placeholder:i(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(c,{children:i(`about.noMatches`)}):null,y.map(e=>(0,d.jsxs)(`section`,{className:`mt-6`,children:[(0,d.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[p(e),(0,d.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:m(e)})]}),(0,d.jsx)(`div`,{className:`mt-3`,children:(0,d.jsx)(v,{release:e})})]},e.version??`unreleased`))]})]})}export{y as ChangelogDialog,v as ReleaseNotes,_ as loadReleases,m as releaseDate,p as releaseLabel};
|