@engenty/wizards-runtime 0.7.5 → 0.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/apps/runtime/dist/authoring/guide.js +5 -1
  2. package/apps/runtime/dist/cli/environment.js +2 -0
  3. package/apps/runtime/dist/cli/main.js +10 -1
  4. package/apps/runtime/dist/cli/sandbox.js +77 -0
  5. package/apps/runtime/dist/cli/status.js +9 -0
  6. package/apps/runtime/dist/debug.js +2 -1
  7. package/apps/runtime/dist/docs/dev/index.md +6 -1
  8. package/apps/runtime/dist/docs/dev/integration/channels.md +11 -0
  9. package/apps/runtime/dist/docs/dev/integration/claude-code-plugin.md +10 -0
  10. package/apps/runtime/dist/docs/dev/integration/embed.md +10 -0
  11. package/apps/runtime/dist/docs/dev/integration/index.md +36 -0
  12. package/apps/runtime/dist/docs/dev/integration/link-and-share.md +10 -0
  13. package/apps/runtime/dist/docs/dev/integration/mcp-apps.md +10 -0
  14. package/apps/runtime/dist/docs/dev/integration/mcp.md +10 -0
  15. package/apps/runtime/dist/docs/dev/integration/meta.json +20 -0
  16. package/apps/runtime/dist/docs/dev/integration/openui.md +181 -0
  17. package/apps/runtime/dist/docs/dev/integration/own-ui.md +10 -0
  18. package/apps/runtime/dist/docs/dev/integration/results.md +11 -0
  19. package/apps/runtime/dist/docs/dev/integration/wordpress.md +10 -0
  20. package/apps/runtime/dist/docs/dev/meta.json +1 -1
  21. package/apps/runtime/dist/docs/user/command-line.md +3 -0
  22. package/apps/runtime/dist/docs/user/server.md +1 -1
  23. package/apps/runtime/dist/engine/steps.js +2 -1
  24. package/apps/runtime/dist/env.js +10 -26
  25. package/apps/runtime/dist/routes/runs.js +14 -1
  26. package/apps/runtime/dist/sandbox/agentos-package.js +73 -0
  27. package/apps/runtime/dist/sandbox/agentos.js +162 -0
  28. package/apps/runtime/dist/sandbox/docker.js +32 -62
  29. package/apps/runtime/dist/sandbox/index.js +37 -8
  30. package/apps/runtime/dist/sandbox/install.js +122 -0
  31. package/apps/runtime/dist/sandbox/mastra.js +71 -0
  32. package/apps/runtime/dist/services/spaces.js +2 -1
  33. package/apps/runtime/dist/tools/code.js +133 -0
  34. package/apps/runtime/dist/tools/connector.js +6 -0
  35. package/apps/runtime/dist/tools/index.js +14 -3
  36. package/apps/web/dist/assets/{AboutDialog-D4mvc-zu.js → AboutDialog-BP8-Ugxf.js} +1 -1
  37. package/apps/web/dist/assets/{ChangelogDialog-DLqpJsF6.js → ChangelogDialog-CD6CQNW9.js} +1 -1
  38. package/apps/web/dist/assets/{ChatView-3laypRcE.js → ChatView-4T0QarEr.js} +1 -1
  39. package/apps/web/dist/assets/{EditorPage-BalA5U2Y.js → EditorPage-CWdV7Xdn.js} +3 -3
  40. package/apps/web/dist/assets/{FlowPreview-CusP7ci9.js → FlowPreview-Dj2gAfuf.js} +1 -1
  41. package/apps/web/dist/assets/{Harness-iYLtOLaK.js → Harness-SLbsntQF.js} +1 -1
  42. package/apps/web/dist/assets/{NewWizardChannels-CbwJ9A56.js → NewWizardChannels-CsDMlji7.js} +1 -1
  43. package/apps/web/dist/assets/{NewWizardPage-BOBYiB9i.js → NewWizardPage-_bFYjlgh.js} +1 -1
  44. package/apps/web/dist/assets/{OnboardingPage-CUwCiVIr.js → OnboardingPage-DObQeCDg.js} +1 -1
  45. package/apps/web/dist/assets/{ProjectPage-Bb16MdYG.js → ProjectPage-DX-oNLWy.js} +1 -1
  46. package/apps/web/dist/assets/{PublicRunner-BCt7Q6C-.js → PublicRunner-Bn9rVNEb.js} +1 -1
  47. package/apps/web/dist/assets/{ReadOnly-kIHX2TEy.js → ReadOnly-CK0piLUV.js} +1 -1
  48. package/apps/web/dist/assets/{RunDrawer-hZ9oeSXu.js → RunDrawer-CVMTLse_.js} +1 -1
  49. package/apps/web/dist/assets/{RunnerView-DUS9fPmx.js → RunnerView-Cjhuu9ua.js} +1 -1
  50. package/apps/web/dist/assets/{SettingsPage-BzwR50fi.js → SettingsPage-DTzuiSAj.js} +1 -1
  51. package/apps/web/dist/assets/{SetupPage-gAp7rPxp.js → SetupPage-D9jlhgiP.js} +1 -1
  52. package/apps/web/dist/assets/{SharePage-DqZWHva_.js → SharePage-Cc3Opj2F.js} +1 -1
  53. package/apps/web/dist/assets/changelog-CJNkd1_L.js +1 -0
  54. package/apps/web/dist/assets/{esm-DXeMu8Lb.js → esm-CfnFE_jE.js} +1 -1
  55. package/apps/web/dist/assets/{index-C5Sm7tTR.js → index-B5F1_qA_.js} +4 -4
  56. package/apps/web/dist/assets/{lock-R_CfU0Xo.js → lock-DAvRJY4B.js} +1 -1
  57. package/apps/web/dist/assets/oss-credits-X2JPiMOR.js +1 -0
  58. package/apps/web/dist/assets/{phone-CgrIS4_-.js → phone-BWOB67tX.js} +1 -1
  59. package/apps/web/dist/assets/{settings-menu-2IMOOlLl.js → settings-menu-CEQlVs1O.js} +1 -1
  60. package/apps/web/dist/assets/{ui-dzGvc3xk.js → ui-BmR_4eL2.js} +1 -1
  61. package/apps/web/dist/assets/{upload-BSuTilFF.js → upload-pBKn2EFp.js} +1 -1
  62. package/apps/web/dist/index.html +2 -2
  63. package/apps/web/dist/mcp/flow.html +2 -2
  64. package/node_modules/@engenty/wizards/dist/openui/Wizard.d.ts +20 -0
  65. package/node_modules/@engenty/wizards/dist/openui/Wizard.js +62 -0
  66. package/node_modules/@engenty/wizards/dist/openui/index.d.ts +9 -0
  67. package/node_modules/@engenty/wizards/dist/openui/index.js +9 -0
  68. package/node_modules/@engenty/wizards/dist/openui/message.d.ts +11 -0
  69. package/node_modules/@engenty/wizards/dist/openui/message.js +69 -0
  70. package/node_modules/@engenty/wizards/dist/openui/run.d.ts +8 -0
  71. package/node_modules/@engenty/wizards/dist/openui/run.js +137 -0
  72. package/node_modules/@engenty/wizards/dist/openui/server.d.ts +37 -0
  73. package/node_modules/@engenty/wizards/dist/openui/server.js +77 -0
  74. package/node_modules/@engenty/wizards/package.json +4 -1
  75. package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +4 -1
  76. package/node_modules/@engenty-wizards/shared/dist/definition.js +1 -0
  77. package/node_modules/@engenty-wizards/shared/dist/fit.js +7 -2
  78. package/node_modules/@engenty-wizards/shared/dist/run.d.ts +14 -0
  79. package/node_modules/@engenty-wizards/shared/dist/run.js +2 -0
  80. package/package.json +4 -3
  81. package/apps/web/dist/assets/changelog-DugmCNSf.js +0 -1
  82. package/apps/web/dist/assets/oss-credits-cZ9NUaLZ.js +0 -1
