wizards 0.2.45 → 0.2.47

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 (70) hide show
  1. package/apps/runtime/dist/app.js +34 -1
  2. package/apps/runtime/dist/cli/features.js +50 -0
  3. package/apps/runtime/dist/cli/main.js +12 -2
  4. package/apps/runtime/dist/cli/report.js +81 -0
  5. package/apps/runtime/dist/debug.js +196 -0
  6. package/apps/runtime/dist/features.js +123 -0
  7. package/apps/runtime/dist/harness/model.js +2 -0
  8. package/apps/runtime/dist/index.js +3 -0
  9. package/apps/runtime/dist/log.js +106 -0
  10. package/apps/runtime/dist/manage.js +13 -0
  11. package/apps/runtime/dist/plugins/discovery.js +11 -0
  12. package/apps/runtime/dist/plugins/loader.js +10 -0
  13. package/apps/runtime/dist/routes/debug.js +42 -0
  14. package/apps/runtime/dist/routes/internal.js +21 -5
  15. package/apps/runtime/dist/routes/runs.js +1 -1
  16. package/apps/runtime/dist/routes/studio.js +7 -5
  17. package/apps/runtime/dist/tenants/control.js +7 -0
  18. package/apps/web/dist/assets/{AboutDialog-Dx_ged8B.js → AboutDialog-t7bpiasT.js} +1 -1
  19. package/apps/web/dist/assets/{ChangelogDialog-CbEGxGZG.js → ChangelogDialog-B87yS6aN.js} +1 -1
  20. package/apps/web/dist/assets/{ChatView-DZm3GK6k.js → ChatView-Dm764bYy.js} +4 -4
  21. package/apps/web/dist/assets/EditorPage-BG_Ue2iC.js +3 -0
  22. package/apps/web/dist/assets/{FlowPreview-t7hVutQM.js → FlowPreview-ChXfiMn_.js} +1 -1
  23. package/apps/web/dist/assets/{Harness-DnUFOVKn.js → Harness-zKMptCzB.js} +2 -2
  24. package/apps/web/dist/assets/HomePage-BXSg5P5k.js +1 -0
  25. package/apps/web/dist/assets/{Marketplace-SLjncUHh.js → Marketplace-BWhUJ4UX.js} +2 -2
  26. package/apps/web/dist/assets/{NewWizardPage-D24mz6nu.js → NewWizardPage-C3NqEGmg.js} +1 -1
  27. package/apps/web/dist/assets/ProjectPage-D6Fy7uTV.js +2 -0
  28. package/apps/web/dist/assets/PublicRunner-ChgJs0C9.js +1 -0
  29. package/apps/web/dist/assets/{ReadOnly-BokOQXGX.js → ReadOnly-C9P9aiU6.js} +1 -1
  30. package/apps/web/dist/assets/{RunDrawer-BLxTUquf.js → RunDrawer-CvIKLphz.js} +3 -3
  31. package/apps/web/dist/assets/RunnerView-Bmayop7s.js +2 -0
  32. package/apps/web/dist/assets/SettingsPage-QkwtRFoD.js +1 -0
  33. package/apps/web/dist/assets/SetupPage-B3IOQLO3.js +1 -0
  34. package/apps/web/dist/assets/{SharePage-D30PD4st.js → SharePage-C3QEzicl.js} +1 -1
  35. package/apps/web/dist/assets/ThemeSwitch-3IzIOlNz.js +1 -0
  36. package/apps/web/dist/assets/arrow-right-Dpp_mpHe.js +1 -0
  37. package/apps/web/dist/assets/changelog-Du2gWzlN.js +1 -0
  38. package/apps/web/dist/assets/{circle-alert-DmnHyrXp.js → circle-alert-CPo3Naay.js} +1 -1
  39. package/apps/web/dist/assets/{definition-TTirPrTQ.js → definition-CQGiBQ4X.js} +1 -1
  40. package/apps/web/dist/assets/{external-link-CbsKNS8Z.js → external-link-CpU8aJY2.js} +1 -1
  41. package/apps/web/dist/assets/index-Cz6c1S5g.js +78 -0
  42. package/apps/web/dist/assets/{lock-CjhgdsXt.js → lock-C_WlXIQ0.js} +1 -1
  43. package/apps/web/dist/assets/{refresh-cw-Obopmbfz.js → refresh-cw-Cli5WGnW.js} +1 -1
  44. package/apps/web/dist/assets/{session-OPJXuQ-4.js → session-miDEdw2c.js} +1 -1
  45. package/apps/web/dist/assets/{settings-menu-Dme1HWda.js → settings-menu-ROT8Lbbj.js} +1 -1
  46. package/apps/web/dist/assets/{sparkles-DQnR0qxG.js → sparkles-CP5H-O1E.js} +1 -1
  47. package/apps/web/dist/assets/{trash-CDGh6DEg.js → trash-DU-hZpV0.js} +1 -1
  48. package/apps/web/dist/assets/ui-D92EkdEB.js +9 -0
  49. package/apps/web/dist/assets/{upload-BzfKj43F.js → upload-DMq5N6Fw.js} +1 -1
  50. package/apps/web/dist/assets/{volume-2-Dca_TstC.js → volume-2-0SfkvOho.js} +1 -1
  51. package/apps/web/dist/index.html +10 -10
  52. package/apps/web/dist/mcp/flow.html +41 -41
  53. package/node_modules/@engenty-wizards/plugin-sdk/dist/index.d.ts +21 -0
  54. package/node_modules/@engenty-wizards/shared/dist/feature-flags.d.ts +54 -0
  55. package/node_modules/@engenty-wizards/shared/dist/feature-flags.js +46 -0
  56. package/node_modules/@engenty-wizards/shared/dist/features.d.ts +36 -0
  57. package/node_modules/@engenty-wizards/shared/dist/features.js +78 -0
  58. package/package.json +1 -1
  59. package/apps/web/dist/assets/EditorPage-DYmr37s6.js +0 -3
  60. package/apps/web/dist/assets/HomePage-BtDteNOG.js +0 -1
  61. package/apps/web/dist/assets/ProjectPage-BrJp7tGj.js +0 -2
  62. package/apps/web/dist/assets/PublicRunner-c3A01WoK.js +0 -1
  63. package/apps/web/dist/assets/RunnerView-BCXVgQJg.js +0 -2
  64. package/apps/web/dist/assets/SettingsPage-CUZcrDWr.js +0 -1
  65. package/apps/web/dist/assets/SetupPage-DVM5r96i.js +0 -1
  66. package/apps/web/dist/assets/ThemeSwitch-BeoISyt6.js +0 -1
  67. package/apps/web/dist/assets/arrow-right-BeQQ3XNo.js +0 -1
  68. package/apps/web/dist/assets/changelog-CpOw96D-.js +0 -1
  69. package/apps/web/dist/assets/index-C67UNafO.js +0 -78
  70. package/apps/web/dist/assets/ui-BJwZ9JV4.js +0 -9
