@engenty/wizards-runtime 0.19.1 → 0.20.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/architect.js +4 -4
- package/apps/runtime/dist/agents/studio-assistant.js +2 -31
- package/apps/runtime/dist/app.js +4 -4
- package/apps/runtime/dist/assistant/knows.js +2 -2
- package/apps/runtime/dist/auth/index.js +1 -1
- package/apps/runtime/dist/authoring/example.js +1 -1
- package/apps/runtime/dist/authoring/guide.js +35 -6
- package/apps/runtime/dist/broker/account.js +85 -16
- package/apps/runtime/dist/broker/call.js +137 -37
- package/apps/runtime/dist/broker/log.js +19 -5
- package/apps/runtime/dist/broker/rwx.js +12 -9
- package/apps/runtime/dist/connectors/index.js +52 -11
- package/apps/runtime/dist/connectors/person-connections.js +279 -0
- package/apps/runtime/dist/connectors/person-sign-ins.js +74 -3
- package/apps/runtime/dist/connectors/same-service.js +14 -0
- package/apps/runtime/dist/connectors/space-choice.js +116 -0
- package/apps/runtime/dist/connectors/space-connections.js +40 -2
- package/apps/runtime/dist/db/client.js +8 -0
- package/apps/runtime/dist/db/kept-accounts.js +88 -0
- package/apps/runtime/dist/db/migrations/tenant/0075_person_connection.sql +25 -0
- package/apps/runtime/dist/db/migrations/tenant/0076_clients_in_spaces.sql +28 -0
- package/apps/runtime/dist/db/migrations/tenant/0077_client_spaces_at_root.sql +21 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0075_snapshot.json +7859 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0076_snapshot.json +7859 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0077_snapshot.json +7859 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +21 -0
- package/apps/runtime/dist/db/schema.js +67 -16
- package/apps/runtime/dist/docs/dev/api.md +8 -8
- package/apps/runtime/dist/docs/dev/wizard-format/index.md +3 -1
- package/apps/runtime/dist/elements/caller.js +1 -1
- package/apps/runtime/dist/elements/knowledge.js +5 -5
- package/apps/runtime/dist/elements/wizards.js +7 -11
- package/apps/runtime/dist/engine/notices.js +13 -1
- package/apps/runtime/dist/engine/requirements.js +116 -3
- package/apps/runtime/dist/engine/run-needs.js +58 -0
- package/apps/runtime/dist/engine/runner.js +209 -16
- package/apps/runtime/dist/engine/starts.js +9 -0
- package/apps/runtime/dist/engine/types.js +5 -1
- package/apps/runtime/dist/harness/claude.js +3 -1
- package/apps/runtime/dist/manage.js +1 -1
- package/apps/runtime/dist/mcp/tools.js +3 -3
- package/apps/runtime/dist/plugins/runs.js +2 -1
- package/apps/runtime/dist/prompts/authoring.md +13 -3
- package/apps/runtime/dist/prompts/goose.md +0 -5
- package/apps/runtime/dist/routes/api.js +9 -4
- package/apps/runtime/dist/routes/client-contract.js +2 -2
- package/apps/runtime/dist/routes/client-spaces.js +1 -16
- package/apps/runtime/dist/routes/connections.js +6 -1
- package/apps/runtime/dist/routes/marketplace.js +27 -7
- package/apps/runtime/dist/routes/plugins.js +1 -1
- package/apps/runtime/dist/routes/runs.js +157 -11
- package/apps/runtime/dist/routes/studio.js +42 -5
- package/apps/runtime/dist/services/client-portal.js +58 -49
- package/apps/runtime/dist/services/client-spaces.js +57 -125
- package/apps/runtime/dist/services/links.js +3 -3
- package/apps/runtime/dist/services/marketplace.js +6 -2
- package/apps/runtime/dist/services/members-studio.js +1 -1
- package/apps/runtime/dist/services/query-vectors.js +1 -1
- package/apps/runtime/dist/services/runs.js +19 -20
- package/apps/runtime/dist/services/space-parent.js +4 -11
- package/apps/runtime/dist/services/spaces.js +56 -47
- package/apps/runtime/dist/services/work-ai.js +3 -3
- package/apps/runtime/dist/store/index.js +28 -8
- package/apps/runtime/dist/store/shared-lists.js +2 -2
- package/apps/runtime/dist/sync/hub.js +9 -5
- package/apps/runtime/dist/tools/connector.js +4 -2
- package/apps/web/dist/assets/{AboutDialog-BUWu36Mb.js → AboutDialog-QWzpEK8M.js} +1 -1
- package/apps/web/dist/assets/{BlockEditor-1-EvUIta.js → BlockEditor-C44bI_ih.js} +1 -1
- package/apps/web/dist/assets/{Bundle-RNkjBwAL.js → Bundle-DZyQ1FP7.js} +1 -1
- package/apps/web/dist/assets/CapabilitiesPage-DAr0-gN1.js +2 -0
- package/apps/web/dist/assets/{ChangelogDialog-C_ZZLRZT.js → ChangelogDialog-CdHqJV2P.js} +1 -1
- package/apps/web/dist/assets/{CodeEditor-BEJKIMd0.js → CodeEditor-BRufUwu0.js} +1 -1
- package/apps/web/dist/assets/ConnectorsSection-BO6jHrYU.js +1 -0
- package/apps/web/dist/assets/EditorPage-Bx-fKnsY.js +3 -0
- package/apps/web/dist/assets/{FlowPreview-ptI86Ogs.js → FlowPreview-aj58c-gH.js} +1 -1
- package/apps/web/dist/assets/{LangSwitch-BNa_H8AR.js → LangSwitch-BNkytlus.js} +1 -1
- package/apps/web/dist/assets/Marketplace-D3hdvrkz.js +2 -0
- package/apps/web/dist/assets/NewWizardChannels-fveQcQlY.js +1 -0
- package/apps/web/dist/assets/NewWizardPage-BTX1g2t1.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-DwF6KdQy.js +1 -0
- package/apps/web/dist/assets/ProtocolSection-YnJcMN9E.js +1 -0
- package/apps/web/dist/assets/PublicRunner-Bp4DxTrD.js +1 -0
- package/apps/web/dist/assets/{ReadOnly-YF0RkR7P.js → ReadOnly-C6qmTD35.js} +1 -1
- package/apps/web/dist/assets/{Results-DJRLiVo0.js → Results-BNuuBiwU.js} +1 -1
- package/apps/web/dist/assets/{RunDrawer-CSpTNJp-.js → RunDrawer-CMgN-XTB.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-CuUB26YJ.js +2 -0
- package/apps/web/dist/assets/SetupPage-llGzMVeH.js +1 -0
- package/apps/web/dist/assets/{SharePage-OiKEnmL1.js → SharePage-CgQp_PT6.js} +1 -1
- package/apps/web/dist/assets/SkillEditor-ARx8QPGp.js +1 -0
- package/apps/web/dist/assets/Skills-frfXXEcF.js +9 -0
- package/apps/web/dist/assets/SpacePage-Dv6ocsc_.js +2 -0
- package/apps/web/dist/assets/StudioHome-B0bZRm1L.js +1 -0
- package/apps/web/dist/assets/TableEditor-CfzTLmJF.js +7 -0
- package/apps/web/dist/assets/{UpdateCheck-BpdsLIOc.js → UpdateCheck-D3QhfI5c.js} +2 -2
- package/apps/web/dist/assets/{brand-ByQY-UcL.js → brand-DKuVyYhH.js} +1 -1
- package/apps/web/dist/assets/changelog-Db3nvWao.js +1 -0
- package/apps/web/dist/assets/{code-editor-B8zG80PA.js → code-editor-BLwDuQLI.js} +2 -2
- package/apps/web/dist/assets/host-C-AAp8Bz.js +69 -0
- package/apps/web/dist/assets/i18n-Dyi0kvaA.js +55 -0
- package/apps/web/dist/assets/{index-D18zQ05f.css → index-CduFlFCp.css} +1 -1
- package/apps/web/dist/assets/index-CtE0rJEL.js +102 -0
- package/apps/web/dist/assets/{read-aloud-spC7eEBp.js → read-aloud-DGS8mWgC.js} +1 -1
- package/apps/web/dist/assets/session-EIDP3Wzc.js +1 -0
- package/apps/web/dist/assets/theme-B46aPLtX.js +14 -0
- package/apps/web/dist/assets/ui-DSgksc1H.js +16 -0
- package/apps/web/dist/assets/{useMutation-CoEdB_9_.js → useMutation-fT44ij_b.js} +1 -1
- package/apps/web/dist/assets/{viewers-BmcrgvXX.js → viewers-DvA5VsXw.js} +2 -2
- package/apps/web/dist/index.html +18 -13
- package/apps/web/dist/mcp/flow.html +62 -62
- package/node_modules/@engenty/wizards-shared/dist/catalog-prompt.js +2 -2
- package/node_modules/@engenty/wizards-shared/dist/connectors.d.ts +67 -0
- package/node_modules/@engenty/wizards-shared/dist/definition.d.ts +10324 -7
- package/node_modules/@engenty/wizards-shared/dist/definition.js +32 -6
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +17 -23
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +17 -23
- package/node_modules/@engenty/wizards-shared/dist/json-schema.js +3 -3
- package/node_modules/@engenty/wizards-shared/dist/marketplace-search.js +7 -1
- package/node_modules/@engenty/wizards-shared/dist/marketplace.d.ts +9 -2
- package/node_modules/@engenty/wizards-shared/dist/page-data.d.ts +72 -0
- package/node_modules/@engenty/wizards-shared/dist/page-data.js +5 -0
- package/node_modules/@engenty/wizards-shared/dist/page-look.d.ts +17 -0
- package/node_modules/@engenty/wizards-shared/dist/page-look.js +118 -0
- package/node_modules/@engenty/wizards-shared/dist/page-styles.d.ts +6 -0
- package/node_modules/@engenty/wizards-shared/dist/page-styles.js +98 -0
- package/node_modules/@engenty/wizards-shared/dist/page-texts.d.ts +36 -0
- package/node_modules/@engenty/wizards-shared/dist/page-texts.js +119 -0
- package/node_modules/@engenty/wizards-shared/dist/requires.js +2 -0
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +54 -1
- package/node_modules/@engenty/wizards-shared/dist/run.js +23 -0
- package/node_modules/@engenty/wizards-shared/dist/runner-texts.d.ts +27 -1
- package/node_modules/@engenty/wizards-shared/dist/runner-texts.js +26 -0
- package/node_modules/@engenty/wizards-shared/dist/store.d.ts +24 -1
- package/node_modules/@engenty/wizards-shared/dist/transition.d.ts +2 -1
- package/node_modules/@engenty/wizards-shared/dist/transition.js +5 -1
- package/node_modules/@engenty/wizards-shared/dist/wizard-text.js +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +1 -1
- package/apps/web/dist/assets/CapabilitiesPage-fgTP28Mn.js +0 -2
- package/apps/web/dist/assets/ConnectorsSection-iLrduYak.js +0 -1
- package/apps/web/dist/assets/EditorPage-CRZte0O1.js +0 -3
- package/apps/web/dist/assets/Marketplace-9aGWG2pJ.js +0 -2
- package/apps/web/dist/assets/NewWizardChannels-BFDm9vCT.js +0 -1
- package/apps/web/dist/assets/NewWizardPage-ueGFlLDo.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-DtDd7k_O.js +0 -1
- package/apps/web/dist/assets/PreviewPane-CEltrf_-.js +0 -7
- package/apps/web/dist/assets/ProtocolSection-Bb3c44Te.js +0 -1
- package/apps/web/dist/assets/PublicRunner-BaTg24s3.js +0 -1
- package/apps/web/dist/assets/SettingsPage--_ap3omw.js +0 -2
- package/apps/web/dist/assets/SetupPage-ELKHbmnE.js +0 -1
- package/apps/web/dist/assets/SkillEditor-C1_zwNOQ.js +0 -1
- package/apps/web/dist/assets/Skills-_pLGtOjH.js +0 -9
- package/apps/web/dist/assets/SpacePage-r4EbxEJe.js +0 -2
- package/apps/web/dist/assets/StudioHome-CwvxI29m.js +0 -1
- package/apps/web/dist/assets/changelog-Dt-V-BKp.js +0 -1
- package/apps/web/dist/assets/host-Ckjz94Ea.js +0 -69
- package/apps/web/dist/assets/i18n-ClCOlfx2.js +0 -55
- package/apps/web/dist/assets/index-BHKh0A9F.js +0 -10
- package/apps/web/dist/assets/runners-DNqzwMQ0.js +0 -1
- package/apps/web/dist/assets/session-Dd9duhPc.js +0 -1
- package/apps/web/dist/assets/theme-DumM6FI_.js +0 -14
- package/apps/web/dist/assets/ui-BjhZhw8x.js +0 -16
|
@@ -14,7 +14,7 @@ import { currentTenant } from "../tenants/tenant.js";
|
|
|
14
14
|
import { serverText } from "../texts.js";
|
|
15
15
|
import { currentRole, mayBuild, requireAdmin, requireBuild, requireWritable } from "./access.js";
|
|
16
16
|
import { notFound, ServiceError } from "./errors.js";
|
|
17
|
-
import { forgetWizardLinks,
|
|
17
|
+
import { forgetWizardLinks, removeRunsIn } from "./links.js";
|
|
18
18
|
import { pushPages } from "./pages.js";
|
|
19
19
|
import { removeSpaceFiles } from "./space-files.js";
|
|
20
20
|
const sectionId = z.string().regex(/^[A-Za-z0-9_-]{1,40}$/);
|
|
@@ -212,9 +212,8 @@ export async function ownedSpace(userId, spaceId) {
|
|
|
212
212
|
if (!p) {
|
|
213
213
|
throw notFound();
|
|
214
214
|
}
|
|
215
|
-
//
|
|
216
|
-
// (docs/plans/
|
|
217
|
-
// With `orgSpaces` any space may have clients: being in it decides (docs/plans/org-spaces.md).
|
|
215
|
+
// One of a client's people reaches only the client spaces they are in
|
|
216
|
+
// (docs/plans/org-spaces.md); every other space is not there for them.
|
|
218
217
|
if (currentRole() === "client" && !(await inSpace(userId, p.id))) {
|
|
219
218
|
throw notFound();
|
|
220
219
|
}
|
|
@@ -225,17 +224,17 @@ export async function ownedSpace(userId, spaceId) {
|
|
|
225
224
|
}
|
|
226
225
|
return p;
|
|
227
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Whether the space is kept from the person: someone else's Mein Space, or a space shared with
|
|
229
|
+
* its members only that they are not in. A space not made yet is not kept from anyone.
|
|
230
|
+
*/
|
|
231
|
+
export async function keptFrom(userId, spaceId) {
|
|
232
|
+
const p = await db.query.space.findFirst({ where: eq(schema.space.id, spaceId) });
|
|
233
|
+
return Boolean(p && ((await othersPersonal(userId, p)) || (await hiddenFrom(userId, p))));
|
|
234
|
+
}
|
|
228
235
|
/** Whether the space is shared with its members only and the person is not one of them. */
|
|
229
236
|
async function hiddenFrom(userId, p) {
|
|
230
|
-
return p.kind
|
|
231
|
-
}
|
|
232
|
-
/** The spaces with Kund:innen in them: they do not count against the plan's number. */
|
|
233
|
-
async function spacesWithClients() {
|
|
234
|
-
const rows = await db
|
|
235
|
-
.selectDistinct({ spaceId: schema.spaceMember.spaceId })
|
|
236
|
-
.from(schema.spaceMember)
|
|
237
|
-
.where(and(eq(schema.spaceMember.tenantId, currentTenant()), eq(schema.spaceMember.role, "client")));
|
|
238
|
-
return new Set(rows.map((r) => r.spaceId));
|
|
237
|
+
return p.kind !== "personal" && p.access === "members" && !(await inSpace(userId, p.id));
|
|
239
238
|
}
|
|
240
239
|
/** The organization's brand, Info and themes, as a space that takes them keeps them. */
|
|
241
240
|
function brandOf(root) {
|
|
@@ -298,7 +297,7 @@ async function ensureSpace(lang = "en") {
|
|
|
298
297
|
*/
|
|
299
298
|
export async function defaultSpace(userId) {
|
|
300
299
|
if (currentRole() === "client") {
|
|
301
|
-
const [first] = await
|
|
300
|
+
const [first] = await spacesOfClient(userId);
|
|
302
301
|
if (!first) {
|
|
303
302
|
throw notFound();
|
|
304
303
|
}
|
|
@@ -333,13 +332,13 @@ export async function rootSpace() {
|
|
|
333
332
|
}
|
|
334
333
|
/**
|
|
335
334
|
* Puts the spaces that stand beside the root under it, once: a space made before the switch,
|
|
336
|
-
* or before the root was the root.
|
|
335
|
+
* or before the root was the root.
|
|
337
336
|
*/
|
|
338
337
|
async function underRoot(root) {
|
|
339
338
|
await db
|
|
340
339
|
.update(schema.space)
|
|
341
340
|
.set({ parentId: root.id, updatedAt: new Date() })
|
|
342
|
-
.where(and(madeHere(), isNull(schema.space.parentId), ne(schema.space.id, root.id)
|
|
341
|
+
.where(and(madeHere(), isNull(schema.space.parentId), ne(schema.space.id, root.id)));
|
|
343
342
|
}
|
|
344
343
|
/** How many people an organization has, kept a minute: the Manage-App is asked at most that often. */
|
|
345
344
|
const peopleCount = new Map();
|
|
@@ -412,16 +411,13 @@ export async function personalSpace(userId, root) {
|
|
|
412
411
|
}
|
|
413
412
|
/**
|
|
414
413
|
* What a listed space is, for an outside client (docs/plans/org-spaces.md): the organization's
|
|
415
|
-
* own space, the person's Mein Space, a space
|
|
414
|
+
* own space, the person's Mein Space, a client space, or a team space.
|
|
416
415
|
*/
|
|
417
416
|
export function spaceIs(p) {
|
|
418
417
|
if (p.root) {
|
|
419
418
|
return "organization";
|
|
420
419
|
}
|
|
421
|
-
|
|
422
|
-
return "personal";
|
|
423
|
-
}
|
|
424
|
-
return p.kind === "client" || (p.clients ?? 0) > 0 ? "client" : "space";
|
|
420
|
+
return p.kind === "personal" ? "personal" : p.kind === "client" ? "client" : "space";
|
|
425
421
|
}
|
|
426
422
|
/** Whether a space holds nothing yet: no wizard, no page, no chat. */
|
|
427
423
|
async function emptySpace(spaceId) {
|
|
@@ -491,8 +487,9 @@ async function othersPersonal(userId, p) {
|
|
|
491
487
|
}
|
|
492
488
|
/**
|
|
493
489
|
* The spaces as the studio shows them with `orgSpaces` on: the root first, then the person's
|
|
494
|
-
* Mein Space, then the spaces under the root, oldest first,
|
|
495
|
-
* whether it is the root or the person's own and how
|
|
490
|
+
* Mein Space, then the team spaces and the client spaces under the root, oldest first, the team
|
|
491
|
+
* spaces up to the plan's number. Each says whether it is the root or the person's own and how
|
|
492
|
+
* many of a client's people are in it.
|
|
496
493
|
*/
|
|
497
494
|
async function listOrgSpaces(userId, build) {
|
|
498
495
|
const root = build ? await rootSpace() : undefined;
|
|
@@ -502,13 +499,14 @@ async function listOrgSpaces(userId, build) {
|
|
|
502
499
|
const personal = root && (await personalSpacesOn()) ? await personalSpace(userId, root) : null;
|
|
503
500
|
const limit = await spaceLimit();
|
|
504
501
|
const all = await db.query.space.findMany({
|
|
505
|
-
where: and(build ? eq(schema.space.tenantId, currentTenant()) : synced(),
|
|
502
|
+
where: and(build ? eq(schema.space.tenantId, currentTenant()) : synced(), inArray(schema.space.kind, ["space", "client"]), ...(root ? [ne(schema.space.id, root.id)] : [])),
|
|
506
503
|
orderBy: [schema.space.createdAt],
|
|
507
504
|
});
|
|
508
|
-
// The oldest up to the plan's number, the root among them; spaces
|
|
509
|
-
|
|
505
|
+
// The oldest team spaces up to the plan's number, the root among them; client spaces do not
|
|
506
|
+
// count, and are there while clients are on.
|
|
507
|
+
const clientsOn = (await currentFeatures()).clientSpaces === true;
|
|
510
508
|
let room = Number.isFinite(limit) ? Math.max(0, limit - (root ? 1 : 0)) : all.length;
|
|
511
|
-
const counted = all.filter((p) =>
|
|
509
|
+
const counted = all.filter((p) => (p.kind === "client" ? clientsOn : room-- > 0));
|
|
512
510
|
const theirs = new Set((await db
|
|
513
511
|
.select({ spaceId: schema.spaceMember.spaceId })
|
|
514
512
|
.from(schema.spaceMember)
|
|
@@ -540,9 +538,9 @@ async function listOrgSpaces(userId, build) {
|
|
|
540
538
|
* its number. One that does not: only what its local install synced — possibly nothing yet.
|
|
541
539
|
*/
|
|
542
540
|
export async function listSpaces(userId, lang) {
|
|
543
|
-
// A client sees
|
|
541
|
+
// A client sees their client spaces, nothing else (docs/plans/org-spaces.md).
|
|
544
542
|
if (currentRole() === "client") {
|
|
545
|
-
return
|
|
543
|
+
return spacesOfClient(userId);
|
|
546
544
|
}
|
|
547
545
|
const build = await mayBuild();
|
|
548
546
|
if (build) {
|
|
@@ -569,42 +567,53 @@ export async function listSpaces(userId, lang) {
|
|
|
569
567
|
wizardCount: counts.find((x) => x.spaceId === p.id)?.n ?? 0,
|
|
570
568
|
}));
|
|
571
569
|
}
|
|
572
|
-
/** The client spaces a client is in, as the space list shows them. */
|
|
573
|
-
async function
|
|
570
|
+
/** The client spaces one of a client's people is in, as the space list shows them. */
|
|
571
|
+
async function spacesOfClient(userId) {
|
|
574
572
|
const rows = await db
|
|
575
573
|
.select({ space: schema.space })
|
|
576
574
|
.from(schema.spaceMember)
|
|
577
575
|
.innerJoin(schema.space, eq(schema.space.id, schema.spaceMember.spaceId))
|
|
578
|
-
.where(and(eq(schema.spaceMember.userId, userId), eq(schema.spaceMember.role, "client"), eq(schema.space.tenantId, currentTenant())));
|
|
576
|
+
.where(and(eq(schema.spaceMember.userId, userId), eq(schema.spaceMember.role, "client"), eq(schema.space.tenantId, currentTenant()), eq(schema.space.kind, "client")));
|
|
579
577
|
return rows.map((r) => ({ ...r.space, wizardCount: 0 }));
|
|
580
578
|
}
|
|
581
|
-
export async function createSpace(userId, name, access = "all") {
|
|
579
|
+
export async function createSpace(userId, name, access = "all", kind = "space") {
|
|
582
580
|
await requireBuild();
|
|
583
581
|
await requireAdmin();
|
|
584
|
-
//
|
|
585
|
-
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
582
|
+
// A client space (docs/plans/org-spaces.md): with clients on, beside the team spaces under the
|
|
583
|
+
// root, seen by the whole team. It does not count as a space of the plan, as Mein Space does not.
|
|
584
|
+
const features = await currentFeatures();
|
|
585
|
+
const client = kind === "client";
|
|
586
|
+
if (client && !(features.clientSpaces === true && features.orgSpaces === true)) {
|
|
587
|
+
throw notFound();
|
|
588
|
+
}
|
|
589
|
+
const n = client
|
|
590
|
+
? 0
|
|
591
|
+
: (await db.query.space.findMany({
|
|
592
|
+
columns: { id: true },
|
|
593
|
+
where: and(eq(schema.space.tenantId, currentTenant()), eq(schema.space.kind, "space")),
|
|
594
|
+
})).length;
|
|
590
595
|
const limit = await spaceLimit();
|
|
591
|
-
if (n >= limit) {
|
|
596
|
+
if (!client && n >= limit) {
|
|
592
597
|
throw new ServiceError("refused", limit === 1 ? note("onlyOneSpaceAllowed") : note("mostSpaces", { count: limit }));
|
|
593
598
|
}
|
|
594
599
|
const id = nanoid(12);
|
|
595
600
|
// With `orgSpaces` a new space sits under the organization's own and reads it.
|
|
596
601
|
// It starts with the organization's brand and Info, and shared with whom the dialog said.
|
|
597
602
|
const root = (await orgSpacesOn()) ? await rootSpace() : undefined;
|
|
603
|
+
if (client && !root) {
|
|
604
|
+
throw notFound();
|
|
605
|
+
}
|
|
598
606
|
await db.transaction(async (tx) => {
|
|
599
607
|
await tx.insert(schema.space).values({
|
|
600
608
|
id,
|
|
601
609
|
tenantId: currentTenant(),
|
|
602
610
|
name,
|
|
611
|
+
kind,
|
|
603
612
|
...(root ? { ...brandOf(root), brandFrom: "root" } : { brand: {} }),
|
|
604
613
|
parentId: root?.id ?? null,
|
|
605
|
-
access: root ? access : "all",
|
|
614
|
+
access: root && !client ? access : "all",
|
|
606
615
|
});
|
|
607
|
-
if (root && access === "members") {
|
|
616
|
+
if (root && !client && access === "members") {
|
|
608
617
|
await tx.insert(schema.spaceMember).values({
|
|
609
618
|
id: nanoid(12),
|
|
610
619
|
tenantId: currentTenant(),
|
|
@@ -630,7 +639,7 @@ export async function updateSpace(userId, spaceId, patch) {
|
|
|
630
639
|
}
|
|
631
640
|
const page = patch.page ? await checkedPage(p, patch.page) : undefined;
|
|
632
641
|
// Who sees it and whose brand it shows are a space's under the root, never the root's own.
|
|
633
|
-
const under = Boolean(p.parentId) &&
|
|
642
|
+
const under = Boolean(p.parentId) && (await orgSpacesOn());
|
|
634
643
|
if ((patch.access || patch.brandFrom) && !under) {
|
|
635
644
|
throw new ServiceError("invalid", note("spaceChoiceNotHere"));
|
|
636
645
|
}
|
|
@@ -885,13 +894,13 @@ export async function deleteSpace(userId, spaceId) {
|
|
|
885
894
|
}
|
|
886
895
|
await removeSpace(spaceId);
|
|
887
896
|
}
|
|
888
|
-
/** Takes a space away with its wizards' links and its files, and
|
|
897
|
+
/** Takes a space away with its wizards' links, its runs and its files, and the spaces under it first. */
|
|
889
898
|
export async function removeSpace(spaceId) {
|
|
890
|
-
const
|
|
899
|
+
const under = await db
|
|
891
900
|
.select({ id: schema.space.id })
|
|
892
901
|
.from(schema.space)
|
|
893
902
|
.where(and(eq(schema.space.parentId, spaceId), eq(schema.space.tenantId, currentTenant())));
|
|
894
|
-
for (const c of
|
|
903
|
+
for (const c of under) {
|
|
895
904
|
await removeSpace(c.id);
|
|
896
905
|
}
|
|
897
906
|
const wizards = await db
|
|
@@ -901,7 +910,7 @@ export async function removeSpace(spaceId) {
|
|
|
901
910
|
for (const w of wizards) {
|
|
902
911
|
await forgetWizardLinks(w.id);
|
|
903
912
|
}
|
|
904
|
-
await
|
|
913
|
+
await removeRunsIn(spaceId);
|
|
905
914
|
await removeSpaceFiles(spaceId);
|
|
906
915
|
await db
|
|
907
916
|
.delete(schema.space)
|
|
@@ -122,9 +122,9 @@ export const showView = () => createTool({
|
|
|
122
122
|
const searches = (resolved) => resolved.vendor === "anthropic" || resolved.gateway;
|
|
123
123
|
/**
|
|
124
124
|
* A client's turn (docs/plans/client-portal.md, phase 1): the client space's Knowledge with what
|
|
125
|
-
* the
|
|
126
|
-
* views. No skills, sandbox, connections, plugins or web: nothing that reaches past the
|
|
127
|
-
* space or spends on the firm's sign-ins.
|
|
125
|
+
* the organization's root opened to clients, the wizards opened to them (a run lands in the client
|
|
126
|
+
* space) and views. No skills, sandbox, connections, plugins or web: nothing that reaches past the
|
|
127
|
+
* client space or spends on the firm's sign-ins.
|
|
128
128
|
*/
|
|
129
129
|
async function clientTools(space, userId, signal, chatId) {
|
|
130
130
|
const caller = personCaller({ space, userId, role: "client", signal, chatId });
|
|
@@ -3,6 +3,7 @@ import { firstRowAt, newCells, patchCells, rowKey, STORE_LIMITS, } from "@engent
|
|
|
3
3
|
import { cleanPath, mimeForPath } from "@engenty/wizards-shared/workspace";
|
|
4
4
|
import { and, asc, eq, inArray, like, lt, notLike, sql } from "drizzle-orm";
|
|
5
5
|
import { nanoid } from "nanoid";
|
|
6
|
+
import { chosenAccounts, forget } from "../connectors/person-connections.js";
|
|
6
7
|
import { db, schema } from "../db/client.js";
|
|
7
8
|
import { env } from "../env.js";
|
|
8
9
|
import { getBlob, putBlob } from "../files/blobs.js";
|
|
@@ -11,6 +12,8 @@ import { dropHolderData } from "./data.js";
|
|
|
11
12
|
import { StoreError } from "./errors.js";
|
|
12
13
|
import { deleteSharedRows, saveSharedRows, sharedRows } from "./shared-lists.js";
|
|
13
14
|
export { StoreError };
|
|
15
|
+
/** How a channel's person is the run's visitor (plugins/runs.ts): `p:` and a hash of who they are. */
|
|
16
|
+
export const CHANNEL_VISITOR = "p:";
|
|
14
17
|
/** The person a run belongs to: the signed-in admin, else the visitor of the shared link. */
|
|
15
18
|
export function holderOf(run) {
|
|
16
19
|
if (run.userId) {
|
|
@@ -23,8 +26,16 @@ export function scopeOf(run) {
|
|
|
23
26
|
wizardId: run.wizardId,
|
|
24
27
|
holder: holderOf(run),
|
|
25
28
|
...(run.clientSpaceId ? { clientSpaceId: run.clientSpaceId } : {}),
|
|
29
|
+
...(unwatched(run) ? { unwatched: true } : {}),
|
|
26
30
|
};
|
|
27
31
|
}
|
|
32
|
+
/** A run a start began with no person, or one a channel's person runs. */
|
|
33
|
+
function unwatched(run) {
|
|
34
|
+
if (run.userId) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
return run.visitorId ? run.visitorId.startsWith(CHANNEL_VISITOR) : Boolean(run.startedBy);
|
|
38
|
+
}
|
|
28
39
|
/** Marks the store as in use; stores nobody came back to are cleaned up. */
|
|
29
40
|
export async function touchStore(scope) {
|
|
30
41
|
await db
|
|
@@ -298,22 +309,31 @@ export async function deleteSecret(scope, slot) {
|
|
|
298
309
|
.delete(schema.storeSecret)
|
|
299
310
|
.where(and(ownSecrets(scope), eq(schema.storeSecret.slot, slot)));
|
|
300
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* What the wizard keeps for the person besides lists and files: its kept secrets, and the
|
|
314
|
+
* accounts it uses (`connection_choice`) under the slot `connection:<need>`.
|
|
315
|
+
*/
|
|
301
316
|
export async function listSecrets(scope) {
|
|
302
317
|
const rows = await db.query.storeSecret.findMany({ where: ownSecrets(scope) });
|
|
303
|
-
return
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
318
|
+
return [
|
|
319
|
+
...rows.map((r) => ({
|
|
320
|
+
slot: r.slot,
|
|
321
|
+
provider: r.provider,
|
|
322
|
+
label: r.label,
|
|
323
|
+
createdAt: r.createdAt.toISOString(),
|
|
324
|
+
})),
|
|
325
|
+
...(await chosenAccounts(scope.wizardId, scope.holder)),
|
|
326
|
+
];
|
|
309
327
|
}
|
|
310
328
|
// --- everything --------------------------------------------------------------
|
|
311
329
|
/**
|
|
312
|
-
* Deletes everything the wizard keeps for this person, their database too
|
|
313
|
-
*
|
|
330
|
+
* Deletes everything the wizard keeps for this person, their database too, and forgets the
|
|
331
|
+
* accounts it uses: an account no other wizard uses goes with it. Blobs stay: other files may
|
|
332
|
+
* share them.
|
|
314
333
|
*/
|
|
315
334
|
export async function clearStore(scope) {
|
|
316
335
|
await dropHolderData(scope);
|
|
336
|
+
await forget(scope.wizardId, scope.holder);
|
|
317
337
|
await db
|
|
318
338
|
.delete(schema.storeRow)
|
|
319
339
|
.where(and(eq(schema.storeRow.wizardId, scope.wizardId), eq(schema.storeRow.holder, scope.holder)));
|
|
@@ -7,8 +7,8 @@ import { StoreError } from "./errors.js";
|
|
|
7
7
|
const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
8
8
|
/**
|
|
9
9
|
* The table a shared list is kept in: made the first time, following the list as it changes. A
|
|
10
|
-
* run
|
|
11
|
-
*
|
|
10
|
+
* run that carries a space keeps it in that space (docs/plans/org-spaces.md): two spaces never
|
|
11
|
+
* share a list.
|
|
12
12
|
*/
|
|
13
13
|
export async function sharedTable(scope, def) {
|
|
14
14
|
const { wizardId } = scope;
|
|
@@ -6,7 +6,7 @@ import { managed, tenantInfo } from "../manage.js";
|
|
|
6
6
|
import { currentRole, isAdminRole, MEMBERS_EDIT_ONLY, mayBuild } from "../services/access.js";
|
|
7
7
|
import { ServiceError } from "../services/errors.js";
|
|
8
8
|
import { studioSpaces } from "../services/members-studio.js";
|
|
9
|
-
import { placeArrivingSpace, spaceLimit } from "../services/spaces.js";
|
|
9
|
+
import { keptFrom, placeArrivingSpace, spaceLimit } from "../services/spaces.js";
|
|
10
10
|
import { publishWizard, rotateShareLink, shareUrl } from "../services/wizards.js";
|
|
11
11
|
import { codeOf } from "../tenants/control.js";
|
|
12
12
|
import { currentTenant } from "../tenants/tenant.js";
|
|
@@ -30,15 +30,19 @@ function requireSchema(theirs) {
|
|
|
30
30
|
/**
|
|
31
31
|
* The organization as an install meets it: its schema, its number of spaces, its spaces. The
|
|
32
32
|
* install of a member meets the spaces whose Studio is open to members; the others refuse its
|
|
33
|
-
* pulls and pushes (services/members-studio.ts), so they are not offered to it.
|
|
33
|
+
* pulls and pushes (services/members-studio.ts), so they are not offered to it. Someone else's
|
|
34
|
+
* Mein Space and a space for its members only are not offered to anyone outside them.
|
|
34
35
|
*/
|
|
35
|
-
export async function syncOverview() {
|
|
36
|
+
export async function syncOverview(userId) {
|
|
36
37
|
const open = await studioSpaces();
|
|
37
|
-
const
|
|
38
|
+
const all = (await db.query.space.findMany({
|
|
38
39
|
where: eq(schema.space.tenantId, currentTenant()),
|
|
39
|
-
columns: { id: true, name: true, origin: true },
|
|
40
|
+
columns: { id: true, name: true, origin: true, kind: true },
|
|
40
41
|
orderBy: [schema.space.createdAt],
|
|
41
42
|
})).filter((s) => !open || open.has(s.id));
|
|
43
|
+
const kept = await Promise.all(all.map((s) => keptFrom(userId, s.id)));
|
|
44
|
+
// Client spaces stay out of the sync (docs/plans/org-spaces.md).
|
|
45
|
+
const spaces = all.filter((s, i) => !kept[i] && s.kind !== "client");
|
|
42
46
|
const info = managed ? await tenantInfo(currentTenant()).catch(() => null) : null;
|
|
43
47
|
const limit = await spaceLimit();
|
|
44
48
|
return {
|
|
@@ -217,7 +217,7 @@ export async function callConnection(call, input, ctx) {
|
|
|
217
217
|
service,
|
|
218
218
|
action: action.id,
|
|
219
219
|
reason: err.message.slice(0, 200),
|
|
220
|
-
}));
|
|
220
|
+
}), connection.id);
|
|
221
221
|
}
|
|
222
222
|
throw err;
|
|
223
223
|
});
|
|
@@ -232,7 +232,9 @@ export async function callConnection(call, input, ctx) {
|
|
|
232
232
|
: out.refused === "calls_per_day"
|
|
233
233
|
? note("stepCallsPerDay", { service })
|
|
234
234
|
: note("stepCallRefused", { service, action: action.id, reason: out.reason });
|
|
235
|
-
throw out.refused === "not_connected"
|
|
235
|
+
throw out.refused === "not_connected"
|
|
236
|
+
? new SignInNeeded(service, said, connection.id)
|
|
237
|
+
: new StepError(said);
|
|
236
238
|
}
|
|
237
239
|
return out.result;
|
|
238
240
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{cn as t,dn as n,gn as r,ln as i,tr as a,un as o,xn as s,yn as c}from"./ui-DSgksc1H.js";import{c as l,n as u}from"./marked.esm-BfGIZK7F.js";import{n as d,t as f}from"./jsx-runtime-C3cWAN_r.js";import{t as p}from"./logo-xL-sneZz.js";import{s as m}from"./i18n-Dyi0kvaA.js";import{g as h,h as g,m as _,t as v,u as y}from"./UpdateCheck-D3QhfI5c.js";import{ReleaseNotes as b,loadReleases as x,releaseDate as S,releaseLabel as C}from"./ChangelogDialog-CdHqJV2P.js";import{t as w}from"./preload-helper-Cj7BV335.js";var T=e(d(),1),E=[{name:`engenty wizards`,description:`credit.engenty-wizards`,homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:`credit.engenty`,homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],D=[{name:`Mastra`,description:`credit.mastra`,homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:`credit.ai-sdk`,homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:`credit.model-context-protocol`,homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:`credit.hono`,homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:`credit.drizzle-orm`,homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:`credit.libsql`,homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:`credit.playwright`,homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`React`,description:`credit.react`,homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:`credit.vite`,homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:`credit.tailwind-css`,homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:`credit.react-flow`,homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:`credit.tanstack-query`,homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:`credit.xterm-js`,homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:`credit.lucide`,homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:`credit.geist-geist-mono`,homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:`credit.space-grotesk`,homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:`credit.git-cliff`,homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],O=e(f(),1),k=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function A({name:e,homepage:t,version:n,license:r,description:i}){return(0,O.jsxs)(`li`,{className:`py-2.5`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,O.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 font-medium text-[0.875rem] text-ink underline-offset-4 hover:underline`,children:[e,(0,O.jsx)(l,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,O.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,O.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function j({title:e,hint:t,children:n}){return(0,O.jsxs)(`section`,{className:`mt-6`,children:[(0,O.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,O.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function M({credits:e}){return(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,O.jsx)(A,{name:e.name,homepage:e.homepage,license:e.license,description:m(e.description)},e.name))})}function N({label:e,packages:t}){return(0,O.jsxs)(`div`,{className:`mt-4`,children:[(0,O.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,O.jsx)(A,{...e},e.name))})]})}function P({active:e}){let[t,a]=(0,T.useState)(null),[o,s]=(0,T.useState)(``);(0,T.useEffect)(()=>{if(!e||t)return;let n=!1;return w(()=>import(`./oss-credits-B8LDQxiG.js`).then(e=>{n||a(e.default)}),[]),()=>{n=!0}},[e,t]),(0,T.useEffect)(()=>{e||s(``)},[e]);let c=o.trim().toLowerCase(),l=e=>c?e.filter(e=>k(c,e.name,e.license,m(e.description))):e,u=e=>c?e.filter(e=>k(c,e.name,e.license,e.version)):e,d=l(E),f=l(D),p=t?[{id:`shared`,label:m(`about.creditsShared`),packages:u(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:u(e.packages)}))].filter(e=>e.packages.length>0):[],h=d.length===0&&f.length===0&&p.length===0;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:m(`about.creditsHint`)}),(0,O.jsx)(n,{type:`search`,value:o,placeholder:m(`about.search`),onChange:e=>s(e.target.value)}),d.length>0?(0,O.jsx)(j,{title:m(`about.creditsProduct`),children:(0,O.jsx)(M,{credits:d})}):null,f.length>0?(0,O.jsx)(j,{title:m(`about.creditsBuiltWith`),children:(0,O.jsx)(M,{credits:f})}):null,t===null?(0,O.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,O.jsx)(r,{})}):p.length>0?(0,O.jsx)(j,{title:m(`about.creditsDeps`),hint:c?void 0:m(`about.creditsDepsHint`),children:p.map(e=>(0,O.jsx)(N,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&h?(0,O.jsx)(i,{children:m(`about.noMatches`)}):null]})}var F=[`new`,`earlier`,`credits`],I=e=>m(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),L=e=>e===1?m(`about.change`):m(`about.changes`,{n:e});function R({me:e,active:t,initialTab:n=`new`}){let i=e?.mode===`local`,{data:o,latest:l}=g(i&&t),[u,d]=(0,T.useState)(null),[f,w]=(0,T.useState)(n);(0,T.useEffect)(()=>w(n),[n]);let E=_(F.indexOf(f)),D=o?.newer&&l?l:h;(0,T.useEffect)(()=>{if(!t)return;let e=!1;return d(null),x(D===`0.20.0`?void 0:D).then(t=>{e||d(t)}),()=>{e=!0}},[t,D]);let k=u?.find(e=>e.version===`v${D}`)??u?.[0]??null,A=u?.filter(e=>e!==k)??[],j=i?o?.kind??null:`cloud`;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,O.jsx)(p,{size:96}),(0,O.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,O.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,O.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,O.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[m(`about.version`,{v:h}),j?` · ${m(`about.kind.${j}`)}`:``]})]}),i?(0,O.jsx)(`div`,{className:`mt-5`,children:(0,O.jsx)(v,{enabled:t})}):null,(0,O.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,O.jsx)(c,{value:f,onChange:w,options:F.map(e=>({id:e,label:I(e)})),label:m(`about.title`)})}),(0,O.jsxs)(`div`,{className:s(`mt-5`,y(E)),children:[f===`new`?u===null?(0,O.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,O.jsx)(r,{})}):k?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[C(k),(0,O.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:S(k)})]}),(0,O.jsx)(`div`,{className:`mt-3`,children:(0,O.jsx)(b,{release:k})})]}):(0,O.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:m(`about.changelogEmpty`)}):null,f===`earlier`?(0,O.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:A.map(e=>(0,O.jsxs)(`details`,{className:`group/r py-2`,children:[(0,O.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,O.jsx)(a,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,O.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:C(e)}),(0,O.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:S(e)}),(0,O.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:L(e.commits.length)})]}),(0,O.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,O.jsx)(b,{release:e})})]},e.version??`unreleased`))}):null,f===`credits`?(0,O.jsx)(P,{active:!0}):null]},f)]})}function z({open:e,onClose:n,me:r}){return(0,O.jsxs)(t,{open:e,onClose:n,wide:!0,height:`tall`,children:[(0,O.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,O.jsx)(o,{label:m(`common.close`),onClick:n,children:(0,O.jsx)(u,{className:`size-4`})})}),(0,O.jsx)(R,{me:r,active:e})]})}export{z as AboutDialog,R as AboutPanel};
|