@kukeon/console 0.0.0-stage → 0.10.0-edge.g4f69f964

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/assignments-Biqg1AT0.js +257 -0
  2. package/dist/assignments-tab.d.ts +4 -0
  3. package/dist/assignments.d.mts +40 -0
  4. package/dist/auth.d.ts +39 -0
  5. package/dist/bulk-ui.d.ts +49 -0
  6. package/dist/bulk.d.mts +14 -0
  7. package/dist/catalog-B29wwZiy.js +1949 -0
  8. package/dist/catalog-url-Dr9e92Yq.js +19 -0
  9. package/dist/catalog-url.d.mts +4 -0
  10. package/dist/catalog.d.ts +40 -0
  11. package/dist/cell-filter.d.ts +10 -0
  12. package/dist/cell-sidebar.d.ts +26 -0
  13. package/dist/cells.d.mts +29 -0
  14. package/dist/cgroup-format.d.ts +17 -0
  15. package/dist/cgroup.d.ts +4 -0
  16. package/dist/config-form.d.mts +66 -0
  17. package/dist/connector-ui-CG9kLZ5s.js +2716 -0
  18. package/dist/connector-ui.d.ts +129 -0
  19. package/dist/connectors-page-ZyuSRdHC.js +241 -0
  20. package/dist/connectors-page.d.ts +8 -0
  21. package/dist/connectors.d.mts +154 -0
  22. package/dist/container-log.d.ts +11 -0
  23. package/dist/create.d.ts +11 -0
  24. package/dist/creation-schema.d.mts +15 -0
  25. package/dist/daemon-CLdOLhDb.js +394 -0
  26. package/dist/daemon.d.ts +24 -0
  27. package/dist/display-name.d.ts +10 -0
  28. package/dist/drift-diff.d.ts +4 -0
  29. package/dist/exec.d.ts +15 -0
  30. package/dist/extensions.d.ts +111 -0
  31. package/dist/get-started.d.ts +9 -0
  32. package/dist/health.d.ts +22 -0
  33. package/dist/identities-page-CyW0d5n2.js +2137 -0
  34. package/dist/identities-page.d.ts +15 -0
  35. package/dist/identities.d.mts +24 -0
  36. package/dist/image-format.d.ts +6 -0
  37. package/dist/image-inventory.d.ts +12 -0
  38. package/dist/images.d.ts +5 -0
  39. package/dist/index.d.ts +5 -0
  40. package/dist/index.js +5241 -0
  41. package/dist/initialize-CAOkMhlL.js +146 -0
  42. package/dist/initialize.d.ts +21 -0
  43. package/dist/inventory.d.ts +66 -0
  44. package/dist/lifecycle-policy.d.ts +11 -0
  45. package/dist/lifecycle.d.ts +24 -0
  46. package/dist/log-buffer.d.ts +8 -0
  47. package/dist/main.d.ts +13 -0
  48. package/dist/majordomo-p7giptj3.js +3782 -0
  49. package/dist/majordomo.d.ts +102 -0
  50. package/dist/manage-nav.d.ts +4 -0
  51. package/dist/manifest-diff.d.mts +11 -0
  52. package/dist/merged-values-CBzWsNOS.js +739 -0
  53. package/dist/merged-values.d.ts +24 -0
  54. package/dist/network-format.d.ts +30 -0
  55. package/dist/network.d.ts +13 -0
  56. package/dist/new-agent-BweyzBnY.js +201 -0
  57. package/dist/new-agent.d.ts +27 -0
  58. package/dist/new-cell-Iceq2Zfv.js +1985 -0
  59. package/dist/new-cell.d.ts +29 -0
  60. package/dist/new-config-C9NSC9Ou.js +1541 -0
  61. package/dist/new-config.d.ts +7 -0
  62. package/dist/notifications.d.ts +26 -0
  63. package/dist/onboarding-oZBJXTy0.js +395 -0
  64. package/dist/onboarding.d.mts +40 -0
  65. package/dist/panel-cells.d.mts +8 -0
  66. package/dist/recording-source.d.ts +37 -0
  67. package/dist/recording.d.mts +24 -0
  68. package/dist/registry-credentials.d.ts +13 -0
  69. package/dist/relationships.d.mts +12 -0
  70. package/dist/replay.d.ts +14 -0
  71. package/dist/request.d.ts +16 -0
  72. package/dist/router.d.ts +12 -0
  73. package/dist/routes.d.ts +43 -0
  74. package/dist/schedule-DzQ3Homi.js +113 -0
  75. package/dist/schedule-format.d.mts +9 -0
  76. package/dist/schedule.d.ts +16 -0
  77. package/dist/scope-actions.d.ts +9 -0
  78. package/dist/screens.d.ts +6 -0
  79. package/dist/secret-form.d.ts +24 -0
  80. package/dist/settings-nav.d.ts +5 -0
  81. package/dist/settings-page.d.ts +4 -0
  82. package/dist/settings-values.d.mts +18 -0
  83. package/dist/settings.d.ts +50 -0
  84. package/dist/sidebar-shell.d.ts +55 -0
  85. package/dist/sources-page-CxMSM-sz.js +423 -0
  86. package/dist/sources-page.d.ts +5 -0
  87. package/dist/space-subnets.d.ts +3 -0
  88. package/dist/style.css +2 -0
  89. package/dist/team-form.d.mts +56 -0
  90. package/dist/team-plan-CFOIv1lN.js +735 -0
  91. package/dist/team-plan.d.ts +22 -0
  92. package/dist/team-wizard.d.ts +8 -0
  93. package/dist/teams-page-C6UGy4Fw.js +2216 -0
  94. package/dist/teams-page.d.ts +9 -0
  95. package/dist/teams.d.mts +114 -0
  96. package/dist/terminal-palette.d.ts +8 -0
  97. package/dist/terminal.d.ts +98 -0
  98. package/dist/unread.d.mts +19 -0
  99. package/dist/use-unread.d.ts +4 -0
  100. package/dist/user-menu.d.ts +7 -0
  101. package/dist/views.d.mts +8 -0
  102. package/dist/workbench.d.ts +16 -0
  103. package/package.json +45 -4
  104. package/README.md +0 -3
