wizards 0.4.6 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/runtime/dist/agents/studio-assistant.js +5 -5
- package/apps/runtime/dist/assistant/primer.js +1 -1
- package/apps/runtime/dist/authoring/guide.js +7 -7
- package/apps/runtime/dist/db/schema.js +9 -9
- package/apps/runtime/dist/engine/steps.js +2 -2
- package/apps/runtime/dist/routes/api.js +1 -1
- package/apps/runtime/dist/routes/studio.js +5 -5
- package/apps/runtime/dist/services/knowledge-model.js +8 -8
- package/apps/runtime/dist/services/knowledge.js +19 -19
- package/apps/runtime/dist/services/package.js +1 -1
- package/apps/runtime/dist/services/project-files.js +5 -5
- package/apps/runtime/dist/services/project-index.js +10 -10
- package/apps/runtime/dist/services/relevance.js +3 -3
- package/apps/runtime/dist/services/site.js +8 -8
- package/apps/runtime/dist/services/space-categories.js +19 -19
- package/apps/runtime/dist/services/space-data.js +3 -3
- package/apps/runtime/dist/services/space-origin.js +3 -3
- package/apps/runtime/dist/services/spaces.js +3 -3
- package/apps/runtime/dist/tools/index.js +1 -1
- package/apps/runtime/dist/tools/pages.js +4 -4
- package/apps/runtime/dist/tools/project.js +10 -10
- package/apps/web/dist/assets/{AboutDialog-i-qD_Nea.js → AboutDialog-A_ILyeue.js} +1 -1
- package/apps/web/dist/assets/{ChangelogDialog-BYuVcmKR.js → ChangelogDialog-BXpkgatF.js} +1 -1
- package/apps/web/dist/assets/{ChatView-DMEYEsA7.js → ChatView-t7z44uFN.js} +1 -1
- package/apps/web/dist/assets/{EditorPage-Bry35WHx.js → EditorPage-4qxNJgKr.js} +3 -3
- package/apps/web/dist/assets/{FlowPreview-BsfjDVv8.js → FlowPreview-WpS8DCPl.js} +1 -1
- package/apps/web/dist/assets/{Harness-BxQDTGJk.js → Harness-DL7Bse40.js} +1 -1
- package/apps/web/dist/assets/{NewWizardChannels-DPnLT-md.js → NewWizardChannels-Crt6PzH2.js} +1 -1
- package/apps/web/dist/assets/{NewWizardPage-BSh_bUIJ.js → NewWizardPage-COiVmNsl.js} +2 -2
- package/apps/web/dist/assets/{OnboardingPage-BZrRdVwr.js → OnboardingPage-BwluEqXq.js} +1 -1
- package/apps/web/dist/assets/{ProjectPage-_3L9R3SZ.js → ProjectPage-BIRU_AlN.js} +1 -1
- package/apps/web/dist/assets/{PublicRunner-DXbh8uhe.js → PublicRunner-BxMb4gEt.js} +1 -1
- package/apps/web/dist/assets/ReadOnly-D9r5ze5S.js +1 -0
- package/apps/web/dist/assets/{RunDrawer-DpUakYb9.js → RunDrawer-DmJl2QOJ.js} +1 -1
- package/apps/web/dist/assets/{RunnerView-DQ-NgcCa.js → RunnerView-CF_1rC-7.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-3xSInE-A.js +1 -0
- package/apps/web/dist/assets/{SetupPage-BgVHvN6j.js → SetupPage-BGKtbS7j.js} +1 -1
- package/apps/web/dist/assets/{SharePage-BI6vkc9c.js → SharePage-C4MqXKDA.js} +1 -1
- package/apps/web/dist/assets/changelog-CM_GdIVI.js +1 -0
- package/apps/web/dist/assets/{esm-hSq-jeOG.js → esm-CsY8TkyE.js} +1 -1
- package/apps/web/dist/assets/index-Bi2x2g7n.css +1 -0
- package/apps/web/dist/assets/{index-Ca1841qE.js → index-BjQvGQp_.js} +4 -4
- package/apps/web/dist/assets/lock-CI6TpWL-.js +1 -0
- package/apps/web/dist/assets/{phone-CeqyvwK-.js → phone-BrtQz-fG.js} +1 -1
- package/apps/web/dist/assets/{settings-menu-BK8WpcGv.js → settings-menu-BtEKL72n.js} +1 -1
- package/apps/web/dist/assets/{ui-BbIh6SOJ.js → ui-4IaTD7LB.js} +1 -1
- package/apps/web/dist/assets/{upload-BQrAlHIG.js → upload-CWJAtPRo.js} +1 -1
- package/apps/web/dist/index.html +3 -3
- package/apps/web/dist/mcp/flow.html +2 -2
- package/node_modules/@engenty-wizards/plugin-sdk/dist/index.d.ts +12 -12
- package/node_modules/@engenty-wizards/plugin-sdk/dist/studio.d.ts +3 -3
- package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +690 -690
- package/node_modules/@engenty-wizards/shared/dist/definition.js +1 -1
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.d.ts +76 -76
- package/node_modules/@engenty-wizards/shared/dist/feature-flags.d.ts +9 -3
- package/node_modules/@engenty-wizards/shared/dist/feature-flags.js +9 -3
- package/node_modules/@engenty-wizards/shared/dist/knowledge.d.ts +13 -13
- package/node_modules/@engenty-wizards/shared/dist/knowledge.js +4 -4
- package/node_modules/@engenty-wizards/shared/dist/marketplace.d.ts +4 -4
- package/node_modules/@engenty-wizards/shared/dist/space-data.d.ts +2 -2
- package/node_modules/@engenty-wizards/shared/dist/surface.d.ts +20 -20
- package/node_modules/@engenty-wizards/shared/dist/wizard-package.js +1 -1
- package/package.json +1 -1
- package/apps/web/dist/assets/ReadOnly-DFysMEMF.js +0 -1
- package/apps/web/dist/assets/SettingsPage-DyUCIRjo.js +0 -1
- package/apps/web/dist/assets/changelog-Cnv7ZZEL.js +0 -1
- package/apps/web/dist/assets/circle-alert-BVj6idzu.js +0 -1
- package/apps/web/dist/assets/index-GSl2Rcjy.css +0 -1
- package/apps/web/dist/assets/lock-BoWS-JhN.js +0 -1
|
@@ -105,7 +105,7 @@ function boolOf(value) {
|
|
|
105
105
|
}
|
|
106
106
|
return null;
|
|
107
107
|
}
|
|
108
|
-
/** A value checked against its
|
|
108
|
+
/** A value checked against its category's type; null when it is not one. */
|
|
109
109
|
function typed(category, value) {
|
|
110
110
|
if (value === null || value === undefined || value === "") {
|
|
111
111
|
return null;
|
|
@@ -150,14 +150,14 @@ function cellOf(row, values) {
|
|
|
150
150
|
}
|
|
151
151
|
return row.text;
|
|
152
152
|
}
|
|
153
|
-
// --- the
|
|
153
|
+
// --- the categories of a space ---------------------------------------------------
|
|
154
154
|
export async function categoryRows(projectId) {
|
|
155
155
|
return db.query.spaceCategory.findMany({
|
|
156
156
|
where: eq(schema.spaceCategory.projectId, projectId),
|
|
157
157
|
orderBy: [asc(schema.spaceCategory.position), asc(schema.spaceCategory.name)],
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
/** A
|
|
160
|
+
/** A category by its name, as a step or a plugin writes it: case and spaces do not matter. */
|
|
161
161
|
function byName(rows, name) {
|
|
162
162
|
const want = name.replace(/\s+/g, " ").trim().toLowerCase();
|
|
163
163
|
return rows.find((c) => c.name.toLowerCase() === want);
|
|
@@ -189,7 +189,7 @@ function alike(a, b) {
|
|
|
189
189
|
x.slice(i) === y.slice(i + 1) ||
|
|
190
190
|
x.slice(i + 1) === y.slice(i));
|
|
191
191
|
}
|
|
192
|
-
/** The space's
|
|
192
|
+
/** The space's categories with their values, how many items have each, and their ranges. */
|
|
193
193
|
export async function listCategories(projectId) {
|
|
194
194
|
const rows = await categoryRows(projectId);
|
|
195
195
|
if (!rows.length) {
|
|
@@ -308,7 +308,7 @@ async function addValues(categoryId, values) {
|
|
|
308
308
|
return ids;
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
311
|
-
* Adds a
|
|
311
|
+
* Adds a category, or, by a name the space has already, leaves that one as it is apart from
|
|
312
312
|
* values it does not know yet. `proposed`: shown to be confirmed, never filled before.
|
|
313
313
|
*/
|
|
314
314
|
export async function putCategory(projectId, draft, opts = {}) {
|
|
@@ -369,7 +369,7 @@ export async function categoryRow(categoryId) {
|
|
|
369
369
|
}
|
|
370
370
|
return row;
|
|
371
371
|
}
|
|
372
|
-
/** Every item that has the
|
|
372
|
+
/** Every item that has the category: their text in the index starts with it. */
|
|
373
373
|
async function reindexHolders(categoryId) {
|
|
374
374
|
const rows = await db
|
|
375
375
|
.selectDistinct({
|
|
@@ -504,7 +504,7 @@ export async function mergeCategoryValues(fromId, intoId) {
|
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
await db.delete(schema.spaceCategoryValue).where(eq(schema.spaceCategoryValue.id, fromId));
|
|
507
|
-
// The
|
|
507
|
+
// The summary of the value that grew is no longer all of it.
|
|
508
508
|
await db
|
|
509
509
|
.update(schema.spaceCategoryValue)
|
|
510
510
|
.set({ summaryAt: null })
|
|
@@ -529,9 +529,9 @@ export async function orderCategoryValues(categoryId, ids) {
|
|
|
529
529
|
}
|
|
530
530
|
// --- on items ---------------------------------------------------------------------
|
|
531
531
|
/**
|
|
532
|
-
* Sets
|
|
532
|
+
* Sets categories on an item, by their names. A value null takes the category off. What a
|
|
533
533
|
* person set stays when an origin or a model writes again. Names the space has no taken
|
|
534
|
-
*
|
|
534
|
+
* category for are skipped and returned. True in `changed` when anything changed.
|
|
535
535
|
*/
|
|
536
536
|
export async function setItemCategories(projectId, ref, input, by) {
|
|
537
537
|
const rows = (await categoryRows(projectId)).filter((c) => !c.proposed);
|
|
@@ -591,7 +591,7 @@ export async function setItemCategories(projectId, ref, input, by) {
|
|
|
591
591
|
}
|
|
592
592
|
return { changed, unknown };
|
|
593
593
|
}
|
|
594
|
-
/** Whether an item is of the space's own
|
|
594
|
+
/** Whether an item is of the space's own Knowledge. */
|
|
595
595
|
async function itemInProject(projectId, ref) {
|
|
596
596
|
if ("pageId" in ref) {
|
|
597
597
|
const page = await db.query.spacePage.findFirst({
|
|
@@ -621,7 +621,7 @@ async function itemInProject(projectId, ref) {
|
|
|
621
621
|
: undefined;
|
|
622
622
|
return table?.projectId === projectId && !table.wizardId;
|
|
623
623
|
}
|
|
624
|
-
/** What a person set from the studio: by the
|
|
624
|
+
/** What a person set from the studio: by the category's id, a list of values or none. */
|
|
625
625
|
export async function setItemCategory(projectId, ref, categoryId, values) {
|
|
626
626
|
const category = await categoryRow(categoryId);
|
|
627
627
|
if (category.projectId !== projectId || !(await itemInProject(projectId, ref))) {
|
|
@@ -630,7 +630,7 @@ export async function setItemCategory(projectId, ref, categoryId, values) {
|
|
|
630
630
|
const { changed } = await setItemCategories(projectId, ref, { [category.name]: values.length ? values : null }, "person");
|
|
631
631
|
return changed;
|
|
632
632
|
}
|
|
633
|
-
/** The
|
|
633
|
+
/** The categories of items, by `itemKey`. */
|
|
634
634
|
export async function itemCategoriesOf(refs) {
|
|
635
635
|
const out = new Map();
|
|
636
636
|
if (!refs.length) {
|
|
@@ -681,7 +681,7 @@ export async function itemCategoriesOf(refs) {
|
|
|
681
681
|
}
|
|
682
682
|
return out;
|
|
683
683
|
}
|
|
684
|
-
/** `Name: Wert` for each
|
|
684
|
+
/** `Name: Wert` for each category an item has, in the order of the space's categories. */
|
|
685
685
|
export function categoryLines(categories, has) {
|
|
686
686
|
if (!has?.length) {
|
|
687
687
|
return [];
|
|
@@ -701,8 +701,8 @@ export function categoryLines(categories, has) {
|
|
|
701
701
|
return [`${c.name}: ${shown}`];
|
|
702
702
|
});
|
|
703
703
|
}
|
|
704
|
-
// --- a column as a
|
|
705
|
-
/** Writes the
|
|
704
|
+
// --- a column as a category --------------------------------------------------------------
|
|
705
|
+
/** Writes the category of a column onto the table's rows: their cells are its values. */
|
|
706
706
|
export async function syncColumnCategory(category, rowIds) {
|
|
707
707
|
if (!(category.tableId && category.columnId) || category.proposed) {
|
|
708
708
|
return;
|
|
@@ -719,7 +719,7 @@ export async function syncColumnCategory(category, rowIds) {
|
|
|
719
719
|
}, "origin");
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
/** After rows of a table changed: the
|
|
722
|
+
/** After rows of a table changed: the categories its columns are. */
|
|
723
723
|
export async function syncTableRowCategories(tableId, rowIds) {
|
|
724
724
|
const categories = await db.query.spaceCategory.findMany({
|
|
725
725
|
where: and(eq(schema.spaceCategory.tableId, tableId), isNotNull(schema.spaceCategory.columnId)),
|
|
@@ -814,8 +814,8 @@ async function withSubPages(pageIds) {
|
|
|
814
814
|
}
|
|
815
815
|
/**
|
|
816
816
|
* The items of the space a filter leaves: an item matches when it, or the page or table it
|
|
817
|
-
* belongs to, has every
|
|
818
|
-
*
|
|
817
|
+
* belongs to, has every category as asked. Null for no filter. A name the space has no
|
|
818
|
+
* category for is an error that lists the names there are.
|
|
819
819
|
*/
|
|
820
820
|
export async function filterItems(projectId, where) {
|
|
821
821
|
const entries = Object.entries(where ?? {});
|
|
@@ -827,7 +827,7 @@ export async function filterItems(projectId, where) {
|
|
|
827
827
|
for (const [name, w] of entries) {
|
|
828
828
|
const category = byName(rows, name);
|
|
829
829
|
if (!category) {
|
|
830
|
-
throw new ServiceError("invalid", `No
|
|
830
|
+
throw new ServiceError("invalid", `No category "${name}". There are: ${rows.map((c) => `${c.name} (${c.type})`).join(", ") || "none"}.`);
|
|
831
831
|
}
|
|
832
832
|
const valueIds = new Map((await db.query.spaceCategoryValue.findMany({
|
|
833
833
|
where: eq(schema.spaceCategoryValue.categoryId, category.id),
|
|
@@ -40,7 +40,7 @@ export function checkColumns(columns) {
|
|
|
40
40
|
}
|
|
41
41
|
return parsed.data;
|
|
42
42
|
}
|
|
43
|
-
/**
|
|
43
|
+
/** Data: the tables and pages the space's wizards keep, and the wizards to name whose they are. */
|
|
44
44
|
export async function listSpaceData(userId, projectId) {
|
|
45
45
|
const project = await ownedProject(userId, projectId);
|
|
46
46
|
const [tables, rows, pages, wizards] = await Promise.all([
|
|
@@ -253,7 +253,7 @@ async function refuseClash(tableId, key, rowId) {
|
|
|
253
253
|
throw new ServiceError("invalid", bilingual("Diesen Eintrag gibt es schon.", "This entry already exists."));
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
/** After a row of a table of
|
|
256
|
+
/** After a row of a table of Knowledge changed: its categories from its columns, its unit. */
|
|
257
257
|
async function rowChanged(table, rowId) {
|
|
258
258
|
if (table.wizardId) {
|
|
259
259
|
return;
|
|
@@ -479,7 +479,7 @@ export async function orderSubPages(_userId, pageId, ids) {
|
|
|
479
479
|
// --- what runs read and write --------------------------------------------------
|
|
480
480
|
// A run writes the pages of its own wizard, on the runtime it runs on: a run on the server writes
|
|
481
481
|
// the server's, also in a space a local install synced, which the studio there only shows. It
|
|
482
|
-
// reads its wizard's pages; the space's own are
|
|
482
|
+
// reads its wizard's pages; the space's own are Knowledge, read by path.
|
|
483
483
|
/** The pages of a run's wizard. */
|
|
484
484
|
export async function runPages(projectId, wizardId) {
|
|
485
485
|
return db.query.spacePage.findMany({
|
|
@@ -9,7 +9,7 @@ import { queueIndex } from "./project-index.js";
|
|
|
9
9
|
import { putCategory, setItemCategories } from "./space-categories.js";
|
|
10
10
|
import { listOrigin, putOriginPage, putOriginTable, removeOrigin } from "./space-data.js";
|
|
11
11
|
/**
|
|
12
|
-
* `server.spaceData` of a plugin:
|
|
12
|
+
* `server.spaceData` of a plugin: Knowledge it writes under keys of its own, with categories. The
|
|
13
13
|
* plugin's id is the origin of everything it writes; a person who changes an item keeps it.
|
|
14
14
|
*/
|
|
15
15
|
export function originData(origin) {
|
|
@@ -47,7 +47,7 @@ export function originData(origin) {
|
|
|
47
47
|
});
|
|
48
48
|
if (input.fill && written.state === "written") {
|
|
49
49
|
const changed = await fillCategories(input.space, { pageId: written.id }, input.markdown, input.title).catch((err) => {
|
|
50
|
-
console.error(`[plugin ${origin}]
|
|
50
|
+
console.error(`[plugin ${origin}] categories`, err);
|
|
51
51
|
return false;
|
|
52
52
|
});
|
|
53
53
|
if (changed) {
|
|
@@ -142,7 +142,7 @@ export function originData(origin) {
|
|
|
142
142
|
}
|
|
143
143
|
if (input.fill) {
|
|
144
144
|
await fillCategories(input.space, ref, converted.text, input.name).catch((err) => {
|
|
145
|
-
console.error(`[plugin ${origin}]
|
|
145
|
+
console.error(`[plugin ${origin}] categories`, err);
|
|
146
146
|
return false;
|
|
147
147
|
});
|
|
148
148
|
}
|
|
@@ -412,9 +412,9 @@ export async function removeSyncedSpace(rawSpaceId) {
|
|
|
412
412
|
return { ok: true };
|
|
413
413
|
}
|
|
414
414
|
// --- the space's own tables and pages --------------------------------------------
|
|
415
|
-
// What the admin made under Space →
|
|
415
|
+
// What the admin made under Space → Data on the install, not what a wizard keeps: those stay
|
|
416
416
|
// where their runs write them. Sent as a whole, it replaces what came before.
|
|
417
|
-
// Since
|
|
417
|
+
// Since Knowledge: sub-pages, where an item came from, categories and what has them. An install of
|
|
418
418
|
// before sends none of it.
|
|
419
419
|
export const syncDataSchema = z.object({
|
|
420
420
|
tables: z
|
|
@@ -575,7 +575,7 @@ export async function syncSpaceData(rawSpaceId, input) {
|
|
|
575
575
|
await reindexSpace(spaceId);
|
|
576
576
|
return { tables: input.tables.length, pages: input.pages.length };
|
|
577
577
|
}
|
|
578
|
-
/** The
|
|
578
|
+
/** The categories a local install sent, their values, and what has them: they replace these here. */
|
|
579
579
|
async function syncCategories(spaceId, categories, assignments) {
|
|
580
580
|
const ids = categories.map((c) => c.id);
|
|
581
581
|
const taken = ids.length
|
|
@@ -149,7 +149,7 @@ export async function buildStepTools(step, ctx, resolved, uploads) {
|
|
|
149
149
|
// The wizard's lists and files, the documents the person gave and the project's documents are
|
|
150
150
|
// always at hand. An installed client gets tools over an MCP bridge its CLI starts for every
|
|
151
151
|
// call, seconds of its own: a step with no use for the store goes without its tools, and
|
|
152
|
-
// without others (
|
|
152
|
+
// without others (Knowledge, a workspace file) the client answers without the bridge.
|
|
153
153
|
const idle = isHarnessVendor(resolved.vendor) &&
|
|
154
154
|
storeIdle(step, ctx.def.lists?.length ?? 0, uploads.length) &&
|
|
155
155
|
!(await hasStoreFiles(ctx.store));
|
|
@@ -5,8 +5,8 @@ import { pageReadInput, readKnowledgePage } from "./project.js";
|
|
|
5
5
|
import { attempt, clip } from "./shared.js";
|
|
6
6
|
/**
|
|
7
7
|
* Pages for a step that lists "pages": Markdown its wizard keeps for every run — notes, a log, a
|
|
8
|
-
* summary that grows — its memory, shown in the studio's Memory tab and under Space →
|
|
9
|
-
* page_read also reads the pages of
|
|
8
|
+
* summary that grows — its memory, shown in the studio's Memory tab and under Space → Data. Its
|
|
9
|
+
* page_read also reads the pages of Knowledge, by path. A test run reads the wizard's pages but
|
|
10
10
|
* writes into a copy of its own in the run's state, which goes with the run.
|
|
11
11
|
*/
|
|
12
12
|
export function pageTools(ctx) {
|
|
@@ -26,7 +26,7 @@ export function pageTools(ctx) {
|
|
|
26
26
|
return {
|
|
27
27
|
page_read: createTool({
|
|
28
28
|
id: "page_read",
|
|
29
|
-
description: "Read a page: one this wizard wrote, by its title, or a page of
|
|
29
|
+
description: "Read a page: one this wizard wrote, by its title, or a page of Knowledge, by its path (pages/…). Without either it lists the wizard's pages.",
|
|
30
30
|
inputSchema: z.object({
|
|
31
31
|
title: z.string().optional().describe("A page this wizard wrote"),
|
|
32
32
|
path: pageReadInput.path.optional(),
|
|
@@ -52,7 +52,7 @@ export function pageTools(ctx) {
|
|
|
52
52
|
}),
|
|
53
53
|
page_write: createTool({
|
|
54
54
|
id: "page_write",
|
|
55
|
-
description: "Write a page of this wizard in Markdown, kept for every later run and shown to the admin in the studio. A page with the same title is replaced — or added to with append: true (a log, a list that grows). Pages of
|
|
55
|
+
description: "Write a page of this wizard in Markdown, kept for every later run and shown to the admin in the studio. A page with the same title is replaced — or added to with append: true (a log, a list that grows). Pages of Knowledge are read-only.",
|
|
56
56
|
inputSchema: z.object({
|
|
57
57
|
title: z.string().min(1).max(200),
|
|
58
58
|
markdown: z.string().max(200_000),
|
|
@@ -7,15 +7,15 @@ import { filePaths, knowledgeCounts, listForStep, readPage, readTable, resolvePa
|
|
|
7
7
|
import { documentText, hasIndexEntries, searchKnowledge } from "../services/project-index.js";
|
|
8
8
|
import { attempt, clip } from "./shared.js";
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* Knowledge, for every agent step of the space's wizards: search it (a question, filtered by
|
|
11
|
+
* categories first, checked by a classifier after), list it by categories, read a page, a table
|
|
12
12
|
* or a file whole by its path. Hits and reads look like files — a path, front matter, Markdown or
|
|
13
13
|
* CSV — so a model reads them as it reads files. The search also finds what the space's plugins
|
|
14
14
|
* put into the index.
|
|
15
15
|
*/
|
|
16
16
|
const where = whereSchema
|
|
17
17
|
.optional()
|
|
18
|
-
.describe('Filter by
|
|
18
|
+
.describe('Filter by categories before searching, by their names: a value ("Baustelle": "Graz Süd"), a list of values, a range of numbers ({ "gte": 20000 }) or of days ({ "after": "2026-03-01", "before": "2026-03-31" }), { "contains": "…" } for a text, true/false. project_list without arguments names the categories and their values.');
|
|
19
19
|
export const pageReadInput = {
|
|
20
20
|
path: z.string().describe("The page's path, as project_search or project_list give it: pages/…"),
|
|
21
21
|
section: z
|
|
@@ -24,7 +24,7 @@ export const pageReadInput = {
|
|
|
24
24
|
.describe("Only this section: a heading of the page, or the start of one"),
|
|
25
25
|
from: z.number().int().min(0).optional().describe("Character to continue a long page at"),
|
|
26
26
|
};
|
|
27
|
-
/** A page of
|
|
27
|
+
/** A page of Knowledge by its path, for a step: its front matter and Markdown, in parts. */
|
|
28
28
|
export function readKnowledgePage(ctx, input) {
|
|
29
29
|
return attempt(async () => {
|
|
30
30
|
const read = await readPage(ctx.project.id, input.path, input);
|
|
@@ -42,7 +42,7 @@ export async function projectTools(ctx) {
|
|
|
42
42
|
const tools = {
|
|
43
43
|
project_search: createTool({
|
|
44
44
|
id: "project_search",
|
|
45
|
-
description: "Search
|
|
45
|
+
description: "Search the space's Knowledge: its pages, tables and files, and what its plugins keep (wiki pages, questions and answers). Gives items with their path, categories and best section, each checked for relevance. Ask in their language, with the words they would use; filter with `where` when the task names a category's value. Then read the items you need whole with page_read or table_read.",
|
|
46
46
|
inputSchema: z.object({
|
|
47
47
|
query: z.string().describe("What to look for: a question or keywords"),
|
|
48
48
|
where,
|
|
@@ -66,7 +66,7 @@ export async function projectTools(ctx) {
|
|
|
66
66
|
hits: found.hits.map((h) => ({
|
|
67
67
|
...(h.path ? { path: h.path } : {}),
|
|
68
68
|
title: h.title,
|
|
69
|
-
...(h.categories.length ? {
|
|
69
|
+
...(h.categories.length ? { categories: h.categories } : {}),
|
|
70
70
|
...(h.heading ? { section: h.heading } : {}),
|
|
71
71
|
...(h.sheet ? { page: h.sheet } : {}),
|
|
72
72
|
...(h.relevance !== null ? { relevance: h.relevance } : {}),
|
|
@@ -80,7 +80,7 @@ export async function projectTools(ctx) {
|
|
|
80
80
|
}),
|
|
81
81
|
project_list: createTool({
|
|
82
82
|
id: "project_list",
|
|
83
|
-
description: "List
|
|
83
|
+
description: "List Knowledge by its categories. Without `where`: the categories with their values and how many items each has. With `where`: the items it leaves, with their paths — all of them, where project_search gives the best few.",
|
|
84
84
|
inputSchema: z.object({ where }),
|
|
85
85
|
execute: (input) => attempt(async () => {
|
|
86
86
|
const listed = await listForStep(projectId, input.where);
|
|
@@ -92,7 +92,7 @@ export async function projectTools(ctx) {
|
|
|
92
92
|
if (counts.pages) {
|
|
93
93
|
tools.page_read = createTool({
|
|
94
94
|
id: "page_read",
|
|
95
|
-
description: "Read a page of
|
|
95
|
+
description: "Read a page of Knowledge whole by its path: front matter (title, categories, its source and original, its parent and sub-pages) and its Markdown. Long pages come in parts: pass `from` to continue. `section` reads one section.",
|
|
96
96
|
inputSchema: z.object(pageReadInput),
|
|
97
97
|
execute: (input) => readKnowledgePage(ctx, input),
|
|
98
98
|
});
|
|
@@ -100,7 +100,7 @@ export async function projectTools(ctx) {
|
|
|
100
100
|
if (counts.tables) {
|
|
101
101
|
tools.table_read = createTool({
|
|
102
102
|
id: "table_read",
|
|
103
|
-
description: "Read a table of
|
|
103
|
+
description: "Read a table of Knowledge by its path: its rows as CSV, filtered by its columns (by their names, like `where` of project_search). A few hundred rows at a time: pass `offset` to continue.",
|
|
104
104
|
inputSchema: z.object({
|
|
105
105
|
path: z.string().describe("The table's path: tables/…"),
|
|
106
106
|
where: whereSchema.optional().describe("Filter by columns, by their names"),
|
|
@@ -118,7 +118,7 @@ export async function projectTools(ctx) {
|
|
|
118
118
|
if (counts.files) {
|
|
119
119
|
tools.project_document = createTool({
|
|
120
120
|
id: "project_document",
|
|
121
|
-
description: "Read a file of
|
|
121
|
+
description: "Read a file of Knowledge as text by its path (files/…): a file that is not a page, or the original a page was read from. Long files come in parts: pass `from` to continue.",
|
|
122
122
|
inputSchema: z.object({
|
|
123
123
|
path: z
|
|
124
124
|
.string()
|
|
@@ -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,Kn as i,Qt as a,Vn as o,dn as s,en as c,gn as l,ln as u,on as d,pn as f,tn as p,vn as m}from"./ui-BbIh6SOJ.js";import{t as h}from"./preload-helper-CNEI7N0N.js";import{H as g,U as _,W as v,_t as y}from"./index-Ca1841qE.js";import{c as b,f as x}from"./settings-menu-BK8WpcGv.js";import{ReleaseNotes as S,loadReleases as C,releaseDate as w,releaseLabel as T}from"./ChangelogDialog-BYuVcmKR.js";var E=e(t(),1),D=[{name:`engenty wizards`,description:{de:`KI-Wizards aus einer Beschreibung, mit einem Link geteilt.`,en:`AI wizards built from a description, shared with a link.`},homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:{de:`Konnektoren, Datentabellen, Suche und die Engenties stammen aus dem engenty-Framework.`,en:`Connectors, data tables, search and the engenties come from the engenty framework.`},homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],O=[{name:`Mastra`,description:{de:`Agent-Framework hinter den KI-Schritten.`,en:`Agent framework behind the AI steps.`},homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:{de:`Modell-Aufrufe für Text, Bild, Video und Sprache.`,en:`Model calls for text, image, video and speech.`},homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:{de:`MCP-Server zum Bauen von Wizards, MCP-Client für Werkzeuge der Schritte.`,en:`MCP server for building wizards, MCP client for the steps' tools.`},homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:{de:`HTTP-API der Runtime.`,en:`The runtime's HTTP API.`},homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:{de:`Schema und Migrationen der Datenbanken.`,en:`Schema and migrations of the databases.`},homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:{de:`Eine Datenbank je Mandant, lokal als Datei oder bei Turso.`,en:`One database per tenant, a local file or at Turso.`},homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:{de:`Browser-Schritte sowie PDF- und PNG-Export.`,en:`Browser steps and the PDF and PNG export.`},homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`agentOS`,description:{de:`Sandbox für Code-Schritte ohne Docker.`,en:`Sandbox for code steps without Docker.`},homepage:`https://github.com/rivet-dev/agentos`,license:`Apache-2.0`},{name:`React`,description:{de:`UI-Bibliothek der Web-App.`,en:`UI library of the web app.`},homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:{de:`Build-Werkzeug der Web-App.`,en:`Build tool of the web app.`},homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:{de:`Styling der Oberfläche.`,en:`Styling of the interface.`},homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:{de:`Das Diagramm der Schritte im Editor.`,en:`The diagram of steps in the editor.`},homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:{de:`Server-Daten in der Web-App.`,en:`Server data in the web app.`},homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:{de:`Das Terminal auf der Seite, in dem sich KI-Clients anmelden.`,en:`The terminal on the page where AI clients sign in.`},homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:{de:`Icons.`,en:`Icons.`},homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:{de:`Schrift der Oberfläche.`,en:`Typeface of the interface.`},homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:{de:`Schrift der Überschriften.`,en:`Typeface of the headings.`},homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:{de:`Erzeugt den Changelog aus den Commits.`,en:`Generates the changelog from the commits.`},homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],k=e(n(),1),A=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function j({name:e,homepage:t,version:n,license:r,description:i}){return(0,k.jsxs)(`li`,{className:`py-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,k.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 font-medium text-[0.875rem] text-ink underline-offset-4 hover:underline`,children:[e,(0,k.jsx)(o,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,k.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,k.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function M({title:e,hint:t,children:n}){return(0,k.jsxs)(`section`,{className:`mt-6`,children:[(0,k.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,k.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function N({credits:e}){return(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,k.jsx)(j,{name:e.name,homepage:e.homepage,license:e.license,description:e.description[f]},e.name))})}function P({label:e,packages:t}){return(0,k.jsxs)(`div`,{className:`mt-4`,children:[(0,k.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,k.jsx)(j,{...e},e.name))})]})}function F({active:e}){let[t,n]=(0,E.useState)(null),[i,a]=(0,E.useState)(``);(0,E.useEffect)(()=>{if(!e||t)return;let r=!1;return h(()=>import(`./oss-credits-BQQX0kvk.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,E.useEffect)(()=>{e||a(``)},[e]);let o=i.trim().toLowerCase(),s=e=>o?e.filter(e=>A(o,e.name,e.license,e.description.de,e.description.en)):e,c=e=>o?e.filter(e=>A(o,e.name,e.license,e.version)):e,u=s(D),f=s(O),m=t?[{id:`shared`,label:l(`about.creditsShared`),packages:c(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:c(e.packages)}))].filter(e=>e.packages.length>0):[],g=u.length===0&&f.length===0&&m.length===0;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:l(`about.creditsHint`)}),(0,k.jsx)(p,{type:`search`,value:i,placeholder:l(`about.search`),onChange:e=>a(e.target.value)}),u.length>0?(0,k.jsx)(M,{title:l(`about.creditsProduct`),children:(0,k.jsx)(N,{credits:u})}):null,f.length>0?(0,k.jsx)(M,{title:l(`about.creditsBuiltWith`),children:(0,k.jsx)(N,{credits:f})}):null,t===null?(0,k.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,k.jsx)(d,{})}):m.length>0?(0,k.jsx)(M,{title:l(`about.creditsDeps`),hint:o?void 0:l(`about.creditsDepsHint`),children:m.map(e=>(0,k.jsx)(P,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,k.jsx)(r,{children:l(`about.noMatches`)}):null]})}var I=[`new`,`earlier`,`credits`],L=e=>l(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),R=e=>e===1?l(`about.change`):l(`about.changes`,{n:e});function z({open:e,onClose:t,me:n}){let r=n?.mode===`local`,{data:o,latest:f}=v(r&&e),[p,h]=(0,E.useState)(null),[D,O]=(0,E.useState)(`new`),A=x(I.indexOf(D)),j=o?.newer&&f?f:_;(0,E.useEffect)(()=>{if(!e)return;let t=!1;return h(null),C(j===`0.4.6`?void 0:j).then(e=>{t||h(e)}),()=>{t=!0}},[e,j]);let M=p?.find(e=>e.version===`v${j}`)??p?.[0]??null,N=p?.filter(e=>e!==M)??[],P=r?o?.kind??null:`cloud`;return(0,k.jsxs)(a,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,k.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,k.jsx)(c,{label:l(`common.close`),onClick:t,children:(0,k.jsx)(m,{className:`size-4`})})}),(0,k.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,k.jsx)(y,{size:96}),(0,k.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,k.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,k.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,k.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[l(`about.version`,{v:_}),P?` · ${l(`about.kind.${P}`)}`:``]})]}),r?(0,k.jsx)(`div`,{className:`mt-5`,children:(0,k.jsx)(g,{enabled:e})}):null,(0,k.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,k.jsx)(u,{value:D,onChange:O,options:I.map(e=>({id:e,label:L(e)})),label:l(`about.title`)})}),(0,k.jsxs)(`div`,{className:s(`mt-5`,b(A)),children:[D===`new`?p===null?(0,k.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,k.jsx)(d,{})}):M?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[T(M),(0,k.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:w(M)})]}),(0,k.jsx)(`div`,{className:`mt-3`,children:(0,k.jsx)(S,{release:M})})]}):(0,k.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:l(`about.changelogEmpty`)}):null,D===`earlier`?(0,k.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:N.map(e=>(0,k.jsxs)(`details`,{className:`group/r py-2`,children:[(0,k.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,k.jsx)(i,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,k.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:T(e)}),(0,k.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:w(e)}),(0,k.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:R(e.commits.length)})]}),(0,k.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,k.jsx)(S,{release:e})})]},e.version??`unreleased`))}):null,D===`credits`?(0,k.jsx)(F,{active:!0}):null]},D)]})}export{z as AboutDialog};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{$t as r,Kn as i,Qt as a,Vn as o,dn as s,en as c,gn as l,ln as u,on as d,pn as f,tn as p,vn as m}from"./ui-4IaTD7LB.js";import{t as h}from"./preload-helper-CNEI7N0N.js";import{H as g,U as _,W as v,_t as y}from"./index-BjQvGQp_.js";import{c as b,f as x}from"./settings-menu-BtEKL72n.js";import{ReleaseNotes as S,loadReleases as C,releaseDate as w,releaseLabel as T}from"./ChangelogDialog-BXpkgatF.js";var E=e(t(),1),D=[{name:`engenty wizards`,description:{de:`KI-Wizards aus einer Beschreibung, mit einem Link geteilt.`,en:`AI wizards built from a description, shared with a link.`},homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:{de:`Konnektoren, Datentabellen, Suche und die Engenties stammen aus dem engenty-Framework.`,en:`Connectors, data tables, search and the engenties come from the engenty framework.`},homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],O=[{name:`Mastra`,description:{de:`Agent-Framework hinter den KI-Schritten.`,en:`Agent framework behind the AI steps.`},homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:{de:`Modell-Aufrufe für Text, Bild, Video und Sprache.`,en:`Model calls for text, image, video and speech.`},homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:{de:`MCP-Server zum Bauen von Wizards, MCP-Client für Werkzeuge der Schritte.`,en:`MCP server for building wizards, MCP client for the steps' tools.`},homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:{de:`HTTP-API der Runtime.`,en:`The runtime's HTTP API.`},homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:{de:`Schema und Migrationen der Datenbanken.`,en:`Schema and migrations of the databases.`},homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:{de:`Eine Datenbank je Mandant, lokal als Datei oder bei Turso.`,en:`One database per tenant, a local file or at Turso.`},homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:{de:`Browser-Schritte sowie PDF- und PNG-Export.`,en:`Browser steps and the PDF and PNG export.`},homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`agentOS`,description:{de:`Sandbox für Code-Schritte ohne Docker.`,en:`Sandbox for code steps without Docker.`},homepage:`https://github.com/rivet-dev/agentos`,license:`Apache-2.0`},{name:`React`,description:{de:`UI-Bibliothek der Web-App.`,en:`UI library of the web app.`},homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:{de:`Build-Werkzeug der Web-App.`,en:`Build tool of the web app.`},homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:{de:`Styling der Oberfläche.`,en:`Styling of the interface.`},homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:{de:`Das Diagramm der Schritte im Editor.`,en:`The diagram of steps in the editor.`},homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:{de:`Server-Daten in der Web-App.`,en:`Server data in the web app.`},homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:{de:`Das Terminal auf der Seite, in dem sich KI-Clients anmelden.`,en:`The terminal on the page where AI clients sign in.`},homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:{de:`Icons.`,en:`Icons.`},homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:{de:`Schrift der Oberfläche.`,en:`Typeface of the interface.`},homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:{de:`Schrift der Überschriften.`,en:`Typeface of the headings.`},homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:{de:`Erzeugt den Changelog aus den Commits.`,en:`Generates the changelog from the commits.`},homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],k=e(n(),1),A=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function j({name:e,homepage:t,version:n,license:r,description:i}){return(0,k.jsxs)(`li`,{className:`py-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,k.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 font-medium text-[0.875rem] text-ink underline-offset-4 hover:underline`,children:[e,(0,k.jsx)(o,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,k.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,k.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function M({title:e,hint:t,children:n}){return(0,k.jsxs)(`section`,{className:`mt-6`,children:[(0,k.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,k.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function N({credits:e}){return(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,k.jsx)(j,{name:e.name,homepage:e.homepage,license:e.license,description:e.description[f]},e.name))})}function P({label:e,packages:t}){return(0,k.jsxs)(`div`,{className:`mt-4`,children:[(0,k.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,k.jsx)(j,{...e},e.name))})]})}function F({active:e}){let[t,n]=(0,E.useState)(null),[i,a]=(0,E.useState)(``);(0,E.useEffect)(()=>{if(!e||t)return;let r=!1;return h(()=>import(`./oss-credits-BQQX0kvk.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,E.useEffect)(()=>{e||a(``)},[e]);let o=i.trim().toLowerCase(),s=e=>o?e.filter(e=>A(o,e.name,e.license,e.description.de,e.description.en)):e,c=e=>o?e.filter(e=>A(o,e.name,e.license,e.version)):e,u=s(D),f=s(O),m=t?[{id:`shared`,label:l(`about.creditsShared`),packages:c(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:c(e.packages)}))].filter(e=>e.packages.length>0):[],g=u.length===0&&f.length===0&&m.length===0;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:l(`about.creditsHint`)}),(0,k.jsx)(p,{type:`search`,value:i,placeholder:l(`about.search`),onChange:e=>a(e.target.value)}),u.length>0?(0,k.jsx)(M,{title:l(`about.creditsProduct`),children:(0,k.jsx)(N,{credits:u})}):null,f.length>0?(0,k.jsx)(M,{title:l(`about.creditsBuiltWith`),children:(0,k.jsx)(N,{credits:f})}):null,t===null?(0,k.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,k.jsx)(d,{})}):m.length>0?(0,k.jsx)(M,{title:l(`about.creditsDeps`),hint:o?void 0:l(`about.creditsDepsHint`),children:m.map(e=>(0,k.jsx)(P,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,k.jsx)(r,{children:l(`about.noMatches`)}):null]})}var I=[`new`,`earlier`,`credits`],L=e=>l(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),R=e=>e===1?l(`about.change`):l(`about.changes`,{n:e});function z({open:e,onClose:t,me:n}){let r=n?.mode===`local`,{data:o,latest:f}=v(r&&e),[p,h]=(0,E.useState)(null),[D,O]=(0,E.useState)(`new`),A=x(I.indexOf(D)),j=o?.newer&&f?f:_;(0,E.useEffect)(()=>{if(!e)return;let t=!1;return h(null),C(j===`0.5.0`?void 0:j).then(e=>{t||h(e)}),()=>{t=!0}},[e,j]);let M=p?.find(e=>e.version===`v${j}`)??p?.[0]??null,N=p?.filter(e=>e!==M)??[],P=r?o?.kind??null:`cloud`;return(0,k.jsxs)(a,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,k.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,k.jsx)(c,{label:l(`common.close`),onClick:t,children:(0,k.jsx)(m,{className:`size-4`})})}),(0,k.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,k.jsx)(y,{size:96}),(0,k.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,k.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,k.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,k.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[l(`about.version`,{v:_}),P?` · ${l(`about.kind.${P}`)}`:``]})]}),r?(0,k.jsx)(`div`,{className:`mt-5`,children:(0,k.jsx)(g,{enabled:e})}):null,(0,k.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,k.jsx)(u,{value:D,onChange:O,options:I.map(e=>({id:e,label:L(e)})),label:l(`about.title`)})}),(0,k.jsxs)(`div`,{className:s(`mt-5`,b(A)),children:[D===`new`?p===null?(0,k.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,k.jsx)(d,{})}):M?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[T(M),(0,k.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:w(M)})]}),(0,k.jsx)(`div`,{className:`mt-3`,children:(0,k.jsx)(S,{release:M})})]}):(0,k.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:l(`about.changelogEmpty`)}):null,D===`earlier`?(0,k.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:N.map(e=>(0,k.jsxs)(`details`,{className:`group/r py-2`,children:[(0,k.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,k.jsx)(i,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,k.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:T(e)}),(0,k.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:w(e)}),(0,k.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:R(e.commits.length)})]}),(0,k.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,k.jsx)(S,{release:e})})]},e.version??`unreleased`))}):null,D===`credits`?(0,k.jsx)(F,{active:!0}):null]},D)]})}export{z as AboutDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{$t as r,Qt as i,dn as a,gn as o,on as s,tn as c}from"./ui-
|
|
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,Qt as i,dn as a,gn as o,on as s,tn as c}from"./ui-4IaTD7LB.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/,``):o(`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-CM_GdIVI.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:o(`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)(i,{open:e,onClose:t,title:o(`about.changelog`),wide:!0,height:`tall`,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[0.875rem] text-ink-3`,children:o(`about.changelogHint`)}),a===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(s,{})}):a.length===0?(0,d.jsx)(r,{children:o(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c,{type:`search`,value:f,placeholder:o(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(r,{children:o(`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,Bt as i,Cn as a,Ft as o,Lt as s,Mn as c,Pn as l,Rt as u,Sn as d,Tn as f,W as p,Yn as m,Zn as h,bt as g,dn as _,dt as v,en as y,fn as b,fr as x,ft as S,gn as C,kn as w,kt as T,lt as E,mt as D,nt as O,on as k,p as A,pn as j,pt as M,rn as N,rt as P,st as F,tr as I,tt as L,un as ee,ut as te,xn as R,yn as z,zt as ne}from"./ui-
|
|
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,Bt as i,Cn as a,Ft as o,Lt as s,Mn as c,Pn as l,Rt as u,Sn as d,Tn as f,W as p,Yn as m,Zn as h,bt as g,dn as _,dt as v,en as y,fn as b,fr as x,ft as S,gn as C,kn as w,kt as T,lt as E,mt as D,nt as O,on as k,p as A,pn as j,pt as M,rn as N,rt as P,st as F,tr as I,tt as L,un as ee,ut as te,xn as R,yn as z,zt as ne}from"./ui-4IaTD7LB.js";import{t as re}from"./phone-BrtQz-fG.js";import{Mt as ie,Q as ae,X as oe,Z as se,ft as ce,kt as le,t as ue,yt as de}from"./index-BjQvGQp_.js";import{n as fe}from"./RunnerView-CF_1rC-7.js";var pe={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`}]]};pe.node;var me=I(pe),he={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`}]]};he.node;var ge=I(he),_e={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`}]]};_e.node;var B=I(_e),ve={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`}]]};ve.node;var ye=I(ve),be=x(),V=e(t(),1),H=e(n(),1),xe=typeof window<`u`&&window.matchMedia(`(pointer: coarse)`).matches;function Se({since:e}){let[t,n]=(0,V.useState)(Date.now());if((0,V.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,H.jsxs)(`span`,{className:`font-mono text-[0.8125rem] text-white/60 tabular-nums`,children:[i,`:`,a]})}function U({label:e,on:t,danger:n,busy:r,onClick:i,children:a}){return(0,H.jsx)(`button`,{type:`button`,"aria-label":e,title:e,"aria-pressed":t,disabled:r,onClick:i,className:_(`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,H.jsx)(k,{className:`size-5`}):a})}function Ce({voice:e}){let t=(0,V.useRef)(null),{captions:n}=e;return(0,V.useEffect)(()=>{n.length&&t.current?.scrollIntoView({block:`end`})},[n]),n.length?(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 sm:px-5`,children:(0,H.jsxs)(`ol`,{className:`mx-auto flex max-w-[720px] flex-col gap-2 py-2`,children:[n.map(e=>(0,H.jsx)(`li`,{className:_(`text-[0.9375rem] leading-snug`,e.who===`bot`?`text-white/95`:`text-right text-white/50`),children:e.text},e.id)),(0,H.jsx)(`div`,{ref:t})]})}):null}function we({voice:e,view:t,video:n,className:r}){let i=e.state===`live`,a=e.state===`connecting`,[o,s]=(0,V.useState)(null),[c,u]=(0,V.useState)(!1);(0,V.useEffect)(()=>{s(i?Date.now():null)},[i]);let d=async()=>{u(!1),await e.start(),n&&await e.startCamera()},f=()=>{e.stop(),u(!0)},p=n||e.camera,m=[...e.captions].reverse().find(e=>e.who===`bot`),h=[...e.captions].reverse().find(e=>e.who===`me`),g=e.speaking?C(`talk.speaking`):e.listening?C(`talk.listening`):i?C(`talk.live`):a?C(`talk.connecting`):c?C(`video.ended`):``;return(0,H.jsxs)(`section`,{className:_(`relative flex min-h-0 flex-col bg-neutral-950 text-white`,`safe-top`,r),children:[(0,H.jsxs)(`div`,{className:`flex h-14 shrink-0 items-center gap-3 px-4 sm:px-5`,children:[(0,H.jsx)(`div`,{className:`min-w-0 flex-1 truncate font-display font-semibold text-[1rem] tracking-tight`,children:t?.wizard.title??``}),g?(0,H.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[0.8125rem] text-white/70`,children:[i?(0,H.jsx)(`span`,{className:_(`size-2 rounded-full`,e.speaking?`animate-pulse-dot bg-emerald-400`:`bg-rose`)}):null,g]}):null,(0,H.jsx)(Se,{since:o})]}),(0,H.jsxs)(`div`,{className:_(`grid min-h-0 gap-2 px-3 pb-2 sm:px-4`,p?`flex-1 grid-cols-1 sm:grid-cols-2`:`shrink-0 grid-cols-1`,!p&&i&&e.captions.length?`h-[38%]`:p?``:`flex-1`),children:[(0,H.jsxs)(`div`,{className:_(`relative min-h-0 overflow-hidden rounded-2xl bg-neutral-900`,!p&&`hidden`),children:[(0,H.jsx)(`video`,{ref:e.video,muted:!0,playsInline:!0,autoPlay:!0,className:_(`absolute inset-0 h-full w-full object-cover`,e.facing===`user`&&`-scale-x-100`,e.camera?`block`:`hidden`)}),e.camera?null:(0,H.jsxs)(`div`,{className:`absolute inset-0 flex flex-col items-center justify-center gap-2 text-white/50`,children:[(0,H.jsx)(B,{className:`size-8`}),(0,H.jsx)(`span`,{className:`text-[0.8125rem]`,children:C(`video.cameraOff`)})]}),(0,H.jsxs)(`span`,{className:`absolute bottom-2 left-3 rounded-md bg-black/50 px-2 py-0.5 text-[0.75rem]`,children:[C(`video.you`),e.muted?(0,H.jsx)(ie,{className:`ml-1.5 inline size-3`}):null]})]}),(0,H.jsxs)(`div`,{className:_(`relative flex min-h-0 items-center justify-center overflow-hidden rounded-2xl transition-shadow`,p?`bg-neutral-900`:`bg-transparent`,p&&e.speaking&&`ring-2 ring-emerald-400/70`),children:[(0,H.jsx)(`div`,{className:_(`rounded-full transition-shadow duration-500`,!p&&e.listening&&`shadow-[0_0_80px_20px_rgba(244,63,94,0.25)]`,!p&&e.speaking&&`shadow-[0_0_80px_20px_rgba(52,211,153,0.3)]`,e.speaking&&`animate-breathe`),children:(0,H.jsx)(ce,{kind:t?.wizard.avatar??`round`,size:p?140:200,fluffy:!0,interactive:!1})}),p?(0,H.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&&!p?(0,H.jsx)(Ce,{voice:e}):i&&(m||h)?(0,H.jsx)(`div`,{className:`shrink-0 px-4 pb-2 sm:px-5`,children:(0,H.jsxs)(`div`,{className:`mx-auto max-w-[720px] space-y-1 text-center`,children:[h?(0,H.jsx)(`p`,{className:`line-clamp-1 text-[0.8125rem] text-white/50`,children:h.text}):null,m?(0,H.jsx)(`p`,{className:`line-clamp-3 text-[0.9375rem] text-white/95 leading-snug`,children:m.text}):null]})}):null,e.error?(0,H.jsx)(`p`,{className:`shrink-0 px-5 pb-2 text-center text-[0.8125rem] text-rose`,children:e.error}):null,(0,H.jsx)(`div`,{className:`flex shrink-0 items-center justify-center gap-3 px-4 pt-1 pb-4`,children:i?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{label:C(e.muted?`video.unmute`:`video.mute`),on:!e.muted,onClick:e.toggleMute,children:e.muted?(0,H.jsx)(ie,{className:`size-5`}):(0,H.jsx)(l,{className:`size-5`})}),(0,H.jsx)(U,{label:C(e.camera?`talk.cameraOff`:`talk.camera`),on:e.camera,onClick:()=>e.camera?e.stopCamera():void e.startCamera(),children:e.camera?(0,H.jsx)(z,{className:`size-5`}):(0,H.jsx)(B,{className:`size-5`})}),e.camera&&xe?(0,H.jsx)(U,{label:C(`video.flip`),onClick:()=>void e.flipCamera(),children:(0,H.jsx)(R,{className:`size-5`})}):null,(0,H.jsx)(U,{label:C(`video.leave`),danger:!0,onClick:f,children:(0,H.jsx)(le,{className:`size-5`})})]}):(0,H.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,H.jsxs)(`button`,{type:`button`,disabled:a||!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:[a?(0,H.jsx)(k,{className:`size-4`}):n?(0,H.jsx)(z,{className:`size-5`}):(0,H.jsx)(l,{className:`size-5`}),C(c?`video.rejoin`:n?`video.join`:`talk.start`)]}),!c&&!e.error?(0,H.jsx)(`p`,{className:`max-w-sm text-center text-[0.75rem] text-white/50`,children:C(n?`video.hint`:`talk.joinHint`)}):null]})})]})}var Te=e=>g[e.kind]!==`device`,Ee=1024,De=4e3;function W(e,t){return e?e.length>t?`${e.slice(0,t)} …`:e:``}function Oe(e,t,n=!1){let r=[`status: ${e.status}`,`camera: ${n?`on`:`off`}`];if(e.ask)return r.push(e.ask.kind===`confirm`?`question: the step wants to "${e.ask.action.summary}" in ${e.ask.service}; answer_ask allows or skips it`:`question: a sign-in at ${e.ask.site.host}; the person types it on the screen, wait`),r.join(`
|
|
2
2
|
`);if(e.status===`running`){let t=[...e.events].reverse().find(e=>e.type===`tool`||e.type===`info`||e.type===`step_started`);return r.push(`working on: ${e.step?.title??``}`),t&&r.push(`doing: ${b(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}: ${W(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(`
|