@futdevpro/ccap 1.1.2501 → 1.1.2509

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.
Files changed (196) hide show
  1. package/client-dist/{agent-instances.module-LTDXV2IY.js → agent-instances.module-QQHSIHVZ.js} +2 -2
  2. package/client-dist/{ca.module-X4AI3X6G.js → ca.module-FTQALPNM.js} +2 -2
  3. package/client-dist/{cc.module-6QEV2L5A.js → cc.module-UPCFEGEY.js} +4 -4
  4. package/client-dist/{cc.module-6QEV2L5A.js.map → cc.module-UPCFEGEY.js.map} +3 -3
  5. package/client-dist/{chunk-XRFAWHWF.js → chunk-2E6OA2KT.js} +2 -2
  6. package/client-dist/{chunk-IOTAEA7L.js → chunk-2HIXFHTS.js} +2 -2
  7. package/client-dist/{chunk-IOTAEA7L.js.map → chunk-2HIXFHTS.js.map} +1 -1
  8. package/client-dist/{chunk-6UTCOTTK.js → chunk-3R7FDMZ3.js} +2 -2
  9. package/client-dist/{chunk-EIOAQCYO.js → chunk-3UDLOQR2.js} +2 -2
  10. package/client-dist/{chunk-EIOAQCYO.js.map → chunk-3UDLOQR2.js.map} +3 -3
  11. package/client-dist/{chunk-X7RDMQ3C.js → chunk-4FSRDTZN.js} +2 -2
  12. package/client-dist/{chunk-HXI4T6RD.js → chunk-4RFLGW5L.js} +2 -2
  13. package/client-dist/{chunk-SCV6UFI3.js → chunk-5L4G3C5C.js} +2 -2
  14. package/client-dist/{chunk-6DG4SANW.js → chunk-5MNGROTB.js} +2 -2
  15. package/client-dist/{chunk-4GZ62WW2.js → chunk-6XRGBDSK.js} +2 -2
  16. package/client-dist/{chunk-UXSUGWC7.js → chunk-72FQNGJO.js} +2 -2
  17. package/client-dist/{chunk-6HLT2T6S.js → chunk-AM2JGX23.js} +2 -2
  18. package/client-dist/{chunk-UUVX445C.js → chunk-APXVQISJ.js} +2 -2
  19. package/client-dist/{chunk-EGJCQMSF.js → chunk-AQ72GJMX.js} +2 -2
  20. package/client-dist/{chunk-2R2YN5EL.js → chunk-AY3XK6RS.js} +2 -2
  21. package/client-dist/{chunk-6QUQUVFA.js → chunk-CJVTAHYF.js} +2 -2
  22. package/client-dist/{chunk-WBGOPUBJ.js → chunk-CKR2NA35.js} +2 -2
  23. package/client-dist/{chunk-QF3XZDPL.js → chunk-EMTKUTBC.js} +2 -2
  24. package/client-dist/{chunk-6KYIRW2G.js → chunk-F46E5KZ3.js} +2 -2
  25. package/client-dist/{chunk-APQCANPB.js → chunk-FOUQZW4D.js} +2 -2
  26. package/client-dist/{chunk-Z3GNAEVX.js → chunk-FVJHSIII.js} +3 -3
  27. package/client-dist/chunk-FVJHSIII.js.map +7 -0
  28. package/client-dist/{chunk-WTMQ54UE.js → chunk-G44KM4TW.js} +2 -2
  29. package/client-dist/{chunk-WEVE5VD3.js → chunk-G7FLLFQV.js} +2 -2
  30. package/client-dist/{chunk-ESXT6PE7.js → chunk-GNW4X5RC.js} +2 -2
  31. package/client-dist/{chunk-UI5GI7XJ.js → chunk-H7BIO73O.js} +2 -2
  32. package/client-dist/{chunk-GFTD3PFY.js → chunk-JAUNNZJN.js} +2 -2
  33. package/client-dist/{chunk-ZLTD5EHK.js → chunk-JIZE3HXP.js} +2 -2
  34. package/client-dist/{chunk-3UOIDPAC.js → chunk-JUWOVLJL.js} +2 -2
  35. package/client-dist/{chunk-ZLFERKG3.js → chunk-KFS5VDDV.js} +2 -2
  36. package/client-dist/{chunk-VWZZNYWE.js → chunk-KTAWOOUI.js} +2 -2
  37. package/client-dist/{chunk-KPAFG4UR.js → chunk-KZUKSPQS.js} +2 -2
  38. package/client-dist/{chunk-BOSO7V5W.js → chunk-LTRCLVM3.js} +2 -2
  39. package/client-dist/{chunk-JVQWRB3X.js → chunk-M7Z2O4RG.js} +2 -2
  40. package/client-dist/{chunk-LV57US6X.js → chunk-MSY74RUJ.js} +2 -2
  41. package/client-dist/{chunk-ZDPUFUOX.js → chunk-NJUY7I3Y.js} +2 -2
  42. package/client-dist/{chunk-IF3SDXO3.js → chunk-NTUVOM4B.js} +2 -2
  43. package/client-dist/{chunk-2BHHN7VT.js → chunk-O65C5CZH.js} +2 -2
  44. package/client-dist/{chunk-O2FFMKAR.js → chunk-OG33J4ZD.js} +2 -2
  45. package/client-dist/{chunk-PPC5TB5D.js → chunk-OQ24BGZJ.js} +2 -2
  46. package/client-dist/{chunk-QZNDAR62.js → chunk-PUFVETM4.js} +2 -2
  47. package/client-dist/{chunk-MKW5NDHN.js → chunk-PYVQEDEW.js} +2 -2
  48. package/client-dist/{chunk-SUTYJTHV.js → chunk-Q4YAQFNP.js} +2 -2
  49. package/client-dist/{chunk-OQBJMVZN.js → chunk-QHUBJGWS.js} +2 -2
  50. package/client-dist/{chunk-Q6AFYXZZ.js → chunk-RRV4AJML.js} +2 -2
  51. package/client-dist/{chunk-EM3SZVDU.js → chunk-SQDIXJP2.js} +2 -2
  52. package/client-dist/chunk-TJENOBO6.js +2 -0
  53. package/client-dist/chunk-TJENOBO6.js.map +7 -0
  54. package/client-dist/{chunk-GBTUS3NA.js → chunk-TM2SED26.js} +2 -2
  55. package/client-dist/{chunk-YGNJ5SA4.js → chunk-U5VAWMNB.js} +2 -2
  56. package/client-dist/{chunk-AQ6UDIDI.js → chunk-V4X7URSF.js} +2 -2
  57. package/client-dist/{chunk-XPGMSC4M.js → chunk-VM45PE3J.js} +2 -2
  58. package/client-dist/{chunk-OCZXZA7H.js → chunk-VW3WQQBF.js} +2 -2
  59. package/client-dist/{chunk-XKVTWHUQ.js → chunk-WX6TVKDG.js} +2 -2
  60. package/client-dist/{chunk-7RCG5AUK.js → chunk-XNHRRX4L.js} +2 -2
  61. package/client-dist/{chunk-FF6BDAQ3.js → chunk-XQKHUGZW.js} +2 -2
  62. package/client-dist/{chunk-NOJ5LBG5.js → chunk-Y6PUQHIU.js} +2 -2
  63. package/client-dist/{chunk-PCOACAKZ.js → chunk-YWWHFCS3.js} +2 -2
  64. package/client-dist/{chunk-HFR2YVDI.js → chunk-ZQCAHEXF.js} +2 -2
  65. package/client-dist/{consultant.module-5XH5HTTH.js → consultant.module-HFZCP4N4.js} +2 -2
  66. package/client-dist/{crd.module-53UQTTLA.js → crd.module-6R37JW4V.js} +2 -2
  67. package/client-dist/{dashboard.module-KOHITRUW.js → dashboard.module-YAZCCU26.js} +2 -2
  68. package/client-dist/{do-character.component-7LDXQOB6.css.map → do-character.component-PZHI3KZL.css.map} +2 -2
  69. package/client-dist/{do.module-EOBGMEAU.js → do.module-QV56KZQO.js} +10 -10
  70. package/client-dist/{document-library.module-72JKQJ2J.js → document-library.module-EFTFUIXJ.js} +2 -2
  71. package/client-dist/{embedding-eval.module-3WCRH2K6.js → embedding-eval.module-NIPCFFWB.js} +2 -2
  72. package/client-dist/{embedding-registry.module-TG4TN5QC.js → embedding-registry.module-4GLSQNAT.js} +2 -2
  73. package/client-dist/{err.module-RJW3NXTH.js → err.module-2RPVCWXD.js} +2 -2
  74. package/client-dist/{feedback.module-FWEGEGYQ.js → feedback.module-WVLKZ533.js} +2 -2
  75. package/client-dist/{host-runtime-mcp.module-KAAHVFSN.js → host-runtime-mcp.module-GRW6RSCA.js} +2 -2
  76. package/client-dist/index.html +1 -1
  77. package/client-dist/{live-dev-pipeline.module-QHCYBTUC.js → live-dev-pipeline.module-P3DEM6CE.js} +2 -2
  78. package/client-dist/{logs.module-4LFK3T3K.js → logs.module-U6KCQYDU.js} +2 -2
  79. package/client-dist/{main-LZQUL77P.js → main-F4G6PI7V.js} +3 -3
  80. package/client-dist/{master-control-remote-poc.module-WED7JUNZ.js → master-control-remote-poc.module-RYSKRGXU.js} +2 -2
  81. package/client-dist/{mobile-app.module-AXH7W53A.js → mobile-app.module-EBMTWXS2.js} +2 -2
  82. package/client-dist/{model-registry.module-SGHIKUWI.js → model-registry.module-F6R5MSBB.js} +2 -2
  83. package/client-dist/{oc.module-JNAPKZRS.js → oc.module-VIBOASVG.js} +2 -2
  84. package/client-dist/{orc.module-DGB2CPYK.js → orc.module-NJQ6XGPN.js} +2 -2
  85. package/client-dist/{project-management.module-7PYZ6SMH.js → project-management.module-JQEQIHL2.js} +2 -2
  86. package/client-dist/project-source-routed.module-LZCPWG6J.js +2 -0
  87. package/client-dist/{scheduler.module-KG43N2FH.js → scheduler.module-WWPV25AU.js} +2 -2
  88. package/client-dist/{session.module-T5TLRVUA.js → session.module-YYFJ6B5X.js} +2 -2
  89. package/client-dist/{set.module-Y3LNLS4R.js → set.module-IKSASSWS.js} +2 -2
  90. package/client-dist/{setup.module-CB5LKKCH.js → setup.module-RVTO6I3R.js} +2 -2
  91. package/client-dist/{terminals.module-Y4AD2WBX.js → terminals.module-AZEN47GZ.js} +2 -2
  92. package/client-dist/{voice-notes-poc.module-YNGGW2OL.js → voice-notes-poc.module-5JUTNIBP.js} +2 -2
  93. package/client-dist/{wfs.module-JD7CMBRB.js → wfs.module-5MMNXIRW.js} +2 -2
  94. package/package.json +1 -1
  95. package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/utils/self.util.d.ts +18 -1
  96. package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/utils/self.util.d.ts.map +1 -1
  97. package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/utils/self.util.js +44 -2
  98. package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/utils/self.util.js.map +1 -1
  99. package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/utils/self.util.spec.js +39 -2
  100. package/server/build/src/_modules/ccap-agent/_modules/tools/_modules/fixed-tools/_modules/self/_collections/utils/self.util.spec.js.map +1 -1
  101. package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/claude-code.controller.d.ts.map +1 -1
  102. package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/claude-code.controller.js +19 -0
  103. package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/claude-code.controller.js.map +1 -1
  104. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.d.ts +12 -0
  105. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.d.ts.map +1 -1
  106. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.js +52 -0
  107. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.js.map +1 -1
  108. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.d.ts +19 -0
  109. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.d.ts.map +1 -1
  110. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js +48 -0
  111. package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js.map +1 -1
  112. package/client-dist/chunk-W5MWZVSL.js +0 -2
  113. package/client-dist/chunk-W5MWZVSL.js.map +0 -7
  114. package/client-dist/chunk-Z3GNAEVX.js.map +0 -7
  115. package/client-dist/project-source-routed.module-B5RDOGY7.js +0 -2
  116. /package/client-dist/{agent-instances.module-LTDXV2IY.js.map → agent-instances.module-QQHSIHVZ.js.map} +0 -0
  117. /package/client-dist/{ca.module-X4AI3X6G.js.map → ca.module-FTQALPNM.js.map} +0 -0
  118. /package/client-dist/{chunk-XRFAWHWF.js.map → chunk-2E6OA2KT.js.map} +0 -0
  119. /package/client-dist/{chunk-6UTCOTTK.js.map → chunk-3R7FDMZ3.js.map} +0 -0
  120. /package/client-dist/{chunk-X7RDMQ3C.js.map → chunk-4FSRDTZN.js.map} +0 -0
  121. /package/client-dist/{chunk-HXI4T6RD.js.map → chunk-4RFLGW5L.js.map} +0 -0
  122. /package/client-dist/{chunk-SCV6UFI3.js.map → chunk-5L4G3C5C.js.map} +0 -0
  123. /package/client-dist/{chunk-6DG4SANW.js.map → chunk-5MNGROTB.js.map} +0 -0
  124. /package/client-dist/{chunk-4GZ62WW2.js.map → chunk-6XRGBDSK.js.map} +0 -0
  125. /package/client-dist/{chunk-UXSUGWC7.js.map → chunk-72FQNGJO.js.map} +0 -0
  126. /package/client-dist/{chunk-6HLT2T6S.js.map → chunk-AM2JGX23.js.map} +0 -0
  127. /package/client-dist/{chunk-UUVX445C.js.map → chunk-APXVQISJ.js.map} +0 -0
  128. /package/client-dist/{chunk-EGJCQMSF.js.map → chunk-AQ72GJMX.js.map} +0 -0
  129. /package/client-dist/{chunk-2R2YN5EL.js.map → chunk-AY3XK6RS.js.map} +0 -0
  130. /package/client-dist/{chunk-6QUQUVFA.js.map → chunk-CJVTAHYF.js.map} +0 -0
  131. /package/client-dist/{chunk-WBGOPUBJ.js.map → chunk-CKR2NA35.js.map} +0 -0
  132. /package/client-dist/{chunk-QF3XZDPL.js.map → chunk-EMTKUTBC.js.map} +0 -0
  133. /package/client-dist/{chunk-6KYIRW2G.js.map → chunk-F46E5KZ3.js.map} +0 -0
  134. /package/client-dist/{chunk-APQCANPB.js.map → chunk-FOUQZW4D.js.map} +0 -0
  135. /package/client-dist/{chunk-WTMQ54UE.js.map → chunk-G44KM4TW.js.map} +0 -0
  136. /package/client-dist/{chunk-WEVE5VD3.js.map → chunk-G7FLLFQV.js.map} +0 -0
  137. /package/client-dist/{chunk-ESXT6PE7.js.map → chunk-GNW4X5RC.js.map} +0 -0
  138. /package/client-dist/{chunk-UI5GI7XJ.js.map → chunk-H7BIO73O.js.map} +0 -0
  139. /package/client-dist/{chunk-GFTD3PFY.js.map → chunk-JAUNNZJN.js.map} +0 -0
  140. /package/client-dist/{chunk-ZLTD5EHK.js.map → chunk-JIZE3HXP.js.map} +0 -0
  141. /package/client-dist/{chunk-3UOIDPAC.js.map → chunk-JUWOVLJL.js.map} +0 -0
  142. /package/client-dist/{chunk-ZLFERKG3.js.map → chunk-KFS5VDDV.js.map} +0 -0
  143. /package/client-dist/{chunk-VWZZNYWE.js.map → chunk-KTAWOOUI.js.map} +0 -0
  144. /package/client-dist/{chunk-KPAFG4UR.js.map → chunk-KZUKSPQS.js.map} +0 -0
  145. /package/client-dist/{chunk-BOSO7V5W.js.map → chunk-LTRCLVM3.js.map} +0 -0
  146. /package/client-dist/{chunk-JVQWRB3X.js.map → chunk-M7Z2O4RG.js.map} +0 -0
  147. /package/client-dist/{chunk-LV57US6X.js.map → chunk-MSY74RUJ.js.map} +0 -0
  148. /package/client-dist/{chunk-ZDPUFUOX.js.map → chunk-NJUY7I3Y.js.map} +0 -0
  149. /package/client-dist/{chunk-IF3SDXO3.js.map → chunk-NTUVOM4B.js.map} +0 -0
  150. /package/client-dist/{chunk-2BHHN7VT.js.map → chunk-O65C5CZH.js.map} +0 -0
  151. /package/client-dist/{chunk-O2FFMKAR.js.map → chunk-OG33J4ZD.js.map} +0 -0
  152. /package/client-dist/{chunk-PPC5TB5D.js.map → chunk-OQ24BGZJ.js.map} +0 -0
  153. /package/client-dist/{chunk-QZNDAR62.js.map → chunk-PUFVETM4.js.map} +0 -0
  154. /package/client-dist/{chunk-MKW5NDHN.js.map → chunk-PYVQEDEW.js.map} +0 -0
  155. /package/client-dist/{chunk-SUTYJTHV.js.map → chunk-Q4YAQFNP.js.map} +0 -0
  156. /package/client-dist/{chunk-OQBJMVZN.js.map → chunk-QHUBJGWS.js.map} +0 -0
  157. /package/client-dist/{chunk-Q6AFYXZZ.js.map → chunk-RRV4AJML.js.map} +0 -0
  158. /package/client-dist/{chunk-EM3SZVDU.js.map → chunk-SQDIXJP2.js.map} +0 -0
  159. /package/client-dist/{chunk-GBTUS3NA.js.map → chunk-TM2SED26.js.map} +0 -0
  160. /package/client-dist/{chunk-YGNJ5SA4.js.map → chunk-U5VAWMNB.js.map} +0 -0
  161. /package/client-dist/{chunk-AQ6UDIDI.js.map → chunk-V4X7URSF.js.map} +0 -0
  162. /package/client-dist/{chunk-XPGMSC4M.js.map → chunk-VM45PE3J.js.map} +0 -0
  163. /package/client-dist/{chunk-OCZXZA7H.js.map → chunk-VW3WQQBF.js.map} +0 -0
  164. /package/client-dist/{chunk-XKVTWHUQ.js.map → chunk-WX6TVKDG.js.map} +0 -0
  165. /package/client-dist/{chunk-7RCG5AUK.js.map → chunk-XNHRRX4L.js.map} +0 -0
  166. /package/client-dist/{chunk-FF6BDAQ3.js.map → chunk-XQKHUGZW.js.map} +0 -0
  167. /package/client-dist/{chunk-NOJ5LBG5.js.map → chunk-Y6PUQHIU.js.map} +0 -0
  168. /package/client-dist/{chunk-PCOACAKZ.js.map → chunk-YWWHFCS3.js.map} +0 -0
  169. /package/client-dist/{chunk-HFR2YVDI.js.map → chunk-ZQCAHEXF.js.map} +0 -0
  170. /package/client-dist/{consultant.module-5XH5HTTH.js.map → consultant.module-HFZCP4N4.js.map} +0 -0
  171. /package/client-dist/{crd.module-53UQTTLA.js.map → crd.module-6R37JW4V.js.map} +0 -0
  172. /package/client-dist/{dashboard.module-KOHITRUW.js.map → dashboard.module-YAZCCU26.js.map} +0 -0
  173. /package/client-dist/{do.module-EOBGMEAU.js.map → do.module-QV56KZQO.js.map} +0 -0
  174. /package/client-dist/{document-library.module-72JKQJ2J.js.map → document-library.module-EFTFUIXJ.js.map} +0 -0
  175. /package/client-dist/{embedding-eval.module-3WCRH2K6.js.map → embedding-eval.module-NIPCFFWB.js.map} +0 -0
  176. /package/client-dist/{embedding-registry.module-TG4TN5QC.js.map → embedding-registry.module-4GLSQNAT.js.map} +0 -0
  177. /package/client-dist/{err.module-RJW3NXTH.js.map → err.module-2RPVCWXD.js.map} +0 -0
  178. /package/client-dist/{feedback.module-FWEGEGYQ.js.map → feedback.module-WVLKZ533.js.map} +0 -0
  179. /package/client-dist/{host-runtime-mcp.module-KAAHVFSN.js.map → host-runtime-mcp.module-GRW6RSCA.js.map} +0 -0
  180. /package/client-dist/{live-dev-pipeline.module-QHCYBTUC.js.map → live-dev-pipeline.module-P3DEM6CE.js.map} +0 -0
  181. /package/client-dist/{logs.module-4LFK3T3K.js.map → logs.module-U6KCQYDU.js.map} +0 -0
  182. /package/client-dist/{main-LZQUL77P.js.map → main-F4G6PI7V.js.map} +0 -0
  183. /package/client-dist/{master-control-remote-poc.module-WED7JUNZ.js.map → master-control-remote-poc.module-RYSKRGXU.js.map} +0 -0
  184. /package/client-dist/{mobile-app.module-AXH7W53A.js.map → mobile-app.module-EBMTWXS2.js.map} +0 -0
  185. /package/client-dist/{model-registry.module-SGHIKUWI.js.map → model-registry.module-F6R5MSBB.js.map} +0 -0
  186. /package/client-dist/{oc.module-JNAPKZRS.js.map → oc.module-VIBOASVG.js.map} +0 -0
  187. /package/client-dist/{orc.module-DGB2CPYK.js.map → orc.module-NJQ6XGPN.js.map} +0 -0
  188. /package/client-dist/{project-management.module-7PYZ6SMH.js.map → project-management.module-JQEQIHL2.js.map} +0 -0
  189. /package/client-dist/{project-source-routed.module-B5RDOGY7.js.map → project-source-routed.module-LZCPWG6J.js.map} +0 -0
  190. /package/client-dist/{scheduler.module-KG43N2FH.js.map → scheduler.module-WWPV25AU.js.map} +0 -0
  191. /package/client-dist/{session.module-T5TLRVUA.js.map → session.module-YYFJ6B5X.js.map} +0 -0
  192. /package/client-dist/{set.module-Y3LNLS4R.js.map → set.module-IKSASSWS.js.map} +0 -0
  193. /package/client-dist/{setup.module-CB5LKKCH.js.map → setup.module-RVTO6I3R.js.map} +0 -0
  194. /package/client-dist/{terminals.module-Y4AD2WBX.js.map → terminals.module-AZEN47GZ.js.map} +0 -0
  195. /package/client-dist/{voice-notes-poc.module-YNGGW2OL.js.map → voice-notes-poc.module-5JUTNIBP.js.map} +0 -0
  196. /package/client-dist/{wfs.module-JD7CMBRB.js.map → wfs.module-5MMNXIRW.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{b as M}from"./chunk-OCZXZA7H.js";import{d as F}from"./chunk-IF3SDXO3.js";import"./chunk-SUTYJTHV.js";import{a as f}from"./chunk-O2FFMKAR.js";import{a as E}from"./chunk-WPHEQXWB.js";import"./chunk-OQBJMVZN.js";import"./chunk-5UPNU54P.js";import"./chunk-EM3SZVDU.js";import"./chunk-IOTAEA7L.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-LTDXV2IY.js.map
1
+ import{b as M}from"./chunk-VW3WQQBF.js";import{d as F}from"./chunk-NTUVOM4B.js";import"./chunk-Q4YAQFNP.js";import{a as f}from"./chunk-OG33J4ZD.js";import{a as E}from"./chunk-WPHEQXWB.js";import"./chunk-QHUBJGWS.js";import"./chunk-5UPNU54P.js";import"./chunk-SQDIXJP2.js";import"./chunk-2HIXFHTS.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-QQHSIHVZ.js.map
@@ -1,5 +1,5 @@
1
- import{a as Ae,b as vt}from"./chunk-ESXT6PE7.js";import{a as pe,b as _e,c as xt,d as ue}from"./chunk-7RCG5AUK.js";import"./chunk-EGRHWZRV.js";import{a as Ct}from"./chunk-EGJCQMSF.js";import{a as St}from"./chunk-3UOIDPAC.js";import{a as J}from"./chunk-Q2PKIGLB.js";import{a as lt,b as de,c as we,d as ce,e as L}from"./chunk-PCOACAKZ.js";import{a as ot}from"./chunk-NOJ5LBG5.js";import{a as be}from"./chunk-YRVQSWSZ.js";import{a as it}from"./chunk-MKW5NDHN.js";import{a as nt,b as ae}from"./chunk-X7RDMQ3C.js";import"./chunk-FF6BDAQ3.js";import"./chunk-WBGOPUBJ.js";import{a as re}from"./chunk-ZLFERKG3.js";import"./chunk-OCZXZA7H.js";import{g as ht}from"./chunk-GFTD3PFY.js";import"./chunk-O2FFMKAR.js";import{a as _t}from"./chunk-7JUIBZEE.js";import{a as ct,b as pt,c as ut}from"./chunk-C7XPBJTG.js";import{b as R,e as mt,f as ft}from"./chunk-XRFAWHWF.js";import"./chunk-WPHEQXWB.js";import{c as at}from"./chunk-GBTUS3NA.js";import{a as le,b as st,c as rt,d as ye}from"./chunk-AQ6UDIDI.js";import"./chunk-2BHHN7VT.js";import"./chunk-UI5GI7XJ.js";import"./chunk-Q2NVIOCY.js";import{a as dt}from"./chunk-QZNDAR62.js";import"./chunk-ZLTD5EHK.js";import"./chunk-QF3XZDPL.js";import"./chunk-V3VQWJQL.js";import"./chunk-6KYIRW2G.js";import{a as ge}from"./chunk-UUVX445C.js";import"./chunk-ZBTWQZNB.js";import{a as se}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-OQBJMVZN.js";import{a as $}from"./chunk-5UPNU54P.js";import"./chunk-EM3SZVDU.js";import"./chunk-IOTAEA7L.js";import{$a as E,Aa as Y,Ba as Z,C as v,Cb as Qe,D as O,E as Me,Eb as ne,Fa as d,Fb as je,G as U,Ga as W,Gb as oe,Ha as b,Ia as ee,J as u,K as m,Kb as Ke,L as Le,M as Ve,Pa as te,Qa as ie,Ra as I,T as Oe,Ua as ve,Va as Ne,W as Ue,Z as l,_ as Fe,a as xe,aa as h,ab as k,b as Te,ca as We,da as g,ga as S,ha as qe,hb as P,ia as z,ib as Be,ja as T,jb as ze,k as D,la as x,mb as j,oa as H,pa as Q,q as Ie,qa as r,r as Ee,ra as a,sa as w,ua as y,ub as He,v as ke,va as f,wa as p,y as Pe,z as Re,za as G}from"./chunk-TBMJSIBB.js";var A="ccap-caSession",C=class{static saveStatusFilter(o){$.writeString(`${A}:statusFilter`,o)}static loadStatusFilter(){return $.readString(`${A}:statusFilter`)??""}static saveShowArchived(o){$.writeBoolean(`${A}:showArchived`,o)}static loadShowArchived(){return $.readBoolean(`${A}:showArchived`,!1)}static saveLastWorkspacePath(o){$.writeString(`${A}:lastWorkspacePath`,o)}static loadLastWorkspacePath(){return $.readString(`${A}:lastWorkspacePath`)??""}static saveLastLabel(o){$.writeString(`${A}:lastLabel`,o)}static loadLastLabel(){return $.readString(`${A}:lastLabel`)??""}static savePromptDraft(o,e){ue.saveDraft(A,o,e)}static loadPromptDraft(o){return ue.loadDraft(A,o)}static clearPromptDraft(o){ue.clearDraft(A,o)}static savePanelOpen(o,e){$.writeBoolean(`${A}:panelOpen:${o}`,e)}static loadPanelOpen(o,e){return $.readBoolean(`${A}:panelOpen:${o}`,e)}static savePanelWidth(o,e){$.writeNumber(`${A}:panelWidth:${o}`,e)}static loadPanelWidth(o,e){return $.readNumber(`${A}:panelWidth:${o}`,e)}static saveLastSessionId(o){$.writeString(`${A}:lastSessionId`,o)}static loadLastSessionId(){return $.readString(`${A}:lastSessionId`)??""}static saveShowAgentUpdates(o){$.writeBoolean(`${A}:showAgentUpdates`,o)}static loadShowAgentUpdates(){return $.readBoolean(`${A}:showAgentUpdates`,!0)}static saveShowSessionStatus(o){$.writeBoolean(`${A}:showSessionStatus`,o)}static loadShowSessionStatus(){return $.readBoolean(`${A}:showSessionStatus`,!0)}};var F=(()=>{class n{ca_DS=v(L);isTimelinePanelOpen_$=h(C.loadPanelOpen("timeline",!1));isMetadataPanelOpen_$=h(C.loadPanelOpen("metadata",!1));isTerminating_$=h(!1);isStopping_$=h(!1);isShowSessionStatus_$=h(C.loadShowSessionStatus());isShowAgentUpdates_$=h(C.loadShowAgentUpdates());handleToggleTimeline(){let e=!this.isTimelinePanelOpen_$();this.isTimelinePanelOpen_$.set(e),C.savePanelOpen("timeline",e)}handleToggleMetadata(){let e=!this.isMetadataPanelOpen_$();this.isMetadataPanelOpen_$.set(e),C.savePanelOpen("metadata",e)}handleToggleSessionStatus(){let e=!this.isShowSessionStatus_$();this.isShowSessionStatus_$.set(e),C.saveShowSessionStatus(e)}handleToggleAgentUpdates(){let e=!this.isShowAgentUpdates_$();this.isShowAgentUpdates_$.set(e),C.saveShowAgentUpdates(e)}handleStopExecution(){return D(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 D(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 Bt=(n,o)=>o.path;function zt(n,o){if(n&1&&(r(0,"div",5)(1,"span",35),d(2),a(),r(3,"span",35),d(4),a()()),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(),b(" 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(),b(" session/load ",e.loadSessionSupported?"yes":"no"," ")}}function Ht(n,o){if(n&1&&(r(0,"div",18),w(1,"app-ccap-error-display",36),a()),n&2){let e=p();l(),S("error",e.ca_DS.sessionsLoadError_$())}}function Qt(n,o){n&1&&(r(0,"div",20),d(1,"Loading\u2026"),a())}function jt(n,o){if(n&1){let e=y();r(0,"div",21)(1,"span",37),d(2,"No sessions"),a(),r(3,"button",38),f("click",function(){u(e);let t=p();return m(t.handleOpenCreateDialog())}),d(4," Create session "),a()()}}function Kt(n,o){if(n&1){let e=y();r(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))}),a()}if(n&2){let e=p();S("rows",e.sessionRowViews_$())("activeId",e.ca_DS.activeSessionId_$())("showWorkspacePath",!0)("showPromptCount",!0)("hideSearch",!0)}}function Xt(n,o){if(n&1&&(r(0,"option",42),d(1),a()),n&2){let e=o.$implicit;S("value",e.path),l(),ee("",e.label," \u2014 ",e.path,"")}}function Jt(n,o){if(n&1){let e=y();r(0,"select",40),f("ngModelChange",function(t){u(e);let s=p();return m(s.handlePathOptionChange(t))}),r(1,"option",41),d(2,"Select a path..."),a(),H(3,Xt,2,3,"option",42,Bt),r(5,"option",43),d(6,"Custom path..."),a()()}if(n&2){let e=p();S("ngModel",e.selectedPathOption_$()),l(3),Q(e.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$())}}function Gt(n,o){if(n&1&&(r(0,"div",30),w(1,"app-ccap-error-display",44),a()),n&2){let e=p();l(),S("error",e.createSessionError_$())}}function Yt(n,o){if(n&1){let e=y();r(0,"div",45),f("click",function(){u(e);let t=p();return m(t.handleCloseCtxMenu())}),a(),r(1,"div",46)(2,"button",47),f("click",function(){u(e);let t=p();return m(t.handleCtxToggleArchive())}),d(3),a()()}if(n&2){let e=p();l(),qe("left",e.ctxMenuPos_$().x,"px")("top",e.ctxMenuPos_$().y,"px"),l(2),b(" ",o.isArchived?"Unarchive":"Archive"," ")}}var gt=(()=>{class n{ca_DS=v(L);newAgentSessionWorkspace_DS=v(ot);peiContext_DS=v(re);scheduledJobs_DS=v(St);coordinator_DS=v(Ct);router=v(oe);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=C.loadStatusFilter();e&&this.statusFilter_$.set(e),this.showArchived_$.set(C.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),C.saveStatusFilter(e)}handleToggleShowArchived(){let e=!this.showArchived_$();this.showArchived_$.set(e),C.saveShowArchived(e),this.ca_DS.loadSessions({includeArchived:e})}filteredSessions_$=P(()=>{let e=this.searchQuery_$(),i=this.statusFilter_$().trim();return[...this.ca_DS.sessions_$().filter(s=>!s.sessionId||i&&s.status!==i?!1:le.includesText(s.label,e)||le.includesText(s.workspacePath,e)||le.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_$=P(()=>{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:be.resolve(t.status),workspacePath:t.workspacePath,isArchived:!!t.isArchived,lastActivityAt:t.lastActivityAt,promptCount:t.promptCount,isRunning:be.isRunning(t.status),hasSchedule:e.has(t.sessionId??""),hasCoordinator:i.has(t.sessionId??"")}))});handleSelectSession(e){e&&(this.router.navigate(["/ca-session",e]),this.sessionSelected.emit())}handleOpenCreateDialog(){return D(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:C.loadLastWorkspacePath()});i&&(this.newSessionWorkspacePath_$.set(i),this.selectedPathOption_$.set(i))}let e=C.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 D(this,null,function*(){let e=this.newSessionWorkspacePath_$().trim();if(e){this.isCreating_$.set(!0);try{C.saveLastWorkspacePath(e),C.saveLastLabel(this.newSessionLabel_$().trim());let i=yield this.ca_DS.createSession({workspacePath:e,label:this.newSessionLabel_$().trim()||void 0});this.handleCloseCreateDialog(),i.length>0&&this.router.navigate(["/ca-session",i])}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}))}handleCloseCtxMenu(){this.ctxMenuSession_$.set(null)}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 D(this,null,function*(){let e=this.ctxMenuSession_$();if(!e?.sessionId)return;let i=e.sessionId;this.handleCloseCtxMenu(),yield this.handleArchiveRow(i)})}handleSyncFromAgent(){return D(this,null,function*(){this.isSyncing_$.set(!0);try{yield this.ca_DS.syncFromAgent()}finally{this.isSyncing_$.set(!1)}})}handleArchiveRow(e){return D(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"]],template:function(i,t){if(i&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),d(3,"CA session"),a(),r(4,"button",3),f("click",function(){return t.handleSyncFromAgent()}),d(5," Sync "),a(),r(6,"button",4),f("click",function(){return t.handleOpenCreateDialog()}),d(7," + New "),a()(),g(8,zt,5,18,"div",5),a(),r(9,"div",6)(10,"input",7),f("input",function(c){return t.searchQuery_$.set(c.target.value)}),a(),r(11,"div",1)(12,"select",8),f("change",function(c){return t.handleStatusFilterChange(c.target.value)}),r(13,"option",9),d(14,"All statuses"),a(),r(15,"option",10),d(16,"Waiting"),a(),r(17,"option",11),d(18,"Running"),a(),r(19,"option",12),d(20,"Connecting"),a(),r(21,"option",13),d(22,"Disconnected"),a(),r(23,"option",14),d(24,"Errored"),a(),r(25,"option",15),d(26,"Completed"),a(),r(27,"option",16),d(28,"Terminated"),a()(),r(29,"button",17),f("click",function(){return t.handleToggleShowArchived()}),d(30," Arch "),a()()(),g(31,Ht,2,1,"div",18),r(32,"div",19),g(33,Qt,2,0,"div",20)(34,jt,5,0,"div",21)(35,Kt,1,5,"app-s-session-select",22),a(),r(36,"app-s-modal",23),f("closed",function(){return t.handleCloseCreateDialog()}),r(37,"div",24)(38,"div",25)(39,"label",26),d(40,"Workspace Path *"),a(),g(41,Jt,7,1,"select",27),r(42,"input",28),f("ngModelChange",function(c){return t.newSessionWorkspacePath_$.set(c)}),a()(),r(43,"div",25)(44,"label",26),d(45,"Label (optional)"),a(),r(46,"input",29),f("ngModelChange",function(c){return t.newSessionLabel_$.set(c)}),a()(),g(47,Gt,2,1,"div",30),r(48,"div",31)(49,"button",32),f("click",function(){return t.handleCloseCreateDialog()}),d(50," Cancel "),a(),r(51,"button",33),f("click",function(){return t.handleConfirmCreate()}),d(52),a()()()(),r(53,"app-sch-schedule-popup",34),f("closed",function(){return t.handleCloseSchedulePopup()}),a(),r(54,"app-crd-info-popup",34),f("closed",function(){return t.handleCloseCoordinatorPopup()}),a(),g(55,Yt,4,5)),i&2){let s,c;l(4),S("disabled",t.isSyncing_$()),l(4),x((s=t.ca_DS.mirrorRuntime_$())?8:-1,s),l(2),S("value",t.searchQuery_$()),l(2),S("value",t.statusFilter_$()),l(17),T(t.showArchived_$()?"border-ccapAccent/60 text-ccapAccent/80 bg-ccapAccent/10":"border-neutral-700 text-neutral-500"),l(2),x(t.ca_DS.sessionsLoadError_$()?31:-1),l(2),x(t.ca_DS.sessionsLoading_$()?33:!t.filteredSessions_$().length&&!t.ca_DS.sessionsLoadError_$()?34:35),l(3),S("isOpen",t.isCreateDialogOpen_$())("title","New CA session")("maxWidth","lg")("bodyFlexColumn",!0)("closeOnBackdropClick",!1),l(5),x(t.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$().length?41:-1),l(),S("ngModel",t.newSessionWorkspacePath_$()),l(4),S("ngModel",t.newSessionLabel_$()),l(),x(t.createSessionError_$()?47:-1),l(2),S("disabled",t.isCreating_$()),l(2),S("disabled",t.isCreating_$()||!t.newSessionWorkspacePath_$()),l(),b(" ",t.isCreating_$()?"Creating...":"Create"," "),l(),S("sessionId",t.schedulePopupSessionId_$())("isOpen",t.schedulePopupSessionId_$()!==null),l(),S("sessionId",t.coordinatorPopupSessionId_$())("isOpen",t.coordinatorPopupSessionId_$()!==null),l(),x((c=t.ctxMenuSession_$())?55:-1,c)}},dependencies:[Ze,et,Xe,Ye,Je,Ge,K,se,pe,_e,at],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 ti(n,o){n&1&&w(0,"div",5)}function ii(n,o){if(n&1){let e=y();r(0,"button",13),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleMetadata())}),d(1," Info "),a()}if(n&2){let e=p();T(e.detailUi_DS.isMetadataPanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300")}}function ni(n,o){n&1&&w(0,"span",17)}function oi(n,o){if(n&1&&(w(0,"span",16),E(1,"caSessionStatusColor"),g(2,ni,1,0,"span",17)),n&2){p(2);let e=I(1);S("ngClass",k(1,3,e.session.status))("title",e.session.status),l(2),x(e.isLive?2:-1)}}function si(n,o){n&1&&(r(0,"span",15),d(1,"Loading\u2026"),a())}function ri(n,o){if(n&1&&(r(0,"span",14),d(1),a(),g(2,oi,3,5)(3,si,2,0,"span",15)),n&2){p();let e=I(1);S("title",e.title),l(),b(" ",e.title," "),l(),x(e.session?2:-1),l(),x(e.isLoading&&!e.session?3:-1)}}function ai(n,o){if(n&1){let e=y();w(0,"div",19),r(1,"button",20),f("click",function(){u(e);let t=p(2);return m(t.detailUi_DS.handleStopExecution())}),d(2),a()}if(n&2){let e=p(2);l(),S("disabled",e.detailUi_DS.isStopping_$()),l(),b(" ",e.detailUi_DS.isStopping_$()?"Stopping\u2026":"Stop"," ")}}function li(n,o){if(n&1){let e=y();r(0,"button",18),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleTimeline())}),d(1," Timeline "),a(),g(2,ai,3,2)}if(n&2){let e=p(),i=I(1);T(e.detailUi_DS.isTimelinePanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300"),l(2),x(i.isLive?2:-1)}}var $t=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);caTopBar_$=P(()=>{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(Ce=>Ce.sessionId===e),_=t?.sessionId===e,M=_?t:c??null,N=M&&(M.label||M.sessionId)||e,B=M?.status??"";return{title:N,session:M,isLoading:i,showActions:_&&!i,isLive:B==="running"||B==="waiting-input"}});sidebarWidth_$=h(320);isSidebarOpen_$=h(!0);isResizing_$=h(!1);ngOnInit(){let e=C.loadPanelWidth("sidebar",320);this.sidebarWidth_$.set(Math.max(200,Math.min(600,e))),this.isSidebarOpen_$.set(C.loadPanelOpen("sidebar",!0))}handleSidebarResizeStart(e){let i=e.clientX,t=this.sidebarWidth_$();this.isResizing_$.set(!0),J.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),C.savePanelWidth("sidebar",this.sidebarWidth_$())}})}handleToggleSidebar(){this.isSidebarOpen_$.update(e=>!e),C.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();r(0,"div",0),te(1),r(2,"app-s-session-shell-toolbar")(3,"div",1)(4,"button",2),f("click",function(){return u(s),m(t.handleToggleSidebar())}),Le(),r(5,"svg",3),w(6,"polyline",4),a(),d(7," CA Sessions "),a(),g(8,ti,1,0,"div",5)(9,ii,2,2,"button",6),a(),Ve(),r(10,"div",7),g(11,ri,4,4),a(),r(12,"div",8),g(13,li,3,3),a()(),r(14,"app-s-resizable-session-shell-layout",9),f("sidebarResizeStart",function(_){return u(s),m(t.handleSidebarResizeStart(_))}),r(15,"div",10)(16,"app-ccap-ca-dashboard",11),f("sessionSelected",function(){return u(s),m(t.handleSessionSelectedFromDashboard())}),a()(),r(17,"div",12),w(18,"router-outlet"),a()()()}if(i&2){z("select-none",t.isResizing_$()),l();let s=ie(t.caTopBar_$());l(4),z("rotate-90",t.isSidebarOpen_$())("-rotate-90",!t.isSidebarOpen_$()),l(3),x(s?8:-1),l(),x(s&&s.showActions?9:-1),l(2),x(s?11:-1),l(2),x(s&&s.showActions?13:-1),l(),S("isSidebarOpen",t.isSidebarOpen_$())("sidebarWidthPx",t.sidebarWidth_$())("isResizing",t.isResizing_$())}},dependencies:[j,je,ct,pt,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 Dt=(()=>{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 _=ce.tryParseStableListKey(c.listKey);_===null||_.role!=="start"||e.set(_.toolCallId,s)}if(!e.size)return o;let i=new Set,t=o.map(s=>xe({},s));for(let s=0;s<t.length;s++){let c=t[s];if(c.briefSubtype!=="tool_call_update")continue;let _=ce.tryParseStableListKey(c.listKey);if(_===null)continue;let M=c.type==="tool-result"&&_.role==="result",N=c.type==="error"&&_.role==="error";if(!M&&!N)continue;let B=e.get(_.toolCallId);if(B===void 0)continue;let Se=n.buildPairedExpandableRawOutput({rawData:c.rawData,fallbackText:c.text}),Ce={text:c.text,expandableContent:Se.length?Se:c.text,rawData:c.rawData,isError:N?!0:void 0};t[B]=Te(xe({},t[B]),{pairedResult:Ce,isToolCallFailedIndicator:N?!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 _=ce.formatContent(s);_.length&&t.push(_)}let c=Reflect.get(i,"rawOutput");if(c!==void 0)try{let _=JSON.stringify(c,null,2);ye.looksLikeJson(_)?t.push(ye.formatJson(_)):t.push(_)}catch{}return t.length?t.join(`
1
+ import{a as Ae,b as vt}from"./chunk-GNW4X5RC.js";import{a as pe,b as _e,c as xt,d as ue}from"./chunk-XNHRRX4L.js";import"./chunk-EGRHWZRV.js";import{a as Ct}from"./chunk-AQ72GJMX.js";import{a as St}from"./chunk-JUWOVLJL.js";import{a as J}from"./chunk-Q2PKIGLB.js";import{a as lt,b as de,c as we,d as ce,e as L}from"./chunk-YWWHFCS3.js";import{a as ot}from"./chunk-Y6PUQHIU.js";import{a as be}from"./chunk-YRVQSWSZ.js";import{a as it}from"./chunk-PYVQEDEW.js";import{a as nt,b as ae}from"./chunk-4FSRDTZN.js";import"./chunk-XQKHUGZW.js";import"./chunk-CKR2NA35.js";import{a as re}from"./chunk-KFS5VDDV.js";import"./chunk-VW3WQQBF.js";import{g as ht}from"./chunk-JAUNNZJN.js";import"./chunk-OG33J4ZD.js";import{a as _t}from"./chunk-7JUIBZEE.js";import{a as ct,b as pt,c as ut}from"./chunk-C7XPBJTG.js";import{b as R,e as mt,f as ft}from"./chunk-2E6OA2KT.js";import"./chunk-WPHEQXWB.js";import{c as at}from"./chunk-TM2SED26.js";import{a as le,b as st,c as rt,d as ye}from"./chunk-V4X7URSF.js";import"./chunk-O65C5CZH.js";import"./chunk-H7BIO73O.js";import"./chunk-Q2NVIOCY.js";import{a as dt}from"./chunk-PUFVETM4.js";import"./chunk-JIZE3HXP.js";import"./chunk-EMTKUTBC.js";import"./chunk-V3VQWJQL.js";import"./chunk-F46E5KZ3.js";import{a as ge}from"./chunk-APXVQISJ.js";import"./chunk-ZBTWQZNB.js";import{a as se}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-QHUBJGWS.js";import{a as $}from"./chunk-5UPNU54P.js";import"./chunk-SQDIXJP2.js";import"./chunk-2HIXFHTS.js";import{$a as E,Aa as Y,Ba as Z,C as v,Cb as Qe,D as O,E as Me,Eb as ne,Fa as d,Fb as je,G as U,Ga as W,Gb as oe,Ha as b,Ia as ee,J as u,K as m,Kb as Ke,L as Le,M as Ve,Pa as te,Qa as ie,Ra as I,T as Oe,Ua as ve,Va as Ne,W as Ue,Z as l,_ as Fe,a as xe,aa as h,ab as k,b as Te,ca as We,da as g,ga as S,ha as qe,hb as P,ia as z,ib as Be,ja as T,jb as ze,k as D,la as x,mb as j,oa as H,pa as Q,q as Ie,qa as r,r as Ee,ra as a,sa as w,ua as y,ub as He,v as ke,va as f,wa as p,y as Pe,z as Re,za as G}from"./chunk-TBMJSIBB.js";var A="ccap-caSession",C=class{static saveStatusFilter(o){$.writeString(`${A}:statusFilter`,o)}static loadStatusFilter(){return $.readString(`${A}:statusFilter`)??""}static saveShowArchived(o){$.writeBoolean(`${A}:showArchived`,o)}static loadShowArchived(){return $.readBoolean(`${A}:showArchived`,!1)}static saveLastWorkspacePath(o){$.writeString(`${A}:lastWorkspacePath`,o)}static loadLastWorkspacePath(){return $.readString(`${A}:lastWorkspacePath`)??""}static saveLastLabel(o){$.writeString(`${A}:lastLabel`,o)}static loadLastLabel(){return $.readString(`${A}:lastLabel`)??""}static savePromptDraft(o,e){ue.saveDraft(A,o,e)}static loadPromptDraft(o){return ue.loadDraft(A,o)}static clearPromptDraft(o){ue.clearDraft(A,o)}static savePanelOpen(o,e){$.writeBoolean(`${A}:panelOpen:${o}`,e)}static loadPanelOpen(o,e){return $.readBoolean(`${A}:panelOpen:${o}`,e)}static savePanelWidth(o,e){$.writeNumber(`${A}:panelWidth:${o}`,e)}static loadPanelWidth(o,e){return $.readNumber(`${A}:panelWidth:${o}`,e)}static saveLastSessionId(o){$.writeString(`${A}:lastSessionId`,o)}static loadLastSessionId(){return $.readString(`${A}:lastSessionId`)??""}static saveShowAgentUpdates(o){$.writeBoolean(`${A}:showAgentUpdates`,o)}static loadShowAgentUpdates(){return $.readBoolean(`${A}:showAgentUpdates`,!0)}static saveShowSessionStatus(o){$.writeBoolean(`${A}:showSessionStatus`,o)}static loadShowSessionStatus(){return $.readBoolean(`${A}:showSessionStatus`,!0)}};var F=(()=>{class n{ca_DS=v(L);isTimelinePanelOpen_$=h(C.loadPanelOpen("timeline",!1));isMetadataPanelOpen_$=h(C.loadPanelOpen("metadata",!1));isTerminating_$=h(!1);isStopping_$=h(!1);isShowSessionStatus_$=h(C.loadShowSessionStatus());isShowAgentUpdates_$=h(C.loadShowAgentUpdates());handleToggleTimeline(){let e=!this.isTimelinePanelOpen_$();this.isTimelinePanelOpen_$.set(e),C.savePanelOpen("timeline",e)}handleToggleMetadata(){let e=!this.isMetadataPanelOpen_$();this.isMetadataPanelOpen_$.set(e),C.savePanelOpen("metadata",e)}handleToggleSessionStatus(){let e=!this.isShowSessionStatus_$();this.isShowSessionStatus_$.set(e),C.saveShowSessionStatus(e)}handleToggleAgentUpdates(){let e=!this.isShowAgentUpdates_$();this.isShowAgentUpdates_$.set(e),C.saveShowAgentUpdates(e)}handleStopExecution(){return D(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 D(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 Bt=(n,o)=>o.path;function zt(n,o){if(n&1&&(r(0,"div",5)(1,"span",35),d(2),a(),r(3,"span",35),d(4),a()()),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(),b(" 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(),b(" session/load ",e.loadSessionSupported?"yes":"no"," ")}}function Ht(n,o){if(n&1&&(r(0,"div",18),w(1,"app-ccap-error-display",36),a()),n&2){let e=p();l(),S("error",e.ca_DS.sessionsLoadError_$())}}function Qt(n,o){n&1&&(r(0,"div",20),d(1,"Loading\u2026"),a())}function jt(n,o){if(n&1){let e=y();r(0,"div",21)(1,"span",37),d(2,"No sessions"),a(),r(3,"button",38),f("click",function(){u(e);let t=p();return m(t.handleOpenCreateDialog())}),d(4," Create session "),a()()}}function Kt(n,o){if(n&1){let e=y();r(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))}),a()}if(n&2){let e=p();S("rows",e.sessionRowViews_$())("activeId",e.ca_DS.activeSessionId_$())("showWorkspacePath",!0)("showPromptCount",!0)("hideSearch",!0)}}function Xt(n,o){if(n&1&&(r(0,"option",42),d(1),a()),n&2){let e=o.$implicit;S("value",e.path),l(),ee("",e.label," \u2014 ",e.path,"")}}function Jt(n,o){if(n&1){let e=y();r(0,"select",40),f("ngModelChange",function(t){u(e);let s=p();return m(s.handlePathOptionChange(t))}),r(1,"option",41),d(2,"Select a path..."),a(),H(3,Xt,2,3,"option",42,Bt),r(5,"option",43),d(6,"Custom path..."),a()()}if(n&2){let e=p();S("ngModel",e.selectedPathOption_$()),l(3),Q(e.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$())}}function Gt(n,o){if(n&1&&(r(0,"div",30),w(1,"app-ccap-error-display",44),a()),n&2){let e=p();l(),S("error",e.createSessionError_$())}}function Yt(n,o){if(n&1){let e=y();r(0,"div",45),f("click",function(){u(e);let t=p();return m(t.handleCloseCtxMenu())}),a(),r(1,"div",46)(2,"button",47),f("click",function(){u(e);let t=p();return m(t.handleCtxToggleArchive())}),d(3),a()()}if(n&2){let e=p();l(),qe("left",e.ctxMenuPos_$().x,"px")("top",e.ctxMenuPos_$().y,"px"),l(2),b(" ",o.isArchived?"Unarchive":"Archive"," ")}}var gt=(()=>{class n{ca_DS=v(L);newAgentSessionWorkspace_DS=v(ot);peiContext_DS=v(re);scheduledJobs_DS=v(St);coordinator_DS=v(Ct);router=v(oe);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=C.loadStatusFilter();e&&this.statusFilter_$.set(e),this.showArchived_$.set(C.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),C.saveStatusFilter(e)}handleToggleShowArchived(){let e=!this.showArchived_$();this.showArchived_$.set(e),C.saveShowArchived(e),this.ca_DS.loadSessions({includeArchived:e})}filteredSessions_$=P(()=>{let e=this.searchQuery_$(),i=this.statusFilter_$().trim();return[...this.ca_DS.sessions_$().filter(s=>!s.sessionId||i&&s.status!==i?!1:le.includesText(s.label,e)||le.includesText(s.workspacePath,e)||le.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_$=P(()=>{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:be.resolve(t.status),workspacePath:t.workspacePath,isArchived:!!t.isArchived,lastActivityAt:t.lastActivityAt,promptCount:t.promptCount,isRunning:be.isRunning(t.status),hasSchedule:e.has(t.sessionId??""),hasCoordinator:i.has(t.sessionId??"")}))});handleSelectSession(e){e&&(this.router.navigate(["/ca-session",e]),this.sessionSelected.emit())}handleOpenCreateDialog(){return D(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:C.loadLastWorkspacePath()});i&&(this.newSessionWorkspacePath_$.set(i),this.selectedPathOption_$.set(i))}let e=C.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 D(this,null,function*(){let e=this.newSessionWorkspacePath_$().trim();if(e){this.isCreating_$.set(!0);try{C.saveLastWorkspacePath(e),C.saveLastLabel(this.newSessionLabel_$().trim());let i=yield this.ca_DS.createSession({workspacePath:e,label:this.newSessionLabel_$().trim()||void 0});this.handleCloseCreateDialog(),i.length>0&&this.router.navigate(["/ca-session",i])}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}))}handleCloseCtxMenu(){this.ctxMenuSession_$.set(null)}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 D(this,null,function*(){let e=this.ctxMenuSession_$();if(!e?.sessionId)return;let i=e.sessionId;this.handleCloseCtxMenu(),yield this.handleArchiveRow(i)})}handleSyncFromAgent(){return D(this,null,function*(){this.isSyncing_$.set(!0);try{yield this.ca_DS.syncFromAgent()}finally{this.isSyncing_$.set(!1)}})}handleArchiveRow(e){return D(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"]],template:function(i,t){if(i&1&&(r(0,"div",0)(1,"div",1)(2,"span",2),d(3,"CA session"),a(),r(4,"button",3),f("click",function(){return t.handleSyncFromAgent()}),d(5," Sync "),a(),r(6,"button",4),f("click",function(){return t.handleOpenCreateDialog()}),d(7," + New "),a()(),g(8,zt,5,18,"div",5),a(),r(9,"div",6)(10,"input",7),f("input",function(c){return t.searchQuery_$.set(c.target.value)}),a(),r(11,"div",1)(12,"select",8),f("change",function(c){return t.handleStatusFilterChange(c.target.value)}),r(13,"option",9),d(14,"All statuses"),a(),r(15,"option",10),d(16,"Waiting"),a(),r(17,"option",11),d(18,"Running"),a(),r(19,"option",12),d(20,"Connecting"),a(),r(21,"option",13),d(22,"Disconnected"),a(),r(23,"option",14),d(24,"Errored"),a(),r(25,"option",15),d(26,"Completed"),a(),r(27,"option",16),d(28,"Terminated"),a()(),r(29,"button",17),f("click",function(){return t.handleToggleShowArchived()}),d(30," Arch "),a()()(),g(31,Ht,2,1,"div",18),r(32,"div",19),g(33,Qt,2,0,"div",20)(34,jt,5,0,"div",21)(35,Kt,1,5,"app-s-session-select",22),a(),r(36,"app-s-modal",23),f("closed",function(){return t.handleCloseCreateDialog()}),r(37,"div",24)(38,"div",25)(39,"label",26),d(40,"Workspace Path *"),a(),g(41,Jt,7,1,"select",27),r(42,"input",28),f("ngModelChange",function(c){return t.newSessionWorkspacePath_$.set(c)}),a()(),r(43,"div",25)(44,"label",26),d(45,"Label (optional)"),a(),r(46,"input",29),f("ngModelChange",function(c){return t.newSessionLabel_$.set(c)}),a()(),g(47,Gt,2,1,"div",30),r(48,"div",31)(49,"button",32),f("click",function(){return t.handleCloseCreateDialog()}),d(50," Cancel "),a(),r(51,"button",33),f("click",function(){return t.handleConfirmCreate()}),d(52),a()()()(),r(53,"app-sch-schedule-popup",34),f("closed",function(){return t.handleCloseSchedulePopup()}),a(),r(54,"app-crd-info-popup",34),f("closed",function(){return t.handleCloseCoordinatorPopup()}),a(),g(55,Yt,4,5)),i&2){let s,c;l(4),S("disabled",t.isSyncing_$()),l(4),x((s=t.ca_DS.mirrorRuntime_$())?8:-1,s),l(2),S("value",t.searchQuery_$()),l(2),S("value",t.statusFilter_$()),l(17),T(t.showArchived_$()?"border-ccapAccent/60 text-ccapAccent/80 bg-ccapAccent/10":"border-neutral-700 text-neutral-500"),l(2),x(t.ca_DS.sessionsLoadError_$()?31:-1),l(2),x(t.ca_DS.sessionsLoading_$()?33:!t.filteredSessions_$().length&&!t.ca_DS.sessionsLoadError_$()?34:35),l(3),S("isOpen",t.isCreateDialogOpen_$())("title","New CA session")("maxWidth","lg")("bodyFlexColumn",!0)("closeOnBackdropClick",!1),l(5),x(t.newAgentSessionWorkspace_DS.workspacePathPickerOptions_$().length?41:-1),l(),S("ngModel",t.newSessionWorkspacePath_$()),l(4),S("ngModel",t.newSessionLabel_$()),l(),x(t.createSessionError_$()?47:-1),l(2),S("disabled",t.isCreating_$()),l(2),S("disabled",t.isCreating_$()||!t.newSessionWorkspacePath_$()),l(),b(" ",t.isCreating_$()?"Creating...":"Create"," "),l(),S("sessionId",t.schedulePopupSessionId_$())("isOpen",t.schedulePopupSessionId_$()!==null),l(),S("sessionId",t.coordinatorPopupSessionId_$())("isOpen",t.coordinatorPopupSessionId_$()!==null),l(),x((c=t.ctxMenuSession_$())?55:-1,c)}},dependencies:[Ze,et,Xe,Ye,Je,Ge,K,se,pe,_e,at],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 ti(n,o){n&1&&w(0,"div",5)}function ii(n,o){if(n&1){let e=y();r(0,"button",13),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleMetadata())}),d(1," Info "),a()}if(n&2){let e=p();T(e.detailUi_DS.isMetadataPanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300")}}function ni(n,o){n&1&&w(0,"span",17)}function oi(n,o){if(n&1&&(w(0,"span",16),E(1,"caSessionStatusColor"),g(2,ni,1,0,"span",17)),n&2){p(2);let e=I(1);S("ngClass",k(1,3,e.session.status))("title",e.session.status),l(2),x(e.isLive?2:-1)}}function si(n,o){n&1&&(r(0,"span",15),d(1,"Loading\u2026"),a())}function ri(n,o){if(n&1&&(r(0,"span",14),d(1),a(),g(2,oi,3,5)(3,si,2,0,"span",15)),n&2){p();let e=I(1);S("title",e.title),l(),b(" ",e.title," "),l(),x(e.session?2:-1),l(),x(e.isLoading&&!e.session?3:-1)}}function ai(n,o){if(n&1){let e=y();w(0,"div",19),r(1,"button",20),f("click",function(){u(e);let t=p(2);return m(t.detailUi_DS.handleStopExecution())}),d(2),a()}if(n&2){let e=p(2);l(),S("disabled",e.detailUi_DS.isStopping_$()),l(),b(" ",e.detailUi_DS.isStopping_$()?"Stopping\u2026":"Stop"," ")}}function li(n,o){if(n&1){let e=y();r(0,"button",18),f("click",function(){u(e);let t=p();return m(t.detailUi_DS.handleToggleTimeline())}),d(1," Timeline "),a(),g(2,ai,3,2)}if(n&2){let e=p(),i=I(1);T(e.detailUi_DS.isTimelinePanelOpen_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-500 hover:text-neutral-300"),l(2),x(i.isLive?2:-1)}}var $t=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);caTopBar_$=P(()=>{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(Ce=>Ce.sessionId===e),_=t?.sessionId===e,M=_?t:c??null,N=M&&(M.label||M.sessionId)||e,B=M?.status??"";return{title:N,session:M,isLoading:i,showActions:_&&!i,isLive:B==="running"||B==="waiting-input"}});sidebarWidth_$=h(320);isSidebarOpen_$=h(!0);isResizing_$=h(!1);ngOnInit(){let e=C.loadPanelWidth("sidebar",320);this.sidebarWidth_$.set(Math.max(200,Math.min(600,e))),this.isSidebarOpen_$.set(C.loadPanelOpen("sidebar",!0))}handleSidebarResizeStart(e){let i=e.clientX,t=this.sidebarWidth_$();this.isResizing_$.set(!0),J.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),C.savePanelWidth("sidebar",this.sidebarWidth_$())}})}handleToggleSidebar(){this.isSidebarOpen_$.update(e=>!e),C.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();r(0,"div",0),te(1),r(2,"app-s-session-shell-toolbar")(3,"div",1)(4,"button",2),f("click",function(){return u(s),m(t.handleToggleSidebar())}),Le(),r(5,"svg",3),w(6,"polyline",4),a(),d(7," CA Sessions "),a(),g(8,ti,1,0,"div",5)(9,ii,2,2,"button",6),a(),Ve(),r(10,"div",7),g(11,ri,4,4),a(),r(12,"div",8),g(13,li,3,3),a()(),r(14,"app-s-resizable-session-shell-layout",9),f("sidebarResizeStart",function(_){return u(s),m(t.handleSidebarResizeStart(_))}),r(15,"div",10)(16,"app-ccap-ca-dashboard",11),f("sessionSelected",function(){return u(s),m(t.handleSessionSelectedFromDashboard())}),a()(),r(17,"div",12),w(18,"router-outlet"),a()()()}if(i&2){z("select-none",t.isResizing_$()),l();let s=ie(t.caTopBar_$());l(4),z("rotate-90",t.isSidebarOpen_$())("-rotate-90",!t.isSidebarOpen_$()),l(3),x(s?8:-1),l(),x(s&&s.showActions?9:-1),l(2),x(s?11:-1),l(2),x(s&&s.showActions?13:-1),l(),S("isSidebarOpen",t.isSidebarOpen_$())("sidebarWidthPx",t.sidebarWidth_$())("isResizing",t.isResizing_$())}},dependencies:[j,je,ct,pt,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 Dt=(()=>{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 _=ce.tryParseStableListKey(c.listKey);_===null||_.role!=="start"||e.set(_.toolCallId,s)}if(!e.size)return o;let i=new Set,t=o.map(s=>xe({},s));for(let s=0;s<t.length;s++){let c=t[s];if(c.briefSubtype!=="tool_call_update")continue;let _=ce.tryParseStableListKey(c.listKey);if(_===null)continue;let M=c.type==="tool-result"&&_.role==="result",N=c.type==="error"&&_.role==="error";if(!M&&!N)continue;let B=e.get(_.toolCallId);if(B===void 0)continue;let Se=n.buildPairedExpandableRawOutput({rawData:c.rawData,fallbackText:c.text}),Ce={text:c.text,expandableContent:Se.length?Se:c.text,rawData:c.rawData,isError:N?!0:void 0};t[B]=Te(xe({},t[B]),{pairedResult:Ce,isToolCallFailedIndicator:N?!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 _=ce.formatContent(s);_.length&&t.push(_)}let c=Reflect.get(i,"rawOutput");if(c!==void 0)try{let _=JSON.stringify(c,null,2);ye.looksLikeJson(_)?t.push(ye.formatJson(_)):t.push(_)}catch{}return t.length?t.join(`
2
2
 
3
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 di=["messagesEnd"],ci=(n,o)=>o.listKey,pi=()=>({"w-[90%]":!0,"ml-4":!0}),_i=()=>({"w-[85%]":!0});function ui(n,o){if(n&1&&(r(0,"span",11),E(1,"caSessionStatusColor"),d(2),a()),n&2){let e=o;T(k(1,3,e.status)),l(2),b(" ",e.status," ")}}function mi(n,o){n&1&&(r(0,"div",6),d(1," Loading\u2026 "),a())}function fi(n,o){n&1&&(r(0,"div",6),d(1," No messages yet \u2014 send a prompt "),a())}function hi(n,o){if(n&1){let e=y();r(0,"div")(1,"div",12)(2,"app-s-agent-console-message-bubble",13),f("ttsCached",function(t){u(e);let s=p();return m(s.handleTtsCached(t))}),a()()()}if(n&2){let e=o.$implicit,i=p();T(e.isUserAligned?"flex justify-end":"flex justify-start"),l(),S("ngClass",e.kind===i.bubbleKind.tool?ve(4,pi):ve(5,_i)),l(),S("view",e)}}var Tt=(()=>{class n{messagesEndRef;ca_DS=v(L);detailUi_DS=v(F);voiceInputUi_DS=v(nt);sessionQueue_DS=v(xt);route=v(ne);promptInput_$=h("");isSending_$=h(!1);isExecuting_$=P(()=>this.ca_DS.selectedSession_$()?.status==="running");messages_$=P(()=>this.ca_DS.consoleMessages_$());ttsCachedKeys_$=h(new Set);handleTtsCached(e){this.ttsCachedKeys_$.update(i=>new Set([...i,e]))}bubbleViews_$=P(()=>{let e=this.ca_DS.assembledMessages_$();if(e.length>0){let c=this.sessionId,_=this.ttsCachedKeys_$(),M=e.map(N=>vt.fromAssembledMessage(N,{sessionId:c,cachedKeys:_}));return M=Ae.groupSubAgentItems(M),M=Ae.groupConsecutiveToolItems(M),M}let i=this.detailUi_DS.isShowAgentUpdates_$(),t=Dt.filterForAgentUpdatesVisibility({messages:this.messages_$(),isShowAgentUpdates:i});return fe.pairToolResultsIntoToolStarts(t).map(c=>he.fromConsoleMessage(c))});bubbleKind=R;isComposerSendDisabled_$=P(()=>!this.promptInput_$().trim().length);previousConsoleMessageCount=0;get sessionId(){return this.ca_DS.activeSessionId_$()}ngAfterViewInit(){this.scheduleScrollToBottom()}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(C.loadPromptDraft(e)),this.sessionQueue_DS.subscribeToSession({sessionId:e,baseRoute:"ca-session"}))}handleSendPrompt(){return D(this,null,function*(){let e=this.promptInput_$().trim();if(!(!e||!this.sessionId||this.isSending_$())){C.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&&C.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&&G(di,5),i&2){let s;Y(s=Z())&&(t.messagesEndRef=s.first)}},hostAttrs:[1,"flex","flex-col","flex-1","min-h-0","overflow-hidden","w-full","min-w-0"],decls:16,vars:14,consts:[["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,"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();r(0,"app-s-session-chat-column-layout")(1,"div",1)(2,"div",2)(3,"span",3),d(4),a(),g(5,ui,3,5,"span",4),a()(),r(6,"div",5),g(7,mi,2,0,"div",6)(8,fi,2,0,"div",6),H(9,hi,3,6,"div",7,ci),w(11,"div",null,0),a(),r(13,"div",8)(14,"app-s-session-input",9),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"}))}),r(15,"app-ccap-voice-record-button",10),f("transcriptSegmentReady",function(_){return u(s),m(t.handleVoiceSegment(_))}),a()()()()}if(i&2){let s;l(4),b(" ",t.ca_DS.activeSessionId_$()||"No session"," "),l(),x((s=t.ca_DS.selectedSession_$())?5:-1,s),l(2),x(t.ca_DS.selectedSessionLoading_$()?7:t.bubbleViews_$().length?-1:8),l(2),Q(t.bubbleViews_$()),l(5),S("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(),S("compactLayout",!0)}},dependencies:[j,ae,ut,mt,ft,X],encapsulation:2})}return n})();var It=(()=>{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 Et=(()=>{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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").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
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 q=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=de.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 we.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 kt=(()=>{class n{transform(e){return e==null?"":q.streamRowBrief(e)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionTimelineStreamRowBrief",type:n,pure:!0})}return n})();var Pt=(()=>{class n{transform(e){return e==null?"":q.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?"":q.streamRowSequenceLabel(e)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=U({name:"caSessionTimelineStreamRowSequenceLabel",type:n,pure:!0})}return n})();var yi=["eventList"],wi=(n,o)=>o.rowKey,Ai=n=>({"bg-neutral-800/30":n});function $i(n,o){if(n&1){let e=y();r(0,"div",9)(1,"button",12),f("click",function(){u(e);let t=p();return m(t.handleLoadMoreEvents())}),d(2),a()()}if(n&2){let e=p();l(),S("disabled",e.isLoadingMore_$()),l(),b(" ",e.isLoadingMore_$()?"Loading\u2026":"Load more events"," ")}}function Di(n,o){n&1&&(r(0,"div",11),d(1," No events yet "),a())}function Ti(n,o){if(n&1&&(r(0,"span",17),d(1),a()),n&2){let e=p().$implicit;l(),b(" \xD7",e.events.length,"")}}function Ii(n,o){if(n&1&&(r(0,"div",23)(1,"div",24),d(2,"Event data:"),a(),w(3,"pre",25),E(4,"caSessionJsonFormat"),a()),n&2){let e=p().$implicit;l(3),S("innerHTML",k(4,1,e.events[0].data),Ue)}}function Ei(n,o){if(n&1){let e=y();r(0,"div",14),f("click",function(){let t=u(e).$implicit,s=p(2);return m(s.handleSelectRow(t))}),r(1,"div",15)(2,"span",16),E(3,"caSessionEventTypeColor"),d(4),g(5,Ti,2,1,"span",17),a(),r(6,"span",18),d(7),E(8,"caSessionTimelineStreamRowSequenceLabel"),a(),r(9,"span",19),E(10,"caSessionTimelineStreamRowBrief"),d(11),E(12,"caSessionTimelineStreamRowBrief"),a(),r(13,"span",20),E(14,"sAbsoluteTime"),d(15),E(16,"sTimeAgo"),a(),r(17,"span",21),f("click",function(t){return u(e),m(t.stopPropagation())}),w(18,"app-s-copy-button",22),E(19,"caSessionTimelineStreamRowClipboardText"),a()(),g(20,Ii,5,3,"div",23),a()}if(n&2){let e,i,t=o.$implicit,s=p(2);S("ngClass",Ne(26,Ai,s.selectedRowKey_$()===t.rowKey)),l(2),T(k(3,12,t.events[0].eventType)),l(2),b(" ",t.events[0].eventType," "),l(),x(t.events.length>1?5:-1),l(2),b(" ",k(8,14,t)," "),l(2),S("title",k(10,16,t)),l(2),b(" ",k(12,18,t)," "),l(2),S("title",k(14,20,(e=t.events[0].timestamp)!==null&&e!==void 0?e:"")),l(2),b(" ",k(16,22,(i=t.events[0].timestamp)!==null&&i!==void 0?i:"")," "),l(3),S("content",k(19,24,t)),l(2),x(s.selectedRowKey_$()===t.rowKey?20:-1)}}function ki(n,o){if(n&1&&H(0,Ei,21,28,"div",13,wi),n&2){let e=p();Q(e.displayRows_$())}}var Mt=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);selectedRowKey_$=h(null);isLoadingMore_$=h(!1);isAutoScroll_$=h(!0);eventListRef;previousRowCount=0;displayRows_$=P(()=>{let e=[...this.ca_DS.selectedSessionEvents_$()].sort(lt.compareMirrorEventsAsc);return[...de.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 D(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&&G(yi,5),i&2){let s;Y(s=Z())&&(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();r(0,"div",1)(1,"div",2)(2,"span",3),d(3,"Event Timeline"),a(),r(4,"span",4),d(5),a()(),r(6,"button",5),f("click",function(){return u(s),m(t.handleToggleAutoScroll())}),d(7," Auto-scroll "),a()(),r(8,"div",6)(9,"button",7),f("click",function(){return u(s),m(t.detailUi_DS.handleToggleSessionStatus())}),d(10," Session status "),a(),r(11,"button",8),f("click",function(){return u(s),m(t.detailUi_DS.handleToggleAgentUpdates())}),d(12," Agent updates "),a()(),g(13,$i,3,2,"div",9),r(14,"div",10,0),g(16,Di,2,0,"div",11)(17,ki,2,0),a()}i&2&&(l(5),b(" (",t.ca_DS.selectedSessionEvents_$().length,") "),l(),T(t.isAutoScroll_$()?"border-neonCyan text-neonCyan shadow-neon-glow-cyan":"border-neonDefault text-neutral-400"),l(3),T(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),T(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),x(t.ca_DS.sessionEventsHasMore_$()?13:-1),l(3),x(t.displayRows_$().length?17:16))},dependencies:[j,dt,st,rt,It,Et,kt,Pt,Rt],encapsulation:2})}return n})();function Ri(n,o){n&1&&(r(0,"div",0),d(1,"Loading\u2026"),a())}function Mi(n,o){n&1&&(r(0,"div",0),d(1,"No session"),a())}function Li(n,o){if(n&1&&(r(0,"div",6)(1,"span",7),d(2,"ACP sessionId"),a(),r(3,"span",8),d(4),a()()),n&2){p();let e=I(0);l(4),W(e.acpSessionId)}}function Vi(n,o){if(n&1&&(r(0,"div",6)(1,"span",7),d(2,"Label"),a(),r(3,"span",18),d(4),a()()),n&2){p();let e=I(0);l(4),W(e.label)}}function Oi(n,o){if(n&1&&(r(0,"div",6)(1,"span",7),d(2,"Parent CCAP session"),a(),r(3,"span",8),d(4),a()()),n&2){p();let e=I(0);l(4),W(e.parentSessionId)}}function Ui(n,o){if(n&1&&(r(0,"div",4)(1,"div",5),d(2,"Agent"),a(),r(3,"div",18),d(4),a()()),n&2){p();let e=I(0);l(4),ee("",e.agentInfoName," ",e.agentInfoVersion,"")}}function Fi(n,o){if(n&1&&(r(0,"div",10),d(1),a()),n&2){p();let e=I(0);l(),b(" ACP: ",e.isAcpConnected?"connected":"offline"," ")}}function Wi(n,o){if(n&1&&(r(0,"div",10),d(1),a()),n&2){p();let e=I(0);l(),b(" session/load: ",e.loadSessionSupported?"supported":"not advertised"," ")}}function qi(n,o){if(n&1&&(r(0,"div",10),d(1),a()),n&2){p();let e=I(0);l(),b(" mode: ",e.isTerminalMode?"terminal":"direct"," ")}}function Ni(n,o){if(n&1&&(r(0,"div",19),d(1),a()),n&2){p();let e=I(0);T(e.isTerminalRunnerConnected?"text-green-400":"text-amber-400"),l(),b(" runner: ",e.isTerminalRunnerConnected?"connected":"disconnected"," ")}}function Bi(n,o){if(n&1&&(r(0,"div",6)(1,"span",7),d(2,"lastSyncAt"),a(),r(3,"span",20),d(4),a()()),n&2){p();let e=I(0);l(4),W(e.lastSyncAt)}}function zi(n,o){if(n&1&&(r(0,"div",12),d(1),a()),n&2){p();let e=I(0);l(),b(" ",e.lastSyncError," ")}}function Hi(n,o){if(n&1){let e=y();te(0),r(1,"div",1)(2,"div",2)(3,"span",3),E(4,"caSessionStatusColor"),d(5),a()(),r(6,"div",4)(7,"div",5),d(8,"Session"),a(),r(9,"div",6)(10,"span",7),d(11,"Business ID"),a(),r(12,"span",8),d(13),a()(),g(14,Li,5,1,"div",6)(15,Vi,5,1,"div",6),r(16,"div",6)(17,"span",7),d(18,"Workspace"),a(),r(19,"span",8),d(20),a()(),g(21,Oi,5,1,"div",6),a(),g(22,Ui,5,2,"div",4),r(23,"div",9)(24,"div",5),d(25,"Mirror / ACP"),a(),g(26,Fi,2,1,"div",10)(27,Wi,2,1,"div",10)(28,qi,2,1,"div",10)(29,Ni,2,3,"div",11)(30,Bi,5,1,"div",6)(31,zi,2,1,"div",12),r(32,"button",13),f("click",function(){u(e);let t=p();return m(t.handleHydrate(!1))}),d(33," Hydrate from agent "),a(),r(34,"button",14),f("click",function(){u(e);let t=p();return m(t.handleHydrate(!0))}),d(35," Force re-hydrate "),a()(),r(36,"div",15)(37,"button",16),f("click",function(){u(e);let t=p();return m(t.handleTerminate())}),d(38),a(),r(39,"button",17),f("click",function(){u(e);let t=p();return m(t.handleArchiveToggle())}),d(40),a()()()}if(n&2){let e=p(),i=ie(e.session_$());l(3),T(k(4,22,i.status)),l(2),b(" ",i.status," "),l(8),W(i.sessionId),l(),x(i.acpSessionId?14:-1),l(),x(i.label?15:-1),l(5),W(i.workspacePath),l(),x(i.parentSessionId?21:-1),l(),x(i.agentInfoName||i.agentInfoVersion?22:-1),l(4),x(i.isAcpConnected===!0||i.isAcpConnected===!1?26:-1),l(),x(i.loadSessionSupported===!0||i.loadSessionSupported===!1?27:-1),l(),x(i.isTerminalMode===!0||i.isTerminalMode===!1?28:-1),l(),x(i.isTerminalMode===!0?29:-1),l(),x(i.lastSyncAt?30:-1),l(),x(i.lastSyncError?31:-1),l(),S("disabled",e.isHydrating_$()||i.loadSessionSupported!==!0),l(2),S("disabled",e.isHydrating_$()||i.loadSessionSupported!==!0),l(3),S("disabled",e.detailUi_DS.isTerminating_$()),l(),b(" ",e.detailUi_DS.isTerminating_$()?"Terminating\u2026":"Terminate"," "),l(),S("disabled",e.isArchiving_$()),l(),b(" ",i.isArchived?"Unarchive":"Archive"," ")}}var Lt=(()=>{class n{ca_DS=v(L);detailUi_DS=v(F);session_$=P(()=>this.ca_DS.selectedSession_$());isLoading_$=P(()=>this.ca_DS.selectedSessionLoading_$());isArchiving_$=h(!1);isHydrating_$=h(!1);handleHydrate(e){return D(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 D(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&&g(0,Ri,2,0,"div",0)(1,Mi,2,0,"div",0)(2,Hi,41,24,"div",1),i&2&&x(t.isLoading_$()?0:t.session_$()?2:1)},dependencies:[X],encapsulation:2})}return n})();function ji(n,o){if(n&1){let e=y();r(0,"div",0)(1,"p",4),d(2,"Could not load this session."),a(),w(3,"app-ccap-error-display",5),r(4,"button",6),f("click",function(){u(e);let t=p();return m(t.handleRetryLoadDetail())}),d(5," Retry "),a()()}if(n&2){let e=p();l(3),S("error",e.ca_DS.sessionDetailError_$())}}function Ki(n,o){if(n&1&&(r(0,"div",1)(1,"span"),d(2,"Loading session\u2026"),a(),r(3,"span",7),d(4),a()()),n&2){let e=p();l(4),W(e.sessionId_$())}}function Xi(n,o){if(n&1){let e=y();r(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))}),r(1,"div",9),w(2,"app-ccap-ca-metadata"),a(),r(3,"div",10),w(4,"app-ccap-ca-console"),a(),r(5,"div",11),w(6,"app-ccap-ca-timeline"),a()()}if(n&2){let e=p();S("isStartOpen",e.detailUi_DS.isMetadataPanelOpen_$())("isEndOpen",e.detailUi_DS.isTimelinePanelOpen_$())("startWidthPx",e.metadataWidth_$())("endWidthPx",e.timelineWidth_$())("isResizing",e.isResizing_$())}}function Ji(n,o){if(n&1){let e=y();r(0,"div",0)(1,"p",4),d(2,"Could not load CA session list."),a(),w(3,"app-ccap-error-display",12),r(4,"button",6),f("click",function(){u(e);let t=p();return m(t.handleRetryLoadList())}),d(5," Retry list "),a()()}if(n&2){let e=p();l(3),S("error",e.ca_DS.sessionsLoadError_$())}}function Gi(n,o){n&1&&(r(0,"div",1)(1,"span"),d(2,"Loading sessions\u2026"),a()())}function Yi(n,o){n&1&&(r(0,"div",3)(1,"span"),d(2,"No CA sessions yet."),a(),r(3,"span",13),d(4,"Create one from the sidebar or check the server connection."),a()())}function Zi(n,o){n&1&&(r(0,"div",3)(1,"span"),d(2,"Select a session from the sidebar"),a(),r(3,"span",13),d(4,"Opening the default session\u2026"),a()())}var De=(()=>{class n extends it{ca_DS=v(L);detailUi_DS=v(F);peiContext_DS=v(re);route=v(ne);router=v(oe);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,C.loadPanelWidth("metadata",256)))),this.timelineWidth_$.set(Math.max(200,Math.min(600,C.loadPanelWidth("timeline",288))));let e=this.route.paramMap.pipe(Ie(i=>i.get("sessionId")??""),ke());this.addSubscription(Ee([e,this.sessionsListObs$,this.sessionsLoadingObs$]).subscribe(([i,t,s])=>{if(i.length>0){this.isEmptyRouteListFetchRequested=!1,i!==this.sessionId_$()&&this.loadSession(i);return}if(s)return;if(!t.length&&!this.isEmptyRouteListFetchRequested){this.isEmptyRouteListFetchRequested=!0,this.ca_DS.loadSessions({includeArchived:C.loadShowArchived()});return}if(!t.length){this.sessionId_$.set(""),this.ca_DS.stopOpenSessionPolling(),this.ca_DS.setActiveSessionId("");return}let c=me.pickDefaultSessionId({sessions:t,lastSavedSessionId:C.loadLastSessionId(),includeArchived:C.loadShowArchived()});if(c.length>0){this.router.navigate(["/ca-session",c],{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:C.loadShowArchived()})}handleMetadataResizeStart(e){let i=this.metadataWidth_$(),t=e.clientX;this.isResizing_$.set(!0),J.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),C.savePanelWidth("metadata",this.metadataWidth_$())}})}handleTimelineResizeStart(e){let i=this.timelineWidth_$(),t=e.clientX;this.isResizing_$.set(!0),J.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),C.savePanelWidth("timeline",this.timelineWidth_$())}})}loadSession(e){this.sessionId_$.set(e),this.ca_DS.clearLiveOutput(),this.ca_DS.setActiveSessionId(e),C.saveLastSessionId(e),this.peiContext_DS.ensureInitialized().then(()=>{this.runLoadSessionDetailWithPoll(e)})}runLoadSessionDetailWithPoll(e){return D(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&&g(0,ji,6,1,"div",0)(1,Ki,5,1,"div",1)(2,Xi,7,5,"app-s-session-detail-three-column-layout",2)(3,Ji,6,1,"div",0)(4,Gi,3,0,"div",1)(5,Yi,5,0,"div",3)(6,Zi,5,0,"div",3),i&2&&x(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,_t,Tt,Mt,Lt],encapsulation:2})}return n})();var en=[{path:"",component:$t,children:[{path:"",pathMatch:"full",component:De},{path:":sessionId",component:De}]}],Os=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Me({type:n});static \u0275inj=Re({imports:[He,tt,Ke.forChild(en),K,ae,se,pe,_e,ht]})}return n})();export{Os as CaSession_Module};
5
- //# sourceMappingURL=ca.module-X4AI3X6G.js.map
5
+ //# sourceMappingURL=ca.module-FTQALPNM.js.map