@futdevpro/ccap 1.1.3107 → 1.1.3125
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/cli/build/_commands/update.spec.d.ts +17 -0
- package/cli/build/_commands/update.spec.d.ts.map +1 -0
- package/cli/build/_commands/update.spec.js +147 -0
- package/cli/build/_commands/update.spec.js.map +1 -0
- package/client-dist/{agent-instances.module-X7PTNXBZ.js → agent-instances.module-3N6ANN67.js} +2 -2
- package/client-dist/ca.module-VKQKP6JP.js +5 -0
- package/client-dist/{ca.module-AHEFH36G.js.map → ca.module-VKQKP6JP.js.map} +3 -3
- package/client-dist/{cc-usage-dashboard.component-SCGVU2CH.js → cc-usage-dashboard.component-65FF5SWE.js} +2 -2
- package/client-dist/{cc.module-HRE2USKF.js → cc.module-BKTAO4S7.js} +2 -2
- package/client-dist/{chunk-5F7AZMBN.js → chunk-34ASVWQQ.js} +2 -2
- package/client-dist/{chunk-Q6LBW5ZA.js → chunk-3BIY7XPG.js} +2 -2
- package/client-dist/{chunk-H4QUFYYO.js → chunk-3EWLYCQY.js} +2 -2
- package/client-dist/{chunk-3VGB3L3K.js → chunk-45RYGYWU.js} +2 -2
- package/client-dist/{chunk-AIFKGWGZ.js → chunk-46VCON6Y.js} +2 -2
- package/client-dist/{chunk-ADOCMVHI.js → chunk-4EPTK7TX.js} +2 -2
- package/client-dist/{chunk-725PEGTE.js → chunk-57RF5FWV.js} +2 -2
- package/client-dist/{chunk-4Y3YU4VV.js → chunk-6NAFJLV5.js} +2 -2
- package/client-dist/{chunk-7BGF556S.js → chunk-7ELFOHXT.js} +2 -2
- package/client-dist/{chunk-F5YM4CH2.js → chunk-7UGLDNS5.js} +2 -2
- package/client-dist/{chunk-PCZCJ5US.js → chunk-A7WV3WRL.js} +2 -2
- package/client-dist/{chunk-M744VRDZ.js → chunk-AELBVLTQ.js} +2 -2
- package/client-dist/{chunk-HVEG7TDX.js → chunk-ALT4GOBR.js} +2 -2
- package/client-dist/{chunk-IJNLP24O.js → chunk-BSZUQJTF.js} +2 -2
- package/client-dist/{chunk-VVP5QPE2.js → chunk-C5SDBZ5G.js} +2 -2
- package/client-dist/{chunk-V3MC6IHV.js → chunk-C5WLCPTP.js} +2 -2
- package/client-dist/{chunk-BR2OEH55.js → chunk-DBF3SSPS.js} +2 -2
- package/client-dist/{chunk-M7XR4RHP.js → chunk-EHNLVVAY.js} +2 -2
- package/client-dist/{chunk-44B4MFA2.js → chunk-ES7OKROB.js} +2 -2
- package/client-dist/{chunk-IJZYOGOA.js → chunk-EUAB5X46.js} +2 -2
- package/client-dist/{chunk-QMSWKCFN.js → chunk-FIPZN6Q5.js} +2 -2
- package/client-dist/{chunk-3MGMSCZJ.js → chunk-FXN33EYC.js} +2 -2
- package/client-dist/chunk-HTF2IFDS.js +9 -0
- package/client-dist/chunk-HTF2IFDS.js.map +7 -0
- package/client-dist/{chunk-EDPWSLEJ.js → chunk-IA2MKRM5.js} +2 -2
- package/client-dist/{chunk-YKD7EBRH.js → chunk-IRCYROGT.js} +2 -2
- package/client-dist/{chunk-ZWO7VQQ7.js → chunk-KBLPP6PQ.js} +2 -2
- package/client-dist/{chunk-TAHRBJO4.js → chunk-MANX3UTJ.js} +2 -2
- package/client-dist/{chunk-DBG24LL5.js → chunk-NAHXFBXE.js} +2 -2
- package/client-dist/{chunk-HRRC3NLD.js → chunk-NJPJYDH6.js} +2 -2
- package/client-dist/{chunk-UT4EWNR6.js → chunk-NK4RLW4D.js} +2 -2
- package/client-dist/{chunk-EXMVCGPU.js → chunk-OZHMTJQJ.js} +2 -2
- package/client-dist/{chunk-SIEB5UUT.js → chunk-PATTK77E.js} +2 -2
- package/client-dist/{chunk-P5R6KXHA.js → chunk-PN5J6JP2.js} +2 -2
- package/client-dist/{chunk-U5G7I3PM.js → chunk-Q4Z4WTJ3.js} +2 -2
- package/client-dist/{chunk-QUNT2WPJ.js → chunk-QXM45TNB.js} +2 -2
- package/client-dist/{chunk-QUNT2WPJ.js.map → chunk-QXM45TNB.js.map} +1 -1
- package/client-dist/{chunk-SNGOTGBU.js → chunk-R5DCGGN5.js} +2 -2
- package/client-dist/{chunk-VPICQREQ.js → chunk-RO7BDRAB.js} +2 -2
- package/client-dist/{chunk-772D5UCV.js → chunk-RVZXTBBM.js} +2 -2
- package/client-dist/{chunk-SNX7UMSC.js → chunk-SC33BNLI.js} +2 -2
- package/client-dist/{chunk-2VC36Y3F.js → chunk-TCJ6WHLQ.js} +2 -2
- package/client-dist/{chunk-IUYZZJPL.js → chunk-TDVYMNCA.js} +2 -2
- package/client-dist/{chunk-N5BAPGOD.js → chunk-TU3VH4LZ.js} +2 -2
- package/client-dist/{chunk-HBLLM4VT.js → chunk-TWWHZRZD.js} +2 -2
- package/client-dist/{chunk-I2YW2Q64.js → chunk-UCATC7Y7.js} +2 -2
- package/client-dist/{chunk-GNGMQVNJ.js → chunk-UOOILECA.js} +2 -2
- package/client-dist/{chunk-NV7A2WEG.js → chunk-V46EMM4L.js} +2 -2
- package/client-dist/{chunk-TMZGSFBR.js → chunk-VM6JI2LV.js} +2 -2
- package/client-dist/{chunk-V2FE4UOS.js → chunk-WJTUNKFF.js} +2 -2
- package/client-dist/{chunk-H4KPNX6Y.js → chunk-WV4WOPQF.js} +2 -2
- package/client-dist/{chunk-GXH7TFVW.js → chunk-WWJB3AHB.js} +2 -2
- package/client-dist/{chunk-ODUTF4DP.js → chunk-XEGOHOPX.js} +2 -2
- package/client-dist/{chunk-RQ6URMIS.js → chunk-XRPVTKIP.js} +2 -2
- package/client-dist/{chunk-SREAQBYG.js → chunk-YIVWQSH4.js} +2 -2
- package/client-dist/{chunk-276XBODW.js → chunk-YPFW4KUX.js} +7 -7
- package/client-dist/chunk-YPFW4KUX.js.map +7 -0
- package/client-dist/{chunk-6ZYILL36.js → chunk-ZGNVQEFP.js} +2 -2
- package/client-dist/{chunk-LJ75BUDR.js → chunk-ZLSL5N3C.js} +2 -2
- package/client-dist/{consultant.module-VWZJPZLC.js → consultant.module-5G73QF4O.js} +2 -2
- package/client-dist/{crd.module-X4AZNBU3.js → crd.module-PF5ZYSFN.js} +2 -2
- package/client-dist/{dashboard.module-D6GYQMRW.js → dashboard.module-QIH6EALQ.js} +2 -2
- package/client-dist/{do.module-NDH2JFRB.js → do.module-IZT2TG65.js} +2 -2
- package/client-dist/{document-library.module-U4UF7O2G.js → document-library.module-OC3PF44G.js} +2 -2
- package/client-dist/{embedding-eval.module-WU52AOFQ.js → embedding-eval.module-FXSI4XED.js} +2 -2
- package/client-dist/{embedding-registry.module-HL4BYCBG.js → embedding-registry.module-W65CI3YZ.js} +2 -2
- package/client-dist/{err.module-MKHC7PNL.js → err.module-34QTGFAO.js} +2 -2
- package/client-dist/{feedback.module-JVEP7FXN.js → feedback.module-LWOMLYP2.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-TAQMHWZY.js → host-runtime-mcp.module-4GXDHVJV.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-PA6JFTVM.js → live-dev-pipeline.module-KB44IF3A.js} +2 -2
- package/client-dist/{logs.module-DDCOUURP.js → logs.module-S6JGYNTG.js} +2 -2
- package/client-dist/{main-F237R7CH.js → main-KV4C3EP5.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-OHIGJKXS.js → master-control-remote-poc.module-HSWDJ7AR.js} +2 -2
- package/client-dist/{mobile-app.module-USJXPWGU.js → mobile-app.module-CPULBFKG.js} +2 -2
- package/client-dist/{model-registry.module-GN625AEU.js → model-registry.module-SCIPNUN7.js} +2 -2
- package/client-dist/{oc.module-T4NESJ3J.js → oc.module-7SUQHFMM.js} +3 -3
- package/client-dist/{oc.module-T4NESJ3J.js.map → oc.module-7SUQHFMM.js.map} +3 -3
- package/client-dist/{orc.module-7OMMUAVJ.js → orc.module-UOTIRJKH.js} +2 -2
- package/client-dist/{project-management.module-BUQ4WMDF.js → project-management.module-SXG557HP.js} +2 -2
- package/client-dist/project-source-routed.module-JLUP6FXQ.js +2 -0
- package/client-dist/{scheduler.module-426MNXRU.js → scheduler.module-EED4H4OV.js} +2 -2
- package/client-dist/{session.module-AOUHRRCF.js → session.module-R4NYRIWY.js} +2 -2
- package/client-dist/{set.module-WTQQZANN.js → set.module-ZWXJCTIC.js} +2 -2
- package/client-dist/{setup.module-BYCCCF4Q.js → setup.module-STH35LIH.js} +2 -2
- package/client-dist/{terminals.module-7X5GXSDY.js → terminals.module-SZPN4HFG.js} +2 -2
- package/client-dist/{voice-notes-poc.module-ZZD3NWJE.js → voice-notes-poc.module-DSCGKJMG.js} +2 -2
- package/client-dist/{wfs.module-VFUPP5VV.js → wfs.module-CNAZGEUO.js} +2 -2
- package/package.json +1 -1
- package/client-dist/ca.module-AHEFH36G.js +0 -5
- package/client-dist/chunk-276XBODW.js.map +0 -7
- package/client-dist/chunk-UEPFY6HU.js +0 -9
- package/client-dist/chunk-UEPFY6HU.js.map +0 -7
- package/client-dist/project-source-routed.module-HBMJJWHZ.js +0 -2
- /package/client-dist/{agent-instances.module-X7PTNXBZ.js.map → agent-instances.module-3N6ANN67.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-SCGVU2CH.js.map → cc-usage-dashboard.component-65FF5SWE.js.map} +0 -0
- /package/client-dist/{cc.module-HRE2USKF.js.map → cc.module-BKTAO4S7.js.map} +0 -0
- /package/client-dist/{chunk-5F7AZMBN.js.map → chunk-34ASVWQQ.js.map} +0 -0
- /package/client-dist/{chunk-Q6LBW5ZA.js.map → chunk-3BIY7XPG.js.map} +0 -0
- /package/client-dist/{chunk-H4QUFYYO.js.map → chunk-3EWLYCQY.js.map} +0 -0
- /package/client-dist/{chunk-3VGB3L3K.js.map → chunk-45RYGYWU.js.map} +0 -0
- /package/client-dist/{chunk-AIFKGWGZ.js.map → chunk-46VCON6Y.js.map} +0 -0
- /package/client-dist/{chunk-ADOCMVHI.js.map → chunk-4EPTK7TX.js.map} +0 -0
- /package/client-dist/{chunk-725PEGTE.js.map → chunk-57RF5FWV.js.map} +0 -0
- /package/client-dist/{chunk-4Y3YU4VV.js.map → chunk-6NAFJLV5.js.map} +0 -0
- /package/client-dist/{chunk-7BGF556S.js.map → chunk-7ELFOHXT.js.map} +0 -0
- /package/client-dist/{chunk-F5YM4CH2.js.map → chunk-7UGLDNS5.js.map} +0 -0
- /package/client-dist/{chunk-PCZCJ5US.js.map → chunk-A7WV3WRL.js.map} +0 -0
- /package/client-dist/{chunk-M744VRDZ.js.map → chunk-AELBVLTQ.js.map} +0 -0
- /package/client-dist/{chunk-HVEG7TDX.js.map → chunk-ALT4GOBR.js.map} +0 -0
- /package/client-dist/{chunk-IJNLP24O.js.map → chunk-BSZUQJTF.js.map} +0 -0
- /package/client-dist/{chunk-VVP5QPE2.js.map → chunk-C5SDBZ5G.js.map} +0 -0
- /package/client-dist/{chunk-V3MC6IHV.js.map → chunk-C5WLCPTP.js.map} +0 -0
- /package/client-dist/{chunk-BR2OEH55.js.map → chunk-DBF3SSPS.js.map} +0 -0
- /package/client-dist/{chunk-M7XR4RHP.js.map → chunk-EHNLVVAY.js.map} +0 -0
- /package/client-dist/{chunk-44B4MFA2.js.map → chunk-ES7OKROB.js.map} +0 -0
- /package/client-dist/{chunk-IJZYOGOA.js.map → chunk-EUAB5X46.js.map} +0 -0
- /package/client-dist/{chunk-QMSWKCFN.js.map → chunk-FIPZN6Q5.js.map} +0 -0
- /package/client-dist/{chunk-3MGMSCZJ.js.map → chunk-FXN33EYC.js.map} +0 -0
- /package/client-dist/{chunk-EDPWSLEJ.js.map → chunk-IA2MKRM5.js.map} +0 -0
- /package/client-dist/{chunk-YKD7EBRH.js.map → chunk-IRCYROGT.js.map} +0 -0
- /package/client-dist/{chunk-ZWO7VQQ7.js.map → chunk-KBLPP6PQ.js.map} +0 -0
- /package/client-dist/{chunk-TAHRBJO4.js.map → chunk-MANX3UTJ.js.map} +0 -0
- /package/client-dist/{chunk-DBG24LL5.js.map → chunk-NAHXFBXE.js.map} +0 -0
- /package/client-dist/{chunk-HRRC3NLD.js.map → chunk-NJPJYDH6.js.map} +0 -0
- /package/client-dist/{chunk-UT4EWNR6.js.map → chunk-NK4RLW4D.js.map} +0 -0
- /package/client-dist/{chunk-EXMVCGPU.js.map → chunk-OZHMTJQJ.js.map} +0 -0
- /package/client-dist/{chunk-SIEB5UUT.js.map → chunk-PATTK77E.js.map} +0 -0
- /package/client-dist/{chunk-P5R6KXHA.js.map → chunk-PN5J6JP2.js.map} +0 -0
- /package/client-dist/{chunk-U5G7I3PM.js.map → chunk-Q4Z4WTJ3.js.map} +0 -0
- /package/client-dist/{chunk-SNGOTGBU.js.map → chunk-R5DCGGN5.js.map} +0 -0
- /package/client-dist/{chunk-VPICQREQ.js.map → chunk-RO7BDRAB.js.map} +0 -0
- /package/client-dist/{chunk-772D5UCV.js.map → chunk-RVZXTBBM.js.map} +0 -0
- /package/client-dist/{chunk-SNX7UMSC.js.map → chunk-SC33BNLI.js.map} +0 -0
- /package/client-dist/{chunk-2VC36Y3F.js.map → chunk-TCJ6WHLQ.js.map} +0 -0
- /package/client-dist/{chunk-IUYZZJPL.js.map → chunk-TDVYMNCA.js.map} +0 -0
- /package/client-dist/{chunk-N5BAPGOD.js.map → chunk-TU3VH4LZ.js.map} +0 -0
- /package/client-dist/{chunk-HBLLM4VT.js.map → chunk-TWWHZRZD.js.map} +0 -0
- /package/client-dist/{chunk-I2YW2Q64.js.map → chunk-UCATC7Y7.js.map} +0 -0
- /package/client-dist/{chunk-GNGMQVNJ.js.map → chunk-UOOILECA.js.map} +0 -0
- /package/client-dist/{chunk-NV7A2WEG.js.map → chunk-V46EMM4L.js.map} +0 -0
- /package/client-dist/{chunk-TMZGSFBR.js.map → chunk-VM6JI2LV.js.map} +0 -0
- /package/client-dist/{chunk-V2FE4UOS.js.map → chunk-WJTUNKFF.js.map} +0 -0
- /package/client-dist/{chunk-H4KPNX6Y.js.map → chunk-WV4WOPQF.js.map} +0 -0
- /package/client-dist/{chunk-GXH7TFVW.js.map → chunk-WWJB3AHB.js.map} +0 -0
- /package/client-dist/{chunk-ODUTF4DP.js.map → chunk-XEGOHOPX.js.map} +0 -0
- /package/client-dist/{chunk-RQ6URMIS.js.map → chunk-XRPVTKIP.js.map} +0 -0
- /package/client-dist/{chunk-SREAQBYG.js.map → chunk-YIVWQSH4.js.map} +0 -0
- /package/client-dist/{chunk-6ZYILL36.js.map → chunk-ZGNVQEFP.js.map} +0 -0
- /package/client-dist/{chunk-LJ75BUDR.js.map → chunk-ZLSL5N3C.js.map} +0 -0
- /package/client-dist/{consultant.module-VWZJPZLC.js.map → consultant.module-5G73QF4O.js.map} +0 -0
- /package/client-dist/{crd.module-X4AZNBU3.js.map → crd.module-PF5ZYSFN.js.map} +0 -0
- /package/client-dist/{dashboard.module-D6GYQMRW.js.map → dashboard.module-QIH6EALQ.js.map} +0 -0
- /package/client-dist/{do.module-NDH2JFRB.js.map → do.module-IZT2TG65.js.map} +0 -0
- /package/client-dist/{document-library.module-U4UF7O2G.js.map → document-library.module-OC3PF44G.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-WU52AOFQ.js.map → embedding-eval.module-FXSI4XED.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-HL4BYCBG.js.map → embedding-registry.module-W65CI3YZ.js.map} +0 -0
- /package/client-dist/{err.module-MKHC7PNL.js.map → err.module-34QTGFAO.js.map} +0 -0
- /package/client-dist/{feedback.module-JVEP7FXN.js.map → feedback.module-LWOMLYP2.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-TAQMHWZY.js.map → host-runtime-mcp.module-4GXDHVJV.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-PA6JFTVM.js.map → live-dev-pipeline.module-KB44IF3A.js.map} +0 -0
- /package/client-dist/{logs.module-DDCOUURP.js.map → logs.module-S6JGYNTG.js.map} +0 -0
- /package/client-dist/{main-F237R7CH.js.map → main-KV4C3EP5.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-OHIGJKXS.js.map → master-control-remote-poc.module-HSWDJ7AR.js.map} +0 -0
- /package/client-dist/{mobile-app.module-USJXPWGU.js.map → mobile-app.module-CPULBFKG.js.map} +0 -0
- /package/client-dist/{model-registry.module-GN625AEU.js.map → model-registry.module-SCIPNUN7.js.map} +0 -0
- /package/client-dist/{orc.module-7OMMUAVJ.js.map → orc.module-UOTIRJKH.js.map} +0 -0
- /package/client-dist/{project-management.module-BUQ4WMDF.js.map → project-management.module-SXG557HP.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-HBMJJWHZ.js.map → project-source-routed.module-JLUP6FXQ.js.map} +0 -0
- /package/client-dist/{scheduler.module-426MNXRU.js.map → scheduler.module-EED4H4OV.js.map} +0 -0
- /package/client-dist/{session.module-AOUHRRCF.js.map → session.module-R4NYRIWY.js.map} +0 -0
- /package/client-dist/{set.module-WTQQZANN.js.map → set.module-ZWXJCTIC.js.map} +0 -0
- /package/client-dist/{setup.module-BYCCCF4Q.js.map → setup.module-STH35LIH.js.map} +0 -0
- /package/client-dist/{terminals.module-7X5GXSDY.js.map → terminals.module-SZPN4HFG.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-ZZD3NWJE.js.map → voice-notes-poc.module-DSCGKJMG.js.map} +0 -0
- /package/client-dist/{wfs.module-VFUPP5VV.js.map → wfs.module-CNAZGEUO.js.map} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BUG-CLI-UPDATE-NOOP-AND-VERSION-DISPLAY-001 E3 (cycle 925) — `c_ccapUpdate`
|
|
3
|
+
* orchestration unit-tesztek. A 3 Pillar (auto-stop, skip-if-latest guard,
|
|
4
|
+
* post-update version-display fresh-read) viselkedését rögzíti.
|
|
5
|
+
*
|
|
6
|
+
* A flow lépéseit jasmine spyOn-nal mock-oljuk:
|
|
7
|
+
* - `CCAP_InstallContext_Util.isGlobalNpmInstall` (boolean guard)
|
|
8
|
+
* - `CCAP_UpdateVersionCheck_Util.getInstalledGlobalVersion` (verzió-snapshot,
|
|
9
|
+
* pre+post külön call)
|
|
10
|
+
* - `CCAP_UpdateVersionCheck_Util.getRemoteVersion` (registry verzió)
|
|
11
|
+
* - `CCAP_ProcessControl_Util.stopServerAndClientAsync` (Pillar 1 stop)
|
|
12
|
+
* - `CCAP_ProcessControl_Util.startServerAndClient` (Pillar 1 start utáni restart)
|
|
13
|
+
* - `CCAP_UpdateRunner_Util.runNpmUpdate` (Pillar 3 install-g-latest)
|
|
14
|
+
* - `CCAP_UpdateErrorBuffer_Util.append` (REQ-UPD-ERROR-HANDLING-001 buffer)
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=update.spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.spec.d.ts","sourceRoot":"","sources":["../../src/_commands/update.spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* BUG-CLI-UPDATE-NOOP-AND-VERSION-DISPLAY-001 E3 (cycle 925) — `c_ccapUpdate`
|
|
4
|
+
* orchestration unit-tesztek. A 3 Pillar (auto-stop, skip-if-latest guard,
|
|
5
|
+
* post-update version-display fresh-read) viselkedését rögzíti.
|
|
6
|
+
*
|
|
7
|
+
* A flow lépéseit jasmine spyOn-nal mock-oljuk:
|
|
8
|
+
* - `CCAP_InstallContext_Util.isGlobalNpmInstall` (boolean guard)
|
|
9
|
+
* - `CCAP_UpdateVersionCheck_Util.getInstalledGlobalVersion` (verzió-snapshot,
|
|
10
|
+
* pre+post külön call)
|
|
11
|
+
* - `CCAP_UpdateVersionCheck_Util.getRemoteVersion` (registry verzió)
|
|
12
|
+
* - `CCAP_ProcessControl_Util.stopServerAndClientAsync` (Pillar 1 stop)
|
|
13
|
+
* - `CCAP_ProcessControl_Util.startServerAndClient` (Pillar 1 start utáni restart)
|
|
14
|
+
* - `CCAP_UpdateRunner_Util.runNpmUpdate` (Pillar 3 install-g-latest)
|
|
15
|
+
* - `CCAP_UpdateErrorBuffer_Util.append` (REQ-UPD-ERROR-HANDLING-001 buffer)
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const install_context_util_1 = require("../_collections/install-context.util");
|
|
19
|
+
const process_control_util_1 = require("../_collections/process-control.util");
|
|
20
|
+
const update_error_buffer_util_1 = require("../_collections/update/update-error-buffer.util");
|
|
21
|
+
const update_runner_util_1 = require("../_collections/update/update-runner.util");
|
|
22
|
+
const update_version_check_util_1 = require("../_collections/update/update-version-check.util");
|
|
23
|
+
const update_1 = require("./update");
|
|
24
|
+
describe('CCAP_UpdateCommand_Util.c_ccapUpdate (BUG-CLI-UPDATE-NOOP-AND-VERSION-DISPLAY-001 E3)', () => {
|
|
25
|
+
let isGlobalSpy;
|
|
26
|
+
let getGlobalVersionSpy;
|
|
27
|
+
let getRemoteVersionSpy;
|
|
28
|
+
let stopSpy;
|
|
29
|
+
let startSpy;
|
|
30
|
+
let runNpmSpy;
|
|
31
|
+
let errorBufferSpy;
|
|
32
|
+
beforeEach(() => {
|
|
33
|
+
isGlobalSpy = spyOn(install_context_util_1.CCAP_InstallContext_Util, 'isGlobalNpmInstall').and.returnValue(true);
|
|
34
|
+
getGlobalVersionSpy = spyOn(update_version_check_util_1.CCAP_UpdateVersionCheck_Util, 'getInstalledGlobalVersion');
|
|
35
|
+
getRemoteVersionSpy = spyOn(update_version_check_util_1.CCAP_UpdateVersionCheck_Util, 'getRemoteVersion');
|
|
36
|
+
stopSpy = spyOn(process_control_util_1.CCAP_ProcessControl_Util, 'stopServerAndClientAsync')
|
|
37
|
+
.and.returnValue(Promise.resolve());
|
|
38
|
+
startSpy = spyOn(process_control_util_1.CCAP_ProcessControl_Util, 'startServerAndClient');
|
|
39
|
+
runNpmSpy = spyOn(update_runner_util_1.CCAP_UpdateRunner_Util, 'runNpmUpdate').and.returnValue(Promise.resolve({
|
|
40
|
+
success: true,
|
|
41
|
+
exitCode: 0,
|
|
42
|
+
errorMessage: '',
|
|
43
|
+
elapsedSec: 1.2,
|
|
44
|
+
}));
|
|
45
|
+
errorBufferSpy = spyOn(update_error_buffer_util_1.CCAP_UpdateErrorBuffer_Util, 'append');
|
|
46
|
+
});
|
|
47
|
+
it('| isGlobal=false + force=false → early return, semmit nem futtat', async () => {
|
|
48
|
+
isGlobalSpy.and.returnValue(false);
|
|
49
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: false });
|
|
50
|
+
expect(stopSpy).not.toHaveBeenCalled();
|
|
51
|
+
expect(runNpmSpy).not.toHaveBeenCalled();
|
|
52
|
+
expect(startSpy).not.toHaveBeenCalled();
|
|
53
|
+
});
|
|
54
|
+
it('| isGlobal=false + force=true → bypass guard, fut a teljes flow', async () => {
|
|
55
|
+
isGlobalSpy.and.returnValue(false);
|
|
56
|
+
getGlobalVersionSpy.and.returnValues('1.0.0', '1.0.0');
|
|
57
|
+
getRemoteVersionSpy.and.returnValues('1.0.1', '1.0.1');
|
|
58
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: true });
|
|
59
|
+
expect(stopSpy).toHaveBeenCalledTimes(1);
|
|
60
|
+
expect(runNpmSpy).toHaveBeenCalledTimes(1);
|
|
61
|
+
expect(startSpy).toHaveBeenCalledTimes(1);
|
|
62
|
+
});
|
|
63
|
+
it('| Pillar 2 skip-if-latest: globalVersion === remoteVersion + !force → early return success, NEM fut npm', async () => {
|
|
64
|
+
getGlobalVersionSpy.and.returnValue('1.5.0');
|
|
65
|
+
getRemoteVersionSpy.and.returnValue('1.5.0');
|
|
66
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: false });
|
|
67
|
+
expect(stopSpy).not.toHaveBeenCalled();
|
|
68
|
+
expect(runNpmSpy).not.toHaveBeenCalled();
|
|
69
|
+
expect(startSpy).not.toHaveBeenCalled();
|
|
70
|
+
});
|
|
71
|
+
it('| Pillar 2 force bypass: globalVersion === remoteVersion + force=true → fut a flow', async () => {
|
|
72
|
+
getGlobalVersionSpy.and.returnValues('1.5.0', '1.5.0');
|
|
73
|
+
getRemoteVersionSpy.and.returnValues('1.5.0', '1.5.0');
|
|
74
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: true });
|
|
75
|
+
expect(stopSpy).toHaveBeenCalledTimes(1);
|
|
76
|
+
expect(runNpmSpy).toHaveBeenCalledTimes(1);
|
|
77
|
+
expect(startSpy).toHaveBeenCalledTimes(1);
|
|
78
|
+
});
|
|
79
|
+
it('| Pillar 1 stop a runNpm ELŐTT: a hívási sorrend stop → run → start', async () => {
|
|
80
|
+
getGlobalVersionSpy.and.returnValues('1.0.0', '1.0.1');
|
|
81
|
+
getRemoteVersionSpy.and.returnValues('1.0.1', '1.0.1');
|
|
82
|
+
const order = [];
|
|
83
|
+
stopSpy.and.callFake(async () => { order.push('stop'); });
|
|
84
|
+
runNpmSpy.and.callFake(async () => {
|
|
85
|
+
order.push('run');
|
|
86
|
+
return { success: true, exitCode: 0, errorMessage: '', elapsedSec: 0.5 };
|
|
87
|
+
});
|
|
88
|
+
startSpy.and.callFake(() => { order.push('start'); });
|
|
89
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: false });
|
|
90
|
+
expect(order).toEqual(['stop', 'run', 'start']);
|
|
91
|
+
});
|
|
92
|
+
it('| Pillar 3 post-update fresh fs-read: getInstalledGlobalVersion 2× hívva (pre+post)', async () => {
|
|
93
|
+
getGlobalVersionSpy.and.returnValues('1.0.0', '1.0.1');
|
|
94
|
+
getRemoteVersionSpy.and.returnValues('1.0.1', '1.0.1');
|
|
95
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: false });
|
|
96
|
+
expect(getGlobalVersionSpy).toHaveBeenCalledTimes(2);
|
|
97
|
+
});
|
|
98
|
+
it('| Pillar 3 post-update version-display detektálja az emelkedést (pre 1.0.0 → post 1.0.1)', async () => {
|
|
99
|
+
getGlobalVersionSpy.and.returnValues('1.0.0', '1.0.1');
|
|
100
|
+
getRemoteVersionSpy.and.returnValues('1.0.1', '1.0.1');
|
|
101
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: false });
|
|
102
|
+
expect(runNpmSpy).toHaveBeenCalledTimes(1);
|
|
103
|
+
expect(startSpy).toHaveBeenCalledTimes(1);
|
|
104
|
+
});
|
|
105
|
+
it('| runNpm sikertelen → REQ-UPD-ERROR-HANDLING-001 buffer append, restart még megy', async () => {
|
|
106
|
+
getGlobalVersionSpy.and.returnValues('1.0.0', '1.0.0');
|
|
107
|
+
getRemoteVersionSpy.and.returnValues('1.0.1', '1.0.1');
|
|
108
|
+
runNpmSpy.and.returnValue(Promise.resolve({
|
|
109
|
+
success: false,
|
|
110
|
+
exitCode: 1,
|
|
111
|
+
errorMessage: 'EACCES permission denied',
|
|
112
|
+
elapsedSec: 2.1,
|
|
113
|
+
}));
|
|
114
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: false });
|
|
115
|
+
expect(errorBufferSpy).toHaveBeenCalledTimes(1);
|
|
116
|
+
const callArgs = errorBufferSpy.calls.mostRecent().args[0];
|
|
117
|
+
expect(callArgs.errorCode).toBe('CCAP-CLI-UPDATE-NPM-FAIL-001');
|
|
118
|
+
expect(callArgs.source).toBe('cli-update');
|
|
119
|
+
const additional = callArgs.additionalContent;
|
|
120
|
+
expect(additional.exitCode).toBe(1);
|
|
121
|
+
expect(additional.preGlobalVersion).toBe('1.0.0');
|
|
122
|
+
expect(additional.preRemoteVersion).toBe('1.0.1');
|
|
123
|
+
// Restart akkor is futott
|
|
124
|
+
expect(startSpy).toHaveBeenCalledTimes(1);
|
|
125
|
+
});
|
|
126
|
+
it('| runNpm sikeres → buffer NEM hívódik', async () => {
|
|
127
|
+
getGlobalVersionSpy.and.returnValues('1.0.0', '1.0.1');
|
|
128
|
+
getRemoteVersionSpy.and.returnValues('1.0.1', '1.0.1');
|
|
129
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: false });
|
|
130
|
+
expect(errorBufferSpy).not.toHaveBeenCalled();
|
|
131
|
+
});
|
|
132
|
+
it('| force flag → buffer additionalContent.force === true ha runNpm sikertelen', async () => {
|
|
133
|
+
getGlobalVersionSpy.and.returnValues('1.5.0', '1.5.0');
|
|
134
|
+
getRemoteVersionSpy.and.returnValues('1.5.0', '1.5.0');
|
|
135
|
+
runNpmSpy.and.returnValue(Promise.resolve({
|
|
136
|
+
success: false,
|
|
137
|
+
exitCode: 2,
|
|
138
|
+
errorMessage: 'failed',
|
|
139
|
+
elapsedSec: 0.3,
|
|
140
|
+
}));
|
|
141
|
+
await update_1.CCAP_UpdateCommand_Util.c_ccapUpdate({ force: true });
|
|
142
|
+
expect(errorBufferSpy).toHaveBeenCalledTimes(1);
|
|
143
|
+
const additional = errorBufferSpy.calls.mostRecent().args[0].additionalContent;
|
|
144
|
+
expect(additional.force).toBe(true);
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
//# sourceMappingURL=update.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.spec.js","sourceRoot":"","sources":["../../src/_commands/update.spec.ts"],"names":[],"mappings":"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"}
|
package/client-dist/{agent-instances.module-X7PTNXBZ.js → agent-instances.module-3N6ANN67.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as M}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=agent-instances.module-
|
|
1
|
+
import{b as M}from"./chunk-IA2MKRM5.js";import{d as F}from"./chunk-YIVWQSH4.js";import"./chunk-7UGLDNS5.js";import{a as f}from"./chunk-Q4Z4WTJ3.js";import{a as E}from"./chunk-WPHEQXWB.js";import"./chunk-TCJ6WHLQ.js";import"./chunk-5UPNU54P.js";import"./chunk-XEGOHOPX.js";import"./chunk-QXM45TNB.js";import{C as y,D as $,E as A,Fa as s,Ga as c,Ha as S,Kb as T,Z as i,da as u,ga as m,ia as x,k as v,la as _,oa as I,pa as g,qa as a,ra as n,sa as p,ub as w,va as C,wa as d,z as D}from"./chunk-TBMJSIBB.js";var L=(t,r)=>r._id,h=(t,r)=>r.sessionId;function O(t,r){if(t&1&&(a(0,"div",25),p(1,"span",26),a(2,"span",27),s(3),n(),a(4,"span",28),s(5),n()()),t&2){let e=r.$implicit;i(),x("bg-green-500",e.presence==="working")("bg-yellow-500",e.presence==="idle")("bg-neutral-600",e.presence==="offline"),i(2),c(e.sessionName||e.sessionId),i(2),c(e.presence)}}function P(t,r){if(t&1&&(a(0,"div",21)(1,"span",23),s(2),n(),a(3,"div",24),I(4,O,6,8,"div",25,h),n()()),t&2){let e=d().$implicit;i(2),S("Sessions (",e.sessionStatuses.length,")"),i(2),g(e.sessionStatuses)}}function R(t,r){t&1&&(a(0,"span",22),s(1,"Nincs aktiv session."),n())}function j(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"span",16),s(3),n(),p(4,"app-s-status-badge",17),n(),a(5,"div",18)(6,"div",19)(7,"span"),s(8,"CCAP ID"),n(),a(9,"span",20),s(10),n()(),u(11,P,6,1,"div",21)(12,R,2,0,"span",22),n()()),t&2){let e=r.$implicit,l=d(2);i(3),c(e.name||e.ccapId),i(),m("value",e.status)("colorMap",l.ccapStatusColorMap),i(6),c(e.ccapId),i(),_(e.sessionStatuses&&e.sessionStatuses.length>0?11:12)}}function z(t,r){if(t&1&&(a(0,"div",8),I(1,j,13,5,"div",14,L),n()),t&2){let e=d();i(),g(e.runtimeInstances_DS.ccapInstanceList_$())}}function B(t,r){if(t&1&&(a(0,"div",19)(1,"span"),s(2,"Utolso kapcsolodas"),n(),a(3,"span",29),s(4),n()()),t&2){let e=d().$implicit;i(4),c(e.lastConnectedAt)}}function U(t,r){if(t&1&&(a(0,"div",25),p(1,"span",26),a(2,"span",27),s(3),n(),a(4,"span",28),s(5),n()()),t&2){let e=r.$implicit;i(),x("bg-green-500",e.presence==="working")("bg-yellow-500",e.presence==="idle")("bg-neutral-600",e.presence==="offline"),i(2),c(e.sessionName||e.sessionId),i(2),c(e.presence)}}function G(t,r){if(t&1&&(a(0,"div",21)(1,"span",23),s(2),n(),a(3,"div",24),I(4,U,6,8,"div",25,h),n()()),t&2){let e=d().$implicit;i(2),S("Sessions (",e.sessionStatuses.length,")"),i(2),g(e.sessionStatuses)}}function q(t,r){t&1&&(a(0,"span",22),s(1,"Nincs aktiv session."),n())}function H(t,r){if(t&1&&(a(0,"div",14)(1,"div",15)(2,"span",16),s(3),n(),p(4,"app-s-status-badge",17),n(),a(5,"div",18)(6,"div",19)(7,"span"),s(8,"Gateway"),n(),a(9,"span",20),s(10),n()(),u(11,B,5,1,"div",19)(12,G,6,1,"div",21)(13,q,2,0,"span",22),n()()),t&2){let e=r.$implicit,l=d(2);i(3),c(e.label||e.instanceId),i(),m("value",e.connectionStatus)("colorMap",l.ociConnectionColorMap),i(6),c(e.gatewayUrl),i(),_(e.lastConnectedAt?11:-1),i(),_(e.sessionStatuses&&e.sessionStatuses.length>0?12:13)}}function J(t,r){if(t&1&&(a(0,"div",8),I(1,H,14,6,"div",14,L),n()),t&2){let e=d();i(),g(e.runtimeInstances_DS.ociInstanceList_$())}}function K(t,r){if(t&1&&(a(0,"div",25),p(1,"span",26),a(2,"span",27),s(3),n(),a(4,"span",28),s(5),n()()),t&2){let e=r.$implicit;i(),x("bg-green-500",e.presence==="working")("bg-yellow-500",e.presence==="idle")("bg-neutral-600",e.presence==="offline"),i(2),c(e.sessionName||e.sessionId),i(2),c(e.presence)}}function Q(t,r){if(t&1&&(a(0,"div",21)(1,"span",23),s(2),n(),a(3,"div",24),I(4,K,6,8,"div",25,h),n()()),t&2){let e=d().$implicit;i(2),S("CC Sessions (",e.sessionStatuses.length,")"),i(2),g(e.sessionStatuses)}}function V(t,r){t&1&&(a(0,"span",22),s(1,"Nincs session status sor."),n())}function W(t,r){if(t&1&&(a(0,"div",30)(1,"div",15)(2,"span",16),s(3),n(),p(4,"app-s-status-badge",17),n(),a(5,"div",18)(6,"div",19)(7,"span"),s(8,"ccapId"),n(),a(9,"span",20),s(10),n()(),u(11,Q,6,1,"div",21)(12,V,2,0,"span",22),n()()),t&2){let e=r.$implicit,l=d(2);i(3),c(e.name||e.ccapId),i(),m("value",e.status)("colorMap",l.cciStatusColorMap),i(6),c(e.ccapId),i(),_(e.sessionStatuses&&e.sessionStatuses.length>0?11:12)}}function X(t,r){if(t&1&&(a(0,"div",8),I(1,W,13,5,"div",30,L),n()),t&2){let e=d();i(),g(e.runtimeInstances_DS.cciInstanceList_$())}}var k=(()=>{class t{instanceRegistry_DS=y(M);runtimeInstances_DS=y(F);ngOnInit(){this.instanceRegistry_DS.loadAll(),this.loadCcapInstances(),this.loadOciInstances(),this.loadCciInstances()}loadCcapInstances(){return v(this,null,function*(){yield this.runtimeInstances_DS.loadCcapInstanceList()})}loadOciInstances(){return v(this,null,function*(){yield this.runtimeInstances_DS.loadOciInstanceListStrict()})}loadCciInstances(){return v(this,null,function*(){yield this.runtimeInstances_DS.loadCciInstanceListStrict()})}refresh(){this.instanceRegistry_DS.loadAll(),this.loadCcapInstances(),this.loadOciInstances(),this.loadCciInstances()}ccapStatusColorMap={active:"bg-green-900/40 text-green-200",inactive:"bg-neutral-700/40 text-neutral-400",maintenance:"bg-yellow-900/40 text-yellow-200"};ociConnectionColorMap={connected:"bg-green-900/40 text-green-200",disconnected:"bg-neutral-700/40 text-neutral-400",error:"bg-red-900/40 text-red-200",unreachable:"bg-red-900/40 text-red-200"};cciStatusColorMap=this.ccapStatusColorMap;static \u0275fac=function(l){return new(l||t)};static \u0275cmp=$({type:t,selectors:[["app-ccap-agent-instances"]],decls:24,vars:14,consts:[[1,"max-w-5xl","mx-auto","p-4","gt-xs:p-6","text-neutral-100"],[1,"flex","items-center","justify-between","mb-6"],[1,"text-2xl","font-bold"],["type","button",1,"px-4","py-2","border","border-neonCyan","rounded","text-neutral-300","hover:bg-neutral-700","disabled:opacity-50","transition-colors","text-sm",3,"click","disabled"],[1,"mb-8"],[1,"text-lg","font-semibold","text-neutral-200","mb-4","flex","items-center","gap-2"],[1,"w-2.5","h-2.5","rounded-full","bg-ccapAccent","shrink-0"],["emptyMessage","Nincs regisztralt CCAP instance.","errorSourceLabel","CCAP instances",3,"retry","isLoading","error","isEmpty"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-3"],[1,"w-2.5","h-2.5","rounded-full","bg-neonCyan","shrink-0"],["emptyMessage","Nincs regisztralt OpenClaw instance.","errorSourceLabel","OpenClaw instances",3,"retry","isLoading","error","isEmpty"],[1,"mt-8"],[1,"w-2.5","h-2.5","rounded-full","bg-violet-500","shrink-0"],["emptyMessage","Nincs CCI instance data sor.","errorSourceLabel","CCI instances",3,"retry","isLoading","error","isEmpty"],[1,"rounded-lg","bg-neutral-800/60","border","border-neonDefault","p-4"],[1,"flex","items-center","justify-between","mb-2"],[1,"font-medium","text-neutral-200"],["size","sm",3,"value","colorMap"],[1,"flex","flex-col","gap-1","text-xs","text-neutral-400"],[1,"flex","justify-between"],[1,"text-neutral-300","font-mono","truncate","max-w-48"],[1,"border-t","border-neutral-700","pt-1.5","mt-1"],[1,"text-neutral-600","text-[10px]","mt-1"],[1,"text-neutral-500"],[1,"flex","flex-col","gap-1","mt-1"],[1,"flex","items-center","gap-2"],[1,"w-1.5","h-1.5","rounded-full","shrink-0"],[1,"text-neutral-300","truncate","flex-1"],[1,"text-neutral-500","text-[10px]"],[1,"text-neutral-300"],[1,"rounded-lg","bg-neutral-800/60","border","border-violet-500/40","p-4"]],template:function(l,o){l&1&&(a(0,"div",0)(1,"div",1)(2,"h1",2),s(3,"Agent Instances"),n(),a(4,"button",3),C("click",function(){return o.refresh()}),s(5),n()(),a(6,"section",4)(7,"h2",5),p(8,"span",6),s(9," CCAP Instances "),n(),a(10,"app-s-content-state",7),C("retry",function(){return o.loadCcapInstances()}),n(),u(11,z,3,0,"div",8),n(),a(12,"section")(13,"h2",5),p(14,"span",9),s(15," OpenClaw Instances "),n(),a(16,"app-s-content-state",10),C("retry",function(){return o.loadOciInstances()}),n(),u(17,J,3,0,"div",8),n(),a(18,"section",11)(19,"h2",5),p(20,"span",12),s(21," CC Session Instances (CCI) "),n(),a(22,"app-s-content-state",13),C("retry",function(){return o.loadCciInstances()}),n(),u(23,X,3,0,"div",8),n()()),l&2&&(i(4),m("disabled",o.runtimeInstances_DS.ccapInstanceListLoading_$()||o.runtimeInstances_DS.ociInstanceListLoading_$()||o.runtimeInstances_DS.cciInstanceListLoading_$()),i(),S(" ",o.runtimeInstances_DS.ccapInstanceListLoading_$()||o.runtimeInstances_DS.ociInstanceListLoading_$()||o.runtimeInstances_DS.cciInstanceListLoading_$()?"Betoltds...":"Frissites"," "),i(5),m("isLoading",o.runtimeInstances_DS.ccapInstanceListLoading_$())("error",o.runtimeInstances_DS.ccapInstanceListError_$())("isEmpty",o.runtimeInstances_DS.ccapInstanceList_$().length===0),i(),_(!o.runtimeInstances_DS.ccapInstanceListLoading_$()&&!o.runtimeInstances_DS.ccapInstanceListError_$()&&o.runtimeInstances_DS.ccapInstanceList_$().length>0?11:-1),i(5),m("isLoading",o.runtimeInstances_DS.ociInstanceListLoading_$())("error",o.runtimeInstances_DS.ociInstanceListError_$())("isEmpty",o.runtimeInstances_DS.ociInstanceList_$().length===0),i(),_(!o.runtimeInstances_DS.ociInstanceListLoading_$()&&!o.runtimeInstances_DS.ociInstanceListError_$()&&o.runtimeInstances_DS.ociInstanceList_$().length>0?17:-1),i(5),m("isLoading",o.runtimeInstances_DS.cciInstanceListLoading_$())("error",o.runtimeInstances_DS.cciInstanceListError_$())("isEmpty",o.runtimeInstances_DS.cciInstanceList_$().length===0),i(),_(!o.runtimeInstances_DS.cciInstanceListLoading_$()&&!o.runtimeInstances_DS.cciInstanceListError_$()&&o.runtimeInstances_DS.cciInstanceList_$().length>0?23:-1))},dependencies:[f,E],encapsulation:2})}return t})();var Y=[{path:"",pathMatch:"full",component:k}],me=(()=>{class t{static \u0275fac=function(l){return new(l||t)};static \u0275mod=A({type:t});static \u0275inj=D({imports:[w,T.forChild(Y),f,E]})}return t})();export{me as AgentInstances_Module};
|
|
2
|
+
//# sourceMappingURL=agent-instances.module-3N6ANN67.js.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as $e,b as bt}from"./chunk-ALT4GOBR.js";import{a as ee,b as _e,c as ue,d as vt}from"./chunk-PN5J6JP2.js";import"./chunk-EGRHWZRV.js";import{a as xt}from"./chunk-RVZXTBBM.js";import{a as St}from"./chunk-NJPJYDH6.js";import{a as Z}from"./chunk-Q2PKIGLB.js";import{a as dt,b as ce,c as Ae,d as pe,e as L}from"./chunk-YPFW4KUX.js";import{a as st}from"./chunk-57RF5FWV.js";import{a as ye}from"./chunk-YRVQSWSZ.js";import{a as nt}from"./chunk-MANX3UTJ.js";import{a as ot,b as le}from"./chunk-NAHXFBXE.js";import"./chunk-UOOILECA.js";import"./chunk-ZGNVQEFP.js";import{a as re}from"./chunk-C5WLCPTP.js";import"./chunk-IA2MKRM5.js";import{g as Ct}from"./chunk-NK4RLW4D.js";import"./chunk-Q4Z4WTJ3.js";import{a as ut}from"./chunk-7JUIBZEE.js";import{a as pt,b as _t,c as mt}from"./chunk-C7XPBJTG.js";import{b as R,f as ft,g as ht}from"./chunk-WJTUNKFF.js";import"./chunk-WPHEQXWB.js";import{c as lt}from"./chunk-WWJB3AHB.js";import{a as de,b as at,c as rt,d as we}from"./chunk-TDVYMNCA.js";import"./chunk-34ASVWQQ.js";import"./chunk-3EWLYCQY.js";import"./chunk-Q2NVIOCY.js";import{a as ct}from"./chunk-SC33BNLI.js";import"./chunk-OZHMTJQJ.js";import"./chunk-BSZUQJTF.js";import"./chunk-V3VQWJQL.js";import"./chunk-UCATC7Y7.js";import{a as ge}from"./chunk-4EPTK7TX.js";import"./chunk-ZBTWQZNB.js";import{a as ae}from"./chunk-FLAJXIYW.js";import{c as Xe,f as Je,i as Ge,n as Ye,o as Ze,p as et,v as tt}from"./chunk-EO4DNTT4.js";import{k as K}from"./chunk-TCJ6WHLQ.js";import{a as D}from"./chunk-5UPNU54P.js";import{j as it}from"./chunk-XEGOHOPX.js";import"./chunk-QXM45TNB.js";import{$a as k,Aa as G,Ba as Y,C as v,Cb as Qe,D as O,E as Re,Eb as oe,Fa as d,Fb as je,G as U,Ga as q,Gb as se,Ha as g,Ia as te,J as u,K as m,Kb as Ke,L as Le,M as Ve,Pa as ie,Qa as ne,Ra as E,T as Oe,Ua as be,Va as Ne,W as Ue,Z as l,_ as Fe,a as ve,aa as h,ab as P,b as Te,ca as We,da as b,ga as C,ha as qe,hb as M,ia as z,ib as Be,ja as I,jb as ze,k as $,la as S,mb as j,oa as H,pa as Q,q as Ie,qa as a,r as Ee,ra as r,sa as w,ua as y,ub as He,v as ke,va as f,wa as p,y as Pe,z as Me,za as J}from"./chunk-TBMJSIBB.js";var A="ccap-caSession",x=class{static saveStatusFilter(o){D.writeString(`${A}:statusFilter`,o)}static loadStatusFilter(){return D.readString(`${A}:statusFilter`)??""}static saveShowArchived(o){D.writeBoolean(`${A}:showArchived`,o)}static loadShowArchived(){return D.readBoolean(`${A}:showArchived`,!1)}static saveLastWorkspacePath(o){D.writeString(`${A}:lastWorkspacePath`,o)}static loadLastWorkspacePath(){return D.readString(`${A}:lastWorkspacePath`)??""}static saveLastLabel(o){D.writeString(`${A}:lastLabel`,o)}static loadLastLabel(){return D.readString(`${A}:lastLabel`)??""}static savePromptDraft(o,e){ee.saveDraft(A,o,e)}static loadPromptDraft(o){return ee.loadDraft(A,o)}static clearPromptDraft(o){ee.clearDraft(A,o)}static hasPromptDraft(o){return ee.hasDraft(A,o)}static savePanelOpen(o,e){D.writeBoolean(`${A}:panelOpen:${o}`,e)}static loadPanelOpen(o,e){return D.readBoolean(`${A}:panelOpen:${o}`,e)}static savePanelWidth(o,e){D.writeNumber(`${A}:panelWidth:${o}`,e)}static loadPanelWidth(o,e){return D.readNumber(`${A}:panelWidth:${o}`,e)}static saveLastSessionId(o){D.writeString(`${A}:lastSessionId`,o)}static loadLastSessionId(){return D.readString(`${A}:lastSessionId`)??""}static saveShowAgentUpdates(o){D.writeBoolean(`${A}:showAgentUpdates`,o)}static loadShowAgentUpdates(){return D.readBoolean(`${A}:showAgentUpdates`,!0)}static saveShowSessionStatus(o){D.writeBoolean(`${A}:showSessionStatus`,o)}static loadShowSessionStatus(){return D.readBoolean(`${A}:showSessionStatus`,!0)}};var F=(()=>{class n{ca_DS=v(L);isTimelinePanelOpen_$=h(x.loadPanelOpen("timeline",!1));isMetadataPanelOpen_$=h(x.loadPanelOpen("metadata",!1));isTerminating_$=h(!1);isStopping_$=h(!1);isShowSessionStatus_$=h(x.loadShowSessionStatus());isShowAgentUpdates_$=h(x.loadShowAgentUpdates());handleToggleTimeline(){let e=!this.isTimelinePanelOpen_$();this.isTimelinePanelOpen_$.set(e),x.savePanelOpen("timeline",e)}handleToggleMetadata(){let e=!this.isMetadataPanelOpen_$();this.isMetadataPanelOpen_$.set(e),x.savePanelOpen("metadata",e)}handleToggleSessionStatus(){let e=!this.isShowSessionStatus_$();this.isShowSessionStatus_$.set(e),x.saveShowSessionStatus(e)}handleToggleAgentUpdates(){let e=!this.isShowAgentUpdates_$();this.isShowAgentUpdates_$.set(e),x.saveShowAgentUpdates(e)}handleStopExecution(){return $(this,null,function*(){let e=this.ca_DS.selectedSession_$();if(!e||this.isStopping_$())return;let i=e.sessionId??"";if(i){this.isStopping_$.set(!0);try{yield this.ca_DS.stopExecution(i)}catch{}finally{this.isStopping_$.set(!1)}}})}handleTerminate(){return $(this,null,function*(){let e=this.ca_DS.selectedSession_$();if(!e||this.isTerminating_$())return;let i=e.sessionId??"";if(i){this.isTerminating_$.set(!0);try{yield this.ca_DS.terminateSession(i)}catch{}finally{this.isTerminating_$.set(!1)}}})}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Pe({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var zt=(n,o)=>o.path;function Ht(n,o){if(n&1&&(a(0,"div",5)(1,"span",35),d(2),r(),a(3,"span",35),d(4),r()()),n&2){let e=o;l(),z("bg-emerald-950",e.isAcpConnected)("text-emerald-300",e.isAcpConnected)("bg-neutral-800",!e.isAcpConnected)("text-neutral-500",!e.isAcpConnected),l(),g(" ACP ",e.isAcpConnected?"connected":"offline"," "),l(),z("bg-sky-950",e.loadSessionSupported)("text-sky-300",e.loadSessionSupported)("bg-neutral-800",!e.loadSessionSupported)("text-neutral-500",!e.loadSessionSupported),l(),g(" session/load ",e.loadSessionSupported?"yes":"no"," ")}}function Qt(n,o){if(n&1&&(a(0,"div",18),w(1,"app-ccap-error-display",36),r()),n&2){let e=p();l(),C("error",e.ca_DS.sessionsLoadError_$())}}function jt(n,o){n&1&&(a(0,"div",20),d(1,"Loading\u2026"),r())}function Kt(n,o){if(n&1){let e=y();a(0,"div",21)(1,"span",37),d(2,"No sessions"),r(),a(3,"button",38),f("click",function(){u(e);let t=p();return m(t.handleOpenCreateDialog())}),d(4," Create session "),r()()}}function Xt(n,o){if(n&1){let e=y();a(0,"app-s-session-select",39),f("selected",function(t){u(e);let s=p();return m(s.handleSelectSession(t))})("contextMenu",function(t){u(e);let s=p();return m(s.handleRowContextMenu(t))})("scheduleIndicatorClicked",function(t){u(e);let s=p();return m(s.handleScheduleIndicatorClick(t))})("coordinatorIndicatorClicked",function(t){u(e);let s=p();return m(s.handleCoordinatorIndicatorClick(t))}),r()}if(n&2){let e=p();C("rows",e.sessionRowViews_$())("activeId",e.ca_DS.activeSessionId_$())("showWorkspacePath",!0)("showPromptCount",!0)("hideSearch",!0)}}function Jt(n,o){if(n&1&&(a(0,"option",42),d(1),r()),n&2){let e=o.$implicit;C("value",e.path),l(),te("",e.label," \u2014 ",e.path,"")}}function Gt(n,o){if(n&1){let e=y();a(0,"select",40),f("ngModelChange",function(t){u(e);let s=p();return m(s.handlePathOptionChange(t))}),a(1,"option",41),d(2,"Select a path..."),r(),H(3,Jt,2,3,"option",42,zt),a(5,"option",43),d(6,"Custom path..."),r()()}if(n&2){let e=p();C("ngModel",e.selectedPathOption_$()),l(3),Q(e.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$())}}function Yt(n,o){if(n&1&&(a(0,"div",30),w(1,"app-ccap-error-display",44),r()),n&2){let e=p();l(),C("error",e.createSessionError_$())}}function Zt(n,o){n&1&&d(0," \u2713 Link copied ")}function ei(n,o){n&1&&d(0," Copy failed ")}function ti(n,o){n&1&&d(0," Copy link ")}function ii(n,o){if(n&1){let e=y();a(0,"div",45),f("click",function(){u(e);let t=p();return m(t.handleCloseCtxMenu())}),r(),a(1,"div",46)(2,"button",47),f("click",function(){u(e);let t=p();return m(t.handleCtxCopyLink())}),b(3,Zt,1,0)(4,ei,1,0)(5,ti,1,0),r(),a(6,"button",48),f("click",function(){u(e);let t=p();return m(t.handleCtxToggleArchive())}),d(7),r()()}if(n&2){let e,i=p();l(),qe("left",i.ctxMenuPos_$().x,"px")("top",i.ctxMenuPos_$().y,"px"),l(),C("disabled",i.linkCopyState_$()!=="idle"),l(),S((e=i.linkCopyState_$())==="copied"?3:e==="failed"?4:5),l(4),g(" ",o.isArchived?"Unarchive":"Archive"," ")}}var gt=(()=>{class n{ca_DS=v(L);newAgentSessionWorkspace_DS=v(st);peiContext_DS=v(re);scheduledJobs_DS=v(St);coordinator_DS=v(xt);router=v(se);globalError_CS=v(it);instanceChangeEffect=ze(()=>{let e=this.peiContext_DS.activeCcapId_$(),i=this.showArchived_$();e&&Be(()=>{this.ca_DS.loadSessions({includeArchived:i||void 0})})});statusFilter_$=h("");searchQuery_$=h("");isCreateDialogOpen_$=h(!1);newSessionWorkspacePath_$=h("");newSessionLabel_$=h("");selectedPathOption_$=h("");isCreating_$=h(!1);createSessionError_$=h(null);showArchived_$=h(!1);isSyncing_$=h(!1);sessionSelected=Oe();ngOnInit(){let e=x.loadStatusFilter();e&&this.statusFilter_$.set(e),this.showArchived_$.set(x.loadShowArchived()),this.peiContext_DS.ensureInitialized().then(()=>{this.ca_DS.loadSessions({includeArchived:this.showArchived_$()})}),this.scheduledJobs_DS.loadAll(),this.coordinator_DS.loadAllCoordinatorsForManagementPage()}handleStatusFilterChange(e){this.statusFilter_$.set(e),x.saveStatusFilter(e)}handleToggleShowArchived(){let e=!this.showArchived_$();this.showArchived_$.set(e),x.saveShowArchived(e),this.ca_DS.loadSessions({includeArchived:e})}filteredSessions_$=M(()=>{let e=this.searchQuery_$(),i=this.statusFilter_$().trim();return[...this.ca_DS.sessions_$().filter(s=>!s.sessionId||i&&s.status!==i?!1:de.includesText(s.label,e)||de.includesText(s.workspacePath,e)||de.includesText(s.lastPrompt,e))].sort((s,c)=>n.listFreshnessSortMs(c)-n.listFreshnessSortMs(s))});static listFreshnessSortMs(e){let i=e.lastActivityAt;if(typeof i=="string"&&i.length>0){let t=Date.parse(i);if(!isNaN(t))return t}return 0}sessionRowViews_$=M(()=>{let e=this.scheduledJobs_DS.scheduledSessionIds_$(),i=this.coordinator_DS.coordinatedSessionIds_$();return this.filteredSessions_$().map(t=>({id:t.sessionId??"",label:t.label||t.sessionId||"",status:t.status??"",statusColorClass:ye.resolve(t.status),workspacePath:t.workspacePath,isArchived:!!t.isArchived,lastActivityAt:t.lastActivityAt,promptCount:t.promptCount,isRunning:ye.isRunning(t.status),hasSchedule:e.has(t.sessionId??""),hasCoordinator:i.has(t.sessionId??""),hasDraft:x.hasPromptDraft(t.sessionId??"")}))});handleSelectSession(e){if(!e)return;let i=this.peiContext_DS.activeCcapId_$(),t=i?["/ca-session",i,e]:["/ca-session",e];this.router.navigate(t),this.sessionSelected.emit()}handleOpenCreateDialog(){return $(this,null,function*(){if(this.createSessionError_$.set(null),this.isCreateDialogOpen_$.set(!0),yield this.newAgentSessionWorkspace_DS.refreshWorkspacePathPickerOptions(),!this.newSessionWorkspacePath_$()){let i=this.newAgentSessionWorkspace_DS.resolveInitialWorkspacePath({lastWorkspacePath:x.loadLastWorkspacePath()});i&&(this.newSessionWorkspacePath_$.set(i),this.selectedPathOption_$.set(i))}let e=x.loadLastLabel();e&&this.newSessionLabel_$.set(e)})}handlePathOptionChange(e){this.selectedPathOption_$.set(e),e&&e!=="custom"&&this.newSessionWorkspacePath_$.set(e)}handleCloseCreateDialog(){this.createSessionError_$.set(null),this.isCreateDialogOpen_$.set(!1),this.newSessionWorkspacePath_$.set(""),this.newSessionLabel_$.set(""),this.selectedPathOption_$.set("")}handleConfirmCreate(){return $(this,null,function*(){let e=this.newSessionWorkspacePath_$().trim();if(e){this.isCreating_$.set(!0);try{x.saveLastWorkspacePath(e),x.saveLastLabel(this.newSessionLabel_$().trim());let i=yield this.ca_DS.createSession({workspacePath:e,label:this.newSessionLabel_$().trim()||void 0});if(this.handleCloseCreateDialog(),i.length>0){let t=this.peiContext_DS.activeCcapId_$(),s=t?["/ca-session",t,i]:["/ca-session",i];this.router.navigate(s)}}catch(i){this.createSessionError_$.set(i)}finally{this.isCreating_$.set(!1)}}})}ctxMenuSession_$=h(null);ctxMenuPos_$=h({x:0,y:0});handleRowContextMenu(e){let i=this.filteredSessions_$().find(t=>t.sessionId===e.id);i&&(this.ctxMenuSession_$.set(i),this.ctxMenuPos_$.set({x:e.event.clientX,y:e.event.clientY}))}linkCopyState_$=h("idle");handleCloseCtxMenu(){this.ctxMenuSession_$.set(null),this.linkCopyState_$.set("idle")}handleCtxCopyLink(){return $(this,null,function*(){let e=this.ctxMenuSession_$();if(!e?.sessionId)return;let i=this.peiContext_DS.activeCcapId_$(),t=i?`/ca-session/${i}/${e.sessionId}`:`/ca-session/${e.sessionId}`,s=`${window.location.origin}${t}`,c=yield this.globalError_CS.copyToClipboard(s);this.linkCopyState_$.set(c.ok?"copied":"failed"),setTimeout(()=>{this.handleCloseCtxMenu()},700)})}schedulePopupSessionId_$=h(null);handleScheduleIndicatorClick(e){this.schedulePopupSessionId_$.set(e)}handleCloseSchedulePopup(){this.schedulePopupSessionId_$.set(null)}coordinatorPopupSessionId_$=h(null);handleCoordinatorIndicatorClick(e){this.coordinatorPopupSessionId_$.set(e)}handleCloseCoordinatorPopup(){this.coordinatorPopupSessionId_$.set(null)}handleCtxToggleArchive(){return $(this,null,function*(){let e=this.ctxMenuSession_$();if(!e?.sessionId)return;let i=e.sessionId;this.handleCloseCtxMenu(),yield this.handleArchiveRow(i)})}handleSyncFromAgent(){return $(this,null,function*(){this.isSyncing_$.set(!0);try{yield this.ca_DS.syncFromAgent()}finally{this.isSyncing_$.set(!1)}})}handleArchiveRow(e){return $(this,null,function*(){if(!e)return;let i=this.filteredSessions_$().find(c=>c.sessionId===e);if(!i)return;let t=this.ca_DS.activeSessionId_$()===e,s=i.isArchived!==!0;try{yield this.ca_DS.setSessionArchived({sessionId:e,isArchived:s}),t&&s&&!this.showArchived_$()&&this.router.navigate(["/ca-session"])}catch{}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-dashboard"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],outputs:{sessionSelected:"sessionSelected"},decls:56,vars:25,consts:[[1,"shrink-0","px-2","py-1.5","border-b","border-neonDefault","flex","flex-col","gap-1"],[1,"flex","items-center","gap-1"],[1,"text-xs","font-semibold","text-neutral-300","flex-1"],["type","button","title","Sync session list from Agent",1,"px-1.5","py-0.5","text-xs","border","border-neutral-600","text-neutral-400","hover:bg-neutral-700","rounded","shrink-0",3,"click","disabled"],["type","button",1,"px-1.5","py-0.5","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","shrink-0",3,"click"],[1,"flex","flex-wrap","items-center","gap-1","text-[9px]","text-neutral-500"],[1,"shrink-0","px-2","py-1.5","border-b","border-neutral-800","flex","flex-col","gap-1"],["type","text","placeholder","Search\u2026",1,"w-full","px-2","py-1","text-xs","bg-neutral-800","border","border-neutral-700","text-neutral-200","rounded",3,"input","value"],[1,"flex-1","px-1.5","py-0.5","text-xs","bg-neutral-800","border","border-neutral-700","text-neutral-300","rounded",3,"change","value"],["value",""],["value","waiting-input"],["value","running"],["value","connecting"],["value","disconnected"],["value","errored"],["value","completed"],["value","terminated"],["type","button",1,"px-1.5","py-0.5","text-xs","border","rounded","shrink-0",3,"click"],[1,"shrink-0","px-2","py-1.5"],[1,"flex-1","overflow-y-auto"],[1,"flex","items-center","justify-center","py-8","text-xs","text-neutral-500"],[1,"flex","flex-col","items-center","justify-center","py-8","gap-2"],["kind","ca",3,"rows","activeId","showWorkspacePath","showPromptCount","hideSearch"],[3,"closed","isOpen","title","maxWidth","bodyFlexColumn","closeOnBackdropClick"],[1,"flex","flex-col","flex-1","min-h-0","gap-3"],[1,"shrink-0"],[1,"text-xs","text-neutral-400","block","mb-1"],[1,"w-full","bg-neutral-900","text-neutral-300","text-xs","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none","mb-1.5",3,"ngModel"],["type","text","placeholder","/path/to/workspace",1,"w-full","bg-neutral-900","text-neutral-200","text-sm","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none",3,"ngModelChange","ngModel"],["type","text","placeholder","My session",1,"w-full","bg-neutral-900","text-neutral-200","text-sm","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none",3,"ngModelChange","ngModel"],[1,"flex-1","min-h-0","overflow-y-auto","overscroll-contain","rounded-md","border","border-neonRed/30","pr-0.5"],[1,"shrink-0","flex","justify-end","gap-2","pt-2","border-t","border-neutral-700/80"],["type","button",1,"px-3","py-1.5","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","transition-colors",3,"click","disabled"],["type","button",1,"px-3","py-1.5","text-xs","border","border-ccapAccent","text-ccapAccent","hover:bg-ccapAccent","hover:text-white","disabled:opacity-50","rounded","transition-colors",3,"click","disabled"],[3,"closed","sessionId","isOpen"],[1,"px-1","py-0.5","rounded"],["sourceLabelOverride","CA session list",1,"block",3,"error"],[1,"text-xs","text-neutral-500"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","rounded",3,"click"],["kind","ca",3,"selected","contextMenu","scheduleIndicatorClicked","coordinatorIndicatorClicked","rows","activeId","showWorkspacePath","showPromptCount","hideSearch"],[1,"w-full","bg-neutral-900","text-neutral-300","text-xs","rounded","px-2","py-1.5","border","border-neonDefault","focus:border-neonCyan","focus:outline-none","mb-1.5",3,"ngModelChange","ngModel"],["value","","disabled",""],[3,"value"],["value","custom"],["sourceLabelOverride","New CA session",1,"block","min-h-0",3,"error"],[1,"fixed","inset-0","z-40",3,"click"],[1,"fixed","z-50","min-w-[140px]","bg-neutral-900","border","border-neutral-700","rounded-lg","shadow-xl","py-1","text-xs"],[1,"w-full","text-left","px-3","py-1.5","text-neutral-300","hover:bg-neutral-800","transition-colors",3,"click","disabled"],[1,"w-full","text-left","px-3","py-1.5","text-neutral-300","hover:bg-neutral-800","transition-colors",3,"click"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),d(3,"CA session"),r(),a(4,"button",3),f("click",function(){return t.handleSyncFromAgent()}),d(5," Sync "),r(),a(6,"button",4),f("click",function(){return t.handleOpenCreateDialog()}),d(7," + New "),r()(),b(8,Ht,5,18,"div",5),r(),a(9,"div",6)(10,"input",7),f("input",function(c){return t.searchQuery_$.set(c.target.value)}),r(),a(11,"div",1)(12,"select",8),f("change",function(c){return t.handleStatusFilterChange(c.target.value)}),a(13,"option",9),d(14,"All statuses"),r(),a(15,"option",10),d(16,"Waiting"),r(),a(17,"option",11),d(18,"Running"),r(),a(19,"option",12),d(20,"Connecting"),r(),a(21,"option",13),d(22,"Disconnected"),r(),a(23,"option",14),d(24,"Errored"),r(),a(25,"option",15),d(26,"Completed"),r(),a(27,"option",16),d(28,"Terminated"),r()(),a(29,"button",17),f("click",function(){return t.handleToggleShowArchived()}),d(30," Arch "),r()()(),b(31,Qt,2,1,"div",18),a(32,"div",19),b(33,jt,2,0,"div",20)(34,Kt,5,0,"div",21)(35,Xt,1,5,"app-s-session-select",22),r(),a(36,"app-s-modal",23),f("closed",function(){return t.handleCloseCreateDialog()}),a(37,"div",24)(38,"div",25)(39,"label",26),d(40,"Workspace Path *"),r(),b(41,Gt,7,1,"select",27),a(42,"input",28),f("ngModelChange",function(c){return t.newSessionWorkspacePath_$.set(c)}),r()(),a(43,"div",25)(44,"label",26),d(45,"Label (optional)"),r(),a(46,"input",29),f("ngModelChange",function(c){return t.newSessionLabel_$.set(c)}),r()(),b(47,Yt,2,1,"div",30),a(48,"div",31)(49,"button",32),f("click",function(){return t.handleCloseCreateDialog()}),d(50," Cancel "),r(),a(51,"button",33),f("click",function(){return t.handleConfirmCreate()}),d(52),r()()()(),a(53,"app-sch-schedule-popup",34),f("closed",function(){return t.handleCloseSchedulePopup()}),r(),a(54,"app-crd-info-popup",34),f("closed",function(){return t.handleCloseCoordinatorPopup()}),r(),b(55,ii,8,7)),i&2){let s,c;l(4),C("disabled",t.isSyncing_$()),l(4),S((s=t.ca_DS.mirrorRuntime_$())?8:-1,s),l(2),C("value",t.searchQuery_$()),l(2),C("value",t.statusFilter_$()),l(17),I(t.showArchived_$()?"border-ccapAccent/60 text-ccapAccent/80 bg-ccapAccent/10":"border-neutral-700 text-neutral-500"),l(2),S(t.ca_DS.sessionsLoadError_$()?31:-1),l(2),S(t.ca_DS.sessionsLoading_$()?33:!t.filteredSessions_$().length&&!t.ca_DS.sessionsLoadError_$()?34:35),l(3),C("isOpen",t.isCreateDialogOpen_$())("title","New CA session")("maxWidth","lg")("bodyFlexColumn",!0)("closeOnBackdropClick",!1),l(5),S(t.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$().length?41:-1),l(),C("ngModel",t.newSessionWorkspacePath_$()),l(4),C("ngModel",t.newSessionLabel_$()),l(),S(t.createSessionError_$()?47:-1),l(2),C("disabled",t.isCreating_$()),l(2),C("disabled",t.isCreating_$()||!t.newSessionWorkspacePath_$()),l(),g(" ",t.isCreating_$()?"Creating...":"Create"," "),l(),C("sessionId",t.schedulePopupSessionId_$())("isOpen",t.schedulePopupSessionId_$()!==null),l(),C("sessionId",t.coordinatorPopupSessionId_$())("isOpen",t.coordinatorPopupSessionId_$()!==null),l(),S((c=t.ctxMenuSession_$())?55:-1,c)}},dependencies:[Ze,et,Xe,Ye,Je,Ge,K,ae,_e,ue,lt],encapsulation:2})}return n})();var X=(()=>{class n{transform(e){switch(e??""){case"running":return"bg-yellow-500";case"waiting-input":return"bg-green-500";case"connecting":return"bg-yellow-500";case"creating":return"bg-yellow-400";case"completed":return"bg-blue-500";case"errored":return"bg-red-500";case"terminated":return"bg-red-700";case"disconnected":return"bg-amber-700";default:return"bg-neutral-600"}}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionStatusColor",type:n,pure:!0})}return n})();function si(n,o){n&1&&w(0,"div",5)}function ai(n,o){if(n&1){let e=y();a(0,"button",13),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleMetadata())}),d(1," Info "),r()}if(n&2){let e=p();I(e.detailUi_DS.isMetadataPanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300")}}function ri(n,o){n&1&&w(0,"span",17)}function li(n,o){if(n&1&&(w(0,"span",16),k(1,"caSessionStatusColor"),b(2,ri,1,0,"span",17)),n&2){p(2);let e=E(1);C("ngClass",P(1,3,e.session.status))("title",e.session.status),l(2),S(e.isLive?2:-1)}}function di(n,o){n&1&&(a(0,"span",15),d(1,"Loading\u2026"),r())}function ci(n,o){if(n&1&&(a(0,"span",14),d(1),r(),b(2,li,3,5)(3,di,2,0,"span",15)),n&2){p();let e=E(1);C("title",e.title),l(),g(" ",e.title," "),l(),S(e.session?2:-1),l(),S(e.isLoading&&!e.session?3:-1)}}function pi(n,o){if(n&1){let e=y();w(0,"div",19),a(1,"button",20),f("click",function(){u(e);let t=p(2);return m(t.detailUi_DS.handleStopExecution())}),d(2),r()}if(n&2){let e=p(2);l(),C("disabled",e.detailUi_DS.isStopping_$()),l(),g(" ",e.detailUi_DS.isStopping_$()?"Stopping\u2026":"Stop"," ")}}function _i(n,o){if(n&1){let e=y();a(0,"button",18),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleTimeline())}),d(1," Timeline "),r(),b(2,pi,3,2)}if(n&2){let e=p(),i=E(1);I(e.detailUi_DS.isTimelinePanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300"),l(2),S(i.isLive?2:-1)}}var Dt=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);caTopBar_$=M(()=>{let e=this.ca_DS.activeSessionId_$();if(!e)return null;let i=this.ca_DS.selectedSessionLoading_$(),t=this.ca_DS.selectedSession_$(),c=this.ca_DS.sessions_$().find(xe=>xe.sessionId===e),_=t?.sessionId===e,T=_?t:c??null,W=T&&(T.label||T.sessionId)||e,B=T?.status??"";return{title:W,session:T,isLoading:i,showActions:_&&!i,isLive:B==="running"||B==="waiting-input"}});sidebarWidth_$=h(320);isSidebarOpen_$=h(!0);isResizing_$=h(!1);ngOnInit(){let e=x.loadPanelWidth("sidebar",320);this.sidebarWidth_$.set(Math.max(200,Math.min(600,e))),this.isSidebarOpen_$.set(x.loadPanelOpen("sidebar",!0))}handleSidebarResizeStart(e){let i=e.clientX,t=this.sidebarWidth_$();this.isResizing_$.set(!0),Z.attachUntilPointerUp({startEvent:e,onMove:s=>{let c=s.clientX-i,_=Math.max(200,Math.min(600,t+c));this.sidebarWidth_$.set(_)},onEnd:()=>{this.isResizing_$.set(!1),x.savePanelWidth("sidebar",this.sidebarWidth_$())}})}handleToggleSidebar(){this.isSidebarOpen_$.update(e=>!e),x.savePanelOpen("sidebar",this.isSidebarOpen_$())}handleSessionSelectedFromDashboard(){window.innerWidth<640&&this.isSidebarOpen_$.set(!1)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-shell"]],hostAttrs:[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],decls:19,vars:14,consts:[[1,"flex","min-h-0","w-full","flex-1","flex-col","overflow-hidden"],["sSessionToolbarLeft","",1,"flex","items-center","gap-1","min-w-0"],["type","button",1,"px-2","py-1","text-xs","border","border-neonDefault","text-neutral-300","hover:bg-neutral-700","rounded","flex","items-center","gap-1","shrink-0",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"w-px","h-4","bg-neutral-700","shrink-0","self-center","mx-0.5"],["type","button",1,"px-2","py-1","text-xs","border","rounded","transition-colors","shrink-0",3,"class"],["sSessionToolbarCenter","",1,"flex","items-center","justify-center","gap-2","min-w-0","max-w-[min(100vw-10rem,48rem)]"],["sSessionToolbarRight","",1,"flex","items-center","gap-1","min-w-0","flex-wrap","justify-end"],[3,"sidebarResizeStart","isSidebarOpen","sidebarWidthPx","isResizing"],["sSessionShellSidebar","",1,"flex","flex-col","overflow-hidden","h-full"],[3,"sessionSelected"],["sSessionShellMain","",1,"flex","min-h-0","flex-1","flex-col","overflow-hidden","[&>router-outlet]:contents"],["type","button",1,"px-2","py-1","text-xs","border","rounded","transition-colors","shrink-0",3,"click"],[1,"text-sm","font-semibold","text-neutral-200","truncate","text-center","min-w-0","max-w-[min(240px,35vw)]",3,"title"],[1,"text-[10px]","text-neutral-500","shrink-0"],[1,"w-2","h-2","rounded-full","shrink-0",3,"ngClass","title"],["title","Live",1,"w-2","h-2","rounded-full","bg-green-500","animate-pulse","shrink-0"],["type","button",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"hidden","sm:block","w-px","h-4","bg-neutral-700","shrink-0","self-center"],["type","button",1,"px-2","py-1","text-xs","border","border-neonRed/50","text-red-300","hover:bg-red-950/40","rounded","transition-colors","shrink-0","disabled:opacity-40",3,"click","disabled"]],template:function(i,t){if(i&1){let s=y();a(0,"div",0),ie(1),a(2,"app-s-session-shell-toolbar")(3,"div",1)(4,"button",2),f("click",function(){return u(s),m(t.handleToggleSidebar())}),Le(),a(5,"svg",3),w(6,"polyline",4),r(),d(7," CA Sessions "),r(),b(8,si,1,0,"div",5)(9,ai,2,2,"button",6),r(),Ve(),a(10,"div",7),b(11,ci,4,4),r(),a(12,"div",8),b(13,_i,3,3),r()(),a(14,"app-s-resizable-session-shell-layout",9),f("sidebarResizeStart",function(_){return u(s),m(t.handleSidebarResizeStart(_))}),a(15,"div",10)(16,"app-ccap-ca-dashboard",11),f("sessionSelected",function(){return u(s),m(t.handleSessionSelectedFromDashboard())}),r()(),a(17,"div",12),w(18,"router-outlet"),r()()()}if(i&2){z("select-none",t.isResizing_$()),l();let s=ne(t.caTopBar_$());l(4),z("rotate-90",t.isSidebarOpen_$())("-rotate-90",!t.isSidebarOpen_$()),l(3),S(s?8:-1),l(),S(s&&s.showActions?9:-1),l(2),S(s?11:-1),l(2),S(s&&s.showActions?13:-1),l(),C("isSidebarOpen",t.isSidebarOpen_$())("sidebarWidthPx",t.sidebarWidth_$())("isResizing",t.isResizing_$())}},dependencies:[j,je,pt,_t,gt,X],encapsulation:2})}return n})();var me=class{static pickDefaultSessionId(o){let e=o.sessions;if(!e.length)return"";let i=o.lastSavedSessionId.trim();if(i.length>0){let s=e.find(c=>c.sessionId===i);if(s?.sessionId&&(o.includeArchived||s.isArchived!==!0))return s.sessionId}let t=e.find(s=>!!s.sessionId&&s.isArchived!==!0);return t?.sessionId?t.sessionId:o.includeArchived?e.find(c=>!!c.sessionId)?.sessionId??"":""}};var Tt=(()=>{class n{static toolCallUpdateBriefSubtype="tool_call_update";static filterForAgentUpdatesVisibility(e){let i=e.messages,t=i.length-1,s=[];for(let c=0;c<i.length;c++){let _=i[c];if(_.type!=="status-update"){s.push(_);continue}!e.isShowAgentUpdates||_.briefSubtype===n.toolCallUpdateBriefSubtype&&c!==t||s.push(_)}return s}}return n})();var fe=class n{static pairToolResultsIntoToolStarts(o){let e=new Map;for(let s=0;s<o.length;s++){let c=o[s];if(c.type!=="tool"||c.briefSubtype!=="tool_call")continue;let _=pe.tryParseStableListKey(c.listKey);_===null||_.role!=="start"||e.set(_.toolCallId,s)}if(!e.size)return o;let i=new Set,t=o.map(s=>ve({},s));for(let s=0;s<t.length;s++){let c=t[s];if(c.briefSubtype!=="tool_call_update")continue;let _=pe.tryParseStableListKey(c.listKey);if(_===null)continue;let T=c.type==="tool-result"&&_.role==="result",W=c.type==="error"&&_.role==="error";if(!T&&!W)continue;let B=e.get(_.toolCallId);if(B===void 0)continue;let Se=n.buildPairedExpandableRawOutput({rawData:c.rawData,fallbackText:c.text}),xe={text:c.text,expandableContent:Se.length?Se:c.text,rawData:c.rawData,isError:W?!0:void 0};t[B]=Te(ve({},t[B]),{pairedResult:xe,isToolCallFailedIndicator:W?!0:t[B].isToolCallFailedIndicator}),i.add(s)}return i.size?t.filter((s,c)=>!i.has(c)):t}static buildPairedExpandableRawOutput(o){let e=o.rawData;if(e===void 0)return o.fallbackText;let i=e.update;if(i===null||typeof i!="object"||Array.isArray(i))return n.stringifyRecordOrFallback({value:e,fallbackText:o.fallbackText});let t=[],s=Reflect.get(i,"content");if(Array.isArray(s)&&s.length){let _=pe.formatContent(s);_.length&&t.push(_)}let c=Reflect.get(i,"rawOutput");if(c!==void 0)try{let _=JSON.stringify(c,null,2);we.looksLikeJson(_)?t.push(we.formatJson(_)):t.push(_)}catch{}return t.length?t.join(`
|
|
2
|
+
|
|
3
|
+
`):n.stringifyRecordOrFallback({value:e,fallbackText:o.fallbackText})}static stringifyRecordOrFallback(o){try{return JSON.stringify(o.value,null,2)}catch{return o.fallbackText}}};var he=class n{static fromConsoleMessage(o){let e=n.mapTypeToKind(o.type);o.useRawBubbleKind===!0&&(e=R.raw),o.streamTextRole==="user"&&o.type==="assistant"&&o.useRawBubbleKind!==!0&&(e=R.userPrompt);let i=o.streamTextRole==="user"||o.type==="prompt"&&o.useRawBubbleKind!==!0,t=o.briefSubtype!==void 0&&o.briefSubtype.length>0?o.briefSubtype:o.mirrorEventType,s=o.type==="tool"&&o.toolDisplayName!==void 0&&o.toolDisplayName.length>0?o.toolDisplayName:void 0,c=o.type==="error"||o.isToolCallFailedIndicator===!0?"error":void 0,_=o.pairedResult!==void 0?{text:o.pairedResult.text,expandableContent:o.pairedResult.expandableContent,rawData:o.pairedResult.rawData,isError:o.pairedResult.isError}:void 0;return{listKey:o.listKey,kind:e,bodyText:o.text,timestampIso:o.timestamp,expandableContent:void 0,rawData:o.rawData,pairedResult:_,isUserAligned:i,subtype:t,toolName:s,headerStatusDot:c,flags:{showCopy:!0,showRawInfo:!0,useEditDiffForExpandable:!1}}}static mapTypeToKind(o){switch(o){case"prompt":return R.userPrompt;case"assistant":return R.assistant;case"thinking":return R.thinking;case"tool":return R.tool;case"tool-result":return R.toolResult;case"error":return R.error;case"info":return R.info;case"status":return R.status;case"status-update":return R.statusUpdate;default:return R.info}}};var ui=["messagesEnd"],mi=["topSentinel"],fi=(n,o)=>o.listKey,hi=()=>({"w-[90%]":!0,"ml-4":!0}),Ci=()=>({"w-[85%]":!0});function Si(n,o){if(n&1&&(a(0,"span",14),k(1,"caSessionStatusColor"),d(2),r()),n&2){let e=o;I(P(1,3,e.status)),l(2),g(" ",e.status," ")}}function xi(n,o){n&1&&(a(0,"div",7),d(1," R\xE9gebbi \xFCzenetek bet\xF6lt\xE9se\u2026 "),r())}function vi(n,o){n&1&&(a(0,"div",8),d(1," \u2014 A besz\xE9lget\xE9s eleje \u2014 "),r())}function bi(n,o){n&1&&(a(0,"div",9),d(1," Loading\u2026 "),r())}function gi(n,o){n&1&&(a(0,"div",9),d(1," No messages yet \u2014 send a prompt "),r())}function yi(n,o){if(n&1){let e=y();a(0,"div")(1,"div",15)(2,"app-s-agent-console-message-bubble",16),f("ttsCached",function(t){u(e);let s=p();return m(s.handleTtsCached(t))}),r()()()}if(n&2){let e=o.$implicit,i=p();I(e.isUserAligned?"flex justify-end":"flex justify-start"),l(),C("ngClass",e.kind===i.bubbleKind.tool?be(4,hi):be(5,Ci)),l(),C("view",e)}}var It=(()=>{class n{messagesEndRef;topSentinelRef;topSentinelObserver=null;ca_DS=v(L);detailUi_DS=v(F);voiceInputUi_DS=v(ot);sessionQueue_DS=v(vt);route=v(oe);promptInput_$=h("");isSending_$=h(!1);isExecuting_$=M(()=>this.ca_DS.selectedSession_$()?.status==="running");messages_$=M(()=>this.ca_DS.consoleMessages_$());ttsCachedKeys_$=h(new Set);handleTtsCached(e){this.ttsCachedKeys_$.update(i=>new Set([...i,e]))}bubbleViews_$=M(()=>{let e=this.ca_DS.assembledMessages_$();if(e.length>0){let c=this.sessionId,_=this.ttsCachedKeys_$(),T=e.map(W=>bt.fromAssembledMessage(W,{sessionId:c,cachedKeys:_}));return T=$e.groupSubAgentItems(T),T=$e.groupConsecutiveToolItems(T),T}let i=this.detailUi_DS.isShowAgentUpdates_$(),t=Tt.filterForAgentUpdatesVisibility({messages:this.messages_$(),isShowAgentUpdates:i});return fe.pairToolResultsIntoToolStarts(t).map(c=>he.fromConsoleMessage(c))});bubbleKind=R;isComposerSendDisabled_$=M(()=>!this.promptInput_$().trim().length);previousConsoleMessageCount=0;get sessionId(){return this.ca_DS.activeSessionId_$()}ngAfterViewInit(){this.scheduleScrollToBottom(),this.setupTopSentinelObserver()}ngOnDestroy(){this.topSentinelObserver&&(this.topSentinelObserver.disconnect(),this.topSentinelObserver=null)}setupTopSentinelObserver(){let e=this.topSentinelRef?.nativeElement;!e||typeof IntersectionObserver>"u"||this.topSentinelObserver||(this.topSentinelObserver=new IntersectionObserver(i=>{for(let t of i)t.isIntersecting&&this.loadOlderAssembledIfNeeded()},{rootMargin:"100px 0px 0px 0px",threshold:0}),this.topSentinelObserver.observe(e))}loadOlderAssembledIfNeeded(){this.sessionId&&this.ca_DS.loadOlderAssembledMessages({sessionId:this.sessionId})}ngAfterViewChecked(){let e=this.ca_DS.consoleMessages_$().length;e>this.previousConsoleMessageCount&&this.scheduleScrollToBottom(),this.previousConsoleMessageCount=e}ngOnInit(){let e=this.route.snapshot.paramMap.get("sessionId")??"";e&&(this.promptInput_$.set(x.loadPromptDraft(e)),this.sessionQueue_DS.subscribeToSession({sessionId:e,baseRoute:"ca-session"}))}handleSendPrompt(){return $(this,null,function*(){let e=this.promptInput_$().trim();if(!(!e||!this.sessionId||this.isSending_$())){x.clearPromptDraft(this.sessionId),this.promptInput_$.set(""),this.isSending_$.set(!0);try{yield this.ca_DS.sendPrompt({sessionId:this.sessionId,content:e})}catch{}finally{this.isSending_$.set(!1)}}})}handleComposerDraftChange(e){this.promptInput_$.set(e);let i=this.sessionId;i&&x.savePromptDraft(i,e)}handleVoiceSegment(e){let i=e.text.trim();if(!i.length)return;let t=this.promptInput_$().trim(),s=t.length>0?`${t} ${i}`:i;this.handleComposerDraftChange(s),this.voiceInputUi_DS.autoSendAfterVoice_$()&&e.isFinal&&this.handleSendPrompt()}scheduleScrollToBottom(){setTimeout(()=>{let e=this.messagesEndRef?.nativeElement;e&&e.scrollIntoView({block:"end",inline:"nearest"})},0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-console"]],viewQuery:function(i,t){if(i&1&&(J(ui,5),J(mi,5)),i&2){let s;G(s=Y())&&(t.messagesEndRef=s.first),G(s=Y())&&(t.topSentinelRef=s.first)}},hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden","w-full","min-w-0"],decls:20,vars:15,consts:[["topSentinel",""],["messagesEnd",""],["sChatColumnHeader","",1,"flex","shrink-0","flex-col"],[1,"flex","shrink-0","items-center","gap-2","border-b","border-neonDefault","bg-ccapSurface","px-3","py-1.5"],[1,"flex-1","truncate","font-mono","text-xs","text-neutral-400"],[1,"rounded","px-1.5","py-0.5","text-[10px]","font-medium","text-black",3,"class"],["sChatColumnScroll","",1,"space-y-3","px-3","py-3","text-xs"],[1,"text-center","text-neutral-500","py-2","text-xs","italic"],[1,"text-center","text-neutral-600","py-1","text-xs"],[1,"flex","h-full","items-center","justify-center","text-xs","text-neutral-600"],[3,"class"],["sChatColumnComposer",""],["placeholder","Send a prompt\u2026",3,"draftTextChange","sendRequested","queueRequested","stopRequested","queueEditStart","queueEditTextChange","queueEditSave","queueEditCancel","queueRemoveItem","queueSendNow","queueMoveUp","queueMoveDown","draftText","isExecuting","isSending","isStopping","enableAttachments","textareaRows","queueItems","isQueueLocked","editingQueueItemId","editingQueueText"],["sInputTextareaAccessory","",3,"transcriptSegmentReady","compactLayout"],[1,"rounded","px-1.5","py-0.5","text-[10px]","font-medium","text-black"],[1,"max-w-full",3,"ngClass"],[3,"ttsCached","view"]],template:function(i,t){if(i&1){let s=y();a(0,"app-s-session-chat-column-layout")(1,"div",2)(2,"div",3)(3,"span",4),d(4),r(),b(5,Si,3,5,"span",5),r()(),a(6,"div",6),w(7,"div",null,0),b(9,xi,2,0,"div",7)(10,vi,2,0,"div",8)(11,bi,2,0,"div",9)(12,gi,2,0,"div",9),H(13,yi,3,6,"div",10,fi),w(15,"div",null,1),r(),a(17,"div",11)(18,"app-s-session-input",12),f("draftTextChange",function(_){return u(s),m(t.handleComposerDraftChange(_))})("sendRequested",function(){return u(s),m(t.handleSendPrompt())})("queueRequested",function(){return u(s),m(t.handleSendPrompt())})("stopRequested",function(){return u(s),m(t.detailUi_DS.handleStopExecution())})("queueEditStart",function(_){return u(s),m(t.sessionQueue_DS.startEditing(_))})("queueEditTextChange",function(_){return u(s),m(t.sessionQueue_DS.editingText_$.set(_))})("queueEditSave",function(){return u(s),m(t.sessionQueue_DS.saveEdit())})("queueEditCancel",function(){return u(s),m(t.sessionQueue_DS.cancelEdit())})("queueRemoveItem",function(_){return u(s),m(t.sessionQueue_DS.removeItem(_))})("queueSendNow",function(_){return u(s),m(t.sessionQueue_DS.sendNow(_))})("queueMoveUp",function(_){return u(s),m(t.sessionQueue_DS.reorderItem({queueItemId:_,direction:"up"}))})("queueMoveDown",function(_){return u(s),m(t.sessionQueue_DS.reorderItem({queueItemId:_,direction:"down"}))}),a(19,"app-ccap-voice-record-button",13),f("transcriptSegmentReady",function(_){return u(s),m(t.handleVoiceSegment(_))}),r()()()()}if(i&2){let s;l(4),g(" ",t.ca_DS.activeSessionId_$()||"No session"," "),l(),S((s=t.ca_DS.selectedSession_$())?5:-1,s),l(4),S(t.ca_DS.isLoadingOlderMessages_$()?9:t.bubbleViews_$().length>0&&!t.ca_DS.assembledMessagesHasMore_$()?10:-1),l(2),S(t.ca_DS.selectedSessionLoading_$()?11:t.bubbleViews_$().length?-1:12),l(2),Q(t.bubbleViews_$()),l(5),C("draftText",t.promptInput_$())("isExecuting",t.isExecuting_$())("isSending",t.isSending_$())("isStopping",t.detailUi_DS.isStopping_$())("enableAttachments",!0)("textareaRows",3)("queueItems",t.sessionQueue_DS.items_$())("isQueueLocked",t.sessionQueue_DS.isLocked_$())("editingQueueItemId",t.sessionQueue_DS.editingItemId_$())("editingQueueText",t.sessionQueue_DS.editingText_$()),l(),C("compactLayout",!0)}},dependencies:[j,le,mt,ft,ht,X],encapsulation:2})}return n})();var Et=(()=>{class n{transform(e){switch(e??""){case"lifecycle":return"bg-cyan-600";case"ca-session-update":return"bg-green-600";case"prompt-sent":return"bg-blue-600";case"prompt-completed":return"bg-green-500";case"error":return"bg-red-600";case"sync-list":return"bg-purple-600";case"hydrate-from-agent":return"bg-indigo-600";default:return"bg-neutral-600"}}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionEventTypeColor",type:n,pure:!0})}return n})();var kt=(()=>{class n{sanitizer;constructor(e){this.sanitizer=e}transform(e){if(!e)return this.sanitizer.bypassSecurityTrustHtml('<span class="text-neutral-500">{}</span>');try{let i=JSON.stringify(e,null,2),t=this.highlightJson(i);return this.sanitizer.bypassSecurityTrustHtml(t)}catch{return this.sanitizer.bypassSecurityTrustHtml('<span class="text-neutral-500">{}</span>')}}MULTILINE_THRESHOLD=150;highlightJson(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/("(\\u[\da-fA-F]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,t=>/^"/.test(t)?/:$/.test(t)?`<span style="color:#7dd3fc">${t}</span>`:t.length>this.MULTILINE_THRESHOLD&&t.includes("\\n")?this.formatMultilineString(t):`<span style="color:#86efac">${t}</span>`:/true|false/.test(t)?`<span style="color:#fbbf24">${t}</span>`:/null/.test(t)?`<span style="color:#a78bfa">${t}</span>`:`<span style="color:#fb923c">${t}</span>`)}formatMultilineString(e){return'<span style="color:#86efac">"</span><span style="display:block;margin:2px 0;padding:4px 8px;border-left:2px solid rgba(134,239,172,0.25);background:rgba(134,239,172,0.04);border-radius:0 4px 4px 0;color:#86efac;opacity:0.85;white-space:pre-wrap;word-break:break-word;font-size:0.9em;line-height:1.5">'+e.slice(1,-1).replace(/\\n/g,`
|
|
4
|
+
`).replace(/\\t/g," ").replace(/\\r/g,"").replace(/\\"/g,'"').replace(/\\\\/g,"\\")+'</span><span style="color:#86efac">"</span>'}static \u0275fac=function(i){return new(i||n)(Fe(Qe,16))};static \u0275pipe=U({name:"caSessionJsonFormat",type:n,pure:!0})}return n})();var N=class n{static eventBrief(o){let e=o.data??{};switch(o.eventType){case"prompt-sent":{let i=e.content;if(typeof i=="string"&&i.length)return`prompt: ${i.length>80?`${i.substring(0,80)}\u2026`:i}`;let t=e.contentLength;return typeof t=="number"?`prompt length ${t}`:"prompt"}case"lifecycle":{let i=e.phase;if(i==="acpSessionRebound"){let t=e.previousAcpSessionId,s=e.newAcpSessionId,c=typeof t=="string"?t.substring(0,8):"?",_=typeof s=="string"?s.substring(0,8):"?";return`ACP rebound ${c}\u2026 \u2192 ${_}\u2026`}return typeof i=="string"?i:"lifecycle"}case"ca-session-update":return"session update";case"hydrate-from-agent":{let i=e.acpLoadFingerprint;return typeof i=="string"&&i.length>12?`session/load \xB7 ${i.substring(0,12)}\u2026`:"session/load snapshot"}default:{let i=JSON.stringify(e);return i.length>60?i.substring(0,60)+"\u2026":i}}}static streamRowBrief(o){if(o.events.length===1)return n.eventBrief(o.events[0]);let e=[];for(let t of o.events){let s=ce.parseStreamChunkFromMirrorData(t.data??{});s!==null&&e.push(s.text)}let i=e.join("");return i.length>80?`${i.substring(0,80)}\u2026`:i}static streamRowSequenceLabel(o){if(!o.events.length)return"";if(o.events.length===1)return`#${String(o.events[0].sequence??"")}`;let e=o.events[0].sequence??0,i=o.events[o.events.length-1].sequence??0;return`#${String(e)}\u2013#${String(i)}`}static streamRowClipboardText(o){return Ae.prettyStringifyUnknown({merged:o.events.length>1,events:o.events.map(e=>({eventType:e.eventType,sequence:e.sequence,timestamp:e.timestamp,sessionId:e.sessionId,data:e.data??{}}))})}};var Pt=(()=>{class n{transform(e){return e==null?"":N.streamRowBrief(e)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionTimelineStreamRowBrief",type:n,pure:!0})}return n})();var Mt=(()=>{class n{transform(e){return e==null?"":N.streamRowClipboardText(e)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionTimelineStreamRowClipboardText",type:n,pure:!0})}return n})();var Rt=(()=>{class n{transform(e){return e==null?"":N.streamRowSequenceLabel(e)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionTimelineStreamRowSequenceLabel",type:n,pure:!0})}return n})();var Ei=["eventList"],ki=(n,o)=>o.rowKey,Pi=n=>({"bg-neutral-800/30":n});function Mi(n,o){if(n&1){let e=y();a(0,"div",9)(1,"button",12),f("click",function(){u(e);let t=p();return m(t.handleLoadMoreEvents())}),d(2),r()()}if(n&2){let e=p();l(),C("disabled",e.isLoadingMore_$()),l(),g(" ",e.isLoadingMore_$()?"Loading\u2026":"Load more events"," ")}}function Ri(n,o){n&1&&(a(0,"div",11),d(1," No events yet "),r())}function Li(n,o){if(n&1&&(a(0,"span",17),d(1),r()),n&2){let e=p().$implicit;l(),g(" \xD7",e.events.length,"")}}function Vi(n,o){if(n&1&&(a(0,"div",23)(1,"div",24),d(2,"Event data:"),r(),w(3,"pre",25),k(4,"caSessionJsonFormat"),r()),n&2){let e=p().$implicit;l(3),C("innerHTML",P(4,1,e.events[0].data),Ue)}}function Oi(n,o){if(n&1){let e=y();a(0,"div",14),f("click",function(){let t=u(e).$implicit,s=p(2);return m(s.handleSelectRow(t))}),a(1,"div",15)(2,"span",16),k(3,"caSessionEventTypeColor"),d(4),b(5,Li,2,1,"span",17),r(),a(6,"span",18),d(7),k(8,"caSessionTimelineStreamRowSequenceLabel"),r(),a(9,"span",19),k(10,"caSessionTimelineStreamRowBrief"),d(11),k(12,"caSessionTimelineStreamRowBrief"),r(),a(13,"span",20),k(14,"sAbsoluteTime"),d(15),k(16,"sTimeAgo"),r(),a(17,"span",21),f("click",function(t){return u(e),m(t.stopPropagation())}),w(18,"app-s-copy-button",22),k(19,"caSessionTimelineStreamRowClipboardText"),r()(),b(20,Vi,5,3,"div",23),r()}if(n&2){let e,i,t=o.$implicit,s=p(2);C("ngClass",Ne(26,Pi,s.selectedRowKey_$()===t.rowKey)),l(2),I(P(3,12,t.events[0].eventType)),l(2),g(" ",t.events[0].eventType," "),l(),S(t.events.length>1?5:-1),l(2),g(" ",P(8,14,t)," "),l(2),C("title",P(10,16,t)),l(2),g(" ",P(12,18,t)," "),l(2),C("title",P(14,20,(e=t.events[0].timestamp)!==null&&e!==void 0?e:"")),l(2),g(" ",P(16,22,(i=t.events[0].timestamp)!==null&&i!==void 0?i:"")," "),l(3),C("content",P(19,24,t)),l(2),S(s.selectedRowKey_$()===t.rowKey?20:-1)}}function Ui(n,o){if(n&1&&H(0,Oi,21,28,"div",13,ki),n&2){let e=p();Q(e.displayRows_$())}}var Lt=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);selectedRowKey_$=h(null);isLoadingMore_$=h(!1);isAutoScroll_$=h(!0);eventListRef;previousRowCount=0;displayRows_$=M(()=>{let e=[...this.ca_DS.selectedSessionEvents_$()].sort(dt.compareMirrorEventsAsc);return[...ce.foldEventsToTimelineRows(e)].reverse()});ngAfterViewChecked(){let e=this.displayRows_$().length;this.isAutoScroll_$()&&e>this.previousRowCount&&this.scrollToTop(),this.previousRowCount=e}handleToggleAutoScroll(){this.isAutoScroll_$.update(e=>!e)}handleSelectRow(e){let i=e.rowKey;this.selectedRowKey_$()===i?this.selectedRowKey_$.set(null):this.selectedRowKey_$.set(i)}handleLoadMoreEvents(){return $(this,null,function*(){let e=this.ca_DS.activeSessionId_$();if(e){this.isLoadingMore_$.set(!0);try{yield this.ca_DS.loadMoreSessionEvents({sessionId:e})}finally{this.isLoadingMore_$.set(!1)}}})}scrollToTop(){let e=this.eventListRef?.nativeElement;e&&(e.scrollTop=0)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-timeline"]],viewQuery:function(i,t){if(i&1&&J(Ei,5),i&2){let s;G(s=Y())&&(t.eventListRef=s.first)}},hostAttrs:[1,"flex","flex-col","h-full","min-h-0","overflow-hidden"],decls:18,vars:9,consts:[["eventList",""],[1,"flex","items-center","justify-between","p-2","border-b","border-neonDefault","shrink-0"],[1,"flex","items-center","gap-1"],[1,"text-xs","text-neutral-400","font-medium"],[1,"text-xs","text-neutral-500"],["type","button",1,"text-[10px]","px-1.5","py-0.5","border","rounded","transition-colors",3,"click"],[1,"flex","items-center","gap-1","px-2","py-1.5","border-b","border-neonDefault","shrink-0"],["type","button","title","Session lifecycle status changes",1,"px-2","py-0.5","text-[10px]","border","rounded","transition-colors",3,"click"],["type","button","title","Tool call progress / agent updates (in_progress)",1,"px-2","py-0.5","text-[10px]","border","rounded","transition-colors",3,"click"],[1,"shrink-0","px-2","py-0.5","border-b","border-neutral-800"],[1,"flex-1","min-h-0","overflow-y-auto"],[1,"flex","items-center","justify-center","py-4","text-[10px]","text-neutral-600"],["type","button",1,"w-full","px-2","py-0.5","text-[9px]","border","border-neutral-600","text-neutral-300","rounded","disabled:opacity-40",3,"click","disabled"],[1,"px-2","py-1","border-b","border-neutral-700/30","cursor-pointer","hover:bg-neutral-800/30","transition-colors",3,"ngClass"],[1,"px-2","py-1","border-b","border-neutral-700/30","cursor-pointer","hover:bg-neutral-800/30","transition-colors",3,"click","ngClass"],[1,"flex","items-center","gap-1.5","min-w-0"],[1,"text-[9px]","px-1","py-0.5","rounded","font-medium","text-black","shrink-0","leading-none","whitespace-nowrap"],[1,"text-neutral-600","font-normal"],[1,"text-[10px]","text-neutral-600","shrink-0","leading-none","font-mono"],[1,"text-[10px]","text-neutral-400","truncate","font-mono","min-w-0","flex-1","leading-none",3,"title"],[1,"text-[10px]","text-neutral-400","shrink-0","leading-none",3,"title"],[1,"inline-flex","shrink-0",3,"click"],["buttonTitle","Copy event (JSON)","size","sm",3,"content"],[1,"mt-1","px-0","pt-1","border-t","border-neutral-800/80"],[1,"text-[10px]","text-neutral-500","mb-1"],[1,"p-2","bg-neutral-900","border","border-neutral-700/50","rounded","text-[10px]","font-mono","text-neonCyan/70","overflow-x-auto","whitespace-pre-wrap","break-words","max-h-60",3,"innerHTML"]],template:function(i,t){if(i&1){let s=y();a(0,"div",1)(1,"div",2)(2,"span",3),d(3,"Event Timeline"),r(),a(4,"span",4),d(5),r()(),a(6,"button",5),f("click",function(){return u(s),m(t.handleToggleAutoScroll())}),d(7," Auto-scroll "),r()(),a(8,"div",6)(9,"button",7),f("click",function(){return u(s),m(t.detailUi_DS.handleToggleSessionStatus())}),d(10," Session status "),r(),a(11,"button",8),f("click",function(){return u(s),m(t.detailUi_DS.handleToggleAgentUpdates())}),d(12," Agent updates "),r()(),b(13,Mi,3,2,"div",9),a(14,"div",10,0),b(16,Ri,2,0,"div",11)(17,Ui,2,0),r()}i&2&&(l(5),g(" (",t.ca_DS.selectedSessionEvents_$().length,") "),l(),I(t.isAutoScroll_$()?"border-neonCyan text-neonCyan shadow-neon-glow-cyan":"border-neonDefault text-neutral-400"),l(3),I(t.detailUi_DS.isShowSessionStatus_$()?"border-purple-500/50 text-purple-400 bg-purple-500/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300"),l(2),I(t.detailUi_DS.isShowAgentUpdates_$()?"border-teal-500/50 text-teal-400 bg-teal-500/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300 hover:border-neutral-600"),l(2),S(t.ca_DS.sessionEventsHasMore_$()?13:-1),l(3),S(t.displayRows_$().length?17:16))},dependencies:[j,ct,at,rt,Et,kt,Pt,Mt,Rt],encapsulation:2})}return n})();function Wi(n,o){n&1&&(a(0,"div",0),d(1,"Loading\u2026"),r())}function qi(n,o){n&1&&(a(0,"div",0),d(1,"No session"),r())}function Ni(n,o){if(n&1&&(a(0,"div",6)(1,"span",7),d(2,"ACP sessionId"),r(),a(3,"span",8),d(4),r()()),n&2){p();let e=E(0);l(4),q(e.acpSessionId)}}function Bi(n,o){if(n&1&&(a(0,"div",6)(1,"span",7),d(2,"Label"),r(),a(3,"span",18),d(4),r()()),n&2){p();let e=E(0);l(4),q(e.label)}}function zi(n,o){if(n&1&&(a(0,"div",6)(1,"span",7),d(2,"Parent CCAP session"),r(),a(3,"span",8),d(4),r()()),n&2){p();let e=E(0);l(4),q(e.parentSessionId)}}function Hi(n,o){if(n&1&&(a(0,"div",4)(1,"div",5),d(2,"Agent"),r(),a(3,"div",18),d(4),r()()),n&2){p();let e=E(0);l(4),te("",e.agentInfoName," ",e.agentInfoVersion,"")}}function Qi(n,o){if(n&1&&(a(0,"div",10),d(1),r()),n&2){p();let e=E(0);l(),g(" ACP: ",e.isAcpConnected?"connected":"offline"," ")}}function ji(n,o){if(n&1&&(a(0,"div",10),d(1),r()),n&2){p();let e=E(0);l(),g(" session/load: ",e.loadSessionSupported?"supported":"not advertised"," ")}}function Ki(n,o){if(n&1&&(a(0,"div",10),d(1),r()),n&2){p();let e=E(0);l(),g(" mode: ",e.isTerminalMode?"terminal":"direct"," ")}}function Xi(n,o){if(n&1&&(a(0,"div",19),d(1),r()),n&2){p();let e=E(0);I(e.isTerminalRunnerConnected?"text-green-400":"text-amber-400"),l(),g(" runner: ",e.isTerminalRunnerConnected?"connected":"disconnected"," ")}}function Ji(n,o){if(n&1&&(a(0,"div",6)(1,"span",7),d(2,"lastSyncAt"),r(),a(3,"span",20),d(4),r()()),n&2){p();let e=E(0);l(4),q(e.lastSyncAt)}}function Gi(n,o){if(n&1&&(a(0,"div",12),d(1),r()),n&2){p();let e=E(0);l(),g(" ",e.lastSyncError," ")}}function Yi(n,o){if(n&1){let e=y();ie(0),a(1,"div",1)(2,"div",2)(3,"span",3),k(4,"caSessionStatusColor"),d(5),r()(),a(6,"div",4)(7,"div",5),d(8,"Session"),r(),a(9,"div",6)(10,"span",7),d(11,"Business ID"),r(),a(12,"span",8),d(13),r()(),b(14,Ni,5,1,"div",6)(15,Bi,5,1,"div",6),a(16,"div",6)(17,"span",7),d(18,"Workspace"),r(),a(19,"span",8),d(20),r()(),b(21,zi,5,1,"div",6),r(),b(22,Hi,5,2,"div",4),a(23,"div",9)(24,"div",5),d(25,"Mirror / ACP"),r(),b(26,Qi,2,1,"div",10)(27,ji,2,1,"div",10)(28,Ki,2,1,"div",10)(29,Xi,2,3,"div",11)(30,Ji,5,1,"div",6)(31,Gi,2,1,"div",12),a(32,"button",13),f("click",function(){u(e);let t=p();return m(t.handleHydrate(!1))}),d(33," Hydrate from agent "),r(),a(34,"button",14),f("click",function(){u(e);let t=p();return m(t.handleHydrate(!0))}),d(35," Force re-hydrate "),r()(),a(36,"div",15)(37,"button",16),f("click",function(){u(e);let t=p();return m(t.handleTerminate())}),d(38),r(),a(39,"button",17),f("click",function(){u(e);let t=p();return m(t.handleArchiveToggle())}),d(40),r()()()}if(n&2){let e=p(),i=ne(e.session_$());l(3),I(P(4,22,i.status)),l(2),g(" ",i.status," "),l(8),q(i.sessionId),l(),S(i.acpSessionId?14:-1),l(),S(i.label?15:-1),l(5),q(i.workspacePath),l(),S(i.parentSessionId?21:-1),l(),S(i.agentInfoName||i.agentInfoVersion?22:-1),l(4),S(i.isAcpConnected===!0||i.isAcpConnected===!1?26:-1),l(),S(i.loadSessionSupported===!0||i.loadSessionSupported===!1?27:-1),l(),S(i.isTerminalMode===!0||i.isTerminalMode===!1?28:-1),l(),S(i.isTerminalMode===!0?29:-1),l(),S(i.lastSyncAt?30:-1),l(),S(i.lastSyncError?31:-1),l(),C("disabled",e.isHydrating_$()||i.loadSessionSupported!==!0),l(2),C("disabled",e.isHydrating_$()||i.loadSessionSupported!==!0),l(3),C("disabled",e.detailUi_DS.isTerminating_$()),l(),g(" ",e.detailUi_DS.isTerminating_$()?"Terminating\u2026":"Terminate"," "),l(),C("disabled",e.isArchiving_$()),l(),g(" ",i.isArchived?"Unarchive":"Archive"," ")}}var Vt=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);session_$=M(()=>this.ca_DS.selectedSession_$());isLoading_$=M(()=>this.ca_DS.selectedSessionLoading_$());isArchiving_$=h(!1);isHydrating_$=h(!1);handleHydrate(e){return $(this,null,function*(){let t=this.session_$()?.sessionId??"";if(t){this.isHydrating_$.set(!0);try{yield this.ca_DS.hydrateFromAgent({sessionId:t,force:e})}catch{}finally{this.isHydrating_$.set(!1)}}})}handleTerminate(){this.detailUi_DS.handleTerminate()}handleArchiveToggle(){return $(this,null,function*(){let e=this.session_$(),i=e?.sessionId??"";if(!(!i||!e)){this.isArchiving_$.set(!0);try{let t=e.isArchived!==!0;yield this.ca_DS.setSessionArchived({sessionId:i,isArchived:t})}catch{}finally{this.isArchiving_$.set(!1)}}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-metadata"]],hostAttrs:[1,"flex","flex-col"],decls:3,vars:1,consts:[[1,"flex","items-center","justify-center","py-6","text-[10px]","text-neutral-600"],[1,"p-2","space-y-3","text-xs"],[1,"flex","items-center","gap-2"],[1,"px-2","py-0.5","rounded","text-[10px]","font-medium","text-black"],[1,"space-y-1.5"],[1,"text-[10px]","font-semibold","text-neutral-500","uppercase","tracking-wide"],[1,"flex","flex-col","gap-0.5"],[1,"text-[10px]","text-neutral-600"],[1,"font-mono","text-[10px]","text-neutral-300","break-all"],[1,"space-y-1.5","pt-2","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-400"],[1,"text-[10px]",3,"class"],[1,"text-[10px]","text-amber-400/90","border","border-amber-600/30","rounded","px-1.5","py-1"],["type","button","title","ACP session/load \u2192 mirror hydrate event",1,"w-full","px-2","py-1","text-[10px]","border","border-sky-700","text-sky-300","rounded","disabled:opacity-40",3,"click","disabled"],["type","button",1,"w-full","px-2","py-1","text-[10px]","border","border-neutral-600","text-neutral-400","rounded","disabled:opacity-40",3,"click","disabled"],[1,"flex","flex-col","gap-2","pt-2","border-t","border-neutral-800"],["type","button",1,"px-2","py-1","text-[10px]","border","border-red-800","text-red-300","rounded","disabled:opacity-40",3,"click","disabled"],["type","button",1,"px-2","py-1","text-[10px]","border","border-neutral-600","text-neutral-300","rounded","disabled:opacity-40",3,"click","disabled"],[1,"text-[10px]","text-neutral-300"],[1,"text-[10px]"],[1,"font-mono","text-[10px]","text-neutral-300"]],template:function(i,t){i&1&&b(0,Wi,2,0,"div",0)(1,qi,2,0,"div",0)(2,Yi,41,24,"div",1),i&2&&S(t.isLoading_$()?0:t.session_$()?2:1)},dependencies:[X],encapsulation:2})}return n})();function en(n,o){if(n&1){let e=y();a(0,"div",0)(1,"p",4),d(2,"Could not load this session."),r(),w(3,"app-ccap-error-display",5),a(4,"button",6),f("click",function(){u(e);let t=p();return m(t.handleRetryLoadDetail())}),d(5," Retry "),r()()}if(n&2){let e=p();l(3),C("error",e.ca_DS.sessionDetailError_$())}}function tn(n,o){if(n&1&&(a(0,"div",1)(1,"span"),d(2,"Loading session\u2026"),r(),a(3,"span",7),d(4),r()()),n&2){let e=p();l(4),q(e.sessionId_$())}}function nn(n,o){if(n&1){let e=y();a(0,"app-s-session-detail-three-column-layout",8),f("startResizeStart",function(t){u(e);let s=p();return m(s.handleMetadataResizeStart(t))})("endResizeStart",function(t){u(e);let s=p();return m(s.handleTimelineResizeStart(t))}),a(1,"div",9),w(2,"app-ccap-ca-metadata"),r(),a(3,"div",10),w(4,"app-ccap-ca-console"),r(),a(5,"div",11),w(6,"app-ccap-ca-timeline"),r()()}if(n&2){let e=p();C("isStartOpen",e.detailUi_DS.isMetadataPanelOpen_$())("isEndOpen",e.detailUi_DS.isTimelinePanelOpen_$())("startWidthPx",e.metadataWidth_$())("endWidthPx",e.timelineWidth_$())("isResizing",e.isResizing_$())}}function on(n,o){if(n&1){let e=y();a(0,"div",0)(1,"p",4),d(2,"Could not load CA session list."),r(),w(3,"app-ccap-error-display",12),a(4,"button",6),f("click",function(){u(e);let t=p();return m(t.handleRetryLoadList())}),d(5," Retry list "),r()()}if(n&2){let e=p();l(3),C("error",e.ca_DS.sessionsLoadError_$())}}function sn(n,o){n&1&&(a(0,"div",1)(1,"span"),d(2,"Loading sessions\u2026"),r()())}function an(n,o){n&1&&(a(0,"div",3)(1,"span"),d(2,"No CA sessions yet."),r(),a(3,"span",13),d(4,"Create one from the sidebar or check the server connection."),r()())}function rn(n,o){n&1&&(a(0,"div",3)(1,"span"),d(2,"Select a session from the sidebar"),r(),a(3,"span",13),d(4,"Opening the default session\u2026"),r()())}var Ce=(()=>{class n extends nt{ca_DS=v(L);detailUi_DS=v(F);peiContext_DS=v(re);route=v(oe);router=v(se);sessionsListObs$;sessionsLoadingObs$;sessionId_$=h("");metadataWidth_$=h(256);timelineWidth_$=h(288);isResizing_$=h(!1);isEmptyRouteListFetchRequested=!1;constructor(){super(),this.sessionsListObs$=ge(this.ca_DS.sessions_$),this.sessionsLoadingObs$=ge(this.ca_DS.sessionsLoading_$)}ngOnInit(){this.metadataWidth_$.set(Math.max(160,Math.min(500,x.loadPanelWidth("metadata",256)))),this.timelineWidth_$.set(Math.max(200,Math.min(600,x.loadPanelWidth("timeline",288))));let e=this.route.paramMap.pipe(Ie(i=>({sessionId:i.get("sessionId")??"",ccapId:i.get("ccapId")??""})),ke((i,t)=>i.sessionId===t.sessionId&&i.ccapId===t.ccapId));this.addSubscription(Ee([e,this.sessionsListObs$,this.sessionsLoadingObs$]).subscribe(([i,t,s])=>{let c=i.sessionId;if(i.ccapId&&this.peiContext_DS.activeCcapId_$()!==i.ccapId&&this.peiContext_DS.selectInstance(i.ccapId),c.length>0){this.isEmptyRouteListFetchRequested=!1,c!==this.sessionId_$()&&this.loadSession(c);return}if(s)return;if(!t.length&&!this.isEmptyRouteListFetchRequested){this.isEmptyRouteListFetchRequested=!0,this.ca_DS.loadSessions({includeArchived:x.loadShowArchived()});return}if(!t.length){this.sessionId_$.set(""),this.ca_DS.stopOpenSessionPolling(),this.ca_DS.setActiveSessionId("");return}let _=me.pickDefaultSessionId({sessions:t,lastSavedSessionId:x.loadLastSessionId(),includeArchived:x.loadShowArchived()});if(_.length>0){let T=this.peiContext_DS.activeCcapId_$(),W=T?["/ca-session",T,_]:["/ca-session",_];this.router.navigate(W,{replaceUrl:!0});return}this.sessionId_$.set(""),this.ca_DS.stopOpenSessionPolling(),this.ca_DS.setActiveSessionId("")}))}ngOnDestroy(){super.ngOnDestroy(),this.ca_DS.stopOpenSessionPolling(),this.ca_DS.setActiveSessionId("")}handleRetryLoadDetail(){let e=this.sessionId_$();e.length&&this.loadSession(e)}handleRetryLoadList(){this.ca_DS.loadSessions({includeArchived:x.loadShowArchived()})}handleMetadataResizeStart(e){let i=this.metadataWidth_$(),t=e.clientX;this.isResizing_$.set(!0),Z.attachUntilPointerUp({startEvent:e,onMove:s=>{let c=s.clientX-t,_=Math.max(160,Math.min(500,i+c));this.metadataWidth_$.set(_)},onEnd:()=>{this.isResizing_$.set(!1),x.savePanelWidth("metadata",this.metadataWidth_$())}})}handleTimelineResizeStart(e){let i=this.timelineWidth_$(),t=e.clientX;this.isResizing_$.set(!0),Z.attachUntilPointerUp({startEvent:e,onMove:s=>{let c=t-s.clientX,_=Math.max(200,Math.min(600,i+c));this.timelineWidth_$.set(_)},onEnd:()=>{this.isResizing_$.set(!1),x.savePanelWidth("timeline",this.timelineWidth_$())}})}loadSession(e){this.sessionId_$.set(e),this.ca_DS.clearLiveOutput(),this.ca_DS.setActiveSessionId(e),x.saveLastSessionId(e),this.peiContext_DS.ensureInitialized().then(()=>{this.runLoadSessionDetailWithPoll(e)})}runLoadSessionDetailWithPoll(e){return $(this,null,function*(){(yield this.ca_DS.loadSessionDetail({sessionId:e}))&&e===this.sessionId_$()&&this.ca_DS.startOpenSessionPolling(e)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=O({type:n,selectors:[["app-ccap-ca-detail"]],hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden"],features:[We],decls:7,vars:1,consts:[[1,"flex","flex-col","items-center","justify-center","h-full","gap-3","px-4","py-6","overflow-y-auto"],[1,"flex","flex-col","items-center","justify-center","h-full","gap-2","text-neutral-500","text-sm"],[3,"isStartOpen","isEndOpen","startWidthPx","endWidthPx","isResizing"],[1,"flex","flex-col","items-center","justify-center","h-full","gap-2","text-neutral-500","text-sm","px-4","text-center"],[1,"text-xs","text-neutral-400","text-center"],["sourceLabelOverride","CA session detail",1,"block","w-full","max-w-lg",3,"error"],["type","button",1,"px-3","py-1.5","text-xs","border","border-neonDefault","text-neutral-300","rounded","hover:bg-neutral-700",3,"click"],[1,"text-xs","text-neutral-600","font-mono","truncate","max-w-[90%]"],[3,"startResizeStart","endResizeStart","isStartOpen","isEndOpen","startWidthPx","endWidthPx","isResizing"],["sDetailColumnStart",""],["sDetailColumnMain",""],["sDetailColumnEnd",""],["sourceLabelOverride","CA session list",1,"block","w-full","max-w-lg",3,"error"],[1,"text-xs","text-neutral-600"]],template:function(i,t){i&1&&b(0,en,6,1,"div",0)(1,tn,5,1,"div",1)(2,nn,7,5,"app-s-session-detail-three-column-layout",2)(3,on,6,1,"div",0)(4,sn,3,0,"div",1)(5,an,5,0,"div",3)(6,rn,5,0,"div",3),i&2&&S(t.sessionId_$()&&t.ca_DS.sessionDetailError_$()?0:t.sessionId_$()&&t.ca_DS.selectedSessionLoading_$()?1:t.sessionId_$()?2:t.ca_DS.sessionsLoadError_$()?3:t.ca_DS.sessionsLoading_$()?4:t.ca_DS.sessions_$().length?6:5)},dependencies:[K,ut,It,Lt,Vt],encapsulation:2})}return n})();var ln=[{path:"",component:Dt,children:[{path:"",pathMatch:"full",component:Ce},{path:":ccapId/:sessionId",component:Ce},{path:":sessionId",component:Ce}]}],Hs=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Re({type:n});static \u0275inj=Me({imports:[He,tt,Ke.forChild(ln),K,le,ae,_e,ue,Ct]})}return n})();export{Hs as CaSession_Module};
|
|
5
|
+
//# sourceMappingURL=ca.module-VKQKP6JP.js.map
|