@coreplane/switchboard 1.251.0 → 1.252.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/config/config.example.yaml +4 -2
- package/dist/assets/deploy/cloudflare/preflight.mjs +19 -21
- package/dist/assets/deploy/cloudflare/worker.ts +6 -3
- package/dist/assets/deploy/cloudflare-memory/worker.ts +77 -12
- package/dist/assets/deploy/cloudflare-resident/memoryGuard.ts +212 -0
- package/dist/assets/deploy/cloudflare-resident/refresh.ts +1 -1
- package/dist/assets/deploy/cloudflare-resident/worker.ts +317 -56
- package/dist/assets/deploy/cloudflare-sandbox/Dockerfile +4 -2
- package/dist/assets/deploy/cloudflare-sandbox/runtime-supervisor.d.mts +31 -0
- package/dist/assets/deploy/cloudflare-sandbox/runtime-supervisor.mjs +119 -0
- package/dist/assets/package-lock.json +3 -3
- package/dist/assets/package.json +3 -2
- package/dist/assets/project.json +13 -9
- package/dist/assets/source.json +3 -3
- package/dist/assets/src/agents/registry.ts +5 -5
- package/dist/assets/src/core/budgets.ts +22 -0
- package/dist/assets/src/core/coordinator/contract.ts +42 -0
- package/dist/assets/src/core/coordinator/driver.ts +134 -10
- package/dist/assets/src/core/drain.ts +50 -0
- package/dist/assets/src/core/memory/engine.ts +98 -0
- package/dist/assets/src/core/memory/scorer.ts +12 -4
- package/dist/assets/src/core/memory/types.ts +69 -12
- package/dist/assets/src/core/modelCard.ts +32 -4
- package/dist/assets/src/core/modelPricing.ts +111 -1
- package/dist/assets/src/core/modelProxy/usage.ts +88 -0
- package/dist/assets/src/core/modelRegistry.ts +15 -1
- package/dist/assets/src/core/refusal.ts +4 -7
- package/dist/assets/src/core/reviewVerdict.ts +4 -0
- package/dist/assets/src/core/runEvents.ts +51 -2
- package/dist/assets/src/core/runFriction.ts +7 -2
- package/dist/assets/src/core/runLedger/types.ts +11 -0
- package/dist/assets/src/core/runUsage.ts +67 -13
- package/dist/assets/src/core/schedules.ts +3 -0
- package/dist/assets/src/core/ship/contract.ts +41 -14
- package/dist/assets/src/core/ship/coordinator.ts +380 -53
- package/dist/assets/src/core/ship/renewal.ts +10 -5
- package/dist/assets/src/core/trace/attrs.ts +24 -0
- package/dist/assets/src/core/types.ts +5 -5
- package/dist/assets/src/core/verbosity.ts +48 -0
- package/dist/assets/src/deploy/liveGate.ts +40 -13
- package/dist/assets/src/deploy/restart.ts +11 -12
- package/dist/assets/src/execution/residentDepCache.ts +50 -1
- package/dist/assets/src/execution/residentDepsStore.ts +40 -2
- package/dist/assets/src/execution/residentRefresh.ts +55 -3
- package/dist/assets/src/execution/residentSteps.ts +4 -0
- package/dist/assets/src/execution/sandboxErrors.ts +8 -0
- package/dist/assets/web/dist/.vite/manifest.json +55 -55
- package/dist/assets/web/dist/assets/{DeliveryPage-DUXd-Sl-.js → DeliveryPage-3ELQWM0r.js} +1 -1
- package/dist/assets/web/dist/assets/HomePage-BG_ok-K2.js +2 -0
- package/dist/assets/web/dist/assets/{PendingTurnRow-DDhMhrI7.js → PendingTurnRow-ChCQOLgZ.js} +1 -1
- package/dist/assets/web/dist/assets/{ResidentDetailPage-BnEoOnGQ.js → ResidentDetailPage-C9y3nbo8.js} +1 -1
- package/dist/assets/web/dist/assets/{ResidentsIndexPage-Dxpgf-l-.js → ResidentsIndexPage-i1RG9e7g.js} +1 -1
- package/dist/assets/web/dist/assets/RunFoldRow-D3wVpzBa.js +1 -0
- package/dist/assets/web/dist/assets/{RunRoutePage-9klVWhSF.js → RunRoutePage-B3IirUVi.js} +4 -4
- package/dist/assets/web/dist/assets/RunsIndexPage-DiFmtGaJ.js +1 -0
- package/dist/assets/web/dist/assets/{ScheduledPage-B_GgeJrb.js → ScheduledPage-DvYwM2TE.js} +1 -1
- package/dist/assets/web/dist/assets/{SettingsPage-BXX4R113.js → SettingsPage-Bo6yCyXZ.js} +1 -1
- package/dist/assets/web/dist/assets/{StatusDot-BOaw8le9.js → StatusDot-CAfS1AUi.js} +1 -1
- package/dist/assets/web/dist/assets/{Tooltip-DYZZ4l4V.js → Tooltip-tZoum_T-.js} +1 -1
- package/dist/assets/web/dist/assets/{UnitRoutePage-BaSW5Odq.js → UnitRoutePage-BmdOHwNn.js} +1 -1
- package/dist/assets/web/dist/assets/budgets-CbIyPAER.js +1 -0
- package/dist/assets/web/dist/assets/{dist-BCVXeBJ9.js → dist-DfbEpHXR.js} +1 -1
- package/dist/assets/web/dist/assets/indexRow-BT0cPVRw.js +1 -0
- package/dist/assets/web/dist/assets/{main-Dkcbtu3u.js → main-5Gm_1Gv8.js} +2 -2
- package/dist/assets/web/dist/assets/sseReplay-DmyMXfRC.js +11 -0
- package/dist/cli.js +2470 -902
- package/package.json +1 -1
- package/dist/assets/deploy/cloudflare-sandbox/runtime-supervisor.sh +0 -68
- package/dist/assets/web/dist/assets/HomePage-mSiqEEcN.js +0 -2
- package/dist/assets/web/dist/assets/RunFoldRow-CSo4-vld.js +0 -1
- package/dist/assets/web/dist/assets/RunsIndexPage-BplMIgaw.js +0 -1
- package/dist/assets/web/dist/assets/budgets-BvWYKPsY.js +0 -1
- package/dist/assets/web/dist/assets/indexRow-Bde9OZxG.js +0 -1
- package/dist/assets/web/dist/assets/sseReplay-DPwdsaok.js +0 -9
|
@@ -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-DfbEpHXR.js",
|
|
32
32
|
"name": "dist",
|
|
33
33
|
"src": "../node_modules/@pierre/diffs/dist/index.js",
|
|
34
34
|
"isDynamicEntry": true,
|
|
@@ -2562,28 +2562,28 @@
|
|
|
2562
2562
|
"_RunsTabs-YSbUu5py.js"
|
|
2563
2563
|
]
|
|
2564
2564
|
},
|
|
2565
|
-
"_PendingTurnRow-
|
|
2566
|
-
"file": "assets/PendingTurnRow-
|
|
2565
|
+
"_PendingTurnRow-ChCQOLgZ.js": {
|
|
2566
|
+
"file": "assets/PendingTurnRow-ChCQOLgZ.js",
|
|
2567
2567
|
"name": "PendingTurnRow",
|
|
2568
2568
|
"imports": [
|
|
2569
2569
|
"_AppShell-DAtHiuI6.js",
|
|
2570
2570
|
"_browser-B6T5hjfR.js",
|
|
2571
|
-
"_indexRow-
|
|
2571
|
+
"_indexRow-BT0cPVRw.js",
|
|
2572
2572
|
"_format-BldUwl_R.js",
|
|
2573
|
-
"_sseReplay-
|
|
2573
|
+
"_sseReplay-DmyMXfRC.js"
|
|
2574
2574
|
]
|
|
2575
2575
|
},
|
|
2576
|
-
"_RunFoldRow-
|
|
2577
|
-
"file": "assets/RunFoldRow-
|
|
2576
|
+
"_RunFoldRow-D3wVpzBa.js": {
|
|
2577
|
+
"file": "assets/RunFoldRow-D3wVpzBa.js",
|
|
2578
2578
|
"name": "RunFoldRow",
|
|
2579
2579
|
"imports": [
|
|
2580
2580
|
"_browser-B6T5hjfR.js",
|
|
2581
2581
|
"_indexFormat-B-pd4r7Y.js",
|
|
2582
|
-
"_indexRow-
|
|
2582
|
+
"_indexRow-BT0cPVRw.js",
|
|
2583
2583
|
"_format-BldUwl_R.js",
|
|
2584
2584
|
"_durationTone-U_rOqo6r.js",
|
|
2585
|
-
"_sseReplay-
|
|
2586
|
-
"_StatusDot-
|
|
2585
|
+
"_sseReplay-DmyMXfRC.js",
|
|
2586
|
+
"_StatusDot-CAfS1AUi.js"
|
|
2587
2587
|
]
|
|
2588
2588
|
},
|
|
2589
2589
|
"_RunsTabs-YSbUu5py.js": {
|
|
@@ -2602,16 +2602,16 @@
|
|
|
2602
2602
|
"_browser-B6T5hjfR.js"
|
|
2603
2603
|
]
|
|
2604
2604
|
},
|
|
2605
|
-
"_StatusDot-
|
|
2606
|
-
"file": "assets/StatusDot-
|
|
2605
|
+
"_StatusDot-CAfS1AUi.js": {
|
|
2606
|
+
"file": "assets/StatusDot-CAfS1AUi.js",
|
|
2607
2607
|
"name": "StatusDot",
|
|
2608
2608
|
"imports": [
|
|
2609
2609
|
"_browser-B6T5hjfR.js",
|
|
2610
|
-
"_Tooltip-
|
|
2610
|
+
"_Tooltip-tZoum_T-.js"
|
|
2611
2611
|
]
|
|
2612
2612
|
},
|
|
2613
|
-
"_Tooltip-
|
|
2614
|
-
"file": "assets/Tooltip-
|
|
2613
|
+
"_Tooltip-tZoum_T-.js": {
|
|
2614
|
+
"file": "assets/Tooltip-tZoum_T-.js",
|
|
2615
2615
|
"name": "Tooltip",
|
|
2616
2616
|
"imports": [
|
|
2617
2617
|
"_AppShell-DAtHiuI6.js",
|
|
@@ -2631,8 +2631,8 @@
|
|
|
2631
2631
|
"file": "assets/browser-B6T5hjfR.js",
|
|
2632
2632
|
"name": "browser"
|
|
2633
2633
|
},
|
|
2634
|
-
"_budgets-
|
|
2635
|
-
"file": "assets/budgets-
|
|
2634
|
+
"_budgets-CbIyPAER.js": {
|
|
2635
|
+
"file": "assets/budgets-CbIyPAER.js",
|
|
2636
2636
|
"name": "budgets"
|
|
2637
2637
|
},
|
|
2638
2638
|
"_c-BwbC64D4.js": {
|
|
@@ -2721,11 +2721,11 @@
|
|
|
2721
2721
|
"file": "assets/indexFormat-B-pd4r7Y.js",
|
|
2722
2722
|
"name": "indexFormat"
|
|
2723
2723
|
},
|
|
2724
|
-
"_indexRow-
|
|
2725
|
-
"file": "assets/indexRow-
|
|
2724
|
+
"_indexRow-BT0cPVRw.js": {
|
|
2725
|
+
"file": "assets/indexRow-BT0cPVRw.js",
|
|
2726
2726
|
"name": "indexRow",
|
|
2727
2727
|
"imports": [
|
|
2728
|
-
"_budgets-
|
|
2728
|
+
"_budgets-CbIyPAER.js",
|
|
2729
2729
|
"_format-BldUwl_R.js"
|
|
2730
2730
|
]
|
|
2731
2731
|
},
|
|
@@ -2805,13 +2805,13 @@
|
|
|
2805
2805
|
"_AppShell-DAtHiuI6.js"
|
|
2806
2806
|
]
|
|
2807
2807
|
},
|
|
2808
|
-
"_sseReplay-
|
|
2809
|
-
"file": "assets/sseReplay-
|
|
2808
|
+
"_sseReplay-DmyMXfRC.js": {
|
|
2809
|
+
"file": "assets/sseReplay-DmyMXfRC.js",
|
|
2810
2810
|
"name": "sseReplay",
|
|
2811
2811
|
"imports": [
|
|
2812
2812
|
"_browser-B6T5hjfR.js",
|
|
2813
2813
|
"_wallClock-DmaC1sKA.js",
|
|
2814
|
-
"_indexRow-
|
|
2814
|
+
"_indexRow-BT0cPVRw.js",
|
|
2815
2815
|
"_format-BldUwl_R.js",
|
|
2816
2816
|
"_durationTone-U_rOqo6r.js"
|
|
2817
2817
|
]
|
|
@@ -2861,7 +2861,7 @@
|
|
|
2861
2861
|
]
|
|
2862
2862
|
},
|
|
2863
2863
|
"src/main.ts": {
|
|
2864
|
-
"file": "assets/main-
|
|
2864
|
+
"file": "assets/main-5Gm_1Gv8.js",
|
|
2865
2865
|
"name": "main",
|
|
2866
2866
|
"src": "src/main.ts",
|
|
2867
2867
|
"isEntry": true,
|
|
@@ -2909,7 +2909,7 @@
|
|
|
2909
2909
|
]
|
|
2910
2910
|
},
|
|
2911
2911
|
"src/pages/DeliveryPage.vue": {
|
|
2912
|
-
"file": "assets/DeliveryPage-
|
|
2912
|
+
"file": "assets/DeliveryPage-3ELQWM0r.js",
|
|
2913
2913
|
"name": "DeliveryPage",
|
|
2914
2914
|
"src": "src/pages/DeliveryPage.vue",
|
|
2915
2915
|
"isDynamicEntry": true,
|
|
@@ -2918,31 +2918,31 @@
|
|
|
2918
2918
|
"_browser-B6T5hjfR.js",
|
|
2919
2919
|
"_delivery-CTdOqpVK.js",
|
|
2920
2920
|
"_wallClock-DmaC1sKA.js",
|
|
2921
|
-
"_budgets-
|
|
2921
|
+
"_budgets-CbIyPAER.js"
|
|
2922
2922
|
]
|
|
2923
2923
|
},
|
|
2924
2924
|
"src/pages/HomePage.vue": {
|
|
2925
|
-
"file": "assets/HomePage-
|
|
2925
|
+
"file": "assets/HomePage-BG_ok-K2.js",
|
|
2926
2926
|
"name": "HomePage",
|
|
2927
2927
|
"src": "src/pages/HomePage.vue",
|
|
2928
2928
|
"isDynamicEntry": true,
|
|
2929
2929
|
"imports": [
|
|
2930
2930
|
"_AppShell-DAtHiuI6.js",
|
|
2931
2931
|
"_browser-B6T5hjfR.js",
|
|
2932
|
-
"_Tooltip-
|
|
2933
|
-
"_PendingTurnRow-
|
|
2932
|
+
"_Tooltip-tZoum_T-.js",
|
|
2933
|
+
"_PendingTurnRow-ChCQOLgZ.js",
|
|
2934
2934
|
"src/main.ts",
|
|
2935
2935
|
"_eventSource-Bj_dZf6M.js",
|
|
2936
2936
|
"_wallClock-DmaC1sKA.js",
|
|
2937
2937
|
"_indexFormat-B-pd4r7Y.js",
|
|
2938
|
-
"_indexRow-
|
|
2938
|
+
"_indexRow-BT0cPVRw.js",
|
|
2939
2939
|
"_format-BldUwl_R.js",
|
|
2940
2940
|
"_durationTone-U_rOqo6r.js",
|
|
2941
|
-
"_sseReplay-
|
|
2941
|
+
"_sseReplay-DmyMXfRC.js"
|
|
2942
2942
|
]
|
|
2943
2943
|
},
|
|
2944
2944
|
"src/pages/ResidentDetailPage.vue": {
|
|
2945
|
-
"file": "assets/ResidentDetailPage-
|
|
2945
|
+
"file": "assets/ResidentDetailPage-C9y3nbo8.js",
|
|
2946
2946
|
"name": "ResidentDetailPage",
|
|
2947
2947
|
"src": "src/pages/ResidentDetailPage.vue",
|
|
2948
2948
|
"isDynamicEntry": true,
|
|
@@ -2950,47 +2950,47 @@
|
|
|
2950
2950
|
"_AppShell-DAtHiuI6.js",
|
|
2951
2951
|
"_browser-B6T5hjfR.js",
|
|
2952
2952
|
"src/main.ts",
|
|
2953
|
-
"_StatusDot-
|
|
2953
|
+
"_StatusDot-CAfS1AUi.js"
|
|
2954
2954
|
]
|
|
2955
2955
|
},
|
|
2956
2956
|
"src/pages/ResidentsIndexPage.vue": {
|
|
2957
|
-
"file": "assets/ResidentsIndexPage-
|
|
2957
|
+
"file": "assets/ResidentsIndexPage-i1RG9e7g.js",
|
|
2958
2958
|
"name": "ResidentsIndexPage",
|
|
2959
2959
|
"src": "src/pages/ResidentsIndexPage.vue",
|
|
2960
2960
|
"isDynamicEntry": true,
|
|
2961
2961
|
"imports": [
|
|
2962
2962
|
"_AppShell-DAtHiuI6.js",
|
|
2963
2963
|
"_browser-B6T5hjfR.js",
|
|
2964
|
-
"_Tooltip-
|
|
2964
|
+
"_Tooltip-tZoum_T-.js",
|
|
2965
2965
|
"src/main.ts",
|
|
2966
2966
|
"_eventSource-Bj_dZf6M.js",
|
|
2967
2967
|
"_wallClock-DmaC1sKA.js",
|
|
2968
2968
|
"_indexFormat-B-pd4r7Y.js",
|
|
2969
|
-
"_indexRow-
|
|
2969
|
+
"_indexRow-BT0cPVRw.js",
|
|
2970
2970
|
"_format-BldUwl_R.js",
|
|
2971
|
-
"_StatusDot-
|
|
2971
|
+
"_StatusDot-CAfS1AUi.js"
|
|
2972
2972
|
]
|
|
2973
2973
|
},
|
|
2974
2974
|
"src/pages/RunRoutePage.vue": {
|
|
2975
|
-
"file": "assets/RunRoutePage-
|
|
2975
|
+
"file": "assets/RunRoutePage-B3IirUVi.js",
|
|
2976
2976
|
"name": "RunRoutePage",
|
|
2977
2977
|
"src": "src/pages/RunRoutePage.vue",
|
|
2978
2978
|
"isDynamicEntry": true,
|
|
2979
2979
|
"imports": [
|
|
2980
2980
|
"_AppShell-DAtHiuI6.js",
|
|
2981
2981
|
"_browser-B6T5hjfR.js",
|
|
2982
|
-
"_Tooltip-
|
|
2983
|
-
"_PendingTurnRow-
|
|
2982
|
+
"_Tooltip-tZoum_T-.js",
|
|
2983
|
+
"_PendingTurnRow-ChCQOLgZ.js",
|
|
2984
2984
|
"src/main.ts",
|
|
2985
2985
|
"_eventSource-Bj_dZf6M.js",
|
|
2986
2986
|
"_wallClock-DmaC1sKA.js",
|
|
2987
2987
|
"_indexFormat-B-pd4r7Y.js",
|
|
2988
|
-
"_indexRow-
|
|
2988
|
+
"_indexRow-BT0cPVRw.js",
|
|
2989
2989
|
"_format-BldUwl_R.js",
|
|
2990
2990
|
"_durationTone-U_rOqo6r.js",
|
|
2991
|
-
"_sseReplay-
|
|
2991
|
+
"_sseReplay-DmyMXfRC.js",
|
|
2992
2992
|
"_NotFoundPage-DtE-GgTk.js",
|
|
2993
|
-
"_RunFoldRow-
|
|
2993
|
+
"_RunFoldRow-D3wVpzBa.js"
|
|
2994
2994
|
],
|
|
2995
2995
|
"dynamicImports": [
|
|
2996
2996
|
"../node_modules/@pierre/diffs/dist/index.js"
|
|
@@ -3000,35 +3000,35 @@
|
|
|
3000
3000
|
]
|
|
3001
3001
|
},
|
|
3002
3002
|
"src/pages/RunsIndexPage.vue": {
|
|
3003
|
-
"file": "assets/RunsIndexPage-
|
|
3003
|
+
"file": "assets/RunsIndexPage-DiFmtGaJ.js",
|
|
3004
3004
|
"name": "RunsIndexPage",
|
|
3005
3005
|
"src": "src/pages/RunsIndexPage.vue",
|
|
3006
3006
|
"isDynamicEntry": true,
|
|
3007
3007
|
"imports": [
|
|
3008
3008
|
"_AppShell-DAtHiuI6.js",
|
|
3009
3009
|
"_browser-B6T5hjfR.js",
|
|
3010
|
-
"_Tooltip-
|
|
3010
|
+
"_Tooltip-tZoum_T-.js",
|
|
3011
3011
|
"_InputMenu-C6aPpe30.js",
|
|
3012
3012
|
"src/main.ts",
|
|
3013
3013
|
"_eventSource-Bj_dZf6M.js",
|
|
3014
3014
|
"_wallClock-DmaC1sKA.js",
|
|
3015
3015
|
"_indexFormat-B-pd4r7Y.js",
|
|
3016
|
-
"_indexRow-
|
|
3016
|
+
"_indexRow-BT0cPVRw.js",
|
|
3017
3017
|
"_format-BldUwl_R.js",
|
|
3018
3018
|
"_durationTone-U_rOqo6r.js",
|
|
3019
3019
|
"_RunsTabs-YSbUu5py.js",
|
|
3020
|
-
"_StatusDot-
|
|
3020
|
+
"_StatusDot-CAfS1AUi.js"
|
|
3021
3021
|
]
|
|
3022
3022
|
},
|
|
3023
3023
|
"src/pages/ScheduledPage.vue": {
|
|
3024
|
-
"file": "assets/ScheduledPage-
|
|
3024
|
+
"file": "assets/ScheduledPage-DvYwM2TE.js",
|
|
3025
3025
|
"name": "ScheduledPage",
|
|
3026
3026
|
"src": "src/pages/ScheduledPage.vue",
|
|
3027
3027
|
"isDynamicEntry": true,
|
|
3028
3028
|
"imports": [
|
|
3029
3029
|
"_AppShell-DAtHiuI6.js",
|
|
3030
3030
|
"_browser-B6T5hjfR.js",
|
|
3031
|
-
"_Tooltip-
|
|
3031
|
+
"_Tooltip-tZoum_T-.js",
|
|
3032
3032
|
"_wallClock-DmaC1sKA.js",
|
|
3033
3033
|
"_indexFormat-B-pd4r7Y.js",
|
|
3034
3034
|
"_format-BldUwl_R.js",
|
|
@@ -3036,7 +3036,7 @@
|
|
|
3036
3036
|
]
|
|
3037
3037
|
},
|
|
3038
3038
|
"src/pages/SettingsPage.vue": {
|
|
3039
|
-
"file": "assets/SettingsPage-
|
|
3039
|
+
"file": "assets/SettingsPage-Bo6yCyXZ.js",
|
|
3040
3040
|
"name": "SettingsPage",
|
|
3041
3041
|
"src": "src/pages/SettingsPage.vue",
|
|
3042
3042
|
"isDynamicEntry": true,
|
|
@@ -3044,14 +3044,14 @@
|
|
|
3044
3044
|
"_AppShell-DAtHiuI6.js",
|
|
3045
3045
|
"_browser-B6T5hjfR.js",
|
|
3046
3046
|
"_SettingSelect-BIzAsLk1.js",
|
|
3047
|
-
"_Tooltip-
|
|
3047
|
+
"_Tooltip-tZoum_T-.js",
|
|
3048
3048
|
"_InputMenu-C6aPpe30.js",
|
|
3049
3049
|
"_settingsApi-Dm6eaQcu.js",
|
|
3050
|
-
"_indexRow-
|
|
3050
|
+
"_indexRow-BT0cPVRw.js"
|
|
3051
3051
|
]
|
|
3052
3052
|
},
|
|
3053
3053
|
"src/pages/UnitRoutePage.vue": {
|
|
3054
|
-
"file": "assets/UnitRoutePage-
|
|
3054
|
+
"file": "assets/UnitRoutePage-BmdOHwNn.js",
|
|
3055
3055
|
"name": "UnitRoutePage",
|
|
3056
3056
|
"src": "src/pages/UnitRoutePage.vue",
|
|
3057
3057
|
"isDynamicEntry": true,
|
|
@@ -3063,9 +3063,9 @@
|
|
|
3063
3063
|
"_indexFormat-B-pd4r7Y.js",
|
|
3064
3064
|
"_format-BldUwl_R.js",
|
|
3065
3065
|
"_durationTone-U_rOqo6r.js",
|
|
3066
|
-
"_sseReplay-
|
|
3066
|
+
"_sseReplay-DmyMXfRC.js",
|
|
3067
3067
|
"_NotFoundPage-DtE-GgTk.js",
|
|
3068
|
-
"_RunFoldRow-
|
|
3068
|
+
"_RunFoldRow-D3wVpzBa.js"
|
|
3069
3069
|
]
|
|
3070
3070
|
}
|
|
3071
3071
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-DAtHiuI6.js";import{An as t,Cn as n,Cr as r,Li as i,Mn as ee,Pi as a,Sn as o,Tr as te,Xr as s,_r as c,bn as l,ji as u,kn as d,ln as f,o as p,xn as m,yn as h}from"./browser-B6T5hjfR.js";import{a as g,c as ne,d as re,i as ie,l as _,n as ae,o as v,r as y,s as b,t as x,u as oe}from"./delivery-CTdOqpVK.js";import{t as se}from"./wallClock-DmaC1sKA.js";import"./budgets-
|
|
1
|
+
import{t as e}from"./AppShell-DAtHiuI6.js";import{An as t,Cn as n,Cr as r,Li as i,Mn as ee,Pi as a,Sn as o,Tr as te,Xr as s,_r as c,bn as l,ji as u,kn as d,ln as f,o as p,xn as m,yn as h}from"./browser-B6T5hjfR.js";import{a as g,c as ne,d as re,i as ie,l as _,n as ae,o as v,r as y,s as b,t as x,u as oe}from"./delivery-CTdOqpVK.js";import{t as se}from"./wallClock-DmaC1sKA.js";import"./budgets-CbIyPAER.js";function S(e,t){return e.truncated&&e.completeFrom!==void 0&&Date.parse(`${t}T00:00:00Z`)<Date.parse(e.completeFrom)}Object.freeze({reviewers:[],agentLogins:[],agentCoauthors:[]}),Object.freeze({default:60,min:5,max:1440});var C={class:`text-xs text-muted`},w={key:1,class:`text-highlighted`},T={class:`mb-4 flex flex-wrap items-center gap-x-4 gap-y-2`},E={key:0,class:`flex items-center gap-1`,"aria-label":`Repositories`},D={key:0,class:`rounded-md bg-accented px-2.5 py-1 text-xs font-medium text-highlighted`,"aria-current":`page`},O={class:`font-mono text-sm tabular-nums text-muted`},k={class:`mb-5 grid gap-3`},A={key:0,class:`text-sm text-muted`},j={class:`grid grid-cols-[repeat(auto-fit,minmax(190px,1fr))] gap-3`},M={class:`font-mono text-[0.6875rem] font-medium uppercase tracking-widest text-dimmed`},N={class:`font-mono text-2xl font-medium tabular-nums`},P={class:`text-xs text-muted`},F={class:`mb-5 grid gap-3 rounded-lg border border-default bg-elevated px-5 py-4`},I={class:`overflow-x-auto`},L={class:`weeks w-full min-w-[52rem] border-collapse whitespace-nowrap font-mono text-[0.8125rem] tabular-nums`},R=[`title`],z={key:0,class:`ml-1 text-xs`},B={key:0,class:`text-xs text-muted`},V={class:`mb-5 grid gap-3 rounded-lg border border-default bg-elevated px-5 py-4`},ce={key:0,class:`text-sm text-muted`},H={key:1,class:`overflow-x-auto`},U={class:`units w-full min-w-[52rem] border-collapse font-mono text-[0.8125rem] tabular-nums`},W=[`href`],G={key:1,class:`text-dimmed`},le=[`title`],ue=[`href`],de={class:`text-xs text-muted`},fe={class:`rounded bg-accented px-1 py-0.5`},pe={class:`border-t border-default pt-3.5 text-xs text-dimmed`},me={key:0,class:`mb-2 font-mono tabular-nums text-muted`},he={class:`mt-2 grid gap-1.5`},K=`border-b border-muted bg-(--ui-bg-muted) px-2.5 py-1.5 text-xs font-medium text-muted whitespace-nowrap`,q=`border-b border-muted px-2.5 py-1.5`,J=ee({__name:`DeliveryPage`,setup(ee){let J=p(`delivery`),Y=h(()=>J?.report??null),X=h(()=>J?.repos??[]),ge=h(()=>Y.value?oe(Y.value):[]),Z=h(()=>Y.value?ae(Y.value):void 0),Q=e=>Y.value?S(Y.value,e):!1,$=h(()=>Y.value?.weeks.some(e=>Q(e.week))??!1),_e=[1,2,4,8,13],ve=se(void 0,6e4),ye=typeof window>`u`?``:window.location.search;return(ee,p)=>{let h=te(`RouterLink`);return Y.value?(c(),m(e,{key:0,title:`${Y.value.repo} delivery`,nav:`delivery`},{actions:s(()=>[l(`span`,C,[(c(),n(f,null,r(_e,(e,t)=>(c(),n(f,{key:e},[t>0?(c(),n(f,{key:0},[d(` · `)],64)):o(``,!0),e===Y.value.range.weeks?(c(),n(`b`,w,i(e)+`w`,1)):(c(),m(h,{key:2,class:`text-primary hover:underline`,to:`/delivery/${Y.value.repo}?weeks=${e}`},{default:s(()=>[d(i(e)+`w`,1)]),_:2},1032,[`to`]))],64))),64))])]),default:s(()=>[l(`div`,T,[X.value.length>1?(c(),n(`nav`,E,[(c(!0),n(f,null,r(X.value,e=>(c(),n(f,{key:e},[e===Y.value.repo?(c(),n(`span`,D,i(e),1)):(c(),m(h,{key:1,class:`rounded-md px-2.5 py-1 text-xs text-muted no-underline hover:bg-elevated hover:text-highlighted`,to:`/delivery/${e}`},{default:s(()=>[d(i(e),1)]),_:2},1032,[`to`]))],64))),128))])):o(``,!0),l(`p`,O,i(u(v)(Y.value.range.since))+` → `+i(u(v)(Y.value.range.until))+` · `+i(Y.value.range.weeks)+`w · weeks start Monday, UTC `,1)]),l(`section`,k,[Z.value?(c(),n(`p`,A,i(Z.value),1)):o(``,!0),l(`div`,j,[(c(!0),n(f,null,r(ge.value,e=>(c(),n(`div`,{key:e.label,class:`grid gap-0.5 rounded-lg border border-default bg-elevated px-4 py-3.5`},[l(`span`,M,i(e.label),1),l(`span`,N,i(e.value),1),l(`span`,P,i(e.note),1)]))),128))])]),l(`section`,F,[p[0]||=l(`div`,null,[l(`h2`,{class:`text-[0.9375rem] font-medium`},`By week`),l(`p`,{class:`text-sm text-muted`},`One row per Monday-start week · merged pull requests only`)],-1),l(`div`,I,[l(`table`,L,[l(`thead`,null,[l(`tr`,null,[l(`th`,{class:a([K,`text-left`])},`Week`,2),l(`th`,{class:a([K,`text-right`])},`Merged`,2),l(`th`,{class:a([K,`text-right`])},`Agent-authored`,2),l(`th`,{class:a([K,`text-right`])},`Issue → merge`,2),l(`th`,{class:a([K,`text-right`])},`First-pass CI`,2),l(`th`,{class:a([K,`text-right`])},`Rounds / PR`,2),l(`th`,{class:a([K,`text-right`])},`Findings`,2),l(`th`,{class:a([K,`text-right`])},`No human edit`,2),l(`th`,{class:a([K,`text-right`])},`Agent run min`,2)])]),l(`tbody`,null,[(c(!0),n(f,null,r(Y.value.weeks,e=>(c(),n(`tr`,{key:e.week,class:a(Q(e.week)?`text-dimmed`:``)},[l(`td`,{class:a(q),title:`${e.week} → ${e.until}`},[d(i(u(v)(e.week))+` – `+i(u(v)(e.until))+` `,1),Q(e.week)?(c(),n(`span`,z,`(incomplete)`)):o(``,!0)],8,R),l(`td`,{class:a([q,`text-right font-medium`])},i(e.prsMerged),3),l(`td`,{class:a([q,`text-right`])},i(e.agentAuthoredPrs),3),l(`td`,{class:a([q,`text-right`])},i(u(g)(e.leadTimeHours.median)),3),l(`td`,{class:a([q,`text-right`])},i(u(x)(e)),3),l(`td`,{class:a([q,`text-right`])},i(u(ne)(e.reviewRounds.perPr)),3),l(`td`,{class:a([q,`text-right`])},i(u(y)(e)),3),l(`td`,{class:a([q,`text-right`])},i(u(b)(e.findings.noHumanEditShare)),3),l(`td`,{class:a([q,`text-right`])},i(e.agentRuns.minutes.toFixed(0)),3)],2))),128))])])]),$.value&&Y.value.completeFrom?(c(),n(`p`,B,` Incomplete weeks hold the newest pull requests the read reached — it is complete from `+i(u(_)(Y.value.completeFrom))+` — so their numbers are a floor on the merges, not the week's. `,1)):o(``,!0)]),l(`section`,V,[p[3]||=l(`div`,null,[l(`h2`,{class:`text-[0.9375rem] font-medium`},`By unit`),l(`p`,{class:`text-sm text-muted`},` One row per board issue the pull requests link · the issue's opening starts the clock `)],-1),Y.value.units.length===0?(c(),n(`p`,ce,`Nothing merged in range.`)):(c(),n(`div`,H,[l(`table`,U,[l(`thead`,null,[l(`tr`,null,[l(`th`,{class:a([K,`text-left`])},`Issue`,2),l(`th`,{class:a([K,`text-left`])},`Unit`,2),l(`th`,{class:a([K,`text-left`])},`PRs`,2),l(`th`,{class:a([K,`text-right`])},`Issue → merge`,2),l(`th`,{class:a([K,`text-right`])},`First-pass CI`,2),l(`th`,{class:a([K,`text-right`])},`Rounds`,2),l(`th`,{class:a([K,`text-right`])},`Findings`,2),l(`th`,{class:a([K,`text-right`])},`No human edit`,2)])]),l(`tbody`,null,[(c(!0),n(f,null,r(Y.value.units,e=>(c(),n(`tr`,{key:e.issue??`none`},[l(`td`,{class:a([q,`whitespace-nowrap`])},[e.issue===null?(c(),n(`span`,G,`—`)):(c(),n(`a`,{key:0,class:`text-primary hover:underline`,href:`https://github.com/${Y.value.repo}/issues/${e.issue}`},`#`+i(e.issue),9,W))],2),l(`td`,{class:a([q,`max-w-[28rem] truncate font-sans`]),title:e.title},i(e.title),11,le),l(`td`,{class:a([q,`whitespace-nowrap`])},[(c(!0),n(f,null,r(e.prs,(e,t)=>(c(),n(f,{key:e},[t>0?(c(),n(f,{key:0},[d(`, `)],64)):o(``,!0),l(`a`,{class:`text-primary hover:underline`,href:`https://github.com/${Y.value.repo}/pull/${e}`},i(e),9,ue)],64))),128))],2),l(`td`,{class:a([q,`text-right`])},i(u(g)(e.leadTimeHours.median)),3),l(`td`,{class:a([q,`text-right`])},i(u(x)(e)),3),l(`td`,{class:a([q,`text-right`])},i(e.reviewRounds.verdicts),3),l(`td`,{class:a([q,`text-right`])},i(u(y)(e)),3),l(`td`,{class:a([q,`text-right`])},i(u(b)(e.findings.noHumanEditShare)),3)]))),128))])])])),l(`p`,de,[p[1]||=d(` Machine-readable twin: `,-1),l(`code`,fe,`GET /delivery/`+i(Y.value.repo)+`.json`,1),p[2]||=d(` (same gate). `,-1)])]),l(`footer`,pe,[Y.value.snapshotAt?(c(),n(`p`,me,[d(` As of `+i(u(_)(Y.value.snapshotAt))+`, `+i(u(re)(Y.value.snapshotAt,u(ve)))+` · `,1),t(h,{class:`text-primary hover:underline`,to:`/delivery/${Y.value.repo}${u(ie)(u(ye))}`},{default:s(()=>[...p[4]||=[d(`read GitHub now`,-1)]]),_:1},8,[`to`])])):o(``,!0),l(`details`,null,[p[14]||=l(`summary`,{class:`cursor-pointer text-muted`},`How these numbers are computed`,-1),l(`div`,he,[p[12]||=l(`div`,null,[l(`b`,null,`Snapshot.`),d(` GitHub's record of the merged pull requests (each one's timeline and its branch's workflow runs, the board issue its body links) is read on an interval and kept as a snapshot the page, its JSON twin and `),l(`code`,null,`delivery report`),d(` serve; `),l(`code`,null,`?fresh=1`),d(` reads GitHub now. The run history you may see joins on every load. `)],-1),p[13]||=l(`div`,null,[l(`b`,null,`Issue → merge`),d(` runs from the linked board issue's opening (a closing keyword or a `),l(`code`,null,`board item`),d(` reference in the body) to the merge; a pull request that links no issue counts from its own opening. `),l(`b`,null,`First-pass CI`),d(` is green when every pull-request-triggered workflow run (`),l(`code`,null,`pull_request`),d(`, `),l(`code`,null,`pull_request_target`),d(`) on the first head succeeded at its first attempt — a rerun or a red run fails it; a head with no such run is not counted. `),l(`b`,null,`Review rounds`),d(` are the review agent's verdicts; a `),l(`i`,null,`fix round`),d(` is a verdict that followed a push. `),l(`b`,null,`No human edit`),d(` is the share of the agent's findings on pull requests where every push after the first verdict was an agent's: a bot login, or a commit co-authored by an agent. `),l(`b`,null,`Agent run minutes`),d(` are the finished runs of this repository that named a pull request. `)],-1),l(`div`,null,[p[6]||=l(`b`,null,`Identities.`,-1),p[7]||=d(` Verdicts by `,-1),l(`code`,null,i(Y.value.identities.reviewers.join(`, `)||`(none configured)`),1),p[8]||=d(`; agent logins end in `,-1),p[9]||=l(`code`,null,`[bot]`,-1),Y.value.identities.agentLogins.length?(c(),n(f,{key:0},[p[5]||=d(`, plus `,-1),l(`code`,null,i(Y.value.identities.agentLogins.join(`, `)),1)],64)):o(``,!0),p[10]||=d(`; agent co-authors named `,-1),l(`code`,null,i(Y.value.identities.agentCoauthors.join(`, `)||`(none)`),1),p[11]||=d(`. `,-1)])])])])]),_:1},8,[`title`])):o(``,!0)}}});export{J as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e,r as t,t as n}from"./AppShell-DAtHiuI6.js";import{An as r,Cn as i,Cr as a,Ft as o,Gr as s,Ii as c,Li as l,Mn as u,Pi as d,Pt as f,Qr as p,Sn as m,Tr as h,Xr as g,_r as _,bn as v,c as y,dr as ee,en as b,hr as x,ir as S,ji as C,kn as w,l as te,ln as T,o as E,rn as D,sr as O,t as k,wr as A,xi as j,xn as M,y as N,yi as P,yn as F,yr as I}from"./browser-B6T5hjfR.js";import{t as L}from"./Tooltip-tZoum_T-.js";import{i as R,n as ne,r as re,t as z}from"./PendingTurnRow-ChCQOLgZ.js";import{b as ie,x as ae}from"./main-5Gm_1Gv8.js";import{t as oe}from"./eventSource-Bj_dZf6M.js";import{t as B}from"./wallClock-DmaC1sKA.js";import{n as V,r as se,t as H}from"./indexFormat-B-pd4r7Y.js";import{C as ce,H as le,a as ue,i as de,t as fe,z as pe}from"./indexRow-BT0cPVRw.js";import{i as me}from"./format-BldUwl_R.js";import{i as he,n as U,t as W}from"./durationTone-U_rOqo6r.js";import{T as ge,a as _e,c as G,d as ve,i as ye,n as be,o as xe,s as Se,t as K,u as q,v as Ce}from"./sseReplay-DmyMXfRC.js";var J=`To run this:`;function we(e,t){return e?t.trim()===``?`stop`:`steer`:`send`}var Te=`↪ Folded into`;function Ee(e){let t=e.trim();return t.startsWith(`To run this:`)?{kind:`handBack`,command:t.slice(J.length).trim()}:t.startsWith(Te)?{kind:`steerAck`,text:t}:{kind:`inline`,text:t}}function De(e){let t=/^\/runs\/([^/?#]+)(\?t=([^&#]+))?$/.exec(e);if(!t)return null;let n=decodeURIComponent(t[1]),r=t[3]?`?t=${t[3]}`:``;return{id:n,eventsUrl:`/runs/${t[1]}/events${r}`,stopUrl:`/runs/${t[1]}/stop${r}`}}function Y(e,t=60){let n=e.split(/\r?\n/).find(e=>e.trim()!==``)?.trim()??``;return n.length<=t?n||`New conversation`:`${n.slice(0,t-1).trimEnd()}…`}function Oe(e,t){let n=t-e;if(!(n>45e3))return`now`;let r=Math.floor(n/6e4);if(r<60)return`${Math.max(1,r)}m`;let i=Math.floor(r/60);if(i<24)return`${i}h`;let a=Math.floor(i/24);return a<7?`${a}d`:V(e,t)}function ke(e,t){let n=e.surface??`web`,r=de[n]??n,i=e.channelName?`${r} #${e.channelName}`:r;return{title:e.excerpt||e.title,when:H(e.lastAt,t),source:n===`web`?r:`${i} · read-only here`,runs:`${e.runs} run${e.runs===1?``:`s`}`,live:e.live}}var X={min:224,default:288,max:448,step:16};function Ae(e){let t=typeof e==`string`?Number(e):e;return typeof t!=`number`||!Number.isFinite(t)?X.default:Math.min(X.max,Math.max(X.min,Math.round(t)))}var Z={width:`sb.rail.width`,collapsed:`sb.rail.collapsed`};function je(e){return{width:Ae(e.width??void 0),collapsed:e.collapsed===`1`}}function Me(e,t){let n=e<5?`Still up`:e<12?`Good morning`:e<18?`Good afternoon`:`Good evening`;return t?`${n}, ${t}.`:`${n}.`}function Ne(e,t){let n=t.trim();for(let t=e.length-1;t>=0;t--){let r=e[t];if(!r.folded&&r.text.trim()===n)return r}return null}function Pe(e,t=60){return e<=t}function Fe(e){return e.key===`Enter`&&!e.shiftKey&&!e.isComposing}function Ie(e,t){let n=e.trim().toLowerCase();if(n===``)return 0;let r=t.toLowerCase(),i=0,a=-1,o=-1;for(let e of n){if(e===` `)continue;let t=r.indexOf(e,i);if(t===-1)return null;a===-1&&(a=t),o=t,i=t+1}return a===-1?0:o-a}function Le(e,t){return t.trim()===``?[...e]:e.map((e,n)=>({row:e,i:n,score:Ie(t,e.title)})).filter(e=>e.score!==null).sort((e,t)=>e.score-t.score||e.i-t.i).map(e=>e.row)}function Re(e){if(!(e.metaKey||e.ctrlKey))return null;let t=e.key.toLowerCase();return t===`o`&&e.shiftKey?`newThread`:t===`k`&&!e.shiftKey?`search`:null}function ze(e,t){return t?``:e===`steer`?`Say what to add — it folds into the run at its next step`:e===`stop`?`A run is working — type to steer it, or stop it`:`Review a pull request, ship a fix, investigate a run… or type / for a command`}function Q(e){let t=new Map;for(let n of e){let[e,r]=n.chat.split(` `,2);if(!e)continue;let i=t.get(e)??{name:e,verbs:[]};r===void 0?i.bare=n:i.verbs.push({verb:r,command:n}),t.set(e,i)}return[...t.values()]}function Be(e,t,n){if(t===``)return[...e];let r=t.toLowerCase(),i=e.filter(e=>n(e)[0].toLowerCase().startsWith(r));return i.length>0?i:e.map((e,r)=>{let i=n(e).map(e=>Ie(t,e)).filter(e=>e!==null);return i.length===0?null:{item:e,i:r,score:Math.min(...i)}}).filter(e=>e!==null).sort((e,t)=>e.score-t.score||e.i-t.i).map(e=>e.item)}function Ve(e,t=0,n=new Set){let r=(e.args??[]).slice(t),i=(e.options??[]).filter(e=>!n.has(He(e.form))).map(e=>`[${e.form}]`);return[...r,...i].join(` `)}var He=e=>e.split(` `,1)[0];function Ue(e,t){let n=new Set,r=0;for(let i=0;i<t.length;i++){let a=t[i];if(a.startsWith(`-`)){n.add(a);let t=(e.options??[]).find(e=>He(e.form)===a);t&&t.form.includes(` `)&&i++}else r++}return{positionals:r,flags:n}}function We(e,t){let n=/^\/([^\n]*)$/.exec(e);if(!n||t.length===0)return null;let r=n[1].split(` `),i=r[r.length-1],a=r.slice(0,-1).filter(e=>e!==``),o=e.slice(0,e.length-i.length),s=Q(t);if(a.length===0)return{level:`group`,head:o,partial:i,rows:Be(s,i,e=>[e.name,...e.bare?[e.bare.describe]:[],...e.verbs.map(e=>e.command.describe)]).map(e=>({insert:e.name,label:`/${e.name}`,describe:e.bare?e.verbs.length>0?`${e.bare.describe} · also ${e.verbs.map(e=>e.verb).join(`, `)}`:e.bare.describe:e.verbs.map(e=>e.verb).join(` · `),kind:e.bare&&e.verbs.length===0?`command`:`group`,acceptable:!0}))};let c=s.find(e=>e.name===a[0]);if(!c)return null;if(a.length===1){let e=Be(c.verbs,i,e=>[e.verb,e.command.describe]);if(e.length===0&&c.bare&&i!==``)return Ke(c.bare,o,i,[]);if(e.length===0&&!c.bare)return{level:`verb`,head:o,partial:i,rows:[]};let t=e.map(e=>({insert:e.verb,label:`/${e.command.chat}`,describe:e.command.describe,kind:`command`,acceptable:!0}));return c.bare&&i===``&&t.unshift(Ge(c.bare,0,new Set)),{level:`verb`,head:o,partial:i,rows:t}}let l=c.verbs.find(e=>e.verb===a[1]);return l?Ke(l.command,o,i,a.slice(2)):c.bare?Ke(c.bare,o,i,a.slice(1)):null}function Ge(e,t,n){let r=Ve(e,t,n);return{insert:``,label:`/${e.chat}`,describe:r?`${r} — ${e.describe}`:e.describe,kind:`usage`,acceptable:!1}}function Ke(e,t,n,r){let i=Ue(e,r);return n.startsWith(`-`)?{level:`tail`,head:t,partial:n,rows:Be((e.options??[]).filter(e=>!i.flags.has(He(e.form))),n,e=>[He(e.form),e.describe]).map(e=>({insert:He(e.form),label:e.form,describe:e.describe,kind:`option`,acceptable:!0})),command:e}:{level:`tail`,head:t,partial:n,rows:[Ge(e,i.positionals,i.flags)],command:e}}function qe(e,t){let n=e.rows[t];if(!n)return null;if(n.acceptable){if(!n.insert.toLowerCase().startsWith(e.partial.toLowerCase()))return null;let t=n.insert.slice(e.partial.length);return t===``?null:{text:t,acceptable:!0}}if(e.partial!==``||n.kind!==`usage`)return null;let[r,...i]=n.describe.split(` — `);return i.length===0?null:{text:r,acceptable:!1}}function $(e,t){return`${e.head}${t.insert} `}function Je(e,t){if(!e.startsWith(`/`))return e;let n=e.slice(1),[r,i]=n.split(/\s+/,2);return t.some(e=>e.chat===r||i!==void 0&&e.chat===`${r} ${i}`)?n:e}var Ye={class:`composer-wrap relative`},Xe={key:0,class:`palette absolute bottom-full left-0 right-0 z-20 mb-2 max-h-72 overflow-y-auto rounded-xl border border-default bg-(--ui-bg-elevated) p-1 shadow-sm`,role:`listbox`,"aria-label":`Commands`,"data-testid":`palette`},Ze={key:0,class:`px-3 py-2 font-mono text-xs text-dimmed`},Qe=[`aria-selected`,`data-insert`,`data-kind`,`data-label`,`onClick`,`onMouseenter`],$e={class:`chat shrink-0 font-mono text-[0.8rem] font-medium text-highlighted`},et={class:`describe min-w-0 flex-1 truncate text-[0.8rem] text-muted`},tt={key:0,class:`shrink-0 rounded border border-default px-1 font-mono text-[0.62rem] text-dimmed`,"aria-hidden":`true`},nt=[`data-mode`],rt={class:`relative min-w-0 flex-1`},it=[`data-acceptable`],at={class:`invisible`},ot={class:`text-dimmed`},st=[`rows`,`value`,`placeholder`,`autofocus`,`aria-expanded`],ct=[`aria-hidden`,`data-hint`,`data-shown`],lt=u({__name:`ChatComposer`,props:{modelValue:{},mode:{},hint:{},autofocus:{type:Boolean},sweepOnMount:{type:Boolean},commands:{}},emits:[`update:modelValue`,`submit`,`stop`],setup(e,{expose:t,emit:n}){let o=e,c=n,u=j(null),p=j(!1),h=j(!1),y=F(()=>Math.min(8,Math.max(1,o.modelValue.split(`
|
|
2
|
+
`).length))),b={send:{icon:`i-lucide-arrow-up`,label:`Send`},steer:{icon:`i-lucide-corner-down-right`,label:`Steer the run`},stop:{icon:`i-lucide-square`,label:`Stop the run`}},x=F(()=>b[o.mode]),C=F(()=>ze(o.mode,o.hint)),w=F(()=>o.hint?o.hint:o.mode===`steer`?`Enter folds this into the run in flight`:o.mode===`stop`?`A run is in flight · type to steer it, or stop it`:`Enter to send · Shift+Enter for a new line · / for a command`),E=F(()=>p.value||o.hint!==void 0||o.mode!==`send`),O=F(()=>We(o.modelValue,o.commands??[])),k=F(()=>O.value?.rows??[]),A=j(!1),P=j(0),I=F(()=>O.value!==null&&!A.value),L=F(()=>I.value&&O.value?qe(O.value,P.value):null);s(()=>`${O.value?.level??``}|${O.value?.head??``}`,()=>{A.value=!1,P.value=0}),s(k,e=>{P.value>=e.length&&(P.value=Math.max(0,e.length-1))});function R(e){O.value&&e.acceptable&&(c(`update:modelValue`,$(O.value,e)),B())}function ne(){let e=u.value;return!e||e.selectionStart===e.value.length&&e.selectionEnd===e.value.length}function re(e){c(`update:modelValue`,e.target.value)}function z(e){if(I.value){if(e.key===`ArrowDown`){e.preventDefault(),k.value.length>0&&(P.value=(P.value+1)%k.value.length);return}if(e.key===`ArrowUp`){e.preventDefault(),k.value.length>0&&(P.value=(P.value-1+k.value.length)%k.value.length);return}if(e.key===`Escape`){e.preventDefault(),A.value=!0;return}let t=k.value[P.value];if(e.key===`Tab`&&t?.acceptable){e.preventDefault(),R(t);return}if(e.key===`ArrowRight`&&L.value?.acceptable&&t&&ne()){e.preventDefault(),R(t);return}if(e.key===`Enter`&&!e.shiftKey&&t?.acceptable){e.preventDefault(),R(t);return}}Fe(e)&&(e.preventDefault(),ie())}function ie(){o.mode===`stop`?c(`stop`):o.modelValue.trim()!==``&&c(`submit`)}function ae(){h.value=!1,S().then(()=>{h.value=!0})}function oe(){p.value=!0,ae()}function B(){S().then(()=>{let e=u.value;e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length),document.activeElement===e&&!p.value&&oe())})}return s(()=>o.hint,e=>{e&&B()}),ee(()=>{o.autofocus&&B(),o.sweepOnMount&&ae()}),t({focus:B}),(t,n)=>{let o=N,s=te;return _(),i(`div`,Ye,[r(f,{name:`sb-rise`},{default:g(()=>[I.value?(_(),i(`div`,Xe,[k.value.length===0?(_(),i(`p`,Ze,` No command matches "`+l(e.modelValue)+`". `,1)):m(``,!0),(_(!0),i(T,null,a(k.value,(e,t)=>(_(),i(`button`,{key:e.label,type:`button`,role:`option`,class:d([`item flex w-full items-baseline gap-3 rounded-lg px-3 py-1.5 text-left transition-colors duration-150 ease-out`,t===P.value?`bg-(--ui-bg-accented)`:`hover:bg-(--ui-bg-muted)`]),"aria-selected":t===P.value?`true`:`false`,"data-insert":e.insert,"data-kind":e.kind,"data-label":e.label,onMousedown:n[0]||=D(()=>{},[`prevent`]),onClick:t=>R(e),onMouseenter:e=>P.value=t},[v(`span`,$e,l(e.label),1),v(`span`,et,l(e.describe),1),t===P.value&&e.acceptable?(_(),i(`kbd`,tt,`Tab`)):m(``,!0)],42,Qe))),128))])):m(``,!0)]),_:1}),v(`div`,{class:d([`ring relative rounded-2xl`,h.value?`ring-sweep`:``]),onAnimationend:n[2]||=e=>h.value=!1},[v(`form`,{class:d([`composer relative flex items-end gap-2 rounded-2xl border bg-default px-3 py-2 transition-colors duration-150 ease-out`,p.value?`border-primary`:`border-default hover:border-accented`]),"data-mode":e.mode,onSubmit:D(ie,[`prevent`])},[v(`div`,rt,[L.value?(_(),i(`div`,{key:0,class:`ghost composer-text pointer-events-none absolute inset-0 overflow-hidden whitespace-pre-wrap break-words`,"aria-hidden":`true`,"data-testid":`ghost`,"data-acceptable":L.value.acceptable?`1`:`0`},[v(`span`,at,l(e.modelValue),1),v(`span`,ot,l(L.value.text),1)],8,it)):m(``,!0),v(`textarea`,{ref_key:`box`,ref:u,class:`box composer-text relative block min-h-6 w-full resize-none bg-transparent text-highlighted outline-none placeholder:text-dimmed`,rows:y.value,value:e.modelValue,placeholder:C.value,autofocus:e.autofocus,"aria-label":`Message`,"aria-expanded":I.value?`true`:void 0,autocomplete:`off`,spellcheck:`true`,onInput:re,onKeydown:z,onFocus:oe,onBlur:n[1]||=e=>p.value=!1},null,40,st)]),r(s,{type:`submit`,class:`control shrink-0 rounded-full transition-transform duration-150 ease-out active:scale-95`,color:e.mode===`stop`?`neutral`:`primary`,variant:e.mode===`stop`?`outline`:`solid`,size:`sm`,"aria-label":x.value.label,title:x.value.label,disabled:e.mode===`send`&&e.modelValue.trim()===``,"data-mode":e.mode},{default:g(()=>[r(f,{name:`sb-fade`,mode:`out-in`},{default:g(()=>[(_(),M(o,{key:x.value.icon,name:x.value.icon,class:`size-4`,"aria-hidden":`true`},null,8,[`name`]))]),_:1})]),_:1},8,[`color`,`variant`,`aria-label`,`title`,`disabled`,`data-mode`])],42,nt)],34),v(`p`,{class:d([`hint mt-1.5 min-h-[1.1rem] select-none px-3 font-mono text-[0.7rem] text-dimmed transition-opacity duration-150 ease-out`,E.value?`opacity-100`:`opacity-0`]),"aria-hidden":E.value?void 0:`true`,"data-hint":e.hint?`handback`:e.mode,"data-shown":E.value?`1`:`0`},l(w.value),11,ct)])}}}),ut={class:`thread-tip flex max-w-xs flex-col gap-1 text-xs`},dt={class:`tip-title leading-snug text-highlighted`},ft={class:`flex flex-wrap items-center gap-x-1.5 gap-y-0.5 font-mono text-[0.68rem] text-muted`},pt={class:`tip-when tabular-nums`},mt={class:`tip-source inline-flex items-center gap-1`},ht={class:`tip-runs`},gt={key:0,class:`tip-live inline-flex items-center gap-1 text-toned`},_t=u({__name:`ThreadTip`,props:{row:{},now:{}},setup(e){let t=e,n=F(()=>ke(t.row,t.now));return(t,r)=>(_(),i(`div`,ut,[v(`p`,dt,l(n.value.title),1),v(`p`,ft,[v(`span`,pt,l(n.value.when),1),r[1]||=v(`span`,{"aria-hidden":`true`},`·`,-1),v(`span`,mt,[e.row.surface===`slack`?(_(),M(he,{key:0})):m(``,!0),w(l(n.value.source),1)]),r[2]||=v(`span`,{"aria-hidden":`true`},`·`,-1),v(`span`,ht,l(n.value.runs),1),n.value.live?(_(),i(`span`,gt,[...r[0]||=[v(`span`,{class:`size-1.5 rounded-full bg-ok`,"aria-hidden":`true`},null,-1),w(`live`,-1)]])):m(``,!0)])]))}}),vt={class:`rail flex flex-col gap-1 text-[0.8rem]`,"aria-label":`Recent threads`},yt={class:`filter mb-2 flex items-center gap-2 rounded-lg border border-default px-2.5 py-1.5 transition-colors duration-150 ease-out focus-within:border-primary hover:border-accented`},bt={key:0,class:`rounded border border-default px-1 font-mono text-[0.65rem] text-dimmed`},xt={key:0,class:`empty px-3 py-1 text-xs text-dimmed`},St={key:1,class:`nomatch px-3 py-1 text-xs text-dimmed`},Ct={key:0,class:`dot mt-px size-1.5 shrink-0 self-center rounded-full bg-ok motion-safe:animate-pulse`,"aria-label":`a run is in flight`},wt={class:`title min-w-0 flex-1 truncate text-toned group-hover:text-highlighted group-aria-[current=page]:text-highlighted`},Tt={class:`when shrink-0 font-mono text-[0.7rem] tabular-nums text-dimmed`},Et={class:`retention px-3 pt-1 text-[0.7rem] leading-relaxed text-dimmed`},Dt={class:`model px-3 pt-2 text-[0.7rem] leading-relaxed text-dimmed`,"data-testid":`what-is-a-thread`},Ot=500,kt=u({__name:`ConversationRail`,props:{rows:{},current:{},now:{},retention:{}},setup(e,{expose:t}){let n=e,s=j(``),c=j(null),u=F(()=>Le(n.rows,s.value));function d(){c.value?.focus(),c.value?.select()}function f(e){e.key===`Escape`&&(s.value=``,c.value?.blur())}return t({focusFilter:d}),(t,n)=>{let d=N,y=h(`RouterLink`),ee=L;return _(),i(`nav`,vt,[r(y,{class:`new group mb-3 flex items-center gap-2 rounded-xl bg-inverted px-3 py-2 font-medium text-inverted no-underline transition-[transform,opacity] duration-150 ease-out hover:-translate-y-px hover:opacity-90 active:translate-y-0 active:opacity-100`,to:`/threads`,"aria-current":e.current===``?`page`:void 0,"data-testid":`new-thread`},{default:g(()=>[r(d,{name:`i-lucide-plus`,class:`size-4 shrink-0 transition-transform duration-150 ease-out group-hover:rotate-90`,"aria-hidden":`true`}),n[1]||=v(`span`,null,`New thread`,-1),n[2]||=v(`span`,{class:`kbd ml-auto flex gap-0.5 font-mono text-[0.65rem] opacity-70`,"aria-label":`shortcut shift command O`},[v(`kbd`,{class:`rounded border border-current/30 px-1`},`⇧`),v(`kbd`,{class:`rounded border border-current/30 px-1`},`⌘`),v(`kbd`,{class:`rounded border border-current/30 px-1`},`O`)],-1)]),_:1},8,[`aria-current`]),v(`label`,yt,[r(d,{name:`i-lucide-search`,class:`size-3.5 shrink-0 text-dimmed`,"aria-hidden":`true`}),p(v(`input`,{ref_key:`filter`,ref:c,"onUpdate:modelValue":n[0]||=e=>s.value=e,class:`min-w-0 flex-1 bg-transparent text-[0.8rem] text-highlighted outline-none placeholder:text-dimmed`,type:`text`,placeholder:`Filter recent`,"aria-label":`Filter recent threads`,autocomplete:`off`,onKeydown:f},null,544),[[b,s.value]]),s.value?m(``,!0):(_(),i(`kbd`,bt,`⌘K`))]),n[8]||=v(`p`,{class:`label px-3 pb-1 font-mono text-[0.65rem] font-medium uppercase tracking-wider text-dimmed`},`Recent`,-1),e.rows.length===0?(_(),i(`p`,xt,`Nothing yet. Ask something.`)):u.value.length===0?(_(),i(`p`,St,`Nothing matches "`+l(s.value)+`".`,1)):m(``,!0),r(o,{name:`sb-rise`,tag:`div`,class:`rows flex flex-col gap-0.5`},{default:g(()=>[(_(!0),i(T,null,a(u.value,t=>(_(),i(`div`,{key:t.id},[r(ee,{"delay-duration":Ot,content:{side:`right`,sideOffset:12,align:`start`},ui:{content:`h-auto max-w-xs px-2.5 py-2`}},{content:g(()=>[r(_t,{row:t,now:e.now},null,8,[`row`,`now`])]),default:g(()=>[r(y,{class:`row group relative flex items-baseline gap-2 rounded-lg px-3 py-1.5 no-underline transition-colors duration-150 ease-out hover:bg-(--ui-bg-muted) aria-[current=page]:bg-(--ui-bg-accented)`,to:`/threads/${encodeURIComponent(t.id)}`,"aria-current":t.id===e.current?`page`:void 0,"data-surface":t.surface},{default:g(()=>[n[3]||=v(`span`,{class:`bar absolute left-0 top-1/2 h-4 w-0.5 -translate-y-1/2 rounded-full bg-primary opacity-0 transition-opacity duration-150 ease-out group-aria-[current=page]:opacity-100`,"aria-hidden":`true`},null,-1),t.live?(_(),i(`span`,Ct)):m(``,!0),v(`span`,wt,l(t.title),1),v(`span`,Tt,l(C(Oe)(t.lastAt,e.now)),1)]),_:2},1032,[`to`,`aria-current`,`data-surface`])]),_:2},1024)]))),128))]),_:1}),r(y,{class:`all mt-3 flex items-center gap-1.5 px-3 py-1 text-xs font-medium text-muted no-underline transition-colors duration-150 ease-out hover:text-highlighted`,to:`/runs`,"data-testid":`all-runs`},{default:g(()=>[n[4]||=w(` All runs `,-1),r(d,{name:`i-lucide-arrow-right`,class:`size-3 transition-transform duration-150 ease-out group-hover:translate-x-0.5`,"aria-hidden":`true`})]),_:1}),v(`p`,Et,l(e.retention),1),v(`p`,Dt,[n[6]||=w(` A thread is a conversation; each message you send is a run. `,-1),r(y,{class:`text-muted hover:text-highlighted`,to:`/runs`},{default:g(()=>[...n[5]||=[w(`Runs`,-1)]]),_:1}),n[7]||=w(` lists every run across everyone's threads. `,-1)])])}}}),At={class:`empty mx-auto flex w-full max-w-2xl flex-col items-center gap-5 px-3 py-6 text-center`},jt={class:`flex flex-col gap-1.5`},Mt={class:`greeting sb-stagger text-xl font-medium tracking-tight text-highlighted`,style:{"--sb-i":`1`}},Nt={class:`sb-stagger w-full text-left`,style:{"--sb-i":`3`}},Pt={key:0,class:`chips flex flex-wrap justify-center gap-2`,"aria-label":`Suggestions`},Ft=[`onClick`],It=u({__name:`EmptyState`,props:{name:{},hour:{},suggestions:{}},emits:[`pick`],setup(e,{emit:n}){let o=n;return(n,s)=>(_(),i(`section`,At,[r(t,{draw:``,idle:``,class:`mark-lg sb-stagger text-highlighted`,style:{"font-size":`3.25rem`,"--sb-i":`0`}}),v(`div`,jt,[v(`h2`,Mt,l(C(Me)(e.hour,e.name)),1),s[0]||=v(`p`,{class:`sub sb-stagger text-[0.875rem] text-muted`,style:{"--sb-i":`2`}},` Ask in plain words. The right agent picks it up, and you watch it work here. `,-1)]),v(`div`,Nt,[A(n.$slots,`default`)]),e.suggestions.length>0?(_(),i(`ul`,Pt,[(_(!0),i(T,null,a(e.suggestions,(e,t)=>(_(),i(`li`,{key:e,class:`sb-stagger`,style:c({"--sb-i":t+4})},[v(`button`,{type:`button`,class:`chip rounded-full border border-default px-3 py-1 text-[0.8rem] text-toned transition-[color,border-color,background-color,transform] duration-150 ease-out hover:-translate-y-px hover:border-accented hover:bg-(--ui-bg-muted) hover:text-highlighted focus-visible:outline-2 focus-visible:outline-primary active:translate-y-0`,onClick:t=>o(`pick`,e)},l(e),9,Ft)],4))),128))])):m(``,!0)]))}}),Lt=[`data-pending`],Rt={class:`meta flex items-baseline gap-2 pr-1 font-mono text-[0.7rem] text-dimmed`},zt={key:0,class:`failed text-bad`},Bt={key:0,class:`folded text-muted`},Vt=[`title`],Ht=u({__name:`PersonTurn`,props:{text:{},at:{},now:{},pending:{type:Boolean},folded:{},failed:{}},setup(e){let t=e,n=F(()=>H(t.at,t.now));return(t,a)=>(_(),i(`div`,{class:`turn person flex flex-col items-end gap-1`,"data-pending":e.pending?`1`:void 0},[v(`div`,{class:d([`bubble max-w-[min(42rem,88%)] whitespace-pre-wrap break-words rounded-2xl rounded-br-md bg-(--ui-bg-accented) px-4 py-2.5 text-[0.875rem] leading-normal text-highlighted transition-opacity duration-150 ease-out`,e.pending?`opacity-70`:``])},l(e.text),3),v(`div`,Rt,[e.failed?(_(),i(`span`,zt,l(e.failed),1)):m(``,!0),r(f,{name:`sb-fade`},{default:g(()=>[e.folded?(_(),i(`span`,Bt,`↪ folded in `+l(e.folded),1)):m(``,!0)]),_:1}),v(`span`,{class:`ts select-none`,title:C(me)(e.at)},l(n.value),9,Vt)])],8,Lt))}}),Ut=[`title`],Wt={class:`preset font-medium`},Gt={class:`reason truncate font-normal opacity-80`},Kt=u({__name:`ReceiptChip`,props:{route:{}},setup(e){let t=e,n=F(()=>fe[ue(t.route.preset)]);return(t,r)=>(_(),i(`span`,{class:d([`receipt inline-flex max-w-full items-baseline gap-1.5 rounded border px-1.5 py-px font-mono text-[0.7rem] leading-relaxed`,n.value]),title:`routed: ${e.route.reason}`,"data-testid":`receipt`},[v(`span`,Wt,l(e.route.preset),1),v(`span`,Gt,`· `+l(e.route.reason),1)],10,Ut))}}),qt=[`data-phase`,`data-run-id`,`data-live`],Jt={class:`head flex flex-wrap items-baseline gap-2 font-mono text-[0.7rem] text-dimmed`},Yt={key:0,class:`model`},Xt={key:1,class:`elapsed ml-auto tabular-nums`,"data-testid":`elapsed`},Zt={key:0,class:`disconnected flex items-baseline gap-2 rounded-lg border border-dashed border-bad/40 px-3 py-2 font-mono text-xs text-bad`,"data-testid":`disconnected`},Qt=[`open`],$t={class:`flex min-h-6 cursor-pointer list-none items-baseline gap-2 font-mono text-[0.7rem] text-dimmed hover:text-toned [&::-webkit-details-marker]:hidden`},en={class:`summary`},tn={class:`pl-1 pt-1`},nn={key:0,class:`py-2 font-mono text-xs text-dimmed`},rn={key:1,class:`py-2 font-mono text-xs text-warn`},an={key:2,class:`m-0 list-none p-0`},on={key:0,class:`reply`,"data-testid":`reply`},sn={key:1,class:`outcome font-mono text-xs text-warn`,"data-testid":`outcome`},cn={key:2,class:`facts flex flex-wrap items-baseline gap-x-3 font-mono text-[0.7rem] text-dimmed`},ln=u({__name:`AssistantTurn`,props:{turn:{},now:{},live:{},fetch:{}},emits:[`ended`,`input`,`stop`],setup(e,{emit:t}){let n=e,u=t,p=G();n.live?.serverNow&&p.seedClock(n.live.serverNow);let y=p.state,b=j(n.live?`connecting`:`ended`),S=j(n.turn.route??null),te=j(!0),E=F(()=>y.reply?.text??n.turn.answer??``),D=F(()=>y.meta?.agent??n.turn.agent??``),O=F(()=>{let e=y.meta?.model??n.turn.model;return e?ve(e):``}),k=F(()=>n.live!==null&&n.live!==void 0&&b.value!==`ended`),A=F(()=>b.value===`disconnected`),N=n.live?.serverNow?Se({startedAt:n.turn.startedAt,receivedAt:n.turn.receivedAt,serverNow:n.live.serverNow},n.now):null,P=n.now,L=j(void 0),R=F(()=>n.turn.finished&&n.turn.finishedAt!==void 0?Math.max(0,n.turn.finishedAt-(n.turn.receivedAt??n.turn.startedAt)):L.value===void 0?N?N.elapsedMs(n.now):Math.max(0,n.now-P):L.value),ie=F(()=>le(R.value,`clock`)),ae=F(()=>W(k.value?void 0:R.value,`run`)),B=F(()=>U(ae.value)),V=F(()=>k.value?Ce(y,n.now):null);I(xe,V),I(ye,null),I(_e,F(()=>y.reply!==null));let se=F(()=>k.value?q(y,p.pendingCall(),n.now):null),H=F(()=>{let e=se.value;return A.value||!e||e.kind===`call`?null:e.kind===`starting`?{verb:`Starting`,elapsedMs:R.value,slow:!1}:{verb:ne(e.elapsedMs),elapsedMs:e.elapsedMs,slow:e.slow}}),de=F(()=>y.log.filter(e=>e.kind===`step`)),me=F(()=>de.value.length>0?de.value.length:n.turn.stepCount??0),he=F(()=>n.turn.finished&&n.turn.status&&n.turn.status!==`completed`?ce(n.turn.status):``),J=F(()=>`/runs/${encodeURIComponent(n.turn.id)}`),we=oe(),Te=null;function Ee(e){let t=e;t.type===`route`&&typeof t.preset==`string`&&(S.value={preset:t.preset,reason:typeof t.reason==`string`?t.reason:``}),t.type===`input`&&typeof t.text==`string`&&(te.value?te.value=!1:u(`input`,t.text,t.at)),p.handle(e)}ee(()=>{n.live&&(u(`stop`,n.live.stopUrl),Te=re({url:n.live.eventsUrl,factory:we,model:p,handle:Ee,onFinished:e=>{L.value=N&&e?N.elapsedAt(e.finishedAt):R.value},onEnd:()=>{L.value??=R.value,u(`ended`)},onDisconnected:()=>{L.value??=R.value}}),s(Te.phase,e=>b.value=e,{immediate:!0}))}),x(()=>Te?.close());let De=j(n.live!==null&&n.live!==void 0),Y=j(n.live?`ready`:`none`);s(k,e=>{e||(De.value=!1)});async function Oe(e){if(De.value=e.target.open,!De.value||Y.value!==`none`)return;Y.value=`loading`;let t=n.fetch??((...e)=>globalThis.fetch(...e));try{let e=await t(`/runs/${encodeURIComponent(n.turn.id)}/events`,{credentials:`same-origin`});if(!e.ok)throw Error(`HTTP ${e.status}`);let r=K(await e.text()).filter(e=>e.type!==`replay_note`);for(let e of(n.turn.schema??0)>=2?pe(r):r)p.handle(e);p.closePhases(),Y.value=`ready`}catch{Y.value=`failed`}}let ke=F(()=>{let e=me.value;return e>0?`${e} step${e===1?``:`s`}`:k.value?`starting`:`no steps recorded`});return(t,n)=>{let s=h(`RouterLink`);return _(),i(`div`,{class:`turn assistant flex flex-col gap-2`,"data-phase":b.value,"data-run-id":e.turn.id,"data-live":k.value?`1`:void 0},[v(`div`,Jt,[r(f,{name:`sb-rise`},{default:g(()=>[S.value?(_(),M(Kt,{key:`receipt`,route:S.value},null,8,[`route`])):D.value?(_(),i(`span`,{key:`agent`,class:d([`agent rounded border px-1.5 py-px font-medium`,C(fe)[C(ue)(D.value)]])},l(D.value),3)):m(``,!0)]),_:1}),O.value?(_(),i(`span`,Yt,l(O.value),1)):m(``,!0),k.value?(_(),i(`span`,Xt,l(ie.value),1)):m(``,!0)]),r(f,{name:`sb-fade`},{default:g(()=>[k.value&&H.value?(_(),M(z,{key:0,tag:`div`,verb:H.value.verb,"elapsed-ms":H.value.elapsedMs,slow:H.value.slow,model:C(y).meta?.model??e.turn.model??null},null,8,[`verb`,`elapsed-ms`,`slow`,`model`])):m(``,!0)]),_:1}),A.value?(_(),i(`p`,Zt,[n[1]||=v(`span`,null,`stream disconnected · the run may still be working`,-1),r(s,{class:`ml-auto text-primary no-underline hover:underline`,to:J.value},{default:g(()=>[...n[0]||=[w(`open the run`,-1)]]),_:1},8,[`to`])])):m(``,!0),k.value||me.value>0||Y.value!==`none`?(_(),i(`details`,{key:1,class:`work group`,open:De.value,"data-testid":`work`,onToggle:Oe},[v(`summary`,$t,[n[2]||=v(`span`,{class:`chev select-none transition-transform duration-150 ease-out group-open:rotate-90 motion-reduce:transition-none`},`❯`,-1),v(`span`,en,l(ke.value),1)]),v(`div`,tn,[Y.value===`loading`?(_(),i(`p`,nn,`reading the run's record…`)):Y.value===`failed`?(_(),i(`p`,rn,[n[4]||=w(` the run's record could not be read — `,-1),r(s,{class:`text-primary no-underline hover:underline`,to:J.value},{default:g(()=>[...n[3]||=[w(`open the run`,-1)]]),_:1},8,[`to`])])):(_(),i(`ol`,an,[r(o,{name:`sb-rise`},{default:g(()=>[(_(!0),i(T,null,a(de.value,e=>(_(),M(be,{key:e.key,step:e,class:`mt-3 first:mt-0`,onToggleGroup:t=>C(p).toggleGroup(e)},null,8,[`step`,`onToggleGroup`]))),128))]),_:1})]))])],40,Qt)):m(``,!0),r(f,{name:`sb-rise`},{default:g(()=>[E.value?(_(),i(`div`,on,[r(ge,{text:E.value},null,8,[`text`])])):he.value?(_(),i(`p`,sn,l(he.value),1)):m(``,!0)]),_:1}),k.value?m(``,!0):(_(),i(`div`,cn,[v(`span`,{class:d([`dur tabular-nums`,B.value?`heat`:``]),style:c(B.value)},l(ie.value),7),r(s,{class:`open text-dimmed no-underline hover:text-primary hover:underline`,to:J.value},{default:g(()=>[...n[5]||=[w(`open run`,-1)]]),_:1},8,[`to`])]))],8,qt)}}}),un={class:`turn silent flex flex-wrap items-baseline gap-x-2 gap-y-0.5 px-1 font-mono text-[0.7rem] text-dimmed`,"data-testid":`silent-receipt`},dn={class:`reason text-muted`},fn=[`title`],pn=u({__name:`SilentTurn`,props:{reason:{},decidedAt:{},now:{}},setup(e){let t=e,n=F(()=>H(t.decidedAt,t.now));return(t,r)=>(_(),i(`div`,un,[r[0]||=v(`span`,{class:`glyph select-none`,"aria-hidden":`true`},`◌`,-1),r[1]||=v(`span`,{class:`label`},`Read, not answered`,-1),v(`span`,dn,`— `+l(e.reason),1),v(`span`,{class:`ts ml-auto select-none`,title:C(me)(e.decidedAt)},l(n.value),9,fn)]))}});function mn(){return{runs:new Map,connected:!1}}function hn(e,t){t.type===`upsert`&&t.run?t.run.finished||!t.run.threadKey?e.runs.delete(t.run.id):e.runs.set(t.run.id,{threadKey:t.run.threadKey,startedAt:t.run.startedAt,...t.run.label===void 0?{}:{label:t.run.label},...t.run.channelId===void 0?{}:{channelId:t.run.channelId}}):t.type===`removed`&&t.id&&e.runs.delete(t.id)}function gn(e){let t=new Map;for(let n of e.runs.values()){let e=t.get(n.threadKey)??[];e.push(n),t.set(n.threadKey,e)}return t}function _n(e,t){return t.includes(`:`)?t:`${e}:${t}`}function vn(e){let t=e.indexOf(`:`);return t>0?e.slice(0,t):`unknown`}function yn(e,t,n){if(!t.connected)return[...e];let r=gn(t),i=new Set,a=e.map(e=>{let t=_n(n,e.id);i.add(t);let a=r.get(t);if(!a)return e.live?{...e,live:!1}:e;let o=e.live?0:a.length;return{...e,live:!0,runs:e.runs+o,lastAt:Math.max(e.lastAt,...a.map(e=>e.startedAt))}}),o=[];for(let[e,t]of r){if(i.has(e))continue;let r=t.reduce((e,t)=>t.startedAt>e.startedAt?t:e),a=r.label?se(r.label).snippet:void 0;o.push({id:e.startsWith(`${n}:`)?e.slice(n.length+1):e,title:a??r.label??e,excerpt:a??r.label??e,lastAt:r.startedAt,runs:t.length,live:!0,surface:vn(r.channelId??e)})}return o.sort((e,t)=>t.lastAt-e.lastAt),[...o,...a]}var bn={key:0,class:`mx-auto my-12 max-w-xl text-center text-toned`},xn=[`data-rail`],Sn={key:0,class:`relative hidden md:block`},Cn=[`aria-valuemin`,`aria-valuemax`,`aria-valuenow`],wn={class:`thread mx-auto flex min-h-[calc(100vh-8rem)] w-full max-w-3xl flex-col`},Tn={key:3,class:`inline text-[0.875rem] text-toned`,"data-testid":`inline`},En={key:2,class:`elsewhere sticky bottom-0 z-10 -mx-3 mt-auto bg-default/85 px-3 py-4 text-center text-[0.8rem] text-toned backdrop-blur sm:-mx-5 sm:px-5`,"data-testid":`elsewhere`},Dn=[`href`],On={key:3,class:`composer-dock sticky bottom-0 z-10 -mx-3 mt-auto bg-default/85 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3 backdrop-blur sm:-mx-5 sm:px-5`},kn=`(min-width: 48rem)`,An=u({__name:`HomePage`,setup(t){let u=E(`home`),p=B(u?.now),h=u?.conversation??``,b=y(u?.retentionDays??null),D=0,A=e=>`${e}-${++D}`,N=P([]);for(let e of u?.turns??[]){if(`kind`in e){N.push({key:A(`s`),kind:`silent`,reason:e.reason,at:e.decidedAt});continue}N.push({key:A(`p`),kind:`person`,text:e.request,at:e.receivedAt??e.startedAt,pending:!1});let t=!e.finished&&e.token?{eventsUrl:`/runs/${encodeURIComponent(e.id)}/events?t=${e.token}`,stopUrl:`/runs/${encodeURIComponent(e.id)}/stop?t=${e.token}`,serverNow:u?.now}:null;N.push({key:A(`a`),kind:`assistant`,turn:e,live:t,ended:e.finished})}let L=F(()=>{for(let e=N.length-1;e>=0;e--){let t=N[e];if(t.kind===`assistant`&&t.live&&!t.ended&&t.turn.hosted!==!0)return t}return null}),ne=j(null),re=j(0);I(e,re);let z=j(``),V=j(void 0),se=F(()=>we(L.value!==null,z.value)),H=j(!1);s(z,()=>{V.value&&z.value===``&&(V.value=void 0)});function ce(e){z.value=e,ue()}async function ue(){if(!u||H.value)return;let e=Je(z.value.trim(),u.commands);if(e===``)return;let t=P({key:A(`p`),kind:`person`,text:e,at:p.value,pending:!0});N.push(t),z.value=``,V.value=void 0,H.value=!0,re.value++;try{let n=await fetch(u.sendUrl,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:JSON.stringify({text:e})}),r=await n.json().catch(()=>({}));if(n.status===202&&typeof r.viewPath==`string`&&typeof r.runId==`string`){let n=De(r.viewPath);if(!n)throw Error(`the run's view path was not one`);t.pending=!1,k.pathname()===`/threads`&&k.replaceUrl(`/threads/${encodeURIComponent(h)}`),N.push({key:A(`a`),kind:`assistant`,turn:{id:r.runId,request:e,startedAt:p.value,receivedAt:p.value,finished:!1,eventCount:0},live:{eventsUrl:n.eventsUrl,stopUrl:n.stopUrl},ended:!1});return}if(n.ok&&typeof r.reply==`string`){t.pending=!1;let e=Ee(r.reply);e.kind===`handBack`?(z.value=e.command,V.value=`Enter runs it`):e.kind===`inline`&&N.push({key:A(`i`),kind:`inline`,text:e.text});return}throw Error(r.error??`HTTP ${n.status}`)}catch(e){t.pending=!1,t.failed=`not sent: ${e instanceof Error?e.message:`error`}`}finally{H.value=!1}}function fe(){let e=ne.value;e&&fetch(`${e}${e.includes(`?`)?`&`:`?`}mode=soft`,{method:`POST`,credentials:`same-origin`})}function pe(e,t,n){let r=Ne(N.filter(e=>e.kind===`person`).map(e=>({text:e.text,folded:e.folded!==void 0,ref:e})),t);if(!r)return;let i=e.turn.receivedAt??e.turn.startedAt;r.ref.folded=n===void 0?``:`at ${le(Math.max(0,n-i),`clock`)}`}function me(e){e.ended=!0,ne.value=null}let he=je({width:k.readPref(Z.width),collapsed:k.readPref(Z.collapsed)}),U=j(he.width),W=j(he.collapsed),_e=j(!1),G=j(k.mediaMatches(kn)),ve=k.onMediaChange(kn,e=>{G.value=e}),ye=j(null),be=j(null),xe=F(()=>G.value?W.value?`Show recent threads`:`Hide recent threads`:`Recent threads`);function Se(){if(G.value=k.mediaMatches(kn),G.value){W.value=!W.value,k.writePref(Z.collapsed,W.value?`1`:`0`);return}_e.value=!0}function K(e,t){U.value=Ae(e),t&&k.writePref(Z.width,String(U.value))}let q=null;function Ce(e){q&&K(q.startWidth+(e.clientX-q.startX),!1)}function J(){window.removeEventListener(`pointermove`,Ce),q&&(q=null,k.writePref(Z.width,String(U.value)))}function Te(e){e.button===0&&(e.preventDefault(),q={startX:e.clientX,startWidth:U.value},e.currentTarget?.setPointerCapture?.(e.pointerId),window.addEventListener(`pointermove`,Ce),window.addEventListener(`pointerup`,J,{once:!0}))}function Oe(e){if(e.key===`ArrowRight`)K(U.value+X.step,!0);else if(e.key===`ArrowLeft`)K(U.value-X.step,!0);else if(e.key===`Home`)K(X.min,!0);else if(e.key===`End`)K(X.max,!0);else return;e.preventDefault()}O(()=>{window.removeEventListener(`pointermove`,Ce),window.removeEventListener(`pointerup`,J),ve()});function ke(e){let t=Re(e);if(t){if(e.preventDefault(),t===`newThread`){k.navigate(`/threads`);return}if(ye.value){ye.value.focusFilter();return}if(W.value&&k.mediaMatches(kn)){W.value=!1,k.writePref(Z.collapsed,`0`),S().then(()=>ye.value?.focusFilter());return}_e.value=!0,S().then(()=>be.value?.focusFilter())}}let Me=j(null),Fe=j(!1);function Ie(){return document.body.scrollHeight-(window.innerHeight+window.scrollY)}s(()=>N.length,()=>{let e=Pe(Ie());S().then(()=>{e?Me.value?.scrollIntoView?.({block:`end`}):Fe.value=!0})});function Le(){Pe(Ie())&&(Fe.value=!1)}function ze(){Me.value?.scrollIntoView?.({block:`end`,behavior:`smooth`}),Fe.value=!1}ee(()=>{window.addEventListener(`scroll`,Le,{passive:!0}),window.addEventListener(`keydown`,ke),u&&We()}),x(()=>{window.removeEventListener(`scroll`,Le),window.removeEventListener(`keydown`,ke),Ue?.close()});let Q=P(mn()),Be=F(()=>yn(u?.conversations??[],Q,u?.lane??``)),Ve=F(()=>{let e=L.value?.turn.id;return Q.runs.size+(e&&!Q.runs.has(e)?1:0)}),He=oe(),Ue=null;function We(){Ue=He(`/runs?stream=1&mine=1`);let e=!1;Ue.onopen=()=>{e&&Q.runs.clear(),e=!0,Q.connected=!0},Ue.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}hn(Q,t)}}let Ge=F(()=>{let e=N.find(e=>e.kind===`person`);return e?Y(e.text):`Switchboard`});s([Ge,Ve],([e,t])=>{k.setTitle(t>0?`(${t}) ${e}`:e),k.setFavicon(t>0?ae:ie)},{immediate:!0});let Ke=F(()=>new Date(p.value).getHours()),qe=F(()=>N.length===0),$=u?.elsewhere,Ye=$?$.surface===`web`?`This thread is another person's conversation. You can read it here.`:`This thread lives in ${de[$.surface]??$.surface}.`:``;return(e,t)=>{let s=te,y=R;return _(),M(n,{title:`Threads`,nav:`home`},{leading:g(()=>[r(s,{class:`rail-toggle -ml-1`,size:`xs`,color:`neutral`,variant:`ghost`,icon:G.value&&!W.value?`i-lucide-panel-left-close`:`i-lucide-panel-left`,"aria-label":xe.value,"aria-expanded":G.value?!W.value:void 0,onClick:Se},null,8,[`icon`,`aria-label`,`aria-expanded`])]),default:g(()=>[C(u)?(_(),i(`div`,{key:1,class:d([`home gap-8 md:grid`,W.value?`md:grid-cols-[minmax(0,1fr)]`:`md:grid-cols-[var(--rail-w)_minmax(0,1fr)]`]),style:c({"--rail-w":`${U.value}px`}),"data-rail":W.value?`hidden`:`shown`},[W.value?m(``,!0):(_(),i(`aside`,Sn,[r(kt,{ref_key:`rail`,ref:ye,class:`sticky top-20`,rows:Be.value,current:C(h),now:C(p),retention:C(b)},null,8,[`rows`,`current`,`now`,`retention`]),v(`div`,{class:`handle group/handle absolute inset-y-0 -right-5 flex w-3 cursor-col-resize touch-none select-none justify-center outline-none`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the recent threads column`,"aria-valuemin":C(X).min,"aria-valuemax":C(X).max,"aria-valuenow":U.value,tabindex:`0`,"data-testid":`rail-handle`,onPointerdown:Te,onKeydown:Oe,onDblclick:t[0]||=e=>K(C(X).default,!0)},[...t[5]||=[v(`span`,{class:`w-px rounded-full bg-(--ui-border-accented) opacity-0 transition-opacity duration-150 ease-out group-hover/handle:opacity-100 group-focus-visible/handle:opacity-100`,"aria-hidden":`true`},null,-1)]],40,Cn)])),r(y,{open:_e.value,"onUpdate:open":t[1]||=e=>_e.value=e,side:`left`,title:`Recent threads`,ui:{content:`max-w-xs`}},{body:g(()=>[r(kt,{ref_key:`sheetRail`,ref:be,rows:Be.value,current:C(h),now:C(p),retention:C(b)},null,8,[`rows`,`current`,`now`,`retention`])]),_:1},8,[`open`]),v(`section`,wn,[qe.value?(_(),M(It,{key:0,class:`mb-auto mt-[clamp(1.5rem,14vh,9rem)]`,name:C(u).viewer.name,hour:Ke.value,suggestions:C(u).suggestions,onPick:ce},{default:g(()=>[r(lt,{modelValue:z.value,"onUpdate:modelValue":t[2]||=e=>z.value=e,mode:se.value,hint:V.value,commands:C(u).commands,autofocus:``,"sweep-on-mount":``,onSubmit:ue,onStop:fe},null,8,[`modelValue`,`mode`,`hint`,`commands`])]),_:1},8,[`name`,`hour`,`suggestions`])):(_(),M(o,{key:1,name:`sb-rise`,"move-class":`sb-move-move`,tag:`ol`,class:`transcript m-0 flex list-none flex-col gap-6 p-0 pb-32 pt-2`},{default:g(()=>[(_(!0),i(T,null,a(N,e=>(_(),i(`li`,{key:e.key},[e.kind===`person`?(_(),M(Ht,{key:0,text:e.text,at:e.at,now:C(p),pending:e.pending,folded:e.folded,failed:e.failed},null,8,[`text`,`at`,`now`,`pending`,`folded`,`failed`])):e.kind===`assistant`?(_(),M(ln,{key:1,turn:e.turn,live:e.live,now:C(p),onInput:(t,n)=>pe(e,t,n),onEnded:t=>me(e),onStop:t[3]||=e=>ne.value=e},null,8,[`turn`,`live`,`now`,`onInput`,`onEnded`])):e.kind===`silent`?(_(),M(pn,{key:2,reason:e.reason,"decided-at":e.at,now:C(p)},null,8,[`reason`,`decided-at`,`now`])):(_(),i(`div`,Tn,[r(ge,{text:e.text},null,8,[`text`])]))]))),128))]),_:1})),v(`div`,{ref_key:`end`,ref:Me,class:`end`,"aria-hidden":`true`},null,512),!qe.value&&C($)?(_(),i(`p`,En,[w(l(C(Ye))+` `,1),C($).url?(_(),i(`a`,{key:0,href:C($).url,target:`_blank`,rel:`noopener`,class:`text-highlighted`},`Reply there ↗`,8,Dn)):C($).surface===`web`?m(``,!0):(_(),i(T,{key:1},[w(`Reply there.`)],64))])):qe.value?m(``,!0):(_(),i(`div`,On,[r(f,{name:`sb-rise`},{default:g(()=>[Fe.value?(_(),i(`button`,{key:0,type:`button`,class:`new-pill absolute -top-9 left-1/2 -translate-x-1/2 rounded-full border border-default bg-(--ui-bg-elevated) px-3 py-1 font-mono text-[0.7rem] text-toned shadow-sm hover:text-highlighted`,onClick:ze},` ↓ new `)):m(``,!0)]),_:1}),r(lt,{modelValue:z.value,"onUpdate:modelValue":t[4]||=e=>z.value=e,mode:se.value,hint:V.value,commands:C(u).commands,autofocus:``,onSubmit:ue,onStop:fe},null,8,[`modelValue`,`mode`,`hint`,`commands`])]))])],14,xn)):(_(),i(`div`,bn,`This page needs its seed.`))]),_:1})}}});export{An as default};
|
package/dist/assets/web/dist/assets/{PendingTurnRow-DDhMhrI7.js → PendingTurnRow-ChCQOLgZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,D as t,O as n,P as r,T as i,w as a}from"./AppShell-DAtHiuI6.js";import{An as o,B as s,Br as c,Cn as l,Ct as u,D as d,Di as f,Dr as p,Fi as m,G as h,Gr as g,Hn as _,I as v,J as y,K as b,L as x,Li as S,Mn as C,Oi as ee,Pi as w,Pr as T,Qr as E,S as D,Sn as O,T as k,Xr as A,_r as j,b as te,bn as M,dr as N,gt as P,ji as F,kn as I,l as ne,m as re,rn as ie,rr as L,rt as ae,tn as R,w as oe,wr as z,x as B,xi as V,xn as H,yn as U,z as W}from"./browser-B6T5hjfR.js";import{R as G}from"./indexRow-Bde9OZxG.js";import"./format-BldUwl_R.js";import{d as K,f as q,m as se,p as ce}from"./sseReplay-DPwdsaok.js";var[J,le]=b(`DialogRoot`),ue=C({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=P(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=V(),a=V(),{modal:o,unmountOnHide:s}=ee(n);return le({open:r,modal:o,unmountOnHide:s,openModal:()=>{r.value=!0},onOpenChange:e=>{r.value=e},onOpenToggle:()=>{r.value=!r.value},contentId:``,titleId:``,descriptionId:``,triggerElement:i,contentElement:a}),(e,t)=>z(e.$slots,`default`,{open:F(r),close:()=>r.value=!1})}}),de=C({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;W();let n=J();return(e,r)=>(j(),H(F(v),L(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>F(n).onOpenChange(!1)}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`type`]))}}),Y=C({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(n,{emit:r}){let s=n,c=r,l=J(),{forwardRef:u,currentElement:d}=W();return l.titleId||=t(void 0,`reka-dialog-title`),l.descriptionId||=t(void 0,`reka-dialog-description`),N(()=>{l.contentElement=d,h()!==document.body&&(l.triggerElement.value=h())}),(t,n)=>(j(),H(F(a),{"as-child":``,loop:``,trapped:s.trapFocus,present:s.present,onMountAutoFocus:n[5]||=e=>c(`openAutoFocus`,e),onUnmountAutoFocus:n[6]||=e=>c(`closeAutoFocus`,e)},{default:A(()=>[o(F(i),L({id:F(l).contentId,ref:F(u),as:t.as,"as-child":t.asChild,present:s.present,"disable-outside-pointer-events":t.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":F(l).descriptionId,"aria-labelledby":F(l).titleId,"data-state":F(e)(F(l).open.value)},t.$attrs,{onDismiss:n[0]||=e=>F(l).onOpenChange(!1),onEscapeKeyDown:n[1]||=e=>c(`escapeKeyDown`,e),onFocusOutside:n[2]||=e=>c(`focusOutside`,e),onInteractOutside:n[3]||=e=>c(`interactOutside`,e),onPointerDownOutside:n[4]||=e=>c(`pointerDownOutside`,e)}),{default:A(()=>[z(t.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`present`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`,`present`]))}}),fe=C({__name:`DialogContentModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let r=e,i=t,a=J(),o=s(i),{forwardRef:c,currentElement:l}=W(),u=U(()=>r.present?l.value:void 0);n(u);let d=U(()=>{let{present:e,...t}=r;return t});return g(()=>r.present,(e,t)=>{!e&&t&&a.triggerElement.value?.focus()}),(e,t)=>(j(),H(Y,L({...d.value,...F(o)},{ref:F(c),present:e.present,"trap-focus":F(a).open.value,"disable-outside-pointer-events":r.disableOutsidePointerEvents,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),F(a).triggerElement.value?.focus())},onPointerDownOutside:t[1]||=e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},onFocusOutside:t[2]||=e=>{e.preventDefault()}}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`present`,`trap-focus`,`disable-outside-pointer-events`]))}}),pe=C({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=s(t);W();let i=J(),a=V(!1),o=V(!1),c=U(()=>{let{present:e,...t}=n;return t});return g(()=>n.present,(e,t)=>{!e&&t&&(a.value||i.triggerElement.value?.focus(),a.value=!1,o.value=!1)}),(e,t)=>(j(),H(Y,L({...c.value,...F(r)},{present:e.present,"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||F(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=e=>{e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;F(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`present`]))}}),me=C({__name:`DialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=J(),a=s(r),{forwardRef:o}=W();return(e,t)=>(j(),H(F(x),{present:e.forceMount||F(i).open.value,"force-mount":e.forceMount||!F(i).unmountOnHide.value},{default:A(({present:t})=>[F(i).modal.value?E((j(),H(fe,L({key:0,ref:F(o),present:F(i).unmountOnHide.value||t},{...n,...F(a),...e.$attrs}),{default:A(()=>[z(e.$slots,`default`)]),_:2},1040,[`present`])),[[R,F(i).unmountOnHide.value||t]]):E((j(),H(pe,L({key:1,ref:F(o),present:F(i).unmountOnHide.value||t},{...n,...F(a),...e.$attrs}),{default:A(()=>[z(e.$slots,`default`)]),_:2},1040,[`present`])),[[R,F(i).unmountOnHide.value||t]])]),_:3},8,[`present`,`force-mount`]))}}),X=C({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;W();let n=J();return(e,r)=>(j(),H(F(v),L(t,{id:F(n).descriptionId}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`id`]))}}),he=C({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},setup(e){let t=e,n=J(),i=r(t.present);return g(()=>t.present,e=>i.value=e),W(),(e,t)=>(j(),H(F(v),{as:e.as,"as-child":e.asChild,"data-state":F(n).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:t[0]||=ie(()=>{},[`left`,`self`,`prevent`])},{default:A(()=>[z(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),ge=C({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=J(),{forwardRef:n}=W();return(e,r)=>F(t)?.modal.value?(j(),H(F(x),{key:0,present:e.forceMount||F(t).open.value,"force-mount":e.forceMount||!F(t).unmountOnHide.value},{default:A(({present:r})=>[E(o(he,L(e.$attrs,{ref:F(n),as:e.as,"as-child":e.asChild,present:F(t).unmountOnHide.value||r}),{default:A(()=>[z(e.$slots,`default`)]),_:2},1040,[`as`,`as-child`,`present`]),[[R,F(t).unmountOnHide.value||r]])]),_:3},8,[`present`,`force-mount`])):O(`v-if`,!0)}}),_e=C({__name:`DialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(j(),H(F(d),m(_(t)),{default:A(()=>[z(e.$slots,`default`)]),_:3},16))}}),Z=C({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e,n=J();return W(),(e,r)=>(j(),H(F(v),L(t,{id:F(n).titleId}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`id`]))}}),ve=C({__name:`DialogTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e,r=J(),{forwardRef:i,currentElement:a}=W();return r.contentId||=t(void 0,`reka-dialog-content`),N(()=>{r.triggerElement.value=a.value}),(e,t)=>(j(),H(F(v),L(n,{ref:F(i),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":F(r).open.value||!1,"aria-controls":F(r).open.value?F(r).contentId:void 0,"data-state":F(r).open.value?`open`:`closed`,onClick:F(r).onOpenToggle}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`onClick`]))}});function ye(e,t={}){let n=e.detail.originalEvent,r=n.target;if(!r?.isConnected){e.preventDefault();return}t.scrollable&&(n.offsetX>r.clientWidth||n.offsetY>r.clientHeight)&&e.preventDefault()}var be={slots:{overlay:`fixed inset-0 bg-elevated/75`,content:`fixed bg-default divide-y divide-default sm:ring ring-default sm:shadow-lg flex flex-col focus:outline-none`,header:`flex items-center gap-1.5 p-4 sm:px-6 min-h-(--ui-header-height)`,wrapper:``,body:`flex-1 overflow-y-auto p-4 sm:p-6`,footer:`flex items-center gap-1.5 p-4 sm:px-6`,title:`text-highlighted font-semibold`,description:`mt-1 text-muted text-sm`,close:`absolute top-4 end-4`},variants:{side:{top:{content:``},right:{content:`max-w-md`},bottom:{content:``},left:{content:`max-w-md`}},inset:{true:{content:`rounded-lg`}},transition:{true:{overlay:`data-[state=open]:animate-[fade-in_200ms_var(--ease-out)] data-[state=closed]:animate-[fade-out_200ms_var(--ease-out)]`}}},compoundVariants:[{side:`top`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 top-4`}},{side:`top`,inset:!1,class:{content:`max-h-full inset-x-0 top-0`}},{side:`right`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 right-4`}},{side:`right`,inset:!1,class:{content:`w-full inset-y-0 right-0`}},{side:`bottom`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 bottom-4`}},{side:`bottom`,inset:!1,class:{content:`max-h-full inset-x-0 bottom-0`}},{side:`left`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 left-4`}},{side:`left`,inset:!1,class:{content:`w-full inset-y-0 left-0`}},{transition:!0,side:`top`,class:{content:`data-[state=open]:animate-[slide-in-from-top_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-top_200ms_var(--ease-out)]`}},{transition:!0,side:`right`,class:{content:`data-[state=open]:animate-[slide-in-from-right_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-right_200ms_var(--ease-out)]`}},{transition:!0,side:`bottom`,class:{content:`data-[state=open]:animate-[slide-in-from-bottom_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-bottom_200ms_var(--ease-out)]`}},{transition:!0,side:`left`,class:{content:`data-[state=open]:animate-[slide-in-from-left_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-left_200ms_var(--ease-out)]`}}]},xe={__name:`Slideover`,props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},transition:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1,default:`right`},inset:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1}},emits:[`leave`,`after:leave`,`enter`,`after:enter`,`close:prevent`,`update:open`],setup(e,{emit:t}){let n=e,r=t,i=c(),a=D(`slideover`,n),{t:s}=y(),d=ae(),p=B(u(a,`open`,`defaultOpen`,`modal`,`unmountOnHide`),r),h=oe(f(()=>a.portal)),g=f(()=>a.content),v=U(()=>a.dismissible?{pointerDownOutside:ye}:[`interactOutside`,`escapeKeyDown`].reduce((e,t)=>(e[t]=e=>{e.preventDefault(),r(`close:prevent`)},e),{})),b=U(()=>te({extend:be,...d.ui?.slideover||{}})({transition:a.transition,side:a.side,inset:a.inset}));return(e,t)=>(j(),H(F(ue),m(_(F(p))),{default:A(({open:n,close:c})=>[i.default?(j(),H(F(ve),{key:0,"as-child":``,class:w(F(a).class)},{default:A(()=>[z(e.$slots,`default`,{open:n})]),_:2},1032,[`class`])):O(``,!0),o(F(_e),L(F(h),{"force-mount":F(h).disabled&&F(a).unmountOnHide===!1||void 0}),{default:A(()=>[o(F(re),null,{default:A(()=>[F(a).overlay?(j(),H(F(ge),{key:0,"data-slot":`overlay`,class:w(b.value.overlay({class:F(a).ui?.overlay}))},null,8,[`class`])):O(``,!0),o(F(me),L({"data-side":F(a).side,"data-slot":`content`,class:b.value.content({class:[!i.default&&F(a).class,F(a).ui?.content]})},g.value,{onEnter:t[0]||=e=>r(`enter`),onAfterEnter:t[1]||=e=>r(`after:enter`),onLeave:t[2]||=e=>r(`leave`),onAfterLeave:t[3]||=e=>r(`after:leave`)},T(v.value)),{default:A(()=>[!F(a).title&&!i.title||!F(a).description&&!i.description||i.content?(j(),H(F(k),{key:0},{default:A(()=>[!F(a).title&&!i.title?(j(),H(F(Z),{key:0})):i.content?(j(),H(F(Z),{key:1},{default:A(()=>[z(e.$slots,`title`,{},()=>[I(S(F(a).title),1)])]),_:3})):O(``,!0),!F(a).description&&!i.description?(j(),H(F(X),{key:2})):i.content?(j(),H(F(X),{key:3},{default:A(()=>[z(e.$slots,`description`,{},()=>[I(S(F(a).description),1)])]),_:3})):O(``,!0)]),_:3})):O(``,!0),z(e.$slots,`content`,{close:c},()=>[i.header||F(a).title||i.title||F(a).description||i.description||F(a).close||i.close?(j(),l(`div`,{key:0,"data-slot":`header`,class:w(b.value.header({class:F(a).ui?.header}))},[z(e.$slots,`header`,{close:c},()=>[F(a).title||i.title||F(a).description||i.description?(j(),l(`div`,{key:0,"data-slot":`wrapper`,class:w(b.value.wrapper({class:F(a).ui?.wrapper}))},[F(a).title||i.title?(j(),H(F(Z),{key:0,"data-slot":`title`,class:w(b.value.title({class:F(a).ui?.title}))},{default:A(()=>[z(e.$slots,`title`,{},()=>[I(S(F(a).title),1)])]),_:3},8,[`class`])):O(``,!0),F(a).description||i.description?(j(),H(F(X),{key:1,"data-slot":`description`,class:w(b.value.description({class:F(a).ui?.description}))},{default:A(()=>[z(e.$slots,`description`,{},()=>[I(S(F(a).description),1)])]),_:3},8,[`class`])):O(``,!0)],2)):O(``,!0),z(e.$slots,`actions`),F(a).close||i.close?(j(),H(F(de),{key:1,"as-child":``},{default:A(()=>[z(e.$slots,`close`,{ui:b.value},()=>[F(a).close?(j(),H(ne,L({key:0,icon:F(a).closeIcon||F(d).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":F(s)(`slideover.close`)},typeof F(a).close==`object`?F(a).close:{},{"data-slot":`close`,class:b.value.close({class:F(a).ui?.close})}),null,16,[`icon`,`aria-label`,`class`])):O(``,!0)])]),_:2},1024)):O(``,!0)])],2)):O(``,!0),M(`div`,{"data-slot":`body`,class:w(b.value.body({class:F(a).ui?.body}))},[z(e.$slots,`body`,{close:c})],2),i.footer?(j(),l(`div`,{key:1,"data-slot":`footer`,class:w(b.value.footer({class:F(a).ui?.footer}))},[z(e.$slots,`footer`,{close:c})],2)):O(``,!0)])]),_:2},1040,[`data-side`,`class`])]),_:2},1024)]),_:2},1040,[`force-mount`])]),_:3},16))}};function Q(e){let t=V(`connecting`),n=e.factory(e.url);n.onopen=()=>{t.value===`connecting`&&!e.model.state.stopMode&&(t.value=`running`)};let r=0;return n.onmessage=t=>{let n;try{n=JSON.parse(t.data)}catch{return}if(n.type!==`replay_note`){let e=Number(t.lastEventId);if(e>0){if(e<=r)return;r=e}}e.handle(n)},n.addEventListener(`replay_elided`,t=>{let n=se(t);n&&e.model.noteElided(n)}),n.addEventListener(`finished`,n=>{e.onFinished?.(ce(n)),(t.value===`connecting`||t.value===`running`)&&(t.value=`finished`)}),n.addEventListener(`end`,r=>{e.model.flushPendingTurn(`the run ended here`),e.model.closePhases(),t.value=`ended`,n.close(),e.onEnd?.(q(r))}),n.onerror=()=>{n.readyState===2&&(t.value=`disconnected`,e.onDisconnected?.())},{phase:t,close:()=>n.close()}}var $=[`Thinking`,`Pondering`,`Mulling it over`,`Reasoning`,`Cogitating`,`Weighing options`,`Puzzling`,`Deliberating`,`Noodling`,`Chewing on it`,`Ruminating`,`Reticulating splines`];function Se(e){return $[Math.floor(Math.max(0,e)/6e3)%$.length]}var Ce=[`title`],we={class:`verb min-w-0 truncate text-toned`},Te=C({__name:`PendingTurnRow`,props:{verb:{},elapsedMs:{},slow:{type:Boolean},model:{},tag:{},id:{}},setup(e){return(t,n)=>(j(),H(p(e.tag??`li`),{id:e.id,class:`pending flex items-center gap-3 rounded-md border border-dashed border-accented pl-3 pr-[calc(var(--sb-gutter)-1px)] py-2 text-sm`,"aria-live":`off`,title:`the model is working on its next turn — nothing back yet (since the last event, runner clock)`,"data-testid":`pending`},{default:A(()=>[n[0]||=M(`span`,{class:`pulse text-[1.1em] leading-none text-info motion-safe:animate-pulse`},`∿`,-1),e.model?(j(),l(`span`,{key:0,class:`badge shrink-0 rounded bg-accented px-1.5 font-mono text-[0.68rem] font-medium leading-normal tracking-wider text-muted`,title:e.model},S(F(K)(e.model)),9,Ce)):O(``,!0),M(`span`,we,S(e.verb)+`…`,1),M(`span`,{class:w([`since ml-auto shrink-0 font-mono text-xs tabular-nums`,e.slow?`text-warn`:`text-dimmed`])},S(F(G)(e.elapsedMs,`clock`)),3)]),_:1},8,[`id`]))}});export{xe as i,Se as n,Q as r,Te as t};
|
|
1
|
+
import{C as e,D as t,O as n,P as r,T as i,w as a}from"./AppShell-DAtHiuI6.js";import{An as o,B as s,Br as c,Cn as l,Ct as u,D as d,Di as f,Dr as p,Fi as m,G as h,Gr as g,Hn as _,I as v,J as y,K as b,L as x,Li as S,Mn as C,Oi as ee,Pi as w,Pr as T,Qr as E,S as D,Sn as O,T as k,Xr as A,_r as j,b as te,bn as M,dr as N,gt as P,ji as F,kn as I,l as ne,m as re,rn as ie,rr as L,rt as ae,tn as R,w as oe,wr as z,x as B,xi as V,xn as H,yn as U,z as W}from"./browser-B6T5hjfR.js";import{H as G}from"./indexRow-BT0cPVRw.js";import"./format-BldUwl_R.js";import{d as K,f as q,m as se,p as ce}from"./sseReplay-DmyMXfRC.js";var[J,le]=b(`DialogRoot`),ue=C({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=P(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=V(),a=V(),{modal:o,unmountOnHide:s}=ee(n);return le({open:r,modal:o,unmountOnHide:s,openModal:()=>{r.value=!0},onOpenChange:e=>{r.value=e},onOpenToggle:()=>{r.value=!r.value},contentId:``,titleId:``,descriptionId:``,triggerElement:i,contentElement:a}),(e,t)=>z(e.$slots,`default`,{open:F(r),close:()=>r.value=!1})}}),de=C({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;W();let n=J();return(e,r)=>(j(),H(F(v),L(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>F(n).onOpenChange(!1)}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`type`]))}}),Y=C({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(n,{emit:r}){let s=n,c=r,l=J(),{forwardRef:u,currentElement:d}=W();return l.titleId||=t(void 0,`reka-dialog-title`),l.descriptionId||=t(void 0,`reka-dialog-description`),N(()=>{l.contentElement=d,h()!==document.body&&(l.triggerElement.value=h())}),(t,n)=>(j(),H(F(a),{"as-child":``,loop:``,trapped:s.trapFocus,present:s.present,onMountAutoFocus:n[5]||=e=>c(`openAutoFocus`,e),onUnmountAutoFocus:n[6]||=e=>c(`closeAutoFocus`,e)},{default:A(()=>[o(F(i),L({id:F(l).contentId,ref:F(u),as:t.as,"as-child":t.asChild,present:s.present,"disable-outside-pointer-events":t.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":F(l).descriptionId,"aria-labelledby":F(l).titleId,"data-state":F(e)(F(l).open.value)},t.$attrs,{onDismiss:n[0]||=e=>F(l).onOpenChange(!1),onEscapeKeyDown:n[1]||=e=>c(`escapeKeyDown`,e),onFocusOutside:n[2]||=e=>c(`focusOutside`,e),onInteractOutside:n[3]||=e=>c(`interactOutside`,e),onPointerDownOutside:n[4]||=e=>c(`pointerDownOutside`,e)}),{default:A(()=>[z(t.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`present`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`,`present`]))}}),fe=C({__name:`DialogContentModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let r=e,i=t,a=J(),o=s(i),{forwardRef:c,currentElement:l}=W(),u=U(()=>r.present?l.value:void 0);n(u);let d=U(()=>{let{present:e,...t}=r;return t});return g(()=>r.present,(e,t)=>{!e&&t&&a.triggerElement.value?.focus()}),(e,t)=>(j(),H(Y,L({...d.value,...F(o)},{ref:F(c),present:e.present,"trap-focus":F(a).open.value,"disable-outside-pointer-events":r.disableOutsidePointerEvents,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),F(a).triggerElement.value?.focus())},onPointerDownOutside:t[1]||=e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},onFocusOutside:t[2]||=e=>{e.preventDefault()}}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`present`,`trap-focus`,`disable-outside-pointer-events`]))}}),pe=C({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=s(t);W();let i=J(),a=V(!1),o=V(!1),c=U(()=>{let{present:e,...t}=n;return t});return g(()=>n.present,(e,t)=>{!e&&t&&(a.value||i.triggerElement.value?.focus(),a.value=!1,o.value=!1)}),(e,t)=>(j(),H(Y,L({...c.value,...F(r)},{present:e.present,"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||F(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=e=>{e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;F(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`present`]))}}),me=C({__name:`DialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=J(),a=s(r),{forwardRef:o}=W();return(e,t)=>(j(),H(F(x),{present:e.forceMount||F(i).open.value,"force-mount":e.forceMount||!F(i).unmountOnHide.value},{default:A(({present:t})=>[F(i).modal.value?E((j(),H(fe,L({key:0,ref:F(o),present:F(i).unmountOnHide.value||t},{...n,...F(a),...e.$attrs}),{default:A(()=>[z(e.$slots,`default`)]),_:2},1040,[`present`])),[[R,F(i).unmountOnHide.value||t]]):E((j(),H(pe,L({key:1,ref:F(o),present:F(i).unmountOnHide.value||t},{...n,...F(a),...e.$attrs}),{default:A(()=>[z(e.$slots,`default`)]),_:2},1040,[`present`])),[[R,F(i).unmountOnHide.value||t]])]),_:3},8,[`present`,`force-mount`]))}}),X=C({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;W();let n=J();return(e,r)=>(j(),H(F(v),L(t,{id:F(n).descriptionId}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`id`]))}}),he=C({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},setup(e){let t=e,n=J(),i=r(t.present);return g(()=>t.present,e=>i.value=e),W(),(e,t)=>(j(),H(F(v),{as:e.as,"as-child":e.asChild,"data-state":F(n).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:t[0]||=ie(()=>{},[`left`,`self`,`prevent`])},{default:A(()=>[z(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),ge=C({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=J(),{forwardRef:n}=W();return(e,r)=>F(t)?.modal.value?(j(),H(F(x),{key:0,present:e.forceMount||F(t).open.value,"force-mount":e.forceMount||!F(t).unmountOnHide.value},{default:A(({present:r})=>[E(o(he,L(e.$attrs,{ref:F(n),as:e.as,"as-child":e.asChild,present:F(t).unmountOnHide.value||r}),{default:A(()=>[z(e.$slots,`default`)]),_:2},1040,[`as`,`as-child`,`present`]),[[R,F(t).unmountOnHide.value||r]])]),_:3},8,[`present`,`force-mount`])):O(`v-if`,!0)}}),_e=C({__name:`DialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(j(),H(F(d),m(_(t)),{default:A(()=>[z(e.$slots,`default`)]),_:3},16))}}),Z=C({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e,n=J();return W(),(e,r)=>(j(),H(F(v),L(t,{id:F(n).titleId}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`id`]))}}),ve=C({__name:`DialogTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e,r=J(),{forwardRef:i,currentElement:a}=W();return r.contentId||=t(void 0,`reka-dialog-content`),N(()=>{r.triggerElement.value=a.value}),(e,t)=>(j(),H(F(v),L(n,{ref:F(i),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":F(r).open.value||!1,"aria-controls":F(r).open.value?F(r).contentId:void 0,"data-state":F(r).open.value?`open`:`closed`,onClick:F(r).onOpenToggle}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`onClick`]))}});function ye(e,t={}){let n=e.detail.originalEvent,r=n.target;if(!r?.isConnected){e.preventDefault();return}t.scrollable&&(n.offsetX>r.clientWidth||n.offsetY>r.clientHeight)&&e.preventDefault()}var be={slots:{overlay:`fixed inset-0 bg-elevated/75`,content:`fixed bg-default divide-y divide-default sm:ring ring-default sm:shadow-lg flex flex-col focus:outline-none`,header:`flex items-center gap-1.5 p-4 sm:px-6 min-h-(--ui-header-height)`,wrapper:``,body:`flex-1 overflow-y-auto p-4 sm:p-6`,footer:`flex items-center gap-1.5 p-4 sm:px-6`,title:`text-highlighted font-semibold`,description:`mt-1 text-muted text-sm`,close:`absolute top-4 end-4`},variants:{side:{top:{content:``},right:{content:`max-w-md`},bottom:{content:``},left:{content:`max-w-md`}},inset:{true:{content:`rounded-lg`}},transition:{true:{overlay:`data-[state=open]:animate-[fade-in_200ms_var(--ease-out)] data-[state=closed]:animate-[fade-out_200ms_var(--ease-out)]`}}},compoundVariants:[{side:`top`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 top-4`}},{side:`top`,inset:!1,class:{content:`max-h-full inset-x-0 top-0`}},{side:`right`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 right-4`}},{side:`right`,inset:!1,class:{content:`w-full inset-y-0 right-0`}},{side:`bottom`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 bottom-4`}},{side:`bottom`,inset:!1,class:{content:`max-h-full inset-x-0 bottom-0`}},{side:`left`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 left-4`}},{side:`left`,inset:!1,class:{content:`w-full inset-y-0 left-0`}},{transition:!0,side:`top`,class:{content:`data-[state=open]:animate-[slide-in-from-top_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-top_200ms_var(--ease-out)]`}},{transition:!0,side:`right`,class:{content:`data-[state=open]:animate-[slide-in-from-right_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-right_200ms_var(--ease-out)]`}},{transition:!0,side:`bottom`,class:{content:`data-[state=open]:animate-[slide-in-from-bottom_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-bottom_200ms_var(--ease-out)]`}},{transition:!0,side:`left`,class:{content:`data-[state=open]:animate-[slide-in-from-left_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-left_200ms_var(--ease-out)]`}}]},xe={__name:`Slideover`,props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},transition:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1,default:`right`},inset:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1}},emits:[`leave`,`after:leave`,`enter`,`after:enter`,`close:prevent`,`update:open`],setup(e,{emit:t}){let n=e,r=t,i=c(),a=D(`slideover`,n),{t:s}=y(),d=ae(),p=B(u(a,`open`,`defaultOpen`,`modal`,`unmountOnHide`),r),h=oe(f(()=>a.portal)),g=f(()=>a.content),v=U(()=>a.dismissible?{pointerDownOutside:ye}:[`interactOutside`,`escapeKeyDown`].reduce((e,t)=>(e[t]=e=>{e.preventDefault(),r(`close:prevent`)},e),{})),b=U(()=>te({extend:be,...d.ui?.slideover||{}})({transition:a.transition,side:a.side,inset:a.inset}));return(e,t)=>(j(),H(F(ue),m(_(F(p))),{default:A(({open:n,close:c})=>[i.default?(j(),H(F(ve),{key:0,"as-child":``,class:w(F(a).class)},{default:A(()=>[z(e.$slots,`default`,{open:n})]),_:2},1032,[`class`])):O(``,!0),o(F(_e),L(F(h),{"force-mount":F(h).disabled&&F(a).unmountOnHide===!1||void 0}),{default:A(()=>[o(F(re),null,{default:A(()=>[F(a).overlay?(j(),H(F(ge),{key:0,"data-slot":`overlay`,class:w(b.value.overlay({class:F(a).ui?.overlay}))},null,8,[`class`])):O(``,!0),o(F(me),L({"data-side":F(a).side,"data-slot":`content`,class:b.value.content({class:[!i.default&&F(a).class,F(a).ui?.content]})},g.value,{onEnter:t[0]||=e=>r(`enter`),onAfterEnter:t[1]||=e=>r(`after:enter`),onLeave:t[2]||=e=>r(`leave`),onAfterLeave:t[3]||=e=>r(`after:leave`)},T(v.value)),{default:A(()=>[!F(a).title&&!i.title||!F(a).description&&!i.description||i.content?(j(),H(F(k),{key:0},{default:A(()=>[!F(a).title&&!i.title?(j(),H(F(Z),{key:0})):i.content?(j(),H(F(Z),{key:1},{default:A(()=>[z(e.$slots,`title`,{},()=>[I(S(F(a).title),1)])]),_:3})):O(``,!0),!F(a).description&&!i.description?(j(),H(F(X),{key:2})):i.content?(j(),H(F(X),{key:3},{default:A(()=>[z(e.$slots,`description`,{},()=>[I(S(F(a).description),1)])]),_:3})):O(``,!0)]),_:3})):O(``,!0),z(e.$slots,`content`,{close:c},()=>[i.header||F(a).title||i.title||F(a).description||i.description||F(a).close||i.close?(j(),l(`div`,{key:0,"data-slot":`header`,class:w(b.value.header({class:F(a).ui?.header}))},[z(e.$slots,`header`,{close:c},()=>[F(a).title||i.title||F(a).description||i.description?(j(),l(`div`,{key:0,"data-slot":`wrapper`,class:w(b.value.wrapper({class:F(a).ui?.wrapper}))},[F(a).title||i.title?(j(),H(F(Z),{key:0,"data-slot":`title`,class:w(b.value.title({class:F(a).ui?.title}))},{default:A(()=>[z(e.$slots,`title`,{},()=>[I(S(F(a).title),1)])]),_:3},8,[`class`])):O(``,!0),F(a).description||i.description?(j(),H(F(X),{key:1,"data-slot":`description`,class:w(b.value.description({class:F(a).ui?.description}))},{default:A(()=>[z(e.$slots,`description`,{},()=>[I(S(F(a).description),1)])]),_:3},8,[`class`])):O(``,!0)],2)):O(``,!0),z(e.$slots,`actions`),F(a).close||i.close?(j(),H(F(de),{key:1,"as-child":``},{default:A(()=>[z(e.$slots,`close`,{ui:b.value},()=>[F(a).close?(j(),H(ne,L({key:0,icon:F(a).closeIcon||F(d).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":F(s)(`slideover.close`)},typeof F(a).close==`object`?F(a).close:{},{"data-slot":`close`,class:b.value.close({class:F(a).ui?.close})}),null,16,[`icon`,`aria-label`,`class`])):O(``,!0)])]),_:2},1024)):O(``,!0)])],2)):O(``,!0),M(`div`,{"data-slot":`body`,class:w(b.value.body({class:F(a).ui?.body}))},[z(e.$slots,`body`,{close:c})],2),i.footer?(j(),l(`div`,{key:1,"data-slot":`footer`,class:w(b.value.footer({class:F(a).ui?.footer}))},[z(e.$slots,`footer`,{close:c})],2)):O(``,!0)])]),_:2},1040,[`data-side`,`class`])]),_:2},1024)]),_:2},1040,[`force-mount`])]),_:3},16))}};function Q(e){let t=V(`connecting`),n=e.factory(e.url);n.onopen=()=>{t.value===`connecting`&&!e.model.state.stopMode&&(t.value=`running`)};let r=0;return n.onmessage=t=>{let n;try{n=JSON.parse(t.data)}catch{return}if(n.type!==`replay_note`){let e=Number(t.lastEventId);if(e>0){if(e<=r)return;r=e}}e.handle(n)},n.addEventListener(`replay_elided`,t=>{let n=se(t);n&&e.model.noteElided(n)}),n.addEventListener(`finished`,n=>{e.onFinished?.(ce(n)),(t.value===`connecting`||t.value===`running`)&&(t.value=`finished`)}),n.addEventListener(`end`,r=>{e.model.flushPendingTurn(`the run ended here`),e.model.closePhases(),t.value=`ended`,n.close(),e.onEnd?.(q(r))}),n.onerror=()=>{n.readyState===2&&(t.value=`disconnected`,e.onDisconnected?.())},{phase:t,close:()=>n.close()}}var $=[`Thinking`,`Pondering`,`Mulling it over`,`Reasoning`,`Cogitating`,`Weighing options`,`Puzzling`,`Deliberating`,`Noodling`,`Chewing on it`,`Ruminating`,`Reticulating splines`];function Se(e){return $[Math.floor(Math.max(0,e)/6e3)%$.length]}var Ce=[`title`],we={class:`verb min-w-0 truncate text-toned`},Te=C({__name:`PendingTurnRow`,props:{verb:{},elapsedMs:{},slow:{type:Boolean},model:{},tag:{},id:{}},setup(e){return(t,n)=>(j(),H(p(e.tag??`li`),{id:e.id,class:`pending flex items-center gap-3 rounded-md border border-dashed border-accented pl-3 pr-[calc(var(--sb-gutter)-1px)] py-2 text-sm`,"aria-live":`off`,title:`the model is working on its next turn — nothing back yet (since the last event, runner clock)`,"data-testid":`pending`},{default:A(()=>[n[0]||=M(`span`,{class:`pulse text-[1.1em] leading-none text-info motion-safe:animate-pulse`},`∿`,-1),e.model?(j(),l(`span`,{key:0,class:`badge shrink-0 rounded bg-accented px-1.5 font-mono text-[0.68rem] font-medium leading-normal tracking-wider text-muted`,title:e.model},S(F(K)(e.model)),9,Ce)):O(``,!0),M(`span`,we,S(e.verb)+`…`,1),M(`span`,{class:w([`since ml-auto shrink-0 font-mono text-xs tabular-nums`,e.slow?`text-warn`:`text-dimmed`])},S(F(G)(e.elapsedMs,`clock`)),3)]),_:1},8,[`id`]))}});export{xe as i,Se as n,Q as r,Te as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-DAtHiuI6.js";import{An as t,Cn as n,Cr as r,Li as i,Mn as ee,Sn as te,Tr as ne,Xr as a,_r as o,bn as s,ji as c,kn as l,ln as u,o as d,xn as f,yn as p}from"./browser-B6T5hjfR.js";import{_ as m,a as re,c as ie,d as ae,g as oe,l as se,m as h,n as ce,o as g,s as le,u as ue,v as _}from"./main-Dkcbtu3u.js";import{t as v}from"./StatusDot-BOaw8le9.js";var de={class:`mt-4 first:mt-0`},fe={class:`w-full border-collapse font-mono text-[0.8125rem]`},pe={class:`border-t border-muted`},me={class:`px-2 py-1 align-top`},y={class:`ml-1.5 font-medium`},b={class:`border-t border-muted`},x={class:`break-all px-2 py-1 align-top`},S={key:0},C={key:1,class:`text-dimmed`},w={class:`border-t border-muted`},T={class:`break-all px-2 py-1 align-top`},E={key:0},D={key:1,class:`text-dimmed`},O={class:`border-t border-muted`},k={class:`break-all px-2 py-1 align-top`},A={key:0},j={key:1,class:`text-dimmed`},M={class:`border-t border-muted`},N={class:`break-all px-2 py-1 align-top`},P={key:0},F={key:1,class:`text-dimmed`},I={class:`border-t border-muted`},L={class:`break-all px-2 py-1 align-top`},R={key:1,class:`text-dimmed`},z={class:`mt-4`},he={class:`w-full border-collapse font-mono text-[0.8125rem]`},ge={class:`border-t border-muted`},_e={class:`break-all px-2 py-1 align-top`},ve=[`href`],ye={key:1},be={class:`border-t border-muted`},xe={class:`break-all px-2 py-1 align-top`},Se={class:`border-t border-muted`},Ce={class:`break-all px-2 py-1 align-top`},we=[`href`],Te={key:1},Ee={key:2,class:`text-dimmed`},De={class:`border-t border-muted`},Oe={class:`break-all px-2 py-1 align-top`},ke={key:0},Ae={key:1,class:`text-dimmed`},je={class:`border-t border-muted`},Me={class:`break-all px-2 py-1 align-top`},Ne={key:0},Pe={key:1,class:`text-dimmed`},Fe={class:`border-t border-muted`},Ie={class:`break-all px-2 py-1 align-top`},Le={key:0},Re={key:1,class:`text-dimmed`},ze={class:`mt-4`},Be={class:`w-full border-collapse font-mono text-[0.8125rem]`},Ve={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},He={class:`break-all px-2 py-1 align-top`},Ue={class:`w-full border-collapse font-mono text-[0.8125rem]`},We={class:`w-32 break-all px-2 py-1 align-top text-muted sm:w-96 sm:break-words`},Ge={class:`px-2 py-1 align-top`},Ke={key:1,class:`text-xs text-muted`},qe={class:`mt-4`},Je={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Ye={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},B={class:`break-all px-2 py-1 align-top`},Xe={key:0},Ze={key:1,class:`text-dimmed`},Qe={key:1,class:`text-xs text-muted`},$e={class:`mt-4`},et={class:`mb-1 text-xs text-muted`},tt={class:`overflow-x-auto`},nt={class:`w-full border-collapse font-mono text-[0.8125rem]`},rt={class:`break-all px-2 py-1 align-top`},it={key:0,class:`text-xs text-muted`},at={class:`break-all px-2 py-1 align-top`},ot=[`href`],st={key:1},ct={key:2,class:`text-dimmed`},lt={class:`break-all px-2 py-1 align-top`},ut={key:0},dt={key:1,class:`text-dimmed`},ft={key:2},pt={key:3,class:`text-dimmed`},mt={class:`break-all px-2 py-1 align-top`},ht={key:0},gt={key:1,class:`text-dimmed`},_t={key:2},vt={key:3,class:`text-dimmed`},yt={key:1,class:`text-xs text-muted`},bt={class:`mt-4`},xt={class:`w-full border-collapse font-mono text-[0.8125rem]`},St={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ct={class:`px-2 py-1 align-top`},wt={class:`mt-4`},Tt={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Et={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Dt={class:`break-all px-2 py-1 align-top`},Ot={class:`text-xs text-muted`},kt={key:1,class:`text-xs text-muted`},At={class:`mt-4`},jt={class:`w-full border-collapse font-mono text-[0.8125rem]`},Mt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Nt={class:`break-all px-2 py-1 align-top`},Pt={key:0},Ft={key:1,class:`text-dimmed`},It={class:`mt-4 text-xs text-muted`},Lt={class:`rounded bg-elevated px-1 py-0.5`},Rt={class:`rounded bg-elevated px-1 py-0.5`},zt={class:`rounded bg-elevated px-1 py-0.5`},V=ee({__name:`ResidentDetailPage`,setup(ee){let V=d(`resident`),H=p(()=>V?.record??{}),U=p(()=>ie(H.value)),W=p(()=>se(H.value)||(V?.slug??``)),G=p(()=>h(U.value.sha)),K=p(()=>ce.test(W.value)?`https://github.com/${W.value}`:void 0),q=p(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=p(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?g(e):void 0}),Bt=p(()=>g(U.value.schedules)),Y=p(()=>{let e=g(H.value.commands),t=g(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:h(e[n]),effect:h(t[n])||`readonly`}))}),X=p(()=>ae(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=p(()=>X.value.filter(e=>!e.evicted).length),Q=p(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=p(()=>le(H.value)),Vt=p(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Ht=p(()=>{let e=$.value;if(!e)return[];let t=re(e,Vt.value),n=n=>{let r=t.room[n];return r===null?_(e.parts,n)===null?`? (checkout not measured)`:`?`:`${r} more (${m(_(e.parts,n))} each)`};return[[`used / total`,oe(e)],[`free`,`${m(t.freeKiB)}${t.capped?` under the ${m(t.capacityKiB)} diskBudgetMb cap`:``}`],[`reserve`,`${m(t.reserve.totalKiB)} (snapshot staging ${m(t.reserve.stagingKiB)} + floor ${m(t.reserve.floorKiB)})`],[`headroom`,`${m(t.headroomKiB)} — room for ${n(`hardlink`)} hardlinked trees, ${n(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ut=p(()=>{let e=$.value;if(!e)return[];let t=[[`mirror`,m(e.parts.mirror)],[`checkout deps (node_modules)`,m(e.parts.deps)],[`checkout (history + tree + build)`,m(e.parts.checkout)]];for(let[n,r]of Object.entries(e.parts.threads).sort((e,t)=>t[1]-e[1]))t.push([`thread ${n}`,m(r)]);for(let[n,r]of Object.entries(e.parts.homes).sort((e,t)=>t[1]-e[1]))r>=1024&&t.push([`home ${n}`,m(r)]);return t.push([`other (image, /tmp, …)`,m(e.parts.other)]),t});return(ee,d)=>{let p=ne(`RouterLink`);return o(),f(e,{title:W.value||`Resident`,nav:`residents`},{leading:a(()=>[t(p,{class:`back text-sm text-muted no-underline hover:text-primary`,to:`/residents`},{default:a(()=>[...d[0]||=[l(`← All residents`,-1)]]),_:1})]),default:a(()=>[s(`section`,de,[d[8]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Lifecycle`,-1),s(`table`,fe,[s(`tbody`,null,[s(`tr`,pe,[d[1]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),s(`td`,me,[t(v,{tone:c(ue)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),s(`span`,y,i(U.value.state),1)])]),s(`tr`,b,[d[2]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),s(`td`,x,[U.value.reason?(o(),n(`span`,S,i(U.value.reason),1)):(o(),n(`span`,C,`—`))])]),s(`tr`,w,[d[3]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),s(`td`,T,[c(h)(U.value.lastRefreshError)?(o(),n(`span`,E,i(c(h)(U.value.lastRefreshError)),1)):(o(),n(`span`,D,`—`))])]),s(`tr`,O,[d[4]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),s(`td`,k,[Q.value?(o(),n(`span`,A,i(Q.value),1)):(o(),n(`span`,j,`—`))])]),s(`tr`,M,[d[5]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),s(`td`,N,[c(h)(U.value.updatedAt)?(o(),n(`span`,P,i(c(h)(U.value.updatedAt)),1)):(o(),n(`span`,F,`—`))])]),s(`tr`,I,[d[7]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),s(`td`,L,[c(h)(U.value.idleSince)?(o(),n(u,{key:0},[l(i(c(h)(U.value.idleSince))+` `,1),d[6]||=s(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(o(),n(`span`,R,`awake`))])])])])]),s(`section`,z,[d[15]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pinned facts`,-1),s(`table`,he,[s(`tbody`,null,[s(`tr`,ge,[d[9]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),s(`td`,_e,[K.value?(o(),n(`a`,{key:0,class:`text-primary`,href:K.value},i(K.value),9,ve)):(o(),n(`span`,ye,i(c(h)(H.value.resource)||`—`),1))])]),s(`tr`,be,[d[10]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),s(`td`,xe,i(c(h)(U.value.defaultRef)||c(h)(H.value.defaultRef)||`—`),1)]),s(`tr`,Se,[d[11]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),s(`td`,Ce,[q.value?(o(),n(`a`,{key:0,class:`text-primary`,href:q.value},i(G.value),9,we)):G.value?(o(),n(`span`,Te,i(G.value),1)):(o(),n(`span`,Ee,`—`))])]),s(`tr`,De,[d[12]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),s(`td`,Oe,[c(h)(U.value.lockfileHash)?(o(),n(`span`,ke,i(c(h)(U.value.lockfileHash)),1)):(o(),n(`span`,Ae,`—`))])]),s(`tr`,je,[d[13]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),s(`td`,Me,[c(h)(U.value.provisionedAt)?(o(),n(`span`,Ne,i(c(h)(U.value.provisionedAt)),1)):(o(),n(`span`,Pe,`—`))])]),s(`tr`,Fe,[d[14]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),s(`td`,Ie,[c(h)(U.value.lastRefreshAt)?(o(),n(`span`,Le,i(c(h)(U.value.lastRefreshAt)),1)):(o(),n(`span`,Re,`—`))])])])])]),s(`section`,ze,[d[17]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(o(),n(u,{key:0},[s(`table`,Be,[s(`tbody`,null,[(o(!0),n(u,null,r(Ht.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ve,i(e),1),s(`td`,He,i(t),1)]))),128))])]),d[16]||=s(`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),s(`table`,Ue,[s(`tbody`,null,[(o(!0),n(u,null,r(Ut.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,We,i(e),1),s(`td`,Ge,i(t),1)]))),128))])])],64)):(o(),n(`p`,Ke,` not measured yet — the first refresh cycle or attach of this container measures it `))]),s(`section`,qe,[d[18]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(o(),n(`table`,Je,[s(`tbody`,null,[(o(),n(u,null,r([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>s(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ye,i(e),1),s(`td`,B,[c(h)(J.value[e])?(o(),n(`span`,Xe,i(c(h)(J.value[e])),1)):(o(),n(`span`,Ze,`—`))])])),64))])])):(o(),n(`p`,Qe,`no snapshot recorded`))]),s(`section`,$e,[d[22]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(o(),n(u,{key:0},[s(`p`,et,i(Z.value)+` live · `+i(X.value.length-Z.value)+` evicted`,1),s(`div`,tt,[s(`table`,nt,[s(`tbody`,null,[d[21]||=s(`tr`,{class:`text-xs text-muted`},[s(`td`,{class:`px-2 py-1`},`thread`),s(`td`,{class:`px-2 py-1`},`ref · sha`),s(`td`,{class:`px-2 py-1`},`user · deps`),s(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(o(!0),n(u,null,r(X.value,e=>(o(),n(`tr`,{key:e.threadKey,class:`border-t border-muted`},[s(`td`,rt,[e.evicted?(o(),n(`span`,it,[l(`evicted `+i(e.evictedAt||`—`),1),e.evictedWhy?(o(),n(u,{key:0},[l(` · `+i(e.evictedWhy),1)],64)):te(``,!0)])):(o(),f(v,{key:1,tone:`green`,label:`live`,tip:`live`})),l(` `+i(e.threadKey),1)]),s(`td`,at,[l(i(e.ref)+` · `,1),e.commitHref?(o(),n(`a`,{key:0,class:`text-primary`,href:e.commitHref},i(e.sha),9,ot)):e.sha?(o(),n(`span`,st,i(e.sha),1)):(o(),n(`span`,ct,`—`))]),s(`td`,lt,[e.user?(o(),n(`span`,ut,i(e.user),1)):(o(),n(`span`,dt,`—`)),d[19]||=l(` · `,-1),e.deps?(o(),n(`span`,ft,i(e.deps),1)):(o(),n(`span`,pt,`—`))]),s(`td`,mt,[e.boundAt?(o(),n(`span`,ht,i(e.boundAt),1)):(o(),n(`span`,gt,`—`)),d[20]||=l(` · `,-1),e.lastAttachAt?(o(),n(`span`,_t,i(e.lastAttachAt),1)):(o(),n(`span`,vt,`—`))])]))),128))])])])],64)):(o(),n(`p`,yt,`no thread worktrees`))]),s(`section`,bt,[d[23]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pending schedules`,-1),s(`table`,xt,[s(`tbody`,null,[(o(),n(u,null,r([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>s(`tr`,{key:t,class:`border-t border-muted`},[s(`td`,St,i(e),1),s(`td`,Ct,i(c(h)(Bt.value[t]??0)||`0`),1)])),64))])])]),s(`section`,wt,[d[25]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(o(),n(`table`,Tt,[s(`tbody`,null,[(o(!0),n(u,null,r(Y.value,e=>(o(),n(`tr`,{key:e.name,class:`border-t border-muted`},[s(`td`,Et,i(e.name),1),s(`td`,Dt,[s(`code`,null,i(e.command),1),d[24]||=l(),s(`span`,Ot,i(e.effect),1)])]))),128))])])):(o(),n(`p`,kt,`no command table`))]),s(`section`,At,[d[26]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Registry settings`,-1),s(`table`,jt,[s(`tbody`,null,[(o(!0),n(u,null,r([[`onboarded`,c(h)(H.value.onboardedAt)],[`record updated`,c(h)(H.value.updatedAt)],[`provisioning timeout (ms)`,c(h)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,c(h)(H.value.diskBudgetMb)],[`worktree TTL (days)`,c(h)(H.value.worktreeTtlDays??7)]],([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Mt,i(e),1),s(`td`,Nt,[t?(o(),n(`span`,Pt,i(t),1)):(o(),n(`span`,Ft,`—`))])]))),128))])])]),s(`p`,It,[d[27]||=l(` Manage from chat: `,-1),s(`code`,Lt,`repo rebuild `+i(W.value),1),d[28]||=l(` · `,-1),s(`code`,Rt,`repo reconfigure `+i(W.value)+` …`,1),d[29]||=l(` · `,-1),s(`code`,zt,`repo offboard `+i(W.value)+` --dry-run`,1)])]),_:1},8,[`title`])}}});export{V as default};
|
|
1
|
+
import{t as e}from"./AppShell-DAtHiuI6.js";import{An as t,Cn as n,Cr as r,Li as i,Mn as ee,Sn as te,Tr as ne,Xr as a,_r as o,bn as s,ji as c,kn as l,ln as u,o as d,xn as f,yn as p}from"./browser-B6T5hjfR.js";import{_ as m,a as re,c as ie,d as ae,g as oe,l as se,m as h,n as ce,o as g,s as le,u as ue,v as _}from"./main-5Gm_1Gv8.js";import{t as v}from"./StatusDot-CAfS1AUi.js";var de={class:`mt-4 first:mt-0`},fe={class:`w-full border-collapse font-mono text-[0.8125rem]`},pe={class:`border-t border-muted`},me={class:`px-2 py-1 align-top`},y={class:`ml-1.5 font-medium`},b={class:`border-t border-muted`},x={class:`break-all px-2 py-1 align-top`},S={key:0},C={key:1,class:`text-dimmed`},w={class:`border-t border-muted`},T={class:`break-all px-2 py-1 align-top`},E={key:0},D={key:1,class:`text-dimmed`},O={class:`border-t border-muted`},k={class:`break-all px-2 py-1 align-top`},A={key:0},j={key:1,class:`text-dimmed`},M={class:`border-t border-muted`},N={class:`break-all px-2 py-1 align-top`},P={key:0},F={key:1,class:`text-dimmed`},I={class:`border-t border-muted`},L={class:`break-all px-2 py-1 align-top`},R={key:1,class:`text-dimmed`},z={class:`mt-4`},he={class:`w-full border-collapse font-mono text-[0.8125rem]`},ge={class:`border-t border-muted`},_e={class:`break-all px-2 py-1 align-top`},ve=[`href`],ye={key:1},be={class:`border-t border-muted`},xe={class:`break-all px-2 py-1 align-top`},Se={class:`border-t border-muted`},Ce={class:`break-all px-2 py-1 align-top`},we=[`href`],Te={key:1},Ee={key:2,class:`text-dimmed`},De={class:`border-t border-muted`},Oe={class:`break-all px-2 py-1 align-top`},ke={key:0},Ae={key:1,class:`text-dimmed`},je={class:`border-t border-muted`},Me={class:`break-all px-2 py-1 align-top`},Ne={key:0},Pe={key:1,class:`text-dimmed`},Fe={class:`border-t border-muted`},Ie={class:`break-all px-2 py-1 align-top`},Le={key:0},Re={key:1,class:`text-dimmed`},ze={class:`mt-4`},Be={class:`w-full border-collapse font-mono text-[0.8125rem]`},Ve={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},He={class:`break-all px-2 py-1 align-top`},Ue={class:`w-full border-collapse font-mono text-[0.8125rem]`},We={class:`w-32 break-all px-2 py-1 align-top text-muted sm:w-96 sm:break-words`},Ge={class:`px-2 py-1 align-top`},Ke={key:1,class:`text-xs text-muted`},qe={class:`mt-4`},Je={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Ye={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},B={class:`break-all px-2 py-1 align-top`},Xe={key:0},Ze={key:1,class:`text-dimmed`},Qe={key:1,class:`text-xs text-muted`},$e={class:`mt-4`},et={class:`mb-1 text-xs text-muted`},tt={class:`overflow-x-auto`},nt={class:`w-full border-collapse font-mono text-[0.8125rem]`},rt={class:`break-all px-2 py-1 align-top`},it={key:0,class:`text-xs text-muted`},at={class:`break-all px-2 py-1 align-top`},ot=[`href`],st={key:1},ct={key:2,class:`text-dimmed`},lt={class:`break-all px-2 py-1 align-top`},ut={key:0},dt={key:1,class:`text-dimmed`},ft={key:2},pt={key:3,class:`text-dimmed`},mt={class:`break-all px-2 py-1 align-top`},ht={key:0},gt={key:1,class:`text-dimmed`},_t={key:2},vt={key:3,class:`text-dimmed`},yt={key:1,class:`text-xs text-muted`},bt={class:`mt-4`},xt={class:`w-full border-collapse font-mono text-[0.8125rem]`},St={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ct={class:`px-2 py-1 align-top`},wt={class:`mt-4`},Tt={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Et={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Dt={class:`break-all px-2 py-1 align-top`},Ot={class:`text-xs text-muted`},kt={key:1,class:`text-xs text-muted`},At={class:`mt-4`},jt={class:`w-full border-collapse font-mono text-[0.8125rem]`},Mt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Nt={class:`break-all px-2 py-1 align-top`},Pt={key:0},Ft={key:1,class:`text-dimmed`},It={class:`mt-4 text-xs text-muted`},Lt={class:`rounded bg-elevated px-1 py-0.5`},Rt={class:`rounded bg-elevated px-1 py-0.5`},zt={class:`rounded bg-elevated px-1 py-0.5`},V=ee({__name:`ResidentDetailPage`,setup(ee){let V=d(`resident`),H=p(()=>V?.record??{}),U=p(()=>ie(H.value)),W=p(()=>se(H.value)||(V?.slug??``)),G=p(()=>h(U.value.sha)),K=p(()=>ce.test(W.value)?`https://github.com/${W.value}`:void 0),q=p(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=p(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?g(e):void 0}),Bt=p(()=>g(U.value.schedules)),Y=p(()=>{let e=g(H.value.commands),t=g(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:h(e[n]),effect:h(t[n])||`readonly`}))}),X=p(()=>ae(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=p(()=>X.value.filter(e=>!e.evicted).length),Q=p(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=p(()=>le(H.value)),Vt=p(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Ht=p(()=>{let e=$.value;if(!e)return[];let t=re(e,Vt.value),n=n=>{let r=t.room[n];return r===null?_(e.parts,n)===null?`? (checkout not measured)`:`?`:`${r} more (${m(_(e.parts,n))} each)`};return[[`used / total`,oe(e)],[`free`,`${m(t.freeKiB)}${t.capped?` under the ${m(t.capacityKiB)} diskBudgetMb cap`:``}`],[`reserve`,`${m(t.reserve.totalKiB)} (snapshot staging ${m(t.reserve.stagingKiB)} + floor ${m(t.reserve.floorKiB)})`],[`headroom`,`${m(t.headroomKiB)} — room for ${n(`hardlink`)} hardlinked trees, ${n(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ut=p(()=>{let e=$.value;if(!e)return[];let t=[[`mirror`,m(e.parts.mirror)],[`checkout deps (node_modules)`,m(e.parts.deps)],[`checkout (history + tree + build)`,m(e.parts.checkout)]];for(let[n,r]of Object.entries(e.parts.threads).sort((e,t)=>t[1]-e[1]))t.push([`thread ${n}`,m(r)]);for(let[n,r]of Object.entries(e.parts.homes).sort((e,t)=>t[1]-e[1]))r>=1024&&t.push([`home ${n}`,m(r)]);return t.push([`other (image, /tmp, …)`,m(e.parts.other)]),t});return(ee,d)=>{let p=ne(`RouterLink`);return o(),f(e,{title:W.value||`Resident`,nav:`residents`},{leading:a(()=>[t(p,{class:`back text-sm text-muted no-underline hover:text-primary`,to:`/residents`},{default:a(()=>[...d[0]||=[l(`← All residents`,-1)]]),_:1})]),default:a(()=>[s(`section`,de,[d[8]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Lifecycle`,-1),s(`table`,fe,[s(`tbody`,null,[s(`tr`,pe,[d[1]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),s(`td`,me,[t(v,{tone:c(ue)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),s(`span`,y,i(U.value.state),1)])]),s(`tr`,b,[d[2]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),s(`td`,x,[U.value.reason?(o(),n(`span`,S,i(U.value.reason),1)):(o(),n(`span`,C,`—`))])]),s(`tr`,w,[d[3]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),s(`td`,T,[c(h)(U.value.lastRefreshError)?(o(),n(`span`,E,i(c(h)(U.value.lastRefreshError)),1)):(o(),n(`span`,D,`—`))])]),s(`tr`,O,[d[4]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),s(`td`,k,[Q.value?(o(),n(`span`,A,i(Q.value),1)):(o(),n(`span`,j,`—`))])]),s(`tr`,M,[d[5]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),s(`td`,N,[c(h)(U.value.updatedAt)?(o(),n(`span`,P,i(c(h)(U.value.updatedAt)),1)):(o(),n(`span`,F,`—`))])]),s(`tr`,I,[d[7]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),s(`td`,L,[c(h)(U.value.idleSince)?(o(),n(u,{key:0},[l(i(c(h)(U.value.idleSince))+` `,1),d[6]||=s(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(o(),n(`span`,R,`awake`))])])])])]),s(`section`,z,[d[15]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pinned facts`,-1),s(`table`,he,[s(`tbody`,null,[s(`tr`,ge,[d[9]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),s(`td`,_e,[K.value?(o(),n(`a`,{key:0,class:`text-primary`,href:K.value},i(K.value),9,ve)):(o(),n(`span`,ye,i(c(h)(H.value.resource)||`—`),1))])]),s(`tr`,be,[d[10]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),s(`td`,xe,i(c(h)(U.value.defaultRef)||c(h)(H.value.defaultRef)||`—`),1)]),s(`tr`,Se,[d[11]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),s(`td`,Ce,[q.value?(o(),n(`a`,{key:0,class:`text-primary`,href:q.value},i(G.value),9,we)):G.value?(o(),n(`span`,Te,i(G.value),1)):(o(),n(`span`,Ee,`—`))])]),s(`tr`,De,[d[12]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),s(`td`,Oe,[c(h)(U.value.lockfileHash)?(o(),n(`span`,ke,i(c(h)(U.value.lockfileHash)),1)):(o(),n(`span`,Ae,`—`))])]),s(`tr`,je,[d[13]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),s(`td`,Me,[c(h)(U.value.provisionedAt)?(o(),n(`span`,Ne,i(c(h)(U.value.provisionedAt)),1)):(o(),n(`span`,Pe,`—`))])]),s(`tr`,Fe,[d[14]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),s(`td`,Ie,[c(h)(U.value.lastRefreshAt)?(o(),n(`span`,Le,i(c(h)(U.value.lastRefreshAt)),1)):(o(),n(`span`,Re,`—`))])])])])]),s(`section`,ze,[d[17]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(o(),n(u,{key:0},[s(`table`,Be,[s(`tbody`,null,[(o(!0),n(u,null,r(Ht.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ve,i(e),1),s(`td`,He,i(t),1)]))),128))])]),d[16]||=s(`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),s(`table`,Ue,[s(`tbody`,null,[(o(!0),n(u,null,r(Ut.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,We,i(e),1),s(`td`,Ge,i(t),1)]))),128))])])],64)):(o(),n(`p`,Ke,` not measured yet — the first refresh cycle or attach of this container measures it `))]),s(`section`,qe,[d[18]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(o(),n(`table`,Je,[s(`tbody`,null,[(o(),n(u,null,r([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>s(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ye,i(e),1),s(`td`,B,[c(h)(J.value[e])?(o(),n(`span`,Xe,i(c(h)(J.value[e])),1)):(o(),n(`span`,Ze,`—`))])])),64))])])):(o(),n(`p`,Qe,`no snapshot recorded`))]),s(`section`,$e,[d[22]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(o(),n(u,{key:0},[s(`p`,et,i(Z.value)+` live · `+i(X.value.length-Z.value)+` evicted`,1),s(`div`,tt,[s(`table`,nt,[s(`tbody`,null,[d[21]||=s(`tr`,{class:`text-xs text-muted`},[s(`td`,{class:`px-2 py-1`},`thread`),s(`td`,{class:`px-2 py-1`},`ref · sha`),s(`td`,{class:`px-2 py-1`},`user · deps`),s(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(o(!0),n(u,null,r(X.value,e=>(o(),n(`tr`,{key:e.threadKey,class:`border-t border-muted`},[s(`td`,rt,[e.evicted?(o(),n(`span`,it,[l(`evicted `+i(e.evictedAt||`—`),1),e.evictedWhy?(o(),n(u,{key:0},[l(` · `+i(e.evictedWhy),1)],64)):te(``,!0)])):(o(),f(v,{key:1,tone:`green`,label:`live`,tip:`live`})),l(` `+i(e.threadKey),1)]),s(`td`,at,[l(i(e.ref)+` · `,1),e.commitHref?(o(),n(`a`,{key:0,class:`text-primary`,href:e.commitHref},i(e.sha),9,ot)):e.sha?(o(),n(`span`,st,i(e.sha),1)):(o(),n(`span`,ct,`—`))]),s(`td`,lt,[e.user?(o(),n(`span`,ut,i(e.user),1)):(o(),n(`span`,dt,`—`)),d[19]||=l(` · `,-1),e.deps?(o(),n(`span`,ft,i(e.deps),1)):(o(),n(`span`,pt,`—`))]),s(`td`,mt,[e.boundAt?(o(),n(`span`,ht,i(e.boundAt),1)):(o(),n(`span`,gt,`—`)),d[20]||=l(` · `,-1),e.lastAttachAt?(o(),n(`span`,_t,i(e.lastAttachAt),1)):(o(),n(`span`,vt,`—`))])]))),128))])])])],64)):(o(),n(`p`,yt,`no thread worktrees`))]),s(`section`,bt,[d[23]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pending schedules`,-1),s(`table`,xt,[s(`tbody`,null,[(o(),n(u,null,r([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>s(`tr`,{key:t,class:`border-t border-muted`},[s(`td`,St,i(e),1),s(`td`,Ct,i(c(h)(Bt.value[t]??0)||`0`),1)])),64))])])]),s(`section`,wt,[d[25]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(o(),n(`table`,Tt,[s(`tbody`,null,[(o(!0),n(u,null,r(Y.value,e=>(o(),n(`tr`,{key:e.name,class:`border-t border-muted`},[s(`td`,Et,i(e.name),1),s(`td`,Dt,[s(`code`,null,i(e.command),1),d[24]||=l(),s(`span`,Ot,i(e.effect),1)])]))),128))])])):(o(),n(`p`,kt,`no command table`))]),s(`section`,At,[d[26]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Registry settings`,-1),s(`table`,jt,[s(`tbody`,null,[(o(!0),n(u,null,r([[`onboarded`,c(h)(H.value.onboardedAt)],[`record updated`,c(h)(H.value.updatedAt)],[`provisioning timeout (ms)`,c(h)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,c(h)(H.value.diskBudgetMb)],[`worktree TTL (days)`,c(h)(H.value.worktreeTtlDays??7)]],([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Mt,i(e),1),s(`td`,Nt,[t?(o(),n(`span`,Pt,i(t),1)):(o(),n(`span`,Ft,`—`))])]))),128))])])]),s(`p`,It,[d[27]||=l(` Manage from chat: `,-1),s(`code`,Lt,`repo rebuild `+i(W.value),1),d[28]||=l(` · `,-1),s(`code`,Rt,`repo reconfigure `+i(W.value)+` …`,1),d[29]||=l(` · `,-1),s(`code`,zt,`repo offboard `+i(W.value)+` --dry-run`,1)])]),_:1},8,[`title`])}}});export{V as default};
|