@coreplane/switchboard 1.18.0 → 1.18.2
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/README.md +45 -9
- package/dist/assets/package-lock.json +3 -3
- package/dist/assets/package.json +1 -1
- package/dist/assets/source.json +3 -3
- package/dist/assets/web/dist/.vite/manifest.json +17 -17
- package/dist/assets/web/dist/assets/{ResidentDetailPage-D3shEnzl.js → ResidentDetailPage-DvQ05AGa.js} +1 -1
- package/dist/assets/web/dist/assets/{ResidentsIndexPage-DWIubQ05.js → ResidentsIndexPage-B3uxKUne.js} +1 -1
- package/dist/assets/web/dist/assets/{RunRoutePage-BMjuE-oX.js → RunRoutePage-ty94olNM.js} +3 -3
- package/dist/assets/web/dist/assets/{RunsIndexPage-C3_jYIo0.js → RunsIndexPage-CM-qxyQm.js} +1 -1
- package/dist/assets/web/dist/assets/{ScheduledPage-g1W58mtN.js → ScheduledPage-C1psvLD4.js} +1 -1
- package/dist/assets/web/dist/assets/{StatusDot-DcPRw3zu.js → StatusDot-DuoQnQeU.js} +1 -1
- package/dist/assets/web/dist/assets/{Tooltip-DJUkMYjo.js → Tooltip-BfLPyxQy.js} +1 -1
- package/dist/assets/web/dist/assets/{main-CyM5f4JC.js → main-Bnbk_Rsg.js} +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
<picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/coreplanelabs/switchboard/HEAD/docs/public/logo-dark.svg">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/coreplanelabs/switchboard/HEAD/docs/public/logo-light.svg" width="56" height="56" alt="">
|
|
4
|
+
</picture>
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# OpenSwitchboard
|
|
7
|
+
|
|
8
|
+
[](https://github.com/coreplanelabs/switchboard/actions/workflows/ci.yml) [](https://scorecard.dev/viewer/?uri=github.com/coreplanelabs/switchboard) [](https://github.com/coreplanelabs/switchboard/releases/latest) [](https://github.com/coreplanelabs/switchboard/blob/HEAD/LICENSE)
|
|
9
|
+
|
|
10
|
+
Mention it in Slack and an agent reviews the PR, ships the fix, or answers the question — on the model you choose, with its tools running where you decide.
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img alt="A review in a Slack thread: the mention, the status card ticking through the run's steps, then the verdict with its findings." src="https://raw.githubusercontent.com/coreplanelabs/switchboard/HEAD/docs/public/slack/run.gif" width="395">
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<picture>
|
|
17
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/coreplanelabs/switchboard/HEAD/docs/public/screenshots/run-page-dark.png">
|
|
18
|
+
<img alt="A finished run's page on the dashboard." src="https://raw.githubusercontent.com/coreplanelabs/switchboard/HEAD/docs/public/screenshots/run-page-light.png" width="100%">
|
|
19
|
+
</picture>
|
|
20
|
+
|
|
21
|
+
## Quick start
|
|
22
|
+
|
|
23
|
+
Node 24 and an Anthropic API key; no Slack.
|
|
4
24
|
|
|
5
25
|
```bash
|
|
6
|
-
mkdir switchboard && cd switchboard
|
|
7
26
|
npx @coreplane/switchboard init --organization <your GitHub org> --anthropic-key <your key>
|
|
8
27
|
npx @coreplane/switchboard ask "what can you do?"
|
|
9
28
|
```
|
|
10
29
|
|
|
11
|
-
`init` writes `.env` (mode 600) and `config/config.yaml` into
|
|
30
|
+
`init` writes `.env` (mode 600) and `config/config.yaml` into `~/.switchboard`, so every command works from any directory; `ask` runs the whole pipeline. `curl -fsSL https://openswitchboard.dev/install.sh | sh` is the same `init`.
|
|
12
31
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
32
|
+
Next: [Get started](https://github.com/coreplanelabs/switchboard/blob/HEAD/docs/tutorials/get-started.md).
|
|
33
|
+
|
|
34
|
+
## How it is put together
|
|
35
|
+
|
|
36
|
+
Four seams: Channel, Provider, Executor, Agent. Each is an interface with more than one implementation. The dispatcher sits between them: directives, config layers, authorization, the agent loop ([How a request flows](https://github.com/coreplanelabs/switchboard/blob/HEAD/docs/explanation/how-a-request-flows.md)).
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## What you need
|
|
40
|
+
|
|
41
|
+
| | You need | What it unlocks |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| **Required** | A model provider key: Anthropic, or any OpenAI-compatible endpoint | Every agent |
|
|
44
|
+
| **For Slack** | A Slack app (Socket Mode: bot token + app-level token) | The bot in your workspace |
|
|
45
|
+
| Optional | A GitHub App, or a repo-scoped token | Repository reads; pull requests |
|
|
46
|
+
| Optional | A Cloudflare account | Production: the bot plus the state, resident and sandbox Workers |
|
|
47
|
+
| Optional | An E2B account | Per-thread micro-VMs without Cloudflare |
|
|
48
|
+
| Optional | A Brave Search key (`BRAVE_SEARCH_API_KEY`) | Web search for the research agent |
|
|
49
|
+
|
|
50
|
+
Off means absent from `help`, the dashboard and the plan ([Turn features on and off](https://github.com/coreplanelabs/switchboard/blob/HEAD/docs/how-to/turn-features-on-and-off.md)). The bot is `npx @coreplane/switchboard start` on any machine with Node, or the published image `ghcr.io/coreplanelabs/switchboard`.
|
|
51
|
+
|
|
52
|
+
## Learn more
|
|
17
53
|
|
|
18
|
-
|
|
54
|
+
Docs: <https://openswitchboard.dev> ([`docs/`](https://github.com/coreplanelabs/switchboard/blob/HEAD/docs/README.md)) · [CONTRIBUTING.md](https://github.com/coreplanelabs/switchboard/blob/HEAD/CONTRIBUTING.md) · [AGENTS.md](https://github.com/coreplanelabs/switchboard/blob/HEAD/AGENTS.md) · [SECURITY.md](https://github.com/coreplanelabs/switchboard/blob/HEAD/SECURITY.md) · [Apache-2.0](https://github.com/coreplanelabs/switchboard/blob/HEAD/LICENSE).
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "switchboard",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "switchboard",
|
|
9
|
-
"version": "1.18.
|
|
9
|
+
"version": "1.18.2",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"workspaces": [
|
|
12
12
|
"web",
|
|
@@ -18340,7 +18340,7 @@
|
|
|
18340
18340
|
},
|
|
18341
18341
|
"packages/switchboard": {
|
|
18342
18342
|
"name": "@coreplane/switchboard",
|
|
18343
|
-
"version": "1.18.
|
|
18343
|
+
"version": "1.18.2",
|
|
18344
18344
|
"license": "Apache-2.0",
|
|
18345
18345
|
"dependencies": {
|
|
18346
18346
|
"@anthropic-ai/sdk": "^0.124.0",
|
package/dist/assets/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "switchboard",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Mention it in Slack and an agent reviews the PR, ships the fix, or answers the question — on the model you choose, with its tools running where you decide.",
|
|
6
6
|
"license": "Apache-2.0",
|
package/dist/assets/source.json
CHANGED
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
"_seed-BglCRKLA.js"
|
|
24
24
|
]
|
|
25
25
|
},
|
|
26
|
-
"_StatusDot-
|
|
27
|
-
"file": "assets/StatusDot-
|
|
26
|
+
"_StatusDot-DuoQnQeU.js": {
|
|
27
|
+
"file": "assets/StatusDot-DuoQnQeU.js",
|
|
28
28
|
"name": "StatusDot",
|
|
29
29
|
"imports": [
|
|
30
30
|
"_seed-BglCRKLA.js",
|
|
31
|
-
"_Tooltip-
|
|
31
|
+
"_Tooltip-BfLPyxQy.js"
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
|
-
"_Tooltip-
|
|
35
|
-
"file": "assets/Tooltip-
|
|
34
|
+
"_Tooltip-BfLPyxQy.js": {
|
|
35
|
+
"file": "assets/Tooltip-BfLPyxQy.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-Bnbk_Rsg.js",
|
|
73
73
|
"name": "main",
|
|
74
74
|
"src": "src/main.ts",
|
|
75
75
|
"isEntry": true,
|
|
@@ -100,39 +100,39 @@
|
|
|
100
100
|
]
|
|
101
101
|
},
|
|
102
102
|
"src/pages/ResidentDetailPage.vue": {
|
|
103
|
-
"file": "assets/ResidentDetailPage-
|
|
103
|
+
"file": "assets/ResidentDetailPage-DvQ05AGa.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-DuoQnQeU.js",
|
|
111
111
|
"_residentDiskBudget-BMBKlYRH.js"
|
|
112
112
|
]
|
|
113
113
|
},
|
|
114
114
|
"src/pages/ResidentsIndexPage.vue": {
|
|
115
|
-
"file": "assets/ResidentsIndexPage-
|
|
115
|
+
"file": "assets/ResidentsIndexPage-B3uxKUne.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-DuoQnQeU.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-ty94olNM.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-BfLPyxQy.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-CM-qxyQm.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-BfLPyxQy.js",
|
|
155
155
|
"_RunsTabs-C4krAL9o.js",
|
|
156
|
-
"_StatusDot-
|
|
156
|
+
"_StatusDot-DuoQnQeU.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-C1psvLD4.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-BfLPyxQy.js",
|
|
171
171
|
"_RunsTabs-C4krAL9o.js",
|
|
172
172
|
"_wallClock-Ckv3sKoR.js",
|
|
173
173
|
"_localIso-L06jV29p.js"
|
|
@@ -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-DcPRw3zu.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-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 +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-DuoQnQeU.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};
|