@futdevpro/ccap 1.1.3503 → 1.1.3513
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client-dist/{agent-instances.module-UYD2XYZE.js → agent-instances.module-T6EFJFPE.js} +2 -2
- package/client-dist/{ca.module-3CDQXCAY.js → ca.module-NCBI74FP.js} +2 -2
- package/client-dist/cc-usage-dashboard.component-Q3FBUIIR.js +2 -0
- package/client-dist/cc-usage-dashboard.component-Q3FBUIIR.js.map +7 -0
- package/client-dist/{cc.module-BFN6BZIN.js → cc.module-CIY6QMB5.js} +4 -4
- package/client-dist/{cc.module-BFN6BZIN.js.map → cc.module-CIY6QMB5.js.map} +3 -3
- package/client-dist/{chunk-EFNJA3BL.js → chunk-2DR4NRFY.js} +2 -2
- package/client-dist/{chunk-NOL3YONA.js → chunk-2ZI26XMZ.js} +2 -2
- package/client-dist/{chunk-IZEUWGJK.js → chunk-3N2JTN7N.js} +2 -2
- package/client-dist/{chunk-KRHX46JK.js → chunk-4UKDXJIX.js} +2 -2
- package/client-dist/{chunk-YMTP6F2C.js → chunk-5BYRCQ4G.js} +2 -2
- package/client-dist/{chunk-JU3RXVDX.js → chunk-66FQLE3Y.js} +2 -2
- package/client-dist/{chunk-E65UDGDD.js → chunk-6HZB6QSW.js} +2 -2
- package/client-dist/{chunk-5QAKXYWT.js → chunk-6RYNRTDZ.js} +2 -2
- package/client-dist/{chunk-Z3Y2VOXP.js → chunk-6UQHXR3E.js} +2 -2
- package/client-dist/{chunk-GIL5OROM.js → chunk-7IUV4ACY.js} +2 -2
- package/client-dist/{chunk-QAT6LVRB.js → chunk-A37XCJWY.js} +2 -2
- package/client-dist/{chunk-ZFOQPLZY.js → chunk-ASAT75IU.js} +2 -2
- package/client-dist/{chunk-4J5DWAPO.js → chunk-AWIEYMZV.js} +2 -2
- package/client-dist/{chunk-SPUD4EJ3.js → chunk-BR7XXFVN.js} +2 -2
- package/client-dist/{chunk-VFQYSWYJ.js → chunk-BWH3JLHB.js} +2 -2
- package/client-dist/{chunk-CZTIPDFA.js → chunk-DZFGKIFO.js} +2 -2
- package/client-dist/{chunk-XQESPKDR.js → chunk-E5QVIO4C.js} +2 -2
- package/client-dist/{chunk-C2XSLL34.js → chunk-EUEEHSUR.js} +2 -2
- package/client-dist/{chunk-MZ3YYQWQ.js → chunk-EVV5L3LF.js} +2 -2
- package/client-dist/{chunk-GIOHSC4G.js → chunk-F4BNEQYE.js} +2 -2
- package/client-dist/{chunk-7MDPIWHS.js → chunk-F4DZS3GH.js} +2 -2
- package/client-dist/{chunk-7QLE2HOD.js → chunk-FWVYBWXT.js} +2 -2
- package/client-dist/{chunk-EUOPIQ5M.js → chunk-FYMVJNXZ.js} +2 -2
- package/client-dist/{chunk-6D27TSZV.js → chunk-GDAWHJEQ.js} +2 -2
- package/client-dist/chunk-GTMPSTDI.js +3 -0
- package/client-dist/chunk-GTMPSTDI.js.map +7 -0
- package/client-dist/{chunk-FJ4AQ7DJ.js → chunk-H3QXSZIS.js} +2 -2
- package/client-dist/{chunk-27RTDRPJ.js → chunk-HZSNYOA4.js} +2 -2
- package/client-dist/{chunk-45RYB36M.js → chunk-I7TF6JIJ.js} +2 -2
- package/client-dist/{chunk-55LHNHV7.js → chunk-IFF2675Y.js} +2 -2
- package/client-dist/{chunk-RW5UDPYM.js → chunk-M6EVLEFQ.js} +2 -2
- package/client-dist/{chunk-WZGZ4B4R.js → chunk-MLGDSF43.js} +2 -2
- package/client-dist/{chunk-JZMWWTFG.js → chunk-MS2KQ2G4.js} +2 -2
- package/client-dist/{chunk-VRW33XBA.js → chunk-N4KTLLCR.js} +2 -2
- package/client-dist/{chunk-MFTEXAIX.js → chunk-N72DAUY2.js} +2 -2
- package/client-dist/{chunk-VNUSAOT6.js → chunk-NEYB4VGZ.js} +2 -2
- package/client-dist/{chunk-32WW5HVW.js → chunk-NIEBWTUO.js} +2 -2
- package/client-dist/{chunk-G67NI7SB.js → chunk-NQ33IXIS.js} +2 -2
- package/client-dist/{chunk-JV5HX5WS.js → chunk-OKZUEJZL.js} +2 -2
- package/client-dist/{chunk-ORUMPAIH.js → chunk-P5OOFVBC.js} +2 -2
- package/client-dist/{chunk-FTD33PGM.js → chunk-PR5JV6XX.js} +2 -2
- package/client-dist/{chunk-QP4ANIRB.js → chunk-PY7ZXKHG.js} +2 -2
- package/client-dist/{chunk-4VX4P4Q3.js → chunk-Q7ORWYDO.js} +2 -2
- package/client-dist/{chunk-TEX5KB4S.js → chunk-QIXXTQJJ.js} +2 -2
- package/client-dist/{chunk-JJGA6W5B.js → chunk-QKA6WOBV.js} +2 -2
- package/client-dist/{chunk-KOC4SVZ5.js → chunk-QP53M3ES.js} +2 -2
- package/client-dist/{chunk-BGZFNZ2C.js → chunk-QQ2C4ATW.js} +2 -2
- package/client-dist/{chunk-32QSFPDR.js → chunk-QXQWNRPL.js} +2 -2
- package/client-dist/{chunk-FIEFWNJ6.js → chunk-SNRZOR27.js} +2 -2
- package/client-dist/{chunk-QKJHPKSW.js → chunk-SXZ6SL34.js} +2 -2
- package/client-dist/{chunk-2UN7HPVU.js → chunk-UKVDEDDM.js} +2 -2
- package/client-dist/{chunk-OMWHFGY6.js → chunk-VTB3IOVV.js} +2 -2
- package/client-dist/{chunk-5APAM7YJ.js → chunk-WR6NSOQ2.js} +2 -2
- package/client-dist/{chunk-5APAM7YJ.js.map → chunk-WR6NSOQ2.js.map} +1 -1
- package/client-dist/{chunk-N7EJNOHR.js → chunk-WTIUHUMN.js} +2 -2
- package/client-dist/{chunk-7NW27ZEP.js → chunk-YWLPTL5I.js} +2 -2
- package/client-dist/{chunk-ADKAF2LM.js → chunk-YXBF6EUR.js} +2 -2
- package/client-dist/{chunk-OZ3TFPBG.js → chunk-YYUKX4AF.js} +2 -2
- package/client-dist/{chunk-QRLOYIIN.js → chunk-YZ27TRGU.js} +2 -2
- package/client-dist/{consultant.module-MXCBA6UI.js → consultant.module-RMGDKO7R.js} +2 -2
- package/client-dist/{crd.module-PGOP7A3H.js → crd.module-7WOWOPYH.js} +2 -2
- package/client-dist/{dashboard.module-YAWOK3X4.js → dashboard.module-UH6C2XJC.js} +2 -2
- package/client-dist/{do.module-YPKXT2VE.js → do.module-DITA42VY.js} +2 -2
- package/client-dist/{document-library.module-47UIYBBS.js → document-library.module-NDPVJJ3N.js} +2 -2
- package/client-dist/{embedding-eval.module-ZFEAXH6R.js → embedding-eval.module-JROZZ6QM.js} +2 -2
- package/client-dist/{embedding-registry.module-CX6ONIEM.js → embedding-registry.module-OYU7CQPU.js} +2 -2
- package/client-dist/{err.module-2WOMSH46.js → err.module-M7L4RF46.js} +2 -2
- package/client-dist/{feedback.module-KVOQQYW7.js → feedback.module-ZG272S6E.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-76HVPG4X.js → host-runtime-mcp.module-PVVACC4N.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-ZNMPF3BA.js → live-dev-pipeline.module-FKNKOKZ4.js} +2 -2
- package/client-dist/{logs.module-N37FMRF3.js → logs.module-MN6SDRMH.js} +2 -2
- package/client-dist/{main-CCBBKAON.js → main-NHPLEEM5.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-N65RQBOH.js → master-control-remote-poc.module-A3XO6MIC.js} +2 -2
- package/client-dist/{mobile-app.module-SFHXH642.js → mobile-app.module-QADWA6MM.js} +2 -2
- package/client-dist/{model-registry.module-QHKLMBXO.js → model-registry.module-IRG2HWJO.js} +2 -2
- package/client-dist/{oc.module-JGV3IDGY.js → oc.module-52TKAH2Q.js} +2 -2
- package/client-dist/{orc.module-VZ5XW5KW.js → orc.module-HSTBXIQM.js} +2 -2
- package/client-dist/{project-management.module-DL4TUNDP.js → project-management.module-FL2RWRKY.js} +2 -2
- package/client-dist/project-source-routed.module-N76TUCOI.js +2 -0
- package/client-dist/{scheduler.module-Q3SJSC4T.js → scheduler.module-XYY22JMT.js} +2 -2
- package/client-dist/{session.module-U2IP5J2B.js → session.module-N2DJOIHD.js} +2 -2
- package/client-dist/{set.module-GTMFMOEB.js → set.module-XW5X3ZLY.js} +2 -2
- package/client-dist/{setup.module-4TXUKI27.js → setup.module-B4QMBFKV.js} +2 -2
- package/client-dist/{terminals.module-W3ZC3EEB.js → terminals.module-24K6SSFO.js} +2 -2
- package/client-dist/{voice-notes-poc.module-WV4DMW3S.js → voice-notes-poc.module-IW7VPFDD.js} +2 -2
- package/client-dist/{wfs.module-GIXOJHRJ.js → wfs.module-S2SMAT5Z.js} +2 -2
- package/package.json +1 -1
- package/client-dist/cc-usage-dashboard.component-MGVQCZUN.js +0 -2
- package/client-dist/cc-usage-dashboard.component-MGVQCZUN.js.map +0 -7
- package/client-dist/chunk-GWK7XTQP.js +0 -2
- package/client-dist/chunk-GWK7XTQP.js.map +0 -7
- package/client-dist/project-source-routed.module-G3PDOXVT.js +0 -2
- /package/client-dist/{agent-instances.module-UYD2XYZE.js.map → agent-instances.module-T6EFJFPE.js.map} +0 -0
- /package/client-dist/{ca.module-3CDQXCAY.js.map → ca.module-NCBI74FP.js.map} +0 -0
- /package/client-dist/{chunk-EFNJA3BL.js.map → chunk-2DR4NRFY.js.map} +0 -0
- /package/client-dist/{chunk-NOL3YONA.js.map → chunk-2ZI26XMZ.js.map} +0 -0
- /package/client-dist/{chunk-IZEUWGJK.js.map → chunk-3N2JTN7N.js.map} +0 -0
- /package/client-dist/{chunk-KRHX46JK.js.map → chunk-4UKDXJIX.js.map} +0 -0
- /package/client-dist/{chunk-YMTP6F2C.js.map → chunk-5BYRCQ4G.js.map} +0 -0
- /package/client-dist/{chunk-JU3RXVDX.js.map → chunk-66FQLE3Y.js.map} +0 -0
- /package/client-dist/{chunk-E65UDGDD.js.map → chunk-6HZB6QSW.js.map} +0 -0
- /package/client-dist/{chunk-5QAKXYWT.js.map → chunk-6RYNRTDZ.js.map} +0 -0
- /package/client-dist/{chunk-Z3Y2VOXP.js.map → chunk-6UQHXR3E.js.map} +0 -0
- /package/client-dist/{chunk-GIL5OROM.js.map → chunk-7IUV4ACY.js.map} +0 -0
- /package/client-dist/{chunk-QAT6LVRB.js.map → chunk-A37XCJWY.js.map} +0 -0
- /package/client-dist/{chunk-ZFOQPLZY.js.map → chunk-ASAT75IU.js.map} +0 -0
- /package/client-dist/{chunk-4J5DWAPO.js.map → chunk-AWIEYMZV.js.map} +0 -0
- /package/client-dist/{chunk-SPUD4EJ3.js.map → chunk-BR7XXFVN.js.map} +0 -0
- /package/client-dist/{chunk-VFQYSWYJ.js.map → chunk-BWH3JLHB.js.map} +0 -0
- /package/client-dist/{chunk-CZTIPDFA.js.map → chunk-DZFGKIFO.js.map} +0 -0
- /package/client-dist/{chunk-XQESPKDR.js.map → chunk-E5QVIO4C.js.map} +0 -0
- /package/client-dist/{chunk-C2XSLL34.js.map → chunk-EUEEHSUR.js.map} +0 -0
- /package/client-dist/{chunk-MZ3YYQWQ.js.map → chunk-EVV5L3LF.js.map} +0 -0
- /package/client-dist/{chunk-GIOHSC4G.js.map → chunk-F4BNEQYE.js.map} +0 -0
- /package/client-dist/{chunk-7MDPIWHS.js.map → chunk-F4DZS3GH.js.map} +0 -0
- /package/client-dist/{chunk-7QLE2HOD.js.map → chunk-FWVYBWXT.js.map} +0 -0
- /package/client-dist/{chunk-EUOPIQ5M.js.map → chunk-FYMVJNXZ.js.map} +0 -0
- /package/client-dist/{chunk-6D27TSZV.js.map → chunk-GDAWHJEQ.js.map} +0 -0
- /package/client-dist/{chunk-FJ4AQ7DJ.js.map → chunk-H3QXSZIS.js.map} +0 -0
- /package/client-dist/{chunk-27RTDRPJ.js.map → chunk-HZSNYOA4.js.map} +0 -0
- /package/client-dist/{chunk-45RYB36M.js.map → chunk-I7TF6JIJ.js.map} +0 -0
- /package/client-dist/{chunk-55LHNHV7.js.map → chunk-IFF2675Y.js.map} +0 -0
- /package/client-dist/{chunk-RW5UDPYM.js.map → chunk-M6EVLEFQ.js.map} +0 -0
- /package/client-dist/{chunk-WZGZ4B4R.js.map → chunk-MLGDSF43.js.map} +0 -0
- /package/client-dist/{chunk-JZMWWTFG.js.map → chunk-MS2KQ2G4.js.map} +0 -0
- /package/client-dist/{chunk-VRW33XBA.js.map → chunk-N4KTLLCR.js.map} +0 -0
- /package/client-dist/{chunk-MFTEXAIX.js.map → chunk-N72DAUY2.js.map} +0 -0
- /package/client-dist/{chunk-VNUSAOT6.js.map → chunk-NEYB4VGZ.js.map} +0 -0
- /package/client-dist/{chunk-32WW5HVW.js.map → chunk-NIEBWTUO.js.map} +0 -0
- /package/client-dist/{chunk-G67NI7SB.js.map → chunk-NQ33IXIS.js.map} +0 -0
- /package/client-dist/{chunk-JV5HX5WS.js.map → chunk-OKZUEJZL.js.map} +0 -0
- /package/client-dist/{chunk-ORUMPAIH.js.map → chunk-P5OOFVBC.js.map} +0 -0
- /package/client-dist/{chunk-FTD33PGM.js.map → chunk-PR5JV6XX.js.map} +0 -0
- /package/client-dist/{chunk-QP4ANIRB.js.map → chunk-PY7ZXKHG.js.map} +0 -0
- /package/client-dist/{chunk-4VX4P4Q3.js.map → chunk-Q7ORWYDO.js.map} +0 -0
- /package/client-dist/{chunk-TEX5KB4S.js.map → chunk-QIXXTQJJ.js.map} +0 -0
- /package/client-dist/{chunk-JJGA6W5B.js.map → chunk-QKA6WOBV.js.map} +0 -0
- /package/client-dist/{chunk-KOC4SVZ5.js.map → chunk-QP53M3ES.js.map} +0 -0
- /package/client-dist/{chunk-BGZFNZ2C.js.map → chunk-QQ2C4ATW.js.map} +0 -0
- /package/client-dist/{chunk-32QSFPDR.js.map → chunk-QXQWNRPL.js.map} +0 -0
- /package/client-dist/{chunk-FIEFWNJ6.js.map → chunk-SNRZOR27.js.map} +0 -0
- /package/client-dist/{chunk-QKJHPKSW.js.map → chunk-SXZ6SL34.js.map} +0 -0
- /package/client-dist/{chunk-2UN7HPVU.js.map → chunk-UKVDEDDM.js.map} +0 -0
- /package/client-dist/{chunk-OMWHFGY6.js.map → chunk-VTB3IOVV.js.map} +0 -0
- /package/client-dist/{chunk-N7EJNOHR.js.map → chunk-WTIUHUMN.js.map} +0 -0
- /package/client-dist/{chunk-7NW27ZEP.js.map → chunk-YWLPTL5I.js.map} +0 -0
- /package/client-dist/{chunk-ADKAF2LM.js.map → chunk-YXBF6EUR.js.map} +0 -0
- /package/client-dist/{chunk-OZ3TFPBG.js.map → chunk-YYUKX4AF.js.map} +0 -0
- /package/client-dist/{chunk-QRLOYIIN.js.map → chunk-YZ27TRGU.js.map} +0 -0
- /package/client-dist/{consultant.module-MXCBA6UI.js.map → consultant.module-RMGDKO7R.js.map} +0 -0
- /package/client-dist/{crd.module-PGOP7A3H.js.map → crd.module-7WOWOPYH.js.map} +0 -0
- /package/client-dist/{dashboard.module-YAWOK3X4.js.map → dashboard.module-UH6C2XJC.js.map} +0 -0
- /package/client-dist/{do.module-YPKXT2VE.js.map → do.module-DITA42VY.js.map} +0 -0
- /package/client-dist/{document-library.module-47UIYBBS.js.map → document-library.module-NDPVJJ3N.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-ZFEAXH6R.js.map → embedding-eval.module-JROZZ6QM.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-CX6ONIEM.js.map → embedding-registry.module-OYU7CQPU.js.map} +0 -0
- /package/client-dist/{err.module-2WOMSH46.js.map → err.module-M7L4RF46.js.map} +0 -0
- /package/client-dist/{feedback.module-KVOQQYW7.js.map → feedback.module-ZG272S6E.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-76HVPG4X.js.map → host-runtime-mcp.module-PVVACC4N.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-ZNMPF3BA.js.map → live-dev-pipeline.module-FKNKOKZ4.js.map} +0 -0
- /package/client-dist/{logs.module-N37FMRF3.js.map → logs.module-MN6SDRMH.js.map} +0 -0
- /package/client-dist/{main-CCBBKAON.js.map → main-NHPLEEM5.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-N65RQBOH.js.map → master-control-remote-poc.module-A3XO6MIC.js.map} +0 -0
- /package/client-dist/{mobile-app.module-SFHXH642.js.map → mobile-app.module-QADWA6MM.js.map} +0 -0
- /package/client-dist/{model-registry.module-QHKLMBXO.js.map → model-registry.module-IRG2HWJO.js.map} +0 -0
- /package/client-dist/{oc.module-JGV3IDGY.js.map → oc.module-52TKAH2Q.js.map} +0 -0
- /package/client-dist/{orc.module-VZ5XW5KW.js.map → orc.module-HSTBXIQM.js.map} +0 -0
- /package/client-dist/{project-management.module-DL4TUNDP.js.map → project-management.module-FL2RWRKY.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-G3PDOXVT.js.map → project-source-routed.module-N76TUCOI.js.map} +0 -0
- /package/client-dist/{scheduler.module-Q3SJSC4T.js.map → scheduler.module-XYY22JMT.js.map} +0 -0
- /package/client-dist/{session.module-U2IP5J2B.js.map → session.module-N2DJOIHD.js.map} +0 -0
- /package/client-dist/{set.module-GTMFMOEB.js.map → set.module-XW5X3ZLY.js.map} +0 -0
- /package/client-dist/{setup.module-4TXUKI27.js.map → setup.module-B4QMBFKV.js.map} +0 -0
- /package/client-dist/{terminals.module-W3ZC3EEB.js.map → terminals.module-24K6SSFO.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-WV4DMW3S.js.map → voice-notes-poc.module-IW7VPFDD.js.map} +0 -0
- /package/client-dist/{wfs.module-GIXOJHRJ.js.map → wfs.module-S2SMAT5Z.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["src/app/_modules/external-sessions/_modules/claude-code/_services/cc-account.api-service.ts", "src/app/_modules/external-sessions/_modules/claude-code/_services/cc-account.data-service.ts", "src/app/_modules/external-sessions/_modules/claude-code/_collections/cc-account-usage-chart.util.ts", "src/app/_modules/external-sessions/_modules/claude-code/_components/cc-account-usage-view/cc-account-usage-view.component.ts", "src/app/_modules/external-sessions/_modules/claude-code/_components/cc-account-usage-view/cc-account-usage-view.component.html"],
|
|
4
|
+
"sourcesContent": ["import { inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { firstValueFrom } from 'rxjs';\n\nimport { CC_Account_Response } from '../_models/interfaces/cc-account/cc-account.interface';\nimport { CC_AccountUsageEvent_Response } from '../_models/interfaces/cc-account/cc-account-usage-event.interface';\nimport {\n CC_AccountInstanceMapping_Response,\n CC_AccountUsageState_Response,\n} from '../_models/interfaces/cc-account/cc-account-usage-state.interface';\nimport { CC_AccountIdentityList_Response } from '../_models/interfaces/cc-account/cc-account-identity-group.interface';\nimport { environment } from '../../../../../../environments/environment';\n\n/**\n * CC Account REST API service (REQ-CC-USAGE-DASHBOARD-001 Slice 5 cycle 856).\n *\n * HTTP-bridge a server-oldali `CC_Account_Controller` endpoint-jaihoz\n * (`/cc-account/*`). Egyszerű thin api-service mintán a\n * `cc-cci-instance-data.api-service.ts`-hez hasonlóan: minden hívás\n * `firstValueFrom`-mal Promise-ra fordított `HttpClient` get/post/patch.\n *\n * A Slice 5+ Dashboard komponensek és a Slice 6 instance-mapping view\n * data-service-en keresztül használja.\n */\n@Injectable({ providedIn: 'root' })\nexport class CC_Account_ApiService {\n\n private readonly baseUrl: string = `${environment.api.baseUrl}/cc-account`;\n\n private readonly http: HttpClient = inject(HttpClient);\n\n /** GET /cc-account/list — cross-instance account-lista. */\n listAccounts(): Promise<{ items: CC_Account_Response[] }> {\n return firstValueFrom(\n this.http.get<{ items: CC_Account_Response[] }>(`${this.baseUrl}/list`),\n );\n }\n\n /**\n * GET /cc-account/list-by-identity — REQ-CC-ACCOUNT-IDENTITY-EMAIL-001 Slice 3\n * part-1 (cycle 890): account-lista accountIdentity szerint csoportosítva.\n * A Dashboard ezt használja a per-email view-hoz (a token-rotation\n * duplikátumok egyetlen kártyán).\n */\n listAccountsByIdentity(): Promise<CC_AccountIdentityList_Response> {\n return firstValueFrom(\n this.http.get<CC_AccountIdentityList_Response>(`${this.baseUrl}/list-by-identity`),\n );\n }\n\n /**\n * POST /cc-account/backfill-identity — REQ-CC-ACCOUNT-IDENTITY-EMAIL-001\n * Slice 2 (cycle 889): manuális identity-backfill trigger.\n */\n backfillIdentity(): Promise<{\n totalScanned: number;\n alreadyPopulated: number;\n populated: number;\n skippedMissingFile: number;\n skippedInvalidPayload: number;\n failures: number;\n }> {\n return firstValueFrom(\n this.http.post<{\n totalScanned: number;\n alreadyPopulated: number;\n populated: number;\n skippedMissingFile: number;\n skippedInvalidPayload: number;\n failures: number;\n }>(`${this.baseUrl}/backfill-identity`, {}),\n );\n }\n\n /**\n * GET /cc-account/identity-audit — REQ-CC-ACCOUNT-IDENTITY-EMAIL-001 Slice 2\n * (cycle 889): identity-duplikáció audit.\n */\n auditIdentityDuplicates(): Promise<{\n duplicateGroups: { accountIdentity: string; accountKeys: string[]; count: number }[];\n totalDuplicates: number;\n uniqueIdentities: number;\n recordsWithoutIdentity: number;\n }> {\n return firstValueFrom(\n this.http.get<{\n duplicateGroups: { accountIdentity: string; accountKeys: string[]; count: number }[];\n totalDuplicates: number;\n uniqueIdentities: number;\n recordsWithoutIdentity: number;\n }>(`${this.baseUrl}/identity-audit`),\n );\n }\n\n /** POST /cc-account/refresh — a hívó CCAP instance-en credential-discovery újrafutás. */\n refreshLocalAccounts(): Promise<{ refreshedKeys: string[]; scannedPaths: number }> {\n return firstValueFrom(\n this.http.post<{ refreshedKeys: string[]; scannedPaths: number }>(\n `${this.baseUrl}/refresh`,\n {},\n ),\n );\n }\n\n /**\n * GET /cc-account/instance-mapping — Slice 4 cross-instance aggregate.\n * Minden ismert CCAP instance group-by lastObservedByCcapId — melyik account-okat\n * látta utoljára.\n */\n getInstanceMapping(): Promise<CC_AccountInstanceMapping_Response> {\n return firstValueFrom(\n this.http.get<CC_AccountInstanceMapping_Response>(`${this.baseUrl}/instance-mapping`),\n );\n }\n\n /** GET /cc-account/:accountKey — egy account részletek. */\n getAccount(accountKey: string): Promise<CC_Account_Response> {\n return firstValueFrom(\n this.http.get<CC_Account_Response>(`${this.baseUrl}/${accountKey}`),\n );\n }\n\n /**\n * GET /cc-account/:accountKey/usage — Slice 3 per-account usage state-ek.\n * 0..5 rekord (egy windowType-onként).\n */\n getAccountUsage(accountKey: string): Promise<{ items: CC_AccountUsageState_Response[] }> {\n return firstValueFrom(\n this.http.get<{ items: CC_AccountUsageState_Response[] }>(\n `${this.baseUrl}/${accountKey}/usage`,\n ),\n );\n }\n\n /**\n * GET /cc-account/:accountKey/usage-history — történeti event-lista\n * (REQ-CC-USAGE-DASHBOARD-001 cycle 879). Append-only timeline; opcionális\n * windowType + idő-tartomány szűrők (`fromMs`, `toMs`).\n */\n getAccountUsageHistory(params: {\n accountKey: string;\n windowType?: string;\n fromMs?: number;\n toMs?: number;\n }): Promise<{ items: CC_AccountUsageEvent_Response[] }> {\n const query: string[] = [];\n if (params.windowType != null && params.windowType !== '') {\n query.push(`windowType=${encodeURIComponent(params.windowType)}`);\n }\n if (params.fromMs != null) {\n query.push(`fromMs=${params.fromMs}`);\n }\n if (params.toMs != null) {\n query.push(`toMs=${params.toMs}`);\n }\n const qs: string = query.length > 0 ? `?${query.join('&')}` : '';\n return firstValueFrom(\n this.http.get<{ items: CC_AccountUsageEvent_Response[] }>(\n `${this.baseUrl}/${params.accountKey}/usage-history${qs}`,\n ),\n );\n }\n\n /**\n * POST /cc-account/:accountKey/refresh-usage — aktív Anthropic usage-pull\n * (REQ-CC-USAGE-DASHBOARD-001 cycle 873). A server credential-fájl + Bearer-rel\n * hív, az 5 window state-et upsert-eli, profile-mezőket (email/orgId/planTier)\n * a CC_Account-ba updateli, socket-broadcast.\n */\n refreshAccountUsage(accountKey: string): Promise<{\n status: 'ok' | 'not-found' | 'credential-unreadable' | 'no-token' | 'http-error' | 'network-error' | string;\n windowsUpserted: number;\n email: string | null;\n /** Cycle 874 diag: rossz HTTP-státusz a probe-tól (401, 404 stb.). */\n httpStatus?: number;\n /** Cycle 874 diag: Anthropic-válasz első ~400 char-ja. */\n bodyHead?: string;\n /** Cycle 874 diag: a hívott URL. */\n attemptedUrl?: string;\n /** Cycle 874 diag: network-error üzenet. */\n networkMessage?: string;\n }> {\n return firstValueFrom(\n this.http.post<{\n status: string;\n windowsUpserted: number;\n email: string | null;\n httpStatus?: number;\n bodyHead?: string;\n attemptedUrl?: string;\n networkMessage?: string;\n }>(\n `${this.baseUrl}/${accountKey}/refresh-usage`,\n {},\n ),\n );\n }\n\n /**\n * PATCH /cc-account/:accountKey — user-editable mezők frissítése (cycle 876):\n * `displayName` és/vagy `email`. Mindkettő opcionális; legalább egy kell.\n * `email: null` (vagy üres string) → kitörli (clear). Server-side validáció:\n * displayName 200-char + control-char tiltás, email RFC alap-formátum + 320-char.\n */\n renameAccount(params: {\n accountKey: string;\n displayName?: string;\n email?: string | null;\n }): Promise<CC_Account_Response> {\n const body: Record<string, unknown> = {};\n if (params.displayName !== undefined) {\n body.displayName = params.displayName;\n }\n if (params.email !== undefined) {\n body.email = params.email;\n }\n return firstValueFrom(\n this.http.patch<CC_Account_Response>(\n `${this.baseUrl}/${params.accountKey}`,\n body,\n ),\n );\n }\n}\n", "import { inject, Injectable, NgZone, OnDestroy, signal } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { CCAP_Socket_ControlService } from '../../../../../_services/control-services/ccap-socket.control-service';\nimport { CCAP_GlobalError_ControlService } from '../../../../../_services/control-services/ccap-global-error.control-service';\nimport { CC_Account_ApiService } from './cc-account.api-service';\nimport { CC_Account_Response } from '../_models/interfaces/cc-account/cc-account.interface';\nimport { CC_AccountUsageEvent_Response } from '../_models/interfaces/cc-account/cc-account-usage-event.interface';\nimport {\n CC_AccountInstanceMapping_Response,\n CC_AccountUsageState_Response,\n} from '../_models/interfaces/cc-account/cc-account-usage-state.interface';\nimport {\n CC_AccountIdentityGroup_Response,\n} from '../_models/interfaces/cc-account/cc-account-identity-group.interface';\n\n/** Socket envelope shape — `CCAP_Socket_ControlService.event$` Subject közvetíti. */\ninterface SocketEnvelope_Interface {\n event: string;\n payload: Record<string, unknown>;\n}\n\n/** REQ-CC-USAGE-DASHBOARD-001 Slice 6 second-half: socket event nevek. */\nconst SOCKET_EVENT_CC_ACCOUNT_USAGE_UPDATE: string = 'cc:account-usage-update';\nconst SOCKET_EVENT_CC_ACCOUNT_LIST_UPDATE: string = 'cc:account-list-update';\n\n/**\n * CC Account Dashboard data service (REQ-CC-USAGE-DASHBOARD-001 Slice 5 cycle 857).\n *\n * SSOT a Slice 5+ Dashboard kliens-oldali state-jéhez. Signal-ek a komponensek\n * change-detection-jéhez (`accounts_$`, `accountUsageMap_$`, `instanceMapping_$`,\n * `isLoading_$`, `loadError_$`); async metódusok REST hívásokhoz a\n * `CC_Account_ApiService`-en át (cycle 856).\n *\n * NEM perzisztál (a backend DBNT a SSOT) — a kliens csak cache-eli a fetch-eket\n * a komponens élettartam alatt. Refresh: explicit user-action (`refreshAccounts`)\n * vagy szocket-event (Slice 6).\n */\n@Injectable({ providedIn: 'root' })\nexport class CC_Account_DataService implements OnDestroy {\n\n private readonly account_AS: CC_Account_ApiService = inject(CC_Account_ApiService);\n private readonly socket_CS: CCAP_Socket_ControlService = inject(CCAP_Socket_ControlService);\n private readonly globalError_CS: CCAP_GlobalError_ControlService = inject(CCAP_GlobalError_ControlService);\n private readonly ngZone: NgZone = inject(NgZone);\n\n /** Socket envelope subscription élettartam-kezelése. */\n private socketSubscription: Subscription | null = null;\n\n /** Cross-instance account-lista (a `listAccounts` REST eredménye). */\n readonly accounts_$ = signal<CC_Account_Response[]>([]);\n\n /**\n * Per-account usage state cache: `accountKey → usage-state[]` (5 windowType-onként\n * egy rekord max). A Slice 5 Dashboard account-card-ok ebből rendernek.\n */\n readonly accountUsageMap_$ = signal<Map<string, CC_AccountUsageState_Response[]>>(\n new Map(),\n );\n\n /** Cross-instance aggregate (Slice 4 instance-mapping endpoint cache). */\n readonly instanceMapping_$ = signal<CC_AccountInstanceMapping_Response | null>(null);\n\n /**\n * Per-account usage-history cache: `accountKey → event[]` (REQ-CC-USAGE-DASHBOARD-001\n * cycle 879). Append-only timeline a `ccap_cc_account_usage_event` collection-ből;\n * lazy-loaded a Dashboard expand-panel megnyitásakor.\n */\n readonly usageHistoryMap_$ = signal<Map<string, CC_AccountUsageEvent_Response[]>>(\n new Map(),\n );\n\n /**\n * REQ-CC-ACCOUNT-IDENTITY-EMAIL-001 Slice 3 part-1 (cycle 890): identity-\n * csoportosított account-lista — per-email view a Dashboard-on. A\n * `accounts_$` (raw rekordok, duplikátumokkal) MELLETT él; a Dashboard a\n * `identityGroups_$`-ot rendereli (egy kártya / identity), az `accounts_$`\n * audit / admin-célokra megmarad.\n */\n readonly identityGroups_$ = signal<CC_AccountIdentityGroup_Response[]>([]);\n\n /** Bármelyik load folyamatban-e (UI spinner-hez). */\n readonly isLoading_$ = signal<boolean>(false);\n\n /** Utolsó load hiba — null ha sikeres vagy nem futott. */\n readonly loadError_$ = signal<string | null>(null);\n\n /**\n * Bootstrap fetch: account-list + instance-mapping párhuzamosan, majd a\n * megismert account-okhoz az 5 windowType-os usage state-eket is lehúzzuk\n * (REQ-CC-USAGE-DASHBOARD-001 cycle 883). Ez biztosítja, hogy a Dashboard\n * megnyitásakor azonnal látszanak az utolsó perzisztált usage értékek —\n * nem kell auto-pull socket-eventre vagy manuális Pull-clickre várni.\n */\n async loadDashboardBootstrap(): Promise<void> {\n this.isLoading_$.set(true);\n this.loadError_$.set(null);\n let didFail: boolean = false;\n try {\n // REQ-CC-ACCOUNT-IDENTITY-EMAIL-001 Slice 3 part-1 (cycle 890): a Dashboard\n // most az identity-group endpoint-ot is használja a per-email view-hoz.\n // Párhuzamosan az accountsList + instance-mapping + identity-groups.\n const [accountsResp, mappingResp, groupsResp] = await Promise.all([\n this.account_AS.listAccounts(),\n this.account_AS.getInstanceMapping(),\n this.account_AS.listAccountsByIdentity(),\n ]);\n this.accounts_$.set(accountsResp.items);\n this.instanceMapping_$.set(mappingResp);\n this.identityGroups_$.set(groupsResp.groups);\n // A `accountUsageMap_$` cache-be a group merged-usage-eket is beleírjuk\n // — a `<app-cc-account-usage-view [accountKey]>` komponens (per identity-group\n // a primary.accountKey-vel) ezt olvassa.\n const nextMap: Map<string, CC_AccountUsageState_Response[]> = new Map(this.accountUsageMap_$());\n for (const group of groupsResp.groups) {\n nextMap.set(group.primary.accountKey, group.mergedUsage);\n }\n this.accountUsageMap_$.set(nextMap);\n } catch (err: unknown) {\n didFail = true;\n this.loadError_$.set(this.errorMessageOf(err));\n this.globalError_CS.showError(err, 'cc-account-dashboard-bootstrap');\n } finally {\n this.isLoading_$.set(false);\n // didFail kifejezetten a TS-flag, nem inert: a finally után további\n // tisztító logikát itt nem futtatunk.\n void didFail;\n }\n }\n\n /**\n * REQ-CC-ACCOUNT-IDENTITY-EMAIL-001 Slice 3 part-1 (cycle 890): csak az\n * identity-groups refetch-je (a refresh-after-pull / list-update szocketnél).\n */\n async loadIdentityGroups(): Promise<void> {\n try {\n const resp = await this.account_AS.listAccountsByIdentity();\n this.identityGroups_$.set(resp.groups);\n // Merged-usage cache update is.\n const nextMap: Map<string, CC_AccountUsageState_Response[]> = new Map(this.accountUsageMap_$());\n for (const group of resp.groups) {\n nextMap.set(group.primary.accountKey, group.mergedUsage);\n }\n this.accountUsageMap_$.set(nextMap);\n } catch (err: unknown) {\n this.loadError_$.set(this.errorMessageOf(err));\n this.globalError_CS.showError(err, 'cc-account-load-identity-groups');\n }\n }\n\n /** Csak az account-listát tölti újra (kis fetch). */\n async loadAccounts(): Promise<void> {\n try {\n const resp = await this.account_AS.listAccounts();\n this.accounts_$.set(resp.items);\n } catch (err: unknown) {\n this.loadError_$.set(this.errorMessageOf(err));\n this.globalError_CS.showError(err, 'cc-account-load-accounts');\n }\n }\n\n /**\n * Per-account usage-state fetch + cache-be írás. A Slice 5 account-card\n * komponens ezt hívja a saját accountKey-jére.\n */\n async loadAccountUsage(accountKey: string): Promise<void> {\n try {\n const resp = await this.account_AS.getAccountUsage(accountKey);\n const next: Map<string, CC_AccountUsageState_Response[]> = new Map(this.accountUsageMap_$());\n next.set(accountKey, resp.items);\n this.accountUsageMap_$.set(next);\n } catch (err: unknown) {\n this.loadError_$.set(this.errorMessageOf(err));\n this.globalError_CS.showError(err, `cc-account-load-usage[${accountKey}]`);\n }\n }\n\n /**\n * Per-account usage-history fetch + cache-be írás (REQ-CC-USAGE-DASHBOARD-001\n * cycle 879). Lazy: a Dashboard expand-panel megnyitásakor hívjuk. Opcionális\n * windowType + idő-tartomány szűrőkkel.\n */\n async loadAccountUsageHistory(params: {\n accountKey: string;\n windowType?: string;\n fromMs?: number;\n toMs?: number;\n }): Promise<void> {\n try {\n const resp = await this.account_AS.getAccountUsageHistory(params);\n const next: Map<string, CC_AccountUsageEvent_Response[]> = new Map(this.usageHistoryMap_$());\n next.set(params.accountKey, resp.items);\n this.usageHistoryMap_$.set(next);\n } catch (err: unknown) {\n this.loadError_$.set(this.errorMessageOf(err));\n this.globalError_CS.showError(err, `cc-account-load-history[${params.accountKey}]`);\n }\n }\n\n /** Cross-instance aggregate refetch (Slice 4 — Slice 6 view bootstrap-jánál). */\n async loadInstanceMapping(): Promise<void> {\n try {\n const resp = await this.account_AS.getInstanceMapping();\n this.instanceMapping_$.set(resp);\n } catch (err: unknown) {\n this.loadError_$.set(this.errorMessageOf(err));\n this.globalError_CS.showError(err, 'cc-account-load-instance-mapping');\n }\n }\n\n /**\n * Explicit user-trigger: a hívó CCAP instance-en credential-discovery újrafutás\n * + account-lista refetch. POST /refresh után automatikusan listAccounts-szal frissít.\n */\n async refreshAccounts(): Promise<{ refreshedKeys: string[]; scannedPaths: number }> {\n this.isLoading_$.set(true);\n this.loadError_$.set(null);\n try {\n const refreshResult = await this.account_AS.refreshLocalAccounts();\n await this.loadAccounts();\n await this.loadIdentityGroups();\n return refreshResult;\n } catch (err: unknown) {\n this.loadError_$.set(this.errorMessageOf(err));\n this.globalError_CS.showError(err, 'cc-account-refresh-accounts');\n return { refreshedKeys: [], scannedPaths: 0 };\n } finally {\n this.isLoading_$.set(false);\n }\n }\n\n /**\n * Aktív usage-pull egy adott account-ra (REQ-CC-USAGE-DASHBOARD-001 cycle 873).\n * A server `POST /cc-account/:accountKey/refresh-usage`-t hívja, ami az\n * Anthropic `/api/oauth/usage` endpoint-ját triggeri Bearer-rel. A pull\n * eredménye automatikusan jön socket-eventként (`cc:account-usage-update`),\n * de a sikeres POST után explicit re-fetch-eljük is az adott account usage-ét\n * + a teljes account-listát (a profile-mezők is updatelődtek).\n */\n async refreshAccountUsage(accountKey: string): Promise<{ status: string; windowsUpserted: number; email: string | null }> {\n try {\n const result = await this.account_AS.refreshAccountUsage(accountKey);\n // REQ-CC-USAGE-DASHBOARD-001 cycle 893: result-level error surface a globális\n // error-display-be. A server 200-as response-szal tér vissza non-ok status-szal\n // (probe-failed scenarios), így ezt az interceptor NEM tudja elkapni.\n if (result.status !== 'ok') {\n this.surfacePullError({\n source: 'cc-account-pull',\n accountKey: accountKey,\n status: result.status,\n httpStatus: result.httpStatus,\n bodyHead: result.bodyHead,\n attemptedUrl: result.attemptedUrl,\n networkMessage: result.networkMessage,\n });\n }\n // Re-fetch a friss state-et — bár a socket-event is jön, a cache-frissítés\n // garantált a user-action végén.\n await this.loadAccountUsage(accountKey);\n await this.loadAccounts();\n // Identity-grouped lista is frissítendő (a primary key megváltozhat token-rotation-nél).\n await this.loadIdentityGroups();\n return result;\n } catch (err: unknown) {\n this.loadError_$.set(this.errorMessageOf(err));\n this.globalError_CS.showError(err, `cc-account-pull[${accountKey}]`);\n return { status: 'error', windowsUpserted: 0, email: null };\n }\n }\n\n /**\n * Cycle 893: pull-result NEM-OK status → human-readable error-object construction\n * + globalError_CS.showError() hívás. A user a részletes diagnosztikát látja:\n * status + httpStatus + attemptedUrl + bodyHead (Anthropic-válasz részlete) +\n * networkMessage. Ezt ki tudja másolni és visszajelezni.\n */\n private surfacePullError(params: {\n source: string;\n accountKey: string;\n status: string;\n httpStatus?: number;\n bodyHead?: string;\n attemptedUrl?: string;\n networkMessage?: string;\n }): void {\n const lines: string[] = [];\n lines.push(`CC Account pull failed (status=${params.status})`);\n lines.push(`accountKey: ${params.accountKey}`);\n if (params.httpStatus != null) {\n lines.push(`httpStatus: ${params.httpStatus}`);\n }\n if (params.attemptedUrl != null && params.attemptedUrl !== '') {\n lines.push(`attemptedUrl: ${params.attemptedUrl}`);\n }\n if (params.networkMessage != null && params.networkMessage !== '') {\n lines.push(`networkMessage: ${params.networkMessage}`);\n }\n if (params.bodyHead != null && params.bodyHead !== '') {\n lines.push(`responseBodyHead: ${params.bodyHead}`);\n }\n const message: string = lines.join('\\n');\n const err: Error & { errorDetails?: Record<string, unknown> } = new Error(message);\n err.errorDetails = {\n message: message,\n errorCode: `CCAP-CC-ACCOUNT-PULL-${params.status.toUpperCase()}`,\n additionalContent: params as unknown as Record<string, unknown>,\n };\n this.loadError_$.set(message);\n this.globalError_CS.showError(err, params.source);\n }\n\n /**\n * Display-name átírása + a cache-elt account-lista frissítése (a megfelelő\n * elem displayName mezőjének felülírása, signal-update).\n */\n async renameAccount(params: {\n accountKey: string;\n displayName?: string;\n email?: string | null;\n }): Promise<void> {\n try {\n const updated = await this.account_AS.renameAccount(params);\n const next: CC_Account_Response[] = this.accounts_$().map(\n (a): CC_Account_Response => (a.accountKey === params.accountKey ? updated : a),\n );\n this.accounts_$.set(next);\n // Identity-grouped lista is frissítendő (a primary kártya neve / email-je megváltozhat).\n await this.loadIdentityGroups();\n } catch (err: unknown) {\n this.loadError_$.set(this.errorMessageOf(err));\n this.globalError_CS.showError(err, `cc-account-rename[${params.accountKey}]`);\n }\n }\n\n /**\n * Socket subscription init (REQ-CC-USAGE-DASHBOARD-001 Slice 6 second-half cycle 871).\n * A `CCAP_Socket_ControlService.event$` Subject minden socket-event-et közvetít\n * envelope-formában (event-name + payload). Mi az `cc:account-usage-update`\n * és `cc:account-list-update` event-ekre szűrünk és a megfelelő signal-eket frissítjük.\n *\n * Late subscription: a Dashboard component `ngOnInit`-jéből hívjuk (vagy explicit\n * service-init-kor), hogy ne legyen subscription-overhead, ha a Dashboard sose\n * nyílik meg.\n */\n startLiveUpdates(): void {\n if (this.socketSubscription != null) {\n return;\n }\n this.socketSubscription = this.socket_CS.event$.subscribe(\n (envelope: SocketEnvelope_Interface): void => {\n this.ngZone.run((): void => {\n if (envelope.event === SOCKET_EVENT_CC_ACCOUNT_USAGE_UPDATE) {\n this.handleAccountUsageUpdate(envelope.payload);\n } else if (envelope.event === SOCKET_EVENT_CC_ACCOUNT_LIST_UPDATE) {\n this.handleAccountListUpdate(envelope.payload);\n }\n });\n },\n );\n }\n\n /** Socket subscription teardown (component destroy / explicit stop). */\n stopLiveUpdates(): void {\n if (this.socketSubscription != null) {\n this.socketSubscription.unsubscribe();\n this.socketSubscription = null;\n }\n }\n\n ngOnDestroy(): void {\n this.stopLiveUpdates();\n }\n\n /**\n * Per-account usage state real-time frissítés. A server `persistAccountUsageState`\n * upsert sikere után emit-elt event-ből építjük újra a `accountUsageMap_$`\n * megfelelő `accountKey` bejegyzését. Ha a windowType már szerepel, lecseréljük;\n * különben hozzáadjuk.\n */\n private handleAccountUsageUpdate(payload: Record<string, unknown>): void {\n const accountKey: unknown = payload.accountKey;\n const windowType: unknown = payload.windowType;\n if (typeof accountKey !== 'string' || accountKey === '' || typeof windowType !== 'string') {\n return;\n }\n const newItem: CC_AccountUsageState_Response = {\n accountKey: accountKey,\n windowType: windowType,\n utilization: typeof payload.utilization === 'number' ? payload.utilization : undefined,\n resetsAtMs: typeof payload.resetsAtMs === 'number' ? payload.resetsAtMs : undefined,\n lastObservedStatus: typeof payload.lastObservedStatus === 'string' ? payload.lastObservedStatus : undefined,\n observedAt: typeof payload.observedAt === 'string' ? payload.observedAt : undefined,\n lastObservedByCcapId: typeof payload.lastObservedByCcapId === 'string' ? payload.lastObservedByCcapId : undefined,\n lastObservedBySessionId: typeof payload.lastObservedBySessionId === 'string' ? payload.lastObservedBySessionId : undefined,\n };\n\n const next: Map<string, CC_AccountUsageState_Response[]> = new Map(this.accountUsageMap_$());\n const existing: CC_AccountUsageState_Response[] = next.get(accountKey) ?? [];\n const replaced: CC_AccountUsageState_Response[] = existing.filter(\n (item: CC_AccountUsageState_Response): boolean => item.windowType !== windowType,\n );\n replaced.push(newItem);\n next.set(accountKey, replaced);\n this.accountUsageMap_$.set(next);\n }\n\n /**\n * Account-pool változás (új account felfedezve, displayName-átírás): a\n * legegyszerűbb és legbiztonságosabb módon `loadAccounts()` re-fetch-csel\n * frissítjük a `accounts_$` signal-t. Cross-instance change-ek esetén is\n * ez a megközelítés robosztus (a DB SSOT-ből minden instance ugyanazt látja).\n */\n private handleAccountListUpdate(_payload: Record<string, unknown>): void {\n void this.loadAccounts();\n // REQ-CC-ACCOUNT-IDENTITY-EMAIL-001 Slice 3 part-1 (cycle 890): a Dashboard\n // identity-groups view is frissül a socket-eventre — egyébként új account\n // (vagy backfill utáni identity-update) nem jutna el a Dashboard kártyáira.\n void this.loadIdentityGroups();\n }\n\n /** Hibaüzenet kinyerés tipikus shape-ekből (HttpErrorResponse / Error / unknown). */\n private errorMessageOf(err: unknown): string {\n if (err instanceof Error) {\n return err.message;\n }\n if (typeof err === 'object' && err !== null) {\n const rec: Record<string, unknown> = err as Record<string, unknown>;\n if (typeof rec.message === 'string') {\n return rec.message;\n }\n }\n return String(err);\n }\n}\n", "import { CC_AccountUsageEvent_Response } from '../_models/interfaces/cc-account/cc-account-usage-event.interface';\nimport {\n CC_AccountUsageChartLine_Interface,\n CC_AccountUsageChart_Result,\n} from '../_models/interfaces/cc-account/cc-account-usage-chart.interface';\n\n/**\n * Account usage-history → SVG chart-line projektor (REQ-CC-USAGE-DASHBOARD-001\n * cycle 884). Az event-eket windowType-onként szétválogatja, observedAt szerint\n * növekvő sorrendbe rendezi, majd a `(t, utilization)` párokat egy 100×40 unit-os\n * viewBox-ba projektálja (x: 0..100 idő-tengely, y: 0=tele/100% .. 40=üres/0%).\n *\n * A 5 fix windowType-onkénti szín stabil (a Dashboard-kártyák és a Session-info\n * popover is ugyanezt használja, mint vizuális SSOT).\n */\nexport class CC_AccountUsageChart_Util {\n\n static readonly CHART_WIDTH: number = 100;\n static readonly CHART_HEIGHT: number = 40;\n\n /** Fix windowType-onkénti szín-paletta (stroke hex). */\n static readonly COLOR_MAP: Record<string, string> = {\n five_hour: '#10b981',\n seven_day: '#06b6d4',\n seven_day_opus: '#a855f7',\n seven_day_sonnet: '#f59e0b',\n extra_usage: '#f43f5e',\n };\n\n static readonly WINDOW_LABEL_MAP: Record<string, string> = {\n five_hour: '5h',\n seven_day: 'Weekly',\n seven_day_opus: 'Opus',\n seven_day_sonnet: 'Sonnet',\n extra_usage: 'Extra',\n };\n\n /** Fix windowType render-sorrend (stabil legend-sorrend). */\n static readonly WINDOW_ORDER: string[] = [\n 'five_hour',\n 'seven_day',\n 'seven_day_opus',\n 'seven_day_sonnet',\n 'extra_usage',\n ];\n\n /**\n * Account-history events → chart-line projektálás.\n * Üres input → üres result (`hasAnyData=false`); a hívó tudja kezelni az\n * \"no data yet\" placeholder render-t.\n */\n static buildChart(events: CC_AccountUsageEvent_Response[]): CC_AccountUsageChart_Result {\n // Idő-tartomány + érvényes pontok detektálása egy menetben.\n let minT: number = Number.POSITIVE_INFINITY;\n let maxT: number = Number.NEGATIVE_INFINITY;\n let validCount: number = 0;\n for (const e of events) {\n if (typeof e.observedAt !== 'string' || e.observedAt === '') {\n continue;\n }\n if (typeof e.utilization !== 'number' || !isFinite(e.utilization)) {\n continue;\n }\n const t: number = Date.parse(e.observedAt);\n if (!isFinite(t)) {\n continue;\n }\n if (t < minT) {\n minT = t;\n }\n if (t > maxT) {\n maxT = t;\n }\n validCount++;\n }\n\n if (validCount === 0) {\n return {\n lines: CC_AccountUsageChart_Util.WINDOW_ORDER.map(\n (wt: string): CC_AccountUsageChartLine_Interface => ({\n windowType: wt,\n label: CC_AccountUsageChart_Util.WINDOW_LABEL_MAP[wt] ?? wt,\n colorHex: CC_AccountUsageChart_Util.COLOR_MAP[wt] ?? '#9ca3af',\n pathPoints: '',\n hasData: false,\n pointCount: 0,\n lastX: 0,\n lastY: 0,\n }),\n ),\n hasAnyData: false,\n minTimeMs: 0,\n maxTimeMs: 0,\n };\n }\n\n // Degenerate eset: minden esemény ugyanabban a ms-ben — expand-eljük 1h-vel,\n // hogy a vízszintes vonalak ne 0-szélességűek legyenek.\n if (maxT - minT < 1) {\n maxT = minT + 3_600_000;\n }\n const range: number = maxT - minT;\n\n const lines: CC_AccountUsageChartLine_Interface[] =\n CC_AccountUsageChart_Util.WINDOW_ORDER.map((wt: string): CC_AccountUsageChartLine_Interface => {\n // windowType-onkénti gyűjtés + növekvő idő szerinti rendezés.\n const points: { t: number; u: number }[] = [];\n for (const e of events) {\n if (e.windowType !== wt) {\n continue;\n }\n if (typeof e.observedAt !== 'string' || e.observedAt === '') {\n continue;\n }\n if (typeof e.utilization !== 'number' || !isFinite(e.utilization)) {\n continue;\n }\n const t: number = Date.parse(e.observedAt);\n if (!isFinite(t)) {\n continue;\n }\n points.push({ t: t, u: Math.max(0, Math.min(1, e.utilization)) });\n }\n points.sort((a: { t: number; u: number }, b: { t: number; u: number }): number => a.t - b.t);\n\n const coords: string[] = [];\n let lastX: number = 0;\n let lastY: number = 0;\n for (const p of points) {\n const x: number = ((p.t - minT) / range) * CC_AccountUsageChart_Util.CHART_WIDTH;\n const y: number = CC_AccountUsageChart_Util.CHART_HEIGHT\n - (p.u * CC_AccountUsageChart_Util.CHART_HEIGHT);\n coords.push(`${x.toFixed(2)},${y.toFixed(2)}`);\n lastX = x;\n lastY = y;\n }\n\n return {\n windowType: wt,\n label: CC_AccountUsageChart_Util.WINDOW_LABEL_MAP[wt] ?? wt,\n colorHex: CC_AccountUsageChart_Util.COLOR_MAP[wt] ?? '#9ca3af',\n pathPoints: coords.join(' '),\n hasData: coords.length > 0,\n pointCount: coords.length,\n lastX: lastX,\n lastY: lastY,\n };\n });\n\n return {\n lines: lines,\n hasAnyData: lines.some((l: CC_AccountUsageChartLine_Interface): boolean => l.hasData),\n minTimeMs: minT,\n maxTimeMs: maxT,\n };\n }\n}\n", "import { CommonModule } from '@angular/common';\nimport { Component, computed, effect, inject, Input, signal, Signal } from '@angular/core';\n\nimport { CC_Account_DataService } from '../../_services/cc-account.data-service';\nimport { CC_AccountUsageState_Response } from '../../_models/interfaces/cc-account/cc-account-usage-state.interface';\nimport { CC_AccountUsageChart_Result } from '../../_models/interfaces/cc-account/cc-account-usage-chart.interface';\nimport { CC_AccountUsageChart_Util } from '../../_collections/cc-account-usage-chart.util';\n\n/**\n * CC Account Usage View — megosztott komponens (REQ-CC-USAGE-DASHBOARD-001 cycle 885).\n *\n * Egy account `accountKey`-éhez tartozó 5 windowType-os usage státusz + opcionális\n * időbeli SVG-graph render. Több helyen használt:\n * - CC Usage Dashboard (account-cards) — `compact=false`, graph elérhető\n * - CC Session info-panel popover — `compact=true` szűk popover-hez\n * - bárhol ahol egy accountKey-hez kell mutatni a usage-snapshot-ot\n *\n * SSOT: a `CC_Account_DataService.accountUsageMap_$` és `usageHistoryMap_$` signal-okat\n * olvassa. Lazy-fetch saját maga: ha a state cache-ben még nincs, indítja a\n * `loadAccountUsage`-t. A history-fetch csak akkor fut, ha a graph megnyílik.\n */\n@Component({\n selector: 'app-cc-account-usage-view',\n standalone: true,\n imports: [CommonModule],\n templateUrl: './cc-account-usage-view.component.html',\n})\n/**\n * REQ-CC-USAGE-DASHBOARD-001 (cycle 885) — shared CC account-usage megjelenítő.\n * Egyetlen komponens a per-account utilization graph + status egységes renderéhez,\n * amit a Dashboard és a CC Session info-panel egyaránt használ (graph + status\n * SSOT). Csak Render-only: state-et a `CC_Account_DataService`-ből olvas.\n */\nexport class CC_AccountUsageView_Component {\n\n private readonly account_DS: CC_Account_DataService = inject(CC_Account_DataService);\n\n /** Account stable kulcs — kötelező input. */\n @Input({ required: true }) accountKey: string = '';\n\n /** Kompakt layout (kisebb fontok, szűkebb padding) — popover-be javasolt. */\n @Input() compact: boolean = false;\n\n /** Igaz → a graph toggle gomb meg fog jelenni (default: true). */\n @Input() showGraphToggle: boolean = true;\n\n /** Igaz → a graph-panel induláskor nyitva (default: false → lezárt). */\n @Input() initiallyOpenGraph: boolean = false;\n\n /** Lokális UI state: a graph-panel nyitva/zárva. */\n readonly isGraphOpen_$ = signal<boolean>(false);\n\n /** SVG chart-data builder az adott account-history cache-éből. */\n readonly chart_$: Signal<CC_AccountUsageChart_Result> = computed(\n (): CC_AccountUsageChart_Result => {\n return CC_AccountUsageChart_Util.buildChart(\n this.account_DS.usageHistoryMap_$().get(this.accountKey) ?? [],\n );\n },\n );\n\n /** SVG viewBox literal (a template használja). */\n readonly chartViewBox: string = `0 0 ${CC_AccountUsageChart_Util.CHART_WIDTH} ${CC_AccountUsageChart_Util.CHART_HEIGHT}`;\n readonly chartW: number = CC_AccountUsageChart_Util.CHART_WIDTH;\n readonly chartH: number = CC_AccountUsageChart_Util.CHART_HEIGHT;\n readonly chartMidY: number = CC_AccountUsageChart_Util.CHART_HEIGHT / 2;\n\n /**\n * Reaktív lazy-fetch: ha az accountKey változik vagy a cache üres, lekérjük\n * a perzisztált usage state-et. Ez azoknál a használati helyeknél kritikus\n * (popover, CC sessions dashboard), ahol a Dashboard-bootstrap NEM futott.\n */\n private readonly usageEffect = effect((): void => {\n const key: string = this.accountKey;\n if (!key) {\n return;\n }\n if (!this.account_DS.accountUsageMap_$().has(key)) {\n void this.account_DS.loadAccountUsage(key);\n }\n });\n\n /** initiallyOpenGraph input alkalmazása az isGraphOpen_$-ra. */\n private readonly initialOpenEffect = effect((): void => {\n if (this.initiallyOpenGraph) {\n this.isGraphOpen_$.set(true);\n }\n });\n\n /** Graph-toggle handler — első megnyitás-kor history-fetch. */\n async handleToggleGraph(): Promise<void> {\n const next: boolean = !this.isGraphOpen_$();\n this.isGraphOpen_$.set(next);\n if (next && !this.account_DS.usageHistoryMap_$().has(this.accountKey)) {\n await this.account_DS.loadAccountUsageHistory({ accountKey: this.accountKey });\n }\n }\n\n /** Explicit refresh — history-fetch reload. */\n async handleRefreshGraph(): Promise<void> {\n await this.account_DS.loadAccountUsageHistory({ accountKey: this.accountKey });\n }\n\n /** Egy adott windowType state-jét adja vissza, vagy null. */\n usageItemOfWindow(windowType: string): CC_AccountUsageState_Response | null {\n const items: CC_AccountUsageState_Response[] = this.account_DS.accountUsageMap_$().get(this.accountKey) ?? [];\n for (const item of items) {\n if (item.windowType === windowType) {\n return item;\n }\n }\n return null;\n }\n\n /** True ha legalább egy windowType-ra van adat. */\n hasAnyUsageData(): boolean {\n const items: CC_AccountUsageState_Response[] = this.account_DS.accountUsageMap_$().get(this.accountKey) ?? [];\n return items.length > 0;\n }\n\n /** Window-typeName → emberi label (pure mapping). */\n windowLabelOf(windowType: string): string {\n switch (windowType) {\n case 'five_hour': return '5-hour session';\n case 'seven_day': return 'Weekly';\n case 'seven_day_opus': return 'Weekly · Opus';\n case 'seven_day_sonnet': return 'Weekly · Sonnet';\n case 'extra_usage': return 'Extra (pay-as-you-go)';\n default: return windowType;\n }\n }\n\n /** Utilization → progress-bar width (0..100%, 0 ha null). */\n utilizationPercent(utilization: number | undefined): number {\n if (utilization == null || !isFinite(utilization)) {\n return 0;\n }\n return Math.max(0, Math.min(100, Math.round(utilization * 100)));\n }\n\n /** Utilization fraction (0..1) → percent string '42%'. null → '—'. */\n formatUtilization(utilization: number | null | undefined): string {\n if (utilization == null) {\n return '—';\n }\n return `${Math.round(utilization * 100)}%`;\n }\n\n /** Progress-bar szín-osztály utilization alapján (zöld/sárga/piros). */\n utilizationBarColorClass(utilization: number | undefined): string {\n if (utilization == null || !isFinite(utilization)) {\n return 'bg-neutral-600';\n }\n if (utilization >= 0.85) {\n return 'bg-red-500';\n }\n if (utilization >= 0.5) {\n return 'bg-amber-500';\n }\n return 'bg-emerald-500';\n }\n\n /** Reset countdown — emberi olvasható ('2h 34m', '5d 1h', 'expired', '—'). */\n formatResetCountdown(resetsAtMs: number | undefined): string {\n if (resetsAtMs == null || !isFinite(resetsAtMs) || resetsAtMs <= 0) {\n return '—';\n }\n const diffMs: number = resetsAtMs - Date.now();\n if (diffMs <= 0) {\n return 'expired';\n }\n const totalMinutes: number = Math.floor(diffMs / 60_000);\n const days: number = Math.floor(totalMinutes / (60 * 24));\n const hours: number = Math.floor((totalMinutes % (60 * 24)) / 60);\n const minutes: number = totalMinutes % 60;\n if (days > 0) {\n return `${days}d ${hours}h`;\n }\n if (hours > 0) {\n return `${hours}h ${minutes}m`;\n }\n return `${minutes}m`;\n }\n}\n", "<!-- CC Account Usage View — megosztott komponens (cycle 885).\n A 5 usage-sor mindig látszik (placeholder ha üres), a graph opcionális toggle-able. -->\n<div class=\"flex flex-col\" [class.gap-1]=\"compact\" [class.gap-2]=\"!compact\">\n <!-- 5 usage-sor: a mindig-látható status block. -->\n <div [class.space-y-1]=\"compact\" [class.space-y-2]=\"!compact\">\n @for (windowType of ['five_hour', 'seven_day', 'seven_day_opus', 'seven_day_sonnet', 'extra_usage']; track windowType) {\n @let item = usageItemOfWindow(windowType);\n <div [class]=\"compact ? 'grid grid-cols-[90px_1fr_56px] items-center gap-2 text-[10px]' : 'grid grid-cols-[110px_1fr_64px] items-center gap-2 text-[11px]'\"\n [class.opacity-50]=\"!item\">\n <div class=\"text-neutral-300 font-medium truncate\" [title]=\"windowType\">\n {{ windowLabelOf(windowType) }}\n </div>\n <div class=\"flex items-center gap-2 min-w-0\">\n <div [class]=\"compact ? 'flex-1 h-1.5 bg-neutral-800 rounded-full overflow-hidden' : 'flex-1 h-2 bg-neutral-800 rounded-full overflow-hidden'\">\n @if (item) {\n <div [class]=\"'h-full transition-all ' + utilizationBarColorClass(item.utilization)\"\n [style.width.%]=\"utilizationPercent(item.utilization)\"></div>\n }\n </div>\n <span class=\"font-mono text-neutral-200 text-right shrink-0\"\n [class]=\"compact ? 'w-8 text-[10px]' : 'w-9'\">\n {{ formatUtilization(item?.utilization ?? null) }}\n </span>\n </div>\n <div class=\"font-mono text-neutral-500 text-right text-[10px] truncate\"\n [title]=\"'Resets in ' + formatResetCountdown(item?.resetsAtMs)\">\n {{ formatResetCountdown(item?.resetsAtMs) }}\n </div>\n </div>\n }\n </div>\n\n @if (!hasAnyUsageData()) {\n <div class=\"text-[10px] text-neutral-500 italic pt-1 border-t border-neutral-800/40\">\n No data yet — click <strong class=\"text-neutral-400\">Pull</strong> or wait for the next rate-limit event.\n </div>\n }\n\n <!-- Graph toggle + SVG line-chart (cycle 884 portolva ide). -->\n @if (showGraphToggle) {\n <div class=\"border-t border-neutral-800/40 pt-2\">\n <button\n type=\"button\"\n class=\"text-[11px] text-neutral-400 hover:text-neonCyan flex items-center gap-1 transition-colors\"\n (click)=\"handleToggleGraph()\"\n [title]=\"isGraphOpen_$() ? 'Hide usage graph' : 'Show usage graph (utilization over time per window)'\"\n >\n <svg class=\"w-3 h-3 transition-transform\"\n [class.rotate-90]=\"isGraphOpen_$()\"\n fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M9 5l7 7-7 7\"/>\n </svg>\n 📈 {{ isGraphOpen_$() ? 'Hide' : 'Show' }} graph\n </button>\n\n @if (isGraphOpen_$()) {\n @let chart = chart_$();\n <div class=\"mt-2 rounded-md border border-neutral-800 bg-neutral-950/40 p-2\">\n @if (!chart.hasAnyData) {\n <div class=\"text-[11px] text-neutral-500 italic px-2 py-3 text-center\">\n No graph data yet — pull usage or wait for a CC session rate-limit event.\n </div>\n } @else {\n <div class=\"relative w-full\">\n <svg [attr.viewBox]=\"chartViewBox\" preserveAspectRatio=\"none\"\n class=\"w-full block\"\n [class.h-24]=\"compact\"\n [class.h-32]=\"!compact\">\n <!-- Háttér + 0%, 50%, 100% referencia-vonalak. -->\n <line x1=\"0\" [attr.y1]=\"chartH\" [attr.x2]=\"chartW\" [attr.y2]=\"chartH\"\n stroke=\"#3f3f46\" stroke-width=\"0.3\"/>\n <line x1=\"0\" [attr.y1]=\"chartMidY\" [attr.x2]=\"chartW\" [attr.y2]=\"chartMidY\"\n stroke=\"#3f3f46\" stroke-width=\"0.2\" stroke-dasharray=\"1,1\"/>\n <line x1=\"0\" y1=\"0\" [attr.x2]=\"chartW\" y2=\"0\"\n stroke=\"#3f3f46\" stroke-width=\"0.2\" stroke-dasharray=\"1,1\"/>\n @for (line of chart.lines; track line.windowType) {\n @if (line.hasData) {\n @if (line.pointCount === 1) {\n <circle [attr.cx]=\"line.lastX\" [attr.cy]=\"line.lastY\" r=\"0.8\" [attr.fill]=\"line.colorHex\"/>\n } @else {\n <polyline [attr.points]=\"line.pathPoints\"\n [attr.stroke]=\"line.colorHex\"\n fill=\"none\" stroke-width=\"0.6\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"\n vector-effect=\"non-scaling-stroke\"/>\n <circle [attr.cx]=\"line.lastX\" [attr.cy]=\"line.lastY\" r=\"0.6\" [attr.fill]=\"line.colorHex\"/>\n }\n }\n }\n </svg>\n <div class=\"absolute inset-y-0 left-0 flex flex-col justify-between text-[8px] text-neutral-600 font-mono pointer-events-none\">\n <span>100%</span>\n <span>50%</span>\n <span>0%</span>\n </div>\n </div>\n <div class=\"mt-2 flex flex-wrap items-center gap-2 text-[10px]\">\n @for (line of chart.lines; track line.windowType) {\n <div class=\"flex items-center gap-1\" [class.opacity-40]=\"!line.hasData\">\n <span class=\"inline-block w-2 h-2 rounded-sm\" [style.background-color]=\"line.colorHex\"></span>\n <span class=\"text-neutral-300\">{{ line.label }}</span>\n @if (line.hasData) {\n <span class=\"text-neutral-500\">·</span>\n <span class=\"font-mono text-neutral-400\">\n {{ ((chartH - line.lastY) / chartH * 100).toFixed(0) }}%\n </span>\n }\n </div>\n }\n </div>\n <div class=\"mt-1 flex items-center justify-between text-[9px] text-neutral-600\">\n @if (chart.minTimeMs) {\n <span>{{ chart.minTimeMs | date:'yyyy-MM-dd HH:mm' }}</span>\n } @else {\n <span>—</span>\n }\n <button\n type=\"button\"\n class=\"text-[10px] text-neutral-400 hover:text-neonCyan border border-neutral-700\n hover:border-neonCyan rounded px-1.5 py-0.5 transition-colors\"\n (click)=\"handleRefreshGraph()\"\n title=\"Re-fetch usage event history for this graph.\"\n >\n ↻ Refresh\n </button>\n @if (chart.maxTimeMs) {\n <span>{{ chart.maxTimeMs | date:'yyyy-MM-dd HH:mm' }}</span>\n } @else {\n <span>—</span>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n"],
|
|
5
|
+
"mappings": "+eA0BA,IAAaA,IAAqB,IAAA,CAA5B,MAAOA,CAAqB,CAEfC,QAAkB,GAAGC,GAAYC,IAAIF,OAAO,cAE5CG,KAAmBC,EAAOC,EAAU,EAGrDC,cAAY,CACV,OAAOC,EACL,KAAKJ,KAAKK,IAAsC,GAAG,KAAKR,OAAO,OAAO,CAAC,CAE3E,CAQAS,wBAAsB,CACpB,OAAOF,EACL,KAAKJ,KAAKK,IAAqC,GAAG,KAAKR,OAAO,mBAAmB,CAAC,CAEtF,CAMAU,kBAAgB,CAQd,OAAOH,EACL,KAAKJ,KAAKQ,KAOP,GAAG,KAAKX,OAAO,qBAAsB,CAAA,CAAE,CAAC,CAE/C,CAMAY,yBAAuB,CAMrB,OAAOL,EACL,KAAKJ,KAAKK,IAKP,GAAG,KAAKR,OAAO,iBAAiB,CAAC,CAExC,CAGAa,sBAAoB,CAClB,OAAON,EACL,KAAKJ,KAAKQ,KACR,GAAG,KAAKX,OAAO,WACf,CAAA,CAAE,CACH,CAEL,CAOAc,oBAAkB,CAChB,OAAOP,EACL,KAAKJ,KAAKK,IAAwC,GAAG,KAAKR,OAAO,mBAAmB,CAAC,CAEzF,CAGAe,WAAWC,EAAkB,CAC3B,OAAOT,EACL,KAAKJ,KAAKK,IAAyB,GAAG,KAAKR,OAAO,IAAIgB,CAAU,EAAE,CAAC,CAEvE,CAMAC,gBAAgBD,EAAkB,CAChC,OAAOT,EACL,KAAKJ,KAAKK,IACR,GAAG,KAAKR,OAAO,IAAIgB,CAAU,QAAQ,CACtC,CAEL,CAOAE,uBAAuBC,EAKtB,CACC,IAAMC,EAAkB,CAAA,EACpBD,EAAOE,YA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AAA,EAGxEuC,EAAA,EAAAmF,GAAA,GAAA,GAAA,MAAA,EAAAC,CAAA,EAyBFzH,EAAA,EAEAC,EAAA,EAAAyH,GAAA,EAAA,EAAA,MAAA,CAAA,EAA0B,EAAAC,GAAA,EAAA,EAAA,MAAA,CAAA,EAwG5B3H,EAAA,SAtI2BQ,EAAA,QAAA+G,EAAAhH,OAAA,EAAuB,QAAA,CAAAgH,EAAAhH,OAAA,EAE3CD,EAAA,EAAAE,EAAA,YAAA+G,EAAAhH,OAAA,EAA2B,YAAA,CAAAgH,EAAAhH,OAAA,EAC9BD,EAAA,EAAA6C,EAAAyE,GAAA,GAAAC,EAAA,CAAA,EA2BFvH,EAAA,CAAA,EAAAO,EAAA0G,EAAAzB,gBAAA,EAAA,GAAA,CAAA,EAOAxF,EAAA,EAAAO,EAAA0G,EAAApD,gBAAA,EAAA,EAAA,kBDfU2D,GAAYC,EAAA,EAAAC,cAAA,CAAA,CAAA,SASXlE,CAA6B,GAAA",
|
|
6
|
+
"names": ["CC_Account_ApiService", "baseUrl", "environment", "api", "http", "inject", "HttpClient", "listAccounts", "firstValueFrom", "get", "listAccountsByIdentity", "backfillIdentity", "post", "auditIdentityDuplicates", "refreshLocalAccounts", "getInstanceMapping", "getAccount", "accountKey", "getAccountUsage", "getAccountUsageHistory", "params", "query", "windowType", "push", "encodeURIComponent", "fromMs", "toMs", "qs", "length", "join", "refreshAccountUsage", "renameAccount", "body", "displayName", "undefined", "email", "patch", "factory", "\u0275fac", "providedIn", "SOCKET_EVENT_CC_ACCOUNT_USAGE_UPDATE", "SOCKET_EVENT_CC_ACCOUNT_LIST_UPDATE", "CC_Account_DataService", "account_AS", "inject", "CC_Account_ApiService", "socket_CS", "CCAP_Socket_ControlService", "globalError_CS", "CCAP_GlobalError_ControlService", "ngZone", "NgZone", "socketSubscription", "accounts_$", "signal", "accountUsageMap_$", "Map", "instanceMapping_$", "usageHistoryMap_$", "identityGroups_$", "isLoading_$", "loadError_$", "loadDashboardBootstrap", "__async", "set", "didFail", "accountsResp", "mappingResp", "groupsResp", "Promise", "all", "listAccounts", "getInstanceMapping", "listAccountsByIdentity", "items", "groups", "nextMap", "group", "primary", "accountKey", "mergedUsage", "err", "errorMessageOf", "showError", "loadIdentityGroups", "resp", "loadAccounts", "loadAccountUsage", "getAccountUsage", "next", "loadAccountUsageHistory", "params", "getAccountUsageHistory", "loadInstanceMapping", "refreshAccounts", "refreshResult", "refreshLocalAccounts", "refreshedKeys", "scannedPaths", "refreshAccountUsage", "result", "status", "surfacePullError", "source", "httpStatus", "bodyHead", "attemptedUrl", "networkMessage", "windowsUpserted", "email", "lines", "push", "message", "join", "Error", "errorDetails", "errorCode", "toUpperCase", "additionalContent", "renameAccount", "updated", "map", "a", "startLiveUpdates", "event$", "subscribe", "envelope", "run", "event", "handleAccountUsageUpdate", "payload", "handleAccountListUpdate", "stopLiveUpdates", "unsubscribe", "ngOnDestroy", "windowType", "newItem", "utilization", "undefined", "resetsAtMs", "lastObservedStatus", "observedAt", "lastObservedByCcapId", "lastObservedBySessionId", "replaced", "get", "filter", "item", "_payload", "rec", "String", "factory", "\u0275fac", "providedIn", "CC_AccountUsageChart_Util", "CHART_WIDTH", "CHART_HEIGHT", "COLOR_MAP", "five_hour", "seven_day", "seven_day_opus", "seven_day_sonnet", "extra_usage", "WINDOW_LABEL_MAP", "WINDOW_ORDER", "buildChart", "events", "minT", "Number", "POSITIVE_INFINITY", "maxT", "NEGATIVE_INFINITY", "validCount", "e", "observedAt", "utilization", "isFinite", "t", "Date", "parse", "lines", "map", "wt", "windowType", "label", "colorHex", "pathPoints", "hasData", "pointCount", "lastX", "lastY", "hasAnyData", "minTimeMs", "maxTimeMs", "range", "points", "push", "u", "Math", "max", "min", "sort", "a", "b", "coords", "p", "x", "y", "toFixed", "join", "length", "some", "l", "\u0275\u0275element", "\u0275\u0275classMap", "ctx_r1", "utilizationBarColorClass", "item_r1", "utilization", "\u0275\u0275styleProp", "utilizationPercent", "\u0275\u0275declareLet", "\u0275\u0275elementStart", "\u0275\u0275text", "\u0275\u0275elementEnd", "\u0275\u0275template", "CC_AccountUsageView_Component_For_3_Conditional_6_Template", "\u0275\u0275storeLet", "usageItemOfWindow", "windowType_r3", "\u0275\u0275advance", "compact", "\u0275\u0275classProp", "item_r4", "\u0275\u0275property", "\u0275\u0275textInterpolate1", "windowLabelOf", "\u0275\u0275conditional", "formatUtilization", "tmp_18_0", "undefined", "formatResetCountdown", "resetsAtMs", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_For_6_Conditional_0_Conditional_0_Template", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_For_6_Conditional_0_Conditional_1_Template", "line_r7", "pointCount", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_For_6_Conditional_0_Template", "hasData", "chartH", "line_r8", "lastY", "toFixed", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_For_16_Conditional_4_Template", "colorHex", "\u0275\u0275textInterpolate", "label", "\u0275\u0275pipeBind2", "chart_r9", "minTimeMs", "maxTimeMs", "\u0275\u0275repeaterCreate", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_For_6_Template", "_forTrack0", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_For_16_Template", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_Conditional_18_Template", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_Conditional_19_Template", "\u0275\u0275listener", "\u0275\u0275restoreView", "_r6", "\u0275\u0275nextContext", "\u0275\u0275resetView", "handleRefreshGraph", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_Conditional_22_Template", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_Conditional_23_Template", "\u0275\u0275repeater", "lines", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_2_Template", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Conditional_3_Template", "chart_$", "chart_r10", "hasAnyData", "_r5", "handleToggleGraph", "CC_AccountUsageView_Component_Conditional_5_Conditional_5_Template", "isGraphOpen_$", "CC_AccountUsageView_Component", "account_DS", "inject", "CC_Account_DataService", "accountKey", "showGraphToggle", "initiallyOpenGraph", "signal", "computed", "CC_AccountUsageChart_Util", "buildChart", "usageHistoryMap_$", "get", "chartViewBox", "CHART_WIDTH", "CHART_HEIGHT", "chartW", "chartMidY", "usageEffect", "effect", "key", "accountUsageMap_$", "has", "loadAccountUsage", "initialOpenEffect", "set", "__async", "next", "loadAccountUsageHistory", "windowType", "items", "item", "hasAnyUsageData", "length", "isFinite", "Math", "max", "min", "round", "diffMs", "Date", "now", "totalMinutes", "floor", "days", "hours", "minutes", "selectors", "inputs", "standalone", "features", "\u0275\u0275StandaloneFeature", "decls", "vars", "consts", "template", "rf", "ctx", "CC_AccountUsageView_Component_For_3_Template", "\u0275\u0275repeaterTrackByIdentity", "CC_AccountUsageView_Component_Conditional_4_Template", "CC_AccountUsageView_Component_Conditional_5_Template", "\u0275\u0275pureFunction0", "_c0", "CommonModule", "DatePipe", "encapsulation"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-EVV5L3LF.js";import{K as p,L as S}from"./chunk-WR6NSOQ2.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-H3QXSZIS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-EUEEHSUR.js";import{G as i}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{transform(t){return r.formatRelativeTime(t)}static \u0275fac=function(a){return new(a||e)};static \u0275pipe=i({name:"ccapRelativeTime",type:e,pure:!0,standalone:!0})}return e})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HZSNYOA4.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-EUEEHSUR.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
|
|
2
2
|
`).length}};export{a,u as b,d as c,s as d};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-I7TF6JIJ.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as Ce}from"./chunk-QP4ANIRB.js";import{b as Ye}from"./chunk-COVCHZOZ.js";import{a as v}from"./chunk-UFBTR2BG.js";import{h as Be,i as Fe}from"./chunk-7MDPIWHS.js";import{I as Ve}from"./chunk-5APAM7YJ.js";import{Aa as Oe,Ba as Re,C as Z,D as ae,Fa as m,Ga as L,Ha as _e,Ia as ze,J as R,K as z,L as H,M as ye,P as Pe,T as ne,Ta as le,U as F,Z as u,a as I,aa as V,b as w,da as D,fa as Y,ga as me,hb as g,ja as se,jb as Se,k as ke,la as S,oa as Le,p as be,pa as we,qa as p,ra as d,sa as W,ua as ie,ub as de,va as B,wa as C,xb as He,y as xe,za as Ge}from"./chunk-TBMJSIBB.js";var ve=class i{static getEmoji(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"?"\u{1F680}":t==="run-flow-complete"?"\u{1F3AF}":t==="tool-error-retry"?"\u26A0\uFE0F\u{1F9E0}":t.includes("tool-error")||t.includes("error-recovery")?"\u{1F527}\u274C":t.includes("agentic-loop-iteration")?"":o.eventType==="tool-call"||typeof e.toolId=="string"?"\u{1F527}":o.eventType==="llm-call"||typeof e.callType=="string"?"\u{1F9E0}":o.eventType==="error"?"\u26A0\uFE0F":""}static getBubbleClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-500/10 text-green-300 border border-green-500/50":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-500/10 text-orange-300 border border-orange-500/50":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-500/10 text-red-300 border border-red-500/50":t.includes("agentic-loop")?"bg-blue-500/10 text-blue-300 border border-blue-500/50":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-500/10 text-yellow-300 border border-yellow-500/50":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-500/10 text-purple-300 border border-purple-500/50":"bg-neutral-700 text-neutral-200 border border-neonCyan"}static getStepLabel(o){let e=o.data??{},t=e.step,n=e.toolId;if(typeof t=="string"&&t.length>0)return i.formatStepId(t);if(o.eventType==="tool-call"&&typeof n=="string"&&n.length>0)return`Eszk\xF6z: ${n}`;if(o.eventType==="llm-call"){let r=e.callType;return typeof r=="string"?`LLM: ${i.formatStepId(r)}`:"LLM h\xEDv\xE1s"}if(o.eventType==="error"){let r=e.message;return typeof r=="string"&&r.length>0?`Hiba: ${r.substring(0,40)}${r.length>40?"\u2026":""}`:"Hiba"}return o.eventType==="compacting"?typeof t=="string"&&t.length>0?i.formatStepId(t):"Compacting":i.formatEventTypeFallback(o.eventType)}static formatStepId(o){return o.split("-").map(e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e).join(" ")}static getDotClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-400":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-400":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-400":t.includes("agentic-loop")?"bg-blue-400":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-400":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-400":"bg-neutral-400"}static formatEventTypeFallback(o){return{step:"L\xE9p\xE9s","tool-call":"Eszk\xF6zh\xEDv\xE1s","context-update":"Kontextus friss\xEDt\xE9s",compacting:"Compacting","llm-call":"LLM h\xEDv\xE1s","session-event":"Session event",error:"Hiba"}[o]??o}};var x=function(i){return i.pending="pending",i.active="active",i.completed="completed",i.error="error",i}(x||{});var tt={[v.runInitialization]:"milestone-init",[v.analyze]:"phase-analyze",[v.analyzeResult]:"llm-analyze",[v.assemble]:"phase-assemble",[v.execution]:"phase-execution",[v.executionStart]:"phase-execution",[v.finalization]:"phase-finalization",[v.llmRunFinalization]:"llm-finalization",[v.postFinalization]:"phase-finalization",[v.runFlowComplete]:"milestone-complete"},nt=["milestone-init","phase-analyze","llm-analyze","phase-assemble","phase-execution","phase-finalization","llm-finalization","milestone-complete"],N=class i{static mapPhaseToNodeId(o){return tt[o]??null}static computeStateTransitions(o){let e=i.mapPhaseToNodeId(o);if(!e)return[];let t=[],n=!1;for(let r of nt)r===e?(t.push({nodeId:r,state:x.active}),n=!0):n||t.push({nodeId:r,state:x.completed});return t}static extractIterationData(o){let e=o.action;if(typeof e!="string")return null;let t=o.tool,n=typeof t=="string"?t:"",r=o.intent,s=typeof r=="string"?r:"",a=o.iterationCount;return{actionType:e,tool:n,intent:s,iterationIndex:typeof a=="number"?a:0}}static mapMonitoringEventToIterationNodeId(o,e){let t=o.data??{},n=t.step,r=typeof n=="string"?n:"",s=`iter-${e}`;if(o.eventType==="llm-call"){let a=t.callType;if(a==="agentic-loop")return`${s}-llm-decision`;if(a==="tool-description")return`${s}-tool-desc`;if(a==="tool-error-retry")return`${s}-tool-error-retry`;if(a==="tool-result-chunking")return`${s}-tool-chunking`;if(a==="goal-state-update")return`${s}-goal-update`}return o.eventType==="tool-call"?`${s}-tool-call`:o.eventType==="error"||r.includes("tool-error")?`${s}-tool-call`:null}static isTerminalPhase(o){return o===v.runFlowComplete}static SKELETON_LLM_NODE_MAP={analyze:"llm-analyze","run-finalization":"llm-finalization"};static LLM_CALL_PHASE_MAP={analyze:"phase-analyze","subanalyze-run-tasks":"phase-analyze","instant-reply":"phase-execution","run-finalization":"phase-finalization","chat-history-compacting":"phase-execution","execution-history-compacting":"phase-execution","soul-compacting":"phase-execution","context-compacting":"phase-execution","message-interceptor":"phase-execution"};static ITERATION_LLM_CALL_TYPES=new Set(["agentic-loop","tool-description","tool-error-retry","tool-result-chunking","goal-state-update"]);static LLM_CALL_LABEL_MAP={analyze:"LLM: Analyze","subanalyze-run-tasks":"LLM: Subanalyze","instant-reply":"LLM: Instant Reply","agentic-loop":"LLM Decision","tool-description":"Tool Description","tool-error-retry":"LLM: Error Retry","run-finalization":"LLM: Summary","chat-history-compacting":"LLM: Compact Chat","execution-history-compacting":"LLM: Compact Exec","soul-compacting":"LLM: Compact Soul","context-compacting":"LLM: Compact Ctx","tool-result-chunking":"LLM: Chunking","goal-state-update":"LLM: Goal Update","message-interceptor":"LLM: Msg Intercept"};static getPreCreatedSkeletonNodeId(o){return i.SKELETON_LLM_NODE_MAP[o]??null}static getLlmCallPhaseId(o){return i.LLM_CALL_PHASE_MAP[o]??null}static isIterationLlmCall(o){return i.ITERATION_LLM_CALL_TYPES.has(o)}static getLlmCallLabel(o){return i.LLM_CALL_LABEL_MAP[o]??`LLM: ${o}`}};var k=function(i){return i.sequential="sequential",i.loopEntry="loop-entry",i.errorRetry="error-retry",i}(k||{});var f=function(i){return i.phase="phase",i.milestone="milestone",i.llmCall="llm-call",i.toolCall="tool-call",i.toolError="tool-error",i.loopIteration="loop-iteration",i.action="action",i.error="error",i}(f||{});var je="milestone-init",Ee="phase-analyze",it="llm-analyze",Me="phase-assemble",ee="phase-execution",he="phase-finalization",Ae="llm-finalization",De="milestone-complete",P=class i{static buildSkeletonLayout(){let o=48+220/2,e=48,t=[],n=[],r=i.createNode({id:je,category:f.milestone,label:"Initialization",phase:v.runInitialization,x:o-200/2,y:e,width:200,height:48});t.push(r),e+=84;let s=i.createNode({id:Ee,category:f.phase,label:"Analyze",phase:v.analyze,x:o-220/2,y:e,width:220,height:60});t.push(s);let a=i.createNode({id:it,category:f.llmCall,label:"LLM: Analyze",phase:v.analyzeResult,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:Ee});t.push(a),n.push(i.createEdge(je,Ee,k.sequential)),e+=96;let h=i.createNode({id:Me,category:f.phase,label:"Assemble",phase:v.assemble,x:o-220/2,y:e,width:220,height:60});t.push(h),n.push(i.createEdge(Ee,Me,k.sequential)),e+=96;let l=i.createNode({id:ee,category:f.phase,label:"Execution",phase:v.execution,x:o-220/2,y:e,width:220,height:60});t.push(l),n.push(i.createEdge(Me,ee,k.sequential)),e+=96;let c=i.createNode({id:he,category:f.phase,label:"Finalization",phase:v.finalization,x:o-220/2,y:e,width:220,height:60});t.push(c);let _=i.createNode({id:Ae,category:f.llmCall,label:"LLM: Summary",phase:v.llmRunFinalization,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:he});t.push(_),n.push(i.createEdge(ee,he,k.sequential)),e+=96;let y=i.createNode({id:De,category:f.milestone,label:"Flow Complete",phase:v.runFlowComplete,x:o-200/2,y:e,width:200,height:48});t.push(y),n.push(i.createEdge(he,De,k.sequential));let T=i.recalculateViewBox(t,48);return{nodes:t,edges:n,viewBox:T,loopContainerBounds:null}}static addIterationColumn(o,e,t,n){let r=o.nodes.map(b=>I({},b)),s=[...o.edges],a=r.find(b=>b.id===ee);if(!a)return o;let h=a.x+20+e*208,l=a.y+60+20,c=`iter-${e}`,_=l,y=[],T=i.createNode({id:`${c}-llm-decision`,category:f.llmCall,label:"LLM Decision",phase:v.llmAgenticLoop,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(T),_+=68;let M=i.formatActionLabel(t),O=i.createNode({id:`${c}-action`,category:f.action,label:M,phase:v.agenticLoopIteration,x:h+20/2,y:_,width:140,height:32,parentId:ee,iterationIndex:e,data:n});if(y.push(O),_+=56,t==="tool-select"){let b=i.createNode({id:`${c}-tool-desc`,category:f.llmCall,label:"Tool Description",phase:v.llmToolDescription,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(b),_+=68;let q=n.tool,Q=typeof q=="string"?q:"tool",te=i.createNode({id:`${c}-tool-call`,category:f.toolCall,label:Q,phase:null,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e,data:n});y.push(te),_+=68}for(let b=0;b<y.length-1;b++)s.push(i.createEdge(y[b].id,y[b+1].id,k.sequential));r.push(...y);let E=20*2+(e+1)*180+e*28,j=60+20*2+(_-l);a.width=Math.max(a.width,E),a.height=Math.max(a.height,j);let K=a.y+a.height,A=[he,Ae,De],ue=K+36;for(let b of A){let q=r.find(Q=>Q.id===b);if(q){if(b===Ae){let Q=r.find(te=>te.id===he);Q&&(q.y=Q.y+16/2);continue}q.y=ue,ue+=q.height+36}}let ge={x:a.x,y:a.y+60,width:a.width,height:a.height-60},J=r,Je=s.map(b=>{let q=J.find(te=>te.id===b.sourceNodeId),Q=J.find(te=>te.id===b.targetNodeId);return!q||!Q?b:w(I({},b),{pathD:i.computeEdgePath(q,Q,b.category)})}),et=i.recalculateViewBox(J,48);return{nodes:J,edges:Je,viewBox:et,loopContainerBounds:ge}}static computeEdgePath(o,e,t){let n=o.x+o.width/2,r=o.y+o.height,s=e.x+e.width/2,a=e.y;if(Math.abs(n-s)<20)return`M ${n} ${r} L ${s} ${a}`;let h=o.x+o.width,l=o.y+o.height/2,c=e.x,_=e.y+e.height/2;if(e.parentId===o.id)return`M ${h} ${l} L ${c} ${_}`;let y=r+(a-r)/2;return`M ${n} ${r} L ${n} ${y} L ${s} ${y} L ${s} ${a}`}static recalculateViewBox(o,e){if(o.length===0)return{x:0,y:0,width:600,height:400};let t=1/0,n=1/0,r=-1/0,s=-1/0;for(let a of o)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),s=Math.max(s,a.y+a.height);return{x:t-e,y:n-e,width:r-t+e*2,height:s-n+e*2}}static addDynamicLlmNode(o,e,t,n,r,s){let a=o.nodes.map(A=>I({},A)),h=[...o.edges],l=a.find(A=>A.id===e);if(!l)return o;let c,_;l.category===f.phase||l.category===f.milestone?(c=l.x+l.width+28,_=l.y+(l.height-44)/2):(c=l.x,_=l.y+l.height+24);let T=i.createNode({id:t,category:f.llmCall,label:n,phase:null,x:c,y:_,width:160,height:44,parentId:r,iterationIndex:s??void 0});a.push(T),h.push(i.createEdge(e,t,k.sequential));let M=T.y+T.height;s!=null?i.expandExecutionContainer(a,M):i.shiftDownstreamIfOverlap(a,r,M);let O=o.loopContainerBounds,E=a.find(A=>A.id==="phase-execution");E&&E.height>60&&(O={x:E.x,y:E.y+60,width:E.width,height:E.height-60});let j=h.map(A=>{let ue=a.find(J=>J.id===A.sourceNodeId),ge=a.find(J=>J.id===A.targetNodeId);return!ue||!ge?A:w(I({},A),{pathD:i.computeEdgePath(ue,ge,A.category)})}),K=i.recalculateViewBox(a,48);return{nodes:a,edges:j,viewBox:K,loopContainerBounds:O}}static expandExecutionContainer(o,e){let t=o.find(l=>l.id==="phase-execution");if(!t)return;let n=t.y+60+20,r=60+20*2+(e+24-n);if(r<=t.height)return;t.height=r;let s=t.y+t.height,a=["phase-finalization","llm-finalization","milestone-complete"],h=s+36;for(let l of a){let c=o.find(_=>_.id===l);if(c){if(l==="llm-finalization"){let _=o.find(y=>y.id==="phase-finalization");_&&(c.y=_.y+16/2);continue}c.y<h&&(c.y=h),h=c.y+c.height+36}}for(let l of o)if(l.parentId==="phase-finalization"&&l.id!=="llm-finalization"&&l.category===f.llmCall){let c=o.find(_=>_.id==="phase-finalization");c&&(l.y=Math.max(l.y,c.y))}}static shiftDownstreamIfOverlap(o,e,t){let n=["milestone-init","phase-analyze","phase-assemble","phase-execution","phase-finalization","milestone-complete"],r=n.indexOf(e);if(r<0||r>=n.length-1)return;let s=n[r+1],a=o.find(_=>_.id===s);if(!a||t+36<=a.y)return;let h=t+36-a.y,l=new Set;for(let _ of o)_.parentId===e&&_.category===f.llmCall&&l.add(_.id);let c=a.y;for(let _ of o)_.y>=c&&!l.has(_.id)&&(_.y+=h)}static createNode(o){return{id:o.id,category:o.category,state:x.pending,label:o.label,phase:o.phase,x:o.x,y:o.y,width:o.width,height:o.height,data:o.data??{},iterationIndex:o.iterationIndex??null,parentId:o.parentId??null,monitoringEvent:null}}static createEdge(o,e,t){let n=t===k.errorRetry?"#f97316":t===k.loopEntry?"#3b82f6":"#525252",r=t===k.loopEntry?"8 4":t===k.errorRetry?"6 3":"none",s=t===k.errorRetry?"url(#ses-arrow-error)":t===k.loopEntry?"url(#ses-arrow-loop)":"url(#ses-arrow-seq)";return{id:`edge-${o}-${e}`,category:t,sourceNodeId:o,targetNodeId:e,pathD:"",strokeColor:n,strokeDashArray:r,markerEnd:s}}static formatActionLabel(o){return{"tool-select":"Tool Select","tool-group-open":"Tool Group","context-handling":"Context","loop-debrief":"Debrief",result:"Result"}[o]??o}};var qe=(()=>{class i{baseUrl=`${Ve.api.baseUrl}/session`;http=Z(He);getEvents(e){let t=encodeURIComponent(e.trim());return be(this.http.get(`${this.baseUrl}/${t}/events`))}getRunTrace(e){let t=e.sessionId.trim(),n=encodeURIComponent(e.runId.trim());return be(this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/runs/${n}/trace`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ze=(()=>{class i{session_DS=Z(Ce);monitoring_AS=Z(qe);destroyRef=Z(Pe);graphLayout_$=V(null);activeNodeId_$=V("");selectedNodeId_$=V("");isLive_$=V(!1);isGraphOpen_$=V(!1);graphSessionId_$=V("");graphRunId_$=V("");isLoading_$=V(!1);currentIterationIndex=-1;monitoringSubscription=null;lastAppliedPhase="";phaseRightColumnLast={};iterationColumnLast={};dynamicNodeCounter=0;constructor(){Se(()=>{let e=this.session_DS.agentEvents_$();!this.isGraphOpen_$()||!this.isLive_$()||this.applyAgentEvent(e)},{allowSignalWrites:!0}),this.destroyRef.onDestroy(()=>{this.disposeSubscriptions()})}openGraphForRun(e,t,n){this.disposeSubscriptions(),this.resetState(),this.graphSessionId_$.set(e),this.graphRunId_$.set(t),this.isLive_$.set(n),this.isGraphOpen_$.set(!0),n?this.initLiveGraph():this.loadHistoricalGraph(e,t)}closeGraph(){this.disposeSubscriptions(),this.isGraphOpen_$.set(!1),this.selectedNodeId_$.set("")}selectNode(e){let t=this.selectedNodeId_$();this.selectedNodeId_$.set(t===e?"":e)}clearSelection(){this.selectedNodeId_$.set("")}initLiveGraph(){let e=P.buildSkeletonLayout(),t=this.recalculateEdgePaths(e);this.graphLayout_$.set(t),this.phaseRightColumnLast={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},this.iterationColumnLast={},this.monitoringSubscription=this.session_DS.monitoringEvent_S.subscribe(n=>{n.sessionId===this.graphSessionId_$()&&this.applyMonitoringEvent(n.event)})}applyAgentEvent(e){let t=e.phase;if(typeof t!="string"||t.length===0||t===this.lastAppliedPhase)return;if(this.lastAppliedPhase=t,t===v.agenticLoopIteration){let r=N.extractIterationData(e);r&&this.addIteration(r);return}let n=N.computeStateTransitions(t);n.length!==0&&(this.applyStateTransitions(n),N.isTerminalPhase(t)&&this.markAllIterationNodesCompleted())}addIteration(e){let t=this.graphLayout_$();if(!t)return;this.currentIterationIndex=e.iterationIndex,this.markPreviousIterationCompleted(e.iterationIndex);let n=P.addIterationColumn(t,e.iterationIndex,e.actionType,{tool:e.tool,intent:e.intent}),r=e.actionType==="tool-select"?`iter-${e.iterationIndex}-tool-call`:`iter-${e.iterationIndex}-action`;this.iterationColumnLast[e.iterationIndex]=r;let s=`iter-${e.iterationIndex}-llm-decision`,a=this.setNodeState(n,s,x.active);this.activeNodeId_$.set(s),this.graphLayout_$.set(this.recalculateEdgePaths(a))}markPreviousIterationCompleted(e){if(e<=0)return;let t=this.graphLayout_$();if(!t)return;let n=`iter-${e-1}`,r=t;for(let s of t.nodes)s.id.startsWith(n)&&s.state!==x.error&&(r=this.setNodeState(r,s.id,x.completed));this.graphLayout_$.set(r)}applyMonitoringEvent(e){let t=this.graphLayout_$();if(!t)return;let n=typeof e.eventType=="string"?e.eventType:"",r=typeof e.status=="string"?e.status:"",s=i.toRecord(e.data),a=typeof e.durationMs=="number"?e.durationMs:0,h=typeof e.inputSize=="number"?e.inputSize:0,l=typeof e.outputSize=="number"?e.outputSize:0,c={eventType:n,timestamp:new Date,data:s,durationMs:a,status:r,sessionId:this.graphSessionId_$(),runId:this.graphRunId_$(),inputSize:h,outputSize:l};if(n==="llm-call"){this.handleLlmCallMonitoringEvent(c,t);return}if(this.currentIterationIndex<0)return;let _=N.mapMonitoringEventToIterationNodeId(c,this.currentIterationIndex);if(!_)return;let y=this.enrichNodeWithMonitoringEvent(t,_,c);y&&this.graphLayout_$.set(y)}handleLlmCallMonitoringEvent(e,t){let n=e.data?.callType,r=typeof n=="string"?n:"";if(!r)return;let s=N.getPreCreatedSkeletonNodeId(r);if(s){let h=this.enrichNodeWithMonitoringEvent(t,s,e);h&&this.graphLayout_$.set(h);return}if(N.isIterationLlmCall(r)&&this.currentIterationIndex>=0){let h=N.mapMonitoringEventToIterationNodeId(e,this.currentIterationIndex);if(h){if(t.nodes.findIndex(c=>c.id===h)>=0){let c=this.enrichNodeWithMonitoringEvent(t,h,e);c&&this.graphLayout_$.set(c)}else this.createDynamicIterationLlmNode(t,r,h,e);return}}let a=N.getLlmCallPhaseId(r);a&&this.createDynamicSkeletonLlmNode(t,r,a,e)}enrichNodeWithMonitoringEvent(e,t,n){let r=e.nodes.findIndex(_=>_.id===t);if(r<0)return null;let s=n.data??{},a=n.status==="error",h=n.durationMs??0,l=a?x.error:h>0?x.completed:x.active,c=[...e.nodes];return c[r]=w(I({},c[r]),{state:l,monitoringEvent:n,data:w(I(I({},c[r].data),s),{durationMs:h})}),this.activeNodeId_$.set(l===x.active?t:""),w(I({},e),{nodes:c})}createDynamicSkeletonLlmNode(e,t,n,r){this.dynamicNodeCounter++;let s=`llm-dyn-${this.dynamicNodeCounter}`,a=N.getLlmCallLabel(t),h=this.phaseRightColumnLast[n]??n,l=P.addDynamicLlmNode(e,h,s,a,n,null);this.phaseRightColumnLast[n]=s;let c=this.enrichNodeWithMonitoringEvent(l,s,r);this.graphLayout_$.set(c??l)}createDynamicIterationLlmNode(e,t,n,r){let s=N.getLlmCallLabel(t),a=this.iterationColumnLast[this.currentIterationIndex]??`iter-${this.currentIterationIndex}-action`,h=P.addDynamicLlmNode(e,a,n,s,"phase-execution",this.currentIterationIndex);this.iterationColumnLast[this.currentIterationIndex]=n;let l=this.enrichNodeWithMonitoringEvent(h,n,r);this.graphLayout_$.set(l??h)}loadHistoricalGraph(e,t){return ke(this,null,function*(){this.isLoading_$.set(!0);try{let n=yield this.monitoring_AS.getRunTrace({sessionId:e,runId:t});this.buildHistoricalGraph(n.trace)}catch{let n=P.buildSkeletonLayout();this.graphLayout_$.set(this.recalculateEdgePaths(n))}finally{this.isLoading_$.set(!1)}})}buildHistoricalGraph(e){let t=P.buildSkeletonLayout();t=this.recalculateEdgePaths(t);let n="",r=-1,s={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},a={},h=0;for(let l of e){let c=l.data??{},_=c.step,y=typeof _=="string"?_:"";if(y.length>0&&N.mapPhaseToNodeId(y)&&y!==n){n=y;let M=N.computeStateTransitions(y);for(let O of M)t=this.setNodeState(t,O.nodeId,O.state)}if(y==="agentic-loop-iteration"||y.includes("agentic-loop")){let T=c.action,M=typeof T=="string"?T:"",O=c.tool,E=typeof O=="string"?O:"";if(M.length>0){r++,t=P.addIterationColumn(t,r,M,{tool:E});let j=M==="tool-select"?`iter-${r}-tool-call`:`iter-${r}-action`;a[r]=j}}if(l.eventType==="llm-call"){let T=c.callType,M=typeof T=="string"?T:"";if(M){let O=N.getPreCreatedSkeletonNodeId(M);if(O)t=this.enrichHistoricalNode(t,O,l,c);else if(N.isIterationLlmCall(M)&&r>=0){let E=N.mapMonitoringEventToIterationNodeId(l,r);if(E)if(t.nodes.findIndex(K=>K.id===E)>=0)t=this.enrichHistoricalNode(t,E,l,c);else{let K=N.getLlmCallLabel(M),A=a[r]??`iter-${r}-action`;t=P.addDynamicLlmNode(t,A,E,K,"phase-execution",r),t=this.enrichHistoricalNode(t,E,l,c),a[r]=E}}else{let E=N.getLlmCallPhaseId(M);if(E){h++;let j=`llm-dyn-${h}`,K=N.getLlmCallLabel(M),A=s[E]??E;t=P.addDynamicLlmNode(t,A,j,K,E,null),t=this.enrichHistoricalNode(t,j,l,c),s[E]=j}}}continue}if(r>=0){let T=N.mapMonitoringEventToIterationNodeId(l,r);T&&(t=this.enrichHistoricalNode(t,T,l,c))}}if(n===v.runFlowComplete)for(let l of t.nodes)l.state===x.pending&&(t=this.setNodeState(t,l.id,x.completed));this.graphLayout_$.set(this.recalculateEdgePaths(t))}enrichHistoricalNode(e,t,n,r){let s=e.nodes.findIndex(h=>h.id===t);if(s<0)return e;let a=[...e.nodes];return a[s]=w(I({},a[s]),{state:n.status==="error"?x.error:x.completed,monitoringEvent:n,data:w(I(I({},a[s].data),r),{durationMs:n.durationMs})}),w(I({},e),{nodes:a})}applyStateTransitions(e){let t=this.graphLayout_$();if(!t)return;let n="";for(let r of e)t=this.setNodeState(t,r.nodeId,r.state),r.state===x.active&&(n=r.nodeId);this.activeNodeId_$.set(n),this.graphLayout_$.set(t)}setNodeState(e,t,n){let r=e.nodes.findIndex(a=>a.id===t);if(r<0)return e;let s=[...e.nodes];return s[r]=w(I({},s[r]),{state:n}),w(I({},e),{nodes:s})}markAllIterationNodesCompleted(){let e=this.graphLayout_$();if(!e)return;let t=e;for(let n of e.nodes)n.iterationIndex!=null&&n.state!==x.error&&(t=this.setNodeState(t,n.id,x.completed));this.graphLayout_$.set(t)}recalculateEdgePaths(e){let t=e.edges.map(n=>{let r=e.nodes.find(a=>a.id===n.sourceNodeId),s=e.nodes.find(a=>a.id===n.targetNodeId);return!r||!s?n:w(I({},n),{pathD:P.computeEdgePath(r,s,n.category)})});return w(I({},e),{edges:t})}resetState(){this.graphLayout_$.set(null),this.activeNodeId_$.set(""),this.selectedNodeId_$.set(""),this.currentIterationIndex=-1,this.lastAppliedPhase="",this.isLoading_$.set(!1),this.dynamicNodeCounter=0,this.phaseRightColumnLast={},this.iterationColumnLast={}}disposeSubscriptions(){this.monitoringSubscription&&(this.monitoringSubscription.unsubscribe(),this.monitoringSubscription=null)}static toRecord(e){return typeof e!="object"||e==null?{}:JSON.parse(JSON.stringify(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ot=["appSesGraphNodeSvg",""];function rt(i,o){if(i&1&&(H(),p(0,"text",1),m(1),d()),i&2){let e=C();Y("x",10)("y",e.node().height/2+1),u(),L(e.icon_$())}}function at(i,o){if(i&1&&(H(),p(0,"text",3),m(1),d()),i&2){let e=C();Y("x",e.node().width-10)("y",12)("fill",e.node().state==="error"?"#ef4444":"#22c55e"),u(),L(e.stateIcon_$())}}function st(i,o){if(i&1&&(H(),p(0,"text",4),m(1),d()),i&2){let e=C();Y("x",e.node().width-8)("y",e.node().height-8),u(),_e("",e.durationMs_$(),"ms")}}var $e=class i{node=F.required();isHighlighted=F(!1);isSelected=F(!1);nodeClicked=ne();fillColor_$=g(()=>{let o=this.node();return o.state===x.pending?"#262626":i.CATEGORY_FILL_MAP[o.category]??"#262626"});strokeColor_$=g(()=>{let o=this.node();return o.state===x.error?"#ef4444":o.state===x.pending?"#525252":i.CATEGORY_STROKE_MAP[o.category]??"#737373"});strokeDashArray_$=g(()=>this.node().state===x.pending?"6 3":"none");textColor_$=g(()=>this.node().state===x.pending?"#737373":"#e5e5e5");opacity_$=g(()=>this.node().state===x.pending?.5:1);borderRadius_$=g(()=>this.node().category===f.action?16:8);icon_$=g(()=>{let o=this.node().category;return i.CATEGORY_ICON_MAP[o]??""});stateIcon_$=g(()=>{let o=this.node().state;return o===x.completed?"\u2713":o===x.error?"\u2715":""});animationClass_$=g(()=>this.node().state===x.active||this.isHighlighted()?"ses-graph-node--active":this.isSelected()?"ses-graph-node--selected":"");durationMs_$=g(()=>this.node().data.durationMs??0);handleClick(){this.nodeClicked.emit(this.node().id)}static CATEGORY_FILL_MAP={[f.phase]:"#1a1a2e",[f.milestone]:"#052e16",[f.llmCall]:"#1e1033",[f.toolCall]:"#2e2a05",[f.toolError]:"#2e1505",[f.loopIteration]:"#0a1628",[f.action]:"#1a1a2e",[f.error]:"#2e0505"};static CATEGORY_STROKE_MAP={[f.phase]:"#525252",[f.milestone]:"#22c55e",[f.llmCall]:"#a855f7",[f.toolCall]:"#eab308",[f.toolError]:"#f97316",[f.loopIteration]:"#3b82f6",[f.action]:"#3b82f6",[f.error]:"#ef4444"};static CATEGORY_ICON_MAP={[f.milestone]:"\u26A1",[f.llmCall]:"\u{1F9E0}",[f.toolCall]:"\u{1F527}",[f.toolError]:"\u26A0\uFE0F",[f.error]:"\u274C"};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=ae({type:i,selectors:[["","appSesGraphNodeSvg",""]],inputs:{node:[1,"node"],isHighlighted:[1,"isHighlighted"],isSelected:[1,"isSelected"]},outputs:{nodeClicked:"nodeClicked"},standalone:!0,features:[le],attrs:ot,decls:7,vars:21,consts:[[2,"cursor","pointer",3,"click"],["dominant-baseline","central","text-anchor","start","font-size","14"],["dominant-baseline","central"],["text-anchor","end","dominant-baseline","central","font-size","11","font-weight","700"],["text-anchor","end","dominant-baseline","auto","fill","#737373","font-size","9"]],template:function(e,t){e&1&&(H(),p(0,"g",0),B("click",function(){return t.handleClick()}),W(1,"rect"),D(2,rt,2,3,":svg:text",1),p(3,"text",2),m(4),d(),D(5,at,2,4,":svg:text",3)(6,st,2,3,":svg:text",4),d()),e&2&&(se(t.animationClass_$()),Y("transform","translate("+t.node().x+","+t.node().y+")")("opacity",t.opacity_$()),u(),Y("width",t.node().width)("height",t.node().height)("rx",t.borderRadius_$())("fill",t.fillColor_$())("stroke",t.strokeColor_$())("stroke-width",t.isSelected()?2.5:1.5)("stroke-dasharray",t.strokeDashArray_$()),u(),S(t.icon_$()?2:-1),u(),Y("x",t.icon_$()?30:t.node().width/2)("y",t.node().height/2+1)("text-anchor",t.icon_$()?"start":"middle")("fill",t.textColor_$())("font-size",t.node().category==="phase"||t.node().category==="milestone"?14:12)("font-weight",t.node().category==="phase"||t.node().category==="milestone"?600:400),u(),L(t.node().label),u(),S(t.stateIcon_$()?5:-1),u(),S(t.durationMs_$()?6:-1))},dependencies:[de],encapsulation:2})};function lt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Phase"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.node().phase)}}function dt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Step"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.stepLabel_$())}}function ct(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Duration"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.durationLabel_$())}}function pt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Tool"),d(),p(3,"span",12),m(4),d()()),i&2){let e=C();u(4),L(e.toolId_$())}}function ht(i,o){if(i&1&&(p(0,"div",10)(1,"span",13),m(2,"Intent"),d(),p(3,"span",14),m(4),d()()),i&2){let e=C();u(4),L(e.intent_$())}}function ut(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Iteration"),d(),p(3,"span",15),m(4),d()()),i&2){let e=C();u(4),_e("#",e.node().iterationIndex,"")}}function mt(i,o){if(i&1&&(p(0,"span",13),m(1," In: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.inputSize_$())}}function _t(i,o){if(i&1&&(p(0,"span",13),m(1," Out: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.outputSize_$())}}function ft(i,o){if(i&1&&(p(0,"div",11),D(1,mt,4,1,"span",13)(2,_t,4,1,"span",13),d()),i&2){let e=C();u(),S(e.inputSize_$()>0?1:-1),u(),S(e.outputSize_$()>0?2:-1)}}function gt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Provider"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedProvider_$())}}function xt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Model"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedModel_$())}}function yt(i,o){if(i&1&&(p(0,"span",13),m(1," Cost: "),p(2,"span",27),m(3),d()()),i&2){let e=C(4);u(3),L(e.costUsd_$())}}function St(i,o){if(i&1&&(p(0,"div",25)(1,"span",13),m(2," Tokens: "),p(3,"span",9),m(4),d()(),D(5,yt,4,1,"span",13),d()),i&2){let e=C(3);u(4),L(e.tokenInfo_$().total),u(),S(e.costUsd_$()?5:-1)}}function Ct(i,o){if(i&1&&(p(0,"div",16)(1,"div",23),m(2,"Used"),d(),p(3,"div",24),D(4,gt,5,1,"div",7)(5,xt,5,1,"div",7)(6,St,6,2,"div",25),d()()),i&2){let e=C(2);u(4),S(e.usedProvider_$()?4:-1),u(),S(e.usedModel_$()?5:-1),u(),S(e.tokenInfo_$()?6:-1)}}function vt(i,o){if(i&1){let e=ie();p(0,"button",28),B("click",function(){R(e);let n=C(2);return z(n.handleClearOverride())}),m(1," Clear "),d()}}function It(i,o){i&1&&(p(0,"div",21),m(1," Session override active "),d())}function Et(i,o){if(i&1&&(p(0,"div",22)(1,"div",29),m(2,"Global default"),d(),p(3,"div",30),m(4),d()()),i&2){let e=C(2);u(4),ze(" ",e.globalDefault_$().provider," / ",e.globalDefault_$().model," ")}}function Nt(i,o){if(i&1){let e=ie();D(0,Ct,7,3,"div",16),p(1,"div",16)(2,"div",17)(3,"div",18),m(4),d(),D(5,vt,2,0,"button",19),d(),p(6,"app-s-registry-provider-model-select",20),B("modelChange",function(n){R(e);let r=C();return z(r.handleModelChange(n))}),d(),D(7,It,2,0,"div",21),d(),D(8,Et,5,2,"div",22)}if(i&2){let e=C();S(e.usedProvider_$()||e.usedModel_$()?0:-1),u(4),_e(" Override: ",e.callTypeLabel_$()," "),u(),S(e.hasSessionOverride_$()?5:-1),u(),me("selectedProvider",e.selectedProvider_$())("selectedModel",e.selectedModel_$()),u(),S(e.hasSessionOverride_$()?7:-1),u(),S(e.globalDefault_$()?8:-1)}}var Ke=(()=>{class i{graph_DS=Z(Ze);session_DS=Z(Ce);registrySsot_CS=Z(Be);node=F.required();closed=ne();stateLabel_$=g(()=>({pending:"Pending",active:"Active",completed:"Completed",error:"Error"})[this.node().state]??this.node().state);durationLabel_$=g(()=>{let e=this.node().data.durationMs;return!e||e<=0?"":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`});toolId_$=g(()=>{let e=this.node().data,t=e.toolId??e.tool;return typeof t=="string"?t:""});intent_$=g(()=>{let e=this.node().data.intent;return typeof e=="string"?e:""});stepLabel_$=g(()=>{let e=this.node().data.step;return typeof e!="string"||e.length===0?"":ve.formatStepId(e)});inputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.inputSize??0:0});outputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.outputSize??0:0});stateColorClass_$=g(()=>({pending:"text-neutral-500",active:"text-cyan-400",completed:"text-green-400",error:"text-red-400"})[this.node().state]??"text-neutral-400");isLlmCall_$=g(()=>this.node().category===f.llmCall);callType_$=g(()=>{let e=this.node().data?.callType;return typeof e=="string"?e:""});callTypeLabel_$=g(()=>{let e=this.callType_$();return Ye[e]??e});usedProvider_$=g(()=>{let e=this.node().data?.provider;return typeof e=="string"?e:""});usedModel_$=g(()=>{let e=this.node().data?.model;return typeof e=="string"?e:""});sessionOverride_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$();if(!t)return null;let r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.llmCallTypeOverrides;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});globalDefault_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$(),r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.globalCallTypeDefaults;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});selectedProvider_$=g(()=>this.sessionOverride_$()?.provider??"");selectedModel_$=g(()=>this.sessionOverride_$()?.model??"");hasSessionOverride_$=g(()=>this.sessionOverride_$()!==null);tokenInfo_$=g(()=>{let e=this.node().data,t=e.promptTokens,n=e.completionTokens,r=e.totalTokens;return typeof r!="number"||r<=0?null:{prompt:typeof t=="number"?t:0,completion:typeof n=="number"?n:0,total:r}});costUsd_$=g(()=>{let e=this.node().data?.costUsd;return typeof e!="number"||e<=0?"":`$${e.toFixed(4)}`});handleClose(){this.closed.emit()}handleProviderChange(e){}handleModelChange(e){let t=this.callType_$(),n=this.graph_DS.graphSessionId_$();if(!t||!n||!e)return;let s=this.registrySsot_CS.enabledLlmModels_$().find(a=>a.modelName===e);s&&this.applySessionOverride(n,t,s.provider,s.modelName)}handleClearOverride(){let e=this.callType_$(),t=this.graph_DS.graphSessionId_$();!e||!t||this.clearSessionOverride(t,e)}applySessionOverride(e,t,n,r){let h=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},l=w(I({},h),{[t]:{provider:n,model:r}});this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:l}}).then(()=>{this.session_DS.loadSessionInfo(e)})}clearSessionOverride(e,t){let s=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},a=I({},s);Reflect.deleteProperty(a,t);let h=Object.keys(a).length>0;this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:h?a:null}}).then(()=>{this.session_DS.loadSessionInfo(e)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-node-detail"]],inputs:{node:[1,"node"]},outputs:{closed:"closed"},standalone:!0,features:[le],decls:26,vars:13,consts:[[1,"w-80","max-h-[28rem]","overflow-y-auto","rounded-lg","border","border-neonCyan/30","bg-neutral-900/95","shadow-lg","backdrop-blur-sm","p-3"],[1,"flex","items-start","justify-between","gap-2","mb-2"],[1,"text-sm","font-semibold","text-neutral-200","leading-tight"],["title","Bez\xE1r\xE1s","aria-label","Bez\xE1r\xE1s",1,"p-1","min-h-[28px]","min-w-[28px]","flex","items-center","justify-center","rounded","text-neutral-400","hover:text-neutral-200","hover:bg-neutral-700","transition-colors","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.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"space-y-1.5","text-xs"],[1,"flex","items-center","gap-2"],[1,"text-neutral-500","w-16","shrink-0"],[1,"text-neutral-300"],[1,"flex","flex-col","gap-0.5"],[1,"flex","items-center","gap-3","pt-1","border-t","border-neutral-800"],[1,"text-yellow-300","font-mono","text-[11px]"],[1,"text-neutral-500"],[1,"text-neutral-300","text-[11px]","leading-tight","break-words"],[1,"text-blue-400"],[1,"mt-3","pt-2","border-t","border-neutral-700"],[1,"flex","items-center","justify-between","mb-1.5"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors"],["registryKind","llm","providerLabel","Provider","modelLabel","Model",3,"modelChange","selectedProvider","selectedModel"],[1,"mt-1.5","text-[10px]","text-purple-400"],[1,"mt-2","pt-1.5","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1.5"],[1,"space-y-1","text-xs"],[1,"flex","items-center","gap-3"],[1,"text-purple-300","font-mono","text-[11px]"],[1,"text-green-400"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors",3,"click"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1"],[1,"text-[11px]","text-neutral-400","font-mono"]],template:function(t,n){t&1&&(p(0,"div",0)(1,"div",1)(2,"h3",2),m(3),d(),p(4,"button",3),B("click",function(){return n.handleClose()}),H(),p(5,"svg",4),W(6,"path",5),d()()(),ye(),p(7,"div",6)(8,"div",7)(9,"span",8),m(10,"State"),d(),p(11,"span"),m(12),d()(),p(13,"div",7)(14,"span",8),m(15,"Type"),d(),p(16,"span",9),m(17),d()(),D(18,lt,5,1,"div",7)(19,dt,5,1,"div",7)(20,ct,5,1,"div",7)(21,pt,5,1,"div",7)(22,ht,5,1,"div",10)(23,ut,5,1,"div",7)(24,ft,3,2,"div",11),d(),D(25,Nt,9,7),d()),t&2&&(u(3),L(n.node().label),u(8),se(n.stateColorClass_$()+" font-medium"),u(),L(n.stateLabel_$()),u(5),L(n.node().category),u(),S(n.node().phase?18:-1),u(),S(n.stepLabel_$()?19:-1),u(),S(n.durationLabel_$()?20:-1),u(),S(n.toolId_$()?21:-1),u(),S(n.intent_$()?22:-1),u(),S(n.node().iterationIndex!==null?23:-1),u(),S(n.inputSize_$()>0||n.outputSize_$()>0?24:-1),u(),S(n.isLlmCall_$()&&n.callType_$()?25:-1))},dependencies:[de,Fe],encapsulation:2})}return i})();var $t=["graphSvg"],Qe=(i,o)=>o.id;function bt(i,o){i&1&&(p(0,"span",7),m(1,"Loading trace..."),d())}function Lt(i,o){if(i&1&&(H(),W(0,"rect",16)),i&2){let e=o;Y("x",e.x)("y",e.y)("width",e.width)("height",e.height)}}function wt(i,o){if(i&1&&(H(),W(0,"path",17)),i&2){let e=o.$implicit;Y("d",e.pathD)("stroke",e.strokeColor)("stroke-dasharray",e.strokeDashArray)("marker-end",e.markerEnd)}}function Tt(i,o){if(i&1){let e=ie();H(),p(0,"g",20),B("nodeClicked",function(n){R(e);let r=C();return z(r.handleNodeClick(n))}),d()}if(i&2){let e=o.$implicit,t=C();me("node",e)("isHighlighted",t.activeNodeId()===e.id)("isSelected",t.selectedNodeId()===e.id)}}function Mt(i,o){if(i&1){let e=ie();p(0,"app-ses-graph-node-detail",21),B("closed",function(){R(e);let n=C();return z(n.handleDetailClose())}),d()}i&2&&me("node",o)}var Gn=(()=>{class i{svgRef;layout=F(null);activeNodeId=F("");selectedNodeId=F("");isLoading=F(!1);nodeClicked=ne();detailClosed=ne();viewBox_$=V({x:0,y:0,width:800,height:600});viewBoxStr_$=g(()=>{let e=this.viewBox_$();return`${e.x} ${e.y} ${e.width} ${e.height}`});isFollowActive_$=V(!0);isPanning=!1;panStartX=0;panStartY=0;panStartViewBoxX=0;panStartViewBoxY=0;nodes_$=g(()=>this.layout()?.nodes??[]);edges_$=g(()=>this.layout()?.edges??[]);loopBounds_$=g(()=>this.layout()?.loopContainerBounds??null);selectedNode_$=g(()=>{let e=this.selectedNodeId();return e?this.nodes_$().find(t=>t.id===e)??null:null});constructor(){Se(()=>{let e=this.layout();e&&this.viewBox_$.set(I({},e.viewBox))},{allowSignalWrites:!0})}handleNodeClick(e){this.nodeClicked.emit(e)}handleDetailClose(){this.detailClosed.emit()}handlePointerDown(e){if(e.button!==0)return;this.isPanning=!0,this.panStartX=e.clientX,this.panStartY=e.clientY;let t=this.viewBox_$();this.panStartViewBoxX=t.x,this.panStartViewBoxY=t.y,this.svgRef&&this.svgRef.nativeElement.setPointerCapture(e.pointerId)}handlePointerMove(e){if(!this.isPanning||!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=n.width/t.clientWidth,s=n.height/t.clientHeight,a=(e.clientX-this.panStartX)*r,h=(e.clientY-this.panStartY)*s;this.viewBox_$.set(w(I({},n),{x:this.panStartViewBoxX-a,y:this.panStartViewBoxY-h}))}handlePointerUp(){this.isPanning=!1}handleWheel(e){if(e.preventDefault(),!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=e.deltaY>0?1.1:.9,s=t.getBoundingClientRect(),a=(e.clientX-s.left)/s.width,h=(e.clientY-s.top)/s.height,l=n.width*r,c=n.height*r;if(l<200||l>5e3)return;let _=n.x+(n.width-l)*a,y=n.y+(n.height-c)*h;this.viewBox_$.set({x:_,y,width:l,height:c})}handleFitToView(){let e=this.nodes_$();if(e.length===0)return;let t=P.recalculateViewBox(e,48);this.viewBox_$.set(t)}handleToggleFollowActive(){this.isFollowActive_$.update(e=>!e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-view"]],viewQuery:function(t,n){if(t&1&&Ge($t,5),t&2){let r;Oe(r=Re())&&(n.svgRef=r.first)}},inputs:{layout:[1,"layout"],activeNodeId:[1,"activeNodeId"],selectedNodeId:[1,"selectedNodeId"],isLoading:[1,"isLoading"]},outputs:{nodeClicked:"nodeClicked",detailClosed:"detailClosed"},standalone:!0,features:[le],decls:25,vars:6,consts:[["graphSvg",""],[1,"flex","flex-col","h-full","w-full","overflow-hidden"],[1,"flex","items-center","gap-2","px-3","py-2","border-b","border-neutral-800","shrink-0","bg-neutral-900/80"],["title","Fit to view",1,"px-2","py-1","text-xs","border","rounded","transition-colors","border-neutral-700","text-neutral-400","hover:text-neutral-200","hover:border-neutral-500",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","inline-block","mr-1"],["d","M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"],["title","Follow active node",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"text-xs","text-neutral-500","ml-auto"],[1,"flex-1","min-h-0","relative"],["preserveAspectRatio","xMidYMid meet",1,"ses-graph-svg",3,"pointerdown","pointermove","pointerup","pointerleave","wheel"],["id","ses-arrow-seq","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#525252"],["id","ses-arrow-loop","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#3b82f6"],["id","ses-arrow-error","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#f97316"],["rx","6","fill","#0f172a","stroke","#1e3a5f","stroke-width","1","stroke-dasharray","4 2","opacity","0.5"],["stroke-width","1.5","fill","none"],["appSesGraphNodeSvg","",3,"node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"node"],["appSesGraphNodeSvg","",3,"nodeClicked","node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"closed","node"]],template:function(t,n){if(t&1){let r=ie();p(0,"div",1)(1,"div",2)(2,"button",3),B("click",function(){return R(r),z(n.handleFitToView())}),H(),p(3,"svg",4),W(4,"path",5),d(),m(5," Fit "),d(),ye(),p(6,"button",6),B("click",function(){return R(r),z(n.handleToggleFollowActive())}),m(7," Follow "),d(),D(8,bt,2,0,"span",7),d(),p(9,"div",8),H(),p(10,"svg",9,0),B("pointerdown",function(a){return R(r),z(n.handlePointerDown(a))})("pointermove",function(a){return R(r),z(n.handlePointerMove(a))})("pointerup",function(){return R(r),z(n.handlePointerUp())})("pointerleave",function(){return R(r),z(n.handlePointerUp())})("wheel",function(a){return R(r),z(n.handleWheel(a))}),p(12,"defs")(13,"marker",10),W(14,"path",11),d(),p(15,"marker",12),W(16,"path",13),d(),p(17,"marker",14),W(18,"path",15),d()(),D(19,Lt,1,4,":svg:rect",16),Le(20,wt,1,4,":svg:path",17,Qe),Le(22,Tt,1,3,":svg:g",18,Qe),d(),D(24,Mt,1,1,"app-ses-graph-node-detail",19),d()()}if(t&2){let r,s;u(6),se(n.isFollowActive_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-400 hover:text-neutral-200 hover:border-neutral-500"),u(2),S(n.isLoading()?8:-1),u(2),Y("viewBox",n.viewBoxStr_$()),u(9),S((r=n.loopBounds_$())?19:-1,r),u(),we(n.edges_$()),u(2),we(n.nodes_$()),u(2),S((s=n.selectedNode_$())?24:-1,s)}},dependencies:[de,$e,Ke],styles:[`@charset "UTF-8";@keyframes _ngcontent-%COMP%_ses-graph-node-pulse{0%,to{filter:drop-shadow(0 0 4px var(--ses-graph-pulse-color, #22d3ee))}50%{filter:drop-shadow(0 0 12px var(--ses-graph-pulse-color, #22d3ee))}}[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.ses-graph-svg[_ngcontent-%COMP%]{width:100%;height:100%;background:#0a0a0a;-webkit-user-select:none;user-select:none} .ses-graph-node--active{animation:_ngcontent-%COMP%_ses-graph-node-pulse 1.5s ease-in-out infinite} .ses-graph-node--active rect{stroke-width:2.5} .ses-graph-node--selected{filter:drop-shadow(0 0 6px rgba(34,211,238,.4))}
|
|
1
|
+
import{c as Ce}from"./chunk-PY7ZXKHG.js";import{b as Ye}from"./chunk-COVCHZOZ.js";import{a as v}from"./chunk-UFBTR2BG.js";import{h as Be,i as Fe}from"./chunk-F4DZS3GH.js";import{I as Ve}from"./chunk-WR6NSOQ2.js";import{Aa as Oe,Ba as Re,C as Z,D as ae,Fa as m,Ga as L,Ha as _e,Ia as ze,J as R,K as z,L as H,M as ye,P as Pe,T as ne,Ta as le,U as F,Z as u,a as I,aa as V,b as w,da as D,fa as Y,ga as me,hb as g,ja as se,jb as Se,k as ke,la as S,oa as Le,p as be,pa as we,qa as p,ra as d,sa as W,ua as ie,ub as de,va as B,wa as C,xb as He,y as xe,za as Ge}from"./chunk-TBMJSIBB.js";var ve=class i{static getEmoji(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"?"\u{1F680}":t==="run-flow-complete"?"\u{1F3AF}":t==="tool-error-retry"?"\u26A0\uFE0F\u{1F9E0}":t.includes("tool-error")||t.includes("error-recovery")?"\u{1F527}\u274C":t.includes("agentic-loop-iteration")?"":o.eventType==="tool-call"||typeof e.toolId=="string"?"\u{1F527}":o.eventType==="llm-call"||typeof e.callType=="string"?"\u{1F9E0}":o.eventType==="error"?"\u26A0\uFE0F":""}static getBubbleClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-500/10 text-green-300 border border-green-500/50":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-500/10 text-orange-300 border border-orange-500/50":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-500/10 text-red-300 border border-red-500/50":t.includes("agentic-loop")?"bg-blue-500/10 text-blue-300 border border-blue-500/50":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-500/10 text-yellow-300 border border-yellow-500/50":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-500/10 text-purple-300 border border-purple-500/50":"bg-neutral-700 text-neutral-200 border border-neonCyan"}static getStepLabel(o){let e=o.data??{},t=e.step,n=e.toolId;if(typeof t=="string"&&t.length>0)return i.formatStepId(t);if(o.eventType==="tool-call"&&typeof n=="string"&&n.length>0)return`Eszk\xF6z: ${n}`;if(o.eventType==="llm-call"){let r=e.callType;return typeof r=="string"?`LLM: ${i.formatStepId(r)}`:"LLM h\xEDv\xE1s"}if(o.eventType==="error"){let r=e.message;return typeof r=="string"&&r.length>0?`Hiba: ${r.substring(0,40)}${r.length>40?"\u2026":""}`:"Hiba"}return o.eventType==="compacting"?typeof t=="string"&&t.length>0?i.formatStepId(t):"Compacting":i.formatEventTypeFallback(o.eventType)}static formatStepId(o){return o.split("-").map(e=>e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e).join(" ")}static getDotClasses(o){let e=o.data??{},t=typeof e.step=="string"?e.step:"";return t==="run-initialization"||t==="run-flow-complete"?"bg-green-400":t==="tool-error-retry"||t.includes("tool-error")||t.includes("error-recovery")?"bg-orange-400":o.eventType==="error"||t.includes("circuit-breaker")?"bg-red-400":t.includes("agentic-loop")?"bg-blue-400":o.eventType==="tool-call"||typeof e.toolId=="string"?"bg-yellow-400":o.eventType==="llm-call"||typeof e.callType=="string"?"bg-purple-400":"bg-neutral-400"}static formatEventTypeFallback(o){return{step:"L\xE9p\xE9s","tool-call":"Eszk\xF6zh\xEDv\xE1s","context-update":"Kontextus friss\xEDt\xE9s",compacting:"Compacting","llm-call":"LLM h\xEDv\xE1s","session-event":"Session event",error:"Hiba"}[o]??o}};var x=function(i){return i.pending="pending",i.active="active",i.completed="completed",i.error="error",i}(x||{});var tt={[v.runInitialization]:"milestone-init",[v.analyze]:"phase-analyze",[v.analyzeResult]:"llm-analyze",[v.assemble]:"phase-assemble",[v.execution]:"phase-execution",[v.executionStart]:"phase-execution",[v.finalization]:"phase-finalization",[v.llmRunFinalization]:"llm-finalization",[v.postFinalization]:"phase-finalization",[v.runFlowComplete]:"milestone-complete"},nt=["milestone-init","phase-analyze","llm-analyze","phase-assemble","phase-execution","phase-finalization","llm-finalization","milestone-complete"],N=class i{static mapPhaseToNodeId(o){return tt[o]??null}static computeStateTransitions(o){let e=i.mapPhaseToNodeId(o);if(!e)return[];let t=[],n=!1;for(let r of nt)r===e?(t.push({nodeId:r,state:x.active}),n=!0):n||t.push({nodeId:r,state:x.completed});return t}static extractIterationData(o){let e=o.action;if(typeof e!="string")return null;let t=o.tool,n=typeof t=="string"?t:"",r=o.intent,s=typeof r=="string"?r:"",a=o.iterationCount;return{actionType:e,tool:n,intent:s,iterationIndex:typeof a=="number"?a:0}}static mapMonitoringEventToIterationNodeId(o,e){let t=o.data??{},n=t.step,r=typeof n=="string"?n:"",s=`iter-${e}`;if(o.eventType==="llm-call"){let a=t.callType;if(a==="agentic-loop")return`${s}-llm-decision`;if(a==="tool-description")return`${s}-tool-desc`;if(a==="tool-error-retry")return`${s}-tool-error-retry`;if(a==="tool-result-chunking")return`${s}-tool-chunking`;if(a==="goal-state-update")return`${s}-goal-update`}return o.eventType==="tool-call"?`${s}-tool-call`:o.eventType==="error"||r.includes("tool-error")?`${s}-tool-call`:null}static isTerminalPhase(o){return o===v.runFlowComplete}static SKELETON_LLM_NODE_MAP={analyze:"llm-analyze","run-finalization":"llm-finalization"};static LLM_CALL_PHASE_MAP={analyze:"phase-analyze","subanalyze-run-tasks":"phase-analyze","instant-reply":"phase-execution","run-finalization":"phase-finalization","chat-history-compacting":"phase-execution","execution-history-compacting":"phase-execution","soul-compacting":"phase-execution","context-compacting":"phase-execution","message-interceptor":"phase-execution"};static ITERATION_LLM_CALL_TYPES=new Set(["agentic-loop","tool-description","tool-error-retry","tool-result-chunking","goal-state-update"]);static LLM_CALL_LABEL_MAP={analyze:"LLM: Analyze","subanalyze-run-tasks":"LLM: Subanalyze","instant-reply":"LLM: Instant Reply","agentic-loop":"LLM Decision","tool-description":"Tool Description","tool-error-retry":"LLM: Error Retry","run-finalization":"LLM: Summary","chat-history-compacting":"LLM: Compact Chat","execution-history-compacting":"LLM: Compact Exec","soul-compacting":"LLM: Compact Soul","context-compacting":"LLM: Compact Ctx","tool-result-chunking":"LLM: Chunking","goal-state-update":"LLM: Goal Update","message-interceptor":"LLM: Msg Intercept"};static getPreCreatedSkeletonNodeId(o){return i.SKELETON_LLM_NODE_MAP[o]??null}static getLlmCallPhaseId(o){return i.LLM_CALL_PHASE_MAP[o]??null}static isIterationLlmCall(o){return i.ITERATION_LLM_CALL_TYPES.has(o)}static getLlmCallLabel(o){return i.LLM_CALL_LABEL_MAP[o]??`LLM: ${o}`}};var k=function(i){return i.sequential="sequential",i.loopEntry="loop-entry",i.errorRetry="error-retry",i}(k||{});var f=function(i){return i.phase="phase",i.milestone="milestone",i.llmCall="llm-call",i.toolCall="tool-call",i.toolError="tool-error",i.loopIteration="loop-iteration",i.action="action",i.error="error",i}(f||{});var je="milestone-init",Ee="phase-analyze",it="llm-analyze",Me="phase-assemble",ee="phase-execution",he="phase-finalization",Ae="llm-finalization",De="milestone-complete",P=class i{static buildSkeletonLayout(){let o=48+220/2,e=48,t=[],n=[],r=i.createNode({id:je,category:f.milestone,label:"Initialization",phase:v.runInitialization,x:o-200/2,y:e,width:200,height:48});t.push(r),e+=84;let s=i.createNode({id:Ee,category:f.phase,label:"Analyze",phase:v.analyze,x:o-220/2,y:e,width:220,height:60});t.push(s);let a=i.createNode({id:it,category:f.llmCall,label:"LLM: Analyze",phase:v.analyzeResult,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:Ee});t.push(a),n.push(i.createEdge(je,Ee,k.sequential)),e+=96;let h=i.createNode({id:Me,category:f.phase,label:"Assemble",phase:v.assemble,x:o-220/2,y:e,width:220,height:60});t.push(h),n.push(i.createEdge(Ee,Me,k.sequential)),e+=96;let l=i.createNode({id:ee,category:f.phase,label:"Execution",phase:v.execution,x:o-220/2,y:e,width:220,height:60});t.push(l),n.push(i.createEdge(Me,ee,k.sequential)),e+=96;let c=i.createNode({id:he,category:f.phase,label:"Finalization",phase:v.finalization,x:o-220/2,y:e,width:220,height:60});t.push(c);let _=i.createNode({id:Ae,category:f.llmCall,label:"LLM: Summary",phase:v.llmRunFinalization,x:o+220/2+28,y:e+16/2,width:160,height:44,parentId:he});t.push(_),n.push(i.createEdge(ee,he,k.sequential)),e+=96;let y=i.createNode({id:De,category:f.milestone,label:"Flow Complete",phase:v.runFlowComplete,x:o-200/2,y:e,width:200,height:48});t.push(y),n.push(i.createEdge(he,De,k.sequential));let T=i.recalculateViewBox(t,48);return{nodes:t,edges:n,viewBox:T,loopContainerBounds:null}}static addIterationColumn(o,e,t,n){let r=o.nodes.map(b=>I({},b)),s=[...o.edges],a=r.find(b=>b.id===ee);if(!a)return o;let h=a.x+20+e*208,l=a.y+60+20,c=`iter-${e}`,_=l,y=[],T=i.createNode({id:`${c}-llm-decision`,category:f.llmCall,label:"LLM Decision",phase:v.llmAgenticLoop,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(T),_+=68;let M=i.formatActionLabel(t),O=i.createNode({id:`${c}-action`,category:f.action,label:M,phase:v.agenticLoopIteration,x:h+20/2,y:_,width:140,height:32,parentId:ee,iterationIndex:e,data:n});if(y.push(O),_+=56,t==="tool-select"){let b=i.createNode({id:`${c}-tool-desc`,category:f.llmCall,label:"Tool Description",phase:v.llmToolDescription,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e});y.push(b),_+=68;let q=n.tool,Q=typeof q=="string"?q:"tool",te=i.createNode({id:`${c}-tool-call`,category:f.toolCall,label:Q,phase:null,x:h,y:_,width:160,height:44,parentId:ee,iterationIndex:e,data:n});y.push(te),_+=68}for(let b=0;b<y.length-1;b++)s.push(i.createEdge(y[b].id,y[b+1].id,k.sequential));r.push(...y);let E=20*2+(e+1)*180+e*28,j=60+20*2+(_-l);a.width=Math.max(a.width,E),a.height=Math.max(a.height,j);let K=a.y+a.height,A=[he,Ae,De],ue=K+36;for(let b of A){let q=r.find(Q=>Q.id===b);if(q){if(b===Ae){let Q=r.find(te=>te.id===he);Q&&(q.y=Q.y+16/2);continue}q.y=ue,ue+=q.height+36}}let ge={x:a.x,y:a.y+60,width:a.width,height:a.height-60},J=r,Je=s.map(b=>{let q=J.find(te=>te.id===b.sourceNodeId),Q=J.find(te=>te.id===b.targetNodeId);return!q||!Q?b:w(I({},b),{pathD:i.computeEdgePath(q,Q,b.category)})}),et=i.recalculateViewBox(J,48);return{nodes:J,edges:Je,viewBox:et,loopContainerBounds:ge}}static computeEdgePath(o,e,t){let n=o.x+o.width/2,r=o.y+o.height,s=e.x+e.width/2,a=e.y;if(Math.abs(n-s)<20)return`M ${n} ${r} L ${s} ${a}`;let h=o.x+o.width,l=o.y+o.height/2,c=e.x,_=e.y+e.height/2;if(e.parentId===o.id)return`M ${h} ${l} L ${c} ${_}`;let y=r+(a-r)/2;return`M ${n} ${r} L ${n} ${y} L ${s} ${y} L ${s} ${a}`}static recalculateViewBox(o,e){if(o.length===0)return{x:0,y:0,width:600,height:400};let t=1/0,n=1/0,r=-1/0,s=-1/0;for(let a of o)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),s=Math.max(s,a.y+a.height);return{x:t-e,y:n-e,width:r-t+e*2,height:s-n+e*2}}static addDynamicLlmNode(o,e,t,n,r,s){let a=o.nodes.map(A=>I({},A)),h=[...o.edges],l=a.find(A=>A.id===e);if(!l)return o;let c,_;l.category===f.phase||l.category===f.milestone?(c=l.x+l.width+28,_=l.y+(l.height-44)/2):(c=l.x,_=l.y+l.height+24);let T=i.createNode({id:t,category:f.llmCall,label:n,phase:null,x:c,y:_,width:160,height:44,parentId:r,iterationIndex:s??void 0});a.push(T),h.push(i.createEdge(e,t,k.sequential));let M=T.y+T.height;s!=null?i.expandExecutionContainer(a,M):i.shiftDownstreamIfOverlap(a,r,M);let O=o.loopContainerBounds,E=a.find(A=>A.id==="phase-execution");E&&E.height>60&&(O={x:E.x,y:E.y+60,width:E.width,height:E.height-60});let j=h.map(A=>{let ue=a.find(J=>J.id===A.sourceNodeId),ge=a.find(J=>J.id===A.targetNodeId);return!ue||!ge?A:w(I({},A),{pathD:i.computeEdgePath(ue,ge,A.category)})}),K=i.recalculateViewBox(a,48);return{nodes:a,edges:j,viewBox:K,loopContainerBounds:O}}static expandExecutionContainer(o,e){let t=o.find(l=>l.id==="phase-execution");if(!t)return;let n=t.y+60+20,r=60+20*2+(e+24-n);if(r<=t.height)return;t.height=r;let s=t.y+t.height,a=["phase-finalization","llm-finalization","milestone-complete"],h=s+36;for(let l of a){let c=o.find(_=>_.id===l);if(c){if(l==="llm-finalization"){let _=o.find(y=>y.id==="phase-finalization");_&&(c.y=_.y+16/2);continue}c.y<h&&(c.y=h),h=c.y+c.height+36}}for(let l of o)if(l.parentId==="phase-finalization"&&l.id!=="llm-finalization"&&l.category===f.llmCall){let c=o.find(_=>_.id==="phase-finalization");c&&(l.y=Math.max(l.y,c.y))}}static shiftDownstreamIfOverlap(o,e,t){let n=["milestone-init","phase-analyze","phase-assemble","phase-execution","phase-finalization","milestone-complete"],r=n.indexOf(e);if(r<0||r>=n.length-1)return;let s=n[r+1],a=o.find(_=>_.id===s);if(!a||t+36<=a.y)return;let h=t+36-a.y,l=new Set;for(let _ of o)_.parentId===e&&_.category===f.llmCall&&l.add(_.id);let c=a.y;for(let _ of o)_.y>=c&&!l.has(_.id)&&(_.y+=h)}static createNode(o){return{id:o.id,category:o.category,state:x.pending,label:o.label,phase:o.phase,x:o.x,y:o.y,width:o.width,height:o.height,data:o.data??{},iterationIndex:o.iterationIndex??null,parentId:o.parentId??null,monitoringEvent:null}}static createEdge(o,e,t){let n=t===k.errorRetry?"#f97316":t===k.loopEntry?"#3b82f6":"#525252",r=t===k.loopEntry?"8 4":t===k.errorRetry?"6 3":"none",s=t===k.errorRetry?"url(#ses-arrow-error)":t===k.loopEntry?"url(#ses-arrow-loop)":"url(#ses-arrow-seq)";return{id:`edge-${o}-${e}`,category:t,sourceNodeId:o,targetNodeId:e,pathD:"",strokeColor:n,strokeDashArray:r,markerEnd:s}}static formatActionLabel(o){return{"tool-select":"Tool Select","tool-group-open":"Tool Group","context-handling":"Context","loop-debrief":"Debrief",result:"Result"}[o]??o}};var qe=(()=>{class i{baseUrl=`${Ve.api.baseUrl}/session`;http=Z(He);getEvents(e){let t=encodeURIComponent(e.trim());return be(this.http.get(`${this.baseUrl}/${t}/events`))}getRunTrace(e){let t=e.sessionId.trim(),n=encodeURIComponent(e.runId.trim());return be(this.http.get(`${this.baseUrl}/${encodeURIComponent(t)}/runs/${n}/trace`))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ze=(()=>{class i{session_DS=Z(Ce);monitoring_AS=Z(qe);destroyRef=Z(Pe);graphLayout_$=V(null);activeNodeId_$=V("");selectedNodeId_$=V("");isLive_$=V(!1);isGraphOpen_$=V(!1);graphSessionId_$=V("");graphRunId_$=V("");isLoading_$=V(!1);currentIterationIndex=-1;monitoringSubscription=null;lastAppliedPhase="";phaseRightColumnLast={};iterationColumnLast={};dynamicNodeCounter=0;constructor(){Se(()=>{let e=this.session_DS.agentEvents_$();!this.isGraphOpen_$()||!this.isLive_$()||this.applyAgentEvent(e)},{allowSignalWrites:!0}),this.destroyRef.onDestroy(()=>{this.disposeSubscriptions()})}openGraphForRun(e,t,n){this.disposeSubscriptions(),this.resetState(),this.graphSessionId_$.set(e),this.graphRunId_$.set(t),this.isLive_$.set(n),this.isGraphOpen_$.set(!0),n?this.initLiveGraph():this.loadHistoricalGraph(e,t)}closeGraph(){this.disposeSubscriptions(),this.isGraphOpen_$.set(!1),this.selectedNodeId_$.set("")}selectNode(e){let t=this.selectedNodeId_$();this.selectedNodeId_$.set(t===e?"":e)}clearSelection(){this.selectedNodeId_$.set("")}initLiveGraph(){let e=P.buildSkeletonLayout(),t=this.recalculateEdgePaths(e);this.graphLayout_$.set(t),this.phaseRightColumnLast={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},this.iterationColumnLast={},this.monitoringSubscription=this.session_DS.monitoringEvent_S.subscribe(n=>{n.sessionId===this.graphSessionId_$()&&this.applyMonitoringEvent(n.event)})}applyAgentEvent(e){let t=e.phase;if(typeof t!="string"||t.length===0||t===this.lastAppliedPhase)return;if(this.lastAppliedPhase=t,t===v.agenticLoopIteration){let r=N.extractIterationData(e);r&&this.addIteration(r);return}let n=N.computeStateTransitions(t);n.length!==0&&(this.applyStateTransitions(n),N.isTerminalPhase(t)&&this.markAllIterationNodesCompleted())}addIteration(e){let t=this.graphLayout_$();if(!t)return;this.currentIterationIndex=e.iterationIndex,this.markPreviousIterationCompleted(e.iterationIndex);let n=P.addIterationColumn(t,e.iterationIndex,e.actionType,{tool:e.tool,intent:e.intent}),r=e.actionType==="tool-select"?`iter-${e.iterationIndex}-tool-call`:`iter-${e.iterationIndex}-action`;this.iterationColumnLast[e.iterationIndex]=r;let s=`iter-${e.iterationIndex}-llm-decision`,a=this.setNodeState(n,s,x.active);this.activeNodeId_$.set(s),this.graphLayout_$.set(this.recalculateEdgePaths(a))}markPreviousIterationCompleted(e){if(e<=0)return;let t=this.graphLayout_$();if(!t)return;let n=`iter-${e-1}`,r=t;for(let s of t.nodes)s.id.startsWith(n)&&s.state!==x.error&&(r=this.setNodeState(r,s.id,x.completed));this.graphLayout_$.set(r)}applyMonitoringEvent(e){let t=this.graphLayout_$();if(!t)return;let n=typeof e.eventType=="string"?e.eventType:"",r=typeof e.status=="string"?e.status:"",s=i.toRecord(e.data),a=typeof e.durationMs=="number"?e.durationMs:0,h=typeof e.inputSize=="number"?e.inputSize:0,l=typeof e.outputSize=="number"?e.outputSize:0,c={eventType:n,timestamp:new Date,data:s,durationMs:a,status:r,sessionId:this.graphSessionId_$(),runId:this.graphRunId_$(),inputSize:h,outputSize:l};if(n==="llm-call"){this.handleLlmCallMonitoringEvent(c,t);return}if(this.currentIterationIndex<0)return;let _=N.mapMonitoringEventToIterationNodeId(c,this.currentIterationIndex);if(!_)return;let y=this.enrichNodeWithMonitoringEvent(t,_,c);y&&this.graphLayout_$.set(y)}handleLlmCallMonitoringEvent(e,t){let n=e.data?.callType,r=typeof n=="string"?n:"";if(!r)return;let s=N.getPreCreatedSkeletonNodeId(r);if(s){let h=this.enrichNodeWithMonitoringEvent(t,s,e);h&&this.graphLayout_$.set(h);return}if(N.isIterationLlmCall(r)&&this.currentIterationIndex>=0){let h=N.mapMonitoringEventToIterationNodeId(e,this.currentIterationIndex);if(h){if(t.nodes.findIndex(c=>c.id===h)>=0){let c=this.enrichNodeWithMonitoringEvent(t,h,e);c&&this.graphLayout_$.set(c)}else this.createDynamicIterationLlmNode(t,r,h,e);return}}let a=N.getLlmCallPhaseId(r);a&&this.createDynamicSkeletonLlmNode(t,r,a,e)}enrichNodeWithMonitoringEvent(e,t,n){let r=e.nodes.findIndex(_=>_.id===t);if(r<0)return null;let s=n.data??{},a=n.status==="error",h=n.durationMs??0,l=a?x.error:h>0?x.completed:x.active,c=[...e.nodes];return c[r]=w(I({},c[r]),{state:l,monitoringEvent:n,data:w(I(I({},c[r].data),s),{durationMs:h})}),this.activeNodeId_$.set(l===x.active?t:""),w(I({},e),{nodes:c})}createDynamicSkeletonLlmNode(e,t,n,r){this.dynamicNodeCounter++;let s=`llm-dyn-${this.dynamicNodeCounter}`,a=N.getLlmCallLabel(t),h=this.phaseRightColumnLast[n]??n,l=P.addDynamicLlmNode(e,h,s,a,n,null);this.phaseRightColumnLast[n]=s;let c=this.enrichNodeWithMonitoringEvent(l,s,r);this.graphLayout_$.set(c??l)}createDynamicIterationLlmNode(e,t,n,r){let s=N.getLlmCallLabel(t),a=this.iterationColumnLast[this.currentIterationIndex]??`iter-${this.currentIterationIndex}-action`,h=P.addDynamicLlmNode(e,a,n,s,"phase-execution",this.currentIterationIndex);this.iterationColumnLast[this.currentIterationIndex]=n;let l=this.enrichNodeWithMonitoringEvent(h,n,r);this.graphLayout_$.set(l??h)}loadHistoricalGraph(e,t){return ke(this,null,function*(){this.isLoading_$.set(!0);try{let n=yield this.monitoring_AS.getRunTrace({sessionId:e,runId:t});this.buildHistoricalGraph(n.trace)}catch{let n=P.buildSkeletonLayout();this.graphLayout_$.set(this.recalculateEdgePaths(n))}finally{this.isLoading_$.set(!1)}})}buildHistoricalGraph(e){let t=P.buildSkeletonLayout();t=this.recalculateEdgePaths(t);let n="",r=-1,s={"phase-analyze":"llm-analyze","phase-finalization":"llm-finalization"},a={},h=0;for(let l of e){let c=l.data??{},_=c.step,y=typeof _=="string"?_:"";if(y.length>0&&N.mapPhaseToNodeId(y)&&y!==n){n=y;let M=N.computeStateTransitions(y);for(let O of M)t=this.setNodeState(t,O.nodeId,O.state)}if(y==="agentic-loop-iteration"||y.includes("agentic-loop")){let T=c.action,M=typeof T=="string"?T:"",O=c.tool,E=typeof O=="string"?O:"";if(M.length>0){r++,t=P.addIterationColumn(t,r,M,{tool:E});let j=M==="tool-select"?`iter-${r}-tool-call`:`iter-${r}-action`;a[r]=j}}if(l.eventType==="llm-call"){let T=c.callType,M=typeof T=="string"?T:"";if(M){let O=N.getPreCreatedSkeletonNodeId(M);if(O)t=this.enrichHistoricalNode(t,O,l,c);else if(N.isIterationLlmCall(M)&&r>=0){let E=N.mapMonitoringEventToIterationNodeId(l,r);if(E)if(t.nodes.findIndex(K=>K.id===E)>=0)t=this.enrichHistoricalNode(t,E,l,c);else{let K=N.getLlmCallLabel(M),A=a[r]??`iter-${r}-action`;t=P.addDynamicLlmNode(t,A,E,K,"phase-execution",r),t=this.enrichHistoricalNode(t,E,l,c),a[r]=E}}else{let E=N.getLlmCallPhaseId(M);if(E){h++;let j=`llm-dyn-${h}`,K=N.getLlmCallLabel(M),A=s[E]??E;t=P.addDynamicLlmNode(t,A,j,K,E,null),t=this.enrichHistoricalNode(t,j,l,c),s[E]=j}}}continue}if(r>=0){let T=N.mapMonitoringEventToIterationNodeId(l,r);T&&(t=this.enrichHistoricalNode(t,T,l,c))}}if(n===v.runFlowComplete)for(let l of t.nodes)l.state===x.pending&&(t=this.setNodeState(t,l.id,x.completed));this.graphLayout_$.set(this.recalculateEdgePaths(t))}enrichHistoricalNode(e,t,n,r){let s=e.nodes.findIndex(h=>h.id===t);if(s<0)return e;let a=[...e.nodes];return a[s]=w(I({},a[s]),{state:n.status==="error"?x.error:x.completed,monitoringEvent:n,data:w(I(I({},a[s].data),r),{durationMs:n.durationMs})}),w(I({},e),{nodes:a})}applyStateTransitions(e){let t=this.graphLayout_$();if(!t)return;let n="";for(let r of e)t=this.setNodeState(t,r.nodeId,r.state),r.state===x.active&&(n=r.nodeId);this.activeNodeId_$.set(n),this.graphLayout_$.set(t)}setNodeState(e,t,n){let r=e.nodes.findIndex(a=>a.id===t);if(r<0)return e;let s=[...e.nodes];return s[r]=w(I({},s[r]),{state:n}),w(I({},e),{nodes:s})}markAllIterationNodesCompleted(){let e=this.graphLayout_$();if(!e)return;let t=e;for(let n of e.nodes)n.iterationIndex!=null&&n.state!==x.error&&(t=this.setNodeState(t,n.id,x.completed));this.graphLayout_$.set(t)}recalculateEdgePaths(e){let t=e.edges.map(n=>{let r=e.nodes.find(a=>a.id===n.sourceNodeId),s=e.nodes.find(a=>a.id===n.targetNodeId);return!r||!s?n:w(I({},n),{pathD:P.computeEdgePath(r,s,n.category)})});return w(I({},e),{edges:t})}resetState(){this.graphLayout_$.set(null),this.activeNodeId_$.set(""),this.selectedNodeId_$.set(""),this.currentIterationIndex=-1,this.lastAppliedPhase="",this.isLoading_$.set(!1),this.dynamicNodeCounter=0,this.phaseRightColumnLast={},this.iterationColumnLast={}}disposeSubscriptions(){this.monitoringSubscription&&(this.monitoringSubscription.unsubscribe(),this.monitoringSubscription=null)}static toRecord(e){return typeof e!="object"||e==null?{}:JSON.parse(JSON.stringify(e))}static \u0275fac=function(t){return new(t||i)};static \u0275prov=xe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var ot=["appSesGraphNodeSvg",""];function rt(i,o){if(i&1&&(H(),p(0,"text",1),m(1),d()),i&2){let e=C();Y("x",10)("y",e.node().height/2+1),u(),L(e.icon_$())}}function at(i,o){if(i&1&&(H(),p(0,"text",3),m(1),d()),i&2){let e=C();Y("x",e.node().width-10)("y",12)("fill",e.node().state==="error"?"#ef4444":"#22c55e"),u(),L(e.stateIcon_$())}}function st(i,o){if(i&1&&(H(),p(0,"text",4),m(1),d()),i&2){let e=C();Y("x",e.node().width-8)("y",e.node().height-8),u(),_e("",e.durationMs_$(),"ms")}}var $e=class i{node=F.required();isHighlighted=F(!1);isSelected=F(!1);nodeClicked=ne();fillColor_$=g(()=>{let o=this.node();return o.state===x.pending?"#262626":i.CATEGORY_FILL_MAP[o.category]??"#262626"});strokeColor_$=g(()=>{let o=this.node();return o.state===x.error?"#ef4444":o.state===x.pending?"#525252":i.CATEGORY_STROKE_MAP[o.category]??"#737373"});strokeDashArray_$=g(()=>this.node().state===x.pending?"6 3":"none");textColor_$=g(()=>this.node().state===x.pending?"#737373":"#e5e5e5");opacity_$=g(()=>this.node().state===x.pending?.5:1);borderRadius_$=g(()=>this.node().category===f.action?16:8);icon_$=g(()=>{let o=this.node().category;return i.CATEGORY_ICON_MAP[o]??""});stateIcon_$=g(()=>{let o=this.node().state;return o===x.completed?"\u2713":o===x.error?"\u2715":""});animationClass_$=g(()=>this.node().state===x.active||this.isHighlighted()?"ses-graph-node--active":this.isSelected()?"ses-graph-node--selected":"");durationMs_$=g(()=>this.node().data.durationMs??0);handleClick(){this.nodeClicked.emit(this.node().id)}static CATEGORY_FILL_MAP={[f.phase]:"#1a1a2e",[f.milestone]:"#052e16",[f.llmCall]:"#1e1033",[f.toolCall]:"#2e2a05",[f.toolError]:"#2e1505",[f.loopIteration]:"#0a1628",[f.action]:"#1a1a2e",[f.error]:"#2e0505"};static CATEGORY_STROKE_MAP={[f.phase]:"#525252",[f.milestone]:"#22c55e",[f.llmCall]:"#a855f7",[f.toolCall]:"#eab308",[f.toolError]:"#f97316",[f.loopIteration]:"#3b82f6",[f.action]:"#3b82f6",[f.error]:"#ef4444"};static CATEGORY_ICON_MAP={[f.milestone]:"\u26A1",[f.llmCall]:"\u{1F9E0}",[f.toolCall]:"\u{1F527}",[f.toolError]:"\u26A0\uFE0F",[f.error]:"\u274C"};static \u0275fac=function(e){return new(e||i)};static \u0275cmp=ae({type:i,selectors:[["","appSesGraphNodeSvg",""]],inputs:{node:[1,"node"],isHighlighted:[1,"isHighlighted"],isSelected:[1,"isSelected"]},outputs:{nodeClicked:"nodeClicked"},standalone:!0,features:[le],attrs:ot,decls:7,vars:21,consts:[[2,"cursor","pointer",3,"click"],["dominant-baseline","central","text-anchor","start","font-size","14"],["dominant-baseline","central"],["text-anchor","end","dominant-baseline","central","font-size","11","font-weight","700"],["text-anchor","end","dominant-baseline","auto","fill","#737373","font-size","9"]],template:function(e,t){e&1&&(H(),p(0,"g",0),B("click",function(){return t.handleClick()}),W(1,"rect"),D(2,rt,2,3,":svg:text",1),p(3,"text",2),m(4),d(),D(5,at,2,4,":svg:text",3)(6,st,2,3,":svg:text",4),d()),e&2&&(se(t.animationClass_$()),Y("transform","translate("+t.node().x+","+t.node().y+")")("opacity",t.opacity_$()),u(),Y("width",t.node().width)("height",t.node().height)("rx",t.borderRadius_$())("fill",t.fillColor_$())("stroke",t.strokeColor_$())("stroke-width",t.isSelected()?2.5:1.5)("stroke-dasharray",t.strokeDashArray_$()),u(),S(t.icon_$()?2:-1),u(),Y("x",t.icon_$()?30:t.node().width/2)("y",t.node().height/2+1)("text-anchor",t.icon_$()?"start":"middle")("fill",t.textColor_$())("font-size",t.node().category==="phase"||t.node().category==="milestone"?14:12)("font-weight",t.node().category==="phase"||t.node().category==="milestone"?600:400),u(),L(t.node().label),u(),S(t.stateIcon_$()?5:-1),u(),S(t.durationMs_$()?6:-1))},dependencies:[de],encapsulation:2})};function lt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Phase"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.node().phase)}}function dt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Step"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.stepLabel_$())}}function ct(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Duration"),d(),p(3,"span",9),m(4),d()()),i&2){let e=C();u(4),L(e.durationLabel_$())}}function pt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Tool"),d(),p(3,"span",12),m(4),d()()),i&2){let e=C();u(4),L(e.toolId_$())}}function ht(i,o){if(i&1&&(p(0,"div",10)(1,"span",13),m(2,"Intent"),d(),p(3,"span",14),m(4),d()()),i&2){let e=C();u(4),L(e.intent_$())}}function ut(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Iteration"),d(),p(3,"span",15),m(4),d()()),i&2){let e=C();u(4),_e("#",e.node().iterationIndex,"")}}function mt(i,o){if(i&1&&(p(0,"span",13),m(1," In: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.inputSize_$())}}function _t(i,o){if(i&1&&(p(0,"span",13),m(1," Out: "),p(2,"span",9),m(3),d()()),i&2){let e=C(2);u(3),L(e.outputSize_$())}}function ft(i,o){if(i&1&&(p(0,"div",11),D(1,mt,4,1,"span",13)(2,_t,4,1,"span",13),d()),i&2){let e=C();u(),S(e.inputSize_$()>0?1:-1),u(),S(e.outputSize_$()>0?2:-1)}}function gt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Provider"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedProvider_$())}}function xt(i,o){if(i&1&&(p(0,"div",7)(1,"span",8),m(2,"Model"),d(),p(3,"span",26),m(4),d()()),i&2){let e=C(3);u(4),L(e.usedModel_$())}}function yt(i,o){if(i&1&&(p(0,"span",13),m(1," Cost: "),p(2,"span",27),m(3),d()()),i&2){let e=C(4);u(3),L(e.costUsd_$())}}function St(i,o){if(i&1&&(p(0,"div",25)(1,"span",13),m(2," Tokens: "),p(3,"span",9),m(4),d()(),D(5,yt,4,1,"span",13),d()),i&2){let e=C(3);u(4),L(e.tokenInfo_$().total),u(),S(e.costUsd_$()?5:-1)}}function Ct(i,o){if(i&1&&(p(0,"div",16)(1,"div",23),m(2,"Used"),d(),p(3,"div",24),D(4,gt,5,1,"div",7)(5,xt,5,1,"div",7)(6,St,6,2,"div",25),d()()),i&2){let e=C(2);u(4),S(e.usedProvider_$()?4:-1),u(),S(e.usedModel_$()?5:-1),u(),S(e.tokenInfo_$()?6:-1)}}function vt(i,o){if(i&1){let e=ie();p(0,"button",28),B("click",function(){R(e);let n=C(2);return z(n.handleClearOverride())}),m(1," Clear "),d()}}function It(i,o){i&1&&(p(0,"div",21),m(1," Session override active "),d())}function Et(i,o){if(i&1&&(p(0,"div",22)(1,"div",29),m(2,"Global default"),d(),p(3,"div",30),m(4),d()()),i&2){let e=C(2);u(4),ze(" ",e.globalDefault_$().provider," / ",e.globalDefault_$().model," ")}}function Nt(i,o){if(i&1){let e=ie();D(0,Ct,7,3,"div",16),p(1,"div",16)(2,"div",17)(3,"div",18),m(4),d(),D(5,vt,2,0,"button",19),d(),p(6,"app-s-registry-provider-model-select",20),B("modelChange",function(n){R(e);let r=C();return z(r.handleModelChange(n))}),d(),D(7,It,2,0,"div",21),d(),D(8,Et,5,2,"div",22)}if(i&2){let e=C();S(e.usedProvider_$()||e.usedModel_$()?0:-1),u(4),_e(" Override: ",e.callTypeLabel_$()," "),u(),S(e.hasSessionOverride_$()?5:-1),u(),me("selectedProvider",e.selectedProvider_$())("selectedModel",e.selectedModel_$()),u(),S(e.hasSessionOverride_$()?7:-1),u(),S(e.globalDefault_$()?8:-1)}}var Ke=(()=>{class i{graph_DS=Z(Ze);session_DS=Z(Ce);registrySsot_CS=Z(Be);node=F.required();closed=ne();stateLabel_$=g(()=>({pending:"Pending",active:"Active",completed:"Completed",error:"Error"})[this.node().state]??this.node().state);durationLabel_$=g(()=>{let e=this.node().data.durationMs;return!e||e<=0?"":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`});toolId_$=g(()=>{let e=this.node().data,t=e.toolId??e.tool;return typeof t=="string"?t:""});intent_$=g(()=>{let e=this.node().data.intent;return typeof e=="string"?e:""});stepLabel_$=g(()=>{let e=this.node().data.step;return typeof e!="string"||e.length===0?"":ve.formatStepId(e)});inputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.inputSize??0:0});outputSize_$=g(()=>{let e=this.node().monitoringEvent;return e?e.outputSize??0:0});stateColorClass_$=g(()=>({pending:"text-neutral-500",active:"text-cyan-400",completed:"text-green-400",error:"text-red-400"})[this.node().state]??"text-neutral-400");isLlmCall_$=g(()=>this.node().category===f.llmCall);callType_$=g(()=>{let e=this.node().data?.callType;return typeof e=="string"?e:""});callTypeLabel_$=g(()=>{let e=this.callType_$();return Ye[e]??e});usedProvider_$=g(()=>{let e=this.node().data?.provider;return typeof e=="string"?e:""});usedModel_$=g(()=>{let e=this.node().data?.model;return typeof e=="string"?e:""});sessionOverride_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$();if(!t)return null;let r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.llmCallTypeOverrides;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});globalDefault_$=g(()=>{let e=this.callType_$();if(!e)return null;let t=this.graph_DS.graphSessionId_$(),r=this.session_DS.sessionInfoMap_$().get(t);if(!r)return null;let s=r.globalCallTypeDefaults;if(!s)return null;let a=s[e];if(typeof a!="object"||!a)return null;let h=a,l=h.provider,c=h.model;return typeof l=="string"&&typeof c=="string"?{provider:l,model:c}:null});selectedProvider_$=g(()=>this.sessionOverride_$()?.provider??"");selectedModel_$=g(()=>this.sessionOverride_$()?.model??"");hasSessionOverride_$=g(()=>this.sessionOverride_$()!==null);tokenInfo_$=g(()=>{let e=this.node().data,t=e.promptTokens,n=e.completionTokens,r=e.totalTokens;return typeof r!="number"||r<=0?null:{prompt:typeof t=="number"?t:0,completion:typeof n=="number"?n:0,total:r}});costUsd_$=g(()=>{let e=this.node().data?.costUsd;return typeof e!="number"||e<=0?"":`$${e.toFixed(4)}`});handleClose(){this.closed.emit()}handleProviderChange(e){}handleModelChange(e){let t=this.callType_$(),n=this.graph_DS.graphSessionId_$();if(!t||!n||!e)return;let s=this.registrySsot_CS.enabledLlmModels_$().find(a=>a.modelName===e);s&&this.applySessionOverride(n,t,s.provider,s.modelName)}handleClearOverride(){let e=this.callType_$(),t=this.graph_DS.graphSessionId_$();!e||!t||this.clearSessionOverride(t,e)}applySessionOverride(e,t,n,r){let h=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},l=w(I({},h),{[t]:{provider:n,model:r}});this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:l}}).then(()=>{this.session_DS.loadSessionInfo(e)})}clearSessionOverride(e,t){let s=this.session_DS.sessionInfoMap_$().get(e)?.llmCallTypeOverrides??{},a=I({},s);Reflect.deleteProperty(a,t);let h=Object.keys(a).length>0;this.session_DS.updateSession({sessionId:e,updates:{llmCallTypeOverrides:h?a:null}}).then(()=>{this.session_DS.loadSessionInfo(e)})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-node-detail"]],inputs:{node:[1,"node"]},outputs:{closed:"closed"},standalone:!0,features:[le],decls:26,vars:13,consts:[[1,"w-80","max-h-[28rem]","overflow-y-auto","rounded-lg","border","border-neonCyan/30","bg-neutral-900/95","shadow-lg","backdrop-blur-sm","p-3"],[1,"flex","items-start","justify-between","gap-2","mb-2"],[1,"text-sm","font-semibold","text-neutral-200","leading-tight"],["title","Bez\xE1r\xE1s","aria-label","Bez\xE1r\xE1s",1,"p-1","min-h-[28px]","min-w-[28px]","flex","items-center","justify-center","rounded","text-neutral-400","hover:text-neutral-200","hover:bg-neutral-700","transition-colors","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.5","h-3.5"],["d","M18 6L6 18M6 6l12 12"],[1,"space-y-1.5","text-xs"],[1,"flex","items-center","gap-2"],[1,"text-neutral-500","w-16","shrink-0"],[1,"text-neutral-300"],[1,"flex","flex-col","gap-0.5"],[1,"flex","items-center","gap-3","pt-1","border-t","border-neutral-800"],[1,"text-yellow-300","font-mono","text-[11px]"],[1,"text-neutral-500"],[1,"text-neutral-300","text-[11px]","leading-tight","break-words"],[1,"text-blue-400"],[1,"mt-3","pt-2","border-t","border-neutral-700"],[1,"flex","items-center","justify-between","mb-1.5"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors"],["registryKind","llm","providerLabel","Provider","modelLabel","Model",3,"modelChange","selectedProvider","selectedModel"],[1,"mt-1.5","text-[10px]","text-purple-400"],[1,"mt-2","pt-1.5","border-t","border-neutral-800"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1.5"],[1,"space-y-1","text-xs"],[1,"flex","items-center","gap-3"],[1,"text-purple-300","font-mono","text-[11px]"],[1,"text-green-400"],[1,"text-[10px]","text-red-400","hover:text-red-300","transition-colors",3,"click"],[1,"text-[10px]","text-neutral-500","uppercase","tracking-wider","mb-1"],[1,"text-[11px]","text-neutral-400","font-mono"]],template:function(t,n){t&1&&(p(0,"div",0)(1,"div",1)(2,"h3",2),m(3),d(),p(4,"button",3),B("click",function(){return n.handleClose()}),H(),p(5,"svg",4),W(6,"path",5),d()()(),ye(),p(7,"div",6)(8,"div",7)(9,"span",8),m(10,"State"),d(),p(11,"span"),m(12),d()(),p(13,"div",7)(14,"span",8),m(15,"Type"),d(),p(16,"span",9),m(17),d()(),D(18,lt,5,1,"div",7)(19,dt,5,1,"div",7)(20,ct,5,1,"div",7)(21,pt,5,1,"div",7)(22,ht,5,1,"div",10)(23,ut,5,1,"div",7)(24,ft,3,2,"div",11),d(),D(25,Nt,9,7),d()),t&2&&(u(3),L(n.node().label),u(8),se(n.stateColorClass_$()+" font-medium"),u(),L(n.stateLabel_$()),u(5),L(n.node().category),u(),S(n.node().phase?18:-1),u(),S(n.stepLabel_$()?19:-1),u(),S(n.durationLabel_$()?20:-1),u(),S(n.toolId_$()?21:-1),u(),S(n.intent_$()?22:-1),u(),S(n.node().iterationIndex!==null?23:-1),u(),S(n.inputSize_$()>0||n.outputSize_$()>0?24:-1),u(),S(n.isLlmCall_$()&&n.callType_$()?25:-1))},dependencies:[de,Fe],encapsulation:2})}return i})();var $t=["graphSvg"],Qe=(i,o)=>o.id;function bt(i,o){i&1&&(p(0,"span",7),m(1,"Loading trace..."),d())}function Lt(i,o){if(i&1&&(H(),W(0,"rect",16)),i&2){let e=o;Y("x",e.x)("y",e.y)("width",e.width)("height",e.height)}}function wt(i,o){if(i&1&&(H(),W(0,"path",17)),i&2){let e=o.$implicit;Y("d",e.pathD)("stroke",e.strokeColor)("stroke-dasharray",e.strokeDashArray)("marker-end",e.markerEnd)}}function Tt(i,o){if(i&1){let e=ie();H(),p(0,"g",20),B("nodeClicked",function(n){R(e);let r=C();return z(r.handleNodeClick(n))}),d()}if(i&2){let e=o.$implicit,t=C();me("node",e)("isHighlighted",t.activeNodeId()===e.id)("isSelected",t.selectedNodeId()===e.id)}}function Mt(i,o){if(i&1){let e=ie();p(0,"app-ses-graph-node-detail",21),B("closed",function(){R(e);let n=C();return z(n.handleDetailClose())}),d()}i&2&&me("node",o)}var Gn=(()=>{class i{svgRef;layout=F(null);activeNodeId=F("");selectedNodeId=F("");isLoading=F(!1);nodeClicked=ne();detailClosed=ne();viewBox_$=V({x:0,y:0,width:800,height:600});viewBoxStr_$=g(()=>{let e=this.viewBox_$();return`${e.x} ${e.y} ${e.width} ${e.height}`});isFollowActive_$=V(!0);isPanning=!1;panStartX=0;panStartY=0;panStartViewBoxX=0;panStartViewBoxY=0;nodes_$=g(()=>this.layout()?.nodes??[]);edges_$=g(()=>this.layout()?.edges??[]);loopBounds_$=g(()=>this.layout()?.loopContainerBounds??null);selectedNode_$=g(()=>{let e=this.selectedNodeId();return e?this.nodes_$().find(t=>t.id===e)??null:null});constructor(){Se(()=>{let e=this.layout();e&&this.viewBox_$.set(I({},e.viewBox))},{allowSignalWrites:!0})}handleNodeClick(e){this.nodeClicked.emit(e)}handleDetailClose(){this.detailClosed.emit()}handlePointerDown(e){if(e.button!==0)return;this.isPanning=!0,this.panStartX=e.clientX,this.panStartY=e.clientY;let t=this.viewBox_$();this.panStartViewBoxX=t.x,this.panStartViewBoxY=t.y,this.svgRef&&this.svgRef.nativeElement.setPointerCapture(e.pointerId)}handlePointerMove(e){if(!this.isPanning||!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=n.width/t.clientWidth,s=n.height/t.clientHeight,a=(e.clientX-this.panStartX)*r,h=(e.clientY-this.panStartY)*s;this.viewBox_$.set(w(I({},n),{x:this.panStartViewBoxX-a,y:this.panStartViewBoxY-h}))}handlePointerUp(){this.isPanning=!1}handleWheel(e){if(e.preventDefault(),!this.svgRef)return;let t=this.svgRef.nativeElement,n=this.viewBox_$(),r=e.deltaY>0?1.1:.9,s=t.getBoundingClientRect(),a=(e.clientX-s.left)/s.width,h=(e.clientY-s.top)/s.height,l=n.width*r,c=n.height*r;if(l<200||l>5e3)return;let _=n.x+(n.width-l)*a,y=n.y+(n.height-c)*h;this.viewBox_$.set({x:_,y,width:l,height:c})}handleFitToView(){let e=this.nodes_$();if(e.length===0)return;let t=P.recalculateViewBox(e,48);this.viewBox_$.set(t)}handleToggleFollowActive(){this.isFollowActive_$.update(e=>!e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ae({type:i,selectors:[["app-ses-graph-view"]],viewQuery:function(t,n){if(t&1&&Ge($t,5),t&2){let r;Oe(r=Re())&&(n.svgRef=r.first)}},inputs:{layout:[1,"layout"],activeNodeId:[1,"activeNodeId"],selectedNodeId:[1,"selectedNodeId"],isLoading:[1,"isLoading"]},outputs:{nodeClicked:"nodeClicked",detailClosed:"detailClosed"},standalone:!0,features:[le],decls:25,vars:6,consts:[["graphSvg",""],[1,"flex","flex-col","h-full","w-full","overflow-hidden"],[1,"flex","items-center","gap-2","px-3","py-2","border-b","border-neutral-800","shrink-0","bg-neutral-900/80"],["title","Fit to view",1,"px-2","py-1","text-xs","border","rounded","transition-colors","border-neutral-700","text-neutral-400","hover:text-neutral-200","hover:border-neutral-500",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3.5","h-3.5","inline-block","mr-1"],["d","M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7"],["title","Follow active node",1,"px-2","py-1","text-xs","border","rounded","transition-colors",3,"click"],[1,"text-xs","text-neutral-500","ml-auto"],[1,"flex-1","min-h-0","relative"],["preserveAspectRatio","xMidYMid meet",1,"ses-graph-svg",3,"pointerdown","pointermove","pointerup","pointerleave","wheel"],["id","ses-arrow-seq","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#525252"],["id","ses-arrow-loop","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#3b82f6"],["id","ses-arrow-error","markerWidth","8","markerHeight","6","refX","8","refY","3","orient","auto","markerUnits","strokeWidth"],["d","M 0 0 L 8 3 L 0 6 Z","fill","#f97316"],["rx","6","fill","#0f172a","stroke","#1e3a5f","stroke-width","1","stroke-dasharray","4 2","opacity","0.5"],["stroke-width","1.5","fill","none"],["appSesGraphNodeSvg","",3,"node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"node"],["appSesGraphNodeSvg","",3,"nodeClicked","node","isHighlighted","isSelected"],[1,"absolute","top-2","right-2","z-10",3,"closed","node"]],template:function(t,n){if(t&1){let r=ie();p(0,"div",1)(1,"div",2)(2,"button",3),B("click",function(){return R(r),z(n.handleFitToView())}),H(),p(3,"svg",4),W(4,"path",5),d(),m(5," Fit "),d(),ye(),p(6,"button",6),B("click",function(){return R(r),z(n.handleToggleFollowActive())}),m(7," Follow "),d(),D(8,bt,2,0,"span",7),d(),p(9,"div",8),H(),p(10,"svg",9,0),B("pointerdown",function(a){return R(r),z(n.handlePointerDown(a))})("pointermove",function(a){return R(r),z(n.handlePointerMove(a))})("pointerup",function(){return R(r),z(n.handlePointerUp())})("pointerleave",function(){return R(r),z(n.handlePointerUp())})("wheel",function(a){return R(r),z(n.handleWheel(a))}),p(12,"defs")(13,"marker",10),W(14,"path",11),d(),p(15,"marker",12),W(16,"path",13),d(),p(17,"marker",14),W(18,"path",15),d()(),D(19,Lt,1,4,":svg:rect",16),Le(20,wt,1,4,":svg:path",17,Qe),Le(22,Tt,1,3,":svg:g",18,Qe),d(),D(24,Mt,1,1,"app-ses-graph-node-detail",19),d()()}if(t&2){let r,s;u(6),se(n.isFollowActive_$()?"border-neonCyan/50 text-neonCyan bg-neonCyan/10":"border-neutral-700 text-neutral-400 hover:text-neutral-200 hover:border-neutral-500"),u(2),S(n.isLoading()?8:-1),u(2),Y("viewBox",n.viewBoxStr_$()),u(9),S((r=n.loopBounds_$())?19:-1,r),u(),we(n.edges_$()),u(2),we(n.nodes_$()),u(2),S((s=n.selectedNode_$())?24:-1,s)}},dependencies:[de,$e,Ke],styles:[`@charset "UTF-8";@keyframes _ngcontent-%COMP%_ses-graph-node-pulse{0%,to{filter:drop-shadow(0 0 4px var(--ses-graph-pulse-color, #22d3ee))}50%{filter:drop-shadow(0 0 12px var(--ses-graph-pulse-color, #22d3ee))}}[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.ses-graph-svg[_ngcontent-%COMP%]{width:100%;height:100%;background:#0a0a0a;-webkit-user-select:none;user-select:none} .ses-graph-node--active{animation:_ngcontent-%COMP%_ses-graph-node-pulse 1.5s ease-in-out infinite} .ses-graph-node--active rect{stroke-width:2.5} .ses-graph-node--selected{filter:drop-shadow(0 0 6px rgba(34,211,238,.4))}
|
|
2
2
|
/*# sourceMappingURL=ses-graph-view.component-5NATWVIS.css.map */`]})}return i})();export{qe as a,ve as b,x as c,k as d,f as e,P as f,Ze as g,Gn as h};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-IFF2675Y.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as d,j as M}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{h as d,j as M}from"./chunk-MS2KQ2G4.js";import{p as F}from"./chunk-WR6NSOQ2.js";import{C as u,D as f,Fa as y,Ga as w,L as h,Ta as S,U as o,Z as r,aa as l,da as b,fa as k,ga as x,h as E,hb as a,ia as _,ja as c,k as m,la as C,qa as s,ra as p,sa as g,ub as $,va as T,wa as v}from"./chunk-TBMJSIBB.js";var z=E(F());function O(i,B){if(i&1&&(s(0,"span",4),y(1),p()),i&2){let e=v();_("text-green-400",e.feedbackOk_$())("text-red-400",!e.feedbackOk_$()),r(),w(e.feedbackText_$())}}var q=(()=>{class i{content=o.required();buttonTitle=o("M\xE1sol\xE1s v\xE1g\xF3lapra");size=o("sm");feedbackText_$=l("");feedbackOk_$=l(!0);hasFeedback_$=a(()=>this.feedbackText_$().length>0);sizeClass_$=a(()=>this.size()==="md"?"p-2 min-h-[44px] min-w-[44px]":"p-1.5 gt-xs:p-2 min-h-[32px] min-w-[32px] gt-xs:min-h-[36px] gt-xs:min-w-[36px]");iconSizeClass_$=a(()=>this.size()==="md"?"h-5 w-5":"h-4 w-4");globalError_CS=u(M);static feedbackResetMs=2*z.second;feedbackTimer=null;handleCopy(){return m(this,null,function*(){let e=this.content();if(!e)return;let t=yield this.globalError_CS.copyToClipboard(e);t.ok?this.showFeedback("M\xE1solva!",!0):(this.showFeedback("Sikertelen",!1),this.globalError_CS.reportErrorOnly({message:d.getErrorMessageForDisplay(t.error),source:"copy-button",stack:d.getStackForReport(t.error)}))})}showFeedback(e,t){this.feedbackTimer!==null&&clearTimeout(this.feedbackTimer),this.feedbackText_$.set(e),this.feedbackOk_$.set(t),this.feedbackTimer=setTimeout(()=>{this.feedbackText_$.set(""),this.feedbackTimer=null},i.feedbackResetMs)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-s-copy-button"]],hostAttrs:[1,"inline-flex","items-center","gap-1.5"],inputs:{content:[1,"content"],buttonTitle:[1,"buttonTitle"],size:[1,"size"]},standalone:!0,features:[S],decls:4,vars:7,consts:[["type","button",3,"click","title"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor","aria-hidden","true"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"],[1,"text-[11px]","gt-xs:text-xs","shrink-0",3,"text-green-400","text-red-400"],[1,"text-[11px]","gt-xs:text-xs","shrink-0"]],template:function(t,n){t&1&&(s(0,"button",0),T("click",function(){return n.handleCopy()}),h(),s(1,"svg",1),g(2,"path",2),p()(),b(3,O,2,5,"span",3)),t&2&&(c(n.sizeClass_$()+" flex items-center justify-center rounded text-neutral-400 hover:text-neutral-200 hover:bg-neutral-700 transition-colors shrink-0"),x("title",n.buttonTitle()),k("aria-label",n.buttonTitle()),r(),c(n.iconSizeClass_$()),r(2),C(n.hasFeedback_$()?3:-1))},dependencies:[$],encapsulation:2})}return i})();export{q as a};
|
|
2
|
+
//# sourceMappingURL=chunk-M6EVLEFQ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-
|
|
1
|
+
import{a as _}from"./chunk-5UPNU54P.js";import{a as ke,b as _e,g as De,h as x,j as Fe}from"./chunk-MS2KQ2G4.js";import{A as Y,B as X,C as Z,I as Te,K as Oe,p as ge,z as q}from"./chunk-WR6NSOQ2.js";import{C as w,D as ve,Fa as k,Ga as C,Gb as je,Ha as z,J as T,Ja as Le,K as O,L as D,M as me,P as $e,Ta as we,U as V,X as Ee,Z as u,a as re,aa as m,b as Pe,da as A,ga as he,h as fe,hb as S,ia as F,jb as K,k as P,la as v,ma as Ae,oa as J,p as d,pa as G,qa as f,ra as p,sa as Q,ua as W,ub as Me,va as N,wa as I,wb as L,xb as Re,y as ie}from"./chunk-TBMJSIBB.js";var Ne=fe(ge());var ee=function(i){return i.strictParse="strict-parse",i.llmExtract="llm-extract",i.llmPrepare="llm-prepare",i.llmParse="llm-parse",i}(ee||{});var Qe=12e3,se=120,xe=600,te=class i{static extractJsonFromContent(n){let e=n.match(/```(?:json)?\s*([\s\S]*?)```/);if(e?.[1])return e[1].trim();let t=n.indexOf("{"),r=n.lastIndexOf("}");return t!==-1&&r>t?n.slice(t,r+1):n}static rawContentLooksLikeExtractableJsonObject(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.extractedTrimmedLooksLikeJsonObjectRoot(t)}static prepareLlmJsonTextForStrictParse(n){if(!i.extractedTrimmedLooksLikeJsonObjectRoot(n))return i.relaxTrailingCommasInJsonLikeText(n);let t=i.repairExecutionSummaryForUserOrphanSiblingStrings(n),r=i.repairUnescapedInnerDoubleQuotesInJsonLikeText(t),s=i.sanitizeRawControlCharsInsideJsonStrings(r);return i.relaxTrailingCommasInJsonLikeText(s)}static extractedTrimmedLooksLikeJsonObjectRoot(n){return(n??"").trimStart().startsWith("{")}static getLlmPipelinePreparedText(n){let e=(n??"").trim(),t=i.extractJsonFromContent(e);return i.prepareLlmJsonTextForStrictParse(t)}static tryParseStrict(n){let e=n.text??"";try{return{ok:!0,value:JSON.parse(e)}}catch(t){return{ok:!1,failure:i.buildFailureFromParseError({error:t,sourceText:e,contextLabel:n.contextLabel,phase:ee.strictParse})}}}static parseStrictOrThrow(n){let e=i.tryParseStrict({text:n.text,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static tryParseLlmPipeline(n){let e=(n.content??"").trim(),t=i.extractJsonFromContent(e),r=i.prepareLlmJsonTextForStrictParse(t),s=i.tryParseStrict({text:r,contextLabel:n.contextLabel});if(s.ok)return{ok:!0,value:s.value};let o=s.failure,l=`JSON parse failed [${o.contextLabel}] (${ee.llmParse}): ${o.rawMessage}`;return{ok:!1,failure:{phase:ee.llmParse,contextLabel:o.contextLabel,rawMessage:o.rawMessage,summaryMessage:l,position:o.position,line:o.line,column:o.column,inputLength:e.length,snippetAroundError:o.snippetAroundError,extractedLength:t.length,preparedLength:r.length,originalError:o.originalError}}}static parseLlmPipelineOrThrow(n){let e=i.tryParseLlmPipeline({content:n.content,contextLabel:n.contextLabel});if(e.ok)return e.value;let t=new Error(e.failure.summaryMessage),r=e.failure.originalError;throw t.cause=r instanceof Error?r:new Error(e.failure.rawMessage),t}static failureToPlainAdditionalContext(n){let e={jsonParsePhase:n.phase,jsonParseContextLabel:n.contextLabel,jsonParseRawMessage:n.rawMessage,jsonParseSummaryMessage:n.summaryMessage};n.position!==void 0&&(e.jsonParsePosition=n.position),n.line!==void 0&&(e.jsonParseLine=n.line),n.column!==void 0&&(e.jsonParseColumn=n.column),n.inputLength!==void 0&&(e.jsonParseInputLength=n.inputLength),n.extractedLength!==void 0&&(e.jsonParseExtractedLength=n.extractedLength),n.preparedLength!==void 0&&(e.jsonParsePreparedLength=n.preparedLength),n.snippetAroundError!==void 0&&(e.jsonParseSnippetAroundError=n.snippetAroundError);let t=n.originalError;return t instanceof Error?e.jsonParseOriginalErrorMessage=t.message:t!=null&&(e.jsonParseOriginalErrorMessage=String(t)),e}static formatFailureForLog(n,e,t){let r=n.position,s;if(r!==void 0&&r<e.length){let y=Math.max(0,r-se),c=Math.min(e.length,r+se),$=e.slice(y,c),E=r-y,ue=" ".repeat(Math.max(0,E))+"^";s=`snippetAroundPosition | startOffset: ${String(y)} | errorIndex: ${String(r)}
|
|
2
2
|
${$}
|
|
3
3
|
${ue}`}else{let y=e.slice(0,xe);s=`snippetFallback | noUsablePosition | firstChars: ${String(xe)}
|
|
4
4
|
`+y+(e.length>xe?`
|
|
@@ -36,4 +36,4 @@ ${JSON.stringify(o,null,2)}`;return x.toDisplaySafeString(s??l)}let t=e instance
|
|
|
36
36
|
|
|
37
37
|
Stack:
|
|
38
38
|
${t}`:""].join("")}copyToClipboard(){return P(this,null,function*(){if(this.error()==null)return;let e=this.buildErrorText(),t=yield this.globalError_CS.copyToClipboard(e);t.ok?(this.copyFeedback="M\xE1solva!",setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs)):(this.copyFeedback="M\xE1sol\xE1s sikertelen",this.globalError_CS.reportErrorOnly({message:x.getErrorMessageForDisplay(t.error),source:"error-display-copy",stack:x.getStackForReport(t.error)}),setTimeout(()=>{this.copyFeedback=""},i.copyFeedbackResetMs))})}sendToQuickInput(){return P(this,null,function*(){if(this.error()==null||this.isSendingToQuickInput_$())return;let e=this.buildErrorText();if(e.trim()){this.isSendingToQuickInput_$.set(!0);try{let t=yield this.userInput_DS.submitInputForGlobalError(e);if(t.ok)this.quickInputFeedback="Quick Input l\xE9trehozva!";else{let r=i.reasonToHungarianLabel(t.reason);this.quickInputFeedback=`Quick Input sikertelen \u2014 ${r}`,this.globalError_CS.reportErrorOnly({message:`Send-to-Quick-Input failed \u2014 reason: ${t.reason}${t.details?` \u2014 details: ${t.details}`:""}`,source:`send-to-quick-input-${t.reason}`})}}catch(t){this.quickInputFeedback="Quick Input sikertelen";let r=t instanceof Error?`Send-to-Quick-Input threw: ${t.message}`:`Send-to-Quick-Input threw: ${String(t)}`;this.globalError_CS.reportErrorOnly({message:r,source:"send-to-quick-input-fail",stack:t instanceof Error?t.stack:void 0})}finally{this.isSendingToQuickInput_$.set(!1),setTimeout(()=>{this.quickInputFeedback=""},i.copyFeedbackResetMs)}}})}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ve({type:i,selectors:[["app-ccap-error-display"]],inputs:{error:[1,"error"],sourceLabelOverride:[1,"sourceLabelOverride"],errorClientSource:[1,"errorClientSource"],ng0600Diagnostics:[1,"ng0600Diagnostics"],ng0203Diagnostics:[1,"ng0203Diagnostics"]},standalone:!0,features:[we],decls:1,vars:1,consts:[[1,"border-2","border-neonRed","rounded-lg","bg-neutral-800","shadow-lg","flex","flex-col","max-h-full","min-h-0"],[1,"flex","items-center","justify-between","p-4","border-b","border-neonRed/50","shrink-0"],[1,"text-lg","font-semibold","text-red-400"],[1,"flex","items-center","gap-2"],["type","button","title","M\xE1sol\xE1s v\xE1g\xF3lapra","aria-label","M\xE1sol\xE1s v\xE1g\xF3lapra",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors",3,"click"],["xmlns","http://www.w3.org/2000/svg","fill","none","viewBox","0 0 24 24","stroke","currentColor",1,"h-5","w-5"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"],[1,"text-sm",3,"text-green-400","text-red-400"],["type","button","title","K\xFCld\xE9s Quick Input-ba","aria-label","K\xFCld\xE9s Quick Input-ba",1,"p-2","min-h-[44px]","min-w-[44px]","flex","items-center","justify-center","rounded","text-neutral-300","hover:bg-neutral-600","hover:text-white","transition-colors","disabled:opacity-50","disabled:cursor-not-allowed",3,"click","disabled"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M12 19l9 2-9-18-9 18 9-2zm0 0v-8"],[1,"p-4","flex-1","min-h-0","overflow-y-auto","space-y-4","overscroll-contain"],[1,"text-sm","font-medium","text-neutral-400","mb-1"],[1,"text-neutral-100","break-words"],[1,"rounded-md","border","border-amber-600/60","bg-amber-950/40","p-3","space-y-2"],["type","button",1,"text-neutral-400","hover:text-neutral-200","text-sm","mb-1","text-left","w-full","flex","items-center","gap-1",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,"p-3","bg-neutral-900","rounded","text-xs","text-neutral-300","overflow-x-auto","whitespace-pre-wrap","break-words","max-h-[70vh]","overflow-y-auto"],[1,"text-sm"],[1,"text-sm","font-medium","text-amber-200/95"],[1,"list-disc","list-inside","space-y-1.5","text-xs","text-amber-100/90"],[1,"break-words"],[1,"pt-1","space-y-1"],[1,"text-xs","font-medium","text-neutral-400"],[1,"space-y-1","text-xs"],["target","_blank","rel","noopener noreferrer",1,"text-ccapAccent","hover:underline","break-all",3,"href"],[1,"text-neutral-300","text-sm"],[1,"text-neutral-300","text-sm","break-words"],[1,"text-xs","text-neutral-400","mb-2"],[1,"space-y-3","text-xs","text-neutral-300"],[1,"border","border-neutral-600","rounded-md","p-2","bg-neutral-900/80"],[1,"font-medium","text-neonCyan/90","mb-1"],[1,"whitespace-pre-wrap","break-words","text-neutral-400"]],template:function(t,r){t&1&&A(0,Ct,31,15,"div",0),t&2&&v(r.error()?0:-1)},dependencies:[Me],encapsulation:2})}return i})();export{qe as a,ae as b,le as c,M as d,R as e,Be as f,dn as g,H as h,He as i,te as j,$n as k};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-MLGDSF43.js.map
|