@burdenoff/microfe-stewards 2026.1204.3 → 2026.1205.1

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 (27) hide show
  1. package/dist/generated/global-types.d.ts +611 -171
  2. package/dist/generated/wspace-operations.d.ts +331 -4
  3. package/dist/generated/wspace-operations.js +239 -138
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +10638 -696
  6. package/dist/generated/wspace-types.js.map +1 -1
  7. package/dist/stewards/components/OwnMachineDeskCard.d.ts +20 -0
  8. package/dist/stewards/components/OwnMachineDeskCard.js +418 -0
  9. package/dist/stewards/components/OwnMachineDeskCard.js.map +1 -0
  10. package/dist/stewards/i18n/en.d.ts +48 -0
  11. package/dist/stewards/i18n/en.js +49 -1
  12. package/dist/stewards/i18n/en.js.map +1 -1
  13. package/dist/stewards/pages/StewardCharterPage.js +156 -150
  14. package/dist/stewards/pages/StewardCharterPage.js.map +1 -1
  15. package/dist/stewards/permissions/stewardPermissions.d.ts +11 -0
  16. package/dist/stewards/permissions/stewardPermissions.js +4 -1
  17. package/dist/stewards/permissions/stewardPermissions.js.map +1 -1
  18. package/dist/stewards/permissions/useStewardPermissions.d.ts +8 -0
  19. package/dist/stewards/permissions/useStewardPermissions.js +15 -8
  20. package/dist/stewards/permissions/useStewardPermissions.js.map +1 -1
  21. package/dist/stewards/utils/charterForm.d.ts +3 -0
  22. package/dist/stewards/utils/charterForm.js +12 -0
  23. package/dist/stewards/utils/charterForm.js.map +1 -1
  24. package/dist/stewards/utils/ownMachine.d.ts +83 -0
  25. package/dist/stewards/utils/ownMachine.js +63 -0
  26. package/dist/stewards/utils/ownMachine.js.map +1 -0
  27. package/package.json +1 -1
@@ -1,103 +1,104 @@
1
1
  import { useMemo as e, useState as t } from "react";
2
2
  import { useBotmanorStewardWorkspaceControlsQuery as n, useListBotmanorStewardApprovalRulesQuery as r, useRevokeBotmanorStewardApprovalRuleMutation as i, useUpdateBotmanorStewardCharterMutation as a } from "../../generated/wspace-operations.js";
3
- import { BotmanorStewardDeskEgressMode as o, BotmanorStewardStatus as s } from "../../generated/wspace-types.js";
4
- import { AutonomyPicker as c, BudgetTable as l, FixedDefaultsCard as u, ToolSwitches as d } from "../components/CharterControls.js";
5
- import { LinesField as f } from "../components/LinesField.js";
6
- import { budgetRatio as p, enumLabel as m } from "../components/stewardLabels.js";
7
- import { Alert as h, Badge as g, Button as _, Card as v, ProgressBar as y, StateMessage as b, Switch as x } from "../components/ui.js";
8
- import { FIELD_CLASS as S } from "../components/fieldClasses.js";
9
- import { useStewardsT as C } from "../i18n/useStewardsT.js";
10
- import { useStewardAbilities as w } from "../permissions/useStewardPermissions.js";
11
- import { buildCharterUpdate as T, charterToForm as E, customToolKeys as D, mergeToolKeys as O } from "../utils/charterForm.js";
12
- import { useStewardOutlet as k } from "./StewardLayout.js";
13
- import { jsx as A, jsxs as j } from "react/jsx-runtime";
3
+ import { BotmanorStewardDeskEgressMode as o, BotmanorStewardDeskKind as s, BotmanorStewardStatus as c } from "../../generated/wspace-types.js";
4
+ import { AutonomyPicker as l, BudgetTable as u, FixedDefaultsCard as d, ToolSwitches as f } from "../components/CharterControls.js";
5
+ import { LinesField as p } from "../components/LinesField.js";
6
+ import { OwnMachineDeskCard as m } from "../components/OwnMachineDeskCard.js";
7
+ import { budgetRatio as h, enumLabel as g } from "../components/stewardLabels.js";
8
+ import { Alert as _, Badge as v, Button as y, Card as b, ProgressBar as x, StateMessage as S, Switch as C } from "../components/ui.js";
9
+ import { FIELD_CLASS as w } from "../components/fieldClasses.js";
10
+ import { useStewardsT as T } from "../i18n/useStewardsT.js";
11
+ import { useStewardAbilities as ee } from "../permissions/useStewardPermissions.js";
12
+ import { buildCharterUpdate as E, charterToForm as D, customToolKeys as O, mergeToolKeys as k } from "../utils/charterForm.js";
13
+ import { useStewardOutlet as A } from "./StewardLayout.js";
14
+ import { jsx as j, jsxs as M } from "react/jsx-runtime";
14
15
  // src/stewards/pages/StewardCharterPage.tsx
