@wrongstack/webui-hq 0.289.0 → 0.291.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/{alerts-Nd3-2kbb.js → alerts-Coy0VQOD.js} +1 -1
- package/dist/assets/brain-B4Tdewfy.js +1 -0
- package/dist/assets/cockpit-CZa8Ik0r.js +1 -0
- package/dist/assets/control-BRj__LMC.js +1 -0
- package/dist/assets/{cost-DtYd1WXA.js → cost-C4nlUQAz.js} +1 -1
- package/dist/assets/fleet-map-VOzbj36e.js +7 -0
- package/dist/assets/{fleet-topology-B3uTvH1s.js → fleet-topology-CHOsHZc9.js} +7 -7
- package/dist/assets/icons-BlGYTg3M.js +1 -0
- package/dist/assets/index-Ckam6WOR.js +2 -0
- package/dist/assets/index-G4pDhbF0.css +1 -0
- package/dist/assets/live-console-CGxRZ15o.js +1 -0
- package/dist/assets/mailbox-B3ZDFEyg.js +1 -0
- package/dist/assets/markdown-Dm2qU66U.js +35 -0
- package/dist/assets/settings-BncyJ7aj.js +1 -0
- package/dist/assets/{trends-p7bdJFIi.js → trends-C6j-auPf.js} +1 -1
- package/dist/assets/{use-backfilled-events-BGr4w2qq.js → use-backfilled-events-BnFvycsd.js} +1 -1
- package/dist/assets/{vendor-DIU0H2e8.js → vendor-BoaR8QxN.js} +1 -1
- package/dist/assets/worktree-BXf7yQRK.js +1 -0
- package/dist/index.html +6 -5
- package/dist/wrongstack.svg +6 -0
- package/package.json +12 -12
- package/dist/assets/brain-BnkIw8nW.js +0 -1
- package/dist/assets/cockpit-DIEoqkG7.js +0 -1
- package/dist/assets/control-6Aw5wcrt.js +0 -1
- package/dist/assets/fleet-map-DhxF-gdt.js +0 -7
- package/dist/assets/icons-9m5clYwH.js +0 -1
- package/dist/assets/index-Cd7L2eHB.css +0 -1
- package/dist/assets/index-v8d2cF2E.js +0 -2
- package/dist/assets/live-console-BMEdzPs2.js +0 -1
- package/dist/assets/mailbox-BPdImpld.js +0 -1
- package/dist/assets/markdown-Cq9pnQX9.js +0 -35
- package/dist/assets/worktree-B9isI17f.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Sans Variable;font-style:normal;font-display:swap;font-weight:100 700;src:url(/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Manrope Variable;font-style:normal;font-display:swap;font-weight:200 800;src:url(data:font/woff2;base64,d09GMgABAAAAAAn4ABMAAAAAEwQAAAmOAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGjQbgnQcLj9IVkFSgQEGYD9TVEFUgQIAgQovahEICok0h0ULIAAwhzoBNgIkAzwEIAWHJgeBDgwHG6QQUdRKTmoBFD8K42bniObKrG3LZFcMWZzFmrjTFhQ6TVTqPJcInrfrvzq3b2PGn1wwMiNYGTy9ViREYARlL1zAGcPdPqBt3gNWrfKthv4xnM+b9caw+wmjgEUVRjHXhS6jgCK6zf5HiWQacJpGdAgdrbV6g/Rf1BfxRqZVQnrxRVWSJb6RLFnyu0elilmjeoSQCKnxsmwLaddUMjnksriSYuuPl06EAl7KfAiWQjCUETz0zNZ3EII94CDQtzkMfZ/9IkkY8tZRZTDky5ZVwBAM+GYpdd4ZVAWYImnLkiTg48l79gGx3D+VBtLeyg8u7bJAd4uo0pFuQBFysE9C95l0W4Fkiao6GfrDbu77lVU7wk9cV3uqOsXmQiMkhVKl1ugjzUAJBSIkkVWHijkpkVSyUFsgVBuJMA0N+ZnXtyUv5yMigGdfQRmwL1AAjQ3YXG6iIFNSUdPQo8+AISPGAltBMDQRAtyf4ZspLlZkpyOVoMZPvFGWzvk8p5SUC/NWPMj6T2/Yas2EdlON5GkfdkeFwVGjta825H89NIenlLWAPAp5h1KDtRhCaAQWMsFKtEvOKpIhgLHlXPARokkgEGEOAkqxJRQpKYq4ezahIiLHP6hZpqMbV0pUF2vdvEimLEQ/iIUYLgYWs0VXGVlLTOPdaPmFfCC/XrtzqVo1ez7vz6+Kd2+7o11ZJ+4MreLbB5BKVGxobAq4jZYalZ5aX2CKJiwUuc9GNJyi4M8bGyKcdjSRrG4JohdF8buJfmQefbYYREnMFsOoiNliFDVxmRgL0XUmUMLqzW0A4gCQAhWGYCQpFNukwXhIkPMsbRI19ewtw8Cp2Wj/Ro5cM2OTAbJAvZ/L4opBXb9+UHscYuOKM/W8isgwN26Exexjizmfnlp9dE3hOSqdZ/F5QqbckIlPb+oKfXxd6hftJ7Sm/uyPYpONza84CRlMNk/uhOrLpyf53982++zRkXNu3g3VF8qFbx1+7fbHZ9DrB3VXWNSmhnT2vrwS1+1Z+kHGBaZIhnnvuLBTNDeA340D1DWu5/jEa9pVfl6+Jij+yo3EELNixXCLjr173Q5eDP7Y7/L4iQFHbjpaJLFoP4cCsYP6sAPL7gMHNg53yYjqxqTDrYqLDl5DzW/eTLjYxCvucprjI3yl2ykKowKUC2Ox2FJLFo6Fa1HBWLC2jMCIIBEmklkYhmkpmBhTm/LCvJAH5oGcMKcgFEP1xUdho8ANPa6RFD99/PN60fjj9eXy2Eex4B5MpmRapXidzFk1p4uLk3+hn6jAP9ovJcXPPwk8o/0ltizbdbnTprvx4PSxT0VZ3Xc772aN7RflgbXRYwc3hLNO+k878nxGwfuVM8m8Gs7WEoVGWLHwSpx4vNSHBCMNqJ4m15Kp/TfHHVkQd++eY7PGN4W5byTs+6Ft8Ozvb/D60btv37de8ER0mS3P/0sLW84qGjEVkwztPzz06eGUWwKLwPb0D/WFd3vltl2aP276KpM0JNz6AfnAnZ5ADlF2zVyZ2OkxHSMxWPMnSZLbbDR3F1UjPVqp4d68da13F1YZujdWw7271iecO2l9+/4p47Oztjck355/75wFOI+VdGDqbNGs+ISgxg3iB2jb2r+b0CWsNLHIM4sdv8SDSFBP/Oromz6FNCWw2iMTxV0R8QLyBTkpe0j5+pSSJOOTB5Mck/gh3IopuNQnhKj02t3FL80gGbEh89SZcwTxcYt5cZT/nMnB3uXfPy8BSpVMBuRx+ZhACGzDBmwHsJRAjhotOnzuj2wDz3ug2wOUAY2NgZln9/TK/enG/oE4rO1wxvGUFMAxsZ0qNjRC7hl9d17e7imbgDt6uJXhUobDg7v3RX/yRCKxgMhfyiKcZfbpk0wmCcdQlIAOHeakXLvCNt++WfKiozNqSZxxJotn+c0a7DdPsx7DPYgKIDxwwYUZDg9aJbxocTjcwovr9WAsVV32mQoiiIOCHc60Oltst9qCQYuCqN1yHo0Kj60OgI2OqmiuBUWrNA0NDhYCDcdpmMrs1fZZ0xdTzMr1HdPtIHstYhqaPDDA5YxUDx7J4fJiisBSDI/L6G/bn34GNy8Q2g044ZTulAdFLb0tI6NNxfj3DzLjWiNGxje1pz7aXOcNV68lDPEd2SXl6VfBuwmHzdf1gxFy1HvA7pD8I2BnnmyGw852Cg5XbgIdEEGE5UCzen5jTlG6JCU5iajlxVcsXvbcS0SAcg1dcesWJLVK8+hYHOYQ+Pjy+EyVGXP0aPTFagrV9E03hCQvYx+g47KGq+1GsLj8uBIyihNw33YUe8PNC4BOJ3Lm1AglLV3nCuvUdIP+v15tVGbWIwgxLVpPkfpthCGpTKG+oA/DQfsKKvxhScqaN6FuElAUtTKv2UYgOmQegsN/n7njHUju8wM4VTcm+Q8xfX9SFwjTzdVqu95UOWSIGOabH8OGBEba//8Yxl3GcPdP/dMBOoSX/0z5SZmBoLbaPs+9asaMpb36yknKaw6FqWZa6A5vDa02mhkOba1q6KtLV208xrkwmW5C4VD6n2fvRjADy2qDYYnNy+H10Fq0LMbNzS863gkO7iQ8eC48/Ny5m59tOcEso3u7Qg3yrqDL6eKXwJAuWnhylfbWrRObe66rzX59+XDtzusnL66dI/86ArmtLlzED860Ef3bFPV78OX/zFTA11fcBn2Vntb7qiGBSgLBHyuv/uEaqqoTgSpOyjlzh86me1Vriv7i9rLPLvtghWmSnblRbAsBJL/4dScSQTBxOivHMO5QvBBY0iheJvfwWLxLOGzYKZyM4zVc2Cll46zEpeUV4MqGEWZj22SdOxhGAjgs9AEnfT+RoiMfcDb0GS5NncKVxju4Nt/mRk13O9Gz3FLct5oCD6wkwUNrCfHIUg6SMf8LwQGyVaBUqpLPW5BaMpRshEpl8nS1qw5dgnzlik8QBXmdy5UrIH74heTKZKMSilQso4hsRiGraQZRzxpNGqlEJMsXuAU7GlcR8mWSykUpVkWGyIf0a8v4qEQp5CtGsMiZa+4ESYQy+WilCiguHzxMXO54ogShooTV2bj2z1zL6DYSoImoQ8lFUWxMLBNQQgLkV2tHYgUoIbkuREz+fJHKxxWBcnvu3KQppFCxLkguB1NyVSp/TknRvNwYlCdbblWu3ze6owHdWluhE5tgQ6ej2SV65CijijoaRfSiH4Nqz1OpfEW+WeI/oU0ly60zkV9YzOQSYtZVEGYmrysTZAJkY4qZtIBD9/LYTIK7Nww3vMiYBwA=)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Manrope Variable;font-style:normal;font-display:swap;font-weight:200 800;src:url(/assets/manrope-cyrillic-wght-normal-Dvxsihut.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:Manrope Variable;font-style:normal;font-display:swap;font-weight:200 800;src:url(/assets/manrope-greek-wght-normal-DL7QRZyv.woff2)format("woff2-variations");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:Manrope Variable;font-style:normal;font-display:swap;font-weight:200 800;src:url(/assets/manrope-vietnamese-wght-normal-usUDDRr7.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Manrope Variable;font-style:normal;font-display:swap;font-weight:200 800;src:url(/assets/manrope-latin-ext-wght-normal-Ch3YOpNY.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Manrope Variable;font-style:normal;font-display:swap;font-weight:200 800;src:url(/assets/manrope-latin-wght-normal-DHIcAJRg.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Space Grotesk Variable;font-style:normal;font-display:swap;font-weight:300 700;src:url(/assets/space-grotesk-vietnamese-wght-normal-D0rl6rjA.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Space Grotesk Variable;font-style:normal;font-display:swap;font-weight:300 700;src:url(/assets/space-grotesk-latin-ext-wght-normal-D9tNdqV9.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Space Grotesk Variable;font-style:normal;font-display:swap;font-weight:300 700;src:url(/assets/space-grotesk-latin-wght-normal-BhU9QXUp.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2)format("woff2"),url(/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff)format("woff");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2)format("woff2"),url(/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff)format("woff");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2)format("woff2"),url(/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff)format("woff");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2)format("woff2"),url(/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff)format("woff");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2)format("woff2"),url(/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff)format("woff");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}:root{color-scheme:dark;--bg:#1b1c1a;--bg2:#1f201d;--panel:#22231f;--panel2:#292a26;--inset:#1b1c1a;--border:#3b3c36;--border2:#515249;--text:#f5f2e9;--bright:#fffdf8;--muted:#b6b2a8;--dim:#858178;--primary:#fe2e5f;--primary-dim:#b91640;--cyan:var(--primary);--green:#2ac075;--amber:#fd9f02;--red:#df4949;--purple:#a685f4;--accent:var(--amber);--chart-1:#fe2e5f;--chart-2:#fd9f02;--chart-3:#22c77a;--fg:var(--text);--surface:var(--panel);--danger:var(--red);--ring:var(--primary);--radius:0;--radius-sm:0;--font-sans:"Manrope Variable", "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;--font-display:"Space Grotesk Variable", "Space Grotesk", "Manrope Variable", system-ui, sans-serif;--font-mono:"IBM Plex Mono", "JetBrains Mono", Consolas, "Cascadia Mono", monospace;--shadow:0 1px 2px #12121080, 0 4px 16px #12121059}:root[data-hq-theme=light]{color-scheme:light;--bg:#f4f1e8;--bg2:#ebe7dc;--panel:#fffdf7;--panel2:#f1ede2;--inset:#e7e2d6;--border:#d1cabd;--border2:#9d9587;--text:#373832;--bright:#171814;--muted:#62635b;--dim:#76766e;--primary:#d91848;--primary-dim:#b91640;--cyan:var(--primary);--green:#18864f;--amber:#b76500;--red:#c02626;--purple:#5f37be;--accent:var(--amber);--chart-1:#d91848;--chart-2:#b76500;--chart-3:#16844e;--shadow:0 1px 2px #403a2e1f, 0 8px 24px #403a2e1f}*,:before,:after{box-sizing:border-box;border-radius:0!important}html,body,#root{height:100%;margin:0}body{font-family:var(--font-sans);background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;letter-spacing:-.012em;font-size:13.5px;line-height:1.5;overflow:hidden}h1,h2,h3,h4{font-family:var(--font-display);letter-spacing:-.02em}button,input,select,textarea{font:inherit}button{color:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--primary);outline-offset:1px}::selection{background:#fe2e5f4d}a{color:var(--primary)}.hq-app{background:var(--bg);grid-template-columns:auto minmax(0,1fr);height:100vh;display:grid;overflow:hidden}.hq-sidebar-scrim{display:none}.hq-secondary-nav{z-index:20;border-right:1px solid var(--border);background:var(--bg2);flex-direction:column;width:232px;min-width:0;min-height:0;transition:width .15s;display:flex;position:relative;overflow:hidden}.hq-secondary-nav[data-open=false]{border-right-width:0;width:0}.hq-secondary-header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:flex-start;gap:10px;width:232px;min-height:70px;padding:12px 10px 10px 14px;display:flex}.hq-secondary-header>div{flex-direction:column;min-width:0;display:flex}.hq-secondary-header strong,.hq-brand{color:var(--bright);font-family:var(--font-display);letter-spacing:-.02em;white-space:nowrap;font-size:15px;font-weight:650}.hq-secondary-eyebrow{color:var(--primary);letter-spacing:.14em;text-transform:uppercase;white-space:nowrap;font-size:9px;font-weight:700}.hq-icon-button{border:1px solid var(--border);background:var(--inset);width:30px;height:30px;color:var(--muted);cursor:pointer;flex:0 0 30px;place-items:center;display:inline-grid}.hq-icon-button:hover{border-color:var(--border2);background:var(--panel2);color:var(--bright)}.hq-secondary-scroll{scrollbar-color:var(--border2) transparent;scrollbar-width:thin;flex:1;width:232px;min-height:0;padding:10px 8px 14px;overflow-y:auto}.hq-nav-group+.hq-nav-group{margin-top:14px}.hq-nav-group-label{color:var(--dim);letter-spacing:.14em;text-transform:uppercase;padding:0 6px 5px;font-size:9px;font-weight:700}.hq-nav-item{width:100%;min-height:34px;color:var(--muted);cursor:pointer;text-align:left;background:0 0;border:1px solid #0000;grid-template-columns:18px minmax(0,1fr) auto auto;align-items:center;gap:7px;padding:5px 7px;display:grid}.hq-nav-item:hover{border-color:var(--border);background:var(--panel);color:var(--bright)}.hq-nav-item[data-active=true]{color:var(--bright);background:#fe2e5f1a;border-color:#fe2e5f73}.hq-nav-item[data-active=true]>svg{color:var(--primary)}.hq-nav-item>span:first-of-type{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;font-weight:600;overflow:hidden}.hq-nav-item kbd{color:var(--dim);font-family:var(--font-mono);font-size:8px}.hq-nav-badge{background:var(--amber);color:#171714;min-width:17px;font-family:var(--font-mono);text-align:center;padding:0 4px;font-size:9px;font-weight:700;line-height:16px}.hq-secondary-footer{border-top:1px solid var(--border);width:232px;padding:10px 12px}.hq-link-state{align-items:center;gap:8px;display:flex}.hq-link-dot{background:var(--red);flex:0 0 7px;width:7px;height:7px}.hq-link-state[data-live=true] .hq-link-dot{background:var(--green)}.hq-link-state>div{flex-direction:column;min-width:0;display:flex}.hq-link-state strong{color:var(--text);font-size:10px}.hq-link-state span{color:var(--dim);font-family:var(--font-mono);font-size:8px}.hq-build-label{color:var(--dim);font-family:var(--font-mono);margin-top:7px;font-size:8px;display:block}.hq-workbench{flex-direction:column;min-width:0;min-height:0;display:flex}.hq-header{z-index:10;border-bottom:1px solid var(--border);background:var(--panel);align-items:center;gap:10px;min-height:70px;padding:9px 14px;display:flex;position:relative}.hq-sidebar-toggle{display:inline-grid}.hq-view-icon{border:1px solid var(--border);background:var(--bg2);width:34px;height:34px;color:var(--primary);flex:0 0 34px;place-items:center;display:grid}.hq-view-identity{gap:0;min-width:190px;display:grid}.hq-view-identity>span{color:var(--primary);letter-spacing:.14em;text-transform:uppercase;font-size:8px;font-weight:700}.hq-view-identity h1{color:var(--bright);margin:0;font-size:15px;font-weight:650;line-height:1.2}.hq-view-identity p{max-width:350px;color:var(--dim);text-overflow:ellipsis;white-space:nowrap;margin:2px 0 0;font-size:10px;overflow:hidden}.hq-top-metrics{border:1px solid var(--border);align-items:stretch;gap:0;min-width:0;margin-left:auto;display:flex}.hq-top-metric{border-right:1px solid var(--border);background:var(--inset);grid-template-columns:auto 1fr;align-content:center;gap:0 5px;min-width:88px;padding:6px 10px;display:grid}.hq-top-metric:last-child{border-right:0}.hq-top-metric svg{color:var(--dim);grid-row:1/span 2;align-self:center}.hq-top-metric>span{color:var(--dim);letter-spacing:.08em;text-transform:uppercase;font-size:8px;font-weight:700;line-height:1.1}.hq-top-metric>strong{color:var(--bright);font-family:var(--font-mono);font-size:13px;line-height:1.2}.hq-top-metric[data-accent=true]>strong{color:var(--green)}.hq-connection-pill{height:30px;color:var(--red);font-family:var(--font-mono);text-transform:uppercase;background:#e2535314;border:1px solid #e2535373;flex:none;align-items:center;gap:5px;padding:0 8px;font-size:9px;font-weight:600;display:inline-flex}.hq-connection-pill[data-live=true]{color:var(--green);background:#22c77a14;border-color:#22c77a66}.hq-stat{text-align:right;background:var(--inset);border:1px solid var(--border);border-radius:var(--radius-sm);min-width:72px;padding:4px 12px}.hq-stat-num{color:var(--bright);font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-size:17px;font-weight:600;line-height:1.15;display:block}.hq-stat.green .hq-stat-num{color:var(--green)}.hq-stat-label{color:var(--dim);letter-spacing:.04em;font-size:10px;display:block}.hq-main{scrollbar-width:thin;scrollbar-color:var(--border2) transparent;flex:1;min-height:0;padding:16px;overflow:auto}.hq-main>div{max-width:1480px;margin:0 auto}.hq-empty{color:var(--muted);text-align:center;border:1px dashed var(--border);border-radius:var(--radius);background:var(--panel);padding:48px 20px;font-size:13px}.hq-view-loading,.hq-view-error{border:1px solid var(--border);background:var(--panel);min-height:150px;color:var(--muted);justify-content:center;align-items:center;gap:10px;display:flex}.hq-view-loading svg{color:var(--primary);animation:1.2s ease-in-out infinite hq-loader-pulse}@keyframes hq-loader-pulse{50%{opacity:.35}}.hq-view-error{color:var(--red);border-color:#e2535373;justify-content:flex-start;padding:18px}.hq-view-error>div{flex:1;min-width:0}.hq-view-error strong{color:var(--bright)}.hq-view-error p{color:var(--muted);word-break:break-word;margin:3px 0 0}.hq-card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:12px;padding:14px 16px}.hq-card-title{color:var(--muted);text-transform:uppercase;letter-spacing:.1em;margin:14px 0 8px;font-size:11px;font-weight:600}.hq-card-title:first-child{margin-top:0}.hq-row{align-items:center;gap:10px;min-width:0;padding:5px 0;display:flex}.hq-row-click{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;border-radius:var(--radius-sm);background:0 0;border:0;padding:5px 8px}.hq-row-click:hover{background:var(--panel2)}.hq-row-time{color:var(--dim);font-variant-numeric:tabular-nums;flex-shrink:0;margin-left:auto;font-size:11px}.hq-row-subtle{color:var(--dim);font-size:11.5px}.hq-row-detail{color:var(--text);word-break:break-word;margin-top:4px;font-size:12.5px}.hq-row-error{color:var(--red);word-break:break-word;font-size:12px}.hq-pill{border:1px solid var(--border);background:var(--inset);color:var(--muted);white-space:nowrap;border-radius:999px;align-items:center;gap:4px;padding:1px 8px;font-size:11px;font-weight:500;line-height:1.6;display:inline-flex}.hq-pill.running,.hq-pill.active,.hq-pill.streaming,.hq-pill.streamed{color:var(--green);background:#2ac0751f;border-color:#2ac07573}.hq-pill.idle{color:var(--muted)}.hq-pill.error,.hq-pill.failed,.hq-pill.stopped,.hq-pill.critical,.hq-pill.high{color:var(--red);background:#df49491f;border-color:#df494973}.hq-pill.warn,.hq-pill.medium,.hq-pill.waiting_user{color:var(--amber);background:#f9af2f1a;border-color:#f9af2f73}.hq-pill.info,.hq-pill.low{color:var(--primary);background:#fe2e5f1a;border-color:#fe2e5f66}.hq-mono{font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-size:12px}.hq-cost-amount{color:var(--green);font-family:var(--font-mono);font-variant-numeric:tabular-nums;flex-shrink:0;margin-left:auto;font-size:12px;font-weight:600}.hq-kind-icon{flex-shrink:0}.hq-kind-icon.active{color:var(--green)}.hq-kind-icon.info{color:var(--primary)}.hq-kind-icon.warn{color:var(--amber)}.hq-kind-icon.error{color:var(--red)}.hq-kind-icon.idle{color:var(--dim)}.hq-lane-head{border-bottom:1px solid var(--border);margin-bottom:4px;padding-bottom:8px}.hq-diffstat{font-size:11.5px}.hq-btn{border-radius:var(--radius-sm);background:var(--primary);color:#131316;cursor:pointer;border:1px solid #0000;align-items:center;gap:6px;padding:7px 14px;font-size:12.5px;font-weight:600;display:inline-flex}.hq-btn:hover{filter:brightness(1.08)}.hq-btn:disabled{opacity:.45;cursor:default}.hq-btn.danger{background:var(--red);color:var(--bright)}.hq-btn.secondary{background:var(--inset);color:var(--text);border-color:var(--border)}.hq-btn.secondary:hover{border-color:var(--border2);color:var(--bright);filter:none}.hq-btn.secondary.hq-btn-selected{border-color:var(--primary);color:var(--primary)}.hq-input,.hq-textarea,.hq-select{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--inset);width:100%;color:var(--text);padding:7px 10px;font-size:12.5px}.hq-input::placeholder,.hq-textarea::placeholder{color:var(--dim)}.hq-textarea{resize:vertical;min-height:78px;line-height:1.5;font-family:var(--font-mono);font-size:12px}.hq-label{color:var(--muted);margin-bottom:5px;font-size:11.5px;font-weight:500;display:block}.hq-grid{gap:12px;display:grid}.hq-tree-node{cursor:pointer;border-radius:0 var(--radius-sm) var(--radius-sm) 0;border-left:2px solid #0000;align-items:center;gap:8px;min-width:0;padding:5px 9px;display:flex}.hq-tree-node:hover{background:var(--panel2)}.hq-tree-node.sel{border-left-color:var(--primary);background:#fe2e5f14}.hq-spark{color:var(--primary);font-family:var(--font-mono);letter-spacing:-1px;font-size:12px}.hq-flow-shell{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);height:calc(100vh - 150px);min-height:520px;box-shadow:var(--shadow);flex-direction:column;display:flex;overflow:hidden}.hq-flow-toolbar{border-bottom:1px solid var(--border);background:var(--panel2);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;display:flex}.hq-flow-scope{border-top:1px solid var(--border);flex-wrap:wrap;flex:100%;align-items:center;gap:6px;padding-top:9px;display:flex}.hq-flow-scope-buttons,.hq-flow-layout{align-items:center;gap:6px;display:inline-flex}.hq-flow-layout .hq-btn{align-items:center;gap:5px;display:inline-flex}.hq-flow-scope .hq-btn.active{border-color:var(--primary);color:var(--bright);background:#fe2e5f1f}.hq-flow-scope-select{width:min(360px,42vw);margin-left:4px}.hq-flow-toolbar-spacer{flex:20px}.hq-flow-search{min-width:min(100%,270px);color:var(--dim);align-items:center;gap:6px;display:flex}.hq-flow-search .hq-input{width:min(340px,38vw)}.hq-flow-stats,.hq-flow-legend{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.hq-flow-canvas{background:radial-gradient(circle at 20% 10%, #fe2e5f14, transparent 28%), linear-gradient(180deg, var(--inset), var(--bg));flex:1;min-height:0;position:relative}.hq-flow-arrange{z-index:5;align-items:center;gap:6px;font-size:12px;display:inline-flex;position:absolute;top:10px;right:10px}.hq-fleet-list{background:var(--inset);flex:1;min-height:0;overflow:auto}.hq-fleet-list-header,.hq-fleet-list-row{grid-template-columns:minmax(260px,1.2fr) minmax(160px,1fr) 105px minmax(240px,1.3fr);align-items:center;gap:10px;min-width:900px;display:grid}.hq-fleet-list-header{z-index:2;border-bottom:1px solid var(--border2);background:var(--panel2);color:var(--dim);letter-spacing:.08em;text-transform:uppercase;padding:7px 12px;font-size:10px;font-weight:700;position:sticky;top:0}.hq-fleet-list-row{border:0;border-bottom:1px solid var(--border);background:var(--panel);width:100%;color:var(--text);font:inherit;text-align:left;padding:5px 12px}.hq-fleet-list-row.machine{background:var(--panel2)}.hq-fleet-list-row.project{background:color-mix(in srgb, var(--panel2) 58%, var(--panel))}.hq-fleet-list-row.clickable{cursor:pointer}.hq-fleet-list-row.clickable:hover,.hq-fleet-list-row.clickable:focus-visible{box-shadow:inset 3px 0 0 var(--primary);background:#fe2e5f17;outline:none}.hq-fleet-list-member{align-items:center;gap:8px;min-width:0;display:flex}.hq-fleet-list-member>span:last-child{min-width:0;display:grid}.hq-fleet-list-member strong,.hq-fleet-list-member small,.hq-fleet-list-context{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.hq-fleet-list-member strong{font-size:11.5px}.hq-fleet-list-member small{color:var(--dim);letter-spacing:.08em;text-transform:uppercase;font-size:9px}.hq-fleet-list-context{color:var(--muted);font-family:var(--font-mono);font-size:10px}.hq-fleet-list-chips{align-items:center;gap:5px;min-width:0;display:flex;overflow:hidden}.hq-fleet-list-empty{flex:1}@media (width<=760px){.hq-flow-search,.hq-flow-search .hq-input{width:100%}.hq-flow-toolbar-spacer{display:none}}.hq-fleet-drawer-layer{z-index:6;pointer-events:none;position:absolute;inset:0}.hq-fleet-drawer-scrim{background:0 0;border:0;width:100%;height:100%;padding:0;display:none;position:absolute;inset:0}.hq-fleet-drawer{pointer-events:auto;background:var(--panel);border-left:1px solid var(--border);flex-direction:column;width:min(440px,88%);animation:.16s ease-out hq-drawer-in;display:flex;position:absolute;top:0;bottom:0;right:0;box-shadow:-18px 0 44px #06060973}@keyframes hq-drawer-in{0%{opacity:0;transform:translate(24px)}to{opacity:1;transform:translate(0)}}.hq-fleet-drawer-header{border-bottom:1px solid var(--border);flex-shrink:0;align-items:center;gap:8px;padding:10px 12px;display:flex}.hq-fleet-drawer-title{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;font-weight:600;overflow:hidden}.hq-fleet-drawer-actions{flex-shrink:0;align-items:center;gap:6px;margin-left:auto;display:inline-flex}.hq-fleet-drawer-actions .hq-btn{align-items:center;gap:5px;padding:4px 8px;font-size:11.5px;display:inline-flex}.hq-fleet-drawer-stats{border-bottom:1px solid var(--border);flex-shrink:0;align-items:center;gap:6px;padding:6px 12px;display:flex}.hq-fleet-drawer-body{border:0;border-radius:0;flex:1;min-height:0}@media (width<=900px){.hq-fleet-drawer-scrim{pointer-events:auto;background:#00000080;display:block}.hq-fleet-drawer{width:min(440px,100% - 24px)}}.hq-flow-node{border:1px solid var(--border2);border-radius:var(--radius);width:220px;min-height:104px;color:var(--text);background:#18181bf5;padding:11px 12px;box-shadow:0 8px 24px #05050659}.hq-flow-node.machine{border-color:#fe2e5f85}.hq-flow-node.project{border-color:#fd9f0280}.hq-flow-node.terminal{border-color:#f5f2e95c}.hq-flow-node.agent{border-color:#2ac07561}.hq-flow-node.clickable{cursor:pointer}.hq-flow-node.clickable:hover,.react-flow__node.selected .hq-flow-node,.hq-flow-node.selected{border-color:var(--primary);box-shadow:0 0 0 1px #fe2e5f4d,0 10px 28px #5f071d3d}.hq-flow-title{min-width:0;color:var(--bright);align-items:center;gap:8px;font-weight:700;display:flex}.hq-flow-label,.hq-flow-sub{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.hq-flow-sub{color:var(--muted);font-family:var(--font-mono);margin-top:5px;font-size:11px}.hq-flow-chips{flex-wrap:wrap;gap:5px;margin-top:10px;display:flex}.hq-flow-chips .hq-pill{text-overflow:ellipsis;max-width:92px;overflow:hidden}.hq-flow-dot{background:var(--dim);border-radius:50%;flex-shrink:0;width:9px;height:9px}.hq-flow-dot.active{background:var(--green)}.hq-flow-dot.warn{background:var(--amber)}.hq-flow-dot.error{background:var(--red)}.hq-flow-handle{border:1px solid var(--primary);background:var(--inset);width:8px;height:8px}.hq-flow-edge .react-flow__edge-path{stroke:#fe2e5f75;stroke-width:1.6px}.hq-flow-edge.live .react-flow__edge-path{stroke:#2ac075bf;stroke-width:2px}.hq-flow-canvas .react-flow__minimap.hq-flow-minimap{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-sm)}.hq-flow-canvas .react-flow__controls.hq-flow-controls{border:1px solid var(--border);border-radius:var(--radius-sm);box-shadow:var(--shadow);overflow:hidden}.hq-flow-canvas .react-flow__controls.hq-flow-controls button{background:var(--panel);border-bottom-color:var(--border);color:var(--text)}.hq-flow-legend{border-top:1px solid var(--border);color:var(--muted);background:var(--panel2);padding:8px 12px;font-size:11px}.hq-flow-legend span{align-items:center;gap:4px;display:inline-flex}.hq-fleet-node-icon{color:var(--muted);flex-shrink:0}.hq-fleet-agent-dot{color:var(--dim)}.hq-fleet-agent-dot.running,.hq-fleet-agent-dot.streaming{color:var(--green)}.hq-fleet-agent-dot.waiting_user{color:var(--amber)}.hq-fleet-agent-dot.error{color:var(--red)}.hq-kpi-row{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin-bottom:14px;display:grid}.hq-kpi{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px}.hq-kpi-value{color:var(--bright);font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-size:26px;font-weight:600;line-height:1.15;display:block}.hq-kpi.hero .hq-kpi-value{font-size:34px}.hq-kpi-value.accent-cost{color:var(--green)}.hq-kpi-label{color:var(--dim);letter-spacing:.05em;text-transform:uppercase;margin-top:3px;font-size:11px;display:block}.hq-share-track{background:var(--inset);border-radius:3px;height:5px;margin-top:6px;overflow:hidden}.hq-share-fill{background:var(--chart-1);border-radius:3px;height:100%}.hq-filter-row{flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:14px;display:flex}.hq-filter-chip{cursor:pointer}.hq-filter-chip.selected{border-color:var(--primary);color:var(--primary);background:#fe2e5f1a}.hq-chart{position:relative}.hq-chart-svg{width:100%;height:auto;display:block}.hq-chart-grid{stroke:var(--border);stroke-width:1px;stroke-dasharray:2 4}.hq-chart-axis{stroke:var(--border2);stroke-width:1px}.hq-chart-ytick,.hq-chart-xtick{fill:var(--dim);font-family:var(--font-mono);font-size:10px}.hq-chart-tooltip{background:var(--panel2);border:1px solid var(--border2);border-radius:var(--radius-sm);box-shadow:var(--shadow);pointer-events:none;align-items:center;gap:8px;padding:4px 10px;font-size:12px;display:inline-flex;position:absolute;top:4px;right:8px}.hq-chart-tooltip-swatch{border-radius:2px;width:8px;height:8px}.hq-chart-tooltip-value{color:var(--bright);font-family:var(--font-mono);font-variant-numeric:tabular-nums;font-weight:600}.hq-chart-tooltip-time{color:var(--dim);font-variant-numeric:tabular-nums}.hq-chart-empty{color:var(--dim);text-align:center;padding:24px;font-size:12px}.hq-toggle{width:24px;height:24px;color:var(--muted);background:var(--inset);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.hq-toggle:hover{color:var(--bright);border-color:var(--border2)}.hq-msg-list{border-top:1px solid var(--border);flex-direction:column;gap:7px;padding-top:10px;display:flex}.hq-msg{background:var(--inset);border:1px solid var(--border);border-radius:var(--radius-sm);padding:9px 11px}.hq-msg:hover{border-color:var(--border2)}.hq-msg.done{opacity:.6}.hq-msg-head{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.hq-msg-head>.hq-msg-toggle{margin-left:4px}.hq-msg-icon{display:none}.hq-msg-subject{min-width:120px;color:var(--bright);text-overflow:ellipsis;white-space:nowrap;flex:180px;font-weight:600;overflow:hidden}.hq-msg-route,.hq-msg-time,.hq-msg-id{color:var(--dim);font-size:11px}.hq-msg-flag{font-size:11px;font-weight:600}.hq-msg-flag.open{color:var(--amber)}.hq-msg-flag.done{color:var(--green)}.hq-msg-body{background:var(--panel2);border:1px solid var(--border);border-radius:var(--radius-sm);margin-top:9px;padding:10px 12px}.hq-msg-pre{color:var(--text);font-family:var(--font-mono);white-space:pre-wrap;word-break:break-word;background:0 0;margin:0;padding:0;font-size:12px;line-height:1.5}.hq-msg-sublabel{color:var(--dim);text-transform:uppercase;letter-spacing:.08em;margin:10px 0 4px;font-size:10.5px;font-weight:600}.hq-msg-meta{border-top:1px dashed var(--border);color:var(--muted);flex-wrap:wrap;gap:12px;margin-top:10px;padding-top:8px;font-size:11px;display:flex}.hq-msg-meta strong{color:var(--text);margin-right:4px;font-weight:600}.hq-mailbox-modebar{flex-wrap:wrap;gap:8px;margin:0 0 12px;display:flex}.hq-mailbox-filterbar{gap:12px;display:grid}.hq-filter-section{gap:6px;display:grid}.hq-filter-chip-row{flex-wrap:wrap;gap:6px;display:flex}.hq-check{color:var(--muted);cursor:pointer;align-items:center;gap:8px;font-size:12px;display:inline-flex}.hq-check input{accent-color:var(--primary)}.hq-live-feed{border-top:0;padding-top:0}.hq-control-target{gap:10px;display:grid}.hq-control-meta{color:var(--muted);flex-wrap:wrap;gap:10px;font-size:11.5px;display:flex}.hq-control-meta strong{color:var(--text);margin-right:4px}.hq-control-steps{border:0;flex-wrap:wrap;gap:6px;margin:0 0 10px;padding:0;display:flex}.hq-step{border:1px solid var(--border);background:var(--inset);color:var(--dim);border-radius:999px;padding:3px 9px;font-size:11px;font-weight:500}.hq-step.active{color:var(--primary);background:#fe2e5f14;border-color:#fe2e5f80}.hq-card-danger{border-color:#df494980}.hq-control-warning{color:var(--amber);border-radius:var(--radius-sm);background:#f9af2f0f;border:1px dashed #f9af2f80;margin-top:10px;padding:8px 10px;font-size:12px}.hq-command-preview,.hq-command-audit{gap:10px;display:grid}.hq-audit-list{gap:8px;display:grid}.hq-audit-row{border:1px solid var(--border);background:var(--inset);border-radius:var(--radius-sm);gap:7px;padding:9px 11px;display:grid}.hq-audit-row.other-client{opacity:.55}.hq-audit-row.just-dispatched{border-color:#fe2e5fb3;animation:1.6s ease-out hq-audit-flash}@keyframes hq-audit-flash{0%{background:#fe2e5f38}to{background:var(--inset)}}.hq-control-grid{grid-template-columns:minmax(0,1fr) minmax(280px,380px);align-items:start;gap:18px;display:grid}@media (width<=1100px){.hq-control-grid{grid-template-columns:minmax(0,1fr)}}.hq-control-types{flex-wrap:wrap;gap:8px;display:flex}.hq-control-type{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--inset);color:var(--muted);cursor:pointer;align-items:center;gap:6px;padding:6px 11px;font-size:12.5px;transition:border-color .12s,color .12s,background .12s;display:inline-flex}.hq-control-type:hover{color:var(--text);border-color:#fe2e5f80}.hq-control-type.selected{color:var(--text);background:#fe2e5f1f;border-color:#fe2e5fcc}.hq-control-type.danger{border-color:#dd3c3c59}.hq-control-type.danger:hover,.hq-control-type.danger.selected{color:var(--text);background:#dd3c3c1a;border-color:#dd3c3cbf}.hq-control-typedesc{color:var(--muted);align-items:center;gap:6px;margin-top:8px;font-size:12px;display:flex}.hq-audit-main,.hq-audit-meta{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.hq-audit-meta{color:var(--muted);font-size:11px}.hq-audit-meta strong{color:var(--text);margin-right:4px}.hq-audit-message{color:var(--text);border-top:1px dashed var(--border);white-space:pre-wrap;word-break:break-word;padding-top:7px;font-size:12px}.hq-cockpit-summary,.hq-cockpit-section{gap:10px;display:grid}.hq-cockpit-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;display:grid}.hq-cockpit-actions{border-top:1px dashed var(--border);flex-wrap:wrap;align-items:center;gap:10px;padding-top:10px;display:flex}.hq-cockpit-actions-copy{gap:4px;min-width:180px;display:grid}.hq-cockpit-actions-buttons{flex-wrap:wrap;flex:360px;gap:8px;display:flex}.hq-cockpit-alert-list,.hq-cockpit-cost-list{gap:8px;display:grid}.hq-cockpit-alert-row{border:1px solid var(--border);background:var(--inset);border-radius:var(--radius-sm);flex-wrap:wrap;align-items:center;gap:8px;padding:7px 10px;font-size:12px;display:flex}.hq-cockpit-alert-msg{color:var(--text);white-space:nowrap;text-overflow:ellipsis;flex:220px;min-width:0;overflow:hidden}.hq-cockpit-cost-row{border:1px solid var(--border);background:var(--inset);border-radius:var(--radius-sm);gap:5px;padding:9px 11px;display:grid}.hq-cockpit-cost-line{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.hq-cockpit-cost-name{font-weight:600}.hq-cockpit-cost-bar{background:var(--bg);border-radius:3px;height:5px;position:relative;overflow:hidden}.hq-cockpit-cost-bar>span{background:var(--chart-1);border-radius:3px;height:100%;display:block}.hq-cockpit-cost-meta{color:var(--muted);flex-wrap:wrap;gap:8px;font-size:11px;display:flex}.hq-console-shell{grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:14px;height:calc(100vh - 132px);min-height:320px;display:grid}@media (width<=900px){.hq-console-shell{grid-template-columns:minmax(0,1fr)}.hq-fleetnav{max-height:220px}}.hq-console{flex-direction:column;min-width:0;min-height:0;display:flex}.hq-fleetnav{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg2);padding:6px;display:block;overflow-y:auto}.hq-nav-row{text-align:left;border-radius:var(--radius-sm);width:100%;color:var(--text);cursor:pointer;background:0 0;border:0;align-items:center;gap:6px;min-width:0;padding:4px 6px;font-size:12.5px;display:flex}.hq-nav-row:hover{background:var(--inset)}.hq-nav-row:disabled{cursor:wait;opacity:.58}.hq-nav-row:disabled:hover{background:0 0}.hq-nav-row.machine{font-weight:600}.hq-nav-row.project{color:var(--muted)}.hq-nav-row.client.selected,.hq-nav-row.agent.selected{color:var(--text);background:#fe2e5f29}.hq-nav-label{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.hq-nav-count{color:var(--muted);background:var(--inset);border-radius:999px;flex-shrink:0;padding:0 6px;font-size:10px;line-height:15px}.hq-nav-caret{color:var(--muted);flex-shrink:0;transition:transform .12s}.hq-nav-caret.open{transform:rotate(90deg)}.hq-nav-caretbtn{cursor:pointer;background:0 0;border:0;flex-shrink:0;justify-content:center;align-items:center;width:16px;padding:0;display:inline-flex}.hq-nav-project,.hq-nav-client{padding-left:12px}.hq-nav-clientrow{align-items:center;display:flex}.hq-nav-client .hq-nav-row.agent{padding-left:28px}.hq-nav-dot{background:var(--muted);border-radius:999px;flex-shrink:0;width:7px;height:7px}.hq-nav-dot.active{background:#2ac075;box-shadow:0 0 5px #2ac075b3}.hq-nav-dot.warn{background:#f9af2f}.hq-nav-dot.error{background:#dd3c3c}.hq-chat-header{flex-wrap:wrap;flex-shrink:0;align-items:center;gap:10px;margin-bottom:10px;display:flex}.hq-chat-header-icon{color:var(--primary)}.hq-chat-picker{flex:0 auto;width:auto;min-width:260px;max-width:46vw}.hq-chat-sid{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;max-width:46vw;font-size:11px;overflow:hidden}.hq-chat-counts{align-items:center;gap:6px;margin-left:auto;display:flex}.hq-chat-fullbtn{padding:3px 10px;font-size:11px}.hq-chat-scroll{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg2);flex:1;min-height:0;position:relative;overflow:hidden}.hq-chat-vlist{scrollbar-width:thin;scrollbar-color:var(--border2) transparent;height:100%;padding:10px 14px}.hq-chat-rowpad{padding:5px 0}.hq-chat-jump{border:1px solid var(--border2);background:var(--panel2);width:34px;height:34px;color:var(--bright);cursor:pointer;box-shadow:var(--shadow);border-radius:50%;justify-content:center;align-items:center;display:inline-flex;position:absolute;bottom:14px;right:18px}.hq-chat-jump:hover{border-color:var(--primary);color:var(--primary)}.hq-console-composer{border:1px solid var(--border);background:var(--panel);box-shadow:var(--shadow);flex:none;gap:7px;margin-top:9px;padding:9px;display:grid}.hq-console-composer-head,.hq-console-compose-row,.hq-console-compose-foot{align-items:center;gap:7px;display:flex}.hq-console-composer-head{color:var(--muted);justify-content:space-between;font-size:11px}.hq-console-composer-head>span:first-child{align-items:center;gap:6px;min-width:0;display:inline-flex}.hq-console-composer-head strong{color:var(--bright);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.hq-console-delivery{flex:0 0 132px;width:132px}.hq-console-subject{flex:1;min-width:0}.hq-console-interrupt{flex:none}.hq-console-message-row{align-items:stretch}.hq-textarea.hq-console-message{resize:vertical;min-height:54px;max-height:150px;font-family:var(--font-sans)}.hq-console-send{justify-content:center;min-width:86px}.hq-console-compose-foot{min-width:0;color:var(--dim);justify-content:space-between;font-size:10px}.hq-console-status{text-align:right;text-overflow:ellipsis;white-space:nowrap;max-width:62%;overflow:hidden}.hq-console-status.ok{color:var(--green)}.hq-console-status.error{color:var(--red)}.hq-confirm-layer{z-index:100;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.hq-confirm-scrim{cursor:default;background:#0a0a09ad;border:0;position:absolute;inset:0}.hq-confirm-dialog{border:1px solid var(--red);background:var(--panel);grid-template-columns:auto minmax(0,1fr);gap:12px;width:min(460px,100vw - 32px);padding:18px;display:grid;position:relative;box-shadow:0 22px 70px #00000073}.hq-confirm-danger{color:var(--red)}.hq-confirm-dialog h2{color:var(--bright);margin:0;font-size:16px}.hq-confirm-dialog p{color:var(--muted);margin:4px 0 0;font-size:12px}.hq-confirm-check,.hq-confirm-actions{grid-column:1/-1}.hq-confirm-check{border:1px solid var(--border);background:var(--inset);color:var(--text);cursor:pointer;align-items:center;gap:8px;padding:9px 10px;font-size:12px;display:flex}.hq-confirm-check input{accent-color:var(--red)}.hq-confirm-actions{justify-content:flex-end;gap:8px;display:flex}.hq-chat-turn{flex-direction:column;display:flex}.hq-chat-turn.user{align-items:flex-end}.hq-chat-turn.assistant,.hq-chat-turn.error{align-items:flex-start}.hq-chat-bubble{border:1px solid var(--border);border-radius:var(--radius);background:var(--panel);max-width:min(88%,940px);padding:9px 13px}.hq-chat-bubble.user{background:#fe2e5f12;border-color:#fe2e5f59}.hq-chat-bubble.assistant{background:var(--panel)}.hq-chat-bubble.error{background:#df49490f;border-color:#df494980}.hq-chat-role{color:var(--dim);letter-spacing:.08em;text-transform:uppercase;align-items:center;gap:8px;margin-bottom:5px;font-size:10.5px;font-weight:600;display:flex}.hq-chat-role.err{color:var(--red)}.hq-chat-clock{color:var(--dim);font-variant-numeric:tabular-nums;margin-left:auto;font-weight:400}.hq-chat-prose{color:var(--text);white-space:pre-wrap;word-break:break-word;font-size:13px;line-height:1.55}.hq-chat-turn.system{align-items:center}.hq-command-turn .hq-pill{letter-spacing:0;text-transform:lowercase}.hq-command-turn .hq-chat-role .hq-pill{margin-left:2px}.hq-command-turn .hq-chat-system-line{border-color:#fe2e5f47}.hq-chat-system-line{color:var(--dim);border:1px dashed var(--border);background:var(--panel);border-radius:999px;align-items:center;gap:10px;padding:2px 12px;font-size:11.5px;display:inline-flex}.hq-md{color:var(--text);word-break:break-word;font-size:13px;line-height:1.6}.hq-md>:first-child{margin-top:0}.hq-md>:last-child{margin-bottom:0}.hq-md p{margin:.5em 0}.hq-md h1,.hq-md h2,.hq-md h3,.hq-md h4{color:var(--bright);margin:.9em 0 .4em;line-height:1.3}.hq-md h1{font-size:1.25em}.hq-md h2{font-size:1.15em}.hq-md h3{font-size:1.05em}.hq-md h4{font-size:1em}.hq-md ul,.hq-md ol{margin:.4em 0;padding-left:1.4em}.hq-md li{margin:.15em 0}.hq-md li>ul,.hq-md li>ol{margin:.1em 0}.hq-md blockquote{border-left:3px solid var(--border2);color:var(--muted);margin:.5em 0;padding:2px 12px}.hq-md hr{border:0;border-top:1px solid var(--border);margin:.9em 0}.hq-md code{font-family:var(--font-mono);background:var(--inset);border:1px solid var(--border);border-radius:4px;padding:.05em .35em;font-size:.92em}.hq-md pre code{background:0 0;border:0;padding:0;font-size:12px}.hq-md-table-wrap{border:1px solid var(--border);border-radius:var(--radius-sm);margin:.6em 0;overflow-x:auto}.hq-md table{border-collapse:collapse;width:100%;font-size:12.5px}.hq-md th,.hq-md td{border-bottom:1px solid var(--border);text-align:left;padding:5px 10px}.hq-md th{color:var(--muted);background:var(--inset);font-weight:600}.hq-md tr:last-child td{border-bottom:0}.hq-md-code{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--inset);margin:.6em 0;overflow:hidden}.hq-md-code-bar{border-bottom:1px solid var(--border);background:var(--panel2);align-items:center;gap:10px;padding:3px 10px;display:flex}.hq-md-code-lang{color:var(--primary);font-family:var(--font-mono);font-size:10.5px;font-weight:600}.hq-md-code-meta{color:var(--dim);margin-right:auto;font-size:10.5px}.hq-md-code pre{max-height:40rem;font-family:var(--font-mono);scrollbar-width:thin;scrollbar-color:var(--border2) transparent;margin:0;padding:10px 12px;font-size:12px;line-height:1.55;overflow-x:auto}.hq-chat-turn.thinking{align-items:stretch}.hq-thinking-head{width:100%;color:var(--muted);text-align:left;cursor:pointer;border:1px dashed var(--border);border-radius:var(--radius-sm);background:0 0;align-items:center;gap:8px;padding:5px 10px;font-size:12px;display:flex}.hq-thinking-head:hover{border-color:var(--border2);color:var(--text)}.hq-thinking-icon{color:var(--purple);flex-shrink:0}.hq-thinking-label{letter-spacing:.08em;text-transform:uppercase;flex-shrink:0;font-size:10.5px;font-weight:600}.hq-thinking-peek{color:var(--dim);text-overflow:ellipsis;white-space:nowrap;min-width:0;font-style:italic;overflow:hidden}.hq-thinking-body{border:1px dashed var(--border);border-radius:0 0 var(--radius-sm) var(--radius-sm);color:var(--muted);border-top:0;padding:8px 12px;font-style:italic}.hq-chat-turn.tool{align-items:stretch}.hq-tool-head{width:100%;color:var(--text);text-align:left;cursor:pointer;background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-sm);align-items:center;gap:8px;padding:6px 10px;display:flex}.hq-chat-turn.tool.err .hq-tool-head{border-color:#df494980}.hq-tool-head:hover{border-color:var(--border2);background:var(--panel2)}.hq-tool-caret{color:var(--dim);flex-shrink:0;display:inline-flex}.hq-tool-icon{flex-shrink:0;display:inline-flex}.hq-tool-dot{background:var(--green);border-radius:50%;flex-shrink:0;width:7px;height:7px}.hq-tool-dot.err{background:var(--red)}.hq-tool-name{color:var(--bright);flex-shrink:0;font-size:12.5px;font-weight:600}.hq-tool-summary{color:var(--muted);font-size:12px;font-family:var(--font-mono);text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.hq-tool-dur{color:var(--dim);font-variant-numeric:tabular-nums;flex-shrink:0;margin-left:auto;font-size:11px}.hq-tool-status{flex-shrink:0;align-items:center;display:inline-flex}.hq-status-ok{color:var(--green)}.hq-status-err{color:var(--red)}.hq-tool-running-dot{background:var(--amber);border-radius:50%;width:8px;height:8px;animation:1.2s ease-in-out infinite hq-pulse}@keyframes hq-pulse{0%,to{opacity:1}50%{opacity:.35}}.hq-tool-body{border:1px solid var(--border);border-radius:0 0 var(--radius-sm) var(--radius-sm);background:var(--panel);border-top:0;flex-direction:column;gap:10px;padding:10px 12px;display:flex}.hq-tool-section{flex-direction:column;gap:4px;display:flex}.hq-tool-section-label{color:var(--dim);letter-spacing:.1em;text-transform:uppercase;font-size:10px;font-weight:600}.hq-tool-section-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.hq-tool-pre{background:var(--inset);border:1px solid var(--border);border-radius:var(--radius-sm);max-height:360px;color:var(--text);font-family:var(--font-mono);white-space:pre-wrap;word-break:break-word;scrollbar-width:thin;scrollbar-color:var(--border2) transparent;margin:0;padding:8px 10px;font-size:11.5px;line-height:1.5;overflow:auto}.hq-tool-pre.term{border-left:2px solid var(--green)}.hq-tool-pre.err{color:var(--red);border-color:#df494980}.hq-tool-result-note{color:var(--muted);font-size:11.5px}.hq-tool-empty{color:var(--dim);font-size:11.5px;font-style:italic}.hq-result{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--inset);overflow:hidden}.hq-result.bare{background:0 0;border:0;border-radius:0}.hq-result.err-frame{border-color:#df494980}.hq-result-pre{max-height:24rem;color:var(--text);font-family:var(--font-mono);scrollbar-width:thin;scrollbar-color:var(--border2) transparent;margin:0;padding:8px 10px;font-size:11.5px;line-height:1.5;overflow:auto}.hq-result-pre.wrap{white-space:pre-wrap;word-break:break-word}.hq-result-pre.nowrap{white-space:pre}.hq-result-pre.err{color:var(--red)}.hq-result-toggle{border:0;border-top:1px solid var(--border);background:var(--panel2);width:100%;color:var(--muted);cursor:pointer;justify-content:center;align-items:center;gap:5px;padding:4px 8px;font-size:11px;display:flex}.hq-result-toggle:hover{color:var(--bright)}.hq-result-jsonbar{border:0;border-bottom:1px solid var(--border);background:var(--panel2);width:100%;color:var(--muted);cursor:pointer;justify-content:space-between;align-items:center;gap:8px;padding:4px 10px;font-size:11px;display:flex}.hq-result-jsonbar:hover{color:var(--bright)}.hq-result-jsonbar-left{font-family:var(--font-mono);align-items:center;gap:5px;display:inline-flex}.hq-result-bash{flex-direction:column;display:flex}.hq-result-exit{border-top:1px solid var(--border);background:var(--panel2);color:var(--muted);font-size:11px;font-family:var(--font-mono);font-variant-numeric:tabular-nums;align-items:center;gap:12px;padding:4px 10px;display:flex}.hq-result-exit.bad{color:var(--red)}.hq-diff{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--inset);overflow:hidden}.hq-diff-stat{border-bottom:1px solid var(--border);background:var(--panel2);font-variant-numeric:tabular-nums;gap:10px;padding:4px 10px;font-size:11px;font-weight:600;display:flex}.hq-diff-add-count{color:var(--green)}.hq-diff-del-count{color:var(--red)}.hq-diff-body{max-height:360px;font-family:var(--font-mono);scrollbar-width:thin;scrollbar-color:var(--border2) transparent;margin:0;padding:6px 0;font-size:11.5px;line-height:1.5;overflow:auto}.hq-diff-line{white-space:pre-wrap;word-break:break-word;padding:0 10px 0 0;display:block}.hq-diff-line.add{color:#90dfb8;background:#2ac07521}.hq-diff-line.del{color:#f19d9d;background:#df49491f}.hq-diff-line.ctx{color:var(--muted)}.hq-diff-line.meta{color:var(--primary);opacity:.8}.hq-diff-gutter{text-align:center;width:20px;color:var(--dim);user-select:none;display:inline-block}.hq-diff-path{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;max-width:60%;margin-right:auto;font-weight:500;overflow:hidden}.hq-todo-list{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--inset);margin:0;padding:0;list-style:none;overflow:hidden}.hq-todo{border-bottom:1px solid var(--border);align-items:baseline;gap:8px;padding:5px 10px;font-size:12.5px;display:flex}.hq-todo:last-child{border-bottom:0}.hq-todo-mark{text-align:center;flex-shrink:0;width:14px;font-weight:700}.hq-todo-text{color:var(--text);word-break:break-word}.hq-todo.completed .hq-todo-mark{color:var(--green)}.hq-todo.completed .hq-todo-text{color:var(--dim);text-decoration:line-through}.hq-todo.in_progress .hq-todo-mark{color:var(--amber)}.hq-todo.in_progress .hq-todo-text{color:var(--bright);font-weight:600}.hq-todo.pending .hq-todo-mark{color:var(--dim)}.hq-copy-btn{border:1px solid var(--border);background:var(--inset);color:var(--muted);letter-spacing:.04em;text-transform:uppercase;cursor:pointer;border-radius:4px;align-items:center;gap:4px;padding:2px 7px;font-size:10px;font-weight:600;line-height:1.5;display:inline-flex}.hq-copy-btn:hover{color:var(--bright);border-color:var(--border2)}@media (width<=1280px){.hq-view-identity p{display:none}.hq-top-metric{min-width:76px;padding-inline:8px}}@media (width<=1080px){.hq-top-metric:first-child,.hq-top-metric:nth-child(2){display:none}}@media (width<=900px){.hq-app{grid-template-columns:minmax(0,1fr)}.hq-workbench{grid-column:1}.hq-secondary-nav,.hq-secondary-nav[data-open=false]{z-index:50;border-right:1px solid var(--border);visibility:hidden;pointer-events:none;width:264px;transition:transform .15s,visibility 0s linear .15s;position:fixed;inset:0 auto 0 0;transform:translate(-105%);box-shadow:12px 0 30px #00000057}.hq-secondary-nav[data-open=true]{visibility:visible;pointer-events:auto;transition-delay:0s;transform:translate(0)}.hq-secondary-header,.hq-secondary-scroll,.hq-secondary-footer{width:264px}.hq-sidebar-scrim{z-index:40;opacity:0;pointer-events:none;background:#00000085;border:0;transition:opacity .15s;display:block;position:fixed;inset:0}.hq-sidebar-scrim[data-open=true]{opacity:1;pointer-events:auto}.hq-header{min-height:62px;padding:7px 9px}.hq-main{padding:10px}.hq-main .hq-grid{grid-template-columns:1fr}.hq-row{flex-wrap:wrap}.hq-chat-picker{flex:100%;min-width:0;max-width:100%}.hq-console{height:calc(100vh - 168px)}}@media (width<=620px){.hq-view-icon,.hq-top-metrics{display:none}.hq-view-identity{min-width:0}.hq-view-identity h1{font-size:14px}.hq-connection-pill{margin-left:auto}.hq-main{padding:8px}.hq-console-compose-row{flex-wrap:wrap}.hq-console-delivery{flex-basis:120px;width:120px}.hq-console-interrupt{margin-left:auto}.hq-console-message{flex-basis:100%}.hq-console-send{margin-left:auto}}@media (prefers-reduced-motion:reduce){.hq-fleet-drawer,.hq-audit-row.just-dispatched,.hq-alert-live,.hq-tool-running-dot,.hq-view-loading svg{animation:none}.hq-control-type,.hq-toggle,.hq-nav-caret,.hq-secondary-nav,.hq-sidebar-scrim{transition:none}}.hq-composer-bar{align-items:center;gap:8px;margin:8px 0;display:flex}.hq-composer{flex-direction:column;gap:8px;margin:8px 0;display:flex}.hq-composer-hint{color:var(--dim);font-size:12px}.hq-composer-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;display:grid}.hq-composer-field{flex-direction:column;gap:4px;display:flex}.hq-composer-field>span{color:var(--muted);text-transform:uppercase;letter-spacing:.04em;font-size:11px}.hq-composer-body{resize:vertical;font-family:var(--font-sans)}.hq-composer-status{text-overflow:ellipsis;white-space:nowrap;max-width:420px;font-size:12px;overflow:hidden}.hq-composer-status.ok{color:var(--green)}.hq-composer-status.err{color:var(--red)}.hq-msg-actions{border-top:1px solid var(--border);flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px;padding-top:8px;display:flex}.hq-msg-action-error{color:var(--red);text-overflow:ellipsis;white-space:nowrap;max-width:320px;font-size:12px;overflow:hidden}.hq-token-gate{background:var(--bg);justify-content:center;align-items:center;height:100%;display:flex}.hq-token-card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);width:min(440px,100vw - 32px);box-shadow:var(--shadow);flex-direction:column;gap:12px;padding:28px 28px 22px;display:flex}.hq-token-title{color:var(--bright);font-size:16px;font-weight:600}.hq-token-text{color:var(--muted);margin:0}.hq-token-input{background:var(--inset);border:1px solid var(--border2);border-radius:var(--radius-sm);color:var(--text);font-family:var(--font-mono);padding:8px 10px}.hq-token-submit{background:var(--primary-dim);border:1px solid var(--primary);border-radius:var(--radius-sm);color:var(--bright);cursor:pointer;padding:8px 10px}.hq-token-submit:disabled{opacity:.5;cursor:default}.hq-token-hint{color:var(--dim);margin:4px 0 0;font-size:12px}.hq-token-hint code{font-family:var(--font-mono);color:var(--muted)}.hq-token-tabs{border-bottom:1px solid var(--border);gap:8px;margin-bottom:4px;display:flex}.hq-token-tab{color:var(--muted);cursor:pointer;background:0 0;border:none;border-bottom:2px solid #0000;flex:1;padding:8px 4px;font-size:13px}.hq-token-tab.active{color:var(--bright);border-bottom-color:var(--primary)}.hq-token-error{color:var(--error,#ff6b6b);margin:0;font-size:13px}.hq-card-severity{border-left:3px solid var(--border)}.hq-card-severity.warn{border-left-color:var(--amber)}.hq-card-severity.error,.hq-card-severity.critical{border-left-color:var(--red)}.hq-card-severity.info{border-left-color:var(--primary)}.hq-stat-block{background:var(--panel2);border:1px solid var(--border);flex-direction:column;gap:2px;min-width:0;padding:10px 14px;display:flex}.hq-stat-block-label{text-transform:uppercase;letter-spacing:.04em;color:var(--dim);font-size:10.5px}.hq-stat-block-value{font-variant-numeric:tabular-nums;color:var(--bright);font-size:18px;font-weight:700}.hq-stat-block-value.accent-cost{color:var(--chart-1)}.hq-stat-block-value.accent-tokens{color:var(--chart-2)}.hq-stat-block-value.accent-tools{color:var(--chart-3)}.hq-stat-block-sub{color:var(--dim);font-variant-numeric:tabular-nums;font-size:11px}.hq-stat-row{flex-wrap:wrap;gap:10px;display:flex}.hq-text-dim{color:var(--dim)}.hq-text-muted{color:var(--muted)}.hq-text-bright{color:var(--bright);font-weight:700}.hq-ml-auto{margin-left:auto}.hq-mt-8{margin-top:8px}.hq-mt-12{margin-top:12px}.hq-row-baseline{align-items:baseline}.hq-text-center{text-align:center}.hq-card-title.hq-title-inline,.hq-title-inline{margin:0}.hq-empty.hq-pad-sm{padding:8px;font-size:12px}.hq-empty.hq-pad-md{padding:16px;font-size:12px}.hq-cockpit-empty{padding:14px;font-size:12px}.hq-cockpit-section-title{color:var(--bright);margin:0;font-size:13px;font-weight:700}.hq-cockpit-cost-amount{color:var(--green)}.hljs{color:var(--text);background:0 0}.hljs-comment,.hljs-quote{color:color-mix(in oklab, var(--muted) 60%, transparent);font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-type,.hljs-literal{color:#f28dbc}.hljs-string,.hljs-attr,.hljs-template-tag,.hljs-template-variable{color:#64d488}.hljs-number,.hljs-symbol,.hljs-bullet{color:var(--primary)}.hljs-function .hljs-keyword,.hljs-title.function_,.hljs-title.class_,.hljs-title.class_.inherited__{color:#6cb6ff}.hljs-variable,.hljs-params{color:var(--text)}.hljs-tag,.hljs-name{color:#f47a95}.hljs-attribute,.hljs-property{color:#ffb055}.hljs-regexp{color:#49d3c5}.hljs-punctuation,.hljs-operator{color:color-mix(in oklab, var(--muted) 80%, var(--text))}.hljs-meta,.hljs-doctag,.hljs-section{color:var(--muted)}.hljs-addition{color:#64d488;background:#27915c1f}.hljs-deletion{color:#ff7a7a;background:#d322221f}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:600}.hljs-link{color:var(--primary);text-decoration:underline}:root[data-hq-theme=light] .hljs-keyword,:root[data-hq-theme=light] .hljs-selector-tag,:root[data-hq-theme=light] .hljs-type,:root[data-hq-theme=light] .hljs-literal{color:#9f2862}:root[data-hq-theme=light] .hljs-string,:root[data-hq-theme=light] .hljs-attr,:root[data-hq-theme=light] .hljs-template-tag,:root[data-hq-theme=light] .hljs-template-variable,:root[data-hq-theme=light] .hljs-addition{color:#146b39}:root[data-hq-theme=light] .hljs-function .hljs-keyword,:root[data-hq-theme=light] .hljs-title.function_,:root[data-hq-theme=light] .hljs-title.class_,:root[data-hq-theme=light] .hljs-title.class_.inherited__{color:#175aa3}:root[data-hq-theme=light] .hljs-tag,:root[data-hq-theme=light] .hljs-name,:root[data-hq-theme=light] .hljs-deletion{color:#b32947}:root[data-hq-theme=light] .hljs-attribute,:root[data-hq-theme=light] .hljs-property{color:#8b4b00}:root[data-hq-theme=light] .hljs-regexp{color:#08746c}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cockpit-DIEoqkG7.js","assets/rolldown-runtime-QTnfLwEv.js","assets/icons-9m5clYwH.js","assets/markdown-Cq9pnQX9.js","assets/fleet-map-DhxF-gdt.js","assets/vendor-DIU0H2e8.js","assets/fleet-topology-B3uTvH1s.js","assets/live-console-BMEdzPs2.js","assets/mailbox-BPdImpld.js","assets/use-backfilled-events-BGr4w2qq.js","assets/cost-DtYd1WXA.js","assets/brain-BnkIw8nW.js","assets/worktree-B9isI17f.js","assets/trends-p7bdJFIi.js","assets/alerts-Nd3-2kbb.js","assets/control-6Aw5wcrt.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{F as t,I as n,Ot as r,S as i,W as a,_ as o,a as s,c,ct as l,f as ee,ft as u,g as d,i as te,l as f,mt as ne,nt as p,o as re,ut as m,vt as ie,w as h,x as g,yt as _}from"./icons-9m5clYwH.js";import{t as v}from"./vendor-DIU0H2e8.js";import{i as y}from"./markdown-Cq9pnQX9.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var b=e(r(),1),ae=v(),x=e=>Symbol.iterator in e,S=e=>`entries`in e,C=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},oe=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function se(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:x(e)&&x(t)?S(e)&&S(t)?C(e,t):oe(e,t):C({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function w(e){let t=b.useRef(void 0);return n=>{let r=e(n);return se(t.current,r)?t.current:t.current=r}}var T=`wrongstack.hq.token.v1`;function E(){if(typeof window>`u`)return null;try{let e=new URLSearchParams(window.location.search).get(`token`);return e!==null&&e.length>0?e:null}catch{return null}}function D(){if(typeof window>`u`)return null;try{return window.sessionStorage??null}catch{return null}}function O(){try{let e=D()?.getItem(T)??null;return e!==null&&e.length>0?e:null}catch{return null}}function k(e){try{D()?.setItem(T,e)}catch{}}function ce(){try{D()?.removeItem(T)}catch{}}function A(){let e=E();return e===null?O():(k(e),e)}function le(){if(typeof window>`u`)return;let e=E();if(e!==null&&(k(e),O()===e))try{let e=new URL(window.location.href);e.searchParams.delete(`token`),window.history.replaceState(null,``,`${e.pathname}${e.search}${e.hash}`)}catch{}}function ue(){let e=A();return e===null?{}:{Authorization:`Bearer ${e}`}}function j(e,t){let n={...t?.headers??{},...ue()};return fetch(e,{...t,headers:n})}var M=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},de=(e=>e?M(e):M),fe=e=>e;function pe(e,t=fe){let n=b.useSyncExternalStore(e.subscribe,b.useCallback(()=>t(e.getState()),[e,t]),b.useCallback(()=>t(e.getInitialState()),[e,t]));return b.useDebugValue(n),n}var N=e=>{let t=de(e),n=e=>pe(t,e);return Object.assign(n,t),n},me=(e=>e?N(e):N);function P(e,t){let n=t.liveSessions??[],r=e.selectedSessionId===null?void 0:n.find(t=>t.sessionId===e.selectedSessionId),i=e.selectedAgentId===null||r?.agents.some(t=>t.id===e.selectedAgentId)===!0,a=e.selectedClientId===null||t.clients.some(t=>t.clientId===e.selectedClientId);return{snapshot:t,...e.selectedSessionId!==null&&r===void 0?{selectedSessionId:null,selectedAgentId:null}:i?{}:{selectedAgentId:null},...a?{}:{selectedClientId:null}}}function he(e,t){return e.timestamp===t.timestamp&&e.severity===t.severity&&e.message===t.message}var F=me()(e=>({snapshot:null,events:[],alerts:[],commandStatuses:[],activeView:`cockpit`,selectedSessionId:null,selectedAgentId:null,selectedClientId:null,connected:!1,authRequired:!1,setActiveView:t=>e({activeView:t}),selectSession:(t,n=null)=>e({selectedSessionId:t,selectedAgentId:n}),selectAgent:(t,n)=>e({selectedSessionId:t,selectedAgentId:n}),selectClient:t=>e({selectedClientId:t}),markAuthRequired:()=>e(e=>e.authRequired?{}:{authRequired:!0}),_hydrateSnapshot:t=>e(e=>e.snapshot===null?P(e,t):{}),_onSnapshot:t=>e(e=>({...P(e,t),connected:!0})),_onEvent:t=>e(e=>e.events.some(e=>e.id===t.id)?{}:{events:[...e.events,t].slice(-500)}),_onAlert:t=>e(e=>e.alerts.some(e=>he(e,t))?{}:{alerts:[...e.alerts,t].slice(-100)}),_onCommandStatus:t=>e(e=>{let n=e.commandStatuses.findIndex(e=>e.commandId===t.commandId);if(n<0)return{commandStatuses:[...e.commandStatuses,t].slice(-200)};let r=[...e.commandStatuses];return r[n]=t,{commandStatuses:r}}),_setConnected:t=>e({connected:t})}));async function I(e){let t;try{t=await j(e)}catch{throw Error(`Network error fetching ${e}`)}if(t.status===401)throw F.getState().markAuthRequired(),Error(`401 Unauthorized fetching ${e} — browser token required`);if(!t.ok)throw Error(`${t.status} ${t.statusText}`);try{return await t.json()}catch{throw Error(`Invalid JSON response from ${e}: ${t.status}`)}}async function ge(e){let t;try{t=await j(`/api/mailbox-send`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch{throw Error(`Network error sending mailbox message`)}if(t.status===401)throw F.getState().markAuthRequired(),Error(`401 Unauthorized — browser token required`);if(!t.ok){let e=await t.json().catch(()=>null),n=typeof e?.error==`string`?e.error:t.statusText||`HTTP ${t.status}`;throw Error(n)}try{return await t.json()}catch{throw Error(`Invalid JSON response from mailbox-send API`)}}async function _e(e,t,n){let r;try{r=await j(`/api/command`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({clientId:e,type:t,payload:n})})}catch{throw Error(`Network error sending command`)}if(r.status===401)throw F.getState().markAuthRequired(),Error(`401 Unauthorized — browser token required`);if(!r.ok){let e=(await r.json().catch(()=>null))?.error??(r.statusText||`HTTP ${r.status}`);throw Error(e)}try{return await r.json()}catch{throw Error(`Invalid JSON response from command API`)}}var L=`wrongstack.hq.local-prefs.v1`,R={appearance:{theme:`dark`},fleet:{scope:`all`,layout:`map`,machineId:``,projectId:``},console:{delivery:`steer`,subject:``,body:``},control:{cmdType:`steer`,abortTarget:`leader`,spawnRole:`bug-hunter`,spawnTask:``,steerTo:`leader`,steerSubject:``,steerBody:``,broadcastSubject:``,broadcastBody:``},mailbox:{query:``,types:[],priorities:[],includeCompleted:!0}},z=null,B=new Set;function V(){for(let e of B)e()}function H(e){return typeof structuredClone==`function`?structuredClone(e):JSON.parse(JSON.stringify(e))}function U(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ve(){if(typeof window>`u`||window.localStorage===void 0)return H(R);try{let e=window.localStorage.getItem(L);return e===null?H(R):ye(JSON.parse(e))}catch{return H(R)}}function ye(e){if(!U(e))return H(R);let t=U(e.appearance)?e.appearance:{},n=U(e.fleet)?e.fleet:{},r=U(e.console)?e.console:{},i=U(e.control)?e.control:{},a=U(e.mailbox)?e.mailbox:{};return{appearance:{theme:t.theme===`light`?`light`:`dark`},fleet:{scope:n.scope===`machine`||n.scope===`project`?n.scope:`all`,layout:n.layout===`compact`?`compact`:`map`,machineId:typeof n.machineId==`string`?n.machineId:``,projectId:typeof n.projectId==`string`?n.projectId:``},console:{delivery:r.delivery===`btw`||r.delivery===`queue`?r.delivery:`steer`,subject:typeof r.subject==`string`?r.subject:``,body:typeof r.body==`string`?r.body:``},control:{cmdType:i.cmdType===`btw`||i.cmdType===`queue`||i.cmdType===`abort`||i.cmdType===`spawn`||i.cmdType===`broadcast`||i.cmdType===`run-command`?i.cmdType:R.control.cmdType,abortTarget:i.abortTarget===`fleet`?`fleet`:`leader`,spawnRole:typeof i.spawnRole==`string`&&i.spawnRole.length>0?i.spawnRole:R.control.spawnRole,spawnTask:typeof i.spawnTask==`string`?i.spawnTask:R.control.spawnTask,steerTo:typeof i.steerTo==`string`?i.steerTo:R.control.steerTo,steerSubject:typeof i.steerSubject==`string`?i.steerSubject:R.control.steerSubject,steerBody:typeof i.steerBody==`string`?i.steerBody:R.control.steerBody,broadcastSubject:typeof i.broadcastSubject==`string`?i.broadcastSubject:R.control.broadcastSubject,broadcastBody:typeof i.broadcastBody==`string`?i.broadcastBody:R.control.broadcastBody},mailbox:{query:typeof a.query==`string`?a.query:R.mailbox.query,types:Array.isArray(a.types)?a.types.filter(e=>typeof e==`string`):[],priorities:Array.isArray(a.priorities)?a.priorities.filter(e=>typeof e==`string`):[],includeCompleted:typeof a.includeCompleted==`boolean`?a.includeCompleted:!0}}}function W(){return z===null&&(z=ve()),z}function G(e){if(!(typeof window>`u`||window.localStorage===void 0))try{window.localStorage.setItem(L,JSON.stringify(e))}catch{}}function be(e){return B.add(e),()=>B.delete(e)}function xe(){return W()}function Se(){return R}function K(){return(0,b.useSyncExternalStore)(be,xe,Se)}function Ce(e){let t=W();z={...t,control:{...t.control,...e}},G(z),V()}function we(e){let t=W();z={...t,appearance:{...t.appearance,...e}},G(z),V()}function Te(e){let t=W();z={...t,fleet:{...t.fleet,...e}},G(z),V()}function Ee(e){let t=W();z={...t,console:{...t.console,...e}},G(z),V()}function De(e){let t=W();z={...t,mailbox:{...t.mailbox,...e}},G(z),V()}var q=y();function Oe({hadToken:e}){let[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)(null);(0,b.useEffect)(()=>{fetch(`/api/auth/status`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).then(n).catch(()=>i(`Could not load HQ auth status.`))},[]);let a=t?.tokenMode??!0,o=t?.passwordMode??!1,[s,c]=(0,b.useState)(o&&!a?`password`:`token`);return r?(0,q.jsx)(`div`,{className:`hq-token-gate`,children:(0,q.jsxs)(`div`,{className:`hq-token-card`,children:[(0,q.jsx)(`div`,{className:`hq-brand`,children:`WrongStack HQ`}),(0,q.jsx)(`div`,{className:`hq-token-title`,children:`Auth status unavailable`}),(0,q.jsx)(`p`,{className:`hq-token-text`,children:r})]})}):t?(0,q.jsx)(`div`,{className:`hq-token-gate`,children:(0,q.jsxs)(`div`,{className:`hq-token-card`,children:[(0,q.jsx)(`div`,{className:`hq-brand`,children:`WrongStack HQ`}),a&&o?(0,q.jsxs)(`div`,{className:`hq-token-tabs`,children:[(0,q.jsx)(`button`,{type:`button`,className:`hq-token-tab`+(s===`token`?` active`:``),onClick:()=>c(`token`),children:`Browser token`}),(0,q.jsx)(`button`,{type:`button`,className:`hq-token-tab`+(s===`password`?` active`:``),onClick:()=>c(`password`),children:`Password`})]}):null,s===`token`||!o?(0,q.jsx)(ke,{hadToken:e}):(0,q.jsx)(Ae,{})]})}):(0,q.jsx)(`div`,{className:`hq-token-gate`,children:(0,q.jsxs)(`div`,{className:`hq-token-card`,children:[(0,q.jsx)(`div`,{className:`hq-brand`,children:`WrongStack HQ`}),(0,q.jsx)(`div`,{className:`hq-token-title`,children:`Checking auth mode…`})]})})}function ke({hadToken:e}){let[t,n]=(0,b.useState)(``),r=()=>{let e=t.trim();e.length!==0&&(k(e),window.location.reload())};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`hq-token-title`,children:`Browser token required`}),(0,q.jsx)(`p`,{className:`hq-token-text`,children:e?`The saved token was rejected — it may have been revoked or the server was reset. Paste a current browser token.`:`This HQ server runs in token mode. Paste the browser token printed at startup (the ?token= value in the URL wstack --hq shows).`}),(0,q.jsx)(`input`,{className:`hq-token-input`,type:`password`,placeholder:`browser token`,value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&r()}}),(0,q.jsx)(`button`,{type:`button`,className:`hq-token-submit`,onClick:r,disabled:t.trim().length===0,children:`Connect`}),(0,q.jsxs)(`p`,{className:`hq-token-hint`,children:[`Manage tokens with `,(0,q.jsx)(`code`,{children:`wstack hq token list`}),` / `,(0,q.jsx)(`code`,{children:`wstack hq token create`}),` — they live in `,(0,q.jsx)(`code`,{children:`~/.wrongstack/hq/auth.json`}),`.`]})]})}function Ae(){let[e,t]=(0,b.useState)(``),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(!1),o=async()=>{let t=e;if(t.length!==0){a(!0),r(null);try{let e=await fetch(`/api/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({password:t})});if(!e.ok){let t=`Login failed.`;try{let n=(await e.json()).error;typeof n==`string`?t=n:typeof n?.message==`string`&&(t=n.message)}catch{}r(t),a(!1);return}ce(),window.location.reload()}catch{r(`Network error. Is the HQ server running?`),a(!1)}}};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`hq-token-title`,children:`Password required`}),(0,q.jsx)(`p`,{className:`hq-token-text`,children:`This HQ server is protected by a password. Enter it to open the dashboard.`}),n?(0,q.jsx)(`p`,{className:`hq-token-error`,children:n}):null,(0,q.jsx)(`input`,{className:`hq-token-input`,type:`password`,placeholder:`password`,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{e.key===`Enter`&&o()}}),(0,q.jsx)(`button`,{type:`button`,className:`hq-token-submit`,onClick:()=>void o(),disabled:e.length===0||i,children:i?`Logging in…`:`Log in`}),(0,q.jsxs)(`p`,{className:`hq-token-hint`,children:[`Set or change the password with `,(0,q.jsx)(`code`,{children:`wstack --hq --password <secret>`}),` on first run.`]})]})}var je=`modulepreload`,Me=function(e){return`/`+e},J={},Y=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=Me(t,n),t=s(t),t in J)return;J[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:je,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},X=[{id:`cockpit`,label:`Cockpit`,eyebrow:`Fleet overview`,description:`Health, active work, alerts, cost and command shortcuts.`,group:`Operations`,icon:t,shortcut:1},{id:`fleet`,label:`Fleet Map`,eyebrow:`Topology`,description:`Machines, projects, terminals and agents in one live graph.`,group:`Operations`,icon:g,shortcut:2},{id:`console`,label:`Live Console`,eyebrow:`Transcripts`,description:`Stream and inspect session or agent conversations.`,group:`Operations`,icon:h,shortcut:3},{id:`mailbox`,label:`Mailbox`,eyebrow:`Coordination`,description:`Cross-project messages, unread work and direct delivery.`,group:`Operations`,icon:n,shortcut:4},{id:`alerts`,label:`Alerts`,eyebrow:`Attention`,description:`Active fleet warnings and alert transition history.`,group:`Intelligence`,icon:u,shortcut:5},{id:`cost`,label:`Cost`,eyebrow:`Economics`,description:`Project, provider and model spending distribution.`,group:`Intelligence`,icon:p,shortcut:6},{id:`trends`,label:`Trends`,eyebrow:`Telemetry`,description:`Cost, token and tool activity over time.`,group:`Intelligence`,icon:l,shortcut:7},{id:`brain`,label:`Brain`,eyebrow:`Decisions`,description:`Autonomous decisions, escalations and interventions.`,group:`Intelligence`,icon:m,shortcut:8},{id:`worktree`,label:`Worktrees`,eyebrow:`Workspace`,description:`Distributed branches, worktrees and ownership state.`,group:`System`,icon:a,shortcut:9},{id:`control`,label:`Control`,eyebrow:`Command plane`,description:`Steer, queue, broadcast and audit remote commands.`,group:`System`,icon:o,shortcut:0}],Ne=[`Operations`,`Intelligence`,`System`],Pe={cockpit:(0,b.lazy)(()=>Y(()=>import(`./cockpit-DIEoqkG7.js`).then(e=>({default:e.CockpitView})),__vite__mapDeps([0,1,2,3]))),fleet:(0,b.lazy)(()=>Y(()=>import(`./fleet-map-DhxF-gdt.js`).then(e=>({default:e.FleetMapView})),__vite__mapDeps([4,1,2,5,3,6]))),console:(0,b.lazy)(()=>Y(()=>import(`./live-console-BMEdzPs2.js`).then(e=>({default:e.LiveConsoleView})),__vite__mapDeps([7,1,2,3,6,5]))),mailbox:(0,b.lazy)(()=>Y(()=>import(`./mailbox-BPdImpld.js`).then(e=>({default:e.MailboxView})),__vite__mapDeps([8,1,2,3,9]))),cost:(0,b.lazy)(()=>Y(()=>import(`./cost-DtYd1WXA.js`).then(e=>({default:e.CostView})),__vite__mapDeps([10,1,2,3]))),brain:(0,b.lazy)(()=>Y(()=>import(`./brain-BnkIw8nW.js`).then(e=>({default:e.BrainView})),__vite__mapDeps([11,2,1,3,9]))),worktree:(0,b.lazy)(()=>Y(()=>import(`./worktree-B9isI17f.js`).then(e=>({default:e.WorktreeView})),__vite__mapDeps([12,1,2,3,9]))),trends:(0,b.lazy)(()=>Y(()=>import(`./trends-p7bdJFIi.js`).then(e=>({default:e.TrendsView})),__vite__mapDeps([13,1,2,3]))),alerts:(0,b.lazy)(()=>Y(()=>import(`./alerts-Nd3-2kbb.js`).then(e=>({default:e.AlertsView})),__vite__mapDeps([14,1,2,3]))),control:(0,b.lazy)(()=>Y(()=>import(`./control-6Aw5wcrt.js`).then(e=>({default:e.ControlView})),__vite__mapDeps([15,1,2,3])))};function Fe(e){return X.find(t=>t.id===e)??X[0]}var Ie=class extends b.Component{state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e.message:String(e)}}componentDidUpdate(e){e.view!==this.props.view&&this.state.error!==null&&this.setState({error:null})}render(){return this.state.error===null?this.props.children:(0,q.jsxs)(`div`,{className:`hq-view-error`,role:`alert`,children:[(0,q.jsx)(f,{size:22}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:`This HQ surface stopped safely.`}),(0,q.jsx)(`p`,{children:this.state.error})]}),(0,q.jsxs)(`button`,{type:`button`,className:`hq-btn secondary`,onClick:()=>this.setState({error:null}),children:[(0,q.jsx)(d,{size:13}),`Retry view`]})]})}};function Le(){let{snapshot:e,alerts:t,activeView:n,authRequired:r,connected:a}=F(w(e=>({snapshot:e.snapshot,alerts:e.alerts,activeView:e.activeView,authRequired:e.authRequired,connected:e.connected}))),[o,l]=(0,b.useState)(()=>typeof window>`u`||window.innerWidth>=1180),{theme:u}=K().appearance;if((0,b.useEffect)(()=>(document.documentElement.dataset.hqTheme=u,()=>{delete document.documentElement.dataset.hqTheme}),[u]),(0,b.useEffect)(()=>{let e=!1;return I(`/api/snapshot`).then(t=>{e||F.getState()._hydrateSnapshot(t)}).catch(()=>{}),()=>{e=!0}},[]),(0,b.useEffect)(()=>{let e=e=>{if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`b`){e.preventDefault(),l(e=>!e);return}if(e.altKey&&/^\d$/.test(e.key)){let t=Number(e.key),n=X.find(e=>e.shortcut===t);n&&(e.preventDefault(),F.getState().setActiveView(n.id));return}e.key===`Escape`&&o&&window.innerWidth<900&&l(!1)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o]),r)return(0,q.jsx)(Oe,{hadToken:A()!==null});let d=e?.totals,f=d?.unreadMailboxMessages??0,m=t.filter(e=>e.severity!==`info`).length,h=Fe(n),g=h.icon,v=Pe[n],y=e=>{F.getState().setActiveView(e),window.innerWidth<900&&l(!1)};return(0,q.jsxs)(`div`,{className:`hq-app`,"data-theme":u,"data-testid":`hq-workbench`,children:[(0,q.jsx)(`button`,{type:`button`,className:`hq-sidebar-scrim`,"data-open":o,"aria-label":`Close HQ navigation`,onClick:()=>l(!1)}),(0,q.jsxs)(`aside`,{className:`hq-secondary-nav`,"data-open":o,"aria-label":`HQ navigation`,children:[(0,q.jsxs)(`div`,{className:`hq-secondary-header`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`hq-secondary-eyebrow`,children:`Command center`}),(0,q.jsx)(`strong`,{children:`WrongStack HQ`})]}),(0,q.jsx)(`button`,{type:`button`,className:`hq-icon-button hq-secondary-close`,"aria-label":`Collapse HQ navigation`,title:`Collapse navigation (Ctrl+B)`,onClick:()=>l(!1),children:(0,q.jsx)(_,{size:16})})]}),(0,q.jsx)(`div`,{className:`hq-secondary-scroll`,children:Ne.map(e=>(0,q.jsxs)(`section`,{className:`hq-nav-group`,children:[(0,q.jsx)(`div`,{className:`hq-nav-group-label`,children:e}),X.filter(t=>t.group===e).map(e=>{let t=e.icon,r=e.id===`mailbox`?f:e.id===`alerts`?m:0;return(0,q.jsxs)(`button`,{type:`button`,className:`hq-nav-item`,"data-active":n===e.id,"aria-current":n===e.id?`page`:void 0,onClick:()=>y(e.id),children:[(0,q.jsx)(t,{size:15}),(0,q.jsx)(`span`,{children:e.label}),(0,q.jsxs)(`kbd`,{children:[`Alt+`,e.shortcut]}),r>0?(0,q.jsx)(`span`,{className:`hq-nav-badge`,children:r}):null]},e.id)})]},e))}),(0,q.jsxs)(`div`,{className:`hq-secondary-footer`,children:[(0,q.jsxs)(`div`,{className:`hq-link-state`,"data-live":a,children:[(0,q.jsx)(`span`,{className:`hq-link-dot`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:a?`Connected`:`Reconnecting`}),(0,q.jsxs)(`span`,{children:[d?.activeMachines??0,` machines · `,d?.activeClients??0,` clients`]})]})]}),(0,q.jsx)(`span`,{className:`hq-build-label`,children:`@wrongstack/webui-hq`})]})]}),(0,q.jsxs)(`section`,{className:`hq-workbench`,children:[(0,q.jsxs)(`header`,{className:`hq-header`,children:[(0,q.jsx)(`button`,{type:`button`,className:`hq-icon-button hq-sidebar-toggle`,"aria-label":o?`Collapse HQ navigation`:`Expand HQ navigation`,"aria-expanded":o,title:`Toggle navigation (Ctrl+B)`,onClick:()=>l(e=>!e),children:o?(0,q.jsx)(_,{size:17}):(0,q.jsx)(ie,{size:17})}),(0,q.jsx)(`div`,{className:`hq-view-icon`,"aria-hidden":`true`,children:(0,q.jsx)(g,{size:18})}),(0,q.jsxs)(`div`,{className:`hq-view-identity`,children:[(0,q.jsx)(`span`,{children:h.eyebrow}),(0,q.jsx)(`h1`,{children:h.label}),(0,q.jsx)(`p`,{children:h.description})]}),(0,q.jsxs)(`div`,{className:`hq-top-metrics`,children:[(0,q.jsx)(Z,{icon:ee,label:`Machines`,value:d?.activeMachines??0}),(0,q.jsx)(Z,{icon:re,label:`Agents`,value:d?.activeAgents??0}),(0,q.jsx)(Z,{icon:ne,label:`Sessions`,value:d?.activeSessions??0}),(0,q.jsx)(Z,{icon:p,label:`Cost`,value:`$${(d?.totalCostUsd??0).toFixed(2)}`,accent:!0})]}),(0,q.jsxs)(`div`,{className:`hq-connection-pill`,"data-live":a,children:[a?(0,q.jsx)(te,{size:13}):(0,q.jsx)(s,{size:13}),a?`Live`:`Reconnecting`]}),(0,q.jsx)(`button`,{type:`button`,className:`hq-icon-button hq-theme-toggle`,"aria-label":`Switch to ${u===`dark`?`light`:`dark`} mode`,title:`Switch to ${u===`dark`?`light`:`dark`} mode`,onClick:()=>we({theme:u===`dark`?`light`:`dark`}),children:u===`dark`?(0,q.jsx)(c,{size:16}):(0,q.jsx)(i,{size:16})})]}),(0,q.jsx)(`main`,{className:`hq-main`,id:`hq-main`,tabIndex:-1,children:(0,q.jsx)(Ie,{view:n,children:(0,q.jsx)(b.Suspense,{fallback:(0,q.jsx)(Re,{label:h.label}),children:(0,q.jsx)(v,{})})})})]})]})}function Z({icon:e,label:t,value:n,accent:r=!1}){return(0,q.jsxs)(`div`,{className:`hq-top-metric`,"data-accent":r,children:[(0,q.jsx)(e,{size:12}),(0,q.jsx)(`span`,{children:t}),(0,q.jsx)(`strong`,{children:n})]})}function Re({label:e}){return(0,q.jsxs)(`div`,{className:`hq-view-loading`,role:`status`,children:[(0,q.jsx)(o,{size:18}),(0,q.jsxs)(`span`,{children:[`Loading `,e,`…`]})]})}var ze=25e3,Be=1e4,Ve=3e4,He=class{ws=null;handlers=new Set;stateHandlers=new Set;reconnectAttempt=0;reconnectTimer=null;heartbeatTimer=null;lastMessageAt=0;stopped=!1;_state=`disconnected`;url;maxRetries;heartbeatIntervalMs;heartbeatTimeoutMs;maxBackoffMs;constructor(e){if(this.maxRetries=e?.maxRetries??1/0,this.heartbeatIntervalMs=e?.heartbeatIntervalMs??ze,this.heartbeatTimeoutMs=e?.heartbeatTimeoutMs??Be,this.maxBackoffMs=e?.maxBackoffMs??Ve,e?.url)this.url=e.url;else{let e=typeof window<`u`?window.location:{host:`127.0.0.1:3499`,protocol:`http:`},t=e.protocol===`https:`?`wss:`:`ws:`,n=A(),r=`${t}//${e.host}/ws/browser`;this.url=n===null?r:`${r}?token=${encodeURIComponent(n)}`}}get state(){return this._state}get isConnected(){return this.ws?.readyState===WebSocket.OPEN}connect(){if(this.stopped||this.ws!==null)return;this.emitState(`connecting`);let e;try{e=new WebSocket(this.url)}catch{this.scheduleReconnect();return}this.ws=e,e.onopen=()=>{this.reconnectAttempt=0,this.lastMessageAt=Date.now(),this.emitState(`connected`),this.startHeartbeat()},e.onmessage=e=>{this.lastMessageAt=Date.now();try{let t=JSON.parse(typeof e.data==`string`?e.data:``);for(let e of this.handlers)try{e(t)}catch{}}catch{}},e.onclose=()=>this.handleClose(`close`),e.onerror=()=>this.handleClose(`error`)}close(){this.stopped=!0,this.stopHeartbeat(),this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws?.close(1e3,`client closed`),this.ws=null,this.emitState(`disconnected`)}on(e){return this.handlers.add(e),()=>this.handlers.delete(e)}onStateChange(e){return this.stateHandlers.add(e),e(this._state),()=>this.stateHandlers.delete(e)}handleClose(e){this.ws!==null&&(this.ws=null,this.stopHeartbeat(),this.scheduleReconnect())}scheduleReconnect(){if(this.stopped||this.reconnectTimer!==null)return;if(this.reconnectAttempt>=this.maxRetries){this.emitState(`disconnected`);return}let e=1e3*2**Math.min(this.reconnectAttempt,4)*(.5+Math.random()*.5),t=Math.min(e,this.maxBackoffMs);this.reconnectAttempt++,this.emitState(`reconnecting`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},t)}get isHeartbeatTimedOut(){return this.ws===null?!0:Date.now()-this.lastMessageAt>this.heartbeatIntervalMs+this.heartbeatTimeoutMs}startHeartbeat(){this.stopHeartbeat(),this.lastMessageAt=Date.now(),this.heartbeatTimer=setInterval(()=>{this.isHeartbeatTimedOut&&this.ws!==null&&(this.ws.close(4e3,`heartbeat timeout`),this.ws=null,this.scheduleReconnect())},this.heartbeatIntervalMs)}stopHeartbeat(){this.heartbeatTimer!==null&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}emitState(e){this._state=e;for(let t of this.stateHandlers)try{t(e)}catch{}}},Q=null;function Ue(){return Q===null&&(Q=new He,Q.connect()),Q}var $=document.getElementById(`root`);if($!==null){le();let e=Ue();e.onStateChange(e=>{F.getState()._setConnected(e===`connected`)}),e.on(e=>{e.type===`hq.snapshot`?F.getState()._onSnapshot(e.snapshot):e.type===`hq.event`?F.getState()._onEvent(e.event):e.type===`hq.alert`?F.getState()._onAlert(e):e.type===`hq.command_status`&&F.getState()._onCommandStatus(e.command)}),(0,ae.createRoot)($).render((0,q.jsx)(b.StrictMode,{children:(0,q.jsx)(Le,{})}))}export{K as a,ge as c,w as d,De as i,F as l,Ce as n,I as o,Te as r,_e as s,Ee as t,j as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{C as t,J as n,L as r,Ot as i,_ as a,_t as o,at as s,bt as c,dt as l,p as u,pt as d,w as f}from"./icons-9m5clYwH.js";import{i as p}from"./markdown-Cq9pnQX9.js";import{a as m,d as h,l as g,s as _,t as v}from"./index-v8d2cF2E.js";import{c as y,l as b,s as ee,t as x,u as S}from"./fleet-topology-B3uTvH1s.js";var C=e(i(),1);function w(e,t,n){if(e===null||t===null)return null;let r=(e.liveSessions??[]).find(e=>e.sessionId===t);if(r===void 0)return null;let i=e.sessions.find(e=>e.sessionId===t)?.clientId,a=r.clientId??i,o=e.clients.find(e=>e.connected&&e.clientId===a),s=e.clients.filter(e=>e.connected&&e.machineId===r.machineId&&e.projectId===r.projectId&&(r.pid===void 0||e.pid===r.pid)),c=(o?.capabilities.includes(`control.receive`)===!0?o:void 0)??s.find(e=>e.kind===r.clientKind&&e.capabilities.includes(`control.receive`))??s.find(e=>e.capabilities.includes(`control.receive`))??o??s[0],l=n===null?null:r.agents.find(e=>e.id===n)??null,u=n===null||n===`leader`?`leader`:n,d=e.clients.some(e=>e.connected&&e.projectId===r.projectId&&e.capabilities.includes(`mailbox.serve`));return{session:r,client:c??null,agent:l,recipient:u,controllable:c?.capabilities.includes(`control.receive`)===!0,mailboxServeActive:d}}var T=p();function E(e){let t=x(e),n=[],r=new Map,i=new Map,a=new Map,o=e=>`machine:${e.machineId}`,s=e=>`project:${e.machineId}:${e.projectId}`;for(let e of t.nodes){if(e.kind!==`machine`)continue;let t={id:e.id,label:e.label,sub:e.sub,projects:[]};r.set(e.id,t),n.push(t)}for(let e of t.nodes){if(e.kind!==`project`)continue;let t=r.get(o(e));if(t===void 0)continue;let n={id:e.id,label:e.label,clients:[]};i.set(e.id,n),t.projects.push(n)}for(let e of t.nodes){if(e.kind!==`terminal`||e.sessionId===void 0||e.serviceMode!==void 0)continue;let t=i.get(s(e));if(t===void 0)continue;let n={clientId:e.clientId,sessionId:e.sessionId,label:e.label,clientKind:e.clientKind,status:e.status,synthetic:e.isSyntheticSession===!0,agents:[]};a.set(e.sessionId,n),t.clients.push(n)}for(let e of t.nodes){if(e.kind!==`agent`||e.sessionId===void 0||e.agentId===void 0)continue;let t=a.get(e.sessionId);t!==void 0&&t.agents.push({id:e.agentId,label:e.label,status:e.status})}return n.map(e=>({...e,projects:e.projects.filter(e=>e.clients.length>0)})).filter(e=>e.projects.length>0)}function D(e){return e===`active`||e===`running`||e===`streaming`?`active`:e===`waiting_user`?`warn`:e===`error`||e===`stale`||e===`closing`?`error`:`idle`}function O({snapshot:e,selectedSessionId:r,selectedAgentId:i}){let a=(0,C.useMemo)(()=>E(e),[e]),[c,u]=(0,C.useState)(new Set),d=e=>u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return a.length===0?(0,T.jsx)(`div`,{className:`hq-fleetnav`,children:(0,T.jsx)(`div`,{className:`hq-empty hq-pad-md`,children:`No live sessions. Open a WrongStack CLI/TUI/WebUI connected to HQ.`})}):(0,T.jsx)(`div`,{className:`hq-fleetnav`,role:`tree`,"aria-label":`Fleet navigator`,children:a.map(e=>{let a=!c.has(e.id);return(0,T.jsxs)(`div`,{className:`hq-nav-machine`,children:[(0,T.jsxs)(`button`,{type:`button`,className:`hq-nav-row machine`,onClick:()=>d(e.id),"aria-expanded":a,children:[(0,T.jsx)(s,{size:12,className:`hq-nav-caret`+(a?` open`:``)}),(0,T.jsx)(t,{size:13}),(0,T.jsx)(`span`,{className:`hq-nav-label`,title:e.sub??e.label,children:e.label})]}),a&&e.projects.map(e=>{let t=!c.has(e.id);return(0,T.jsxs)(`div`,{className:`hq-nav-project`,children:[(0,T.jsxs)(`button`,{type:`button`,className:`hq-nav-row project`,onClick:()=>d(e.id),"aria-expanded":t,children:[(0,T.jsx)(s,{size:12,className:`hq-nav-caret`+(t?` open`:``)}),(0,T.jsx)(n,{size:13}),(0,T.jsx)(`span`,{className:`hq-nav-label`,title:e.label,children:e.label})]}),t&&e.clients.map(e=>{let t=!c.has(e.sessionId),n=r===e.sessionId&&i===null;return(0,T.jsxs)(`div`,{className:`hq-nav-client`,children:[(0,T.jsxs)(`div`,{className:`hq-nav-clientrow`,children:[e.agents.length>0?(0,T.jsx)(`button`,{type:`button`,className:`hq-nav-caretbtn`,onClick:()=>d(e.sessionId),"aria-label":t?`Collapse`:`Expand`,children:(0,T.jsx)(s,{size:12,className:`hq-nav-caret`+(t?` open`:``)})}):(0,T.jsx)(`span`,{className:`hq-nav-caretbtn`}),(0,T.jsxs)(`button`,{type:`button`,className:`hq-nav-row client`+(n?` selected`:``),disabled:e.synthetic,onClick:()=>{e.synthetic||(g.getState().selectSession(e.sessionId),e.clientId!==void 0&&g.getState().selectClient(e.clientId))},title:e.synthetic?`waiting for session telemetry`:e.label,children:[(0,T.jsx)(`span`,{className:`hq-nav-dot `+D(e.status)}),(0,T.jsx)(o,{size:12}),(0,T.jsx)(`span`,{className:`hq-nav-label`,children:e.label}),e.agents.length>0&&(0,T.jsx)(`span`,{className:`hq-nav-count`,children:e.agents.length})]})]}),t&&e.agents.map(t=>(0,T.jsxs)(`button`,{type:`button`,className:`hq-nav-row agent`+(r===e.sessionId&&i===t.id?` selected`:``),onClick:()=>{g.getState().selectAgent(e.sessionId,t.id),e.clientId!==void 0&&g.getState().selectClient(e.clientId)},title:t.label,children:[(0,T.jsx)(`span`,{className:`hq-nav-dot `+D(t.status)}),(0,T.jsx)(l,{size:12}),(0,T.jsx)(`span`,{className:`hq-nav-label`,children:t.label})]},t.id))]},e.sessionId)})]},e.id)})]},e.id)})})}function k(e){return e===`completed`?`active`:e===`failed`||e===`rejected`?`error`:e===`delivered`||e===`accepted`?`info`:`warn`}function A({receipt:e,lifecycle:t}){let n=new Date(e.createdAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),r=(0,T.jsx)(`span`,{className:`hq-pill ${k(t)}`,"aria-label":`Command ${t}`,children:t});return e.type===`abort`?(0,T.jsx)(`div`,{className:`hq-chat-turn system hq-command-turn`,"data-command-id":e.commandId,children:(0,T.jsxs)(`span`,{className:`hq-chat-system-line`,children:[(0,T.jsx)(c,{size:12}),` `,e.preview,` `,r,(0,T.jsx)(`span`,{className:`hq-chat-clock`,children:n})]})}):(0,T.jsx)(`div`,{className:`hq-chat-turn user hq-command-turn`,"data-command-id":e.commandId,children:(0,T.jsxs)(`div`,{className:`hq-chat-bubble user`,children:[(0,T.jsxs)(`div`,{className:`hq-chat-role`,children:[`you → `,e.target,` · `,e.type,` `,r,(0,T.jsx)(`span`,{className:`hq-chat-clock`,children:n})]}),(0,T.jsx)(`div`,{className:`hq-chat-prose`,children:e.preview})]})})}function j(){let{selectedSessionId:e,selectedAgentId:t,snapshot:n,commandStatuses:i}=g(h(e=>({selectedSessionId:e.selectedSessionId,selectedAgentId:e.selectedAgentId,snapshot:e.snapshot,commandStatuses:e.commandStatuses}))),o=e,s=t,p=s!==null,x=m().console,[E,D]=(0,C.useState)(x.delivery),[k,j]=(0,C.useState)(x.subject),[M,N]=(0,C.useState)(x.body),[P,F]=(0,C.useState)(!1),[I,L]=(0,C.useState)(null),[te,R]=(0,C.useState)(!1),[z,B]=(0,C.useState)(!1),[V,H]=(0,C.useState)([]),U=b(o,s),{entries:W,meta:G,stats:K}=U,q=(0,C.useMemo)(()=>V.filter(e=>{if(e.type===`abort`)return!0;let t=Date.parse(e.createdAt);return!W.some(n=>n.role===`user`&&n.text.trim()===e.preview&&Math.abs(Date.parse(n.ts)-t)<12e4)}),[W,V]);(0,C.useEffect)(()=>{if(!U.pinned||q.length===0)return;let e=window.requestAnimationFrame(()=>{U.listRef.current?.scrollToIndex(W.length+q.length-1,{align:`end`})});return()=>window.cancelAnimationFrame(e)},[U.listRef,U.pinned,W.length,q.length]);let J=()=>{U.jumpToLatest(),window.requestAnimationFrame(()=>{U.listRef.current?.scrollToIndex(W.length+q.length-1,{align:`end`})})},Y=(0,C.useMemo)(()=>w(n,o,s),[s,o,n]),X=Y?.agent??null,Z=Y?.recipient===`leader`,Q=X?.name??(Z?`Leader agent`:Y?.recipient??`agent`);(0,C.useEffect)(()=>{let e=Y?.client?.clientId;e!==void 0&&g.getState().selectClient(e),L(null),R(!1),B(!1),H([])},[Y?.client?.clientId,o,s]);let $=async()=>{if(Y?.client===null||Y?.client===void 0||!Y.controllable||M.trim().length===0)return;F(!0),L(null);let e=M.trim();try{let t=await _(Y.client.clientId,E,{to:Y.recipient,subject:k.trim()||`HQ ${E}`,body:e,priority:E===`steer`?`high`:`normal`});N(``),v({body:``}),H(n=>[...n,{commandId:t.commandId,type:E,target:Q,preview:e,createdAt:new Date().toISOString()}].slice(-8)),L({tone:`ok`,text:`${E} queued for ${Q} · ${t.commandId}`})}catch(e){L({tone:`error`,text:e instanceof Error?e.message:String(e)})}finally{F(!1)}},ne=async()=>{if(!(Y?.client===null||Y?.client===void 0)){F(!0),L(null);try{let e=await _(Y.client.clientId,`abort`,{target:Y.recipient});if(H(t=>[...t,{commandId:e.commandId,type:`abort`,target:Q,preview:`Interrupt ${Q}`,createdAt:new Date().toISOString()}].slice(-8)),Z&&z){let e=await _(Y.client.clientId,`abort`,{target:`fleet`});H(t=>[...t,{commandId:e.commandId,type:`abort`,target:`all subagents`,preview:`Interrupt every subagent on this client`,createdAt:new Date().toISOString()}].slice(-8))}L({tone:`ok`,text:Z&&z?`Leader interrupt queued; all subagents will be interrupted too.`:`${Q} interrupt queued.`}),R(!1)}catch(e){L({tone:`error`,text:e instanceof Error?e.message:String(e)})}finally{F(!1)}}};return(0,T.jsxs)(`div`,{className:`hq-console-shell`,children:[(0,T.jsx)(O,{snapshot:n??null,selectedSessionId:o,selectedAgentId:s}),(0,T.jsxs)(`div`,{className:`hq-console`,children:[(0,T.jsxs)(`div`,{className:`hq-chat-header`,children:[(0,T.jsx)(f,{size:15,className:`hq-chat-header-icon`}),(0,T.jsx)(`span`,{className:`hq-card-title hq-title-inline`,children:`Console`}),p&&(0,T.jsxs)(`span`,{className:`hq-pill active`,children:[(0,T.jsx)(l,{size:12}),` `,X?.name??s]}),G.projectName!==void 0&&!p&&(0,T.jsx)(`span`,{className:`hq-pill`,children:G.projectName}),Y!==null&&(0,T.jsxs)(`span`,{className:`hq-pill info`,title:Y.client?.clientId,children:[Y.session.hostname??Y.session.machineId,` ·`,` `,Y.session.clientKind.toUpperCase()]}),Y?.mailboxServeActive===!0&&(0,T.jsx)(`span`,{className:`hq-pill active`,children:`mailbox serve`}),G.source!==void 0&&(0,T.jsx)(`span`,{className:`hq-pill`,title:G.source===`disk`?`disk = full history replayed from this machine`:`stream = live ring only (remote or not yet persisted)`,children:G.source===`disk`?`full history`:`live ring`}),(0,T.jsxs)(`span`,{className:`hq-chat-counts`,children:[(0,T.jsxs)(`span`,{className:`hq-pill`,children:[K.turns+q.length,` turns`]}),(0,T.jsxs)(`span`,{className:`hq-pill`,children:[K.tools,` tools`]}),K.running>0&&(0,T.jsxs)(`span`,{className:`hq-pill running`,children:[K.running,` running`]}),K.errors>0&&(0,T.jsxs)(`span`,{className:`hq-pill error`,children:[K.errors,` err`]}),!p&&!U.full&&G.total>W.length&&(0,T.jsxs)(`button`,{type:`button`,className:`hq-btn secondary hq-chat-fullbtn`,onClick:()=>U.setFull(!0),title:`History is truncated — load all ${G.total} turns`,children:[(0,T.jsx)(r,{size:12}),` load all `,G.total]})]})]}),o===null?(0,T.jsx)(`div`,{className:`hq-empty`,children:`Pick a client or agent from the tree on the left.`}):U.loading&&W.length===0&&q.length===0?(0,T.jsx)(`div`,{className:`hq-empty`,children:p?`Loading agent history…`:`Loading transcript…`}):U.error===null?(0,T.jsxs)(`div`,{className:`hq-chat-scroll`,children:[W.length===0&&q.length===0?(0,T.jsx)(`div`,{className:`hq-empty`,children:p?`No messages from ${X?.name??s??`this agent`} yet.`:`No transcript entries yet.`}):(0,T.jsxs)(S,{ref:U.listRef,onScroll:U.onScroll,className:`hq-chat-vlist`,children:[W.map((e,t)=>(0,T.jsx)(`div`,{className:`hq-chat-rowpad`,children:(0,T.jsx)(ee,{entry:e,running:U.isRunningAt(e,t)})},y(e,t))),q.map(e=>{let t=i.find(t=>t.commandId===e.commandId);return(0,T.jsx)(`div`,{className:`hq-chat-rowpad`,"aria-live":`polite`,children:(0,T.jsx)(A,{receipt:e,lifecycle:t?.ackStatus??t?.status??`queued`})},`receipt:${e.commandId}`)})]}),!U.pinned&&(W.length>0||q.length>0)&&(0,T.jsx)(`button`,{type:`button`,className:`hq-chat-jump`,onClick:J,title:`Jump to latest`,children:(0,T.jsx)(d,{size:14})})]}):(0,T.jsxs)(`div`,{className:`hq-empty`,children:[`Error: `,U.error]}),o!==null&&(0,T.jsxs)(`div`,{className:`hq-console-composer`,children:[(0,T.jsxs)(`div`,{className:`hq-console-composer-head`,children:[(0,T.jsxs)(`span`,{children:[(0,T.jsx)(a,{size:13}),` Send to `,(0,T.jsx)(`strong`,{children:Q})]}),(0,T.jsx)(`span`,{className:`hq-pill ${Y?.controllable===!0?`active`:`error`}`,children:Y?.controllable===!0?`control live`:`read-only client`})]}),(0,T.jsxs)(`div`,{className:`hq-console-compose-row`,children:[(0,T.jsxs)(`select`,{className:`hq-select hq-console-delivery`,"aria-label":`Message delivery mode`,value:E,onChange:e=>{let t=e.target.value;D(t),v({delivery:t})},children:[(0,T.jsx)(`option`,{value:`steer`,children:`Steer now`}),(0,T.jsx)(`option`,{value:`btw`,children:`BTW / FYI`}),(0,T.jsx)(`option`,{value:`queue`,children:`Queue next`})]}),(0,T.jsx)(`input`,{className:`hq-input hq-console-subject`,"aria-label":`Message subject`,placeholder:`HQ ${E} (optional subject)`,value:k,onChange:e=>{j(e.target.value),v({subject:e.target.value})}}),(0,T.jsxs)(`button`,{type:`button`,className:`hq-btn danger hq-console-interrupt`,disabled:P||Y?.controllable!==!0,onClick:()=>{B(!1),R(!0)},children:[(0,T.jsx)(c,{size:13}),` Interrupt`]})]}),(0,T.jsxs)(`div`,{className:`hq-console-compose-row hq-console-message-row`,children:[(0,T.jsx)(`textarea`,{className:`hq-textarea hq-console-message`,"aria-label":`Message ${Q}`,placeholder:`Message ${Q}…`,rows:2,value:M,onChange:e=>{N(e.target.value),v({body:e.target.value})},onKeyDown:e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),$())}}),(0,T.jsxs)(`button`,{type:`button`,className:`hq-btn primary hq-console-send`,disabled:P||M.trim().length===0||Y?.controllable!==!0,onClick:()=>void $(),children:[(0,T.jsx)(u,{size:13}),` `,P?`Queueing…`:`Send`]})]}),(0,T.jsxs)(`div`,{className:`hq-console-compose-foot`,children:[(0,T.jsx)(`span`,{children:`Ctrl+Enter sends · steer interrupts at the next safe turn`}),I!==null&&(0,T.jsx)(`span`,{className:`hq-console-status ${I.tone}`,children:I.text})]})]})]}),te&&Y!==null&&(0,T.jsxs)(`div`,{className:`hq-confirm-layer`,role:`presentation`,children:[(0,T.jsx)(`button`,{type:`button`,className:`hq-confirm-scrim`,"aria-label":`Cancel interrupt`,onClick:()=>R(!1)}),(0,T.jsxs)(`section`,{className:`hq-confirm-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`hq-interrupt-title`,children:[(0,T.jsx)(c,{size:22,className:`hq-confirm-danger`}),(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`h2`,{id:`hq-interrupt-title`,children:[`Interrupt `,Q,`?`]}),(0,T.jsx)(`p`,{children:`The current run will stop at its cancellation boundary.`})]}),Z&&(0,T.jsxs)(`label`,{className:`hq-confirm-check`,children:[(0,T.jsx)(`input`,{type:`checkbox`,checked:z,onChange:e=>B(e.target.checked)}),`Also interrupt every subagent on this client`]}),(0,T.jsxs)(`div`,{className:`hq-confirm-actions`,children:[(0,T.jsx)(`button`,{type:`button`,className:`hq-btn secondary`,onClick:()=>R(!1),children:`Cancel`}),(0,T.jsxs)(`button`,{type:`button`,className:`hq-btn danger`,disabled:P,onClick:()=>void ne(),children:[(0,T.jsx)(c,{size:13}),` Confirm interrupt`]})]})]})]})]})}export{j as LiveConsoleView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{D as t,Dt as n,E as r,G as i,N as a,O as o,Ot as s,T as c,b as l,d as u,m as d,v as f}from"./icons-9m5clYwH.js";import{i as p}from"./markdown-Cq9pnQX9.js";import{a as m,c as h,d as g,i as _,l as v,u as y}from"./index-v8d2cF2E.js";import{t as b}from"./use-backfilled-events-BGr4w2qq.js";var x=e(s(),1),S=p(),C=[{value:`steer`,label:`steer — redirect the current work`},{value:`btw`,label:`btw — FYI, no action required`},{value:`queue`,label:`queue — note for the next agent`},{value:`broadcast`,label:`broadcast — all agents in the project`}];function w({projects:e,sender:t}){let n=t??h,[r,i]=(0,x.useState)(!1),[a,s]=(0,x.useState)(``),[c,l]=(0,x.useState)(`steer`),[u,d]=(0,x.useState)(`leader`),[f,p]=(0,x.useState)(`normal`),[m,g]=(0,x.useState)(``),[_,v]=(0,x.useState)(``),[y,b]=(0,x.useState)({phase:`idle`}),w=a||e[0]?.projectId||``,T=y.phase!==`sending`&&_.trim().length>0&&w.length>0,E=async()=>{if(T){b({phase:`sending`});try{b({phase:`sent`,messageId:(await n({projectId:w,type:c,...c===`broadcast`?{}:{to:u.trim()||`leader`},subject:m.trim()||`HQ prompt`,body:_.trim(),priority:f})).messageId}),v(``)}catch(e){b({phase:`error`,message:e instanceof Error?e.message:String(e)})}}};return r?(0,S.jsxs)(`div`,{className:`hq-card hq-composer`,children:[(0,S.jsxs)(`div`,{className:`hq-row hq-row-baseline`,children:[(0,S.jsx)(`span`,{className:`hq-card-title hq-title-inline`,children:`Send to project mailbox`}),(0,S.jsx)(`span`,{className:`hq-composer-hint`,children:`lands in the mailbox file — picked up by the next agent, no live client needed`}),(0,S.jsx)(`button`,{type:`button`,className:`hq-toggle hq-ml-auto`,"aria-label":`Collapse composer`,onClick:()=>i(!1),children:`▾`})]}),(0,S.jsxs)(`div`,{className:`hq-composer-grid`,children:[(0,S.jsxs)(`label`,{className:`hq-composer-field`,children:[(0,S.jsx)(`span`,{children:`project`}),(0,S.jsx)(`select`,{className:`hq-select`,value:w,onChange:e=>s(e.target.value),children:e.map(e=>(0,S.jsx)(`option`,{value:e.projectId,children:e.label??e.projectId},e.projectId))})]}),(0,S.jsxs)(`label`,{className:`hq-composer-field`,children:[(0,S.jsx)(`span`,{children:`type`}),(0,S.jsx)(`select`,{className:`hq-select`,value:c,onChange:e=>l(e.target.value),children:C.map(e=>(0,S.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),c!==`broadcast`&&(0,S.jsxs)(`label`,{className:`hq-composer-field`,children:[(0,S.jsx)(`span`,{children:`to`}),(0,S.jsx)(`input`,{className:`hq-input`,value:u,placeholder:`leader`,onChange:e=>d(e.target.value)})]}),(0,S.jsxs)(`label`,{className:`hq-composer-field`,children:[(0,S.jsx)(`span`,{children:`priority`}),(0,S.jsxs)(`select`,{className:`hq-select`,value:f,onChange:e=>p(e.target.value),children:[(0,S.jsx)(`option`,{value:`high`,children:`high`}),(0,S.jsx)(`option`,{value:`normal`,children:`normal`}),(0,S.jsx)(`option`,{value:`low`,children:`low`})]})]})]}),(0,S.jsx)(`input`,{className:`hq-input`,value:m,placeholder:`subject (optional)`,onChange:e=>g(e.target.value)}),(0,S.jsx)(`textarea`,{className:`hq-input hq-composer-body`,value:_,rows:3,placeholder:`Message body — e.g. “after the current task, run the full test suite”`,onChange:e=>v(e.target.value)}),(0,S.jsxs)(`div`,{className:`hq-row`,children:[(0,S.jsx)(`button`,{type:`button`,className:`hq-btn`,disabled:!T,onClick:()=>void E(),children:y.phase===`sending`?`Sending…`:`Send`}),y.phase===`sent`&&(0,S.jsxs)(`span`,{className:`hq-composer-status ok`,children:[`delivered`,y.messageId===void 0?``:` · ${y.messageId.slice(0,8)}`]}),y.phase===`error`&&(0,S.jsx)(`span`,{className:`hq-composer-status err`,title:y.message,children:y.message})]})]}):(0,S.jsxs)(`div`,{className:`hq-composer-bar`,children:[(0,S.jsxs)(`button`,{type:`button`,className:`hq-btn`,disabled:e.length===0,title:e.length===0?`No projects reported yet — connect a client first`:`Write a message into a project mailbox (works with zero connected agents)`,onClick:()=>i(!0),children:[(0,S.jsx)(o,{size:13}),` Compose`]}),y.phase===`sent`&&(0,S.jsxs)(`span`,{className:`hq-composer-status ok`,children:[`delivered`,y.messageId===void 0?``:` · ${y.messageId.slice(0,8)}`]})]})}function T(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.mailboxId==`string`&&(t.scope===`project`||t.scope===`global`)&&Array.isArray(t.messages)&&Array.isArray(t.agents)&&typeof t.totals==`object`&&t.totals!==null}function E(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.mailboxId==`string`&&typeof t.action==`string`&&(t.message===void 0||typeof t.message==`object`)}function D(e,t){let n=e.get(t);return n===void 0&&(n={projectId:t,messages:[],countersFromSnapshot:!1,onlineAgentCount:0,highPriorityCount:0,unreadCount:0,incompleteCount:0},e.set(t,n)),n}function O(e){let t=0,n=0,r=0;for(let i of e){let e=i.message;e.priority===`high`&&(t+=1),e.completed||(r+=1,(e.readCount??0)===0&&(n+=1))}return{highPriorityCount:t,unreadCount:n,incompleteCount:r}}function k(e){let t=new Map;for(let n of e)(t.get(n.message.mailId)===void 0||n.source===`event`)&&t.set(n.message.mailId,n);return Array.from(t.values()).sort((e,t)=>t.message.timestamp.localeCompare(e.message.timestamp))}function A(e,t){let n=new Map;if(e!==null)for(let t of e.mailboxes){let e=D(n,t.projectId);e.mailboxId=t.mailboxId,e.scope=t.scope,e.onlineAgentCount=t.onlineAgentCount,e.highPriorityCount=t.highPriorityCount,e.unreadCount=t.unreadCount,e.incompleteCount=t.incompleteCount,e.countersFromSnapshot=!0}for(let e of t){if(e.type!==`mailbox.snapshot`||!T(e.payload))continue;let t=e.payload,r=D(n,e.projectId);r.mailboxId=t.mailboxId,r.scope=t.scope;for(let n of t.messages)r.messages.push({message:n,source:`snapshot`,key:`s:${e.id}:${n.messageId}`,projectId:e.projectId})}let r=new Map;for(let e of t){if(e.type!==`mailbox.event`||!E(e.payload))continue;let t=e.payload,i=D(n,e.projectId);i.mailboxId=t.mailboxId,i.scope=i.scope??`project`,t.message!==void 0&&!r.has(t.message.mailId)&&(r.set(t.message.mailId,i),i.messages.push({message:t.message,source:`event`,key:`e:${t.message.mailId}:${e.seq}`,projectId:e.projectId})),t.agent?.online&&(i.onlineAgentCount+=1)}for(let e of n.values())if(e.messages=k(e.messages),!e.countersFromSnapshot){let t=O(e.messages);e.highPriorityCount=t.highPriorityCount,e.unreadCount=t.unreadCount,e.incompleteCount=t.incompleteCount}let i=Array.from(n.values()).sort((e,t)=>{let n=e.messages[0]?.message.timestamp??``;return(t.messages[0]?.message.timestamp??``).localeCompare(n)});return{projects:i,hasAnyActivity:i.some(e=>e.messages.length>0)}}var j=Object.freeze({types:new Set,priorities:new Set,projectIds:new Set,includeCompleted:!0,query:``});function M(e,t){switch(t.type){case`toggle-type`:{let n=new Set(e.types);return n.has(t.value)?n.delete(t.value):n.add(t.value),{...e,types:n}}case`toggle-priority`:{let n=new Set(e.priorities);return n.has(t.value)?n.delete(t.value):n.add(t.value),{...e,priorities:n}}case`toggle-project`:{let n=new Set(e.projectIds);return n.has(t.value)?n.delete(t.value):n.add(t.value),{...e,projectIds:n}}case`set-query`:return{...e,query:t.value};case`set-include-completed`:return{...e,includeCompleted:t.value};case`clear-all`:return j;default:return e}}function N(e,t={}){let n=t.includeCompleted??!0,r=t.types&&t.types.length>0?new Set(t.types):null,i=t.priorities&&t.priorities.length>0?new Set(t.priorities):null,a=t.projectIds&&t.projectIds.length>0?new Set(t.projectIds):null,o=t.query?.trim().toLowerCase()??``,s=t.limit??500,c=[];for(let t of e){let e=t.message;!n&&e.completed||r&&!r.has(e.type)||i&&!i.has(e.priority)||a||o.length>0&&!`${e.subject}\n${e.from}\n${e.to}\n${e.bodyPreview??``}`.toLowerCase().includes(o)||c.push({key:t.key,flat:t})}c.sort((e,t)=>{let n=t.flat.message.timestamp.localeCompare(e.flat.message.timestamp);return n===0?e.flat.message.mailId.localeCompare(t.flat.message.mailId):n});let l=c.length,u=l>s,d=u?c.slice(0,s):c;return{totalMatched:l,returned:d.length,truncated:u,entries:d}}function P(e,t,n={}){let{projectIds:r,...i}=n,a=A(e,t),o=[],s=r!==void 0&&r.length>0?new Set(r):null;for(let e of a.projects)s&&!s.has(e.projectId)||(o=o.concat(e.messages));return N(o,i)}function F(e){if(typeof e!=`object`||!e)return!1;let t=e;if(typeof t.error==`string`)return!0;if(typeof t.error!=`object`||t.error===null)return!1;let n=t.error;return typeof n.code==`string`&&typeof n.message==`string`}async function I(e){let t=await y(`/api/mailbox/messages/${encodeURIComponent(e.mailId)}/action`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(t.status===401&&v.getState().markAuthRequired(),!t.ok){let e=`${t.status} ${t.statusText}`;try{let n=await t.json();F(n)&&(e=typeof n.error==`string`?n.error:`${n.error.code}: ${n.error.message}`)}catch{}throw Error(`mailbox action failed — ${e}`)}return await t.json()}var L={markRead:e=>I({...e,action:`mark-read`}),acknowledge:e=>I({...e,action:`acknowledge`}),reopen:e=>I({...e,action:`reopen`}),softDelete:e=>I({...e,action:`soft-delete`}),restore:e=>I({...e,action:`restore`})};function R({mailId:e,actorId:t,projectId:n,isDeleted:r=!1,onAction:i,disabled:a=!1}){let[o,s]=(0,x.useState)(null),[c,l]=(0,x.useState)(null),u=async(t,n)=>{if(!(a||o!==null)){s(t),l(null);try{await n(),i?.(e,t)}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(null)}}},d={mailId:e,readerId:t,projectId:n};return(0,S.jsxs)(`div`,{className:`hq-msg-actions`,children:[!r&&(0,S.jsx)(`button`,{type:`button`,className:`hq-btn secondary`,disabled:a||o!==null,onClick:()=>u(`mark-read`,()=>L.markRead(d)),children:o===`mark-read`?`…`:`Mark read`}),!r&&(0,S.jsx)(`button`,{type:`button`,className:`hq-btn`,disabled:a||o!==null,onClick:()=>u(`acknowledge`,()=>L.acknowledge(d)),children:o===`acknowledge`?`…`:`Acknowledge`}),!r&&(0,S.jsx)(`button`,{type:`button`,className:`hq-btn secondary`,disabled:a||o!==null,onClick:()=>u(`reopen`,()=>L.reopen(d)),children:o===`reopen`?`…`:`Reopen`}),!r&&(0,S.jsx)(`button`,{type:`button`,className:`hq-btn danger`,disabled:a||o!==null,onClick:()=>u(`soft-delete`,()=>L.softDelete(d)),children:o===`soft-delete`?`…`:`Delete`}),r&&(0,S.jsx)(`button`,{type:`button`,className:`hq-btn secondary`,disabled:a||o!==null,onClick:()=>u(`restore`,()=>L.restore(d)),children:o===`restore`?`…`:`Restore`}),c!==null&&(0,S.jsx)(`span`,{className:`hq-msg-action-error`,title:c,children:c})]})}function z(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function B(e){return e.length<=14?e:`${e.slice(0,8)}…${e.slice(-4)}`}var V={note:{icon:l,tone:`info`},ask:{icon:a,tone:`warn`},assign:{icon:f,tone:`warn`},steer:{icon:a,tone:`warn`},btw:{icon:c,tone:`info`},broadcast:{icon:r,tone:`info`},status:{icon:i,tone:`idle`},result:{icon:n,tone:`running`},review:{icon:d,tone:`info`},control:{icon:u,tone:`error`}};Object.keys(V);var H=`hq-operator`;function U({flat:e,defaultExpanded:n}){let[r,i]=(0,x.useState)(!!n),a=e.message,o=a.hasBody||a.bodyPreview!==void 0&&a.bodyPreview.length>0,s=V[a.type]??{icon:t,tone:`info`},c=s.icon,l=`${a.from} → ${a.to}`;return(0,S.jsxs)(`div`,{className:`hq-msg`+(a.completed?` done`:``),children:[(0,S.jsxs)(`div`,{className:`hq-msg-head`,children:[(0,S.jsx)(`span`,{className:`hq-msg-icon`,title:a.type,children:(0,S.jsx)(c,{size:13})}),(0,S.jsx)(`span`,{className:`hq-pill `+s.tone,children:a.type}),a.priority===`high`&&(0,S.jsx)(`span`,{className:`hq-pill error`,children:`high`}),a.priority===`low`&&(0,S.jsx)(`span`,{className:`hq-pill idle`,children:`low`}),(0,S.jsx)(`span`,{className:`hq-msg-subject`,title:a.subject,children:a.subject||`(no subject)`}),(0,S.jsx)(`span`,{className:`hq-mono hq-msg-route`,children:l}),(0,S.jsx)(`span`,{className:`hq-mono hq-msg-time`,title:a.timestamp,children:z(a.timestamp)}),(0,S.jsx)(`span`,{className:`hq-mono hq-msg-id`,children:B(a.messageId)}),(0,S.jsx)(`span`,{className:`hq-msg-flag `+(a.completed?`done`:`open`),children:a.completed?`completed${a.completedBy===void 0?``:` by ${a.completedBy}`}`:`open`}),o&&(0,S.jsx)(`button`,{type:`button`,className:`hq-toggle hq-msg-toggle`,onClick:()=>i(e=>!e),"aria-expanded":r,"aria-label":r?`Collapse body`:`Expand body`,children:r?`▾`:`▸`})]}),r&&(0,S.jsxs)(`div`,{className:`hq-msg-body`,children:[a.bodyPreview!==void 0&&a.bodyPreview.length>0?(0,S.jsx)(`pre`,{className:`hq-msg-pre`,children:a.bodyPreview}):(0,S.jsx)(`div`,{className:`hq-empty hq-pad-sm`,children:`(empty body)`}),a.outcomePreview!==void 0&&a.outcomePreview.length>0&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`hq-msg-sublabel`,children:`outcome`}),(0,S.jsx)(`pre`,{className:`hq-msg-pre`,children:a.outcomePreview})]}),(0,S.jsxs)(`div`,{className:`hq-msg-meta`,children:[(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`strong`,{children:`source:`}),` `,e.source]}),a.replyTo!==void 0&&(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`strong`,{children:`reply to:`}),` `,B(a.replyTo)]}),a.senderSessionId!==void 0&&(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`strong`,{children:`sender session:`}),` `,B(a.senderSessionId)]}),(a.readCount??0)>0&&(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`strong`,{children:`reads:`}),` `,a.readCount]}),a.unreadCount!==void 0&&a.unreadCount>0&&(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`strong`,{children:`unread:`}),` `,a.unreadCount]}),a.task!==void 0&&(0,S.jsxs)(`span`,{children:[(0,S.jsx)(`strong`,{children:`task:`}),` `,a.task.taskId??`—`,a.task.agentName===void 0?``:` · ${a.task.agentName}`,a.task.status===void 0?``:` (${a.task.status})`]})]}),e.projectId!==void 0&&(0,S.jsx)(R,{mailId:a.mailId,actorId:H,projectId:e.projectId})]})]})}var W=[`ask`,`assign`,`steer`,`review`,`result`,`status`,`broadcast`,`note`,`btw`,`control`],G=[`high`,`normal`,`low`];function K({snapshot:e,events:t}={}){let n=v(e=>e.snapshot),r=e===void 0?n:e,i=t===void 0?v.getState().events:t,a=m(),[o,s]=(0,x.useReducer)(M,(0,x.useMemo)(()=>{let e=a.mailbox;return{types:new Set(e.types),priorities:new Set(e.priorities),projectIds:new Set,includeCompleted:e.includeCompleted,query:e.query}},[a.mailbox]));(0,x.useEffect)(()=>{_({query:o.query,types:Array.from(o.types),priorities:Array.from(o.priorities),includeCompleted:o.includeCompleted})},[o.query,o.types,o.priorities,o.includeCompleted]);let c=(0,x.useMemo)(()=>A(r??null,i).projects.map(e=>({projectId:e.projectId,count:e.messages.length})),[r,i]),l=(0,x.useMemo)(()=>P(r??null,i,{types:Array.from(o.types),priorities:Array.from(o.priorities),projectIds:Array.from(o.projectIds),includeCompleted:o.includeCompleted,query:o.query||void 0,limit:500}),[r,i,o]),u=o.types.size+o.priorities.size+o.projectIds.size+ +!o.includeCompleted+ +(o.query.trim().length>0);return(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`hq-card-title`,children:[`Live mailbox feed · `,l.returned,` of `,l.totalMatched,` message`,l.totalMatched===1?``:`s`,l.truncated?` · refined to fit`:``]}),(0,S.jsxs)(`div`,{className:`hq-card hq-mailbox-filterbar`,children:[(0,S.jsx)(`label`,{className:`hq-label`,htmlFor:`mailbox-live-query`,children:`Search`}),(0,S.jsx)(`input`,{id:`mailbox-live-query`,className:`hq-input`,value:o.query,onChange:e=>s({type:`set-query`,value:e.target.value}),placeholder:`subject / sender / recipient / body…`}),(0,S.jsx)(q,{title:`Types`,children:W.map(e=>(0,S.jsx)(J,{selected:o.types.has(e),label:e,onClick:()=>s({type:`toggle-type`,value:e})},e))}),(0,S.jsx)(q,{title:`Priority`,children:G.map(e=>(0,S.jsx)(J,{selected:o.priorities.has(e),label:e,tone:e===`high`?`error`:e===`low`?`idle`:`info`,onClick:()=>s({type:`toggle-priority`,value:e})},e))}),c.length>0&&(0,S.jsx)(q,{title:`Projects`,children:c.map(e=>(0,S.jsx)(J,{selected:o.projectIds.has(e.projectId),label:`${e.projectId} (${e.count})`,onClick:()=>s({type:`toggle-project`,value:e.projectId})},e.projectId))}),(0,S.jsxs)(`div`,{className:`hq-row hq-mailbox-filter-actions`,children:[(0,S.jsxs)(`label`,{className:`hq-check`,children:[(0,S.jsx)(`input`,{type:`checkbox`,checked:o.includeCompleted,onChange:e=>s({type:`set-include-completed`,value:e.target.checked})}),`include completed`]}),(0,S.jsxs)(`button`,{type:`button`,className:`hq-btn secondary`,disabled:u===0,onClick:()=>s({type:`clear-all`}),children:[`Clear filters`,u>0?` (${u})`:``]})]})]}),l.entries.length===0?(0,S.jsx)(`div`,{className:`hq-empty`,children:`No mailbox activity matches the current filters.`}):(0,S.jsx)(`div`,{className:`hq-msg-list hq-live-feed`,children:l.entries.map((e,t)=>(0,S.jsx)(U,{flat:e.flat,defaultExpanded:t===0&&o.query.trim().length>0},e.key))})]})}function q({title:e,children:t}){return(0,S.jsxs)(`div`,{className:`hq-filter-section`,children:[(0,S.jsx)(`div`,{className:`hq-msg-sublabel`,children:e}),(0,S.jsx)(`div`,{className:`hq-filter-chip-row`,children:t})]})}function J({selected:e,label:t,onClick:n,tone:r=`info`}){return(0,S.jsx)(`button`,{type:`button`,className:`hq-filter-chip hq-pill ${r}${e?` selected`:``}`,"aria-pressed":e,onClick:n,children:t})}function Y(){let{snapshot:e,events:t}=v(g(e=>({snapshot:e.snapshot,events:e.events}))),[n,r]=(0,x.useState)(`live`),{events:i}=b(`mailbox.event`,300),a=(0,x.useMemo)(()=>[...i,...t.filter(e=>e.type!==`mailbox.event`)],[i,t]),{projects:o,hasAnyActivity:s}=(0,x.useMemo)(()=>A(e,a),[e,a]),c=e?.totals.unreadMailboxMessages??0,l=e?.totals.incompleteMailboxMessages??0,u=(0,x.useMemo)(()=>{let t=new Map;for(let n of e?.projects??[])t.set(n.projectId,{projectId:n.projectId,label:n.projectName});for(let e of o)t.has(e.projectId)||t.set(e.projectId,{projectId:e.projectId});return Array.from(t.values())},[e,o]);return o.length===0&&u.length===0?(0,S.jsx)(`div`,{className:`hq-empty`,children:`No mailbox activity reported by connected clients.`}):(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`div`,{className:`hq-card-title`,children:[`Mailbox Activity — `,o.length,` project`,o.length===1?``:`s`,` ·`,` `,c,` unread · `,l,` incomplete`,s?` · showing detailed messages`:``]}),(0,S.jsx)(w,{projects:u}),(0,S.jsxs)(`div`,{className:`hq-mailbox-modebar`,role:`tablist`,"aria-label":`Mailbox view mode`,children:[(0,S.jsx)(`button`,{type:`button`,role:`tab`,className:`hq-btn secondary`+(n===`live`?` hq-btn-selected`:``),"aria-selected":n===`live`,onClick:()=>r(`live`),children:`Live feed`}),(0,S.jsx)(`button`,{type:`button`,role:`tab`,className:`hq-btn secondary`+(n===`grouped`?` hq-btn-selected`:``),"aria-selected":n===`grouped`,onClick:()=>r(`grouped`),children:`Grouped by project`})]}),n===`live`?(0,S.jsx)(K,{snapshot:e,events:a}):o.map(e=>(0,S.jsx)(X,{group:e},e.projectId))]})}function X({group:e}){let[t,n]=(0,x.useState)(!0);return(0,S.jsxs)(`div`,{className:`hq-card`,children:[(0,S.jsxs)(`div`,{className:`hq-row hq-row-baseline`,children:[(0,S.jsx)(`button`,{type:`button`,className:`hq-toggle`,onClick:()=>n(e=>!e),"aria-label":t?`Collapse project messages`:`Expand project messages`,children:t?`▾`:`▸`}),(0,S.jsx)(`span`,{className:`hq-text-bright`,children:e.projectId}),e.scope!==void 0&&(0,S.jsx)(`span`,{className:`hq-pill info`,children:e.scope}),e.mailboxId!==void 0&&(0,S.jsx)(`span`,{className:`hq-mono hq-text-dim`,children:e.mailboxId}),(0,S.jsxs)(`span`,{className:`hq-mono hq-text-dim hq-ml-auto`,children:[e.messages.length,` message`,e.messages.length===1?``:`s`]})]}),(0,S.jsxs)(`div`,{className:`hq-grid hq-mt-8`,style:{gridTemplateColumns:`repeat(5,1fr)`},children:[(0,S.jsx)(Z,{label:`messages`,value:e.messages.length}),(0,S.jsx)(Z,{label:`unread`,value:e.unreadCount,accent:e.unreadCount>0?`amber`:void 0}),(0,S.jsx)(Z,{label:`incomplete`,value:e.incompleteCount,accent:e.incompleteCount>0?`red`:void 0}),(0,S.jsx)(Z,{label:`high-priority`,value:e.highPriorityCount,accent:e.highPriorityCount>0?`red`:void 0}),(0,S.jsx)(Z,{label:`online agents`,value:e.onlineAgentCount,accent:e.onlineAgentCount>0?`green`:void 0})]}),t&&e.messages.length>0&&(0,S.jsx)(`div`,{className:`hq-msg-list hq-mt-12`,children:e.messages.map(e=>(0,S.jsx)(U,{flat:e},e.key))}),t&&e.messages.length===0&&(0,S.jsx)(`div`,{className:`hq-empty hq-cockpit-empty`,children:`Snapshot counters reported for this project, but no detailed mailbox events have streamed yet.`})]})}function Z({label:e,value:t,accent:n}){return(0,S.jsxs)(`div`,{className:`hq-text-center`,children:[(0,S.jsx)(`div`,{className:`hq-stat-num`,style:{color:n===`amber`?`var(--amber)`:n===`red`?`var(--red)`:n===`green`?`var(--green)`:`var(--text)`},children:t}),(0,S.jsx)(`div`,{className:`hq-stat-label`,children:e})]})}export{Y as MailboxView};
|