@@ -0,0 +1,71 @@
1
+ import { posix } from "node:path";
2
+ /** Bytes per append when a file is written through the shell; stays far below ARG_MAX. */
3
+ const WRITE_CHUNK = 48 * 1024;
4
+ const quote = (value) => `'${value.replaceAll("'", `'\\''`)}'`;
5
+ /**
6
+ * Makes one of Mastra's sandboxes (`WorkspaceSandbox`: @mastra/docker, @mastra/e2b,
7
+ * @mastra/daytona, …) the sandbox of a run. The provider is made on the first call and started
8
+ * once; an engine installed apart from the runtime passes a factory that loads it first.
9
+ *
10
+ * Files go through the shell (`base64`), which every provider runs, so they land as the user the
11
+ * commands run as.
12
+ */
13
+ export class MastraRunSandbox {
14
+ capabilities;
15
+ make;
16
+ provider = null;
17
+ constructor(capabilities, make) {
18
+ this.capabilities = capabilities;
19
+ this.make = make;
20
+ }
21
+ start() {
22
+ this.provider ??= (async () => {
23
+ const sandbox = await this.make();
24
+ if (!sandbox.executeCommand) {
25
+ throw new Error(`${sandbox.name} runs no commands.`);
26
+ }
27
+ await sandbox.start?.();
28
+ return sandbox;
29
+ })();
30
+ this.provider.catch(() => {
31
+ this.provider = null;
32
+ });
33
+ return this.provider;
34
+ }
35
+ async exec(command, options = {}) {
36
+ const sandbox = await this.start();
37
+ const result = await sandbox.executeCommand(command, [], {
38
+ timeout: options.timeoutMs,
39
+ cwd: options.cwd,
40
+ env: options.env,
41
+ });
42
+ const stderr = result.timedOut ? `${result.stderr}\ntimed out`.trim() : result.stderr;
43
+ return { exitCode: result.exitCode, stdout: result.stdout, stderr };
44
+ }
45
+ async writeFile(path, data) {
46
+ const target = quote(posix.resolve(this.capabilities.workdir, path));
47
+ const bytes = typeof data === "string" ? Buffer.from(data, "utf8") : Buffer.from(data);
48
+ await this.must(`mkdir -p "$(dirname ${target})" && : > ${target}`);
49
+ for (let at = 0; at < bytes.length; at += WRITE_CHUNK) {
50
+ const chunk = bytes.subarray(at, at + WRITE_CHUNK).toString("base64");
51
+ await this.must(`printf %s ${chunk} | base64 -d >> ${target}`);
52
+ }
53
+ }
54
+ async readFile(path) {
55
+ // No `-w0` and no file argument: macOS's base64 takes neither. Node skips the line breaks.
56
+ const result = await this.must(`base64 < ${quote(posix.resolve(this.capabilities.workdir, path))}`);
57
+ return Buffer.from(result.stdout, "base64");
58
+ }
59
+ async must(command) {
60
+ const result = await this.exec(command);
61
+ if (result.exitCode !== 0) {
62
+ throw new Error(result.stderr.trim() || `exit code ${result.exitCode}`);
63
+ }
64
+ return result;
65
+ }
66
+ async destroy() {
67
+ const provider = this.provider;
68
+ this.provider = null;
69
+ await (await provider?.catch(() => null))?.destroy?.();
70
+ }
71
+ }
@@ -12,6 +12,7 @@ import { db, inTransaction, schema } from "../db/client.js";
12
12
  import { missingModels, unavoidableSteps } from "../engine/requirements.js";
13
13
  import { env } from "../env.js";
14
14
  import { spaceChanged } from "../plugins/events.js";
15
+ import { sandboxEngine } from "../sandbox/index.js";
15
16
  import { codeOf, putLink } from "../tenants/control.js";
16
17
  import { currentTenant } from "../tenants/tenant.js";
17
18
  import { asSync, mayBuild } from "./access.js";
@@ -98,7 +99,7 @@ export async function serverProblems(def, issues, mcpServers) {
98
99
  detail: `${missing.cls}: ${missing.problem}`,
99
100
  });
100
101
  }
101
- if (env.sandbox === "off") {
102
+ if (!sandboxEngine()) {
102
103
  const steps = stepsWith(def, (s) => s.type === "agent" && s.tools.includes("sandbox"));
103
104
  if (steps.length) {
104
105
  problems.push({ code: "sandbox", blocking: false, steps, detail: "" });
@@ -0,0 +1,133 @@
1
+ import { AsyncLocalStorage } from "node:async_hooks";
2
+ import { createCodeMode, createTool, noopObserve } from "@mastra/core/tools";
3
+ import { QuickJsCodeModeTransport } from "@mastra/quickjs";
4
+ import { clip } from "./shared.js";
5
+ /**
6
+ * Code Mode: the model writes one TypeScript program that calls the step's tools as
7
+ * `external_*` functions — loops, `Promise.all`, filtering and sums — and only what the program
8
+ * returns goes back to the model.
9
+ *
10
+ * The program runs in QuickJS compiled to WebAssembly, inside the server process. It has no
11
+ * files, network, timers or modules: its only way out are the step's own tools, which run on
12
+ * the server exactly as when the model calls them. Every run gets a fresh runtime with its own
13
+ * heap. The limits below keep one program from tying up the server or a site it calls.
14
+ */
15
+ export const CODE_LIMITS = {
16
+ /** Wall time of one program, its tool calls included. */
17
+ timeoutMs: 120_000,
18
+ /** Tool calls one program may make. */
19
+ maxCalls: 100,
20
+ /** Tool calls of one program running at the same time. */
21
+ maxParallel: 4,
22
+ /** Characters of the program's answer the model reads. */
23
+ resultChars: 20_000,
24
+ /** Characters of `console.log` output the model reads. */
25
+ logChars: 4000,
26
+ };
27
+ /** The id of the tool, the way the model calls it. */
28
+ export const CODE_TOOL_ID = "execute_typescript";
29
+ const program = new AsyncLocalStorage();
30
+ /**
31
+ * Whether a tool is running for a program. Nobody can be asked from inside one: a tool that needs
32
+ * the person's yes refuses there and tells the model to call it directly.
33
+ */
34
+ export function inProgram() {
35
+ return program.getStore() === true;
36
+ }
37
+ /** Heap of one program's QuickJS runtime. */
38
+ const MEMORY_LIMIT_MB = 64;
39
+ /** One transport for the process; it loads the WebAssembly module once, on the first program. */
40
+ let transport = null;
41
+ function quickJs() {
42
+ transport ??= new QuickJsCodeModeTransport({ memoryLimitMb: MEMORY_LIMIT_MB });
43
+ return transport;
44
+ }
45
+ /** Runs at most `max` tasks at a time; the others wait their turn. */
46
+ function limiter(max) {
47
+ let running = 0;
48
+ const waiting = [];
49
+ return async (task) => {
50
+ if (running >= max) {
51
+ await new Promise((resolve) => waiting.push(resolve));
52
+ }
53
+ running++;
54
+ try {
55
+ return await task();
56
+ }
57
+ finally {
58
+ running--;
59
+ waiting.shift()?.();
60
+ }
61
+ };
62
+ }
63
+ /** What a program may call: tools the server runs itself (a provider's own search has no `execute`). */
64
+ function callable(tools) {
65
+ return Object.fromEntries(Object.entries(tools).filter(([, tool]) => typeof tool?.execute === "function"));
66
+ }
67
+ /**
68
+ * Wraps each tool for one program run: the call count and the calls in flight are capped, and the
69
+ * tool knows it runs for a program (`inProgram`).
70
+ */
71
+ function guarded(tools, ctx, limits) {
72
+ let calls = 0;
73
+ const slot = limiter(limits.maxParallel);
74
+ return Object.fromEntries(Object.entries(tools).map(([key, tool]) => [
75
+ key,
76
+ {
77
+ ...tool,
78
+ execute: (input, options) => {
79
+ calls++;
80
+ if (calls > limits.maxCalls) {
81
+ throw new Error(`A program makes at most ${limits.maxCalls} tool calls. Split the work.`);
82
+ }
83
+ if (ctx.signal.aborted) {
84
+ throw new Error("The run was stopped.");
85
+ }
86
+ return slot(() => program.run(true, () => tool.execute(input, options)));
87
+ },
88
+ },
89
+ ]));
90
+ }
91
+ /**
92
+ * The `execute_typescript` tool over `tools`, and the instructions that tell the model how to
93
+ * write a program. Null when there is nothing a program could call.
94
+ */
95
+ export function codeTool(tools, ctx, limits = CODE_LIMITS) {
96
+ const reachable = callable(tools);
97
+ if (!Object.keys(reachable).length) {
98
+ return null;
99
+ }
100
+ const config = { id: CODE_TOOL_ID, tools: reachable, timeout: limits.timeoutMs };
101
+ // The instructions list the tools once; every program runs over fresh guards.
102
+ const { tool: base, instructions } = createCodeMode(config, quickJs());
103
+ const tool = createTool({
104
+ id: CODE_TOOL_ID,
105
+ description: "Run a TypeScript program that calls your tools as external_* functions: loops, Promise.all, filtering, sums. Only what it returns comes back to you. Use it when a task needs many tool calls or arithmetic over their results.",
106
+ inputSchema: base.inputSchema,
107
+ execute: async (input, options) => {
108
+ await ctx.emit("tool", { code: "runsProgram" });
109
+ const run = createCodeMode({ ...config, tools: guarded(reachable, ctx, limits) }, quickJs()).tool;
110
+ // Spans need a run being traced; a call without one still runs.
111
+ const result = (await run.execute?.(input, {
112
+ ...options,
113
+ observe: options?.observe ?? noopObserve,
114
+ }));
115
+ const logs = result.logs?.length ? clip(result.logs.join("\n"), limits.logChars) : "";
116
+ if (!result.success) {
117
+ return { success: false, error: result.error, ...(logs ? { logs } : {}) };
118
+ }
119
+ const answer = typeof result.result === "string"
120
+ ? result.result
121
+ : (JSON.stringify(result.result ?? null) ?? "null");
122
+ return {
123
+ success: true,
124
+ result: answer.length > limits.resultChars ? clip(answer, limits.resultChars) : result.result,
125
+ ...(logs ? { logs } : {}),
126
+ };
127
+ },
128
+ });
129
+ return {
130
+ tool,
131
+ instructions: `${instructions}\n\nA program makes at most ${limits.maxCalls} tool calls, ${limits.maxParallel} at a time, and stops after ${limits.timeoutMs / 1000} seconds. Return only what you need: a long answer is cut at ${limits.resultChars} characters. A tool that asks the person first cannot run from a program: call it directly.`,
132
+ };
133
+ }
@@ -2,6 +2,7 @@ import { createTool } from "@mastra/core/tools";
2
2
  import { z } from "zod";
3
3
  import { refreshConnector, resolveConnector } from "../connectors/external.js";
4
4
  import { connectionContext } from "../connectors/index.js";
5
+ import { inProgram } from "./code.js";
5
6
  import { attempt, clip } from "./shared.js";
6
7
  import { resolveFile } from "./store.js";
7
8
  const FILE_NOTE = " File content never passes through you: returned content is kept as a file and you get its path; to send a kept file, give `file:<path>` where an input asks for `*_base64`.";
@@ -116,6 +117,11 @@ async function toolsOf(connection, ctx, files) {
116
117
  }
117
118
  const key = `${connection.id}:${action.id}`;
118
119
  if (asks(connection, action) && !ctx.resources.allowed.has(key)) {
120
+ if (inProgram()) {
121
+ return {
122
+ error: "This change waits for the person's yes, which a program cannot ask for. Call the tool directly, outside the program.",
123
+ };
124
+ }
119
125
  const answer = await ctx.ask({
120
126
  kind: "confirm",
121
127
  reason: action.summary || action.id,
@@ -12,6 +12,7 @@ import { sandboxCapabilities, shellToolDescription } from "../sandbox/index.js";
12
12
  import { snapshotFile } from "../services/files.js";
13
13
  import { hasStoreFiles } from "../store/index.js";
14
14
  import { browserTools } from "./browser.js";
15
+ import { codeTool } from "./code.js";
15
16
  import { connectorTools } from "./connector.js";
16
17
  import { mailTools } from "./mail.js";
17
18
  import { assertPublicUrl, safeFetch } from "./net-guard.js";
@@ -143,9 +144,9 @@ export async function buildStepTools(step, ctx, resolved, uploads) {
143
144
  });
144
145
  }
145
146
  const files = new FileKeeper(ctx, assets);
146
- if (allowed.has("browser")) {
147
- Object.assign(tools, await browserTools(ctx, assets, files));
148
- }
147
+ // The browser is one page, worked step by step, and it asks the person to sign in.
148
+ const browser = allowed.has("browser") ? await browserTools(ctx, assets, files) : {};
149
+ Object.assign(tools, browser);
149
150
  // The wizard's lists and files, the documents the person gave and the project's documents are
150
151
  // always at hand. An installed client gets tools over an MCP bridge its CLI starts for every
151
152
  // call, seconds of its own: a step with no use for the store goes without its tools, and
@@ -281,9 +282,19 @@ export async function buildStepTools(step, ctx, resolved, uploads) {
281
282
  });
282
283
  }
283
284
  }
285
+ // An installed client writes and runs code of its own.
286
+ let instructions;
287
+ if (allowed.has("code") && !isHarnessVendor(resolved.vendor)) {
288
+ const code = codeTool(Object.fromEntries(Object.entries(tools).filter(([key]) => !(key in browser))), ctx);
289
+ if (code) {
290
+ tools[code.tool.id] = code.tool;
291
+ instructions = code.instructions;
292
+ }
293
+ }
284
294
  return {
285
295
  tools,
286
296
  assets,
297
+ instructions,
287
298
  close: async () => {
288
299
  await mcp?.disconnect().catch(() => undefined);
289
300
  },
@@ -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,Ft as i,It as a,Kt as o,Nt as s,Pt as c,Vn as l,Vt as u,Wt as d,_r as f,dr as p}from"./ui-dzGvc3xk.js";import{t as m}from"./preload-helper-CNEI7N0N.js";import{Nt as h,nt as g,rt as _,tt as v}from"./index-C5Sm7tTR.js";import{c as y,f as b}from"./settings-menu-2IMOOlLl.js";import{ReleaseNotes as x,loadReleases as S,releaseDate as C,releaseLabel as w}from"./ChangelogDialog-DLqpJsF6.js";var T=e(t(),1),E=[{name:`engenty wizards`,description:`credit.engenty-wizards`,homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:`credit.engenty`,homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],D=[{name:`Mastra`,description:`credit.mastra`,homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:`credit.ai-sdk`,homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:`credit.model-context-protocol`,homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:`credit.hono`,homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:`credit.drizzle-orm`,homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:`credit.libsql`,homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:`credit.playwright`,homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`React`,description:`credit.react`,homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:`credit.vite`,homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:`credit.tailwind-css`,homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:`credit.react-flow`,homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:`credit.tanstack-query`,homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:`credit.xterm-js`,homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:`credit.lucide`,homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:`credit.geist-geist-mono`,homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:`credit.space-grotesk`,homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:`credit.git-cliff`,homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],O=e(n(),1),k=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function A({name:e,homepage:t,version:n,license:r,description:i}){return(0,O.jsxs)(`li`,{className:`py-2.5`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,O.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,O.jsx)(p,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,O.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,O.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function j({title:e,hint:t,children:n}){return(0,O.jsxs)(`section`,{className:`mt-6`,children:[(0,O.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,O.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function M({credits:e}){return(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,O.jsx)(A,{name:e.name,homepage:e.homepage,license:e.license,description:r(e.description)},e.name))})}function N({label:e,packages:t}){return(0,O.jsxs)(`div`,{className:`mt-4`,children:[(0,O.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,O.jsx)(A,{...e},e.name))})]})}function P({active:e}){let[t,n]=(0,T.useState)(null),[i,o]=(0,T.useState)(``);(0,T.useEffect)(()=>{if(!e||t)return;let r=!1;return m(()=>import(`./oss-credits-cZ9NUaLZ.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,T.useEffect)(()=>{e||o(``)},[e]);let s=i.trim().toLowerCase(),l=e=>s?e.filter(e=>k(s,e.name,e.license,r(e.description))):e,d=e=>s?e.filter(e=>k(s,e.name,e.license,e.version)):e,f=l(E),p=l(D),h=t?[{id:`shared`,label:r(`about.creditsShared`),packages:d(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:d(e.packages)}))].filter(e=>e.packages.length>0):[],g=f.length===0&&p.length===0&&h.length===0;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:r(`about.creditsHint`)}),(0,O.jsx)(a,{type:`search`,value:i,placeholder:r(`about.search`),onChange:e=>o(e.target.value)}),f.length>0?(0,O.jsx)(j,{title:r(`about.creditsProduct`),children:(0,O.jsx)(M,{credits:f})}):null,p.length>0?(0,O.jsx)(j,{title:r(`about.creditsBuiltWith`),children:(0,O.jsx)(M,{credits:p})}):null,t===null?(0,O.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,O.jsx)(u,{})}):h.length>0?(0,O.jsx)(j,{title:r(`about.creditsDeps`),hint:s?void 0:r(`about.creditsDepsHint`),children:h.map(e=>(0,O.jsx)(N,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,O.jsx)(c,{children:r(`about.noMatches`)}):null]})}var F=[`new`,`earlier`,`credits`],I=e=>r(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),L=e=>e===1?r(`about.change`):r(`about.changes`,{n:e});function R({open:e,onClose:t,me:n}){let a=n?.mode===`local`,{data:c,latest:p}=_(a&&e),[m,E]=(0,T.useState)(null),[D,k]=(0,T.useState)(`new`),A=b(F.indexOf(D)),j=c?.newer&&p?p:g;(0,T.useEffect)(()=>{if(!e)return;let t=!1;return E(null),S(j===`0.7.5`?void 0:j).then(e=>{t||E(e)}),()=>{t=!0}},[e,j]);let M=m?.find(e=>e.version===`v${j}`)??m?.[0]??null,N=m?.filter(e=>e!==M)??[],R=a?c?.kind??null:`cloud`;return(0,O.jsxs)(s,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,O.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,O.jsx)(i,{label:r(`common.close`),onClick:t,children:(0,O.jsx)(l,{className:`size-4`})})}),(0,O.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,O.jsx)(h,{size:96}),(0,O.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,O.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,O.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,O.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[r(`about.version`,{v:g}),R?` · ${r(`about.kind.${R}`)}`:``]})]}),a?(0,O.jsx)(`div`,{className:`mt-5`,children:(0,O.jsx)(v,{enabled:e})}):null,(0,O.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,O.jsx)(d,{value:D,onChange:k,options:F.map(e=>({id:e,label:I(e)})),label:r(`about.title`)})}),(0,O.jsxs)(`div`,{className:o(`mt-5`,y(A)),children:[D===`new`?m===null?(0,O.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,O.jsx)(u,{})}):M?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[w(M),(0,O.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:C(M)})]}),(0,O.jsx)(`div`,{className:`mt-3`,children:(0,O.jsx)(x,{release:M})})]}):(0,O.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:r(`about.changelogEmpty`)}):null,D===`earlier`?(0,O.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:N.map(e=>(0,O.jsxs)(`details`,{className:`group/r py-2`,children:[(0,O.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,O.jsx)(f,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,O.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:w(e)}),(0,O.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:C(e)}),(0,O.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:L(e.commits.length)})]}),(0,O.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,O.jsx)(x,{release:e})})]},e.version??`unreleased`))}):null,D===`credits`?(0,O.jsx)(P,{active:!0}):null]},D)]})}export{R 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,Ft as i,It as a,Kt as o,Nt as s,Pt as c,Vn as l,Vt as u,Wt as d,_r as f,dr as p}from"./ui-BmR_4eL2.js";import{t as m}from"./preload-helper-CNEI7N0N.js";import{Nt as h,nt as g,rt as _,tt as v}from"./index-B5F1_qA_.js";import{c as y,f as b}from"./settings-menu-CEQlVs1O.js";import{ReleaseNotes as x,loadReleases as S,releaseDate as C,releaseLabel as w}from"./ChangelogDialog-CD6CQNW9.js";var T=e(t(),1),E=[{name:`engenty wizards`,description:`credit.engenty-wizards`,homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:`credit.engenty`,homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],D=[{name:`Mastra`,description:`credit.mastra`,homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:`credit.ai-sdk`,homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:`credit.model-context-protocol`,homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:`credit.hono`,homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:`credit.drizzle-orm`,homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:`credit.libsql`,homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:`credit.playwright`,homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`React`,description:`credit.react`,homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:`credit.vite`,homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:`credit.tailwind-css`,homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:`credit.react-flow`,homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:`credit.tanstack-query`,homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:`credit.xterm-js`,homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:`credit.lucide`,homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:`credit.geist-geist-mono`,homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:`credit.space-grotesk`,homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:`credit.git-cliff`,homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],O=e(n(),1),k=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function A({name:e,homepage:t,version:n,license:r,description:i}){return(0,O.jsxs)(`li`,{className:`py-2.5`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,O.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,O.jsx)(p,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,O.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,O.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function j({title:e,hint:t,children:n}){return(0,O.jsxs)(`section`,{className:`mt-6`,children:[(0,O.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,O.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function M({credits:e}){return(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,O.jsx)(A,{name:e.name,homepage:e.homepage,license:e.license,description:r(e.description)},e.name))})}function N({label:e,packages:t}){return(0,O.jsxs)(`div`,{className:`mt-4`,children:[(0,O.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,O.jsx)(A,{...e},e.name))})]})}function P({active:e}){let[t,n]=(0,T.useState)(null),[i,o]=(0,T.useState)(``);(0,T.useEffect)(()=>{if(!e||t)return;let r=!1;return m(()=>import(`./oss-credits-X2JPiMOR.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,T.useEffect)(()=>{e||o(``)},[e]);let s=i.trim().toLowerCase(),l=e=>s?e.filter(e=>k(s,e.name,e.license,r(e.description))):e,d=e=>s?e.filter(e=>k(s,e.name,e.license,e.version)):e,f=l(E),p=l(D),h=t?[{id:`shared`,label:r(`about.creditsShared`),packages:d(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:d(e.packages)}))].filter(e=>e.packages.length>0):[],g=f.length===0&&p.length===0&&h.length===0;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:r(`about.creditsHint`)}),(0,O.jsx)(a,{type:`search`,value:i,placeholder:r(`about.search`),onChange:e=>o(e.target.value)}),f.length>0?(0,O.jsx)(j,{title:r(`about.creditsProduct`),children:(0,O.jsx)(M,{credits:f})}):null,p.length>0?(0,O.jsx)(j,{title:r(`about.creditsBuiltWith`),children:(0,O.jsx)(M,{credits:p})}):null,t===null?(0,O.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,O.jsx)(u,{})}):h.length>0?(0,O.jsx)(j,{title:r(`about.creditsDeps`),hint:s?void 0:r(`about.creditsDepsHint`),children:h.map(e=>(0,O.jsx)(N,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,O.jsx)(c,{children:r(`about.noMatches`)}):null]})}var F=[`new`,`earlier`,`credits`],I=e=>r(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),L=e=>e===1?r(`about.change`):r(`about.changes`,{n:e});function R({open:e,onClose:t,me:n}){let a=n?.mode===`local`,{data:c,latest:p}=_(a&&e),[m,E]=(0,T.useState)(null),[D,k]=(0,T.useState)(`new`),A=b(F.indexOf(D)),j=c?.newer&&p?p:g;(0,T.useEffect)(()=>{if(!e)return;let t=!1;return E(null),S(j===`0.7.7`?void 0:j).then(e=>{t||E(e)}),()=>{t=!0}},[e,j]);let M=m?.find(e=>e.version===`v${j}`)??m?.[0]??null,N=m?.filter(e=>e!==M)??[],R=a?c?.kind??null:`cloud`;return(0,O.jsxs)(s,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,O.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,O.jsx)(i,{label:r(`common.close`),onClick:t,children:(0,O.jsx)(l,{className:`size-4`})})}),(0,O.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,O.jsx)(h,{size:96}),(0,O.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,O.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,O.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,O.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[r(`about.version`,{v:g}),R?` · ${r(`about.kind.${R}`)}`:``]})]}),a?(0,O.jsx)(`div`,{className:`mt-5`,children:(0,O.jsx)(v,{enabled:e})}):null,(0,O.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,O.jsx)(d,{value:D,onChange:k,options:F.map(e=>({id:e,label:I(e)})),label:r(`about.title`)})}),(0,O.jsxs)(`div`,{className:o(`mt-5`,y(A)),children:[D===`new`?m===null?(0,O.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,O.jsx)(u,{})}):M?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[w(M),(0,O.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:C(M)})]}),(0,O.jsx)(`div`,{className:`mt-3`,children:(0,O.jsx)(x,{release:M})})]}):(0,O.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:r(`about.changelogEmpty`)}):null,D===`earlier`?(0,O.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:N.map(e=>(0,O.jsxs)(`details`,{className:`group/r py-2`,children:[(0,O.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,O.jsx)(f,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,O.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:w(e)}),(0,O.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:C(e)}),(0,O.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:L(e.commits.length)})]}),(0,O.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,O.jsx)(x,{release:e})})]},e.version??`unreleased`))}):null,D===`credits`?(0,O.jsx)(P,{active:!0}):null]},D)]})}export{R 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,It as i,Kt as a,Nt as o,Pt as s,Vt as c}from"./ui-dzGvc3xk.js";import{t as l}from"./preload-helper-CNEI7N0N.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/,``):r(`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 l(async()=>{let{default:e}=await import(`./changelog-DugmCNSf.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:a(`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:r(`about.breaking`)}):null]})]},e.id)})})}function y({open:e,onClose:t,version:n}){let[a,l]=(0,u.useState)(null),[f,h]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||a)return;let t=!1;return _(n).then(e=>{t||l(e)}),()=>{t=!0}},[e,a,n]),(0,u.useEffect)(()=>{e||h(``)},[e]);let y=a?g(a,f):[];return(0,d.jsxs)(o,{open:e,onClose:t,title:r(`about.changelog`),wide:!0,height:`tall`,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[0.875rem] text-ink-3`,children:r(`about.changelogHint`)}),a===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(c,{})}):a.length===0?(0,d.jsx)(s,{children:r(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i,{type:`search`,value:f,placeholder:r(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(s,{children:r(`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
+ 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,It as i,Kt as a,Nt as o,Pt as s,Vt as c}from"./ui-BmR_4eL2.js";import{t as l}from"./preload-helper-CNEI7N0N.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/,``):r(`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 l(async()=>{let{default:e}=await import(`./changelog-CJNkd1_L.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:a(`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:r(`about.breaking`)}):null]})]},e.id)})})}function y({open:e,onClose:t,version:n}){let[a,l]=(0,u.useState)(null),[f,h]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||a)return;let t=!1;return _(n).then(e=>{t||l(e)}),()=>{t=!0}},[e,a,n]),(0,u.useEffect)(()=>{e||h(``)},[e]);let y=a?g(a,f):[];return(0,d.jsxs)(o,{open:e,onClose:t,title:r(`about.changelog`),wide:!0,height:`tall`,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[0.875rem] text-ink-3`,children:r(`about.changelogHint`)}),a===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(c,{})}):a.length===0?(0,d.jsx)(s,{children:r(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i,{type:`search`,value:f,placeholder:r(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(s,{children:r(`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,$n as i,$t as a,Bn as o,Cr as s,Dr as c,Ft as l,Gn as u,Gt as d,Hn as f,Jt as p,Kn as m,Kt as h,Pn as g,Rr as _,Rt as v,Vt as y,W as b,Wn as x,Yn as S,br as C,bt as w,dt as T,ft as E,ir as D,lt as O,m as k,mt as A,nn as j,nr as M,nt as N,pt as P,qt as F,rt as I,st as L,tt as ee,un as R,ut as z,vt as B,wn as te,xt as ne,yt as re}from"./ui-dzGvc3xk.js";import{t as ie}from"./phone-CgrIS4_-.js";import{Ft as ae,Ot as oe,Wt as se,dt as ce,lt as le,qt as ue,t as de,ut as fe}from"./index-C5Sm7tTR.js";import{n as pe}from"./RunnerView-DUS9fPmx.js";var me={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`}]]};me.node;var he=c(me),ge={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`}]]};ge.node;var _e=c(ge),ve={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`}]]};ve.node;var V=c(ve),ye={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`}]]};ye.node;var be=c(ye),xe=_(),H=e(t(),1),U=e(n(),1),Se=typeof window<`u`&&window.matchMedia(`(pointer: coarse)`).matches;function Ce({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:h(`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)(y,{className:`size-5`}):a})}function we({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:h(`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 Te({voice:e,view:t,video:n,className:r}){let i=e.state===`live`,o=e.state===`connecting`,[s,c]=(0,H.useState)(null),[l,u]=(0,H.useState)(!1);(0,H.useEffect)(()=>{c(i?Date.now():null)},[i]);let d=async()=>{u(!1),await e.start(),n&&await e.startCamera()},p=()=>{e.stop(),u(!0)},m=n||e.camera,g=[...e.captions].reverse().find(e=>e.who===`bot`),_=[...e.captions].reverse().find(e=>e.who===`me`),v=e.speaking?a(`talk.speaking`):e.listening?a(`talk.listening`):i?a(`talk.live`):o?a(`talk.connecting`):l?a(`video.ended`):``;return(0,U.jsxs)(`section`,{className:h(`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:h(`size-2 rounded-full`,e.speaking?`animate-pulse-dot bg-emerald-400`:`bg-rose`)}):null,v]}):null,(0,U.jsx)(Ce,{since:s})]}),(0,U.jsxs)(`div`,{className:h(`grid min-h-0 gap-2 px-3 pb-2 sm:px-4`,m?`flex-1 grid-cols-1 sm:grid-cols-2`:`shrink-0 grid-cols-1`,!m&&i&&e.captions.length?`h-[38%]`:m?``:`flex-1`),children:[(0,U.jsxs)(`div`,{className:h(`relative min-h-0 overflow-hidden rounded-2xl bg-neutral-900`,!m&&`hidden`),children:[(0,U.jsx)(`video`,{ref:e.video,muted:!0,playsInline:!0,autoPlay:!0,className:h(`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:a(`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:[a(`video.you`),e.muted?(0,U.jsx)(ue,{className:`ml-1.5 inline size-3`}):null]})]}),(0,U.jsxs)(`div`,{className:h(`relative flex min-h-0 items-center justify-center overflow-hidden rounded-2xl transition-shadow`,m?`bg-neutral-900`:`bg-transparent`,m&&e.speaking&&`ring-2 ring-emerald-400/70`),children:[(0,U.jsx)(`div`,{className:h(`rounded-full transition-shadow duration-500`,!m&&e.listening&&`shadow-[0_0_80px_20px_rgba(244,63,94,0.25)]`,!m&&e.speaking&&`shadow-[0_0_80px_20px_rgba(52,211,153,0.3)]`,e.speaking&&`animate-breathe`),children:(0,U.jsx)(oe,{kind:t?.wizard.avatar??`round`,size:m?140:200,fluffy:!0,interactive:!1})}),m?(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&&!m?(0,U.jsx)(we,{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:a(e.muted?`video.unmute`:`video.mute`),on:!e.muted,onClick:e.toggleMute,children:e.muted?(0,U.jsx)(ue,{className:`size-5`}):(0,U.jsx)(D,{className:`size-5`})}),(0,U.jsx)(W,{label:a(e.camera?`talk.cameraOff`:`talk.camera`),on:e.camera,onClick:()=>e.camera?e.stopCamera():void e.startCamera(),children:e.camera?(0,U.jsx)(f,{className:`size-5`}):(0,U.jsx)(V,{className:`size-5`})}),e.camera&&Se?(0,U.jsx)(W,{label:a(`video.flip`),onClick:()=>void e.flipCamera(),children:(0,U.jsx)(x,{className:`size-5`})}):null,(0,U.jsx)(W,{label:a(`video.leave`),danger:!0,onClick:p,children:(0,U.jsx)(se,{className:`size-5`})})]}):(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,U.jsxs)(`button`,{type:`button`,disabled:o||!t?.talk,onClick:()=>void d(),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:[o?(0,U.jsx)(y,{className:`size-4`}):n?(0,U.jsx)(f,{className:`size-5`}):(0,U.jsx)(D,{className:`size-5`}),a(l?`video.rejoin`:n?`video.join`:`talk.start`)]}),!l&&!e.error?(0,U.jsx)(`p`,{className:`max-w-sm text-center text-[0.75rem] text-white/50`,children:a(n?`video.hint`:`talk.joinHint`)}):null]})})]})}var Ee=e=>R[e.kind]!==`device`,De=1024,Oe=4e3;function ke(e,t){return e?e.length>t?`${e.slice(0,t)} …`:e:``}function Ae(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(`
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,$n as i,$t as a,Bn as o,Cr as s,Dr as c,Ft as l,Gn as u,Gt as d,Hn as f,Jt as p,Kn as m,Kt as h,Pn as g,Rr as _,Rt as v,Vt as y,W as b,Wn as x,Yn as S,br as C,bt as w,dt as T,ft as E,ir as D,lt as O,m as k,mt as A,nn as j,nr as M,nt as N,pt as P,qt as F,rt as I,st as L,tt as ee,un as R,ut as z,vt as B,wn as te,xt as ne,yt as re}from"./ui-BmR_4eL2.js";import{t as ie}from"./phone-BWOB67tX.js";import{Ft as ae,Ot as oe,Wt as se,dt as ce,lt as le,qt as ue,t as de,ut as fe}from"./index-B5F1_qA_.js";import{n as pe}from"./RunnerView-Cjhuu9ua.js";var me={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`}]]};me.node;var he=c(me),ge={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`}]]};ge.node;var _e=c(ge),ve={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`}]]};ve.node;var V=c(ve),ye={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`}]]};ye.node;var be=c(ye),xe=_(),H=e(t(),1),U=e(n(),1),Se=typeof window<`u`&&window.matchMedia(`(pointer: coarse)`).matches;function Ce({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:h(`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)(y,{className:`size-5`}):a})}function we({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:h(`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 Te({voice:e,view:t,video:n,className:r}){let i=e.state===`live`,o=e.state===`connecting`,[s,c]=(0,H.useState)(null),[l,u]=(0,H.useState)(!1);(0,H.useEffect)(()=>{c(i?Date.now():null)},[i]);let d=async()=>{u(!1),await e.start(),n&&await e.startCamera()},p=()=>{e.stop(),u(!0)},m=n||e.camera,g=[...e.captions].reverse().find(e=>e.who===`bot`),_=[...e.captions].reverse().find(e=>e.who===`me`),v=e.speaking?a(`talk.speaking`):e.listening?a(`talk.listening`):i?a(`talk.live`):o?a(`talk.connecting`):l?a(`video.ended`):``;return(0,U.jsxs)(`section`,{className:h(`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:h(`size-2 rounded-full`,e.speaking?`animate-pulse-dot bg-emerald-400`:`bg-rose`)}):null,v]}):null,(0,U.jsx)(Ce,{since:s})]}),(0,U.jsxs)(`div`,{className:h(`grid min-h-0 gap-2 px-3 pb-2 sm:px-4`,m?`flex-1 grid-cols-1 sm:grid-cols-2`:`shrink-0 grid-cols-1`,!m&&i&&e.captions.length?`h-[38%]`:m?``:`flex-1`),children:[(0,U.jsxs)(`div`,{className:h(`relative min-h-0 overflow-hidden rounded-2xl bg-neutral-900`,!m&&`hidden`),children:[(0,U.jsx)(`video`,{ref:e.video,muted:!0,playsInline:!0,autoPlay:!0,className:h(`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:a(`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:[a(`video.you`),e.muted?(0,U.jsx)(ue,{className:`ml-1.5 inline size-3`}):null]})]}),(0,U.jsxs)(`div`,{className:h(`relative flex min-h-0 items-center justify-center overflow-hidden rounded-2xl transition-shadow`,m?`bg-neutral-900`:`bg-transparent`,m&&e.speaking&&`ring-2 ring-emerald-400/70`),children:[(0,U.jsx)(`div`,{className:h(`rounded-full transition-shadow duration-500`,!m&&e.listening&&`shadow-[0_0_80px_20px_rgba(244,63,94,0.25)]`,!m&&e.speaking&&`shadow-[0_0_80px_20px_rgba(52,211,153,0.3)]`,e.speaking&&`animate-breathe`),children:(0,U.jsx)(oe,{kind:t?.wizard.avatar??`round`,size:m?140:200,fluffy:!0,interactive:!1})}),m?(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&&!m?(0,U.jsx)(we,{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:a(e.muted?`video.unmute`:`video.mute`),on:!e.muted,onClick:e.toggleMute,children:e.muted?(0,U.jsx)(ue,{className:`size-5`}):(0,U.jsx)(D,{className:`size-5`})}),(0,U.jsx)(W,{label:a(e.camera?`talk.cameraOff`:`talk.camera`),on:e.camera,onClick:()=>e.camera?e.stopCamera():void e.startCamera(),children:e.camera?(0,U.jsx)(f,{className:`size-5`}):(0,U.jsx)(V,{className:`size-5`})}),e.camera&&Se?(0,U.jsx)(W,{label:a(`video.flip`),onClick:()=>void e.flipCamera(),children:(0,U.jsx)(x,{className:`size-5`})}):null,(0,U.jsx)(W,{label:a(`video.leave`),danger:!0,onClick:p,children:(0,U.jsx)(se,{className:`size-5`})})]}):(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,U.jsxs)(`button`,{type:`button`,disabled:o||!t?.talk,onClick:()=>void d(),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:[o?(0,U.jsx)(y,{className:`size-4`}):n?(0,U.jsx)(f,{className:`size-5`}):(0,U.jsx)(D,{className:`size-5`}),a(l?`video.rejoin`:n?`video.join`:`talk.start`)]}),!l&&!e.error?(0,U.jsx)(`p`,{className:`max-w-sm text-center text-[0.75rem] text-white/50`,children:a(n?`video.hint`:`talk.joinHint`)}):null]})})]})}var Ee=e=>R[e.kind]!==`device`,De=1024,Oe=4e3;function ke(e,t){return e?e.length>t?`${e.slice(0,t)} …`:e:``}function Ae(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: ${F(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}: ${ke(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(`