@@ -0,0 +1,2137 @@
1
+ import { A as e, At as t, Bn as n, C as r, Cn as i, D as a, E as o, En as s, Hn as c, Ht as l, Jt as u, Kn as d, Ln as f, Mn as p, Mt as m, Nt as h, Rt as g, S as _, Sn as v, T as y, Tn as b, Un as x, Ut as S, Wt as C, _ as w, _n as T, an as E, b as D, c as O, cn as k, dn as A, en as j, et as M, f as N, gn as P, hn as F, kn as I, m as L, nn as R, o as ee, on as z, p as B, rn as te, s as ne, tn as re, u as ie, un as V, v as ae, w as H, wn as U, wt as oe, x as se, xn as W, y as G, zn as ce } from "./connector-ui-CG9kLZ5s.js";
2
+ import { a as le, c as ue, l as de, o as fe, s as pe, t as me } from "./catalog-B29wwZiy.js";
3
+ import { n as he } from "./catalog-url-Dr9e92Yq.js";
4
+ import { o as ge, r as _e } from "./onboarding-oZBJXTy0.js";
5
+ import { l as ve, r as ye } from "./team-plan-CFOIv1lN.js";
6
+ import { _ as be, a as xe, b as Se, c as Ce, d as we, f as Te, g as Ee, h as De, i as Oe, l as ke, n as Ae, o as je, p as Me, r as Ne, s as Pe, t as Fe, u as Ie, v as Le, y as Re } from "./assignments-Biqg1AT0.js";
7
+ import { useEffect as K, useMemo as ze, useState as q } from "react";
8
+ import { apiFetch as Be } from "@kukeon/api-client";
9
+ import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
10
+ import { Disclosure as Ve } from "@kukeon/ui";
11
+ // src/identities.mjs
12
+ var Z = (e) => Array.isArray(e) ? e : [], Q = (e) => typeof e == "string" ? e : "", He = "secret", $ = "login", Ue = "default", We = "agent";
13
+ function Ge(e) {
14
+ let t = e?.metadata ?? {};
15
+ return {
16
+ name: Q(t.name),
17
+ realm: Q(t.realm),
18
+ ...Q(t.space) ? { space: t.space } : {},
19
+ ...Q(t.stack) ? { stack: t.stack } : {}
20
+ };
21
+ }
22
+ function Ke(e) {
23
+ let t = e?.metadata?.labels ?? {}, n = Q(t["kukeon.io/role"]).trim();
24
+ if (!n) return "";
25
+ let r = Q(t["kukeon.io/team"]).trim() || Q(e?.metadata?.annotations?.["kukeon.io/agent-team"]).trim();
26
+ return r ? `${r}/${n}` : n;
27
+ }
28
+ var qe = (e) => [
29
+ e.realm,
30
+ e.space ?? "",
31
+ e.stack ?? "",
32
+ e.name
33
+ ].join("/"), Je = (e) => [...new Set(e.filter(Boolean))].sort();
34
+ function Ye(e) {
35
+ let t = /* @__PURE__ */ new Map();
36
+ for (let n of Z(e)) for (let e of Z(n?.status?.connectors)) {
37
+ let r = I(e?.identity);
38
+ if (!r) continue;
39
+ let i = F(r), a = t.get(i) ?? [], o = {
40
+ ...Ge(n),
41
+ role: Ke(n)
42
+ };
43
+ a.some((e) => qe(e) === qe(o)) || a.push(o), t.set(i, a);
44
+ }
45
+ return t;
46
+ }
47
+ function Xe(e) {
48
+ let t = [];
49
+ return Z(e).forEach((e, n) => {
50
+ for (let r of Z(e)) {
51
+ let e = r?.doc?.spec?.defaults;
52
+ if (!e) continue;
53
+ let i = Z(r.scope).slice(0, n + 1), a = {
54
+ level: [
55
+ "realm",
56
+ "space",
57
+ "stack"
58
+ ][n],
59
+ scope: i
60
+ };
61
+ for (let [n, r] of Object.entries(e.secrets ?? {})) {
62
+ let e = I(r?.secretRef);
63
+ e && t.push({
64
+ ...a,
65
+ slot: n,
66
+ ref: e
67
+ });
68
+ }
69
+ let o = I(e.git?.identityRef);
70
+ o && t.push({
71
+ ...a,
72
+ slot: "",
73
+ git: !0,
74
+ ref: o
75
+ });
76
+ }
77
+ }), t;
78
+ }
79
+ function Ze({ connectors: e, secrets: t, logins: n, configs: r, scopes: i }) {
80
+ let a = Ye(r), o = Xe(i), s = [];
81
+ for (let r of Z(e)) {
82
+ if (te(r)) continue;
83
+ let e = Q(r.title) || Q(r.name);
84
+ for (let n of j(t, r.name)) {
85
+ let t = I(n), i = F(t), c = (a.get(i) ?? []).slice().sort((e, t) => qe(e).localeCompare(qe(t))), l = o.filter((e) => F(e.ref) === i);
86
+ s.push({
87
+ key: `${He}:${i}`,
88
+ kind: He,
89
+ connector: r.name,
90
+ title: e,
91
+ ref: t,
92
+ name: n.name,
93
+ scope: T(t),
94
+ method: "",
95
+ type: n.type,
96
+ fields: n.identity,
97
+ status: "",
98
+ exists: !0,
99
+ usedBy: c,
100
+ roles: Je(c.map((e) => e.role)),
101
+ defaults: l,
102
+ unused: !c.length && !l.length
103
+ });
104
+ }
105
+ for (let t of k(n, r.name)) {
106
+ let n = t.volume, i = t.usedBy.map((e) => ({
107
+ ...e,
108
+ role: Q(e.role)
109
+ }));
110
+ s.push({
111
+ key: `${$}:${F(n)}`,
112
+ kind: $,
113
+ connector: r.name,
114
+ title: e,
115
+ ref: n,
116
+ name: n.name,
117
+ scope: T(n),
118
+ method: t.method || "login",
119
+ type: $,
120
+ fields: {},
121
+ status: t.state,
122
+ since: t.since,
123
+ exists: t.exists,
124
+ session: t.session,
125
+ usedBy: i,
126
+ roles: Je(i.map((e) => e.role)),
127
+ defaults: [],
128
+ unused: !i.length
129
+ });
130
+ }
131
+ }
132
+ return s;
133
+ }
134
+ function Qe({ connectors: e, rows: t, realmDefaults: n }) {
135
+ let r = [];
136
+ for (let i of Z(e)) {
137
+ if (te(i)) continue;
138
+ let e = Q(i.title) || Q(i.name);
139
+ for (let n of V(i)) {
140
+ let a = Z(t).find((e) => e.kind === "login" && e.connector === i.name && e.roles.includes("default/agent"));
141
+ r.push({
142
+ key: `system:${i.name}:${n.name}`,
143
+ connector: i.name,
144
+ title: e,
145
+ method: n.name,
146
+ kind: $,
147
+ row: a
148
+ });
149
+ }
150
+ for (let a of C(i)) {
151
+ let o = Z(n).find((e) => e?.connector === i.name && Q(e.method) === a.method), s = I(o?.levels?.realm), c = s ? Z(t).find((e) => e.kind === "secret" && e.connector === i.name && F(e.ref) === F(s)) : void 0;
152
+ r.push({
153
+ key: `system:${i.name}:${a.method}`,
154
+ connector: i.name,
155
+ title: e,
156
+ method: a.method,
157
+ kind: He,
158
+ row: c,
159
+ ...s ? { ref: s } : {}
160
+ });
161
+ }
162
+ }
163
+ return r;
164
+ }
165
+ function $e(e, t, n = S) {
166
+ let r = Z(t).flatMap((e) => {
167
+ let t = I(e?.levels?.realm);
168
+ return t ? [{
169
+ level: "realm",
170
+ scope: [n],
171
+ slot: Q(e.slot),
172
+ ref: t
173
+ }] : [];
174
+ });
175
+ return Z(e).map((e) => {
176
+ if (e.kind !== "secret") return e;
177
+ let t = r.filter((t) => F(t.ref) === F(e.ref) && !e.defaults.some((e) => e.level === t.level && e.scope.join("/") === t.scope.join("/") && F(e.ref) === F(t.ref)));
178
+ if (!t.length) return e;
179
+ let n = [...e.defaults, ...t];
180
+ return {
181
+ ...e,
182
+ defaults: n,
183
+ unused: !e.usedBy.length && !n.length
184
+ };
185
+ });
186
+ }
187
+ function et(e, t) {
188
+ return t ? Z(e).filter((e) => e.connector === t) : Z(e);
189
+ }
190
+ function tt(e) {
191
+ let t = Je(Z(e?.roles).map((e) => e.includes("/") ? e.split("/")[0] : ""));
192
+ return {
193
+ configs: Z(e?.usedBy).length,
194
+ teams: t
195
+ };
196
+ }
197
+ function nt(e) {
198
+ return Z(e?.scope).join(" / ");
199
+ }
200
+ // src/assignments-tab.tsx
201
+ function rt(e) {
202
+ let t = d("/teams", e), [n, r] = q({}), i = t.data;
203
+ return K(() => {
204
+ if (!i) return;
205
+ let e = !0;
206
+ return Promise.all(i.teams.map(async (e) => {
207
+ let t = await Be(`${oe(e.name)}`, { headers: { Accept: "application/json" } }), n = await t.json().catch(() => ({}));
208
+ if (!t.ok) throw n.error ?? {
209
+ code: "http_error",
210
+ message: `HTTP ${t.status}`
211
+ };
212
+ return n;
213
+ })).then((t) => {
214
+ e && r({ teams: t });
215
+ }, (t) => {
216
+ e && r({ error: o(t) });
217
+ }), () => {
218
+ e = !1;
219
+ };
220
+ }, [i]), t.error ? { error: t.error } : n;
221
+ }
222
+ function it(e) {
223
+ return e.kind === "defaults" ? "All teams" : e.kind === "team" ? e.label : `${e.team}/${e.role}`;
224
+ }
225
+ function at({ row: e, connector: t, defaults: n, team: r, system: i, logins: a, disabled: o, onPick: s }) {
226
+ let c = t.title || t.name;
227
+ if (e.kind === "role") {
228
+ let n = r?.view?.roles.items.find((t) => t.name === e.role);
229
+ if (!Ee(n, r?.view?.harnesses.items, t)) return /* @__PURE__ */ Y("td", {
230
+ className: "assignment-cell",
231
+ children: /* @__PURE__ */ Y("span", {
232
+ className: "description",
233
+ children: "—"
234
+ })
235
+ });
236
+ }
237
+ let l = Ae({
238
+ row: e,
239
+ connector: t,
240
+ defaults: n,
241
+ team: r,
242
+ system: i
243
+ }), u = e.kind === "team" ? De({
244
+ name: t.name,
245
+ defaults: n,
246
+ team: {
247
+ inherit: !0,
248
+ items: {}
249
+ }
250
+ }) : e.kind === "role" ? De({
251
+ name: t.name,
252
+ defaults: n,
253
+ team: {
254
+ inherit: !!r?.form?.connectors.inherit,
255
+ items: r?.form?.connectors.items ?? {}
256
+ }
257
+ }) : void 0, d = e.kind === "defaults" ? "Not set — own per role" : `Inherit → ${Ne(u, t, i)}`, f = t.methods.filter((e) => !Ie(t, e.name)), p = Ce(a, t, i), m = l.own?.state ?? "", h = `${it(e)} ${c}`, g = (e, n) => e === "inherit" ? d : Ne({
258
+ found: !0,
259
+ choice: n ?? {},
260
+ from: ""
261
+ }, t, i), _ = (n, r = m) => {
262
+ let a = n === "inherit" ? void 0 : Oe(n, t, i, r);
263
+ s({
264
+ row: e,
265
+ connector: t,
266
+ pick: n,
267
+ choice: a,
268
+ text: g(n, a)
269
+ });
270
+ };
271
+ return /* @__PURE__ */ X("td", {
272
+ className: "assignment-cell",
273
+ children: [
274
+ /* @__PURE__ */ X("select", {
275
+ "aria-label": h,
276
+ value: l.pick,
277
+ disabled: o,
278
+ onChange: (e) => _(e.target.value, ""),
279
+ children: [
280
+ /* @__PURE__ */ Y("option", {
281
+ value: Te,
282
+ children: d
283
+ }),
284
+ i && /* @__PURE__ */ Y("option", {
285
+ value: "system",
286
+ children: "System default"
287
+ }),
288
+ /* @__PURE__ */ Y("option", {
289
+ value: "own",
290
+ children: "Own per role"
291
+ }),
292
+ p.map((e) => /* @__PURE__ */ X("option", {
293
+ value: `id:${e.value}`,
294
+ children: [e.label, e.state ? ` — ${e.state}` : ""]
295
+ }, e.value)),
296
+ l.pick.startsWith("id:") && !p.some((e) => `id:${e.value}` === l.pick) && /* @__PURE__ */ Y("option", {
297
+ value: l.pick,
298
+ children: l.pick.slice(3)
299
+ }),
300
+ f.map((e) => /* @__PURE__ */ X("option", {
301
+ value: `${Me}${e.name}`,
302
+ children: [e.name, " method"]
303
+ }, e.name))
304
+ ]
305
+ }),
306
+ l.pick.startsWith("method:") && /* @__PURE__ */ X("select", {
307
+ "aria-label": `${h} harness state`,
308
+ value: m,
309
+ disabled: o,
310
+ onChange: (e) => _(l.pick, e.target.value),
311
+ children: [/* @__PURE__ */ Y("option", {
312
+ value: "",
313
+ children: "persistent"
314
+ }), /* @__PURE__ */ Y("option", {
315
+ value: "ephemeral",
316
+ children: "ephemeral"
317
+ })]
318
+ }),
319
+ e.kind !== "defaults" && l.pick !== "inherit" && /* @__PURE__ */ X("span", {
320
+ className: "description assignment-resolved",
321
+ children: [" → ", Ne(l.resolved, t, i)]
322
+ })
323
+ ]
324
+ });
325
+ }
326
+ function ot({ revision: t, onChanged: n }) {
327
+ let [r, i] = q(0), a = d("/connectors", t), s = d("/connectors/logins", t + r), c = d("/sources", t + r), { teams: l, error: u } = rt(t + r), [f, p] = q(), [m, h] = q(), [g, _] = q(""), [v, y] = q(), [b, S] = q([]), { notify: C } = e(), w = Pe(a.data), T = c.data?.defaultForm?.connectors ?? {}, E = ze(() => je(T, l), [T, l]), D = new Map((l ?? []).map((e) => [e.summary.name, e])), O = () => {
328
+ p(void 0), h(void 0), y(void 0);
329
+ };
330
+ function k(e) {
331
+ if (e.row.kind === "defaults") {
332
+ let t = we(T, e.connector.name, e.choice);
333
+ return ke(l).map((e) => ({
334
+ team: e,
335
+ form: {
336
+ ...D.get(e).form,
337
+ connectors: {
338
+ inherit: !1,
339
+ items: t
340
+ }
341
+ }
342
+ }));
343
+ }
344
+ let t = D.get(e.row.team ?? "");
345
+ if (!t?.form) return [];
346
+ let n = e.row.kind === "team" ? Se(t.form, e.connector.name, e.choice, T) : Re(t.form, e.row.role ?? "", e.connector.name, e.choice, c.data?.defaultForm?.roles);
347
+ return [{
348
+ team: t.summary.name,
349
+ form: n
350
+ }];
351
+ }
352
+ async function A() {
353
+ if (!f || g) return;
354
+ _("preview"), y(void 0);
355
+ let e = k(f), t = await Promise.all(e.map(async (e) => {
356
+ try {
357
+ return {
358
+ ...e,
359
+ outcome: await H(oe("preview"), ve(e.team, e.form))
360
+ };
361
+ } catch (t) {
362
+ return {
363
+ ...e,
364
+ error: o(t)
365
+ };
366
+ }
367
+ }));
368
+ h(t), _("");
369
+ }
370
+ async function j() {
371
+ if (!f || !m || g) return;
372
+ _("apply"), y(void 0);
373
+ let e = [];
374
+ try {
375
+ if (f.row.kind === "defaults") {
376
+ await H(M, xe(f.connector.name, f.choice));
377
+ for (let t of m) {
378
+ let n = await H(oe(t.team, "reapply"), {});
379
+ e.push(...n.result?.warnings ?? []);
380
+ }
381
+ } else for (let t of m) {
382
+ let n = await H(oe(), ve(t.team, t.form));
383
+ e.push(...n.result?.warnings ?? []);
384
+ }
385
+ C({
386
+ key: `assignment:${f.row.key}:${f.connector.name}`,
387
+ tone: "success",
388
+ message: `${f.connector.title || f.connector.name} for ${it(f.row)} set to ${f.text}${m.length ? `; recomposed ${m.map((e) => e.team).join(", ")}` : ""}.`
389
+ }), S(e), O(), i((e) => e + 1), n();
390
+ } catch (e) {
391
+ y(o(e));
392
+ } finally {
393
+ _("");
394
+ }
395
+ }
396
+ let N = (e) => Le(s.data, e), P = f ? Fe(l, f.row, f.connector) : [], F = f?.choice?.identity ?? "", I = f && F ? be(s.data, F, P) : [], L = (m ?? []).flatMap((e) => (e.outcome?.connectors ?? []).map((e) => e.warning ?? "").filter(Boolean)), R = a.loading || !l && !u || c.loading && !c.data;
397
+ return /* @__PURE__ */ X("section", {
398
+ className: "panel identity-assignments",
399
+ "aria-label": "Assignments",
400
+ children: [/* @__PURE__ */ X("div", {
401
+ className: "panel-heading",
402
+ children: [/* @__PURE__ */ Y("h2", { children: "Assignments" }), /* @__PURE__ */ X("span", {
403
+ className: "badge",
404
+ children: [l?.length ?? 0, " teams"]
405
+ })]
406
+ }), /* @__PURE__ */ X("div", {
407
+ className: "panel-body",
408
+ children: [
409
+ /* @__PURE__ */ X("p", {
410
+ className: "description",
411
+ children: [
412
+ "Which identity each team and role authenticates a harness with. A team that sets nothing keeps ",
413
+ /* @__PURE__ */ Y("code", { children: "<team>-<role>-<harness>-state" }),
414
+ " for each role (",
415
+ /* @__PURE__ */ Y("strong", { children: "Own per role" }),
416
+ "); ",
417
+ /* @__PURE__ */ Y("strong", { children: "Inherit" }),
418
+ " takes the level above — All teams for a team, the team for a role. ",
419
+ /* @__PURE__ */ Y("strong", { children: "System default" }),
420
+ " is the login identity of the ",
421
+ /* @__PURE__ */ Y("code", { children: "default" }),
422
+ " team's ",
423
+ /* @__PURE__ */ Y("code", { children: "agent" }),
424
+ " role. Login identities are listed on the ",
425
+ /* @__PURE__ */ Y("a", {
426
+ href: G(),
427
+ children: "Identities"
428
+ }),
429
+ " tab. Running cells keep their identity until they are restarted."
430
+ ]
431
+ }),
432
+ a.error && /* @__PURE__ */ Y(x, {
433
+ error: a.error,
434
+ kind: "Connector"
435
+ }),
436
+ u && /* @__PURE__ */ Y(x, {
437
+ error: u,
438
+ kind: "Team"
439
+ }),
440
+ c.error && /* @__PURE__ */ X("p", {
441
+ className: "stale",
442
+ children: ["The defaults could not be read: ", c.error.message]
443
+ }),
444
+ R && /* @__PURE__ */ Y("p", {
445
+ role: "status",
446
+ children: "Loading assignments…"
447
+ }),
448
+ b.map((e) => /* @__PURE__ */ Y("p", {
449
+ className: "connector-warning",
450
+ role: "note",
451
+ children: e
452
+ }, e)),
453
+ l && a.data && (w.length ? /* @__PURE__ */ Y("div", {
454
+ className: "table-scroll",
455
+ children: /* @__PURE__ */ X("table", {
456
+ "aria-label": "Team identity assignments",
457
+ children: [/* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ X("tr", { children: [/* @__PURE__ */ Y("th", {
458
+ scope: "col",
459
+ children: "Team / role"
460
+ }), w.map((e) => /* @__PURE__ */ Y("th", {
461
+ scope: "col",
462
+ children: e.title || e.name
463
+ }, e.name))] }) }), /* @__PURE__ */ Y("tbody", { children: E.map((e) => /* @__PURE__ */ X("tr", {
464
+ className: `assignment-${e.kind}`,
465
+ "aria-label": it(e),
466
+ children: [/* @__PURE__ */ X("th", {
467
+ scope: "row",
468
+ children: [e.kind === "role" ? /* @__PURE__ */ Y("span", {
469
+ className: "assignment-role",
470
+ children: e.label
471
+ }) : /* @__PURE__ */ Y("strong", { children: e.label }), e.system && /* @__PURE__ */ X(J, { children: [" ", /* @__PURE__ */ Y("span", {
472
+ className: "badge",
473
+ children: "system"
474
+ })] })]
475
+ }), w.map((t) => /* @__PURE__ */ Y(at, {
476
+ row: e,
477
+ connector: t,
478
+ defaults: T,
479
+ team: e.team ? D.get(e.team) : void 0,
480
+ system: N(t),
481
+ logins: s.data,
482
+ disabled: !!g,
483
+ onPick: (e) => {
484
+ p(e), h(void 0), y(void 0);
485
+ }
486
+ }, t.name))]
487
+ }, e.key)) })]
488
+ })
489
+ }) : /* @__PURE__ */ Y("p", { children: "No connector authenticates a harness." })),
490
+ f && /* @__PURE__ */ X("div", {
491
+ className: "assignment-change",
492
+ role: "region",
493
+ "aria-label": "Pending change",
494
+ children: [
495
+ /* @__PURE__ */ X("p", { children: [
496
+ /* @__PURE__ */ Y("strong", { children: f.connector.title || f.connector.name }),
497
+ " for ",
498
+ /* @__PURE__ */ Y("strong", { children: it(f.row) }),
499
+ " → ",
500
+ f.text,
501
+ ".",
502
+ " ",
503
+ f.row.kind === "defaults" ? /* @__PURE__ */ X(J, { children: [
504
+ "Writes ",
505
+ /* @__PURE__ */ X("code", { children: ["connectors.", f.connector.name] }),
506
+ " of the TeamDefaults and recomposes the teams that inherit it: ",
507
+ ke(l).join(", ") || "none",
508
+ "."
509
+ ] }) : f.row.kind === "team" ? /* @__PURE__ */ X(J, { children: [
510
+ "Writes ",
511
+ /* @__PURE__ */ X("code", { children: ["spec.connectors.", f.connector.name] }),
512
+ " of team ",
513
+ f.row.team,
514
+ "."
515
+ ] }) : /* @__PURE__ */ X(J, { children: [
516
+ "Writes ",
517
+ /* @__PURE__ */ X("code", { children: ["connectors.", f.connector.name] }),
518
+ " of role ",
519
+ f.row.role,
520
+ " in team ",
521
+ f.row.team,
522
+ "."
523
+ ] })
524
+ ] }),
525
+ I.length > 1 && /* @__PURE__ */ X("p", {
526
+ className: "connector-warning",
527
+ role: "note",
528
+ children: [
529
+ "Login identity ",
530
+ /* @__PURE__ */ Y("code", { children: F.split("@")[0] }),
531
+ " would be shared by roles ",
532
+ I.join(", "),
533
+ ". ",
534
+ "A login identity normally serves one role; another role may share it at your risk (its start rewrites role content in the state directory, and a Codex refresh token is single-use)."
535
+ ]
536
+ }),
537
+ /* @__PURE__ */ X("div", {
538
+ className: "connector-actions",
539
+ children: [
540
+ /* @__PURE__ */ Y("button", {
541
+ type: "button",
542
+ disabled: !!g,
543
+ onClick: () => void A(),
544
+ children: g === "preview" ? "Previewing…" : "Preview"
545
+ }),
546
+ /* @__PURE__ */ Y("button", {
547
+ type: "button",
548
+ className: "primary-action",
549
+ disabled: !!g || !m || m.some((e) => e.error),
550
+ onClick: () => void j(),
551
+ children: g === "apply" ? "Applying…" : "Apply"
552
+ }),
553
+ /* @__PURE__ */ Y("button", {
554
+ type: "button",
555
+ className: "subtle-button",
556
+ disabled: !!g,
557
+ onClick: O,
558
+ children: "Cancel"
559
+ })
560
+ ]
561
+ }),
562
+ v && /* @__PURE__ */ Y(x, {
563
+ error: v,
564
+ kind: "Team"
565
+ }),
566
+ m && /* @__PURE__ */ X(J, { children: [
567
+ !m.length && /* @__PURE__ */ Y("p", {
568
+ className: "description",
569
+ role: "status",
570
+ children: "No team inherits it: only the defaults change."
571
+ }),
572
+ L.map((e) => /* @__PURE__ */ Y("p", {
573
+ className: "connector-warning",
574
+ role: "note",
575
+ children: e
576
+ }, e)),
577
+ m.map((e) => e.error ? /* @__PURE__ */ X("div", {
578
+ className: "error",
579
+ role: "alert",
580
+ children: [/* @__PURE__ */ X("strong", { children: ["Preview failed: ", e.team] }), /* @__PURE__ */ Y("p", { children: e.error.message })]
581
+ }, e.team) : e.outcome && /* @__PURE__ */ Y(ye, {
582
+ plan: e.outcome.plan,
583
+ title: `Preview: ${e.team}`
584
+ }, e.team))
585
+ ] })
586
+ ]
587
+ })
588
+ ]
589
+ })]
590
+ });
591
+ }
592
+ // src/identities-page.tsx
593
+ function st(e) {
594
+ return m("/secrets/" + [...T(e), e.name].map(encodeURIComponent).join("/"));
595
+ }
596
+ function ct(e) {
597
+ return m("/configs/" + [
598
+ e.realm,
599
+ e.space,
600
+ e.stack,
601
+ e.name
602
+ ].filter((e) => !!e).map(encodeURIComponent).join("/"));
603
+ }
604
+ function lt(e) {
605
+ let t = e.data?.rows[0] ?? [];
606
+ return (t.find((e) => e.scope[0] === "default") ?? t[0])?.scope[0] ?? "";
607
+ }
608
+ function ut(e, t) {
609
+ let [n, r] = q(t ?? { realm: "" }), i = lt(e);
610
+ return K(() => {
611
+ !n.realm && i && r({ realm: i });
612
+ }, [n.realm, i]), [n, r];
613
+ }
614
+ function dt({ connector: t, inventory: n, initiallyOpen: r = !1, onChanged: i }) {
615
+ let a = t.title || t.name, [s, c] = q(r), [l, u] = ut(n, void 0), [d, f] = q({
616
+ hosts: "",
617
+ name: "",
618
+ key: "",
619
+ passphraseFile: "",
620
+ makeDefault: !0
621
+ }), [p, m] = q(!1), [h, g] = q(), [_, v] = q(), { notify: y } = e(), b = (e) => {
622
+ f((t) => ({
623
+ ...t,
624
+ ...e
625
+ })), g(void 0);
626
+ };
627
+ async function S(e) {
628
+ if (e.preventDefault(), !p) {
629
+ m(!0), g(void 0), v(void 0);
630
+ try {
631
+ let e = await H(w(t.name, "import"), re({
632
+ ...d,
633
+ realm: l.realm
634
+ }));
635
+ v(e);
636
+ let n = e.secrets.find((t) => t.name === e.name)?.action === "updated" ? "updated" : "imported";
637
+ y({
638
+ key: `identity-import:${t.name}`,
639
+ tone: "success",
640
+ message: `${a} identity ${e.name} ${n} in ${e.realm}${e.default ? `; it is now the ${e.realm} default` : ""}.`
641
+ }), i();
642
+ } catch (e) {
643
+ g(o(e));
644
+ } finally {
645
+ m(!1);
646
+ }
647
+ }
648
+ }
649
+ return /* @__PURE__ */ X("div", {
650
+ className: "connector-import",
651
+ children: [/* @__PURE__ */ Y("div", {
652
+ className: "connector-actions",
653
+ children: /* @__PURE__ */ Y("button", {
654
+ type: "button",
655
+ className: "subtle-button",
656
+ "aria-expanded": s,
657
+ onClick: () => c((e) => !e),
658
+ children: s ? "Hide import" : "Import from host"
659
+ })
660
+ }), s && /* @__PURE__ */ X("form", {
661
+ className: "creation-form identity-form",
662
+ "aria-label": `Import ${a} identity from host`,
663
+ method: "post",
664
+ autoComplete: "off",
665
+ onSubmit: S,
666
+ children: [
667
+ /* @__PURE__ */ Y("h3", { children: "Import from this machine" }),
668
+ /* @__PURE__ */ X("p", {
669
+ className: "description",
670
+ children: [
671
+ "Reads the SSH key and global git configuration of the account running ",
672
+ /* @__PURE__ */ Y("code", { children: "kuke serve" }),
673
+ " and stores them as one ",
674
+ a,
675
+ " identity: an SSH key identity when a key is found, else an author-only one. Rerunning updates it in place. Key material goes to the daemon only — it is never shown here."
676
+ ]
677
+ }),
678
+ /* @__PURE__ */ Y(B, {
679
+ label: "Import",
680
+ inventory: n,
681
+ levels: [U[0]],
682
+ value: l,
683
+ disabled: p,
684
+ onChange: u
685
+ }),
686
+ /* @__PURE__ */ X("div", {
687
+ className: "schema-fields",
688
+ children: [
689
+ /* @__PURE__ */ X("label", {
690
+ className: "schema-field",
691
+ children: [
692
+ /* @__PURE__ */ Y("span", { children: "Hosts" }),
693
+ /* @__PURE__ */ Y("input", {
694
+ value: d.hosts,
695
+ placeholder: "github.com",
696
+ disabled: p,
697
+ autoComplete: "off",
698
+ spellCheck: !1,
699
+ onChange: (e) => b({ hosts: e.target.value })
700
+ }),
701
+ /* @__PURE__ */ Y("small", { children: "Comma-separated hosts or URL prefixes the key authenticates." })
702
+ ]
703
+ }),
704
+ /* @__PURE__ */ X("label", {
705
+ className: "schema-field",
706
+ children: [/* @__PURE__ */ Y("span", { children: "Identity name" }), /* @__PURE__ */ Y("input", {
707
+ value: d.name,
708
+ placeholder: "git-ssh, or git-author without a key",
709
+ disabled: p,
710
+ autoComplete: "off",
711
+ spellCheck: !1,
712
+ onChange: (e) => b({ name: e.target.value })
713
+ })]
714
+ }),
715
+ /* @__PURE__ */ X("label", {
716
+ className: "schema-field",
717
+ children: [
718
+ /* @__PURE__ */ Y("span", { children: "Key" }),
719
+ /* @__PURE__ */ Y("input", {
720
+ value: d.key,
721
+ placeholder: ".ssh/id_ed25519",
722
+ disabled: p,
723
+ autoComplete: "off",
724
+ spellCheck: !1,
725
+ onChange: (e) => b({ key: e.target.value })
726
+ }),
727
+ /* @__PURE__ */ Y("small", { children: "A file in the server account's home directory. Empty: the key git signs with, else id_ed25519, id_ecdsa, id_rsa." })
728
+ ]
729
+ }),
730
+ /* @__PURE__ */ X("label", {
731
+ className: "schema-field",
732
+ children: [
733
+ /* @__PURE__ */ Y("span", { children: "Passphrase file" }),
734
+ /* @__PURE__ */ Y("input", {
735
+ value: d.passphraseFile,
736
+ placeholder: ".ssh/passphrase",
737
+ disabled: p,
738
+ autoComplete: "off",
739
+ spellCheck: !1,
740
+ onChange: (e) => b({ passphraseFile: e.target.value })
741
+ }),
742
+ /* @__PURE__ */ Y("small", { children: "For a passphrase-protected key: a file in the server account's home directory." })
743
+ ]
744
+ }),
745
+ /* @__PURE__ */ X("label", {
746
+ className: "schema-check",
747
+ children: [/* @__PURE__ */ Y("input", {
748
+ type: "checkbox",
749
+ checked: d.makeDefault,
750
+ disabled: p,
751
+ onChange: (e) => b({ makeDefault: e.target.checked })
752
+ }), "Make it the Realm default"]
753
+ })
754
+ ]
755
+ }),
756
+ /* @__PURE__ */ Y("div", {
757
+ className: "connector-actions",
758
+ children: /* @__PURE__ */ Y("button", {
759
+ type: "submit",
760
+ disabled: p || !l.realm,
761
+ children: p ? "Importing…" : "Import identity"
762
+ })
763
+ }),
764
+ h && /* @__PURE__ */ Y(x, {
765
+ error: h,
766
+ kind: "Identity"
767
+ }),
768
+ _ && /* @__PURE__ */ X("div", {
769
+ className: "connector-import-result",
770
+ role: "status",
771
+ "aria-label": "Imported identity",
772
+ children: [/* @__PURE__ */ X("dl", {
773
+ className: "details-grid",
774
+ children: [
775
+ /* @__PURE__ */ Y("dt", { children: "Identity" }),
776
+ /* @__PURE__ */ X("dd", { children: [
777
+ /* @__PURE__ */ Y("code", { children: _.name }),
778
+ " ",
779
+ /* @__PURE__ */ Y("span", {
780
+ className: "description",
781
+ children: _.realm
782
+ }),
783
+ " ",
784
+ /* @__PURE__ */ Y("span", {
785
+ className: "badge",
786
+ children: _.type
787
+ })
788
+ ] }),
789
+ /* @__PURE__ */ Y("dt", { children: "Read from" }),
790
+ /* @__PURE__ */ X("dd", { children: [_.home, _.keyPath ? /* @__PURE__ */ X(J, { children: [" — key ", /* @__PURE__ */ Y("code", { children: _.keyPath })] }) : /* @__PURE__ */ Y(J, { children: " — no SSH key: author-only" })] }),
791
+ Object.keys(_.identity).length > 0 && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("dt", { children: "Fields" }), /* @__PURE__ */ Y("dd", { children: Object.entries(_.identity).map(([e, t]) => /* @__PURE__ */ X("span", {
792
+ className: "badge label-badge",
793
+ children: [
794
+ e,
795
+ ": ",
796
+ t
797
+ ]
798
+ }, e)) })] }),
799
+ _.default && /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("dt", { children: "Realm default" }), /* @__PURE__ */ X("dd", { children: [_.default.identity?.name, _.default.previous && _.default.previous.name !== _.default.identity?.name && /* @__PURE__ */ X(J, { children: [
800
+ " (replaces ",
801
+ /* @__PURE__ */ Y("code", { children: _.default.previous.name }),
802
+ ")"
803
+ ] })] })] })
804
+ ]
805
+ }), !!_.notes?.length && /* @__PURE__ */ Y("ul", {
806
+ className: "description",
807
+ children: _.notes.map((e) => /* @__PURE__ */ Y("li", { children: e }, e))
808
+ })]
809
+ })
810
+ ]
811
+ })]
812
+ });
813
+ }
814
+ var ft = ue("identity", "identities");
815
+ function pt(e) {
816
+ return e.kind === "login" ? "volumes" : "secrets";
817
+ }
818
+ function mt(e) {
819
+ return `${e.title} ${e.kind === "login" ? "login identity" : "identity"}`;
820
+ }
821
+ function ht({ row: e }) {
822
+ let { configs: t, teams: n } = tt(e);
823
+ return e.unused ? /* @__PURE__ */ Y("span", {
824
+ className: "badge identity-unused",
825
+ title: "No Config and no default uses it: it can be deleted.",
826
+ children: "Unused"
827
+ }) : /* @__PURE__ */ X("div", {
828
+ className: "identity-used-by",
829
+ children: [
830
+ t > 0 && /* @__PURE__ */ X("span", {
831
+ className: "description",
832
+ children: [
833
+ t,
834
+ " ",
835
+ t === 1 ? "Config" : "Configs",
836
+ n.length > 0 && /* @__PURE__ */ X(J, { children: [
837
+ " · ",
838
+ n.length,
839
+ " ",
840
+ n.length === 1 ? "team" : "teams"
841
+ ] })
842
+ ]
843
+ }),
844
+ e.usedBy.map((e) => /* @__PURE__ */ Y("a", {
845
+ className: "badge label-badge",
846
+ href: ct(e),
847
+ title: e.role ? `Role ${e.role}` : void 0,
848
+ children: e.name
849
+ }, ct(e))),
850
+ e.defaults.map((e) => /* @__PURE__ */ X("span", {
851
+ className: "badge",
852
+ children: [
853
+ `${e.level[0].toUpperCase()}${e.level.slice(1)} default`,
854
+ " ",
855
+ e.scope.join(" / ")
856
+ ]
857
+ }, `${e.level}:${e.scope.join("/")}:${e.slot}`))
858
+ ]
859
+ });
860
+ }
861
+ function gt({ roles: e }) {
862
+ return e.length ? /* @__PURE__ */ Y(J, { children: e.map((e) => /* @__PURE__ */ Y("span", {
863
+ className: "badge label-badge",
864
+ children: e
865
+ }, e)) }) : /* @__PURE__ */ Y("span", {
866
+ className: "description",
867
+ children: "—"
868
+ });
869
+ }
870
+ function _t({ row: e }) {
871
+ return /* @__PURE__ */ X(J, { children: [
872
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("a", {
873
+ href: G(e.connector),
874
+ children: e.title
875
+ }) }),
876
+ /* @__PURE__ */ X("td", { children: [/* @__PURE__ */ Y("code", { children: e.kind === "login" ? e.method : e.type }), Object.entries(e.fields).flatMap(([e, t]) => [" ", /* @__PURE__ */ X("span", {
877
+ className: "badge label-badge",
878
+ children: [
879
+ e,
880
+ ": ",
881
+ t
882
+ ]
883
+ }, e)])] }),
884
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(gt, { roles: e.roles }) }),
885
+ /* @__PURE__ */ Y("td", {
886
+ className: "scope-cell",
887
+ children: nt(e)
888
+ }),
889
+ /* @__PURE__ */ Y("td", { children: e.kind === "login" ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(ie, { state: e.status }), e.since && /* @__PURE__ */ X("span", {
890
+ className: "description",
891
+ children: [" since ", new Date(e.since).toLocaleString()]
892
+ })] }) : /* @__PURE__ */ Y("span", {
893
+ className: "description",
894
+ children: "—"
895
+ }) }),
896
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(ht, { row: e }) })
897
+ ] });
898
+ }
899
+ function vt({ row: e }) {
900
+ return /* @__PURE__ */ X(J, { children: [
901
+ e.kind === "secret" ? /* @__PURE__ */ Y("a", {
902
+ className: "resource-name",
903
+ href: st(e.ref),
904
+ children: e.name
905
+ }) : e.exists ? /* @__PURE__ */ Y("a", {
906
+ className: "resource-name",
907
+ href: a(e.ref),
908
+ children: e.name
909
+ }) : /* @__PURE__ */ Y("span", {
910
+ className: "resource-name",
911
+ children: e.name
912
+ }),
913
+ e.kind === "login" && !e.exists && /* @__PURE__ */ X(J, { children: [" ", /* @__PURE__ */ Y("span", {
914
+ className: "badge",
915
+ children: "Not created yet"
916
+ })] }),
917
+ e.session && /* @__PURE__ */ X(J, { children: [" ", /* @__PURE__ */ Y("span", {
918
+ className: "badge",
919
+ children: "Login running"
920
+ })] })
921
+ ] });
922
+ }
923
+ function yt({ row: e, target: t, pending: n, onDelete: i, onChanged: a }) {
924
+ let o = `${mt(e)} ${P(e.ref)}`;
925
+ return /* @__PURE__ */ X("td", {
926
+ className: "connector-row-actions",
927
+ children: [e.kind === "login" ? /* @__PURE__ */ Y(O, {
928
+ connector: e.connector,
929
+ title: e.title,
930
+ volume: e.ref,
931
+ state: e.status,
932
+ running: !!e.session,
933
+ method: e.method || void 0,
934
+ onStarted: a
935
+ }) : /* @__PURE__ */ Y("a", {
936
+ className: "subtle-button",
937
+ href: r(e.connector, e.ref, t),
938
+ "aria-label": `Rotate ${o}`,
939
+ children: "Rotate"
940
+ }), e.exists && /* @__PURE__ */ Y("button", {
941
+ type: "button",
942
+ className: "subtle-button danger-action",
943
+ "aria-label": `Delete ${o}`,
944
+ disabled: n,
945
+ onClick: () => i(e),
946
+ children: n ? "Deleting…" : "Delete"
947
+ })]
948
+ });
949
+ }
950
+ function bt({ item: e, connector: t, target: n, pending: r, onDelete: i, onChanged: a }) {
951
+ let o = e.row, s = `System default for ${e.title}${e.method ? ` ${e.method}` : ""}`;
952
+ if (o) return /* @__PURE__ */ X("tr", {
953
+ className: "system-default",
954
+ "aria-label": s,
955
+ children: [
956
+ /* @__PURE__ */ Y("td", { className: "bulk-column" }),
957
+ /* @__PURE__ */ X("td", { children: [
958
+ /* @__PURE__ */ Y(vt, { row: o }),
959
+ " ",
960
+ /* @__PURE__ */ Y("span", {
961
+ className: "badge system-default-badge",
962
+ children: "System default"
963
+ })
964
+ ] }),
965
+ /* @__PURE__ */ Y(_t, { row: o }),
966
+ /* @__PURE__ */ Y(yt, {
967
+ row: o,
968
+ target: n,
969
+ pending: r(o),
970
+ onDelete: i,
971
+ onChanged: a
972
+ })
973
+ ]
974
+ });
975
+ let c = e.kind === $;
976
+ return /* @__PURE__ */ X("tr", {
977
+ className: "system-default",
978
+ "aria-label": s,
979
+ children: [
980
+ /* @__PURE__ */ Y("td", { className: "bulk-column" }),
981
+ /* @__PURE__ */ X("td", { children: [
982
+ c && t?.harness ? /* @__PURE__ */ Y("span", {
983
+ className: "resource-name",
984
+ children: `${Ue}-${We}-${t.harness}-state`
985
+ }) : /* @__PURE__ */ Y("span", {
986
+ className: "description",
987
+ children: "Not set up"
988
+ }),
989
+ " ",
990
+ /* @__PURE__ */ Y("span", {
991
+ className: "badge system-default-badge",
992
+ children: "System default"
993
+ })
994
+ ] }),
995
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("a", {
996
+ href: G(e.connector),
997
+ children: e.title
998
+ }) }),
999
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("code", { children: e.method || (c ? "login" : "—") }) }),
1000
+ /* @__PURE__ */ Y("td", { children: c ? /* @__PURE__ */ Y("span", {
1001
+ className: "badge label-badge",
1002
+ children: `${Ue}/${We}`
1003
+ }) : /* @__PURE__ */ Y("span", {
1004
+ className: "description",
1005
+ children: "—"
1006
+ }) }),
1007
+ /* @__PURE__ */ Y("td", {
1008
+ className: "scope-cell",
1009
+ children: S
1010
+ }),
1011
+ /* @__PURE__ */ Y("td", { children: c ? /* @__PURE__ */ X("span", {
1012
+ className: "description",
1013
+ children: [
1014
+ "The default team is not applied: ",
1015
+ /* @__PURE__ */ Y("code", { children: "kuke team init" }),
1016
+ " applies it."
1017
+ ]
1018
+ }) : /* @__PURE__ */ Y("span", {
1019
+ className: "description",
1020
+ children: "No Realm default"
1021
+ }) }),
1022
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y("span", {
1023
+ className: "description",
1024
+ children: "—"
1025
+ }) }),
1026
+ /* @__PURE__ */ Y("td", {
1027
+ className: "connector-row-actions",
1028
+ children: !c && /* @__PURE__ */ Y("a", {
1029
+ className: "subtle-button",
1030
+ href: se(e.connector, { realm: "default" }),
1031
+ "aria-label": `Set up the ${s}`,
1032
+ children: "Create one"
1033
+ })
1034
+ })
1035
+ ]
1036
+ });
1037
+ }
1038
+ function xt({ label: t, rows: n, pinned: r, connectors: i, target: a, error: s, revision: c, inventory: l, onChanged: u }) {
1039
+ let [d, f] = q(), [m, h] = q(() => /* @__PURE__ */ new Set()), [g, _] = q([]), { notify: v } = e();
1040
+ async function y(e, t = !1) {
1041
+ let n = `${mt(e)} ${P(e.ref)}`;
1042
+ if (m.has(e.key)) return {
1043
+ ok: !1,
1044
+ message: "A delete of it is still running."
1045
+ };
1046
+ h((t) => new Set(t).add(e.key)), _((e) => e.filter((e) => e.target !== n));
1047
+ try {
1048
+ return await H(he(pt(e), [...T(e.ref), e.ref.name]), "{}"), t || v({
1049
+ key: `identity-delete:${e.key}`,
1050
+ tone: "success",
1051
+ message: `${mt(e)} ${e.name} deleted.`
1052
+ }), {
1053
+ ok: !0,
1054
+ message: ""
1055
+ };
1056
+ } catch (e) {
1057
+ let r = o(e).message;
1058
+ return t || _((e) => [...e, {
1059
+ target: n,
1060
+ message: r
1061
+ }]), {
1062
+ ok: !1,
1063
+ message: r
1064
+ };
1065
+ } finally {
1066
+ h((t) => {
1067
+ let n = new Set(t);
1068
+ return n.delete(e.key), n;
1069
+ }), u();
1070
+ }
1071
+ }
1072
+ let b = n.filter((e) => e.exists), x = new Map(b.map((e) => [e.key, e])), S = de([...x.keys()], !s), C = b.filter((e) => S.has(e.key)).map((e) => ({
1073
+ key: e.key,
1074
+ scope: [...e.scope, e.name],
1075
+ label: P(e.ref),
1076
+ row: e
1077
+ })), w = [{
1078
+ name: "delete",
1079
+ verb: "Delete",
1080
+ danger: !0,
1081
+ consequence: "Deletes each identity: a Secret, or a login identity's Volume with its login. A cell or team that uses one loses its credential.",
1082
+ reasonOf: (e) => m.has(e.key) ? "a delete of it is still running" : "",
1083
+ acknowledgment: "I understand this permanently deletes every identity listed."
1084
+ }], E = (e) => i.find((t) => t.name === e);
1085
+ return /* @__PURE__ */ X("section", {
1086
+ className: "panel connector-identities",
1087
+ "aria-label": t,
1088
+ children: [
1089
+ /* @__PURE__ */ X("div", {
1090
+ className: "panel-heading",
1091
+ children: [/* @__PURE__ */ Y("h2", { children: t }), /* @__PURE__ */ X("span", {
1092
+ className: "badge",
1093
+ children: [n.length, " stored"]
1094
+ })]
1095
+ }),
1096
+ /* @__PURE__ */ X("div", {
1097
+ className: "panel-body",
1098
+ children: [
1099
+ /* @__PURE__ */ X("p", {
1100
+ className: "description",
1101
+ children: ["An identity is a Secret tagged with a connector, or a login identity — a Volume the harness keeps its login in. Only names, scopes, types, readable fields and whether a login is present are shown: values and logins are never returned to the browser. ", p]
1102
+ }),
1103
+ s && /* @__PURE__ */ Y("p", {
1104
+ className: "stale",
1105
+ children: s
1106
+ }),
1107
+ g.map((e) => /* @__PURE__ */ X("div", {
1108
+ className: "error",
1109
+ role: "alert",
1110
+ children: [/* @__PURE__ */ X("strong", { children: ["Delete failed: ", e.target] }), /* @__PURE__ */ Y("p", { children: e.message })]
1111
+ }, e.target)),
1112
+ /* @__PURE__ */ Y(le, {
1113
+ rows: C,
1114
+ actions: w,
1115
+ noun: ft,
1116
+ selection: S,
1117
+ run: (e) => y(e.row, !0)
1118
+ }),
1119
+ n.length || r.length ? /* @__PURE__ */ Y("div", {
1120
+ className: "table-scroll",
1121
+ children: /* @__PURE__ */ X("table", {
1122
+ "aria-label": t,
1123
+ children: [
1124
+ /* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ X("tr", { children: [
1125
+ /* @__PURE__ */ Y("th", {
1126
+ scope: "col",
1127
+ className: "bulk-column",
1128
+ children: /* @__PURE__ */ Y(fe, {
1129
+ selection: S,
1130
+ matching: [...x.keys()],
1131
+ label: `Select all ${ft(x.size)}`
1132
+ })
1133
+ }),
1134
+ /* @__PURE__ */ Y("th", {
1135
+ scope: "col",
1136
+ children: "Name"
1137
+ }),
1138
+ /* @__PURE__ */ Y("th", {
1139
+ scope: "col",
1140
+ children: "Connector"
1141
+ }),
1142
+ /* @__PURE__ */ Y("th", {
1143
+ scope: "col",
1144
+ children: "Method / type"
1145
+ }),
1146
+ /* @__PURE__ */ Y("th", {
1147
+ scope: "col",
1148
+ children: "Role"
1149
+ }),
1150
+ /* @__PURE__ */ Y("th", {
1151
+ scope: "col",
1152
+ children: "Scope"
1153
+ }),
1154
+ /* @__PURE__ */ Y("th", {
1155
+ scope: "col",
1156
+ children: "Status"
1157
+ }),
1158
+ /* @__PURE__ */ Y("th", {
1159
+ scope: "col",
1160
+ children: "Used by"
1161
+ }),
1162
+ /* @__PURE__ */ Y("th", {
1163
+ scope: "col",
1164
+ children: /* @__PURE__ */ Y("span", {
1165
+ className: "sr-only",
1166
+ children: "Actions"
1167
+ })
1168
+ })
1169
+ ] }) }),
1170
+ r.length > 0 && /* @__PURE__ */ Y("tbody", {
1171
+ className: "system-defaults",
1172
+ "aria-label": "System defaults",
1173
+ children: r.map((e) => /* @__PURE__ */ Y(bt, {
1174
+ item: e,
1175
+ connector: E(e.connector),
1176
+ target: a,
1177
+ pending: (e) => m.has(e.key),
1178
+ onDelete: f,
1179
+ onChanged: u
1180
+ }, e.key))
1181
+ }),
1182
+ /* @__PURE__ */ Y("tbody", { children: n.map((e) => /* @__PURE__ */ X("tr", { children: [
1183
+ /* @__PURE__ */ Y("td", {
1184
+ className: "bulk-column",
1185
+ children: e.exists && /* @__PURE__ */ Y(pe, {
1186
+ selection: S,
1187
+ rowKey: e.key,
1188
+ label: `Select ${mt(e)} ${P(e.ref)}`
1189
+ })
1190
+ }),
1191
+ /* @__PURE__ */ Y("td", { children: /* @__PURE__ */ Y(vt, { row: e }) }),
1192
+ /* @__PURE__ */ Y(_t, { row: e }),
1193
+ /* @__PURE__ */ Y(yt, {
1194
+ row: e,
1195
+ target: a,
1196
+ pending: m.has(e.key),
1197
+ onDelete: f,
1198
+ onChanged: u
1199
+ })
1200
+ ] }, e.key)) })
1201
+ ]
1202
+ })
1203
+ }) : /* @__PURE__ */ Y("p", { children: "No identities are stored." })
1204
+ ]
1205
+ }),
1206
+ d && /* @__PURE__ */ Y(me, {
1207
+ kind: pt(d),
1208
+ doc: { metadata: {
1209
+ name: d.ref.name,
1210
+ realm: d.ref.realm,
1211
+ ...d.ref.space ? { space: d.ref.space } : {},
1212
+ ...d.ref.stack ? { stack: d.ref.stack } : {}
1213
+ } },
1214
+ revision: c,
1215
+ inventory: l,
1216
+ onCancel: () => f(void 0),
1217
+ onConfirm: () => {
1218
+ let e = d;
1219
+ f(void 0), y(e);
1220
+ }
1221
+ })
1222
+ ]
1223
+ });
1224
+ }
1225
+ function St({ connector: n, logins: r, target: i, inventory: a, onChanged: s }) {
1226
+ let c = n.title || n.name, l = V(n), u = G(n.name, i), [d, f] = q(""), [m, h] = q(""), [g, _] = ut(a, i && W(i, U[0])), [v, S] = q(""), [C, T] = q(), { notify: E } = e(), D = A(d), O = k(r, n.name).some((e) => F(e.volume) === F({
1227
+ name: d.trim(),
1228
+ ...g
1229
+ }));
1230
+ async function j(e, r) {
1231
+ if (e.preventDefault(), !v) {
1232
+ if (D || !g.realm) T({
1233
+ code: "invalid_request",
1234
+ message: D || "Choose where the login identity is stored."
1235
+ });
1236
+ else {
1237
+ S(r ? "login" : "create"), T(void 0);
1238
+ try {
1239
+ r ? await y(n.name, {
1240
+ name: d.trim(),
1241
+ ...g
1242
+ }, m || void 0) : (await H(w(n.name, "logins"), z(d, g, m || void 0)), E({
1243
+ key: `login-identity:${n.name}:${d.trim()}`,
1244
+ tone: "success",
1245
+ message: `${c} login identity ${d.trim()} created in ${b(g).join(" / ")}.`
1246
+ }), t(u)), s();
1247
+ } catch (e) {
1248
+ T(o(e));
1249
+ } finally {
1250
+ S("");
1251
+ }
1252
+ }
1253
+ }
1254
+ }
1255
+ return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
1256
+ className: "detail-actions",
1257
+ children: /* @__PURE__ */ X("a", {
1258
+ href: u,
1259
+ children: ["← Back to ", c]
1260
+ })
1261
+ }), /* @__PURE__ */ Y("section", {
1262
+ className: "panel connector-identity-page",
1263
+ "aria-label": `New ${c} login identity`,
1264
+ children: /* @__PURE__ */ Y("div", {
1265
+ className: "panel-body",
1266
+ children: /* @__PURE__ */ X("form", {
1267
+ className: "creation-form identity-form",
1268
+ "aria-label": `New ${c} login identity`,
1269
+ method: "post",
1270
+ autoComplete: "off",
1271
+ onSubmit: (e) => void j(e, !1),
1272
+ children: [
1273
+ /* @__PURE__ */ X("p", {
1274
+ className: "description",
1275
+ children: [
1276
+ "A login identity is a Volume tagged ",
1277
+ /* @__PURE__ */ Y("code", { children: n.name }),
1278
+ ": the harness keeps its login in its state directory, and that directory is the Volume. ",
1279
+ /* @__PURE__ */ Y("strong", { children: "Create and log in" }),
1280
+ " opens a short-lived identity cell that mounts only that Volume and runs the ",
1281
+ c,
1282
+ " login; the cell is deleted when the login ends. Only whether a login is present is shown — never the login itself. ",
1283
+ p
1284
+ ]
1285
+ }),
1286
+ /* @__PURE__ */ Y(N, {
1287
+ title: "Login identity scope",
1288
+ description: /* @__PURE__ */ Y(J, { children: "Where the Volume is stored: a Realm, or a Space or Stack of it." }),
1289
+ children: /* @__PURE__ */ Y(B, {
1290
+ label: "Login identity",
1291
+ inventory: a,
1292
+ levels: U,
1293
+ value: g,
1294
+ disabled: !!v,
1295
+ onChange: _
1296
+ })
1297
+ }),
1298
+ /* @__PURE__ */ X("div", {
1299
+ className: "schema-fields",
1300
+ children: [/* @__PURE__ */ X("label", {
1301
+ className: "schema-field",
1302
+ children: [
1303
+ /* @__PURE__ */ X("span", { children: ["Login identity name", /* @__PURE__ */ Y("b", {
1304
+ "aria-label": "required",
1305
+ children: " *"
1306
+ })] }),
1307
+ /* @__PURE__ */ Y("input", {
1308
+ value: d,
1309
+ placeholder: "personal",
1310
+ disabled: !!v,
1311
+ autoComplete: "off",
1312
+ spellCheck: !1,
1313
+ "aria-invalid": !!d && !!D || void 0,
1314
+ onChange: (e) => {
1315
+ f(e.target.value), T(void 0);
1316
+ }
1317
+ }),
1318
+ /* @__PURE__ */ Y("small", { children: O ? "A login identity of this name already exists here: logging in logs in to it again." : "The Volume's name. It is created retained, so it outlives a purge of its scope." })
1319
+ ]
1320
+ }), l.length > 1 && /* @__PURE__ */ X("label", {
1321
+ className: "schema-field",
1322
+ children: [/* @__PURE__ */ Y("span", { children: "Login method" }), /* @__PURE__ */ X("select", {
1323
+ "aria-label": `${c} login method`,
1324
+ value: m,
1325
+ disabled: !!v,
1326
+ onChange: (e) => h(e.target.value),
1327
+ children: [/* @__PURE__ */ Y("option", {
1328
+ value: "",
1329
+ children: "Default"
1330
+ }), l.map((e) => /* @__PURE__ */ Y("option", {
1331
+ value: e.name,
1332
+ children: e.name
1333
+ }, e.name))]
1334
+ })]
1335
+ })]
1336
+ }),
1337
+ /* @__PURE__ */ X("div", {
1338
+ className: "connector-actions",
1339
+ children: [
1340
+ /* @__PURE__ */ Y("button", {
1341
+ type: "button",
1342
+ disabled: !!v || !g.realm || !d.trim(),
1343
+ onClick: (e) => void j(e, !0),
1344
+ children: v === "login" ? "Starting…" : "Create and log in"
1345
+ }),
1346
+ /* @__PURE__ */ Y("button", {
1347
+ type: "submit",
1348
+ className: "subtle-button",
1349
+ disabled: !!v || !g.realm || !d.trim(),
1350
+ children: v === "create" ? "Creating…" : "Create without logging in"
1351
+ }),
1352
+ /* @__PURE__ */ Y("a", {
1353
+ className: "subtle-button",
1354
+ href: u,
1355
+ children: "Cancel"
1356
+ })
1357
+ ]
1358
+ }),
1359
+ C && /* @__PURE__ */ Y(x, {
1360
+ error: C,
1361
+ kind: "Identity"
1362
+ })
1363
+ ]
1364
+ })
1365
+ })
1366
+ })] });
1367
+ }
1368
+ function Ct(e) {
1369
+ let t = e.title || e.name;
1370
+ return [...C(e).length ? [{
1371
+ label: V(e).length ? `${t} token or key` : `${t} identity`,
1372
+ href: (t) => se(e.name, t)
1373
+ }] : [], ...V(e).length ? [{
1374
+ label: `${t} login identity`,
1375
+ href: (t) => _(e.name, t)
1376
+ }] : []];
1377
+ }
1378
+ function wt({ connectors: e, connector: n, target: r }) {
1379
+ let [i, a] = q(!1), [o, s] = q("");
1380
+ if (n) {
1381
+ let e = Ct(n);
1382
+ return /* @__PURE__ */ Y("div", {
1383
+ className: "connector-actions",
1384
+ children: e.map((e, t) => /* @__PURE__ */ Y("a", {
1385
+ className: "document-action",
1386
+ href: e.href(r),
1387
+ children: t === 0 && C(n).length ? "New identity" : "New login identity"
1388
+ }, e.label))
1389
+ });
1390
+ }
1391
+ let c = e.flatMap((e) => Ct(e).map((t) => ({
1392
+ ...t,
1393
+ key: `${e.name}:${t.label}`
1394
+ }))), l = c.find((e) => e.key === o);
1395
+ return /* @__PURE__ */ X("div", {
1396
+ className: "connector-actions new-identity",
1397
+ children: [/* @__PURE__ */ Y("button", {
1398
+ type: "button",
1399
+ className: "document-action",
1400
+ "aria-expanded": i,
1401
+ onClick: () => a((e) => !e),
1402
+ children: "New identity"
1403
+ }), i && /* @__PURE__ */ X("form", {
1404
+ className: "creation-form",
1405
+ "aria-label": "New identity",
1406
+ onSubmit: (e) => {
1407
+ e.preventDefault(), l && t(l.href(r));
1408
+ },
1409
+ children: [/* @__PURE__ */ X("label", {
1410
+ className: "schema-field",
1411
+ children: [/* @__PURE__ */ Y("span", { children: "Connector" }), /* @__PURE__ */ X("select", {
1412
+ "aria-label": "New identity connector",
1413
+ value: o,
1414
+ onChange: (e) => s(e.target.value),
1415
+ children: [/* @__PURE__ */ Y("option", {
1416
+ value: "",
1417
+ children: "Choose a connector…"
1418
+ }), c.map((e) => /* @__PURE__ */ Y("option", {
1419
+ value: e.key,
1420
+ children: e.label
1421
+ }, e.key))]
1422
+ })]
1423
+ }), /* @__PURE__ */ X("div", {
1424
+ className: "connector-actions",
1425
+ children: [/* @__PURE__ */ Y("button", {
1426
+ type: "submit",
1427
+ disabled: !l,
1428
+ children: "Continue"
1429
+ }), /* @__PURE__ */ Y("button", {
1430
+ type: "button",
1431
+ className: "subtle-button",
1432
+ onClick: () => a(!1),
1433
+ children: "Cancel"
1434
+ })]
1435
+ })]
1436
+ })]
1437
+ });
1438
+ }
1439
+ var Tt = "import", Et = "manual";
1440
+ function Dt({ connector: e, tokenConnector: t, target: r, choice: i, onChoose: a }) {
1441
+ let o = e.title || e.name, s = t ? t.title || t.name : "", c = (e, t, n) => /* @__PURE__ */ X("button", {
1442
+ type: "button",
1443
+ className: `identity-choice${i === e ? " is-selected" : ""}`,
1444
+ "aria-pressed": i === e,
1445
+ onClick: () => a(e),
1446
+ children: [/* @__PURE__ */ Y("strong", { children: t }), /* @__PURE__ */ Y("span", {
1447
+ className: "description",
1448
+ children: n
1449
+ })]
1450
+ });
1451
+ return /* @__PURE__ */ X("div", {
1452
+ className: "identity-choices",
1453
+ role: "group",
1454
+ "aria-label": `How to add a ${o} identity`,
1455
+ children: [
1456
+ c(Tt, "Import from this machine", "The SSH key and git author of the account running kuke serve: clone, push and sign."),
1457
+ t && /* @__PURE__ */ X("a", {
1458
+ className: "identity-choice",
1459
+ href: se(t.name, r),
1460
+ children: [/* @__PURE__ */ X("strong", { children: [
1461
+ "Use a ",
1462
+ s,
1463
+ " token"
1464
+ ] }), /* @__PURE__ */ X("span", {
1465
+ className: "description",
1466
+ children: [
1467
+ "One personal access token for the ",
1468
+ s,
1469
+ " API and for git over HTTPS on ",
1470
+ n(t)?.hosts.join(", "),
1471
+ ". No signing."
1472
+ ]
1473
+ })]
1474
+ }),
1475
+ c(Et, "Enter a key or password", "Paste an SSH key, a username with a password or token, or store an author only.")
1476
+ ]
1477
+ });
1478
+ }
1479
+ function Ot({ connector: e, connectors: r, action: a, identity: o, target: s, identities: c, secrets: l, secretsLoading: u, inventory: d, onChanged: f }) {
1480
+ let p = e.title || e.name, m = G(e.name, s), h = () => {
1481
+ t(m);
1482
+ }, _ = () => {
1483
+ f(), h();
1484
+ }, y = g(e), [x, S] = ut(d, s && W(s, y.includes(U[0]) ? U[0] : y[0])), C = !!x.realm && y.includes(i(x)), w = a === "rotate-identity", T = o ? F({
1485
+ name: o.at(-1) ?? "",
1486
+ ...v(o.slice(0, -1))
1487
+ }) : "", E = w ? c.find((e) => F(e) === T) : void 0, D = R(e), [O, k] = q(D ? "" : Et);
1488
+ return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
1489
+ className: "detail-actions",
1490
+ children: /* @__PURE__ */ X("a", {
1491
+ href: m,
1492
+ children: ["← Back to ", p]
1493
+ })
1494
+ }), /* @__PURE__ */ Y("section", {
1495
+ className: "panel connector-identity-page",
1496
+ "aria-label": w ? `Rotate ${p} identity` : `New ${p} identity`,
1497
+ children: /* @__PURE__ */ Y("div", {
1498
+ className: "panel-body",
1499
+ children: w ? E ? /* @__PURE__ */ Y(ee, {
1500
+ connector: e,
1501
+ scope: I(E),
1502
+ existing: E,
1503
+ secrets: l,
1504
+ onSaved: _,
1505
+ onCancel: h
1506
+ }, `rotate:${F(E)}`) : u ? /* @__PURE__ */ Y("p", {
1507
+ role: "status",
1508
+ children: "Loading identities…"
1509
+ }) : /* @__PURE__ */ X("div", {
1510
+ className: "error",
1511
+ role: "alert",
1512
+ children: [/* @__PURE__ */ Y("strong", { children: "Identity not found" }), /* @__PURE__ */ X("p", { children: [
1513
+ "No ",
1514
+ p,
1515
+ " identity ",
1516
+ o?.at(-1) ? /* @__PURE__ */ Y("code", { children: o.at(-1) }) : "",
1517
+ " is stored",
1518
+ o && o.length > 1 ? /* @__PURE__ */ X(J, { children: [" in ", o.slice(0, -1).join(" / ")] }) : "",
1519
+ ". ",
1520
+ /* @__PURE__ */ X("a", {
1521
+ href: m,
1522
+ children: ["Back to ", p]
1523
+ })
1524
+ ] })]
1525
+ }) : /* @__PURE__ */ X(J, { children: [
1526
+ D && /* @__PURE__ */ Y(Dt, {
1527
+ connector: e,
1528
+ tokenConnector: ce(r).find((t) => n(t)?.connector === e.name),
1529
+ target: s,
1530
+ choice: O,
1531
+ onChoose: k
1532
+ }),
1533
+ O === Et && /* @__PURE__ */ X(J, { children: [
1534
+ /* @__PURE__ */ Y(L, {
1535
+ label: "Identity",
1536
+ connector: e,
1537
+ inventory: d,
1538
+ value: x,
1539
+ onChange: S
1540
+ }),
1541
+ x.realm && !C && /* @__PURE__ */ X("p", {
1542
+ className: "field-error",
1543
+ role: "alert",
1544
+ children: [
1545
+ p,
1546
+ " identities are stored at ",
1547
+ y.join(" or "),
1548
+ " level."
1549
+ ]
1550
+ }),
1551
+ /* @__PURE__ */ Y(ee, {
1552
+ connector: e,
1553
+ scope: x,
1554
+ secrets: l,
1555
+ onSaved: _,
1556
+ onCancel: h
1557
+ }, `new:${b(x).join("/")}`)
1558
+ ] }),
1559
+ O === Tt && /* @__PURE__ */ Y(dt, {
1560
+ connector: e,
1561
+ inventory: d,
1562
+ initiallyOpen: !0,
1563
+ onChanged: f
1564
+ })
1565
+ ] })
1566
+ })
1567
+ })] });
1568
+ }
1569
+ function kt({ connector: t, target: n, scope: r, row: a, identities: s, onChanged: c }) {
1570
+ let l = t.title || t.name, d = n.method ? `${l} ${n.method}` : l, f = h(t, r), p = U.filter((e) => i(W(r, e)) === e), [m, _] = q(""), [v, y] = q(), [S, C] = q(!1), [E, O] = q(!1), [k, A] = q(), { notify: j } = e(), M = f.includes(m) ? m : f.at(-1) ?? "", N = I(v);
1571
+ async function P(e, i) {
1572
+ if (!E && e) {
1573
+ O(!0), A(void 0);
1574
+ try {
1575
+ await H(w(t.name, "defaults"), {
1576
+ scope: W(r, e),
1577
+ ...n.method ? { method: n.method } : {},
1578
+ identity: i
1579
+ }), j({
1580
+ key: `connector-default:${t.name}:${n.method}`,
1581
+ tone: "success",
1582
+ message: i ? `${d} default set to ${i.name} at ${D(e, r)}.` : `${d} default cleared at ${D(e, r)}.`
1583
+ }), y(void 0), c();
1584
+ } catch (e) {
1585
+ A(o(e));
1586
+ } finally {
1587
+ O(!1);
1588
+ }
1589
+ }
1590
+ }
1591
+ let F = p.filter((e) => a?.levels?.[e]).length;
1592
+ return /* @__PURE__ */ X("div", {
1593
+ className: "connector-default",
1594
+ role: "group",
1595
+ "aria-label": `${d} default`,
1596
+ children: [
1597
+ /* @__PURE__ */ Y("h3", { children: n.method ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("code", { children: n.method }), " method"] }) : "Resolves to" }),
1598
+ /* @__PURE__ */ Y("p", {
1599
+ className: `connector-effective${a?.effective ? "" : " is-unresolved"}`,
1600
+ role: "status",
1601
+ children: a?.effective ? /* @__PURE__ */ X(J, { children: [
1602
+ /* @__PURE__ */ Y("strong", {
1603
+ className: "connector-effective-name",
1604
+ children: a.effective.name
1605
+ }),
1606
+ " ",
1607
+ /* @__PURE__ */ Y("span", {
1608
+ className: "description",
1609
+ children: T(a.effective).join(" / ")
1610
+ }),
1611
+ " ",
1612
+ /* @__PURE__ */ Y("span", {
1613
+ className: "badge",
1614
+ children: a.origin ? `${a.origin[0].toUpperCase()}${a.origin.slice(1)} default` : "Default"
1615
+ }),
1616
+ a.origin && /* @__PURE__ */ X("span", {
1617
+ className: "description",
1618
+ children: [
1619
+ " — from the ",
1620
+ D(a.origin, r),
1621
+ " level"
1622
+ ]
1623
+ })
1624
+ ] }) : /* @__PURE__ */ X(J, { children: [
1625
+ /* @__PURE__ */ Y("strong", {
1626
+ className: "connector-effective-name",
1627
+ children: "No default resolves in this scope."
1628
+ }),
1629
+ " ",
1630
+ /* @__PURE__ */ Y("span", {
1631
+ className: "description",
1632
+ children: "A Config here that picks no identity cannot create cells."
1633
+ })
1634
+ ] })
1635
+ }),
1636
+ /* @__PURE__ */ X("p", {
1637
+ className: "description",
1638
+ children: [
1639
+ "Delivered as ",
1640
+ u({
1641
+ delivery: n.delivery,
1642
+ ...t.methods.find((e) => e.name === n.method)
1643
+ }),
1644
+ ".",
1645
+ n.description && /* @__PURE__ */ X(J, { children: [" ", n.description] })
1646
+ ]
1647
+ }),
1648
+ /* @__PURE__ */ X("div", {
1649
+ className: "schema-fields",
1650
+ children: [/* @__PURE__ */ X("label", {
1651
+ className: "schema-field",
1652
+ children: [/* @__PURE__ */ Y("span", { children: "Level" }), /* @__PURE__ */ Y("select", {
1653
+ "aria-label": `${d} default level`,
1654
+ value: M,
1655
+ disabled: E || !f.length,
1656
+ onChange: (e) => _(e.target.value),
1657
+ children: f.map((e) => /* @__PURE__ */ Y("option", {
1658
+ value: e,
1659
+ children: D(e, r)
1660
+ }, e))
1661
+ })]
1662
+ }), s.length ? /* @__PURE__ */ Y(ne, {
1663
+ label: `${d} default identity`,
1664
+ identities: s,
1665
+ value: v,
1666
+ emptyLabel: "Select an identity…",
1667
+ disabled: E,
1668
+ realm: r.realm,
1669
+ onChange: y
1670
+ }) : /* @__PURE__ */ X("div", {
1671
+ className: "schema-field",
1672
+ children: [/* @__PURE__ */ Y("span", { children: "Identity" }), /* @__PURE__ */ X("p", {
1673
+ className: "description",
1674
+ children: [
1675
+ "No ",
1676
+ l,
1677
+ " identity is stored. ",
1678
+ /* @__PURE__ */ Y("a", {
1679
+ href: se(t.name, r),
1680
+ children: "Create an identity"
1681
+ }),
1682
+ " to set it as the default."
1683
+ ]
1684
+ })]
1685
+ })]
1686
+ }),
1687
+ s.length > 0 && /* @__PURE__ */ Y("div", {
1688
+ className: "connector-actions",
1689
+ children: /* @__PURE__ */ Y("button", {
1690
+ type: "button",
1691
+ disabled: !N || !M || E,
1692
+ onClick: () => void P(M, N ?? null),
1693
+ children: E ? "Saving…" : "Set default"
1694
+ })
1695
+ }),
1696
+ k && /* @__PURE__ */ Y(x, {
1697
+ error: k,
1698
+ kind: "Scope"
1699
+ }),
1700
+ /* @__PURE__ */ Y(Ve, {
1701
+ level: 3,
1702
+ className: "connector-default-levels",
1703
+ title: "Defaults by level",
1704
+ summary: `${F} of ${p.length} set`,
1705
+ label: `${d} defaults by level`,
1706
+ open: S,
1707
+ onToggle: C,
1708
+ children: /* @__PURE__ */ Y("div", {
1709
+ className: "table-scroll",
1710
+ children: /* @__PURE__ */ X("table", {
1711
+ "aria-label": `${d} defaults by level`,
1712
+ children: [/* @__PURE__ */ Y("thead", { children: /* @__PURE__ */ X("tr", { children: [
1713
+ /* @__PURE__ */ Y("th", {
1714
+ scope: "col",
1715
+ children: "Level"
1716
+ }),
1717
+ /* @__PURE__ */ Y("th", {
1718
+ scope: "col",
1719
+ children: "Scope"
1720
+ }),
1721
+ /* @__PURE__ */ Y("th", {
1722
+ scope: "col",
1723
+ children: "Default identity"
1724
+ }),
1725
+ /* @__PURE__ */ Y("th", {
1726
+ scope: "col",
1727
+ children: /* @__PURE__ */ Y("span", {
1728
+ className: "sr-only",
1729
+ children: "Actions"
1730
+ })
1731
+ })
1732
+ ] }) }), /* @__PURE__ */ Y("tbody", { children: p.map((e) => {
1733
+ let n = a?.levels?.[e];
1734
+ return /* @__PURE__ */ X("tr", { children: [
1735
+ /* @__PURE__ */ Y("td", { children: e }),
1736
+ /* @__PURE__ */ Y("td", {
1737
+ className: "scope-cell",
1738
+ children: b(W(r, e)).join(" / ")
1739
+ }),
1740
+ /* @__PURE__ */ X("td", { children: [n ? /* @__PURE__ */ X(J, { children: [
1741
+ /* @__PURE__ */ Y("code", { children: n.name }),
1742
+ " ",
1743
+ /* @__PURE__ */ Y("span", {
1744
+ className: "description",
1745
+ children: T(n).join(" / ")
1746
+ })
1747
+ ] }) : f.includes(e) ? /* @__PURE__ */ Y("span", {
1748
+ className: "description",
1749
+ children: "Not set"
1750
+ }) : /* @__PURE__ */ X("span", {
1751
+ className: "description",
1752
+ children: [
1753
+ "Not available: ",
1754
+ l,
1755
+ " defaults are set at ",
1756
+ g(t).join(" or "),
1757
+ " level"
1758
+ ]
1759
+ }), a?.origin === e && /* @__PURE__ */ X(J, { children: [" ", /* @__PURE__ */ Y("span", {
1760
+ className: "badge",
1761
+ children: "Effective"
1762
+ })] })] }),
1763
+ /* @__PURE__ */ Y("td", {
1764
+ className: "connector-row-actions",
1765
+ children: n && f.includes(e) && /* @__PURE__ */ Y("button", {
1766
+ type: "button",
1767
+ className: "subtle-button",
1768
+ "aria-label": `Clear ${d} default at ${e} level`,
1769
+ disabled: E,
1770
+ onClick: () => void P(e, null),
1771
+ children: "Clear"
1772
+ })
1773
+ })
1774
+ ] }, e);
1775
+ }) })]
1776
+ })
1777
+ })
1778
+ })
1779
+ ]
1780
+ });
1781
+ }
1782
+ function At({ connector: e, identities: t, revision: n, inventory: r, initialScope: i, onChanged: a }) {
1783
+ let o = e.title || e.name, c = C(e), [u, f] = ut(r, i), p = d(u.realm && c.length ? `/connectors/defaults?${s(u)}` : null, n);
1784
+ if (!c.length) return null;
1785
+ let m = g(e);
1786
+ return /* @__PURE__ */ X("section", {
1787
+ className: "panel connector-defaults",
1788
+ "aria-label": `${o} default identity`,
1789
+ children: [/* @__PURE__ */ X("div", {
1790
+ className: "panel-heading",
1791
+ children: [/* @__PURE__ */ Y("h2", { children: "Default identity" }), /* @__PURE__ */ Y("span", {
1792
+ className: "badge",
1793
+ children: m.join(" · ")
1794
+ })]
1795
+ }), /* @__PURE__ */ X("div", {
1796
+ className: "panel-body",
1797
+ children: [
1798
+ /* @__PURE__ */ X("p", {
1799
+ className: "description",
1800
+ children: [
1801
+ "A default fills ",
1802
+ o,
1803
+ " for every Config in the scope that picked no identity. The deepest level wins: Stack over Space over Realm. Changing one takes effect at once — no Config is re-rendered."
1804
+ ]
1805
+ }),
1806
+ /* @__PURE__ */ Y(N, {
1807
+ title: "Which cells?",
1808
+ description: /* @__PURE__ */ Y(J, { children: "Pick a Realm, or a Space or Stack in it, to see the identity its cells get when they pick none, and to change it." }),
1809
+ children: /* @__PURE__ */ Y(B, {
1810
+ label: "Default",
1811
+ inventory: r,
1812
+ levels: m,
1813
+ value: u,
1814
+ onChange: f
1815
+ })
1816
+ }),
1817
+ u.realm ? /* @__PURE__ */ X(J, { children: [
1818
+ p.loading && !p.data && /* @__PURE__ */ Y("p", {
1819
+ role: "status",
1820
+ children: "Loading defaults…"
1821
+ }),
1822
+ p.error && /* @__PURE__ */ Y(x, {
1823
+ error: p.error,
1824
+ kind: "Scope"
1825
+ }),
1826
+ p.error && p.data && /* @__PURE__ */ Y("p", {
1827
+ className: "stale",
1828
+ children: "Showing stale defaults — refresh failed."
1829
+ }),
1830
+ c.map((n) => /* @__PURE__ */ Y(kt, {
1831
+ connector: e,
1832
+ target: n,
1833
+ scope: u,
1834
+ row: l(p.data, {
1835
+ connector: e.name,
1836
+ component: n.component,
1837
+ method: n.method
1838
+ }),
1839
+ identities: t,
1840
+ onChanged: a
1841
+ }, `${n.method}:${b(u).join("/")}`))
1842
+ ] }) : /* @__PURE__ */ Y("p", {
1843
+ className: "description",
1844
+ children: "Choose a Realm to see and set its defaults."
1845
+ })
1846
+ ]
1847
+ })]
1848
+ });
1849
+ }
1850
+ function jt({ connector: e, missing: t }) {
1851
+ let n = e.title || e.name;
1852
+ return t.length ? /* @__PURE__ */ X("section", {
1853
+ className: "panel connector-missing",
1854
+ "aria-label": `Configs without a ${n} identity`,
1855
+ children: [/* @__PURE__ */ X("div", {
1856
+ className: "panel-heading",
1857
+ children: [/* @__PURE__ */ Y("h2", { children: "Needs a default" }), /* @__PURE__ */ X("span", {
1858
+ className: "badge needs-connector",
1859
+ children: [
1860
+ t.length,
1861
+ " ",
1862
+ t.length === 1 ? "Config" : "Configs",
1863
+ " without a ",
1864
+ n,
1865
+ " identity"
1866
+ ]
1867
+ })]
1868
+ }), /* @__PURE__ */ X("div", {
1869
+ className: "panel-body",
1870
+ children: [/* @__PURE__ */ X("p", {
1871
+ className: "description",
1872
+ children: [
1873
+ "No cell can be created from these Configs until ",
1874
+ n,
1875
+ " has an identity. Set a default for their scope, or pick one in the Config."
1876
+ ]
1877
+ }), /* @__PURE__ */ Y("ul", {
1878
+ className: "state-list",
1879
+ children: t.map((t) => /* @__PURE__ */ X("li", { children: [/* @__PURE__ */ X("div", { children: [
1880
+ /* @__PURE__ */ Y("a", {
1881
+ className: "resource-name",
1882
+ href: ct(t.config),
1883
+ children: t.config.name
1884
+ }),
1885
+ /* @__PURE__ */ X("p", {
1886
+ className: "description",
1887
+ children: [[
1888
+ t.config.realm,
1889
+ t.config.space,
1890
+ t.config.stack
1891
+ ].filter(Boolean).join(" / "), t.method && /* @__PURE__ */ X(J, { children: [
1892
+ " · ",
1893
+ t.method,
1894
+ " method"
1895
+ ] })]
1896
+ }),
1897
+ t.message && /* @__PURE__ */ Y("p", {
1898
+ className: "setup-error",
1899
+ children: t.message
1900
+ })
1901
+ ] }), /* @__PURE__ */ Y("a", {
1902
+ className: "document-action",
1903
+ href: G(e.name, f(t.config)),
1904
+ "aria-label": `Set a ${n} default for the scope of ${t.config.name}`,
1905
+ children: "Set a default for its scope"
1906
+ })] }, `${ct(t.config)}:${t.component}`))
1907
+ })]
1908
+ })]
1909
+ }) : null;
1910
+ }
1911
+ function Mt({ current: e }) {
1912
+ return /* @__PURE__ */ X("nav", {
1913
+ className: "daemon-tabs",
1914
+ "aria-label": "Identities sections",
1915
+ children: [/* @__PURE__ */ Y("a", {
1916
+ href: G(),
1917
+ "aria-current": e === "identities" ? "page" : void 0,
1918
+ children: "Identities"
1919
+ }), /* @__PURE__ */ Y("a", {
1920
+ href: m("/identities/assignments"),
1921
+ "aria-current": e === "assignments" ? "page" : void 0,
1922
+ children: "Assignments"
1923
+ })]
1924
+ });
1925
+ }
1926
+ function Nt({ connector: e, section: n, target: r, action: i, identity: a, revision: o, inventory: s, onChanged: l, onTitle: u }) {
1927
+ let p = d("/connectors", o), m = d("/connectors/status", o), h = d("/catalog/secrets", o), [g, _] = q(0), y = d("/connectors/logins", o + g), w = (y.data ?? []).some((e) => !!e?.session);
1928
+ K(() => {
1929
+ if (!w) return;
1930
+ let e = window.setInterval(() => _((e) => e + 1), 3e3);
1931
+ return () => window.clearInterval(e);
1932
+ }, [w]);
1933
+ let T = (s.data?.rows[0] ?? []).some((e) => e.scope[0] === S), D = d(T ? `/connectors/defaults?realm=${encodeURIComponent(S)}` : null, o), O = E(p.data ?? []), k = e ? O.find((t) => t.name === e) : void 0, A = r?.length ? v(r) : void 0, M = k?.name, N = k?.title;
1934
+ K(() => {
1935
+ M && u?.({
1936
+ name: M,
1937
+ title: N || M
1938
+ });
1939
+ }, [
1940
+ M,
1941
+ N,
1942
+ u
1943
+ ]);
1944
+ let P = s.data?.rows.slice(0, 3), F = s.data?.configs, I = ze(() => $e(Ze({
1945
+ connectors: O,
1946
+ secrets: h.data,
1947
+ logins: y.data,
1948
+ configs: F,
1949
+ scopes: P
1950
+ }), D.data), [
1951
+ O,
1952
+ h.data,
1953
+ y.data,
1954
+ F,
1955
+ P,
1956
+ D.data
1957
+ ]), L = p.data && e && !k;
1958
+ if (n === "assignments") return /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(Mt, { current: "assignments" }), /* @__PURE__ */ Y(ot, {
1959
+ revision: o,
1960
+ onChanged: l
1961
+ })] });
1962
+ if (i === "new-login" && k && V(k).length) return /* @__PURE__ */ Y(St, {
1963
+ connector: k,
1964
+ logins: y.data,
1965
+ target: A,
1966
+ inventory: s,
1967
+ onChanged: l
1968
+ }, k.name);
1969
+ if (i && i !== "new-login" && k && C(k).length > 0) return /* @__PURE__ */ Y(Ot, {
1970
+ connector: k,
1971
+ connectors: p.data ?? [],
1972
+ action: i,
1973
+ identity: a,
1974
+ target: A,
1975
+ identities: j(h.data, k.name),
1976
+ secrets: h.data,
1977
+ secretsLoading: h.loading && !h.data,
1978
+ inventory: s,
1979
+ onChanged: l
1980
+ }, `${k.name}:${i}`);
1981
+ let R = k ? [k] : e ? [] : O, ee = T ? Qe({
1982
+ connectors: R,
1983
+ rows: I,
1984
+ realmDefaults: D.data
1985
+ }) : [], z = R.map((e) => ({
1986
+ connector: e,
1987
+ missing: c(m.data, e.name).missing
1988
+ })).filter((e) => e.missing.length), B = [h.error && `Identities could not be listed: ${h.error.message}`, y.error && `Login identities could not be listed: ${y.error.message}`].filter(Boolean).join(" "), te = k ? k.title || k.name : "";
1989
+ return /* @__PURE__ */ X(J, { children: [
1990
+ /* @__PURE__ */ Y(Mt, { current: "identities" }),
1991
+ p.loading && !p.data && /* @__PURE__ */ Y("p", {
1992
+ role: "status",
1993
+ children: "Loading identities…"
1994
+ }),
1995
+ p.error && /* @__PURE__ */ Y(x, {
1996
+ error: p.error,
1997
+ kind: "Connector"
1998
+ }),
1999
+ p.error && p.data && /* @__PURE__ */ Y("p", {
2000
+ className: "stale",
2001
+ children: "Stale connector catalog — refresh failed."
2002
+ }),
2003
+ m.error && /* @__PURE__ */ X("p", {
2004
+ className: "stale",
2005
+ children: ["Config usage could not be loaded: ", m.error.message]
2006
+ }),
2007
+ /* @__PURE__ */ X("p", {
2008
+ className: "description connectors-intro",
2009
+ children: [
2010
+ "An identity is a stored credential a cell uses: a Secret tagged with a connector, or a login identity — the Volume a harness keeps its login in. A Config picks one, or inherits a Realm, Space or Stack default. What each connector accepts is listed in the ",
2011
+ /* @__PURE__ */ Y("a", {
2012
+ href: ae(),
2013
+ children: "connector catalog"
2014
+ }),
2015
+ "."
2016
+ ]
2017
+ }),
2018
+ p.data && /* @__PURE__ */ X("div", {
2019
+ className: "list-controls identities-controls",
2020
+ children: [/* @__PURE__ */ X("label", {
2021
+ className: "schema-field",
2022
+ children: [/* @__PURE__ */ Y("span", { children: "Connector" }), /* @__PURE__ */ X("select", {
2023
+ "aria-label": "Filter identities by connector",
2024
+ value: e ?? "",
2025
+ onChange: (e) => t(G(e.target.value || void 0)),
2026
+ children: [
2027
+ /* @__PURE__ */ Y("option", {
2028
+ value: "",
2029
+ children: "All connectors"
2030
+ }),
2031
+ O.map((e) => /* @__PURE__ */ Y("option", {
2032
+ value: e.name,
2033
+ children: e.title || e.name
2034
+ }, e.name)),
2035
+ L && /* @__PURE__ */ Y("option", {
2036
+ value: e,
2037
+ children: e
2038
+ })
2039
+ ]
2040
+ })]
2041
+ }), /* @__PURE__ */ Y(wt, {
2042
+ connectors: O,
2043
+ connector: k,
2044
+ target: A
2045
+ })]
2046
+ }),
2047
+ L && /* @__PURE__ */ X("div", {
2048
+ className: "error",
2049
+ role: "alert",
2050
+ children: [/* @__PURE__ */ Y("strong", { children: "Unknown connector" }), /* @__PURE__ */ X("p", { children: [
2051
+ "No connector named ",
2052
+ e,
2053
+ " is defined. ",
2054
+ /* @__PURE__ */ Y("a", {
2055
+ href: G(),
2056
+ children: "Show every identity"
2057
+ })
2058
+ ] })]
2059
+ }),
2060
+ k && h.data && y.data && !_e(k, h.data, y.data) && /* @__PURE__ */ Y("p", {
2061
+ className: "connector-not-set-up",
2062
+ role: "note",
2063
+ children: ge(k)
2064
+ }),
2065
+ p.data && !L && /* @__PURE__ */ Y(xt, {
2066
+ label: k ? `${te} identities` : "Identities",
2067
+ rows: et(I, k?.name),
2068
+ pinned: ee,
2069
+ connectors: O,
2070
+ target: A,
2071
+ error: B,
2072
+ revision: o,
2073
+ inventory: s,
2074
+ onChanged: l
2075
+ }),
2076
+ k ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(jt, {
2077
+ connector: k,
2078
+ missing: c(m.data, k.name).missing
2079
+ }), /* @__PURE__ */ Y(At, {
2080
+ connector: k,
2081
+ identities: j(h.data, k.name),
2082
+ revision: o,
2083
+ inventory: s,
2084
+ initialScope: A,
2085
+ onChanged: l
2086
+ }, `defaults:${b(A).join("/")}`)] }) : z.length > 0 && /* @__PURE__ */ X("section", {
2087
+ className: "panel connector-missing",
2088
+ "aria-label": "Connectors without a default",
2089
+ children: [/* @__PURE__ */ X("div", {
2090
+ className: "panel-heading",
2091
+ children: [/* @__PURE__ */ Y("h2", { children: "Needs a default" }), /* @__PURE__ */ X("span", {
2092
+ className: "badge needs-connector",
2093
+ children: [
2094
+ z.length,
2095
+ " ",
2096
+ z.length === 1 ? "connector" : "connectors"
2097
+ ]
2098
+ })]
2099
+ }), /* @__PURE__ */ X("div", {
2100
+ className: "panel-body",
2101
+ children: [/* @__PURE__ */ Y("p", {
2102
+ className: "description",
2103
+ children: "Configs that require these connectors resolve to no identity, so no cell can be created from them. Set a default for their scope, or pick one in the Config."
2104
+ }), /* @__PURE__ */ Y("ul", {
2105
+ className: "state-list",
2106
+ children: z.map(({ connector: e, missing: t }) => /* @__PURE__ */ X("li", { children: [/* @__PURE__ */ X("div", { children: [
2107
+ /* @__PURE__ */ Y("a", {
2108
+ className: "resource-name",
2109
+ href: G(e.name),
2110
+ children: e.title || e.name
2111
+ }),
2112
+ " ",
2113
+ /* @__PURE__ */ Y("span", {
2114
+ className: "badge needs-connector",
2115
+ children: "Needs a default"
2116
+ }),
2117
+ /* @__PURE__ */ X("p", {
2118
+ className: "description",
2119
+ children: [
2120
+ t.length,
2121
+ " ",
2122
+ t.length === 1 ? "Config" : "Configs",
2123
+ " without an identity"
2124
+ ]
2125
+ })
2126
+ ] }), /* @__PURE__ */ Y("a", {
2127
+ className: "document-action",
2128
+ href: G(e.name, f(t[0].config)),
2129
+ "aria-label": `Set a default for ${e.title || e.name}`,
2130
+ children: "Set a default"
2131
+ })] }, e.name))
2132
+ })]
2133
+ })]
2134
+ })
2135
+ ] });
2136
+ }
2137
+ export { Nt as IdentitiesPage };