15
- function M({ stewardId: e, canUpdate: t }) {
16
- let n = C(), { data: a, loading: o, error: s, refetch: c } = r({
16
+ function N({ stewardId: e, canUpdate: t }) {
17
+ let n = T(), { data: a, loading: o, error: s, refetch: c } = r({
17
18
  variables: { stewardId: e },
18
19
  fetchPolicy: "cache-and-network"
19
20
  }), [l, { loading: u }] = i(), d = a?.listBotmanorStewardApprovalRules ?? [];
20
- return /* @__PURE__ */ A(v, {
21
+ return /* @__PURE__ */ j(b, {
21
22
  title: n("stewards.charter.rulesSection"),
22
23
  hint: n("stewards.charter.rulesSectionHint"),
23
- children: s ? /* @__PURE__ */ A(b, {
24
+ children: s ? /* @__PURE__ */ j(S, {
24
25
  kind: "error",
25
26
  title: n("stewards.common.errorTitle"),
26
27
  body: s.message
27
- }) : o && d.length === 0 ? /* @__PURE__ */ A(b, {
28
+ }) : o && d.length === 0 ? /* @__PURE__ */ j(S, {
28
29
  kind: "loading",
29
30
  title: n("stewards.common.loading")
30
- }) : d.length === 0 ? /* @__PURE__ */ A("p", {
31
+ }) : d.length === 0 ? /* @__PURE__ */ j("p", {
31
32
  className: "text-sm text-(color:--color-text-secondary)",
32
33
  children: n("stewards.charter.rulesEmpty")
33
- }) : /* @__PURE__ */ A("div", {
34
+ }) : /* @__PURE__ */ j("div", {
34
35
  className: "overflow-x-auto",
35
- children: /* @__PURE__ */ j("table", {
36
+ children: /* @__PURE__ */ M("table", {
36
37
  className: "w-full text-sm",
37
38
  "aria-label": n("stewards.charter.rulesSection"),
38
- children: [/* @__PURE__ */ A("thead", { children: /* @__PURE__ */ j("tr", {
39
+ children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ M("tr", {
39
40
  className: "text-left text-xs text-(color:--color-text-secondary)",
40
41
  children: [
41
- /* @__PURE__ */ A("th", {
42
+ /* @__PURE__ */ j("th", {
42
43
  scope: "col",
43
44
  className: "px-2 py-1 font-medium",
44
45
  children: n("stewards.charter.colTool")
45
46
  }),
46
- /* @__PURE__ */ A("th", {
47
+ /* @__PURE__ */ j("th", {
47
48
  scope: "col",
48
49
  className: "px-2 py-1 font-medium",
49
50
  children: n("stewards.charter.colDestination")
50
51
  }),
51
- /* @__PURE__ */ A("th", {
52
+ /* @__PURE__ */ j("th", {
52
53
  scope: "col",
53
54
  className: "px-2 py-1 font-medium",
54
55
  children: n("stewards.charter.colPurpose")
55
56
  }),
56
- /* @__PURE__ */ A("th", {
57
+ /* @__PURE__ */ j("th", {
57
58
  scope: "col",
58
59
  className: "px-2 py-1 font-medium",
59
60
  children: n("stewards.charter.colLimit")
60
61
  }),
61
- /* @__PURE__ */ A("th", {
62
+ /* @__PURE__ */ j("th", {
62
63
  scope: "col",
63
64
  className: "px-2 py-1 font-medium",
64
65
  children: n("stewards.charter.colExpires")
65
66
  }),
66
- /* @__PURE__ */ A("th", {
67
+ /* @__PURE__ */ j("th", {
67
68
  scope: "col",
68
69
  className: "px-2 py-1"
69
70
  })
70
71
  ]
71
- }) }), /* @__PURE__ */ A("tbody", { children: d.map((e) => /* @__PURE__ */ j("tr", {
72
+ }) }), /* @__PURE__ */ j("tbody", { children: d.map((e) => /* @__PURE__ */ M("tr", {
72
73
  className: "border-t border-(color:--color-border-seam)",
73
74
  children: [
74
- /* @__PURE__ */ A("td", {
75
+ /* @__PURE__ */ j("td", {
75
76
  className: "px-2 py-2 font-mono text-xs text-(color:--color-text-primary)",
76
77
  children: e.toolKey
77
78
  }),
78
- /* @__PURE__ */ A("td", {
79
+ /* @__PURE__ */ j("td", {
79
80
  className: "px-2 py-2 text-(color:--color-text-primary)",
80
81
  children: e.destination
81
82
  }),
82
- /* @__PURE__ */ A("td", {
83
+ /* @__PURE__ */ j("td", {
83
84
  className: "px-2 py-2 text-(color:--color-text-secondary)",
84
85
  children: e.purpose
85
86
  }),
86
- /* @__PURE__ */ j("td", {
87
+ /* @__PURE__ */ M("td", {
87
88
  className: "px-2 py-2 text-(color:--color-text-secondary)",
88
89
  children: [
89
- /* @__PURE__ */ A(g, { children: m(n, "scope", e.scope) }),
90
+ /* @__PURE__ */ j(v, { children: g(n, "scope", e.scope) }),
90
91
  " ",
91
92
  e.maxUses != null && `${e.usedCount} / ${e.maxUses}`
92
93
  ]
93
94
  }),
94
- /* @__PURE__ */ A("td", {
95
+ /* @__PURE__ */ j("td", {
95
96
  className: "px-2 py-2 text-(color:--color-text-secondary)",
96
97
  children: new Date(e.expiresAt).toLocaleDateString()
97
98
  }),
98
- /* @__PURE__ */ A("td", {
99
+ /* @__PURE__ */ j("td", {
99
100
  className: "px-2 py-2 text-right",
100
- children: t && /* @__PURE__ */ A(_, {
101
+ children: t && /* @__PURE__ */ j(y, {
101
102
  disabled: u,
102
103
  onClick: () => void l({ variables: { id: e.id } }).then(() => c()).catch(() => void 0),
103
104
  children: n("stewards.charter.revoke")
@@ -109,124 +110,124 @@ function M({ stewardId: e, canUpdate: t }) {
109
110
  })
110
111
  });
111
112
  }
112
- function N() {
113
- let r = C(), { steward: i } = k(), { canUpdate: g } = w(), b = n({ errorPolicy: "ignore" }), [N, { loading: P, error: F }] = a(), I = e(() => E(i.charter), [i.charter]), [L, R] = t(null), [z, B] = t(null), [V, H] = t(null), [U, W] = t([]), G = L ?? I, K = i.status === s.Archived, q = !g || K, J = T(I, G), Y = !J.ok || Object.keys(J.input).length > 0, X = e(() => D(G.allowedToolKeys), [G.allowedToolKeys]), Z = b.data?.botmanorStewardWorkspaceControls.allowedDeskEgressModes, Q = e(() => Z ? new Set(Z) : null, [Z]), $ = (e) => {
114
- H(null), R({
115
- ...G,
113
+ function P() {
114
+ let r = T(), { steward: i } = A(), { canUpdate: v } = ee(), S = n({ errorPolicy: "ignore" }), [P, { loading: F, error: I }] = a(), L = e(() => D(i.charter), [i.charter]), [R, z] = t(null), [B, V] = t(null), [H, U] = t(null), [W, G] = t([]), K = R ?? L, q = i.status === c.Archived, J = !v || q, Y = E(L, K), X = !Y.ok || Object.keys(Y.input).length > 0, te = e(() => O(K.allowedToolKeys), [K.allowedToolKeys]), Z = S.data?.botmanorStewardWorkspaceControls.allowedDeskEgressModes, Q = e(() => Z ? new Set(Z) : null, [Z]), $ = (e) => {
115
+ U(null), z({
116
+ ...K,
116
117
  ...e
117
118
  });
118
- }, ee = async () => {
119
- let e = T(I, G);
120
- if (!e.ok) B(e.error);
119
+ }, ne = async () => {
120
+ let e = E(L, K);
121
+ if (!e.ok) V(e.error);
121
122
  else {
122
- B(null);
123
+ V(null);
123
124
  try {
124
- let { data: t } = await N({ variables: {
125
+ let { data: t } = await P({ variables: {
125
126
  id: i.id,
126
127
  input: e.input
127
128
  } }), n = t?.updateBotmanorStewardCharter.charter.charterVersion;
128
- n !== void 0 && (H(n), W((e) => [n, ...e])), R(null);
129
+ n !== void 0 && (U(n), G((e) => [n, ...e])), z(null);
129
130
  } catch {}
130
131
  }
131
- }, te = i.usageToday, ne = i.charter.budgetPerDay;
132
- return /* @__PURE__ */ j("div", {
132
+ }, re = i.usageToday, ie = i.charter.budgetPerDay;
133
+ return /* @__PURE__ */ M("div", {
133
134
  className: "flex flex-col gap-4",
134
135
  children: [
135
- K && /* @__PURE__ */ A(h, {
136
+ q && /* @__PURE__ */ j(_, {
136
137
  tone: "info",
137
138
  children: r("stewards.charter.archivedLocked")
138
139
  }),
139
- !K && !g && /* @__PURE__ */ A(h, {
140
+ !q && !v && /* @__PURE__ */ j(_, {
140
141
  tone: "info",
141
142
  children: r("stewards.charter.forbiddenSave")
142
143
  }),
143
- /* @__PURE__ */ j("div", {
144
+ /* @__PURE__ */ M("div", {
144
145
  className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
145
- children: [/* @__PURE__ */ j("div", {
146
+ children: [/* @__PURE__ */ M("div", {
146
147
  className: "flex flex-col gap-4 lg:col-span-2",
147
148
  children: [
148
- /* @__PURE__ */ j(v, {
149
+ /* @__PURE__ */ M(b, {
149
150
  title: r("stewards.charter.rulesTitle"),
150
151
  hint: r("stewards.charter.rulesHint"),
151
- children: [/* @__PURE__ */ A("textarea", {
152
- className: `${S} min-h-40`,
152
+ children: [/* @__PURE__ */ j("textarea", {
153
+ className: `${w} min-h-40`,
153
154
  "aria-label": r("stewards.charter.rulesLabel"),
154
- "aria-invalid": z?.kind === "charterText",
155
- readOnly: q,
156
- value: G.charterText,
155
+ "aria-invalid": B?.kind === "charterText",
156
+ readOnly: J,
157
+ value: K.charterText,
157
158
  onChange: (e) => $({ charterText: e.target.value })
158
- }), z?.kind === "charterText" && /* @__PURE__ */ A(h, { children: r("stewards.wizard.charterRequired") })]
159
+ }), B?.kind === "charterText" && /* @__PURE__ */ j(_, { children: r("stewards.wizard.charterRequired") })]
159
160
  }),
160
- /* @__PURE__ */ A(v, {
161
+ /* @__PURE__ */ j(b, {
161
162
  title: r("stewards.wizard.autonomyTitle"),
162
163
  hint: r("stewards.wizard.autonomyHint"),
163
- children: /* @__PURE__ */ A(c, {
164
- value: G.autonomyLevel,
165
- disabled: q,
166
- maxLevel: b.data?.botmanorStewardWorkspaceControls.maxAutonomyLevel,
164
+ children: /* @__PURE__ */ j(l, {
165
+ value: K.autonomyLevel,
166
+ disabled: J,
167
+ maxLevel: S.data?.botmanorStewardWorkspaceControls.maxAutonomyLevel,
167
168
  onChange: (e) => $({ autonomyLevel: e })
168
169
  })
169
170
  }),
170
- /* @__PURE__ */ j(v, {
171
+ /* @__PURE__ */ M(b, {
171
172
  title: r("stewards.budget.limit"),
172
- children: [z?.kind === "budget" && /* @__PURE__ */ A(h, { children: r("stewards.budget.invalid", { name: r(`stewards.budget.${z.key}`) }) }), /* @__PURE__ */ A(l, {
173
- budgets: G.budgets,
174
- disabled: q,
175
- errorAt: z?.kind === "budget" ? z : null,
173
+ children: [B?.kind === "budget" && /* @__PURE__ */ j(_, { children: r("stewards.budget.invalid", { name: r(`stewards.budget.${B.key}`) }) }), /* @__PURE__ */ j(u, {
174
+ budgets: K.budgets,
175
+ disabled: J,
176
+ errorAt: B?.kind === "budget" ? B : null,
176
177
  onChange: (e, t, n) => $({ budgets: {
177
- ...G.budgets,
178
+ ...K.budgets,
178
179
  [e]: {
179
- ...G.budgets[e],
180
+ ...K.budgets[e],
180
181
  [t]: n
181
182
  }
182
183
  } })
183
184
  })]
184
185
  }),
185
- /* @__PURE__ */ j(v, {
186
+ /* @__PURE__ */ M(b, {
186
187
  title: r("stewards.charter.toolsTitle"),
187
188
  hint: r("stewards.charter.toolsHint"),
188
189
  children: [
189
- /* @__PURE__ */ A(d, {
190
- allowed: G.allowedToolKeys,
191
- disabled: q,
192
- onToggle: (e, t) => $({ allowedToolKeys: t ? O([...G.allowedToolKeys], [e]) : G.allowedToolKeys.filter((t) => t !== e) })
190
+ /* @__PURE__ */ j(f, {
191
+ allowed: K.allowedToolKeys,
192
+ disabled: J,
193
+ onToggle: (e, t) => $({ allowedToolKeys: t ? k([...K.allowedToolKeys], [e]) : K.allowedToolKeys.filter((t) => t !== e) })
193
194
  }),
194
- /* @__PURE__ */ j("div", {
195
+ /* @__PURE__ */ M("div", {
195
196
  className: "mt-3 flex flex-col gap-1 text-xs text-(color:--color-text-secondary)",
196
197
  children: [
197
- /* @__PURE__ */ A("label", {
198
+ /* @__PURE__ */ j("label", {
198
199
  htmlFor: "charter-custom-tools",
199
200
  children: r("stewards.charter.customTitle")
200
201
  }),
201
- /* @__PURE__ */ A(f, {
202
+ /* @__PURE__ */ j(p, {
202
203
  id: "charter-custom-tools",
203
204
  className: "min-h-16",
204
205
  label: r("stewards.charter.customTitle"),
205
- readOnly: q,
206
- invalid: z?.kind === "toolKey",
207
- value: X,
206
+ readOnly: J,
207
+ invalid: B?.kind === "toolKey",
208
+ value: te,
208
209
  onChange: (e) => {
209
- let t = G.allowedToolKeys.filter((e) => D([e]).length === 0);
210
- $({ allowedToolKeys: O(t, e) });
210
+ let t = K.allowedToolKeys.filter((e) => O([e]).length === 0);
211
+ $({ allowedToolKeys: k(t, e) });
211
212
  }
212
213
  }),
213
214
  r("stewards.charter.customHint")
214
215
  ]
215
216
  }),
216
- z?.kind === "toolKey" && /* @__PURE__ */ A(h, { children: r("stewards.charter.customInvalid", { key: z.key }) }),
217
- /* @__PURE__ */ j("div", {
217
+ B?.kind === "toolKey" && /* @__PURE__ */ j(_, { children: r("stewards.charter.customInvalid", { key: B.key }) }),
218
+ /* @__PURE__ */ M("div", {
218
219
  className: "mt-3 flex flex-col gap-1 text-xs text-(color:--color-text-secondary)",
219
220
  children: [
220
- /* @__PURE__ */ A("label", {
221
+ /* @__PURE__ */ j("label", {
221
222
  htmlFor: "charter-connections",
222
223
  children: r("stewards.charter.connectionsLabel")
223
224
  }),
224
- /* @__PURE__ */ A(f, {
225
+ /* @__PURE__ */ j(p, {
225
226
  id: "charter-connections",
226
227
  className: "min-h-12",
227
228
  label: r("stewards.charter.connectionsLabel"),
228
- readOnly: q,
229
- value: G.allowedConnectionIds,
229
+ readOnly: J,
230
+ value: K.allowedConnectionIds,
230
231
  onChange: (e) => $({ allowedConnectionIds: e })
231
232
  }),
232
233
  r("stewards.charter.connectionsHint")
@@ -234,56 +235,56 @@ function N() {
234
235
  })
235
236
  ]
236
237
  }),
237
- /* @__PURE__ */ A(v, {
238
+ /* @__PURE__ */ j(b, {
238
239
  title: r("stewards.charter.deskTitle"),
239
- children: /* @__PURE__ */ j("div", {
240
+ children: /* @__PURE__ */ M("div", {
240
241
  className: "flex flex-col gap-3",
241
242
  children: [
242
- /* @__PURE__ */ j("label", {
243
+ /* @__PURE__ */ M("label", {
243
244
  className: "flex flex-col gap-1 text-sm text-(color:--color-text-secondary)",
244
- children: [r("stewards.wizard.egressTitle"), /* @__PURE__ */ A("select", {
245
- className: S,
246
- disabled: q,
247
- value: G.deskEgressMode,
245
+ children: [r("stewards.wizard.egressTitle"), /* @__PURE__ */ j("select", {
246
+ className: w,
247
+ disabled: J,
248
+ value: K.deskEgressMode,
248
249
  onChange: (e) => $({ deskEgressMode: e.target.value }),
249
- children: Object.values(o).filter((e) => !Q || Q.has(e) || e === G.deskEgressMode).map((e) => /* @__PURE__ */ A("option", {
250
+ children: Object.values(o).filter((e) => !Q || Q.has(e) || e === K.deskEgressMode).map((e) => /* @__PURE__ */ j("option", {
250
251
  value: e,
251
- children: m(r, "egress", e)
252
+ children: g(r, "egress", e)
252
253
  }, e))
253
254
  })]
254
255
  }),
255
- G.deskEgressMode === o.AllowList && /* @__PURE__ */ j("div", {
256
+ K.deskEgressMode === o.AllowList && /* @__PURE__ */ M("div", {
256
257
  className: "flex flex-col gap-1 text-sm text-(color:--color-text-secondary)",
257
258
  children: [
258
- /* @__PURE__ */ A("label", {
259
+ /* @__PURE__ */ j("label", {
259
260
  htmlFor: "charter-hosts",
260
261
  children: r("stewards.wizard.allowedHosts")
261
262
  }),
262
- /* @__PURE__ */ A(f, {
263
+ /* @__PURE__ */ j(p, {
263
264
  id: "charter-hosts",
264
265
  className: "min-h-20",
265
266
  label: r("stewards.wizard.allowedHosts"),
266
- readOnly: q,
267
- value: G.deskAllowedHosts,
267
+ readOnly: J,
268
+ value: K.deskAllowedHosts,
268
269
  onChange: (e) => $({ deskAllowedHosts: e })
269
270
  }),
270
- /* @__PURE__ */ A("span", {
271
+ /* @__PURE__ */ j("span", {
271
272
  className: "text-xs",
272
273
  children: r("stewards.wizard.allowedHostsHelp")
273
274
  })
274
275
  ]
275
276
  }),
276
- /* @__PURE__ */ j("label", {
277
+ /* @__PURE__ */ M("label", {
277
278
  className: "flex flex-col gap-1 text-sm text-(color:--color-text-secondary)",
278
279
  children: [
279
280
  r("stewards.charter.timezone"),
280
- /* @__PURE__ */ A("input", {
281
- className: S,
282
- readOnly: q,
283
- value: G.timezone,
281
+ /* @__PURE__ */ j("input", {
282
+ className: w,
283
+ readOnly: J,
284
+ value: K.timezone,
284
285
  onChange: (e) => $({ timezone: e.target.value })
285
286
  }),
286
- /* @__PURE__ */ A("span", {
287
+ /* @__PURE__ */ j("span", {
287
288
  className: "text-xs",
288
289
  children: r("stewards.charter.timezoneHelp")
289
290
  })
@@ -292,17 +293,22 @@ function N() {
292
293
  ]
293
294
  })
294
295
  }),
295
- /* @__PURE__ */ A(M, {
296
+ i.defaultDeskKind === s.OwnMachine && /* @__PURE__ */ j(m, {
297
+ stewardId: i.id,
298
+ ownerActorId: i.ownerActorId,
299
+ canUpdate: v && !q
300
+ }, i.id),
301
+ /* @__PURE__ */ j(N, {
296
302
  stewardId: i.id,
297
- canUpdate: g && !K
303
+ canUpdate: v && !q
298
304
  })
299
305
  ]
300
- }), /* @__PURE__ */ j("div", {
306
+ }), /* @__PURE__ */ M("div", {
301
307
  className: "flex flex-col gap-4",
302
308
  children: [
303
- /* @__PURE__ */ j(v, {
309
+ /* @__PURE__ */ M(b, {
304
310
  title: r("stewards.charter.autonomyTitle"),
305
- children: [/* @__PURE__ */ A("p", {
311
+ children: [/* @__PURE__ */ j("p", {
306
312
  className: "mb-2 text-xs text-(color:--color-text-secondary)",
307
313
  children: r("stewards.charter.usage")
308
314
  }), [
@@ -310,12 +316,12 @@ function N() {
310
316
  ["steps", "steps"],
311
317
  ["deskMinutes", "deskMinutes"]
312
318
  ].map(([e]) => {
313
- let t = te[e] ?? 0, n = ne[e] ?? null;
314
- return /* @__PURE__ */ j("div", {
319
+ let t = re[e] ?? 0, n = ie[e] ?? null;
320
+ return /* @__PURE__ */ M("div", {
315
321
  className: "mb-3",
316
- children: [/* @__PURE__ */ j("div", {
322
+ children: [/* @__PURE__ */ M("div", {
317
323
  className: "mb-1 flex justify-between text-sm text-(color:--color-text-primary)",
318
- children: [/* @__PURE__ */ A("span", { children: r(`stewards.budget.${e}`) }), /* @__PURE__ */ j("span", {
324
+ children: [/* @__PURE__ */ j("span", { children: r(`stewards.budget.${e}`) }), /* @__PURE__ */ M("span", {
319
325
  className: "tabular-nums text-(color:--color-text-secondary)",
320
326
  children: [
321
327
  t,
@@ -323,40 +329,40 @@ function N() {
323
329
  n ?? "—"
324
330
  ]
325
331
  })]
326
- }), /* @__PURE__ */ A(y, {
327
- ratio: p(t, n),
332
+ }), /* @__PURE__ */ j(x, {
333
+ ratio: h(t, n),
328
334
  label: r(`stewards.budget.${e}`)
329
335
  })]
330
336
  }, e);
331
337
  })]
332
338
  }),
333
- /* @__PURE__ */ A(v, { children: /* @__PURE__ */ j("div", {
339
+ /* @__PURE__ */ j(b, { children: /* @__PURE__ */ M("div", {
334
340
  className: "flex items-start justify-between gap-3",
335
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
341
+ children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("p", {
336
342
  className: "text-sm font-semibold text-(color:--color-text-primary)",
337
343
  children: r("stewards.charter.dryRun")
338
- }), /* @__PURE__ */ A("p", {
344
+ }), /* @__PURE__ */ j("p", {
339
345
  className: "text-xs text-(color:--color-text-secondary)",
340
346
  children: r("stewards.charter.dryRunHelp")
341
- })] }), /* @__PURE__ */ A(x, {
342
- checked: G.dryRunDefault,
343
- disabled: q,
347
+ })] }), /* @__PURE__ */ j(C, {
348
+ checked: K.dryRunDefault,
349
+ disabled: J,
344
350
  label: r("stewards.charter.dryRun"),
345
351
  onChange: (e) => $({ dryRunDefault: e })
346
352
  })]
347
353
  }) }),
348
- /* @__PURE__ */ A(u, {}),
349
- /* @__PURE__ */ j(v, {
354
+ /* @__PURE__ */ j(d, {}),
355
+ /* @__PURE__ */ M(b, {
350
356
  title: r("stewards.charter.historyTitle"),
351
- children: [/* @__PURE__ */ j("ul", {
357
+ children: [/* @__PURE__ */ M("ul", {
352
358
  className: "flex flex-col gap-1 text-sm",
353
- children: [/* @__PURE__ */ j("li", {
359
+ children: [/* @__PURE__ */ M("li", {
354
360
  className: "text-(color:--color-text-primary)",
355
- children: [r("stewards.charter.historyCurrent", { version: i.charter.charterVersion }), /* @__PURE__ */ A("span", {
361
+ children: [r("stewards.charter.historyCurrent", { version: i.charter.charterVersion }), /* @__PURE__ */ j("span", {
356
362
  className: "block text-xs text-(color:--color-text-secondary)",
357
363
  children: r("stewards.charter.historyEdited", { when: new Date(i.updatedAt).toLocaleString() })
358
364
  })]
359
- }), U.filter((e) => e !== i.charter.charterVersion).map((e) => /* @__PURE__ */ j("li", {
365
+ }), W.filter((e) => e !== i.charter.charterVersion).map((e) => /* @__PURE__ */ M("li", {
360
366
  className: "text-(color:--color-text-secondary)",
361
367
  children: [
362
368
  "v",
@@ -365,7 +371,7 @@ function N() {
365
371
  r("stewards.charter.historySession")
366
372
  ]
367
373
  }, e))]
368
- }), /* @__PURE__ */ A("p", {
374
+ }), /* @__PURE__ */ j("p", {
369
375
  className: "mt-2 text-xs text-(color:--color-text-secondary)",
370
376
  children: r("stewards.charter.historyNote")
371
377
  })]
@@ -373,39 +379,39 @@ function N() {
373
379
  ]
374
380
  })]
375
381
  }),
376
- F && /* @__PURE__ */ j(h, { children: [
382
+ I && /* @__PURE__ */ M(_, { children: [
377
383
  r("stewards.charter.saveError"),
378
384
  " ",
379
- F.message
385
+ I.message
380
386
  ] }),
381
- V !== null && /* @__PURE__ */ A(h, {
387
+ H !== null && /* @__PURE__ */ j(_, {
382
388
  tone: "success",
383
- children: r("stewards.charter.saved", { version: V })
389
+ children: r("stewards.charter.saved", { version: H })
384
390
  }),
385
- !q && /* @__PURE__ */ j("div", {
391
+ !J && /* @__PURE__ */ M("div", {
386
392
  className: "sticky bottom-0 flex flex-wrap items-center justify-between gap-2 border-t border-(color:--color-border-seam) bg-(--color-bg-canvas) py-3",
387
- children: [/* @__PURE__ */ A("span", {
393
+ children: [/* @__PURE__ */ j("span", {
388
394
  className: "text-sm text-(color:--color-text-secondary)",
389
- children: Y ? r("stewards.charter.unsaved") : ""
390
- }), /* @__PURE__ */ j("div", {
395
+ children: X ? r("stewards.charter.unsaved") : ""
396
+ }), /* @__PURE__ */ M("div", {
391
397
  className: "flex gap-2",
392
- children: [/* @__PURE__ */ A(_, {
393
- disabled: !Y || P,
398
+ children: [/* @__PURE__ */ j(y, {
399
+ disabled: !X || F,
394
400
  onClick: () => {
395
- R(null), B(null);
401
+ z(null), V(null);
396
402
  },
397
403
  children: r("stewards.charter.discard")
398
- }), /* @__PURE__ */ A(_, {
404
+ }), /* @__PURE__ */ j(y, {
399
405
  variant: "primary",
400
- disabled: !Y || P,
401
- onClick: () => void ee(),
402
- children: r(P ? "stewards.charter.saving" : "stewards.charter.save")
406
+ disabled: !X || F,
407
+ onClick: () => void ne(),
408
+ children: r(F ? "stewards.charter.saving" : "stewards.charter.save")
403
409
  })]
404
410
  })]
405
411
  })
406
412
  ]
407
413
  });
408
414
  }
409
- export { N as StewardCharterPage };
415
+ export { P as StewardCharterPage };
410
416
 
411
417
  //# sourceMappingURL=StewardCharterPage.js.map