wizards 0.2.56 → 0.2.57
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/db/control-schema.js +13 -0
- package/apps/runtime/dist/db/migrations/control/0008_runner.sql +8 -0
- package/apps/runtime/dist/db/migrations/control/meta/0008_snapshot.json +505 -0
- package/apps/runtime/dist/db/migrations/control/meta/_journal.json +7 -0
- package/apps/runtime/dist/db/migrations/tenant/0014_run_answer.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0014_snapshot.json +3154 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
- package/apps/runtime/dist/db/schema.js +4 -0
- package/apps/runtime/dist/engine/asks.js +53 -33
- package/apps/runtime/dist/engine/events.js +45 -1
- package/apps/runtime/dist/engine/owner.js +32 -0
- package/apps/runtime/dist/engine/runner.js +91 -79
- package/apps/runtime/dist/env.js +19 -0
- package/apps/runtime/dist/index.js +13 -2
- package/apps/runtime/dist/plugins/runs.js +7 -6
- package/apps/runtime/dist/routes/runs.js +17 -8
- package/apps/runtime/dist/services/runs.js +7 -8
- package/apps/runtime/dist/tenants/control.js +85 -7
- package/apps/web/dist/assets/{AboutDialog-Bv7p9iGr.js → AboutDialog-DEZCEQlN.js} +1 -1
- package/apps/web/dist/assets/{ChangelogDialog-D4sBrhi-.js → ChangelogDialog-CgnnJj4G.js} +1 -1
- package/apps/web/dist/assets/{ChatView-Bntm0u8V.js → ChatView-BnnKdwk4.js} +1 -1
- package/apps/web/dist/assets/{EditorPage-DaVeNzHU.js → EditorPage-CeDWjq4z.js} +1 -1
- package/apps/web/dist/assets/{FlowPreview-C0tTz51A.js → FlowPreview-Du028FI3.js} +1 -1
- package/apps/web/dist/assets/{Harness-De-PsLFA.js → Harness-CEPy4MEp.js} +1 -1
- package/apps/web/dist/assets/{Marketplace-7Bdv7Gd5.js → Marketplace-ms58DQJ9.js} +2 -2
- package/apps/web/dist/assets/{NewWizardPage-CV7jrSkz.js → NewWizardPage-CEQSNXeZ.js} +1 -1
- package/apps/web/dist/assets/{ProjectPage-CBCd24oM.js → ProjectPage-CXDpKoK2.js} +1 -1
- package/apps/web/dist/assets/{PublicRunner-CVmkHSnC.js → PublicRunner-DMmtmzBX.js} +1 -1
- package/apps/web/dist/assets/{RunDrawer-CvzuYc0d.js → RunDrawer-BIojYB0g.js} +1 -1
- package/apps/web/dist/assets/{RunnerView-BtZp1FD6.js → RunnerView-D8OGEoMl.js} +1 -1
- package/apps/web/dist/assets/{SettingsPage--Zj2pTgf.js → SettingsPage-BlMZL4_d.js} +1 -1
- package/apps/web/dist/assets/{SetupPage-F_e8f1to.js → SetupPage-Doz9T3kv.js} +1 -1
- package/apps/web/dist/assets/{SharePage-DLivbYu6.js → SharePage-DOJXdsyi.js} +1 -1
- package/apps/web/dist/assets/changelog-B1jhC7Fv.js +1 -0
- package/apps/web/dist/assets/{esm-BMtXxAe0.js → esm-D6fM9MdG.js} +1 -1
- package/apps/web/dist/assets/{index-MlQy_Qoy.js → index-nfRuCdVt.js} +4 -4
- package/apps/web/dist/assets/{settings-menu-JtMfy9en.js → settings-menu-BGfn4LJE.js} +1 -1
- package/apps/web/dist/index.html +2 -2
- package/node_modules/@engenty-wizards/shared/dist/definition.js +1 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.js +1 -0
- package/node_modules/@engenty-wizards/shared/dist/fit.js +1 -0
- package/node_modules/@engenty-wizards/shared/dist/store.js +1 -0
- package/node_modules/@engenty-wizards/shared/dist/surface.js +1 -0
- package/package.json +1 -1
- package/apps/web/dist/assets/changelog-CWualFcc.js +0 -1
|
@@ -15,7 +15,8 @@ import { finishPluginOAuth, pluginStateTenant } from "../connectors/plugin-conne
|
|
|
15
15
|
import { db, schema, withTenant } from "../db/client.js";
|
|
16
16
|
import { answerAsk, pendingAsk } from "../engine/asks.js";
|
|
17
17
|
import { answerDevice, offerDevice } from "../engine/device.js";
|
|
18
|
-
import { emitEvent, signalChanged,
|
|
18
|
+
import { emitEvent, signalChanged, watchRun } from "../engine/events.js";
|
|
19
|
+
import { fromOwner } from "../engine/owner.js";
|
|
19
20
|
import { pushAvailable, setPushDevice } from "../engine/push.js";
|
|
20
21
|
import { liveResources } from "../engine/resources.js";
|
|
21
22
|
import { cancel, createRun, goBack, NoCreditsError, projectIdOf, RunConflict, RunInputError, retry, reviewStep, runView, submitPage, talkAllowed, } from "../engine/runner.js";
|
|
@@ -403,8 +404,8 @@ export const runRoutes = new Hono()
|
|
|
403
404
|
await stream.writeSSE({ event: "view", data: JSON.stringify(await viewOf(run)) });
|
|
404
405
|
}
|
|
405
406
|
};
|
|
406
|
-
const unsubscribe =
|
|
407
|
-
if (signal
|
|
407
|
+
const unsubscribe = watchRun(id, (signal) => {
|
|
408
|
+
if (signal?.device) {
|
|
408
409
|
// The runtime asks the phone around the runner to think: not a change of the run.
|
|
409
410
|
if (!closed) {
|
|
410
411
|
void stream.writeSSE({ event: "device", data: JSON.stringify(signal.device) });
|
|
@@ -661,7 +662,7 @@ export const runRoutes = new Hono()
|
|
|
661
662
|
z.object({ type: z.literal("skip") }),
|
|
662
663
|
])
|
|
663
664
|
.parse(await c.req.json());
|
|
664
|
-
if (!answerAsk(run.id, c.req.param("askId"), answer)) {
|
|
665
|
+
if (!(await answerAsk(run.id, c.req.param("askId"), answer))) {
|
|
665
666
|
return refuse(c, { code: "askClosed" }, 409);
|
|
666
667
|
}
|
|
667
668
|
return c.json({ ok: true });
|
|
@@ -671,7 +672,8 @@ export const runRoutes = new Hono()
|
|
|
671
672
|
const run = await accessibleRun(c, c.req.param("id"));
|
|
672
673
|
const resources = run?.status === "running" ? liveResources(run.id) : null;
|
|
673
674
|
if (!resources?.openPage()) {
|
|
674
|
-
|
|
675
|
+
// The run may work in another process: its runner answers.
|
|
676
|
+
return (run && (await fromOwner(c, run.id))) || c.json({ error: "not found" }, 404);
|
|
675
677
|
}
|
|
676
678
|
return c.json({ seat: resources.seatHolder() });
|
|
677
679
|
})
|
|
@@ -681,7 +683,7 @@ export const runRoutes = new Hono()
|
|
|
681
683
|
const run = await accessibleRun(c, c.req.param("id"));
|
|
682
684
|
const resources = run?.status === "running" ? liveResources(run.id) : null;
|
|
683
685
|
if (!(run && resources?.openPage())) {
|
|
684
|
-
return refuse(c, { code: "noBrowser" }, 409);
|
|
686
|
+
return (run && (await fromOwner(c, run.id))) || refuse(c, { code: "noBrowser" }, 409);
|
|
685
687
|
}
|
|
686
688
|
const { to } = z.object({ to: z.enum(["person", "agent"]) }).parse(await c.req.json());
|
|
687
689
|
if (resources.seatHolder() !== to) {
|
|
@@ -699,7 +701,7 @@ export const runRoutes = new Hono()
|
|
|
699
701
|
const run = await accessibleRun(c, c.req.param("id"));
|
|
700
702
|
const resources = run?.status === "running" ? liveResources(run.id) : null;
|
|
701
703
|
if (!resources?.openPage()) {
|
|
702
|
-
return c.notFound();
|
|
704
|
+
return (run && (await fromOwner(c, run.id))) || c.notFound();
|
|
703
705
|
}
|
|
704
706
|
const boundary = "frame";
|
|
705
707
|
const encoder = new TextEncoder();
|
|
@@ -768,7 +770,14 @@ export const runRoutes = new Hono()
|
|
|
768
770
|
.post("/:id/browser/act", async (c) => {
|
|
769
771
|
const run = await accessibleRun(c, c.req.param("id"));
|
|
770
772
|
const resources = run ? liveResources(run.id) : null;
|
|
771
|
-
|
|
773
|
+
if (run?.status === "running" && !resources) {
|
|
774
|
+
// The run works in another process: its runner answers.
|
|
775
|
+
const answered = await fromOwner(c, run.id);
|
|
776
|
+
if (answered) {
|
|
777
|
+
return answered;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
const theirs = run && ((await pendingAsk(run.id)) || resources?.seatHolder() === "person");
|
|
772
781
|
const page = theirs ? resources?.openPage() : null;
|
|
773
782
|
if (!(run && resources && page)) {
|
|
774
783
|
return refuse(c, { code: "notWaiting" }, 409);
|
|
@@ -2,8 +2,8 @@ import { FIELD_WAYS, formatsFor, isDecidedField, shownFields, slotText, wizardLa
|
|
|
2
2
|
import { and, count, desc, eq, gte, inArray, max, or, sql } from "drizzle-orm";
|
|
3
3
|
import { canSpend, MICROS_PER_CREDIT } from "../credits/credits.js";
|
|
4
4
|
import { db, schema } from "../db/client.js";
|
|
5
|
-
import { answerAsk
|
|
6
|
-
import { emitEvent, recentEvents,
|
|
5
|
+
import { answerAsk } from "../engine/asks.js";
|
|
6
|
+
import { emitEvent, recentEvents, watchRun } from "../engine/events.js";
|
|
7
7
|
import { cancel, createRun, goBack, NoCreditsError, pageContext, RunConflict, RunInputError, retry, reviewStep, submitPage, } from "../engine/runner.js";
|
|
8
8
|
import { ModelUnavailableError } from "../model-errors.js";
|
|
9
9
|
import { signedUrl } from "../secrets/signing.js";
|
|
@@ -25,6 +25,7 @@ export async function startTestRun(userId, wizardId, autopilot) {
|
|
|
25
25
|
version: null,
|
|
26
26
|
mode: "test",
|
|
27
27
|
userId,
|
|
28
|
+
unattended: Boolean(autopilot),
|
|
28
29
|
}).catch((err) => {
|
|
29
30
|
throw err instanceof ModelUnavailableError ? new ServiceError("refused", err.message) : err;
|
|
30
31
|
});
|
|
@@ -35,12 +36,10 @@ export async function startTestRun(userId, wizardId, autopilot) {
|
|
|
35
36
|
}
|
|
36
37
|
function fly(runId, answers, acceptReviews) {
|
|
37
38
|
autopilots.add(runId);
|
|
38
|
-
unattended.add(runId);
|
|
39
39
|
let busy = false;
|
|
40
40
|
let again = false;
|
|
41
41
|
const land = () => {
|
|
42
42
|
autopilots.delete(runId);
|
|
43
|
-
unattended.delete(runId);
|
|
44
43
|
unsubscribe();
|
|
45
44
|
clearTimeout(timeout);
|
|
46
45
|
};
|
|
@@ -89,7 +88,7 @@ function fly(runId, answers, acceptReviews) {
|
|
|
89
88
|
busy = false;
|
|
90
89
|
}
|
|
91
90
|
};
|
|
92
|
-
const unsubscribe =
|
|
91
|
+
const unsubscribe = watchRun(runId, () => {
|
|
93
92
|
void step();
|
|
94
93
|
});
|
|
95
94
|
const timeout = setTimeout(land, 30 * 60_000);
|
|
@@ -131,7 +130,7 @@ export async function waitRun(load, seconds) {
|
|
|
131
130
|
let run = await load();
|
|
132
131
|
while (moving(run) && Date.now() < deadline) {
|
|
133
132
|
await new Promise((resolve) => {
|
|
134
|
-
const unsubscribe =
|
|
133
|
+
const unsubscribe = watchRun(run.id, () => {
|
|
135
134
|
unsubscribe();
|
|
136
135
|
clearTimeout(timer);
|
|
137
136
|
resolve();
|
|
@@ -150,7 +149,7 @@ async function waitWhileMoving(userId, runId, seconds, only) {
|
|
|
150
149
|
let run = await ownedRun(userId, runId, only);
|
|
151
150
|
while (moving(run) && Date.now() < deadline) {
|
|
152
151
|
await new Promise((resolve) => {
|
|
153
|
-
const unsubscribe =
|
|
152
|
+
const unsubscribe = watchRun(runId, () => {
|
|
154
153
|
unsubscribe();
|
|
155
154
|
clearTimeout(timer);
|
|
156
155
|
resolve();
|
|
@@ -422,7 +421,7 @@ export async function controlRun(userId, runId, action) {
|
|
|
422
421
|
/** Answers what a running step asks: allow a change in a connected account, or skip it. */
|
|
423
422
|
export async function answerRunAsk(userId, runId, askId, answer) {
|
|
424
423
|
await ownedRun(userId, runId);
|
|
425
|
-
if (!answerAsk(runId, askId, answer === "allow" ? { type: "done" } : { type: "skip" })) {
|
|
424
|
+
if (!(await answerAsk(runId, askId, answer === "allow" ? { type: "done" } : { type: "skip" }))) {
|
|
426
425
|
throw new ServiceError("refused", "This question is no longer open.");
|
|
427
426
|
}
|
|
428
427
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { and, count, eq, gte, inArray, or } from "drizzle-orm";
|
|
1
|
+
import { and, count, eq, gte, inArray, isNull, lt, or, sql } from "drizzle-orm";
|
|
2
2
|
import { control, controlDb } from "../db/client.js";
|
|
3
3
|
import { env } from "../env.js";
|
|
4
4
|
import { currentTenant } from "./tenant.js";
|
|
@@ -108,16 +108,94 @@ export async function dropRuns(runIds) {
|
|
|
108
108
|
.where(inArray(control.runIndex.runId, runIds.slice(i, i + 200)));
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
// --- the queue: which runner works on which run ---------------------------------
|
|
112
|
+
// `active` = the run wants a runner. `owner` = the one driving it, `seen` = its last heartbeat.
|
|
113
|
+
/** An owner silent this long has lost the run: another runner takes it. */
|
|
114
|
+
export const RUNNER_STALE_MS = 30_000;
|
|
115
|
+
/** Puts a run in line for a runner (again): active, owned by nobody. */
|
|
116
|
+
export async function wakeRun(runId) {
|
|
117
|
+
await controlDb
|
|
118
|
+
.update(control.runIndex)
|
|
119
|
+
.set({ active: true, owner: null, seen: null })
|
|
120
|
+
.where(eq(control.runIndex.runId, runId));
|
|
121
|
+
}
|
|
122
|
+
/** The run is done with runners for now: a page, a review or the end. */
|
|
123
|
+
export async function restRun(runId) {
|
|
124
|
+
await controlDb
|
|
125
|
+
.update(control.runIndex)
|
|
126
|
+
.set({ active: false, owner: null, seen: null })
|
|
127
|
+
.where(eq(control.runIndex.runId, runId));
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Takes a run for this runner, in one statement: only while nobody (alive) holds it and the
|
|
131
|
+
* tenant's owned runs stay under its limit. False: someone else has it, or the tenant is at its
|
|
132
|
+
* limit — the run stays in line.
|
|
133
|
+
*/
|
|
134
|
+
export async function claimRun(runId, tenantId, limit) {
|
|
135
|
+
const now = Date.now();
|
|
136
|
+
const stale = now - RUNNER_STALE_MS;
|
|
137
|
+
const result = await controlDb.run(sql `
|
|
138
|
+
UPDATE run_index SET owner = ${env.runner.id}, seen = ${now}
|
|
139
|
+
WHERE run_id = ${runId} AND active = 1
|
|
140
|
+
AND (owner IS NULL OR seen IS NULL OR seen < ${stale})
|
|
141
|
+
AND (SELECT count(*) FROM run_index
|
|
142
|
+
WHERE tenant_id = ${tenantId} AND owner IS NOT NULL AND seen >= ${stale}
|
|
143
|
+
AND run_id != ${runId}) < ${limit}`);
|
|
144
|
+
return result.rowsAffected > 0;
|
|
145
|
+
}
|
|
146
|
+
/** This runner still works on these runs. */
|
|
147
|
+
export async function heartbeatRuns(runIds) {
|
|
148
|
+
if (runIds.length) {
|
|
149
|
+
await controlDb
|
|
150
|
+
.update(control.runIndex)
|
|
151
|
+
.set({ seen: new Date() })
|
|
152
|
+
.where(and(eq(control.runIndex.owner, env.runner.id), inArray(control.runIndex.runId, runIds)));
|
|
153
|
+
}
|
|
114
154
|
}
|
|
115
|
-
/**
|
|
116
|
-
export async function
|
|
155
|
+
/** A runner that stops hands its runs back to the line; another takes them at once. */
|
|
156
|
+
export async function disownRuns() {
|
|
157
|
+
await controlDb
|
|
158
|
+
.update(control.runIndex)
|
|
159
|
+
.set({ owner: null, seen: null })
|
|
160
|
+
.where(eq(control.runIndex.owner, env.runner.id));
|
|
161
|
+
}
|
|
162
|
+
/** The runs in line: unowned, or whose owner fell silent. */
|
|
163
|
+
export async function waitingRuns() {
|
|
164
|
+
const stale = new Date(Date.now() - RUNNER_STALE_MS);
|
|
117
165
|
return controlDb
|
|
118
166
|
.select({ runId: control.runIndex.runId, tenantId: control.runIndex.tenantId })
|
|
119
167
|
.from(control.runIndex)
|
|
120
|
-
.where(eq(control.runIndex.active, true))
|
|
168
|
+
.where(and(eq(control.runIndex.active, true), or(isNull(control.runIndex.owner), isNull(control.runIndex.seen), lt(control.runIndex.seen, stale))))
|
|
169
|
+
.orderBy(control.runIndex.createdAt);
|
|
170
|
+
}
|
|
171
|
+
/** Where the runner holding a run is reached; null when none holds it or it named no address. */
|
|
172
|
+
export async function ownerUrl(runId) {
|
|
173
|
+
const row = await controlDb.query.runIndex.findFirst({
|
|
174
|
+
where: eq(control.runIndex.runId, runId),
|
|
175
|
+
});
|
|
176
|
+
if (!row?.owner || !row.seen || row.seen.getTime() < Date.now() - RUNNER_STALE_MS) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
const who = await controlDb.query.runner.findFirst({ where: eq(control.runner.id, row.owner) });
|
|
180
|
+
return who?.url || null;
|
|
181
|
+
}
|
|
182
|
+
/** This process reports as a runner: its address, and that it is alive. */
|
|
183
|
+
export async function registerRunner() {
|
|
184
|
+
const now = new Date();
|
|
185
|
+
await controlDb
|
|
186
|
+
.insert(control.runner)
|
|
187
|
+
.values({ id: env.runner.id, url: env.runner.url || null, seen: now })
|
|
188
|
+
.onConflictDoUpdate({
|
|
189
|
+
target: control.runner.id,
|
|
190
|
+
set: { url: env.runner.url || null, seen: now },
|
|
191
|
+
});
|
|
192
|
+
// Runners gone for a day are forgotten.
|
|
193
|
+
await controlDb
|
|
194
|
+
.delete(control.runner)
|
|
195
|
+
.where(lt(control.runner.seen, new Date(now.getTime() - 86_400_000)));
|
|
196
|
+
}
|
|
197
|
+
export async function forgetRunner() {
|
|
198
|
+
await controlDb.delete(control.runner).where(eq(control.runner.id, env.runner.id));
|
|
121
199
|
}
|
|
122
200
|
/** A visitor's runs are counted across every wizard of every tenant. */
|
|
123
201
|
export async function visitorOverLimit(visitorId, ipHash) {
|
|
@@ -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,Gt as o,Mt as s,Tt as c,Wt as l,Yt as u,_t as d,ct as f,lt as p,mt as m,ot as h,rt as g,st as _,xt as v,yt as y}from"./ui-FW7ypPI6.js";import{$ as b,v as x}from"./index-MlQy_Qoy.js";import{c as S,f as C}from"./settings-menu-JtMfy9en.js";import{ReleaseNotes as w,loadReleases as T,releaseDate as E,releaseLabel as D}from"./ChangelogDialog-D4sBrhi-.js";var O=e(t(),1),k=[{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`}],A=[{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`}],j=e(n(),1),M=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function N({name:e,homepage:t,version:n,license:r,description:i}){return(0,j.jsxs)(`li`,{className:`py-2.5`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,j.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,j.jsx)(l,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,j.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,j.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,j.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,j.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function P({title:e,hint:t,children:n}){return(0,j.jsxs)(`section`,{className:`mt-6`,children:[(0,j.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,j.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function F({credits:e}){return(0,j.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,j.jsx)(N,{name:e.name,homepage:e.homepage,license:e.license,description:e.description[v]},e.name))})}function I({label:e,packages:t}){return(0,j.jsxs)(`div`,{className:`mt-4`,children:[(0,j.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,j.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,j.jsx)(N,{...e},e.name))})]})}function L({active:e}){let[t,n]=(0,O.useState)(null),[r,o]=(0,O.useState)(``);(0,O.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,O.useEffect)(()=>{e||o(``)},[e]);let s=r.trim().toLowerCase(),c=e=>s?e.filter(e=>M(s,e.name,e.license,e.description.de,e.description.en)):e,l=e=>s?e.filter(e=>M(s,e.name,e.license,e.version)):e,u=c(k),d=c(A),f=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):[],h=u.length===0&&d.length===0&&f.length===0;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:a(`about.creditsHint`)}),(0,j.jsx)(p,{type:`search`,value:r,placeholder:a(`about.search`),onChange:e=>o(e.target.value)}),u.length>0?(0,j.jsx)(P,{title:a(`about.creditsProduct`),children:(0,j.jsx)(F,{credits:u})}):null,d.length>0?(0,j.jsx)(P,{title:a(`about.creditsBuiltWith`),children:(0,j.jsx)(F,{credits:d})}):null,t===null?(0,j.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,j.jsx)(m,{})}):f.length>0?(0,j.jsx)(P,{title:a(`about.creditsDeps`),hint:s?void 0:a(`about.creditsDepsHint`),children:f.map(e=>(0,j.jsx)(I,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&h?(0,j.jsx)(_,{children:a(`about.noMatches`)}):null]})}var R=[`new`,`earlier`,`credits`],z=e=>a(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),B=e=>e===1?a(`about.change`):a(`about.changes`,{n:e});function V({open:e,onClose:t,me:n}){let i=n?.mode===`local`,{status:p,data:_,latest:v,check:k,apply:A,busy:M,progress:N}=x(i&&e),[P,F]=(0,O.useState)(null),[I,V]=(0,O.useState)(`new`),H=C(R.indexOf(I)),U=_?.newer&&v?v:b;(0,O.useEffect)(()=>{if(!e)return;let t=!1;return F(null),T(U===`0.2.56`?void 0:U).then(e=>{t||F(e)}),()=>{t=!0}},[e,U]);let W=P?.find(e=>e.version===`v${U}`)??P?.[0]??null,G=P?.filter(e=>e!==W)??[],K=i?_?.kind??null:`cloud`,q=_?.checkedAt?new Date(_.checkedAt).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`}):null;return(0,j.jsxs)(h,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,j.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,j.jsx)(f,{label:a(`common.close`),onClick:t,children:(0,j.jsx)(c,{className:`size-4`})})}),(0,j.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,j.jsx)(r,{size:96}),(0,j.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,j.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,j.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,j.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[a(`about.version`,{v:b}),K?` · ${a(`about.kind.${K}`)}`:``]})]}),i?(0,j.jsxs)(`div`,{className:`mt-5 flex flex-col items-center gap-3 text-center text-[0.875rem] text-ink-2`,children:[p.isPending||k.isPending?(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,j.jsx)(m,{className:`size-4 text-ember-strong`}),a(`about.update.checking`)]}):N?(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[M?(0,j.jsx)(m,{className:`size-4 text-ember-strong`}):null,N]}):_?.newer&&v?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5 font-medium text-ink`,children:[(0,j.jsx)(o,{className:`size-4 shrink-0 text-ember-strong`}),a(`about.update.available`,{v})]}),_.canApply?null:(0,j.jsx)(`p`,{className:`text-ink-3`,children:a(`about.update.manual`)})]}):_?.enabled?_.latest===null?(0,j.jsx)(`p`,{children:a(`about.update.unknown`)}):(0,j.jsxs)(`p`,{children:[a(`about.update.upToDate`),q?(0,j.jsxs)(`span`,{className:`text-ink-4`,children:[` `,`· `,a(`about.update.checkedAt`,{when:q})]}):null]}):(0,j.jsx)(`p`,{children:a(`about.update.off`)}),M||p.isPending?null:(0,j.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[_?.newer&&_.canApply&&_.applying!==`running`?(0,j.jsxs)(g,{size:`sm`,disabled:A.isPending,onClick:()=>A.mutate(),children:[(0,j.jsx)(o,{className:`size-4`}),` `,a(`about.update.install`)]}):null,_?.newer&&_.url?(0,j.jsxs)(g,{size:`sm`,variant:`secondary`,onClick:()=>window.open(_.url??``,`_blank`),children:[a(`about.update.release`),` `,(0,j.jsx)(l,{className:`size-4`})]}):null,_?.enabled===!1?null:(0,j.jsxs)(g,{size:`sm`,variant:`secondary`,disabled:k.isPending,onClick:()=>k.mutate(),children:[(0,j.jsx)(s,{className:y(`size-4`,k.isPending&&`animate-spin`)}),` `,a(`about.update.check`)]})]})]}):null,(0,j.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,j.jsx)(d,{value:I,onChange:V,options:R.map(e=>({id:e,label:z(e)})),label:a(`about.title`)})}),(0,j.jsxs)(`div`,{className:y(`mt-5`,S(H)),children:[I===`new`?P===null?(0,j.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,j.jsx)(m,{})}):W?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[D(W),(0,j.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:E(W)})]}),(0,j.jsx)(`div`,{className:`mt-3`,children:(0,j.jsx)(w,{release:W})})]}):(0,j.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:a(`about.changelogEmpty`)}):null,I===`earlier`?(0,j.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:G.map(e=>(0,j.jsxs)(`details`,{className:`group/r py-2`,children:[(0,j.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,j.jsx)(u,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,j.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:D(e)}),(0,j.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:E(e)}),(0,j.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:B(e.commits.length)})]}),(0,j.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,j.jsx)(w,{release:e})})]},e.version??`unreleased`))}):null,I===`credits`?(0,j.jsx)(L,{active:!0}):null]},I)]})}export{V 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,Gt as o,Mt as s,Tt as c,Wt as l,Yt as u,_t as d,ct as f,lt as p,mt as m,ot as h,rt as g,st as _,xt as v,yt as y}from"./ui-FW7ypPI6.js";import{$ as b,v as x}from"./index-nfRuCdVt.js";import{c as S,f as C}from"./settings-menu-BGfn4LJE.js";import{ReleaseNotes as w,loadReleases as T,releaseDate as E,releaseLabel as D}from"./ChangelogDialog-CgnnJj4G.js";var O=e(t(),1),k=[{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`}],A=[{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`}],j=e(n(),1),M=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function N({name:e,homepage:t,version:n,license:r,description:i}){return(0,j.jsxs)(`li`,{className:`py-2.5`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,j.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,j.jsx)(l,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,j.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,j.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,j.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,j.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function P({title:e,hint:t,children:n}){return(0,j.jsxs)(`section`,{className:`mt-6`,children:[(0,j.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,j.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function F({credits:e}){return(0,j.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,j.jsx)(N,{name:e.name,homepage:e.homepage,license:e.license,description:e.description[v]},e.name))})}function I({label:e,packages:t}){return(0,j.jsxs)(`div`,{className:`mt-4`,children:[(0,j.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,j.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,j.jsx)(N,{...e},e.name))})]})}function L({active:e}){let[t,n]=(0,O.useState)(null),[r,o]=(0,O.useState)(``);(0,O.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,O.useEffect)(()=>{e||o(``)},[e]);let s=r.trim().toLowerCase(),c=e=>s?e.filter(e=>M(s,e.name,e.license,e.description.de,e.description.en)):e,l=e=>s?e.filter(e=>M(s,e.name,e.license,e.version)):e,u=c(k),d=c(A),f=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):[],h=u.length===0&&d.length===0&&f.length===0;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:a(`about.creditsHint`)}),(0,j.jsx)(p,{type:`search`,value:r,placeholder:a(`about.search`),onChange:e=>o(e.target.value)}),u.length>0?(0,j.jsx)(P,{title:a(`about.creditsProduct`),children:(0,j.jsx)(F,{credits:u})}):null,d.length>0?(0,j.jsx)(P,{title:a(`about.creditsBuiltWith`),children:(0,j.jsx)(F,{credits:d})}):null,t===null?(0,j.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,j.jsx)(m,{})}):f.length>0?(0,j.jsx)(P,{title:a(`about.creditsDeps`),hint:s?void 0:a(`about.creditsDepsHint`),children:f.map(e=>(0,j.jsx)(I,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&h?(0,j.jsx)(_,{children:a(`about.noMatches`)}):null]})}var R=[`new`,`earlier`,`credits`],z=e=>a(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),B=e=>e===1?a(`about.change`):a(`about.changes`,{n:e});function V({open:e,onClose:t,me:n}){let i=n?.mode===`local`,{status:p,data:_,latest:v,check:k,apply:A,busy:M,progress:N}=x(i&&e),[P,F]=(0,O.useState)(null),[I,V]=(0,O.useState)(`new`),H=C(R.indexOf(I)),U=_?.newer&&v?v:b;(0,O.useEffect)(()=>{if(!e)return;let t=!1;return F(null),T(U===`0.2.57`?void 0:U).then(e=>{t||F(e)}),()=>{t=!0}},[e,U]);let W=P?.find(e=>e.version===`v${U}`)??P?.[0]??null,G=P?.filter(e=>e!==W)??[],K=i?_?.kind??null:`cloud`,q=_?.checkedAt?new Date(_.checkedAt).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`}):null;return(0,j.jsxs)(h,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,j.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,j.jsx)(f,{label:a(`common.close`),onClick:t,children:(0,j.jsx)(c,{className:`size-4`})})}),(0,j.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,j.jsx)(r,{size:96}),(0,j.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,j.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,j.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,j.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[a(`about.version`,{v:b}),K?` · ${a(`about.kind.${K}`)}`:``]})]}),i?(0,j.jsxs)(`div`,{className:`mt-5 flex flex-col items-center gap-3 text-center text-[0.875rem] text-ink-2`,children:[p.isPending||k.isPending?(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,j.jsx)(m,{className:`size-4 text-ember-strong`}),a(`about.update.checking`)]}):N?(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[M?(0,j.jsx)(m,{className:`size-4 text-ember-strong`}):null,N]}):_?.newer&&v?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5 font-medium text-ink`,children:[(0,j.jsx)(o,{className:`size-4 shrink-0 text-ember-strong`}),a(`about.update.available`,{v})]}),_.canApply?null:(0,j.jsx)(`p`,{className:`text-ink-3`,children:a(`about.update.manual`)})]}):_?.enabled?_.latest===null?(0,j.jsx)(`p`,{children:a(`about.update.unknown`)}):(0,j.jsxs)(`p`,{children:[a(`about.update.upToDate`),q?(0,j.jsxs)(`span`,{className:`text-ink-4`,children:[` `,`· `,a(`about.update.checkedAt`,{when:q})]}):null]}):(0,j.jsx)(`p`,{children:a(`about.update.off`)}),M||p.isPending?null:(0,j.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[_?.newer&&_.canApply&&_.applying!==`running`?(0,j.jsxs)(g,{size:`sm`,disabled:A.isPending,onClick:()=>A.mutate(),children:[(0,j.jsx)(o,{className:`size-4`}),` `,a(`about.update.install`)]}):null,_?.newer&&_.url?(0,j.jsxs)(g,{size:`sm`,variant:`secondary`,onClick:()=>window.open(_.url??``,`_blank`),children:[a(`about.update.release`),` `,(0,j.jsx)(l,{className:`size-4`})]}):null,_?.enabled===!1?null:(0,j.jsxs)(g,{size:`sm`,variant:`secondary`,disabled:k.isPending,onClick:()=>k.mutate(),children:[(0,j.jsx)(s,{className:y(`size-4`,k.isPending&&`animate-spin`)}),` `,a(`about.update.check`)]})]})]}):null,(0,j.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,j.jsx)(d,{value:I,onChange:V,options:R.map(e=>({id:e,label:z(e)})),label:a(`about.title`)})}),(0,j.jsxs)(`div`,{className:y(`mt-5`,S(H)),children:[I===`new`?P===null?(0,j.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,j.jsx)(m,{})}):W?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[D(W),(0,j.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:E(W)})]}),(0,j.jsx)(`div`,{className:`mt-3`,children:(0,j.jsx)(w,{release:W})})]}):(0,j.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:a(`about.changelogEmpty`)}):null,I===`earlier`?(0,j.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:G.map(e=>(0,j.jsxs)(`details`,{className:`group/r py-2`,children:[(0,j.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,j.jsx)(u,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,j.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:D(e)}),(0,j.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:E(e)}),(0,j.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:B(e.commits.length)})]}),(0,j.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,j.jsx)(w,{release:e})})]},e.version??`unreleased`))}):null,I===`credits`?(0,j.jsx)(L,{active:!0}):null]},I)]})}export{V 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{Ct as i,lt as a,mt as o,ot as s,st as c,yt as l}from"./ui-FW7ypPI6.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-
|
|
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{Ct as i,lt as a,mt as o,ot as s,st as c,yt as l}from"./ui-FW7ypPI6.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-B1jhC7Fv.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)(s,{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)(o,{})}):r.length===0?(0,d.jsx)(c,{children:i(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a,{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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{$ as r,At as i,C as a,Ct as o,D as s,E as c,Et as l,H as u,J as d,Lt as f,N as p,Ot as m,Pt as h,Q as g,Qt as _,S as v,T as y,X as b,Z as x,a as S,b as C,bt as w,ct as T,dt as E,en as D,f as O,g as k,h as A,i as j,in as M,jt as N,kt as P,m as F,mt as I,vt as L,w as ee,xt as R,yt as z,zt as B}from"./ui-FW7ypPI6.js";import{r as te}from"./brand-DIKyySmf.js";import{n as ne,r as re}from"./RunnerView-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{$ as r,At as i,C as a,Ct as o,D as s,E as c,Et as l,H as u,J as d,Lt as f,N as p,Ot as m,Pt as h,Q as g,Qt as _,S as v,T as y,X as b,Z as x,a as S,b as C,bt as w,ct as T,dt as E,en as D,f as O,g as k,h as A,i as j,in as M,jt as N,kt as P,m as F,mt as I,vt as L,w as ee,xt as R,yt as z,zt as B}from"./ui-FW7ypPI6.js";import{r as te}from"./brand-DIKyySmf.js";import{n as ne,r as re}from"./RunnerView-D8OGEoMl.js";import{t as ie}from"./volume-2-B1mj20eS.js";import{J as ae,X as oe,Y as se,at as ce,ft as le,nt as ue,t as de}from"./index-nfRuCdVt.js";var fe={name:`hand`,size:24,node:[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]};fe.node;var pe=M(fe),me={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};me.node;var he=M(me),ge={name:`video-off`,size:24,node:[[`path`,{d:`M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196`,key:`w8jjjt`}],[`path`,{d:`M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2`,key:`1xawa7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};ge.node;var V=M(ge),_e={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};_e.node;var ve=M(_e),ye=le(),H=e(t(),1),U=e(n(),1),be=typeof window<`u`&&window.matchMedia(`(pointer: coarse)`).matches;function xe({since:e}){let[t,n]=(0,H.useState)(Date.now());if((0,H.useEffect)(()=>{if(!e)return;let t=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(t)},[e]),!e)return null;let r=Math.max(0,Math.floor((t-e)/1e3)),i=String(Math.floor(r/60)).padStart(2,`0`),a=String(r%60).padStart(2,`0`);return(0,U.jsxs)(`span`,{className:`font-mono text-[0.8125rem] text-white/60 tabular-nums`,children:[i,`:`,a]})}function W({label:e,on:t,danger:n,busy:r,onClick:i,children:a}){return(0,U.jsx)(`button`,{type:`button`,"aria-label":e,title:e,"aria-pressed":t,disabled:r,onClick:i,className:z(`flex size-12 items-center justify-center rounded-full transition disabled:opacity-50`,n?`bg-rose text-white hover:brightness-110`:t===!1?`bg-white text-neutral-900 hover:bg-white/90`:`bg-white/15 text-white hover:bg-white/25`),children:r?(0,U.jsx)(I,{className:`size-5`}):a})}function Se({voice:e}){let t=(0,H.useRef)(null),{captions:n}=e;return(0,H.useEffect)(()=>{n.length&&t.current?.scrollIntoView({block:`end`})},[n]),n.length?(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 sm:px-5`,children:(0,U.jsxs)(`ol`,{className:`mx-auto flex max-w-[720px] flex-col gap-2 py-2`,children:[n.map(e=>(0,U.jsx)(`li`,{className:z(`text-[0.9375rem] leading-snug`,e.who===`bot`?`text-white/95`:`text-right text-white/50`),children:e.text},e.id)),(0,U.jsx)(`div`,{ref:t})]})}):null}function Ce({voice:e,view:t,video:n,className:r}){let i=e.state===`live`,a=e.state===`connecting`,[s,c]=(0,H.useState)(null),[u,d]=(0,H.useState)(!1);(0,H.useEffect)(()=>{c(i?Date.now():null)},[i]);let f=async()=>{d(!1),await e.start(),n&&await e.startCamera()},p=()=>{e.stop(),d(!0)},h=n||e.camera,g=[...e.captions].reverse().find(e=>e.who===`bot`),_=[...e.captions].reverse().find(e=>e.who===`me`),v=e.speaking?o(`talk.speaking`):e.listening?o(`talk.listening`):i?o(`talk.live`):a?o(`talk.connecting`):u?o(`video.ended`):``;return(0,U.jsxs)(`section`,{className:z(`relative flex min-h-0 flex-col bg-neutral-950 text-white`,`safe-top`,r),children:[(0,U.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center gap-3 px-4 sm:px-5`,children:[(0,U.jsx)(`div`,{className:`min-w-0 flex-1 truncate font-display font-semibold text-[1rem] tracking-tight`,children:t?.wizard.title??``}),v?(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[0.8125rem] text-white/70`,children:[i?(0,U.jsx)(`span`,{className:z(`size-2 rounded-full`,e.speaking?`animate-pulse-dot bg-emerald-400`:`bg-rose`)}):null,v]}):null,(0,U.jsx)(xe,{since:s})]}),(0,U.jsxs)(`div`,{className:z(`grid min-h-0 gap-2 px-3 pb-2 sm:px-4`,h?`flex-1 grid-cols-1 sm:grid-cols-2`:`shrink-0 grid-cols-1`,!h&&i&&e.captions.length?`h-[38%]`:h?``:`flex-1`),children:[(0,U.jsxs)(`div`,{className:z(`relative min-h-0 overflow-hidden rounded-2xl bg-neutral-900`,!h&&`hidden`),children:[(0,U.jsx)(`video`,{ref:e.video,muted:!0,playsInline:!0,autoPlay:!0,className:z(`absolute inset-0 h-full w-full object-cover`,e.facing===`user`&&`-scale-x-100`,e.camera?`block`:`hidden`)}),e.camera?null:(0,U.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-2 text-white/50`,children:[(0,U.jsx)(V,{className:`size-8`}),(0,U.jsx)(`span`,{className:`text-[0.8125rem]`,children:o(`video.cameraOff`)})]}),(0,U.jsxs)(`span`,{className:`absolute bottom-2 left-3 rounded-md bg-black/50 px-2 py-0.5 text-[0.75rem]`,children:[o(`video.you`),e.muted?(0,U.jsx)(ce,{className:`ml-1.5 inline size-3`}):null]})]}),(0,U.jsxs)(`div`,{className:z(`relative flex min-h-0 items-center justify-center overflow-hidden rounded-2xl transition-shadow`,h?`bg-neutral-900`:`bg-transparent`,h&&e.speaking&&`ring-2 ring-emerald-400/70`),children:[(0,U.jsx)(`div`,{className:z(`rounded-full transition-shadow duration-500`,!h&&e.listening&&`shadow-[0_0_80px_20px_rgba(244,63,94,0.25)]`,!h&&e.speaking&&`shadow-[0_0_80px_20px_rgba(52,211,153,0.3)]`,e.speaking&&`animate-breathe`),children:(0,U.jsx)(te,{kind:t?.wizard.avatar??`round`,size:h?140:200,fluffy:!0,interactive:!1})}),h?(0,U.jsx)(`span`,{className:`absolute bottom-2 left-3 max-w-[85%] truncate rounded-md bg-black/50 px-2 py-0.5 text-[0.75rem]`,children:t?.wizard.title??``}):null]})]}),i&&!h?(0,U.jsx)(Se,{voice:e}):i&&(g||_)?(0,U.jsx)(`div`,{className:`shrink-0 px-4 pb-2 sm:px-5`,children:(0,U.jsxs)(`div`,{className:`mx-auto max-w-[720px] space-y-1 text-center`,children:[_?(0,U.jsx)(`p`,{className:`line-clamp-1 text-[0.8125rem] text-white/50`,children:_.text}):null,g?(0,U.jsx)(`p`,{className:`line-clamp-3 text-[0.9375rem] text-white/95 leading-snug`,children:g.text}):null]})}):null,e.error?(0,U.jsx)(`p`,{className:`shrink-0 px-5 pb-2 text-center text-[0.8125rem] text-rose`,children:e.error}):null,(0,U.jsx)(`div`,{className:`flex shrink-0 items-center justify-center gap-3 px-4 pt-1 pb-4`,children:i?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(W,{label:o(e.muted?`video.unmute`:`video.mute`),on:!e.muted,onClick:e.toggleMute,children:e.muted?(0,U.jsx)(ce,{className:`size-5`}):(0,U.jsx)(B,{className:`size-5`})}),(0,U.jsx)(W,{label:o(e.camera?`talk.cameraOff`:`talk.camera`),on:e.camera,onClick:()=>e.camera?e.stopCamera():void e.startCamera(),children:e.camera?(0,U.jsx)(l,{className:`size-5`}):(0,U.jsx)(V,{className:`size-5`})}),e.camera&&be?(0,U.jsx)(W,{label:o(`video.flip`),onClick:()=>void e.flipCamera(),children:(0,U.jsx)(m,{className:`size-5`})}):null,(0,U.jsx)(W,{label:o(`video.leave`),danger:!0,onClick:p,children:(0,U.jsx)(ue,{className:`size-5`})})]}):(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,U.jsxs)(`button`,{type:`button`,disabled:a||!t?.talk,onClick:()=>void f(),className:`flex h-12 items-center gap-2 rounded-full bg-emerald-500 px-6 font-medium text-[0.9375rem] text-white transition hover:brightness-110 disabled:opacity-50`,children:[a?(0,U.jsx)(I,{className:`size-4`}):n?(0,U.jsx)(l,{className:`size-5`}):(0,U.jsx)(B,{className:`size-5`}),o(u?`video.rejoin`:n?`video.join`:`talk.start`)]}),!u&&!e.error?(0,U.jsx)(`p`,{className:`max-w-sm text-center text-[0.75rem] text-white/50`,children:o(n?`video.hint`:`talk.joinHint`)}):null]})})]})}var we=e=>p[e.kind]!==`device`,Te=1024,Ee=4e3;function De(e,t){return e?e.length>t?`${e.slice(0,t)} …`:e:``}function Oe(e,t,n=!1){let r=[`status: ${e.status}`,`camera: ${n?`on`:`off`}`];if(e.ask)return r.push(e.ask.kind===`confirm`?`question: the step wants to "${e.ask.action.summary}" in ${e.ask.service}; answer_ask allows or skips it`:`question: a sign-in at ${e.ask.site.host}; the person types it on the screen, wait`),r.join(`
|
|
2
2
|
`);if(e.status===`running`){let t=[...e.events].reverse().find(e=>e.type===`tool`||e.type===`info`||e.type===`step_started`);return r.push(`working on: ${e.step?.title??``}`),t&&r.push(`doing: ${w(t)}`),r.join(`
|
|
3
3
|
`)}if(e.status===`done`){r.push(`done. made:`);for(let{step:t,output:n}of e.shown)r.push(`- ${t.title}: ${De(n?.text,400)||`(a file, on the screen)`}`);return r.join(`
|
|
4
4
|
`)}if(e.status===`failed`)return r.push(`failed: ${e.error??``}; go_back or the person retries on the screen`),r.join(`
|