@@ -0,0 +1,106 @@
1
+ import { format } from "node:util";
2
+ const RANK = { debug: 0, info: 1, warn: 2, error: 3 };
3
+ const KEEP = Number(process.env.LOG_KEEP) || 3000;
4
+ const LINE_MAX = 4000;
5
+ /** When this process started. */
6
+ export const startedAt = Date.now();
7
+ const lines = [];
8
+ let next = 1;
9
+ /** What never leaves a process in a log line: keys, tokens, one-time links, passwords. */
10
+ const SECRETS = [
11
+ [/(Bearer\s+)[A-Za-z0-9._~+/=-]{8,}/gi, "$1[redacted]"],
12
+ [/\bwz_[A-Za-z0-9_-]{6,}/g, "wz_[redacted]"],
13
+ [/\b(sk|rk|pk)-[A-Za-z0-9_-]{8,}/g, "$1-[redacted]"],
14
+ [/\bAIza[0-9A-Za-z_-]{20,}/g, "AIza[redacted]"],
15
+ [/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g, "[jwt]"],
16
+ [/([?&](?:k|t|rt|token|key|secret|code|password|api_?key)=)[^&\s"'<>]+/gi, "$1[redacted]"],
17
+ [
18
+ /((?:secret|password|passwd|token|api[_-]?key|authorization|refresh_token|access_token)["']?\s*[:=]\s*["']?)[^\s,"'}]{6,}/gi,
19
+ "$1[redacted]",
20
+ ],
21
+ ];
22
+ export function redact(text) {
23
+ let out = text;
24
+ for (const [pattern, replacement] of SECRETS) {
25
+ out = out.replace(pattern, replacement);
26
+ }
27
+ return out;
28
+ }
29
+ function push(level, args) {
30
+ const text = redact(format(...args)).slice(0, LINE_MAX);
31
+ lines.push({ id: next++, at: Date.now(), level, text });
32
+ if (lines.length > KEEP) {
33
+ lines.splice(0, lines.length - KEEP);
34
+ }
35
+ }
36
+ /** Keeps a line without printing it. */
37
+ export function note(level, text) {
38
+ push(level, [text]);
39
+ }
40
+ export function tail(query = {}) {
41
+ const limit = Math.min(Math.max(1, query.limit ?? 200), 2000);
42
+ const rank = RANK[query.level ?? "debug"] ?? 0;
43
+ const needle = query.q?.trim().toLowerCase();
44
+ const out = [];
45
+ for (let i = lines.length - 1; i >= 0 && out.length < limit; i--) {
46
+ const line = lines[i];
47
+ if (query.since !== undefined && line.id <= query.since) {
48
+ break;
49
+ }
50
+ if (query.after !== undefined && line.at < query.after) {
51
+ break;
52
+ }
53
+ if (RANK[line.level] < rank) {
54
+ continue;
55
+ }
56
+ if (needle && !line.text.toLowerCase().includes(needle)) {
57
+ continue;
58
+ }
59
+ out.push(line);
60
+ }
61
+ return out.reverse();
62
+ }
63
+ /** How many lines the ring holds and the id of the newest. */
64
+ export function logState() {
65
+ return { lines: lines.length, newest: next - 1, keeps: KEEP };
66
+ }
67
+ /** Reads a query string's values as a tail query. */
68
+ export function tailQuery(get) {
69
+ const int = (key) => {
70
+ const v = Number(get(key));
71
+ return Number.isSafeInteger(v) && v >= 0 ? v : undefined;
72
+ };
73
+ const level = get("level");
74
+ return {
75
+ since: int("since"),
76
+ after: int("after"),
77
+ limit: int("limit"),
78
+ level: level && level in RANK ? level : undefined,
79
+ q: get("q")?.slice(0, 200) || undefined,
80
+ };
81
+ }
82
+ let hooked = false;
83
+ /** Hooks the console once: each method still prints, and keeps a copy here. */
84
+ export function hookConsole() {
85
+ if (hooked) {
86
+ return;
87
+ }
88
+ hooked = true;
89
+ const methods = [
90
+ ["debug", "debug"],
91
+ ["log", "info"],
92
+ ["info", "info"],
93
+ ["warn", "warn"],
94
+ ["error", "error"],
95
+ ];
96
+ for (const [method, level] of methods) {
97
+ const original = console[method].bind(console);
98
+ console[method] = (...args) => {
99
+ push(level, args);
100
+ original(...args);
101
+ };
102
+ }
103
+ process.on("warning", (warning) => {
104
+ push("warn", [`${warning.name}: ${warning.message}`]);
105
+ });
106
+ }
@@ -109,6 +109,19 @@ async function call(method, path, body) {
109
109
  export function tenantMembers(id) {
110
110
  return call("GET", `/v1/tenants/${encodeURIComponent(id)}/members`);
111
111
  }
112
+ const users = new Map();
113
+ /** A person's own feature switches, as an admin set them at the Manage-App; cached a minute. */
114
+ export async function userFeatures(userId) {
115
+ const hit = users.get(userId);
116
+ if (hit && Date.now() - hit.at < 60_000) {
117
+ return hit.value;
118
+ }
119
+ const value = await call("GET", `/v1/users/${encodeURIComponent(userId)}`)
120
+ .then((u) => u.features ?? {})
121
+ .catch(() => hit?.value ?? {});
122
+ users.set(userId, { at: Date.now(), value });
123
+ return value;
124
+ }
112
125
  const tenants = new Map();
113
126
  /** Plan, limits and balance of a tenant, cached for a minute. */
114
127
  export async function tenantInfo(id, fresh = false) {
@@ -20,6 +20,17 @@ const manifestSchema = z.looseObject({
20
20
  server: z.string().optional(),
21
21
  studio: z.string().optional(),
22
22
  styles: z.string().optional(),
23
+ features: z
24
+ .record(z.string().regex(/^[a-z][a-zA-Z0-9]*$/), z.union([
25
+ z.boolean(),
26
+ z.object({
27
+ kind: z.enum(["release", "plan"]).optional(),
28
+ default: z.boolean().optional(),
29
+ label: z.string().max(80).optional(),
30
+ hint: z.string().max(300).optional(),
31
+ }),
32
+ ]))
33
+ .optional(),
23
34
  });
24
35
  /** `.mjs` is left out: Node keeps such a file once imported, so a reload would not read it again. */
25
36
  const CODE = new Set([".ts", ".js"]);
@@ -12,6 +12,7 @@ import { pluginConnections } from "../connectors/plugin-connections.js";
12
12
  import { db, onTenantOpen } from "../db/client.js";
13
13
  import { parseDocument } from "../documents/parse.js";
14
14
  import { env } from "../env.js";
15
+ import { currentFeatures } from "../features.js";
15
16
  import { managed } from "../manage.js";
16
17
  import { conversationAccess, ModelUnavailableError, textModel } from "../models.js";
17
18
  import { putIndexEntry, removeIndexEntries } from "../services/project-index.js";
@@ -92,6 +93,15 @@ function apiFor(record) {
92
93
  plugin: source.manifest,
93
94
  resolvePath: (relative) => resolve(source.root, relative),
94
95
  config: { get: (key) => process.env[key]?.trim() || undefined },
96
+ features: {
97
+ // A short name is the plugin's own switch; a dotted or core name is taken as it is.
98
+ has: async (name) => {
99
+ const all = await currentFeatures();
100
+ const own = `${source.id}.${name}`;
101
+ return (own in all ? all[own] : all[name]) === true;
102
+ },
103
+ all: currentFeatures,
104
+ },
95
105
  log: {
96
106
  info: (...args) => console.log(tag, ...args),
97
107
  warn: (...args) => console.warn(tag, ...args),
@@ -0,0 +1,42 @@
1
+ import { Hono } from "hono";
2
+ import { z } from "zod";
3
+ import { LOCAL_MCP_HEADER, localTicketExpiry } from "../auth/local-ticket.js";
4
+ import { logs, ReportError, sendReport, status } from "../debug.js";
5
+ import { env } from "../env.js";
6
+ import { tailQuery } from "../log.js";
7
+ import { managed } from "../manage.js";
8
+ /**
9
+ * A runtime that runs alone answers its own command line here (`wizards logs`, `wizards
10
+ * report`): each request signed with the data folder's secret, as `wizards mcp` signs its own.
11
+ * Nothing of this is reached from another machine; the account hears from an install only when
12
+ * the person sends a report.
13
+ */
14
+ export const localDebugRoutes = new Hono()
15
+ .use(async (c, next) => {
16
+ const ticket = c.req.header(LOCAL_MCP_HEADER) ?? "";
17
+ if (managed || !localTicketExpiry(env.authSecret, ticket, Date.now(), "local-debug")) {
18
+ return c.json({ error: "unauthorized" }, 401);
19
+ }
20
+ await next();
21
+ })
22
+ .get("/status", async (c) => c.json(await status()))
23
+ .get("/logs", (c) => c.json(logs(tailQuery((key) => c.req.query(key)))))
24
+ .post("/report", async (c) => {
25
+ try {
26
+ return c.json(await sendReport());
27
+ }
28
+ catch (err) {
29
+ if (err instanceof ReportError) {
30
+ return c.json({ error: err.message, code: err.code }, err.code === "no_account" ? 409 : 502);
31
+ }
32
+ throw err;
33
+ }
34
+ });
35
+ /** What a page reports about itself: an error it met, with where it stood. */
36
+ export const browserReport = z.object({
37
+ level: z.enum(["error", "warn"]).default("error"),
38
+ message: z.string().min(1).max(2000),
39
+ stack: z.string().max(4000).optional(),
40
+ url: z.string().max(500).optional(),
41
+ agent: z.string().max(300).optional(),
42
+ });
@@ -4,8 +4,11 @@ import { join } from "node:path";
4
4
  import { Hono } from "hono";
5
5
  import { z } from "zod";
6
6
  import { closeTenantDb, tenantDb } from "../db/client.js";
7
+ import { logs, runDetail, status, tenantModels } from "../debug.js";
7
8
  import { env } from "../env.js";
9
+ import { declaredFeatures } from "../features.js";
8
10
  import { removeTenantObjects } from "../files/objects.js";
11
+ import { tailQuery } from "../log.js";
9
12
  import { forgetTenant, managed } from "../manage.js";
10
13
  import { loadedPlugins } from "../plugins/registry.js";
11
14
  import { forgetTenantRows, setTenantStatus } from "../tenants/control.js";
@@ -23,11 +26,25 @@ function fromManage(header) {
23
26
  * itself is deleted by whoever created it (the Manage-App, or here when it is a file).
24
27
  */
25
28
  export const internalRoutes = new Hono()
26
- // The plugins this runtime carries: the Manage-App offers them when a plan's modules are picked.
27
- .get("/plugins", (c) => {
29
+ .use(async (c, next) => {
28
30
  if (!fromManage(c.req.header("authorization"))) {
29
31
  return c.json({ error: "unauthorized" }, 401);
30
32
  }
33
+ await next();
34
+ })
35
+ // --- a look from afar (docs/plans/remote-debug.md): read-only, never a key -------------
36
+ .get("/debug/status", async (c) => c.json(await status()))
37
+ .get("/debug/logs", (c) => c.json(logs(tailQuery((key) => c.req.query(key)))))
38
+ .get("/debug/runs/:id", async (c) => {
39
+ const found = await runDetail(c.req.param("id"));
40
+ return found ? c.json(found) : c.json({ error: "not found" }, 404);
41
+ })
42
+ .get("/debug/tenants/:id/models", async (c) => {
43
+ const found = await tenantModels(c.req.param("id"));
44
+ return found ? c.json(found) : c.json({ error: "not found" }, 404);
45
+ })
46
+ // The plugins this runtime carries: the Manage-App offers them when a plan's modules are picked.
47
+ .get("/plugins", (c) => {
31
48
  return c.json({
32
49
  plugins: loadedPlugins().map((p) => ({
33
50
  id: p.source.id,
@@ -35,12 +52,11 @@ export const internalRoutes = new Hono()
35
52
  description: p.source.manifest.description ?? "",
36
53
  version: p.source.manifest.version ?? null,
37
54
  })),
55
+ /** Every feature switch this runtime knows: the core's and its plugins' (under their ids). */
56
+ features: declaredFeatures(),
38
57
  });
39
58
  })
40
59
  .post("/tenants/:id", async (c) => {
41
- if (!fromManage(c.req.header("authorization"))) {
42
- return c.json({ error: "unauthorized" }, 401);
43
- }
44
60
  const id = c.req.param("id");
45
61
  if (!/^[A-Za-z0-9_-]{1,64}$/.test(id)) {
46
62
  return c.json({ error: "bad tenant id" }, 400);
@@ -38,7 +38,7 @@ import { byteRange, uploadLimit, wizardManifest } from "./delivery.js";
38
38
  const VISITOR_COOKIE = "wz_vid";
39
39
  /** Kept files a review shows inline. */
40
40
  const INLINE_TYPES = new Set(["application/pdf", "image/png", "image/jpeg", "image/webp"]);
41
- function clientIp(c) {
41
+ export function clientIp(c) {
42
42
  const fwd = c.req.header("x-forwarded-for")?.split(",")[0]?.trim();
43
43
  if (fwd) {
44
44
  return fwd;
@@ -19,10 +19,11 @@ import { balanceCredits, canSpend } from "../credits/credits.js";
19
19
  import { estimateRun } from "../credits/estimate.js";
20
20
  import { missingModels, stepsWithoutModel } from "../engine/requirements.js";
21
21
  import { env } from "../env.js";
22
+ import { feature, features } from "../features.js";
22
23
  import { freshAuth, loginEnv } from "../harness/env.js";
23
24
  import { detectHarness, detectHarnesses, HARNESS_IDS, harness, installSpec, } from "../harness/index.js";
24
25
  import { closeTerminal, openTerminal, resizeTerminal, subscribeTerminal, writeTerminal, } from "../harness/terminal.js";
25
- import { managed, tenantInfo, tenantMembers } from "../manage.js";
26
+ import { managed, tenantInfo, tenantMembers, userFeatures } from "../manage.js";
26
27
  import { seenApps } from "../mcp/seen.js";
27
28
  import { generateImageMedia, generateSpeechMedia, generateVideoMedia } from "../media/generate.js";
28
29
  import { transcribeAudio } from "../media/transcribe.js";
@@ -189,8 +190,9 @@ export const studio = new Hono()
189
190
  const linked = managed ? null : await linkedAccount();
190
191
  const overview = linked ? await accountOverview() : null;
191
192
  const profile = await userProfile(user);
192
- // What the Manage-App says of the tenant: its plan and feature switches.
193
+ // What the Manage-App says of the tenant: its plan and feature switches; and of the person.
193
194
  const info = managed ? await tenantInfo(user.tenantId).catch(() => null) : null;
195
+ const own = managed ? await userFeatures(user.id) : null;
194
196
  return c.json({
195
197
  user: { id: user.id, name: profile.name, email: profile.email, image: user.image ?? null },
196
198
  /** What the person says about themselves; name and e-mail are the account's when managed. */
@@ -201,8 +203,8 @@ export const studio = new Hono()
201
203
  /** The plan the team is on; null alone, or where the Manage-App names none. */
202
204
  plan: info?.plan ?? null,
203
205
  },
204
- /** The plan's feature switches (`ownKeys`, …); alone, everything is on. */
205
- features: managed ? (info?.features ?? {}) : { ownKeys: true },
206
+ /** The feature switches: the code's defaults, what the Manage-App says of the team and the person, this install's file. */
207
+ features: features(managed ? { ...info?.features, ...own } : overview?.tenant.features),
206
208
  mode: managed ? "managed" : "local",
207
209
  /** The tenant's balance; null where the runtime resolves models itself. */
208
210
  credits: managed ? await balanceCredits() : null,
@@ -1034,7 +1036,7 @@ export const studio = new Hono()
1034
1036
  const info = await tenantInfo(c.get("user").tenantId).catch(() => null);
1035
1037
  const own = Object.values(input.keys ?? {}).some((key) => key?.trim()) ||
1036
1038
  Object.values(input.bindings ?? {}).some((ref) => ref && !isCreditsRef(ref));
1037
- if (own && info && info.features?.ownKeys === false) {
1039
+ if (own && info && !feature("ownKeys", info.features)) {
1038
1040
  return c.json({
1039
1041
  error: `Eigene API Keys gibt es nicht im Paket ${info.plan?.name ?? "des Teams"}.`,
1040
1042
  code: "plan",
@@ -151,3 +151,10 @@ export async function forgetTenantRows(id) {
151
151
  }
152
152
  }
153
153
  }
154
+ /** The line's view of one run: which tenant it belongs to, whether it is awake. */
155
+ export async function runIndexOf(runId) {
156
+ const row = await controlDb.query.runIndex.findFirst({
157
+ where: eq(control.runIndex.runId, runId),
158
+ });
159
+ return row ? { tenantId: row.tenantId, active: row.active } : null;
160
+ }
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{t as r}from"./logo-C80CWCDM.js";import{t as i}from"./preload-helper-CNEI7N0N.js";import{F as a,N as o,V as s,_ as c,a as l,f as u,h as d,i as f,j as p,o as m,s as h,t as g}from"./ui-BJwZ9JV4.js";import{t as _}from"./external-link-CbsKNS8Z.js";import{t as v}from"./refresh-cw-Obopmbfz.js";import{F as y,L as b,V as x}from"./index-C67UNafO.js";import{c as S,f as C}from"./settings-menu-Dme1HWda.js";import{ReleaseNotes as w,loadReleases as T,releaseDate as E,releaseLabel as D}from"./ChangelogDialog-CbEGxGZG.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/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)(_,{"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[p]},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,a]=(0,O.useState)(``);(0,O.useEffect)(()=>{if(!e||t)return;let r=!1;return i(()=>import(`./oss-credits-CIxnNZor.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,O.useEffect)(()=>{e||a(``)},[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,d=e=>s?e.filter(e=>M(s,e.name,e.license,e.version)):e,f=c(k),p=c(A),m=t?[{id:`shared`,label:o(`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&&m.length===0;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:o(`about.creditsHint`)}),(0,j.jsx)(h,{type:`search`,value:r,placeholder:o(`about.search`),onChange:e=>a(e.target.value)}),f.length>0?(0,j.jsx)(P,{title:o(`about.creditsProduct`),children:(0,j.jsx)(F,{credits:f})}):null,p.length>0?(0,j.jsx)(P,{title:o(`about.creditsBuiltWith`),children:(0,j.jsx)(F,{credits:p})}):null,t===null?(0,j.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,j.jsx)(u,{})}):m.length>0?(0,j.jsx)(P,{title:o(`about.creditsDeps`),hint:s?void 0:o(`about.creditsDepsHint`),children:m.map(e=>(0,j.jsx)(I,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,j.jsx)(l,{children:o(`about.noMatches`)}):null]})}var R=[`new`,`earlier`,`credits`],z=e=>o(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),B=e=>e===1?o(`about.change`):o(`about.changes`,{n:e});function V({open:e,onClose:t,me:n}){let i=n?.mode===`local`,{status:l,data:p,latest:h,check:k,apply:A,busy:M,progress:N}=y(i&&e),[P,F]=(0,O.useState)(null),[I,V]=(0,O.useState)(`new`),H=C(R.indexOf(I)),U=p?.newer&&h?h:b;(0,O.useEffect)(()=>{if(!e)return;let t=!1;return F(null),T(U===`0.2.45`?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?p?.kind??null:`cloud`,q=p?.checkedAt?new Date(p.checkedAt).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`}):null;return(0,j.jsxs)(f,{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)(m,{label:o(`common.close`),onClick:t,children:(0,j.jsx)(a,{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:[o(`about.version`,{v:b}),K?` · ${o(`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:[l.isPending||k.isPending?(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,j.jsx)(u,{className:`size-4 text-ember-strong`}),o(`about.update.checking`)]}):N?(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[M?(0,j.jsx)(u,{className:`size-4 text-ember-strong`}):null,N]}):p?.newer&&h?(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)(x,{className:`size-4 shrink-0 text-ember-strong`}),o(`about.update.available`,{v:h})]}),p.canApply?null:(0,j.jsx)(`p`,{className:`text-ink-3`,children:o(`about.update.manual`)})]}):p?.enabled?p.latest===null?(0,j.jsx)(`p`,{children:o(`about.update.unknown`)}):(0,j.jsxs)(`p`,{children:[o(`about.update.upToDate`),q?(0,j.jsxs)(`span`,{className:`text-ink-4`,children:[` `,`· `,o(`about.update.checkedAt`,{when:q})]}):null]}):(0,j.jsx)(`p`,{children:o(`about.update.off`)}),M||l.isPending?null:(0,j.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[p?.newer&&p.canApply&&p.applying!==`running`?(0,j.jsxs)(g,{size:`sm`,disabled:A.isPending,onClick:()=>A.mutate(),children:[(0,j.jsx)(x,{className:`size-4`}),` `,o(`about.update.install`)]}):null,p?.newer&&p.url?(0,j.jsxs)(g,{size:`sm`,variant:`secondary`,onClick:()=>window.open(p.url??``,`_blank`),children:[o(`about.update.release`),` `,(0,j.jsx)(_,{className:`size-4`})]}):null,p?.enabled===!1?null:(0,j.jsxs)(g,{size:`sm`,variant:`secondary`,disabled:k.isPending,onClick:()=>k.mutate(),children:[(0,j.jsx)(v,{className:c(`size-4`,k.isPending&&`animate-spin`)}),` `,o(`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:o(`about.title`)})}),(0,j.jsxs)(`div`,{className:c(`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)(u,{})}):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:o(`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)(s,{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{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{t as r}from"./logo-C80CWCDM.js";import{t as i}from"./preload-helper-CNEI7N0N.js";import{H as a,I as o,M as s,P as c,_ as l,a as u,f as d,h as f,i as p,o as m,s as h,t as g}from"./ui-D92EkdEB.js";import{t as _}from"./external-link-CpU8aJY2.js";import{t as v}from"./refresh-cw-Cli5WGnW.js";import{F as y,L as b,V as x}from"./index-Cz6c1S5g.js";import{c as S,f as C}from"./settings-menu-ROT8Lbbj.js";import{ReleaseNotes as w,loadReleases as T,releaseDate as E,releaseLabel as D}from"./ChangelogDialog-B87yS6aN.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/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)(_,{"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[s]},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,a]=(0,O.useState)(``);(0,O.useEffect)(()=>{if(!e||t)return;let r=!1;return i(()=>import(`./oss-credits-CIxnNZor.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,O.useEffect)(()=>{e||a(``)},[e]);let o=r.trim().toLowerCase(),s=e=>o?e.filter(e=>M(o,e.name,e.license,e.description.de,e.description.en)):e,l=e=>o?e.filter(e=>M(o,e.name,e.license,e.version)):e,f=s(k),p=s(A),m=t?[{id:`shared`,label:c(`about.creditsShared`),packages:l(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:l(e.packages)}))].filter(e=>e.packages.length>0):[],g=f.length===0&&p.length===0&&m.length===0;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:c(`about.creditsHint`)}),(0,j.jsx)(h,{type:`search`,value:r,placeholder:c(`about.search`),onChange:e=>a(e.target.value)}),f.length>0?(0,j.jsx)(P,{title:c(`about.creditsProduct`),children:(0,j.jsx)(F,{credits:f})}):null,p.length>0?(0,j.jsx)(P,{title:c(`about.creditsBuiltWith`),children:(0,j.jsx)(F,{credits:p})}):null,t===null?(0,j.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,j.jsx)(d,{})}):m.length>0?(0,j.jsx)(P,{title:c(`about.creditsDeps`),hint:o?void 0:c(`about.creditsDepsHint`),children:m.map(e=>(0,j.jsx)(I,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,j.jsx)(u,{children:c(`about.noMatches`)}):null]})}var R=[`new`,`earlier`,`credits`],z=e=>c(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),B=e=>e===1?c(`about.change`):c(`about.changes`,{n:e});function V({open:e,onClose:t,me:n}){let i=n?.mode===`local`,{status:s,data:u,latest:h,check:k,apply:A,busy:M,progress:N}=y(i&&e),[P,F]=(0,O.useState)(null),[I,V]=(0,O.useState)(`new`),H=C(R.indexOf(I)),U=u?.newer&&h?h:b;(0,O.useEffect)(()=>{if(!e)return;let t=!1;return F(null),T(U===`0.2.47`?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?u?.kind??null:`cloud`,q=u?.checkedAt?new Date(u.checkedAt).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`}):null;return(0,j.jsxs)(p,{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)(m,{label:c(`common.close`),onClick:t,children:(0,j.jsx)(o,{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:[c(`about.version`,{v:b}),K?` · ${c(`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:[s.isPending||k.isPending?(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,j.jsx)(d,{className:`size-4 text-ember-strong`}),c(`about.update.checking`)]}):N?(0,j.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[M?(0,j.jsx)(d,{className:`size-4 text-ember-strong`}):null,N]}):u?.newer&&h?(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)(x,{className:`size-4 shrink-0 text-ember-strong`}),c(`about.update.available`,{v:h})]}),u.canApply?null:(0,j.jsx)(`p`,{className:`text-ink-3`,children:c(`about.update.manual`)})]}):u?.enabled?u.latest===null?(0,j.jsx)(`p`,{children:c(`about.update.unknown`)}):(0,j.jsxs)(`p`,{children:[c(`about.update.upToDate`),q?(0,j.jsxs)(`span`,{className:`text-ink-4`,children:[` `,`· `,c(`about.update.checkedAt`,{when:q})]}):null]}):(0,j.jsx)(`p`,{children:c(`about.update.off`)}),M||s.isPending?null:(0,j.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[u?.newer&&u.canApply&&u.applying!==`running`?(0,j.jsxs)(g,{size:`sm`,disabled:A.isPending,onClick:()=>A.mutate(),children:[(0,j.jsx)(x,{className:`size-4`}),` `,c(`about.update.install`)]}):null,u?.newer&&u.url?(0,j.jsxs)(g,{size:`sm`,variant:`secondary`,onClick:()=>window.open(u.url??``,`_blank`),children:[c(`about.update.release`),` `,(0,j.jsx)(_,{className:`size-4`})]}):null,u?.enabled===!1?null:(0,j.jsxs)(g,{size:`sm`,variant:`secondary`,disabled:k.isPending,onClick:()=>k.mutate(),children:[(0,j.jsx)(v,{className:l(`size-4`,k.isPending&&`animate-spin`)}),` `,c(`about.update.check`)]})]})]}):null,(0,j.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,j.jsx)(f,{value:I,onChange:V,options:R.map(e=>({id:e,label:z(e)})),label:c(`about.title`)})}),(0,j.jsxs)(`div`,{className:l(`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)(d,{})}):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:c(`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)(a,{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{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{t as r}from"./preload-helper-CNEI7N0N.js";import{N as i,_ as a,a as o,f as s,i as c,s as l}from"./ui-BJwZ9JV4.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-CpOw96D-.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:i(`about.breaking`)}):null]})]},e.id)})})}function y({open:e,onClose:t,version:n}){let[r,a]=(0,u.useState)(null),[f,h]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||r)return;let t=!1;return _(n).then(e=>{t||a(e)}),()=>{t=!0}},[e,r,n]),(0,u.useEffect)(()=>{e||h(``)},[e]);let y=r?g(r,f):[];return(0,d.jsxs)(c,{open:e,onClose:t,title:i(`about.changelog`),wide:!0,height:`tall`,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[0.875rem] text-ink-3`,children:i(`about.changelogHint`)}),r===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(s,{})}):r.length===0?(0,d.jsx)(o,{children:i(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l,{type:`search`,value:f,placeholder:i(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(o,{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
+ import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{t as r}from"./preload-helper-CNEI7N0N.js";import{P as i,_ as a,a as o,f as s,i as c,s as l}from"./ui-D92EkdEB.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-Du2gWzlN.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:i(`about.breaking`)}):null]})]},e.id)})})}function y({open:e,onClose:t,version:n}){let[r,a]=(0,u.useState)(null),[f,h]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||r)return;let t=!1;return _(n).then(e=>{t||a(e)}),()=>{t=!0}},[e,r,n]),(0,u.useEffect)(()=>{e||h(``)},[e]);let y=r?g(r,f):[];return(0,d.jsxs)(c,{open:e,onClose:t,title:i(`about.changelog`),wide:!0,height:`tall`,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[0.875rem] text-ink-3`,children:i(`about.changelogHint`)}),r===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(s,{})}):r.length===0?(0,d.jsx)(o,{children:i(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(l,{type:`search`,value:f,placeholder:i(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(o,{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};