@futdevpro/ccap 1.1.3223 → 1.1.3441
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/build/_collections/update/update-verify-install.interface.d.ts +23 -0
- package/cli/build/_collections/update/update-verify-install.interface.d.ts.map +1 -0
- package/cli/build/_collections/update/update-verify-install.interface.js +3 -0
- package/cli/build/_collections/update/update-verify-install.interface.js.map +1 -0
- package/cli/build/_collections/update/update-verify-install.util.d.ts +50 -0
- package/cli/build/_collections/update/update-verify-install.util.d.ts.map +1 -0
- package/cli/build/_collections/update/update-verify-install.util.js +179 -0
- package/cli/build/_collections/update/update-verify-install.util.js.map +1 -0
- package/cli/build/_collections/update/update-verify-install.util.spec.d.ts +6 -0
- package/cli/build/_collections/update/update-verify-install.util.spec.d.ts.map +1 -0
- package/cli/build/_collections/update/update-verify-install.util.spec.js +117 -0
- package/cli/build/_collections/update/update-verify-install.util.spec.js.map +1 -0
- package/cli/build/_commands/cc-inspect-options.interface.d.ts +11 -0
- package/cli/build/_commands/cc-inspect-options.interface.d.ts.map +1 -0
- package/cli/build/_commands/cc-inspect-options.interface.js +3 -0
- package/cli/build/_commands/cc-inspect-options.interface.js.map +1 -0
- package/cli/build/_commands/cc-inspect.d.ts +33 -0
- package/cli/build/_commands/cc-inspect.d.ts.map +1 -0
- package/cli/build/_commands/cc-inspect.js +228 -0
- package/cli/build/_commands/cc-inspect.js.map +1 -0
- package/cli/build/_commands/input.d.ts +55 -0
- package/cli/build/_commands/input.d.ts.map +1 -0
- package/cli/build/_commands/input.interface.d.ts +21 -0
- package/cli/build/_commands/input.interface.d.ts.map +1 -0
- package/cli/build/_commands/input.interface.js +3 -0
- package/cli/build/_commands/input.interface.js.map +1 -0
- package/cli/build/_commands/input.js +183 -0
- package/cli/build/_commands/input.js.map +1 -0
- package/cli/build/_commands/input.spec.d.ts +8 -0
- package/cli/build/_commands/input.spec.d.ts.map +1 -0
- package/cli/build/_commands/input.spec.js +63 -0
- package/cli/build/_commands/input.spec.js.map +1 -0
- package/cli/build/_commands/skill-doc.d.ts +63 -0
- package/cli/build/_commands/skill-doc.d.ts.map +1 -0
- package/cli/build/_commands/skill-doc.interface.d.ts +19 -0
- package/cli/build/_commands/skill-doc.interface.d.ts.map +1 -0
- package/cli/build/_commands/skill-doc.interface.js +3 -0
- package/cli/build/_commands/skill-doc.interface.js.map +1 -0
- package/cli/build/_commands/skill-doc.js +421 -0
- package/cli/build/_commands/skill-doc.js.map +1 -0
- package/cli/build/_commands/skill-doc.spec.d.ts +10 -0
- package/cli/build/_commands/skill-doc.spec.d.ts.map +1 -0
- package/cli/build/_commands/skill-doc.spec.js +112 -0
- package/cli/build/_commands/skill-doc.spec.js.map +1 -0
- package/cli/build/_commands/update.d.ts.map +1 -1
- package/cli/build/_commands/update.js +59 -0
- package/cli/build/_commands/update.js.map +1 -1
- package/cli/build/_commands/update.spec.js +12 -0
- package/cli/build/_commands/update.spec.js.map +1 -1
- package/cli/build/program.js +51 -0
- package/cli/build/program.js.map +1 -1
- package/client-dist/{agent-instances.module-V7DKSWVC.js → agent-instances.module-4ADMPXCV.js} +2 -2
- package/client-dist/ca.module-RVGC3WQC.js +5 -0
- package/client-dist/{ca.module-MVE3OLDD.js.map → ca.module-RVGC3WQC.js.map} +3 -3
- package/client-dist/cc-usage-dashboard.component-OQS2BC4L.js +2 -0
- package/client-dist/cc-usage-dashboard.component-OQS2BC4L.js.map +7 -0
- package/client-dist/cc.module-SPB35JNX.js +4 -0
- package/client-dist/cc.module-SPB35JNX.js.map +7 -0
- package/client-dist/{chunk-7HSUCNW5.js → chunk-2ATSF4KC.js} +7 -3
- package/client-dist/{chunk-7HSUCNW5.js.map → chunk-2ATSF4KC.js.map} +2 -2
- package/client-dist/{chunk-CRYF37M7.js → chunk-3HJWN4W6.js} +2 -2
- package/client-dist/{chunk-D2UUXA6L.js → chunk-4EV32FFZ.js} +2 -2
- package/client-dist/{chunk-AX7QIINI.js → chunk-4H3E32UH.js} +2 -2
- package/client-dist/{chunk-KYVIZZWW.js → chunk-4LCJ4GNK.js} +19 -19
- package/client-dist/chunk-4LCJ4GNK.js.map +7 -0
- package/client-dist/{chunk-OUBNMT7L.js → chunk-5NW5UGVZ.js} +2 -2
- package/client-dist/{chunk-HLNT234H.js → chunk-AM5URSKV.js} +2 -2
- package/client-dist/{chunk-SYCUR4MY.js → chunk-AMROWQBM.js} +2 -2
- package/client-dist/{chunk-PTCJL62W.js → chunk-AR6EOT63.js} +2 -2
- package/client-dist/{chunk-OLK5MJ4J.js → chunk-B25EGDHU.js} +2 -2
- package/client-dist/{chunk-4SFV57IQ.js → chunk-BQTJHETS.js} +2 -2
- package/client-dist/{chunk-XTUQJ3W6.js → chunk-COOWEMEW.js} +2 -2
- package/client-dist/{chunk-TOFOK5W7.js → chunk-E3JXFFHE.js} +2 -2
- package/client-dist/{chunk-OQW6FXRJ.js → chunk-ESIGVRCK.js} +2 -2
- package/client-dist/{chunk-JMZKJLUE.js → chunk-EVMDNGBK.js} +2 -2
- package/client-dist/{chunk-6GSTJE3R.js → chunk-F6VMAVI5.js} +2 -2
- package/client-dist/chunk-FRVRMJQF.js +2 -0
- package/client-dist/chunk-FRVRMJQF.js.map +7 -0
- package/client-dist/chunk-G5SK3OBM.js +2 -0
- package/client-dist/chunk-G5SK3OBM.js.map +7 -0
- package/client-dist/{chunk-VO5ZLOZM.js → chunk-GBOES7QW.js} +2 -2
- package/client-dist/{chunk-2OAF6FCL.js → chunk-GTERKRTR.js} +2 -2
- package/client-dist/{chunk-7X22BWF7.js → chunk-HD4CODAD.js} +2 -2
- package/client-dist/{chunk-2EMFCVYO.js → chunk-I3FSMGMK.js} +2 -2
- package/client-dist/{chunk-VGTXKD6D.js → chunk-IFYHOOVA.js} +2 -2
- package/client-dist/{chunk-IINV7GMO.js → chunk-IUAZJ3PT.js} +2 -2
- package/client-dist/chunk-IUAZJ3PT.js.map +7 -0
- package/client-dist/{chunk-PFBJ7ZHP.js → chunk-IVLMVAVJ.js} +2 -2
- package/client-dist/chunk-KBMXCICX.js +2 -0
- package/client-dist/chunk-KBMXCICX.js.map +7 -0
- package/client-dist/{chunk-3D32XY5M.js → chunk-KIKSSJKL.js} +2 -2
- package/client-dist/{chunk-U2EBQMSE.js → chunk-LPNQ5PRN.js} +2 -2
- package/client-dist/{chunk-4JKJRGJX.js → chunk-MO37SUK2.js} +2 -2
- package/client-dist/{chunk-BC7H7K5F.js → chunk-MYVEHPA7.js} +2 -2
- package/client-dist/{chunk-JEHOIN7Y.js → chunk-N55GOFVU.js} +2 -2
- package/client-dist/{chunk-R5WCLLO5.js → chunk-NNUHTCXG.js} +2 -2
- package/client-dist/{chunk-TP2634XD.js → chunk-OKTAADTQ.js} +2 -2
- package/client-dist/{chunk-DURLBTAJ.js → chunk-ONS7XQYD.js} +2 -2
- package/client-dist/chunk-OYB7GU43.js +2 -0
- package/client-dist/chunk-OYB7GU43.js.map +7 -0
- package/client-dist/{chunk-7SAFEFWU.js → chunk-PVSQ5ZEZ.js} +14 -14
- package/client-dist/{chunk-7SAFEFWU.js.map → chunk-PVSQ5ZEZ.js.map} +3 -3
- package/client-dist/{chunk-PG7CJVEP.js → chunk-PZN2OI7U.js} +2 -2
- package/client-dist/{chunk-C4JDDOQR.js → chunk-QUD3BEHN.js} +2 -2
- package/client-dist/{chunk-DJVWZQNB.js → chunk-QUEYZI42.js} +2 -2
- package/client-dist/chunk-R2IBKJ4K.js +2 -0
- package/client-dist/chunk-R2IBKJ4K.js.map +7 -0
- package/client-dist/{chunk-3TMVRWAB.js → chunk-RAHCHCWR.js} +2 -2
- package/client-dist/{chunk-SQWHJTFE.js → chunk-RCCUSGIN.js} +2 -2
- package/client-dist/{chunk-GADEZIXI.js → chunk-RL5LPTPO.js} +2 -2
- package/client-dist/{chunk-5C3KCWYF.js → chunk-SDVXPGB7.js} +2 -2
- package/client-dist/{chunk-CLQC45GB.js → chunk-TNLHQRL7.js} +2 -2
- package/client-dist/{chunk-JZHYGU3K.js → chunk-TWK7BOB7.js} +2 -2
- package/client-dist/{chunk-ILG5WENK.js → chunk-U62YECNK.js} +2 -2
- package/client-dist/{chunk-RSPVPEQ4.js → chunk-UOC6UYZT.js} +2 -2
- package/client-dist/{chunk-AI7WKHRQ.js → chunk-VDQROW6J.js} +2 -2
- package/client-dist/{chunk-3PA6BJES.js → chunk-VMXIXZV2.js} +2 -2
- package/client-dist/chunk-VQ4GBHH7.js +2 -0
- package/client-dist/chunk-VQ4GBHH7.js.map +7 -0
- package/client-dist/{chunk-CFHQS3UB.js → chunk-WRI37SX4.js} +2 -2
- package/client-dist/{chunk-MS5OG7JD.js → chunk-XLSL262Q.js} +2 -2
- package/client-dist/{chunk-SLSTIBOT.js → chunk-Y6V4NGLU.js} +2 -2
- package/client-dist/{chunk-SLSTIBOT.js.map → chunk-Y6V4NGLU.js.map} +1 -1
- package/client-dist/{chunk-3PLWSRB4.js → chunk-YN4H6MW2.js} +2 -2
- package/client-dist/{chunk-OEEQNIJG.js → chunk-Z5FUR5ZW.js} +2 -2
- package/client-dist/{chunk-MY75XBDH.js → chunk-ZCHMBEHT.js} +2 -2
- package/client-dist/{chunk-LIQPVSH3.js → chunk-ZPJ6KYMA.js} +2 -2
- package/client-dist/consultant.module-UWXLFLDS.js +3 -0
- package/client-dist/{consultant.module-WUUVSVHL.js.map → consultant.module-UWXLFLDS.js.map} +3 -3
- package/client-dist/{crd.module-IRGVOYD5.js → crd.module-2I2BDC3A.js} +2 -2
- package/client-dist/{dashboard.module-NPPSZHO6.js → dashboard.module-X2A6LOTA.js} +2 -2
- package/client-dist/{do.module-GKQTJOXR.js → do.module-CJWEKZ4L.js} +2 -2
- package/client-dist/{document-library.module-JK3K7QNJ.js → document-library.module-WJSFZPA7.js} +2 -2
- package/client-dist/{embedding-eval.module-LVESAMPN.js → embedding-eval.module-FOALIAQW.js} +2 -2
- package/client-dist/{embedding-registry.module-3ECACZZ3.js → embedding-registry.module-SS646R4H.js} +2 -2
- package/client-dist/err.module-SR4ZAOQH.js +6 -0
- package/client-dist/err.module-SR4ZAOQH.js.map +7 -0
- package/client-dist/{feedback.module-AHG7462C.js → feedback.module-T3MZQKXV.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-XFUI7B65.js → host-runtime-mcp.module-FBZZGQGD.js} +2 -2
- package/client-dist/index.html +2 -2
- package/client-dist/{live-dev-pipeline.module-OMK67DGM.js → live-dev-pipeline.module-OKQYFSJL.js} +2 -2
- package/client-dist/{logs.module-FWACECVV.js → logs.module-SHHOD5XW.js} +2 -2
- package/client-dist/{main-H4AYPQ2E.js → main-L3WW2VTB.js} +4 -4
- package/client-dist/{main-H4AYPQ2E.js.map → main-L3WW2VTB.js.map} +3 -3
- package/client-dist/{master-control-remote-poc.module-GQ6RMPRB.js → master-control-remote-poc.module-ITXHYU5K.js} +2 -2
- package/client-dist/{mobile-app.module-YSARX6QC.js → mobile-app.module-Q3W3PU4O.js} +2 -2
- package/client-dist/{model-registry.module-SJOUSDXZ.js → model-registry.module-DGN55LTQ.js} +2 -2
- package/client-dist/oc.module-DYSATWML.js +3 -0
- package/client-dist/{oc.module-CDGBJ6I4.js.map → oc.module-DYSATWML.js.map} +3 -3
- package/client-dist/orc.module-NQO6OLPK.js +2 -0
- package/client-dist/orc.module-NQO6OLPK.js.map +7 -0
- package/client-dist/{project-management.module-LWZLB6VU.js → project-management.module-T7NBKKSR.js} +2 -2
- package/client-dist/project-source-routed.module-YO54LEGN.js +2 -0
- package/client-dist/{scheduler.module-VH647PWD.js → scheduler.module-4CMBOTGZ.js} +2 -2
- package/client-dist/session.module-V4SRPQRZ.js +12 -0
- package/client-dist/session.module-V4SRPQRZ.js.map +7 -0
- package/client-dist/{set.module-XHJR4XUD.js → set.module-32SVEWTG.js} +5 -5
- package/client-dist/{set.module-XHJR4XUD.js.map → set.module-32SVEWTG.js.map} +3 -3
- package/client-dist/{setup.module-RRQZ62B2.js → setup.module-5T6MCMR4.js} +2 -2
- package/client-dist/styles-CTUT42AQ.css +2 -0
- package/client-dist/styles-CTUT42AQ.css.map +7 -0
- package/client-dist/{terminals.module-QKIQS6FH.js → terminals.module-AQO2TVO2.js} +2 -2
- package/client-dist/{voice-notes-poc.module-K3FB6OIB.js → voice-notes-poc.module-EI2HY7YJ.js} +2 -2
- package/client-dist/{wfs.module-JVR53PGJ.js → wfs.module-AHRZE5WB.js} +2 -2
- package/package.json +1 -1
- package/server/build/src/_collections/core/ccap-post-services-bootstrap.util.d.ts.map +1 -1
- package/server/build/src/_collections/core/ccap-post-services-bootstrap.util.js +5 -0
- package/server/build/src/_collections/core/ccap-post-services-bootstrap.util.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/agent-core/_modules/run/_services/control-services/run-flow.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/agent-core/_modules/run/_services/control-services/run-flow.control-service.js +8 -1
- package/server/build/src/_modules/ccap-agent/_modules/agent-core/_modules/run/_services/control-services/run-flow.control-service.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/error-handling-stats-range.const.d.ts +11 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/error-handling-stats-range.const.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/error-handling-stats-range.const.js +20 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/error-handling-stats-range.const.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.d.ts +65 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.js +222 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.spec.d.ts +7 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.spec.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.spec.js +213 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_collections/utils/error-handling-stats.util.spec.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_models/interfaces/error-handling-stats.interface.d.ts +58 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_models/interfaces/error-handling-stats.interface.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_models/interfaces/error-handling-stats.interface.js +3 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_models/interfaces/error-handling-stats.interface.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_routes/error-handling.controller.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_routes/error-handling.controller.js +14 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_routes/error-handling.controller.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/errorhandling-stats.control-service.d.ts +35 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/errorhandling-stats.control-service.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/errorhandling-stats.control-service.js +80 -0
- package/server/build/src/_modules/ccap-agent/_modules/error-handling/_services/errorhandling-stats.control-service.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/voc-mp3-id3-strip.util.d.ts +47 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/voc-mp3-id3-strip.util.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/voc-mp3-id3-strip.util.js +100 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/voc-mp3-id3-strip.util.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/voc-mp3-id3-strip.util.spec.d.ts +2 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/voc-mp3-id3-strip.util.spec.d.ts.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/voc-mp3-id3-strip.util.spec.js +162 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_collections/utils/voc-mp3-id3-strip.util.spec.js.map +1 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/stt/voc-transcribe.control-service.d.ts +2 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/stt/voc-transcribe.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/stt/voc-transcribe.control-service.js +16 -0
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/stt/voc-transcribe.control-service.js.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/tts/voc-tts.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/tts/voc-tts.control-service.js +22 -4
- package/server/build/src/_modules/ccap-agent/_modules/integrations/_modules/voice/_services/control-services/tts/voc-tts.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/consts/cc-kill-reasons.const.d.ts +58 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/consts/cc-kill-reasons.const.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/consts/cc-kill-reasons.const.js +64 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/consts/cc-kill-reasons.const.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-list-item-serialize.util.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-list-item-serialize.util.js +3 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-list-item-serialize.util.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.d.ts +17 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.js +65 -5
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.spec.d.ts +9 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.spec.d.ts.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.spec.js +213 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/cc-stream-parser.util.spec.js.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-exit-diagnostics.util.d.ts +47 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-exit-diagnostics.util.d.ts.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-exit-diagnostics.util.js +71 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-exit-diagnostics.util.js.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.d.ts +36 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.js +93 -6
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.spec.js +85 -21
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-process-exit.util.spec.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-recovery.util.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-recovery.util.js +81 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/lifecycle/cc-recovery.util.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-session-closed-guard.util.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-session-closed-guard.util.js +14 -2
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-session-closed-guard.util.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/claude-code.controller.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/claude-code.controller.js +19 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_routes/claude-code.controller.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/blocked-resume/cc-blocked-resume.control-service.d.ts +4 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/blocked-resume/cc-blocked-resume.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/blocked-resume/cc-blocked-resume.control-service.js +6 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/blocked-resume/cc-blocked-resume.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.control-service.d.ts +13 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.control-service.js +21 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.interface.d.ts +33 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-adapter.interface.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-event.data-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-event.data-service.js +10 -3
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-event.data-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.d.ts +54 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.js +163 -75
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-manager.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.d.ts +6 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.js +32 -9
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.spec.js +20 -2
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-monitoring.control-service.spec.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.d.ts +25 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.js +301 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/cc-route.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.d.ts +20 -3
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.js +62 -7
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.spec.js +10 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/status/cc-status-transition.control-service.spec.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.d.ts +11 -18
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js +40 -48
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-terminal-lifecycle.control-service.d.ts +8 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-terminal-lifecycle.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-terminal-lifecycle.control-service.js +13 -2
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-terminal-lifecycle.control-service.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/openclaw/_services/core/oc-event.data-service.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/openclaw/_services/core/oc-event.data-service.js +8 -3
- package/server/build/src/_modules/external-sessions/_modules/openclaw/_services/core/oc-event.data-service.js.map +1 -1
- package/server/build/src/_modules/messaging/_services/control-services/providers/msg-client-socket-server.service.d.ts.map +1 -1
- package/server/build/src/_modules/messaging/_services/control-services/providers/msg-client-socket-server.service.js +12 -0
- package/server/build/src/_modules/messaging/_services/control-services/providers/msg-client-socket-server.service.js.map +1 -1
- package/server/build/src/_modules/notification/_collections/utils/ntf-system-event.util.d.ts +10 -0
- package/server/build/src/_modules/notification/_collections/utils/ntf-system-event.util.d.ts.map +1 -1
- package/server/build/src/_modules/notification/_collections/utils/ntf-system-event.util.js +18 -0
- package/server/build/src/_modules/notification/_collections/utils/ntf-system-event.util.js.map +1 -1
- package/server/build/src/_modules/notification/_collections/utils/ntf-system-event.util.spec.js +32 -3
- package/server/build/src/_modules/notification/_collections/utils/ntf-system-event.util.spec.js.map +1 -1
- package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.d.ts +42 -0
- package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.d.ts.map +1 -0
- package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.js +73 -0
- package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.js.map +1 -0
- package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.spec.d.ts +10 -0
- package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.spec.d.ts.map +1 -0
- package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.spec.js +89 -0
- package/server/build/src/_modules/peer-instance/_collections/utils/pei-error-recording.util.spec.js.map +1 -0
- package/server/build/src/_modules/peer-instance/_models/interfaces/pei-bootstrap-attempt.interface.d.ts +8 -1
- package/server/build/src/_modules/peer-instance/_models/interfaces/pei-bootstrap-attempt.interface.d.ts.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-bootstrap-watchdog.spec.d.ts +10 -0
- package/server/build/src/_modules/peer-instance/_services/pei-bootstrap-watchdog.spec.d.ts.map +1 -0
- package/server/build/src/_modules/peer-instance/_services/pei-bootstrap-watchdog.spec.js +74 -0
- package/server/build/src/_modules/peer-instance/_services/pei-bootstrap-watchdog.spec.js.map +1 -0
- package/server/build/src/_modules/peer-instance/_services/pei-bootstrap.control-service.d.ts +37 -0
- package/server/build/src/_modules/peer-instance/_services/pei-bootstrap.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-bootstrap.control-service.js +117 -0
- package/server/build/src/_modules/peer-instance/_services/pei-bootstrap.control-service.js.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.d.ts +11 -0
- package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.js +11 -1
- package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.js.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.spec.js +65 -0
- package/server/build/src/_modules/peer-instance/_services/pei-dispatch.control-service.spec.js.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-event-relay.control-service.spec.d.ts +15 -0
- package/server/build/src/_modules/peer-instance/_services/pei-event-relay.control-service.spec.d.ts.map +1 -0
- package/server/build/src/_modules/peer-instance/_services/pei-event-relay.control-service.spec.js +122 -0
- package/server/build/src/_modules/peer-instance/_services/pei-event-relay.control-service.spec.js.map +1 -0
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.js +24 -0
- package/server/build/src/_modules/peer-instance/_services/pei-heartbeat.control-service.js.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.d.ts +30 -0
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.js +91 -2
- package/server/build/src/_modules/peer-instance/_services/pei-ws-client.control-service.js.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-ws-server.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/peer-instance/_services/pei-ws-server.control-service.js +10 -0
- package/server/build/src/_modules/peer-instance/_services/pei-ws-server.control-service.js.map +1 -1
- package/server/build/src/_modules/scheduler/_collections/utils/sch-jitter.util.spec.js +4 -2
- package/server/build/src/_modules/scheduler/_collections/utils/sch-jitter.util.spec.js.map +1 -1
- package/server/build/src/_modules/setup-config/_models/interfaces/cluster/sc-cluster-diagnostics-result.interface.d.ts +9 -0
- package/server/build/src/_modules/setup-config/_models/interfaces/cluster/sc-cluster-diagnostics-result.interface.d.ts.map +1 -1
- package/server/build/src/_modules/setup-config/_services/control-services/sc-cluster.control-service.d.ts.map +1 -1
- package/server/build/src/_modules/setup-config/_services/control-services/sc-cluster.control-service.js +1 -0
- package/server/build/src/_modules/setup-config/_services/control-services/sc-cluster.control-service.js.map +1 -1
- package/client-dist/ca.module-MVE3OLDD.js +0 -5
- package/client-dist/cc-usage-dashboard.component-F7S4MG67.js +0 -2
- package/client-dist/cc-usage-dashboard.component-F7S4MG67.js.map +0 -7
- package/client-dist/cc.module-GOXYWYW2.js +0 -4
- package/client-dist/cc.module-GOXYWYW2.js.map +0 -7
- package/client-dist/chunk-4GPIIB3D.js +0 -2
- package/client-dist/chunk-4GPIIB3D.js.map +0 -7
- package/client-dist/chunk-EGRHWZRV.js +0 -1
- package/client-dist/chunk-EGRHWZRV.js.map +0 -7
- package/client-dist/chunk-GZDOO5NB.js +0 -2
- package/client-dist/chunk-GZDOO5NB.js.map +0 -7
- package/client-dist/chunk-IINV7GMO.js.map +0 -7
- package/client-dist/chunk-KYVIZZWW.js.map +0 -7
- package/client-dist/chunk-MZLFEWAN.js +0 -2
- package/client-dist/chunk-MZLFEWAN.js.map +0 -7
- package/client-dist/chunk-QPEW5PI4.js +0 -2
- package/client-dist/chunk-QPEW5PI4.js.map +0 -7
- package/client-dist/consultant.module-WUUVSVHL.js +0 -3
- package/client-dist/err.module-B666YXQT.js +0 -6
- package/client-dist/err.module-B666YXQT.js.map +0 -7
- package/client-dist/oc.module-CDGBJ6I4.js +0 -3
- package/client-dist/orc.module-5S7GBE4E.js +0 -2
- package/client-dist/orc.module-5S7GBE4E.js.map +0 -7
- package/client-dist/project-source-routed.module-FDCQCUUB.js +0 -2
- package/client-dist/session.module-AKETH5O2.js +0 -12
- package/client-dist/session.module-AKETH5O2.js.map +0 -7
- package/client-dist/styles-KHQAHCL5.css +0 -2
- package/client-dist/styles-KHQAHCL5.css.map +0 -7
- /package/client-dist/{agent-instances.module-V7DKSWVC.js.map → agent-instances.module-4ADMPXCV.js.map} +0 -0
- /package/client-dist/{chunk-CRYF37M7.js.map → chunk-3HJWN4W6.js.map} +0 -0
- /package/client-dist/{chunk-D2UUXA6L.js.map → chunk-4EV32FFZ.js.map} +0 -0
- /package/client-dist/{chunk-AX7QIINI.js.map → chunk-4H3E32UH.js.map} +0 -0
- /package/client-dist/{chunk-OUBNMT7L.js.map → chunk-5NW5UGVZ.js.map} +0 -0
- /package/client-dist/{chunk-HLNT234H.js.map → chunk-AM5URSKV.js.map} +0 -0
- /package/client-dist/{chunk-SYCUR4MY.js.map → chunk-AMROWQBM.js.map} +0 -0
- /package/client-dist/{chunk-PTCJL62W.js.map → chunk-AR6EOT63.js.map} +0 -0
- /package/client-dist/{chunk-OLK5MJ4J.js.map → chunk-B25EGDHU.js.map} +0 -0
- /package/client-dist/{chunk-4SFV57IQ.js.map → chunk-BQTJHETS.js.map} +0 -0
- /package/client-dist/{chunk-XTUQJ3W6.js.map → chunk-COOWEMEW.js.map} +0 -0
- /package/client-dist/{chunk-TOFOK5W7.js.map → chunk-E3JXFFHE.js.map} +0 -0
- /package/client-dist/{chunk-OQW6FXRJ.js.map → chunk-ESIGVRCK.js.map} +0 -0
- /package/client-dist/{chunk-JMZKJLUE.js.map → chunk-EVMDNGBK.js.map} +0 -0
- /package/client-dist/{chunk-6GSTJE3R.js.map → chunk-F6VMAVI5.js.map} +0 -0
- /package/client-dist/{chunk-VO5ZLOZM.js.map → chunk-GBOES7QW.js.map} +0 -0
- /package/client-dist/{chunk-2OAF6FCL.js.map → chunk-GTERKRTR.js.map} +0 -0
- /package/client-dist/{chunk-7X22BWF7.js.map → chunk-HD4CODAD.js.map} +0 -0
- /package/client-dist/{chunk-2EMFCVYO.js.map → chunk-I3FSMGMK.js.map} +0 -0
- /package/client-dist/{chunk-VGTXKD6D.js.map → chunk-IFYHOOVA.js.map} +0 -0
- /package/client-dist/{chunk-PFBJ7ZHP.js.map → chunk-IVLMVAVJ.js.map} +0 -0
- /package/client-dist/{chunk-3D32XY5M.js.map → chunk-KIKSSJKL.js.map} +0 -0
- /package/client-dist/{chunk-U2EBQMSE.js.map → chunk-LPNQ5PRN.js.map} +0 -0
- /package/client-dist/{chunk-4JKJRGJX.js.map → chunk-MO37SUK2.js.map} +0 -0
- /package/client-dist/{chunk-BC7H7K5F.js.map → chunk-MYVEHPA7.js.map} +0 -0
- /package/client-dist/{chunk-JEHOIN7Y.js.map → chunk-N55GOFVU.js.map} +0 -0
- /package/client-dist/{chunk-R5WCLLO5.js.map → chunk-NNUHTCXG.js.map} +0 -0
- /package/client-dist/{chunk-TP2634XD.js.map → chunk-OKTAADTQ.js.map} +0 -0
- /package/client-dist/{chunk-DURLBTAJ.js.map → chunk-ONS7XQYD.js.map} +0 -0
- /package/client-dist/{chunk-PG7CJVEP.js.map → chunk-PZN2OI7U.js.map} +0 -0
- /package/client-dist/{chunk-C4JDDOQR.js.map → chunk-QUD3BEHN.js.map} +0 -0
- /package/client-dist/{chunk-DJVWZQNB.js.map → chunk-QUEYZI42.js.map} +0 -0
- /package/client-dist/{chunk-3TMVRWAB.js.map → chunk-RAHCHCWR.js.map} +0 -0
- /package/client-dist/{chunk-SQWHJTFE.js.map → chunk-RCCUSGIN.js.map} +0 -0
- /package/client-dist/{chunk-GADEZIXI.js.map → chunk-RL5LPTPO.js.map} +0 -0
- /package/client-dist/{chunk-5C3KCWYF.js.map → chunk-SDVXPGB7.js.map} +0 -0
- /package/client-dist/{chunk-CLQC45GB.js.map → chunk-TNLHQRL7.js.map} +0 -0
- /package/client-dist/{chunk-JZHYGU3K.js.map → chunk-TWK7BOB7.js.map} +0 -0
- /package/client-dist/{chunk-ILG5WENK.js.map → chunk-U62YECNK.js.map} +0 -0
- /package/client-dist/{chunk-RSPVPEQ4.js.map → chunk-UOC6UYZT.js.map} +0 -0
- /package/client-dist/{chunk-AI7WKHRQ.js.map → chunk-VDQROW6J.js.map} +0 -0
- /package/client-dist/{chunk-3PA6BJES.js.map → chunk-VMXIXZV2.js.map} +0 -0
- /package/client-dist/{chunk-CFHQS3UB.js.map → chunk-WRI37SX4.js.map} +0 -0
- /package/client-dist/{chunk-MS5OG7JD.js.map → chunk-XLSL262Q.js.map} +0 -0
- /package/client-dist/{chunk-3PLWSRB4.js.map → chunk-YN4H6MW2.js.map} +0 -0
- /package/client-dist/{chunk-OEEQNIJG.js.map → chunk-Z5FUR5ZW.js.map} +0 -0
- /package/client-dist/{chunk-MY75XBDH.js.map → chunk-ZCHMBEHT.js.map} +0 -0
- /package/client-dist/{chunk-LIQPVSH3.js.map → chunk-ZPJ6KYMA.js.map} +0 -0
- /package/client-dist/{crd.module-IRGVOYD5.js.map → crd.module-2I2BDC3A.js.map} +0 -0
- /package/client-dist/{dashboard.module-NPPSZHO6.js.map → dashboard.module-X2A6LOTA.js.map} +0 -0
- /package/client-dist/{do.module-GKQTJOXR.js.map → do.module-CJWEKZ4L.js.map} +0 -0
- /package/client-dist/{document-library.module-JK3K7QNJ.js.map → document-library.module-WJSFZPA7.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-LVESAMPN.js.map → embedding-eval.module-FOALIAQW.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-3ECACZZ3.js.map → embedding-registry.module-SS646R4H.js.map} +0 -0
- /package/client-dist/{feedback.module-AHG7462C.js.map → feedback.module-T3MZQKXV.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-XFUI7B65.js.map → host-runtime-mcp.module-FBZZGQGD.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-OMK67DGM.js.map → live-dev-pipeline.module-OKQYFSJL.js.map} +0 -0
- /package/client-dist/{logs.module-FWACECVV.js.map → logs.module-SHHOD5XW.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-GQ6RMPRB.js.map → master-control-remote-poc.module-ITXHYU5K.js.map} +0 -0
- /package/client-dist/{mobile-app.module-YSARX6QC.js.map → mobile-app.module-Q3W3PU4O.js.map} +0 -0
- /package/client-dist/{model-registry.module-SJOUSDXZ.js.map → model-registry.module-DGN55LTQ.js.map} +0 -0
- /package/client-dist/{project-management.module-LWZLB6VU.js.map → project-management.module-T7NBKKSR.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-FDCQCUUB.js.map → project-source-routed.module-YO54LEGN.js.map} +0 -0
- /package/client-dist/{scheduler.module-VH647PWD.js.map → scheduler.module-4CMBOTGZ.js.map} +0 -0
- /package/client-dist/{setup.module-RRQZ62B2.js.map → setup.module-5T6MCMR4.js.map} +0 -0
- /package/client-dist/{terminals.module-QKIQS6FH.js.map → terminals.module-AQO2TVO2.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-K3FB6OIB.js.map → voice-notes-poc.module-EI2HY7YJ.js.map} +0 -0
- /package/client-dist/{wfs.module-JVR53PGJ.js.map → wfs.module-AHRZE5WB.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as x}from"./chunk-UOC6UYZT.js";import{a as T}from"./chunk-UFBTR2BG.js";import{a as P}from"./chunk-SDVXPGB7.js";import{e as D}from"./chunk-TWK7BOB7.js";import{G as C,I as v,p as N}from"./chunk-Y6V4NGLU.js";import{C as p,a as g,aa as o,b as I,h as O,jb as k,k as a,l as b,p as u,vb as S,xb as w,y as E}from"./chunk-TBMJSIBB.js";var A=class{static computeSocketUrlFromStatus(m,e){return e}};var L=class{static toDisplayString(m){if(m==null)return"";if(typeof m=="string")return m;if(typeof m=="object"&&m!==null){let t=m;if(typeof t.message=="string"&&t.message.trim().length>0)return t.message.trim();if(typeof t.error=="string"&&t.error.trim().length>0)return t.error.trim();if(typeof t.detail=="string"&&t.detail.trim().length>0)return t.detail.trim()}let e=String(m);return e==="[object Object]"?"\u2014":e}};var h=O(N());var F=(()=>{class r{baseUrl=`${v.api.baseUrl}/session`;http=p(w);getMessages(e){return u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages`,{params:{viewMode:e.viewMode}}))}getMessagesChunked(e){let t={viewMode:e.viewMode};return e.beforeIndex!=null&&(t.beforeIndex=String(e.beforeIndex)),e.limit!=null&&(t.limit=String(e.limit)),e.latest&&(t.latest="1"),e.archiveScope&&(t.archiveScope=e.archiveScope),u(this.http.get(`${this.baseUrl}/${e.sessionId}/messages/chunk`,{params:t}))}sendMessage(e){return u(this.http.post(`${this.baseUrl}/${e.sessionId}/messages`,{content:e.content,imageAttachments:e.imageAttachments}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var R=(()=>{class r{baseUrl=`${v.api.baseUrl}/session`;http=p(w);peiContext_DS=p(P);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(e){let t=this.currentCcapId();return t?e.set("ccapId",t):e}listSessions(){let e=this.withCcapId(new S);return u(this.http.get(this.baseUrl,{params:e}))}listArchivedSessions(){let e=this.withCcapId(new S);return e=e.set("archived","true"),u(this.http.get(this.baseUrl,{params:e}))}createSession(e){let t={},s=e?.name!==void 0?e.name.trim():void 0;s!==void 0&&s.length>0&&(t.name=s);let n=this.withCcapId(new S);return u(this.http.post(this.baseUrl,t,{params:n}))}getSession(e){let t=this.withCcapId(new S);return u(this.http.get(`${this.baseUrl}/${e}`,{params:t}))}updateSession(e){let t=this.withCcapId(new S);return u(this.http.patch(`${this.baseUrl}/${e.sessionId}`,e.updates,{params:t}))}getSessionInfo(e){let t=this.withCcapId(new S);return u(this.http.get(`${this.baseUrl}/${e}/session-info`,{params:t}))}copySession(e){let t={};e.name&&(t.name=e.name),e.forkUntilMessageKey&&(t.forkUntilMessageKey=e.forkUntilMessageKey);let s=this.withCcapId(new S);return u(this.http.post(`${this.baseUrl}/${e.sessionId}/copy`,t,{params:s}))}stopExecution(e){let t=this.withCcapId(new S);return u(this.http.post(`${this.baseUrl}/${e}/stop-execution`,{},{params:t}))}getLlmDebugTrace(e){let t=this.withCcapId(new S);return t=t.set("runId",e.runId),u(this.http.get(`${this.baseUrl}/${e.sessionId}/llm-debug-trace`,{params:t}))}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var B="answer",V="notify-user",j="agent-events",z="context:updated",H="monitoring:event",G="user-interaction:request",q="user-interaction:resolved",W="ccap_notification",Q="notification-sent",X="waiting-for-user",Ce=(()=>{class r{sessionDetailBySessionId=new Map;sessionInfoBySessionId=new Map;activeSessionId_$=o("");requestSidebarCloseOnMobileBump_$=o(0);sessions_$=o([]);sessionsLoadError_$=o(null);sessionsLoading_$=o(!1);archivedSessions_$=o([]);archivedSessionsLoading_$=o(!1);messages_$=o([]);messagesLoading_$=o(!1);messagesLoadError_$=o(null);currentArchiveScope_$=o("active");chunkState_$=o({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0});agentEvents_$=o({});activeRunExecutionMode_$=o("");contextUpdated_$=o(null);monitoringEvent_$=o(null);monitoringEvent_S=new b;pendingInteraction_$=o(null);pendingNotification_$=o(null);sessionDetailMap_$=o(new Map);sessionDetailLoading_$=o(!1);sessionInfoMap_$=o(new Map);sessionInfoLoading_$=o(!1);sessionInfoLoadError_$=o(null);llmDebugTraceEntries_$=o([]);llmDebugTraceLoading_$=o(!1);llmDebugTraceLoadError_$=o(null);eventSubscription=null;connectedEffectRef=null;session_AS=p(R);conversation_AS=p(F);serverStatus_AS=p(x);socket_CS=p(D);get connected_$(){return this.socket_CS.connected_$}get socketStatus_$(){return this.socket_CS.status_$}get lastSocketError_$(){return this.socket_CS.lastError_$}get connectAttemptCount_$(){return this.socket_CS.connectAttemptCount_$}diagnoseConnection(){return this.socket_CS.diagnoseConnection()}constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(e=>{this.handleSocketEvent(e)}),this.connectedEffectRef=k(()=>{this.socket_CS.connected_$()&&this.getActiveSessionId()&&this.socket_CS.emit("session:attach",{sessionId:this.getActiveSessionId()})})}handleSocketEvent(e){let t=e.payload??{},s=this.getActiveSessionId(),n=typeof t.channelId=="string"?t.channelId:void 0,c=typeof t.sessionId=="string"?t.sessionId:void 0,_=!n&&!c||n===s||c===s;if(e.event===B&&_){let i=typeof t.content=="string"?t.content:"",d=typeof t.timestamp=="string"?t.timestamp:new Date().toISOString(),l=typeof t.runId=="string"?t.runId:void 0,y={role:"assistant",content:i,timestamp:new Date(d)},f=l?I(g({},y),{runId:l}):y,$=this.ensureClientListKey(f);this.messages_$.set([...this.messages_$(),$]);return}if(e.event===V&&_){let i=typeof t.content=="string"?t.content:"";h.DyFM_Log.info(`CCAP_SessionDS | notify-user received: ${i.substring(0,120)}\u2026`);let d=this.ensureClientListKey({role:"system",content:i,timestamp:new Date});this.messages_$.set([...this.messages_$(),d]);return}if(e.event===j){let i=typeof t.eventData=="object"&&t.eventData!==null?t.eventData:{};this.agentEvents_$.set(i),this.applyAgentEventRunExecutionModeLatch(i);let d=typeof i.toolId=="string"?i.toolId:"",l=typeof i.phase=="string"?i.phase:"";l==="runInitialization"&&_&&this.transitionLatestUserMessageToProcessing(),d===W&&(l===Q||l===X)?this.pendingNotification_$.set({phase:l,notificationTitle:typeof i.notificationTitle=="string"?i.notificationTitle:"",notificationType:typeof i.notificationType=="string"?i.notificationType:"",notificationPriority:typeof i.notificationPriority=="string"?i.notificationPriority:"info"}):this.pendingNotification_$()&&this.pendingNotification_$.set(null);let y=i.toolError,f=n??i.channelId,$=!f||f===s,M=L.toDisplayString(y).trim();if(M.length>0&&$){h.DyFM_Log.info(`CCAP_SessionDS | toolError from agent-events, pushing to chat: ${M.substring(0,80)}\u2026`);let K=this.ensureClientListKey({role:"system",content:M,timestamp:new Date});this.messages_$.set([...this.messages_$(),K])}return}if(e.event===z){let i=typeof t.sessionId=="string"?t.sessionId:"",d=typeof t.contextState=="object"&&t.contextState!==null?t.contextState:{};this.contextUpdated_$.set({sessionId:i,contextState:d});return}if(e.event===H){let i=typeof t.sessionId=="string"?t.sessionId:"",d=typeof t.event=="object"&&t.event!==null?t.event:{},l={sessionId:i,event:d};this.monitoringEvent_$.set(l),this.monitoringEvent_S.next(l);return}if(e.event===G&&_){this.pendingInteraction_$.set(t);return}if(e.event===q&&_){let i=typeof t.interactionId=="string"?t.interactionId:void 0;if(!i)return;this.pendingInteraction_$()?.interactionId===i&&this.pendingInteraction_$.set(null);return}}loadSessions(){return a(this,null,function*(){this.sessionsLoading_$.set(!0);try{this.sessionsLoadError_$.set(null);let e=yield this.session_AS.listSessions();return this.sessions_$.set(e.sessions),e.sessions}catch(e){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load sessions",e),this.sessionsLoadError_$.set(e),[]}finally{this.sessionsLoading_$.set(!1)}})}createSession(e){return a(this,null,function*(){let t=yield this.session_AS.createSession(e);return yield this.loadSessions(),t.session})}copySession(e){return a(this,null,function*(){let t=yield this.session_AS.copySession(e);return yield this.loadSessions(),t.session})}forkSession(e){return a(this,null,function*(){let t=yield this.session_AS.copySession({sessionId:e.sessionId,name:e.name,forkUntilMessageKey:e.forkUntilMessageKey});return yield this.loadSessions(),t.session})}loadArchivedSessions(){return a(this,null,function*(){this.archivedSessionsLoading_$.set(!0);try{let e=yield this.session_AS.listArchivedSessions();return this.archivedSessions_$.set(e.sessions),e.sessions}catch(e){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load archived sessions",e),this.archivedSessions_$.set([]),[]}finally{this.archivedSessionsLoading_$.set(!1)}})}setActiveSession(e){this.activeSessionId_$()!==e&&(this.activeSessionId_$.set(e),this.clearMessages(),this.pendingInteraction_$.set(null),this.activeRunExecutionMode_$.set("")),this.socket_CS.emit("session:attach",{sessionId:e})}getActiveSessionId(){return this.activeSessionId_$()}reconnectSocket(){return a(this,null,function*(){try{let e=yield this.serverStatus_AS.getStatus(),t=typeof window<"u"?window.location.origin:"",s=A.computeSocketUrlFromStatus({httpPort:e.httpPort,socketPort:e.socketPort},t),n=v.socketUrl??t;if(s!==n&&typeof window<"u"){v.socketUrl=s,h.DyFM_Log.info("CCAP_SessionDS | socketUrl changed on reconnect, reloading",s),window.location.reload();return}}catch{}this.socket_CS.reconnect()})}stopExecution(e){return a(this,null,function*(){try{return(yield this.session_AS.stopExecution(e)).success}catch(t){return h.DyFM_Error.logSimple("CCAP_Session_DS | stopExecution failed",t),!1}})}sendMessageViaSocket(e,t){return a(this,null,function*(){let s=e.trim();if(s==="/new")return{newSession:yield this.createSession(),sent:!0};let n=this.activeSessionId_$();if(!n)return{sent:!1};let c=(t?.length??0)>0;if(!s.length&&!c)return{sent:!1};let _={role:"user",content:e,timestamp:new Date,processingStatus:"sending"},i=this.ensureClientListKey(_);this.messages_$.set([...this.messages_$(),i]);try{let l=(yield this.conversation_AS.sendMessage({sessionId:n,content:e,imageAttachments:t})).message,y=this.messages_$().map(f=>{if(f.clientListKey!==i.clientListKey)return f;let $=g({},f);return $.processingStatus="sent",l?.messageKey&&($.messageKey=l.messageKey),l?.hasTtsAudio!==void 0&&($.hasTtsAudio=l.hasTtsAudio),$});return this.messages_$.set(y),{sent:!0}}catch(d){h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to send message via REST",d);let l=this.messages_$().filter(f=>f.clientListKey!==i.clientListKey);return this.messages_$.set(l),{sent:!1,error:d instanceof Error?d.message:"\xDCzenet k\xFCld\xE9se sikertelen."}}})}sendMessageToSession(e){return a(this,null,function*(){yield this.conversation_AS.sendMessage({sessionId:e.sessionId,content:e.content})})}sendInteractionResponse(e){this.socket_CS.emit("user-interaction:response",e),this.pendingInteraction_$.set(null)}clearMessages(){this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.currentArchiveScope_$.set("active")}setMessages(e){let s=(e??[]).map(n=>this.ensureClientListKey(n));this.messages_$.set(s)}transitionLatestUserMessageToProcessing(){let e=this.messages_$(),t=-1;for(let c=e.length-1;c>=0;c=c-1)if(e[c].role==="user"){t=c;break}if(t<0||e[t].processingStatus!=="sent")return;let n=e.map((c,_)=>_!==t?c:I(g({},c),{processingStatus:"processing"}));this.messages_$.set(n)}ensureClientListKey(e){if(e.clientListKey?.trim()?.length)return e;let s=e.messageKey?.trim();return s?.length?I(g({},e),{clientListKey:s}):I(g({},e),{clientListKey:globalThis.crypto.randomUUID()})}setMessageTtsCached(e){let s=this.messages_$().map(n=>n.messageKey===e?I(g({},n),{hasTtsAudio:!0}):n);this.messages_$.set(s)}loadMessagesForView(e){return a(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let s=(yield this.conversation_AS.getMessages({sessionId:e,viewMode:"conversationFull"})).messages??[];return e===this.activeSessionId_$()&&this.setMessages(s),s}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load messages for view",t),this.messagesLoadError_$.set(t),[]}finally{this.messagesLoading_$.set(!1)}})}loadInitialChunk(e){return a(this,null,function*(){this.messagesLoading_$.set(!0),this.messagesLoadError_$.set(null);try{let t=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",latest:!0,limit:e.limit??50,archiveScope:e.archiveScope});return e.sessionId===this.activeSessionId_$()&&(this.setMessages(t.messages??[]),this.chunkState_$.set({total:t.total,hasMore:t.hasMore,nextBeforeIndex:t.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:t.archivedTotal})),t}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load initial chunk",t),this.messagesLoadError_$.set(t),null}finally{this.messagesLoading_$.set(!1)}})}loadOlderChunk(e){return a(this,null,function*(){let t=this.chunkState_$();if(!t.hasMore||t.nextBeforeIndex==null||t.isLoadingOlder)return null;this.chunkState_$.set(I(g({},t),{isLoadingOlder:!0}));try{let s=yield this.conversation_AS.getMessagesChunked({sessionId:e.sessionId,viewMode:e.viewMode??"conversationFull",beforeIndex:t.nextBeforeIndex,limit:e.limit??50,archiveScope:e.archiveScope});if(e.sessionId===this.activeSessionId_$()){let n=(s.messages??[]).map(c=>this.ensureClientListKey(c));this.messages_$.set([...n,...this.messages_$()]),this.chunkState_$.set({total:s.total,hasMore:s.hasMore,nextBeforeIndex:s.nextBeforeIndex,isLoadingOlder:!1,archivedTotal:s.archivedTotal})}else this.chunkState_$.set(I(g({},t),{isLoadingOlder:!1}));return s}catch(s){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load older chunk",s),this.messagesLoadError_$.set(s),this.chunkState_$.set(I(g({},t),{isLoadingOlder:!1})),null}})}switchToArchiveView(e){return a(this,null,function*(){this.currentArchiveScope_$.set("archive");let t=this.chunkState_$().archivedTotal;return this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:t}),this.loadInitialChunk({sessionId:e,archiveScope:"archive"})})}switchToActiveView(e){return a(this,null,function*(){return this.currentArchiveScope_$.set("active"),this.messages_$.set([]),this.chunkState_$.set({total:0,hasMore:!1,nextBeforeIndex:null,isLoadingOlder:!1,archivedTotal:0}),this.loadInitialChunk({sessionId:e,archiveScope:"active"})})}loadSessionDetail(e){return a(this,null,function*(){if(!e)return null;this.sessionDetailLoading_$.set(!0);try{let t=yield this.session_AS.getSession(e),s={session:t.session,lastRun:t.lastRun??null};return this.sessionDetailBySessionId.set(e,s),this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId)),s}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session detail",t),null}finally{this.sessionDetailLoading_$.set(!1)}})}getCachedSessionDetail(e){return this.sessionDetailBySessionId.get(e)??null}loadSessionInfo(e){return a(this,null,function*(){if(!e)return null;this.sessionInfoLoading_$.set(!0),this.sessionInfoLoadError_$.set(null);try{let t=yield this.session_AS.getSessionInfo(e);return this.sessionInfoBySessionId.set(e,t),this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId)),t}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load session info",t),this.sessionInfoLoadError_$.set(t),null}finally{this.sessionInfoLoading_$.set(!1)}})}getCachedSessionInfo(e){return this.sessionInfoBySessionId.get(e)??null}fetchLlmDebugTraceEntriesForRun(e){return a(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s)return[];try{return(yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s})).entries??[]}catch{return[]}})}loadLlmDebugTrace(e){return a(this,null,function*(){let t=e.sessionId?.trim()??"",s=e.runId?.trim()??"";if(!t||!s){this.llmDebugTraceEntries_$.set([]);return}this.llmDebugTraceLoading_$.set(!0),this.llmDebugTraceLoadError_$.set(null);try{let n=yield this.session_AS.getLlmDebugTrace({sessionId:t,runId:s});this.llmDebugTraceEntries_$.set(n.entries)}catch(n){h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to load LLM debug trace",n),this.llmDebugTraceLoadError_$.set(n),this.llmDebugTraceEntries_$.set([])}finally{this.llmDebugTraceLoading_$.set(!1)}})}updateSession(e){return a(this,null,function*(){try{let t=yield this.session_AS.updateSession(e),s=e.updates.archived;return s===!0||s===!1?(yield this.loadSessions(),yield this.loadArchivedSessions()):yield this.loadSessions(),t.session}catch(t){return h.DyFM_Error.logSimple("CCAP_SessionDS | Failed to update session",t),null}})}applyAgentEventRunExecutionModeLatch(e){let t=e.phase,s=typeof t=="string"?t.trim():"";if(s===T.analyzeResult){let n=e.runExecutionMode;if(typeof n=="string"&&n.trim()!==""){let c=r.normalizeRunExecutionModeSocketValue(n);c!==void 0&&this.activeRunExecutionMode_$.set(c)}return}(s===T.runFlowComplete||s===T.runInitialization)&&this.activeRunExecutionMode_$.set("")}static normalizeRunExecutionModeSocketValue(e){let t=e.trim(),s=[C.instant,C.agenticAny,C.ask,C.plan];for(let n of s)if(t===n)return n}ngOnDestroy(){this.monitoringEvent_S.complete(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.connectedEffectRef&&(this.connectedEffectRef.destroy(),this.connectedEffectRef=null)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{A as a,L as b,Ce as c};
|
|
2
|
+
//# sourceMappingURL=chunk-VQ4GBHH7.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["src/app/_collections/utils/socket-url.util.ts", "src/app/_collections/display/display-string.util.ts", "src/app/_modules/session/_services/data-services/session.data-service.ts", "src/app/_modules/session/_services/api-services/ses-conversation.api-service.ts", "src/app/_modules/session/_services/api-services/session.api-service.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Socket URL számítás a GET /server/status válaszból (httpPort, socketPort).\n * Közös logika: main.ts bootstrap és reconnect flow (status refresh).\n */\n\nimport { CCAP_StatusPorts_Interface } from './socket-url.util.interface';\n\n/**\n * Socket URL util – statikus metódusokkal.\n */\nexport class SocketUrl_Util {\n /**\n * Status válaszból kiszámítja a socket URL-t.\n * Mindig same-origin (origin): dev-ben a proxy-local továbbítja 39052-re,\n * server-served HTTP (39050) esetén a socket ugyanazon a HTTP szerveren van,\n * HTTPS UI (39051) esetén a szerver /socket.io-t a belső HTTP port Engine.IO-jára proxyzza (wss).\n */\n static computeSocketUrlFromStatus(\n _data: CCAP_StatusPorts_Interface,\n origin: string,\n ): string {\n return origin;\n }\n}\n", "/**\n * Ismeretlen érték megjelenítési szöveggé alakítása.\n * Object esetén nem \"[object Object]\" hanem .message / .error / .detail vagy fallback.\n */\nexport class DisplayString_Util {\n /**\n * Ismeretlen érték megjelenítési szöveggé alakítása.\n */\n static toDisplayString(value: unknown): string {\n if (value === undefined || value === null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n if (typeof value === 'object' && value !== null) {\n const o: Record<string, unknown> = value as Record<string, unknown>;\n if (typeof o.message === 'string' && o.message.trim().length > 0) {\n return o.message.trim();\n }\n if (typeof o.error === 'string' && o.error.trim().length > 0) {\n return o.error.trim();\n }\n if (typeof o.detail === 'string' && o.detail.trim().length > 0) {\n return o.detail.trim();\n }\n }\n const s: string = String(value);\n if (s === '[object Object]') {\n return '—';\n }\n return s;\n }\n}\n", "import { effect, EffectRef, inject, Injectable, OnDestroy, signal } from '@angular/core';\n\nimport { Subject, Subscription } from 'rxjs';\n\nimport { DyFM_Error, DyFM_Log } from '@futdevpro/fsm-dynamo';\n\nimport { AC_RunExecutionMode_Type } from '@server-enums';\nimport { SocketUrl_Util } from '../../../../_collections/utils/socket-url.util';\nimport { DisplayString_Util } from '../../../../_collections/display/display-string.util';\nimport { AC_RunFlowPhase_Type } from '../../../../_enums/run-session/ccap-run-flow-phase.enum';\nimport { CCAP_SocketStatus_Type } from '../../../../_enums/ccap-socket-status.enum';\nimport { AC_LastRunSummary_Response } from '../../../../_models/interfaces/session/ccap-last-run-summary.interface';\nimport {\n CCAP_SessionListItem_Response,\n} from '../../../../_models/interfaces/session/ccap-session-list-item.interface';\nimport {\n AC_LlmDebugTraceEntry_Response,\n AC_SessionInfo_Response,\n UIn_UserInteractionRequest_Interface,\n UIn_UserInteractionResponse_Interface,\n} from '../../../../_models/server-index';\nimport {\n Ses_ArchiveScope_Type,\n Ses_ClientImageAttachment_Response,\n Ses_ClientMessage_Response,\n Ses_MessagesChunk_Response,\n} from '../api-services/conversation.api-service.interface';\nimport { Ses_Conversation_ApiService } from '../api-services/ses-conversation.api-service';\nimport { SSt_Server_ApiService } from '../../../system/_modules/system-status/_services/sst-server.api-service';\nimport { Session_ApiService } from '../api-services/session.api-service';\nimport { CCAP_Socket_ControlService } from '../../../../_services/control-services/ccap-socket.control-service';\nimport { environment } from '../../../../../environments/environment';\n\n/** Szerver event nevek (egyezzen a socket service konstansokkal). */\nconst SOCKET_EVENT_ANSWER: string = 'answer';\nconst SOCKET_EVENT_NOTIFY_USER: string = 'notify-user';\nconst SOCKET_EVENT_AGENT_EVENTS: string = 'agent-events';\nconst SOCKET_EVENT_CONTEXT_UPDATED: string = 'context:updated';\nconst SOCKET_EVENT_MONITORING_EVENT: string = 'monitoring:event';\nconst SOCKET_EVENT_USER_INTERACTION_REQUEST: string = 'user-interaction:request';\nconst SOCKET_EVENT_USER_INTERACTION_RESOLVED: string = 'user-interaction:resolved';\n\n/** NTF notification tool ID — agent-events toolId felismeréshez. */\nconst NTF_TOOL_ID: string = 'ccap_notification';\n/** Agent-events phase: notification elküldve (message típus). */\nconst NTF_PHASE_SENT: string = 'notification-sent';\n/** Agent-events phase: notification válaszra vár (interaktív típus). */\nconst NTF_PHASE_WAITING: string = 'waiting-for-user';\n\n/**\n * Session data service.\n * Session state management; real-time események a Socket Control Service event$ streamből szűrve.\n */\n@Injectable({ providedIn: 'root' })\nexport class Session_DataService implements OnDestroy {\n\n /** Session detail cache (session + lastRun) sessionId szerint. */\n private sessionDetailBySessionId: Map<\n string,\n { session: CCAP_SessionListItem_Response; lastRun: AC_LastRunSummary_Response | null }\n > = new Map();\n\n /** Session info cache sessionId szerint. */\n private sessionInfoBySessionId: Map<string, AC_SessionInfo_Response> = new Map();\n\n /** Aktív session ID (main frame WebSocket indikátor). */\n readonly activeSessionId_$ = signal<string>('');\n\n /**\n * REQ-UI-SES-MOB-AUTOCLOSE-001: bump-counter signal — explicit kérés a session-list\n * sidebar mobil-bezárására. A `ses-list` (`createNewSession` után) bumpolja, a\n * `ses-shell` effect-tel figyeli és isMobile esetén bezárja a sidebar-t. Ez kiegészíti\n * a NavigationEnd-alapú auto-close-t azokra az esetekre, ahol a route-snapshot lag\n * miatt a NavigationEnd-handler nem fut megfelelően (vagy a flow nem navigation-alapú).\n */\n readonly requestSidebarCloseOnMobileBump_$ = signal<number>(0);\n\n /** Session lista. */\n readonly sessions_$ = signal<CCAP_SessionListItem_Response[]>([]);\n\n /** Session lista betöltési hiba (null = nincs hiba); nyers error az app-ccap-error-display-nek. */\n readonly sessionsLoadError_$ = signal<unknown | null>(null);\n\n /** Session lista betöltés folyamatban (true = loading). */\n readonly sessionsLoading_$ = signal<boolean>(false);\n\n /** Archivált session lista. */\n readonly archivedSessions_$ = signal<CCAP_SessionListItem_Response[]>([]);\n\n /** Archivált session lista betöltés folyamatban (true = loading). */\n readonly archivedSessionsLoading_$ = signal<boolean>(false);\n\n /** Üzenetek (real-time chat). */\n readonly messages_$ = signal<Ses_ClientMessage_Response[]>([]);\n\n /** Üzenetek betöltés folyamatban (true = loading). */\n readonly messagesLoading_$ = signal<boolean>(false);\n\n /** Üzenetek betöltési hiba (null = nincs hiba); nyers error az app-ccap-error-display-nek. */\n readonly messagesLoadError_$ = signal<unknown | null>(null);\n\n /**\n * REQ-SES-CONTENT-CHUNK-LOAD-AND-ARCHIVE-001 Slice 5 — aktuális archive-view scope\n * (a chat-komponens „Archív szakasz megnyitása\" gomb-toggle-jétől). Default\n * `'active'` — session-switch is reset-eli erre. A `loadInitialChunk` /\n * `loadOlderChunk` callerek ezt olvassák, hogy a megfelelő scope-ot küldjék\n * az API-nak. `'archive'`-ban a chat csak archív üzeneteket lát.\n */\n readonly currentArchiveScope_$ = signal<Ses_ArchiveScope_Type>('active');\n\n /**\n * REQ-SES-CONTENT-CHUNK-LOAD-AND-ARCHIVE-001 Slice 3+4 — chunk-pagináció state.\n * `total`: aktív (scope-szerinti) message-count; `hasMore`: van-e még régebbi\n * szakasz; `nextBeforeIndex`: a következő prepend kursor (vagy null);\n * `isLoadingOlder`: true a backward-prepend fetch alatt (UI top-spinner);\n * `archivedTotal`: a session-ben lévő archív üzenetek száma (Slice 4 — UI\n * „Archív szakasz megnyitása\" gomb-szám).\n */\n readonly chunkState_$ = signal<{\n total: number;\n hasMore: boolean;\n nextBeforeIndex: number | null;\n isLoadingOlder: boolean;\n archivedTotal: number;\n }>({\n total: 0,\n hasMore: false,\n nextBeforeIndex: null,\n isLoadingOlder: false,\n archivedTotal: 0,\n });\n\n /** Agent event-ek (phase, status a chat status/typing-hoz). */\n readonly agentEvents_$ = signal<Record<string, unknown>>({});\n\n /**\n * Aktuális futás `runExecutionMode`-ja az utolsó analyze-result agent-event után;\n * törlődik run vége / új run init / session váltás után (run summary + chat badge).\n */\n readonly activeRunExecutionMode_$ = signal<string>('');\n\n /** Context frissítés event (real-time context panel). */\n readonly contextUpdated_$ = signal<{\n sessionId: string;\n contextState: Record<string, unknown>;\n } | null>(null);\n\n /** Monitoring event (real-time timeline); signal – backward compat, de nem elsődleges csatorna. */\n readonly monitoringEvent_$ = signal<{\n sessionId: string;\n event: Record<string, unknown>;\n } | null>(null);\n\n /**\n * Monitoring event Subject (megbízható event stream).\n * A signal-alapú monitoringEvent_$ batch-elés miatt köztes event-eket veszíthet;\n * ez a Subject minden event-et garantáltan továbbít a subscriber-eknek.\n */\n readonly monitoringEvent_S: Subject<{\n sessionId: string;\n event: Record<string, unknown>;\n }> = new Subject();\n\n /** Pending user interaction request (agent kérdez, user válaszol a UI card-on). */\n readonly pendingInteraction_$ = signal<UIn_UserInteractionRequest_Interface | null>(null);\n\n /**\n * Pending notification event az agent-events stream-ből (ccap_notification tool hívás közben).\n * A chat UI inline notification kártyát / status szöveget renderel ebből.\n * phase: 'notification-sent' (message típus, rövid flash) vagy 'waiting-for-user' (interaktív, amíg válasz jön).\n */\n readonly pendingNotification_$ = signal<{\n phase: string;\n notificationTitle: string;\n notificationType: string;\n notificationPriority: string;\n } | null>(null);\n\n /** Session detail map (cache). */\n readonly sessionDetailMap_$ = signal<\n Map<string, { session: CCAP_SessionListItem_Response; lastRun: AC_LastRunSummary_Response | null }>\n >(new Map());\n\n /** Session detail betöltés folyamatban. */\n readonly sessionDetailLoading_$ = signal<boolean>(false);\n\n /** Session info map (cache). */\n readonly sessionInfoMap_$ = signal<Map<string, AC_SessionInfo_Response>>(new Map());\n\n /** Session info betöltés folyamatban. */\n readonly sessionInfoLoading_$ = signal<boolean>(false);\n\n /** Session info betöltési hiba (null = nincs hiba). */\n readonly sessionInfoLoadError_$ = signal<unknown | null>(null);\n\n /** Utolsó betöltött LLM debug trace (Info panel). */\n readonly llmDebugTraceEntries_$ = signal<AC_LlmDebugTraceEntry_Response[]>([]);\n\n /** LLM debug trace betöltés folyamatban. */\n readonly llmDebugTraceLoading_$ = signal<boolean>(false);\n\n /** LLM debug trace betöltési hiba. */\n readonly llmDebugTraceLoadError_$ = signal<unknown | null>(null);\n\n /** Socket event$ feliratkozás (ngOnDestroy-ben lemondjuk). */\n private eventSubscription: Subscription | null = null;\n\n /** effect: reconnect után session:attach újraküldése. */\n private connectedEffectRef: EffectRef | null = null;\n\n private readonly session_AS: Session_ApiService = inject(Session_ApiService);\n private readonly conversation_AS: Ses_Conversation_ApiService =\n inject(Ses_Conversation_ApiService);\n private readonly serverStatus_AS: SSt_Server_ApiService =\n inject(SSt_Server_ApiService);\n private readonly socket_CS: CCAP_Socket_ControlService =\n inject(CCAP_Socket_ControlService);\n\n /** Csatlakozás signal (Socket Service-ből delegálva). */\n get connected_$() {\n return this.socket_CS.connected_$;\n }\n\n /** Socket státusz signal (main frame indikátor: connecting | connected | error). */\n get socketStatus_$() {\n return this.socket_CS.status_$;\n }\n\n /** Utolsó socket hiba signal (tooltip copy-hoz); nyers error. */\n get lastSocketError_$() {\n return this.socket_CS.lastError_$;\n }\n\n /** Csatlakozási kísérletek száma (connect_error-kor nő, sikeres connect-nél nullázódik). */\n get connectAttemptCount_$() {\n return this.socket_CS.connectAttemptCount_$;\n }\n\n /** Aktív kapcsolódási diagnosztika futtatása (probe: szerver API + socket.io endpoint). */\n diagnoseConnection(): Promise<Record<string, unknown>> {\n return this.socket_CS.diagnoseConnection();\n }\n\n constructor() {\n this.eventSubscription = this.socket_CS.event$.subscribe(\n (envelope: { event: string; payload: Record<string, unknown> }): void => {\n this.handleSocketEvent(envelope);\n },\n );\n this.connectedEffectRef = effect((): void => {\n if (this.socket_CS.connected_$() && this.getActiveSessionId()) {\n this.socket_CS.emit('session:attach', {\n sessionId: this.getActiveSessionId(),\n });\n }\n });\n }\n\n /**\n * Socket event kezelése: sessionId/channelId alapján szűr, majd a megfelelő subject-ekbe pushol.\n */\n private handleSocketEvent(envelope: { event: string; payload: Record<string, unknown> }): void {\n const payload: Record<string, unknown> = envelope.payload ?? {};\n const activeId: string = this.getActiveSessionId();\n const channelId: string | undefined =\n typeof payload.channelId === 'string' ? payload.channelId : undefined;\n const sessionIdFromPayload: string | undefined =\n typeof payload.sessionId === 'string' ? payload.sessionId : undefined;\n const isForActive: boolean =\n !channelId && !sessionIdFromPayload\n || channelId === activeId\n || sessionIdFromPayload === activeId;\n\n if (envelope.event === SOCKET_EVENT_ANSWER && isForActive) {\n const content: string = typeof payload.content === 'string' ? payload.content : '';\n const timestamp: string =\n typeof payload.timestamp === 'string' ? payload.timestamp : new Date().toISOString();\n const runId: string | undefined =\n typeof payload.runId === 'string' ? payload.runId : undefined;\n const base: Ses_ClientMessage_Response = {\n role: 'assistant',\n content: content,\n timestamp: new Date(timestamp),\n };\n const withRun: Ses_ClientMessage_Response = runId\n ? { ...base, runId: runId }\n : base;\n const stamped: Ses_ClientMessage_Response = this.ensureClientListKey(withRun);\n this.messages_$.set([...this.messages_$(), stamped]);\n return;\n }\n\n if (envelope.event === SOCKET_EVENT_NOTIFY_USER && isForActive) {\n const content: string = typeof payload.content === 'string' ? payload.content : '';\n DyFM_Log.info(\n `CCAP_SessionDS | notify-user received: ${content.substring(0, 120)}…`,\n );\n const stamped: Ses_ClientMessage_Response = this.ensureClientListKey({\n role: 'system',\n content: content,\n timestamp: new Date(),\n });\n this.messages_$.set([...this.messages_$(), stamped]);\n return;\n }\n\n if (envelope.event === SOCKET_EVENT_AGENT_EVENTS) {\n const eventData: Record<string, unknown> =\n (typeof payload.eventData === 'object' && payload.eventData !== null)\n ? (payload.eventData as Record<string, unknown>)\n : {};\n this.agentEvents_$.set(eventData);\n this.applyAgentEventRunExecutionModeLatch(eventData);\n\n // NTF notification tool hívás felismerése az agent-events stream-ből\n const toolId: string = typeof eventData.toolId === 'string' ? eventData.toolId : '';\n const eventPhase: string = typeof eventData.phase === 'string' ? eventData.phase : '';\n\n // REQ-CCI-MSG-UI-FEEDBACK-001 Slice C (cycle 976): a `runInitialization`\n // phase érkezése jelzi, hogy a tulaj-instance agent-run elindult — az\n // utolsó `'sent'` állapotú user-message-t átállítjuk `'processing'`-re,\n // hogy a chat-UI vizualizálja a feldolgozás-fázist (Slice A-tól meglévő\n // `sending`/`sent` indikátor folytatása). Heuristika: latest-pending,\n // mert az AC_UserTurn_Interface NEM tartalmaz userMsgId-t. Cross-instance\n // esetén a PEI_EventRelay automatikusan átküldi ezt az event-et.\n if (eventPhase === 'runInitialization' && isForActive) {\n this.transitionLatestUserMessageToProcessing();\n }\n\n if (toolId === NTF_TOOL_ID\n && (eventPhase === NTF_PHASE_SENT || eventPhase === NTF_PHASE_WAITING)) {\n this.pendingNotification_$.set({\n phase: eventPhase,\n notificationTitle: typeof eventData.notificationTitle === 'string'\n ? eventData.notificationTitle : '',\n notificationType: typeof eventData.notificationType === 'string'\n ? eventData.notificationType : '',\n notificationPriority: typeof eventData.notificationPriority === 'string'\n ? eventData.notificationPriority : 'info',\n });\n } else if (this.pendingNotification_$()) {\n // Bármely más agent-event törli a pending notification-t (a tool befejeződött)\n this.pendingNotification_$.set(null);\n }\n\n const toolErrorContent: unknown = eventData.toolError;\n const chId: string | undefined =\n channelId ?? (eventData.channelId as string | undefined);\n const isForThisSession: boolean = !chId || chId === activeId;\n const toolErrorStr: string = DisplayString_Util.toDisplayString(toolErrorContent).trim();\n if (toolErrorStr.length > 0 && isForThisSession) {\n DyFM_Log.info(\n `CCAP_SessionDS | toolError from agent-events, pushing to chat: ${toolErrorStr.substring(0, 80)}…`,\n );\n const stamped: Ses_ClientMessage_Response = this.ensureClientListKey({\n role: 'system',\n content: toolErrorStr,\n timestamp: new Date(),\n });\n this.messages_$.set([...this.messages_$(), stamped]);\n }\n return;\n }\n\n if (envelope.event === SOCKET_EVENT_CONTEXT_UPDATED) {\n const sid: string =\n typeof payload.sessionId === 'string' ? payload.sessionId : '';\n const contextState: Record<string, unknown> =\n (typeof payload.contextState === 'object' && payload.contextState !== null)\n ? (payload.contextState as Record<string, unknown>)\n : {};\n this.contextUpdated_$.set({\n sessionId: sid,\n contextState: contextState,\n });\n return;\n }\n\n if (envelope.event === SOCKET_EVENT_MONITORING_EVENT) {\n const sid: string =\n typeof payload.sessionId === 'string' ? payload.sessionId : '';\n const ev: Record<string, unknown> =\n (typeof payload.event === 'object' && payload.event !== null)\n ? (payload.event as Record<string, unknown>)\n : {};\n const monitoringPayload: { sessionId: string; event: Record<string, unknown> } = {\n sessionId: sid,\n event: ev,\n };\n this.monitoringEvent_$.set(monitoringPayload);\n this.monitoringEvent_S.next(monitoringPayload);\n return;\n }\n\n if (envelope.event === SOCKET_EVENT_USER_INTERACTION_REQUEST && isForActive) {\n this.pendingInteraction_$.set(payload as unknown as UIn_UserInteractionRequest_Interface);\n return;\n }\n\n // User interaction resolved (bármely csatornáról érkező válasz) → inline card eltüntetése\n if (envelope.event === SOCKET_EVENT_USER_INTERACTION_RESOLVED && isForActive) {\n const resolvedId: string | undefined =\n typeof (payload as Record<string, unknown>).interactionId === 'string'\n ? (payload as Record<string, unknown>).interactionId as string\n : undefined;\n if (!resolvedId) {\n return;\n }\n const current: UIn_UserInteractionRequest_Interface | null = this.pendingInteraction_$();\n if (current?.interactionId === resolvedId) {\n this.pendingInteraction_$.set(null);\n }\n return;\n }\n }\n\n /**\n * Session lista frissítése a server-ről.\n * Hiba esetén sessionsLoadError$ értesül, hogy a UI megkülönböztesse az üres listát a hibától.\n * @returns A betöltött session lista (sikeres betöltésnél), hibánál üres tömb.\n */\n async loadSessions(): Promise<CCAP_SessionListItem_Response[]> {\n this.sessionsLoading_$.set(true);\n try {\n this.sessionsLoadError_$.set(null);\n\n const response = await this.session_AS.listSessions();\n\n this.sessions_$.set(response.sessions);\n return response.sessions;\n } catch (error: unknown) {\n DyFM_Error.logSimple('CCAP_SessionDS | Failed to load sessions', error);\n\n this.sessionsLoadError_$.set(error);\n return [];\n } finally {\n this.sessionsLoading_$.set(false);\n }\n }\n\n /**\n * Új session létrehozása (web UI \"New session\" gomb).\n * Létrehozza a session-t, frissíti a listát, visszaadja az új session-t.\n */\n async createSession(params?: { name?: string }): Promise<CCAP_SessionListItem_Response> {\n const response = await this.session_AS.createSession(params);\n\n await this.loadSessions();\n\n return response.session;\n }\n\n /**\n * Session másolása (conversation fork).\n * Új session-t hoz létre a forrás session összes conversation üzenetével.\n */\n async copySession(params: {\n sessionId: string;\n name?: string;\n }): Promise<CCAP_SessionListItem_Response> {\n const response = await this.session_AS.copySession(params);\n\n await this.loadSessions();\n\n return response.session;\n }\n\n /**\n * REQ-SES-FORK-001 Slice 2: session fork — új session a forrás üzeneteivel a megadott\n * `forkUntilMessageKey`-ig (inclusive). Ismeretlen key esetén a szerver `CCAP-SES-FORK-NF`\n * `DyFM_Error`-t ad vissza; a hívó komponens kezeli (pl. toast + popup bezárás).\n */\n async forkSession(params: {\n sessionId: string;\n forkUntilMessageKey: string;\n name?: string;\n }): Promise<CCAP_SessionListItem_Response> {\n const response = await this.session_AS.copySession({\n sessionId: params.sessionId,\n name: params.name,\n forkUntilMessageKey: params.forkUntilMessageKey,\n });\n\n await this.loadSessions();\n\n return response.session;\n }\n\n /**\n * Archivált session-ek betöltése (\"Archiváltak betöltése\" gomb).\n * Az eredmény az archivedSessions$-on keresztül érhető el.\n */\n async loadArchivedSessions(): Promise<CCAP_SessionListItem_Response[]> {\n this.archivedSessionsLoading_$.set(true);\n try {\n const response = await this.session_AS.listArchivedSessions();\n\n this.archivedSessions_$.set(response.sessions);\n return response.sessions;\n } catch (error: unknown) {\n DyFM_Error.logSimple(\n 'CCAP_SessionDS | Failed to load archived sessions',\n error,\n );\n\n this.archivedSessions_$.set([]);\n return [];\n } finally {\n this.archivedSessionsLoading_$.set(false);\n }\n }\n\n /**\n * Aktív session beállítása; session:attach küldése a Socket Service-en (ha csatlakozva van).\n * Session váltáskor az üzenetek törlődnek.\n * Ugyanarra az id-re második hívás (pl. effect dupla futás dev-ben) nem törli a chatet.\n */\n setActiveSession(sessionId: string): void {\n const previousId: string = this.activeSessionId_$();\n if (previousId !== sessionId) {\n this.activeSessionId_$.set(sessionId);\n this.clearMessages();\n this.pendingInteraction_$.set(null);\n this.activeRunExecutionMode_$.set('');\n }\n this.socket_CS.emit('session:attach', { sessionId: sessionId });\n }\n\n /**\n * Aktív session ID lekérdezése.\n */\n getActiveSessionId(): string {\n return this.activeSessionId_$();\n }\n\n /**\n * WebSocket újracsatlakozás (main frame indikátor kattintás).\n * Először status refresh: ha a socketUrl megváltozott (pl. szerver most lett elérhető), lap újratöltés;\n * különben csak socket reconnect.\n */\n async reconnectSocket(): Promise<void> {\n try {\n const status = await this.serverStatus_AS.getStatus();\n const origin: string =\n typeof window !== 'undefined' ? window.location.origin : '';\n const newSocketUrl: string = SocketUrl_Util.computeSocketUrlFromStatus(\n { httpPort: status.httpPort, socketPort: status.socketPort },\n origin,\n );\n const currentSocketUrl: string = environment.socketUrl ?? origin;\n if (newSocketUrl !== currentSocketUrl && typeof window !== 'undefined') {\n environment.socketUrl = newSocketUrl;\n DyFM_Log.info(\n 'CCAP_SessionDS | socketUrl changed on reconnect, reloading',\n newSocketUrl,\n );\n window.location.reload();\n return;\n }\n } catch {\n // Status fetch fail: csak socket reconnect (ugyanarra a címre).\n }\n this.socket_CS.reconnect();\n }\n\n /**\n * Futó execution leállítása (stop gomb).\n * Jelzi a szervernek, hogy a jelenlegi agentic loop-ot le kell állítani.\n */\n async stopExecution(sessionId: string): Promise<boolean> {\n try {\n const result: { success: boolean } =\n await this.session_AS.stopExecution(sessionId);\n return result.success;\n } catch (err: unknown) {\n DyFM_Error.logSimple('CCAP_Session_DS | stopExecution failed', err);\n return false;\n }\n }\n\n /**\n * Üzenet küldése REST API-n keresztül (POST /session/:id/messages).\n * A valós idejű válaszok (answer, notify-user, agent-events, stb.) továbbra is a WebSocketon érkeznek.\n * Ha a content \"/new\", új session-t hoz létre (REST) és visszaadja; különben az üzenet a REST végpontra megy.\n * Ha nincs sessionId vagy az API hiba, sent: false; a komponens jelezheti és megőrizheti a szöveget (opcionális error szöveg).\n */\n async sendMessageViaSocket(\n content: string,\n imageAttachments?: Ses_ClientImageAttachment_Response[],\n ): Promise<{\n newSession?: CCAP_SessionListItem_Response;\n sent: boolean;\n error?: string;\n }> {\n const trimmed: string = content.trim();\n if (trimmed === '/new') {\n const newSession: CCAP_SessionListItem_Response = await this.createSession();\n return { newSession: newSession, sent: true };\n }\n\n const sessionId: string = this.activeSessionId_$();\n if (!sessionId) {\n return { sent: false };\n }\n\n const hasImages: boolean = (imageAttachments?.length ?? 0) > 0;\n if (!trimmed.length && !hasImages) {\n return { sent: false };\n }\n\n // Optimista megjelenítés: a user üzenete azonnal megjelenik a chatben, mielőtt a REST hívás megtörténne.\n // Így a felhasználó azonnal látja a saját üzenetét, miközben a run elindul.\n // REQ-CCI-MSG-UI-FEEDBACK-001: 'sending' állapot — a bubble mellett spinner\n // jelenik meg a REST roundtrip alatt (cross-instance latency-nél kritikus).\n const optimisticMsg: Ses_ClientMessage_Response = {\n role: 'user',\n content: content,\n timestamp: new Date(),\n processingStatus: 'sending',\n };\n const optimisticStamped: Ses_ClientMessage_Response =\n this.ensureClientListKey(optimisticMsg);\n this.messages_$.set([...this.messages_$(), optimisticStamped]);\n\n try {\n const response = await this.conversation_AS.sendMessage({\n sessionId: sessionId,\n content: content,\n imageAttachments: imageAttachments,\n });\n\n // REST válasz után frissítjük az optimista üzenetet a szerver által adott mezőkkel (messageKey, hasTtsAudio).\n // REQ-CCI-MSG-UI-FEEDBACK-001: 'sent' állapot — REST 200 OK; cross-instance esetén\n // a `response.message` undefined (relayed: true ágon), de az optimistic message\n // így is `sent`-be billen — a target instance fogadta (vagy a relay queue-zta).\n const serverMsg: Ses_ClientMessage_Response | undefined = response.message;\n const updatedMessages: Ses_ClientMessage_Response[] = this.messages_$().map(\n (msg: Ses_ClientMessage_Response): Ses_ClientMessage_Response => {\n if (msg.clientListKey !== optimisticStamped.clientListKey) {\n return msg;\n }\n const merged: Ses_ClientMessage_Response = { ...msg };\n merged.processingStatus = 'sent';\n if (serverMsg?.messageKey) {\n merged.messageKey = serverMsg.messageKey;\n }\n if (serverMsg?.hasTtsAudio !== undefined) {\n merged.hasTtsAudio = serverMsg.hasTtsAudio;\n }\n return merged;\n },\n );\n this.messages_$.set(updatedMessages);\n return { sent: true };\n } catch (error: unknown) {\n DyFM_Error.logSimple(\n 'CCAP_SessionDS | Failed to send message via REST',\n error,\n );\n\n // Hiba esetén eltávolítjuk az optimista üzenetet a chatből\n const rolledBack: Ses_ClientMessage_Response[] = this.messages_$().filter(\n (msg: Ses_ClientMessage_Response): boolean =>\n msg.clientListKey !== optimisticStamped.clientListKey,\n );\n this.messages_$.set(rolledBack);\n\n const errorMessage: string =\n error instanceof Error ? error.message : 'Üzenet küldése sikertelen.';\n return { sent: false, error: errorMessage };\n }\n }\n\n /**\n * Üzenet küldése egy tetszőleges CCAP Session-be REST API-n keresztül (POST /session/:id/messages).\n * Nem frissít lokális chat állapotot — kívülről (pl. Quick Input) hívható.\n */\n async sendMessageToSession(params: { sessionId: string; content: string }): Promise<void> {\n await this.conversation_AS.sendMessage({\n sessionId: params.sessionId,\n content: params.content,\n });\n }\n\n /**\n * User interaction válasz küldése a szerverre Socket.io-n keresztül.\n * Törli a pending interaction signal-t.\n */\n sendInteractionResponse(response: UIn_UserInteractionResponse_Interface): void {\n this.socket_CS.emit('user-interaction:response', response as unknown as Record<string, unknown>);\n this.pendingInteraction_$.set(null);\n }\n\n /**\n * Üzenetek törlése (session váltáskor). A chunk-state-et is reset-eli.\n */\n clearMessages(): void {\n this.messages_$.set([]);\n this.chunkState_$.set({\n total: 0,\n hasMore: false,\n nextBeforeIndex: null,\n isLoadingOlder: false,\n archivedTotal: 0,\n });\n this.currentArchiveScope_$.set('active');\n }\n\n /**\n * Üzenetek beállítása (pl. API-ból betöltött kezdeti üzenetek a chat single source of truth-hoz).\n */\n setMessages(messages: Ses_ClientMessage_Response[]): void {\n const raw: Ses_ClientMessage_Response[] = messages ?? [];\n const stamped: Ses_ClientMessage_Response[] = raw.map(\n (m: Ses_ClientMessage_Response): Ses_ClientMessage_Response =>\n this.ensureClientListKey(m),\n );\n this.messages_$.set(stamped);\n }\n\n /**\n * REQ-CCI-MSG-UI-FEEDBACK-001 Slice C (cycle 976) — a legutóbbi user-message\n * (a chronologically utolsó `role === 'user'` item) `processingStatus` mezőjét\n * `'sent'` → `'processing'`-re állítja, ha még `'sent'` állapotban van.\n *\n * Heuristika: tipikus use-case-ben egyszerre egy pending user-message van;\n * `runInitialization` phase érkezésekor azt mark-eljük processing-ként.\n * Ha más állapotban van (pl. `sending`-ben — REST még nem returned, ami\n * szokatlan), nem írjuk felül.\n */\n private transitionLatestUserMessageToProcessing(): void {\n const current: Ses_ClientMessage_Response[] = this.messages_$();\n let latestUserIdx: number = -1;\n for (let i = current.length - 1; i >= 0; i = i - 1) {\n if (current[i].role === 'user') {\n latestUserIdx = i;\n break;\n }\n }\n if (latestUserIdx < 0) {\n return;\n }\n const target: Ses_ClientMessage_Response = current[latestUserIdx];\n if (target.processingStatus !== 'sent') {\n return;\n }\n const updated: Ses_ClientMessage_Response[] = current.map(\n (msg: Ses_ClientMessage_Response, idx: number): Ses_ClientMessage_Response => {\n if (idx !== latestUserIdx) {\n return msg;\n }\n return { ...msg, processingStatus: 'processing' };\n },\n );\n this.messages_$.set(updated);\n }\n\n /**\n * Stabil lista-track kulcs: meglévő clientListKey, különben messageKey (API), különben UUID.\n */\n private ensureClientListKey(\n msg: Ses_ClientMessage_Response,\n ): Ses_ClientMessage_Response {\n const kept: string | undefined = msg.clientListKey?.trim();\n if (kept?.length) {\n return msg;\n }\n const fromTts: string | undefined = msg.messageKey?.trim();\n if (fromTts?.length) {\n return { ...msg, clientListKey: fromTts };\n }\n return { ...msg, clientListKey: globalThis.crypto.randomUUID() };\n }\n\n /**\n * Egy üzenet TTS cache jelölése: a messageKey-hez tartozó üzenetnél hasTtsAudio = true.\n * A message bubble így audio lejátszót jelenít meg a következő render-nél.\n */\n setMessageTtsCached(messageKey: string): void {\n const current: Ses_ClientMessage_Response[] = this.messages_$();\n const updated: Ses_ClientMessage_Response[] = current.map(\n (msg: Ses_ClientMessage_Response): Ses_ClientMessage_Response =>\n msg.messageKey === messageKey\n ? { ...msg, hasTtsAudio: true }\n : msg,\n );\n this.messages_$.set(updated);\n }\n\n /**\n * Üzenetek betöltése (mindig teljes lista – conversationFull); ha aktív session, setMessages.\n * Chat komponens ezt hívja; navigáció után cache nem kell, mert messages$ az aktív session-é.\n */\n async loadMessagesForView(sessionId: string): Promise<Ses_ClientMessage_Response[]> {\n this.messagesLoading_$.set(true);\n this.messagesLoadError_$.set(null);\n try {\n const response = await this.conversation_AS.getMessages({\n sessionId: sessionId,\n viewMode: 'conversationFull',\n });\n const messages: Ses_ClientMessage_Response[] = response.messages ?? [];\n if (sessionId === this.activeSessionId_$()) {\n this.setMessages(messages);\n }\n return messages;\n } catch (error: unknown) {\n DyFM_Error.logSimple(\n 'CCAP_SessionDS | Failed to load messages for view',\n error,\n );\n this.messagesLoadError_$.set(error);\n return [];\n } finally {\n this.messagesLoading_$.set(false);\n }\n }\n\n /**\n * REQ-SES-CONTENT-CHUNK-LOAD-AND-ARCHIVE-001 Slice 3 — initial-chunk fetch:\n * a session megnyitásakor csak az utolsó N üzenetet hozza (default 50)\n * a tail-en. A chunk-state-et a válasz alapján beállítja.\n *\n * `messages_$`-t replace-eli (nem prepend), hogy a régi session üzenetek\n * ne ragadjanak benne. Ha a session közben nem aktív, a state nem változik.\n */\n async loadInitialChunk(params: {\n sessionId: string;\n viewMode?: string;\n limit?: number;\n archiveScope?: Ses_ArchiveScope_Type;\n }): Promise<Ses_MessagesChunk_Response | null> {\n this.messagesLoading_$.set(true);\n this.messagesLoadError_$.set(null);\n try {\n const response: Ses_MessagesChunk_Response =\n await this.conversation_AS.getMessagesChunked({\n sessionId: params.sessionId,\n viewMode: params.viewMode ?? 'conversationFull',\n latest: true,\n limit: params.limit ?? 50,\n archiveScope: params.archiveScope,\n });\n if (params.sessionId === this.activeSessionId_$()) {\n this.setMessages(response.messages ?? []);\n this.chunkState_$.set({\n total: response.total,\n hasMore: response.hasMore,\n nextBeforeIndex: response.nextBeforeIndex,\n isLoadingOlder: false,\n archivedTotal: response.archivedTotal,\n });\n }\n return response;\n } catch (error: unknown) {\n DyFM_Error.logSimple(\n 'CCAP_SessionDS | Failed to load initial chunk',\n error,\n );\n this.messagesLoadError_$.set(error);\n return null;\n } finally {\n this.messagesLoading_$.set(false);\n }\n }\n\n /**\n * REQ-SES-CONTENT-CHUNK-LOAD-AND-ARCHIVE-001 Slice 3 — backward-prepend:\n * a `chunkState_$().nextBeforeIndex` cursor alapján a régebbi szeletet\n * prepend-eli a `messages_$` elejére. Ha `hasMore=false` vagy már fut egy\n * fetch (`isLoadingOlder`), no-op.\n */\n async loadOlderChunk(params: {\n sessionId: string;\n viewMode?: string;\n limit?: number;\n archiveScope?: Ses_ArchiveScope_Type;\n }): Promise<Ses_MessagesChunk_Response | null> {\n const state = this.chunkState_$();\n if (!state.hasMore || state.nextBeforeIndex == null || state.isLoadingOlder) {\n return null;\n }\n this.chunkState_$.set({ ...state, isLoadingOlder: true });\n try {\n const response: Ses_MessagesChunk_Response =\n await this.conversation_AS.getMessagesChunked({\n sessionId: params.sessionId,\n viewMode: params.viewMode ?? 'conversationFull',\n beforeIndex: state.nextBeforeIndex,\n limit: params.limit ?? 50,\n archiveScope: params.archiveScope,\n });\n if (params.sessionId === this.activeSessionId_$()) {\n const older: Ses_ClientMessage_Response[] = (response.messages ?? []).map(\n (m: Ses_ClientMessage_Response): Ses_ClientMessage_Response =>\n this.ensureClientListKey(m),\n );\n this.messages_$.set([...older, ...this.messages_$()]);\n this.chunkState_$.set({\n total: response.total,\n hasMore: response.hasMore,\n nextBeforeIndex: response.nextBeforeIndex,\n isLoadingOlder: false,\n archivedTotal: response.archivedTotal,\n });\n } else {\n this.chunkState_$.set({ ...state, isLoadingOlder: false });\n }\n return response;\n } catch (error: unknown) {\n DyFM_Error.logSimple(\n 'CCAP_SessionDS | Failed to load older chunk',\n error,\n );\n this.messagesLoadError_$.set(error);\n this.chunkState_$.set({ ...state, isLoadingOlder: false });\n return null;\n }\n }\n\n /**\n * REQ-SES-CONTENT-CHUNK-LOAD-AND-ARCHIVE-001 Slice 5 — archív nézetre váltás.\n * A chat „Archív szakasz megnyitása\" gombja hívja: scope-ot átállítja, törli a\n * jelenlegi (aktív) message-listát, majd `loadInitialChunk`-kal betölti az\n * archív tail-t. Az archivedTotal-t megőrzi a chunk-state-ben (független\n * érték a session-szintű archív szám).\n */\n async switchToArchiveView(sessionId: string): Promise<Ses_MessagesChunk_Response | null> {\n this.currentArchiveScope_$.set('archive');\n const prevArchivedTotal: number = this.chunkState_$().archivedTotal;\n this.messages_$.set([]);\n this.chunkState_$.set({\n total: 0,\n hasMore: false,\n nextBeforeIndex: null,\n isLoadingOlder: false,\n archivedTotal: prevArchivedTotal,\n });\n return this.loadInitialChunk({\n sessionId: sessionId,\n archiveScope: 'archive',\n });\n }\n\n /**\n * REQ-SES-CONTENT-CHUNK-LOAD-AND-ARCHIVE-001 Slice 5 — vissza az aktív nézetre.\n * A chat „Vissza az aktívhoz\" gombja hívja: scope-ot átállítja, törli az\n * archív listát, majd `loadInitialChunk` default scope-pal (active).\n */\n async switchToActiveView(sessionId: string): Promise<Ses_MessagesChunk_Response | null> {\n this.currentArchiveScope_$.set('active');\n this.messages_$.set([]);\n this.chunkState_$.set({\n total: 0,\n hasMore: false,\n nextBeforeIndex: null,\n isLoadingOlder: false,\n archivedTotal: 0,\n });\n return this.loadInitialChunk({\n sessionId: sessionId,\n archiveScope: 'active',\n });\n }\n\n /**\n * Session detail (session + lastRun) betöltése; cache-be mentés.\n */\n async loadSessionDetail(sessionId: string): Promise<{\n session: CCAP_SessionListItem_Response;\n lastRun: AC_LastRunSummary_Response | null;\n } | null> {\n if (!sessionId) {\n return null;\n }\n this.sessionDetailLoading_$.set(true);\n try {\n const response = await this.session_AS.getSession(sessionId);\n const entry: {\n session: CCAP_SessionListItem_Response;\n lastRun: AC_LastRunSummary_Response | null;\n } = {\n session: response.session,\n lastRun: response.lastRun ?? null,\n };\n this.sessionDetailBySessionId.set(sessionId, entry);\n this.sessionDetailMap_$.set(new Map(this.sessionDetailBySessionId));\n return entry;\n } catch (error: unknown) {\n DyFM_Error.logSimple(\n 'CCAP_SessionDS | Failed to load session detail',\n error,\n );\n return null;\n } finally {\n this.sessionDetailLoading_$.set(false);\n }\n }\n\n /**\n * Cachelt session detail lekérdezése (sync).\n */\n getCachedSessionDetail(sessionId: string): {\n session: CCAP_SessionListItem_Response;\n lastRun: AC_LastRunSummary_Response | null;\n } | null {\n return this.sessionDetailBySessionId.get(sessionId) ?? null;\n }\n\n /**\n * Session info betöltése; cache-be mentés.\n */\n async loadSessionInfo(sessionId: string): Promise<AC_SessionInfo_Response | null> {\n if (!sessionId) {\n return null;\n }\n this.sessionInfoLoading_$.set(true);\n this.sessionInfoLoadError_$.set(null);\n try {\n const response: AC_SessionInfo_Response =\n await this.session_AS.getSessionInfo(sessionId);\n this.sessionInfoBySessionId.set(sessionId, response);\n this.sessionInfoMap_$.set(new Map(this.sessionInfoBySessionId));\n return response;\n } catch (error: unknown) {\n DyFM_Error.logSimple(\n 'CCAP_SessionDS | Failed to load session info',\n error,\n );\n this.sessionInfoLoadError_$.set(error);\n return null;\n } finally {\n this.sessionInfoLoading_$.set(false);\n }\n }\n\n /**\n * Cachelt session info lekérdezése (sync).\n */\n getCachedSessionInfo(sessionId: string): AC_SessionInfo_Response | null {\n return this.sessionInfoBySessionId.get(sessionId) ?? null;\n }\n\n /**\n * LLM debug trace bejegyzések lekérése egy run-hoz — nincs globális signal írás (több run trace blokk párhuzamosan).\n */\n async fetchLlmDebugTraceEntriesForRun(params: {\n sessionId: string;\n runId: string;\n }): Promise<AC_LlmDebugTraceEntry_Response[]> {\n const sid: string = params.sessionId?.trim() ?? '';\n const rid: string = params.runId?.trim() ?? '';\n if (!sid || !rid) {\n return [];\n }\n try {\n const response: { entries: AC_LlmDebugTraceEntry_Response[] } =\n await this.session_AS.getLlmDebugTrace({\n sessionId: sid,\n runId: rid,\n });\n return response.entries ?? [];\n } catch {\n return [];\n }\n }\n\n /**\n * LLM debug trace lista betöltése session + run alapján (MongoDB trace tábla).\n */\n async loadLlmDebugTrace(params: {\n sessionId: string;\n runId: string;\n }): Promise<void> {\n const sid: string = params.sessionId?.trim() ?? '';\n const rid: string = params.runId?.trim() ?? '';\n\n if (!sid || !rid) {\n this.llmDebugTraceEntries_$.set([]);\n return;\n }\n\n this.llmDebugTraceLoading_$.set(true);\n this.llmDebugTraceLoadError_$.set(null);\n\n try {\n const response: { entries: AC_LlmDebugTraceEntry_Response[] } =\n await this.session_AS.getLlmDebugTrace({\n sessionId: sid,\n runId: rid,\n });\n this.llmDebugTraceEntries_$.set(response.entries);\n } catch (error: unknown) {\n DyFM_Error.logSimple(\n 'CCAP_SessionDS | Failed to load LLM debug trace',\n error,\n );\n this.llmDebugTraceLoadError_$.set(error);\n this.llmDebugTraceEntries_$.set([]);\n } finally {\n this.llmDebugTraceLoading_$.set(false);\n }\n }\n\n /**\n * Session frissítése (pl. archive / de-archive); API hívás után lista frissítése.\n * Archive állapotváltáskor mindkét lista reload (aktív + archivált szekció szinkron).\n */\n async updateSession(params: {\n sessionId: string;\n updates: Record<string, unknown>;\n }): Promise<CCAP_SessionListItem_Response | null> {\n try {\n const response = await this.session_AS.updateSession(params);\n const archived: unknown = params.updates.archived;\n if (archived === true || archived === false) {\n await this.loadSessions();\n await this.loadArchivedSessions();\n } else {\n await this.loadSessions();\n }\n return response.session;\n } catch (error: unknown) {\n DyFM_Error.logSimple(\n 'CCAP_SessionDS | Failed to update session',\n error,\n );\n return null;\n }\n }\n\n /**\n * Agent-events alapján `activeRunExecutionMode_$` latch frissítése.\n */\n private applyAgentEventRunExecutionModeLatch(eventData: Record<string, unknown>): void {\n const phaseRaw: unknown = eventData.phase;\n const phaseStr: string = typeof phaseRaw === 'string' ? phaseRaw.trim() : '';\n if (phaseStr === AC_RunFlowPhase_Type.analyzeResult) {\n const modeRaw: unknown = eventData.runExecutionMode;\n if (typeof modeRaw === 'string' && modeRaw.trim() !== '') {\n const normalized: string | undefined =\n Session_DataService.normalizeRunExecutionModeSocketValue(modeRaw);\n if (normalized !== undefined) {\n this.activeRunExecutionMode_$.set(normalized);\n }\n }\n return;\n }\n if (\n phaseStr === AC_RunFlowPhase_Type.runFlowComplete\n || phaseStr === AC_RunFlowPhase_Type.runInitialization\n ) {\n this.activeRunExecutionMode_$.set('');\n }\n }\n\n /**\n * Socket `runExecutionMode` érték whitelist; ismeretlen string → undefined.\n */\n private static normalizeRunExecutionModeSocketValue(raw: string): string | undefined {\n const trimmed: string = raw.trim();\n const known: AC_RunExecutionMode_Type[] = [\n AC_RunExecutionMode_Type.instant,\n AC_RunExecutionMode_Type.agenticAny,\n AC_RunExecutionMode_Type.ask,\n AC_RunExecutionMode_Type.plan,\n ];\n for (const v of known) {\n if (trimmed === v) {\n return v;\n }\n }\n return undefined;\n }\n\n ngOnDestroy(): void {\n this.monitoringEvent_S.complete();\n if (this.eventSubscription) {\n this.eventSubscription.unsubscribe();\n this.eventSubscription = null;\n }\n if (this.connectedEffectRef) {\n this.connectedEffectRef.destroy();\n this.connectedEffectRef = null;\n }\n }\n}\n", "import { inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { firstValueFrom } from 'rxjs';\n\nimport { environment } from '../../../../../environments/environment';\nimport {\n Ses_ArchiveScope_Type,\n Ses_ClientImageAttachment_Response,\n Ses_ClientMessage_Response,\n Ses_MessagesChunk_Response,\n} from './conversation.api-service.interface';\n\n/**\n * Conversation API service.\n * HTTP hívások a server conversation endpoint-jaira.\n */\n@Injectable({ providedIn: 'root' })\nexport class Ses_Conversation_ApiService {\n\n /** API base URL. */\n private baseUrl: string = `${environment.api.baseUrl}/session`;\n\n private readonly http: HttpClient = inject(HttpClient);\n\n /**\n * Üzenetek lekérdezése viewMode alapján.\n */\n getMessages(params: {\n sessionId: string;\n viewMode: string;\n }): Promise<{\n messages: Ses_ClientMessage_Response[];\n }> {\n return firstValueFrom(\n this.http.get<{\n messages: Ses_ClientMessage_Response[];\n }>(\n `${this.baseUrl}/${params.sessionId}/messages`,\n { params: { viewMode: params.viewMode } },\n ),\n );\n }\n\n /**\n * REQ-SES-CONTENT-CHUNK-LOAD-AND-ARCHIVE-001 Slice 3 — chunk-fetch a CCAP\n * Session-en. `latest=true` boot-strap-re az utolsó N üzenetet kéri,\n * `beforeIndex` paraméterrel a régebbi szeletet (backward prepend).\n */\n getMessagesChunked(params: {\n sessionId: string;\n viewMode: string;\n beforeIndex?: number;\n limit?: number;\n latest?: boolean;\n archiveScope?: Ses_ArchiveScope_Type;\n }): Promise<Ses_MessagesChunk_Response> {\n const httpParams: Record<string, string> = {\n viewMode: params.viewMode,\n };\n if (params.beforeIndex != null) {\n httpParams['beforeIndex'] = String(params.beforeIndex);\n }\n if (params.limit != null) {\n httpParams['limit'] = String(params.limit);\n }\n if (params.latest) {\n httpParams['latest'] = '1';\n }\n if (params.archiveScope) {\n httpParams['archiveScope'] = params.archiveScope;\n }\n return firstValueFrom(\n this.http.get<Ses_MessagesChunk_Response>(\n `${this.baseUrl}/${params.sessionId}/messages/chunk`,\n { params: httpParams },\n ),\n );\n }\n\n /**\n * Új üzenet küldése. Cross-instance esetben (REQ-CCAP-CROSS-001) a server\n * `{ relayed: true, taskId, targetOnline }` body-t ad vissza — ekkor `message`\n * undefined; lokális esetben a persistált user message-szel tér vissza.\n */\n sendMessage(params: {\n sessionId: string;\n content: string;\n imageAttachments?: Ses_ClientImageAttachment_Response[];\n }): Promise<{\n message?: Ses_ClientMessage_Response;\n relayed?: boolean;\n taskId?: string;\n targetOnline?: boolean;\n }> {\n return firstValueFrom(\n this.http.post<{\n message?: Ses_ClientMessage_Response;\n relayed?: boolean;\n taskId?: string;\n targetOnline?: boolean;\n }>(\n `${this.baseUrl}/${params.sessionId}/messages`,\n {\n content: params.content,\n imageAttachments: params.imageAttachments,\n },\n ),\n );\n }\n}\n", "import { inject, Injectable } from '@angular/core';\nimport { HttpClient, HttpParams } from '@angular/common/http';\n\nimport { firstValueFrom } from 'rxjs';\n\nimport { environment } from '../../../../../environments/environment';\nimport { AC_LastRunSummary_Response } from '../../../../_models/interfaces/session/ccap-last-run-summary.interface';\nimport {\n AC_LlmDebugTraceEntry_Response,\n AC_SessionInfo_Response,\n} from '../../../../_models/server-index';\nimport {\n CCAP_SessionListItem_Response,\n} from '../../../../_models/interfaces/session/ccap-session-list-item.interface';\nimport { ExS_InstanceContext_DataService } from '../../../external-sessions/_services/exs-instance-context.data-service';\n\n/**\n * Session API service.\n * HTTP hívások a server session endpoint-jaira.\n * Minden hívás `?ccapId=<active>` paramot küld (REQ-PEI-016) —\n * a ccapId forrása az instance-szelektor (`ExS_InstanceContext_DataService.activeCcapId_$`).\n */\n@Injectable({ providedIn: 'root' })\nexport class Session_ApiService {\n\n /** API base URL. */\n private baseUrl: string = `${environment.api.baseUrl}/session`;\n\n private readonly http: HttpClient = inject(HttpClient);\n\n private readonly peiContext_DS: ExS_InstanceContext_DataService =\n inject(ExS_InstanceContext_DataService);\n\n /**\n * Aktuális ccapId — az instance-szelektor értékéből (REQ-PEI-016).\n */\n private currentCcapId(): string {\n return this.peiContext_DS.activeCcapId_$();\n }\n\n /**\n * ccapId hozzáfűzése HttpParams-hoz.\n */\n private withCcapId(params: HttpParams): HttpParams {\n const ccapId: string = this.currentCcapId();\n if (!ccapId) {\n return params;\n }\n return params.set('ccapId', ccapId);\n }\n\n /**\n * Session lista lekérdezése (csak nem archivált session-ök).\n */\n listSessions(): Promise<{\n sessions: CCAP_SessionListItem_Response[];\n }> {\n const httpParams: HttpParams = this.withCcapId(new HttpParams());\n return firstValueFrom(\n this.http.get<{\n sessions: CCAP_SessionListItem_Response[];\n }>(this.baseUrl, { params: httpParams }),\n );\n }\n\n /**\n * Archivált session-ek lekérdezése.\n */\n listArchivedSessions(): Promise<{\n sessions: CCAP_SessionListItem_Response[];\n }> {\n let httpParams: HttpParams = this.withCcapId(new HttpParams());\n httpParams = httpParams.set('archived', 'true');\n return firstValueFrom(\n this.http.get<{\n sessions: CCAP_SessionListItem_Response[];\n }>(this.baseUrl, { params: httpParams }),\n );\n }\n\n /**\n * Új session létrehozása (web UI \"New session\" gomb).\n * Opcionális `name`: kezdő lista-név (pl. Quick Input Send to session → új CCAP Session).\n */\n createSession(params?: { name?: string }): Promise<{\n session: CCAP_SessionListItem_Response;\n }> {\n const body: { name?: string } = {};\n const trimmedName: string | undefined =\n params?.name !== undefined ? params.name.trim() : undefined;\n if (trimmedName !== undefined && trimmedName.length > 0) {\n body.name = trimmedName;\n }\n const httpParams: HttpParams = this.withCcapId(new HttpParams());\n return firstValueFrom(\n this.http.post<{\n session: CCAP_SessionListItem_Response;\n }>(this.baseUrl, body, { params: httpParams }),\n );\n }\n\n /**\n * Session detail lekérdezése (session + opcionális lastRun intent/goal/summary).\n */\n getSession(sessionId: string): Promise<{\n session: CCAP_SessionListItem_Response;\n lastRun?: AC_LastRunSummary_Response;\n }> {\n const httpParams: HttpParams = this.withCcapId(new HttpParams());\n return firstValueFrom(\n this.http.get<{\n session: CCAP_SessionListItem_Response;\n lastRun?: AC_LastRunSummary_Response;\n }>(`${this.baseUrl}/${sessionId}`, { params: httpParams }),\n );\n }\n\n /**\n * Session frissítése (név, státusz).\n */\n updateSession(params: {\n sessionId: string;\n updates: Record<string, unknown>;\n }): Promise<{\n session: CCAP_SessionListItem_Response;\n }> {\n const httpParams: HttpParams = this.withCcapId(new HttpParams());\n return firstValueFrom(\n this.http.patch<{\n session: CCAP_SessionListItem_Response;\n }>(\n `${this.baseUrl}/${params.sessionId}`,\n params.updates,\n { params: httpParams },\n ),\n );\n }\n\n /**\n * Session info lekérdezése (used inputs, used elements, full active context).\n */\n getSessionInfo(sessionId: string): Promise<AC_SessionInfo_Response> {\n const httpParams: HttpParams = this.withCcapId(new HttpParams());\n return firstValueFrom(\n this.http.get<AC_SessionInfo_Response>(\n `${this.baseUrl}/${sessionId}/session-info`,\n { params: httpParams },\n ),\n );\n }\n\n /**\n * Session másolása — teljes history vagy fork a megadott `forkUntilMessageKey`-ig (REQ-SES-FORK-001).\n * `forkUntilMessageKey` hiányában a szerver változatlan copy-t csinál (az összes üzenettel).\n */\n copySession(params: {\n sessionId: string;\n name?: string;\n forkUntilMessageKey?: string;\n }): Promise<{ session: CCAP_SessionListItem_Response }> {\n const body: Record<string, unknown> = {};\n if (params.name) {\n body.name = params.name;\n }\n if (params.forkUntilMessageKey) {\n body.forkUntilMessageKey = params.forkUntilMessageKey;\n }\n const httpParams: HttpParams = this.withCcapId(new HttpParams());\n return firstValueFrom(\n this.http.post<{ session: CCAP_SessionListItem_Response }>(\n `${this.baseUrl}/${params.sessionId}/copy`,\n body,\n { params: httpParams },\n ),\n );\n }\n\n /**\n * Futó execution leállítása (stop gomb).\n */\n stopExecution(sessionId: string): Promise<{ success: boolean }> {\n const httpParams: HttpParams = this.withCcapId(new HttpParams());\n return firstValueFrom(\n this.http.post<{ success: boolean }>(\n `${this.baseUrl}/${sessionId}/stop-execution`,\n {},\n { params: httpParams },\n ),\n );\n }\n\n /**\n * LLM debug trace bejegyzések egy session + run kombinációhoz (Info panel).\n */\n getLlmDebugTrace(params: {\n sessionId: string;\n runId: string;\n }): Promise<{ entries: AC_LlmDebugTraceEntry_Response[] }> {\n let httpParams: HttpParams = this.withCcapId(new HttpParams());\n httpParams = httpParams.set('runId', params.runId);\n return firstValueFrom(\n this.http.get<{ entries: AC_LlmDebugTraceEntry_Response[] }>(\n `${this.baseUrl}/${params.sessionId}/llm-debug-trace`,\n { params: httpParams },\n ),\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "+UAUM,IAAOA,EAAP,KAAqB,CAOzB,OAAOC,2BACLC,EACAC,EAAc,CAEd,OAAOA,CACT,GClBI,IAAOC,EAAP,KAAyB,CAI7B,OAAOC,gBAAgBC,EAAc,CACnC,GAA2BA,GAAU,KACnC,MAAO,GAET,GAAI,OAAOA,GAAU,SACnB,OAAOA,EAET,GAAI,OAAOA,GAAU,UAAYA,IAAU,KAAM,CAC/C,IAAMC,EAA6BD,EACnC,GAAI,OAAOC,EAAEC,SAAY,UAAYD,EAAEC,QAAQC,KAAI,EAAGC,OAAS,EAC7D,OAAOH,EAAEC,QAAQC,KAAI,EAEvB,GAAI,OAAOF,EAAEI,OAAU,UAAYJ,EAAEI,MAAMF,KAAI,EAAGC,OAAS,EACzD,OAAOH,EAAEI,MAAMF,KAAI,EAErB,GAAI,OAAOF,EAAEK,QAAW,UAAYL,EAAEK,OAAOH,KAAI,EAAGC,OAAS,EAC3D,OAAOH,EAAEK,OAAOH,KAAI,CAExB,CACA,IAAMI,EAAYC,OAAOR,CAAK,EAC9B,OAAIO,IAAM,kBACD,SAEFA,CACT,GC5BF,IAAAE,EAAqC,OCcrC,IAAaC,GAA2B,IAAA,CAAlC,MAAOA,CAA2B,CAG9BC,QAAkB,GAAGC,EAAYC,IAAIF,OAAO,WAEnCG,KAAmBC,EAAOC,CAAU,EAKrDC,YAAYC,EAGX,CAGC,OAAOC,EACL,KAAKL,KAAKM,IAGR,GAAG,KAAKT,OAAO,IAAIO,EAAOG,SAAS,YACnC,CAAEH,OAAQ,CAAEI,SAAUJ,EAAOI,QAAQ,CAAE,CAAE,CAC1C,CAEL,CAOAC,mBAAmBL,EAOlB,CACC,IAAMM,EAAqC,CACzCF,SAAUJ,EAA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|
6
|
+
"names": ["SocketUrl_Util", "computeSocketUrlFromStatus", "_data", "origin", "DisplayString_Util", "toDisplayString", "value", "o", "message", "trim", "length", "error", "detail", "s", "String", "import_fsm_dynamo", "Ses_Conversation_ApiService", "baseUrl", "environment", "api", "http", "inject", "HttpClient", "getMessages", "params", "firstValueFrom", "get", "sessionId", "viewMode", "getMessagesChunked", "httpParams", "beforeIndex", "String", "limit", "latest", "archiveScope", "sendMessage", "post", "content", "imageAttachments", "factory", "\u0275fac", "providedIn", "Session_ApiService", "baseUrl", "environment", "api", "http", "inject", "HttpClient", "peiContext_DS", "ExS_InstanceContext_DataService", "currentCcapId", "activeCcapId_$", "withCcapId", "params", "ccapId", "set", "listSessions", "httpParams", "HttpParams", "firstValueFrom", "get", "listArchivedSessions", "createSession", "body", "trimmedName", "name", "undefined", "trim", "length", "post", "getSession", "sessionId", "updateSession", "patch", "updates", "getSessionInfo", "copySession", "forkUntilMessageKey", "stopExecution", "getLlmDebugTrace", "runId", "factory", "\u0275fac", "providedIn", "SOCKET_EVENT_ANSWER", "SOCKET_EVENT_NOTIFY_USER", "SOCKET_EVENT_AGENT_EVENTS", "SOCKET_EVENT_CONTEXT_UPDATED", "SOCKET_EVENT_MONITORING_EVENT", "SOCKET_EVENT_USER_INTERACTION_REQUEST", "SOCKET_EVENT_USER_INTERACTION_RESOLVED", "NTF_TOOL_ID", "NTF_PHASE_SENT", "NTF_PHASE_WAITING", "Session_DataService", "sessionDetailBySessionId", "Map", "sessionInfoBySessionId", "activeSessionId_$", "signal", "requestSidebarCloseOnMobileBump_$", "sessions_$", "sessionsLoadError_$", "sessionsLoading_$", "archivedSessions_$", "archivedSessionsLoading_$", "messages_$", "messagesLoading_$", "messagesLoadError_$", "currentArchiveScope_$", "chunkState_$", "total", "hasMore", "nextBeforeIndex", "isLoadingOlder", "archivedTotal", "agentEvents_$", "activeRunExecutionMode_$", "contextUpdated_$", "monitoringEvent_$", "monitoringEvent_S", "Subject", "pendingInteraction_$", "pendingNotification_$", "sessionDetailMap_$", "sessionDetailLoading_$", "sessionInfoMap_$", "sessionInfoLoading_$", "sessionInfoLoadError_$", "llmDebugTraceEntries_$", "llmDebugTraceLoading_$", "llmDebugTraceLoadError_$", "eventSubscription", "connectedEffectRef", "session_AS", "inject", "Session_ApiService", "conversation_AS", "Ses_Conversation_ApiService", "serverStatus_AS", "SSt_Server_ApiService", "socket_CS", "CCAP_Socket_ControlService", "connected_$", "socketStatus_$", "status_$", "lastSocketError_$", "lastError_$", "connectAttemptCount_$", "diagnoseConnection", "constructor", "event$", "subscribe", "envelope", "handleSocketEvent", "effect", "getActiveSessionId", "emit", "sessionId", "payload", "activeId", "channelId", "undefined", "sessionIdFromPayload", "isForActive", "event", "content", "timestamp", "Date", "toISOString", "runId", "base", "role", "withRun", "__spreadProps", "__spreadValues", "stamped", "ensureClientListKey", "set", "DyFM_Log", "info", "substring", "eventData", "applyAgentEventRunExecutionModeLatch", "toolId", "eventPhase", "phase", "transitionLatestUserMessageToProcessing", "notificationTitle", "notificationType", "notificationPriority", "toolErrorContent", "toolError", "chId", "isForThisSession", "toolErrorStr", "DisplayString_Util", "toDisplayString", "trim", "length", "sid", "contextState", "ev", "monitoringPayload", "next", "resolvedId", "interactionId", "loadSessions", "__async", "response", "listSessions", "sessions", "error", "DyFM_Error", "logSimple", "createSession", "params", "session", "copySession", "forkSession", "name", "forkUntilMessageKey", "loadArchivedSessions", "listArchivedSessions", "setActiveSession", "clearMessages", "reconnectSocket", "status", "getStatus", "origin", "window", "location", "newSocketUrl", "SocketUrl_Util", "computeSocketUrlFromStatus", "httpPort", "socketPort", "currentSocketUrl", "environment", "socketUrl", "reload", "reconnect", "stopExecution", "success", "err", "sendMessageViaSocket", "imageAttachments", "trimmed", "newSession", "sent", "hasImages", "optimisticMsg", "processingStatus", "optimisticStamped", "serverMsg", "sendMessage", "message", "updatedMessages", "map", "msg", "clientListKey", "merged", "messageKey", "hasTtsAudio", "rolledBack", "filter", "Error", "sendMessageToSession", "sendInteractionResponse", "setMessages", "messages", "m", "current", "latestUserIdx", "i", "updated", "idx", "fromTts", "globalThis", "crypto", "randomUUID", "setMessageTtsCached", "loadMessagesForView", "getMessages", "viewMode", "loadInitialChunk", "getMessagesChunked", "latest", "limit", "archiveScope", "loadOlderChunk", "state", "beforeIndex", "older", "switchToArchiveView", "prevArchivedTotal", "switchToActiveView", "loadSessionDetail", "getSession", "entry", "lastRun", "getCachedSessionDetail", "get", "loadSessionInfo", "getSessionInfo", "getCachedSessionInfo", "fetchLlmDebugTraceEntriesForRun", "rid", "getLlmDebugTrace", "entries", "loadLlmDebugTrace", "updateSession", "archived", "updates", "phaseRaw", "phaseStr", "AC_RunFlowPhase_Type", "analyzeResult", "modeRaw", "runExecutionMode", "normalized", "normalizeRunExecutionModeSocketValue", "runFlowComplete", "runInitialization", "raw", "known", "AC_RunExecutionMode_Type", "instant", "agenticAny", "ask", "plan", "v", "ngOnDestroy", "complete", "unsubscribe", "destroy", "factory", "\u0275fac", "providedIn"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{j as s}from"./chunk-4LCJ4GNK.js";var r="ccap-personaSoulDraft";function p(){try{let o=localStorage.getItem(r);if(!o)return null;let n=s.tryParseStrict({text:o,contextLabel:"CCAP_PersonaDraft_localStorage"});if(!n.ok)return null;let e=n.value;if(typeof e!="object"||e===null)return null;let t=Object.fromEntries(Object.entries(e)),a=typeof t.name=="string"?t.name:"",c=typeof t.personality=="string"?t.personality:"",i=typeof t.conversation_style=="string"?t.conversation_style:"",l=typeof t.work_style=="string"?t.work_style:"",f=typeof t.mission=="string"?t.mission:"",y=typeof t.avoid=="string"?t.avoid:"";return{name:a,personality:c,conversation_style:i,work_style:l,mission:f,avoid:y}}catch{return null}}function g(o){try{localStorage.setItem(r,JSON.stringify(o))}catch{}}function u(){try{localStorage.removeItem(r)}catch{}}var m={get:p,save:g,clear:u};export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WRI37SX4.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as Ce}from"./chunk-4GPIIB3D.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-JMZKJLUE.js";import{I as Ve}from"./chunk-SLSTIBOT.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-VQ4GBHH7.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-EVMDNGBK.js";import{I as Ve}from"./chunk-Y6V4NGLU.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-XLSL262Q.js.map
|