@burdenoff/microfe-stewards 2026.1202.1 → 2026.1202.3
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/stewards/components/LiveDeskPanel.js +97 -71
- package/dist/stewards/components/LiveDeskPanel.js.map +1 -1
- package/dist/stewards/components/run/RunHeader.d.ts +36 -0
- package/dist/stewards/components/run/RunHeader.js +163 -0
- package/dist/stewards/components/run/RunHeader.js.map +1 -0
- package/dist/stewards/components/run/RunStepsSection.d.ts +13 -0
- package/dist/stewards/components/run/RunStepsSection.js +151 -0
- package/dist/stewards/components/run/RunStepsSection.js.map +1 -0
- package/dist/stewards/components/run/RunSummaryCards.d.ts +8 -0
- package/dist/stewards/components/run/RunSummaryCards.js +92 -0
- package/dist/stewards/components/run/RunSummaryCards.js.map +1 -0
- package/dist/stewards/components/run/StepDetail.d.ts +6 -0
- package/dist/stewards/components/run/StepDetail.js +126 -0
- package/dist/stewards/components/run/StepDetail.js.map +1 -0
- package/dist/stewards/i18n/en.d.ts +1 -0
- package/dist/stewards/i18n/en.js +1 -0
- package/dist/stewards/i18n/en.js.map +1 -1
- package/dist/stewards/live/useDeskStream.d.ts +6 -1
- package/dist/stewards/live/useDeskStream.js +14 -12
- package/dist/stewards/live/useDeskStream.js.map +1 -1
- package/dist/stewards/pages/StewardNewPage.js +51 -44
- package/dist/stewards/pages/StewardNewPage.js.map +1 -1
- package/dist/stewards/pages/StewardRunPage.js +86 -478
- package/dist/stewards/pages/StewardRunPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunStepsSection.js","names":["HEADER_CELL","StepRow","selected","step","onPick","enumLabel","t","Badge","VERDICT_TONE","StepsTable","useStewardsT","steps","StateMessage","selectedId","RunStepsSection","picked","setPicked","useState","s","detailTitle","Card","StepDetail","APPROVAL_TONE","RunApprovalsCard","approvals","a"],"sources":["../../../../src/stewards/components/run/RunStepsSection.tsx"],"sourcesContent":["import { useState } from 'react';\nimport type { StewardRunDetailFieldsFragment } from '../../../generated/wspace-operations';\nimport { useStewardsT, type StewardsT } from '../../i18n/useStewardsT';\nimport { enumLabel, VERDICT_TONE } from '../stewardLabels';\nimport { Badge, Card, StateMessage } from '../ui';\nimport { StepDetail, type RunStep } from './StepDetail';\n\nconst HEADER_CELL = 'px-2 py-1 font-medium';\n\nfunction StepRow({\n step,\n selected,\n onPick,\n t,\n}: {\n step: RunStep;\n selected: boolean;\n onPick: (id: string) => void;\n t: StewardsT;\n}) {\n return (\n <tr\n aria-selected={selected}\n className={`border-b border-(color:--color-border-seam) last:border-b-0 ${selected ? 'bg-(--color-accent-soft)' : ''}`}\n >\n <td className=\"px-2 py-2 text-(color:--color-text-secondary) tabular-nums\">{step.seq}</td>\n <td className=\"px-2 py-2\">\n <button\n type=\"button\"\n className=\"text-left focus-visible:outline-2 focus-visible:outline-(color:--color-focus-ring)\"\n onClick={() => onPick(step.id)}\n >\n <span className=\"block font-medium text-(color:--color-text-primary)\">\n {enumLabel(t, 'stepKind', step.kind)}\n </span>\n <span className=\"block break-all font-mono text-xs text-(color:--color-text-secondary)\">\n {[step.toolKey, step.targetSummary].filter(Boolean).join(' · ')}\n </span>\n </button>\n </td>\n <td className=\"px-2 py-2\">\n <Badge tone={VERDICT_TONE[step.verdict]}>{enumLabel(t, 'verdict', step.verdict)}</Badge>\n </td>\n <td className=\"px-2 py-2 text-(color:--color-text-primary) tabular-nums\">\n {step.creditsUsed.toFixed(2)}\n </td>\n </tr>\n );\n}\n\nfunction StepsTable({\n steps,\n selectedId,\n onPick,\n}: {\n steps: readonly RunStep[];\n selectedId: string | undefined;\n onPick: (id: string) => void;\n}) {\n const t = useStewardsT();\n if (steps.length === 0) {\n return <StateMessage kind=\"empty\" title={t('stewards.run.noSteps')} />;\n }\n return (\n <div className=\"overflow-x-auto\">\n <table className=\"w-full text-sm\" aria-label={t('stewards.run.stepsHeading')}>\n <thead>\n <tr className=\"border-b border-(color:--color-border-seam) text-left text-xs text-(color:--color-text-secondary)\">\n <th scope=\"col\" className={HEADER_CELL}>\n {t('stewards.run.colNumber')}\n </th>\n <th scope=\"col\" className={HEADER_CELL}>\n {t('stewards.run.colStep')}\n </th>\n <th scope=\"col\" className={HEADER_CELL}>\n {t('stewards.run.colVerdict')}\n </th>\n <th scope=\"col\" className={HEADER_CELL}>\n {t('stewards.run.colCredits')}\n </th>\n </tr>\n </thead>\n <tbody>\n {steps.map((step) => (\n <StepRow\n key={step.id}\n step={step}\n selected={selectedId === step.id}\n onPick={onPick}\n t={t}\n />\n ))}\n </tbody>\n </table>\n </div>\n );\n}\n\n/**\n * The run's steps in order, with the picked step's detail beside them. Until the person picks\n * one, the latest step is shown, so a live run follows its newest step.\n */\nexport function RunStepsSection({\n steps,\n timeZone,\n}: {\n steps: StewardRunDetailFieldsFragment['steps'];\n timeZone: string;\n}) {\n const t = useStewardsT();\n const [picked, setPicked] = useState<string | null>(null);\n const selected = steps.find((s) => s.id === picked) ?? steps[steps.length - 1];\n const detailTitle = selected\n ? t('stewards.run.stepDetail', {\n seq: selected.seq,\n tool: selected.toolKey ?? enumLabel(t, 'stepKind', selected.kind),\n })\n : t('stewards.run.stepsHeading');\n\n return (\n <div className=\"grid grid-cols-1 gap-4 xl:grid-cols-5\">\n <Card\n title={t('stewards.run.stepsHeading')}\n hint={t('stewards.run.stepsOrdered')}\n className=\"xl:col-span-2\"\n >\n <StepsTable steps={steps} selectedId={selected?.id} onPick={setPicked} />\n </Card>\n <Card title={detailTitle} className=\"xl:col-span-3\">\n {selected ? (\n <StepDetail step={selected} timeZone={timeZone} />\n ) : (\n <p className=\"text-sm text-(color:--color-text-secondary)\">\n {t('stewards.run.pickStep')}\n </p>\n )}\n </Card>\n </div>\n );\n}\n\nconst APPROVAL_TONE: Record<string, 'warning' | 'success' | 'neutral'> = {\n PENDING: 'warning',\n APPROVED: 'success',\n};\n\n/** Approval requests the run raised, with their status and requested scope. */\nexport function RunApprovalsCard({\n approvals,\n}: {\n approvals: StewardRunDetailFieldsFragment['approvals'];\n}) {\n const t = useStewardsT();\n if (approvals.length === 0) return null;\n return (\n <Card title={t('stewards.run.approvalsTitle')}>\n <ul className=\"flex flex-col gap-1 text-sm\">\n {approvals.map((a) => (\n <li\n key={a.id}\n className=\"flex flex-wrap items-center gap-2 text-(color:--color-text-primary)\"\n >\n <code className=\"text-xs\">{a.toolName}</code>\n <Badge tone={APPROVAL_TONE[a.status] ?? 'neutral'}>\n {enumLabel(t, 'approvalStatus', a.status)}\n </Badge>\n {a.requestedScope && (\n <span className=\"text-xs text-(color:--color-text-secondary)\">\n {enumLabel(t, 'scope', a.requestedScope)}\n </span>\n )}\n </li>\n ))}\n </ul>\n </Card>\n );\n}\n"],"mappings":";;;;;;;AAOA,IAAMA,IAAc;AAEpB,SAASC,EAAQ,EACf,SACA,aACA,WACA,QAMC;CACD,OACE,kBAAC,MAAD;EACE,iBAAeC;EACf,WAAW,+DAA+DA,IAAW,6BAA6B;EAFpH,UAAA;GAIE,kBAAC,MAAD;IAAI,WAAU;IAA8D,UAAAC,EAAK;GAAQ,CAAA;GACzF,kBAAC,MAAD;IAAI,WAAU;IACZ,UAAA,kBAAC,UAAD;KACE,MAAK;KACL,WAAU;KACV,eAAeC,EAAOD,EAAK,EAAE;KAH/B,UAAA,CAKE,kBAAC,QAAD;MAAM,WAAU;MACb,UAAAE,EAAUC,GAAG,YAAYH,EAAK,IAAI;KAC/B,CAAA,GACN,kBAAC,QAAD;MAAM,WAAU;MACb,UAAA,CAACA,EAAK,SAASA,EAAK,aAAa,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,KAAK;KAC1D,CAAA,CACA;;GACN,CAAA;GACJ,kBAAC,MAAD;IAAI,WAAU;IACZ,UAAA,kBAACI,GAAD;KAAO,MAAMC,EAAaL,EAAK;KAAW,UAAAE,EAAUC,GAAG,WAAWH,EAAK,OAAO;IAAS,CAAA;GACrF,CAAA;GACJ,kBAAC,MAAD;IAAI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S,IAAI;CAClE,CAAC,IACDI,EAAE,2BAA2B;CAEjC,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAACc,GAAD;GACE,OAAOd,EAAE,2BAA2B;GACpC,MAAMA,EAAE,2BAA2B;GACnC,WAAU;GAEV,UAAA,kBAACG,GAAD;IAAmB;IAAO,YAAYP,GAAU;IAAI,QAAQc;GAAY,CAAA;EACpE,CAAA,GACN,kBAACI,GAAD;GAAM,OAAOD;GAAa,WAAU;GACjC,UAAAjB,IACC,kBAACmB,GAAD;IAAY,MAAMnB;IAAoB;GAAW,CAAA,IAEjD,kBAAC,KAAD;IAAG,WAAU;IACV,UAAAI,EAAE,uBAAuB;GACzB,CAAA;EAED,CAAA,CACH;;AAET;AAEA,IAAMgB,IAAmE;CACvE,SAAS;CACT,UAAU;AACZ;AAGA,SAAgBC,EAAiB,EAC/B,gBAGC;CACD,IAAMjB,IAAII,EAAa;CAEvB,OADIc,EAAU,WAAW,IAAU,OAEjC,kBAACJ,GAAD;EAAM,OAAOd,EAAE,6BAA6B;EAC1C,UAAA,kBAAC,MAAD;GAAI,WAAU;GACX,UAAAkB,EAAU,KAAK,MACd,kBAAC,MAAD;IAEE,WAAU;IAFZ,UAAA;KAIE,kBAAC,QAAD;MAAM,WAAU;MAAW,UAAAC,EAAE;KAAe,CAAA;KAC5C,kBAAClB,GAAD;MAAO,MAAMe,EAAcG,EAAE,WAAW;MACrC,UAAApB,EAAUC,GAAG,kBAAkBmB,EAAE,MAAM;KACnC,CAAA;KACNA,EAAE,kBACD,kBAAC,QAAD;MAAM,WAAU;MACb,UAAApB,EAAUC,GAAG,SAASmB,EAAE,cAAc;KACnC,CAAA;IAEN;GAZG,GAAAA,EAAE,EAYL,CACL;EACC,CAAA;CACA,CAAA;AAEV"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StewardDetailFieldsFragment, StewardRunDetailFieldsFragment } from '../../../generated/wspace-operations';
|
|
2
|
+
interface RunSummaryCardsProps {
|
|
3
|
+
run: StewardRunDetailFieldsFragment;
|
|
4
|
+
steward: StewardDetailFieldsFragment | undefined;
|
|
5
|
+
}
|
|
6
|
+
/** Trust, credit budget, step budget and verdict counts of one run. */
|
|
7
|
+
export declare function RunSummaryCards({ run, steward }: RunSummaryCardsProps): import('react').JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { BotmanorExecutionStepVerdict as e } from "../../../generated/wspace-types.js";
|
|
2
|
+
import { useStewardsT as t } from "../../i18n/useStewardsT.js";
|
|
3
|
+
import { budgetRatio as n, enumLabel as r } from "../stewardLabels.js";
|
|
4
|
+
import { Badge as i, Card as a, ProgressBar as o } from "../ui.js";
|
|
5
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
// src/stewards/components/run/RunSummaryCards.tsx
|
|
7
|
+
function u(t) {
|
|
8
|
+
return {
|
|
9
|
+
allowed: t.filter((t) => t.verdict === e.Allowed || t.verdict === e.Approved).length,
|
|
10
|
+
asked: t.filter((t) => t.verdict === e.Asked).length,
|
|
11
|
+
denied: t.filter((t) => t.verdict === e.Denied).length
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
function d(e) {
|
|
15
|
+
return e.find((e) => e.trustLevelAfter !== e.trustLevelBefore);
|
|
16
|
+
}
|
|
17
|
+
function f({ used: e, cap: t }) {
|
|
18
|
+
return /* @__PURE__ */ l("p", {
|
|
19
|
+
className: "text-2xl font-semibold text-(color:--color-text-primary) tabular-nums",
|
|
20
|
+
children: [e, /* @__PURE__ */ l("span", {
|
|
21
|
+
className: "text-sm font-normal text-(color:--color-text-secondary)",
|
|
22
|
+
children: [
|
|
23
|
+
" ",
|
|
24
|
+
"/ ",
|
|
25
|
+
t ?? "—"
|
|
26
|
+
]
|
|
27
|
+
})]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function p({ run: e, steward: p }) {
|
|
31
|
+
let m = t(), h = u(e.steps), g = d(e.steps), _ = p?.charter.budgetPerRun.credits ?? null, v = p?.charter.budgetPerRun.steps ?? null, y = e.budgetUsed.credits ?? 0;
|
|
32
|
+
return /* @__PURE__ */ l("div", {
|
|
33
|
+
className: "grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ l(a, {
|
|
36
|
+
title: m("stewards.run.trustTitle"),
|
|
37
|
+
children: [/* @__PURE__ */ l("p", {
|
|
38
|
+
className: "flex flex-wrap items-center gap-2 text-sm",
|
|
39
|
+
children: [/* @__PURE__ */ c(i, {
|
|
40
|
+
tone: "success",
|
|
41
|
+
children: r(m, "trust", e.initialTrustLevel)
|
|
42
|
+
}), e.trustLevel !== e.initialTrustLevel && /* @__PURE__ */ l(s, { children: ["→", /* @__PURE__ */ c(i, {
|
|
43
|
+
tone: "warning",
|
|
44
|
+
children: r(m, "trust", e.trustLevel)
|
|
45
|
+
})] })]
|
|
46
|
+
}), /* @__PURE__ */ c("p", {
|
|
47
|
+
className: "mt-1 text-xs text-(color:--color-text-secondary)",
|
|
48
|
+
children: g ? `${m("stewards.run.trustDegraded")} · #${g.seq}` : m("stewards.run.trustSame")
|
|
49
|
+
})]
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ l(a, {
|
|
52
|
+
title: m("stewards.run.budgetTitle"),
|
|
53
|
+
children: [/* @__PURE__ */ c(f, {
|
|
54
|
+
used: y.toFixed(2),
|
|
55
|
+
cap: _
|
|
56
|
+
}), /* @__PURE__ */ c(o, {
|
|
57
|
+
ratio: n(y, _),
|
|
58
|
+
label: m("stewards.run.budgetTitle")
|
|
59
|
+
})]
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ l(a, {
|
|
62
|
+
title: m("stewards.run.stepsTitle"),
|
|
63
|
+
children: [/* @__PURE__ */ c(f, {
|
|
64
|
+
used: e.stepCount,
|
|
65
|
+
cap: v
|
|
66
|
+
}), /* @__PURE__ */ c(o, {
|
|
67
|
+
ratio: n(e.stepCount, v),
|
|
68
|
+
label: m("stewards.run.stepsTitle")
|
|
69
|
+
})]
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ l(a, {
|
|
72
|
+
title: m("stewards.run.verdictsTitle"),
|
|
73
|
+
children: [/* @__PURE__ */ l("p", {
|
|
74
|
+
className: "text-2xl font-semibold text-(color:--color-text-primary) tabular-nums",
|
|
75
|
+
children: [
|
|
76
|
+
h.allowed,
|
|
77
|
+
" · ",
|
|
78
|
+
h.asked,
|
|
79
|
+
" · ",
|
|
80
|
+
h.denied
|
|
81
|
+
]
|
|
82
|
+
}), /* @__PURE__ */ c("p", {
|
|
83
|
+
className: "text-xs text-(color:--color-text-secondary)",
|
|
84
|
+
children: m("stewards.run.verdictsLegend")
|
|
85
|
+
})]
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export { p as RunSummaryCards };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=RunSummaryCards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RunSummaryCards.js","names":["_Fragment","countVerdicts","steps","s","BotmanorExecutionStepVerdict","trustDrop","UsageFigure","used","cap","RunSummaryCards","t","useStewardsT","verdicts","run","drop","runCap","steward","stepCap","credits","Card","Badge","enumLabel","Fragment","ProgressBar","budgetRatio"],"sources":["../../../../src/stewards/components/run/RunSummaryCards.tsx"],"sourcesContent":["import type {\n StewardDetailFieldsFragment,\n StewardRunDetailFieldsFragment,\n} from '../../../generated/wspace-operations';\nimport { BotmanorExecutionStepVerdict } from '../../../generated/wspace-types';\nimport { useStewardsT } from '../../i18n/useStewardsT';\nimport { budgetRatio, enumLabel } from '../stewardLabels';\nimport { Badge, Card, ProgressBar } from '../ui';\nimport type { RunStep } from './StepDetail';\n\nfunction countVerdicts(steps: readonly RunStep[]) {\n const allowed = steps.filter(\n (s) =>\n s.verdict === BotmanorExecutionStepVerdict.Allowed ||\n s.verdict === BotmanorExecutionStepVerdict.Approved\n ).length;\n const asked = steps.filter((s) => s.verdict === BotmanorExecutionStepVerdict.Asked).length;\n const denied = steps.filter((s) => s.verdict === BotmanorExecutionStepVerdict.Denied).length;\n return { allowed, asked, denied };\n}\n\n/** The first step where the run's trust level dropped, if it did. */\nfunction trustDrop(steps: readonly RunStep[]): RunStep | undefined {\n return steps.find((s) => s.trustLevelAfter !== s.trustLevelBefore);\n}\n\nfunction UsageFigure({ used, cap }: { used: string | number; cap: number | null }) {\n return (\n <p className=\"text-2xl font-semibold text-(color:--color-text-primary) tabular-nums\">\n {used}\n <span className=\"text-sm font-normal text-(color:--color-text-secondary)\">\n {' '}\n / {cap ?? '—'}\n </span>\n </p>\n );\n}\n\ninterface RunSummaryCardsProps {\n run: StewardRunDetailFieldsFragment;\n steward: StewardDetailFieldsFragment | undefined;\n}\n\n/** Trust, credit budget, step budget and verdict counts of one run. */\nexport function RunSummaryCards({ run, steward }: RunSummaryCardsProps) {\n const t = useStewardsT();\n const verdicts = countVerdicts(run.steps);\n const drop = trustDrop(run.steps);\n const runCap = steward?.charter.budgetPerRun.credits ?? null;\n const stepCap = steward?.charter.budgetPerRun.steps ?? null;\n const credits = run.budgetUsed.credits ?? 0;\n\n return (\n <div className=\"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4\">\n <Card title={t('stewards.run.trustTitle')}>\n <p className=\"flex flex-wrap items-center gap-2 text-sm\">\n <Badge tone=\"success\">{enumLabel(t, 'trust', run.initialTrustLevel)}</Badge>\n {run.trustLevel !== run.initialTrustLevel && (\n <>\n →<Badge tone=\"warning\">{enumLabel(t, 'trust', run.trustLevel)}</Badge>\n </>\n )}\n </p>\n <p className=\"mt-1 text-xs text-(color:--color-text-secondary)\">\n {drop ? `${t('stewards.run.trustDegraded')} · #${drop.seq}` : t('stewards.run.trustSame')}\n </p>\n </Card>\n <Card title={t('stewards.run.budgetTitle')}>\n <UsageFigure used={credits.toFixed(2)} cap={runCap} />\n <ProgressBar ratio={budgetRatio(credits, runCap)} label={t('stewards.run.budgetTitle')} />\n </Card>\n <Card title={t('stewards.run.stepsTitle')}>\n <UsageFigure used={run.stepCount} cap={stepCap} />\n <ProgressBar\n ratio={budgetRatio(run.stepCount, stepCap)}\n label={t('stewards.run.stepsTitle')}\n />\n </Card>\n <Card title={t('stewards.run.verdictsTitle')}>\n <p className=\"text-2xl font-semibold text-(color:--color-text-primary) tabular-nums\">\n {verdicts.allowed} · {verdicts.asked} · {verdicts.denied}\n </p>\n <p className=\"text-xs text-(color:--color-text-secondary)\">\n {t('stewards.run.verdictsLegend')}\n </p>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;AAUA,SAASC,EAAc,GAA2B;CAQhD,OAAO;EAAE,SAPOC,EAAM,QACnB,MACCC,EAAE,YAAYC,EAA6B,WAC3CD,EAAE,YAAYC,EAA6B,QAC/C,CAAC,CAAC;EAGgB,OAFJF,EAAM,QAAQ,MAAMC,EAAE,YAAYC,EAA6B,KAAK,CAAC,CAAC;EAE3D,QADVF,EAAM,QAAQ,MAAMC,EAAE,YAAYC,EAA6B,MAAM,CAAC,CAAC;CACtD;AAClC;AAGA,SAASC,EAAU,GAAgD;CACjE,OAAOH,EAAM,MAAM,MAAMC,EAAE,oBAAoBA,EAAE,gBAAgB;AACnE;AAEA,SAASG,EAAY,EAAE,SAAM,UAAsD;CACjF,OACE,kBAAC,KAAD;EAAG,WAAU;EAAb,UAAA,CACGC,GACD,kBAAC,QAAD;GAAM,WAAU;GAAhB,UAAA;IACG;IAAI;IACFC,KAAO;GACN;EACL,CAAA,CAAA;;AAEP;AAQA,SAAgBC,EAAgB,EAAE,QAAK,cAAiC;CACtE,IAAMC,IAAIC,EAAa,GACjBC,IAAWX,EAAcY,EAAI,KAAK,GAClCC,IAAOT,EAAUQ,EAAI,KAAK,GAC1BE,IAASC,GAAS,QAAQ,aAAa,WAAW,MAClDC,IAAUD,GAAS,QAAQ,aAAa,SAAS,MACjDE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C,KAAD;KAAG,WAAU;KACV,UAAAF,EAAE,6BAA6B;IAC/B,CAAA,CACC;;EACH;;AAET"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StewardRunDetailFieldsFragment } from '../../../generated/wspace-operations';
|
|
2
|
+
export type RunStep = StewardRunDetailFieldsFragment['steps'][number];
|
|
3
|
+
export declare function StepDetail({ step, timeZone }: {
|
|
4
|
+
step: RunStep;
|
|
5
|
+
timeZone: string;
|
|
6
|
+
}): import('react').JSX.Element;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { useGetStewardStepScreenshotUrlQuery as e } from "../../../generated/wspace-operations.js";
|
|
2
|
+
import { VERDICT_TONE as t, enumLabel as n } from "../stewardLabels.js";
|
|
3
|
+
import { Alert as r, Badge as i } from "../ui.js";
|
|
4
|
+
import { useStewardsT as a } from "../../i18n/useStewardsT.js";
|
|
5
|
+
import { clockTime as o } from "../../utils/dates.js";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import { useState as l } from "react";
|
|
8
|
+
// src/stewards/components/run/StepDetail.tsx
|
|
9
|
+
var u = 900;
|
|
10
|
+
function d({ fileId: t }) {
|
|
11
|
+
let n = a(), [i, o] = l(!1), { data: d, loading: f, error: p } = e({
|
|
12
|
+
variables: {
|
|
13
|
+
id: t,
|
|
14
|
+
expiresIn: u
|
|
15
|
+
},
|
|
16
|
+
fetchPolicy: "network-only"
|
|
17
|
+
}), m = d?.getFileDownloadUrl;
|
|
18
|
+
return f ? /* @__PURE__ */ s("p", {
|
|
19
|
+
className: "text-xs text-(color:--color-text-secondary)",
|
|
20
|
+
children: n("stewards.common.loading")
|
|
21
|
+
}) : p || !m || i ? /* @__PURE__ */ c(r, { children: [
|
|
22
|
+
n("stewards.run.screenshotError"),
|
|
23
|
+
" ",
|
|
24
|
+
n("stewards.run.screenshotRef", { id: t })
|
|
25
|
+
] }) : /* @__PURE__ */ s("img", {
|
|
26
|
+
src: m,
|
|
27
|
+
alt: n("stewards.run.screenshotAlt"),
|
|
28
|
+
loading: "lazy",
|
|
29
|
+
className: "max-h-96 w-full rounded-md border border-(color:--color-border-seam) object-contain",
|
|
30
|
+
onError: () => o(!0)
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function f({ step: e, timeZone: r }) {
|
|
34
|
+
let l = a(), u = e.argumentsRedacted, f = typeof u == "object" && !!u && Object.keys(u).length > 0;
|
|
35
|
+
return /* @__PURE__ */ c("div", {
|
|
36
|
+
className: "grid grid-cols-1 gap-4 xl:grid-cols-2",
|
|
37
|
+
children: [/* @__PURE__ */ c("div", {
|
|
38
|
+
className: "flex flex-col gap-3",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h3", {
|
|
41
|
+
className: "mb-1 text-xs font-medium text-(color:--color-text-secondary)",
|
|
42
|
+
children: l("stewards.run.arguments")
|
|
43
|
+
}), /* @__PURE__ */ s("pre", {
|
|
44
|
+
className: "max-h-64 overflow-auto rounded-md bg-(--color-bg-sunken) p-3 text-xs text-(color:--color-text-primary)",
|
|
45
|
+
children: f ? JSON.stringify(u, null, 2) : l("stewards.run.noArguments")
|
|
46
|
+
})] }),
|
|
47
|
+
e.resultSummary && /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h3", {
|
|
48
|
+
className: "mb-1 text-xs font-medium text-(color:--color-text-secondary)",
|
|
49
|
+
children: l("stewards.run.result")
|
|
50
|
+
}), /* @__PURE__ */ s("p", {
|
|
51
|
+
className: "whitespace-pre-wrap rounded-md bg-(--color-bg-sunken) p-3 text-sm text-(color:--color-text-primary)",
|
|
52
|
+
children: e.resultSummary
|
|
53
|
+
})] }),
|
|
54
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h3", {
|
|
55
|
+
className: "mb-1 text-xs font-medium text-(color:--color-text-secondary)",
|
|
56
|
+
children: l("stewards.run.screenshot")
|
|
57
|
+
}), e.screenshotFileId ? /* @__PURE__ */ s(d, { fileId: e.screenshotFileId }, e.screenshotFileId) : /* @__PURE__ */ s("div", {
|
|
58
|
+
className: "rounded-md border border-dashed border-(color:--color-border-seam) p-4 text-center text-xs text-(color:--color-text-secondary)",
|
|
59
|
+
children: l("stewards.run.screenshotNone")
|
|
60
|
+
})] })
|
|
61
|
+
]
|
|
62
|
+
}), /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h3", {
|
|
63
|
+
className: "mb-1 text-xs font-medium text-(color:--color-text-secondary)",
|
|
64
|
+
children: l("stewards.run.trail")
|
|
65
|
+
}), /* @__PURE__ */ c("ol", {
|
|
66
|
+
className: "flex flex-col gap-2 text-sm text-(color:--color-text-primary)",
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ c("li", { children: [
|
|
69
|
+
l("stewards.run.trailVerdict"),
|
|
70
|
+
":",
|
|
71
|
+
" ",
|
|
72
|
+
/* @__PURE__ */ s(i, {
|
|
73
|
+
tone: t[e.verdict],
|
|
74
|
+
children: n(l, "verdict", e.verdict)
|
|
75
|
+
})
|
|
76
|
+
] }),
|
|
77
|
+
e.classification && /* @__PURE__ */ c("li", { children: [
|
|
78
|
+
l("stewards.run.trailClassification"),
|
|
79
|
+
": ",
|
|
80
|
+
e.classification
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ c("li", { children: [
|
|
83
|
+
l("stewards.run.trailTrust"),
|
|
84
|
+
": ",
|
|
85
|
+
n(l, "trust", e.trustLevelBefore),
|
|
86
|
+
" →",
|
|
87
|
+
" ",
|
|
88
|
+
n(l, "trust", e.trustLevelAfter)
|
|
89
|
+
] }),
|
|
90
|
+
e.verdictReasons.length > 0 && /* @__PURE__ */ c("li", { children: [
|
|
91
|
+
l("stewards.run.trailReasons"),
|
|
92
|
+
":",
|
|
93
|
+
/* @__PURE__ */ s("ul", {
|
|
94
|
+
className: "ml-4 list-disc text-(color:--color-text-secondary)",
|
|
95
|
+
children: e.verdictReasons.map((e) => /* @__PURE__ */ s("li", { children: e }, e))
|
|
96
|
+
})
|
|
97
|
+
] }),
|
|
98
|
+
e.approvalRequestId && /* @__PURE__ */ s("li", { children: l("stewards.run.trailApproval", { id: e.approvalRequestId }) }),
|
|
99
|
+
e.approvalRuleId && /* @__PURE__ */ s("li", { children: l("stewards.run.trailRule", { id: e.approvalRuleId }) }),
|
|
100
|
+
e.dryRun && /* @__PURE__ */ s("li", {
|
|
101
|
+
className: "text-(color:--color-text-secondary)",
|
|
102
|
+
children: l("stewards.run.trailDryRun")
|
|
103
|
+
}),
|
|
104
|
+
/* @__PURE__ */ c("li", {
|
|
105
|
+
className: "text-(color:--color-text-secondary)",
|
|
106
|
+
children: [
|
|
107
|
+
l("stewards.run.cost"),
|
|
108
|
+
": ",
|
|
109
|
+
e.creditsUsed.toFixed(2),
|
|
110
|
+
" ·",
|
|
111
|
+
" ",
|
|
112
|
+
l("stewards.run.deskSeconds"),
|
|
113
|
+
": ",
|
|
114
|
+
e.deskSeconds,
|
|
115
|
+
"s ·",
|
|
116
|
+
" ",
|
|
117
|
+
o(e.startedAt, r)
|
|
118
|
+
]
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
})] })]
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
export { f as StepDetail };
|
|
125
|
+
|
|
126
|
+
//# sourceMappingURL=StepDetail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StepDetail.js","names":["SCREENSHOT_TTL_SECONDS","StepScreenshot","t","useStewardsT","broken","setBroken","useState","useGetStewardStepScreenshotUrlQuery","fileId","url","data","loading","error","Alert","StepDetail","args","step","hasArgs","Badge","VERDICT_TONE","enumLabel","r","clockTime","timeZone"],"sources":["../../../../src/stewards/components/run/StepDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n useGetStewardStepScreenshotUrlQuery,\n type StewardRunDetailFieldsFragment,\n} from '../../../generated/wspace-operations';\nimport { enumLabel, VERDICT_TONE } from '../stewardLabels';\nimport { Alert, Badge } from '../ui';\nimport { useStewardsT } from '../../i18n/useStewardsT';\nimport { clockTime } from '../../utils/dates';\n\nexport type RunStep = StewardRunDetailFieldsFragment['steps'][number];\n\nconst SCREENSHOT_TTL_SECONDS = 900;\n\n/** Fetches a short-lived download URL for the step's desk screenshot and shows it. */\nfunction StepScreenshot({ fileId }: { fileId: string }) {\n const t = useStewardsT();\n const [broken, setBroken] = useState(false);\n const { data, loading, error } = useGetStewardStepScreenshotUrlQuery({\n variables: { id: fileId, expiresIn: SCREENSHOT_TTL_SECONDS },\n fetchPolicy: 'network-only',\n });\n const url = data?.getFileDownloadUrl;\n if (loading) {\n return (\n <p className=\"text-xs text-(color:--color-text-secondary)\">{t('stewards.common.loading')}</p>\n );\n }\n if (error || !url || broken) {\n return (\n <Alert>\n {t('stewards.run.screenshotError')} {t('stewards.run.screenshotRef', { id: fileId })}\n </Alert>\n );\n }\n return (\n <img\n src={url}\n alt={t('stewards.run.screenshotAlt')}\n loading=\"lazy\"\n className=\"max-h-96 w-full rounded-md border border-(color:--color-border-seam) object-contain\"\n onError={() => setBroken(true)}\n />\n );\n}\n\nexport function StepDetail({ step, timeZone }: { step: RunStep; timeZone: string }) {\n const t = useStewardsT();\n const args = step.argumentsRedacted;\n const hasArgs = args !== null && typeof args === 'object' && Object.keys(args).length > 0;\n return (\n <div className=\"grid grid-cols-1 gap-4 xl:grid-cols-2\">\n <div className=\"flex flex-col gap-3\">\n <div>\n <h3 className=\"mb-1 text-xs font-medium text-(color:--color-text-secondary)\">\n {t('stewards.run.arguments')}\n </h3>\n <pre className=\"max-h-64 overflow-auto rounded-md bg-(--color-bg-sunken) p-3 text-xs text-(color:--color-text-primary)\">\n {hasArgs ? JSON.stringify(args, null, 2) : t('stewards.run.noArguments')}\n </pre>\n </div>\n {step.resultSummary && (\n <div>\n <h3 className=\"mb-1 text-xs font-medium text-(color:--color-text-secondary)\">\n {t('stewards.run.result')}\n </h3>\n <p className=\"whitespace-pre-wrap rounded-md bg-(--color-bg-sunken) p-3 text-sm text-(color:--color-text-primary)\">\n {step.resultSummary}\n </p>\n </div>\n )}\n <div>\n <h3 className=\"mb-1 text-xs font-medium text-(color:--color-text-secondary)\">\n {t('stewards.run.screenshot')}\n </h3>\n {step.screenshotFileId ? (\n <StepScreenshot key={step.screenshotFileId} fileId={step.screenshotFileId} />\n ) : (\n <div className=\"rounded-md border border-dashed border-(color:--color-border-seam) p-4 text-center text-xs text-(color:--color-text-secondary)\">\n {t('stewards.run.screenshotNone')}\n </div>\n )}\n </div>\n </div>\n <div>\n <h3 className=\"mb-1 text-xs font-medium text-(color:--color-text-secondary)\">\n {t('stewards.run.trail')}\n </h3>\n <ol className=\"flex flex-col gap-2 text-sm text-(color:--color-text-primary)\">\n <li>\n {t('stewards.run.trailVerdict')}:{' '}\n <Badge tone={VERDICT_TONE[step.verdict]}>{enumLabel(t, 'verdict', step.verdict)}</Badge>\n </li>\n {step.classification && (\n <li>\n {t('stewards.run.trailClassification')}: {step.classification}\n </li>\n )}\n <li>\n {t('stewards.run.trailTrust')}: {enumLabel(t, 'trust', step.trustLevelBefore)} →{' '}\n {enumLabel(t, 'trust', step.trustLevelAfter)}\n </li>\n {step.verdictReasons.length > 0 && (\n <li>\n {t('stewards.run.trailReasons')}:\n <ul className=\"ml-4 list-disc text-(color:--color-text-secondary)\">\n {step.verdictReasons.map((r) => (\n <li key={r}>{r}</li>\n ))}\n </ul>\n </li>\n )}\n {step.approvalRequestId && (\n <li>{t('stewards.run.trailApproval', { id: step.approvalRequestId })}</li>\n )}\n {step.approvalRuleId && (\n <li>{t('stewards.run.trailRule', { id: step.approvalRuleId })}</li>\n )}\n {step.dryRun && (\n <li className=\"text-(color:--color-text-secondary)\">{t('stewards.run.trailDryRun')}</li>\n )}\n <li className=\"text-(color:--color-text-secondary)\">\n {t('stewards.run.cost')}: {step.creditsUsed.toFixed(2)} ·{' '}\n {t('stewards.run.deskSeconds')}: {step.deskSeconds}s ·{' '}\n {clockTime(step.startedAt,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,EAAA,CAAA;IAELL,EAAK,qBACJ,kBAAC,MAAD,EAAA,UAAKd,EAAE,8BAA8B,EAAE,IAAIc,EAAK,kBAAkB,CAAC,EAAM,CAAA;IAE1EA,EAAK,kBACJ,kBAAC,MAAD,EAAA,UAAKd,EAAE,0BAA0B,EAAE,IAAIc,EAAK,eAAe,CAAC,EAAM,CAAA;IAEnEA,EAAK,UACJ,kBAAC,MAAD;KAAI,WAAU;KAAuC,UAAAd,EAAE,0BAA0B;IAAM,CAAA;IAEzF,kBAAC,MAAD;KAAI,WAAU;KAAd,UAAA;MACGA,EAAE,mBAAmB;MAAE;MAAGc,EAAK,YAAY,QAAQ,CAAC;MAAE;MAAG;MACzDd,EAAE,0BAA0B;MAAE;MAAGc,EAAK;MAAY;MAAI;MACtDM,EAAUN,EAAK,WAAWO,CAAQ;KACjC;;GACF;EACD,CAAA,CAAA,EAAA,CAAA,CACF;;AAET"}
|
|
@@ -232,6 +232,7 @@ export declare const enTranslations: {
|
|
|
232
232
|
readonly reviewDesk: "Desk";
|
|
233
233
|
readonly reviewTools: "Tools";
|
|
234
234
|
readonly reviewBudget: "Daily AI credits";
|
|
235
|
+
readonly reviewNewAgentDraft: "The new agent is created as a draft. Give it a model and publish it from Agents before you activate the steward.";
|
|
235
236
|
readonly createError: "Could not create the steward.";
|
|
236
237
|
readonly newAgentError: "Could not create the agent.";
|
|
237
238
|
};
|
package/dist/stewards/i18n/en.js
CHANGED
|
@@ -232,6 +232,7 @@ var t = { stewards: {
|
|
|
232
232
|
reviewDesk: "Desk",
|
|
233
233
|
reviewTools: "Tools",
|
|
234
234
|
reviewBudget: "Daily AI credits",
|
|
235
|
+
reviewNewAgentDraft: "The new agent is created as a draft. Give it a model and publish it from Agents before you activate the steward.",
|
|
235
236
|
createError: "Could not create the steward.",
|
|
236
237
|
newAgentError: "Could not create the agent."
|
|
237
238
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","names":["enTranslations","enEditors"],"sources":["../../../src/stewards/i18n/en.ts"],"sourcesContent":["/**\n * English strings for microfe-stewards. Keys are dot-notation; the host's\n * I18nProvider resolves them against the translations it loads, and `useStewardsT`\n * falls back to this object when the host has no entry (or no provider).\n * Register it with the shell's `fallbackTranslations`.\n */\nimport { enEditors } from './enEditors';\n\nexport const enTranslations = {\n stewards: {\n ...enEditors,\n nav: { label: 'Stewards' },\n common: {\n back: 'Back',\n cancel: 'Cancel',\n loading: 'Loading…',\n retry: 'Try again',\n none: 'None',\n noCap: 'No cap',\n never: 'Never',\n credits: 'credits',\n unknown: 'Unknown',\n forbiddenTitle: 'You do not have access',\n forbiddenBody: 'Your role does not allow you to view Stewards in this workspace.',\n disabledTitle: 'Stewards are not enabled',\n disabledBody: 'Stewards are not turned on for this workspace yet.',\n errorTitle: 'Something went wrong',\n notFoundTitle: 'Not found',\n notFoundBody: 'This steward or run does not exist, or you cannot see it.',\n },\n enums: {\n status: { DRAFT: 'Draft', ACTIVE: 'Active', PAUSED: 'Paused', ARCHIVED: 'Archived' },\n autonomy: { OBSERVE: 'Observe', ASK: 'Ask', GUIDED: 'Guided', TRUSTED: 'Trusted' },\n autonomyHelp: {\n OBSERVE:\n 'Read only, by construction. Can look, summarise and report; no outward actions exist.',\n ASK: 'Every outward action asks a person first.',\n GUIDED:\n 'A reviewer model decides each outward action against the charter; when unsure it asks you.',\n TRUSTED:\n 'Your standing rules apply first, then the reviewer model. Still bounded by budgets.',\n },\n desk: {\n NONE: 'No desk',\n BROWSER: 'Browser only',\n CLOUD: 'Cloud desk',\n OWN_MACHINE: 'Own machine',\n },\n deskHelp: {\n NONE: 'Works through connectors and tools only.',\n BROWSER: 'A managed browser. The agent needs the Web browsing capability.',\n CLOUD: 'A cloud desktop. The agent needs the Computer use capability.',\n OWN_MACHINE: 'A machine you connect. The agent needs the Computer use capability.',\n },\n egress: {\n PUBLIC: 'Any public site',\n ALLOW_LIST: 'Only the sites I list',\n BLOCKED: 'No web access',\n },\n runStatus: {\n PROPOSED: 'Proposed',\n QUEUED: 'Queued',\n RUNNING: 'Running',\n WAITING_APPROVAL: 'Waiting for approval',\n WAITING_TAKEOVER: 'Waiting for a person',\n PAUSED_BUDGET: 'Paused — budget',\n COMPLETED: 'Completed',\n FAILED: 'Failed',\n CANCELLED: 'Cancelled',\n STOPPED: 'Stopped',\n },\n trigger: {\n OWNER_CHAT: 'Owner chat',\n SCHEDULE: 'Schedule',\n WEBHOOK: 'Webhook',\n APP_EVENT: 'App event',\n PLATFORM_EVENT: 'Platform event',\n CHANNEL_MESSAGE: 'Channel message',\n WATCH: 'Watch',\n PROACTIVE: 'Proactive',\n API: 'API',\n WORKFLOW: 'Workflow',\n A2A: 'Agent to agent',\n },\n trust: {\n OWNER: 'Owner',\n MEMBER: 'Member',\n SYSTEM: 'System',\n EXTERNAL: 'External content',\n UNTRUSTED: 'Untrusted content',\n },\n stepKind: {\n MODEL_CALL: 'Model call',\n TOOL_CALL: 'Connector tool',\n DESK_ACTION: 'Desk action',\n APPROVAL_WAIT: 'Approval wait',\n TAKEOVER: 'Takeover',\n SUB_RUN: 'Sub-run',\n MEMORY_WRITE: 'Memory write',\n NOTE: 'Note',\n },\n verdict: {\n ALLOWED: 'Allowed',\n ASKED: 'Asked',\n APPROVED: 'Approved',\n DENIED: 'Denied',\n BLOCKED_DRY_RUN: 'Dry run',\n FAILED: 'Failed',\n SKIPPED: 'Skipped',\n },\n approvalStatus: {\n PENDING: 'Pending',\n APPROVED: 'Approved',\n DENIED: 'Denied',\n EXPIRED: 'Expired',\n CANCELLED: 'Cancelled',\n },\n scope: {\n ONCE: 'Once',\n RUN: 'This run',\n DUTY: 'This duty',\n TIME_LIMITED: 'Time-limited',\n STANDING: 'Standing',\n },\n },\n tools: {\n 'desk:screenshot': 'Screenshot',\n 'desk:snapshot': 'Read the screen structure',\n 'desk:click': 'Click',\n 'desk:type': 'Type',\n 'desk:key': 'Press keys',\n 'desk:scroll': 'Scroll',\n 'desk:navigate': 'Open a URL',\n 'desk:focus_window': 'Switch window',\n 'desk:secret_fill': 'Fill a stored secret',\n 'desk:shell': 'Run shell commands',\n 'desk:read_file': 'Read files',\n 'desk:write_file': 'Write files',\n 'platform:current_time': 'Check the time',\n 'platform:notify_owner': 'Notify the owner',\n },\n budget: {\n credits: 'AI credits',\n deskMinutes: 'Desk minutes',\n steps: 'Steps',\n wallSeconds: 'Wall-clock seconds',\n connectorSpendMinor: 'Connector spend (minor units)',\n perRun: 'Per run',\n perDay: 'Per day',\n total: 'Total',\n limit: 'Limit',\n invalid: 'Enter a number of 0 or more for {name} (whole numbers, except credits).',\n hint: 'Run stops when any limit is hit. Leave a box empty for no cap at that level.',\n },\n fixed: {\n title: 'Always asks a person — can’t be loosened',\n badge: 'Fixed',\n password: 'Password and security-setting changes',\n payment: 'Entering payment details',\n otp: 'Reading one-time codes',\n external: 'Messages to people outside the workspace',\n },\n list: {\n title: 'Stewards',\n subtitle:\n 'Agents with a charter, duties and a desk — they work on a schedule or on events, inside the limits you set.',\n newSteward: 'New steward',\n statusFilter: 'Status',\n allStatuses: 'All',\n tableLabel: 'Stewards',\n colSteward: 'Steward',\n colStatus: 'Status',\n colAutonomy: 'Autonomy',\n colDesk: 'Desk',\n colLastRun: 'Last run',\n colToday: 'Today · spend / daily cap',\n colWaiting: 'Waiting',\n neverRun: 'Never run',\n tileActive: 'Active stewards',\n tileWaiting: 'Waiting for approval',\n tileWaitingHint: 'Approval requests across stewards',\n tileSpend: 'Credits used today',\n empty: 'No stewards yet.',\n emptyFiltered: 'No stewards match this status.',\n emptyHint: 'Make one of your agents a steward to give it a charter and a desk.',\n loadError: 'Could not load stewards.',\n },\n wizard: {\n title: 'New steward',\n stepOf: 'Step {step} of {total}',\n steps: { agent: 'Agent', charter: 'Charter', desk: 'Desk', review: 'Review' },\n next: 'Continue',\n create: 'Create steward',\n creating: 'Creating…',\n agentTitle: 'Base agent',\n agentHelp: 'A steward is an existing agent plus a charter, duties and a desk.',\n pickExisting: 'Use an existing agent',\n createNew: 'Create a new agent',\n noAgents: 'No active agents available. Create one here.',\n agentSearch: 'Search agents',\n agentName: 'Agent name',\n agentPrompt: 'What is this agent for?',\n agentPromptHelp: 'Becomes the agent’s system prompt. You can refine it later.',\n capabilities: 'Capabilities',\n capabilityHelp: 'Capabilities decide which desks the agent can use.',\n capWeb: 'Web browsing',\n capComputer: 'Computer use',\n charterTitle: 'Charter',\n charterHelp:\n 'Plain-language rules, one per line. The reviewer model checks them on every outward action.',\n charterLabel: 'Charter rules',\n charterPlaceholder:\n 'Only summarise ledgers from the Finance folder; never edit source sheets.\\nSend the weekly summary only to finance@example.com.',\n charterRequired: 'Write at least one rule.',\n autonomyTitle: 'Autonomy level',\n autonomyHint: 'Can be lowered at any time; raising it is logged.',\n autonomyLockedByAdmin: 'A workspace admin limits stewards to {level}.',\n toolsTitle: 'Allowed tools & connectors',\n toolsCount: '{count} selected',\n deskTitle: 'Desk',\n deskHelp: 'Where the steward may work on a screen.',\n deskNeeds:\n 'This agent does not have the {capability} capability, so this desk may be refused.',\n egressTitle: 'Web access from the desk',\n allowedHosts: 'Allowed sites',\n allowedHostsHelp: 'One per line: example.com, or *.example.com for its subdomains.',\n reviewTitle: 'Review',\n reviewBody: 'The steward starts as a draft. Activate it from its page when you are ready.',\n reviewAgent: 'Agent',\n reviewAutonomy: 'Autonomy',\n reviewDesk: 'Desk',\n reviewTools: 'Tools',\n reviewBudget: 'Daily AI credits',\n createError: 'Could not create the steward.',\n newAgentError: 'Could not create the agent.',\n },\n detail: {\n owner: 'Base agent',\n tabs: {\n overview: 'Overview',\n charter: 'Charter',\n daybook: 'Daybook',\n duties: 'Duties',\n memory: 'Memory',\n playbooks: 'Playbooks',\n },\n version: 'Charter v{version}, edited {when}',\n pause: 'Pause steward',\n resume: 'Resume',\n activate: 'Activate',\n archive: 'Archive',\n runNow: 'Run now',\n running: 'Starting…',\n runTitle: 'Run now',\n runPrompt: 'What should the steward do?',\n runPromptPlaceholder: 'Check the shared inbox and summarise what needs me today.',\n runDry: 'Dry run — record what it would do, without doing it',\n runStart: 'Start run',\n runError: 'Could not start the run.',\n statusError: 'Could not change the status.',\n overviewToday: 'Today',\n overviewRecent: 'Recent runs',\n noRuns: 'No runs yet.',\n openApprovals: 'Open approvals ({count})',\n archived: 'This steward is archived and cannot be changed.',\n colRun: 'Run',\n colStarted: 'Started',\n colTrigger: 'Trigger',\n },\n charter: {\n rulesTitle: 'Rules',\n rulesHint: 'Plain language — checked by the reviewer model on every outward action',\n rulesLabel: 'Charter rules',\n autonomyTitle: 'Autonomy & budgets',\n usage: 'Today',\n toolsTitle: 'Allowed tools',\n toolsHint: 'An empty list means the steward has no tools.',\n groupLook: 'Look at the screen',\n groupAct: 'Act on the screen',\n groupFiles: 'Files and shell',\n groupPlatform: 'BotManor tools',\n customTitle: 'Connectors and workflows',\n customHint:\n 'One key per line: mcp:<connection>:<tool>, node:<provider>:<operation>, workflow:<id>.',\n customInvalid: 'Not a valid tool key: {key}',\n connectionsLabel: 'Allowed connection ids',\n connectionsHint: 'One id per line.',\n dryRun: 'Dry-run mode',\n dryRunHelp: 'Plan and record actions without executing outward ones.',\n deskTitle: 'Desk web access',\n timezone: 'Time zone',\n timezoneHelp: 'Daily budgets and the daybook count days in this time zone.',\n rulesSection: 'Standing approval rules',\n rulesSectionHint: 'Apply at the Trusted level. Revoke one and the steward asks again.',\n rulesEmpty:\n 'No standing rules. Approving a request with a duty, time-limited or standing scope creates one.',\n colTool: 'Tool',\n colDestination: 'Destination',\n colPurpose: 'Purpose',\n colLimit: 'Limit',\n colExpires: 'Expires',\n revoke: 'Revoke',\n save: 'Save charter',\n saving: 'Saving…',\n saved: 'Charter saved as version {version}.',\n saveError: 'Could not save the charter.',\n unsaved: 'You have unsaved changes.',\n discard: 'Discard changes',\n historyTitle: 'Version history',\n historyCurrent: 'Version {version} — current',\n historyEdited: 'Last edited {when}',\n historySession: 'Saved in this session',\n historyNote:\n 'Every save bumps the version and is recorded on each step it governs. Earlier versions are not listed yet.',\n archivedLocked: 'Archived stewards cannot be edited.',\n forbiddenSave: 'You can read this charter but not change it.',\n },\n daybook: {\n title: 'Daybook',\n prev: 'Previous day',\n next: 'Next day',\n today: 'Today',\n allTriggers: 'All triggers',\n allStatuses: 'All statuses',\n colTime: 'Time',\n colTrigger: 'Trigger',\n colRun: 'Run',\n colStatus: 'Status',\n colSteps: 'Steps',\n colCredits: 'Credits',\n colDuration: 'Duration',\n empty: 'No runs on this day.',\n summary: 'Day summary',\n runs: 'Runs',\n runsBreakdown: '{completed} completed · {failed} failed',\n approvals: 'Approvals',\n approvalsBreakdown: 'asked / granted · {pending} pending',\n spendVsCap: 'Spend vs daily cap',\n stepsVsCap: 'Steps vs daily cap',\n attention: 'Needs attention',\n attentionEmpty: 'Nothing needs attention.',\n dryRun: 'Dry run',\n loadError: 'Could not load the daybook.',\n running: 'running',\n },\n desk: {\n title: 'Live desk',\n hint: 'What the Steward sees and does on its desk',\n intro:\n 'Watch the Steward work on its desk. You can take over for a sign-in, a CAPTCHA or a one-time code.',\n watch: 'Watch live',\n stopWatching: 'Stop watching',\n takeOver: 'Take over',\n takingOver: 'Taking over…',\n handBack: 'Hand back',\n handingBack: 'Handing back…',\n watchAgain: 'Watch again',\n reconnect: 'Reconnect',\n canvasLabelView: 'Live view of the Steward desk. View only.',\n canvasLabelControl:\n 'Live view of the Steward desk. You are in control; keyboard and pointer go to the desk.',\n controlHint: 'Keyboard and pointer go to the desk while it has focus. Press Tab to leave it.',\n waitingFrame: 'Waiting for the desk to send its first image…',\n bannerSteward: 'Steward in control',\n bannerStewardBody: 'You are watching. The Steward is working on the desk.',\n bannerYou: 'You are in control',\n bannerYouBody:\n 'The Steward is paused. What you type goes to the desk and is never recorded. Hand back when you are done.',\n bannerOther: 'Another person is in control',\n bannerOtherBody: 'The Steward is paused while they work on the desk.',\n bannerConnecting: 'Connecting to the desk…',\n bannerReconnecting: 'Connection lost. Reconnecting (attempt {attempt})…',\n endedLease: 'The desk session ended',\n endedLeaseBody: 'Nobody holds the desk any more, so the stream was closed.',\n endedLeaseControlBody:\n 'Your control of the desk ended. Hand back to let the Steward continue, or take over again.',\n endedIdle: 'Stream closed after a period of inactivity',\n endedIdleBody: 'Nothing was sent for a while, so the stream was closed to protect the desk.',\n failedForbidden: 'You cannot view this desk',\n failedForbiddenBody:\n \"Only the Steward's owner and its approvers can watch or take over its desk.\",\n failedNotFound: 'The desk is not available',\n failedNotFoundBody:\n 'The desk or its session was not found. The run may not have started on a desk yet.',\n failedSignIn: 'Please sign in again',\n failedSignInBody:\n 'Your session could not be confirmed for the live view. Sign in again, then reconnect.',\n failedBadRequest: 'The live view could not start',\n failedBadRequestBody: 'The desk stream sent something unexpected. Try again in a moment.',\n failedTooMany: 'Too many open desk streams',\n failedTooManyBody: 'Close another live view, then reconnect.',\n failedUnavailable: 'The desk stream is unavailable',\n failedUnavailableBody:\n 'The connection kept dropping or the desk is not streaming. Try again in a moment.',\n failedMint: 'The live view could not be opened',\n failedMintBody:\n 'The request for a live view was refused. The run may not be on a desk right now.',\n handedBack: 'You handed control back. The Steward will continue from its last checkpoint.',\n actionError: 'The action did not go through.',\n },\n run: {\n title: 'Run',\n steward: 'Steward',\n trigger: 'Trigger',\n autonomy: 'Autonomy',\n started: 'Started',\n stopRun: 'Stop run',\n stopping: 'Stopping…',\n retry: 'Retry',\n retryDry: 'Run again as dry run',\n retryLive: 'Run again live',\n retryLiveConfirm:\n 'A live run repeats real desk actions, such as sends or purchases, and cannot be undone. Use a dry run first unless you are sure.',\n retryLiveConfirmAction: 'Run live',\n retryBlockedActive: 'Another run of this steward is still in progress.',\n retryBlockedStatus: 'Activate the steward before running it again.',\n retrying: 'Starting…',\n retryError: 'Could not start the new run.',\n cancelError: 'Could not stop the run.',\n dryBadge: 'Dry run',\n trustTitle: 'Trust level',\n trustDegraded: 'Lowered during the run',\n trustSame: 'Unchanged during the run',\n budgetTitle: 'Run budget — credits',\n stepsTitle: 'Steps',\n verdictsTitle: 'Policy verdicts',\n verdictsLegend: 'allowed · asked · denied',\n stepsHeading: 'Execution steps',\n stepsOrdered: 'ordered',\n noSteps: 'No steps recorded yet.',\n colNumber: '#',\n colStep: 'Step',\n colVerdict: 'Verdict',\n colCredits: 'Credits',\n colTime: 'Time',\n stepDetail: 'Step {seq} · {tool}',\n pickStep: 'Select a step to see its details.',\n arguments: 'Arguments (redacted)',\n noArguments: 'No arguments.',\n result: 'Result',\n screenshot: 'Desk screenshot',\n screenshotNone: 'No desk for this step.',\n screenshotRef: 'Screenshot file {id}',\n screenshotError: 'The screenshot could not be loaded.',\n screenshotAlt: 'Desk screenshot for this step',\n trail: 'Policy decision',\n trailVerdict: 'Verdict',\n trailReasons: 'Reasons',\n trailClassification: 'Classification',\n trailTrust: 'Trust',\n trailApproval: 'Approval request {id}',\n trailRule: 'Standing rule {id}',\n trailDryRun: 'Recorded in dry-run mode; nothing was executed.',\n cost: 'Cost',\n deskSeconds: 'Desk time',\n approvalsTitle: 'Approvals this run asked for',\n stopReason: 'Stopped: {reason}',\n live: 'Live updates on',\n polling: 'Live updates unavailable — refreshing every few seconds.',\n loadError: 'Could not load the run.',\n },\n },\n} as const;\n"],"mappings":";;AAQA,IAAaA,IAAiB,EAC5B,UAAU;CACR,GAAGC;CACH,KAAK,EAAE,OAAO,WAAW;CACzB,QAAQ;EACN,MAAM;EACN,QAAQ;EACR,SAAS;EACT,OAAO;EACP,MAAM;EACN,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,gBAAgB;EAChB,eAAe;EACf,eAAe;EACf,cAAc;EACd,YAAY;EACZ,eAAe;EACf,cAAc;CAChB;CACA,OAAO;EACL,QAAQ;GAAE,OAAO;GAAS,QAAQ;GAAU,QAAQ;GAAU,UAAU;EAAW;EACnF,UAAU;GAAE,SAAS;GAAW,KAAK;GAAO,QAAQ;GAAU,SAAS;EAAU;EACjF,cAAc;GACZ,SACE;GACF,KAAK;GACL,QACE;GACF,SACE;EACJ;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,OAAO;GAC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E;EACF,kBAAkB;EAClB,sBAAsB;EACtB,eAAe;EACf,mBAAmB;EACnB,mBAAmB;EACnB,uBACE;EACF,YAAY;EACZ,gBACE;EACF,YAAY;EACZ,aAAa;CACf;CACA,KAAK;EACH,OAAO;EACP,SAAS;EACT,SAAS;EACT,UAAU;EACV,SAAS;EACT,SAAS;EACT,UAAU;EACV,OAAO;EACP,UAAU;EACV,WAAW;EACX,kBACE;EACF,wBAAwB;EACxB,oBAAoB;EACpB,oBAAoB;EACpB,UAAU;EACV,YAAY;EACZ,aAAa;EACb,UAAU;EACV,YAAY;EACZ,eAAe;EACf,WAAW;EACX,aAAa;EACb,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,cAAc;EACd,cAAc;EACd,SAAS;EACT,WAAW;EACX,SAAS;EACT,YAAY;EACZ,YAAY;EACZ,SAAS;EACT,YAAY;EACZ,UAAU;EACV,WAAW;EACX,aAAa;EACb,QAAQ;EACR,YAAY;EACZ,gBAAgB;EAChB,eAAe;EACf,iBAAiB;EACjB,eAAe;EACf,OAAO;EACP,cAAc;EACd,cAAc;EACd,qBAAqB;EACrB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,aAAa;EACb,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,YAAY;EACZ,MAAM;EACN,SAAS;EACT,WAAW;CACb;AACF,EACF"}
|
|
1
|
+
{"version":3,"file":"en.js","names":["enTranslations","enEditors"],"sources":["../../../src/stewards/i18n/en.ts"],"sourcesContent":["/**\n * English strings for microfe-stewards. Keys are dot-notation; the host's\n * I18nProvider resolves them against the translations it loads, and `useStewardsT`\n * falls back to this object when the host has no entry (or no provider).\n * Register it with the shell's `fallbackTranslations`.\n */\nimport { enEditors } from './enEditors';\n\nexport const enTranslations = {\n stewards: {\n ...enEditors,\n nav: { label: 'Stewards' },\n common: {\n back: 'Back',\n cancel: 'Cancel',\n loading: 'Loading…',\n retry: 'Try again',\n none: 'None',\n noCap: 'No cap',\n never: 'Never',\n credits: 'credits',\n unknown: 'Unknown',\n forbiddenTitle: 'You do not have access',\n forbiddenBody: 'Your role does not allow you to view Stewards in this workspace.',\n disabledTitle: 'Stewards are not enabled',\n disabledBody: 'Stewards are not turned on for this workspace yet.',\n errorTitle: 'Something went wrong',\n notFoundTitle: 'Not found',\n notFoundBody: 'This steward or run does not exist, or you cannot see it.',\n },\n enums: {\n status: { DRAFT: 'Draft', ACTIVE: 'Active', PAUSED: 'Paused', ARCHIVED: 'Archived' },\n autonomy: { OBSERVE: 'Observe', ASK: 'Ask', GUIDED: 'Guided', TRUSTED: 'Trusted' },\n autonomyHelp: {\n OBSERVE:\n 'Read only, by construction. Can look, summarise and report; no outward actions exist.',\n ASK: 'Every outward action asks a person first.',\n GUIDED:\n 'A reviewer model decides each outward action against the charter; when unsure it asks you.',\n TRUSTED:\n 'Your standing rules apply first, then the reviewer model. Still bounded by budgets.',\n },\n desk: {\n NONE: 'No desk',\n BROWSER: 'Browser only',\n CLOUD: 'Cloud desk',\n OWN_MACHINE: 'Own machine',\n },\n deskHelp: {\n NONE: 'Works through connectors and tools only.',\n BROWSER: 'A managed browser. The agent needs the Web browsing capability.',\n CLOUD: 'A cloud desktop. The agent needs the Computer use capability.',\n OWN_MACHINE: 'A machine you connect. The agent needs the Computer use capability.',\n },\n egress: {\n PUBLIC: 'Any public site',\n ALLOW_LIST: 'Only the sites I list',\n BLOCKED: 'No web access',\n },\n runStatus: {\n PROPOSED: 'Proposed',\n QUEUED: 'Queued',\n RUNNING: 'Running',\n WAITING_APPROVAL: 'Waiting for approval',\n WAITING_TAKEOVER: 'Waiting for a person',\n PAUSED_BUDGET: 'Paused — budget',\n COMPLETED: 'Completed',\n FAILED: 'Failed',\n CANCELLED: 'Cancelled',\n STOPPED: 'Stopped',\n },\n trigger: {\n OWNER_CHAT: 'Owner chat',\n SCHEDULE: 'Schedule',\n WEBHOOK: 'Webhook',\n APP_EVENT: 'App event',\n PLATFORM_EVENT: 'Platform event',\n CHANNEL_MESSAGE: 'Channel message',\n WATCH: 'Watch',\n PROACTIVE: 'Proactive',\n API: 'API',\n WORKFLOW: 'Workflow',\n A2A: 'Agent to agent',\n },\n trust: {\n OWNER: 'Owner',\n MEMBER: 'Member',\n SYSTEM: 'System',\n EXTERNAL: 'External content',\n UNTRUSTED: 'Untrusted content',\n },\n stepKind: {\n MODEL_CALL: 'Model call',\n TOOL_CALL: 'Connector tool',\n DESK_ACTION: 'Desk action',\n APPROVAL_WAIT: 'Approval wait',\n TAKEOVER: 'Takeover',\n SUB_RUN: 'Sub-run',\n MEMORY_WRITE: 'Memory write',\n NOTE: 'Note',\n },\n verdict: {\n ALLOWED: 'Allowed',\n ASKED: 'Asked',\n APPROVED: 'Approved',\n DENIED: 'Denied',\n BLOCKED_DRY_RUN: 'Dry run',\n FAILED: 'Failed',\n SKIPPED: 'Skipped',\n },\n approvalStatus: {\n PENDING: 'Pending',\n APPROVED: 'Approved',\n DENIED: 'Denied',\n EXPIRED: 'Expired',\n CANCELLED: 'Cancelled',\n },\n scope: {\n ONCE: 'Once',\n RUN: 'This run',\n DUTY: 'This duty',\n TIME_LIMITED: 'Time-limited',\n STANDING: 'Standing',\n },\n },\n tools: {\n 'desk:screenshot': 'Screenshot',\n 'desk:snapshot': 'Read the screen structure',\n 'desk:click': 'Click',\n 'desk:type': 'Type',\n 'desk:key': 'Press keys',\n 'desk:scroll': 'Scroll',\n 'desk:navigate': 'Open a URL',\n 'desk:focus_window': 'Switch window',\n 'desk:secret_fill': 'Fill a stored secret',\n 'desk:shell': 'Run shell commands',\n 'desk:read_file': 'Read files',\n 'desk:write_file': 'Write files',\n 'platform:current_time': 'Check the time',\n 'platform:notify_owner': 'Notify the owner',\n },\n budget: {\n credits: 'AI credits',\n deskMinutes: 'Desk minutes',\n steps: 'Steps',\n wallSeconds: 'Wall-clock seconds',\n connectorSpendMinor: 'Connector spend (minor units)',\n perRun: 'Per run',\n perDay: 'Per day',\n total: 'Total',\n limit: 'Limit',\n invalid: 'Enter a number of 0 or more for {name} (whole numbers, except credits).',\n hint: 'Run stops when any limit is hit. Leave a box empty for no cap at that level.',\n },\n fixed: {\n title: 'Always asks a person — can’t be loosened',\n badge: 'Fixed',\n password: 'Password and security-setting changes',\n payment: 'Entering payment details',\n otp: 'Reading one-time codes',\n external: 'Messages to people outside the workspace',\n },\n list: {\n title: 'Stewards',\n subtitle:\n 'Agents with a charter, duties and a desk — they work on a schedule or on events, inside the limits you set.',\n newSteward: 'New steward',\n statusFilter: 'Status',\n allStatuses: 'All',\n tableLabel: 'Stewards',\n colSteward: 'Steward',\n colStatus: 'Status',\n colAutonomy: 'Autonomy',\n colDesk: 'Desk',\n colLastRun: 'Last run',\n colToday: 'Today · spend / daily cap',\n colWaiting: 'Waiting',\n neverRun: 'Never run',\n tileActive: 'Active stewards',\n tileWaiting: 'Waiting for approval',\n tileWaitingHint: 'Approval requests across stewards',\n tileSpend: 'Credits used today',\n empty: 'No stewards yet.',\n emptyFiltered: 'No stewards match this status.',\n emptyHint: 'Make one of your agents a steward to give it a charter and a desk.',\n loadError: 'Could not load stewards.',\n },\n wizard: {\n title: 'New steward',\n stepOf: 'Step {step} of {total}',\n steps: { agent: 'Agent', charter: 'Charter', desk: 'Desk', review: 'Review' },\n next: 'Continue',\n create: 'Create steward',\n creating: 'Creating…',\n agentTitle: 'Base agent',\n agentHelp: 'A steward is an existing agent plus a charter, duties and a desk.',\n pickExisting: 'Use an existing agent',\n createNew: 'Create a new agent',\n noAgents: 'No active agents available. Create one here.',\n agentSearch: 'Search agents',\n agentName: 'Agent name',\n agentPrompt: 'What is this agent for?',\n agentPromptHelp: 'Becomes the agent’s system prompt. You can refine it later.',\n capabilities: 'Capabilities',\n capabilityHelp: 'Capabilities decide which desks the agent can use.',\n capWeb: 'Web browsing',\n capComputer: 'Computer use',\n charterTitle: 'Charter',\n charterHelp:\n 'Plain-language rules, one per line. The reviewer model checks them on every outward action.',\n charterLabel: 'Charter rules',\n charterPlaceholder:\n 'Only summarise ledgers from the Finance folder; never edit source sheets.\\nSend the weekly summary only to finance@example.com.',\n charterRequired: 'Write at least one rule.',\n autonomyTitle: 'Autonomy level',\n autonomyHint: 'Can be lowered at any time; raising it is logged.',\n autonomyLockedByAdmin: 'A workspace admin limits stewards to {level}.',\n toolsTitle: 'Allowed tools & connectors',\n toolsCount: '{count} selected',\n deskTitle: 'Desk',\n deskHelp: 'Where the steward may work on a screen.',\n deskNeeds:\n 'This agent does not have the {capability} capability, so this desk may be refused.',\n egressTitle: 'Web access from the desk',\n allowedHosts: 'Allowed sites',\n allowedHostsHelp: 'One per line: example.com, or *.example.com for its subdomains.',\n reviewTitle: 'Review',\n reviewBody: 'The steward starts as a draft. Activate it from its page when you are ready.',\n reviewAgent: 'Agent',\n reviewAutonomy: 'Autonomy',\n reviewDesk: 'Desk',\n reviewTools: 'Tools',\n reviewBudget: 'Daily AI credits',\n reviewNewAgentDraft:\n 'The new agent is created as a draft. Give it a model and publish it from Agents before you activate the steward.',\n createError: 'Could not create the steward.',\n newAgentError: 'Could not create the agent.',\n },\n detail: {\n owner: 'Base agent',\n tabs: {\n overview: 'Overview',\n charter: 'Charter',\n daybook: 'Daybook',\n duties: 'Duties',\n memory: 'Memory',\n playbooks: 'Playbooks',\n },\n version: 'Charter v{version}, edited {when}',\n pause: 'Pause steward',\n resume: 'Resume',\n activate: 'Activate',\n archive: 'Archive',\n runNow: 'Run now',\n running: 'Starting…',\n runTitle: 'Run now',\n runPrompt: 'What should the steward do?',\n runPromptPlaceholder: 'Check the shared inbox and summarise what needs me today.',\n runDry: 'Dry run — record what it would do, without doing it',\n runStart: 'Start run',\n runError: 'Could not start the run.',\n statusError: 'Could not change the status.',\n overviewToday: 'Today',\n overviewRecent: 'Recent runs',\n noRuns: 'No runs yet.',\n openApprovals: 'Open approvals ({count})',\n archived: 'This steward is archived and cannot be changed.',\n colRun: 'Run',\n colStarted: 'Started',\n colTrigger: 'Trigger',\n },\n charter: {\n rulesTitle: 'Rules',\n rulesHint: 'Plain language — checked by the reviewer model on every outward action',\n rulesLabel: 'Charter rules',\n autonomyTitle: 'Autonomy & budgets',\n usage: 'Today',\n toolsTitle: 'Allowed tools',\n toolsHint: 'An empty list means the steward has no tools.',\n groupLook: 'Look at the screen',\n groupAct: 'Act on the screen',\n groupFiles: 'Files and shell',\n groupPlatform: 'BotManor tools',\n customTitle: 'Connectors and workflows',\n customHint:\n 'One key per line: mcp:<connection>:<tool>, node:<provider>:<operation>, workflow:<id>.',\n customInvalid: 'Not a valid tool key: {key}',\n connectionsLabel: 'Allowed connection ids',\n connectionsHint: 'One id per line.',\n dryRun: 'Dry-run mode',\n dryRunHelp: 'Plan and record actions without executing outward ones.',\n deskTitle: 'Desk web access',\n timezone: 'Time zone',\n timezoneHelp: 'Daily budgets and the daybook count days in this time zone.',\n rulesSection: 'Standing approval rules',\n rulesSectionHint: 'Apply at the Trusted level. Revoke one and the steward asks again.',\n rulesEmpty:\n 'No standing rules. Approving a request with a duty, time-limited or standing scope creates one.',\n colTool: 'Tool',\n colDestination: 'Destination',\n colPurpose: 'Purpose',\n colLimit: 'Limit',\n colExpires: 'Expires',\n revoke: 'Revoke',\n save: 'Save charter',\n saving: 'Saving…',\n saved: 'Charter saved as version {version}.',\n saveError: 'Could not save the charter.',\n unsaved: 'You have unsaved changes.',\n discard: 'Discard changes',\n historyTitle: 'Version history',\n historyCurrent: 'Version {version} — current',\n historyEdited: 'Last edited {when}',\n historySession: 'Saved in this session',\n historyNote:\n 'Every save bumps the version and is recorded on each step it governs. Earlier versions are not listed yet.',\n archivedLocked: 'Archived stewards cannot be edited.',\n forbiddenSave: 'You can read this charter but not change it.',\n },\n daybook: {\n title: 'Daybook',\n prev: 'Previous day',\n next: 'Next day',\n today: 'Today',\n allTriggers: 'All triggers',\n allStatuses: 'All statuses',\n colTime: 'Time',\n colTrigger: 'Trigger',\n colRun: 'Run',\n colStatus: 'Status',\n colSteps: 'Steps',\n colCredits: 'Credits',\n colDuration: 'Duration',\n empty: 'No runs on this day.',\n summary: 'Day summary',\n runs: 'Runs',\n runsBreakdown: '{completed} completed · {failed} failed',\n approvals: 'Approvals',\n approvalsBreakdown: 'asked / granted · {pending} pending',\n spendVsCap: 'Spend vs daily cap',\n stepsVsCap: 'Steps vs daily cap',\n attention: 'Needs attention',\n attentionEmpty: 'Nothing needs attention.',\n dryRun: 'Dry run',\n loadError: 'Could not load the daybook.',\n running: 'running',\n },\n desk: {\n title: 'Live desk',\n hint: 'What the Steward sees and does on its desk',\n intro:\n 'Watch the Steward work on its desk. You can take over for a sign-in, a CAPTCHA or a one-time code.',\n watch: 'Watch live',\n stopWatching: 'Stop watching',\n takeOver: 'Take over',\n takingOver: 'Taking over…',\n handBack: 'Hand back',\n handingBack: 'Handing back…',\n watchAgain: 'Watch again',\n reconnect: 'Reconnect',\n canvasLabelView: 'Live view of the Steward desk. View only.',\n canvasLabelControl:\n 'Live view of the Steward desk. You are in control; keyboard and pointer go to the desk.',\n controlHint: 'Keyboard and pointer go to the desk while it has focus. Press Tab to leave it.',\n waitingFrame: 'Waiting for the desk to send its first image…',\n bannerSteward: 'Steward in control',\n bannerStewardBody: 'You are watching. The Steward is working on the desk.',\n bannerYou: 'You are in control',\n bannerYouBody:\n 'The Steward is paused. What you type goes to the desk and is never recorded. Hand back when you are done.',\n bannerOther: 'Another person is in control',\n bannerOtherBody: 'The Steward is paused while they work on the desk.',\n bannerConnecting: 'Connecting to the desk…',\n bannerReconnecting: 'Connection lost. Reconnecting (attempt {attempt})…',\n endedLease: 'The desk session ended',\n endedLeaseBody: 'Nobody holds the desk any more, so the stream was closed.',\n endedLeaseControlBody:\n 'Your control of the desk ended. Hand back to let the Steward continue, or take over again.',\n endedIdle: 'Stream closed after a period of inactivity',\n endedIdleBody: 'Nothing was sent for a while, so the stream was closed to protect the desk.',\n failedForbidden: 'You cannot view this desk',\n failedForbiddenBody:\n \"Only the Steward's owner and its approvers can watch or take over its desk.\",\n failedNotFound: 'The desk is not available',\n failedNotFoundBody:\n 'The desk or its session was not found. The run may not have started on a desk yet.',\n failedSignIn: 'Please sign in again',\n failedSignInBody:\n 'Your session could not be confirmed for the live view. Sign in again, then reconnect.',\n failedBadRequest: 'The live view could not start',\n failedBadRequestBody: 'The desk stream sent something unexpected. Try again in a moment.',\n failedTooMany: 'Too many open desk streams',\n failedTooManyBody: 'Close another live view, then reconnect.',\n failedUnavailable: 'The desk stream is unavailable',\n failedUnavailableBody:\n 'The connection kept dropping or the desk is not streaming. Try again in a moment.',\n failedMint: 'The live view could not be opened',\n failedMintBody:\n 'The request for a live view was refused. The run may not be on a desk right now.',\n handedBack: 'You handed control back. The Steward will continue from its last checkpoint.',\n actionError: 'The action did not go through.',\n },\n run: {\n title: 'Run',\n steward: 'Steward',\n trigger: 'Trigger',\n autonomy: 'Autonomy',\n started: 'Started',\n stopRun: 'Stop run',\n stopping: 'Stopping…',\n retry: 'Retry',\n retryDry: 'Run again as dry run',\n retryLive: 'Run again live',\n retryLiveConfirm:\n 'A live run repeats real desk actions, such as sends or purchases, and cannot be undone. Use a dry run first unless you are sure.',\n retryLiveConfirmAction: 'Run live',\n retryBlockedActive: 'Another run of this steward is still in progress.',\n retryBlockedStatus: 'Activate the steward before running it again.',\n retrying: 'Starting…',\n retryError: 'Could not start the new run.',\n cancelError: 'Could not stop the run.',\n dryBadge: 'Dry run',\n trustTitle: 'Trust level',\n trustDegraded: 'Lowered during the run',\n trustSame: 'Unchanged during the run',\n budgetTitle: 'Run budget — credits',\n stepsTitle: 'Steps',\n verdictsTitle: 'Policy verdicts',\n verdictsLegend: 'allowed · asked · denied',\n stepsHeading: 'Execution steps',\n stepsOrdered: 'ordered',\n noSteps: 'No steps recorded yet.',\n colNumber: '#',\n colStep: 'Step',\n colVerdict: 'Verdict',\n colCredits: 'Credits',\n colTime: 'Time',\n stepDetail: 'Step {seq} · {tool}',\n pickStep: 'Select a step to see its details.',\n arguments: 'Arguments (redacted)',\n noArguments: 'No arguments.',\n result: 'Result',\n screenshot: 'Desk screenshot',\n screenshotNone: 'No desk for this step.',\n screenshotRef: 'Screenshot file {id}',\n screenshotError: 'The screenshot could not be loaded.',\n screenshotAlt: 'Desk screenshot for this step',\n trail: 'Policy decision',\n trailVerdict: 'Verdict',\n trailReasons: 'Reasons',\n trailClassification: 'Classification',\n trailTrust: 'Trust',\n trailApproval: 'Approval request {id}',\n trailRule: 'Standing rule {id}',\n trailDryRun: 'Recorded in dry-run mode; nothing was executed.',\n cost: 'Cost',\n deskSeconds: 'Desk time',\n approvalsTitle: 'Approvals this run asked for',\n stopReason: 'Stopped: {reason}',\n live: 'Live updates on',\n polling: 'Live updates unavailable — refreshing every few seconds.',\n loadError: 'Could not load the run.',\n },\n },\n} as const;\n"],"mappings":";;AAQA,IAAaA,IAAiB,EAC5B,UAAU;CACR,GAAGC;CACH,KAAK,EAAE,OAAO,WAAW;CACzB,QAAQ;EACN,MAAM;EACN,QAAQ;EACR,SAAS;EACT,OAAO;EACP,MAAM;EACN,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;EACT,gBAAgB;EAChB,eAAe;EACf,eAAe;EACf,cAAc;EACd,YAAY;EACZ,eAAe;EACf,cAAc;CAChB;CACA,OAAO;EACL,QAAQ;GAAE,OAAO;GAAS,QAAQ;GAAU,QAAQ;GAAU,UAAU;EAAW;EACnF,UAAU;GAAE,SAAS;GAAW,KAAK;GAAO,QAAQ;GAAU,SAAS;EAAU;EACjF,cAAc;GACZ,SACE;GACF,KAAK;GACL,QACE;GACF,SACE;EACJ;EACA,MAAM;GACJ,MAAM;GACN,SAAS;GACT,OAAO;GACP,aAAa;EACf;EACA,UAAU;GACR,MAAM;GACN,SAAS;GACT,OAAO;GACP,aAAa;EACf;EACA,QAAQ;GACN,QAAQ;GACR,YAAY;GACZ,SAAS;EACX;EACA,WAAW;GACT,UAAU;GACV,QAAQ;GACR,SAAS;GACT,kBAAkB;GAClB,kBAAkB;GAClB,eAAe;GACf,WAAW;GACX,QAAQ;GACR,WAAW;GACX,SAAS;EACX;EACA,SAAS;GACP,YAAY;GACZ,UAAU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ACE;EACF,SAAS;EACT,gBAAgB;EAChB,YAAY;EACZ,UAAU;EACV,YAAY;EACZ,QAAQ;EACR,MAAM;EACN,QAAQ;EACR,OAAO;EACP,WAAW;EACX,SAAS;EACT,SAAS;EACT,cAAc;EACd,gBAAgB;EAChB,eAAe;EACf,gBAAgB;EAChB,aACE;EACF,gBAAgB;EAChB,eAAe;CACjB;CACA,SAAS;EACP,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACP,aAAa;EACb,aAAa;EACb,SAAS;EACT,YAAY;EACZ,QAAQ;EACR,WAAW;EACX,UAAU;EACV,YAAY;EACZ,aAAa;EACb,OAAO;EACP,SAAS;EACT,MAAM;EACN,eAAe;EACf,WAAW;EACX,oBAAoB;EACpB,YAAY;EACZ,YAAY;EACZ,WAAW;EACX,gBAAgB;EAChB,QAAQ;EACR,WAAW;EACX,SAAS;CACX;CACA,MAAM;EACJ,OAAO;EACP,MAAM;EACN,OACE;EACF,OAAO;EACP,cAAc;EACd,UAAU;EACV,YAAY;EACZ,UAAU;EACV,aAAa;EACb,YAAY;EACZ,WAAW;EACX,iBAAiB;EACjB,oBACE;EACF,aAAa;EACb,cAAc;EACd,eAAe;EACf,mBAAmB;EACnB,WAAW;EACX,eACE;EACF,aAAa;EACb,iBAAiB;EACjB,kBAAkB;EAClB,oBAAoB;EACpB,YAAY;EACZ,gBAAgB;EAChB,uBACE;EACF,WAAW;EACX,eAAe;EACf,iBAAiB;EACjB,qBACE;EACF,gBAAgB;EAChB,oBACE;EACF,cAAc;EACd,kBACE;EACF,kBAAkB;EAClB,sBAAsB;EACtB,eAAe;EACf,mBAAmB;EACnB,mBAAmB;EACnB,uBACE;EACF,YAAY;EACZ,gBACE;EACF,YAAY;EACZ,aAAa;CACf;CACA,KAAK;EACH,OAAO;EACP,SAAS;EACT,SAAS;EACT,UAAU;EACV,SAAS;EACT,SAAS;EACT,UAAU;EACV,OAAO;EACP,UAAU;EACV,WAAW;EACX,kBACE;EACF,wBAAwB;EACxB,oBAAoB;EACpB,oBAAoB;EACpB,UAAU;EACV,YAAY;EACZ,aAAa;EACb,UAAU;EACV,YAAY;EACZ,eAAe;EACf,WAAW;EACX,aAAa;EACb,YAAY;EACZ,eAAe;EACf,gBAAgB;EAChB,cAAc;EACd,cAAc;EACd,SAAS;EACT,WAAW;EACX,SAAS;EACT,YAAY;EACZ,YAAY;EACZ,SAAS;EACT,YAAY;EACZ,UAAU;EACV,WAAW;EACX,aAAa;EACb,QAAQ;EACR,YAAY;EACZ,gBAAgB;EAChB,eAAe;EACf,iBAAiB;EACjB,eAAe;EACf,OAAO;EACP,cAAc;EACd,cAAc;EACd,qBAAqB;EACrB,YAAY;EACZ,eAAe;EACf,WAAW;EACX,aAAa;EACb,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,YAAY;EACZ,MAAM;EACN,SAAS;EACT,WAAW;CACb;AACF,EACF"}
|
|
@@ -13,5 +13,10 @@ export interface DeskStream {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Thin React binding over `DeskStreamConnection`: one connection per run, closed on unmount.
|
|
16
|
+
*
|
|
17
|
+
* `wanted` is the mode the caller wants the stream in, or `null` for no stream. The hook keeps
|
|
18
|
+
* the connection in step with it, so a mode change (control changing hands) reconnects in the
|
|
19
|
+
* new mode and `null` disconnects. `start` stays available for an explicit reconnect after the
|
|
20
|
+
* stream ended or failed while `wanted` did not change.
|
|
16
21
|
*/
|
|
17
|
-
export declare function useDeskStream(runId: string): DeskStream;
|
|
22
|
+
export declare function useDeskStream(runId: string, wanted?: StreamMode | null): DeskStream;
|
|
@@ -4,20 +4,22 @@ import { useEffect as n, useMemo as r, useSyncExternalStore as i } from "react";
|
|
|
4
4
|
import { useApolloClient as a } from "@apollo/client/react";
|
|
5
5
|
import { useAuthTokenOrNull as o } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
6
6
|
// src/stewards/live/useDeskStream.ts
|
|
7
|
-
function s(s) {
|
|
8
|
-
let
|
|
7
|
+
function s(s, c = null) {
|
|
8
|
+
let l = a(), u = o(), d = r(() => e(l, s), [l, s]);
|
|
9
9
|
n(() => {
|
|
10
|
-
|
|
11
|
-
}, [
|
|
12
|
-
let { connection:
|
|
13
|
-
return {
|
|
14
|
-
|
|
10
|
+
d.setSession(u);
|
|
11
|
+
}, [d, u]), n(() => () => d.connection.stop(), [d]);
|
|
12
|
+
let { connection: f } = d;
|
|
13
|
+
return n(() => {
|
|
14
|
+
c ? f.start(c) : f.stop();
|
|
15
|
+
}, [f, c]), {
|
|
16
|
+
state: i(f.subscribe, f.getState, () => t),
|
|
15
17
|
...r(() => ({
|
|
16
|
-
start: (e) =>
|
|
17
|
-
stop: () =>
|
|
18
|
-
send: (e) =>
|
|
19
|
-
setFrameSink:
|
|
20
|
-
}), [
|
|
18
|
+
start: (e) => f.start(e),
|
|
19
|
+
stop: () => f.stop(),
|
|
20
|
+
send: (e) => f.send(e),
|
|
21
|
+
setFrameSink: d.setFrameSink
|
|
22
|
+
}), [f, d])
|
|
21
23
|
};
|
|
22
24
|
}
|
|
23
25
|
export { s as useDeskStream };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDeskStream.js","names":["useDeskStream","client","useApolloClient","auth","useAuthTokenOrNull","bundle","useMemo","createBrowserConnection","runId","useEffect","
|
|
1
|
+
{"version":3,"file":"useDeskStream.js","names":["useDeskStream","client","useApolloClient","auth","useAuthTokenOrNull","bundle","useMemo","createBrowserConnection","runId","useEffect","wanted","connection","useSyncExternalStore","INITIAL_STREAM_STATE","mode","frame"],"sources":["../../../src/stewards/live/useDeskStream.ts"],"sourcesContent":["import { useEffect, useMemo, useSyncExternalStore } from 'react';\nimport { useApolloClient } from '@apollo/client/react';\nimport { useAuthTokenOrNull } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { createBrowserConnection, type FrameSink } from './browserConnection';\nimport { INITIAL_STREAM_STATE, type StreamState } from './DeskStreamConnection';\nimport type { StreamMode } from './protocol';\n\nexport type { FrameSink };\n\nexport interface DeskStream {\n state: StreamState;\n start: (mode: StreamMode) => void;\n stop: () => void;\n /** Write one input frame; false when the stream is not live control. */\n send: (frame: string) => boolean;\n /** Where desk frames go (the canvas). Frames are not kept in React state. */\n setFrameSink: (sink: FrameSink | null) => void;\n}\n\n/**\n * Thin React binding over `DeskStreamConnection`: one connection per run, closed on unmount.\n *\n * `wanted` is the mode the caller wants the stream in, or `null` for no stream. The hook keeps\n * the connection in step with it, so a mode change (control changing hands) reconnects in the\n * new mode and `null` disconnects. `start` stays available for an explicit reconnect after the\n * stream ended or failed while `wanted` did not change.\n */\nexport function useDeskStream(runId: string, wanted: StreamMode | null = null): DeskStream {\n const client = useApolloClient();\n const auth = useAuthTokenOrNull();\n const bundle = useMemo(() => createBrowserConnection(client, runId), [client, runId]);\n\n useEffect(() => {\n bundle.setSession(auth);\n }, [bundle, auth]);\n useEffect(() => () => bundle.connection.stop(), [bundle]);\n\n const { connection } = bundle;\n useEffect(() => {\n if (wanted) connection.start(wanted);\n else connection.stop();\n }, [connection, wanted]);\n\n const state = useSyncExternalStore(\n connection.subscribe,\n connection.getState,\n () => INITIAL_STREAM_STATE\n );\n // Stable identities, so callers can pass them to memoised children.\n const actions = useMemo(\n () => ({\n start: (mode: StreamMode) => connection.start(mode),\n stop: () => connection.stop(),\n send: (frame: string) => connection.send(frame),\n setFrameSink: bundle.setFrameSink,\n }),\n [connection, bundle]\n );\n return { state, ...actions };\n}\n"],"mappings":";;;;;;AA2BA,SAAgBA,EAAc,GAAe,IAA4B,MAAkB;CACzF,IAAMC,IAASC,EAAgB,GACzBC,IAAOC,EAAmB,GAC1BC,IAASC,QAAcC,EAAwBN,GAAQO,CAAK,GAAG,CAACP,GAAQO,CAAK,CAAC;CAKpF,AAHAC,QAAgB;EACd,EAAO,WAAWN,CAAI;CACxB,GAAG,CAACE,GAAQF,CAAI,CAAC,GACjBM,cAAsBJ,EAAO,WAAW,KAAK,GAAG,CAACA,CAAM,CAAC;CAExD,IAAM,EAAE,kBAAeA;CAqBvB,OApBAI,QAAgB;EACd,AAAIC,IAAQC,EAAW,MAAMD,CAAM,IAC9BC,EAAW,KAAK;CACvB,GAAG,CAACA,GAAYD,CAAM,CAAC,GAiBhB;EAAE,OAfKE,EACZD,EAAW,WACXA,EAAW,gBACLE,CAYC;EAAO,GATAP,SACP;GACL,QAAQ,MAAqBK,EAAW,MAAMG,CAAI;GAClD,YAAYH,EAAW,KAAK;GAC5B,OAAO,MAAkBA,EAAW,KAAKI,CAAK;GAC9C,cAAcV,EAAO;EACvB,IACA,CAACM,GAAYN,CAAM,CAEF;CAAQ;AAC7B"}
|