@coreplane/switchboard 1.237.0 → 1.239.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/deploy/cloudflare-resident/worker.ts +40 -12
- package/dist/assets/deploy/cloudflare-sandbox/Dockerfile +8 -1
- package/dist/assets/deploy/cloudflare-sandbox/worker.ts +337 -44
- package/dist/assets/deploy/cloudflare-sandbox/wrangler.template.jsonc +19 -0
- package/dist/assets/deploy/secrets.manifest.json +3 -3
- 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/src/agents/registry.ts +82 -0
- package/dist/assets/src/execution/seedPlan.ts +267 -0
- package/dist/assets/src/execution/snapshotRetention.ts +62 -0
- package/dist/assets/src/mcp/registry.ts +9 -1
- package/dist/assets/web/dist/.vite/manifest.json +27 -27
- package/dist/assets/web/dist/assets/{ResidentDetailPage-Dc23v_8v.js → ResidentDetailPage-CrfCd8fx.js} +1 -1
- package/dist/assets/web/dist/assets/{ResidentsIndexPage-TR5D1TRR.js → ResidentsIndexPage-BdW0k2h3.js} +1 -1
- package/dist/assets/web/dist/assets/{RunFoldRow-mkUj7WEN.js → RunFoldRow-CbTd9SiS.js} +1 -1
- package/dist/assets/web/dist/assets/{RunRoutePage-CQI17__g.js → RunRoutePage-br0H-8Pz.js} +3 -3
- package/dist/assets/web/dist/assets/{RunsIndexPage-yIP4PlKP.js → RunsIndexPage-Bnzb15zH.js} +1 -1
- package/dist/assets/web/dist/assets/{ScheduledPage-CdCVyNbh.js → ScheduledPage-NLhjzHAz.js} +1 -1
- package/dist/assets/web/dist/assets/SettingsPage-D-i0uVw-.js +1 -0
- package/dist/assets/web/dist/assets/{StatusDot-DmNHX6am.js → StatusDot-DkXALvKf.js} +1 -1
- package/dist/assets/web/dist/assets/{Tooltip-qVnJTgSt.js → Tooltip-DtLIyi5P.js} +1 -1
- package/dist/assets/web/dist/assets/{UnitRoutePage-BcTeH7m2.js → UnitRoutePage-DGXukEAH.js} +1 -1
- package/dist/assets/web/dist/assets/{dist-TAGawIfM.js → dist-DtA7JiH5.js} +1 -1
- package/dist/assets/web/dist/assets/main-CFHF2RvQ.css +1 -0
- package/dist/assets/web/dist/assets/{main-mUd_TJjH.js → main-Dht0in4v.js} +2 -2
- package/dist/cli.js +452 -51
- package/package.json +1 -1
- package/dist/assets/web/dist/assets/SettingsPage-DuA8JpLU.js +0 -1
- package/dist/assets/web/dist/assets/main-csihqEj5.css +0 -1
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"src": "../node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-vietnamese-wght-normal.woff2"
|
|
29
29
|
},
|
|
30
30
|
"../node_modules/@pierre/diffs/dist/index.js": {
|
|
31
|
-
"file": "assets/dist-
|
|
31
|
+
"file": "assets/dist-DtA7JiH5.js",
|
|
32
32
|
"name": "dist",
|
|
33
33
|
"src": "../node_modules/@pierre/diffs/dist/index.js",
|
|
34
34
|
"isDynamicEntry": true,
|
|
@@ -2554,14 +2554,14 @@
|
|
|
2554
2554
|
"_RunsTabs-XpCqeWu4.js"
|
|
2555
2555
|
]
|
|
2556
2556
|
},
|
|
2557
|
-
"_RunFoldRow-
|
|
2558
|
-
"file": "assets/RunFoldRow-
|
|
2557
|
+
"_RunFoldRow-CbTd9SiS.js": {
|
|
2558
|
+
"file": "assets/RunFoldRow-CbTd9SiS.js",
|
|
2559
2559
|
"name": "RunFoldRow",
|
|
2560
2560
|
"imports": [
|
|
2561
2561
|
"_AppShell-MYHNxJks.js",
|
|
2562
2562
|
"_seed-DeKSHrt2.js",
|
|
2563
2563
|
"_wallClock-61NpVkY6.js",
|
|
2564
|
-
"_StatusDot-
|
|
2564
|
+
"_StatusDot-DkXALvKf.js",
|
|
2565
2565
|
"_localIso-CNA-bhS-.js",
|
|
2566
2566
|
"_indexRow-FLJu5mR9.js",
|
|
2567
2567
|
"_durationTone-CYMux25J.js"
|
|
@@ -2575,16 +2575,16 @@
|
|
|
2575
2575
|
"_seed-DeKSHrt2.js"
|
|
2576
2576
|
]
|
|
2577
2577
|
},
|
|
2578
|
-
"_StatusDot-
|
|
2579
|
-
"file": "assets/StatusDot-
|
|
2578
|
+
"_StatusDot-DkXALvKf.js": {
|
|
2579
|
+
"file": "assets/StatusDot-DkXALvKf.js",
|
|
2580
2580
|
"name": "StatusDot",
|
|
2581
2581
|
"imports": [
|
|
2582
2582
|
"_seed-DeKSHrt2.js",
|
|
2583
|
-
"_Tooltip-
|
|
2583
|
+
"_Tooltip-DtLIyi5P.js"
|
|
2584
2584
|
]
|
|
2585
2585
|
},
|
|
2586
|
-
"_Tooltip-
|
|
2587
|
-
"file": "assets/Tooltip-
|
|
2586
|
+
"_Tooltip-DtLIyi5P.js": {
|
|
2587
|
+
"file": "assets/Tooltip-DtLIyi5P.js",
|
|
2588
2588
|
"name": "Tooltip",
|
|
2589
2589
|
"imports": [
|
|
2590
2590
|
"_AppShell-MYHNxJks.js",
|
|
@@ -2811,7 +2811,7 @@
|
|
|
2811
2811
|
]
|
|
2812
2812
|
},
|
|
2813
2813
|
"src/main.ts": {
|
|
2814
|
-
"file": "assets/main-
|
|
2814
|
+
"file": "assets/main-Dht0in4v.js",
|
|
2815
2815
|
"name": "main",
|
|
2816
2816
|
"src": "src/main.ts",
|
|
2817
2817
|
"isEntry": true,
|
|
@@ -2831,7 +2831,7 @@
|
|
|
2831
2831
|
"_NotFoundPage-BXLrQQzy.js"
|
|
2832
2832
|
],
|
|
2833
2833
|
"css": [
|
|
2834
|
-
"assets/main-
|
|
2834
|
+
"assets/main-CFHF2RvQ.css"
|
|
2835
2835
|
],
|
|
2836
2836
|
"assets": [
|
|
2837
2837
|
"assets/instrument-sans-latin-ext-wght-normal-B5bTHO_g.woff2",
|
|
@@ -2865,28 +2865,28 @@
|
|
|
2865
2865
|
]
|
|
2866
2866
|
},
|
|
2867
2867
|
"src/pages/ResidentDetailPage.vue": {
|
|
2868
|
-
"file": "assets/ResidentDetailPage-
|
|
2868
|
+
"file": "assets/ResidentDetailPage-CrfCd8fx.js",
|
|
2869
2869
|
"name": "ResidentDetailPage",
|
|
2870
2870
|
"src": "src/pages/ResidentDetailPage.vue",
|
|
2871
2871
|
"isDynamicEntry": true,
|
|
2872
2872
|
"imports": [
|
|
2873
2873
|
"_AppShell-MYHNxJks.js",
|
|
2874
2874
|
"_seed-DeKSHrt2.js",
|
|
2875
|
-
"_StatusDot-
|
|
2875
|
+
"_StatusDot-DkXALvKf.js",
|
|
2876
2876
|
"_residentsModel-By1fThvk.js"
|
|
2877
2877
|
]
|
|
2878
2878
|
},
|
|
2879
2879
|
"src/pages/ResidentsIndexPage.vue": {
|
|
2880
|
-
"file": "assets/ResidentsIndexPage-
|
|
2880
|
+
"file": "assets/ResidentsIndexPage-BdW0k2h3.js",
|
|
2881
2881
|
"name": "ResidentsIndexPage",
|
|
2882
2882
|
"src": "src/pages/ResidentsIndexPage.vue",
|
|
2883
2883
|
"isDynamicEntry": true,
|
|
2884
2884
|
"imports": [
|
|
2885
2885
|
"_AppShell-MYHNxJks.js",
|
|
2886
2886
|
"_seed-DeKSHrt2.js",
|
|
2887
|
-
"_Tooltip-
|
|
2887
|
+
"_Tooltip-DtLIyi5P.js",
|
|
2888
2888
|
"_wallClock-61NpVkY6.js",
|
|
2889
|
-
"_StatusDot-
|
|
2889
|
+
"_StatusDot-DkXALvKf.js",
|
|
2890
2890
|
"_residentsModel-By1fThvk.js",
|
|
2891
2891
|
"_localIso-CNA-bhS-.js",
|
|
2892
2892
|
"_indexRow-FLJu5mR9.js",
|
|
@@ -2894,20 +2894,20 @@
|
|
|
2894
2894
|
]
|
|
2895
2895
|
},
|
|
2896
2896
|
"src/pages/RunRoutePage.vue": {
|
|
2897
|
-
"file": "assets/RunRoutePage-
|
|
2897
|
+
"file": "assets/RunRoutePage-br0H-8Pz.js",
|
|
2898
2898
|
"name": "RunRoutePage",
|
|
2899
2899
|
"src": "src/pages/RunRoutePage.vue",
|
|
2900
2900
|
"isDynamicEntry": true,
|
|
2901
2901
|
"imports": [
|
|
2902
2902
|
"_AppShell-MYHNxJks.js",
|
|
2903
2903
|
"_seed-DeKSHrt2.js",
|
|
2904
|
-
"_Tooltip-
|
|
2904
|
+
"_Tooltip-DtLIyi5P.js",
|
|
2905
2905
|
"src/main.ts",
|
|
2906
2906
|
"_wallClock-61NpVkY6.js",
|
|
2907
2907
|
"_NotFoundPage-BXLrQQzy.js",
|
|
2908
2908
|
"_localIso-CNA-bhS-.js",
|
|
2909
2909
|
"_indexRow-FLJu5mR9.js",
|
|
2910
|
-
"_RunFoldRow-
|
|
2910
|
+
"_RunFoldRow-CbTd9SiS.js",
|
|
2911
2911
|
"_favicon-CSt-qDvc.js",
|
|
2912
2912
|
"_durationTone-CYMux25J.js"
|
|
2913
2913
|
],
|
|
@@ -2919,17 +2919,17 @@
|
|
|
2919
2919
|
]
|
|
2920
2920
|
},
|
|
2921
2921
|
"src/pages/RunsIndexPage.vue": {
|
|
2922
|
-
"file": "assets/RunsIndexPage-
|
|
2922
|
+
"file": "assets/RunsIndexPage-Bnzb15zH.js",
|
|
2923
2923
|
"name": "RunsIndexPage",
|
|
2924
2924
|
"src": "src/pages/RunsIndexPage.vue",
|
|
2925
2925
|
"isDynamicEntry": true,
|
|
2926
2926
|
"imports": [
|
|
2927
2927
|
"_AppShell-MYHNxJks.js",
|
|
2928
2928
|
"_seed-DeKSHrt2.js",
|
|
2929
|
-
"_Tooltip-
|
|
2929
|
+
"_Tooltip-DtLIyi5P.js",
|
|
2930
2930
|
"_wallClock-61NpVkY6.js",
|
|
2931
2931
|
"_RunsTabs-XpCqeWu4.js",
|
|
2932
|
-
"_StatusDot-
|
|
2932
|
+
"_StatusDot-DkXALvKf.js",
|
|
2933
2933
|
"_localIso-CNA-bhS-.js",
|
|
2934
2934
|
"_indexRow-FLJu5mR9.js",
|
|
2935
2935
|
"_favicon-CSt-qDvc.js",
|
|
@@ -2937,21 +2937,21 @@
|
|
|
2937
2937
|
]
|
|
2938
2938
|
},
|
|
2939
2939
|
"src/pages/ScheduledPage.vue": {
|
|
2940
|
-
"file": "assets/ScheduledPage-
|
|
2940
|
+
"file": "assets/ScheduledPage-NLhjzHAz.js",
|
|
2941
2941
|
"name": "ScheduledPage",
|
|
2942
2942
|
"src": "src/pages/ScheduledPage.vue",
|
|
2943
2943
|
"isDynamicEntry": true,
|
|
2944
2944
|
"imports": [
|
|
2945
2945
|
"_AppShell-MYHNxJks.js",
|
|
2946
2946
|
"_seed-DeKSHrt2.js",
|
|
2947
|
-
"_Tooltip-
|
|
2947
|
+
"_Tooltip-DtLIyi5P.js",
|
|
2948
2948
|
"_wallClock-61NpVkY6.js",
|
|
2949
2949
|
"_RunsTabs-XpCqeWu4.js",
|
|
2950
2950
|
"_localIso-CNA-bhS-.js"
|
|
2951
2951
|
]
|
|
2952
2952
|
},
|
|
2953
2953
|
"src/pages/SettingsPage.vue": {
|
|
2954
|
-
"file": "assets/SettingsPage-
|
|
2954
|
+
"file": "assets/SettingsPage-D-i0uVw-.js",
|
|
2955
2955
|
"name": "SettingsPage",
|
|
2956
2956
|
"src": "src/pages/SettingsPage.vue",
|
|
2957
2957
|
"isDynamicEntry": true,
|
|
@@ -2961,7 +2961,7 @@
|
|
|
2961
2961
|
]
|
|
2962
2962
|
},
|
|
2963
2963
|
"src/pages/UnitRoutePage.vue": {
|
|
2964
|
-
"file": "assets/UnitRoutePage-
|
|
2964
|
+
"file": "assets/UnitRoutePage-DGXukEAH.js",
|
|
2965
2965
|
"name": "UnitRoutePage",
|
|
2966
2966
|
"src": "src/pages/UnitRoutePage.vue",
|
|
2967
2967
|
"isDynamicEntry": true,
|
|
@@ -2971,7 +2971,7 @@
|
|
|
2971
2971
|
"_wallClock-61NpVkY6.js",
|
|
2972
2972
|
"_NotFoundPage-BXLrQQzy.js",
|
|
2973
2973
|
"_localIso-CNA-bhS-.js",
|
|
2974
|
-
"_RunFoldRow-
|
|
2974
|
+
"_RunFoldRow-CbTd9SiS.js",
|
|
2975
2975
|
"_durationTone-CYMux25J.js"
|
|
2976
2976
|
]
|
|
2977
2977
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-MYHNxJks.js";import{Lr as t,Xt as n,_n as r,cn as i,gn as a,ir as o,ln as ee,on as s,r as c,sn as l,un as u,ur as d,vi as f,wi as p,yn as te}from"./seed-DeKSHrt2.js";import{t as m}from"./StatusDot-DmNHX6am.js";import{_ as h,a as g,c as ne,g as _,h as re,i as ie,l as ae,o as oe,p as v,s as se,t as ce,u as le}from"./residentsModel-By1fThvk.js";var ue={class:`mt-4 first:mt-0`},de={class:`w-full border-collapse font-mono text-[0.8125rem]`},fe={class:`border-t border-muted`},pe={class:`px-2 py-1 align-top`},me={class:`ml-1.5 font-medium`},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 font-mono 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 font-mono 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 font-mono 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 font-mono 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`},B={key:0},Xe={key:1,class:`text-dimmed`},Ze={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 font-mono 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 font-mono 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 font-mono 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 font-mono 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=te({__name:`ResidentDetailPage`,setup(te){let V=c(`resident`),H=s(()=>V?.record??{}),U=s(()=>se(H.value)),W=s(()=>ne(H.value)||(V?.slug??``)),G=s(()=>v(U.value.sha)),K=s(()=>ce.test(W.value)?`https://github.com/${W.value}`:void 0),q=s(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=s(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?g(e):void 0}),zt=s(()=>g(U.value.schedules)),Y=s(()=>{let e=g(H.value.commands),t=g(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:v(e[n]),effect:v(t[n])||`readonly`}))}),X=s(()=>le(H.value).map(e=>({...e,threadKey:e.threadKey||`?`,ref:e.ref||`?`,sha:e.sha?e.sha.slice(0,8):``,commitHref:K.value&&/^[0-9a-f]{7,40}$/.test(e.sha)?`${K.value}/commit/${e.sha}`:void 0}))),Z=s(()=>X.value.filter(e=>!e.evicted).length),Q=s(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=s(()=>oe(H.value)),Bt=s(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Vt=s(()=>{let e=$.value;if(!e)return[];let t=ie(e,Bt.value),n=n=>{let r=t.room[n];return r===null?h(e.parts,n)===null?`? (checkout not measured)`:`?`:`${r} more (${_(h(e.parts,n))} each)`};return[[`used / total`,re(e)],[`free`,`${_(t.freeKiB)}${t.capped?` under the ${_(t.capacityKiB)} diskBudgetMb cap`:``}`],[`reserve`,`${_(t.reserve.totalKiB)} (snapshot staging ${_(t.reserve.stagingKiB)} + floor ${_(t.reserve.floorKiB)})`],[`headroom`,`${_(t.headroomKiB)} — room for ${n(`hardlink`)} hardlinked trees, ${n(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ht=s(()=>{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(s,c)=>(o(),i(e,{title:W.value||`Resident`,nav:`residents`},{leading:t(()=>[...c[0]||=[l(`a`,{class:`back text-sm text-muted no-underline hover:text-primary`,href:`/residents`},`← All residents`,-1)]]),default:t(()=>[l(`section`,ue,[c[8]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Lifecycle`,-1),l(`table`,de,[l(`tbody`,null,[l(`tr`,fe,[c[1]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),l(`td`,pe,[r(m,{tone:f(ae)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),l(`span`,me,p(U.value.state),1)])]),l(`tr`,y,[c[2]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),l(`td`,b,[U.value.reason?(o(),u(`span`,x,p(U.value.reason),1)):(o(),u(`span`,S,`—`))])]),l(`tr`,C,[c[3]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),l(`td`,w,[f(v)(U.value.lastRefreshError)?(o(),u(`span`,T,p(f(v)(U.value.lastRefreshError)),1)):(o(),u(`span`,E,`—`))])]),l(`tr`,D,[c[4]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),l(`td`,O,[Q.value?(o(),u(`span`,k,p(Q.value),1)):(o(),u(`span`,A,`—`))])]),l(`tr`,j,[c[5]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),l(`td`,M,[f(v)(U.value.updatedAt)?(o(),u(`span`,N,p(f(v)(U.value.updatedAt)),1)):(o(),u(`span`,P,`—`))])]),l(`tr`,F,[c[7]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),l(`td`,I,[f(v)(U.value.idleSince)?(o(),u(n,{key:0},[a(p(f(v)(U.value.idleSince))+` `,1),c[6]||=l(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(o(),u(`span`,L,`awake`))])])])])]),l(`section`,R,[c[15]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pinned facts`,-1),l(`table`,z,[l(`tbody`,null,[l(`tr`,he,[c[9]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),l(`td`,ge,[K.value?(o(),u(`a`,{key:0,class:`text-primary`,href:K.value},p(K.value),9,_e)):(o(),u(`span`,ve,p(f(v)(H.value.resource)||`—`),1))])]),l(`tr`,ye,[c[10]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),l(`td`,be,p(f(v)(U.value.defaultRef)||f(v)(H.value.defaultRef)||`—`),1)]),l(`tr`,xe,[c[11]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),l(`td`,Se,[q.value?(o(),u(`a`,{key:0,class:`text-primary`,href:q.value},p(G.value),9,Ce)):G.value?(o(),u(`span`,we,p(G.value),1)):(o(),u(`span`,Te,`—`))])]),l(`tr`,Ee,[c[12]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),l(`td`,De,[f(v)(U.value.lockfileHash)?(o(),u(`span`,Oe,p(f(v)(U.value.lockfileHash)),1)):(o(),u(`span`,ke,`—`))])]),l(`tr`,Ae,[c[13]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),l(`td`,je,[f(v)(U.value.provisionedAt)?(o(),u(`span`,Me,p(f(v)(U.value.provisionedAt)),1)):(o(),u(`span`,Ne,`—`))])]),l(`tr`,Pe,[c[14]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),l(`td`,Fe,[f(v)(U.value.lastRefreshAt)?(o(),u(`span`,Ie,p(f(v)(U.value.lastRefreshAt)),1)):(o(),u(`span`,Le,`—`))])])])])]),l(`section`,Re,[c[17]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(o(),u(n,{key:0},[l(`table`,ze,[l(`tbody`,null,[(o(!0),u(n,null,d(Vt.value,([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Be,p(e),1),l(`td`,Ve,p(t),1)]))),128))])]),c[16]||=l(`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),l(`table`,He,[l(`tbody`,null,[(o(!0),u(n,null,d(Ht.value,([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Ue,p(e),1),l(`td`,We,p(t),1)]))),128))])])],64)):(o(),u(`p`,Ge,` not measured yet — the first refresh cycle or attach of this container measures it `))]),l(`section`,Ke,[c[18]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(o(),u(`table`,qe,[l(`tbody`,null,[(o(),u(n,null,d([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>l(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Je,p(e),1),l(`td`,Ye,[f(v)(J.value[e])?(o(),u(`span`,B,p(f(v)(J.value[e])),1)):(o(),u(`span`,Xe,`—`))])])),64))])])):(o(),u(`p`,Ze,`no snapshot recorded`))]),l(`section`,Qe,[c[22]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(o(),u(n,{key:0},[l(`p`,$e,p(Z.value)+` live · `+p(X.value.length-Z.value)+` evicted`,1),l(`div`,et,[l(`table`,tt,[l(`tbody`,null,[c[21]||=l(`tr`,{class:`text-xs text-muted`},[l(`td`,{class:`px-2 py-1`},`thread`),l(`td`,{class:`px-2 py-1`},`ref · sha`),l(`td`,{class:`px-2 py-1`},`user · deps`),l(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(o(!0),u(n,null,d(X.value,e=>(o(),u(`tr`,{key:e.threadKey,class:`border-t border-muted`},[l(`td`,nt,[e.evicted?(o(),u(`span`,rt,[a(`evicted `+p(e.evictedAt||`—`),1),e.evictedWhy?(o(),u(n,{key:0},[a(` · `+p(e.evictedWhy),1)],64)):ee(``,!0)])):(o(),i(m,{key:1,tone:`green`,label:`live`,tip:`live`})),a(` `+p(e.threadKey),1)]),l(`td`,it,[a(p(e.ref)+` · `,1),e.commitHref?(o(),u(`a`,{key:0,class:`text-primary`,href:e.commitHref},p(e.sha),9,at)):e.sha?(o(),u(`span`,ot,p(e.sha),1)):(o(),u(`span`,st,`—`))]),l(`td`,ct,[e.user?(o(),u(`span`,lt,p(e.user),1)):(o(),u(`span`,ut,`—`)),c[19]||=a(` · `,-1),e.deps?(o(),u(`span`,dt,p(e.deps),1)):(o(),u(`span`,ft,`—`))]),l(`td`,pt,[e.boundAt?(o(),u(`span`,mt,p(e.boundAt),1)):(o(),u(`span`,ht,`—`)),c[20]||=a(` · `,-1),e.lastAttachAt?(o(),u(`span`,gt,p(e.lastAttachAt),1)):(o(),u(`span`,_t,`—`))])]))),128))])])])],64)):(o(),u(`p`,vt,`no thread worktrees`))]),l(`section`,yt,[c[23]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pending schedules`,-1),l(`table`,bt,[l(`tbody`,null,[(o(),u(n,null,d([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>l(`tr`,{key:t,class:`border-t border-muted`},[l(`td`,xt,p(e),1),l(`td`,St,p(f(v)(zt.value[t]??0)||`0`),1)])),64))])])]),l(`section`,Ct,[c[25]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(o(),u(`table`,wt,[l(`tbody`,null,[(o(!0),u(n,null,d(Y.value,e=>(o(),u(`tr`,{key:e.name,class:`border-t border-muted`},[l(`td`,Tt,p(e.name),1),l(`td`,Et,[l(`code`,null,p(e.command),1),c[24]||=a(),l(`span`,Dt,p(e.effect),1)])]))),128))])])):(o(),u(`p`,Ot,`no command table`))]),l(`section`,kt,[c[26]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Registry settings`,-1),l(`table`,At,[l(`tbody`,null,[(o(!0),u(n,null,d([[`onboarded`,f(v)(H.value.onboardedAt)],[`record updated`,f(v)(H.value.updatedAt)],[`provisioning timeout (ms)`,f(v)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,f(v)(H.value.diskBudgetMb)],[`worktree TTL (days)`,f(v)(H.value.worktreeTtlDays??7)]],([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,jt,p(e),1),l(`td`,Mt,[t?(o(),u(`span`,Nt,p(t),1)):(o(),u(`span`,Pt,`—`))])]))),128))])])]),l(`p`,Ft,[c[27]||=a(` Manage from chat: `,-1),l(`code`,It,`repo rebuild `+p(W.value),1),c[28]||=a(` · `,-1),l(`code`,Lt,`repo reconfigure `+p(W.value)+` …`,1),c[29]||=a(` · `,-1),l(`code`,Rt,`repo offboard `+p(W.value)+` --dry-run`,1)])]),_:1},8,[`title`]))}});export{V as default};
|
|
1
|
+
import{t as e}from"./AppShell-MYHNxJks.js";import{Lr as t,Xt as n,_n as r,cn as i,gn as a,ir as o,ln as ee,on as s,r as c,sn as l,un as u,ur as d,vi as f,wi as p,yn as te}from"./seed-DeKSHrt2.js";import{t as m}from"./StatusDot-DkXALvKf.js";import{_ as h,a as g,c as ne,g as _,h as re,i as ie,l as ae,o as oe,p as v,s as se,t as ce,u as le}from"./residentsModel-By1fThvk.js";var ue={class:`mt-4 first:mt-0`},de={class:`w-full border-collapse font-mono text-[0.8125rem]`},fe={class:`border-t border-muted`},pe={class:`px-2 py-1 align-top`},me={class:`ml-1.5 font-medium`},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 font-mono 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 font-mono 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 font-mono 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 font-mono 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`},B={key:0},Xe={key:1,class:`text-dimmed`},Ze={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 font-mono 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 font-mono 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 font-mono 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 font-mono 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=te({__name:`ResidentDetailPage`,setup(te){let V=c(`resident`),H=s(()=>V?.record??{}),U=s(()=>se(H.value)),W=s(()=>ne(H.value)||(V?.slug??``)),G=s(()=>v(U.value.sha)),K=s(()=>ce.test(W.value)?`https://github.com/${W.value}`:void 0),q=s(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=s(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?g(e):void 0}),zt=s(()=>g(U.value.schedules)),Y=s(()=>{let e=g(H.value.commands),t=g(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:v(e[n]),effect:v(t[n])||`readonly`}))}),X=s(()=>le(H.value).map(e=>({...e,threadKey:e.threadKey||`?`,ref:e.ref||`?`,sha:e.sha?e.sha.slice(0,8):``,commitHref:K.value&&/^[0-9a-f]{7,40}$/.test(e.sha)?`${K.value}/commit/${e.sha}`:void 0}))),Z=s(()=>X.value.filter(e=>!e.evicted).length),Q=s(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=s(()=>oe(H.value)),Bt=s(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Vt=s(()=>{let e=$.value;if(!e)return[];let t=ie(e,Bt.value),n=n=>{let r=t.room[n];return r===null?h(e.parts,n)===null?`? (checkout not measured)`:`?`:`${r} more (${_(h(e.parts,n))} each)`};return[[`used / total`,re(e)],[`free`,`${_(t.freeKiB)}${t.capped?` under the ${_(t.capacityKiB)} diskBudgetMb cap`:``}`],[`reserve`,`${_(t.reserve.totalKiB)} (snapshot staging ${_(t.reserve.stagingKiB)} + floor ${_(t.reserve.floorKiB)})`],[`headroom`,`${_(t.headroomKiB)} — room for ${n(`hardlink`)} hardlinked trees, ${n(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ht=s(()=>{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(s,c)=>(o(),i(e,{title:W.value||`Resident`,nav:`residents`},{leading:t(()=>[...c[0]||=[l(`a`,{class:`back text-sm text-muted no-underline hover:text-primary`,href:`/residents`},`← All residents`,-1)]]),default:t(()=>[l(`section`,ue,[c[8]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Lifecycle`,-1),l(`table`,de,[l(`tbody`,null,[l(`tr`,fe,[c[1]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),l(`td`,pe,[r(m,{tone:f(ae)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),l(`span`,me,p(U.value.state),1)])]),l(`tr`,y,[c[2]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),l(`td`,b,[U.value.reason?(o(),u(`span`,x,p(U.value.reason),1)):(o(),u(`span`,S,`—`))])]),l(`tr`,C,[c[3]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),l(`td`,w,[f(v)(U.value.lastRefreshError)?(o(),u(`span`,T,p(f(v)(U.value.lastRefreshError)),1)):(o(),u(`span`,E,`—`))])]),l(`tr`,D,[c[4]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),l(`td`,O,[Q.value?(o(),u(`span`,k,p(Q.value),1)):(o(),u(`span`,A,`—`))])]),l(`tr`,j,[c[5]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),l(`td`,M,[f(v)(U.value.updatedAt)?(o(),u(`span`,N,p(f(v)(U.value.updatedAt)),1)):(o(),u(`span`,P,`—`))])]),l(`tr`,F,[c[7]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),l(`td`,I,[f(v)(U.value.idleSince)?(o(),u(n,{key:0},[a(p(f(v)(U.value.idleSince))+` `,1),c[6]||=l(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(o(),u(`span`,L,`awake`))])])])])]),l(`section`,R,[c[15]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pinned facts`,-1),l(`table`,z,[l(`tbody`,null,[l(`tr`,he,[c[9]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),l(`td`,ge,[K.value?(o(),u(`a`,{key:0,class:`text-primary`,href:K.value},p(K.value),9,_e)):(o(),u(`span`,ve,p(f(v)(H.value.resource)||`—`),1))])]),l(`tr`,ye,[c[10]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),l(`td`,be,p(f(v)(U.value.defaultRef)||f(v)(H.value.defaultRef)||`—`),1)]),l(`tr`,xe,[c[11]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),l(`td`,Se,[q.value?(o(),u(`a`,{key:0,class:`text-primary`,href:q.value},p(G.value),9,Ce)):G.value?(o(),u(`span`,we,p(G.value),1)):(o(),u(`span`,Te,`—`))])]),l(`tr`,Ee,[c[12]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),l(`td`,De,[f(v)(U.value.lockfileHash)?(o(),u(`span`,Oe,p(f(v)(U.value.lockfileHash)),1)):(o(),u(`span`,ke,`—`))])]),l(`tr`,Ae,[c[13]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),l(`td`,je,[f(v)(U.value.provisionedAt)?(o(),u(`span`,Me,p(f(v)(U.value.provisionedAt)),1)):(o(),u(`span`,Ne,`—`))])]),l(`tr`,Pe,[c[14]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),l(`td`,Fe,[f(v)(U.value.lastRefreshAt)?(o(),u(`span`,Ie,p(f(v)(U.value.lastRefreshAt)),1)):(o(),u(`span`,Le,`—`))])])])])]),l(`section`,Re,[c[17]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(o(),u(n,{key:0},[l(`table`,ze,[l(`tbody`,null,[(o(!0),u(n,null,d(Vt.value,([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Be,p(e),1),l(`td`,Ve,p(t),1)]))),128))])]),c[16]||=l(`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),l(`table`,He,[l(`tbody`,null,[(o(!0),u(n,null,d(Ht.value,([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Ue,p(e),1),l(`td`,We,p(t),1)]))),128))])])],64)):(o(),u(`p`,Ge,` not measured yet — the first refresh cycle or attach of this container measures it `))]),l(`section`,Ke,[c[18]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(o(),u(`table`,qe,[l(`tbody`,null,[(o(),u(n,null,d([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>l(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Je,p(e),1),l(`td`,Ye,[f(v)(J.value[e])?(o(),u(`span`,B,p(f(v)(J.value[e])),1)):(o(),u(`span`,Xe,`—`))])])),64))])])):(o(),u(`p`,Ze,`no snapshot recorded`))]),l(`section`,Qe,[c[22]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(o(),u(n,{key:0},[l(`p`,$e,p(Z.value)+` live · `+p(X.value.length-Z.value)+` evicted`,1),l(`div`,et,[l(`table`,tt,[l(`tbody`,null,[c[21]||=l(`tr`,{class:`text-xs text-muted`},[l(`td`,{class:`px-2 py-1`},`thread`),l(`td`,{class:`px-2 py-1`},`ref · sha`),l(`td`,{class:`px-2 py-1`},`user · deps`),l(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(o(!0),u(n,null,d(X.value,e=>(o(),u(`tr`,{key:e.threadKey,class:`border-t border-muted`},[l(`td`,nt,[e.evicted?(o(),u(`span`,rt,[a(`evicted `+p(e.evictedAt||`—`),1),e.evictedWhy?(o(),u(n,{key:0},[a(` · `+p(e.evictedWhy),1)],64)):ee(``,!0)])):(o(),i(m,{key:1,tone:`green`,label:`live`,tip:`live`})),a(` `+p(e.threadKey),1)]),l(`td`,it,[a(p(e.ref)+` · `,1),e.commitHref?(o(),u(`a`,{key:0,class:`text-primary`,href:e.commitHref},p(e.sha),9,at)):e.sha?(o(),u(`span`,ot,p(e.sha),1)):(o(),u(`span`,st,`—`))]),l(`td`,ct,[e.user?(o(),u(`span`,lt,p(e.user),1)):(o(),u(`span`,ut,`—`)),c[19]||=a(` · `,-1),e.deps?(o(),u(`span`,dt,p(e.deps),1)):(o(),u(`span`,ft,`—`))]),l(`td`,pt,[e.boundAt?(o(),u(`span`,mt,p(e.boundAt),1)):(o(),u(`span`,ht,`—`)),c[20]||=a(` · `,-1),e.lastAttachAt?(o(),u(`span`,gt,p(e.lastAttachAt),1)):(o(),u(`span`,_t,`—`))])]))),128))])])])],64)):(o(),u(`p`,vt,`no thread worktrees`))]),l(`section`,yt,[c[23]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pending schedules`,-1),l(`table`,bt,[l(`tbody`,null,[(o(),u(n,null,d([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>l(`tr`,{key:t,class:`border-t border-muted`},[l(`td`,xt,p(e),1),l(`td`,St,p(f(v)(zt.value[t]??0)||`0`),1)])),64))])])]),l(`section`,Ct,[c[25]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(o(),u(`table`,wt,[l(`tbody`,null,[(o(!0),u(n,null,d(Y.value,e=>(o(),u(`tr`,{key:e.name,class:`border-t border-muted`},[l(`td`,Tt,p(e.name),1),l(`td`,Et,[l(`code`,null,p(e.command),1),c[24]||=a(),l(`span`,Dt,p(e.effect),1)])]))),128))])])):(o(),u(`p`,Ot,`no command table`))]),l(`section`,kt,[c[26]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Registry settings`,-1),l(`table`,At,[l(`tbody`,null,[(o(!0),u(n,null,d([[`onboarded`,f(v)(H.value.onboardedAt)],[`record updated`,f(v)(H.value.updatedAt)],[`provisioning timeout (ms)`,f(v)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,f(v)(H.value.diskBudgetMb)],[`worktree TTL (days)`,f(v)(H.value.worktreeTtlDays??7)]],([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,jt,p(e),1),l(`td`,Mt,[t?(o(),u(`span`,Nt,p(t),1)):(o(),u(`span`,Pt,`—`))])]))),128))])])]),l(`p`,Ft,[c[27]||=a(` Manage from chat: `,-1),l(`code`,It,`repo rebuild `+p(W.value),1),c[28]||=a(` · `,-1),l(`code`,Lt,`repo reconfigure `+p(W.value)+` …`,1),c[29]||=a(` · `,-1),l(`code`,Rt,`repo offboard `+p(W.value)+` --dry-run`,1)])]),_:1},8,[`title`]))}});export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./AppShell-MYHNxJks.js";import{Lr as n,Mr as r,Qn as i,Wt as ee,Xt as a,_n as o,ci as s,cn as c,gn as l,ir as u,ln as d,nr as f,oi as p,on as m,r as h,sn as g,un as _,ur as v,vi as y,wi as b,xi as x,yn as S}from"./seed-DeKSHrt2.js";import{t as C}from"./Tooltip-qVnJTgSt.js";import{t as w}from"./wallClock-61NpVkY6.js";import{t as T}from"./StatusDot-DmNHX6am.js";import{c as E,d as D,f as O,g as k,h as A,i as j,l as M,m as N,n as P,o as F,p as I,r as L,s as R,t as z,u as te}from"./residentsModel-By1fThvk.js";import{i as ne,r as B}from"./localIso-CNA-bhS-.js";import{C as re,a as ie,b as ae,c as oe,g as V,h as se,i as ce,l as le,m as ue,t as de}from"./indexRow-FLJu5mR9.js";import{i as H,t as U}from"./favicon-CSt-qDvc.js";var fe=[`data-slug`,`data-running`],pe=[`open`],me={class:`row flex cursor-pointer list-none flex-wrap items-baseline gap-x-2.5 gap-y-1 rounded-md px-2 py-2 hover:bg-elevated [&::-webkit-details-marker]:hidden`},he={class:`self-center`},ge={class:`font-mono text-[0.9375rem] font-medium text-highlighted`},_e={class:`text-sm text-toned`},ve={key:0,class:`running shrink-0 rounded border border-ok/25 bg-ok/8 px-1.5 font-mono text-[0.68rem] font-medium tabular-nums text-ok`},ye=[`title`],be=[`href`],xe={key:2,class:`basis-full pl-[1.9rem] text-xs text-warn`},Se={class:`fold pb-3 pl-[1.9rem] pr-2 pt-0.5`},Ce={key:0,class:`m-0 list-none divide-y divide-(--ui-border-muted) p-0`},we=[`data-run-id`,`data-thread`],W={class:`pt-[0.3rem]`},Te={class:`what min-w-0`},Ee={class:`flex min-w-0 items-baseline gap-2`},De=[`title`],Oe={key:0,class:`who block truncate text-xs text-dimmed`},ke=[`href`],Ae={key:1,class:`who block text-xs text-dimmed`},je={class:`min-w-0 font-mono text-xs max-sm:col-span-2 max-sm:col-start-2 max-sm:row-start-2`},Me=[`title`],Ne=[`href`],Pe={key:1},Fe={key:1,class:`font-sans text-dimmed`},Ie={key:0,class:`facts-tree block truncate text-dimmed`},Le={class:`user`},Re={class:`deps`},ze=[`title`],Be={class:`flex items-baseline gap-3 justify-self-end max-sm:col-start-3 max-sm:row-start-1`},Ve=[`title`],He=[`href`,`aria-label`],Ue={key:1,class:`py-1 text-xs text-dimmed`},We=[`data-idle`],Ge={key:1},G=S({__name:`ResidentRow`,props:{record:{},runs:{},now:{},open:{type:Boolean}},setup(e){let t=e,n=s(t.open===!0);r(()=>t.open,e=>{e&&(n.value=!0)});function i(e){n.value=e.target.open}let f=m(()=>E(t.record)),p=m(()=>f.value||I(t.record.resource)||`?`),h=m(()=>R(t.record)),S=m(()=>M(h.value.state)),C=m(()=>z.test(f.value)?`/residents/${f.value}`:null),w=m(()=>z.test(f.value)?`https://github.com/${f.value}`:void 0),D=e=>w.value&&/^[0-9a-f]{7,40}$/.test(e)?`${w.value}/commit/${e}`:void 0,O=m(()=>I(t.record.defaultRef)||`?`),P=m(()=>I(h.value.sha).slice(0,8)),H=m(()=>I(h.value.lastRefreshAt)),U=e=>{let n=e?Date.parse(e):NaN;return Number.isFinite(n)?B(n,t.now):e||`—`},G=m(()=>H.value?U(H.value):``),K=m(()=>F(t.record)),q=m(()=>K.value?A(K.value):``),J=m(()=>{let e=K.value;if(!e)return null;let n=typeof t.record.diskBudgetMb==`number`?t.record.diskBudgetMb:void 0;return j(e,n)}),Y=m(()=>[`ref ${O.value}`,P.value,G.value?`refreshed ${G.value}`:``,q.value?`disk ${q.value}`:``].filter(Boolean).join(` · `)),X=m(()=>[H.value?`refreshed ${H.value}`:``,K.value?.at?`disk measured ${K.value.at}`:``].filter(Boolean).join(` · `)),Z=m(()=>{let e=K.value,t=J.value;if(!e||!t)return``;let n=t.room.hardlink===null?`room not projected (checkout not measured)`:`room for ${t.room.hardlink} more ${t.room.hardlink===1?`tree`:`trees`}`;return[`${k(t.freeKiB)} free${t.capped?` under the ${k(t.capacityKiB)} cap`:``}`,n,`measured ${U(e.at)}`].join(` · `)}),Q=m(()=>te(t.record)),$=m(()=>{let e=t.runs.map(e=>{let n=ne(e.label||V(e.id)),r=L(Q.value,e.threadKey),i=re(e);return{key:`run:${e.id}`,run:e,agent:n.agent,text:n.snippet??n.scope,who:i.identity,surface:ce[i.kind]??i.kind,threadUrl:se(e),href:ue(e),elapsed:le(e,t.now),binding:r,treeKiB:r?N(K.value,r.threadKey):null}}),n=new Set(t.runs.map(e=>e.threadKey));for(let t of Q.value)t.evicted||n.has(t.threadKey)||e.push({key:`idle:${t.threadKey}`,text:`idle`,who:``,surface:``,threadUrl:``,href:``,elapsed:``,binding:t,treeKiB:N(K.value,t.threadKey)});return e}),Ke=m(()=>$.value.filter(e=>!e.run).length);return(t,r)=>(u(),_(`li`,{class:`resident border-b border-muted first:border-t`,"data-slug":f.value,"data-running":e.runs.length},[g(`details`,{class:`group/fold`,open:n.value,onToggle:i},[g(`summary`,me,[r[1]||=g(`span`,{class:`chev w-3 select-none self-center text-xs text-dimmed transition-transform group-open/fold:rotate-90 motion-reduce:transition-none`,"aria-hidden":`true`},`❯`,-1),g(`span`,he,[o(T,{tone:S.value,label:h.value.state,tip:h.value.state},null,8,[`tone`,`label`,`tip`])]),g(`span`,ge,b(p.value),1),g(`span`,_e,b(h.value.state),1),e.runs.length>0?(u(),_(`span`,ve,b(e.runs.length)+` running`,1)):d(``,!0),g(`span`,{class:`facts font-mono text-xs text-muted max-sm:basis-full max-sm:pl-[1.9rem] sm:ml-2`,title:X.value||void 0},b(Y.value),9,ye),C.value?(u(),_(`a`,{key:1,class:`detail ml-auto shrink-0 text-xs text-muted no-underline hover:text-highlighted hover:underline`,href:C.value,onClick:r[0]||=ee(()=>{},[`stop`])},`detail ↗`,8,be)):d(``,!0),h.value.reason?(u(),_(`span`,xe,b(h.value.reason),1)):d(``,!0)]),g(`div`,Se,[$.value.length>0?(u(),_(`ul`,Ce,[(u(!0),_(a,null,v($.value,t=>(u(),_(`li`,{key:t.key,class:x([`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-3 gap-y-1 py-2 sm:grid-cols-[auto_minmax(0,1fr)_minmax(14rem,22rem)_auto]`,t.run?`run`:`idle`]),"data-run-id":t.run?.id,"data-thread":t.run?void 0:t.binding?.threadKey},[g(`span`,W,[t.run?(u(),c(T,{key:0,tone:`green`,label:y(ae)(t.run),tip:y(oe)(t.run),pulse:``},null,8,[`label`,`tip`])):(u(),c(T,{key:1,tone:`grey`,label:`idle`,tip:`no run is using this tree`}))]),g(`span`,Te,[g(`span`,Ee,[t.agent?(u(),_(`span`,{key:0,class:x([`agent shrink-0 rounded border px-1.5 font-mono text-[0.65rem] font-medium uppercase tracking-wider`,y(de)[y(ie)(t.agent)]])},b(t.agent),3)):d(``,!0),g(`span`,{class:x([`text min-w-0 truncate text-[0.8125rem]`,t.run?`text-highlighted`:`text-dimmed`]),title:t.run?t.text:void 0},b(t.text),11,De)]),t.run?(u(),_(`span`,Oe,[t.who?(u(),_(a,{key:0},[l(`by `+b(t.who),1)],64)):d(``,!0),t.who&&(t.threadUrl||t.surface)?(u(),_(a,{key:1},[l(b(` · `))],64)):d(``,!0),t.threadUrl?(u(),_(`a`,{key:2,class:`text-muted no-underline hover:text-highlighted hover:underline`,href:t.threadUrl,target:`_blank`,rel:`noopener noreferrer`},b(t.surface)+` thread ↗`,9,ke)):t.surface?(u(),_(a,{key:3},[l(`via `+b(t.surface),1)],64)):d(``,!0)])):t.binding?(u(),_(`span`,Ae,`last used `+b(U(t.binding.lastAttachAt)),1)):d(``,!0)]),g(`span`,je,[g(`span`,{class:`tree block truncate text-toned`,title:t.binding&&t.binding.ref||void 0},[t.binding?(u(),_(a,{key:0},[l(b(t.binding.ref||`?`),1),t.binding.sha?(u(),_(a,{key:0},[r[2]||=l(b(` `),-1),r[3]||=g(`span`,{class:`text-dimmed`},`@`,-1),r[4]||=l(b(` `)+` `,-1),D(t.binding.sha)?(u(),_(`a`,{key:0,class:`text-highlighted no-underline hover:underline`,href:D(t.binding.sha)},b(t.binding.sha.slice(0,8)),9,Ne)):(u(),_(`span`,Pe,b(t.binding.sha.slice(0,8)),1))],64)):d(``,!0)],64)):(u(),_(`span`,Fe,`no worktree bound yet`))],8,Me),t.binding?(u(),_(`span`,Ie,[g(`span`,Le,b(t.binding.user||`—`),1),r[5]||=l(` `+b(` · `),-1),g(`span`,Re,b(t.binding.deps||`—`),1),r[6]||=l(` `+b(` · `),-1),g(`span`,{class:x([`size`,t.treeKiB===null?``:`text-muted`]),title:t.treeKiB===null?`size not measured yet`:`on disk`},b(t.treeKiB===null?`—`:y(k)(t.treeKiB)),11,ze)])):d(``,!0)]),g(`span`,Be,[t.run?(u(),_(`span`,{key:0,class:`elapsed whitespace-nowrap font-mono text-xs tabular-nums text-ok`,title:`running for · started ${y(B)(t.run.startedAt,e.now)}`},b(t.elapsed),9,Ve)):d(``,!0),t.run?(u(),_(`a`,{key:1,class:`open text-xs text-muted no-underline hover:text-highlighted hover:underline`,href:t.href,"aria-label":`open run ${t.run.label||y(V)(t.run.id)}`},`open ↗`,8,He)):d(``,!0)])],10,we))),128))])):(u(),_(`p`,Ue,`nothing on this resident — no run, no worktree`)),g(`p`,{class:`disk mt-2 font-mono text-xs text-dimmed`,"data-idle":Ke.value},[Z.value?(u(),_(a,{key:0},[l(b(Z.value),1)],64)):(u(),_(`span`,Ge,`disk not measured yet`))],8,We)])],40,pe)],8,fe))}}),K={class:`conn flex items-center gap-1.5`},q={id:`state`,class:`text-xs text-muted`},J={class:`mb-2 text-xs text-muted`},Y={id:`running`,class:`font-mono tabular-nums`},X={id:`residents`,class:`m-0 list-none p-0`},Z={key:1,class:`px-2 py-1.5 text-muted`},Q=`Resident repos`,$=S({__name:`ResidentsIndexPage`,setup(ee){let d=h(`residents`),x=p({cap:d?.cap,count:d?.count,residents:d?.residents??[],runs:new Map((d?.runs??[]).map(e=>[e.id,e]))}),S=w(d?.now),k=s({tone:`amber`,text:`connecting…`}),A=typeof window<`u`?new URLSearchParams(window.location.search).get(`open`):null,j=m(()=>x.residents.map((e,t)=>{let n=e,r=E(n);return{key:`${r||`?`}-${t}`,record:n,slug:r,runs:O(x.runs.values(),r)}})),M=m(()=>I(x.cap)||`?`),N=m(()=>I(x.count)||String(j.value.length)),F=m(()=>j.value.reduce((e,t)=>e+t.runs.length,0));r([F,()=>x.residents],([t,n])=>{e.setTitle((t>0?`(${t}) `:``)+Q),e.setFavicon(U[D(n)])},{immediate:!0});let L=H(),R=null;return i(()=>{R=L(`/residents?stream=1`);let t=!1;R.onopen=()=>{if(t){e.reload();return}t=!0,k.value={tone:`green`,text:`live`}},R.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}P(x,t)},R.onerror=()=>{R&&R.readyState===2?k.value={tone:`red`,text:`disconnected`}:k.value={tone:`amber`,text:`connecting…`}}}),f(()=>{R?.close()}),(e,r)=>{let i=C;return u(),c(t,{title:Q,nav:`residents`},{status:n(()=>[o(i,{text:`runs arrive from the registry feed; the listing is re-read when a run attaches or ends`},{default:n(()=>[g(`span`,K,[o(T,{tone:k.value.tone,label:k.value.text},null,8,[`tone`,`label`]),g(`span`,q,b(k.value.text),1)])]),_:1})]),default:n(()=>[j.value.length>0?(u(),_(a,{key:0},[g(`p`,J,[l(b(`${N.value}/${M.value} resident slots in use · `),1),g(`span`,Y,b(F.value)+` running`,1)]),g(`ul`,X,[(u(!0),_(a,null,v(j.value,e=>(u(),c(G,{key:e.key,record:e.record,runs:e.runs,now:y(S),open:y(A)!==null&&y(A)===e.slug},null,8,[`record`,`runs`,`now`,`open`]))),128))])],64)):(u(),_(`p`,Z,[l(` No repos onboarded (0/`+b(M.value)+`). Onboard one from chat: `,1),r[0]||=g(`code`,{class:`rounded bg-elevated px-1.5 py-0.5`},`repo onboard <owner/name>`,-1),r[1]||=l(`. `,-1)]))]),_:1})}}});export{$ as default};
|
|
1
|
+
import{n as e,t}from"./AppShell-MYHNxJks.js";import{Lr as n,Mr as r,Qn as i,Wt as ee,Xt as a,_n as o,ci as s,cn as c,gn as l,ir as u,ln as d,nr as f,oi as p,on as m,r as h,sn as g,un as _,ur as v,vi as y,wi as b,xi as x,yn as S}from"./seed-DeKSHrt2.js";import{t as C}from"./Tooltip-DtLIyi5P.js";import{t as w}from"./wallClock-61NpVkY6.js";import{t as T}from"./StatusDot-DkXALvKf.js";import{c as E,d as D,f as O,g as k,h as A,i as j,l as M,m as N,n as P,o as F,p as I,r as L,s as R,t as z,u as te}from"./residentsModel-By1fThvk.js";import{i as ne,r as B}from"./localIso-CNA-bhS-.js";import{C as re,a as ie,b as ae,c as oe,g as V,h as se,i as ce,l as le,m as ue,t as de}from"./indexRow-FLJu5mR9.js";import{i as H,t as U}from"./favicon-CSt-qDvc.js";var fe=[`data-slug`,`data-running`],pe=[`open`],me={class:`row flex cursor-pointer list-none flex-wrap items-baseline gap-x-2.5 gap-y-1 rounded-md px-2 py-2 hover:bg-elevated [&::-webkit-details-marker]:hidden`},he={class:`self-center`},ge={class:`font-mono text-[0.9375rem] font-medium text-highlighted`},_e={class:`text-sm text-toned`},ve={key:0,class:`running shrink-0 rounded border border-ok/25 bg-ok/8 px-1.5 font-mono text-[0.68rem] font-medium tabular-nums text-ok`},ye=[`title`],be=[`href`],xe={key:2,class:`basis-full pl-[1.9rem] text-xs text-warn`},Se={class:`fold pb-3 pl-[1.9rem] pr-2 pt-0.5`},Ce={key:0,class:`m-0 list-none divide-y divide-(--ui-border-muted) p-0`},we=[`data-run-id`,`data-thread`],W={class:`pt-[0.3rem]`},Te={class:`what min-w-0`},Ee={class:`flex min-w-0 items-baseline gap-2`},De=[`title`],Oe={key:0,class:`who block truncate text-xs text-dimmed`},ke=[`href`],Ae={key:1,class:`who block text-xs text-dimmed`},je={class:`min-w-0 font-mono text-xs max-sm:col-span-2 max-sm:col-start-2 max-sm:row-start-2`},Me=[`title`],Ne=[`href`],Pe={key:1},Fe={key:1,class:`font-sans text-dimmed`},Ie={key:0,class:`facts-tree block truncate text-dimmed`},Le={class:`user`},Re={class:`deps`},ze=[`title`],Be={class:`flex items-baseline gap-3 justify-self-end max-sm:col-start-3 max-sm:row-start-1`},Ve=[`title`],He=[`href`,`aria-label`],Ue={key:1,class:`py-1 text-xs text-dimmed`},We=[`data-idle`],Ge={key:1},G=S({__name:`ResidentRow`,props:{record:{},runs:{},now:{},open:{type:Boolean}},setup(e){let t=e,n=s(t.open===!0);r(()=>t.open,e=>{e&&(n.value=!0)});function i(e){n.value=e.target.open}let f=m(()=>E(t.record)),p=m(()=>f.value||I(t.record.resource)||`?`),h=m(()=>R(t.record)),S=m(()=>M(h.value.state)),C=m(()=>z.test(f.value)?`/residents/${f.value}`:null),w=m(()=>z.test(f.value)?`https://github.com/${f.value}`:void 0),D=e=>w.value&&/^[0-9a-f]{7,40}$/.test(e)?`${w.value}/commit/${e}`:void 0,O=m(()=>I(t.record.defaultRef)||`?`),P=m(()=>I(h.value.sha).slice(0,8)),H=m(()=>I(h.value.lastRefreshAt)),U=e=>{let n=e?Date.parse(e):NaN;return Number.isFinite(n)?B(n,t.now):e||`—`},G=m(()=>H.value?U(H.value):``),K=m(()=>F(t.record)),q=m(()=>K.value?A(K.value):``),J=m(()=>{let e=K.value;if(!e)return null;let n=typeof t.record.diskBudgetMb==`number`?t.record.diskBudgetMb:void 0;return j(e,n)}),Y=m(()=>[`ref ${O.value}`,P.value,G.value?`refreshed ${G.value}`:``,q.value?`disk ${q.value}`:``].filter(Boolean).join(` · `)),X=m(()=>[H.value?`refreshed ${H.value}`:``,K.value?.at?`disk measured ${K.value.at}`:``].filter(Boolean).join(` · `)),Z=m(()=>{let e=K.value,t=J.value;if(!e||!t)return``;let n=t.room.hardlink===null?`room not projected (checkout not measured)`:`room for ${t.room.hardlink} more ${t.room.hardlink===1?`tree`:`trees`}`;return[`${k(t.freeKiB)} free${t.capped?` under the ${k(t.capacityKiB)} cap`:``}`,n,`measured ${U(e.at)}`].join(` · `)}),Q=m(()=>te(t.record)),$=m(()=>{let e=t.runs.map(e=>{let n=ne(e.label||V(e.id)),r=L(Q.value,e.threadKey),i=re(e);return{key:`run:${e.id}`,run:e,agent:n.agent,text:n.snippet??n.scope,who:i.identity,surface:ce[i.kind]??i.kind,threadUrl:se(e),href:ue(e),elapsed:le(e,t.now),binding:r,treeKiB:r?N(K.value,r.threadKey):null}}),n=new Set(t.runs.map(e=>e.threadKey));for(let t of Q.value)t.evicted||n.has(t.threadKey)||e.push({key:`idle:${t.threadKey}`,text:`idle`,who:``,surface:``,threadUrl:``,href:``,elapsed:``,binding:t,treeKiB:N(K.value,t.threadKey)});return e}),Ke=m(()=>$.value.filter(e=>!e.run).length);return(t,r)=>(u(),_(`li`,{class:`resident border-b border-muted first:border-t`,"data-slug":f.value,"data-running":e.runs.length},[g(`details`,{class:`group/fold`,open:n.value,onToggle:i},[g(`summary`,me,[r[1]||=g(`span`,{class:`chev w-3 select-none self-center text-xs text-dimmed transition-transform group-open/fold:rotate-90 motion-reduce:transition-none`,"aria-hidden":`true`},`❯`,-1),g(`span`,he,[o(T,{tone:S.value,label:h.value.state,tip:h.value.state},null,8,[`tone`,`label`,`tip`])]),g(`span`,ge,b(p.value),1),g(`span`,_e,b(h.value.state),1),e.runs.length>0?(u(),_(`span`,ve,b(e.runs.length)+` running`,1)):d(``,!0),g(`span`,{class:`facts font-mono text-xs text-muted max-sm:basis-full max-sm:pl-[1.9rem] sm:ml-2`,title:X.value||void 0},b(Y.value),9,ye),C.value?(u(),_(`a`,{key:1,class:`detail ml-auto shrink-0 text-xs text-muted no-underline hover:text-highlighted hover:underline`,href:C.value,onClick:r[0]||=ee(()=>{},[`stop`])},`detail ↗`,8,be)):d(``,!0),h.value.reason?(u(),_(`span`,xe,b(h.value.reason),1)):d(``,!0)]),g(`div`,Se,[$.value.length>0?(u(),_(`ul`,Ce,[(u(!0),_(a,null,v($.value,t=>(u(),_(`li`,{key:t.key,class:x([`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-3 gap-y-1 py-2 sm:grid-cols-[auto_minmax(0,1fr)_minmax(14rem,22rem)_auto]`,t.run?`run`:`idle`]),"data-run-id":t.run?.id,"data-thread":t.run?void 0:t.binding?.threadKey},[g(`span`,W,[t.run?(u(),c(T,{key:0,tone:`green`,label:y(ae)(t.run),tip:y(oe)(t.run),pulse:``},null,8,[`label`,`tip`])):(u(),c(T,{key:1,tone:`grey`,label:`idle`,tip:`no run is using this tree`}))]),g(`span`,Te,[g(`span`,Ee,[t.agent?(u(),_(`span`,{key:0,class:x([`agent shrink-0 rounded border px-1.5 font-mono text-[0.65rem] font-medium uppercase tracking-wider`,y(de)[y(ie)(t.agent)]])},b(t.agent),3)):d(``,!0),g(`span`,{class:x([`text min-w-0 truncate text-[0.8125rem]`,t.run?`text-highlighted`:`text-dimmed`]),title:t.run?t.text:void 0},b(t.text),11,De)]),t.run?(u(),_(`span`,Oe,[t.who?(u(),_(a,{key:0},[l(`by `+b(t.who),1)],64)):d(``,!0),t.who&&(t.threadUrl||t.surface)?(u(),_(a,{key:1},[l(b(` · `))],64)):d(``,!0),t.threadUrl?(u(),_(`a`,{key:2,class:`text-muted no-underline hover:text-highlighted hover:underline`,href:t.threadUrl,target:`_blank`,rel:`noopener noreferrer`},b(t.surface)+` thread ↗`,9,ke)):t.surface?(u(),_(a,{key:3},[l(`via `+b(t.surface),1)],64)):d(``,!0)])):t.binding?(u(),_(`span`,Ae,`last used `+b(U(t.binding.lastAttachAt)),1)):d(``,!0)]),g(`span`,je,[g(`span`,{class:`tree block truncate text-toned`,title:t.binding&&t.binding.ref||void 0},[t.binding?(u(),_(a,{key:0},[l(b(t.binding.ref||`?`),1),t.binding.sha?(u(),_(a,{key:0},[r[2]||=l(b(` `),-1),r[3]||=g(`span`,{class:`text-dimmed`},`@`,-1),r[4]||=l(b(` `)+` `,-1),D(t.binding.sha)?(u(),_(`a`,{key:0,class:`text-highlighted no-underline hover:underline`,href:D(t.binding.sha)},b(t.binding.sha.slice(0,8)),9,Ne)):(u(),_(`span`,Pe,b(t.binding.sha.slice(0,8)),1))],64)):d(``,!0)],64)):(u(),_(`span`,Fe,`no worktree bound yet`))],8,Me),t.binding?(u(),_(`span`,Ie,[g(`span`,Le,b(t.binding.user||`—`),1),r[5]||=l(` `+b(` · `),-1),g(`span`,Re,b(t.binding.deps||`—`),1),r[6]||=l(` `+b(` · `),-1),g(`span`,{class:x([`size`,t.treeKiB===null?``:`text-muted`]),title:t.treeKiB===null?`size not measured yet`:`on disk`},b(t.treeKiB===null?`—`:y(k)(t.treeKiB)),11,ze)])):d(``,!0)]),g(`span`,Be,[t.run?(u(),_(`span`,{key:0,class:`elapsed whitespace-nowrap font-mono text-xs tabular-nums text-ok`,title:`running for · started ${y(B)(t.run.startedAt,e.now)}`},b(t.elapsed),9,Ve)):d(``,!0),t.run?(u(),_(`a`,{key:1,class:`open text-xs text-muted no-underline hover:text-highlighted hover:underline`,href:t.href,"aria-label":`open run ${t.run.label||y(V)(t.run.id)}`},`open ↗`,8,He)):d(``,!0)])],10,we))),128))])):(u(),_(`p`,Ue,`nothing on this resident — no run, no worktree`)),g(`p`,{class:`disk mt-2 font-mono text-xs text-dimmed`,"data-idle":Ke.value},[Z.value?(u(),_(a,{key:0},[l(b(Z.value),1)],64)):(u(),_(`span`,Ge,`disk not measured yet`))],8,We)])],40,pe)],8,fe))}}),K={class:`conn flex items-center gap-1.5`},q={id:`state`,class:`text-xs text-muted`},J={class:`mb-2 text-xs text-muted`},Y={id:`running`,class:`font-mono tabular-nums`},X={id:`residents`,class:`m-0 list-none p-0`},Z={key:1,class:`px-2 py-1.5 text-muted`},Q=`Resident repos`,$=S({__name:`ResidentsIndexPage`,setup(ee){let d=h(`residents`),x=p({cap:d?.cap,count:d?.count,residents:d?.residents??[],runs:new Map((d?.runs??[]).map(e=>[e.id,e]))}),S=w(d?.now),k=s({tone:`amber`,text:`connecting…`}),A=typeof window<`u`?new URLSearchParams(window.location.search).get(`open`):null,j=m(()=>x.residents.map((e,t)=>{let n=e,r=E(n);return{key:`${r||`?`}-${t}`,record:n,slug:r,runs:O(x.runs.values(),r)}})),M=m(()=>I(x.cap)||`?`),N=m(()=>I(x.count)||String(j.value.length)),F=m(()=>j.value.reduce((e,t)=>e+t.runs.length,0));r([F,()=>x.residents],([t,n])=>{e.setTitle((t>0?`(${t}) `:``)+Q),e.setFavicon(U[D(n)])},{immediate:!0});let L=H(),R=null;return i(()=>{R=L(`/residents?stream=1`);let t=!1;R.onopen=()=>{if(t){e.reload();return}t=!0,k.value={tone:`green`,text:`live`}},R.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}P(x,t)},R.onerror=()=>{R&&R.readyState===2?k.value={tone:`red`,text:`disconnected`}:k.value={tone:`amber`,text:`connecting…`}}}),f(()=>{R?.close()}),(e,r)=>{let i=C;return u(),c(t,{title:Q,nav:`residents`},{status:n(()=>[o(i,{text:`runs arrive from the registry feed; the listing is re-read when a run attaches or ends`},{default:n(()=>[g(`span`,K,[o(T,{tone:k.value.tone,label:k.value.text},null,8,[`tone`,`label`]),g(`span`,q,b(k.value.text),1)])]),_:1})]),default:n(()=>[j.value.length>0?(u(),_(a,{key:0},[g(`p`,J,[l(b(`${N.value}/${M.value} resident slots in use · `),1),g(`span`,Y,b(F.value)+` running`,1)]),g(`ul`,X,[(u(!0),_(a,null,v(j.value,e=>(u(),c(G,{key:e.key,record:e.record,runs:e.runs,now:y(S),open:y(A)!==null&&y(A)===e.slug},null,8,[`record`,`runs`,`now`,`open`]))),128))])],64)):(u(),_(`p`,Z,[l(` No repos onboarded (0/`+b(M.value)+`). Onboard one from chat: `,1),r[0]||=g(`code`,{class:`rounded bg-elevated px-1.5 py-0.5`},`repo onboard <owner/name>`,-1),r[1]||=l(`. `,-1)]))]),_:1})}}});export{$ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t}from"./AppShell-MYHNxJks.js";import{Ci as n,Gn as r,Mr as i,Qn as a,Rn as o,Wt as s,Xt as c,_n as l,ci as u,cn as d,gn as f,ir as p,ln as m,oi as h,on as g,sn as _,un as v,ur as y,vi as b,wi as x,xi as S,yn as C}from"./seed-DeKSHrt2.js";import{n as w}from"./wallClock-61NpVkY6.js";import{t as T}from"./StatusDot-
|
|
1
|
+
import{n as e,r as t}from"./AppShell-MYHNxJks.js";import{Ci as n,Gn as r,Mr as i,Qn as a,Rn as o,Wt as s,Xt as c,_n as l,ci as u,cn as d,gn as f,ir as p,ln as m,oi as h,on as g,sn as _,un as v,ur as y,vi as b,wi as x,xi as S,yn as C}from"./seed-DeKSHrt2.js";import{n as w}from"./wallClock-61NpVkY6.js";import{t as T}from"./StatusDot-DkXALvKf.js";import{i as E,n as D,t as O}from"./localIso-CNA-bhS-.js";import{D as k,E as A,a as j,b as M,c as N,g as P,l as F,m as ee,o as I,t as L,v as te,w as R,y as ne}from"./indexRow-FLJu5mR9.js";import{n as z,r as re,t as B}from"./durationTone-CYMux25J.js";function ie(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 V(e){return e>0?e<1024?`${e} B`:e<1048576?`${(Math.round(e/102.4)/10).toFixed(1)} KB`:e<1073741824?`${(Math.round(e/104857.6)/10).toFixed(1)} MB`:`${(Math.round(e/107374182.4)/10).toFixed(1)} GB`:`0 B`}function ae(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(`
|