@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.
- package/dist/generated/global-types.d.ts +611 -171
- package/dist/generated/wspace-operations.d.ts +331 -4
- package/dist/generated/wspace-operations.js +239 -138
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +10638 -696
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/stewards/components/OwnMachineDeskCard.d.ts +20 -0
- package/dist/stewards/components/OwnMachineDeskCard.js +418 -0
- package/dist/stewards/components/OwnMachineDeskCard.js.map +1 -0
- package/dist/stewards/i18n/en.d.ts +48 -0
- package/dist/stewards/i18n/en.js +49 -1
- package/dist/stewards/i18n/en.js.map +1 -1
- package/dist/stewards/pages/StewardCharterPage.js +156 -150
- package/dist/stewards/pages/StewardCharterPage.js.map +1 -1
- package/dist/stewards/permissions/stewardPermissions.d.ts +11 -0
- package/dist/stewards/permissions/stewardPermissions.js +4 -1
- package/dist/stewards/permissions/stewardPermissions.js.map +1 -1
- package/dist/stewards/permissions/useStewardPermissions.d.ts +8 -0
- package/dist/stewards/permissions/useStewardPermissions.js +15 -8
- package/dist/stewards/permissions/useStewardPermissions.js.map +1 -1
- package/dist/stewards/utils/charterForm.d.ts +3 -0
- package/dist/stewards/utils/charterForm.js +12 -0
- package/dist/stewards/utils/charterForm.js.map +1 -1
- package/dist/stewards/utils/ownMachine.d.ts +83 -0
- package/dist/stewards/utils/ownMachine.js +63 -0
- package/dist/stewards/utils/ownMachine.js.map +1 -0
- 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,
|
|
4
|
-
import { AutonomyPicker as
|
|
5
|
-
import { LinesField as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
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
|
|
16
|
-
let n =
|
|
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__ */
|
|
21
|
+
return /* @__PURE__ */ j(b, {
|
|
21
22
|
title: n("stewards.charter.rulesSection"),
|
|
22
23
|
hint: n("stewards.charter.rulesSectionHint"),
|
|
23
|
-
children: s ? /* @__PURE__ */
|
|
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__ */
|
|
28
|
+
}) : o && d.length === 0 ? /* @__PURE__ */ j(S, {
|
|
28
29
|
kind: "loading",
|
|
29
30
|
title: n("stewards.common.loading")
|
|
30
|
-
}) : d.length === 0 ? /* @__PURE__ */
|
|
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__ */
|
|
34
|
+
}) : /* @__PURE__ */ j("div", {
|
|
34
35
|
className: "overflow-x-auto",
|
|
35
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ M("table", {
|
|
36
37
|
className: "w-full text-sm",
|
|
37
38
|
"aria-label": n("stewards.charter.rulesSection"),
|
|
38
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
67
|
+
/* @__PURE__ */ j("th", {
|
|
67
68
|
scope: "col",
|
|
68
69
|
className: "px-2 py-1"
|
|
69
70
|
})
|
|
70
71
|
]
|
|
71
|
-
}) }), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
87
|
+
/* @__PURE__ */ M("td", {
|
|
87
88
|
className: "px-2 py-2 text-(color:--color-text-secondary)",
|
|
88
89
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
99
|
+
/* @__PURE__ */ j("td", {
|
|
99
100
|
className: "px-2 py-2 text-right",
|
|
100
|
-
children: t && /* @__PURE__ */
|
|
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
|
|
113
|
-
let r =
|
|
114
|
-
|
|
115
|
-
...
|
|
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
|
-
},
|
|
119
|
-
let e =
|
|
120
|
-
if (!e.ok)
|
|
119
|
+
}, ne = async () => {
|
|
120
|
+
let e = E(L, K);
|
|
121
|
+
if (!e.ok) V(e.error);
|
|
121
122
|
else {
|
|
122
|
-
|
|
123
|
+
V(null);
|
|
123
124
|
try {
|
|
124
|
-
let { data: t } = await
|
|
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 && (
|
|
129
|
+
n !== void 0 && (U(n), G((e) => [n, ...e])), z(null);
|
|
129
130
|
} catch {}
|
|
130
131
|
}
|
|
131
|
-
},
|
|
132
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
136
|
+
q && /* @__PURE__ */ j(_, {
|
|
136
137
|
tone: "info",
|
|
137
138
|
children: r("stewards.charter.archivedLocked")
|
|
138
139
|
}),
|
|
139
|
-
!
|
|
140
|
+
!q && !v && /* @__PURE__ */ j(_, {
|
|
140
141
|
tone: "info",
|
|
141
142
|
children: r("stewards.charter.forbiddenSave")
|
|
142
143
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ M("div", {
|
|
144
145
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
146
|
+
children: [/* @__PURE__ */ M("div", {
|
|
146
147
|
className: "flex flex-col gap-4 lg:col-span-2",
|
|
147
148
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ M(b, {
|
|
149
150
|
title: r("stewards.charter.rulesTitle"),
|
|
150
151
|
hint: r("stewards.charter.rulesHint"),
|
|
151
|
-
children: [/* @__PURE__ */
|
|
152
|
-
className: `${
|
|
152
|
+
children: [/* @__PURE__ */ j("textarea", {
|
|
153
|
+
className: `${w} min-h-40`,
|
|
153
154
|
"aria-label": r("stewards.charter.rulesLabel"),
|
|
154
|
-
"aria-invalid":
|
|
155
|
-
readOnly:
|
|
156
|
-
value:
|
|
155
|
+
"aria-invalid": B?.kind === "charterText",
|
|
156
|
+
readOnly: J,
|
|
157
|
+
value: K.charterText,
|
|
157
158
|
onChange: (e) => $({ charterText: e.target.value })
|
|
158
|
-
}),
|
|
159
|
+
}), B?.kind === "charterText" && /* @__PURE__ */ j(_, { children: r("stewards.wizard.charterRequired") })]
|
|
159
160
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ j(b, {
|
|
161
162
|
title: r("stewards.wizard.autonomyTitle"),
|
|
162
163
|
hint: r("stewards.wizard.autonomyHint"),
|
|
163
|
-
children: /* @__PURE__ */
|
|
164
|
-
value:
|
|
165
|
-
disabled:
|
|
166
|
-
maxLevel:
|
|
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__ */
|
|
171
|
+
/* @__PURE__ */ M(b, {
|
|
171
172
|
title: r("stewards.budget.limit"),
|
|
172
|
-
children: [
|
|
173
|
-
budgets:
|
|
174
|
-
disabled:
|
|
175
|
-
errorAt:
|
|
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
|
-
...
|
|
178
|
+
...K.budgets,
|
|
178
179
|
[e]: {
|
|
179
|
-
...
|
|
180
|
+
...K.budgets[e],
|
|
180
181
|
[t]: n
|
|
181
182
|
}
|
|
182
183
|
} })
|
|
183
184
|
})]
|
|
184
185
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ M(b, {
|
|
186
187
|
title: r("stewards.charter.toolsTitle"),
|
|
187
188
|
hint: r("stewards.charter.toolsHint"),
|
|
188
189
|
children: [
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
allowed:
|
|
191
|
-
disabled:
|
|
192
|
-
onToggle: (e, t) => $({ allowedToolKeys: t ?
|
|
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__ */
|
|
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__ */
|
|
198
|
+
/* @__PURE__ */ j("label", {
|
|
198
199
|
htmlFor: "charter-custom-tools",
|
|
199
200
|
children: r("stewards.charter.customTitle")
|
|
200
201
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
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:
|
|
206
|
-
invalid:
|
|
207
|
-
value:
|
|
206
|
+
readOnly: J,
|
|
207
|
+
invalid: B?.kind === "toolKey",
|
|
208
|
+
value: te,
|
|
208
209
|
onChange: (e) => {
|
|
209
|
-
let t =
|
|
210
|
-
$({ allowedToolKeys:
|
|
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
|
-
|
|
217
|
-
/* @__PURE__ */
|
|
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__ */
|
|
221
|
+
/* @__PURE__ */ j("label", {
|
|
221
222
|
htmlFor: "charter-connections",
|
|
222
223
|
children: r("stewards.charter.connectionsLabel")
|
|
223
224
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ j(p, {
|
|
225
226
|
id: "charter-connections",
|
|
226
227
|
className: "min-h-12",
|
|
227
228
|
label: r("stewards.charter.connectionsLabel"),
|
|
228
|
-
readOnly:
|
|
229
|
-
value:
|
|
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__ */
|
|
238
|
+
/* @__PURE__ */ j(b, {
|
|
238
239
|
title: r("stewards.charter.deskTitle"),
|
|
239
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ M("div", {
|
|
240
241
|
className: "flex flex-col gap-3",
|
|
241
242
|
children: [
|
|
242
|
-
/* @__PURE__ */
|
|
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__ */
|
|
245
|
-
className:
|
|
246
|
-
disabled:
|
|
247
|
-
value:
|
|
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 ===
|
|
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:
|
|
252
|
+
children: g(r, "egress", e)
|
|
252
253
|
}, e))
|
|
253
254
|
})]
|
|
254
255
|
}),
|
|
255
|
-
|
|
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__ */
|
|
259
|
+
/* @__PURE__ */ j("label", {
|
|
259
260
|
htmlFor: "charter-hosts",
|
|
260
261
|
children: r("stewards.wizard.allowedHosts")
|
|
261
262
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ j(p, {
|
|
263
264
|
id: "charter-hosts",
|
|
264
265
|
className: "min-h-20",
|
|
265
266
|
label: r("stewards.wizard.allowedHosts"),
|
|
266
|
-
readOnly:
|
|
267
|
-
value:
|
|
267
|
+
readOnly: J,
|
|
268
|
+
value: K.deskAllowedHosts,
|
|
268
269
|
onChange: (e) => $({ deskAllowedHosts: e })
|
|
269
270
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ j("span", {
|
|
271
272
|
className: "text-xs",
|
|
272
273
|
children: r("stewards.wizard.allowedHostsHelp")
|
|
273
274
|
})
|
|
274
275
|
]
|
|
275
276
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
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__ */
|
|
281
|
-
className:
|
|
282
|
-
readOnly:
|
|
283
|
-
value:
|
|
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__ */
|
|
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__ */
|
|
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:
|
|
303
|
+
canUpdate: v && !q
|
|
298
304
|
})
|
|
299
305
|
]
|
|
300
|
-
}), /* @__PURE__ */
|
|
306
|
+
}), /* @__PURE__ */ M("div", {
|
|
301
307
|
className: "flex flex-col gap-4",
|
|
302
308
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ M(b, {
|
|
304
310
|
title: r("stewards.charter.autonomyTitle"),
|
|
305
|
-
children: [/* @__PURE__ */
|
|
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 =
|
|
314
|
-
return /* @__PURE__ */
|
|
319
|
+
let t = re[e] ?? 0, n = ie[e] ?? null;
|
|
320
|
+
return /* @__PURE__ */ M("div", {
|
|
315
321
|
className: "mb-3",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ M("div", {
|
|
317
323
|
className: "mb-1 flex justify-between text-sm text-(color:--color-text-primary)",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
327
|
-
ratio:
|
|
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__ */
|
|
339
|
+
/* @__PURE__ */ j(b, { children: /* @__PURE__ */ M("div", {
|
|
334
340
|
className: "flex items-start justify-between gap-3",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
344
|
+
}), /* @__PURE__ */ j("p", {
|
|
339
345
|
className: "text-xs text-(color:--color-text-secondary)",
|
|
340
346
|
children: r("stewards.charter.dryRunHelp")
|
|
341
|
-
})] }), /* @__PURE__ */
|
|
342
|
-
checked:
|
|
343
|
-
disabled:
|
|
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__ */
|
|
349
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ j(d, {}),
|
|
355
|
+
/* @__PURE__ */ M(b, {
|
|
350
356
|
title: r("stewards.charter.historyTitle"),
|
|
351
|
-
children: [/* @__PURE__ */
|
|
357
|
+
children: [/* @__PURE__ */ M("ul", {
|
|
352
358
|
className: "flex flex-col gap-1 text-sm",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ M("li", {
|
|
354
360
|
className: "text-(color:--color-text-primary)",
|
|
355
|
-
children: [r("stewards.charter.historyCurrent", { version: i.charter.charterVersion }), /* @__PURE__ */
|
|
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
|
-
}),
|
|
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__ */
|
|
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
|
-
|
|
382
|
+
I && /* @__PURE__ */ M(_, { children: [
|
|
377
383
|
r("stewards.charter.saveError"),
|
|
378
384
|
" ",
|
|
379
|
-
|
|
385
|
+
I.message
|
|
380
386
|
] }),
|
|
381
|
-
|
|
387
|
+
H !== null && /* @__PURE__ */ j(_, {
|
|
382
388
|
tone: "success",
|
|
383
|
-
children: r("stewards.charter.saved", { version:
|
|
389
|
+
children: r("stewards.charter.saved", { version: H })
|
|
384
390
|
}),
|
|
385
|
-
!
|
|
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__ */
|
|
393
|
+
children: [/* @__PURE__ */ j("span", {
|
|
388
394
|
className: "text-sm text-(color:--color-text-secondary)",
|
|
389
|
-
children:
|
|
390
|
-
}), /* @__PURE__ */
|
|
395
|
+
children: X ? r("stewards.charter.unsaved") : ""
|
|
396
|
+
}), /* @__PURE__ */ M("div", {
|
|
391
397
|
className: "flex gap-2",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
393
|
-
disabled: !
|
|
398
|
+
children: [/* @__PURE__ */ j(y, {
|
|
399
|
+
disabled: !X || F,
|
|
394
400
|
onClick: () => {
|
|
395
|
-
|
|
401
|
+
z(null), V(null);
|
|
396
402
|
},
|
|
397
403
|
children: r("stewards.charter.discard")
|
|
398
|
-
}), /* @__PURE__ */
|
|
404
|
+
}), /* @__PURE__ */ j(y, {
|
|
399
405
|
variant: "primary",
|
|
400
|
-
disabled: !
|
|
401
|
-
onClick: () => void
|
|
402
|
-
children: r(
|
|
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 {
|
|
415
|
+
export { P as StewardCharterPage };
|
|
410
416
|
|
|
411
417
|
//# sourceMappingURL=StewardCharterPage.js.map
|