@coreplane/switchboard 1.19.2 → 1.200.0
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/assets/config/config.example.yaml +9 -0
- package/dist/assets/deploy/cloudflare/package.json +1 -1
- package/dist/assets/deploy/cloudflare-resident/package.json +1 -1
- package/dist/assets/deploy/cloudflare-resident/worker.ts +1663 -456
- package/dist/assets/deploy/cloudflare-resident/wrangler.template.jsonc +12 -0
- package/dist/assets/deploy/cloudflare-sandbox/package.json +1 -1
- package/dist/assets/package-lock.json +11 -22
- package/dist/assets/package.json +1 -1
- package/dist/assets/project.json +1 -1
- package/dist/assets/source.json +3 -3
- package/dist/assets/src/core/schedules.ts +7 -2
- package/dist/assets/src/core/trace/attrs.ts +7 -0
- package/dist/assets/src/execution/residentDepsStore.ts +16 -0
- package/dist/assets/src/execution/residentIncarnation.ts +134 -0
- package/dist/assets/src/execution/residentInstanceId.ts +177 -0
- package/dist/assets/src/execution/residentStepPlan.ts +128 -0
- package/dist/assets/web/dist/.vite/manifest.json +18 -18
- package/dist/assets/web/dist/assets/CostsPage-CzutIHUw.js +1 -0
- package/dist/assets/web/dist/assets/{ResidentDetailPage-DvQ05AGa.js → ResidentDetailPage-Dw3e9u1u.js} +1 -1
- package/dist/assets/web/dist/assets/{ResidentsIndexPage-B3uxKUne.js → ResidentsIndexPage-D8NN4AFS.js} +1 -1
- package/dist/assets/web/dist/assets/{RunRoutePage-ty94olNM.js → RunRoutePage-C1TGcPCl.js} +1 -1
- package/dist/assets/web/dist/assets/{RunsIndexPage-CM-qxyQm.js → RunsIndexPage-D9iLpfAr.js} +1 -1
- package/dist/assets/web/dist/assets/{ScheduledPage-C1psvLD4.js → ScheduledPage-BJCtMp7H.js} +1 -1
- package/dist/assets/web/dist/assets/{StatusDot-DuoQnQeU.js → StatusDot-DvV0z_-s.js} +1 -1
- package/dist/assets/web/dist/assets/{Tooltip-BfLPyxQy.js → Tooltip-C7yR095Y.js} +1 -1
- package/dist/assets/web/dist/assets/{main-Bnbk_Rsg.js → main-DDu3Ig6S.js} +2 -2
- package/dist/cli.js +66 -9
- package/package.json +1 -1
- package/dist/assets/web/dist/assets/CostsPage-CTZcMYYx.js +0 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/** The read-then-act plan for each engine step the resident Worker runs
|
|
2
|
+
* (docs/reference/specs/resident-repos.md item 22), kept pure and
|
|
3
|
+
* dependency-free so it is unit-testable from src/ and imported by the
|
|
4
|
+
* resident Worker like residentRefresh — the tested code IS the shipped code.
|
|
5
|
+
*
|
|
6
|
+
* Every step method on the resident (`fetchMirror`, `installDeps`, `runBuild`,
|
|
7
|
+
* `snapshot`, `restoreCheckout`, and the wake path's dependency view) begins
|
|
8
|
+
* by reading the facts it is about to change — a stored record, the disk
|
|
9
|
+
* markers, the store — and asks one of these functions whether the work is
|
|
10
|
+
* already done. A step that is done issues no command, so a second call with
|
|
11
|
+
* the same inputs has no effect; that is what lets a caller retry a step it
|
|
12
|
+
* cannot tell apart from one that was killed mid-way. The snapshot step adds
|
|
13
|
+
* the compare-and-swap rule: its record is committed only over the record it
|
|
14
|
+
* read at the start, and a stamp that moved meanwhile makes the step
|
|
15
|
+
* `superseded`, never a throw. */
|
|
16
|
+
|
|
17
|
+
import { planRefresh, type CleanScope, type RefreshDisk } from "./residentRefresh.js";
|
|
18
|
+
|
|
19
|
+
/** Where `fetchMirror` records the fetch a cycle made. */
|
|
20
|
+
export const LAST_FETCH_KEY = "resident:lastFetch";
|
|
21
|
+
|
|
22
|
+
export interface FetchRecord {
|
|
23
|
+
/** The cycle that fetched (the alarm firing or the instance driving it). */
|
|
24
|
+
cycle: string;
|
|
25
|
+
ref: string;
|
|
26
|
+
/** The ref's tip in the mirror after that fetch. */
|
|
27
|
+
sha: string;
|
|
28
|
+
at: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type FetchPlan = { action: "done"; why: string; sha: string } | { action: "run"; why: string };
|
|
32
|
+
|
|
33
|
+
export function planFetchMirror(input: { ref: string; cycle: string; last: FetchRecord | undefined }): FetchPlan {
|
|
34
|
+
const { last } = input;
|
|
35
|
+
if (last && last.cycle === input.cycle && last.ref === input.ref) {
|
|
36
|
+
return { action: "done", why: `cycle ${input.cycle} already fetched ${input.ref}`, sha: last.sha };
|
|
37
|
+
}
|
|
38
|
+
return { action: "run", why: "no fetch recorded for this cycle" };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type StepPlan = { action: "done"; why: string } | { action: "run"; why: string };
|
|
42
|
+
|
|
43
|
+
export function planInstallDeps(input: { key: string; entryComplete: boolean }): StepPlan {
|
|
44
|
+
const short = input.key.slice(0, 8);
|
|
45
|
+
return input.entryComplete
|
|
46
|
+
? { action: "done", why: `store entry ${short} is complete` }
|
|
47
|
+
: { action: "run", why: `no complete store entry for ${short}` };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type BuildDisk = RefreshDisk;
|
|
51
|
+
|
|
52
|
+
export type BuildPlan =
|
|
53
|
+
{ action: "done"; why: string } | { action: "run"; why: string; install: boolean; clean: CleanScope };
|
|
54
|
+
|
|
55
|
+
/** The build step over the refresh planner: the recorded facts already at the
|
|
56
|
+
* target, or a checkout whose HEAD, deps and build markers all name it, is
|
|
57
|
+
* done; anything else is the planner's rebuild, with its install gate and
|
|
58
|
+
* clean scope. */
|
|
59
|
+
export function planBuild(input: { sha: string; factsSha: string; lockfileKey: string; disk: BuildDisk }): BuildPlan {
|
|
60
|
+
const plan = planRefresh(input);
|
|
61
|
+
if (plan.action === "unchanged") return { action: "done", why: `facts already at ${input.sha.slice(0, 8)}` };
|
|
62
|
+
if (plan.action === "reuse") return { action: "done", why: plan.why };
|
|
63
|
+
return { action: "run", why: plan.why, install: plan.install, clean: plan.clean };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface SnapshotStamp {
|
|
67
|
+
ref: string;
|
|
68
|
+
sha: string;
|
|
69
|
+
lockfileHash: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** What the stored snapshot record shows of itself: its stamp and when it was
|
|
73
|
+
* written. Two records with equal fields are the same record. */
|
|
74
|
+
export type StampedRecord = SnapshotStamp & { createdAt: string };
|
|
75
|
+
|
|
76
|
+
const stampText = (s: SnapshotStamp) => `{${s.ref}, ${s.sha.slice(0, 8)}, ${s.lockfileHash.slice(0, 8)}}`;
|
|
77
|
+
|
|
78
|
+
const sameStamp = (a: SnapshotStamp, b: SnapshotStamp) =>
|
|
79
|
+
a.ref === b.ref && a.sha === b.sha && a.lockfileHash === b.lockfileHash;
|
|
80
|
+
|
|
81
|
+
export function planSnapshot(input: { stamp: SnapshotStamp; current: StampedRecord | undefined }): StepPlan {
|
|
82
|
+
if (!input.current) return { action: "run", why: "no snapshot recorded" };
|
|
83
|
+
return sameStamp(input.current, input.stamp)
|
|
84
|
+
? { action: "done", why: `snapshot already at ${stampText(input.stamp)}` }
|
|
85
|
+
: { action: "run", why: `snapshot at ${stampText(input.current)}, the target is ${stampText(input.stamp)}` };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export type SnapshotCommit = { action: "commit" } | { action: "superseded"; by: StampedRecord | undefined };
|
|
89
|
+
|
|
90
|
+
/** Commit only over the record read at the start; a record that appeared,
|
|
91
|
+
* vanished or changed meanwhile was written by someone else and wins. */
|
|
92
|
+
export function snapshotCommitDecision(input: {
|
|
93
|
+
readAtStart: StampedRecord | undefined;
|
|
94
|
+
current: StampedRecord | undefined;
|
|
95
|
+
}): SnapshotCommit {
|
|
96
|
+
const { readAtStart, current } = input;
|
|
97
|
+
if (!readAtStart && !current) return { action: "commit" };
|
|
98
|
+
if (readAtStart && current && sameStamp(readAtStart, current) && readAtStart.createdAt === current.createdAt) {
|
|
99
|
+
return { action: "commit" };
|
|
100
|
+
}
|
|
101
|
+
return { action: "superseded", by: current };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** The restore step: the ready marker (the sha the last materialized disk
|
|
105
|
+
* was left at, present only when both trees exist) proves the disk. */
|
|
106
|
+
export function planRestore(input: { sha: string; readyStamp: string | null }): StepPlan {
|
|
107
|
+
const target = input.sha.slice(0, 8);
|
|
108
|
+
if (input.readyStamp === input.sha) return { action: "done", why: `disk already holds ${target}` };
|
|
109
|
+
const holds = input.readyStamp === null ? "nothing" : input.readyStamp.slice(0, 8);
|
|
110
|
+
return { action: "run", why: `disk holds ${holds}, the stamp says ${target}` };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type MaterializeDepsPlan = { action: "done"; why: string } | { action: "run"; why: string; needsEntry: boolean };
|
|
114
|
+
|
|
115
|
+
/** The wake path's dependency view: the checkout holding its `node_modules`
|
|
116
|
+
* is done; otherwise link the key's entry, producing it first when the store
|
|
117
|
+
* has none. */
|
|
118
|
+
export function planMaterializeDeps(input: {
|
|
119
|
+
key: string;
|
|
120
|
+
viewPresent: boolean;
|
|
121
|
+
entryComplete: boolean;
|
|
122
|
+
}): MaterializeDepsPlan {
|
|
123
|
+
if (input.viewPresent) return { action: "done", why: "the checkout holds its dependency view" };
|
|
124
|
+
const short = input.key.slice(0, 8);
|
|
125
|
+
return input.entryComplete
|
|
126
|
+
? { action: "run", why: `link the complete entry ${short}`, needsEntry: false }
|
|
127
|
+
: { action: "run", why: `materialize ${short} into the store, then link it`, needsEntry: true };
|
|
128
|
+
}
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
"_seed-BglCRKLA.js"
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
|
-
"_StatusDot-
|
|
27
|
-
"file": "assets/StatusDot-
|
|
26
|
+
"_StatusDot-DvV0z_-s.js": {
|
|
27
|
+
"file": "assets/StatusDot-DvV0z_-s.js",
|
|
28
28
|
"name": "StatusDot",
|
|
29
29
|
"imports": [
|
|
30
30
|
"_seed-BglCRKLA.js",
|
|
31
|
-
"_Tooltip-
|
|
31
|
+
"_Tooltip-C7yR095Y.js"
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
|
-
"_Tooltip-
|
|
35
|
-
"file": "assets/Tooltip-
|
|
34
|
+
"_Tooltip-C7yR095Y.js": {
|
|
35
|
+
"file": "assets/Tooltip-C7yR095Y.js",
|
|
36
36
|
"name": "Tooltip",
|
|
37
37
|
"imports": [
|
|
38
38
|
"_AppShell-Bk2gbvet.js",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
"src/main.ts": {
|
|
72
|
-
"file": "assets/main-
|
|
72
|
+
"file": "assets/main-DDu3Ig6S.js",
|
|
73
73
|
"name": "main",
|
|
74
74
|
"src": "src/main.ts",
|
|
75
75
|
"isEntry": true,
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
]
|
|
91
91
|
},
|
|
92
92
|
"src/pages/CostsPage.vue": {
|
|
93
|
-
"file": "assets/CostsPage-
|
|
93
|
+
"file": "assets/CostsPage-CzutIHUw.js",
|
|
94
94
|
"name": "CostsPage",
|
|
95
95
|
"src": "src/pages/CostsPage.vue",
|
|
96
96
|
"isDynamicEntry": true,
|
|
@@ -100,39 +100,39 @@
|
|
|
100
100
|
]
|
|
101
101
|
},
|
|
102
102
|
"src/pages/ResidentDetailPage.vue": {
|
|
103
|
-
"file": "assets/ResidentDetailPage-
|
|
103
|
+
"file": "assets/ResidentDetailPage-Dw3e9u1u.js",
|
|
104
104
|
"name": "ResidentDetailPage",
|
|
105
105
|
"src": "src/pages/ResidentDetailPage.vue",
|
|
106
106
|
"isDynamicEntry": true,
|
|
107
107
|
"imports": [
|
|
108
108
|
"_AppShell-Bk2gbvet.js",
|
|
109
109
|
"_seed-BglCRKLA.js",
|
|
110
|
-
"_StatusDot-
|
|
110
|
+
"_StatusDot-DvV0z_-s.js",
|
|
111
111
|
"_residentDiskBudget-BMBKlYRH.js"
|
|
112
112
|
]
|
|
113
113
|
},
|
|
114
114
|
"src/pages/ResidentsIndexPage.vue": {
|
|
115
|
-
"file": "assets/ResidentsIndexPage-
|
|
115
|
+
"file": "assets/ResidentsIndexPage-D8NN4AFS.js",
|
|
116
116
|
"name": "ResidentsIndexPage",
|
|
117
117
|
"src": "src/pages/ResidentsIndexPage.vue",
|
|
118
118
|
"isDynamicEntry": true,
|
|
119
119
|
"imports": [
|
|
120
120
|
"_AppShell-Bk2gbvet.js",
|
|
121
121
|
"_seed-BglCRKLA.js",
|
|
122
|
-
"_StatusDot-
|
|
122
|
+
"_StatusDot-DvV0z_-s.js",
|
|
123
123
|
"_residentDiskBudget-BMBKlYRH.js",
|
|
124
124
|
"_wallClock-Ckv3sKoR.js"
|
|
125
125
|
]
|
|
126
126
|
},
|
|
127
127
|
"src/pages/RunRoutePage.vue": {
|
|
128
|
-
"file": "assets/RunRoutePage-
|
|
128
|
+
"file": "assets/RunRoutePage-C1TGcPCl.js",
|
|
129
129
|
"name": "RunRoutePage",
|
|
130
130
|
"src": "src/pages/RunRoutePage.vue",
|
|
131
131
|
"isDynamicEntry": true,
|
|
132
132
|
"imports": [
|
|
133
133
|
"_AppShell-Bk2gbvet.js",
|
|
134
134
|
"_seed-BglCRKLA.js",
|
|
135
|
-
"_Tooltip-
|
|
135
|
+
"_Tooltip-C7yR095Y.js",
|
|
136
136
|
"src/main.ts",
|
|
137
137
|
"_NotFoundPage-C-BuaSm8.js",
|
|
138
138
|
"_wallClock-Ckv3sKoR.js",
|
|
@@ -144,30 +144,30 @@
|
|
|
144
144
|
]
|
|
145
145
|
},
|
|
146
146
|
"src/pages/RunsIndexPage.vue": {
|
|
147
|
-
"file": "assets/RunsIndexPage-
|
|
147
|
+
"file": "assets/RunsIndexPage-D9iLpfAr.js",
|
|
148
148
|
"name": "RunsIndexPage",
|
|
149
149
|
"src": "src/pages/RunsIndexPage.vue",
|
|
150
150
|
"isDynamicEntry": true,
|
|
151
151
|
"imports": [
|
|
152
152
|
"_AppShell-Bk2gbvet.js",
|
|
153
153
|
"_seed-BglCRKLA.js",
|
|
154
|
-
"_Tooltip-
|
|
154
|
+
"_Tooltip-C7yR095Y.js",
|
|
155
155
|
"_RunsTabs-C4krAL9o.js",
|
|
156
|
-
"_StatusDot-
|
|
156
|
+
"_StatusDot-DvV0z_-s.js",
|
|
157
157
|
"_wallClock-Ckv3sKoR.js",
|
|
158
158
|
"_favicon-DL1rdWJt.js",
|
|
159
159
|
"_localIso-L06jV29p.js"
|
|
160
160
|
]
|
|
161
161
|
},
|
|
162
162
|
"src/pages/ScheduledPage.vue": {
|
|
163
|
-
"file": "assets/ScheduledPage-
|
|
163
|
+
"file": "assets/ScheduledPage-BJCtMp7H.js",
|
|
164
164
|
"name": "ScheduledPage",
|
|
165
165
|
"src": "src/pages/ScheduledPage.vue",
|
|
166
166
|
"isDynamicEntry": true,
|
|
167
167
|
"imports": [
|
|
168
168
|
"_AppShell-Bk2gbvet.js",
|
|
169
169
|
"_seed-BglCRKLA.js",
|
|
170
|
-
"_Tooltip-
|
|
170
|
+
"_Tooltip-C7yR095Y.js",
|
|
171
171
|
"_RunsTabs-C4krAL9o.js",
|
|
172
172
|
"_wallClock-Ckv3sKoR.js",
|
|
173
173
|
"_localIso-L06jV29p.js"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./AppShell-Bk2gbvet.js";import{Pr as t,an as n,bi as r,gn as i,hi as a,in as o,mn as s,on as c,pn as l,qt as u,r as d,rn as f,sn as p,sr as m,tr as h,vi as g,xi as _}from"./seed-BglCRKLA.js";var v=`Durable Objects`,y=`Workers · storage · R2`,b=`LLM (Anthropic)`,x=(e,t=2)=>`$${e.toFixed(t)}`,S=e=>e.workersUsd+e.doRowsUsd+e.doStorageUsd+e.r2Usd+e.workflowsUsd;function ee(e){let t=[];for(let n of e.days)for(let e of Object.keys(n.containers))t.includes(e)||t.push(e);return e.days.some(e=>Object.keys(e.durableObjects).length>0)&&t.push(v),e.days.some(e=>S(e)>0)&&t.push(y),e.llmAvailable&&t.push(b),t}function C(e,t){return t===`Durable Objects`?Object.values(e.durableObjects).reduce((e,t)=>e+t,0)+e.doRequestsUsd:t===`Workers · storage · R2`?S(e):t===`LLM (Anthropic)`?e.llmUsd:e.containers[t]?.total??0}function w(e){let t=e.range.partialLastDay?e.days.slice(0,-1):e.days,n=t[t.length-1],r=t.slice(-7),i=r.length?r.reduce((e,t)=>e+t.total,0)/r.length:0,a=e.totals.total>0?Math.round(e.totals.llmUsd/e.totals.total*100):0,o=e.account.cloudUsd>0?Math.round(e.totals.cloudUsd/e.account.cloudUsd*100):0;return{...n?{yesterday:{date:n.date,total:n.total}}:{},avg7:i,projectedMonth:i*30.4,llmShare:a,accountShare:o}}function T(e,t){let n={t:12,r:12,b:30,l:48},r=960-n.l-n.r,i=260-n.t-n.b,a=e.days,o=Math.max(1e-9,...a.map(e=>e.total))*1.08,s=r/Math.max(1,a.length),c=Math.min(10,s*.28),l=e=>n.t+i-e/o*i,u=Array.from({length:5},(e,t)=>{let n=o/4*t;return{y:Number(l(n).toFixed(1)),label:x(n)}}),d=[],f=[];return a.forEach((e,r)=>{let i=0,o=n.l+r*s+c/2,u=s-c;t.forEach((t,n)=>{let r=C(e,t);if(r<=0)return;let a=l(i+r),s=l(i),c=Math.max(0,s-a-2);d.push({seriesIndex:n,x:Number(o.toFixed(1)),y:Number(a.toFixed(1)),width:Number(u.toFixed(1)),height:Number(c.toFixed(1)),title:`${e.date} · ${t} · ${x(r)}`}),i+=r}),(a.length<=16||r%Math.ceil(a.length/16)===0)&&f.push({x:Number((o+u/2).toFixed(1)),label:e.date.slice(5)})}),{width:960,height:260,gridLines:u,segments:d,dayLabels:f,axisY:Number(l(0).toFixed(1)),marginLeft:n.l,marginRight:n.r}}function E(e){let t=e.totals.byResource,n=[[`Memory (provisioned while awake)`,t.memory],[`vCPU (active use only)`,t.cpu],[`Durable Object duration + requests`,t.durableObjects],[`Disk (provisioned while awake)`,t.disk],[`Workers requests + CPU`,t.workers],[`Durable Object SQLite rows`,t.doRows],[`Durable Object SQLite storage`,t.doStorage],[`R2 storage + operations`,t.r2],[`Workflow steps + state`,t.workflows]],r=n.reduce((e,t)=>e+t[1],0)||1;return n.map(([e,t])=>({label:e,usd:t,percent:t/r*100}))}var D=[`fill-[#2a78d6] dark:fill-[#3987e5]`,`fill-[#eb6834] dark:fill-[#d95926]`,`fill-[#1baf7a] dark:fill-[#199e70]`,`fill-[#eda100] dark:fill-[#c98500]`,`fill-[#e87ba4] dark:fill-[#d55181]`,`fill-[#4a3aa7] dark:fill-[#9085e9]`,`fill-[#e34948] dark:fill-[#e66767]`,`fill-[#008300] dark:fill-[#008300]`],O=[`bg-[#2a78d6] dark:bg-[#3987e5]`,`bg-[#eb6834] dark:bg-[#d95926]`,`bg-[#1baf7a] dark:bg-[#199e70]`,`bg-[#eda100] dark:bg-[#c98500]`,`bg-[#e87ba4] dark:bg-[#d55181]`,`bg-[#4a3aa7] dark:bg-[#9085e9]`,`bg-[#e34948] dark:bg-[#e66767]`,`bg-[#008300] dark:bg-[#008300]`],k={class:`overflow-x-auto`},A=[`viewBox`],j=[`x1`,`x2`,`y1`,`y2`],M=[`x`,`y`],N=[`x`,`y`,`width`,`height`],P=[`x`,`y`],F=[`x1`,`x2`,`y1`,`y2`],I=i({__name:`CostChart`,props:{report:{},series:{}},setup(e){let t=e,n=f(()=>T(t.report,t.series));return(e,t)=>(h(),p(`div`,k,[(h(),p(`svg`,{class:`block h-auto w-full`,viewBox:`0 0 ${n.value.width} ${n.value.height}`,role:`img`,"aria-label":`Daily cost, stacked by component`},[(h(!0),p(u,null,m(n.value.gridLines,(e,t)=>(h(),p(u,{key:`g${t}`},[o(`line`,{class:`stroke-(--ui-border-muted)`,x1:n.value.marginLeft,x2:n.value.width-n.value.marginRight,y1:e.y,y2:e.y},null,8,j),o(`text`,{class:`fill-(--ui-text-dimmed) text-[11px] tabular-nums`,x:n.value.marginLeft-8,y:e.y+4,"text-anchor":`end`},_(e.label),9,M)],64))),128)),(h(!0),p(u,null,m(n.value.segments,(e,t)=>(h(),p(`rect`,{key:`s${t}`,class:g([`seg hover:opacity-85`,a(D)[e.seriesIndex%a(D).length]]),x:e.x,y:e.y,width:e.width,height:e.height},[o(`title`,null,_(e.title),1)],10,N))),128)),(h(!0),p(u,null,m(n.value.dayLabels,(e,t)=>(h(),p(`text`,{key:`d${t}`,class:`fill-(--ui-text-dimmed) text-[11px]`,x:e.x,y:n.value.height-10,"text-anchor":`middle`},_(e.label),9,P))),128)),o(`line`,{class:`stroke-(--ui-border)`,x1:n.value.marginLeft,x2:n.value.width-n.value.marginRight,y1:n.value.axisY,y2:n.value.axisY},null,8,F)],8,A))]))}}),L={class:`text-xs text-muted`},R={key:1,class:`text-highlighted`},z=[`href`],B={class:`mb-4 flex flex-wrap items-center gap-x-4 gap-y-2`},V={key:0,class:`flex items-center gap-1`,"aria-label":`Cost groups`},H={key:0,class:`rounded-md bg-accented px-2.5 py-1 text-xs font-semibold text-highlighted`,"aria-current":`page`},U=[`href`],W={class:`text-sm tabular-nums text-muted`},G={class:`mb-5 grid grid-cols-[repeat(auto-fit,minmax(190px,1fr))] gap-3`},K={class:`grid gap-0.5 rounded-md border border-default bg-elevated px-4 py-3.5`},q={class:`text-2xl font-medium tabular-nums`},J={class:`text-xs text-muted`},Y={class:`grid gap-0.5 rounded-md border border-default bg-elevated px-4 py-3.5`},X={class:`text-2xl font-medium tabular-nums`},Z={class:`grid gap-0.5 rounded-md border border-default bg-elevated px-4 py-3.5`},Q={class:`text-2xl font-medium tabular-nums`},te={class:`grid gap-0.5 rounded-md border border-default bg-elevated px-4 py-3.5`},ne={class:`text-[0.6875rem] font-medium uppercase tracking-widest text-dimmed`},re={class:`text-2xl font-medium tabular-nums`},ie={class:`text-xs text-muted`},ae={class:`grid gap-0.5 rounded-md border border-default bg-elevated px-4 py-3.5`},oe={class:`text-2xl font-medium tabular-nums`},se={class:`text-xs text-muted`},ce={class:`mb-5 grid gap-3 rounded-md border border-default bg-elevated px-5 py-4`},le={class:`flex flex-wrap items-baseline justify-between gap-x-4 gap-y-2`},ue={class:`legend flex flex-wrap gap-x-4 gap-y-1.5 text-xs text-muted`},de={key:0,class:`text-xs text-warn`},fe={class:`mb-5 grid gap-3 rounded-md border border-default bg-elevated px-5 py-4`},pe={class:`w-full border-collapse text-[0.8125rem] tabular-nums`},me={class:`px-2.5 py-1.5`},he={class:`px-2.5 py-1.5 text-right`},ge={class:`px-2.5 py-1.5 text-right`},_e={class:`w-2/5 px-2.5 py-1.5`},ve={class:`mb-5 grid gap-3 rounded-md border border-default bg-elevated px-5 py-4`},ye={open:``},be={class:`mt-2.5 overflow-x-auto`},$={class:`data w-full min-w-[38rem] border-collapse whitespace-nowrap text-[0.8125rem] tabular-nums`},xe=[`title`],Se={key:0,class:`text-xs text-dimmed`},Ce={class:`border-b border-muted px-2.5 py-1.5 text-right font-semibold`},we={class:`text-xs text-muted`},Te={class:`rounded bg-accented px-1 py-0.5`},Ee={class:`border-t border-default pt-3.5 text-xs text-dimmed`},De={class:`mt-2 grid gap-1.5`},Oe=i({__name:`CostsPage`,setup(i){let v=d(`costs`),y=f(()=>v?.report??null),b=f(()=>v?.groups??[]),S=f(()=>y.value?ee(y.value):[]),T=f(()=>y.value?w(y.value):null),D=f(()=>y.value?E(y.value):[]),k=[7,30,90];function A(e){let t=new Date(`${e}T00:00:00Z`);return Number.isNaN(t.getTime())?e:`${[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`][t.getUTCMonth()]} ${t.getUTCDate()}`}return(i,d)=>y.value&&T.value?(h(),n(e,{key:0,title:`${y.value.label} spend`,nav:`costs`},{actions:t(()=>[o(`span`,L,[(h(),p(u,null,m(k,(e,t)=>(h(),p(u,{key:e},[t>0?(h(),p(u,{key:0},[l(` · `)],64)):c(``,!0),e===y.value.range.days?(h(),p(`b`,R,_(e)+`d`,1)):(h(),p(`a`,{key:2,class:`text-primary hover:underline`,href:`/costs/${y.value.group}?days=${e}`},_(e)+`d`,9,z))],64))),64))])]),default:t(()=>[o(`div`,B,[b.value.length>1?(h(),p(`nav`,V,[(h(!0),p(u,null,m(b.value,e=>(h(),p(u,{key:e},[e===y.value.group?(h(),p(`span`,H,_(e),1)):(h(),p(`a`,{key:1,class:`rounded-md px-2.5 py-1 text-xs text-muted no-underline hover:bg-elevated hover:text-highlighted`,href:`/costs/${e}`},_(e),9,U))],64))),128))])):c(``,!0),o(`p`,W,[l(_(A(y.value.range.from))+` → `+_(A(y.value.range.to))+` · `+_(y.value.range.days)+`d`,1),y.value.range.partialLastDay?(h(),p(u,{key:0},[l(` · today partial`)],64)):c(``,!0)])]),o(`section`,G,[o(`div`,K,[d[0]||=o(`span`,{class:`text-[0.6875rem] font-medium uppercase tracking-widest text-dimmed`},`Yesterday`,-1),o(`span`,q,_(T.value.yesterday?a(x)(T.value.yesterday.total):`—`),1),o(`span`,J,_(T.value.yesterday?`${T.value.yesterday.date} · last full day`:`no full day in range`),1)]),o(`div`,Y,[d[1]||=o(`span`,{class:`text-[0.6875rem] font-medium uppercase tracking-widest text-dimmed`},`7-day average`,-1),o(`span`,X,_(a(x)(T.value.avg7)),1),d[2]||=o(`span`,{class:`text-xs text-muted`},`per day, full days only`,-1)]),o(`div`,Z,[d[3]||=o(`span`,{class:`text-[0.6875rem] font-medium uppercase tracking-widest text-dimmed`},`Projected month`,-1),o(`span`,Q,_(a(x)(T.value.projectedMonth,0)),1),d[4]||=o(`span`,{class:`text-xs text-muted`},`7-day rate × 30.4, before plan fees and included allowances`,-1)]),o(`div`,te,[o(`span`,ne,_(y.value.llmAvailable?`LLM share`:`LLM spend`),1),o(`span`,re,_(y.value.llmAvailable?`${T.value.llmShare}%`:`—`),1),o(`span`,ie,_(y.value.llmAvailable?`of the range total`:`LLM spend not configured`),1)]),o(`div`,ae,[d[5]||=o(`span`,{class:`text-[0.6875rem] font-medium uppercase tracking-widest text-dimmed`},`Share of account`,-1),o(`span`,oe,_(T.value.accountShare)+`%`,1),o(`span`,se,_(a(x)(y.value.totals.cloudUsd))+` of `+_(a(x)(y.value.account.cloudUsd))+` Cloudflare spend in range`,1)])]),o(`section`,ce,[o(`div`,le,[d[6]||=o(`div`,null,[o(`h2`,{class:`text-[0.9375rem] font-semibold`},`Daily cost`),o(`p`,{class:`text-sm text-muted`},`Stacked by component · USD list price`)],-1),o(`div`,ue,[(h(!0),p(u,null,m(S.value,(e,t)=>(h(),p(`span`,{key:e,class:`inline-flex items-center gap-1.5`},[o(`i`,{class:g([`inline-block size-2.5 rounded-xs`,a(O)[t%a(O).length]])},null,2),l(_(e),1)]))),128))])]),s(I,{report:y.value,series:S.value},null,8,[`report`,`series`]),y.value.llmAvailable?c(``,!0):(h(),p(`p`,de,[...d[7]||=[l(` LLM spend not configured — set `,-1),o(`code`,null,`ANTHROPIC_ADMIN_KEY`,-1),l(` and the group's `,-1),o(`code`,null,`anthropicWorkspaceId`,-1),l(` to layer it in. `,-1)]]))]),o(`section`,fe,[d[8]||=o(`div`,null,[o(`h2`,{class:`text-[0.9375rem] font-semibold`},`What each cloud dollar buys`)],-1),o(`table`,pe,[o(`tbody`,null,[(h(!0),p(u,null,m(D.value,e=>(h(),p(`tr`,{key:e.label,class:`border-b border-muted`},[o(`td`,me,_(e.label),1),o(`td`,he,_(a(x)(e.usd)),1),o(`td`,ge,_(Math.round(e.percent))+`%`,1),o(`td`,_e,[o(`i`,{class:`block h-2.5 rounded-xs bg-primary opacity-75`,style:r({width:`${e.percent.toFixed(1)}%`})},null,4)])]))),128))])])]),o(`section`,ve,[o(`details`,ye,[d[11]||=o(`summary`,{class:`cursor-pointer text-sm text-muted`},`Table view — daily cost by component (USD)`,-1),o(`div`,be,[o(`table`,$,[o(`thead`,null,[o(`tr`,null,[d[9]||=o(`th`,{class:`border-b border-muted px-2.5 py-1.5 text-left text-xs font-medium text-muted`},`Date`,-1),(h(!0),p(u,null,m(S.value,e=>(h(),p(`th`,{key:e,class:`border-b border-muted px-2.5 py-1.5 text-right text-xs font-medium text-muted`},_(e),1))),128)),d[10]||=o(`th`,{class:`border-b border-muted px-2.5 py-1.5 text-right text-xs font-medium text-muted`},`Total`,-1)])]),o(`tbody`,null,[(h(!0),p(u,null,m(y.value.days,e=>(h(),p(`tr`,{key:e.date},[o(`td`,{class:`border-b border-muted px-2.5 py-1.5`,title:e.date},[l(_(A(e.date))+` `,1),y.value.range.partialLastDay&&e.date===y.value.range.to?(h(),p(`span`,Se,`(partial day)`)):c(``,!0)],8,xe),(h(!0),p(u,null,m(S.value,t=>(h(),p(`td`,{key:t,class:`border-b border-muted px-2.5 py-1.5 text-right`},_(a(x)(a(C)(e,t),3)),1))),128)),o(`td`,Ce,_(a(x)(e.total,3)),1)]))),128))])])])]),o(`p`,we,[d[12]||=l(` Machine-readable twin: `,-1),o(`code`,Te,`GET /costs/`+_(y.value.group)+`.json`,1),d[13]||=l(` (same Access gate). `,-1)])]),o(`footer`,Ee,[o(`details`,null,[d[18]||=o(`summary`,{class:`cursor-pointer text-muted`},`How these numbers are computed`,-1),o(`div`,De,[d[16]||=o(`div`,null,[o(`b`,null,`Live.`),l(` Both billing sources are read live from this page — nothing cached, nothing stored. Cloudflare bills vCPU on active use only; memory and disk bill on the provisioned size for every second a container is awake. LLM spend is the Anthropic Admin API cost report for this group's workspace (gross, USD). `)],-1),d[17]||=o(`div`,null,[o(`b`,null,`Method.`),l(` Cloudflare GraphQL Analytics, every meter a Workers deployment is billed on: `),o(`code`,null,`containersUsageAdaptiveGroups`),l(` (cpuTimeSec, allocatedMemory, allocatedDisk per app per UTC day), `),o(`code`,null,`durableObjectsPeriodicGroups`),l(` (billable `),o(`code`,null,`duration`),l(` GB-s and SQLite rows read and written per namespace), `),o(`code`,null,`durableObjectsInvocationsAdaptiveGroups`),l(` (requests per namespace), `),o(`code`,null,`durableObjectsSqlStorageGroups`),l(` (bytes stored), `),o(`code`,null,`workersInvocationsAdaptive`),l(` (requests, CPU time), `),o(`code`,null,`r2StorageAdaptiveGroups`),l(` and `),o(`code`,null,`r2OperationsAdaptiveGroups`),l(` (bytes stored, class A/B operations). Prices: vCPU $0.000020/s, memory $0.0000025/GiB-s, disk $0.00000007/GB-s, DO duration $12.50 per million GB-s, DO requests $0.15/M, SQLite rows $0.001/M read and $1.00/M written, DO storage $0.20/GB-month, Workers $0.30/M requests and $0.02/M CPU-ms, R2 $0.015/GB-month, $4.50/M class A and $0.36/M class B (deletes free). Storage is the day's peak, prorated over a 30.44-day month. Gross list price — plan fees and included allowances are not subtracted; Workers Logs volume has no analytics dataset and is not priced. `)],-1),o(`div`,null,[d[14]||=o(`b`,null,`Scope.`,-1),d[15]||=l(` Attributed to this group: the Workers `,-1),o(`code`,null,_(y.value.attribution.workers.join(`, `)),1),l(`, every Durable Object namespace they host (`+_(Object.keys(y.value.attribution.durableObjectNamespaces).length)+`), the R2 buckets named after them (`+_(Object.keys(y.value.attribution.r2Buckets).length)+`), and the container apps mapped in `,1),o(`code`,null,`costs.groups.`+_(y.value.group),1),l(` (`+_(Object.keys(y.value.attribution.containerApps).length)+`). Everything else in the account is priced the same way into the account total, which is what "share of account" divides by. `,1)])])])])]),_:1},8,[`title`])):c(``,!0)}});export{Oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-Bk2gbvet.js";import{Pr as t,an as n,gn as r,hi as i,in as a,mn as o,on as ee,pn as s,qt as c,r as l,rn as u,sn as d,sr as f,tr as p,xi as m}from"./seed-BglCRKLA.js";import{t as h}from"./StatusDot-DuoQnQeU.js";import{a as te,c as ne,d as re,f as g,i as _,l as ie,n as ae,o as oe,r as se,s as v,t as ce,u as le}from"./residentDiskBudget-BMBKlYRH.js";var ue={class:`mt-4 first:mt-0`},de={class:`w-full border-collapse text-[0.8125rem]`},fe={class:`border-t border-muted`},pe={class:`px-2 py-1 align-top`},me={class:`ml-1.5 font-semibold`},y={class:`border-t border-muted`},b={class:`break-all px-2 py-1 align-top`},x={key:0},S={key:1,class:`text-dimmed`},C={class:`border-t border-muted`},w={class:`break-all px-2 py-1 align-top`},T={key:0},E={key:1,class:`text-dimmed`},D={class:`border-t border-muted`},O={class:`break-all px-2 py-1 align-top`},k={key:0},A={key:1,class:`text-dimmed`},j={class:`border-t border-muted`},M={class:`break-all px-2 py-1 align-top`},N={key:0},P={key:1,class:`text-dimmed`},F={class:`border-t border-muted`},I={class:`break-all px-2 py-1 align-top`},L={key:1,class:`text-dimmed`},R={class:`mt-4`},z={class:`w-full border-collapse text-[0.8125rem]`},he={class:`border-t border-muted`},ge={class:`break-all px-2 py-1 align-top`},_e=[`href`],ve={key:1},ye={class:`border-t border-muted`},be={class:`break-all px-2 py-1 align-top`},xe={class:`border-t border-muted`},Se={class:`break-all px-2 py-1 align-top`},Ce=[`href`],we={key:1},Te={key:2,class:`text-dimmed`},Ee={class:`border-t border-muted`},De={class:`break-all px-2 py-1 align-top`},Oe={key:0},ke={key:1,class:`text-dimmed`},Ae={class:`border-t border-muted`},je={class:`break-all px-2 py-1 align-top`},Me={key:0},Ne={key:1,class:`text-dimmed`},Pe={class:`border-t border-muted`},Fe={class:`break-all px-2 py-1 align-top`},Ie={key:0},Le={key:1,class:`text-dimmed`},Re={class:`mt-4`},ze={class:`w-full border-collapse text-[0.8125rem]`},Be={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ve={class:`break-all px-2 py-1 align-top`},He={class:`w-full border-collapse text-[0.8125rem]`},Ue={class:`w-32 break-all px-2 py-1 align-top text-muted sm:w-96 sm:break-words`},We={class:`px-2 py-1 align-top`},Ge={key:1,class:`text-xs text-muted`},Ke={class:`mt-4`},qe={key:0,class:`w-full border-collapse text-[0.8125rem]`},Je={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ye={class:`break-all px-2 py-1 align-top`},Xe={key:0},Ze={key:1,class:`text-dimmed`},B={key:1,class:`text-xs text-muted`},Qe={class:`mt-4`},$e={class:`mb-1 text-xs text-muted`},et={class:`overflow-x-auto`},tt={class:`w-full border-collapse text-[0.8125rem]`},nt={class:`break-all px-2 py-1 align-top`},rt={key:0,class:`text-xs text-muted`},it={class:`break-all px-2 py-1 align-top`},at=[`href`],ot={key:1},st={key:2,class:`text-dimmed`},ct={class:`break-all px-2 py-1 align-top`},lt={key:0},ut={key:1,class:`text-dimmed`},dt={key:2},ft={key:3,class:`text-dimmed`},pt={class:`break-all px-2 py-1 align-top`},mt={key:0},ht={key:1,class:`text-dimmed`},gt={key:2},_t={key:3,class:`text-dimmed`},vt={key:1,class:`text-xs text-muted`},yt={class:`mt-4`},bt={class:`w-full border-collapse text-[0.8125rem]`},xt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},St={class:`px-2 py-1 align-top`},Ct={class:`mt-4`},wt={key:0,class:`w-full border-collapse text-[0.8125rem]`},Tt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Et={class:`break-all px-2 py-1 align-top`},Dt={class:`text-xs text-muted`},Ot={key:1,class:`text-xs text-muted`},kt={class:`mt-4`},At={class:`w-full border-collapse text-[0.8125rem]`},jt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Mt={class:`break-all px-2 py-1 align-top`},Nt={key:0},Pt={key:1,class:`text-dimmed`},Ft={class:`mt-4 text-xs text-muted`},It={class:`rounded bg-elevated px-1 py-0.5`},Lt={class:`rounded bg-elevated px-1 py-0.5`},Rt={class:`rounded bg-elevated px-1 py-0.5`},V=r({__name:`ResidentDetailPage`,setup(r){let V=l(`resident`),H=u(()=>V?.record??{}),U=u(()=>ie(H.value)),W=u(()=>le(H.value)||(V?.slug??``)),G=u(()=>g(U.value.sha)),K=u(()=>oe.test(W.value)?`https://github.com/${W.value}`:void 0),q=u(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=u(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?v(e):void 0}),zt=u(()=>v(U.value.schedules)),Y=u(()=>{let e=v(H.value.commands),t=v(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:g(e[n]),effect:g(t[n])||`readonly`}))}),X=u(()=>{let e=U.value.threads;return(Array.isArray(e)?e.map(v):[]).map(e=>{let t=g(e.sha);return{threadKey:g(e.threadKey)||`?`,ref:g(e.ref)||`?`,sha:t?t.slice(0,8):``,commitHref:K.value&&/^[0-9a-f]{7,40}$/.test(t)?`${K.value}/commit/${t}`:void 0,user:g(e.user),deps:g(e.deps),boundAt:g(e.boundAt),lastAttachAt:g(e.lastAttachAt),evicted:e.evicted===!0,evictedAt:g(e.evictedAt),evictedWhy:g(e.evictedWhy)}}).sort((e,t)=>t.lastAttachAt.localeCompare(e.lastAttachAt))}),Z=u(()=>X.value.filter(e=>!e.evicted).length),Q=u(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=u(()=>ne(H.value)),Bt=u(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Vt=u(()=>{let e=$.value;if(!e)return[];let t=ce(e),{freeKiB:n,capped:r,capacityKiB:i}=ae(e,Bt.value),a=n-t.totalKiB,o=t=>{let n=te(e.parts,t);return n===null?`? (checkout not measured)`:n===0?`?`:`${Math.max(0,Math.floor(a/n))} more (${_(n)} each)`};return[[`used / total`,se(e)],[`free`,`${_(n)}${r?` under the ${_(i)} diskBudgetMb cap`:``}`],[`reserve`,`${_(t.totalKiB)} (snapshot staging ${_(t.stagingKiB)} + floor ${_(t.floorKiB)})`],[`headroom`,`${_(Math.max(0,a))} — room for ${o(`hardlink`)} hardlinked trees, ${o(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ht=u(()=>{let e=$.value;if(!e)return[];let t=[[`mirror`,_(e.parts.mirror)],[`checkout deps (node_modules)`,_(e.parts.deps)],[`checkout (history + tree + build)`,_(e.parts.checkout)]];for(let[n,r]of Object.entries(e.parts.threads).sort((e,t)=>t[1]-e[1]))t.push([`thread ${n}`,_(r)]);for(let[n,r]of Object.entries(e.parts.homes).sort((e,t)=>t[1]-e[1]))r>=1024&&t.push([`home ${n}`,_(r)]);return t.push([`other (image, /tmp, …)`,_(e.parts.other)]),t});return(r,l)=>(p(),n(e,{title:W.value||`Resident`,nav:`residents`},{leading:t(()=>[...l[0]||=[a(`a`,{class:`back text-sm text-muted no-underline hover:text-primary`,href:`/residents`},`← All residents`,-1)]]),default:t(()=>[a(`section`,ue,[l[8]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Lifecycle`,-1),a(`table`,de,[a(`tbody`,null,[a(`tr`,fe,[l[1]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),a(`td`,pe,[o(h,{tone:i(re)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),a(`span`,me,m(U.value.state),1)])]),a(`tr`,y,[l[2]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),a(`td`,b,[U.value.reason?(p(),d(`span`,x,m(U.value.reason),1)):(p(),d(`span`,S,`—`))])]),a(`tr`,C,[l[3]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),a(`td`,w,[i(g)(U.value.lastRefreshError)?(p(),d(`span`,T,m(i(g)(U.value.lastRefreshError)),1)):(p(),d(`span`,E,`—`))])]),a(`tr`,D,[l[4]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),a(`td`,O,[Q.value?(p(),d(`span`,k,m(Q.value),1)):(p(),d(`span`,A,`—`))])]),a(`tr`,j,[l[5]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),a(`td`,M,[i(g)(U.value.updatedAt)?(p(),d(`span`,N,m(i(g)(U.value.updatedAt)),1)):(p(),d(`span`,P,`—`))])]),a(`tr`,F,[l[7]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),a(`td`,I,[i(g)(U.value.idleSince)?(p(),d(c,{key:0},[s(m(i(g)(U.value.idleSince))+` `,1),l[6]||=a(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(p(),d(`span`,L,`awake`))])])])])]),a(`section`,R,[l[15]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Pinned facts`,-1),a(`table`,z,[a(`tbody`,null,[a(`tr`,he,[l[9]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),a(`td`,ge,[K.value?(p(),d(`a`,{key:0,class:`text-primary`,href:K.value},m(K.value),9,_e)):(p(),d(`span`,ve,m(i(g)(H.value.resource)||`—`),1))])]),a(`tr`,ye,[l[10]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),a(`td`,be,m(i(g)(U.value.defaultRef)||i(g)(H.value.defaultRef)||`—`),1)]),a(`tr`,xe,[l[11]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),a(`td`,Se,[q.value?(p(),d(`a`,{key:0,class:`text-primary`,href:q.value},m(G.value),9,Ce)):G.value?(p(),d(`span`,we,m(G.value),1)):(p(),d(`span`,Te,`—`))])]),a(`tr`,Ee,[l[12]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),a(`td`,De,[i(g)(U.value.lockfileHash)?(p(),d(`span`,Oe,m(i(g)(U.value.lockfileHash)),1)):(p(),d(`span`,ke,`—`))])]),a(`tr`,Ae,[l[13]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),a(`td`,je,[i(g)(U.value.provisionedAt)?(p(),d(`span`,Me,m(i(g)(U.value.provisionedAt)),1)):(p(),d(`span`,Ne,`—`))])]),a(`tr`,Pe,[l[14]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),a(`td`,Fe,[i(g)(U.value.lastRefreshAt)?(p(),d(`span`,Ie,m(i(g)(U.value.lastRefreshAt)),1)):(p(),d(`span`,Le,`—`))])])])])]),a(`section`,Re,[l[17]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(p(),d(c,{key:0},[a(`table`,ze,[a(`tbody`,null,[(p(!0),d(c,null,f(Vt.value,([e,t])=>(p(),d(`tr`,{key:e,class:`border-t border-muted`},[a(`td`,Be,m(e),1),a(`td`,Ve,m(t),1)]))),128))])]),l[16]||=a(`p`,{class:`mb-1 mt-2 text-xs text-muted`},` components (one du, hardlinks counted once — a thread tree shows only what it does not share with the checkout) `,-1),a(`table`,He,[a(`tbody`,null,[(p(!0),d(c,null,f(Ht.value,([e,t])=>(p(),d(`tr`,{key:e,class:`border-t border-muted`},[a(`td`,Ue,m(e),1),a(`td`,We,m(t),1)]))),128))])])],64)):(p(),d(`p`,Ge,` not measured yet — the first refresh cycle or attach of this container measures it `))]),a(`section`,Ke,[l[18]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(p(),d(`table`,qe,[a(`tbody`,null,[(p(),d(c,null,f([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>a(`tr`,{key:e,class:`border-t border-muted`},[a(`td`,Je,m(e),1),a(`td`,Ye,[i(g)(J.value[e])?(p(),d(`span`,Xe,m(i(g)(J.value[e])),1)):(p(),d(`span`,Ze,`—`))])])),64))])])):(p(),d(`p`,B,`no snapshot recorded`))]),a(`section`,Qe,[l[22]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(p(),d(c,{key:0},[a(`p`,$e,m(Z.value)+` live · `+m(X.value.length-Z.value)+` evicted`,1),a(`div`,et,[a(`table`,tt,[a(`tbody`,null,[l[21]||=a(`tr`,{class:`text-xs text-muted`},[a(`td`,{class:`px-2 py-1`},`thread`),a(`td`,{class:`px-2 py-1`},`ref · sha`),a(`td`,{class:`px-2 py-1`},`user · deps`),a(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(p(!0),d(c,null,f(X.value,e=>(p(),d(`tr`,{key:e.threadKey,class:`border-t border-muted`},[a(`td`,nt,[e.evicted?(p(),d(`span`,rt,[s(`evicted `+m(e.evictedAt||`—`),1),e.evictedWhy?(p(),d(c,{key:0},[s(` · `+m(e.evictedWhy),1)],64)):ee(``,!0)])):(p(),n(h,{key:1,tone:`green`,label:`live`,tip:`live`})),s(` `+m(e.threadKey),1)]),a(`td`,it,[s(m(e.ref)+` · `,1),e.commitHref?(p(),d(`a`,{key:0,class:`text-primary`,href:e.commitHref},m(e.sha),9,at)):e.sha?(p(),d(`span`,ot,m(e.sha),1)):(p(),d(`span`,st,`—`))]),a(`td`,ct,[e.user?(p(),d(`span`,lt,m(e.user),1)):(p(),d(`span`,ut,`—`)),l[19]||=s(` · `,-1),e.deps?(p(),d(`span`,dt,m(e.deps),1)):(p(),d(`span`,ft,`—`))]),a(`td`,pt,[e.boundAt?(p(),d(`span`,mt,m(e.boundAt),1)):(p(),d(`span`,ht,`—`)),l[20]||=s(` · `,-1),e.lastAttachAt?(p(),d(`span`,gt,m(e.lastAttachAt),1)):(p(),d(`span`,_t,`—`))])]))),128))])])])],64)):(p(),d(`p`,vt,`no thread worktrees`))]),a(`section`,yt,[l[23]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Pending schedules`,-1),a(`table`,bt,[a(`tbody`,null,[(p(),d(c,null,f([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>a(`tr`,{key:t,class:`border-t border-muted`},[a(`td`,xt,m(e),1),a(`td`,St,m(i(g)(zt.value[t]??0)||`0`),1)])),64))])])]),a(`section`,Ct,[l[25]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(p(),d(`table`,wt,[a(`tbody`,null,[(p(!0),d(c,null,f(Y.value,e=>(p(),d(`tr`,{key:e.name,class:`border-t border-muted`},[a(`td`,Tt,m(e.name),1),a(`td`,Et,[a(`code`,null,m(e.command),1),l[24]||=s(),a(`span`,Dt,m(e.effect),1)])]))),128))])])):(p(),d(`p`,Ot,`no command table`))]),a(`section`,kt,[l[26]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Registry settings`,-1),a(`table`,At,[a(`tbody`,null,[(p(!0),d(c,null,f([[`onboarded`,i(g)(H.value.onboardedAt)],[`record updated`,i(g)(H.value.updatedAt)],[`provisioning timeout (ms)`,i(g)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,i(g)(H.value.diskBudgetMb)],[`worktree TTL (days)`,i(g)(H.value.worktreeTtlDays??7)]],([e,t])=>(p(),d(`tr`,{key:e,class:`border-t border-muted`},[a(`td`,jt,m(e),1),a(`td`,Mt,[t?(p(),d(`span`,Nt,m(t),1)):(p(),d(`span`,Pt,`—`))])]))),128))])])]),a(`p`,Ft,[l[27]||=s(` Manage from chat: `,-1),a(`code`,It,`repo rebuild `+m(W.value),1),l[28]||=s(` · `,-1),a(`code`,Lt,`repo reconfigure `+m(W.value)+` …`,1),l[29]||=s(` · `,-1),a(`code`,Rt,`repo offboard `+m(W.value)+` --dry-run`,1)])]),_:1},8,[`title`]))}});export{V as default};
|
|
1
|
+
import{t as e}from"./AppShell-Bk2gbvet.js";import{Pr as t,an as n,gn as r,hi as i,in as a,mn as o,on as ee,pn as s,qt as c,r as l,rn as u,sn as d,sr as f,tr as p,xi as m}from"./seed-BglCRKLA.js";import{t as h}from"./StatusDot-DvV0z_-s.js";import{a as te,c as ne,d as re,f as g,i as _,l as ie,n as ae,o as oe,r as se,s as v,t as ce,u as le}from"./residentDiskBudget-BMBKlYRH.js";var ue={class:`mt-4 first:mt-0`},de={class:`w-full border-collapse text-[0.8125rem]`},fe={class:`border-t border-muted`},pe={class:`px-2 py-1 align-top`},me={class:`ml-1.5 font-semibold`},y={class:`border-t border-muted`},b={class:`break-all px-2 py-1 align-top`},x={key:0},S={key:1,class:`text-dimmed`},C={class:`border-t border-muted`},w={class:`break-all px-2 py-1 align-top`},T={key:0},E={key:1,class:`text-dimmed`},D={class:`border-t border-muted`},O={class:`break-all px-2 py-1 align-top`},k={key:0},A={key:1,class:`text-dimmed`},j={class:`border-t border-muted`},M={class:`break-all px-2 py-1 align-top`},N={key:0},P={key:1,class:`text-dimmed`},F={class:`border-t border-muted`},I={class:`break-all px-2 py-1 align-top`},L={key:1,class:`text-dimmed`},R={class:`mt-4`},z={class:`w-full border-collapse text-[0.8125rem]`},he={class:`border-t border-muted`},ge={class:`break-all px-2 py-1 align-top`},_e=[`href`],ve={key:1},ye={class:`border-t border-muted`},be={class:`break-all px-2 py-1 align-top`},xe={class:`border-t border-muted`},Se={class:`break-all px-2 py-1 align-top`},Ce=[`href`],we={key:1},Te={key:2,class:`text-dimmed`},Ee={class:`border-t border-muted`},De={class:`break-all px-2 py-1 align-top`},Oe={key:0},ke={key:1,class:`text-dimmed`},Ae={class:`border-t border-muted`},je={class:`break-all px-2 py-1 align-top`},Me={key:0},Ne={key:1,class:`text-dimmed`},Pe={class:`border-t border-muted`},Fe={class:`break-all px-2 py-1 align-top`},Ie={key:0},Le={key:1,class:`text-dimmed`},Re={class:`mt-4`},ze={class:`w-full border-collapse text-[0.8125rem]`},Be={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ve={class:`break-all px-2 py-1 align-top`},He={class:`w-full border-collapse text-[0.8125rem]`},Ue={class:`w-32 break-all px-2 py-1 align-top text-muted sm:w-96 sm:break-words`},We={class:`px-2 py-1 align-top`},Ge={key:1,class:`text-xs text-muted`},Ke={class:`mt-4`},qe={key:0,class:`w-full border-collapse text-[0.8125rem]`},Je={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ye={class:`break-all px-2 py-1 align-top`},Xe={key:0},Ze={key:1,class:`text-dimmed`},B={key:1,class:`text-xs text-muted`},Qe={class:`mt-4`},$e={class:`mb-1 text-xs text-muted`},et={class:`overflow-x-auto`},tt={class:`w-full border-collapse text-[0.8125rem]`},nt={class:`break-all px-2 py-1 align-top`},rt={key:0,class:`text-xs text-muted`},it={class:`break-all px-2 py-1 align-top`},at=[`href`],ot={key:1},st={key:2,class:`text-dimmed`},ct={class:`break-all px-2 py-1 align-top`},lt={key:0},ut={key:1,class:`text-dimmed`},dt={key:2},ft={key:3,class:`text-dimmed`},pt={class:`break-all px-2 py-1 align-top`},mt={key:0},ht={key:1,class:`text-dimmed`},gt={key:2},_t={key:3,class:`text-dimmed`},vt={key:1,class:`text-xs text-muted`},yt={class:`mt-4`},bt={class:`w-full border-collapse text-[0.8125rem]`},xt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},St={class:`px-2 py-1 align-top`},Ct={class:`mt-4`},wt={key:0,class:`w-full border-collapse text-[0.8125rem]`},Tt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Et={class:`break-all px-2 py-1 align-top`},Dt={class:`text-xs text-muted`},Ot={key:1,class:`text-xs text-muted`},kt={class:`mt-4`},At={class:`w-full border-collapse text-[0.8125rem]`},jt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Mt={class:`break-all px-2 py-1 align-top`},Nt={key:0},Pt={key:1,class:`text-dimmed`},Ft={class:`mt-4 text-xs text-muted`},It={class:`rounded bg-elevated px-1 py-0.5`},Lt={class:`rounded bg-elevated px-1 py-0.5`},Rt={class:`rounded bg-elevated px-1 py-0.5`},V=r({__name:`ResidentDetailPage`,setup(r){let V=l(`resident`),H=u(()=>V?.record??{}),U=u(()=>ie(H.value)),W=u(()=>le(H.value)||(V?.slug??``)),G=u(()=>g(U.value.sha)),K=u(()=>oe.test(W.value)?`https://github.com/${W.value}`:void 0),q=u(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=u(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?v(e):void 0}),zt=u(()=>v(U.value.schedules)),Y=u(()=>{let e=v(H.value.commands),t=v(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:g(e[n]),effect:g(t[n])||`readonly`}))}),X=u(()=>{let e=U.value.threads;return(Array.isArray(e)?e.map(v):[]).map(e=>{let t=g(e.sha);return{threadKey:g(e.threadKey)||`?`,ref:g(e.ref)||`?`,sha:t?t.slice(0,8):``,commitHref:K.value&&/^[0-9a-f]{7,40}$/.test(t)?`${K.value}/commit/${t}`:void 0,user:g(e.user),deps:g(e.deps),boundAt:g(e.boundAt),lastAttachAt:g(e.lastAttachAt),evicted:e.evicted===!0,evictedAt:g(e.evictedAt),evictedWhy:g(e.evictedWhy)}}).sort((e,t)=>t.lastAttachAt.localeCompare(e.lastAttachAt))}),Z=u(()=>X.value.filter(e=>!e.evicted).length),Q=u(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=u(()=>ne(H.value)),Bt=u(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Vt=u(()=>{let e=$.value;if(!e)return[];let t=ce(e),{freeKiB:n,capped:r,capacityKiB:i}=ae(e,Bt.value),a=n-t.totalKiB,o=t=>{let n=te(e.parts,t);return n===null?`? (checkout not measured)`:n===0?`?`:`${Math.max(0,Math.floor(a/n))} more (${_(n)} each)`};return[[`used / total`,se(e)],[`free`,`${_(n)}${r?` under the ${_(i)} diskBudgetMb cap`:``}`],[`reserve`,`${_(t.totalKiB)} (snapshot staging ${_(t.stagingKiB)} + floor ${_(t.floorKiB)})`],[`headroom`,`${_(Math.max(0,a))} — room for ${o(`hardlink`)} hardlinked trees, ${o(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ht=u(()=>{let e=$.value;if(!e)return[];let t=[[`mirror`,_(e.parts.mirror)],[`checkout deps (node_modules)`,_(e.parts.deps)],[`checkout (history + tree + build)`,_(e.parts.checkout)]];for(let[n,r]of Object.entries(e.parts.threads).sort((e,t)=>t[1]-e[1]))t.push([`thread ${n}`,_(r)]);for(let[n,r]of Object.entries(e.parts.homes).sort((e,t)=>t[1]-e[1]))r>=1024&&t.push([`home ${n}`,_(r)]);return t.push([`other (image, /tmp, …)`,_(e.parts.other)]),t});return(r,l)=>(p(),n(e,{title:W.value||`Resident`,nav:`residents`},{leading:t(()=>[...l[0]||=[a(`a`,{class:`back text-sm text-muted no-underline hover:text-primary`,href:`/residents`},`← All residents`,-1)]]),default:t(()=>[a(`section`,ue,[l[8]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Lifecycle`,-1),a(`table`,de,[a(`tbody`,null,[a(`tr`,fe,[l[1]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),a(`td`,pe,[o(h,{tone:i(re)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),a(`span`,me,m(U.value.state),1)])]),a(`tr`,y,[l[2]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),a(`td`,b,[U.value.reason?(p(),d(`span`,x,m(U.value.reason),1)):(p(),d(`span`,S,`—`))])]),a(`tr`,C,[l[3]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),a(`td`,w,[i(g)(U.value.lastRefreshError)?(p(),d(`span`,T,m(i(g)(U.value.lastRefreshError)),1)):(p(),d(`span`,E,`—`))])]),a(`tr`,D,[l[4]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),a(`td`,O,[Q.value?(p(),d(`span`,k,m(Q.value),1)):(p(),d(`span`,A,`—`))])]),a(`tr`,j,[l[5]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),a(`td`,M,[i(g)(U.value.updatedAt)?(p(),d(`span`,N,m(i(g)(U.value.updatedAt)),1)):(p(),d(`span`,P,`—`))])]),a(`tr`,F,[l[7]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),a(`td`,I,[i(g)(U.value.idleSince)?(p(),d(c,{key:0},[s(m(i(g)(U.value.idleSince))+` `,1),l[6]||=a(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(p(),d(`span`,L,`awake`))])])])])]),a(`section`,R,[l[15]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Pinned facts`,-1),a(`table`,z,[a(`tbody`,null,[a(`tr`,he,[l[9]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),a(`td`,ge,[K.value?(p(),d(`a`,{key:0,class:`text-primary`,href:K.value},m(K.value),9,_e)):(p(),d(`span`,ve,m(i(g)(H.value.resource)||`—`),1))])]),a(`tr`,ye,[l[10]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),a(`td`,be,m(i(g)(U.value.defaultRef)||i(g)(H.value.defaultRef)||`—`),1)]),a(`tr`,xe,[l[11]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),a(`td`,Se,[q.value?(p(),d(`a`,{key:0,class:`text-primary`,href:q.value},m(G.value),9,Ce)):G.value?(p(),d(`span`,we,m(G.value),1)):(p(),d(`span`,Te,`—`))])]),a(`tr`,Ee,[l[12]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),a(`td`,De,[i(g)(U.value.lockfileHash)?(p(),d(`span`,Oe,m(i(g)(U.value.lockfileHash)),1)):(p(),d(`span`,ke,`—`))])]),a(`tr`,Ae,[l[13]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),a(`td`,je,[i(g)(U.value.provisionedAt)?(p(),d(`span`,Me,m(i(g)(U.value.provisionedAt)),1)):(p(),d(`span`,Ne,`—`))])]),a(`tr`,Pe,[l[14]||=a(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),a(`td`,Fe,[i(g)(U.value.lastRefreshAt)?(p(),d(`span`,Ie,m(i(g)(U.value.lastRefreshAt)),1)):(p(),d(`span`,Le,`—`))])])])])]),a(`section`,Re,[l[17]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(p(),d(c,{key:0},[a(`table`,ze,[a(`tbody`,null,[(p(!0),d(c,null,f(Vt.value,([e,t])=>(p(),d(`tr`,{key:e,class:`border-t border-muted`},[a(`td`,Be,m(e),1),a(`td`,Ve,m(t),1)]))),128))])]),l[16]||=a(`p`,{class:`mb-1 mt-2 text-xs text-muted`},` components (one du, hardlinks counted once — a thread tree shows only what it does not share with the checkout) `,-1),a(`table`,He,[a(`tbody`,null,[(p(!0),d(c,null,f(Ht.value,([e,t])=>(p(),d(`tr`,{key:e,class:`border-t border-muted`},[a(`td`,Ue,m(e),1),a(`td`,We,m(t),1)]))),128))])])],64)):(p(),d(`p`,Ge,` not measured yet — the first refresh cycle or attach of this container measures it `))]),a(`section`,Ke,[l[18]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(p(),d(`table`,qe,[a(`tbody`,null,[(p(),d(c,null,f([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>a(`tr`,{key:e,class:`border-t border-muted`},[a(`td`,Je,m(e),1),a(`td`,Ye,[i(g)(J.value[e])?(p(),d(`span`,Xe,m(i(g)(J.value[e])),1)):(p(),d(`span`,Ze,`—`))])])),64))])])):(p(),d(`p`,B,`no snapshot recorded`))]),a(`section`,Qe,[l[22]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(p(),d(c,{key:0},[a(`p`,$e,m(Z.value)+` live · `+m(X.value.length-Z.value)+` evicted`,1),a(`div`,et,[a(`table`,tt,[a(`tbody`,null,[l[21]||=a(`tr`,{class:`text-xs text-muted`},[a(`td`,{class:`px-2 py-1`},`thread`),a(`td`,{class:`px-2 py-1`},`ref · sha`),a(`td`,{class:`px-2 py-1`},`user · deps`),a(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(p(!0),d(c,null,f(X.value,e=>(p(),d(`tr`,{key:e.threadKey,class:`border-t border-muted`},[a(`td`,nt,[e.evicted?(p(),d(`span`,rt,[s(`evicted `+m(e.evictedAt||`—`),1),e.evictedWhy?(p(),d(c,{key:0},[s(` · `+m(e.evictedWhy),1)],64)):ee(``,!0)])):(p(),n(h,{key:1,tone:`green`,label:`live`,tip:`live`})),s(` `+m(e.threadKey),1)]),a(`td`,it,[s(m(e.ref)+` · `,1),e.commitHref?(p(),d(`a`,{key:0,class:`text-primary`,href:e.commitHref},m(e.sha),9,at)):e.sha?(p(),d(`span`,ot,m(e.sha),1)):(p(),d(`span`,st,`—`))]),a(`td`,ct,[e.user?(p(),d(`span`,lt,m(e.user),1)):(p(),d(`span`,ut,`—`)),l[19]||=s(` · `,-1),e.deps?(p(),d(`span`,dt,m(e.deps),1)):(p(),d(`span`,ft,`—`))]),a(`td`,pt,[e.boundAt?(p(),d(`span`,mt,m(e.boundAt),1)):(p(),d(`span`,ht,`—`)),l[20]||=s(` · `,-1),e.lastAttachAt?(p(),d(`span`,gt,m(e.lastAttachAt),1)):(p(),d(`span`,_t,`—`))])]))),128))])])])],64)):(p(),d(`p`,vt,`no thread worktrees`))]),a(`section`,yt,[l[23]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Pending schedules`,-1),a(`table`,bt,[a(`tbody`,null,[(p(),d(c,null,f([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>a(`tr`,{key:t,class:`border-t border-muted`},[a(`td`,xt,m(e),1),a(`td`,St,m(i(g)(zt.value[t]??0)||`0`),1)])),64))])])]),a(`section`,Ct,[l[25]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(p(),d(`table`,wt,[a(`tbody`,null,[(p(!0),d(c,null,f(Y.value,e=>(p(),d(`tr`,{key:e.name,class:`border-t border-muted`},[a(`td`,Tt,m(e.name),1),a(`td`,Et,[a(`code`,null,m(e.command),1),l[24]||=s(),a(`span`,Dt,m(e.effect),1)])]))),128))])])):(p(),d(`p`,Ot,`no command table`))]),a(`section`,kt,[l[26]||=a(`h2`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wider text-muted`},`Registry settings`,-1),a(`table`,At,[a(`tbody`,null,[(p(!0),d(c,null,f([[`onboarded`,i(g)(H.value.onboardedAt)],[`record updated`,i(g)(H.value.updatedAt)],[`provisioning timeout (ms)`,i(g)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,i(g)(H.value.diskBudgetMb)],[`worktree TTL (days)`,i(g)(H.value.worktreeTtlDays??7)]],([e,t])=>(p(),d(`tr`,{key:e,class:`border-t border-muted`},[a(`td`,jt,m(e),1),a(`td`,Mt,[t?(p(),d(`span`,Nt,m(t),1)):(p(),d(`span`,Pt,`—`))])]))),128))])])]),a(`p`,Ft,[l[27]||=s(` Manage from chat: `,-1),a(`code`,It,`repo rebuild `+m(W.value),1),l[28]||=s(` · `,-1),a(`code`,Lt,`repo reconfigure `+m(W.value)+` …`,1),l[29]||=s(` · `,-1),a(`code`,Rt,`repo offboard `+m(W.value)+` --dry-run`,1)])]),_:1},8,[`title`]))}});export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-Bk2gbvet.js";import{Pr as t,an as n,dr as r,gn as i,in as a,mn as o,on as s,pn as c,qt as l,r as u,rn as d,sn as f,sr as p,tr as m,vi as h,xi as g}from"./seed-BglCRKLA.js";import{t as _}from"./StatusDot-
|
|
1
|
+
import{t as e}from"./AppShell-Bk2gbvet.js";import{Pr as t,an as n,dr as r,gn as i,in as a,mn as o,on as s,pn as c,qt as l,r as u,rn as d,sn as f,sr as p,tr as m,vi as h,xi as g}from"./seed-BglCRKLA.js";import{t as _}from"./StatusDot-DvV0z_-s.js";import{c as v,d as y,f as b,l as x,o as S,r as C,u as w}from"./residentDiskBudget-BMBKlYRH.js";import{i as T,n as E}from"./wallClock-Ckv3sKoR.js";var D={class:`mb-2 text-xs text-muted`},O={class:`m-0 list-none p-0`},k={class:`font-semibold text-primary`},A={class:`font-semibold`},j=[`title`],M=[`title`],N={key:0,class:`basis-full pl-5 text-xs text-warning`},P={key:1,class:`px-2 py-1.5 text-muted`},F=i({__name:`ResidentsIndexPage`,setup(i){let F=u(`residents`),I=E(),L=d(()=>(F?.residents??[]).map((e,t)=>{let n=e,r=w(n),i=x(n),a=b(i.sha),o=b(i.lastRefreshAt),s=o?Date.parse(o):NaN,c=v(n);return{key:`${r||`?`}-${t}`,display:r||b(n.resource)||`?`,state:i.state,tone:y(i.state),reason:i.reason,ref:b(n.defaultRef)||`?`,sha:a?a.slice(0,8):``,refreshed:o,refreshedLabel:Number.isFinite(s)?T(s,I):o,disk:c?C(c):``,diskAt:c?.at??``,href:S.test(r)?`/residents/${r}`:null}})),R=d(()=>b(F?.cap)||`?`),z=d(()=>b(F?.count)||String(L.value.length));return(i,u)=>(m(),n(e,{title:`Resident repos`,nav:`residents`},{default:t(()=>[L.value.length>0?(m(),f(l,{key:0},[a(`p`,D,g(z.value)+`/`+g(R.value)+` resident slots in use · live registry read, not cached `,1),a(`ul`,O,[(m(!0),f(l,null,p(L.value,e=>(m(),f(`li`,{key:e.key,class:`border-b border-muted first:border-t`},[(m(),n(r(e.href?`a`:`span`),{class:h([`row flex flex-wrap items-center gap-2.5 rounded-md px-2 py-1.5 text-inherit no-underline`,e.href?`hover:bg-elevated`:``]),href:e.href??void 0},{default:t(()=>[o(_,{tone:e.tone,label:e.state,tip:e.state},null,8,[`tone`,`label`,`tip`]),a(`span`,k,g(e.display),1),a(`span`,A,g(e.state),1),a(`span`,{class:`text-xs text-muted max-sm:basis-full max-sm:pl-5`,title:e.refreshed||void 0},[c(` ref `+g(e.ref),1),e.sha?(m(),f(l,{key:0},[c(` · sha `+g(e.sha),1)],64)):s(``,!0),e.refreshedLabel?(m(),f(l,{key:1},[c(` · refreshed `+g(e.refreshedLabel),1)],64)):s(``,!0),e.disk?(m(),f(l,{key:2},[u[0]||=c(` · `,-1),a(`span`,{title:e.diskAt?`measured ${e.diskAt}`:void 0},`disk `+g(e.disk),9,M)],64)):s(``,!0)],8,j),e.reason?(m(),f(`span`,N,g(e.reason),1)):s(``,!0)]),_:2},1032,[`class`,`href`]))]))),128))])],64)):(m(),f(`p`,P,[c(` No repos onboarded (0/`+g(R.value)+`). Onboard one from chat: `,1),u[1]||=a(`code`,{class:`rounded bg-elevated px-1.5 py-0.5`},`repo onboard <owner/name>`,-1),u[2]||=c(`. `,-1)]))]),_:1}))}});export{F as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,b as t,d as n,f as r,h as i,m as a,n as o,p as s,r as c,t as l,v as u}from"./AppShell-Bk2gbvet.js";import{$n as d,A as f,B as p,En as m,Fn as h,Gn as g,H as _,Hn as v,Ir as y,J as b,N as x,P as S,Pr as C,Vn as w,Vt as T,Yn as E,_ as D,a as ee,ai as O,an as k,bi as A,cr as j,d as te,di as ne,dr as re,f as M,fi as ie,g as ae,gn as N,h as oe,hi as P,in as F,j as se,kr as I,lt as ce,m as le,mn as L,nt as ue,on as R,p as de,pn as z,qt as B,r as fe,ri as pe,rn as V,rr as me,sn as H,sr as U,t as he,tr as W,u as ge,vi as G,vr as _e,wr as ve,x as ye,xi as K,y as be,yi as xe,z as Se,zt as Ce}from"./seed-BglCRKLA.js";import{t as we}from"./Tooltip-BfLPyxQy.js";import{n as q}from"./main-Bnbk_Rsg.js";import{t as Te}from"./NotFoundPage-C-BuaSm8.js";import{n as Ee,r as De,t as Oe}from"./wallClock-Ckv3sKoR.js";import{A as ke,D as Ae,E as je,M as J,O as Me,b as Ne,j as Pe,k as Fe,n as Ie,t as Le}from"./favicon-DL1rdWJt.js";import{t as Re}from"./localIso-L06jV29p.js";var[Y,ze]=p(`DialogRoot`),Be=N({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=ue(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=O(),a=O(),{modal:o,unmountOnHide:s}=ie(n);return ze({open:r,modal:o,unmountOnHide:s,openModal:()=>{r.value=!0},onOpenChange:e=>{r.value=e},onOpenToggle:()=>{r.value=!r.value},contentId:``,titleId:``,descriptionId:``,triggerElement:i,contentElement:a}),(e,t)=>j(e.$slots,`default`,{open:P(r),close:()=>r.value=!1})}}),Ve=N({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;x();let n=Y();return(e,r)=>(W(),k(P(f),w(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>P(n).onOpenChange(!1)}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`type`]))}}),He=N({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let i=e,o=t,c=Y(),{forwardRef:l,currentElement:u}=x();return c.titleId||=a(void 0,`reka-dialog-title`),c.descriptionId||=a(void 0,`reka-dialog-description`),E(()=>{c.contentElement=u,Se()!==document.body&&(c.triggerElement.value=Se())}),(e,t)=>(W(),k(P(r),{"as-child":``,loop:``,trapped:i.trapFocus,present:i.present,onMountAutoFocus:t[5]||=e=>o(`openAutoFocus`,e),onUnmountAutoFocus:t[6]||=e=>o(`closeAutoFocus`,e)},{default:C(()=>[L(P(s),w({id:P(c).contentId,ref:P(l),as:e.as,"as-child":e.asChild,present:i.present,"disable-outside-pointer-events":e.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":P(c).descriptionId,"aria-labelledby":P(c).titleId,"data-state":P(n)(P(c).open.value)},e.$attrs,{onDismiss:t[0]||=e=>P(c).onOpenChange(!1),onEscapeKeyDown:t[1]||=e=>o(`escapeKeyDown`,e),onFocusOutside:t[2]||=e=>o(`focusOutside`,e),onInteractOutside:t[3]||=e=>o(`interactOutside`,e),onPointerDownOutside:t[4]||=e=>o(`pointerDownOutside`,e)}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`present`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`,`present`]))}}),Ue=N({__name:`DialogContentModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,a=Y(),o=S(r),{forwardRef:s,currentElement:c}=x(),l=V(()=>n.present?c.value:void 0);i(l);let u=V(()=>{let{present:e,...t}=n;return t});return I(()=>n.present,(e,t)=>{!e&&t&&a.triggerElement.value?.focus()}),(e,t)=>(W(),k(He,w({...u.value,...P(o)},{ref:P(s),present:e.present,"trap-focus":P(a).open.value,"disable-outside-pointer-events":n.disableOutsidePointerEvents,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),P(a).triggerElement.value?.focus())},onPointerDownOutside:t[1]||=e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},onFocusOutside:t[2]||=e=>{e.preventDefault()}}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`present`,`trap-focus`,`disable-outside-pointer-events`]))}}),We=N({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=S(t);x();let i=Y(),a=O(!1),o=O(!1),s=V(()=>{let{present:e,...t}=n;return t});return I(()=>n.present,(e,t)=>{!e&&t&&(a.value||i.triggerElement.value?.focus(),a.value=!1,o.value=!1)}),(e,t)=>(W(),k(He,w({...s.value,...P(r)},{present:e.present,"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||P(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=e=>{e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;P(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`present`]))}}),Ge=N({__name:`DialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Y(),a=S(r),{forwardRef:o}=x();return(e,t)=>(W(),k(P(se),{present:e.forceMount||P(i).open.value,"force-mount":e.forceMount||!P(i).unmountOnHide.value},{default:C(({present:t})=>[P(i).modal.value?y((W(),k(Ue,w({key:0,ref:P(o),present:P(i).unmountOnHide.value||t},{...n,...P(a),...e.$attrs}),{default:C(()=>[j(e.$slots,`default`)]),_:2},1040,[`present`])),[[Ce,P(i).unmountOnHide.value||t]]):y((W(),k(We,w({key:1,ref:P(o),present:P(i).unmountOnHide.value||t},{...n,...P(a),...e.$attrs}),{default:C(()=>[j(e.$slots,`default`)]),_:2},1040,[`present`])),[[Ce,P(i).unmountOnHide.value||t]])]),_:3},8,[`present`,`force-mount`]))}}),Ke=N({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;x();let n=Y();return(e,r)=>(W(),k(P(f),w(t,{id:P(n).descriptionId}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`id`]))}}),qe=N({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},setup(t){let n=t,r=Y(),i=e(n.present);return I(()=>n.present,e=>i.value=e),x(),(e,t)=>(W(),k(P(f),{as:e.as,"as-child":e.asChild,"data-state":P(r).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:t[0]||=T(()=>{},[`left`,`self`,`prevent`])},{default:C(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),Je=N({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=Y(),{forwardRef:n}=x();return(e,r)=>P(t)?.modal.value?(W(),k(P(se),{key:0,present:e.forceMount||P(t).open.value,"force-mount":e.forceMount||!P(t).unmountOnHide.value},{default:C(({present:r})=>[y(L(qe,w(e.$attrs,{ref:P(n),as:e.as,"as-child":e.asChild,present:P(t).unmountOnHide.value||r}),{default:C(()=>[j(e.$slots,`default`)]),_:2},1040,[`as`,`as-child`,`present`]),[[Ce,P(t).unmountOnHide.value||r]])]),_:3},8,[`present`,`force-mount`])):R(`v-if`,!0)}}),Ye=N({__name:`DialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(W(),k(P(ye),xe(m(t)),{default:C(()=>[j(e.$slots,`default`)]),_:3},16))}}),Xe=N({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e,n=Y();return x(),(e,r)=>(W(),k(P(f),w(t,{id:P(n).titleId}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`id`]))}}),Ze=N({__name:`DialogTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=Y(),{forwardRef:r,currentElement:i}=x();return n.contentId||=a(void 0,`reka-dialog-content`),E(()=>{n.triggerElement.value=i.value}),(e,i)=>(W(),k(P(f),w(t,{ref:P(r),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":P(n).open.value||!1,"aria-controls":P(n).open.value?P(n).contentId:void 0,"data-state":P(n).open.value?`open`:`closed`,onClick:P(n).onOpenToggle}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`onClick`]))}});function Qe(e){let t=new Date(e),n=t.getHours(),r=e=>String(e).padStart(2,`0`),i=new Intl.DateTimeFormat(void 0,{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value;return`${n%12==0?12:n%12}:${r(t.getMinutes())}:${r(t.getSeconds())} ${n<12?`AM`:`PM`}${i?` ${i}`:``}`}function $e(e,t={}){let n=e.detail.originalEvent,r=n.target;if(!r?.isConnected){e.preventDefault();return}t.scrollable&&(n.offsetX>r.clientWidth||n.offsetY>r.clientHeight)&&e.preventDefault()}var et={slots:{overlay:`fixed inset-0 bg-elevated/75`,content:`fixed bg-default divide-y divide-default sm:ring ring-default sm:shadow-lg flex flex-col focus:outline-none`,header:`flex items-center gap-1.5 p-4 sm:px-6 min-h-(--ui-header-height)`,wrapper:``,body:`flex-1 overflow-y-auto p-4 sm:p-6`,footer:`flex items-center gap-1.5 p-4 sm:px-6`,title:`text-highlighted font-semibold`,description:`mt-1 text-muted text-sm`,close:`absolute top-4 end-4`},variants:{side:{top:{content:``},right:{content:`max-w-md`},bottom:{content:``},left:{content:`max-w-md`}},inset:{true:{content:`rounded-lg`}},transition:{true:{overlay:`data-[state=open]:animate-[fade-in_200ms_var(--ease-out)] data-[state=closed]:animate-[fade-out_200ms_var(--ease-out)]`}}},compoundVariants:[{side:`top`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 top-4`}},{side:`top`,inset:!1,class:{content:`max-h-full inset-x-0 top-0`}},{side:`right`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 right-4`}},{side:`right`,inset:!1,class:{content:`w-full inset-y-0 right-0`}},{side:`bottom`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 bottom-4`}},{side:`bottom`,inset:!1,class:{content:`max-h-full inset-x-0 bottom-0`}},{side:`left`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 left-4`}},{side:`left`,inset:!1,class:{content:`w-full inset-y-0 left-0`}},{transition:!0,side:`top`,class:{content:`data-[state=open]:animate-[slide-in-from-top_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-top_200ms_var(--ease-out)]`}},{transition:!0,side:`right`,class:{content:`data-[state=open]:animate-[slide-in-from-right_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-right_200ms_var(--ease-out)]`}},{transition:!0,side:`bottom`,class:{content:`data-[state=open]:animate-[slide-in-from-bottom_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-bottom_200ms_var(--ease-out)]`}},{transition:!0,side:`left`,class:{content:`data-[state=open]:animate-[slide-in-from-left_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-left_200ms_var(--ease-out)]`}}]},tt={__name:`Slideover`,props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},transition:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1,default:`right`},inset:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1}},emits:[`leave`,`after:leave`,`enter`,`after:enter`,`close:prevent`,`update:open`],setup(e,{emit:t}){let n=e,r=t,i=ve(),a=D(`slideover`,n),{t:o}=_(),s=b(),c=ae(ce(a,`open`,`defaultOpen`,`modal`,`unmountOnHide`),r),l=be(ne(()=>a.portal)),u=ne(()=>a.content),d=V(()=>a.dismissible?{pointerDownOutside:$e}:[`interactOutside`,`escapeKeyDown`].reduce((e,t)=>(e[t]=e=>{e.preventDefault(),r(`close:prevent`)},e),{})),f=V(()=>oe({extend:et,...s.ui?.slideover||{}})({transition:a.transition,side:a.side,inset:a.inset}));return(e,t)=>(W(),k(P(Be),xe(m(P(c))),{default:C(({open:n,close:c})=>[i.default?(W(),k(P(Ze),{key:0,"as-child":``,class:G(P(a).class)},{default:C(()=>[j(e.$slots,`default`,{open:n})]),_:2},1032,[`class`])):R(``,!0),L(P(Ye),w(P(l),{"force-mount":P(l).disabled&&P(a).unmountOnHide===!1||void 0}),{default:C(()=>[L(P(ge),null,{default:C(()=>[P(a).overlay?(W(),k(P(Je),{key:0,"data-slot":`overlay`,class:G(f.value.overlay({class:P(a).ui?.overlay}))},null,8,[`class`])):R(``,!0),L(P(Ge),w({"data-side":P(a).side,"data-slot":`content`,class:f.value.content({class:[!i.default&&P(a).class,P(a).ui?.content]})},u.value,{onEnter:t[0]||=e=>r(`enter`),onAfterEnter:t[1]||=e=>r(`after:enter`),onLeave:t[2]||=e=>r(`leave`),onAfterLeave:t[3]||=e=>r(`after:leave`)},_e(d.value)),{default:C(()=>[!P(a).title&&!i.title||!P(a).description&&!i.description||i.content?(W(),k(P(q),{key:0},{default:C(()=>[!P(a).title&&!i.title?(W(),k(P(Xe),{key:0})):i.content?(W(),k(P(Xe),{key:1},{default:C(()=>[j(e.$slots,`title`,{},()=>[z(K(P(a).title),1)])]),_:3})):R(``,!0),!P(a).description&&!i.description?(W(),k(P(Ke),{key:2})):i.content?(W(),k(P(Ke),{key:3},{default:C(()=>[j(e.$slots,`description`,{},()=>[z(K(P(a).description),1)])]),_:3})):R(``,!0)]),_:3})):R(``,!0),j(e.$slots,`content`,{close:c},()=>[i.header||P(a).title||i.title||P(a).description||i.description||P(a).close||i.close?(W(),H(`div`,{key:0,"data-slot":`header`,class:G(f.value.header({class:P(a).ui?.header}))},[j(e.$slots,`header`,{close:c},()=>[P(a).title||i.title||P(a).description||i.description?(W(),H(`div`,{key:0,"data-slot":`wrapper`,class:G(f.value.wrapper({class:P(a).ui?.wrapper}))},[P(a).title||i.title?(W(),k(P(Xe),{key:0,"data-slot":`title`,class:G(f.value.title({class:P(a).ui?.title}))},{default:C(()=>[j(e.$slots,`title`,{},()=>[z(K(P(a).title),1)])]),_:3},8,[`class`])):R(``,!0),P(a).description||i.description?(W(),k(P(Ke),{key:1,"data-slot":`description`,class:G(f.value.description({class:P(a).ui?.description}))},{default:C(()=>[j(e.$slots,`description`,{},()=>[z(K(P(a).description),1)])]),_:3},8,[`class`])):R(``,!0)],2)):R(``,!0),j(e.$slots,`actions`),P(a).close||i.close?(W(),k(P(Ve),{key:1,"as-child":``},{default:C(()=>[j(e.$slots,`close`,{ui:f.value},()=>[P(a).close?(W(),k(ee,w({key:0,icon:P(a).closeIcon||P(s).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":P(o)(`slideover.close`)},typeof P(a).close==`object`?P(a).close:{},{"data-slot":`close`,class:f.value.close({class:P(a).ui?.close})}),null,16,[`icon`,`aria-label`,`class`])):R(``,!0)])]),_:2},1024)):R(``,!0)])],2)):R(``,!0),F(`div`,{"data-slot":`body`,class:G(f.value.body({class:P(a).ui?.body}))},[j(e.$slots,`body`,{close:c})],2),i.footer?(W(),H(`div`,{key:1,"data-slot":`footer`,class:G(f.value.footer({class:P(a).ui?.footer}))},[j(e.$slots,`footer`,{close:c})],2)):R(``,!0)])]),_:2},1040,[`data-side`,`class`])]),_:2},1024)]),_:2},1040,[`force-mount`])]),_:3},16))}},nt=[`data-expanded`,`data-overflowing`],rt={key:0,class:`fade pointer-events-none absolute inset-x-0 bottom-6 h-10`},it={key:1,class:`mt-1 flex justify-start`},at=[`aria-expanded`],ot=c(N({__name:`ExpandableText`,props:{lines:{default:5}},setup(e){let t=e,n=O(!1),r=O(!1),i=O(null),a=`expandable-${Math.random().toString(36).slice(2,8)}`;function o(){let e=i.value;e&&!n.value&&(r.value=e.scrollHeight>e.clientHeight+1)}let s=null;E(()=>{o(),typeof ResizeObserver<`u`&&i.value&&(s=new ResizeObserver(()=>o()),s.observe(i.value))}),g(()=>s?.disconnect()),I(n,e=>{e||Promise.resolve().then(o)});function c(){n.value=!n.value}function l(e){!n.value&&r.value&&(e.target?.closest?.(`a`)||(n.value=!0))}return(e,o)=>(W(),H(`div`,{class:G([`expandable group relative`,!n.value&&r.value?`cursor-pointer`:``]),"data-expanded":n.value?`1`:`0`,"data-overflowing":r.value?`1`:`0`,onClick:l},[F(`div`,{id:a,ref_key:`body`,ref:i,class:G([`body`,n.value?``:`clamped`]),style:A(n.value?void 0:{"--expandable-lines":String(t.lines)})},[j(e.$slots,`default`,{},void 0,!0)],6),!n.value&&r.value?(W(),H(`div`,rt)):R(``,!0),r.value||n.value?(W(),H(`div`,it,[F(`button`,{type:`button`,class:`more cursor-pointer text-xs text-dimmed group-hover:text-primary hover:underline focus-visible:outline-2 focus-visible:outline-primary`,"aria-expanded":n.value?`true`:`false`,"aria-controls":a,onClick:T(c,[`stop`])},K(n.value?`Show less`:`Show more`),9,at)])):R(``,!0)],10,nt))}}),[[`__scopeId`,`data-v-ce3bfa89`]]);function st(e,t){let n=e.ownerDocument;e.textContent=``;let r=String(t??``).replace(/\r\n?/g,`
|
|
1
|
+
import{_ as e,b as t,d as n,f as r,h as i,m as a,n as o,p as s,r as c,t as l,v as u}from"./AppShell-Bk2gbvet.js";import{$n as d,A as f,B as p,En as m,Fn as h,Gn as g,H as _,Hn as v,Ir as y,J as b,N as x,P as S,Pr as C,Vn as w,Vt as T,Yn as E,_ as D,a as ee,ai as O,an as k,bi as A,cr as j,d as te,di as ne,dr as re,f as M,fi as ie,g as ae,gn as N,h as oe,hi as P,in as F,j as se,kr as I,lt as ce,m as le,mn as L,nt as ue,on as R,p as de,pn as z,qt as B,r as fe,ri as pe,rn as V,rr as me,sn as H,sr as U,t as he,tr as W,u as ge,vi as G,vr as _e,wr as ve,x as ye,xi as K,y as be,yi as xe,z as Se,zt as Ce}from"./seed-BglCRKLA.js";import{t as we}from"./Tooltip-C7yR095Y.js";import{n as q}from"./main-DDu3Ig6S.js";import{t as Te}from"./NotFoundPage-C-BuaSm8.js";import{n as Ee,r as De,t as Oe}from"./wallClock-Ckv3sKoR.js";import{A as ke,D as Ae,E as je,M as J,O as Me,b as Ne,j as Pe,k as Fe,n as Ie,t as Le}from"./favicon-DL1rdWJt.js";import{t as Re}from"./localIso-L06jV29p.js";var[Y,ze]=p(`DialogRoot`),Be=N({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=ue(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=O(),a=O(),{modal:o,unmountOnHide:s}=ie(n);return ze({open:r,modal:o,unmountOnHide:s,openModal:()=>{r.value=!0},onOpenChange:e=>{r.value=e},onOpenToggle:()=>{r.value=!r.value},contentId:``,titleId:``,descriptionId:``,triggerElement:i,contentElement:a}),(e,t)=>j(e.$slots,`default`,{open:P(r),close:()=>r.value=!1})}}),Ve=N({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;x();let n=Y();return(e,r)=>(W(),k(P(f),w(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>P(n).onOpenChange(!1)}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`type`]))}}),He=N({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let i=e,o=t,c=Y(),{forwardRef:l,currentElement:u}=x();return c.titleId||=a(void 0,`reka-dialog-title`),c.descriptionId||=a(void 0,`reka-dialog-description`),E(()=>{c.contentElement=u,Se()!==document.body&&(c.triggerElement.value=Se())}),(e,t)=>(W(),k(P(r),{"as-child":``,loop:``,trapped:i.trapFocus,present:i.present,onMountAutoFocus:t[5]||=e=>o(`openAutoFocus`,e),onUnmountAutoFocus:t[6]||=e=>o(`closeAutoFocus`,e)},{default:C(()=>[L(P(s),w({id:P(c).contentId,ref:P(l),as:e.as,"as-child":e.asChild,present:i.present,"disable-outside-pointer-events":e.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":P(c).descriptionId,"aria-labelledby":P(c).titleId,"data-state":P(n)(P(c).open.value)},e.$attrs,{onDismiss:t[0]||=e=>P(c).onOpenChange(!1),onEscapeKeyDown:t[1]||=e=>o(`escapeKeyDown`,e),onFocusOutside:t[2]||=e=>o(`focusOutside`,e),onInteractOutside:t[3]||=e=>o(`interactOutside`,e),onPointerDownOutside:t[4]||=e=>o(`pointerDownOutside`,e)}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`present`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`,`present`]))}}),Ue=N({__name:`DialogContentModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,a=Y(),o=S(r),{forwardRef:s,currentElement:c}=x(),l=V(()=>n.present?c.value:void 0);i(l);let u=V(()=>{let{present:e,...t}=n;return t});return I(()=>n.present,(e,t)=>{!e&&t&&a.triggerElement.value?.focus()}),(e,t)=>(W(),k(He,w({...u.value,...P(o)},{ref:P(s),present:e.present,"trap-focus":P(a).open.value,"disable-outside-pointer-events":n.disableOutsidePointerEvents,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),P(a).triggerElement.value?.focus())},onPointerDownOutside:t[1]||=e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},onFocusOutside:t[2]||=e=>{e.preventDefault()}}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`present`,`trap-focus`,`disable-outside-pointer-events`]))}}),We=N({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=S(t);x();let i=Y(),a=O(!1),o=O(!1),s=V(()=>{let{present:e,...t}=n;return t});return I(()=>n.present,(e,t)=>{!e&&t&&(a.value||i.triggerElement.value?.focus(),a.value=!1,o.value=!1)}),(e,t)=>(W(),k(He,w({...s.value,...P(r)},{present:e.present,"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||P(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=e=>{e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;P(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`present`]))}}),Ge=N({__name:`DialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Y(),a=S(r),{forwardRef:o}=x();return(e,t)=>(W(),k(P(se),{present:e.forceMount||P(i).open.value,"force-mount":e.forceMount||!P(i).unmountOnHide.value},{default:C(({present:t})=>[P(i).modal.value?y((W(),k(Ue,w({key:0,ref:P(o),present:P(i).unmountOnHide.value||t},{...n,...P(a),...e.$attrs}),{default:C(()=>[j(e.$slots,`default`)]),_:2},1040,[`present`])),[[Ce,P(i).unmountOnHide.value||t]]):y((W(),k(We,w({key:1,ref:P(o),present:P(i).unmountOnHide.value||t},{...n,...P(a),...e.$attrs}),{default:C(()=>[j(e.$slots,`default`)]),_:2},1040,[`present`])),[[Ce,P(i).unmountOnHide.value||t]])]),_:3},8,[`present`,`force-mount`]))}}),Ke=N({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;x();let n=Y();return(e,r)=>(W(),k(P(f),w(t,{id:P(n).descriptionId}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`id`]))}}),qe=N({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},setup(t){let n=t,r=Y(),i=e(n.present);return I(()=>n.present,e=>i.value=e),x(),(e,t)=>(W(),k(P(f),{as:e.as,"as-child":e.asChild,"data-state":P(r).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:t[0]||=T(()=>{},[`left`,`self`,`prevent`])},{default:C(()=>[j(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),Je=N({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=Y(),{forwardRef:n}=x();return(e,r)=>P(t)?.modal.value?(W(),k(P(se),{key:0,present:e.forceMount||P(t).open.value,"force-mount":e.forceMount||!P(t).unmountOnHide.value},{default:C(({present:r})=>[y(L(qe,w(e.$attrs,{ref:P(n),as:e.as,"as-child":e.asChild,present:P(t).unmountOnHide.value||r}),{default:C(()=>[j(e.$slots,`default`)]),_:2},1040,[`as`,`as-child`,`present`]),[[Ce,P(t).unmountOnHide.value||r]])]),_:3},8,[`present`,`force-mount`])):R(`v-if`,!0)}}),Ye=N({__name:`DialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(W(),k(P(ye),xe(m(t)),{default:C(()=>[j(e.$slots,`default`)]),_:3},16))}}),Xe=N({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e,n=Y();return x(),(e,r)=>(W(),k(P(f),w(t,{id:P(n).titleId}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`id`]))}}),Ze=N({__name:`DialogTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=Y(),{forwardRef:r,currentElement:i}=x();return n.contentId||=a(void 0,`reka-dialog-content`),E(()=>{n.triggerElement.value=i.value}),(e,i)=>(W(),k(P(f),w(t,{ref:P(r),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":P(n).open.value||!1,"aria-controls":P(n).open.value?P(n).contentId:void 0,"data-state":P(n).open.value?`open`:`closed`,onClick:P(n).onOpenToggle}),{default:C(()=>[j(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`onClick`]))}});function Qe(e){let t=new Date(e),n=t.getHours(),r=e=>String(e).padStart(2,`0`),i=new Intl.DateTimeFormat(void 0,{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value;return`${n%12==0?12:n%12}:${r(t.getMinutes())}:${r(t.getSeconds())} ${n<12?`AM`:`PM`}${i?` ${i}`:``}`}function $e(e,t={}){let n=e.detail.originalEvent,r=n.target;if(!r?.isConnected){e.preventDefault();return}t.scrollable&&(n.offsetX>r.clientWidth||n.offsetY>r.clientHeight)&&e.preventDefault()}var et={slots:{overlay:`fixed inset-0 bg-elevated/75`,content:`fixed bg-default divide-y divide-default sm:ring ring-default sm:shadow-lg flex flex-col focus:outline-none`,header:`flex items-center gap-1.5 p-4 sm:px-6 min-h-(--ui-header-height)`,wrapper:``,body:`flex-1 overflow-y-auto p-4 sm:p-6`,footer:`flex items-center gap-1.5 p-4 sm:px-6`,title:`text-highlighted font-semibold`,description:`mt-1 text-muted text-sm`,close:`absolute top-4 end-4`},variants:{side:{top:{content:``},right:{content:`max-w-md`},bottom:{content:``},left:{content:`max-w-md`}},inset:{true:{content:`rounded-lg`}},transition:{true:{overlay:`data-[state=open]:animate-[fade-in_200ms_var(--ease-out)] data-[state=closed]:animate-[fade-out_200ms_var(--ease-out)]`}}},compoundVariants:[{side:`top`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 top-4`}},{side:`top`,inset:!1,class:{content:`max-h-full inset-x-0 top-0`}},{side:`right`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 right-4`}},{side:`right`,inset:!1,class:{content:`w-full inset-y-0 right-0`}},{side:`bottom`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 bottom-4`}},{side:`bottom`,inset:!1,class:{content:`max-h-full inset-x-0 bottom-0`}},{side:`left`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 left-4`}},{side:`left`,inset:!1,class:{content:`w-full inset-y-0 left-0`}},{transition:!0,side:`top`,class:{content:`data-[state=open]:animate-[slide-in-from-top_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-top_200ms_var(--ease-out)]`}},{transition:!0,side:`right`,class:{content:`data-[state=open]:animate-[slide-in-from-right_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-right_200ms_var(--ease-out)]`}},{transition:!0,side:`bottom`,class:{content:`data-[state=open]:animate-[slide-in-from-bottom_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-bottom_200ms_var(--ease-out)]`}},{transition:!0,side:`left`,class:{content:`data-[state=open]:animate-[slide-in-from-left_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-left_200ms_var(--ease-out)]`}}]},tt={__name:`Slideover`,props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},transition:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1,default:`right`},inset:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1}},emits:[`leave`,`after:leave`,`enter`,`after:enter`,`close:prevent`,`update:open`],setup(e,{emit:t}){let n=e,r=t,i=ve(),a=D(`slideover`,n),{t:o}=_(),s=b(),c=ae(ce(a,`open`,`defaultOpen`,`modal`,`unmountOnHide`),r),l=be(ne(()=>a.portal)),u=ne(()=>a.content),d=V(()=>a.dismissible?{pointerDownOutside:$e}:[`interactOutside`,`escapeKeyDown`].reduce((e,t)=>(e[t]=e=>{e.preventDefault(),r(`close:prevent`)},e),{})),f=V(()=>oe({extend:et,...s.ui?.slideover||{}})({transition:a.transition,side:a.side,inset:a.inset}));return(e,t)=>(W(),k(P(Be),xe(m(P(c))),{default:C(({open:n,close:c})=>[i.default?(W(),k(P(Ze),{key:0,"as-child":``,class:G(P(a).class)},{default:C(()=>[j(e.$slots,`default`,{open:n})]),_:2},1032,[`class`])):R(``,!0),L(P(Ye),w(P(l),{"force-mount":P(l).disabled&&P(a).unmountOnHide===!1||void 0}),{default:C(()=>[L(P(ge),null,{default:C(()=>[P(a).overlay?(W(),k(P(Je),{key:0,"data-slot":`overlay`,class:G(f.value.overlay({class:P(a).ui?.overlay}))},null,8,[`class`])):R(``,!0),L(P(Ge),w({"data-side":P(a).side,"data-slot":`content`,class:f.value.content({class:[!i.default&&P(a).class,P(a).ui?.content]})},u.value,{onEnter:t[0]||=e=>r(`enter`),onAfterEnter:t[1]||=e=>r(`after:enter`),onLeave:t[2]||=e=>r(`leave`),onAfterLeave:t[3]||=e=>r(`after:leave`)},_e(d.value)),{default:C(()=>[!P(a).title&&!i.title||!P(a).description&&!i.description||i.content?(W(),k(P(q),{key:0},{default:C(()=>[!P(a).title&&!i.title?(W(),k(P(Xe),{key:0})):i.content?(W(),k(P(Xe),{key:1},{default:C(()=>[j(e.$slots,`title`,{},()=>[z(K(P(a).title),1)])]),_:3})):R(``,!0),!P(a).description&&!i.description?(W(),k(P(Ke),{key:2})):i.content?(W(),k(P(Ke),{key:3},{default:C(()=>[j(e.$slots,`description`,{},()=>[z(K(P(a).description),1)])]),_:3})):R(``,!0)]),_:3})):R(``,!0),j(e.$slots,`content`,{close:c},()=>[i.header||P(a).title||i.title||P(a).description||i.description||P(a).close||i.close?(W(),H(`div`,{key:0,"data-slot":`header`,class:G(f.value.header({class:P(a).ui?.header}))},[j(e.$slots,`header`,{close:c},()=>[P(a).title||i.title||P(a).description||i.description?(W(),H(`div`,{key:0,"data-slot":`wrapper`,class:G(f.value.wrapper({class:P(a).ui?.wrapper}))},[P(a).title||i.title?(W(),k(P(Xe),{key:0,"data-slot":`title`,class:G(f.value.title({class:P(a).ui?.title}))},{default:C(()=>[j(e.$slots,`title`,{},()=>[z(K(P(a).title),1)])]),_:3},8,[`class`])):R(``,!0),P(a).description||i.description?(W(),k(P(Ke),{key:1,"data-slot":`description`,class:G(f.value.description({class:P(a).ui?.description}))},{default:C(()=>[j(e.$slots,`description`,{},()=>[z(K(P(a).description),1)])]),_:3},8,[`class`])):R(``,!0)],2)):R(``,!0),j(e.$slots,`actions`),P(a).close||i.close?(W(),k(P(Ve),{key:1,"as-child":``},{default:C(()=>[j(e.$slots,`close`,{ui:f.value},()=>[P(a).close?(W(),k(ee,w({key:0,icon:P(a).closeIcon||P(s).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":P(o)(`slideover.close`)},typeof P(a).close==`object`?P(a).close:{},{"data-slot":`close`,class:f.value.close({class:P(a).ui?.close})}),null,16,[`icon`,`aria-label`,`class`])):R(``,!0)])]),_:2},1024)):R(``,!0)])],2)):R(``,!0),F(`div`,{"data-slot":`body`,class:G(f.value.body({class:P(a).ui?.body}))},[j(e.$slots,`body`,{close:c})],2),i.footer?(W(),H(`div`,{key:1,"data-slot":`footer`,class:G(f.value.footer({class:P(a).ui?.footer}))},[j(e.$slots,`footer`,{close:c})],2)):R(``,!0)])]),_:2},1040,[`data-side`,`class`])]),_:2},1024)]),_:2},1040,[`force-mount`])]),_:3},16))}},nt=[`data-expanded`,`data-overflowing`],rt={key:0,class:`fade pointer-events-none absolute inset-x-0 bottom-6 h-10`},it={key:1,class:`mt-1 flex justify-start`},at=[`aria-expanded`],ot=c(N({__name:`ExpandableText`,props:{lines:{default:5}},setup(e){let t=e,n=O(!1),r=O(!1),i=O(null),a=`expandable-${Math.random().toString(36).slice(2,8)}`;function o(){let e=i.value;e&&!n.value&&(r.value=e.scrollHeight>e.clientHeight+1)}let s=null;E(()=>{o(),typeof ResizeObserver<`u`&&i.value&&(s=new ResizeObserver(()=>o()),s.observe(i.value))}),g(()=>s?.disconnect()),I(n,e=>{e||Promise.resolve().then(o)});function c(){n.value=!n.value}function l(e){!n.value&&r.value&&(e.target?.closest?.(`a`)||(n.value=!0))}return(e,o)=>(W(),H(`div`,{class:G([`expandable group relative`,!n.value&&r.value?`cursor-pointer`:``]),"data-expanded":n.value?`1`:`0`,"data-overflowing":r.value?`1`:`0`,onClick:l},[F(`div`,{id:a,ref_key:`body`,ref:i,class:G([`body`,n.value?``:`clamped`]),style:A(n.value?void 0:{"--expandable-lines":String(t.lines)})},[j(e.$slots,`default`,{},void 0,!0)],6),!n.value&&r.value?(W(),H(`div`,rt)):R(``,!0),r.value||n.value?(W(),H(`div`,it,[F(`button`,{type:`button`,class:`more cursor-pointer text-xs text-dimmed group-hover:text-primary hover:underline focus-visible:outline-2 focus-visible:outline-primary`,"aria-expanded":n.value?`true`:`false`,"aria-controls":a,onClick:T(c,[`stop`])},K(n.value?`Show less`:`Show more`),9,at)])):R(``,!0)],10,nt))}}),[[`__scopeId`,`data-v-ce3bfa89`]]);function st(e,t){let n=e.ownerDocument;e.textContent=``;let r=String(t??``).replace(/\r\n?/g,`
|
|
2
2
|
`).split(`
|
|
3
3
|
`),i=/^(\s*)([-*]|\d+[.)])\s+(.*)$/,a=/^(```|#{1,6}\s|>)/;function o(e,t){let r=n.createElement(t);return e.appendChild(r),r}function s(e,t){t&&e.appendChild(n.createTextNode(t))}function c(e){let t=e.trim();return t[0]===`|`&&(t=t.slice(1)),t[t.length-1]===`|`&&(t=t.slice(0,-1)),t.split(`|`).map(e=>e.trim())}function l(e){let t=e.trim();return t.indexOf(`|`)<0||!/^[\s:|-]+$/.test(t)?!1:c(t).every(e=>/^:?-+:?$/.test(e))}function u(e,t){let n=e[t];return n.indexOf(`|`)<0||l(n)||t+1>=e.length||!l(e[t+1])?!1:c(n).length===c(e[t+1]).length}function d(e,t){let n=0,r=``,i=()=>{s(e,r),r=``};for(;n<t.length;){let a=t[n];if(a==="`"){let r=t.indexOf("`",n+1);if(r>n+1){i(),o(e,`code`).textContent=t.slice(n+1,r),n=r+1;continue}}else if(a===`*`&&t[n+1]===`*`){let r=t.indexOf(`**`,n+2);if(r>n+2){i(),d(o(e,`strong`),t.slice(n+2,r)),n=r+2;continue}}else if(a===`*`||a===`_`){let r=n>0?t[n-1]:``;if(/\S/.test(t[n+1]||``)&&!/\w/.test(r)){let r=-1;for(let e=n+2;e<t.length;e++)if(t[e]===a&&/\S/.test(t[e-1])&&!/\w/.test(t[e+1]||``)){r=e;break}if(r>0){i(),d(o(e,`em`),t.slice(n+1,r)),n=r+1;continue}}}else if(a===`[`){let r=/^\[([^\]\n]+)\]\(([^)\s]+)\)/.exec(t.slice(n));if(r&&/^https?:\/\//i.test(r[2])){i();let t=o(e,`a`);t.setAttribute(`href`,r[2]),t.setAttribute(`rel`,`noopener noreferrer`),t.setAttribute(`target`,`_blank`),d(t,r[1]),n+=r[0].length;continue}}r+=a,n++}i()}function f(e,t,n=0){let r=0;for(;r<t.length;){let s=t[r];if(/^\s*$/.test(s)){r++;continue}if(/^```/.test(s)){let n=[];for(r++;r<t.length&&!/^```\s*$/.test(t[r]);)n.push(t[r++]);r++,o(o(e,`pre`),`code`).textContent=n.join(`
|
|
4
4
|
`);continue}let l=/^(#{1,6})\s+(\S.*?)\s*$/.exec(s);if(l){d(o(e,`h`+l[1].length),l[2]),r++;continue}if(s[0]===`>`&&n<8){let i=[];for(;r<t.length&&t[r][0]===`>`;)i.push(t[r++].replace(/^>\s?/,``));f(o(e,`blockquote`),i,n+1);continue}if(u(t,r)){let n=c(s),i=o(e,`table`),a=o(o(i,`thead`),`tr`);for(let e of n)d(o(a,`th`),e);r+=2;let l=null;for(;r<t.length&&t[r].indexOf(`|`)>=0&&!u(t,r);){l||=o(i,`tbody`);let e=c(t[r]),a=o(l,`tr`);for(let t=0;t<n.length;t++)d(o(a,`td`),t<e.length?e[t]:``);r++}continue}if(i.test(s)){let n=[],a;for(;r<t.length&&(a=i.exec(t[r]))!==null;)n.push({indent:a[1].length,ordered:/^\d/.test(a[2]),text:a[3]}),r++;let s=n[0].indent,c=o(e,n[0].ordered?`ol`:`ul`),l=null,u=null;for(let e of n)e.indent>s&&l?(u||=o(l,e.ordered?`ol`:`ul`),d(o(u,`li`),e.text)):(l=o(c,`li`),u=null,d(l,e.text));continue}let p=[];for(;r<t.length&&!/^\s*$/.test(t[r])&&!a.test(t[r])&&!i.test(t[r])&&!u(t,r);)p.push(t[r++]);p.length===0&&p.push(t[r++]),d(o(e,`p`),p.join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,n as t,t as n}from"./AppShell-Bk2gbvet.js";import{$n as r,Pr as i,Yn as a,a as o,ai as s,an as c,bi as l,gn as u,hi as d,i as f,in as p,kr as m,mn as h,on as g,pn as _,qt as v,r as y,ri as b,rn as x,sn as S,sr as C,tr as w,vi as T,xi as E}from"./seed-BglCRKLA.js";import{t as D}from"./Tooltip-BfLPyxQy.js";import{t as O}from"./RunsTabs-C4krAL9o.js";import{t as k}from"./StatusDot-DuoQnQeU.js";import{a as A,i as j,r as ee,t as M}from"./wallClock-Ckv3sKoR.js";import{C as N,E as P,O as F,S as I,T as L,_ as R,a as z,b as B,c as V,d as H,f as U,g as W,h as G,i as K,j as q,k as J,l as te,m as ne,n as Y,o as X,p as Z,s as re,t as Q,u as ie,v as ae,w as oe,x as se,y as ce}from"./favicon-DL1rdWJt.js";import{t as le}from"./localIso-L06jV29p.js";var $={class:`flex items-baseline gap-1.5 whitespace-pre-line px-2 py-1 text-xs`},ue={key:1,class:`text-dimmed`},de=[`data-kind`,`aria-label`,`href`],fe=[`data-kind`,`aria-label`],pe=u({__name:`SourceMark`,props:{kind:{},tip:{},url:{}},setup(e){let t=e,n=()=>K[t.kind]??`○`,r=()=>z[t.kind]??t.kind;return(t,a)=>{let o=D;return w(),c(o,null,{content:i(()=>[p(`span`,$,[e.kind===`slack`?(w(),c(q,{key:0})):d(K)[e.kind]?(w(),S(`span`,ue,E(n()),1)):g(``,!0),p(`span`,null,E(e.tip),1)])]),default:i(()=>[e.url?(w(),S(`a`,{key:0,class:`source linked pointer-events-auto w-[1.6em] shrink-0 rounded border border-transparent text-center text-[0.8rem] text-toned opacity-0 transition-opacity hover:border-primary/30 hover:bg-primary/10 hover:text-primary focus-visible:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none`,"data-kind":e.kind,"aria-label":`open the ${r()} thread (new tab)`,href:e.url,target:`_blank`,rel:`noopener noreferrer`},`↗`,8,de)):(w(),S(`span`,{key:1,class:T([`source pointer-events-auto w-[1.6em] shrink-0 text-center text-[0.8rem] text-dimmed opacity-0 transition-opacity focus-visible:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none`,e.kind===`cli`?`text-[0.7rem]`:``]),"data-kind":e.kind,"aria-label":`source: ${r()}`},E(n()),11,fe))]),_:1})}}}),me=[`data-run-id`,`data-started-at`,`data-persisted`,`data-expires-at`],he=[`href`,`aria-label`],ge={class:`pointer-events-auto flex items-center max-sm:order-1`},_e=[`data-agent-hue`],ve=[`href`],ye={key:3,class:`snippet min-w-0 truncate text-muted max-sm:order-6 max-sm:basis-full max-sm:whitespace-normal max-sm:pl-5 max-sm:text-[0.8rem] max-sm:leading-snug max-sm:line-clamp-2 sm:flex-1`},be={class:`hidden sm:contents`},xe={class:`expires pointer-events-auto shrink-0 text-xs tabular-nums text-warn max-sm:order-11`},Se=[`data-heat`],Ce={class:`count shrink-0 text-right text-xs tabular-nums max-sm:order-9 max-sm:text-dimmed sm:min-w-[6em] sm:text-muted`},we={class:`actions hidden min-w-[7.6em] shrink-0 justify-end gap-1.5 whitespace-nowrap sm:flex`},Te=u({__name:`RunRow`,props:{run:{},now:{},retentionMs:{}},setup(n){let r=n,a=x(()=>A(r.run.label||R(r.run.id))),s=x(()=>ne(r.run,a.value.scope)),u=x(()=>ce(r.run)),f=x(()=>G(r.run)),m=x(()=>oe(r.run)),_=x(()=>W(r.run)),y=x(()=>H(r.run,r.retentionMs)),C=x(()=>y.value!==void 0&&y.value-r.now<=864e5),O=x(()=>!r.run.finished&&!r.run.stop),M=x(()=>F(r.run.finished&&typeof r.run.finishedAt==`number`?r.run.finishedAt-r.run.startedAt:void 0,`run`)),P=x(()=>J(M.value)),U=x(()=>r.run.finished&&r.run.status&&r.run.status!==`completed`?B(r.run.status):``),K=x(()=>r.run.stop&&!(r.run.finished&&r.run.status)?N(r.run.stop):``),q={coding:`text-ok bg-ok/8 border-ok/25`,review:`text-review bg-review/8 border-review/25`,research:`text-research bg-research/8 border-research/25`,general:`text-info bg-info/8 border-info/25`,other:`text-toned bg-accented/60 border-accented`},Y=b({soft:!1,hard:!1}),Z=x(()=>[..._.value?[{label:`Open ${z[m.value.kind]??m.value.kind} thread`,icon:`i-lucide-external-link`,to:_.value,target:`_blank`}]:[],...O.value?[{label:`Stop (soft)`,icon:`i-lucide-octagon-pause`,onSelect:()=>Q(`soft`)},{label:`Kill (hard)`,icon:`i-lucide-octagon-x`,color:`error`,onSelect:()=>Q(`hard`)}]:[]]);function Q(e){(e!==`hard`||t.confirm(`Hard stop: abort this run now with no summary and free its sandbox?`))&&(Y[e]=!0,fetch(I(r.run,e),{method:`POST`,credentials:`same-origin`}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`)}).catch(()=>{Y[e]=!1}))}function $(e){e.target?.closest(`a, button`)||t.navigate(f.value)}return(t,r)=>{let b=D,x=o,A=e;return w(),S(`li`,{class:T([`run group relative rounded-md border-b border-muted hover:bg-(--ui-bg-muted) focus-within:bg-(--ui-bg-muted)`,[n.run.finished?`finished`:`live`,C.value?`leaving`:``]]),"data-run-id":n.run.id,"data-started-at":String(n.run.startedAt),"data-persisted":n.run.persisted?`1`:void 0,"data-expires-at":y.value===void 0?void 0:String(y.value),onClick:$},[p(`a`,{class:`row absolute inset-0 rounded-md focus-visible:outline-2 focus-visible:outline-primary`,href:f.value,"aria-label":`open run ${n.run.label||d(R)(n.run.id)}`},null,8,he),p(`div`,{class:T([`body pointer-events-none relative z-[1] flex min-w-0 flex-wrap items-center gap-x-2.5 px-2 max-sm:gap-y-1.5 max-sm:py-3 sm:flex-nowrap sm:py-2`,[n.run.finished?`text-muted`:``,C.value?`opacity-85`:``]])},[p(`span`,ge,[h(k,{tone:u.value,label:d(se)(n.run),tip:d(te)(n.run),pulse:!n.run.finished},null,8,[`tone`,`label`,`tip`,`pulse`])]),h(b,{text:d(L)(n.run),ui:{text:`whitespace-pre-line`}},{default:i(()=>[p(`span`,{class:T([`when pointer-events-auto shrink-0 tabular-nums max-sm:order-7 max-sm:pl-5 max-sm:text-xs max-sm:text-dimmed sm:min-w-[8.5em] sm:text-[0.8rem]`,n.run.finished?`text-dimmed`:`text-muted`])},E(d(j)(n.run.startedAt,n.now)),3)]),_:1},8,[`text`]),a.value.agent?(w(),S(`span`,{key:0,class:T([`agent shrink-0 rounded border px-1.5 text-[0.68rem] font-semibold uppercase tracking-wider max-sm:order-2`,[q[d(X)(a.value.agent)],n.run.finished?`opacity-55`:``]]),"data-agent-hue":d(X)(a.value.agent)},E(a.value.agent),11,_e)):g(``,!0),s.value?(w(),c(b,{key:1,text:s.value},{default:i(()=>[p(`a`,{class:`repo pointer-events-auto min-w-0 shrink-0 rounded border border-accented bg-accented/50 px-1.5 text-[0.72rem] font-semibold leading-normal text-toned no-underline hover:border-(--ui-text-dimmed) hover:text-highlighted max-sm:order-3`,href:`https://github.com/${s.value}`,target:`_blank`,rel:`noopener noreferrer`},E(s.value.slice(s.value.indexOf(`/`)+1)),9,ve)]),_:1},8,[`text`])):(w(),S(`span`,{key:2,class:T([`scope min-w-0 shrink-0 truncate font-semibold max-sm:order-3`,n.run.finished?`text-toned`:`text-highlighted`])},E(a.value.scope),3)),a.value.snippet===void 0?g(``,!0):(w(),S(`span`,ye,E(a.value.snippet),1)),U.value?(w(),S(`span`,{key:4,class:T([`outcome shrink-0 rounded border px-1.5 text-[0.7rem] max-sm:order-10`,u.value===`red`?`border-bad/30 text-bad`:`border-warn/30 text-warn`])},E(U.value),3)):g(``,!0),K.value?(w(),S(`span`,{key:5,class:T([`stopbadge shrink-0 rounded border px-1.5 text-[0.7rem] max-sm:order-10`,n.run.stop?.state===`stopped`?`border-accented text-muted`:`border-warn/30 text-warn`])},E(K.value),3)):g(``,!0),p(`span`,be,[h(pe,{kind:m.value.kind,tip:d(ae)(n.run),url:_.value||void 0},null,8,[`kind`,`tip`,`url`])]),C.value&&y.value!==void 0?(w(),c(b,{key:6,text:`removed at ${d(le)(y.value)}`},{default:i(()=>[p(`span`,xe,`gone `+E(d(ee)(y.value,n.now)),1)]),_:1},8,[`text`])):g(``,!0),h(b,{text:n.run.finished?`start to finish`:`running for`},{default:i(()=>[p(`span`,{class:T([`elapsed pointer-events-auto ml-auto shrink-0 text-right text-xs tabular-nums max-sm:order-4 sm:min-w-[4.5em]`,n.run.finished?[P.value?`heat`:`text-muted`,M.value.level>=2?`font-medium`:``]:`text-ok`]),style:l(n.run.finished?P.value:void 0),"data-heat":n.run.finished?M.value.level:void 0},E(d(ie)(n.run,n.now)),15,Se)]),_:1},8,[`text`]),r[2]||=p(`span`,{class:`hidden text-xs text-dimmed max-sm:order-8 max-sm:inline`,"aria-hidden":`true`},`·`,-1),h(b,{text:d(V)(n.run)},{default:i(()=>[p(`span`,Ce,E(d(re)(n.run)),1)]),_:1},8,[`text`]),p(`span`,we,[O.value?(w(),S(v,{key:0},[h(b,{text:`Soft stop: no new steps, the agent writes up what it has`},{default:i(()=>[h(x,{class:`pointer-events-auto`,size:`xs`,color:`neutral`,variant:`outline`,label:`Stop`,disabled:Y.soft,onClick:r[0]||=e=>Q(`soft`)},null,8,[`disabled`])]),_:1}),h(b,{text:`Hard stop: abort now, no summary, free the sandbox`},{default:i(()=>[h(x,{class:`pointer-events-auto`,size:`xs`,color:`error`,variant:`outline`,label:`Kill`,disabled:Y.hard,onClick:r[1]||=e=>Q(`hard`)},null,8,[`disabled`])]),_:1})],64)):g(``,!0)]),Z.value.length>0?(w(),c(A,{key:7,items:Z.value,content:{align:`end`}},{default:i(()=>[h(x,{class:`pointer-events-auto -my-1.5 -mr-1 max-sm:order-5 sm:hidden`,size:`md`,color:`neutral`,variant:`ghost`,icon:`i-lucide-ellipsis-vertical`,"aria-label":`Run actions`})]),_:1},8,[`items`])):g(``,!0)],2)],10,me)}}}),Ee={class:`conn flex items-center gap-1.5`},De={id:`state`,class:`text-xs text-muted`},Oe={class:`toolbar mb-1.5 flex items-center gap-4 px-2 text-xs text-muted`},ke={id:`livecount`,class:`count tabular-nums`},Ae={class:`filter ml-auto inline-flex items-center gap-1.5`},je={class:`toggle inline-flex cursor-pointer select-none items-center gap-1.5 text-toned hover:text-highlighted`},Me=[`checked`],Ne={id:`retention`,class:`sr-only`},Pe={key:0,class:`banner mb-3 rounded-md border border-warn px-2.5 py-1.5 text-[0.8rem] text-warn`,role:`status`},Fe={id:`runs`,class:`m-0 list-none border-t border-muted p-0`},Ie={key:0,id:`leaving`,class:`divider flex items-baseline gap-2 border-b border-dashed border-warn/40 px-2 pb-1.5 pt-3 text-[0.72rem] uppercase tracking-wider text-warn`,role:`separator`},Le={key:1,id:`empty`,class:`empty px-2 py-2 text-muted`},Re={key:1,class:`pager mt-3 flex items-baseline gap-2 px-2 text-[0.8rem] text-muted`,"aria-label":`Completed runs pages`},ze={class:`range tabular-nums text-dimmed`},Be=[`href`],Ve=u({__name:`RunsIndexPage`,setup(e){let o=y(`runs`),l=o?.all??!1,u=o?.olderThan!==void 0,T=o?.retentionDays??null,A=T===null?void 0:T*864e5,j=f(T),N=b(new Map);for(let e of o?.rows??[])N.set(e.id,e);let F=M(o?.now),I=s({tone:`amber`,text:`connecting…`}),L=x(()=>[...N.values()].sort((e,t)=>t.startedAt-e.startedAt)),R=x(()=>L.value.filter(e=>!e.finished).length),z=x(()=>A===void 0?-1:L.value.findIndex(e=>{let t=H(e,A);return t!==void 0&&t-F.value<=864e5})),B=x(()=>z.value===-1?L.value:L.value.slice(0,z.value)),V=x(()=>z.value===-1?[]:L.value.slice(z.value)),W=l?`All runs`:`Live runs`;m(R,e=>{t.setTitle((e>0?`(${e}) `:``)+W),t.setFavicon(e>0?Y:Q)},{immediate:!0});function G(e){t.navigate(e.target.checked?`/runs?all=1`:`/runs`)}let K=x(()=>o?.olderThan===void 0?``:ee(o.olderThan,F.value)),q=P(),J=null;return a(()=>{J=q(l?`/runs?stream=1&all=1`:`/runs?stream=1`);let e=!1;J.onopen=()=>{if(e){t.reload();return}e=!0,I.value={tone:`green`,text:`connected`}},J.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}let n=t.type===`removed`?t.id:t.run?.id,r=n?N.get(n):void 0;if(u&&!r)return;let i=U(t,l,r?.persisted===!0);i.op===`upsert`?N.set(i.run.id,Z(N.get(i.run.id),i.run)):i.op===`remove`&&N.delete(i.id)},J.onerror=()=>{J&&J.readyState===2?I.value={tone:`red`,text:`disconnected`}:I.value={tone:`amber`,text:`connecting…`}}}),r(()=>{J?.close()}),(e,t)=>{let r=D;return w(),c(n,{title:d(W),nav:`runs`},{status:i(()=>[p(`span`,Ee,[h(k,{tone:I.value.tone,label:I.value.text},null,8,[`tone`,`label`]),p(`span`,De,E(I.value.text),1)])]),default:i(()=>[h(O,{current:`runs`}),p(`div`,Oe,[p(`span`,ke,E(R.value)+` running`,1),p(`span`,Ae,[p(`label`,je,[p(`input`,{id:`showdone`,type:`checkbox`,class:`accent-green-600`,checked:d(l),"aria-describedby":`retention`,onChange:G},null,40,Me),t[0]||=_(` Show completed `,-1)]),h(r,{text:d(j)},{default:i(()=>[...t[1]||=[p(`span`,{class:`help inline-flex size-[1.1em] cursor-help items-center justify-center rounded-full border border-accented text-[0.7rem] leading-none text-dimmed hover:border-(--ui-text-dimmed) hover:text-toned`,tabindex:`0`},`?`,-1)]]),_:1},8,[`text`]),p(`span`,Ne,E(d(j)),1)])]),d(o)?.storeUnavailable?(w(),S(`p`,Pe,E(d(o).storeUnavailable),1)):g(``,!0),p(`ul`,Fe,[(w(!0),S(v,null,C(B.value,e=>(w(),c(Te,{key:e.id,run:e,now:d(F),"retention-ms":d(A)},null,8,[`run`,`now`,`retention-ms`]))),128)),V.value.length>0?(w(),S(`li`,Ie,[...t[2]||=[p(`span`,{"aria-hidden":`true`,class:`text-sm tracking-normal`},`⏳`,-1),p(`span`,{class:`whitespace-nowrap`},`Leaving within a day`,-1),p(`span`,{class:`normal-case tracking-normal text-dimmed max-sm:hidden`},`— each row says when it is removed`,-1)]])):g(``,!0),(w(!0),S(v,null,C(V.value,e=>(w(),c(Te,{key:e.id,run:e,now:d(F),"retention-ms":d(A)},null,8,[`run`,`now`,`retention-ms`]))),128)),L.value.length===0?(w(),S(`li`,Le,E(d(l)?`No runs.`:`No active runs.`),1)):g(``,!0)]),d(l)&&(d(o)?.olderHref||d(o)?.olderThan!==void 0)?(w(),S(`nav`,Re,[d(o)?.olderThan===void 0?g(``,!0):(w(),S(v,{key:0},[t[3]||=p(`a`,{class:`text-primary hover:underline`,href:`/runs?all=1`},`← Newest runs`,-1),p(`span`,ze,`· runs finished before `+E(K.value),1)],64)),d(o)?.olderHref?(w(),S(`a`,{key:1,class:`older ml-auto text-primary hover:underline`,href:d(o).olderHref},`Older runs →`,8,Be)):g(``,!0)])):g(``,!0)]),_:1},8,[`title`])}}});export{Ve as default};
|
|
1
|
+
import{a as e,n as t,t as n}from"./AppShell-Bk2gbvet.js";import{$n as r,Pr as i,Yn as a,a as o,ai as s,an as c,bi as l,gn as u,hi as d,i as f,in as p,kr as m,mn as h,on as g,pn as _,qt as v,r as y,ri as b,rn as x,sn as S,sr as C,tr as w,vi as T,xi as E}from"./seed-BglCRKLA.js";import{t as D}from"./Tooltip-C7yR095Y.js";import{t as O}from"./RunsTabs-C4krAL9o.js";import{t as k}from"./StatusDot-DvV0z_-s.js";import{a as A,i as j,r as ee,t as M}from"./wallClock-Ckv3sKoR.js";import{C as N,E as P,O as F,S as I,T as L,_ as R,a as z,b as B,c as V,d as H,f as U,g as W,h as G,i as K,j as q,k as J,l as te,m as ne,n as Y,o as X,p as Z,s as re,t as Q,u as ie,v as ae,w as oe,x as se,y as ce}from"./favicon-DL1rdWJt.js";import{t as le}from"./localIso-L06jV29p.js";var $={class:`flex items-baseline gap-1.5 whitespace-pre-line px-2 py-1 text-xs`},ue={key:1,class:`text-dimmed`},de=[`data-kind`,`aria-label`,`href`],fe=[`data-kind`,`aria-label`],pe=u({__name:`SourceMark`,props:{kind:{},tip:{},url:{}},setup(e){let t=e,n=()=>K[t.kind]??`○`,r=()=>z[t.kind]??t.kind;return(t,a)=>{let o=D;return w(),c(o,null,{content:i(()=>[p(`span`,$,[e.kind===`slack`?(w(),c(q,{key:0})):d(K)[e.kind]?(w(),S(`span`,ue,E(n()),1)):g(``,!0),p(`span`,null,E(e.tip),1)])]),default:i(()=>[e.url?(w(),S(`a`,{key:0,class:`source linked pointer-events-auto w-[1.6em] shrink-0 rounded border border-transparent text-center text-[0.8rem] text-toned opacity-0 transition-opacity hover:border-primary/30 hover:bg-primary/10 hover:text-primary focus-visible:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none`,"data-kind":e.kind,"aria-label":`open the ${r()} thread (new tab)`,href:e.url,target:`_blank`,rel:`noopener noreferrer`},`↗`,8,de)):(w(),S(`span`,{key:1,class:T([`source pointer-events-auto w-[1.6em] shrink-0 text-center text-[0.8rem] text-dimmed opacity-0 transition-opacity focus-visible:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none`,e.kind===`cli`?`text-[0.7rem]`:``]),"data-kind":e.kind,"aria-label":`source: ${r()}`},E(n()),11,fe))]),_:1})}}}),me=[`data-run-id`,`data-started-at`,`data-persisted`,`data-expires-at`],he=[`href`,`aria-label`],ge={class:`pointer-events-auto flex items-center max-sm:order-1`},_e=[`data-agent-hue`],ve=[`href`],ye={key:3,class:`snippet min-w-0 truncate text-muted max-sm:order-6 max-sm:basis-full max-sm:whitespace-normal max-sm:pl-5 max-sm:text-[0.8rem] max-sm:leading-snug max-sm:line-clamp-2 sm:flex-1`},be={class:`hidden sm:contents`},xe={class:`expires pointer-events-auto shrink-0 text-xs tabular-nums text-warn max-sm:order-11`},Se=[`data-heat`],Ce={class:`count shrink-0 text-right text-xs tabular-nums max-sm:order-9 max-sm:text-dimmed sm:min-w-[6em] sm:text-muted`},we={class:`actions hidden min-w-[7.6em] shrink-0 justify-end gap-1.5 whitespace-nowrap sm:flex`},Te=u({__name:`RunRow`,props:{run:{},now:{},retentionMs:{}},setup(n){let r=n,a=x(()=>A(r.run.label||R(r.run.id))),s=x(()=>ne(r.run,a.value.scope)),u=x(()=>ce(r.run)),f=x(()=>G(r.run)),m=x(()=>oe(r.run)),_=x(()=>W(r.run)),y=x(()=>H(r.run,r.retentionMs)),C=x(()=>y.value!==void 0&&y.value-r.now<=864e5),O=x(()=>!r.run.finished&&!r.run.stop),M=x(()=>F(r.run.finished&&typeof r.run.finishedAt==`number`?r.run.finishedAt-r.run.startedAt:void 0,`run`)),P=x(()=>J(M.value)),U=x(()=>r.run.finished&&r.run.status&&r.run.status!==`completed`?B(r.run.status):``),K=x(()=>r.run.stop&&!(r.run.finished&&r.run.status)?N(r.run.stop):``),q={coding:`text-ok bg-ok/8 border-ok/25`,review:`text-review bg-review/8 border-review/25`,research:`text-research bg-research/8 border-research/25`,general:`text-info bg-info/8 border-info/25`,other:`text-toned bg-accented/60 border-accented`},Y=b({soft:!1,hard:!1}),Z=x(()=>[..._.value?[{label:`Open ${z[m.value.kind]??m.value.kind} thread`,icon:`i-lucide-external-link`,to:_.value,target:`_blank`}]:[],...O.value?[{label:`Stop (soft)`,icon:`i-lucide-octagon-pause`,onSelect:()=>Q(`soft`)},{label:`Kill (hard)`,icon:`i-lucide-octagon-x`,color:`error`,onSelect:()=>Q(`hard`)}]:[]]);function Q(e){(e!==`hard`||t.confirm(`Hard stop: abort this run now with no summary and free its sandbox?`))&&(Y[e]=!0,fetch(I(r.run,e),{method:`POST`,credentials:`same-origin`}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`)}).catch(()=>{Y[e]=!1}))}function $(e){e.target?.closest(`a, button`)||t.navigate(f.value)}return(t,r)=>{let b=D,x=o,A=e;return w(),S(`li`,{class:T([`run group relative rounded-md border-b border-muted hover:bg-(--ui-bg-muted) focus-within:bg-(--ui-bg-muted)`,[n.run.finished?`finished`:`live`,C.value?`leaving`:``]]),"data-run-id":n.run.id,"data-started-at":String(n.run.startedAt),"data-persisted":n.run.persisted?`1`:void 0,"data-expires-at":y.value===void 0?void 0:String(y.value),onClick:$},[p(`a`,{class:`row absolute inset-0 rounded-md focus-visible:outline-2 focus-visible:outline-primary`,href:f.value,"aria-label":`open run ${n.run.label||d(R)(n.run.id)}`},null,8,he),p(`div`,{class:T([`body pointer-events-none relative z-[1] flex min-w-0 flex-wrap items-center gap-x-2.5 px-2 max-sm:gap-y-1.5 max-sm:py-3 sm:flex-nowrap sm:py-2`,[n.run.finished?`text-muted`:``,C.value?`opacity-85`:``]])},[p(`span`,ge,[h(k,{tone:u.value,label:d(se)(n.run),tip:d(te)(n.run),pulse:!n.run.finished},null,8,[`tone`,`label`,`tip`,`pulse`])]),h(b,{text:d(L)(n.run),ui:{text:`whitespace-pre-line`}},{default:i(()=>[p(`span`,{class:T([`when pointer-events-auto shrink-0 tabular-nums max-sm:order-7 max-sm:pl-5 max-sm:text-xs max-sm:text-dimmed sm:min-w-[8.5em] sm:text-[0.8rem]`,n.run.finished?`text-dimmed`:`text-muted`])},E(d(j)(n.run.startedAt,n.now)),3)]),_:1},8,[`text`]),a.value.agent?(w(),S(`span`,{key:0,class:T([`agent shrink-0 rounded border px-1.5 text-[0.68rem] font-semibold uppercase tracking-wider max-sm:order-2`,[q[d(X)(a.value.agent)],n.run.finished?`opacity-55`:``]]),"data-agent-hue":d(X)(a.value.agent)},E(a.value.agent),11,_e)):g(``,!0),s.value?(w(),c(b,{key:1,text:s.value},{default:i(()=>[p(`a`,{class:`repo pointer-events-auto min-w-0 shrink-0 rounded border border-accented bg-accented/50 px-1.5 text-[0.72rem] font-semibold leading-normal text-toned no-underline hover:border-(--ui-text-dimmed) hover:text-highlighted max-sm:order-3`,href:`https://github.com/${s.value}`,target:`_blank`,rel:`noopener noreferrer`},E(s.value.slice(s.value.indexOf(`/`)+1)),9,ve)]),_:1},8,[`text`])):(w(),S(`span`,{key:2,class:T([`scope min-w-0 shrink-0 truncate font-semibold max-sm:order-3`,n.run.finished?`text-toned`:`text-highlighted`])},E(a.value.scope),3)),a.value.snippet===void 0?g(``,!0):(w(),S(`span`,ye,E(a.value.snippet),1)),U.value?(w(),S(`span`,{key:4,class:T([`outcome shrink-0 rounded border px-1.5 text-[0.7rem] max-sm:order-10`,u.value===`red`?`border-bad/30 text-bad`:`border-warn/30 text-warn`])},E(U.value),3)):g(``,!0),K.value?(w(),S(`span`,{key:5,class:T([`stopbadge shrink-0 rounded border px-1.5 text-[0.7rem] max-sm:order-10`,n.run.stop?.state===`stopped`?`border-accented text-muted`:`border-warn/30 text-warn`])},E(K.value),3)):g(``,!0),p(`span`,be,[h(pe,{kind:m.value.kind,tip:d(ae)(n.run),url:_.value||void 0},null,8,[`kind`,`tip`,`url`])]),C.value&&y.value!==void 0?(w(),c(b,{key:6,text:`removed at ${d(le)(y.value)}`},{default:i(()=>[p(`span`,xe,`gone `+E(d(ee)(y.value,n.now)),1)]),_:1},8,[`text`])):g(``,!0),h(b,{text:n.run.finished?`start to finish`:`running for`},{default:i(()=>[p(`span`,{class:T([`elapsed pointer-events-auto ml-auto shrink-0 text-right text-xs tabular-nums max-sm:order-4 sm:min-w-[4.5em]`,n.run.finished?[P.value?`heat`:`text-muted`,M.value.level>=2?`font-medium`:``]:`text-ok`]),style:l(n.run.finished?P.value:void 0),"data-heat":n.run.finished?M.value.level:void 0},E(d(ie)(n.run,n.now)),15,Se)]),_:1},8,[`text`]),r[2]||=p(`span`,{class:`hidden text-xs text-dimmed max-sm:order-8 max-sm:inline`,"aria-hidden":`true`},`·`,-1),h(b,{text:d(V)(n.run)},{default:i(()=>[p(`span`,Ce,E(d(re)(n.run)),1)]),_:1},8,[`text`]),p(`span`,we,[O.value?(w(),S(v,{key:0},[h(b,{text:`Soft stop: no new steps, the agent writes up what it has`},{default:i(()=>[h(x,{class:`pointer-events-auto`,size:`xs`,color:`neutral`,variant:`outline`,label:`Stop`,disabled:Y.soft,onClick:r[0]||=e=>Q(`soft`)},null,8,[`disabled`])]),_:1}),h(b,{text:`Hard stop: abort now, no summary, free the sandbox`},{default:i(()=>[h(x,{class:`pointer-events-auto`,size:`xs`,color:`error`,variant:`outline`,label:`Kill`,disabled:Y.hard,onClick:r[1]||=e=>Q(`hard`)},null,8,[`disabled`])]),_:1})],64)):g(``,!0)]),Z.value.length>0?(w(),c(A,{key:7,items:Z.value,content:{align:`end`}},{default:i(()=>[h(x,{class:`pointer-events-auto -my-1.5 -mr-1 max-sm:order-5 sm:hidden`,size:`md`,color:`neutral`,variant:`ghost`,icon:`i-lucide-ellipsis-vertical`,"aria-label":`Run actions`})]),_:1},8,[`items`])):g(``,!0)],2)],10,me)}}}),Ee={class:`conn flex items-center gap-1.5`},De={id:`state`,class:`text-xs text-muted`},Oe={class:`toolbar mb-1.5 flex items-center gap-4 px-2 text-xs text-muted`},ke={id:`livecount`,class:`count tabular-nums`},Ae={class:`filter ml-auto inline-flex items-center gap-1.5`},je={class:`toggle inline-flex cursor-pointer select-none items-center gap-1.5 text-toned hover:text-highlighted`},Me=[`checked`],Ne={id:`retention`,class:`sr-only`},Pe={key:0,class:`banner mb-3 rounded-md border border-warn px-2.5 py-1.5 text-[0.8rem] text-warn`,role:`status`},Fe={id:`runs`,class:`m-0 list-none border-t border-muted p-0`},Ie={key:0,id:`leaving`,class:`divider flex items-baseline gap-2 border-b border-dashed border-warn/40 px-2 pb-1.5 pt-3 text-[0.72rem] uppercase tracking-wider text-warn`,role:`separator`},Le={key:1,id:`empty`,class:`empty px-2 py-2 text-muted`},Re={key:1,class:`pager mt-3 flex items-baseline gap-2 px-2 text-[0.8rem] text-muted`,"aria-label":`Completed runs pages`},ze={class:`range tabular-nums text-dimmed`},Be=[`href`],Ve=u({__name:`RunsIndexPage`,setup(e){let o=y(`runs`),l=o?.all??!1,u=o?.olderThan!==void 0,T=o?.retentionDays??null,A=T===null?void 0:T*864e5,j=f(T),N=b(new Map);for(let e of o?.rows??[])N.set(e.id,e);let F=M(o?.now),I=s({tone:`amber`,text:`connecting…`}),L=x(()=>[...N.values()].sort((e,t)=>t.startedAt-e.startedAt)),R=x(()=>L.value.filter(e=>!e.finished).length),z=x(()=>A===void 0?-1:L.value.findIndex(e=>{let t=H(e,A);return t!==void 0&&t-F.value<=864e5})),B=x(()=>z.value===-1?L.value:L.value.slice(0,z.value)),V=x(()=>z.value===-1?[]:L.value.slice(z.value)),W=l?`All runs`:`Live runs`;m(R,e=>{t.setTitle((e>0?`(${e}) `:``)+W),t.setFavicon(e>0?Y:Q)},{immediate:!0});function G(e){t.navigate(e.target.checked?`/runs?all=1`:`/runs`)}let K=x(()=>o?.olderThan===void 0?``:ee(o.olderThan,F.value)),q=P(),J=null;return a(()=>{J=q(l?`/runs?stream=1&all=1`:`/runs?stream=1`);let e=!1;J.onopen=()=>{if(e){t.reload();return}e=!0,I.value={tone:`green`,text:`connected`}},J.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}let n=t.type===`removed`?t.id:t.run?.id,r=n?N.get(n):void 0;if(u&&!r)return;let i=U(t,l,r?.persisted===!0);i.op===`upsert`?N.set(i.run.id,Z(N.get(i.run.id),i.run)):i.op===`remove`&&N.delete(i.id)},J.onerror=()=>{J&&J.readyState===2?I.value={tone:`red`,text:`disconnected`}:I.value={tone:`amber`,text:`connecting…`}}}),r(()=>{J?.close()}),(e,t)=>{let r=D;return w(),c(n,{title:d(W),nav:`runs`},{status:i(()=>[p(`span`,Ee,[h(k,{tone:I.value.tone,label:I.value.text},null,8,[`tone`,`label`]),p(`span`,De,E(I.value.text),1)])]),default:i(()=>[h(O,{current:`runs`}),p(`div`,Oe,[p(`span`,ke,E(R.value)+` running`,1),p(`span`,Ae,[p(`label`,je,[p(`input`,{id:`showdone`,type:`checkbox`,class:`accent-green-600`,checked:d(l),"aria-describedby":`retention`,onChange:G},null,40,Me),t[0]||=_(` Show completed `,-1)]),h(r,{text:d(j)},{default:i(()=>[...t[1]||=[p(`span`,{class:`help inline-flex size-[1.1em] cursor-help items-center justify-center rounded-full border border-accented text-[0.7rem] leading-none text-dimmed hover:border-(--ui-text-dimmed) hover:text-toned`,tabindex:`0`},`?`,-1)]]),_:1},8,[`text`]),p(`span`,Ne,E(d(j)),1)])]),d(o)?.storeUnavailable?(w(),S(`p`,Pe,E(d(o).storeUnavailable),1)):g(``,!0),p(`ul`,Fe,[(w(!0),S(v,null,C(B.value,e=>(w(),c(Te,{key:e.id,run:e,now:d(F),"retention-ms":d(A)},null,8,[`run`,`now`,`retention-ms`]))),128)),V.value.length>0?(w(),S(`li`,Ie,[...t[2]||=[p(`span`,{"aria-hidden":`true`,class:`text-sm tracking-normal`},`⏳`,-1),p(`span`,{class:`whitespace-nowrap`},`Leaving within a day`,-1),p(`span`,{class:`normal-case tracking-normal text-dimmed max-sm:hidden`},`— each row says when it is removed`,-1)]])):g(``,!0),(w(!0),S(v,null,C(V.value,e=>(w(),c(Te,{key:e.id,run:e,now:d(F),"retention-ms":d(A)},null,8,[`run`,`now`,`retention-ms`]))),128)),L.value.length===0?(w(),S(`li`,Le,E(d(l)?`No runs.`:`No active runs.`),1)):g(``,!0)]),d(l)&&(d(o)?.olderHref||d(o)?.olderThan!==void 0)?(w(),S(`nav`,Re,[d(o)?.olderThan===void 0?g(``,!0):(w(),S(v,{key:0},[t[3]||=p(`a`,{class:`text-primary hover:underline`,href:`/runs?all=1`},`← Newest runs`,-1),p(`span`,ze,`· runs finished before `+E(K.value),1)],64)),d(o)?.olderHref?(w(),S(`a`,{key:1,class:`older ml-auto text-primary hover:underline`,href:d(o).olderHref},`Older runs →`,8,Be)):g(``,!0)])):g(``,!0)]),_:1},8,[`title`])}}});export{Ve as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-Bk2gbvet.js";import{Pr as t,an as n,gn as r,hi as i,in as a,mn as o,on as s,pn as c,qt as l,r as u,rn as d,sn as f,sr as p,tr as m,vi as h,xi as g}from"./seed-BglCRKLA.js";import{t as _}from"./Tooltip-
|
|
1
|
+
import{t as e}from"./AppShell-Bk2gbvet.js";import{Pr as t,an as n,gn as r,hi as i,in as a,mn as o,on as s,pn as c,qt as l,r as u,rn as d,sn as f,sr as p,tr as m,vi as h,xi as g}from"./seed-BglCRKLA.js";import{t as _}from"./Tooltip-C7yR095Y.js";import{t as ee}from"./RunsTabs-C4krAL9o.js";import{n as v,r as y}from"./wallClock-Ckv3sKoR.js";import{t as b}from"./localIso-L06jV29p.js";function x(e,t){return{kind:`schedule`,id:`schedule:${e}`,grants:t}}x(`self-improvement`,Object.freeze({actions:new Set([`friction:read`,`friction:write`]),channels:`all`,repos:new Set}));function S(e,t){let n=e-t,r=Math.floor(Math.abs(n)/6e4),i=Math.floor(r/60),a=Math.floor(i/24),o=a>0?`${a}d ${i%24}h`:i>0?`${i}h ${r%60}m`:r>0?`${r}m`:`<1m`;return n>=0?`in ${o}`:`${o} ago`}var C={healthz:`container health check`,watchdog:`resident watchdog`},w={completed:`succeeded`,failed:`failed`,stopped_soft:`stopped early`,stopped_hard:`killed`,"no-run":`no run created`,"ingress-error":`ingress error`,misconfigured:`misconfigured — nothing ran`},T={completed:`ok`,failed:`bad`,stopped_soft:`warn`,stopped_hard:`warn`,"no-run":`warn`,"ingress-error":`bad`,misconfigured:`bad`},E=120;function D(e){let t=e.replace(/\s+/g,` `).trim();return t=t.replace(/^[^\p{L}\p{N}*_`<[(]+/u,``),t=t.replace(/^\*[^*]{1,60}\*\s+[—–-]\s+/,``),t=t.replace(/^[^\p{L}\p{N}]+/u,``).trim(),t.length>E?`${t.slice(0,E)}…`:t}var O={key:0,class:`px-2 py-1.5 text-muted`},k={key:1,id:`scheduled`,"aria-label":`Scheduled jobs`},A={class:`m-0 list-none p-0`},j=[`data-schedule`],M={class:`def flex flex-wrap items-baseline gap-x-2 gap-y-1.5 text-[0.8rem] text-toned`},N={class:`name font-semibold text-highlighted max-sm:text-[0.9rem]`},P={class:`max-sm:ml-auto`},F={class:`rounded-xs bg-accented px-1.5 py-0.5 text-toned`},te={class:`max-sm:flex max-sm:basis-full max-sm:flex-wrap max-sm:items-baseline max-sm:gap-2 sm:contents`},I={class:`rounded-xs bg-accented px-1.5 py-0.5 text-toned`},L={class:`rounded-xs bg-accented px-1.5 py-0.5 text-toned`},R={key:1,class:`text-dimmed`},z={class:`max-sm:flex max-sm:basis-full max-sm:flex-wrap max-sm:items-baseline max-sm:gap-2 sm:contents`},B={class:`rounded-xs bg-accented px-1.5 py-0.5 text-toned`},V=[`title`],H={class:`max-sm:hidden`},U={class:`font-medium text-highlighted`},W={class:`text-dimmed`},G={class:`text-toned sm:hidden`},K={key:1,class:`text-dimmed`},q={class:`fire mt-1.5 text-xs text-muted max-sm:flex max-sm:flex-wrap max-sm:items-baseline max-sm:gap-x-1.5 max-sm:gap-y-1 sm:overflow-hidden sm:text-ellipsis sm:whitespace-nowrap`},J=[`title`],Y=[`href`],X=[`title`],Z=[`title`],Q={key:1,class:`text-dimmed`},ne={key:0,class:`mt-2.5 px-2 text-xs text-muted`},$=r({__name:`ScheduledPage`,setup(r){let x=u(`scheduled`),E=d(()=>x?.now??v()),$=d(()=>x?.rows??null),re={ok:`text-ok`,bad:`text-bad`,warn:`text-warn`};return(r,u)=>{let d=_;return m(),n(e,{title:`Scheduled runs`,nav:`runs`},{default:t(()=>[o(ee,{current:`scheduled`}),$.value===null?(m(),f(`p`,O,`No schedule registry configured.`)):(m(),f(`section`,k,[a(`ul`,A,[(m(!0),f(l,null,p($.value,e=>(m(),f(`li`,{key:e.name,class:`border-b border-muted px-2 pb-3 pt-2.5`,"data-schedule":e.name},[a(`div`,M,[o(d,{text:e.description},{default:t(()=>[a(`span`,N,g(e.name),1)]),_:2},1032,[`text`]),u[5]||=a(`span`,{class:`hidden text-accented sm:inline`,"aria-hidden":`true`},`·`,-1),a(`span`,P,[u[0]||=a(`span`,{class:`mr-1 text-[0.62rem] uppercase tracking-wider text-dimmed`},`on`,-1),a(`code`,F,g(e.worker),1)]),u[6]||=a(`span`,{class:`hidden text-accented sm:inline`,"aria-hidden":`true`},`·`,-1),a(`span`,te,[e.action.type===`run`?(m(),f(l,{key:0},[a(`code`,I,g(e.action.command),1),u[1]||=a(`span`,{class:`text-dimmed`},`as`,-1),a(`code`,L,g(e.action.identity),1)],64)):(m(),f(`span`,R,g(i(C)[e.action.type])+` — not a run`,1))]),u[7]||=a(`span`,{class:`hidden text-accented sm:inline`,"aria-hidden":`true`},`·`,-1),a(`span`,z,[a(`code`,B,g(e.cron),1),u[3]||=a(`span`,{class:`text-dimmed`},`UTC`,-1),u[4]||=a(`span`,{class:`hidden text-accented sm:inline`,"aria-hidden":`true`},`·`,-1),a(`span`,{class:`next tabular-nums max-sm:ml-auto`,title:e.nextFireAt===void 0?void 0:i(b)(e.nextFireAt)},[u[2]||=a(`span`,{class:`mr-1 text-[0.62rem] uppercase tracking-wider text-dimmed`},`next`,-1),e.nextFireAt===void 0?(m(),f(`span`,K,`never`)):(m(),f(l,{key:0},[a(`span`,H,[a(`b`,U,g(i(y)(e.nextFireAt,E.value)),1),a(`span`,W,` (`+g(i(S)(e.nextFireAt,E.value))+`)`,1)]),a(`span`,G,g(i(S)(e.nextFireAt,E.value)),1)],64))],8,V)])]),a(`div`,q,[u[12]||=a(`span`,{class:`mr-1 text-[0.62rem] uppercase tracking-wider text-dimmed`},`last`,-1),e.last?(m(),f(l,{key:0},[a(`span`,{class:h([`outcome`,re[i(T)[e.last.outcome]]])},g(i(w)[e.last.outcome]),3),u[11]||=a(`span`,{class:`mx-1.5 text-accented max-sm:mx-0`,"aria-hidden":`true`},`·`,-1),a(`span`,{class:`when text-toned`,title:i(b)(e.last.firedAt)},g(i(S)(e.last.firedAt,E.value)),9,J),e.last.runId?(m(),f(l,{key:0},[u[8]||=a(`span`,{class:`mx-1.5 text-accented max-sm:mx-0`,"aria-hidden":`true`},`·`,-1),e.last.runHref?(m(),f(`a`,{key:0,class:`text-primary hover:underline`,href:e.last.runHref},`run `+g(e.last.runId.slice(0,8)),9,Y)):(m(),f(l,{key:1},[c(`run `+g(e.last.runId.slice(0,8)),1)],64))],64)):s(``,!0),e.last.traceId?(m(),f(l,{key:1},[u[9]||=a(`span`,{class:`mx-1.5 text-accented max-sm:mx-0`,"aria-hidden":`true`},`·`,-1),a(`span`,{class:`trace font-mono text-dimmed`,title:`trace ${e.last.traceId}`},`trace `+g(e.last.traceId.slice(0,8)),9,X)],64)):s(``,!0),e.last.detail&&i(D)(e.last.detail)?(m(),f(l,{key:2},[u[10]||=a(`span`,{class:`mx-1.5 text-accented max-sm:hidden`,"aria-hidden":`true`},`·`,-1),a(`span`,{class:`detail max-sm:line-clamp-2 max-sm:basis-full max-sm:whitespace-normal`,title:e.last.detail},g(i(D)(e.last.detail)),9,Z)],64)):s(``,!0)],64)):(m(),f(`span`,Q,g(i(x)?.firingsUnavailable?`unknown`:`never fired`),1))])],8,j))),128))]),i(x)?.firingsUnavailable?(m(),f(`p`,ne,` Firing history unavailable: `+g(i(x).firingsUnavailable),1)):s(``,!0)]))]),_:1})}}});export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Pr as e,an as t,gn as n,in as r,sn as i,tr as a,vi as o}from"./seed-BglCRKLA.js";import{t as s}from"./Tooltip-
|
|
1
|
+
import{Pr as e,an as t,gn as n,in as r,sn as i,tr as a,vi as o}from"./seed-BglCRKLA.js";import{t as s}from"./Tooltip-C7yR095Y.js";var c=[`aria-label`,`data-tone`],l=[`aria-label`,`data-tone`],u=n({__name:`StatusDot`,props:{tone:{},label:{},tip:{},pulse:{type:Boolean}},setup(n){let u={green:`bg-green-600`,amber:`bg-yellow-600`,red:`bg-red-500`,grey:`bg-neutral-500`};return(d,f)=>{let p=s;return n.tip?(a(),t(p,{key:0,text:n.tip},{default:e(()=>[r(`span`,{class:o([`inline-block size-[0.6em] shrink-0 rounded-full`,[u[n.tone],n.pulse?`motion-safe:animate-pulse`:``]]),role:`img`,"aria-label":n.label,"data-tone":n.tone},null,10,c)]),_:1},8,[`text`])):(a(),i(`span`,{key:1,class:o([`inline-block size-[0.6em] shrink-0 rounded-full`,[u[n.tone],n.pulse?`motion-safe:animate-pulse`:``]]),role:`img`,"aria-label":n.label,"data-tone":n.tone},null,10,l))}}});export{u as t};
|