@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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-AR6EOT63.js";import{K as p,L as S}from"./chunk-Y6V4NGLU.js";import{C as i,k as e,wb as a,y as u}from"./chunk-TBMJSIBB.js";var h=(()=>{class n{setup_AS=i(c);settings_AS=i(S);static getErrorMessageForConfig(t){if(t instanceof a){let s=t.error,o=null;if(s!==null&&typeof s=="object"){let r=s;typeof r.error=="string"?o=r.error:r.error!=null?o=String(r.error):typeof r.message=="string"&&(o=r.message)}else typeof s=="string"&&(o=s);return p.getHttpErrorMessage(t,o)}return t instanceof Error?t.message||"Bet\xF6lt\xE9s sikertelen.":String(t)||"Bet\xF6lt\xE9s sikertelen."}getSetupStatus(){return e(this,null,function*(){return this.setup_AS.getSetupStatus()})}getVaultStatus(){return e(this,null,function*(){return this.setup_AS.getVaultStatus()})}getVaultKeyGenerate(){return e(this,null,function*(){return this.setup_AS.getVaultKeyGenerate()})}postVaultKey(t){return e(this,null,function*(){return this.setup_AS.postVaultKey(t)})}postProviderAccessAllow(t){return e(this,null,function*(){return this.settings_AS.postProviderAccessAllow(t)})}getSoulStatus(){return e(this,null,function*(){return this.settings_AS.getSoulStatus()})}getSoulContent(){return e(this,null,function*(){return this.settings_AS.getSoulContent()})}postGenerateSoul(t){return e(this,null,function*(){return this.settings_AS.postGenerateSoul(t)})}postSetup(t){return e(this,null,function*(){return this.setup_AS.postSetup(t)})}postTestLlmProvider(t){return e(this,null,function*(){return this.settings_AS.postTestLlmProvider(t)})}postListLlmModels(t){return e(this,null,function*(){return this.settings_AS.postListLlmModels(t)})}postTestMessagingProvider(t){return e(this,null,function*(){return this.settings_AS.postTestMessagingProvider(t)})}postMcpSync(t){return e(this,null,function*(){return this.settings_AS.postMcpSync(t)})}getSection(t){return e(this,null,function*(){return this.settings_AS.getSection(t)})}putSetupConfig(t){return e(this,null,function*(){return this.setup_AS.putSetupConfig(t)})}static \u0275fac=function(s){return new(s||n)};static \u0275prov=u({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PZN2OI7U.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as s}from"./chunk-Y6V4NGLU.js";import{C as o,xb as i,y as n}from"./chunk-TBMJSIBB.js";var p=(()=>{class e{baseUrl=`${s.api.baseUrl}/document-library`;http=o(i);listDocuments(){return this.http.get(this.baseUrl)}getDocument(t){return this.http.get(`${this.baseUrl}/${encodeURIComponent(t.documentId)}`)}uploadDocument(t){return this.http.post(`${this.baseUrl}/upload`,t.formData)}deleteDocument(t){return this.http.delete(`${this.baseUrl}/${encodeURIComponent(t.documentId)}`)}startIndexing(t){return this.http.post(`${this.baseUrl}/${encodeURIComponent(t.documentId)}/index`,{registryEntryId:t.registryEntryId})}getIndexingStatus(t){let r=new URLSearchParams({registryEntryId:t.registryEntryId}).toString();return this.http.get(`${this.baseUrl}/${encodeURIComponent(t.documentId)}/indexing-status?${r}`)}static \u0275fac=function(r){return new(r||e)};static \u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-QUD3BEHN.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-Z5FUR5ZW.js";import{G as o}from"./chunk-TBMJSIBB.js";var u=(()=>{class e{transform(t){return n.formatAbsoluteForTooltip(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sAbsoluteTime",type:e,pure:!0,standalone:!0})}return e})();var d=(()=>{class e{transform(t){return n.formatCompactRelativeTime(t)}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=o({name:"sTimeAgo",type:e,pure:!0,standalone:!0})}return e})();var a=class e{static normalizeForSearch(r){return typeof r!="string"||r.length===0?"":r.trim().toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"")}static includesText(r,t){let i=e.normalizeForSearch(t);return i.length===0?!0:e.normalizeForSearch(r).includes(i)}};var s=class{static looksLikeJson(r){let t=r.trim();return t.startsWith("{")&&t.endsWith("}")||t.startsWith("[")&&t.endsWith("]")}static formatJson(r){try{let t=JSON.parse(r.trim());return JSON.stringify(t,null,2)}catch{return r}}static lineCount(r){return r.split(`
|
|
2
2
|
`).length}};export{a,u as b,d as c,s as d};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-QUEYZI42.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as k}from"./chunk-NNUHTCXG.js";import{a as C}from"./chunk-V3VQWJQL.js";import{I as U,L as P,t as A}from"./chunk-Y6V4NGLU.js";import{C as h,k as m,p as a,xb as M,y as b}from"./chunk-TBMJSIBB.js";var y=class{static readLlmCloudBucketsFromSectionResponse(n){return{anthropicLlm:v(n.anthropicSettings,{includeBaseUrl:!1}),googleLlm:v(n.googleSettings,{includeBaseUrl:!1}),deepseekLlm:v(n.deepseekSettings,{includeBaseUrl:!1}),fdpaiLlm:v(n.fdpaiSettings,{includeBaseUrl:!0})}}};function v(s,n){if(s==null||typeof s!="object"||Array.isArray(s))return{enabled:!1,defaultModel:"",baseUrl:"",apiKey:"",apiKeyMasked:""};let e=Reflect.get(s,"defaultModel"),o=Reflect.get(s,"apiKeyMasked"),i=Reflect.get(s,"baseUrl");return{enabled:Reflect.get(s,"enabled")===!0,defaultModel:typeof e=="string"?e:"",baseUrl:n.includeBaseUrl&&typeof i=="string"?i:"",apiKey:"",apiKeyMasked:typeof o=="string"?o:""}}var S=class{static parseLlmSettingsSectionForUi(n){let e=n.openAiSettings,o=!1,i="gpt-4o";if(e!=null&&typeof e=="object"&&!Array.isArray(e)){o=Reflect.get(e,"enabled")===!0;let t=Reflect.get(e,"defaultModel");typeof t=="string"&&(i=t)}let c=(Array.isArray(n.localAiSettings)?n.localAiSettings:[]).filter(t=>t!=null&&typeof t=="object"&&!Array.isArray(t)).map(t=>{let g=typeof t.key=="string"?t.key.trim():"";if(!g.length)return null;let L=typeof t.name=="string"?t.name:"",$=k.build({localAiKey:g}),T=L.trim().length>0?L.trim():"Local AI",_=t.enabled!==!1;return{id:$,baseUrl:(typeof t.baseUrl=="string"?t.baseUrl:"").trim(),model:(typeof t.defaultModel=="string"?t.defaultModel:"").trim(),label:T,enabled:_}}).filter(t=>t!=null),d=y.readLlmCloudBucketsFromSectionResponse(n),l=[];o&&l.push("open-ai"),d.anthropicLlm.enabled&&l.push("anthropic"),d.googleLlm.enabled&&l.push("google"),d.deepseekLlm.enabled&&l.push("deepseek"),d.fdpaiLlm.enabled&&l.push("fdp-ai");for(let t of c)t.enabled&&l.push(t.id);l.length===0&&l.push("open-ai");let F=c.map(t=>({id:t.id,label:t.label})),V=l.map(t=>({value:t,label:C.resolve(t,F)})),p=typeof n.defaultLlmProvider=="string"?n.defaultLlmProvider:"open-ai",u="";if(p==="open-ai")u=i;else if(p==="anthropic")u=d.anthropicLlm.defaultModel;else if(p==="google")u=d.googleLlm.defaultModel;else if(p==="deepseek")u=d.deepseekLlm.defaultModel;else if(p==="fdp-ai")u=d.fdpaiLlm.defaultModel;else{let t=c.find(g=>g.id===p);t&&(u=t.model)}return{enabledLlmProviderIds:l,llmProviderSelectOptions:V,defaultLlmProvider:p.trim(),defaultLlmModel:u.trim()}}};var I=(()=>{class s{baseUrl=`${U.api.baseUrl}/voice`;http=h(M);fetchVoiceNotesPoc(){return a(this.http.get(`${this.baseUrl}/poc/get-notes`))}fetchVoiceNotesQaSettings(){return a(this.http.get(`${this.baseUrl}/notes/qa-settings`))}saveVoiceNotesQaSettings(e){return a(this.http.put(`${this.baseUrl}/notes/qa-settings`,e,{headers:{"Content-Type":"application/json"}}))}saveVoiceNotesPoc(e){return a(this.http.put(`${this.baseUrl}/notes/poc`,e))}transcribeVoiceChunk(e){let o={qa:e.qaEnabled===!0?"1":"0",skip_classification:e.skipClassification!==!1?"true":"false"};e.confidenceThreshold!==void 0&&(o.confidence_threshold=String(e.confidenceThreshold)),e.noteContext!==void 0&&(o.note_context=e.noteContext);let i=Object.keys(o).map(c=>`${encodeURIComponent(c)}=${encodeURIComponent(o[c])}`).join("&"),f=`${this.baseUrl}/notes/transcribe${i?`?${i}`:""}`,r={"Content-Type":e.mimeType,Filename:e.filename};return e.overlapPrevMs!==void 0&&e.overlapPrevMs>0&&(r["X-Overlap-Prev-Ms"]=String(e.overlapPrevMs)),a(this.http.post(f,e.blob,{headers:r}))}generateTtsSpeechBlob(e){return a(this.http.post(`${this.baseUrl}/tts/speech`,{input:e.text},{responseType:"blob"}))}getTtsMessageAudioUrl(e){let o=typeof e=="string"?e.trim():"";return o?`${this.baseUrl}/tts/message-audio/${encodeURIComponent(o)}`:""}getOrCreateTtsMessageAudio(e){return a(this.http.post(`${this.baseUrl}/tts/message-audio`,{sessionId:e.sessionId,role:e.role,content:e.content,timestamp:e.timestamp},{responseType:"blob",headers:{"Content-Type":"application/json"}}))}getVoiceSettings(){return a(this.http.get(`${this.baseUrl}/settings`))}saveTtsProvider(e){return a(this.http.post(`${this.baseUrl}/settings/tts-provider`,{provider:e}))}saveElevenLabsKey(e){return a(this.http.post(`${this.baseUrl}/settings/elevenlabs-key`,{apiKey:e}))}testElevenLabsApiKey(){return a(this.http.post(`${this.baseUrl}/settings/test-elevenlabs-key`,{}))}saveVoiceConfig(e){return a(this.http.post(`${this.baseUrl}/settings/voice-config`,{elevenLabsModelId:e.elevenLabsModelId,elevenLabsVoiceId:e.elevenLabsVoiceId}))}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var Y=(()=>{class s{voice_AS=h(I);settings_AS=h(P);fetchQaEnabledFlag(){return m(this,null,function*(){try{return(yield this.voice_AS.fetchVoiceNotesQaSettings()).qaEnabled===!0}catch{return!1}})}loadSttQaSettingsPanelState(){return m(this,null,function*(){let e=yield this.voice_AS.fetchVoiceNotesQaSettings(),o=yield this.settings_AS.getSection(A.llmProviders),i=S.parseLlmSettingsSectionForUi(o),f=(e.providerName??"").trim(),r=[],c="";if(f.length>0){let d=yield this.fetchLlmModelsListForSttQa(f);r=[...d.models],c=d.errorMessage;let l=(e.modelName??"").trim();l.length>0&&!r.includes(l)&&(r=[l,...r])}return{qa:e,llmProviderSelectOptions:i.llmProviderSelectOptions,defaultLlmProvider:i.defaultLlmProvider,defaultLlmModel:i.defaultLlmModel,qaModelsForProvider:r,qaModelsListFetchError:c}})}fetchLlmModelsListForSttQa(e){return m(this,null,function*(){let o=e.trim();if(!o.length)return{models:[],errorMessage:""};try{let i=yield this.settings_AS.postListLlmModels({providerId:o}),f=i.models??[],r=typeof i.error=="string"?i.error.trim():"",c=i.success===!1;return f.length>0?{models:f,errorMessage:c?r.length>0?r:"Model list request failed.":""}:c?{models:[],errorMessage:r.length>0?r:"Model list request failed."}:{models:[],errorMessage:r}}catch(i){let f=i instanceof Error?i.message:String(i);return{models:[],errorMessage:f}}})}fetchLlmModelIdsForProvider(e){return m(this,null,function*(){return(yield this.fetchLlmModelsListForSttQa(e)).models})}normalizeConfusionMapEntries(e){return e.map(o=>({from:String(o.from).trim(),to:String(o.to).trim()})).filter(o=>o.from.length>0||o.to.length>0)}saveVoiceNotesQaSettings(e){return m(this,null,function*(){yield this.voice_AS.saveVoiceNotesQaSettings(e)})}fetchVoiceNotesPoc(){return this.voice_AS.fetchVoiceNotesPoc()}saveVoiceNotesPoc(e){return this.voice_AS.saveVoiceNotesPoc(e)}transcribeVoiceChunk(e){return this.voice_AS.transcribeVoiceChunk(e)}getTtsMessageAudioUrl(e){return this.voice_AS.getTtsMessageAudioUrl(e)}getOrCreateTtsMessageAudio(e){return this.voice_AS.getOrCreateTtsMessageAudio(e)}static \u0275fac=function(o){return new(o||s)};static \u0275prov=b({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{y as a,I as b,Y as c};
|
|
2
|
+
//# sourceMappingURL=chunk-R2IBKJ4K.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["src/app/_collections/settings/read-llm-cloud-buckets-from-section-response.util.ts", "src/app/_collections/settings/parse-llm-settings-section-for-ui.util.ts", "src/app/_modules/dev/_modules/poc/_modules/voice-notes-poc/_services/voice-notes-poc.api-service.ts", "src/app/_modules/dev/_modules/poc/_modules/voice-notes-poc/_services/vnp-stt-qa-ui.data-service.ts"],
|
|
4
|
+
"sourcesContent": ["import { Set_LlmCloudProviderBucketForm_Interface } from '../../_modules/config/_modules/settings/_models/interfaces/llm-providers/set-llm-cloud-provider-bucket-form.interface';\n\n/**\n * Cloud LLM bucket kiolvasó util – statikus metódusokkal.\n */\nexport class ReadLlmCloudBucketsFromSectionResponse_Util {\n /**\n * Cloud / FDPAI LLM bucket-ek kiolvasása a szerver get-section (llmProviders) válaszból.\n */\n static readLlmCloudBucketsFromSectionResponse(response: Record<string, unknown>): {\n anthropicLlm: Set_LlmCloudProviderBucketForm_Interface;\n googleLlm: Set_LlmCloudProviderBucketForm_Interface;\n deepseekLlm: Set_LlmCloudProviderBucketForm_Interface;\n fdpaiLlm: Set_LlmCloudProviderBucketForm_Interface;\n } {\n return {\n anthropicLlm: readLlmCloudBucketFromUnknown(response.anthropicSettings, { includeBaseUrl: false }),\n googleLlm: readLlmCloudBucketFromUnknown(response.googleSettings, { includeBaseUrl: false }),\n deepseekLlm: readLlmCloudBucketFromUnknown(response.deepseekSettings, { includeBaseUrl: false }),\n fdpaiLlm: readLlmCloudBucketFromUnknown(response.fdpaiSettings, { includeBaseUrl: true }),\n };\n }\n}\n\n/**\n * GET settings section válasz egy provider bucket-jének kiolvasása (cloud LLM, FDPAI baseUrl-lel).\n */\nfunction readLlmCloudBucketFromUnknown(\n raw: unknown,\n options: { includeBaseUrl: boolean },\n): Set_LlmCloudProviderBucketForm_Interface {\n if (raw == null || typeof raw !== 'object' || Array.isArray(raw)) {\n return {\n enabled: false,\n defaultModel: '',\n baseUrl: '',\n apiKey: '',\n apiKeyMasked: '',\n };\n }\n const defaultModel: unknown = Reflect.get(raw, 'defaultModel');\n const apiKeyMasked: unknown = Reflect.get(raw, 'apiKeyMasked');\n const baseUrlRaw: unknown = Reflect.get(raw, 'baseUrl');\n return {\n enabled: Reflect.get(raw, 'enabled') === true,\n defaultModel: typeof defaultModel === 'string' ? defaultModel : '',\n baseUrl: options.includeBaseUrl && typeof baseUrlRaw === 'string' ? baseUrlRaw : '',\n apiKey: '',\n apiKeyMasked: typeof apiKeyMasked === 'string' ? apiKeyMasked : '',\n };\n}\n", "import { CCAP_LlmProviderSelectOption_Interface } from '../../_models/interfaces/settings/ccap-llm-provider-select-option.interface';\nimport { CCAP_CustomLocalOpenAiLlmInstanceId_Util } from './ccap-custom-local-openai-llm-instance-id.util';\nimport { CCAP_LlmProviderDisplayLabelForUi_Util } from './llm-provider-display-label-for-ui.util';\nimport { ReadLlmCloudBucketsFromSectionResponse_Util } from './read-llm-cloud-buckets-from-section-response.util';\n\n/**\n * LLM settings section parse util – statikus metódusokkal.\n */\nexport class ParseLlmSettingsSectionForUi_Util {\n /**\n * LLM settings get-section válasz feldolgozása: engedélyezett provider id-k + globál default provider/modell.\n * Logika igazodik a Set_LlmProviders_DataService doLoad metódusához (voice overlay, voice-notes POC).\n */\n static parseLlmSettingsSectionForUi(response: Record<string, unknown>): {\n enabledLlmProviderIds: string[];\n llmProviderSelectOptions: CCAP_LlmProviderSelectOption_Interface[];\n defaultLlmProvider: string;\n defaultLlmModel: string;\n } {\n const oai: unknown = response.openAiSettings;\n let openAiEnabled: boolean = false;\n let openaiModel: string = 'gpt-4o';\n if (oai != null && typeof oai === 'object' && !Array.isArray(oai)) {\n openAiEnabled = Reflect.get(oai, 'enabled') === true;\n const dm: unknown = Reflect.get(oai, 'defaultModel');\n if (typeof dm === 'string') {\n openaiModel = dm;\n }\n }\n\n const localAiRaw: unknown[] = Array.isArray(response.localAiSettings)\n ? response.localAiSettings\n : [];\n type LocalEntry = { id: string; model: string; label: string; baseUrl: string; enabled: boolean };\n const localAiEntries: LocalEntry[] = localAiRaw\n .filter((item: unknown): item is Record<string, unknown> =>\n item != null && typeof item === 'object' && !Array.isArray(item),\n )\n .map((item: Record<string, unknown>): LocalEntry | null => {\n const key: string = typeof item.key === 'string' ? item.key.trim() : '';\n if (!key.length) {\n return null;\n }\n const name: string = typeof item.name === 'string' ? item.name : '';\n const id: string = CCAP_CustomLocalOpenAiLlmInstanceId_Util.build({ localAiKey: key });\n const label: string = name.trim().length > 0 ? name.trim() : 'Local AI';\n const rowEnabled: boolean = item.enabled !== false;\n return {\n id: id,\n baseUrl: (typeof item.baseUrl === 'string' ? item.baseUrl : '').trim(),\n model: (typeof item.defaultModel === 'string' ? item.defaultModel : '').trim(),\n label: label,\n enabled: rowEnabled,\n };\n })\n .filter((row: LocalEntry | null): row is LocalEntry => row != null);\n\n const finalLocalAi: LocalEntry[] = localAiEntries;\n\n const clouds = ReadLlmCloudBucketsFromSectionResponse_Util.readLlmCloudBucketsFromSectionResponse(response);\n\n const enabledLlmProviderIds: string[] = [];\n if (openAiEnabled) enabledLlmProviderIds.push('open-ai');\n if (clouds.anthropicLlm.enabled) enabledLlmProviderIds.push('anthropic');\n if (clouds.googleLlm.enabled) enabledLlmProviderIds.push('google');\n if (clouds.deepseekLlm.enabled) enabledLlmProviderIds.push('deepseek');\n if (clouds.fdpaiLlm.enabled) enabledLlmProviderIds.push('fdp-ai');\n for (const entry of finalLocalAi) {\n if (entry.enabled) enabledLlmProviderIds.push(entry.id);\n }\n if (enabledLlmProviderIds.length === 0) enabledLlmProviderIds.push('open-ai');\n\n const localRowsForLabel: { id: string; label: string }[] = finalLocalAi.map(\n (e: LocalEntry): { id: string; label: string } => ({ id: e.id, label: e.label }),\n );\n const llmProviderSelectOptions: CCAP_LlmProviderSelectOption_Interface[] = enabledLlmProviderIds.map(\n (pid: string): CCAP_LlmProviderSelectOption_Interface => ({\n value: pid,\n label: CCAP_LlmProviderDisplayLabelForUi_Util.resolve(pid, localRowsForLabel),\n }),\n );\n\n const defaultLlmProvider: string = typeof response.defaultLlmProvider === 'string'\n ? response.defaultLlmProvider\n : 'open-ai';\n\n let defaultLlmModel: string = '';\n if (defaultLlmProvider === 'open-ai') {\n defaultLlmModel = openaiModel;\n } else if (defaultLlmProvider === 'anthropic') {\n defaultLlmModel = clouds.anthropicLlm.defaultModel;\n } else if (defaultLlmProvider === 'google') {\n defaultLlmModel = clouds.googleLlm.defaultModel;\n } else if (defaultLlmProvider === 'deepseek') {\n defaultLlmModel = clouds.deepseekLlm.defaultModel;\n } else if (defaultLlmProvider === 'fdp-ai') {\n defaultLlmModel = clouds.fdpaiLlm.defaultModel;\n } else {\n const matchEntry: LocalEntry | undefined = finalLocalAi.find(\n (e: LocalEntry): boolean => e.id === defaultLlmProvider,\n );\n if (matchEntry) defaultLlmModel = matchEntry.model;\n }\n\n return {\n enabledLlmProviderIds: enabledLlmProviderIds,\n llmProviderSelectOptions: llmProviderSelectOptions,\n defaultLlmProvider: defaultLlmProvider.trim(),\n defaultLlmModel: defaultLlmModel.trim(),\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 { CCAP_VoiceNotesPoc_Response } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-poc-response.interface';\nimport { CCAP_VoiceNotesPocSaveBody_Request } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-poc-save-body.interface';\nimport {\n CCAP_Transcribe_Response,\n CCAP_TranscribeSuccess_Response,\n CCAP_TranscribeNonSpeech_Response,\n} from '../../../../../../../_models/interfaces/voice/transcribe/ccap-transcribe-response.interface';\nimport {\n Voc_SttQaConfusionMapEntry_Response,\n Voc_SttQaInput_Response,\n} from '../../../../../../../_models/server-index';\nimport { CCAP_VoiceNotesQaSettings_Response } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-qa-settings-response.interface';\nimport { CCAP_VoiceNotesQaSettingsSaveBody_Request } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-qa-settings-save-body.interface';\nimport { CCAP_VoiceSettings_Response } from '../../../../../../../_models/interfaces/voice/ccap-voice-settings-response.interface';\nimport { CCAP_TestElevenLabsApiKey_Response } from '../../../../../../../_models/interfaces/voice/transcribe/ccap-test-elevenlabs-api-key-response.interface';\n\n/**\n * Voice API service.\n * GET/PUT POC note, POST transcribe, POST TTS speech, GET/POST voice settings.\n */\n@Injectable({ providedIn: 'root' })\nexport class VoiceNotesPoc_ApiService {\n\n private readonly baseUrl: string = `${environment.api.baseUrl}/voice`;\n\n private readonly http: HttpClient = inject(HttpClient);\n\n /**\n * POC jegyzet lekérése (GET /voice/poc/get-notes; a szerver voice.controller endpoint-ja).\n */\n fetchVoiceNotesPoc(): Promise<CCAP_VoiceNotesPoc_Response> {\n return firstValueFrom(\n this.http.get<CCAP_VoiceNotesPoc_Response>(`${this.baseUrl}/poc/get-notes`),\n );\n }\n\n /**\n * STT QA beállítások lekérése (GET /voice/notes/qa-settings): system prompt, user prompt sablon, confusion map.\n */\n fetchVoiceNotesQaSettings(): Promise<CCAP_VoiceNotesQaSettings_Response> {\n return firstValueFrom(\n this.http.get<CCAP_VoiceNotesQaSettings_Response>(`${this.baseUrl}/notes/qa-settings`),\n );\n }\n\n /**\n * STT QA beállítások mentése (PUT /voice/notes/qa-settings): confusion map + opcionális provider/modell.\n * Explicit JSON header, hogy a szerver mindig JSON-ként dolgozza a body-t.\n */\n saveVoiceNotesQaSettings(\n body: CCAP_VoiceNotesQaSettingsSaveBody_Request,\n ): Promise<{\n ok: boolean;\n confusionMap?: Voc_SttQaConfusionMapEntry_Response[];\n providerName?: string;\n modelName?: string;\n }> {\n return firstValueFrom(\n this.http.put<{\n ok: boolean;\n confusionMap?: Voc_SttQaConfusionMapEntry_Response[];\n providerName?: string;\n modelName?: string;\n }>(`${this.baseUrl}/notes/qa-settings`, body, {\n headers: { 'Content-Type': 'application/json' },\n }),\n );\n }\n\n /**\n * POC jegyzet mentése (PUT /voice/notes/poc).\n */\n saveVoiceNotesPoc(body: CCAP_VoiceNotesPocSaveBody_Request): Promise<{ ok?: boolean }> {\n return firstValueFrom(\n this.http.put<{ ok?: boolean }>(`${this.baseUrl}/notes/poc`, body),\n );\n }\n\n /**\n * Nyers audio feltöltése, STT + opcionális QA (POST /voice/notes/transcribe).\n * Raw body = blob; headers Content-Type, Filename (ASCII); query qa, skip_classification, note_context.\n * Megjegyzés: XMLHttpRequest header érték csak ISO-8859-1 — a jegyzet kontextus (UTF-8, pl. magyar)\n * query param `note_context`-ben megy (`encodeURIComponent`), nem headerben.\n */\n transcribeVoiceChunk(params: {\n blob: Blob;\n mimeType: string;\n filename: string;\n qaEnabled?: boolean;\n noteContext?: string;\n skipClassification?: boolean;\n confidenceThreshold?: number;\n /**\n * BUG-VOICE-INPUT-INTER-MESSAGE-GAP-001 Slice 3 (cycle 947): a dual-recorder swap\n * által számolt átfedési ablak ms-ben — `X-Overlap-Prev-Ms` headerben megy.\n */\n overlapPrevMs?: number;\n }): Promise<CCAP_Transcribe_Response> {\n const queryParams: Record<string, string> = {\n qa: params.qaEnabled === true ? '1' : '0',\n skip_classification: params.skipClassification !== false ? 'true' : 'false',\n };\n if (params.confidenceThreshold !== undefined) {\n queryParams.confidence_threshold = String(params.confidenceThreshold);\n }\n if (params.noteContext !== undefined) {\n queryParams.note_context = params.noteContext;\n }\n const query: string = Object.keys(queryParams)\n .map((k: string): string => `${encodeURIComponent(k)}=${encodeURIComponent(queryParams[k])}`)\n .join('&');\n const url: string = `${this.baseUrl}/notes/transcribe${query ? `?${query}` : ''}`;\n const headers: Record<string, string> = {\n 'Content-Type': params.mimeType,\n 'Filename': params.filename,\n };\n if (params.overlapPrevMs !== undefined && params.overlapPrevMs > 0) {\n headers['X-Overlap-Prev-Ms'] = String(params.overlapPrevMs);\n }\n return firstValueFrom(\n this.http.post<CCAP_Transcribe_Response>(url, params.blob, {\n headers: headers,\n }),\n );\n }\n\n /**\n * TTS speech generálás (POST /voice/tts/speech).\n * Jelenleg csak ElevenLabs sync (200 + blob); 202/task flow nincs.\n */\n generateTtsSpeechBlob(params: { text: string }): Promise<Blob> {\n return firstValueFrom(\n this.http.post(`${this.baseUrl}/tts/speech`, { input: params.text }, {\n responseType: 'blob',\n }),\n );\n }\n\n /**\n * TTS message audio URL (GET /voice/tts/message-audio/:messageKey).\n * A kliens ezt használja audio src-ként, ha hasTtsAudio true.\n * Üres messageKey esetén ne adjunk URL-t (ne hívjuk a szervert messageKey nélkül).\n */\n getTtsMessageAudioUrl(messageKey: string): string {\n const key: string = typeof messageKey === 'string' ? messageKey.trim() : '';\n if (!key) {\n return '';\n }\n return `${this.baseUrl}/tts/message-audio/${encodeURIComponent(key)}`;\n }\n\n /**\n * TTS message audio get-or-create (POST /voice/tts/message-audio).\n * Visszaadja a blob-ot (cache-ből vagy új generálásból); mindig 200 + blob.\n */\n getOrCreateTtsMessageAudio(params: {\n sessionId: string;\n role: string;\n content: string;\n timestamp: string;\n }): Promise<Blob> {\n return firstValueFrom(\n this.http.post(\n `${this.baseUrl}/tts/message-audio`,\n {\n sessionId: params.sessionId,\n role: params.role,\n content: params.content,\n timestamp: params.timestamp,\n },\n {\n responseType: 'blob',\n headers: { 'Content-Type': 'application/json' },\n },\n ),\n );\n }\n\n /**\n * Voice beállítások lekérése (GET /voice/settings).\n */\n getVoiceSettings(): Promise<CCAP_VoiceSettings_Response> {\n return firstValueFrom(\n this.http.get<CCAP_VoiceSettings_Response>(`${this.baseUrl}/settings`),\n );\n }\n\n /**\n * TTS provider mentése (POST /voice/settings/tts-provider).\n */\n saveTtsProvider(provider: 'fdpai' | 'elevenlabs'): Promise<{ ok: boolean; provider: string }> {\n return firstValueFrom(\n this.http.post<{ ok: boolean; provider: string }>(\n `${this.baseUrl}/settings/tts-provider`,\n { provider: provider },\n ),\n );\n }\n\n /**\n * ElevenLabs API kulcs mentése (POST /voice/settings/elevenlabs-key).\n */\n saveElevenLabsKey(apiKey: string): Promise<{ ok: boolean; maskedKey?: string }> {\n return firstValueFrom(\n this.http.post<{ ok: boolean; maskedKey?: string }>(\n `${this.baseUrl}/settings/elevenlabs-key`,\n { apiKey: apiKey },\n ),\n );\n }\n\n /**\n * ElevenLabs API kulcs tesztelése a tárolt kulccsal (POST /voice/settings/test-elevenlabs-key).\n * Nem küld body-t – a szerver a titkosítva mentett kulcsot használja.\n */\n testElevenLabsApiKey(): Promise<CCAP_TestElevenLabsApiKey_Response> {\n return firstValueFrom(\n this.http.post<CCAP_TestElevenLabsApiKey_Response>(\n `${this.baseUrl}/settings/test-elevenlabs-key`,\n {},\n ),\n );\n }\n\n /**\n * Voice config (ElevenLabs model/voice id) mentése (POST /voice/settings/voice-config).\n */\n saveVoiceConfig(params: {\n elevenLabsModelId?: string;\n elevenLabsVoiceId?: string;\n }): Promise<{\n ok: boolean;\n elevenLabsModelId?: string;\n elevenLabsVoiceId?: string;\n }> {\n return firstValueFrom(\n this.http.post<{\n ok: boolean;\n elevenLabsModelId?: string;\n elevenLabsVoiceId?: string;\n }>(`${this.baseUrl}/settings/voice-config`, {\n elevenLabsModelId: params.elevenLabsModelId,\n elevenLabsVoiceId: params.elevenLabsVoiceId,\n }),\n );\n }\n}\n", "import { inject, Injectable } from '@angular/core';\n\nimport { SC_Type } from '@server-enums';\nimport { ParseLlmSettingsSectionForUi_Util } from '../../../../../../../_collections/settings/parse-llm-settings-section-for-ui.util';\nimport { Voc_SttQaConfusionMapEntry_Response } from '../../../../../../../_models/server-index';\nimport { CCAP_VoiceNotesQaSettings_Response } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-qa-settings-response.interface';\nimport { CCAP_VoiceNotesQaSettingsSaveBody_Request } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-qa-settings-save-body.interface';\nimport { CCAP_VoiceNotesPoc_Response } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-poc-response.interface';\nimport { CCAP_VoiceNotesPocSaveBody_Request } from '../../../../../../../_models/interfaces/voice/voice-notes/ccap-voice-notes-poc-save-body.interface';\nimport { CCAP_ListAiModels_Response } from '../../../../../../../_models/interfaces/settings/response/ccap-list-ai-models-response.interface';\nimport { CCAP_Transcribe_Response } from '../../../../../../../_models/interfaces/voice/transcribe/ccap-transcribe-response.interface';\nimport { CCAP_VoiceSttQaUiLoadResult_Interface } from '../../../../../../../_models/interfaces/voice/ccap-voice-stt-qa-ui-load-result.interface';\nimport { Settings_ApiService } from '../../../../../../config/_modules/settings/_services/settings.api-service';\nimport { VoiceNotesPoc_ApiService } from './voice-notes-poc.api-service';\n\n/**\n * Voice kliens SSOT: STT chunk, QA panel állapot, TTS message audio URL/blob (komponensek nem hívják közvetlenül a Voice ApiService-t).\n */\n@Injectable({ providedIn: 'root' })\nexport class VNP_SttQaUi_DataService {\n\n private readonly voice_AS: VoiceNotesPoc_ApiService = inject(VoiceNotesPoc_ApiService);\n private readonly settings_AS: Settings_ApiService = inject(Settings_ApiService);\n\n /**\n * Szerverről: QA engedélyezett-e (egyszeri flag betöltéshez).\n */\n async fetchQaEnabledFlag(): Promise<boolean> {\n try {\n const res: CCAP_VoiceNotesQaSettings_Response =\n await this.voice_AS.fetchVoiceNotesQaSettings();\n return res.qaEnabled === true;\n } catch {\n return false;\n }\n }\n\n /**\n * QA beállítások panelhez: GET qa-settings + LLM szekció + opcionális modell lista.\n */\n async loadSttQaSettingsPanelState(): Promise<CCAP_VoiceSttQaUiLoadResult_Interface> {\n const qa: CCAP_VoiceNotesQaSettings_Response =\n await this.voice_AS.fetchVoiceNotesQaSettings();\n const llmSection: Record<string, unknown> = await this.settings_AS.getSection(\n SC_Type.llmProviders,\n );\n const snap = ParseLlmSettingsSectionForUi_Util.parseLlmSettingsSectionForUi(llmSection);\n const providerTrimmed: string = (qa.providerName ?? '').trim();\n let qaModelsForProvider: string[] = [];\n let qaModelsListFetchError: string = '';\n if (providerTrimmed.length > 0) {\n const fetchRes = await this.fetchLlmModelsListForSttQa(providerTrimmed);\n qaModelsForProvider = [...fetchRes.models];\n qaModelsListFetchError = fetchRes.errorMessage;\n const savedModel: string = (qa.modelName ?? '').trim();\n if (savedModel.length > 0 && !qaModelsForProvider.includes(savedModel)) {\n qaModelsForProvider = [savedModel, ...qaModelsForProvider];\n }\n }\n return {\n qa: qa,\n llmProviderSelectOptions: snap.llmProviderSelectOptions,\n defaultLlmProvider: snap.defaultLlmProvider,\n defaultLlmModel: snap.defaultLlmModel,\n qaModelsForProvider: qaModelsForProvider,\n qaModelsListFetchError: qaModelsListFetchError,\n };\n }\n\n /**\n * Egy providerhez modell lista + hiba szöveg (settings list-llm-models); cloud provider esetén üres lista és error.\n */\n async fetchLlmModelsListForSttQa(providerId: string): Promise<{\n models: string[];\n errorMessage: string;\n }> {\n const id: string = providerId.trim();\n if (!id.length) {\n return { models: [], errorMessage: '' };\n }\n try {\n const res: CCAP_ListAiModels_Response = await this.settings_AS.postListLlmModels({\n providerId: id,\n });\n const models: string[] = res.models ?? [];\n const errRaw: string = typeof res.error === 'string' ? res.error.trim() : '';\n const isExplicitFailure: boolean = res.success === false;\n if (models.length > 0) {\n return {\n models: models,\n errorMessage: isExplicitFailure ? (errRaw.length > 0 ? errRaw : 'Model list request failed.') : '',\n };\n }\n if (isExplicitFailure) {\n return {\n models: [],\n errorMessage: errRaw.length > 0 ? errRaw : 'Model list request failed.',\n };\n }\n return { models: [], errorMessage: errRaw };\n } catch (error: unknown) {\n const message: string = error instanceof Error ? error.message : String(error);\n return { models: [], errorMessage: message };\n }\n }\n\n /**\n * Csak a modell id-k (legacy hívók / egyszerű UI); hiba esetén üres tömb.\n */\n async fetchLlmModelIdsForProvider(providerId: string): Promise<string[]> {\n const out = await this.fetchLlmModelsListForSttQa(providerId);\n return out.models;\n }\n\n /**\n * Confusion map mentés előtti normalizálás (trim + üres sorok megtartása opcionálisan kiszűrve).\n */\n normalizeConfusionMapEntries(\n list: Voc_SttQaConfusionMapEntry_Response[],\n ): Voc_SttQaConfusionMapEntry_Response[] {\n return list\n .map((e: Voc_SttQaConfusionMapEntry_Response): Voc_SttQaConfusionMapEntry_Response => ({\n from: String(e.from).trim(),\n to: String(e.to).trim(),\n }))\n .filter((e: Voc_SttQaConfusionMapEntry_Response): boolean =>\n e.from.length > 0 || e.to.length > 0);\n }\n\n /**\n * PUT /voice/notes/qa-settings.\n */\n async saveVoiceNotesQaSettings(\n body: CCAP_VoiceNotesQaSettingsSaveBody_Request,\n ): Promise<void> {\n await this.voice_AS.saveVoiceNotesQaSettings(body);\n }\n\n /**\n * Voice Notes POC jegyzet GET.\n */\n fetchVoiceNotesPoc(): Promise<CCAP_VoiceNotesPoc_Response> {\n return this.voice_AS.fetchVoiceNotesPoc();\n }\n\n /**\n * Voice Notes POC jegyzet PUT.\n */\n saveVoiceNotesPoc(body: CCAP_VoiceNotesPocSaveBody_Request): Promise<{ ok?: boolean }> {\n return this.voice_AS.saveVoiceNotesPoc(body);\n }\n\n /**\n * Hang chunk STT (+ opcionális QA) — POST /voice/notes/transcribe.\n */\n transcribeVoiceChunk(params: {\n blob: Blob;\n mimeType: string;\n filename: string;\n qaEnabled?: boolean;\n noteContext?: string;\n skipClassification?: boolean;\n confidenceThreshold?: number;\n /** Slice 3 (cycle 947): dual-recorder swap overlap-ms, headerben megy a szerverhez. */\n overlapPrevMs?: number;\n }): Promise<CCAP_Transcribe_Response> {\n return this.voice_AS.transcribeVoiceChunk(params);\n }\n\n /**\n * TTS message audio URL (üres key → üres string).\n */\n getTtsMessageAudioUrl(messageKey: string): string {\n return this.voice_AS.getTtsMessageAudioUrl(messageKey);\n }\n\n /**\n * TTS message audio get-or-create (blob).\n */\n getOrCreateTtsMessageAudio(params: {\n sessionId: string;\n role: string;\n content: string;\n timestamp: string;\n }): Promise<Blob> {\n return this.voice_AS.getOrCreateTtsMessageAudio(params);\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["ReadLlmCloudBucketsFromSectionResponse_Util", "readLlmCloudBucketsFromSectionResponse", "response", "anthropicLlm", "readLlmCloudBucketFromUnknown", "anthropicSettings", "includeBaseUrl", "googleLlm", "googleSettings", "deepseekLlm", "deepseekSettings", "fdpaiLlm", "fdpaiSettings", "raw", "options", "Array", "isArray", "enabled", "defaultModel", "baseUrl", "apiKey", "apiKeyMasked", "Reflect", "get", "baseUrlRaw", "ParseLlmSettingsSectionForUi_Util", "parseLlmSettingsSectionForUi", "response", "oai", "openAiSettings", "openAiEnabled", "openaiModel", "Array", "isArray", "Reflect", "get", "dm", "finalLocalAi", "localAiSettings", "filter", "item", "map", "key", "trim", "length", "name", "id", "CCAP_CustomLocalOpenAiLlmInstanceId_Util", "build", "localAiKey", "label", "rowEnabled", "enabled", "baseUrl", "model", "defaultModel", "row", "clouds", "ReadLlmCloudBucketsFromSectionResponse_Util", "readLlmCloudBucketsFromSectionResponse", "enabledLlmProviderIds", "push", "anthropicLlm", "googleLlm", "deepseekLlm", "fdpaiLlm", "entry", "localRowsForLabel", "e", "llmProviderSelectOptions", "pid", "value", "CCAP_LlmProviderDisplayLabelForUi_Util", "resolve", "defaultLlmProvider", "defaultLlmModel", "matchEntry", "find", "VoiceNotesPoc_ApiService", "baseUrl", "environment", "api", "http", "inject", "HttpClient", "fetchVoiceNotesPoc", "firstValueFrom", "get", "fetchVoiceNotesQaSettings", "saveVoiceNotesQaSettings", "body", "put", "headers", "saveVoiceNotesPoc", "transcribeVoiceChunk", "params", "queryParams", "qa", "qaEnabled", "skip_classification", "skipClassification", "confidenceThreshold", "undefined", "confidence_threshold", "String", "noteContext", "note_context", "query", "Object", "keys", "map", "k", "encodeURIComponent", "join", "url", "mimeType", "filename", "overlapPrevMs", "post", "blob", "generateTtsSpeechBlob", "input", "text", "responseType", "getTtsMessageAudioUrl", "messageKey", "key", "trim", "getOrCreateTtsMessageAudio", "sessionId", "role", "content", "timestamp", "getVoiceSettings", "saveTtsProvider", "provider", "saveElevenLabsKey", "apiKey", "testElevenLabsApiKey", "saveVoiceConfig", "elevenLabsModelId", "elevenLabsVoiceId", "factory", "\u0275fac", "providedIn", "VNP_SttQaUi_DataService", "voice_AS", "inject", "VoiceNotesPoc_ApiService", "settings_AS", "Settings_ApiService", "fetchQaEnabledFlag", "__async", "fetchVoiceNotesQaSettings", "qaEnabled", "loadSttQaSettingsPanelState", "qa", "llmSection", "getSection", "SC_Type", "llmProviders", "snap", "ParseLlmSettingsSectionForUi_Util", "parseLlmSettingsSectionForUi", "providerTrimmed", "providerName", "trim", "qaModelsForProvider", "qaModelsListFetchError", "length", "fetchRes", "fetchLlmModelsListForSttQa", "models", "errorMessage", "savedModel", "modelName", "includes", "llmProviderSelectOptions", "defaultLlmProvider", "defaultLlmModel", "providerId", "id", "res", "postListLlmModels", "errRaw", "error", "isExplicitFailure", "success", "message", "Error", "String", "fetchLlmModelIdsForProvider", "normalizeConfusionMapEntries", "list", "map", "e", "from", "to", "filter", "saveVoiceNotesQaSettings", "body", "fetchVoiceNotesPoc", "saveVoiceNotesPoc", "transcribeVoiceChunk", "params", "getTtsMessageAudioUrl", "messageKey", "getOrCreateTtsMessageAudio", "factory", "\u0275fac", "providedIn"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-ESIGVRCK.js";import{I as d,p as h}from"./chunk-Y6V4NGLU.js";import{C as l,aa as o,h as u,k as r,y as s}from"./chunk-TBMJSIBB.js";var e=function(t){return t.idle="idle",t.downloading="downloading",t.installing="installing",t.completed="completed",t.failed="failed",t}(e||{});var p=u(h());function m(){return typeof window.Capacitor<"u"&&window.Capacitor.isNativePlatform?.()===!0}function w(){let a=window.Capacitor?.Plugins?.AppUpdater;return a||null}var y=(()=>{class t{versionCheck_CS=l(c);downloadUrl=d.api.baseUrl+"/mobile/download";phase_$=o(e.idle);lastError_$=o("");startUpdate(){return r(this,null,function*(){let n=this.phase_$();if(!(n===e.downloading||n===e.installing)){this.lastError_$.set(""),this.phase_$.set(e.downloading);try{let i=w();if(i){this.phase_$.set(e.installing),yield i.downloadAndInstall({downloadUrl:this.downloadUrl}),this.phase_$.set(e.completed);return}this.openInSystemBrowser(this.downloadUrl),this.phase_$.set(e.completed)}catch(i){let f=i instanceof Error?i.message:String(i);this.lastError_$.set(f),this.phase_$.set(e.failed),p.DyFM_Error.logSimple("CCAP_MobileAppUpdater | startUpdate failed",i)}}})}autoUpdateIfAvailable(){return r(this,null,function*(){m()&&(yield this.versionCheck_CS.checkNow(),this.versionCheck_CS.updateAvailable_$()&&(yield this.startUpdate()))})}openInSystemBrowser(n){window.open(n,"_system")}static \u0275fac=function(i){return new(i||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{e as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-RAHCHCWR.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
1
|
+
import{a as S}from"./chunk-5NW5UGVZ.js";import{M as m,t as g}from"./chunk-Y6V4NGLU.js";import{C as y,N as h,a as i,aa as u,b as c,k as d,y as f}from"./chunk-TBMJSIBB.js";function I(){return{instanceId:crypto.randomUUID(),label:"default",gatewayUrl:"ws://127.0.0.1:18789",authToken:void 0,isPrimary:!1,autoConnect:!1,testState:"idle"}}function p(o){let l=[],s=o.gatewayUrl??"",t=(o.message??"").toLowerCase(),e=o.failureType??"";return s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push('A gateway wss:// (TLS) protokollt haszn\xE1l \u2014 ha self-signed certificate-et haszn\xE1l, enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),s.startsWith("ws://")&&!s.startsWith("wss://")&&(e==="ws-error"||e==="ws-close")&&l.push("Ha a gateway TLS-t (wss://) haszn\xE1l, cser\xE9ld az URL-t ws:// helyett wss://-re."),e==="timeout"&&l.push("A gateway nem v\xE1laszolt id\u0151ben. Ellen\u0151rizd, hogy fut-e a gateway process \xE9s el\xE9rhet\u0151-e a megadott c\xEDmen."),e==="ws-error"&&!l.length&&l.push("Nem siker\xFClt csatlakozni. Ellen\u0151rizd: 1) fut-e a gateway, 2) helyes-e az URL \xE9s port, 3) nincs-e t\u0171zfal az \xFAtban."),(t.includes("econnrefused")||t.includes("connection refused"))&&l.push("A kapcsolat visszautas\xEDtva \u2014 a gateway nem hallgat a megadott c\xEDmen/porton."),(t.includes("certificate")||t.includes("cert")||t.includes("ssl")||t.includes("tls"))&&l.push('TLS tan\xFAs\xEDtv\xE1ny hiba \u2014 self-signed certificate eset\xE9n enged\xE9lyezd az "Allow self-signed TLS" opci\xF3t.'),l.length?`
|
|
2
2
|
|
|
3
3
|
`+l.join(`
|
|
4
4
|
`):""}var _=(()=>{class o extends m{ociData_AS=y(S);section_$=u({form:{instances:[]}});updateForm(s){this.section_$.update(t=>c(i({},t),{form:i(i({},t.form),s)}))}setSection(s){this.section_$.set(s)}getSectionId(){return g.openclawRegistry}getSection_$(){return this.section_$}doLoad(){return d(this,null,function*(){let s=new Map;for(let a of this.section_$().form.instances)s.set(a.instanceId,{testState:a.testState,testLatencyMs:a.testLatencyMs,testError:a.testError,testResultMessage:a.testResultMessage,authTokenEditMode:a.authTokenEditMode,pairState:a.pairState,pairError:a.pairError,pairMessage:a.pairMessage,pairResultMessage:a.pairResultMessage,connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt});let e=(yield this.settings_AS.getSection(g.openclawRegistry)).instances,n=Array.isArray(e)?e.map(a=>{let r=s.get(a.instanceId);return c(i({},a),{authToken:void 0,testState:r?.testState??"idle",testLatencyMs:r?.testLatencyMs,testError:r?.testError,testResultMessage:r?.testResultMessage,authTokenEditMode:r?.authTokenEditMode??!1,pairState:r?.pairState??"idle",pairError:r?.pairError,pairMessage:r?.pairMessage,pairResultMessage:r?.pairResultMessage,connectionStatus:r?.connectionStatus,lastConnectedAt:r?.lastConnectedAt})}):[];this.section_$.set({form:{instances:n}}),this.enrichWithOciStatus().catch(()=>{})})}enrichWithOciStatus(){return d(this,null,function*(){let s=yield this.ociData_AS.listInstances(),t=new Map;for(let e of s.list)t.set(e.instanceId,e);this.section_$.update(e=>c(i({},e),{form:{instances:e.form.instances.map(n=>{let a=t.get(n.instanceId);return a?c(i({},n),{connectionStatus:a.connectionStatus,lastConnectedAt:a.lastConnectedAt}):n})}}))})}buildSaveBody(){return{instances:this.section_$().form.instances.map(t=>({instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}))}}savingInstanceId_$=u(null);buildSaveBodyForInstance(s){let t=this.section_$().form.instances.find(e=>e.instanceId===s);return t?{openclawRegistrySaveScope:"instance",targetInstanceId:s,instances:[{instanceId:t.instanceId,label:t.label,gatewayUrl:t.gatewayUrl,authToken:t.authToken,isPrimary:t.isPrimary,autoConnect:t.autoConnect,allowSelfSignedTls:t.allowSelfSignedTls}]}:{}}saveInstance(s){return d(this,null,function*(){this.savingInstanceId_$.set(s),this.saveError_$.set(null);try{let t=this.buildSaveBodyForInstance(s);yield this.doSave(t),yield this.load()}catch(t){this.saveError_$.set(o.getErrorMessage(t))}finally{this.savingInstanceId_$.set(null)}})}addInstance(){let s=I();this.section_$().form.instances.length||(s.isPrimary=!0),this.section_$.update(t=>c(i({},t),{form:{instances:[...t.form.instances,s]}}))}removeInstance(s){this.section_$.update(t=>{let e=t.form.instances.filter((a,r)=>r!==s);return(t.form.instances[s]?.isPrimary??!1)&&e.length>0&&(e[0]=c(i({},e[0]),{isPrimary:!0})),c(i({},t),{form:{instances:e}})})}updateInstance(s,t){this.section_$.update(e=>{let n=e.form.instances.map((a,r)=>r!==s?a:i(i({},a),t));return c(i({},e),{form:{instances:n}})})}setPrimary(s){this.section_$.update(t=>{let e=t.form.instances.map((n,a)=>c(i({},n),{isPrimary:a===s}));return c(i({},t),{form:{instances:e}})})}testConnection(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.updateInstance(s,{testState:"testing",testLatencyMs:void 0,testError:void 0,testResultMessage:void 0});try{let e=yield this.settings_AS.testOpenclawConnection({gatewayUrl:t.gatewayUrl,authToken:t.authToken,allowSelfSignedTls:t.allowSelfSignedTls,instanceId:t.instanceId});if(e.success){let n=e.checks,a=n?" | WS: OK | v3 Handshake: OK | Sessions: OK"+(typeof n.sessionCount=="number"?` (${n.sessionCount} session)`:""):"";this.updateInstance(s,{testState:"ok",testLatencyMs:e.latencyMs,testError:void 0,testResultMessage:`Gateway el\xE9rhet\u0151 \u2014 v\xE1laszid\u0151: ${e.latencyMs}ms${a}`})}else{let n=e.error?.context?.failureType?String(e.error.context.failureType):"unknown",a=p({failureType:n,gatewayUrl:typeof e.error?.context?.gatewayUrl=="string"?e.error.context.gatewayUrl:t.gatewayUrl,message:e.error?.message});this.updateInstance(s,{testState:"error",testLatencyMs:void 0,testError:e.error??new Error("Connection failed"),testResultMessage:`Kapcsol\xF3d\xE1s sikertelen (${n}): ${e.error?.message??"ismeretlen hiba"}${a}`})}}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=p({gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{testState:"error",testError:n??e,testResultMessage:`Teszt hiba: ${a}${r}`})}}})}pairingInstanceId_$=u(null);pairInstance(s){return d(this,null,function*(){let t=this.section_$().form.instances[s];if(t){this.pairingInstanceId_$.set(t.instanceId),this.updateInstance(s,{pairState:"pairing",pairError:void 0,pairMessage:void 0});try{let e=yield this.settings_AS.pairOpenclawInstance({instanceId:t.instanceId});if(e.status==="paired")this.updateInstance(s,{pairState:"paired",pairingStatus:"paired",pairedAt:e.pairedAt,deviceTokenMasked:e.deviceTokenMasked,ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`Sikeresen p\xE1ros\xEDtva \u2014 device token megkapva${e.pairedAt?" ("+e.pairedAt+")":""}`});else if(e.status==="pending")this.updateInstance(s,{pairState:"pending",pairingStatus:"pending",ccapDeviceId:e.ccapDeviceId,pairingRequestId:e.pairingRequestId,pairMessage:e.message,pairError:void 0,pairResultMessage:`J\xF3v\xE1hagy\xE1sra v\xE1r a gateway-en \u2014 Device ID: ${e.ccapDeviceId??"N/A"}`});else if(e.status==="rejected")this.updateInstance(s,{pairState:"rejected",pairingStatus:"rejected",ccapDeviceId:e.ccapDeviceId,pairMessage:e.message,pairError:void 0,pairResultMessage:`A gateway elutas\xEDtotta a p\xE1ros\xEDt\xE1st: ${e.message??"ismeretlen ok"}`});else{let n=e.error?.context,a=p({failureType:typeof n?.failureType=="string"?n.failureType:void 0,gatewayUrl:typeof n?.gatewayUrl=="string"?n.gatewayUrl:t.gatewayUrl,message:e.message??e.error?.message});this.updateInstance(s,{pairState:"error",pairError:e.error??new Error(e.message??"Pairing failed"),pairMessage:e.message,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${e.message??e.error?.message??"ismeretlen hiba"}${a}`})}yield this.load()}catch(e){let n=e&&typeof e=="object"&&"error"in e?e.error:void 0,a=n?.message?String(n.message):e instanceof Error?e.message:String(e),r=n?.context,w=p({failureType:typeof r?.failureType=="string"?r.failureType:void 0,gatewayUrl:typeof r?.gatewayUrl=="string"?r.gatewayUrl:t.gatewayUrl,message:a});this.updateInstance(s,{pairState:"error",pairError:n??e,pairMessage:void 0,pairResultMessage:`P\xE1ros\xEDt\xE1s hiba: ${a}${w}`})}finally{this.pairingInstanceId_$.set(null)}}})}static \u0275fac=(()=>{let s;return function(e){return(s||(s=h(o)))(e||o)}})();static \u0275prov=f({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{_ as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-RCCUSGIN.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as O}from"./chunk-
|
|
1
|
+
import{a as O}from"./chunk-I3FSMGMK.js";import{a as K}from"./chunk-SDVXPGB7.js";import{e as F}from"./chunk-TWK7BOB7.js";import{h as f,j as U}from"./chunk-PVSQ5ZEZ.js";import{I as D,p as H}from"./chunk-Y6V4NGLU.js";import{C as _,R as k,a as I,aa as u,b as C,d as L,h as N,k as d,p as h,vb as g,xb as P,y as v}from"./chunk-TBMJSIBB.js";var A=N(H());var w=(()=>{class l{static GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES=["timestamp","createdAt","updatedAt","ts","time","sentAt","messageTimestamp","created_at","updated_at","lastMessageAt","last_message_at","startedAt","started_at","lastActivityAt","last_activity_at"];static GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES=["lastActivityAt","updatedAt","lastMessageAt","updated_at","last_activity_at","last_message_at","startedAt","started_at","createdAt","created_at"];static GATEWAY_SESSION_STARTED_FIELD_NAMES=["startedAt","started_at","createdAt","created_at"];static GATEWAY_OUTPUT_ONLY_TIMESTAMP_FIELD_NAMES=["lastMessageAt","last_message_at","lastOutputAt","last_output_at"];static extractTimestamp(s,t){for(let e of t){let n=s[e];if(typeof n=="string"&&n)return n;if(typeof n=="number"&&n>0){let o=n<1e12?n*1e3:n;return new Date(o).toISOString()}}}}return l})();var E=class l{static buildGatewaySessionsFetch(y){let s=y.response._firstSessionKeys,t=Array.isArray(s)?s:[],e=Array.isArray(y.response.sessions)?y.response.sessions:[],n=e.map(i=>l.mapRawSessionToListItem({raw:i,gatewayUrl:y.response.gatewayUrl}));return{listItems:l.sortListItemsByLastActivityDesc({items:n}),rawSessions:e,gatewayUrl:y.response.gatewayUrl,source:y.response.source,instanceId:y.response.instanceId,firstSessionKeys:t}}static mapRawSessionToListItem(y){let s=y.raw;return{sessionId:typeof s.key=="string"?s.key:typeof s.sessionId=="string"?s.sessionId:typeof s.id=="string"?s.id:String(s.key??s.sessionId??s.id??""),label:typeof s.label=="string"?s.label:typeof s.name=="string"?s.name:typeof s.title=="string"?s.title:void 0,workspacePath:typeof s.workspacePath=="string"?s.workspacePath:typeof s.cwd=="string"?s.cwd:"",status:typeof s.status=="string"?s.status:"unknown",statusMessage:typeof s.statusMessage=="string"?s.statusMessage:void 0,gatewayUrl:y.gatewayUrl,openclawAgentName:typeof s.agentName=="string"?s.agentName:typeof s.agent=="string"?s.agent:void 0,promptCount:typeof s.promptCount=="number"?s.promptCount:typeof s.messageCount=="number"?s.messageCount:0,toolCallCount:typeof s.toolCallCount=="number"?s.toolCallCount:0,lastActivityAt:w.extractTimestamp(s,w.GATEWAY_SESSION_LAST_ACTIVITY_FIELD_NAMES),startedAt:w.extractTimestamp(s,w.GATEWAY_SESSION_STARTED_FIELD_NAMES),lastPrompt:typeof s.lastPrompt=="string"?s.lastPrompt:void 0,mode:typeof s.mode=="string"?s.mode:void 0,reasoningEffort:typeof s.reasoningEffort=="string"?s.reasoningEffort:typeof s.thinking=="string"?s.thinking:void 0,isArchived:typeof s.isArchived=="boolean"?s.isArchived:!1}}static sortListItemsByLastActivityDesc(y){return[...y.items].sort((s,t)=>{let e=s.lastActivityAt?new Date(s.lastActivityAt).getTime():0;return(t.lastActivityAt?new Date(t.lastActivityAt).getTime():0)-e})}};var G=(()=>{class l{baseUrl=`${D.api.baseUrl}/oc-session`;http=_(P);peiContext_DS=_(K);withCcapId(s){let t=this.peiContext_DS.activeCcapId_$();return t?s.set("ccapId",t):s}createSession(s){let t=this.withCcapId(new g);return h(this.http.post(this.baseUrl,s,{params:t}))}listSessions(s){let t=this.withCcapId(new g);return s?.status&&(t=t.set("status",s.status)),s?.workspacePath&&(t=t.set("workspacePath",s.workspacePath)),s?.gatewayUrl&&(t=t.set("gatewayUrl",s.gatewayUrl)),s?.includeArchived&&(t=t.set("includeArchived","1")),s?.limit!=null&&(t=t.set("limit",String(s.limit))),s?.offset!=null&&(t=t.set("offset",String(s.offset))),h(this.http.get(this.baseUrl,{params:t}))}listGatewaySessions(s){let t=new g().set("instanceId",s.instanceId);return h(this.http.get(`${this.baseUrl}/gateway-sessions`,{params:t}))}getGatewaySessionHistory(s){let t=new g().set("instanceId",s.instanceId);return h(this.http.get(`${this.baseUrl}/gateway-sessions/${s.sessionId}/history`,{params:t}))}sendGatewayPrompt(s){return h(this.http.post(`${this.baseUrl}/gateway-sessions/${s.sessionId}/send`,{instanceId:s.instanceId,content:s.content,agentName:s.agentName}))}abortGatewaySession(s){return h(this.http.post(`${this.baseUrl}/gateway-sessions/${s.sessionId}/abort`,{instanceId:s.instanceId}))}deleteGatewaySession(s){let t=new g().set("instanceId",s.instanceId);return h(this.http.delete(`${this.baseUrl}/gateway-sessions/${s.sessionId}`,{params:t}))}getSession(s){let t=this.withCcapId(new g);return h(this.http.get(`${this.baseUrl}/${s.sessionId}`,{params:t}))}sendPrompt(s){let t=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${s.sessionId}/prompt`,{content:s.content},{params:t}))}reconnectSession(s){let t=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${s.sessionId}/reconnect`,{},{params:t}))}stopExecution(s){let t=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${s.sessionId}/stop-execution`,{},{params:t}))}terminateSession(s){let t=this.withCcapId(new g);return h(this.http.post(`${this.baseUrl}/${s.sessionId}/terminate`,{},{params:t}))}updateSessionConfig(s){let o=s,{sessionId:t}=o,e=L(o,["sessionId"]),n=this.withCcapId(new g);return h(this.http.patch(`${this.baseUrl}/${t}/config`,e,{params:n}))}setSessionArchived(s){let t=this.withCcapId(new g);return h(this.http.patch(`${this.baseUrl}/${s.sessionId}/archive`,{isArchived:s.isArchived},{params:t}))}getSessionEvents(s){let t=this.withCcapId(new g);return s.eventType&&(t=t.set("eventType",s.eventType)),s.since&&(t=t.set("since",s.since)),s.sinceSequence!=null&&(t=t.set("sinceSequence",String(s.sinceSequence))),s.limit!=null&&(t=t.set("limit",String(s.limit))),s.offset!=null&&(t=t.set("offset",String(s.offset))),s.latest&&(t=t.set("latest","1")),h(this.http.get(`${this.baseUrl}/${s.sessionId}/events`,{params:t}))}getSessionEventStreamUrl(s){let t=`${this.baseUrl}/${s.sessionId}/events/stream`,e=this.peiContext_DS.activeCcapId_$();return e?`${t}?ccapId=${encodeURIComponent(e)}`:t}static \u0275fac=function(t){return new(t||l)};static \u0275prov=v({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var ls=(()=>{class l{sessions_$=u([]);sessionsLoading_$=u(!1);sessionsLoadError_$=u(null);selectedSession_$=u(null);selectedSessionLoading_$=u(!1);selectedSessionEvents_$=u([]);consoleMessages_$=u([]);assembledMessages_$=u([]);assembledMessagesHasMore_$=u(!1);isLoadingOlderMessages_$=u(!1);lastStatusUpdate_$=u(null);sessionUsage_$=u({inputTokens:0,outputTokens:0,costUsd:0});activeSessionId_$=u("");activeInstanceId_$=u("");gatewayFilter_$=u(null);extSessionMsg_AS=_(O);ocSession_AS=_(G);globalError_CS=_(U);socket_CS=_(F);ngZone=_(k);eventSubscription=null;reconnectSubscription=null;lastKnownEventSequence=-1;chatPollHandle=null;detailPollHandle=null;lastPolledHistoryFingerprint="";constructor(){this.eventSubscription=this.socket_CS.event$.subscribe(s=>{this.handleSocketEvent(s)}),this.reconnectSubscription=this.socket_CS.connected$.subscribe(s=>{if(s){let t=this.activeSessionId_$();t&&(this.socket_CS.emit("oc-session:subscribe",{sessionId:t}),this.loadAssembledMessages({sessionId:t}).catch(()=>{})),this.backfillMissedEvents()}})}ngOnDestroy(){this.stopChatPolling(),this.eventSubscription&&(this.eventSubscription.unsubscribe(),this.eventSubscription=null),this.reconnectSubscription&&(this.reconnectSubscription.unsubscribe(),this.reconnectSubscription=null)}setGatewayFilter(s){this.gatewayFilter_$.set(s),this.loadSessions().catch(()=>{})}setGatewayFilterOnly(s){this.gatewayFilter_$.set(s)}loadSessions(s){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let e=[...(yield this.ocSession_AS.listSessions({status:s?.status,workspacePath:s?.workspacePath,gatewayUrl:this.gatewayFilter_$()??void 0,includeArchived:s?.includeArchived})).sessions].sort((n,o)=>{let i=n.lastActivityAt?new Date(n.lastActivityAt).getTime():0;return(o.lastActivityAt?new Date(o.lastActivityAt).getTime():0)-i});this.sessions_$.set(e)}catch(t){this.sessionsLoadError_$.set(t),this.pushConsoleMessage({type:"error",text:`Load sessions failed: ${f.getErrorMessageForDisplay(t)}`})}finally{this.sessionsLoading_$.set(!1)}})}fetchGatewaySessionsForInstance(s){return d(this,null,function*(){let t=yield this.ocSession_AS.listGatewaySessions({instanceId:s.instanceId});return E.buildGatewaySessionsFetch({response:t})})}loadGatewaySessions(s){return d(this,null,function*(){this.sessionsLoading_$.set(!0),this.sessionsLoadError_$.set(null);try{let t=yield this.fetchGatewaySessionsForInstance({instanceId:s.instanceId});!t.listItems.length&&t.rawSessions.length>0&&this.pushConsoleMessage({type:"error",text:`Gateway returned ${t.rawSessions.length} sessions but mapping produced 0.
|
|
2
2
|
First session keys: ${t.firstSessionKeys.join(", ")}`}),this.sessions_$.set(t.listItems)}catch(t){this.sessionsLoadError_$.set(t),this.pushConsoleMessage({type:"error",text:`Load gateway sessions failed: ${f.getErrorMessageForDisplay(t)}`})}finally{this.sessionsLoading_$.set(!1)}})}loadSessionDetail(s){return d(this,null,function*(){let t=s.isSilent===!0;t||this.selectedSessionLoading_$.set(!0);try{let e=yield this.ocSession_AS.getSession({sessionId:s.sessionId});this.selectedSession_$.set(e),this.loadAssembledMessages({sessionId:s.sessionId}).catch(()=>{})}catch(e){if(!t){this.selectedSession_$.set(null);let n=e instanceof Error?e.message:"Failed to load session details";this.pushConsoleMessage({type:"error",text:`Load session failed: ${n}`})}}finally{t||this.selectedSessionLoading_$.set(!1)}})}loadGatewaySessionHistory(s){return d(this,null,function*(){this.selectedSessionLoading_$.set(!0),this.consoleMessages_$.set([]);try{let t=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:s.sessionId,instanceId:s.instanceId}),e=t,n=Array.isArray(e._rawKeys)?e._rawKeys:[],o=Array.isArray(t.history)?t.history:[],i=this.parseGatewayHistory(o),a=typeof e.messageCount=="number"?e.messageCount:0,r=Array.isArray(e._firstMessageKeys)?e._firstMessageKeys:[];i.length?this.consoleMessages_$.set(i):a>0?this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"error",text:`Gateway session has ${a} messages, but mapping failed.
|
|
3
3
|
Message keys: ${r.join(", ")||"unknown"}
|
|
4
4
|
Gateway response keys: ${n.join(", ")||"none"}`,timestamp:new Date().toISOString()}]):this.consoleMessages_$.set([{listKey:this.allocateConsoleListKey(),type:"info",text:"Gateway session loaded \u2014 session has no messages yet.",timestamp:new Date().toISOString()}]),this.selectedSession_$.set({session:{sessionId:s.sessionId,workspacePath:"",status:"unknown",promptCount:0,toolCallCount:0,isArchived:!1},runtime:{isLive:!1,runtimeStatus:null,outputBufferLength:0}}),this.lastPolledHistoryFingerprint=this.computeGatewayHistoryFingerprint(o),this.startChatPolling()}catch(t){this.selectedSession_$.set(null),this.pushConsoleMessage({type:"error",text:`Load gateway session history failed: ${f.getErrorMessageForDisplay(t)}`})}finally{this.selectedSessionLoading_$.set(!1)}})}loadSessionEvents(s){return d(this,null,function*(){try{let t=yield this.ocSession_AS.getSessionEvents({sessionId:s.sessionId,eventType:s.eventType,limit:s.limit??500,latest:!0});this.selectedSessionEvents_$.set(t.events),this.updateLastKnownSequence(t.events);for(let e of t.events)this.pushConsoleMessageFromEvent(e)}catch(t){this.selectedSessionEvents_$.set([]),this.pushConsoleMessage({type:"error",text:`Load events failed: ${f.getErrorMessageForDisplay(t)}`})}})}createSession(s){return d(this,null,function*(){try{let t=yield this.ocSession_AS.createSession(s),e=String(t.session.sessionId||"");return yield this.loadSessions(),e}catch(t){throw this.pushConsoleMessage({type:"error",text:`Create session failed: ${f.getErrorMessageForDisplay(t)}`}),t}})}sendPrompt(s){return d(this,null,function*(){this.pushConsoleMessage({type:"prompt",text:s.content});try{let t=this.activeInstanceId_$();t?yield this.ocSession_AS.sendGatewayPrompt({sessionId:s.sessionId,instanceId:t,content:s.content}):yield this.ocSession_AS.sendPrompt(s)}catch(t){throw this.pushConsoleMessage({type:"error",text:`Send failed: ${f.getErrorMessageForDisplay(t)}`}),t}})}reconnectSession(s){return d(this,null,function*(){try{yield this.ocSession_AS.reconnectSession(s),yield this.loadSessions()}catch(t){throw this.pushConsoleMessage({type:"error",text:`Reconnect failed: ${f.getErrorMessageForDisplay(t)}`}),t}})}stopExecution(s){return d(this,null,function*(){try{yield this.ocSession_AS.stopExecution(s)}catch(t){throw this.pushConsoleMessage({type:"error",text:`Stop execution failed: ${f.getErrorMessageForDisplay(t)}`}),t}})}terminateSession(s){return d(this,null,function*(){try{yield this.ocSession_AS.terminateSession(s),yield this.loadSessions()}catch(t){throw this.pushConsoleMessage({type:"error",text:`Terminate failed: ${f.getErrorMessageForDisplay(t)}`}),t}})}setSessionArchived(s){return d(this,null,function*(){try{yield this.ocSession_AS.setSessionArchived(s),yield this.loadSessions()}catch(t){throw this.pushConsoleMessage({type:"error",text:`Archive failed: ${f.getErrorMessageForDisplay(t)}`}),t}})}updateSessionConfig(s){return d(this,null,function*(){try{yield this.ocSession_AS.updateSessionConfig(s);let t=this.selectedSession_$();if(t?.session.sessionId===s.sessionId){let e=I({},t.session);s.mode!=null&&(e.mode=s.mode),s.reasoningEffort!=null&&(e.reasoningEffort=s.reasoningEffort),s.openclawAgentName!=null&&(e.openclawAgentName=s.openclawAgentName),this.selectedSession_$.set(C(I({},t),{session:e}))}}catch(t){throw this.pushConsoleMessage({type:"error",text:`Config update failed: ${f.getErrorMessageForDisplay(t)}`}),t}})}setActiveSessionId(s){let t=this.activeSessionId_$();t&&t!==s&&this.socket_CS.emit("oc-session:unsubscribe",{sessionId:t}),this.activeSessionId_$.set(s),s&&this.socket_CS.emit("oc-session:subscribe",{sessionId:s})}clearLiveOutput(){this.stopChatPolling(),this.consoleMessages_$.set([]),this.sessionUsage_$.set({inputTokens:0,outputTokens:0,costUsd:0}),this.lastKnownEventSequence=-1}allocateConsoleListKey(){return globalThis.crypto.randomUUID()}pushConsoleMessage(s){let t=s.type==="assistant"||s.type==="prompt"?s.text.trim():s.text,e={listKey:s.listKey??this.allocateConsoleListKey(),type:s.type,text:t,timestamp:s.timestamp??new Date().toISOString(),expandableContent:s.expandableContent,rawData:s.rawData},n=this.consoleMessages_$();this.consoleMessages_$.set([...n,e])}static CHAT_POLL_INTERVAL_MS=5*A.second;static DETAIL_POLL_INTERVAL_MS=10*A.second;startChatPolling(){this.stopChatPolling(),this.chatPollHandle=setInterval(()=>{this.pollChatHistory()},l.CHAT_POLL_INTERVAL_MS),this.detailPollHandle=setInterval(()=>{let s=this.activeSessionId_$();s&&this.loadSessionDetail({sessionId:s,isSilent:!0})},l.DETAIL_POLL_INTERVAL_MS)}stopChatPolling(){this.chatPollHandle&&(clearInterval(this.chatPollHandle),this.chatPollHandle=null),this.detailPollHandle&&(clearInterval(this.detailPollHandle),this.detailPollHandle=null),this.lastPolledHistoryFingerprint=""}computeGatewayHistoryFingerprint(s){let t=s.length;if(!t)return"0";let e=s[t-1],n=typeof e.id=="string"?e.id:typeof e.messageId=="string"?e.messageId:"",o=l.extractGatewayChatMessageTimestamp(e),i=this.extractTextFromMessage(e),a=400,r=i.length>a?i.slice(0,a):i;return`${t}${n}${o}${r}`}pollChatHistory(){return d(this,null,function*(){let s=this.activeSessionId_$(),t=this.activeInstanceId_$();if(!(!s||!t))try{let e=yield this.ocSession_AS.getGatewaySessionHistory({sessionId:s,instanceId:t}),n=Array.isArray(e.history)?e.history:[],o=this.computeGatewayHistoryFingerprint(n);if(o===this.lastPolledHistoryFingerprint)return;this.lastPolledHistoryFingerprint=o;let i=this.parseGatewayHistory(n);this.ngZone.run(()=>{this.consoleMessages_$.set(i)})}catch{}})}parseGatewayHistory(s){let t=[],e=new Map,n=[];for(let i of s){let a=i.content;if(Array.isArray(a))for(let r of a){let p=typeof r.type=="string"?r.type:"";if(p==="tool_use"||p==="toolCall"){let S=typeof r.id=="string"?r.id:"";S&&n.push(S)}if(p==="tool_result"){let S=typeof r.tool_use_id=="string"?r.tool_use_id:"";S&&e.set(S,this.extractTextFromContentBlock(r))}}}let o=0;for(let i of s){let a=typeof i.role=="string"?i.role:"";if(a==="toolResult"||a==="tool_result"){let r=this.extractTextFromMessage(i);o<n.length&&(e.set(n[o],r),o++)}}for(let i of s){let a=typeof i.role=="string"?i.role:"unknown",r=i.content,p=l.extractGatewayChatMessageTimestamp(i);if(a==="toolResult"||a==="tool_result")continue;if(typeof r=="string"){t.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":"info",text:r,timestamp:p,rawData:i});continue}if(Array.isArray(r)){for(let c of r){let M=typeof c.type=="string"?c.type:"";if(M==="text")t.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":"assistant",text:typeof c.text=="string"?c.text:"",timestamp:p,rawData:{_block:c,_message:{role:a,timestamp:p,contentBlockCount:r.length}}});else if(M==="tool_use"||M==="toolCall"){let b=typeof c.name=="string"?c.name:"unknown tool",T=typeof c.id=="string"?c.id:"",m=c.input??c.arguments,$=e.get(T);t.push({listKey:this.allocateConsoleListKey(),type:"tool",text:`${b}
|
|
@@ -6,4 +6,4 @@ ${JSON.stringify(m,null,2)}`,timestamp:p,expandableContent:$,rawData:{_block:c,_
|
|
|
6
6
|
`):$=JSON.stringify(c,null,2),t.push({listKey:this.allocateConsoleListKey(),type:"tool-result",text:$,timestamp:p,rawData:{_block:c}})}}else M==="thinking"?t.push({listKey:this.allocateConsoleListKey(),type:"info",text:typeof c.thinking=="string"?c.thinking:JSON.stringify(c,null,2),timestamp:p,rawData:{_block:c}}):t.push({listKey:this.allocateConsoleListKey(),type:"info",text:JSON.stringify(c,null,2),timestamp:p,rawData:{_block:c}})}continue}let S=typeof i.text=="string"?i.text:typeof i.message=="string"?i.message:JSON.stringify(i,null,2);t.push({listKey:this.allocateConsoleListKey(),type:a==="user"||a==="human"?"prompt":a==="assistant"?"assistant":a==="tool"||a==="tool_result"||a==="tool_use"?"tool":"info",text:S,timestamp:p,rawData:i})}return t}backfillMissedEvents(){return d(this,null,function*(){let s=this.activeSessionId_$();if(!(!s||this.lastKnownEventSequence<0))try{let e=(yield this.ocSession_AS.getSessionEvents({sessionId:s,sinceSequence:this.lastKnownEventSequence})).events;if(!e.length)return;this.ngZone.run(()=>{let n=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...n,...e]);for(let o of e)this.pushConsoleMessageFromEvent(o);this.updateLastKnownSequence(e)})}catch(t){A.DyFM_Log.warn("CCAP_OcSession_DS | backfill failed",t)}})}updateLastKnownSequence(s){for(let t of s)t.sequence>this.lastKnownEventSequence&&(this.lastKnownEventSequence=t.sequence)}handleSocketEvent(s){let t=s.event,e=s.payload;try{this.ngZone.run(()=>{switch(t){case"oc-session:status":this.handleStatusUpdate(e);break;case"oc-session:output":this.handleOutputChunk(e);break;case"oc-session:event":this.handleSessionEvent(e);break;case"oc-session:list-update":this.handleListUpdate(e);break;case"ext-session-msg:message":this.handleAssembledMessage(e);break;case"ext-session-msg:update":this.handleAssembledMessageUpdate(e);break}})}catch(n){A.DyFM_Log.error(`CCAP_OcSession_DS | socket event error | event: ${t}`,n)}}handleStatusUpdate(s){let t=s.sessionId??"",e=s.status??"",n=s.statusMessage;this.lastStatusUpdate_$.set({sessionId:t,status:e,statusMessage:n});let i=this.sessions_$().map(r=>r.sessionId===t?C(I({},r),{status:e,statusMessage:n}):r);this.sessions_$.set(i);let a=this.selectedSession_$();if(a?.session.sessionId===t){let r=e==="running"||e==="waiting-input";this.selectedSession_$.set(C(I({},a),{session:C(I({},a.session),{status:e,statusMessage:n}),runtime:C(I({},a.runtime),{isLive:r,runtimeStatus:e})}))}if(e==="errored"){let r=n?`OC Session error (${t}): ${n}`:`OC Session error (${t}): session entered errored state`;this.globalError_CS.showError(new Error(r),"oc-session-status")}}handleOutputChunk(s){let t=s.sessionId??"";if(t&&t!==this.activeSessionId_$())return;let e=s.content??"",n=s.type??"response";e&&this.pushConsoleMessage({type:n==="error"?"error":"assistant",text:e})}handleSessionEvent(s){let t=s.sessionId??"";if(t&&t!==this.activeSessionId_$())return;let e=s.event??{},n={sessionId:t,eventType:e.eventType??"",timestamp:e.timestamp??"",data:e.data??{},sequence:e.sequence??0};if(n.sequence<=this.lastKnownEventSequence)return;this.lastKnownEventSequence=n.sequence;let o=this.selectedSessionEvents_$();this.selectedSessionEvents_$.set([...o,n]),this.pushConsoleMessageFromEvent(n)}handleListUpdate(s){this.loadSessions().catch(()=>{})}extractTextFromContentBlock(s){let t=s.content;return typeof t=="string"?t:Array.isArray(t)?t.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
|
|
7
7
|
`):typeof s.text=="string"?s.text:JSON.stringify(s,null,2)}extractTextFromMessage(s){let t=s.content;return typeof t=="string"?t:Array.isArray(t)?t.map(e=>typeof e.text=="string"?e.text:JSON.stringify(e,null,2)).join(`
|
|
8
8
|
`):JSON.stringify(s,null,2)}pushConsoleMessageFromEvent(s){let t=s.data;switch(s.eventType){case"response-chunk":{let e=typeof t.content=="string"?t.content:"";e&&this.pushConsoleMessage({type:"assistant",text:e});break}case"response-complete":{let e=t.usage;if(e&&typeof e=="object"){let n=e,o=this.sessionUsage_$();this.sessionUsage_$.set({inputTokens:o.inputTokens+(typeof n.inputTokens=="number"?n.inputTokens:0),outputTokens:o.outputTokens+(typeof n.outputTokens=="number"?n.outputTokens:0),costUsd:o.costUsd+(typeof n.costUsd=="number"?n.costUsd:0)})}break}case"tool-call-start":{let e=typeof t.name=="string"?t.name:"unknown",n=t.input,o=n?this.summarizeToolInput(n):"",i=o?`${e}: ${o}`:e;this.pushConsoleMessage({type:"tool",text:i,rawData:t});break}case"tool-call-end":{let e=t.content??t.output,n=typeof e=="string"?e:JSON.stringify(e??{});this.pushConsoleMessage({type:"tool-result",text:n.length>200?n.substring(0,200)+"\u2026":n,expandableContent:n.length>200?n:void 0,rawData:t});break}case"error":{let e=t.message??t.content;typeof e=="string"&&e&&this.pushConsoleMessage({type:"error",text:e});break}case"connection-change":{let e=typeof t.state=="string"?t.state:"";e&&this.pushConsoleMessage({type:"info",text:`Gateway connection: ${e}`,rawData:t});break}default:break}}summarizeToolInput(s){if(typeof s=="string")return s.length>80?s.substring(0,80)+"\u2026":s;if(typeof s=="object"&&s!==null){let t=JSON.stringify(s);return t.length>80?t.substring(0,80)+"\u2026":t}return""}static extractGatewayChatMessageTimestamp(s){return w.extractTimestamp(s,w.GATEWAY_CHAT_MESSAGE_TIMESTAMP_FIELD_NAMES)??""}loadAssembledMessages(s){return d(this,null,function*(){try{let t=yield this.extSessionMsg_AS.getMessages({sessionId:s.sessionId,latest:!0});this.assembledMessages_$.set(t.messages),this.assembledMessagesHasMore_$.set(t.hasMore===!0)}catch(t){A.DyFM_Log.error(`CCAP_OcSession_DS | loadAssembledMessages failed | sessionId: ${s.sessionId}`,t)}})}loadOlderAssembledMessages(s){return d(this,null,function*(){if(this.isLoadingOlderMessages_$()||!this.assembledMessagesHasMore_$())return;let t=this.assembledMessages_$();if(!t.length)return;let e=t.reduce((n,o)=>(o.sequence??0)<n?o.sequence??0:n,t[0].sequence??0);this.isLoadingOlderMessages_$.set(!0);try{let n=yield this.extSessionMsg_AS.getMessages({sessionId:s.sessionId,beforeSequence:e,limit:s.limit??50});n.messages.length&&this.assembledMessages_$.set([...n.messages,...t]),this.assembledMessagesHasMore_$.set(n.hasMore===!0)}catch(n){A.DyFM_Log.error(`CCAP_OcSession_DS | loadOlderAssembledMessages failed | sessionId: ${s.sessionId}`,n)}finally{this.isLoadingOlderMessages_$.set(!1)}})}handleAssembledMessage(s){let t=typeof s.sessionId=="string"?s.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let e=s.message;if(!e||typeof e!="object")return;let n=e,o=this.assembledMessages_$();this.assembledMessages_$.set([...o,n])}handleAssembledMessageUpdate(s){let t=typeof s.sessionId=="string"?s.sessionId:"";if(!t||t!==this.activeSessionId_$())return;let e=typeof s.messageKey=="string"?s.messageKey:"";if(!e)return;let n=s.update;if(!n||typeof n!="object")return;let o=n,i=this.assembledMessages_$(),a=i.findIndex(S=>S.messageKey===e);if(a<0)return;let r=I({},i[a]);typeof o.bodyText=="string"&&(r.bodyText=o.bodyText),o.toolResult!==void 0&&(r.toolResult=o.toolResult),typeof o.toolStatus=="string"&&(r.toolStatus=o.toolStatus),o.headerStatusDot!==void 0&&(r.headerStatusDot=typeof o.headerStatusDot=="string"?o.headerStatusDot:void 0);let p=[...i];p[a]=r,this.assembledMessages_$.set(p)}static \u0275fac=function(t){return new(t||l)};static \u0275prov=v({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();export{w as a,ls as b};
|
|
9
|
-
//# sourceMappingURL=chunk-
|
|
9
|
+
//# sourceMappingURL=chunk-RL5LPTPO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as S}from"./chunk-B25EGDHU.js";import{C as o,aa as l,hb as s,k as a,y as c}from"./chunk-TBMJSIBB.js";var n="pei:selectedCcapId",$=(()=>{class i{instanceRegistry_DS=o(S);selectedCcapId_$=l("");activeCcapId_$=s(()=>{let e=this.selectedCcapId_$();return e||(this.instanceRegistry_DS.current_$()?.instanceKey??"")});isLocalSelected_$=s(()=>{let e=this.instanceRegistry_DS.current_$()?.instanceKey??"",t=this.activeCcapId_$();return!t||!e||t===e});instanceList_$=s(()=>this.instanceRegistry_DS.list_$());localInstanceKey_$=s(()=>this.instanceRegistry_DS.current_$()?.instanceKey??"");initializePromise=null;ensureInitialized(){return this.initializePromise||(this.initializePromise=this.initialize()),this.initializePromise}initialize(){return a(this,null,function*(){!this.instanceRegistry_DS.current_$()&&!this.instanceRegistry_DS.currentLoading_$()&&(yield this.instanceRegistry_DS.loadCurrent()),!this.instanceRegistry_DS.list_$().length&&!this.instanceRegistry_DS.listLoading_$()&&(yield this.instanceRegistry_DS.loadList()),this.restoreFromSessionStorage(),this.validateRestoredSelection()})}selectInstance(e){this.selectedCcapId_$.set(e),this.persistToSessionStorage(e)}restoreFromSessionStorage(){try{let e=sessionStorage.getItem(n);e&&this.selectedCcapId_$.set(e)}catch{}}validateRestoredSelection(){let e=this.selectedCcapId_$();if(!e)return;let t=this.instanceRegistry_DS.current_$()?.instanceKey??"";if(t&&e===t)return;let r=this.instanceRegistry_DS.list_$();r.length&&r.some(_=>_.instanceKey===e)||t&&(this.selectedCcapId_$.set(""),this.clearSessionStorage())}persistToSessionStorage(e){try{sessionStorage.setItem(n,e)}catch{}}clearSessionStorage(){try{sessionStorage.removeItem(n)}catch{}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=c({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{$ as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SDVXPGB7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{f as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{f as l}from"./chunk-4LCJ4GNK.js";import{N as p}from"./chunk-Y6V4NGLU.js";import{C as i,aa as n,k as o,y as c}from"./chunk-TBMJSIBB.js";var d=(()=>{class a{settingsGeneral_DS=i(p);pm_AS=i(l);workspacePathPickerOptions_$=n([]);refreshWorkspacePathPickerOptions(){return o(this,null,function*(){yield this.settingsGeneral_DS.loadDefaultWorkspacePath();let t=this.settingsGeneral_DS.defaultWorkspacePath_$().trim(),e=[];t&&e.push({label:"Default Workspace",path:t}),this.workspacePathPickerOptions_$.set(e);try{let f=(yield this.pm_AS.listProjects()).projects.filter(s=>!!s.localPath&&!!s.isActive).map(s=>({label:s.name||"Unnamed Project",path:s.localPath??""})),r=[];t&&r.push({label:"Default Workspace",path:t}),r.push(...f),this.workspacePathPickerOptions_$.set(r)}catch{}})}resolveInitialWorkspacePath(t){let e=this.settingsGeneral_DS.defaultWorkspacePath_$().trim();return t.lastWorkspacePath.trim()||e}static \u0275fac=function(e){return new(e||a)};static \u0275prov=c({token:a,factory:a.\u0275fac,providedIn:"root"})}return a})();export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TNLHQRL7.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as ks}from"./chunk-
|
|
1
|
+
import{j as ks}from"./chunk-PVSQ5ZEZ.js";import{I as $,N as Es,a as _s,b as ys,c as gs,d as ur,e as gt,f as ms,g as lr,i as hr,l as bs,n as dr,p as fr}from"./chunk-Y6V4NGLU.js";import{C as oe,H as _t,O as fs,P as De,a as as,aa as z,e as cr,f,g as ar,h as us,hb as ps,i as K,ib as yt,jb as Fe,k as u,l as ls,m as hs,w as pt,y as ds}from"./chunk-TBMJSIBB.js";var qe=f(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.DyFM_SocketEvent_Key=void 0;var vs=function(s){return s.incomingNewConnection="connection",s.outgoingNewConnection="connect",s.subscribe="subscribe",s.subscriptionSuccessful="subscriptionSuccessful",s.unsubscribe="unsubscribe",s.unsubscribeSuccessful="unsubscribeSuccessful",s.disconnect="disconnect",s.ping="ping",s.event="event",s.error="error",s}(vs||(Me.DyFM_SocketEvent_Key=vs={}))});var Ss=f(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.DyFM_SocketClient_Params=void 0;var yr=ur(),gr=gt(),bt=class{name;service;address;port;reconnectDelay=yr.second*30;reconnect=!0;socketOptions;constructor(e){Object.assign(this,e),this.reconnect=!!this.reconnectDelay,(this.socketOptions?.autoConnect||this.socketOptions?.reconnection||this.socketOptions?.reconnectionDelay)&&(gr.DyFM_Log.warn("autoConnect or reconnection is set to true in socketOptions, so reconnect is set to false",`
|
|
2
2
|
This means that the reconnection will use the socket.io reconnection logic, `,"not the Dynamo implementations."),this.reconnect=!1)}};xe.DyFM_SocketClient_Params=bt});var kt=f(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.DyFM_SocketEvent=void 0;var Ie=gs(),ws=ms(),Ee=gt(),mr=hr(),br=bs(),ke=qe(),Et=class{name;eventKey;serviceName;preProcesses;tasks;logEvent;logEventContent;stackLocation;constructor(e){try{this.name=e.name??e.eventKey,this.eventKey=e.eventKey,this.serviceName=e.serviceName??"UnknownSocketService",this.preProcesses=e.preProcesses??[],this.tasks=e.tasks??[],this.stackLocation=(0,mr.DyFM_getConstructionStackLocation)(),e.logEvent!==void 0?this.logEvent=e.logEvent:this.eventKey===ke.DyFM_SocketEvent_Key.subscribe?this.logEvent=!1:[ke.DyFM_SocketEvent_Key.incomingNewConnection,ke.DyFM_SocketEvent_Key.outgoingNewConnection,ke.DyFM_SocketEvent_Key.disconnect].includes(this.eventKey)?this.logEvent=Ie.DyFM_global_settings.log_settings.socket_allEvents||Ie.DyFM_global_settings.log_settings.socket_mainEvents:this.logEvent=Ie.DyFM_global_settings.log_settings.socket_allEvents,this.logEventContent=e.logEventContent??Ie.DyFM_global_settings.log_settings.socket_eventContent}catch(t){throw Ee.DyFM_Log.error(`
|
|
3
3
|
Socket Event params setup failed (${this.serviceName}): ${e.eventKey}`,t),t}}getPreLog(e){return u(this,null,function*(){try{this.logEventContent&&this.eventKey!==ke.DyFM_SocketEvent_Key.incomingNewConnection?Ee.DyFM_Log.log(`---> incoming socket(${this.serviceName}) event: ${this.eventKey};
|
|
4
4
|
|
|
@@ -8,4 +8,4 @@ socket-client(${this.params?.name}) Service setup finished`),yield this.connectS
|
|
|
8
8
|
Fn:. setupDefaultEvents`),this.defaultEvents.forEach(e=>{e.serviceName=this.params.name;let t=this.incomingEvents.find(n=>n.eventKey===e.eventKey);t?t.tasks.unshift(...e.tasks):this.incomingEvents.push(e)})}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Setup Default Events failed, ERROR:`,e),e}})}setupSocketEvents(){return u(this,null,function*(){try{this.debugLog&&console.log(`Setup socket-client(${this.params.name}) Events...`),yield Lo.DyFM_Array.asyncForEach(this.incomingEvents,e=>u(this,null,function*(){e.serviceName=this.params.name,this.socket.on(e.eventKey,t=>u(this,null,function*(){try{yield e.executeEventTasks(t,this.params.service)}catch(n){k.DyFM_Log.error(`socket-client(${this.params.name}) Event failed, ERROR:`,n),yield this.emitEvent(X.DyFM_SocketEvent_Key.error,n)}}))}))}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Setup Socket Events failed, ERROR:`,e),e}})}connectSocket(){return u(this,null,function*(){try{k.DyFM_Log.info(`< .. > socket-client(${this.params.name}) connecting to ${this.params.address}:${this.params.port} ...`),this.socket.connect(),this.params.reconnect&&(yield this.tryReconnectIfNeeded())}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Connect Socket failed, ERROR:`,e),e}})}tryingToReconnect=!1;tryReconnectIfNeeded(){return u(this,null,function*(){try{if(console.log("tryReconnectIfNeeded",this._params.reconnectDelay),this.tryingToReconnect){k.DyFM_Log.warn(`socket-client(${this.params.name}) already trying to reconnect!`);return}if(!this.params.reconnect){k.DyFM_Log.warn(`socket-client(${this.params.name}) Dynamo reconnection is disabled!`);return}this.tryingToReconnect=!0,this.logFn&&console.log(`
|
|
9
9
|
Fn:. tryReconnectIfNeeded`),yield vn.DyFM_Async.delay(this._params.reconnectDelay),this.connected||(this.tryingToReconnect=!1,yield this.connectSocket())}catch(e){throw k.DyFM_Log.error(`socket-client(${this.params.name}) Service Try Reconnect failed, ERROR:`,e),this.tryingToReconnect=!1,e}})}reconnect(){this.tryingToReconnect=!1,this.socket&&this.socket.disconnect(),this.connectSocket()}};lt.DyFM_SocketClient_ServiceBase=os});var wn=f(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});var ht=(ys(),K(_s));ht.__exportStar(qe(),be);ht.__exportStar(Ss(),be);ht.__exportStar(kt(),be);ht.__exportStar(Sn(),be)});function pr(s,e){!e?.injector&&_t(pr);let t=e?.injector??oe(fs),n=new hs(1),r=Fe(()=>{let i;try{i=s()}catch(o){yt(()=>n.error(o));return}yt(()=>n.next(i))},{injector:t,manualCleanup:!0});return t.get(De).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}function mt(s,e){let t=!e?.manualCleanup;t&&!e?.injector&&_t(mt);let n=t?e?.injector?.get(De)??oe(De):null,r=_r(e?.equal),i;e?.requireSync?i=z({kind:0},{equal:r}):i=z({kind:1,value:e?.initialValue},{equal:r});let o=s.subscribe({next:c=>i.set({kind:1,value:c}),error:c=>{if(e?.rejectErrors)throw c;i.set({kind:2,error:c})}});if(e?.requireSync&&i().kind===0)throw new pt(601,!1);return n?.onDestroy(o.unsubscribe.bind(o)),ps(()=>{let c=i();switch(c.kind){case 1:return c.value;case 2:throw c.error;case 0:throw new pt(601,!1)}},{equal:e?.equal})}function _r(s=Object.is){return(e,t)=>e.kind===1&&t.kind===1&&s(e.value,t.value)}var C=us(fr()),d=us(wn());var j=function(s){return s.connecting="connecting",s.connected="connected",s.error="error",s}(j||{});function dt(){if($.socketUrl!==void 0&&$.socketUrl.trim()!=="")return $.socketUrl.trim();if(typeof window<"u"){let s=new URL(window.location.href).origin;return C.DyFM_Log.warn("CCAP_Socket | socketUrl not set, using same-origin fallback:",s),s}return""}function U(s){return s!=null&&typeof s=="object"&&!(s instanceof Error)}function Cn(){return typeof globalThis>"u"?!1:globalThis.jasmine!==void 0}var Tn="answer",On="notify-user",Rn="agent-events",Pn="context:updated",An="monitoring:event",Nn="user-notification",Dn="cc-session:status",Fn="cc-session:output",Mn="cc-session:event",qn="cc-session:list-update",xn="cc-session:session-update",In="ca-session:status",jn="ca-session:output",Ln="ca-session:event",Bn="ca-session:list-update",Un="ext-session-msg:message",Kn="ext-session-msg:update",$n="user-interaction:request",Vn="instance-data:session-status-updated",Wn="instance:presence-update",Hn="openclaw-instance-data:status-updated",Yn="cci-instance-data:status-updated",Xn="cai-instance-data:status-updated",Jn="terminal:list:result",zn="terminal:start:result",Gn="terminal:command-result",Qn="terminal:command-output",Zn="cc:rate-limit-update",er="cc:account-usage-update",tr="cc:account-list-update",sr="session-queue:updated",nr="session-queue:lock-changed",Uo="system-error",Ko="terminal-error",$o="server:start-id",Vo="connect_error",Wo=8*C.second,Yc=(()=>{class s extends d.DyFM_SocketClient_ServiceBase{status_$=z(j.connecting);lastError_$=z(null);connectAttemptCount_$=z(0);hasEverConnected=!1;connectionTimeoutId=null;knownServerStartId=null;eventSubject_S=new ls;event$=this.eventSubject_S.asObservable();connected_$=mt(this.connected$,{initialValue:!1});get socketAddress(){return dt()||(this.params?.address??"")}globalError_CS=oe(ks);settingsGeneral_DS=oe(Es);constructor(){super(),Cn()||this.startConnectionTimeout(),Fe(()=>{this.connected&&!this.subscribed&&this.subscribe()})}startConnectionTimeout(){this.clearConnectionTimeout(),this.connectionTimeoutId=setTimeout(()=>{if(this.connectionTimeoutId=null,this.status_$()===j.connecting){let t=new Error("Socket connection timeout \u2013 server unreachable or setup failed. Click to reconnect.");this.status_$.set(j.error),this.lastError_$.set(t),C.DyFM_Log.warn("CCAP_Socket | Connection timeout")}},Wo)}clearConnectionTimeout(){this.connectionTimeoutId!==null&&(clearTimeout(this.connectionTimeoutId),this.connectionTimeoutId=null)}getParams(){let t=dt(),n=Cn(),r={path:"/socket",transports:["polling","websocket"],reconnectionDelay:1e3};return n&&(r.reconnection=!1),new d.DyFM_SocketClient_Params({name:"CCAP Client",address:t,reconnect:!n,reconnectDelay:C.minute,socketOptions:r})}getIncomingEvents(){let t=this,n=(r,i)=>{try{let o=U(i)?i:{};if(!t.eventSubject_S){let c=`Socket event dropped: eventSubject not initialized | event: ${r} | This means the socket event system is not functional \u2014 no live updates will arrive.`;C.DyFM_Log.error(`[CCAP_Socket] ${c}`),t.globalError_CS.showError(new Error(c),"client-socket-event-subject");return}t.eventSubject_S.next({event:r,payload:o})}catch(o){let c=o instanceof Error?o.message:String(o);C.DyFM_Log.error(`[CCAP_Socket] pushEnvelope failed | event: ${r} | ${c}`),t.globalError_CS.showError(o instanceof Error?o:new Error(`Socket event processing failed: ${r} \u2014 ${c}`),"client-socket-push-envelope")}};return[new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.outgoingNewConnection,tasks:[()=>u(this,null,function*(){t.clearConnectionTimeout(),t.hasEverConnected=!0,t.status_$.set(j.connected),t.lastError_$.set(null),t.connectAttemptCount_$.set(0),C.DyFM_Log.info("CCAP_Socket | Connected")})]}),new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.disconnect,tasks:[()=>u(this,null,function*(){t.hasEverConnected&&t.status_$.set(j.error),C.DyFM_Log.info("CCAP_Socket | Disconnected")})]}),new d.DyFM_SocketEvent({eventKey:Vo,tasks:[r=>u(this,null,function*(){t.clearConnectionTimeout(),t.connectAttemptCount_$.update(a=>a+1);let i=r instanceof Error?r:new Error(String(r)),o=U(r)?r.description:void 0,c=U(r)?r.type:void 0;C.DyFM_Log.info("CCAP_Socket | connect_error",`attempt #${t.connectAttemptCount_$()}`,i?.message??String(r),o!==void 0?String(o):"",c!==void 0?String(c):""),t.status_$.set(j.error);let h=t.params?.address??"",_=t.buildSocketErrorDisplay({err:i,socketUrl:h,eventType:"connect_error",raw:r});t.lastError_$.set(_),t.shouldReportSocketConnectionErrorsToErrorList()&&t.globalError_CS.reportErrorOnly({message:String(_.fullMessage??_.message??i.message),stack:typeof _.stack=="string"?_.stack:void 0,source:"client-socket"})})]}),new d.DyFM_SocketEvent({eventKey:d.DyFM_SocketEvent_Key.error,tasks:[r=>u(this,null,function*(){t.clearConnectionTimeout(),t.status_$.set(j.error);let i=r instanceof Error?r:new Error(String(r)),o=t.params?.address??"",c=t.buildSocketErrorDisplay({err:i,socketUrl:o,eventType:"error",raw:r});t.lastError_$.set(c),t.shouldReportSocketConnectionErrorsToErrorList()&&t.globalError_CS.reportErrorOnly({message:String(c.fullMessage??c.message??i.message),stack:typeof c.stack=="string"?c.stack:void 0,source:"client-socket"})})]}),new d.DyFM_SocketEvent({eventKey:Tn,tasks:[r=>u(this,null,function*(){n(Tn,r)})]}),new d.DyFM_SocketEvent({eventKey:On,tasks:[r=>u(this,null,function*(){n(On,r)})]}),new d.DyFM_SocketEvent({eventKey:Rn,tasks:[r=>u(this,null,function*(){n(Rn,r)})]}),new d.DyFM_SocketEvent({eventKey:Pn,tasks:[r=>u(this,null,function*(){n(Pn,r)})]}),new d.DyFM_SocketEvent({eventKey:An,tasks:[r=>u(this,null,function*(){n(An,r)})]}),new d.DyFM_SocketEvent({eventKey:Nn,tasks:[r=>u(this,null,function*(){let i=U(r)?r:{};if(n(Nn,r),i.type===Uo){let o=t.buildServerErrorDisplay(i);t.globalError_CS.showError(o,"client-socket")}else if(i.type===Ko){let o=t.buildTerminalErrorDisplay(i);t.globalError_CS.showError(o,"client-socket")}})]}),new d.DyFM_SocketEvent({eventKey:$o,tasks:[r=>u(this,null,function*(){let i=U(r)?r:{},o=typeof i.serverStartId=="number"?i.serverStartId:void 0;o!==void 0&&(t.knownServerStartId===null?(t.knownServerStartId=o,C.DyFM_Log.info("CCAP_Socket | Server start ID stored:",o)):t.knownServerStartId!==o&&(C.DyFM_Log.warn("CCAP_Socket | Server restarted (start ID changed), reloading page"),window.location.reload()))})]}),new d.DyFM_SocketEvent({eventKey:Dn,tasks:[r=>u(this,null,function*(){n(Dn,r)})]}),new d.DyFM_SocketEvent({eventKey:Fn,tasks:[r=>u(this,null,function*(){n(Fn,r)})]}),new d.DyFM_SocketEvent({eventKey:Mn,tasks:[r=>u(this,null,function*(){n(Mn,r)})]}),new d.DyFM_SocketEvent({eventKey:qn,tasks:[r=>u(this,null,function*(){n(qn,r)})]}),new d.DyFM_SocketEvent({eventKey:xn,tasks:[r=>u(this,null,function*(){n(xn,r)})]}),new d.DyFM_SocketEvent({eventKey:In,tasks:[r=>u(this,null,function*(){n(In,r)})]}),new d.DyFM_SocketEvent({eventKey:jn,tasks:[r=>u(this,null,function*(){n(jn,r)})]}),new d.DyFM_SocketEvent({eventKey:Ln,tasks:[r=>u(this,null,function*(){n(Ln,r)})]}),new d.DyFM_SocketEvent({eventKey:Bn,tasks:[r=>u(this,null,function*(){n(Bn,r)})]}),new d.DyFM_SocketEvent({eventKey:Un,tasks:[r=>u(this,null,function*(){n(Un,r)})]}),new d.DyFM_SocketEvent({eventKey:Kn,tasks:[r=>u(this,null,function*(){n(Kn,r)})]}),new d.DyFM_SocketEvent({eventKey:$n,tasks:[r=>u(this,null,function*(){n($n,r)})]}),new d.DyFM_SocketEvent({eventKey:Vn,tasks:[r=>u(this,null,function*(){n(Vn,r)})]}),new d.DyFM_SocketEvent({eventKey:Wn,tasks:[r=>u(this,null,function*(){n(Wn,r)})]}),new d.DyFM_SocketEvent({eventKey:Hn,tasks:[r=>u(this,null,function*(){n(Hn,r)})]}),new d.DyFM_SocketEvent({eventKey:Yn,tasks:[r=>u(this,null,function*(){n(Yn,r)})]}),new d.DyFM_SocketEvent({eventKey:Xn,tasks:[r=>u(this,null,function*(){n(Xn,r)})]}),new d.DyFM_SocketEvent({eventKey:Jn,tasks:[r=>u(this,null,function*(){n(Jn,r)})]}),new d.DyFM_SocketEvent({eventKey:zn,tasks:[r=>u(this,null,function*(){n(zn,r)})]}),new d.DyFM_SocketEvent({eventKey:Gn,tasks:[r=>u(this,null,function*(){n(Gn,r)})]}),new d.DyFM_SocketEvent({eventKey:Qn,tasks:[r=>u(this,null,function*(){n(Qn,r)})]}),new d.DyFM_SocketEvent({eventKey:sr,tasks:[r=>u(this,null,function*(){n(sr,r)})]}),new d.DyFM_SocketEvent({eventKey:nr,tasks:[r=>u(this,null,function*(){n(nr,r)})]}),new d.DyFM_SocketEvent({eventKey:Zn,tasks:[r=>u(this,null,function*(){n(Zn,r)})]}),new d.DyFM_SocketEvent({eventKey:er,tasks:[r=>u(this,null,function*(){n(er,r)})]}),new d.DyFM_SocketEvent({eventKey:tr,tasks:[r=>u(this,null,function*(){n(tr,r)})]})]}getSubscriptionContent(){return u(this,null,function*(){let t=this.socket?.id;return Promise.resolve({clientId:t})})}shouldReportSocketConnectionErrorsToErrorList(){return this.settingsGeneral_DS.section_$().form.reportSocketConnectionErrorsToErrorList===!0}buildSocketErrorDisplay(t){let n=t.err.message?.trim()?t.err.message:"WebSocket connection failed",r=t.socketUrl.trim()?`WebSocket: ${n} \u2014 ${t.socketUrl}`:`WebSocket: ${n}`,i={message:r,fullMessage:r,name:t.err.name,stack:t.err.stack??null,socketUrl:t.socketUrl,transport:"websocket",eventType:t.eventType,attemptedAt:new Date().toISOString(),connectAttempt:this.connectAttemptCount_$()},o=$.socketUrl!==void 0&&$.socketUrl.trim()!=="";i.socketUrlSource=o?"environment.socketUrl":"same-origin fallback";let c=this.params?.socketOptions?.transports??[];if(c.length>0&&(i.configuredTransports=c.join(", ")),typeof window<"u"&&(i.pageOrigin=window.location.origin),U(t.raw)){let _=t.raw,a=_.description;if(typeof a=="string"&&a.trim())i.description=a.trim();else if(a instanceof Error)i.description=a.message,a.stack&&(i.descriptionStack=a.stack);else if(a instanceof Event)i.description=this.extractDomEventInfo(a);else if(U(a)){let l=a,y=[];typeof l.message=="string"&&l.message.trim()&&y.push(l.message.trim()),typeof l.status=="number"&&(i.httpStatus=l.status,y.push(`HTTP ${l.status}`)),typeof l.statusText=="string"&&l.statusText.trim()&&(i.httpStatusText=l.statusText.trim(),y.push(l.statusText.trim())),typeof l.responseURL=="string"&&l.responseURL.trim()&&(i.responseUrl=l.responseURL.trim()),y.length>0&&(i.description=y.join(" \u2013 "))}typeof _.type=="string"&&_.type.trim()&&(i.type=_.type.trim()),U(_.context)&&(i.errorContext=_.context)}t.raw instanceof Event&&!i.description&&(i.description=this.extractDomEventInfo(t.raw));let h=[r];if(typeof i.description=="string"&&h.push(`Cause: ${i.description}`),typeof i.httpStatus=="number"){let _=typeof i.httpStatusText=="string"?` ${i.httpStatusText}`:"";h.push(`HTTP: ${i.httpStatus}${_}`)}return typeof i.responseUrl=="string"&&h.push(`Response URL: ${i.responseUrl}`),h.push(`Attempt: #${i.connectAttempt}`),h.push(`Source: ${i.socketUrlSource}`),i.fullMessage=h.join(" | "),i}extractDomEventInfo(t){let n=[];n.push(`type=${t.type}`);let r=t.target;return U(r)&&(typeof r.readyState=="number"&&n.push(`readyState=${r.readyState}`),typeof r.url=="string"&&r.url&&n.push(`url=${r.url}`),typeof r.responseURL=="string"&&r.responseURL&&n.push(`responseURL=${r.responseURL}`),typeof r.status=="number"&&n.push(`status=${r.status}`)),n.push("(DOM Event - tipikusan SSL cert reject, CORS, vagy network unreachable)"),n.join(", ")}buildTerminalErrorDisplay(t){let n=typeof t.message=="string"?t.message:String(t.message??""),r=typeof t.code=="string"?t.code:String(t.code??""),i=[n];r&&i.push(`K\xF3d: ${r}`),typeof t.terminalId=="string"&&t.terminalId.trim()&&i.push(`Termin\xE1l ID: ${t.terminalId.trim()}`),typeof t.path=="string"&&t.path.trim()&&i.push(`Path: ${t.path.trim()}`);let o=i.join(`
|
|
10
10
|
`),c=typeof t.timestamp=="number"?t.timestamp:Date.now();return{source:"server",message:n,stack:null,detailsText:o,timestamp:c}}buildServerErrorDisplay(t){let n=typeof t.message=="string"?t.message:String(t.message??""),r=t.stack,i=typeof r=="string"?r:r!=null?String(r):null,o=typeof t.detailsText=="string"?t.detailsText:JSON.stringify(t,null,2),c=typeof t.timestamp=="number"?t.timestamp:Date.now();return{source:"server",message:n,stack:i,detailsText:o,timestamp:c}}reconnect(){if(this.socket){this.clearConnectionTimeout(),this.status_$.set(j.connecting),this.lastError_$.set(null),this.connectAttemptCount_$.set(0),this.startConnectionTimeout();let t=this.params?.address??dt();C.DyFM_Log.info("CCAP_Socket | Reconnecting to",t),this.socket.disconnect(),this.socket.connect()}}emit(t,n){this.socket?.connected&&this.socket.emit(t,n)}diagnoseConnection(){return u(this,null,function*(){let t=this.params?.address??dt(),n={timestamp:new Date().toISOString(),socketUrl:t,socketUrlSource:$.socketUrl!==void 0&&$.socketUrl.trim()!==""?"environment.socketUrl":"same-origin fallback",pageOrigin:typeof window<"u"?window.location.origin:"",socketConnected:this.socket?.connected??!1,socketId:this.socket?.id??null,connectAttemptCount:this.connectAttemptCount_$(),currentStatus:this.status_$()},r=yield s.probeEndpoint("/api/server/status","serverStatusApi");if(n.serverStatusApi=r,r.ok===!0&&r.body!==void 0){let _=r.body;if(_!==null&&typeof _=="object"){let a=_;n.serverReportedHttpPort=a.httpPort??null,n.serverReportedSocketPort=a.socketPort??null}}let i=this.params?.socketOptions?.path??"/socket",o=`${t}${i}/?EIO=4&transport=polling&t=${Date.now()}`,c=yield s.probeEndpoint(o,"socketIoPolling");n.socketIoPolling=c;let h=n.serverReportedSocketPort;if(typeof h=="number"&&h>0){let _=`http://localhost:${h}${i}/?EIO=4&transport=polling&t=${Date.now()}`,a=yield s.probeEndpoint(_,"socketIoDirectPort");n.socketIoDirectPort=a}return n})}static probeEndpoint(t,n){return u(this,null,function*(){let r={url:t,label:n},i=performance.now();try{let o=yield fetch(t,{method:"GET",cache:"no-store"}),c=Math.round(performance.now()-i);r.ok=o.ok,r.httpStatus=o.status,r.httpStatusText=o.statusText,r.elapsedMs=c;try{let h=yield o.text();try{r.body=JSON.parse(h)}catch{r.bodyPreview=h.substring(0,300)}}catch{r.bodyReadError="Failed to read response body"}}catch(o){let c=Math.round(performance.now()-i);r.elapsedMs=c,r.ok=!1,r.fetchError=o instanceof Error?o.message:String(o),o instanceof TypeError&&(r.fetchErrorType="TypeError (network/CORS/SSL)")}return r})}ngOnDestroy(){this.clearConnectionTimeout(),this.socket&&this.socket.disconnect()}static \u0275fac=function(n){return new(n||s)};static \u0275prov=ds({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();export{pr as a,mt as b,wn as c,j as d,Yc as e};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-TWK7BOB7.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as Y}from"./chunk-
|
|
1
|
+
import{b as Y}from"./chunk-IUAZJ3PT.js";import{a as ee}from"./chunk-IFYHOOVA.js";import{a as X}from"./chunk-FLAJXIYW.js";import{b as G,c as k,f as V,i as W,n as A,o as U,p as B,v as R}from"./chunk-EO4DNTT4.js";import{d as J,i as Q}from"./chunk-4LCJ4GNK.js";import{a as F}from"./chunk-5UPNU54P.js";import{c as q}from"./chunk-PVSQ5ZEZ.js";import{C as f}from"./chunk-Y6V4NGLU.js";import{C as E,D as v,Fa as d,Ga as y,Ha as $,I as K,J as m,K as g,Q as j,T as O,Ta as z,U as C,Z as s,aa as c,da as M,fa as H,ga as _,hb as L,jb as N,k as b,la as x,na as I,oa as T,pa as P,qa as r,ra as o,ua as S,ub as D,va as p,wa as u,wb as Z}from"./chunk-TBMJSIBB.js";var te="ccap-pm-user-input-wizard-draft:",w=class a{static storageKey(l,e){let i=`${te}${l}`,t=e?.trim();return t!==void 0&&t.length>0?`${i}:qi:${t}`:i}static load(l,e){let i=a.storageKey(l,e),t=F.readJson(i,null);if(!a.isDraftShape(t))return null;let n=t;return typeof n.previewMarkdown!="string"&&(n.previewMarkdown=""),n}static save(l,e,i){let t=a.storageKey(l,i),n={rawText:e.rawText,refinementDraft:e.refinementDraft,wizardStep:e.wizardStep,suggestionJson:e.suggestionJson,previewMarkdown:e.previewMarkdown,updatedAt:e.updatedAt};F.writeJson(t,n)}static clear(l,e){let i=a.storageKey(l,e);F.remove(i)}static isDraftShape(l){if(typeof l!="object"||l===null||Array.isArray(l))return!1;let e=Reflect.get(l,"previewMarkdown"),i=typeof e=="string"||e===void 0,t=Reflect.get(l,"suggestionJson");return typeof Reflect.get(l,"rawText")=="string"&&typeof Reflect.get(l,"refinementDraft")=="string"&&typeof Reflect.get(l,"wizardStep")=="number"&&(t===null||typeof t=="string")&&i&&typeof Reflect.get(l,"updatedAt")=="string"}};function re(a,l){if(a&1){let e=S();r(0,"div",0)(1,"h3",11),d(2,"New USER-INPUT (wizard)"),o(),r(3,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(4," Clear draft "),o()()}}function oe(a,l){if(a&1){let e=S();r(0,"div",1)(1,"button",12),p("click",function(){m(e);let t=u();return g(t.handleDiscardDraft())}),d(2," Clear draft "),o()()}}function ae(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.suggestErrorText_$()," ")}}function se(a,l){if(a&1&&(r(0,"div",3),d(1),o()),a&2){let e=u();s(),$(" ",e.finalizeErrorText_$()," ")}}function de(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM system prompt (last suggest / refine)"),o(),r(3,"pre",14),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmSystemPrompt_$())}}function le(a,l){if(a&1&&(r(0,"div",4)(1,"span",13),d(2,"LLM user message (last suggest / refine)"),o(),r(3,"pre",15),d(4),o()()),a&2){let e=u();s(4),y(e.pm_DS.userInputWizardLastLlmUserMessage_$())}}function pe(a,l){a&1&&d(0," Formatting\u2026 ")}function _e(a,l){a&1&&d(0," Format with AI ")}function ue(a,l){if(a&1){let e=S();r(0,"div",9)(1,"button",16),p("click",function(){m(e);let t=u();return g(t.handleFormatWithAi())}),M(2,pe,1,0)(3,_e,1,0),o()()}if(a&2){let e=u();s(),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardSuggestLoading_$()?2:3)}}function ce(a,l){if(a&1&&(r(0,"option",24),d(1),o()),a&2){let e=l.$implicit;_("value",e),s(),y(e)}}function me(a,l){if(a&1){let e=S();r(0,"div",28)(1,"label",20),d(2,"Refine instruction (optional)"),o(),r(3,"textarea",30),p("ngModelChange",function(t){m(e);let n=u(2);return g(n.handleRefinementInput(t))}),d(4," "),o(),r(5,"button",31),p("click",function(){m(e);let t=u(2);return g(t.handleRefine())}),d(6," Refine with AI "),o()()}if(a&2){let e=u(2);s(3),_("ngModel",e.refinement_$()),s(2),_("disabled",e.pm_DS.userInputWizardSuggestLoading_$()||!e.refinement_$().trim())}}function ge(a,l){a&1&&d(0," Saving\u2026 ")}function he(a,l){a&1&&d(0," Finalize (USER-INPUT.md + database) ")}function fe(a,l){if(a&1){let e=S();r(0,"div",10)(1,"h4",17),d(2,"Preview (last server response)"),o(),r(3,"pre",18),d(4),o(),r(5,"div",19)(6,"div",4)(7,"label",20),d(8,"Type"),o(),r(9,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editType_$.set(t),g(n.handleEditorChange())}),o()(),r(10,"div",4)(11,"label",20),d(12,"Code"),o(),r(13,"input",22),p("ngModelChange",function(t){m(e);let n=u();return n.editCode_$.set(t),g(n.handleEditorChange())}),o()(),r(14,"div",4)(15,"label",20),d(16,"Priority"),o(),r(17,"select",23),p("ngModelChange",function(t){m(e);let n=u();return n.editPriority_$.set(t),g(n.handleEditorChange())}),T(18,ce,2,2,"option",24,I),o()(),r(20,"div",4)(21,"label",20),d(22,"Phase"),o(),r(23,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editPhase_$.set(t),g(n.handleEditorChange())}),o()(),r(24,"div",25)(25,"label",20),d(26,"Area"),o(),r(27,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editArea_$.set(t),g(n.handleEditorChange())}),o()(),r(28,"div",25)(29,"label",20),d(30,"Title (DB)"),o(),r(31,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editTitle_$.set(t),g(n.handleEditorChange())}),o()(),r(32,"div",25)(33,"label",20),d(34,"Details (one line)"),o(),r(35,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editDetails_$.set(t),g(n.handleEditorChange())}),o()(),r(36,"div",4)(37,"label",20),d(38,"E1"),o(),r(39,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE1_$.set(t),g(n.handleEditorChange())}),o()(),r(40,"div",4)(41,"label",20),d(42,"E2"),o(),r(43,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE2_$.set(t),g(n.handleEditorChange())}),o()(),r(44,"div",4)(45,"label",20),d(46,"E3"),o(),r(47,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE3_$.set(t),g(n.handleEditorChange())}),o()(),r(48,"div",4)(49,"label",20),d(50,"E4"),o(),r(51,"input",21),p("ngModelChange",function(t){m(e);let n=u();return n.editE4_$.set(t),g(n.handleEditorChange())}),o()()(),r(52,"label",26)(53,"input",27),p("ngModelChange",function(t){m(e);let n=u();return g(n.addToBacklog_$.set(t))}),o(),d(54," Also append matching line to BACKLOG.md "),o(),M(55,me,7,2,"div",28),r(56,"button",29),p("click",function(){m(e);let t=u();return g(t.handleFinalize())}),M(57,ge,1,0)(58,he,1,0),o()()}if(a&2){let e=u();s(4),y(e.previewMarkdown_$()),s(5),_("ngModel",e.editType_$()),s(4),_("ngModel",e.editCode_$()),s(4),_("ngModel",e.editPriority_$()),s(),P(e.priorities),s(5),_("ngModel",e.editPhase_$()),s(4),_("ngModel",e.editArea_$()),s(4),_("ngModel",e.editTitle_$()),s(4),_("ngModel",e.editDetails_$()),s(4),_("ngModel",e.editE1_$()),s(4),_("ngModel",e.editE2_$()),s(4),_("ngModel",e.editE3_$()),s(4),_("ngModel",e.editE4_$()),s(2),_("ngModel",e.addToBacklog_$()),s(2),x(e.skipSuggestMode?-1:55),s(),_("disabled",e.pm_DS.userInputWizardFinalizeLoading_$()||!e.rawText_$().trim()),s(),x(e.pm_DS.userInputWizardFinalizeLoading_$()?57:58)}}var xe=400,Ve=(()=>{class a{projectId="";isEmbeddedInModal=!1;wizardCompleted=new j;wizardFinalizeSuccess=new j;quickInputDraftId=null;initialRawContent="";skipSuggestMode=!1;initialStagingPriority=void 0;pm_DS=E(ee);suggestErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardSuggestError_$();return e?a.formatHttpError(e):null});finalizeErrorText_$=L(()=>{let e=this.pm_DS.userInputWizardFinalizeError_$();return e?a.formatHttpError(e):null});rawText_$=c("");refinement_$=c("");wizardStep_$=c(0);previewMarkdown_$=c("");addToBacklog_$=c(!1);editType_$=c("");editCode_$=c("");editPriority_$=c(f.medium);editArea_$=c("");editPhase_$=c("MVP1");editDetails_$=c("");editTitle_$=c("");editE1_$=c("\u274C");editE2_$=c("\u274C");editE3_$=c("\u274C");editE4_$=c("\u274C");priorities=Object.values(f);draftTimer;ngOnChanges(e){(e.projectId!==void 0&&e.projectId.currentValue||e.quickInputDraftId!==void 0||e.initialRawContent!==void 0||e.skipSuggestMode!==void 0||e.initialStagingPriority!==void 0)&&this.projectId&&this.applyWizardBootstrapFromInputs()}ngOnDestroy(){this.draftTimer!==void 0&&clearTimeout(this.draftTimer)}handleVoiceTranscript(e){let i=e?.trim()??"";i.length&&(this.rawText_$.update(t=>t?`${t}
|
|
2
2
|
${i}`:i),this.scheduleDraftSave())}handleFormatWithAi(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e});this.previewMarkdown_$.set(i.previewMarkdown),this.applySuggestionToEditors(i.suggestion),this.wizardStep_$.set(1),this.scheduleDraftSave()}catch{}})}handleRefine(){return b(this,null,function*(){let e=this.rawText_$().trim(),i=this.refinement_$().trim();if(!e.length||!i.length||!this.projectId)return;let t=this.buildSuggestionFromEditors();if(t)try{let n=yield this.pm_DS.suggestUserInputFormat(this.projectId,{rawText:e,refinementInstruction:i,previousSuggestion:t});this.previewMarkdown_$.set(n.previewMarkdown),this.applySuggestionToEditors(n.suggestion),this.scheduleDraftSave()}catch{}})}handleFinalize(){return b(this,null,function*(){let e=this.rawText_$().trim();if(!(!e.length||!this.projectId))try{let i=yield this.pm_DS.finalizeUserInputWizard(this.projectId,{rawContent:e,type:this.editType_$().trim(),code:this.editCode_$().trim(),priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0,e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),addToBacklog:this.addToBacklog_$()});w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.wizardFinalizeSuccess.emit(i),this.wizardCompleted.emit()}catch{}})}handleDiscardDraft(){this.projectId&&w.clear(this.projectId,this.quickInputDraftId),this.resetWizardState(),this.skipSuggestMode&&this.wizardStep_$.set(1)}handleRawTextInput(e){this.rawText_$.set(e),this.scheduleDraftSave()}handleRefinementInput(e){this.refinement_$.set(e),this.scheduleDraftSave()}handleEditorChange(){this.scheduleDraftSave()}resetWizardState(){this.rawText_$.set(""),this.refinement_$.set(""),this.wizardStep_$.set(0),this.previewMarkdown_$.set(""),this.addToBacklog_$.set(!1),this.editType_$.set(""),this.editCode_$.set(""),this.editPriority_$.set(f.medium),this.editArea_$.set(""),this.editPhase_$.set("MVP1"),this.editDetails_$.set(""),this.editTitle_$.set(""),this.editE1_$.set("\u274C"),this.editE2_$.set("\u274C"),this.editE3_$.set("\u274C"),this.editE4_$.set("\u274C")}applySuggestionToEditors(e){this.editType_$.set(e.type.trim()),this.editCode_$.set(e.code.trim()),this.editPriority_$.set(e.priority.trim().toLowerCase()),this.editArea_$.set(e.area?.trim()??""),this.editPhase_$.set(e.phase.trim()),this.editDetails_$.set(e.details.trim()),this.editTitle_$.set(e.title?.trim()??""),this.editE1_$.set(e.e1.trim()),this.editE2_$.set(e.e2.trim()),this.editE3_$.set(e.e3.trim()),this.editE4_$.set(e.e4.trim())}buildSuggestionFromEditors(){let e=this.editType_$().trim(),i=this.editCode_$().trim();return!e.length||!i.length?null:{type:e,code:i,priority:this.editPriority_$().trim(),phase:this.editPhase_$().trim(),details:this.editDetails_$().trim(),e1:this.editE1_$().trim(),e2:this.editE2_$().trim(),e3:this.editE3_$().trim(),e4:this.editE4_$().trim(),area:this.editArea_$().trim()||void 0,title:this.editTitle_$().trim()||void 0}}applyWizardBootstrapFromInputs(){if(!this.projectId)return;let e=w.load(this.projectId,this.quickInputDraftId);if(e){this.rawText_$.set(e.rawText),this.refinement_$.set(e.refinementDraft);let t=e.wizardStep;if(this.skipSuggestMode&&(t=t<1?1:t),this.wizardStep_$.set(t),e.suggestionJson)try{let n=JSON.parse(e.suggestionJson);a.isSuggestionShape(n)&&this.applySuggestionToEditors(n)}catch{}this.previewMarkdown_$.set(e.previewMarkdown??""),this.scheduleDraftSave();return}this.resetWizardState();let i=this.initialRawContent?.trim()??"";i.length>0&&this.rawText_$.set(i),this.skipSuggestMode&&this.wizardStep_$.set(1),this.initialStagingPriority!==void 0&&this.editPriority_$.set(this.initialStagingPriority),this.scheduleDraftSave()}static formatHttpError(e){if(e instanceof Z){let i=a.readNestedErrorString(e.error);return i||e.message}return e instanceof Error?e.message:String(e)}static readNestedErrorString(e){if(!q.isRecord(e))return null;let i=e.error;return typeof i=="string"?i:null}static isSuggestionShape(e){return q.isRecord(e)?typeof e.type=="string"&&typeof e.code=="string"&&typeof e.priority=="string"&&typeof e.phase=="string"&&typeof e.details=="string"&&typeof e.e1=="string"&&typeof e.e2=="string"&&typeof e.e3=="string"&&typeof e.e4=="string":!1}scheduleDraftSave(){this.projectId&&(this.draftTimer!==void 0&&clearTimeout(this.draftTimer),this.draftTimer=setTimeout(()=>{this.persistDraft()},xe))}persistDraft(){if(!this.projectId)return;let e=this.buildSuggestionFromEditors(),i={rawText:this.rawText_$(),refinementDraft:this.refinement_$(),wizardStep:this.wizardStep_$(),suggestionJson:e?JSON.stringify(e):null,previewMarkdown:this.previewMarkdown_$(),updatedAt:new Date().toISOString()};w.save(this.projectId,i,this.quickInputDraftId)}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-user-input-wizard"]],inputs:{projectId:"projectId",isEmbeddedInModal:"isEmbeddedInModal",quickInputDraftId:"quickInputDraftId",initialRawContent:"initialRawContent",skipSuggestMode:"skipSuggestMode",initialStagingPriority:"initialStagingPriority"},outputs:{wizardCompleted:"wizardCompleted",wizardFinalizeSuccess:"wizardFinalizeSuccess"},standalone:!0,features:[K,z],decls:17,vars:9,consts:[[1,"flex","items-center","justify-between","gap-2","flex-wrap"],[1,"flex","justify-end"],[1,"text-xs","text-neutral-500"],[1,"rounded","border","border-red-800/50","bg-red-950/30","px-3","py-2","text-xs","text-red-300","whitespace-pre-wrap"],[1,"flex","flex-col","gap-1"],[1,"relative","pt-5"],[1,"text-xs","text-neutral-400","block","mb-1"],["rows","6",1,"w-full","bg-neutral-900","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","placeholder:text-neutral-600","focus:outline-none","focus:border-ccapAccent","resize-y","min-h-[120px]",3,"ngModelChange","ngModel"],[1,"absolute","left-1/2","top-6","z-10","-translate-x-1/2","-translate-y-1/2",3,"transcriptReady"],[1,"flex","flex-wrap","gap-2"],[1,"border-t","border-neutral-700","pt-4","flex","flex-col","gap-3"],[1,"text-sm","font-semibold","text-neutral-200"],["type","button",1,"px-2","py-1","text-xs","text-neutral-500","hover:text-red-400","border","border-transparent","hover:border-red-900/50","rounded",3,"click"],[1,"text-xs","font-semibold","text-neutral-400"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-32","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"text-[11px]","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-2","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],["type","button",1,"px-4","py-2","border","border-ccapAccent","rounded","text-ccapAccent","text-sm","font-semibold","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],[1,"text-xs","font-semibold","text-neutral-400","uppercase","tracking-wide"],[1,"text-xs","text-neutral-300","bg-neutral-950/80","border","border-neutral-700","rounded","p-3","max-h-48","overflow-auto","whitespace-pre-wrap","font-mono"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"text-xs","text-neutral-400"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],["type","text",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","font-mono","text-neonCyan",3,"ngModelChange","ngModel"],[1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100",3,"ngModelChange","ngModel"],[3,"value"],[1,"flex","flex-col","gap-1","sm:col-span-2"],[1,"flex","items-center","gap-2","text-xs","text-neutral-400","cursor-pointer"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"flex","flex-col","gap-2","border","border-neutral-700","rounded","p-3","bg-neutral-900/40"],["type","button",1,"px-4","py-2","bg-ccapAccent/20","border","border-ccapAccent","text-ccapAccent","text-sm","font-semibold","rounded","hover:bg-ccapAccent","hover:text-white","transition-colors","disabled:opacity-40",3,"click","disabled"],["rows","2",1,"bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100","resize-y",3,"ngModelChange","ngModel"],["type","button",1,"self-start","px-3","py-1.5","border","border-neutral-500","rounded","text-neutral-300","text-xs","font-semibold","hover:border-ccapAccent","hover:text-ccapAccent","disabled:opacity-40",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"div"),M(1,re,5,0,"div",0)(2,oe,3,0,"div",1),r(3,"p",2),d(4," Raw text is never rewritten by the model. AI suggests metadata only. Drafts are saved in this browser (localStorage). "),o(),M(5,ae,2,1,"div",3)(6,se,2,1,"div",3)(7,de,5,1,"div",4)(8,le,5,1,"div",4),r(9,"div",5)(10,"label",6),d(11,"Raw user input"),o(),r(12,"textarea",7),p("ngModelChange",function(h){return t.handleRawTextInput(h)}),d(13," "),o(),r(14,"app-ccap-voice-record-button",8),p("transcriptReady",function(h){return t.handleVoiceTranscript(h)}),o()(),M(15,ue,4,2,"div",9)(16,fe,59,16,"div",10),o()),i&2&&(H("class","flex flex-col gap-4"+(t.isEmbeddedInModal?"":" rounded-lg bg-neutral-800/50 border border-ccapAccent/30 p-4")),s(),x(t.isEmbeddedInModal?2:1),s(4),x(t.suggestErrorText_$()?5:-1),s(),x(t.finalizeErrorText_$()?6:-1),s(),x(t.pm_DS.userInputWizardLastLlmSystemPrompt_$()?7:-1),s(),x(t.pm_DS.userInputWizardLastLlmUserMessage_$()?8:-1),s(4),_("ngModel",t.rawText_$()),s(3),x(t.skipSuggestMode?-1:15),s(),x(t.wizardStep_$()>=1||t.skipSuggestMode?16:-1))},dependencies:[D,R,U,B,k,G,A,V,W,Y],encapsulation:2})}return a})();function Ce(a,l){if(a&1&&(r(0,"option",8),d(1),o()),a&2){let e=l.$implicit;_("ngValue",e),s(),y(e)}}var Je=(()=>{class a{userInput_DS=E(Q);isOpen=C(!1);isBusy=C(!1);modalZIndex=C("50");prefillTitle=C("");prefillDetails=C("");prefillPriority=C(void 0);closed=O();submitted=O();title_$=c("");details_$=c("");area_$=c("");phase_$=c("MVP1");priority_$=c(f.medium);priorityChoices=[f.low,f.medium,f.high,f.urgent];constructor(){N(()=>{if(this.isOpen()){let e=this.prefillTitle().trim(),i=this.prefillDetails().trim();this.title_$.set(e),this.details_$.set(i),this.area_$.set(""),this.phase_$.set("MVP1");let t=this.prefillPriority();this.priority_$.set(t!==void 0?t:f.medium)}}),N(()=>{this.isOpen()?this.userInput_DS.pushQuickInputOverlayAreaContextByOverlayId(J.pmManualBugModal):this.userInput_DS.popQuickInputOverlayAreaContext(J.pmManualBugModal)},{allowSignalWrites:!0})}handleClose(){this.closed.emit()}handleSubmit(){let e=this.title_$().trim(),i=this.details_$().trim();if(!e.length||!i.length)return;let t=this.area_$().trim(),n=this.phase_$().trim(),h={title:e,details:i,priority:this.priority_$(),phase:n.length>0?n:"MVP1"};t.length>0&&(h.area=t),this.submitted.emit(h)}handleTitleInput(e){this.title_$.set(e)}handleDetailsInput(e){this.details_$.set(e)}handleAreaInput(e){this.area_$.set(e)}handlePhaseInput(e){this.phase_$.set(e)}handlePriorityChange(e){if(typeof e=="string"){let i=a.parsePriority(e);i&&this.priority_$.set(i);return}this.priority_$.set(e)}static parsePriority(e){let i=e.trim().toLowerCase(),t=Object.values(f);for(let n of t)if(n===i)return n}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=v({type:a,selectors:[["app-pm-manual-bug-modal"]],inputs:{isOpen:[1,"isOpen"],isBusy:[1,"isBusy"],modalZIndex:[1,"modalZIndex"],prefillTitle:[1,"prefillTitle"],prefillDetails:[1,"prefillDetails"],prefillPriority:[1,"prefillPriority"]},outputs:{closed:"closed",submitted:"submitted"},standalone:!0,features:[z],decls:30,vars:12,consts:[["title","New bug (manual)",3,"closed","isOpen","maxWidth","zIndex","headerBorderClass"],[1,"flex","flex-col","gap-3","text-sm","text-neutral-200"],[1,"flex","flex-col","gap-1"],[1,"text-xs","text-neutral-500"],["type","text",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],["rows","6",1,"w-full","rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100","font-mono","text-xs",3,"ngModelChange","ngModel"],[1,"grid","grid-cols-1","sm:grid-cols-2","gap-3"],[1,"rounded","border","border-neutral-600","bg-neutral-900","px-2","py-1.5","text-neutral-100",3,"ngModelChange","ngModel"],[3,"ngValue"],["modal-footer","",1,"flex","justify-end","gap-2","px-4","py-3","border-t","border-neutral-800","shrink-0"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-neutral-600","text-neutral-300","hover:border-neutral-500","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"],["type","button",1,"px-3","py-1.5","text-xs","font-semibold","rounded","border","border-ccapAccent","text-ccapAccent","hover:bg-ccapAccent/10","disabled:opacity-40","disabled:pointer-events-none",3,"click","disabled"]],template:function(i,t){i&1&&(r(0,"app-s-modal",0),p("closed",function(){return t.handleClose()}),r(1,"div",1)(2,"label",2)(3,"span",3),d(4,"Title"),o(),r(5,"input",4),p("ngModelChange",function(h){return t.handleTitleInput(h)}),o()(),r(6,"label",2)(7,"span",3),d(8,"Details (raw \u2014 stored verbatim)"),o(),r(9,"textarea",5),p("ngModelChange",function(h){return t.handleDetailsInput(h)}),o()(),r(10,"div",6)(11,"label",2)(12,"span",3),d(13,"Priority"),o(),r(14,"select",7),p("ngModelChange",function(h){return t.handlePriorityChange(h)}),T(15,Ce,2,2,"option",8,I),o()(),r(17,"label",2)(18,"span",3),d(19,"Phase"),o(),r(20,"input",4),p("ngModelChange",function(h){return t.handlePhaseInput(h)}),o()()(),r(21,"label",2)(22,"span",3),d(23,"Area (optional)"),o(),r(24,"input",4),p("ngModelChange",function(h){return t.handleAreaInput(h)}),o()()(),r(25,"div",9)(26,"button",10),p("click",function(){return t.handleClose()}),d(27," Cancel "),o(),r(28,"button",11),p("click",function(){return t.handleSubmit()}),d(29),o()()()),i&2&&(_("isOpen",t.isOpen())("maxWidth","lg")("zIndex",t.modalZIndex())("headerBorderClass","border-neonRed/40"),s(5),_("ngModel",t.title_$()),s(4),_("ngModel",t.details_$()),s(5),_("ngModel",t.priority_$()),s(),P(t.priorityChoices),s(5),_("ngModel",t.phase_$()),s(4),_("ngModel",t.area_$()),s(2),_("disabled",t.isBusy()),s(2),_("disabled",t.isBusy()||!t.title_$().trim().length||!t.details_$().trim().length),s(),$(" ",t.isBusy()?"Creating\u2026":"Create bug"," "))},dependencies:[D,R,U,B,k,A,V,W,X],encapsulation:2})}return a})();export{Je as a,Ve as b};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
3
|
+
//# sourceMappingURL=chunk-U62YECNK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{I as p}from"./chunk-Y6V4NGLU.js";import{C as a,p as r,vb as o,xb as n,y as s}from"./chunk-TBMJSIBB.js";var h=(()=>{class t{baseUrl=`${p.api.baseUrl}/server`;http=a(n);getStatus(){return r(this.http.get(`${this.baseUrl}/status`))}getLiveDevPipelineStatus(i){let e=new o;return i.isPrevious&&(e=e.set("previous","true")),r(this.http.get(`${this.baseUrl}/live-dev-pipeline-status`,{params:e}))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UOC6UYZT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-B25EGDHU.js";import{I as c,p as _}from"./chunk-Y6V4NGLU.js";import{C as a,aa as r,h as u,k as n,p as o,xb as f,y as l}from"./chunk-TBMJSIBB.js";var p=u(_());var $=6e4,y=(()=>{class i{api_AS=a(h);instancePresenceMap_$=r(new Map);intervalHandle=void 0;lastRefreshAt_$=r(null);startPeriodicRefresh(){this.intervalHandle===void 0&&(this.refreshNow(),this.intervalHandle=setInterval(()=>{this.refreshNow()},$))}stopPeriodicRefresh(){this.intervalHandle!==void 0&&(clearInterval(this.intervalHandle),this.intervalHandle=void 0)}refreshNow(){return n(this,null,function*(){try{let t=yield this.api_AS.getPresence(),e=new Map;for(let s of t.list??[])s.instanceKey&&e.set(s.instanceKey,s);this.instancePresenceMap_$.set(e),this.lastRefreshAt_$.set(new Date().toISOString())}catch(t){p.DyFM_Log.warn(`[CCAP] ExS_InstancePresence_DataService refresh failed (non-fatal): ${t instanceof Error?t.message:String(t)}`)}})}getPresence(t){let e=this.instancePresenceMap_$().get(t);return e||{instanceKey:t,presence:"unknown",wsConnected:!1,reason:"presence map not loaded yet"}}ngOnDestroy(){this.stopPeriodicRefresh()}static \u0275fac=function(e){return new(e||i)};static \u0275prov=l({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var g=5e3,P=18,v=5e3,L=(()=>{class i{versionInfo_$=r(null);loading_$=r(!1);loadError_$=r(null);lastLoadedAt_$=r(null);triggering_$=r(!1);triggerResult_$=r(null);triggerError_$=r(null);pollingPostUpdate_$=r(!1);triggerSucceeded_$=r(null);triggerTimedOut_$=r(!1);http=a(f);pollTimer=null;loadVersionInfo(){return n(this,null,function*(){this.loading_$.set(!0),this.loadError_$.set(null);try{let t=`${c.api.baseUrl}/server/health/version-info`,e=yield o(this.http.get(t));this.versionInfo_$.set(e),this.lastLoadedAt_$.set(new Date)}catch(t){let e=t instanceof Error?t.message:String(t);this.loadError_$.set(e),this.versionInfo_$.set(null)}finally{this.loading_$.set(!1)}})}triggerUpdate(t){return n(this,null,function*(){this.cancelPostUpdatePolling(),this.triggerSucceeded_$.set(null),this.triggerTimedOut_$.set(!1),this.triggering_$.set(!0),this.triggerError_$.set(null),this.triggerResult_$.set(null);try{let e=`${c.api.baseUrl}/server/health/trigger-update`,s=yield o(this.http.post(e,{force:t===!0}));this.triggerResult_$.set(s),s.status==="started"&&s.currentVersion&&this.startPostUpdatePolling(s.currentVersion)}catch(e){let s=e instanceof Error?e.message:String(e);this.triggerError_$.set(s)}finally{this.triggering_$.set(!1)}})}startPostUpdatePolling(t){this.pollingPostUpdate_$.set(!0);let e=0,s=()=>n(this,null,function*(){e+=1;let d=yield this.pollHealthPid();if(d&&d!==t){this.triggerSucceeded_$.set({oldVersion:t,newVersion:d,detectedAtMs:Date.now()}),this.pollingPostUpdate_$.set(!1),this.pollTimer=null,setTimeout(()=>{typeof window<"u"&&window?.location&&window.location.reload()},v);return}if(e>=P){this.triggerTimedOut_$.set(!0),this.pollingPostUpdate_$.set(!1),this.pollTimer=null;return}this.pollTimer=setTimeout(()=>{s()},g)});this.pollTimer=setTimeout(()=>{s()},g)}cancelPostUpdatePolling(){this.pollTimer&&(clearTimeout(this.pollTimer),this.pollTimer=null),this.pollingPostUpdate_$.set(!1)}pollHealthPid(){return n(this,null,function*(){try{let t=`${c.api.baseUrl}/server/health/pid`,e=yield o(this.http.get(t));return typeof e?.ccapVersion=="string"?e.ccapVersion:null}catch{return null}})}static \u0275fac=function(e){return new(e||i)};static \u0275prov=l({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();export{y as a,L as b};
|
|
2
|
+
//# sourceMappingURL=chunk-VDQROW6J.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as S}from"./chunk-SDVXPGB7.js";import{I as m}from"./chunk-Y6V4NGLU.js";import{C as d,d as l,p as n,vb as r,xb as I,y as f}from"./chunk-TBMJSIBB.js";var P=(()=>{class i{baseUrl=`${m.api.baseUrl}/cc-session`;http=d(I);peiContext_DS=d(S);currentCcapId(){return this.peiContext_DS.activeCcapId_$()}withCcapId(t){let e=this.currentCcapId();return e?t.set("ccapId",e):t}createSession(t){let e=this.withCcapId(new r);return n(this.http.post(this.baseUrl,t,{params:e}))}listSessions(t){let e=this.withCcapId(new r);return t?.status&&(e=e.set("status",t.status)),t?.workspacePath&&(e=e.set("workspacePath",t.workspacePath)),t?.includeArchived&&(e=e.set("includeArchived","1")),t?.limit!=null&&(e=e.set("limit",String(t.limit))),t?.offset!=null&&(e=e.set("offset",String(t.offset))),n(this.http.get(this.baseUrl,{params:e}))}getSession(t){let e=this.withCcapId(new r);return n(this.http.get(`${this.baseUrl}/${t.sessionId}`,{params:e}))}sendPrompt(t){let e={content:t.content};t.attachments?.length&&(e.attachments=t.attachments);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/prompt`,e,{params:s}))}resumeSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/resume`,{},{params:e}))}forkSession(t){let e={};t.label&&(e.label=t.label);let s=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/fork`,e,{params:s}))}stopExecution(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/stop-execution`,{},{params:e}))}terminateSession(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/terminate`,{},{params:e}))}restartRunner(t){let e=this.withCcapId(new r);return n(this.http.post(`${this.baseUrl}/${t.sessionId}/runner-restart`,{},{params:e}))}updateSessionConfig(t){let a=t,{sessionId:e}=a,s=l(a,["sessionId"]),o=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${e}/config`,s,{params:o}))}setSessionArchived(t){let e=this.withCcapId(new r);return n(this.http.patch(`${this.baseUrl}/${t.sessionId}/archive`,{isArchived:t.isArchived},{params:e}))}getSessionEvents(t){let e=this.withCcapId(new r);return t.eventType&&(e=e.set("eventType",t.eventType)),t.since&&(e=e.set("since",t.since)),t.sinceSequence!=null&&(e=e.set("sinceSequence",String(t.sinceSequence))),t.limit!=null&&(e=e.set("limit",String(t.limit))),t.offset!=null&&(e=e.set("offset",String(t.offset))),t.latest&&(e=e.set("latest","1")),n(this.http.get(`${this.baseUrl}/${t.sessionId}/events`,{params:e}))}getRateLimitState(t){let e=new r;return n(this.http.get(`${this.baseUrl}/rate-limit-state/${encodeURIComponent(t.ccapId)}`,{params:e}))}getDiagnostic(t){return n(this.http.get(`${this.baseUrl}/${encodeURIComponent(t.sessionId)}/diagnostic`))}getSessionEventStreamUrl(t){let e=`${this.baseUrl}/${t.sessionId}/events/stream`,s=this.currentCcapId();return s?`${e}?ccapId=${encodeURIComponent(s)}`:e}static \u0275fac=function(e){return new(e||i)};static \u0275prov=f({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var y=(()=>{class i{static DEFAULT_SURPASSED_THRESHOLD=.8;static mapServerItemsToClientInfo(t){if(!t||!Array.isArray(t)||t.length===0)return null;let e=t.filter(u=>typeof u?.rateLimitType=="string"&&u.rateLimitType.length>0);if(e.length===0)return null;let s=i.pickMostRelevantItem(e),o=typeof s.utilization=="number"?Math.max(0,Math.min(1,s.utilization)):0,a=typeof s.resetsAtMs=="number"&&s.resetsAtMs>0?s.resetsAtMs:0,c=a>0?Math.floor(a/1e3):0,h=i.mapStatus(s.lastObservedStatus),p=i.readObservedAtIso(s.observedAt);return{status:h,resetsAt:c,rateLimitType:s.rateLimitType??"",utilization:o,surpassedThreshold:i.DEFAULT_SURPASSED_THRESHOLD,isUsingOverage:!1,receivedAt:p}}static pickMostRelevantItem(t){let e=o=>o==="reached"?2:o==="approaching"?1:0;return[...t].sort((o,a)=>{let c=e(a.lastObservedStatus)-e(o.lastObservedStatus);if(c!==0)return c;let h=(a.utilization??0)-(o.utilization??0);if(Math.abs(h)>1e-4)return h>0?1:-1;let p=i.readObservedAtMs(o.observedAt);return i.readObservedAtMs(a.observedAt)-p})[0]}static mapStatus(t){return t==="reached"?"limited":t==="approaching"?"allowed_warning":"allowed"}static readObservedAtMs(t){if(!t)return 0;if(t instanceof Date)return t.getTime();let e=Date.parse(t);return isNaN(e)?0:e}static readObservedAtIso(t){if(!t)return new Date().toISOString();if(t instanceof Date)return t.toISOString();let e=Date.parse(t);return isNaN(e)?new Date().toISOString():new Date(e).toISOString()}}return i})();export{P as a,y as b};
|
|
2
|
+
//# sourceMappingURL=chunk-VMXIXZV2.js.map
|