@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,257 @@
1
+ import { hn as e, kn as t, qt as n, un as r } from "./connector-ui-CG9kLZ5s.js";
2
+ // src/assignments.mjs
3
+ var i = (e) => Array.isArray(e) ? e : [], a = (e) => typeof e == "string" ? e.trim() : "", o = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : {}, s = "inherit", c = "system", l = "method:";
4
+ function u(e) {
5
+ return i(e).filter((e) => a(e?.harness));
6
+ }
7
+ function d(e) {
8
+ let t = i(e?.methods);
9
+ return t.find((e) => e?.default) ?? t[0];
10
+ }
11
+ function f(e, t) {
12
+ return t ? i(e?.methods).find((e) => e?.name === t) : d(e);
13
+ }
14
+ function p(e, t) {
15
+ return f(e, t)?.delivery === n;
16
+ }
17
+ function m(e) {
18
+ let n = t(e);
19
+ return n ? `${n.name}@${[
20
+ n.realm,
21
+ n.space,
22
+ n.stack
23
+ ].filter(Boolean).join("/")}` : "";
24
+ }
25
+ function h(e, n = "default") {
26
+ let r = a(e);
27
+ if (!r) return;
28
+ let [i, o] = r.split("@"), [s, c, l] = (o ?? n).split("/");
29
+ return t({
30
+ name: i,
31
+ realm: s,
32
+ space: c,
33
+ stack: l
34
+ });
35
+ }
36
+ var g = (t, n, r) => !!t && !!n && e(h(t, r)) === e(h(n, r));
37
+ function _(e) {
38
+ let t = o(e), n = {};
39
+ for (let e of [
40
+ "method",
41
+ "identity",
42
+ "state"
43
+ ]) a(t[e]) && (n[e] = a(t[e]));
44
+ return n;
45
+ }
46
+ function v(e, t) {
47
+ return JSON.stringify(_(e)) === JSON.stringify(_(t));
48
+ }
49
+ function y(e, t) {
50
+ let n = _(e), r = _(t);
51
+ return r.method ? r : _({
52
+ method: n.method,
53
+ identity: r.identity || n.identity,
54
+ state: r.state || n.state
55
+ });
56
+ }
57
+ function b({ name: e, defaults: t, team: n, role: r }) {
58
+ let i = (n?.inherit ? o(t) : o(n?.items))[e];
59
+ return r?.set ? {
60
+ found: !0,
61
+ choice: i ? y(i, r) : _(r),
62
+ from: "role"
63
+ } : i ? {
64
+ found: !0,
65
+ choice: _(i),
66
+ from: n?.inherit ? "defaults" : "team"
67
+ } : {
68
+ found: !1,
69
+ choice: {},
70
+ from: ""
71
+ };
72
+ }
73
+ function x(e, t) {
74
+ let n = i(e).find((e) => e?.connector === t?.name && i(e.usedBy).some((e) => e?.role === "default/agent"));
75
+ return n ? m(n.volume) : "";
76
+ }
77
+ function S(e, t, n, r = "default") {
78
+ let i = _(e);
79
+ return p(t, i.method) ? i.identity ? n && g(i.identity, n, r) ? c : `id:${i.identity}` : "own" : `${l}${i.method ?? d(t)?.name ?? ""}`;
80
+ }
81
+ function C(e, t, n, i = "") {
82
+ let a = r(t)[0]?.name ?? "";
83
+ return e === "own" ? { method: a } : e === "system" ? {
84
+ method: a,
85
+ identity: n
86
+ } : e.startsWith("id:") ? {
87
+ method: a,
88
+ identity: e.slice(3)
89
+ } : e.startsWith("method:") ? _({
90
+ method: e.slice(7),
91
+ state: i
92
+ }) : {};
93
+ }
94
+ function w(e, t, n, r = "default") {
95
+ if (!e?.found) return "own per role";
96
+ let i = S(e.choice, t, n, r);
97
+ if (i === "own") return "own per role";
98
+ if (i === "system") return "System default";
99
+ if (i.startsWith("id:")) return i.slice(3).split("@")[0];
100
+ let a = e.choice.state ? ` · ${e.choice.state}` : "";
101
+ return `${i.slice(7)}${a}`;
102
+ }
103
+ function T(e, t, n) {
104
+ let r = a(n?.harness);
105
+ return a(e?.harness) ? a(e.harness) === r : i(t).some((e) => a(e?.name ?? e) === r);
106
+ }
107
+ function E(e, t) {
108
+ let n = [{
109
+ key: "defaults",
110
+ kind: "defaults",
111
+ label: "All teams (defaults)"
112
+ }];
113
+ for (let e of i(t)) {
114
+ let t = a(e?.summary?.name);
115
+ if (t && e.form) {
116
+ n.push({
117
+ key: `team:${t}`,
118
+ kind: "team",
119
+ team: t,
120
+ label: t,
121
+ system: !!e.summary.system
122
+ });
123
+ for (let r of i(e.view?.roles?.items)) n.push({
124
+ key: `role:${t}/${r.name}`,
125
+ kind: "role",
126
+ team: t,
127
+ role: a(r.name),
128
+ label: a(r.name),
129
+ harness: a(r.harness)
130
+ });
131
+ }
132
+ }
133
+ return n;
134
+ }
135
+ function D(e, t, n) {
136
+ return i(i(e?.roles?.items).find((e) => e?.name === t)?.harnessConnectors).find((e) => e?.name === n);
137
+ }
138
+ function O({ row: e, connector: t, defaults: n, team: r, system: i }) {
139
+ let a = t.name;
140
+ if (e.kind === "defaults") {
141
+ let e = o(n)[a];
142
+ return {
143
+ own: e ? _(e) : void 0,
144
+ resolved: {
145
+ found: !!e,
146
+ choice: e ? _(e) : {},
147
+ from: e ? "defaults" : ""
148
+ },
149
+ pick: e ? S(e, t, i) : s
150
+ };
151
+ }
152
+ let c = r?.form, l = {
153
+ inherit: !!c?.connectors?.inherit,
154
+ items: o(c?.connectors?.items)
155
+ };
156
+ if (e.kind === "team") {
157
+ let e = l.inherit ? void 0 : l.items[a];
158
+ return {
159
+ own: e ? _(e) : void 0,
160
+ resolved: b({
161
+ name: a,
162
+ defaults: n,
163
+ team: l
164
+ }),
165
+ pick: e ? S(e, t, i) : s
166
+ };
167
+ }
168
+ let u = D(c, e.role, a), d = u?.set ? _(u) : void 0;
169
+ return {
170
+ own: d,
171
+ resolved: b({
172
+ name: a,
173
+ defaults: n,
174
+ team: l,
175
+ role: u
176
+ }),
177
+ pick: d ? S(d, t, i) : s
178
+ };
179
+ }
180
+ function k(e, t) {
181
+ return { connectors: { [e]: t && Object.keys(_(t)).length ? _(t) : null } };
182
+ }
183
+ function A(e, t, n) {
184
+ let r = { ...o(e) };
185
+ return n ? r[t] = _(n) : delete r[t], r;
186
+ }
187
+ var j = (e, t) => [.../* @__PURE__ */ new Set([...Object.keys(o(e)), ...Object.keys(o(t))])].every((n) => o(e)[n] && o(t)[n] && v(o(e)[n], o(t)[n]));
188
+ function M(e, t, n, r) {
189
+ let i = e.connectors.inherit ? { ...o(r) } : { ...o(e.connectors.items) };
190
+ n ? i[t] = _(n) : o(r)[t] ? i[t] = _(o(r)[t]) : delete i[t];
191
+ let a = j(i, r);
192
+ return {
193
+ ...e,
194
+ connectors: {
195
+ inherit: a,
196
+ items: a ? {} : i
197
+ }
198
+ };
199
+ }
200
+ function N(e, t, n, r, a) {
201
+ let o = e.roles.inherit ? {
202
+ inherit: !1,
203
+ items: structuredClone(i(a))
204
+ } : {
205
+ ...e.roles,
206
+ items: i(e.roles.items)
207
+ }, s = o.items.map((e) => {
208
+ if (e?.name !== t) return e;
209
+ let a = i(e.harnessConnectors).some((e) => e?.name === n) ? i(e.harnessConnectors) : [...i(e.harnessConnectors), {
210
+ name: n,
211
+ set: !1
212
+ }];
213
+ return {
214
+ ...e,
215
+ harnessConnectors: a.map((e) => e?.name === n ? r ? {
216
+ name: n,
217
+ set: !0,
218
+ ..._(r)
219
+ } : {
220
+ name: n,
221
+ set: !1
222
+ } : e)
223
+ };
224
+ });
225
+ return {
226
+ ...e,
227
+ roles: {
228
+ ...o,
229
+ items: s
230
+ }
231
+ };
232
+ }
233
+ function P(e) {
234
+ return i(e).filter((e) => e?.form?.connectors?.inherit).map((e) => a(e.summary?.name)).filter(Boolean);
235
+ }
236
+ function F(e, n, r) {
237
+ return i(e).filter((e) => e?.connector === n?.name && t(e.volume)).map((e) => ({
238
+ value: m(e.volume),
239
+ label: e.volume.name,
240
+ state: a(e.login?.state)
241
+ })).filter((e) => e.value !== r).sort((e, t) => e.value.localeCompare(t.value));
242
+ }
243
+ function I(e, t, n) {
244
+ let r = [];
245
+ for (let o of i(e)) {
246
+ let e = a(o?.summary?.name);
247
+ if (!(!e || t.kind !== "defaults" && e !== t.team) && (t.kind !== "defaults" || o.form?.connectors?.inherit)) for (let a of i(o.view?.roles?.items)) t.kind === "role" && a.name !== t.role || !T(a, o.view?.harnesses?.items, n) || t.kind !== "role" && D(o.form, a.name, n.name)?.set || r.push(`${e}/${a.name}`);
248
+ }
249
+ return r;
250
+ }
251
+ function L(t, n, r) {
252
+ let o = h(n);
253
+ if (!o) return [];
254
+ let s = i(t).find((t) => e(t?.volume) === e(o));
255
+ return [...new Set([...i(s?.usedBy).map((e) => a(e?.role)), ...i(r)].filter(Boolean))].sort();
256
+ }
257
+ export { L as _, k as a, M as b, F as c, A as d, s as f, T as g, b as h, C as i, P as l, c as m, O as n, E as o, l as p, w as r, u as s, I as t, p as u, x as v, N as y };
@@ -0,0 +1,4 @@
1
+ export declare function AssignmentsTab({ revision, onChanged }: {
2
+ revision: number;
3
+ onChanged: () => void;
4
+ }): import("react").JSX.Element;
@@ -0,0 +1,40 @@
1
+ import type { Connector, ConnectorMethod, SecretRef } from "./connectors.mjs";
2
+ import type { FormConnector, FormHarnessConnector, FormRole, TeamForm, TeamView } from "./teams.mjs";
3
+
4
+ export const pickInherit: string;
5
+ export const pickOwn: string;
6
+ export const pickSystem: string;
7
+ export const pickIdentity: string;
8
+ export const pickMethod: string;
9
+ export type Choice = { method?: string; identity?: string; state?: string };
10
+ export type Resolved = { found: boolean; choice: Choice; from: string };
11
+ export type GridRow = { key: string; kind: "defaults" | "team" | "role"; label: string; team?: string; role?: string; harness?: string; system?: boolean };
12
+ export type CellState = { own?: Choice; resolved: Resolved; pick: string };
13
+ export type IdentityOption = { value: string; label: string; state: string };
14
+
15
+ export function harnessConnectors(connectors: Connector[] | undefined): Connector[];
16
+ export function defaultMethod(connector: Connector | undefined): ConnectorMethod | undefined;
17
+ export function methodOf(connector: Connector | undefined, name: string | undefined): ConnectorMethod | undefined;
18
+ export function keepsLoginMethod(connector: Connector | undefined, name: string | undefined): boolean;
19
+ export function identityNotation(ref: Partial<SecretRef> | undefined): string;
20
+ export function parseNotation(value: string | undefined, realm?: string): SecretRef | undefined;
21
+ export function normalChoice(choice: unknown): Choice;
22
+ export function sameChoice(a: unknown, b: unknown): boolean;
23
+ export function mergeChoice(team: unknown, role: unknown): Choice;
24
+ export function resolve(input: { name: string; defaults: Record<string, FormConnector> | undefined; team: { inherit: boolean; items: Record<string, FormConnector> } | undefined; role?: FormHarnessConnector }): Resolved;
25
+ export function systemNotation(logins: unknown[] | undefined, connector: Connector | undefined): string;
26
+ export function pickOf(choice: unknown, connector: Connector | undefined, system: string, realm?: string): string;
27
+ export function choiceOf(pick: string, connector: Connector | undefined, system: string, state?: string): Choice;
28
+ export function cellText(resolved: Resolved | undefined, connector: Connector | undefined, system: string, realm?: string): string;
29
+ export function roleRuns(role: { harness?: string } | undefined, teamHarnesses: unknown[] | undefined, connector: Connector | undefined): boolean;
30
+ export function gridRows(defaults: Record<string, FormConnector> | undefined, teams: TeamView[] | undefined): GridRow[];
31
+ export function formRoleChoice(form: TeamForm | undefined, role: string | undefined, connector: string): FormHarnessConnector | undefined;
32
+ export function cellState(input: { row: GridRow; connector: Connector; defaults: Record<string, FormConnector> | undefined; team: TeamView | undefined; system: string }): CellState;
33
+ export function defaultsBody(name: string, choice: Choice | undefined): { connectors: Record<string, Choice | null> };
34
+ export function nextDefaults(defaults: Record<string, FormConnector> | undefined, name: string, choice: Choice | undefined): Record<string, FormConnector>;
35
+ export function withTeamChoice(form: TeamForm, name: string, choice: Choice | undefined, defaults: Record<string, FormConnector> | undefined): TeamForm;
36
+ export function withRoleChoice(form: TeamForm, role: string, name: string, choice: Choice | undefined, inheritedRoles: FormRole[] | undefined): TeamForm;
37
+ export function inheritingTeams(teams: TeamView[] | undefined): string[];
38
+ export function identityOptions(logins: unknown[] | undefined, connector: Connector | undefined, system: string): IdentityOption[];
39
+ export function affectedRoles(teams: TeamView[] | undefined, row: GridRow, connector: Connector): string[];
40
+ export function sharedRoles(logins: unknown[] | undefined, notation: string, affected: string[]): string[];
package/dist/auth.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ import { type ComponentType } from "react";
2
+ import { type Failure } from "./request";
3
+ export declare const loginUser = "root";
4
+ export declare const loginReadBack = "kuke get secret web-ui-admin --realm kuke-system -o yaml";
5
+ export type SessionCheck = {
6
+ phase: "signed-out";
7
+ } | {
8
+ phase: "unavailable";
9
+ error: Failure;
10
+ } | {
11
+ phase: "signed-in";
12
+ user: string;
13
+ };
14
+ export type Session = {
15
+ phase: "checking";
16
+ } | SessionCheck;
17
+ export type SignInProps = {
18
+ notice?: Failure;
19
+ checking?: boolean;
20
+ onRetry: () => void;
21
+ onSignedIn: (user: string) => void;
22
+ };
23
+ export type AuthAdapter = {
24
+ session: () => Promise<SessionCheck>;
25
+ signOut: () => Promise<void>;
26
+ endsSession: (path: string) => boolean;
27
+ SignIn: ComponentType<SignInProps>;
28
+ };
29
+ export declare const localAuth: AuthAdapter;
30
+ export declare function configureAuth(adapter?: AuthAdapter): void;
31
+ export declare function auth(): AuthAdapter;
32
+ export declare function checkSessionAfterSocketFailure(): void;
33
+ export declare function useSession(): {
34
+ session: Session;
35
+ retry: () => Promise<void>;
36
+ signedIn: (user: string) => void;
37
+ signOut: () => Promise<void>;
38
+ };
39
+ export declare function Login({ notice, checking, onRetry, onSignedIn }: SignInProps): import("react").JSX.Element;
@@ -0,0 +1,49 @@
1
+ import { type ReactNode } from "react";
2
+ import type { PurgeOptions } from "./lifecycle";
3
+ export type BulkRow = {
4
+ key: string;
5
+ scope: string[];
6
+ label: string;
7
+ };
8
+ export type BulkAction<R extends BulkRow> = {
9
+ name: string;
10
+ verb: string;
11
+ danger?: boolean;
12
+ reasonOf?: (row: R) => string;
13
+ consequence: string;
14
+ acknowledgment?: string;
15
+ purge?: boolean;
16
+ options?: boolean;
17
+ };
18
+ export type BulkOutcome = {
19
+ ok: boolean;
20
+ message?: string;
21
+ } | undefined;
22
+ export declare function useSelection(keys: string[], ready: boolean): {
23
+ selected: string[];
24
+ has: (key: string) => boolean;
25
+ toggle: (key: string, on: boolean) => void;
26
+ toggleAll: (matching: string[]) => void;
27
+ state: (matching: string[]) => import("./bulk.mjs").HeaderState;
28
+ clear: () => void;
29
+ };
30
+ export type Selection = ReturnType<typeof useSelection>;
31
+ export declare function SelectAllBox({ selection, matching, label }: {
32
+ selection: Selection;
33
+ matching: string[];
34
+ label: string;
35
+ }): import("react").JSX.Element;
36
+ export declare function SelectRowBox({ selection, rowKey, label }: {
37
+ selection: Selection;
38
+ rowKey: string;
39
+ label: string;
40
+ }): import("react").JSX.Element;
41
+ export declare function BulkActions<R extends BulkRow>({ rows, actions, noun, selection, run, extra }: {
42
+ rows: R[];
43
+ actions: BulkAction<R>[];
44
+ noun: (count: number) => string;
45
+ selection: Selection;
46
+ run: (row: R, action: BulkAction<R>, options: PurgeOptions) => Promise<BulkOutcome>;
47
+ extra?: ReactNode;
48
+ }): import("react").JSX.Element | null;
49
+ export declare function countNoun(singular: string, plural?: string): (count: number) => string;
@@ -0,0 +1,14 @@
1
+ export const batchConcurrency: number;
2
+ export type HeaderState = "none" | "some" | "all";
3
+ export type BatchResult<T> = { item: T; ok: boolean; message: string };
4
+ export function toggleKey(selected: string[], key: string, on: boolean): string[];
5
+ export function pruneSelection(selected: string[], keys: string[]): string[];
6
+ export function headerState(selected: string[], matching: string[]): HeaderState;
7
+ export function toggleAll(selected: string[], matching: string[]): string[];
8
+ export const systemSkip: string;
9
+ export function batchTargets<T extends { scope: string[] }>(rows: T[], reasonOf: (row: T) => string): { targets: T[]; skipped: { row: T; reason: string }[] };
10
+ export function offeredActions<T extends { scope: string[] }, A>(rows: T[], actions: readonly A[], reasonOf: (row: T, action: A) => string): A[];
11
+ export function runBatch<T>(items: T[], run: (item: T) => Promise<{ ok: boolean; message?: string } | undefined>, limit?: number): Promise<BatchResult<T>[]>;
12
+ export function batchSummary(verb: string, noun: string, results: { ok: boolean }[], skipped?: number): { tone: "success" | "error"; message: string };
13
+ export function purgePhrase(count: number, noun: string): string;
14
+ export function counted(count: number, singular: string, plural?: string): string;