@futdevpro/ccap 1.1.3170 → 1.1.3185
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client-dist/{agent-instances.module-LAJSVUXU.js → agent-instances.module-HY6U6NTU.js} +2 -2
- package/client-dist/{ca.module-7BJW7N5L.js → ca.module-YVRTHIDJ.js} +2 -2
- package/client-dist/{cc-usage-dashboard.component-UESUHL5Y.js → cc-usage-dashboard.component-HMVSJAJW.js} +2 -2
- package/client-dist/{cc.module-RUITSTSN.js → cc.module-UUSKEROS.js} +2 -2
- package/client-dist/{chunk-ZPH4GMSZ.js → chunk-2ACBVKFF.js} +2 -2
- package/client-dist/{chunk-WDWP5Z22.js → chunk-2CBR5AG6.js} +2 -2
- package/client-dist/{chunk-E6T3GOHR.js → chunk-37OQSBT7.js} +2 -2
- package/client-dist/{chunk-KOG4ODF7.js → chunk-3AGLNCWT.js} +2 -2
- package/client-dist/{chunk-UUBO4IJY.js → chunk-4PHQRDNC.js} +2 -2
- package/client-dist/{chunk-BTK4A77V.js → chunk-4XV3BXSS.js} +2 -2
- package/client-dist/{chunk-ZDCT4IK7.js → chunk-545RSJ3M.js} +2 -2
- package/client-dist/{chunk-MANGTLQT.js → chunk-5AUMD2AV.js} +2 -2
- package/client-dist/{chunk-ODNBQMC5.js → chunk-6PZXWAP7.js} +2 -2
- package/client-dist/{chunk-CB6LTB7F.js → chunk-AG4GPQHE.js} +2 -2
- package/client-dist/{chunk-C3ZISVKH.js → chunk-BGTF5W4C.js} +2 -2
- package/client-dist/{chunk-3TAWBHPE.js → chunk-BVDUTUI7.js} +2 -2
- package/client-dist/{chunk-ZYCKDERS.js → chunk-CYQPVDOU.js} +2 -2
- package/client-dist/{chunk-MDXENIPY.js → chunk-DJ6YGZ7A.js} +2 -2
- package/client-dist/{chunk-23XUDAAW.js → chunk-DK42VLAQ.js} +2 -2
- package/client-dist/{chunk-6IQLEYIN.js → chunk-DQET3QPE.js} +2 -2
- package/client-dist/{chunk-6MYTERRT.js → chunk-EUPDWV3E.js} +2 -2
- package/client-dist/{chunk-4ZXPJMGB.js → chunk-EZ67KOOR.js} +2 -2
- package/client-dist/{chunk-GR2BO3BK.js → chunk-F5ZVJIWY.js} +2 -2
- package/client-dist/{chunk-YWNHUB7F.js → chunk-F7DW4LZH.js} +2 -2
- package/client-dist/{chunk-6I7DZMEC.js → chunk-GZN7MGFN.js} +2 -2
- package/client-dist/{chunk-VB2OUJ43.js → chunk-H3DUXC3C.js} +2 -2
- package/client-dist/{chunk-U6LQR6UE.js → chunk-I5HSVQGK.js} +2 -2
- package/client-dist/{chunk-W7HMWN5U.js → chunk-IOQ7GXTD.js} +2 -2
- package/client-dist/{chunk-XWC7L64D.js → chunk-J65ADVTN.js} +2 -2
- package/client-dist/{chunk-SBSBQDFW.js → chunk-JKYDJNDL.js} +2 -2
- package/client-dist/{chunk-RPINSJAL.js → chunk-JNPNZSEC.js} +2 -2
- package/client-dist/{chunk-XELIK726.js → chunk-KIYC5FNK.js} +2 -2
- package/client-dist/{chunk-VGENJFTC.js → chunk-L73BSJSY.js} +2 -2
- package/client-dist/{chunk-NBM2J4E3.js → chunk-LCUYWAOI.js} +2 -2
- package/client-dist/{chunk-7JNU7JW2.js → chunk-LEGPSOI2.js} +2 -2
- package/client-dist/{chunk-J5HZQ3BO.js → chunk-LK6LBMVQ.js} +2 -2
- package/client-dist/{chunk-LPQV2A7X.js → chunk-LUGAKUBY.js} +2 -2
- package/client-dist/{chunk-PBIDI3V2.js → chunk-MBJGNHF5.js} +2 -2
- package/client-dist/{chunk-SYH7IO7R.js → chunk-NH4PFOEN.js} +2 -2
- package/client-dist/{chunk-XW3HJ6GW.js → chunk-NOCT2K2D.js} +2 -2
- package/client-dist/{chunk-G5KBVVEI.js → chunk-O2AJ5XGG.js} +2 -2
- package/client-dist/{chunk-UIUJ57BQ.js → chunk-O4JI5VPX.js} +2 -2
- package/client-dist/{chunk-EAZOOLJT.js → chunk-ORSJUOE3.js} +2 -2
- package/client-dist/{chunk-BTOCISCK.js → chunk-RWJTMJ7Z.js} +2 -2
- package/client-dist/{chunk-7MQAS6L4.js → chunk-SADDY4AX.js} +2 -2
- package/client-dist/{chunk-YW6DRIQH.js → chunk-SOK3YTM4.js} +2 -2
- package/client-dist/{chunk-Y5ZPJLMI.js → chunk-STCLN3NB.js} +2 -2
- package/client-dist/{chunk-LHLCHQXJ.js → chunk-SUBBVGE2.js} +2 -2
- package/client-dist/{chunk-2B6TZ23X.js → chunk-TCEN3YWY.js} +2 -2
- package/client-dist/{chunk-JUNRMLCX.js → chunk-U4BKATGU.js} +2 -2
- package/client-dist/{chunk-RN7DPDGZ.js → chunk-UZBNU6NE.js} +2 -2
- package/client-dist/{chunk-CHME4MX5.js → chunk-VMADA5KN.js} +2 -2
- package/client-dist/{chunk-RZUUMSYK.js → chunk-X6JUEBJM.js} +2 -2
- package/client-dist/{chunk-GSU6XYYQ.js → chunk-XNBXDAVL.js} +2 -2
- package/client-dist/{chunk-GLC5752E.js → chunk-Y6XILVVA.js} +2 -2
- package/client-dist/{chunk-FEEAC6CZ.js → chunk-Y7D6YKUW.js} +2 -2
- package/client-dist/{chunk-FEEAC6CZ.js.map → chunk-Y7D6YKUW.js.map} +1 -1
- package/client-dist/{chunk-ZVFJHYYF.js → chunk-YOSL7MSC.js} +2 -2
- package/client-dist/{chunk-6WQO22HL.js → chunk-YPGC246I.js} +2 -2
- package/client-dist/{chunk-AANI33WF.js → chunk-YVOUVEZB.js} +2 -2
- package/client-dist/{chunk-2DFC73AP.js → chunk-ZPHYA7OK.js} +2 -2
- package/client-dist/{consultant.module-222IQ7HG.js → consultant.module-D3WTLZN5.js} +2 -2
- package/client-dist/{crd.module-Y5LVGTM4.js → crd.module-R4JOXIGG.js} +2 -2
- package/client-dist/{dashboard.module-VZMMS3O7.js → dashboard.module-XTQPTVSC.js} +2 -2
- package/client-dist/{do.module-7RZMZIFW.js → do.module-DDDC3RCU.js} +2 -2
- package/client-dist/{document-library.module-V65L6YJV.js → document-library.module-42MKB5C7.js} +2 -2
- package/client-dist/{embedding-eval.module-KFG4VPNV.js → embedding-eval.module-CXPKITWS.js} +2 -2
- package/client-dist/{embedding-registry.module-ZZAXVXIV.js → embedding-registry.module-4H7A5EP3.js} +2 -2
- package/client-dist/{err.module-K7TQ2W4T.js → err.module-SVFGO2M5.js} +2 -2
- package/client-dist/{feedback.module-SSVN7YI5.js → feedback.module-NLQNSVG6.js} +2 -2
- package/client-dist/{host-runtime-mcp.module-GWRPQMG2.js → host-runtime-mcp.module-32HMWFHX.js} +2 -2
- package/client-dist/index.html +1 -1
- package/client-dist/{live-dev-pipeline.module-5A4DOODO.js → live-dev-pipeline.module-B6HLCCOC.js} +2 -2
- package/client-dist/{logs.module-4AJMRUVC.js → logs.module-PRHH64BJ.js} +2 -2
- package/client-dist/{main-ZUAXY6A6.js → main-7RFGS55Y.js} +3 -3
- package/client-dist/{master-control-remote-poc.module-DMPH4YU4.js → master-control-remote-poc.module-IURKDG6M.js} +2 -2
- package/client-dist/{mobile-app.module-7YTTAOEW.js → mobile-app.module-ROLGXURT.js} +2 -2
- package/client-dist/{model-registry.module-7WXWY52X.js → model-registry.module-OGLA77QK.js} +2 -2
- package/client-dist/{oc.module-B2S4U4O5.js → oc.module-DZGYGWTD.js} +2 -2
- package/client-dist/{orc.module-FCHPGGZ5.js → orc.module-ZCIM4X4X.js} +2 -2
- package/client-dist/{project-management.module-YUELMBPT.js → project-management.module-GXQ7KKHL.js} +2 -2
- package/client-dist/project-source-routed.module-CFLDWZ3Z.js +2 -0
- package/client-dist/{scheduler.module-4AED4CG6.js → scheduler.module-6ZEGVGK6.js} +2 -2
- package/client-dist/{session.module-OXWFM4BI.js → session.module-VCE5V5DD.js} +2 -2
- package/client-dist/{set.module-O2GVOOER.js → set.module-NAK2FSOX.js} +2 -2
- package/client-dist/{setup.module-APWCONFA.js → setup.module-CFQUWLBW.js} +2 -2
- package/client-dist/{terminals.module-7EPFHTFM.js → terminals.module-US5P5J2W.js} +2 -2
- package/client-dist/{voice-notes-poc.module-MWAOKZZU.js → voice-notes-poc.module-B37QBSGY.js} +2 -2
- package/client-dist/{wfs.module-6YBTYOFI.js → wfs.module-6YOK72A2.js} +2 -2
- package/package.json +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.d.ts +38 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.d.ts.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.js +66 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.js.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.spec.d.ts +2 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.spec.d.ts.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.spec.js +90 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.spec.js.map +1 -0
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-runner-spawn.util.d.ts.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-runner-spawn.util.js +12 -2
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-runner-spawn.util.js.map +1 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.d.ts +4 -0
- 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 +28 -1
- package/server/build/src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.js.map +1 -1
- package/client-dist/project-source-routed.module-HPRKVVI7.js +0 -2
- /package/client-dist/{agent-instances.module-LAJSVUXU.js.map → agent-instances.module-HY6U6NTU.js.map} +0 -0
- /package/client-dist/{ca.module-7BJW7N5L.js.map → ca.module-YVRTHIDJ.js.map} +0 -0
- /package/client-dist/{cc-usage-dashboard.component-UESUHL5Y.js.map → cc-usage-dashboard.component-HMVSJAJW.js.map} +0 -0
- /package/client-dist/{cc.module-RUITSTSN.js.map → cc.module-UUSKEROS.js.map} +0 -0
- /package/client-dist/{chunk-ZPH4GMSZ.js.map → chunk-2ACBVKFF.js.map} +0 -0
- /package/client-dist/{chunk-WDWP5Z22.js.map → chunk-2CBR5AG6.js.map} +0 -0
- /package/client-dist/{chunk-E6T3GOHR.js.map → chunk-37OQSBT7.js.map} +0 -0
- /package/client-dist/{chunk-KOG4ODF7.js.map → chunk-3AGLNCWT.js.map} +0 -0
- /package/client-dist/{chunk-UUBO4IJY.js.map → chunk-4PHQRDNC.js.map} +0 -0
- /package/client-dist/{chunk-BTK4A77V.js.map → chunk-4XV3BXSS.js.map} +0 -0
- /package/client-dist/{chunk-ZDCT4IK7.js.map → chunk-545RSJ3M.js.map} +0 -0
- /package/client-dist/{chunk-MANGTLQT.js.map → chunk-5AUMD2AV.js.map} +0 -0
- /package/client-dist/{chunk-ODNBQMC5.js.map → chunk-6PZXWAP7.js.map} +0 -0
- /package/client-dist/{chunk-CB6LTB7F.js.map → chunk-AG4GPQHE.js.map} +0 -0
- /package/client-dist/{chunk-C3ZISVKH.js.map → chunk-BGTF5W4C.js.map} +0 -0
- /package/client-dist/{chunk-3TAWBHPE.js.map → chunk-BVDUTUI7.js.map} +0 -0
- /package/client-dist/{chunk-ZYCKDERS.js.map → chunk-CYQPVDOU.js.map} +0 -0
- /package/client-dist/{chunk-MDXENIPY.js.map → chunk-DJ6YGZ7A.js.map} +0 -0
- /package/client-dist/{chunk-23XUDAAW.js.map → chunk-DK42VLAQ.js.map} +0 -0
- /package/client-dist/{chunk-6IQLEYIN.js.map → chunk-DQET3QPE.js.map} +0 -0
- /package/client-dist/{chunk-6MYTERRT.js.map → chunk-EUPDWV3E.js.map} +0 -0
- /package/client-dist/{chunk-4ZXPJMGB.js.map → chunk-EZ67KOOR.js.map} +0 -0
- /package/client-dist/{chunk-GR2BO3BK.js.map → chunk-F5ZVJIWY.js.map} +0 -0
- /package/client-dist/{chunk-YWNHUB7F.js.map → chunk-F7DW4LZH.js.map} +0 -0
- /package/client-dist/{chunk-6I7DZMEC.js.map → chunk-GZN7MGFN.js.map} +0 -0
- /package/client-dist/{chunk-VB2OUJ43.js.map → chunk-H3DUXC3C.js.map} +0 -0
- /package/client-dist/{chunk-U6LQR6UE.js.map → chunk-I5HSVQGK.js.map} +0 -0
- /package/client-dist/{chunk-W7HMWN5U.js.map → chunk-IOQ7GXTD.js.map} +0 -0
- /package/client-dist/{chunk-XWC7L64D.js.map → chunk-J65ADVTN.js.map} +0 -0
- /package/client-dist/{chunk-SBSBQDFW.js.map → chunk-JKYDJNDL.js.map} +0 -0
- /package/client-dist/{chunk-RPINSJAL.js.map → chunk-JNPNZSEC.js.map} +0 -0
- /package/client-dist/{chunk-XELIK726.js.map → chunk-KIYC5FNK.js.map} +0 -0
- /package/client-dist/{chunk-VGENJFTC.js.map → chunk-L73BSJSY.js.map} +0 -0
- /package/client-dist/{chunk-NBM2J4E3.js.map → chunk-LCUYWAOI.js.map} +0 -0
- /package/client-dist/{chunk-7JNU7JW2.js.map → chunk-LEGPSOI2.js.map} +0 -0
- /package/client-dist/{chunk-J5HZQ3BO.js.map → chunk-LK6LBMVQ.js.map} +0 -0
- /package/client-dist/{chunk-LPQV2A7X.js.map → chunk-LUGAKUBY.js.map} +0 -0
- /package/client-dist/{chunk-PBIDI3V2.js.map → chunk-MBJGNHF5.js.map} +0 -0
- /package/client-dist/{chunk-SYH7IO7R.js.map → chunk-NH4PFOEN.js.map} +0 -0
- /package/client-dist/{chunk-XW3HJ6GW.js.map → chunk-NOCT2K2D.js.map} +0 -0
- /package/client-dist/{chunk-G5KBVVEI.js.map → chunk-O2AJ5XGG.js.map} +0 -0
- /package/client-dist/{chunk-UIUJ57BQ.js.map → chunk-O4JI5VPX.js.map} +0 -0
- /package/client-dist/{chunk-EAZOOLJT.js.map → chunk-ORSJUOE3.js.map} +0 -0
- /package/client-dist/{chunk-BTOCISCK.js.map → chunk-RWJTMJ7Z.js.map} +0 -0
- /package/client-dist/{chunk-7MQAS6L4.js.map → chunk-SADDY4AX.js.map} +0 -0
- /package/client-dist/{chunk-YW6DRIQH.js.map → chunk-SOK3YTM4.js.map} +0 -0
- /package/client-dist/{chunk-Y5ZPJLMI.js.map → chunk-STCLN3NB.js.map} +0 -0
- /package/client-dist/{chunk-LHLCHQXJ.js.map → chunk-SUBBVGE2.js.map} +0 -0
- /package/client-dist/{chunk-2B6TZ23X.js.map → chunk-TCEN3YWY.js.map} +0 -0
- /package/client-dist/{chunk-JUNRMLCX.js.map → chunk-U4BKATGU.js.map} +0 -0
- /package/client-dist/{chunk-RN7DPDGZ.js.map → chunk-UZBNU6NE.js.map} +0 -0
- /package/client-dist/{chunk-CHME4MX5.js.map → chunk-VMADA5KN.js.map} +0 -0
- /package/client-dist/{chunk-RZUUMSYK.js.map → chunk-X6JUEBJM.js.map} +0 -0
- /package/client-dist/{chunk-GSU6XYYQ.js.map → chunk-XNBXDAVL.js.map} +0 -0
- /package/client-dist/{chunk-GLC5752E.js.map → chunk-Y6XILVVA.js.map} +0 -0
- /package/client-dist/{chunk-ZVFJHYYF.js.map → chunk-YOSL7MSC.js.map} +0 -0
- /package/client-dist/{chunk-6WQO22HL.js.map → chunk-YPGC246I.js.map} +0 -0
- /package/client-dist/{chunk-AANI33WF.js.map → chunk-YVOUVEZB.js.map} +0 -0
- /package/client-dist/{chunk-2DFC73AP.js.map → chunk-ZPHYA7OK.js.map} +0 -0
- /package/client-dist/{consultant.module-222IQ7HG.js.map → consultant.module-D3WTLZN5.js.map} +0 -0
- /package/client-dist/{crd.module-Y5LVGTM4.js.map → crd.module-R4JOXIGG.js.map} +0 -0
- /package/client-dist/{dashboard.module-VZMMS3O7.js.map → dashboard.module-XTQPTVSC.js.map} +0 -0
- /package/client-dist/{do.module-7RZMZIFW.js.map → do.module-DDDC3RCU.js.map} +0 -0
- /package/client-dist/{document-library.module-V65L6YJV.js.map → document-library.module-42MKB5C7.js.map} +0 -0
- /package/client-dist/{embedding-eval.module-KFG4VPNV.js.map → embedding-eval.module-CXPKITWS.js.map} +0 -0
- /package/client-dist/{embedding-registry.module-ZZAXVXIV.js.map → embedding-registry.module-4H7A5EP3.js.map} +0 -0
- /package/client-dist/{err.module-K7TQ2W4T.js.map → err.module-SVFGO2M5.js.map} +0 -0
- /package/client-dist/{feedback.module-SSVN7YI5.js.map → feedback.module-NLQNSVG6.js.map} +0 -0
- /package/client-dist/{host-runtime-mcp.module-GWRPQMG2.js.map → host-runtime-mcp.module-32HMWFHX.js.map} +0 -0
- /package/client-dist/{live-dev-pipeline.module-5A4DOODO.js.map → live-dev-pipeline.module-B6HLCCOC.js.map} +0 -0
- /package/client-dist/{logs.module-4AJMRUVC.js.map → logs.module-PRHH64BJ.js.map} +0 -0
- /package/client-dist/{main-ZUAXY6A6.js.map → main-7RFGS55Y.js.map} +0 -0
- /package/client-dist/{master-control-remote-poc.module-DMPH4YU4.js.map → master-control-remote-poc.module-IURKDG6M.js.map} +0 -0
- /package/client-dist/{mobile-app.module-7YTTAOEW.js.map → mobile-app.module-ROLGXURT.js.map} +0 -0
- /package/client-dist/{model-registry.module-7WXWY52X.js.map → model-registry.module-OGLA77QK.js.map} +0 -0
- /package/client-dist/{oc.module-B2S4U4O5.js.map → oc.module-DZGYGWTD.js.map} +0 -0
- /package/client-dist/{orc.module-FCHPGGZ5.js.map → orc.module-ZCIM4X4X.js.map} +0 -0
- /package/client-dist/{project-management.module-YUELMBPT.js.map → project-management.module-GXQ7KKHL.js.map} +0 -0
- /package/client-dist/{project-source-routed.module-HPRKVVI7.js.map → project-source-routed.module-CFLDWZ3Z.js.map} +0 -0
- /package/client-dist/{scheduler.module-4AED4CG6.js.map → scheduler.module-6ZEGVGK6.js.map} +0 -0
- /package/client-dist/{session.module-OXWFM4BI.js.map → session.module-VCE5V5DD.js.map} +0 -0
- /package/client-dist/{set.module-O2GVOOER.js.map → set.module-NAK2FSOX.js.map} +0 -0
- /package/client-dist/{setup.module-APWCONFA.js.map → setup.module-CFQUWLBW.js.map} +0 -0
- /package/client-dist/{terminals.module-7EPFHTFM.js.map → terminals.module-US5P5J2W.js.map} +0 -0
- /package/client-dist/{voice-notes-poc.module-MWAOKZZU.js.map → voice-notes-poc.module-B37QBSGY.js.map} +0 -0
- /package/client-dist/{wfs.module-6YBTYOFI.js.map → wfs.module-6YOK72A2.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as se}from"./chunk-EAZOOLJT.js";import"./chunk-Y5ZPJLMI.js";import"./chunk-YW6DRIQH.js";import"./chunk-6MYTERRT.js";import{b as Z,c as ee,f as te,i as ne,n as ie,o as oe,p as re,v as j}from"./chunk-EO4DNTT4.js";import{a as A}from"./chunk-5UPNU54P.js";import{j as ae}from"./chunk-UUBO4IJY.js";import{I as le}from"./chunk-FEEAC6CZ.js";import{C,D as R,E as q,Fa as o,Ga as F,Ha as b,Ia as N,J as u,K as m,Kb as X,L as D,M as J,Ta as Y,Z as s,a as v,aa as w,b as S,d as B,da as k,ga as g,ia as I,k as x,la as h,na as K,oa as M,p as E,pa as z,qa as i,ra as n,sa as P,ua as y,ub as V,va as c,wa as p,xb as Q,y as T,z as U}from"./chunk-TBMJSIBB.js";var de=(()=>{class l{baseUrl=`${le.api.baseUrl}/workflow`;http=C(Q);listWorkflows(e){let t=[];e?.workflowType&&t.push(`type=${e.workflowType}`),e?.isTemplate!==void 0&&t.push(`isTemplate=${e.isTemplate}`);let r=t.length?`?${t.join("&")}`:"";return E(this.http.get(`${this.baseUrl}${r}`))}createWorkflow(e){return E(this.http.post(this.baseUrl,e))}getWorkflow(e){return E(this.http.get(`${this.baseUrl}/${e}`))}updateWorkflow(e){let a=e,{id:t}=a,r=B(a,["id"]);return E(this.http.put(`${this.baseUrl}/${t}`,r))}generateWorkflow(e){return E(this.http.post(`${this.baseUrl}/generate`,{description:e.description,provider:e.provider,model:e.model}))}modifyWorkflow(e){return E(this.http.post(`${this.baseUrl}/modify`,{currentWorkflow:e.currentWorkflow,modificationDescription:e.modificationDescription,provider:e.provider,model:e.model}))}deleteWorkflow(e){return E(this.http.delete(`${this.baseUrl}/${e}`))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=T({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var pe=(()=>{class l{workflow_AS=C(de);listWorkflows(e){return x(this,null,function*(){return(yield this.workflow_AS.listWorkflows(e)).workflows})}createWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.createWorkflow(e)).workflow})}getWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.getWorkflow(e)).workflow})}updateWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.updateWorkflow(e)).workflow})}generateWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.generateWorkflow(e)).workflow})}modifyWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.modifyWorkflow(e)).workflow})}deleteWorkflow(e){return x(this,null,function*(){return this.workflow_AS.deleteWorkflow(e)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=T({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var L="ccap-workflowSettingsDraft",$=class{static get(){let d=A.readJson(L,null);if(typeof d!="object"||d===null)return null;let e=d,t=typeof e.generationPrompt=="string"?e.generationPrompt:"",r=typeof e.modificationPrompt=="string"?e.modificationPrompt:"",a=typeof e.selectedProvider=="string"?e.selectedProvider:"",_=typeof e.selectedModel=="string"?e.selectedModel:"",W=typeof e.isCreating=="boolean"?e.isCreating:!1,f=e.editingWorkflow&&typeof e.editingWorkflow=="object"?e.editingWorkflow:null;return{generationPrompt:t,modificationPrompt:r,selectedProvider:a,selectedModel:_,isCreating:W,editingWorkflow:f}}static save(d){A.writeJson(L,d)}static clear(){A.remove(L)}};var me=(l,d)=>d._id,H=(l,d)=>d.id;function ce(l,d){if(l&1){let e=y();i(0,"button",5),c("click",function(){u(e);let r=p();return m(r.handleCreateNew())}),o(1," + \xDAj workflow "),n()}}function _e(l,d){l&1&&(i(0,"div",6),o(1,"Bet\xF6lt\xE9s..."),n())}function fe(l,d){l&1&&(i(0,"div",7),o(1," Nincs m\xE9g workflow. Hozz l\xE9tre egyet a gombbal. "),n())}function ge(l,d){l&1&&(i(0,"span",14),o(1," sablon "),n())}function xe(l,d){l&1&&(i(0,"span",15),o(1," Built-in "),n())}function we(l,d){if(l&1){let e=y();i(0,"button",20),c("click",function(){u(e);let r=p().$implicit,a=p(3);return m(a.handleEdit(r))}),o(1," Szerkeszt\xE9s "),n(),i(2,"button",21),c("click",function(){u(e);let r=p().$implicit,a=p(3);return m(a.handleDelete(r))}),o(3," T\xF6rl\xE9s "),n()}}function he(l,d){l&1&&(i(0,"span",19),o(1," Readonly "),n())}function ke(l,d){if(l&1&&(i(0,"div",9)(1,"div",10)(2,"div",11)(3,"span",12),o(4),n(),i(5,"span",13),o(6),n(),k(7,ge,2,0,"span",14)(8,xe,2,0,"span",15),n(),i(9,"p",16),o(10),n(),i(11,"div",17),o(12),n()(),i(13,"div",18),k(14,we,4,0)(15,he,2,0,"span",19),n()()),l&2){let e=d.$implicit;s(4),F(e.name),s(2),b(" ",e.workflowType," "),s(),h(e.isTemplate?7:-1),s(),h(e.isBuiltIn?8:-1),s(2),F(e.description),s(2),b(" ",e.phases.length," f\xE1zis "),s(2),h(e.isBuiltIn?15:14)}}function Ee(l,d){if(l&1&&(i(0,"div",8),M(1,ke,16,7,"div",9,me),n()),l&2){let e=p(2);s(),z(e.workflows_$())}}function Ce(l,d){if(l&1&&k(0,_e,2,0,"div",6)(1,fe,2,0,"div",7)(2,Ee,3,0,"div",8),l&2){let e=p();h(e.isLoading_$()?0:e.workflows_$().length===0?1:2)}}function be(l,d){l&1&&(D(),i(0,"svg",27),P(1,"polyline",52),n())}function ve(l,d){l&1&&(D(),i(0,"svg",27),P(1,"rect",53)(2,"path",54),n())}function Se(l,d){if(l&1&&(i(0,"option",41),o(1),n()),l&2){let e=d.$implicit;g("value",e.provider+":"+e.modelName),s(),N(" ",e.provider," / ",e.modelName," ")}}function ye(l,d){l&1&&(i(0,"span",56),o(1,"Az LLM dolgozik a workflow-n..."),n())}function $e(l,d){if(l&1){let e=y();i(0,"div",28)(1,"div",42)(2,"span",55),o(3,"Workflow gener\xE1l\xE1s"),n(),i(4,"span",56),o(5,"\u2014 \xEDrd le egyszer\u0171en, mit szeretn\xE9l"),n()(),i(6,"textarea",57),c("ngModelChange",function(r){u(e);let a=p(2);return m(a.handleGenerationPromptChange(r))}),o(7," "),n(),i(8,"div",58)(9,"div",42)(10,"label",56),o(11,"Modell:"),n(),i(12,"select",59),c("ngModelChange",function(r){u(e);let a=p(2);return m(a.handleModelSelectionChange(r))}),i(13,"option",60),o(14,"Alap\xE9rtelmezett"),n(),M(15,Se,2,3,"option",41,H),n()(),i(17,"button",61),c("click",function(){u(e);let r=p(2);return m(r.handleGenerate())}),o(18),n(),k(19,ye,2,0,"span",56),n()()}if(l&2){let e=p(2);s(6),g("ngModel",e.generationPrompt_$()),s(6),g("ngModel",e.selectedProvider_$()&&e.selectedModel_$()?e.selectedProvider_$()+":"+e.selectedModel_$():""),s(3),z(e.availableModels_$()),s(2),g("disabled",e.isGenerating_$()||!e.generationPrompt_$()),s(),b(" ",e.isGenerating_$()?"Gener\xE1l\xE1s...":"Gener\xE1l\xE1s"," "),s(),h(e.isGenerating_$()?19:-1)}}function We(l,d){if(l&1&&(i(0,"option",41),o(1),n()),l&2){let e=d.$implicit;g("value",e.provider+":"+e.modelName),s(),N(" ",e.provider," / ",e.modelName," ")}}function Me(l,d){l&1&&(i(0,"span",56),o(1,"Az LLM m\xF3dos\xEDtja a workflow-t..."),n())}function ze(l,d){if(l&1){let e=y();i(0,"div",29)(1,"div",42)(2,"span",62),o(3,"Workflow m\xF3dos\xEDt\xE1s"),n(),i(4,"span",56),o(5,"\u2014 \xEDrd le, mit szeretn\xE9l v\xE1ltoztatni"),n()(),i(6,"textarea",63),c("ngModelChange",function(r){u(e);let a=p(2);return m(a.handleModificationPromptChange(r))}),o(7," "),n(),i(8,"div",58)(9,"div",42)(10,"label",56),o(11,"Modell:"),n(),i(12,"select",64),c("ngModelChange",function(r){u(e);let a=p(2);return m(a.handleModelSelectionChange(r))}),i(13,"option",60),o(14,"Alap\xE9rtelmezett"),n(),M(15,We,2,3,"option",41,H),n()(),i(17,"button",65),c("click",function(){u(e);let r=p(2);return m(r.handleModify())}),o(18),n(),k(19,Me,2,0,"span",56),n()()}if(l&2){let e=p(2);s(6),g("ngModel",e.modificationPrompt_$()),s(6),g("ngModel",e.selectedProvider_$()&&e.selectedModel_$()?e.selectedProvider_$()+":"+e.selectedModel_$():""),s(3),z(e.availableModels_$()),s(2),g("disabled",e.isModifying_$()||!e.modificationPrompt_$()),s(),b(" ",e.isModifying_$()?"M\xF3dos\xEDt\xE1s...":"M\xF3dos\xEDt\xE1s"," "),s(),h(e.isModifying_$()?19:-1)}}function Te(l,d){l&1&&(i(0,"div",36)(1,"div")(2,"h3",66),o(3,"Fel\xE9p\xEDt\xE9s"),n(),i(4,"p"),o(5," Egy j\xF3 workflow "),i(6,"strong",67),o(7,"f\xE1zisokra"),n(),o(8," bontja a feladatot, ahol minden f\xE1zis egyetlen, j\xF3l meghat\xE1rozott c\xE9lt k\xF6vet. A "),i(9,"strong",67),o(10,"vez\xE9rprompt"),n(),o(11," (master prompt) az eg\xE9sz workflow-ra \xE9rv\xE9nyes alapszab\xE1lyokat \xE9s kontextust tartalmazza \u2014 ez minden f\xE1zisban automatikusan megjelenik. "),n()(),i(12,"div")(13,"h3",66),o(14,"Vez\xE9rprompt (master prompt)"),n(),i(15,"ul",68)(16,"li"),o(17,"Projekt kontextus: milyen repo, milyen stack, milyen nyelven dolgozunk"),n(),i(18,"li"),o(19,"Glob\xE1lis szab\xE1lyok: k\xF3dol\xE1si konvenci\xF3k, tiltott m\u0171veletek, commit policy"),n(),i(20,"li"),o(21,'Szerepk\xF6r: milyen "szaktud\xE1s\xFA" agent hajtja v\xE9gre a workflow-t'),n(),i(22,"li"),o(23,"Ne ism\xE9telj meg f\xE1zisonk\xE9nt olyat, ami ide tartozik \u2014 a master prompt mindig jelen van"),n()()(),i(24,"div")(25,"h3",66),o(26,"F\xE1zisok tervez\xE9se"),n(),i(27,"ul",68)(28,"li")(29,"strong",67),o(30,"C\xE9l (goal):"),n(),o(31," egyetlen mondat \u2014 a f\xE1zis sikeress\xE9g\xE9nek m\xE9rc\xE9je "),n(),i(32,"li")(33,"strong",67),o(34,"F\xE1zis prompt:"),n(),o(35,' konkr\xE9t, akci\xF3-orient\xE1lt utas\xEDt\xE1s. Ker\xFCld az \xE1ltal\xE1noss\xE1gokat ("n\xE9zd \xE1t a k\xF3dot") \u2014 \xEDrd le pontosan mit kell csin\xE1lni '),n(),i(36,"li")(37,"strong",67),o(38,"Ism\xE9tl\u0151d\u0151 f\xE1zis:"),n(),o(39,' ha a f\xE1zis nem egyl\xE9p\xE9ses (pl. iterat\xEDv fejleszt\xE9s), kapcsold be az "Ism\xE9tl\u0151d\u0151" opci\xF3t \u2014 a f\xE1zis addig fut, am\xEDg PHASE_DONE jelz\xE9s nem \xE9rkezik '),n()()(),i(40,"div")(41,"h3",66),o(42,"Tipikus f\xE1zis-sorrend"),n(),i(43,"div",69)(44,"span",70),o(45,"1. T\xE1j\xE9koz\xF3d\xE1s / Clarify"),n(),i(46,"span",24),o(47,"\u2192"),n(),i(48,"span",70),o(49,"2. Tervez\xE9s / Plan"),n(),i(50,"span",24),o(51,"\u2192"),n(),i(52,"span",70),o(53,"3. Megval\xF3s\xEDt\xE1s / Dev"),n(),i(54,"span",24),o(55,"\u2192"),n(),i(56,"span",70),o(57,"4. Tesztel\xE9s / Test"),n(),i(58,"span",24),o(59,"\u2192"),n(),i(60,"span",70),o(61,"5. Review / Doc"),n()(),i(62,"p",71),o(63," Nem minden workflow-nak kell minden f\xE1zist tartalmaznia \u2014 haszn\xE1ld azt, ami relev\xE1ns. "),n()(),i(64,"div")(65,"h3",66),o(66,"Tippek"),n(),i(67,"ul",68)(68,"li"),o(69,"A "),i(70,"strong",67),o(71,"sablon (template)"),n(),o(72," workflow-kat gener\xE1l\xE1shoz is haszn\xE1ljuk \u2014 jel\xF6ld be, ha m\xE1sok sz\xE1m\xE1ra is mintak\xE9nt szolg\xE1l"),n(),i(73,"li"),o(74,"A f\xE1zis prompt-ban hivatkozhatsz f\xE1jlokra, mapp\xE1kra, specifik\xE1ci\xF3kra \u2014 min\xE9l konkr\xE9tabb, ann\xE1l jobb"),n(),i(75,"li"),o(76,"T\xF6rekedj arra, hogy egy f\xE1zis "),i(77,"strong",67),o(78,"1 felel\u0151ss\xE9gi k\xF6rrel"),n(),o(79," rendelkezzen (single responsibility)"),n(),i(80,"li"),o(81,"Ha egy f\xE1zis t\xFAl hossz\xFA lenne, bontsd kett\xE9 \u2014 ink\xE1bb legyen t\xF6bb kis f\xE1zis, mint egy nagy"),n()()()())}function De(l,d){if(l&1&&(i(0,"option",41),o(1),n()),l&2){let e=d.$implicit;g("value",e),s(),F(e)}}function Pe(l,d){if(l&1){let e=y();i(0,"div",48)(1,"div",72)(2,"span",73),o(3),n(),i(4,"button",74),c("click",function(){let r=u(e).$index,a=p(2);return m(a.handleRemovePhase(r))}),o(5," Elt\xE1vol\xEDt\xE1s "),n()(),i(6,"div",75)(7,"div")(8,"label",76),o(9,"C\xEDm"),n(),i(10,"input",77),c("ngModelChange",function(r){let a=u(e).$index,_=p(2);return m(_.handlePhaseFieldChange({index:a,field:"title",value:r}))}),n()(),i(11,"div")(12,"label",76),o(13,"C\xE9l (goal)"),n(),i(14,"input",77),c("ngModelChange",function(r){let a=u(e).$index,_=p(2);return m(_.handlePhaseFieldChange({index:a,field:"goal",value:r}))}),n()()(),i(15,"div",78)(16,"label",76),o(17,"F\xE1zis prompt"),n(),i(18,"textarea",79),c("ngModelChange",function(r){let a=u(e).$index,_=p(2);return m(_.handlePhaseFieldChange({index:a,field:"phasePrompt",value:r}))}),o(19," "),n()(),i(20,"div",42)(21,"input",43),c("ngModelChange",function(r){let a=u(e).$index,_=p(2);return m(_.handlePhaseFieldChange({index:a,field:"repeatUntilDone",value:r}))}),n(),i(22,"label",80),o(23,"Ism\xE9tl\u0151d\u0151 (am\xEDg PHASE_DONE)"),n()()()}if(l&2){let e=d.$implicit,t=d.$index;s(3),b("F\xE1zis ",t+1,""),s(7),g("ngModel",e.title),s(4),g("ngModel",e.goal),s(4),g("ngModel",e.phasePrompt),s(3),g("ngModel",e.repeatUntilDone)}}function Fe(l,d){if(l&1){let e=y();i(0,"div",4)(1,"div",22)(2,"button",23),c("click",function(){u(e);let r=p();return m(r.handleCancel())}),o(3," \u2190 Vissza "),n(),i(4,"span",24),o(5,"|"),n(),i(6,"span",25),o(7),n(),i(8,"button",26),c("click",function(){u(e);let r=p();return m(r.handleCopyMarkdown())}),k(9,be,2,0,":svg:svg",27)(10,ve,3,0,":svg:svg",27),n()(),k(11,$e,20,5,"div",28)(12,ze,20,5,"div",29),i(13,"div",30)(14,"button",31),c("click",function(){u(e);let r=p();return m(r.handleToggleBestPractices())}),D(),i(15,"svg",32),P(16,"polyline",33),n(),J(),i(17,"span",34),o(18,"Workflow tervez\xE9si \xFAtmutat\xF3"),n(),i(19,"span",35),o(20,"best practices"),n()(),k(21,Te,82,0,"div",36),n(),i(22,"div",37)(23,"div")(24,"label",38),o(25,"N\xE9v"),n(),i(26,"input",39),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("name",r))}),n()(),i(27,"div")(28,"label",38),o(29,"T\xEDpus"),n(),i(30,"select",40),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("workflowType",r))}),M(31,De,2,2,"option",41,K),n()()(),i(33,"div")(34,"label",38),o(35,"Le\xEDr\xE1s"),n(),i(36,"input",39),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("description",r))}),n()(),i(37,"div",42)(38,"input",43),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("isTemplate",r))}),n(),i(39,"label",25),o(40,"Sablon (template)"),n()(),i(41,"div")(42,"label",38),o(43,"Vez\xE9rprompt (master prompt)"),n(),i(44,"textarea",44),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("masterPrompt",r))}),o(45," "),n()(),i(46,"div")(47,"div",45)(48,"h2",46),o(49,"F\xE1zisok"),n(),i(50,"button",47),c("click",function(){u(e);let r=p();return m(r.handleAddPhase())}),o(51," + F\xE1zis "),n()(),M(52,Pe,24,5,"div",48,H),n(),i(54,"div",49)(55,"button",50),c("click",function(){u(e);let r=p();return m(r.handleSave())}),o(56),n(),i(57,"button",51),c("click",function(){u(e);let r=p();return m(r.handleCancel())}),o(58," M\xE9gse "),n()()()}if(l&2){let e,t,r,a,_,W,f=p();s(7),b(" ",f.isCreating_$()?"\xDAj workflow":"Szerkeszt\xE9s"," "),s(),I("text-neutral-500",!f.isCopied_$())("hover:text-neutral-200",!f.isCopied_$())("text-green-400",f.isCopied_$()),s(),h(f.isCopied_$()?9:10),s(2),h(f.isCreating_$()?11:-1),s(),h(f.isCreating_$()?-1:12),s(3),I("-rotate-90",!f.isBestPracticesOpen_$()),s(6),h(f.isBestPracticesOpen_$()?21:-1),s(5),g("ngModel",(e=f.editingWorkflow_$())==null?null:e.name),s(4),g("ngModel",(t=f.editingWorkflow_$())==null?null:t.workflowType),s(),z(f.workflowTypes),s(5),g("ngModel",(r=f.editingWorkflow_$())==null?null:r.description),s(2),g("ngModel",(a=f.editingWorkflow_$())==null?null:a.isTemplate),s(6),g("ngModel",(_=f.editingWorkflow_$())==null?null:_.masterPrompt),s(8),z((W=f.editingWorkflow_$())==null?null:W.phases),s(3),g("disabled",f.isLoading_$()),s(),b(" ",f.isCreating_$()?"L\xE9trehoz\xE1s":"Ment\xE9s"," ")}}function ue(l){return{id:`phase-${Date.now()}-${l}`,title:"",order:l,goal:"",phasePrompt:"",constraints:[],dod:[],repeatUntilDone:!1,subWorkflowTriggers:[]}}function Ve(){return{name:"",description:"",workflowType:"development",isTemplate:!1,masterPrompt:"",phases:[ue(0)]}}var O=(()=>{class l{workflow_DS=C(pe);globalError_CS=C(ae);modelRegistry_DS=C(se);workflows_$=w([]);editingWorkflow_$=w(null);isLoading_$=w(!1);isCreating_$=w(!1);isBestPracticesOpen_$=w(!1);generationPrompt_$=w("");modificationPrompt_$=w("");isGenerating_$=w(!1);isModifying_$=w(!1);isCopied_$=w(!1);availableModels_$=w([]);selectedProvider_$=w("");selectedModel_$=w("");workflowTypes=["development","research","testing","support","onboarding","review","poc","user-input","bug-report"];ngOnInit(){this.loadWorkflows(),this.loadAvailableModels(),this.restoreDraft()}loadWorkflows(){return x(this,null,function*(){try{this.isLoading_$.set(!0);let e=yield this.workflow_DS.listWorkflows();this.workflows_$.set(e)}catch(e){this.globalError_CS.showError(e,"workflow-settings")}finally{this.isLoading_$.set(!1)}})}handleCreateNew(){this.isCreating_$.set(!0),this.editingWorkflow_$.set(Ve()),this.persistDraft()}handleEdit(e){this.isCreating_$.set(!1),this.editingWorkflow_$.set(S(v({},e),{phases:[...e.phases]}))}handleCancel(){this.editingWorkflow_$.set(null),$.clear()}handleSave(){return x(this,null,function*(){let e=this.editingWorkflow_$();if(e)try{this.isLoading_$.set(!0),this.isCreating_$()?yield this.workflow_DS.createWorkflow({name:e.name,description:e.description,workflowType:e.workflowType,isTemplate:e.isTemplate,masterPrompt:e.masterPrompt,phases:e.phases,generationHistory:e.generationHistory}):e._id&&(yield this.workflow_DS.updateWorkflow({id:e._id,name:e.name,description:e.description,workflowType:e.workflowType,isTemplate:e.isTemplate,masterPrompt:e.masterPrompt,phases:e.phases,generationHistory:e.generationHistory})),this.editingWorkflow_$.set(null),$.clear(),yield this.loadWorkflows()}catch(t){this.globalError_CS.showError(t,"workflow-settings")}finally{this.isLoading_$.set(!1)}})}handleDelete(e){return x(this,null,function*(){if(e._id)try{this.isLoading_$.set(!0),yield this.workflow_DS.deleteWorkflow(e._id),yield this.loadWorkflows()}catch(t){this.globalError_CS.showError(t,"workflow-settings")}finally{this.isLoading_$.set(!1)}})}handleAddPhase(){let e=this.editingWorkflow_$();if(!e)return;let t=ue(e.phases.length);this.editingWorkflow_$.set(S(v({},e),{phases:[...e.phases,t]})),this.persistDraft()}handleRemovePhase(e){let t=this.editingWorkflow_$();if(!t)return;let r=t.phases.filter((a,_)=>_!==e);this.editingWorkflow_$.set(S(v({},t),{phases:r})),this.persistDraft()}handlePhaseFieldChange(e){let t=this.editingWorkflow_$();if(!t)return;let r=[...t.phases];r[e.index]=S(v({},r[e.index]),{[e.field]:e.value}),this.editingWorkflow_$.set(S(v({},t),{phases:r})),this.persistDraft()}handleGenerationPromptChange(e){this.generationPrompt_$.set(e),this.persistDraft()}handleGenerate(){return x(this,null,function*(){let e=this.generationPrompt_$().trim();if(e)try{this.isGenerating_$.set(!0);let t=this.selectedProvider_$(),r=this.selectedModel_$(),a=yield this.workflow_DS.generateWorkflow({description:e,provider:t||void 0,model:r||void 0}),_={type:"generation",prompt:e,timestamp:new Date().toISOString()};this.editingWorkflow_$.set({name:a.name??"",description:a.description??"",workflowType:a.workflowType??"development",isTemplate:a.isTemplate??!1,masterPrompt:a.masterPrompt??"",phases:Array.isArray(a.phases)?a.phases:[],generationHistory:[_]})}catch(t){this.globalError_CS.showError(t,"workflow-settings")}finally{this.isGenerating_$.set(!1)}})}handleModificationPromptChange(e){this.modificationPrompt_$.set(e),this.persistDraft()}handleModify(){return x(this,null,function*(){let e=this.modificationPrompt_$().trim(),t=this.editingWorkflow_$();if(!(!e||!t))try{this.isModifying_$.set(!0);let r=this.selectedProvider_$(),a=this.selectedModel_$(),_=yield this.workflow_DS.modifyWorkflow({currentWorkflow:t,modificationDescription:e,provider:r||void 0,model:a||void 0}),W={type:"modification",prompt:e,timestamp:new Date().toISOString()},f=t.generationHistory??[];this.editingWorkflow_$.set({_id:t._id,name:_.name??"",description:_.description??"",workflowType:_.workflowType??"development",isTemplate:_.isTemplate??!1,masterPrompt:_.masterPrompt??"",phases:Array.isArray(_.phases)?_.phases:[],generationHistory:[...f,W]}),this.persistDraft()}catch(r){this.globalError_CS.showError(r,"workflow-settings")}finally{this.isModifying_$.set(!1)}})}loadAvailableModels(){return x(this,null,function*(){try{let e=yield this.modelRegistry_DS.loadList({enabled:!0});this.availableModels_$.set(e)}catch(e){this.globalError_CS.showError(e,"workflow-settings")}})}handleModelSelectionChange(e){if(!e){this.selectedProvider_$.set(""),this.selectedModel_$.set("");return}let t=e.indexOf(":");t!==-1&&(this.selectedProvider_$.set(e.substring(0,t)),this.selectedModel_$.set(e.substring(t+1)),this.persistDraft())}handleToggleBestPractices(){this.isBestPracticesOpen_$.set(!this.isBestPracticesOpen_$())}handleFieldChange(e,t){let r=this.editingWorkflow_$();r&&(this.editingWorkflow_$.set(S(v({},r),{[e]:t})),this.persistDraft())}handleCopyMarkdown(){return x(this,null,function*(){let e=this.editingWorkflow_$();if(!e)return;let t=[];t.push(`# ${e.name||"N\xE9vtelen workflow"}`),t.push(""),e.description&&(t.push(`> ${e.description}`),t.push("")),t.push("| Mez\u0151 | \xC9rt\xE9k |"),t.push("|------|-------|"),t.push(`| T\xEDpus | ${e.workflowType} |`),t.push(`| Sablon | ${e.isTemplate?"igen":"nem"} |`),t.push(`| F\xE1zisok sz\xE1ma | ${e.phases.length} |`),t.push(""),e.masterPrompt&&(t.push("## Vez\xE9rprompt (master prompt)"),t.push(""),t.push(e.masterPrompt),t.push("")),t.push("## F\xE1zisok"),t.push("");for(let r of e.phases){if(t.push(`### ${r.order+1}. ${r.title||"N\xE9vtelen f\xE1zis"}`),t.push(""),r.goal&&(t.push(`**C\xE9l:** ${r.goal}`),t.push("")),r.phasePrompt&&(t.push("**F\xE1zis prompt:**"),t.push(""),t.push(r.phasePrompt),t.push("")),r.constraints.length){t.push("**Megk\xF6t\xE9sek:**");for(let a of r.constraints)t.push(`- ${a}`);t.push("")}if(r.dod.length){t.push("**Definition of Done:**");for(let a of r.dod)t.push(`- ${a}`);t.push("")}r.repeatUntilDone&&(t.push("*Ism\xE9tl\u0151d\u0151 f\xE1zis (am\xEDg PHASE_DONE)*"),t.push(""))}try{yield navigator.clipboard.writeText(t.join(`
|
|
1
|
+
import{a as se}from"./chunk-ORSJUOE3.js";import"./chunk-STCLN3NB.js";import"./chunk-SOK3YTM4.js";import"./chunk-EUPDWV3E.js";import{b as Z,c as ee,f as te,i as ne,n as ie,o as oe,p as re,v as j}from"./chunk-EO4DNTT4.js";import{a as A}from"./chunk-5UPNU54P.js";import{j as ae}from"./chunk-4PHQRDNC.js";import{I as le}from"./chunk-Y7D6YKUW.js";import{C,D as R,E as q,Fa as o,Ga as F,Ha as b,Ia as N,J as u,K as m,Kb as X,L as D,M as J,Ta as Y,Z as s,a as v,aa as w,b as S,d as B,da as k,ga as g,ia as I,k as x,la as h,na as K,oa as M,p as E,pa as z,qa as i,ra as n,sa as P,ua as y,ub as V,va as c,wa as p,xb as Q,y as T,z as U}from"./chunk-TBMJSIBB.js";var de=(()=>{class l{baseUrl=`${le.api.baseUrl}/workflow`;http=C(Q);listWorkflows(e){let t=[];e?.workflowType&&t.push(`type=${e.workflowType}`),e?.isTemplate!==void 0&&t.push(`isTemplate=${e.isTemplate}`);let r=t.length?`?${t.join("&")}`:"";return E(this.http.get(`${this.baseUrl}${r}`))}createWorkflow(e){return E(this.http.post(this.baseUrl,e))}getWorkflow(e){return E(this.http.get(`${this.baseUrl}/${e}`))}updateWorkflow(e){let a=e,{id:t}=a,r=B(a,["id"]);return E(this.http.put(`${this.baseUrl}/${t}`,r))}generateWorkflow(e){return E(this.http.post(`${this.baseUrl}/generate`,{description:e.description,provider:e.provider,model:e.model}))}modifyWorkflow(e){return E(this.http.post(`${this.baseUrl}/modify`,{currentWorkflow:e.currentWorkflow,modificationDescription:e.modificationDescription,provider:e.provider,model:e.model}))}deleteWorkflow(e){return E(this.http.delete(`${this.baseUrl}/${e}`))}static \u0275fac=function(t){return new(t||l)};static \u0275prov=T({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var pe=(()=>{class l{workflow_AS=C(de);listWorkflows(e){return x(this,null,function*(){return(yield this.workflow_AS.listWorkflows(e)).workflows})}createWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.createWorkflow(e)).workflow})}getWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.getWorkflow(e)).workflow})}updateWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.updateWorkflow(e)).workflow})}generateWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.generateWorkflow(e)).workflow})}modifyWorkflow(e){return x(this,null,function*(){return(yield this.workflow_AS.modifyWorkflow(e)).workflow})}deleteWorkflow(e){return x(this,null,function*(){return this.workflow_AS.deleteWorkflow(e)})}static \u0275fac=function(t){return new(t||l)};static \u0275prov=T({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var L="ccap-workflowSettingsDraft",$=class{static get(){let d=A.readJson(L,null);if(typeof d!="object"||d===null)return null;let e=d,t=typeof e.generationPrompt=="string"?e.generationPrompt:"",r=typeof e.modificationPrompt=="string"?e.modificationPrompt:"",a=typeof e.selectedProvider=="string"?e.selectedProvider:"",_=typeof e.selectedModel=="string"?e.selectedModel:"",W=typeof e.isCreating=="boolean"?e.isCreating:!1,f=e.editingWorkflow&&typeof e.editingWorkflow=="object"?e.editingWorkflow:null;return{generationPrompt:t,modificationPrompt:r,selectedProvider:a,selectedModel:_,isCreating:W,editingWorkflow:f}}static save(d){A.writeJson(L,d)}static clear(){A.remove(L)}};var me=(l,d)=>d._id,H=(l,d)=>d.id;function ce(l,d){if(l&1){let e=y();i(0,"button",5),c("click",function(){u(e);let r=p();return m(r.handleCreateNew())}),o(1," + \xDAj workflow "),n()}}function _e(l,d){l&1&&(i(0,"div",6),o(1,"Bet\xF6lt\xE9s..."),n())}function fe(l,d){l&1&&(i(0,"div",7),o(1," Nincs m\xE9g workflow. Hozz l\xE9tre egyet a gombbal. "),n())}function ge(l,d){l&1&&(i(0,"span",14),o(1," sablon "),n())}function xe(l,d){l&1&&(i(0,"span",15),o(1," Built-in "),n())}function we(l,d){if(l&1){let e=y();i(0,"button",20),c("click",function(){u(e);let r=p().$implicit,a=p(3);return m(a.handleEdit(r))}),o(1," Szerkeszt\xE9s "),n(),i(2,"button",21),c("click",function(){u(e);let r=p().$implicit,a=p(3);return m(a.handleDelete(r))}),o(3," T\xF6rl\xE9s "),n()}}function he(l,d){l&1&&(i(0,"span",19),o(1," Readonly "),n())}function ke(l,d){if(l&1&&(i(0,"div",9)(1,"div",10)(2,"div",11)(3,"span",12),o(4),n(),i(5,"span",13),o(6),n(),k(7,ge,2,0,"span",14)(8,xe,2,0,"span",15),n(),i(9,"p",16),o(10),n(),i(11,"div",17),o(12),n()(),i(13,"div",18),k(14,we,4,0)(15,he,2,0,"span",19),n()()),l&2){let e=d.$implicit;s(4),F(e.name),s(2),b(" ",e.workflowType," "),s(),h(e.isTemplate?7:-1),s(),h(e.isBuiltIn?8:-1),s(2),F(e.description),s(2),b(" ",e.phases.length," f\xE1zis "),s(2),h(e.isBuiltIn?15:14)}}function Ee(l,d){if(l&1&&(i(0,"div",8),M(1,ke,16,7,"div",9,me),n()),l&2){let e=p(2);s(),z(e.workflows_$())}}function Ce(l,d){if(l&1&&k(0,_e,2,0,"div",6)(1,fe,2,0,"div",7)(2,Ee,3,0,"div",8),l&2){let e=p();h(e.isLoading_$()?0:e.workflows_$().length===0?1:2)}}function be(l,d){l&1&&(D(),i(0,"svg",27),P(1,"polyline",52),n())}function ve(l,d){l&1&&(D(),i(0,"svg",27),P(1,"rect",53)(2,"path",54),n())}function Se(l,d){if(l&1&&(i(0,"option",41),o(1),n()),l&2){let e=d.$implicit;g("value",e.provider+":"+e.modelName),s(),N(" ",e.provider," / ",e.modelName," ")}}function ye(l,d){l&1&&(i(0,"span",56),o(1,"Az LLM dolgozik a workflow-n..."),n())}function $e(l,d){if(l&1){let e=y();i(0,"div",28)(1,"div",42)(2,"span",55),o(3,"Workflow gener\xE1l\xE1s"),n(),i(4,"span",56),o(5,"\u2014 \xEDrd le egyszer\u0171en, mit szeretn\xE9l"),n()(),i(6,"textarea",57),c("ngModelChange",function(r){u(e);let a=p(2);return m(a.handleGenerationPromptChange(r))}),o(7," "),n(),i(8,"div",58)(9,"div",42)(10,"label",56),o(11,"Modell:"),n(),i(12,"select",59),c("ngModelChange",function(r){u(e);let a=p(2);return m(a.handleModelSelectionChange(r))}),i(13,"option",60),o(14,"Alap\xE9rtelmezett"),n(),M(15,Se,2,3,"option",41,H),n()(),i(17,"button",61),c("click",function(){u(e);let r=p(2);return m(r.handleGenerate())}),o(18),n(),k(19,ye,2,0,"span",56),n()()}if(l&2){let e=p(2);s(6),g("ngModel",e.generationPrompt_$()),s(6),g("ngModel",e.selectedProvider_$()&&e.selectedModel_$()?e.selectedProvider_$()+":"+e.selectedModel_$():""),s(3),z(e.availableModels_$()),s(2),g("disabled",e.isGenerating_$()||!e.generationPrompt_$()),s(),b(" ",e.isGenerating_$()?"Gener\xE1l\xE1s...":"Gener\xE1l\xE1s"," "),s(),h(e.isGenerating_$()?19:-1)}}function We(l,d){if(l&1&&(i(0,"option",41),o(1),n()),l&2){let e=d.$implicit;g("value",e.provider+":"+e.modelName),s(),N(" ",e.provider," / ",e.modelName," ")}}function Me(l,d){l&1&&(i(0,"span",56),o(1,"Az LLM m\xF3dos\xEDtja a workflow-t..."),n())}function ze(l,d){if(l&1){let e=y();i(0,"div",29)(1,"div",42)(2,"span",62),o(3,"Workflow m\xF3dos\xEDt\xE1s"),n(),i(4,"span",56),o(5,"\u2014 \xEDrd le, mit szeretn\xE9l v\xE1ltoztatni"),n()(),i(6,"textarea",63),c("ngModelChange",function(r){u(e);let a=p(2);return m(a.handleModificationPromptChange(r))}),o(7," "),n(),i(8,"div",58)(9,"div",42)(10,"label",56),o(11,"Modell:"),n(),i(12,"select",64),c("ngModelChange",function(r){u(e);let a=p(2);return m(a.handleModelSelectionChange(r))}),i(13,"option",60),o(14,"Alap\xE9rtelmezett"),n(),M(15,We,2,3,"option",41,H),n()(),i(17,"button",65),c("click",function(){u(e);let r=p(2);return m(r.handleModify())}),o(18),n(),k(19,Me,2,0,"span",56),n()()}if(l&2){let e=p(2);s(6),g("ngModel",e.modificationPrompt_$()),s(6),g("ngModel",e.selectedProvider_$()&&e.selectedModel_$()?e.selectedProvider_$()+":"+e.selectedModel_$():""),s(3),z(e.availableModels_$()),s(2),g("disabled",e.isModifying_$()||!e.modificationPrompt_$()),s(),b(" ",e.isModifying_$()?"M\xF3dos\xEDt\xE1s...":"M\xF3dos\xEDt\xE1s"," "),s(),h(e.isModifying_$()?19:-1)}}function Te(l,d){l&1&&(i(0,"div",36)(1,"div")(2,"h3",66),o(3,"Fel\xE9p\xEDt\xE9s"),n(),i(4,"p"),o(5," Egy j\xF3 workflow "),i(6,"strong",67),o(7,"f\xE1zisokra"),n(),o(8," bontja a feladatot, ahol minden f\xE1zis egyetlen, j\xF3l meghat\xE1rozott c\xE9lt k\xF6vet. A "),i(9,"strong",67),o(10,"vez\xE9rprompt"),n(),o(11," (master prompt) az eg\xE9sz workflow-ra \xE9rv\xE9nyes alapszab\xE1lyokat \xE9s kontextust tartalmazza \u2014 ez minden f\xE1zisban automatikusan megjelenik. "),n()(),i(12,"div")(13,"h3",66),o(14,"Vez\xE9rprompt (master prompt)"),n(),i(15,"ul",68)(16,"li"),o(17,"Projekt kontextus: milyen repo, milyen stack, milyen nyelven dolgozunk"),n(),i(18,"li"),o(19,"Glob\xE1lis szab\xE1lyok: k\xF3dol\xE1si konvenci\xF3k, tiltott m\u0171veletek, commit policy"),n(),i(20,"li"),o(21,'Szerepk\xF6r: milyen "szaktud\xE1s\xFA" agent hajtja v\xE9gre a workflow-t'),n(),i(22,"li"),o(23,"Ne ism\xE9telj meg f\xE1zisonk\xE9nt olyat, ami ide tartozik \u2014 a master prompt mindig jelen van"),n()()(),i(24,"div")(25,"h3",66),o(26,"F\xE1zisok tervez\xE9se"),n(),i(27,"ul",68)(28,"li")(29,"strong",67),o(30,"C\xE9l (goal):"),n(),o(31," egyetlen mondat \u2014 a f\xE1zis sikeress\xE9g\xE9nek m\xE9rc\xE9je "),n(),i(32,"li")(33,"strong",67),o(34,"F\xE1zis prompt:"),n(),o(35,' konkr\xE9t, akci\xF3-orient\xE1lt utas\xEDt\xE1s. Ker\xFCld az \xE1ltal\xE1noss\xE1gokat ("n\xE9zd \xE1t a k\xF3dot") \u2014 \xEDrd le pontosan mit kell csin\xE1lni '),n(),i(36,"li")(37,"strong",67),o(38,"Ism\xE9tl\u0151d\u0151 f\xE1zis:"),n(),o(39,' ha a f\xE1zis nem egyl\xE9p\xE9ses (pl. iterat\xEDv fejleszt\xE9s), kapcsold be az "Ism\xE9tl\u0151d\u0151" opci\xF3t \u2014 a f\xE1zis addig fut, am\xEDg PHASE_DONE jelz\xE9s nem \xE9rkezik '),n()()(),i(40,"div")(41,"h3",66),o(42,"Tipikus f\xE1zis-sorrend"),n(),i(43,"div",69)(44,"span",70),o(45,"1. T\xE1j\xE9koz\xF3d\xE1s / Clarify"),n(),i(46,"span",24),o(47,"\u2192"),n(),i(48,"span",70),o(49,"2. Tervez\xE9s / Plan"),n(),i(50,"span",24),o(51,"\u2192"),n(),i(52,"span",70),o(53,"3. Megval\xF3s\xEDt\xE1s / Dev"),n(),i(54,"span",24),o(55,"\u2192"),n(),i(56,"span",70),o(57,"4. Tesztel\xE9s / Test"),n(),i(58,"span",24),o(59,"\u2192"),n(),i(60,"span",70),o(61,"5. Review / Doc"),n()(),i(62,"p",71),o(63," Nem minden workflow-nak kell minden f\xE1zist tartalmaznia \u2014 haszn\xE1ld azt, ami relev\xE1ns. "),n()(),i(64,"div")(65,"h3",66),o(66,"Tippek"),n(),i(67,"ul",68)(68,"li"),o(69,"A "),i(70,"strong",67),o(71,"sablon (template)"),n(),o(72," workflow-kat gener\xE1l\xE1shoz is haszn\xE1ljuk \u2014 jel\xF6ld be, ha m\xE1sok sz\xE1m\xE1ra is mintak\xE9nt szolg\xE1l"),n(),i(73,"li"),o(74,"A f\xE1zis prompt-ban hivatkozhatsz f\xE1jlokra, mapp\xE1kra, specifik\xE1ci\xF3kra \u2014 min\xE9l konkr\xE9tabb, ann\xE1l jobb"),n(),i(75,"li"),o(76,"T\xF6rekedj arra, hogy egy f\xE1zis "),i(77,"strong",67),o(78,"1 felel\u0151ss\xE9gi k\xF6rrel"),n(),o(79," rendelkezzen (single responsibility)"),n(),i(80,"li"),o(81,"Ha egy f\xE1zis t\xFAl hossz\xFA lenne, bontsd kett\xE9 \u2014 ink\xE1bb legyen t\xF6bb kis f\xE1zis, mint egy nagy"),n()()()())}function De(l,d){if(l&1&&(i(0,"option",41),o(1),n()),l&2){let e=d.$implicit;g("value",e),s(),F(e)}}function Pe(l,d){if(l&1){let e=y();i(0,"div",48)(1,"div",72)(2,"span",73),o(3),n(),i(4,"button",74),c("click",function(){let r=u(e).$index,a=p(2);return m(a.handleRemovePhase(r))}),o(5," Elt\xE1vol\xEDt\xE1s "),n()(),i(6,"div",75)(7,"div")(8,"label",76),o(9,"C\xEDm"),n(),i(10,"input",77),c("ngModelChange",function(r){let a=u(e).$index,_=p(2);return m(_.handlePhaseFieldChange({index:a,field:"title",value:r}))}),n()(),i(11,"div")(12,"label",76),o(13,"C\xE9l (goal)"),n(),i(14,"input",77),c("ngModelChange",function(r){let a=u(e).$index,_=p(2);return m(_.handlePhaseFieldChange({index:a,field:"goal",value:r}))}),n()()(),i(15,"div",78)(16,"label",76),o(17,"F\xE1zis prompt"),n(),i(18,"textarea",79),c("ngModelChange",function(r){let a=u(e).$index,_=p(2);return m(_.handlePhaseFieldChange({index:a,field:"phasePrompt",value:r}))}),o(19," "),n()(),i(20,"div",42)(21,"input",43),c("ngModelChange",function(r){let a=u(e).$index,_=p(2);return m(_.handlePhaseFieldChange({index:a,field:"repeatUntilDone",value:r}))}),n(),i(22,"label",80),o(23,"Ism\xE9tl\u0151d\u0151 (am\xEDg PHASE_DONE)"),n()()()}if(l&2){let e=d.$implicit,t=d.$index;s(3),b("F\xE1zis ",t+1,""),s(7),g("ngModel",e.title),s(4),g("ngModel",e.goal),s(4),g("ngModel",e.phasePrompt),s(3),g("ngModel",e.repeatUntilDone)}}function Fe(l,d){if(l&1){let e=y();i(0,"div",4)(1,"div",22)(2,"button",23),c("click",function(){u(e);let r=p();return m(r.handleCancel())}),o(3," \u2190 Vissza "),n(),i(4,"span",24),o(5,"|"),n(),i(6,"span",25),o(7),n(),i(8,"button",26),c("click",function(){u(e);let r=p();return m(r.handleCopyMarkdown())}),k(9,be,2,0,":svg:svg",27)(10,ve,3,0,":svg:svg",27),n()(),k(11,$e,20,5,"div",28)(12,ze,20,5,"div",29),i(13,"div",30)(14,"button",31),c("click",function(){u(e);let r=p();return m(r.handleToggleBestPractices())}),D(),i(15,"svg",32),P(16,"polyline",33),n(),J(),i(17,"span",34),o(18,"Workflow tervez\xE9si \xFAtmutat\xF3"),n(),i(19,"span",35),o(20,"best practices"),n()(),k(21,Te,82,0,"div",36),n(),i(22,"div",37)(23,"div")(24,"label",38),o(25,"N\xE9v"),n(),i(26,"input",39),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("name",r))}),n()(),i(27,"div")(28,"label",38),o(29,"T\xEDpus"),n(),i(30,"select",40),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("workflowType",r))}),M(31,De,2,2,"option",41,K),n()()(),i(33,"div")(34,"label",38),o(35,"Le\xEDr\xE1s"),n(),i(36,"input",39),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("description",r))}),n()(),i(37,"div",42)(38,"input",43),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("isTemplate",r))}),n(),i(39,"label",25),o(40,"Sablon (template)"),n()(),i(41,"div")(42,"label",38),o(43,"Vez\xE9rprompt (master prompt)"),n(),i(44,"textarea",44),c("ngModelChange",function(r){u(e);let a=p();return m(a.handleFieldChange("masterPrompt",r))}),o(45," "),n()(),i(46,"div")(47,"div",45)(48,"h2",46),o(49,"F\xE1zisok"),n(),i(50,"button",47),c("click",function(){u(e);let r=p();return m(r.handleAddPhase())}),o(51," + F\xE1zis "),n()(),M(52,Pe,24,5,"div",48,H),n(),i(54,"div",49)(55,"button",50),c("click",function(){u(e);let r=p();return m(r.handleSave())}),o(56),n(),i(57,"button",51),c("click",function(){u(e);let r=p();return m(r.handleCancel())}),o(58," M\xE9gse "),n()()()}if(l&2){let e,t,r,a,_,W,f=p();s(7),b(" ",f.isCreating_$()?"\xDAj workflow":"Szerkeszt\xE9s"," "),s(),I("text-neutral-500",!f.isCopied_$())("hover:text-neutral-200",!f.isCopied_$())("text-green-400",f.isCopied_$()),s(),h(f.isCopied_$()?9:10),s(2),h(f.isCreating_$()?11:-1),s(),h(f.isCreating_$()?-1:12),s(3),I("-rotate-90",!f.isBestPracticesOpen_$()),s(6),h(f.isBestPracticesOpen_$()?21:-1),s(5),g("ngModel",(e=f.editingWorkflow_$())==null?null:e.name),s(4),g("ngModel",(t=f.editingWorkflow_$())==null?null:t.workflowType),s(),z(f.workflowTypes),s(5),g("ngModel",(r=f.editingWorkflow_$())==null?null:r.description),s(2),g("ngModel",(a=f.editingWorkflow_$())==null?null:a.isTemplate),s(6),g("ngModel",(_=f.editingWorkflow_$())==null?null:_.masterPrompt),s(8),z((W=f.editingWorkflow_$())==null?null:W.phases),s(3),g("disabled",f.isLoading_$()),s(),b(" ",f.isCreating_$()?"L\xE9trehoz\xE1s":"Ment\xE9s"," ")}}function ue(l){return{id:`phase-${Date.now()}-${l}`,title:"",order:l,goal:"",phasePrompt:"",constraints:[],dod:[],repeatUntilDone:!1,subWorkflowTriggers:[]}}function Ve(){return{name:"",description:"",workflowType:"development",isTemplate:!1,masterPrompt:"",phases:[ue(0)]}}var O=(()=>{class l{workflow_DS=C(pe);globalError_CS=C(ae);modelRegistry_DS=C(se);workflows_$=w([]);editingWorkflow_$=w(null);isLoading_$=w(!1);isCreating_$=w(!1);isBestPracticesOpen_$=w(!1);generationPrompt_$=w("");modificationPrompt_$=w("");isGenerating_$=w(!1);isModifying_$=w(!1);isCopied_$=w(!1);availableModels_$=w([]);selectedProvider_$=w("");selectedModel_$=w("");workflowTypes=["development","research","testing","support","onboarding","review","poc","user-input","bug-report"];ngOnInit(){this.loadWorkflows(),this.loadAvailableModels(),this.restoreDraft()}loadWorkflows(){return x(this,null,function*(){try{this.isLoading_$.set(!0);let e=yield this.workflow_DS.listWorkflows();this.workflows_$.set(e)}catch(e){this.globalError_CS.showError(e,"workflow-settings")}finally{this.isLoading_$.set(!1)}})}handleCreateNew(){this.isCreating_$.set(!0),this.editingWorkflow_$.set(Ve()),this.persistDraft()}handleEdit(e){this.isCreating_$.set(!1),this.editingWorkflow_$.set(S(v({},e),{phases:[...e.phases]}))}handleCancel(){this.editingWorkflow_$.set(null),$.clear()}handleSave(){return x(this,null,function*(){let e=this.editingWorkflow_$();if(e)try{this.isLoading_$.set(!0),this.isCreating_$()?yield this.workflow_DS.createWorkflow({name:e.name,description:e.description,workflowType:e.workflowType,isTemplate:e.isTemplate,masterPrompt:e.masterPrompt,phases:e.phases,generationHistory:e.generationHistory}):e._id&&(yield this.workflow_DS.updateWorkflow({id:e._id,name:e.name,description:e.description,workflowType:e.workflowType,isTemplate:e.isTemplate,masterPrompt:e.masterPrompt,phases:e.phases,generationHistory:e.generationHistory})),this.editingWorkflow_$.set(null),$.clear(),yield this.loadWorkflows()}catch(t){this.globalError_CS.showError(t,"workflow-settings")}finally{this.isLoading_$.set(!1)}})}handleDelete(e){return x(this,null,function*(){if(e._id)try{this.isLoading_$.set(!0),yield this.workflow_DS.deleteWorkflow(e._id),yield this.loadWorkflows()}catch(t){this.globalError_CS.showError(t,"workflow-settings")}finally{this.isLoading_$.set(!1)}})}handleAddPhase(){let e=this.editingWorkflow_$();if(!e)return;let t=ue(e.phases.length);this.editingWorkflow_$.set(S(v({},e),{phases:[...e.phases,t]})),this.persistDraft()}handleRemovePhase(e){let t=this.editingWorkflow_$();if(!t)return;let r=t.phases.filter((a,_)=>_!==e);this.editingWorkflow_$.set(S(v({},t),{phases:r})),this.persistDraft()}handlePhaseFieldChange(e){let t=this.editingWorkflow_$();if(!t)return;let r=[...t.phases];r[e.index]=S(v({},r[e.index]),{[e.field]:e.value}),this.editingWorkflow_$.set(S(v({},t),{phases:r})),this.persistDraft()}handleGenerationPromptChange(e){this.generationPrompt_$.set(e),this.persistDraft()}handleGenerate(){return x(this,null,function*(){let e=this.generationPrompt_$().trim();if(e)try{this.isGenerating_$.set(!0);let t=this.selectedProvider_$(),r=this.selectedModel_$(),a=yield this.workflow_DS.generateWorkflow({description:e,provider:t||void 0,model:r||void 0}),_={type:"generation",prompt:e,timestamp:new Date().toISOString()};this.editingWorkflow_$.set({name:a.name??"",description:a.description??"",workflowType:a.workflowType??"development",isTemplate:a.isTemplate??!1,masterPrompt:a.masterPrompt??"",phases:Array.isArray(a.phases)?a.phases:[],generationHistory:[_]})}catch(t){this.globalError_CS.showError(t,"workflow-settings")}finally{this.isGenerating_$.set(!1)}})}handleModificationPromptChange(e){this.modificationPrompt_$.set(e),this.persistDraft()}handleModify(){return x(this,null,function*(){let e=this.modificationPrompt_$().trim(),t=this.editingWorkflow_$();if(!(!e||!t))try{this.isModifying_$.set(!0);let r=this.selectedProvider_$(),a=this.selectedModel_$(),_=yield this.workflow_DS.modifyWorkflow({currentWorkflow:t,modificationDescription:e,provider:r||void 0,model:a||void 0}),W={type:"modification",prompt:e,timestamp:new Date().toISOString()},f=t.generationHistory??[];this.editingWorkflow_$.set({_id:t._id,name:_.name??"",description:_.description??"",workflowType:_.workflowType??"development",isTemplate:_.isTemplate??!1,masterPrompt:_.masterPrompt??"",phases:Array.isArray(_.phases)?_.phases:[],generationHistory:[...f,W]}),this.persistDraft()}catch(r){this.globalError_CS.showError(r,"workflow-settings")}finally{this.isModifying_$.set(!1)}})}loadAvailableModels(){return x(this,null,function*(){try{let e=yield this.modelRegistry_DS.loadList({enabled:!0});this.availableModels_$.set(e)}catch(e){this.globalError_CS.showError(e,"workflow-settings")}})}handleModelSelectionChange(e){if(!e){this.selectedProvider_$.set(""),this.selectedModel_$.set("");return}let t=e.indexOf(":");t!==-1&&(this.selectedProvider_$.set(e.substring(0,t)),this.selectedModel_$.set(e.substring(t+1)),this.persistDraft())}handleToggleBestPractices(){this.isBestPracticesOpen_$.set(!this.isBestPracticesOpen_$())}handleFieldChange(e,t){let r=this.editingWorkflow_$();r&&(this.editingWorkflow_$.set(S(v({},r),{[e]:t})),this.persistDraft())}handleCopyMarkdown(){return x(this,null,function*(){let e=this.editingWorkflow_$();if(!e)return;let t=[];t.push(`# ${e.name||"N\xE9vtelen workflow"}`),t.push(""),e.description&&(t.push(`> ${e.description}`),t.push("")),t.push("| Mez\u0151 | \xC9rt\xE9k |"),t.push("|------|-------|"),t.push(`| T\xEDpus | ${e.workflowType} |`),t.push(`| Sablon | ${e.isTemplate?"igen":"nem"} |`),t.push(`| F\xE1zisok sz\xE1ma | ${e.phases.length} |`),t.push(""),e.masterPrompt&&(t.push("## Vez\xE9rprompt (master prompt)"),t.push(""),t.push(e.masterPrompt),t.push("")),t.push("## F\xE1zisok"),t.push("");for(let r of e.phases){if(t.push(`### ${r.order+1}. ${r.title||"N\xE9vtelen f\xE1zis"}`),t.push(""),r.goal&&(t.push(`**C\xE9l:** ${r.goal}`),t.push("")),r.phasePrompt&&(t.push("**F\xE1zis prompt:**"),t.push(""),t.push(r.phasePrompt),t.push("")),r.constraints.length){t.push("**Megk\xF6t\xE9sek:**");for(let a of r.constraints)t.push(`- ${a}`);t.push("")}if(r.dod.length){t.push("**Definition of Done:**");for(let a of r.dod)t.push(`- ${a}`);t.push("")}r.repeatUntilDone&&(t.push("*Ism\xE9tl\u0151d\u0151 f\xE1zis (am\xEDg PHASE_DONE)*"),t.push(""))}try{yield navigator.clipboard.writeText(t.join(`
|
|
2
2
|
`)),this.isCopied_$.set(!0),setTimeout(()=>this.isCopied_$.set(!1),2e3)}catch{}})}persistDraft(){$.save({generationPrompt:this.generationPrompt_$(),modificationPrompt:this.modificationPrompt_$(),selectedProvider:this.selectedProvider_$(),selectedModel:this.selectedModel_$(),isCreating:this.isCreating_$(),editingWorkflow:this.editingWorkflow_$()})}restoreDraft(){let e=$.get();e&&(this.generationPrompt_$.set(e.generationPrompt),this.modificationPrompt_$.set(e.modificationPrompt),this.selectedProvider_$.set(e.selectedProvider),this.selectedModel_$.set(e.selectedModel),e.editingWorkflow&&(this.isCreating_$.set(e.isCreating),this.editingWorkflow_$.set(e.editingWorkflow)))}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=R({type:l,selectors:[["app-ccap-workflow-settings"]],standalone:!0,features:[Y],decls:7,vars:3,consts:[[1,"max-w-4xl","mx-auto","p-4","gt-xs:p-6","text-neutral-100"],[1,"flex","items-center","justify-between","mb-6"],[1,"text-2xl","font-bold"],[1,"px-4","py-2","border","border-neonDefault","text-neonDefault","rounded","hover:bg-neonDefault/10","transition-colors","text-sm"],[1,"space-y-4"],[1,"px-4","py-2","border","border-neonDefault","text-neonDefault","rounded","hover:bg-neonDefault/10","transition-colors","text-sm",3,"click"],[1,"text-neutral-500","text-sm"],[1,"rounded-lg","border","border-neutral-700","bg-ccapSurface/50","p-6","text-center","text-neutral-500"],[1,"space-y-3"],[1,"rounded-lg","border","border-neutral-700","bg-ccapSurface/50","p-4","flex","items-start","justify-between","gap-4"],[1,"flex-1","min-w-0"],[1,"flex","items-center","gap-2","mb-1"],[1,"font-semibold","text-neutral-100","truncate"],[1,"text-xs","px-2","py-0.5","rounded","bg-neutral-700","text-neutral-300"],[1,"text-xs","px-2","py-0.5","rounded","bg-neonDefault/20","text-neonDefault"],[1,"text-xs","px-2","py-0.5","rounded","bg-neonCyan/20","text-neonCyan"],[1,"text-neutral-400","text-sm","truncate"],[1,"text-neutral-500","text-xs","mt-1"],[1,"flex","gap-2","shrink-0"],[1,"px-3","py-1.5","text-xs","text-neutral-500","italic"],[1,"px-3","py-1.5","text-xs","border","border-neutral-600","rounded","hover:border-neonDefault","hover:text-neonDefault","transition-colors",3,"click"],[1,"px-3","py-1.5","text-xs","border","border-neutral-600","rounded","text-red-400","hover:border-red-400","transition-colors",3,"click"],[1,"flex","items-center","gap-2","mb-2"],[1,"text-sm","text-neutral-400","hover:text-neutral-200","transition-colors",3,"click"],[1,"text-neutral-600"],[1,"text-sm","text-neutral-300"],["title","Workflow markdown m\xE1sol\xE1sa v\xE1g\xF3lapra",1,"ml-auto","p-1.5","transition-colors","rounded","hover:bg-neutral-700/50",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-4","h-4"],[1,"rounded-lg","border","border-neonDefault/30","bg-neonDefault/5","p-4","space-y-3"],[1,"rounded-lg","border","border-amber-500/30","bg-amber-500/5","p-4","space-y-3"],[1,"rounded-lg","border","border-neutral-700","bg-neutral-800/40"],[1,"w-full","flex","items-center","gap-2","px-4","py-3","text-left","text-sm","text-neutral-300","hover:text-neutral-100","transition-colors",3,"click"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"w-3","h-3","shrink-0","transition-transform","duration-150"],["points","6 9 12 15 18 9"],[1,"font-medium"],[1,"text-xs","text-neutral-500","ml-auto"],[1,"px-4","pb-4","text-sm","text-neutral-400","space-y-4","border-t","border-neutral-700","pt-3"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-4"],[1,"block","text-xs","text-neutral-400","mb-1"],["type","text",1,"w-full","bg-neutral-800","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","focus:border-neonDefault","outline-none",3,"ngModelChange","ngModel"],[1,"w-full","bg-neutral-800","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","focus:border-neonDefault","outline-none",3,"ngModelChange","ngModel"],[3,"value"],[1,"flex","items-center","gap-2"],["type","checkbox",1,"accent-neonDefault",3,"ngModelChange","ngModel"],["rows","4",1,"w-full","bg-neutral-800","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","focus:border-neonDefault","outline-none","resize-y",3,"ngModelChange","ngModel"],[1,"flex","items-center","justify-between","mb-2"],[1,"text-lg","font-semibold"],[1,"px-3","py-1","text-xs","border","border-neonDefault","text-neonDefault","rounded","hover:bg-neonDefault/10","transition-colors",3,"click"],[1,"rounded-lg","border","border-neutral-700","bg-neutral-800/50","p-4","mb-3"],[1,"flex","gap-3","pt-2"],[1,"px-5","py-2","border","border-neonDefault","text-neonDefault","rounded","hover:bg-neonDefault/10","transition-colors","text-sm",3,"click","disabled"],[1,"px-5","py-2","border","border-neutral-600","text-neutral-400","rounded","hover:border-neutral-400","transition-colors","text-sm",3,"click"],["points","20 6 9 17 4 12"],["x","9","y","9","width","13","height","13","rx","2","ry","2"],["d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"],[1,"text-sm","font-medium","text-neonDefault"],[1,"text-xs","text-neutral-500"],["rows","3","placeholder","Pl.: Szeretn\xE9k egy workflow-t, ami el\u0151sz\xF6r \xE1tn\xE9zi a k\xF3dot, azt\xE1n meg\xEDrja a teszteket, v\xE9g\xFCl review-olja az eg\xE9szet...",1,"w-full","bg-neutral-800","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","focus:border-neonDefault","outline-none","resize-y","placeholder:text-neutral-600",3,"ngModelChange","ngModel"],[1,"flex","items-center","gap-3"],[1,"bg-neutral-800","border","border-neutral-600","rounded","px-2","py-1.5","text-xs","text-neutral-100","focus:border-neonDefault","outline-none",3,"ngModelChange","ngModel"],["value",""],[1,"px-4","py-2","border","border-neonDefault","text-neonDefault","rounded","hover:bg-neonDefault/10","transition-colors","text-sm","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled"],[1,"text-sm","font-medium","text-amber-400"],["rows","3","placeholder","Pl.: Adj hozz\xE1 egy tesztel\xE9si f\xE1zist a megval\xF3s\xEDt\xE1s ut\xE1n, \xE9s tedd r\xE9szletesebb\xE9 a review f\xE1zis prompt-j\xE1t...",1,"w-full","bg-neutral-800","border","border-neutral-600","rounded","px-3","py-2","text-sm","text-neutral-100","focus:border-amber-400","outline-none","resize-y","placeholder:text-neutral-600",3,"ngModelChange","ngModel"],[1,"bg-neutral-800","border","border-neutral-600","rounded","px-2","py-1.5","text-xs","text-neutral-100","focus:border-amber-400","outline-none",3,"ngModelChange","ngModel"],[1,"px-4","py-2","border","border-amber-500","text-amber-400","rounded","hover:bg-amber-500/10","transition-colors","text-sm","disabled:opacity-40","disabled:cursor-not-allowed",3,"click","disabled"],[1,"text-neutral-200","font-semibold","mb-1"],[1,"text-neutral-300"],[1,"list-disc","list-inside","space-y-1"],[1,"flex","flex-wrap","gap-2","text-xs"],[1,"px-2","py-1","rounded","bg-neutral-700","text-neutral-300"],[1,"mt-2","text-xs","text-neutral-500"],[1,"flex","items-center","justify-between","mb-3"],[1,"text-sm","font-medium","text-neutral-300"],[1,"text-xs","text-red-400","hover:text-red-300","transition-colors",3,"click"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-3","mb-3"],[1,"block","text-xs","text-neutral-500","mb-1"],["type","text",1,"w-full","bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100","focus:border-neonDefault","outline-none",3,"ngModelChange","ngModel"],[1,"mb-3"],["rows","3",1,"w-full","bg-neutral-900","border","border-neutral-600","rounded","px-2","py-1.5","text-sm","text-neutral-100","focus:border-neonDefault","outline-none","resize-y",3,"ngModelChange","ngModel"],[1,"text-xs","text-neutral-400"]],template:function(t,r){t&1&&(i(0,"div",0)(1,"div",1)(2,"h1",2),o(3,"Workflow be\xE1ll\xEDt\xE1sok"),n(),k(4,ce,2,0,"button",3),n(),k(5,Ce,3,1)(6,Fe,59,20,"div",4),n()),t&2&&(s(4),h(r.editingWorkflow_$()?-1:4),s(),h(r.editingWorkflow_$()?-1:5),s(),h(r.editingWorkflow_$()?6:-1))},dependencies:[V,j,oe,re,ee,Z,ie,te,ne],encapsulation:2})}return l})();var je=[{path:"",pathMatch:"full",component:O}],mt=(()=>{class l{static \u0275fac=function(t){return new(t||l)};static \u0275mod=q({type:l});static \u0275inj=U({imports:[V,j,X.forChild(je),O]})}return l})();export{mt as WorkflowSettings_Module};
|
|
3
|
-
//# sourceMappingURL=wfs.module-
|
|
3
|
+
//# sourceMappingURL=wfs.module-6YOK72A2.js.map
|
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* REQ-CC-LIFECYCLE-DIAG-001 Slice 1+3 (cycle 936-937) — REG-TIMEOUT
|
|
3
|
+
* failure-classification + approach-warning timers.
|
|
4
|
+
*
|
|
5
|
+
* Extract a `cc-adapter-terminal.control-service.ts:waitForTerminalRegister`
|
|
6
|
+
* inline-logikájából (file-token-length küszöb + tisztább logika a
|
|
7
|
+
* control-service-ben).
|
|
8
|
+
*
|
|
9
|
+
* Repeated-window: 5 perc per-session. Több kategória kombinálódhat (pl.
|
|
10
|
+
* WORKSPACE-INVALID + REPEATED, ha a workspace utólag is törölt).
|
|
11
|
+
*/
|
|
12
|
+
export declare class CC_RegTimeoutClassifier_Util {
|
|
13
|
+
/** Ismételt timeout-jelzés ablaka: 5 perc. */
|
|
14
|
+
private static readonly REPEATED_WINDOW_MS;
|
|
15
|
+
/**
|
|
16
|
+
* REG-TIMEOUT hint-prefix kalkulációja. A `recentRegTimeouts` Map-et NEM
|
|
17
|
+
* módosítja — a hívó frissíti az új timestamp-pel a return után.
|
|
18
|
+
*/
|
|
19
|
+
static classifyTimeout(params: {
|
|
20
|
+
sessionId: string;
|
|
21
|
+
workspacePath: string;
|
|
22
|
+
recentRegTimeouts: Map<string, number>;
|
|
23
|
+
nowMs: number;
|
|
24
|
+
}): {
|
|
25
|
+
hintPrefix: string;
|
|
26
|
+
categories: string[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* REQ-CC-LIFECYCLE-DIAG-001 Slice 1 — 3 approach-warning timer (33% / 67% /
|
|
30
|
+
* 83%) felállítása `DyFM_Log.warn`-nel. Return: a setTimeout handle-ök
|
|
31
|
+
* tömbje — a hívó clearTimeout-olja resolve/reject ágban.
|
|
32
|
+
*/
|
|
33
|
+
static scheduleApproachWarnings(params: {
|
|
34
|
+
sessionId: string;
|
|
35
|
+
timeoutMs: number;
|
|
36
|
+
}): ReturnType<typeof setTimeout>[];
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=cc-reg-timeout-classifier.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cc-reg-timeout-classifier.util.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,qBAAa,4BAA4B;IAEvC,8CAA8C;IAC9C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAyB;IAEnE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE;QAC7B,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,EAAE,MAAM,CAAC;QACtB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACvC,KAAK,EAAE,MAAM,CAAC;KACf,GAAG;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE;IAqBhD;;;;OAIG;IACH,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE;QACtC,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,EAAE;CAkBpC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CC_RegTimeoutClassifier_Util = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
6
|
+
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
7
|
+
/**
|
|
8
|
+
* REQ-CC-LIFECYCLE-DIAG-001 Slice 1+3 (cycle 936-937) — REG-TIMEOUT
|
|
9
|
+
* failure-classification + approach-warning timers.
|
|
10
|
+
*
|
|
11
|
+
* Extract a `cc-adapter-terminal.control-service.ts:waitForTerminalRegister`
|
|
12
|
+
* inline-logikájából (file-token-length küszöb + tisztább logika a
|
|
13
|
+
* control-service-ben).
|
|
14
|
+
*
|
|
15
|
+
* Repeated-window: 5 perc per-session. Több kategória kombinálódhat (pl.
|
|
16
|
+
* WORKSPACE-INVALID + REPEATED, ha a workspace utólag is törölt).
|
|
17
|
+
*/
|
|
18
|
+
class CC_RegTimeoutClassifier_Util {
|
|
19
|
+
/** Ismételt timeout-jelzés ablaka: 5 perc. */
|
|
20
|
+
static REPEATED_WINDOW_MS = 5 * 60 * 1000;
|
|
21
|
+
/**
|
|
22
|
+
* REG-TIMEOUT hint-prefix kalkulációja. A `recentRegTimeouts` Map-et NEM
|
|
23
|
+
* módosítja — a hívó frissíti az új timestamp-pel a return után.
|
|
24
|
+
*/
|
|
25
|
+
static classifyTimeout(params) {
|
|
26
|
+
const categories = [];
|
|
27
|
+
if (!fs.existsSync(params.workspacePath)) {
|
|
28
|
+
categories.push('[WORKSPACE-INVALID]');
|
|
29
|
+
}
|
|
30
|
+
const previousMs = params.recentRegTimeouts.get(params.sessionId);
|
|
31
|
+
if (previousMs != null
|
|
32
|
+
&& params.nowMs - previousMs < CC_RegTimeoutClassifier_Util.REPEATED_WINDOW_MS) {
|
|
33
|
+
categories.push('[REPEATED REG-TIMEOUT]');
|
|
34
|
+
}
|
|
35
|
+
const hintPrefix = categories.length > 0
|
|
36
|
+
? categories.join(' ') + ' '
|
|
37
|
+
: '[STARTUP-FAILURE] ';
|
|
38
|
+
const finalCategories = categories.length > 0
|
|
39
|
+
? categories
|
|
40
|
+
: ['[STARTUP-FAILURE]'];
|
|
41
|
+
return { hintPrefix: hintPrefix, categories: finalCategories };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* REQ-CC-LIFECYCLE-DIAG-001 Slice 1 — 3 approach-warning timer (33% / 67% /
|
|
45
|
+
* 83%) felállítása `DyFM_Log.warn`-nel. Return: a setTimeout handle-ök
|
|
46
|
+
* tömbje — a hívó clearTimeout-olja resolve/reject ágban.
|
|
47
|
+
*/
|
|
48
|
+
static scheduleApproachWarnings(params) {
|
|
49
|
+
const handles = [];
|
|
50
|
+
const schedule = (fraction, label) => {
|
|
51
|
+
const h = setTimeout(() => {
|
|
52
|
+
fsm_dynamo_1.DyFM_Log.warn(`CC_AdapterTerminal | waitForTerminalRegister approaching REG-TIMEOUT`
|
|
53
|
+
+ ` | session: ${params.sessionId}`
|
|
54
|
+
+ ` | elapsed: ${label}`
|
|
55
|
+
+ ` | timeoutMs: ${params.timeoutMs}`);
|
|
56
|
+
}, Math.floor(params.timeoutMs * fraction));
|
|
57
|
+
handles.push(h);
|
|
58
|
+
};
|
|
59
|
+
schedule(0.33, '~33% (early)');
|
|
60
|
+
schedule(0.67, '~67% (mid)');
|
|
61
|
+
schedule(0.83, '~83% (late)');
|
|
62
|
+
return handles;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.CC_RegTimeoutClassifier_Util = CC_RegTimeoutClassifier_Util;
|
|
66
|
+
//# sourceMappingURL=cc-reg-timeout-classifier.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cc-reg-timeout-classifier.util.js","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.ts"],"names":[],"mappings":";;;;AAAA,+CAAyB;AAEzB,sDAAiD;AAEjD;;;;;;;;;;GAUG;AACH,MAAa,4BAA4B;IAEvC,8CAA8C;IACtC,MAAM,CAAU,kBAAkB,GAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;IAEnE;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,MAKtB;QACC,MAAM,UAAU,GAAa,EAAE,CAAC;QAChC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC;YACzC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACzC,CAAC;QACD,MAAM,UAAU,GAAuB,MAAM,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACtF,IACE,UAAU,IAAI,IAAI;eACf,MAAM,CAAC,KAAK,GAAG,UAAU,GAAG,4BAA4B,CAAC,kBAAkB,EAC9E,CAAC;YACD,UAAU,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAC5C,CAAC;QACD,MAAM,UAAU,GAAW,UAAU,CAAC,MAAM,GAAG,CAAC;YAC9C,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG;YAC5B,CAAC,CAAC,oBAAoB,CAAC;QACzB,MAAM,eAAe,GAAa,UAAU,CAAC,MAAM,GAAG,CAAC;YACrD,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,wBAAwB,CAAC,MAG/B;QACC,MAAM,OAAO,GAAoC,EAAE,CAAC;QACpD,MAAM,QAAQ,GAAG,CAAC,QAAgB,EAAE,KAAa,EAAQ,EAAE;YACzD,MAAM,CAAC,GAAkC,UAAU,CAAC,GAAS,EAAE;gBAC7D,qBAAQ,CAAC,IAAI,CACX,sEAAsE;sBACpE,eAAe,MAAM,CAAC,SAAS,EAAE;sBACjC,eAAe,KAAK,EAAE;sBACtB,iBAAiB,MAAM,CAAC,SAAS,EAAE,CACtC,CAAC;YACJ,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC;QACF,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QAC/B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAC7B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAC9B,OAAO,OAAO,CAAC;IACjB,CAAC;;AA5DH,oEA6DC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cc-reg-timeout-classifier.util.spec.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
5
|
+
const path = tslib_1.__importStar(require("path"));
|
|
6
|
+
const os = tslib_1.__importStar(require("os"));
|
|
7
|
+
const cc_reg_timeout_classifier_util_1 = require("./cc-reg-timeout-classifier.util");
|
|
8
|
+
/**
|
|
9
|
+
* REQ-CC-LIFECYCLE-DIAG-001 Slice 3 — REG-TIMEOUT classification spec.
|
|
10
|
+
*/
|
|
11
|
+
describe('CC_RegTimeoutClassifier_Util.classifyTimeout', () => {
|
|
12
|
+
let tempDir;
|
|
13
|
+
beforeAll(() => {
|
|
14
|
+
tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ccap-reg-timeout-test-'));
|
|
15
|
+
});
|
|
16
|
+
afterAll(() => {
|
|
17
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
18
|
+
});
|
|
19
|
+
it('existing workspace + no recent timeout → [STARTUP-FAILURE]', () => {
|
|
20
|
+
const result = cc_reg_timeout_classifier_util_1.CC_RegTimeoutClassifier_Util.classifyTimeout({
|
|
21
|
+
sessionId: 'sess-a',
|
|
22
|
+
workspacePath: tempDir,
|
|
23
|
+
recentRegTimeouts: new Map(),
|
|
24
|
+
nowMs: 1_000_000_000,
|
|
25
|
+
});
|
|
26
|
+
expect(result.categories).toEqual(['[STARTUP-FAILURE]']);
|
|
27
|
+
expect(result.hintPrefix).toBe('[STARTUP-FAILURE] ');
|
|
28
|
+
});
|
|
29
|
+
it('non-existent workspace → [WORKSPACE-INVALID]', () => {
|
|
30
|
+
const result = cc_reg_timeout_classifier_util_1.CC_RegTimeoutClassifier_Util.classifyTimeout({
|
|
31
|
+
sessionId: 'sess-b',
|
|
32
|
+
workspacePath: '/nonexistent-path-' + Date.now(),
|
|
33
|
+
recentRegTimeouts: new Map(),
|
|
34
|
+
nowMs: 1_000_000_000,
|
|
35
|
+
});
|
|
36
|
+
expect(result.categories).toEqual(['[WORKSPACE-INVALID]']);
|
|
37
|
+
expect(result.hintPrefix).toBe('[WORKSPACE-INVALID] ');
|
|
38
|
+
});
|
|
39
|
+
it('previous timeout < 5 min ago → [REPEATED REG-TIMEOUT]', () => {
|
|
40
|
+
const map = new Map();
|
|
41
|
+
const now = 1_000_000_000;
|
|
42
|
+
map.set('sess-c', now - 60_000); // 1 min ago
|
|
43
|
+
const result = cc_reg_timeout_classifier_util_1.CC_RegTimeoutClassifier_Util.classifyTimeout({
|
|
44
|
+
sessionId: 'sess-c',
|
|
45
|
+
workspacePath: tempDir,
|
|
46
|
+
recentRegTimeouts: map,
|
|
47
|
+
nowMs: now,
|
|
48
|
+
});
|
|
49
|
+
expect(result.categories).toEqual(['[REPEATED REG-TIMEOUT]']);
|
|
50
|
+
expect(result.hintPrefix).toBe('[REPEATED REG-TIMEOUT] ');
|
|
51
|
+
});
|
|
52
|
+
it('previous timeout > 5 min ago → [STARTUP-FAILURE] (window expired)', () => {
|
|
53
|
+
const map = new Map();
|
|
54
|
+
const now = 1_000_000_000;
|
|
55
|
+
map.set('sess-d', now - 6 * 60 * 1000); // 6 min ago
|
|
56
|
+
const result = cc_reg_timeout_classifier_util_1.CC_RegTimeoutClassifier_Util.classifyTimeout({
|
|
57
|
+
sessionId: 'sess-d',
|
|
58
|
+
workspacePath: tempDir,
|
|
59
|
+
recentRegTimeouts: map,
|
|
60
|
+
nowMs: now,
|
|
61
|
+
});
|
|
62
|
+
expect(result.categories).toEqual(['[STARTUP-FAILURE]']);
|
|
63
|
+
});
|
|
64
|
+
it('workspace invalid + repeated → kombinált 2 kategória', () => {
|
|
65
|
+
const map = new Map();
|
|
66
|
+
const now = 1_000_000_000;
|
|
67
|
+
map.set('sess-e', now - 30_000);
|
|
68
|
+
const result = cc_reg_timeout_classifier_util_1.CC_RegTimeoutClassifier_Util.classifyTimeout({
|
|
69
|
+
sessionId: 'sess-e',
|
|
70
|
+
workspacePath: '/nonexistent-' + Date.now(),
|
|
71
|
+
recentRegTimeouts: map,
|
|
72
|
+
nowMs: now,
|
|
73
|
+
});
|
|
74
|
+
expect(result.categories).toEqual(['[WORKSPACE-INVALID]', '[REPEATED REG-TIMEOUT]']);
|
|
75
|
+
expect(result.hintPrefix).toBe('[WORKSPACE-INVALID] [REPEATED REG-TIMEOUT] ');
|
|
76
|
+
});
|
|
77
|
+
it('repeated check sessionId-specifikus (másik session nem trigger)', () => {
|
|
78
|
+
const map = new Map();
|
|
79
|
+
const now = 1_000_000_000;
|
|
80
|
+
map.set('sess-other', now - 30_000);
|
|
81
|
+
const result = cc_reg_timeout_classifier_util_1.CC_RegTimeoutClassifier_Util.classifyTimeout({
|
|
82
|
+
sessionId: 'sess-f',
|
|
83
|
+
workspacePath: tempDir,
|
|
84
|
+
recentRegTimeouts: map,
|
|
85
|
+
nowMs: now,
|
|
86
|
+
});
|
|
87
|
+
expect(result.categories).toEqual(['[STARTUP-FAILURE]']);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
//# sourceMappingURL=cc-reg-timeout-classifier.util.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cc-reg-timeout-classifier.util.spec.js","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-reg-timeout-classifier.util.spec.ts"],"names":[],"mappings":";;;AAAA,+CAAyB;AACzB,mDAA6B;AAC7B,+CAAyB;AAEzB,qFAAgF;AAEhF;;GAEG;AAEH,QAAQ,CAAC,8CAA8C,EAAE,GAAS,EAAE;IAElE,IAAI,OAAe,CAAC;IAEpB,SAAS,CAAC,GAAS,EAAE;QACnB,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,GAAS,EAAE;QAClB,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE,GAAS,EAAE;QAC1E,MAAM,MAAM,GAAG,6DAA4B,CAAC,eAAe,CAAC;YAC1D,SAAS,EAAE,QAAQ;YACnB,aAAa,EAAE,OAAO;YACtB,iBAAiB,EAAE,IAAI,GAAG,EAAkB;YAC5C,KAAK,EAAE,aAAa;SACrB,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,UAAU,CA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aAAa,CAAC;QAClC,GAAG,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,GAAG,MAAM,CAAC,CAAC;QACpC,MAAM,MAAM,GAAG,6DAA4B,CAAC,eAAe,CAAC;YAC1D,SAAS,EAAE,QAAQ;YACnB,aAAa,EAAE,OAAO;YACtB,iBAAiB,EAAE,GAAG;YACtB,KAAK,EAAE,GAAG;SACX,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cc-terminal-runner-spawn.util.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-runner-spawn.util.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,sCAAsC,EAAE,MAAM,uEAAuE,CAAC;AAE/H;;;;;;;;;;;;;;GAcG;AAEH,qDAAqD;AACrD,qBAAa,2BAA2B;IAEtC;;;;;OAKG;WACU,0BAA0B,CAAC,MAAM,EAAE;QAC9C,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,sCAAsC,CAAC;IAOnD,gFAAgF;mBAC3D,cAAc;
|
|
1
|
+
{"version":3,"file":"cc-terminal-runner-spawn.util.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-runner-spawn.util.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,sCAAsC,EAAE,MAAM,uEAAuE,CAAC;AAE/H;;;;;;;;;;;;;;GAcG;AAEH,qDAAqD;AACrD,qBAAa,2BAA2B;IAEtC;;;;;OAKG;WACU,0BAA0B,CAAC,MAAM,EAAE;QAC9C,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,sCAAsC,CAAC;IAOnD,gFAAgF;mBAC3D,cAAc;IA+DnC,iGAAiG;mBAC5E,YAAY;CAoElC"}
|
|
@@ -61,10 +61,15 @@ class CC_TerminalRunnerSpawn_Util {
|
|
|
61
61
|
},
|
|
62
62
|
});
|
|
63
63
|
child.unref();
|
|
64
|
+
// REQ-CC-LIFECYCLE-DIAG-001 Slice 1 (cycle 936): bővített spawn-diagnosztika
|
|
65
|
+
// a runner-startup-failure root-cause-aihoz (pid + spawn-ts + args-length).
|
|
64
66
|
fsm_dynamo_1.DyFM_Log.info(`CC_AdapterTerminal | terminal runner spawned (win32)`
|
|
65
67
|
+ ` | session: ${params.sessionId}`
|
|
66
68
|
+ ` | terminalId: ${params.terminalId}`
|
|
67
|
-
+ ` | cmd: ${cmdPath}`
|
|
69
|
+
+ ` | cmd: ${cmdPath}`
|
|
70
|
+
+ ` | pid: ${child.pid ?? 'unknown'}`
|
|
71
|
+
+ ` | spawnTimestampMs: ${Date.now()}`
|
|
72
|
+
+ ` | argsLength: ${cmdArgs.join(' ').length}`);
|
|
68
73
|
return {
|
|
69
74
|
spawned: true,
|
|
70
75
|
spawnAttemptsCount: cmdCandidates.length,
|
|
@@ -115,11 +120,16 @@ class CC_TerminalRunnerSpawn_Util {
|
|
|
115
120
|
},
|
|
116
121
|
});
|
|
117
122
|
child.unref();
|
|
123
|
+
// REQ-CC-LIFECYCLE-DIAG-001 Slice 1 (cycle 936): bővített spawn-diagnosztika
|
|
124
|
+
// a runner-startup-failure root-cause-aihoz (pid + spawn-ts + args-length).
|
|
118
125
|
fsm_dynamo_1.DyFM_Log.info(`CC_AdapterTerminal | terminal runner spawned (linux)`
|
|
119
126
|
+ ` | session: ${params.sessionId}`
|
|
120
127
|
+ ` | terminalId: ${params.terminalId}`
|
|
121
128
|
+ ` | emulator: ${plan.emulatorKind}`
|
|
122
|
-
+ ` | binary: ${plan.binaryPath}`
|
|
129
|
+
+ ` | binary: ${plan.binaryPath}`
|
|
130
|
+
+ ` | pid: ${child.pid ?? 'unknown'}`
|
|
131
|
+
+ ` | spawnTimestampMs: ${Date.now()}`
|
|
132
|
+
+ ` | argsLength: ${plan.args.join(' ').length}`);
|
|
123
133
|
return {
|
|
124
134
|
spawned: true,
|
|
125
135
|
spawnAttemptsCount: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cc-terminal-runner-spawn.util.js","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-runner-spawn.util.ts"],"names":[],"mappings":";;;AAAA,iDAAoD;AAEpD,sDAA6D;AAE7D,6LAAyL;AACzL,+KAA2K;AAC3K,qJAAgJ;AAIhJ;;;;;;;;;;;;;;GAcG;AAEH,qDAAqD;AACrD,MAAa,2BAA2B;IAEtC;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,MAQvC;QACC,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;YACjC,OAAO,2BAA2B,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,2BAA2B,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;IAED,gFAAgF;IACxE,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,MAQnC;QACC,MAAM,OAAO,GAAa;YACxB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,MAAM,CAAC,aAAa;YAC1B,MAAM,CAAC,KAAK;YACZ,MAAM,CAAC,aAAa;YACpB,GAAG,MAAM,CAAC,UAAU;SACrB,CAAC;QACF,MAAM,aAAa,GACjB,sFAAyC,CAAC,gCAAgC,EAAE,CAAC;QAC/E,IAAI,cAAc,GAAW,EAAE,CAAC;QAChC,KAAK,MAAM,OAAO,IAAI,aAAa,EAAE,CAAC;YACpC,IAAI,CAAC;gBACH,MAAM,KAAK,GAAiB,IAAA,qBAAK,EAAC,OAAO,EAAE,OAAO,EAAE;oBAClD,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,QAAQ;oBACf,GAAG,EAAE,MAAM,CAAC,SAAS;iBACtB,CAAC,CAAC;gBACH,oGAAgD,CAAC,uCAAuC,CAAC;oBACvF,KAAK,EAAE,KAAK;oBACZ,OAAO,EAAE,4DAA4D,OAAO,EAAE;oBAC9E,OAAO,EAAE,CAAC,GAAU,EAAQ,EAAE;wBAC5B,cAAc,GAAG,GAAG,CAAC,OAAO,CAAC;oBAC/B,CAAC;iBACF,CAAC,CAAC;gBACH,KAAK,CAAC,KAAK,EAAE,CAAC;gBACd,qBAAQ,CAAC,IAAI,CACX,sDAAsD;sBACpD,eAAe,MAAM,CAAC,SAAS,EAAE;sBACjC,kBAAkB,MAAM,CAAC,UAAU,EAAE;sBACrC,WAAW,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cc-terminal-runner-spawn.util.js","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_collections/utils/terminal/cc-terminal-runner-spawn.util.ts"],"names":[],"mappings":";;;AAAA,iDAAoD;AAEpD,sDAA6D;AAE7D,6LAAyL;AACzL,+KAA2K;AAC3K,qJAAgJ;AAIhJ;;;;;;;;;;;;;;GAcG;AAEH,qDAAqD;AACrD,MAAa,2BAA2B;IAEtC;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,MAQvC;QACC,IAAI,OAAO,CAAC,QAAQ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,CAAC,CAAC;YACH,oGAAgD,CAAC,uCAAuC,CAAC;gBACvF,KAAK,EAAE,KAAK;gBACZ,OAAO,EAAE,iEAAiE,IAAI,CAAC,YAAY,EAAE;gBAC7F,OAAO,EAAE,CAAC,GAAU,EAAQ,EAAE;oBAC5B,cAAc,GAAG,GAAG,CAAC,OAAO,CAAC;gBAC/B,CAAC;aACF,CAAC,CAAC;YACH,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,6EAA6E;YAC7E,4EAA4E;YAC5E,qBAAQ,CAAC,IAAI,CACX,sDAAsD;kBACpD,eAAe,MAAM,CAAC,SAAS,EAAE;kBACjC,kBAAkB,MAAM,CAAC,UAAU,EAAE;kBACrC,gBAAgB,IAAI,CAAC,YAAY,EAAE;kBACnC,cAAc,IAAI,CAAC,UAAU,EAAE;kBAC/B,WAAW,KAAK,CAAC,GAAG,IAAI,SAAS,EAAE;kBACnC,wBAAwB,IAAI,CAAC,GAAG,EAAE,EAAE;kBACpC,kBAAkB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CACjD,CAAC;YACF,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,kBAAkB,EAAE,CAAC;gBACrB,YAAY,EAAE,IAAI,CAAC,UAAU;gBAC7B,cAAc,EAAE,cAAc;aAC/B,CAAC;QACJ,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,kBAAkB,EAAE,CAAC;gBACrB,YAAY,EAAE,EAAE;gBAChB,cAAc,EAAE,uBAAU,CAAC,eAAe,CAAC,GAAG,CAAC;aAChD,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA5JD,kEA4JC"}
|
|
@@ -20,6 +20,8 @@ export declare class CC_AdapterTerminal_ControlService extends DyNTS_SingletonSe
|
|
|
20
20
|
private terminalSocketPort;
|
|
21
21
|
/** Terminal mode: pending register resolve-ok (spawn → register várakozás). */
|
|
22
22
|
private pendingRegistrations;
|
|
23
|
+
/** REQ-CC-LIFECYCLE-DIAG-001 Slice 3: per-session REG-TIMEOUT timestamps (REPEATED-classification ablak 5 min). */
|
|
24
|
+
private recentRegTimeouts;
|
|
23
25
|
/** Terminal mode: azok a sessionId-k, amelyekhez volt már runner (reconnect grace period döntéshez). */
|
|
24
26
|
private hadRunnerSet;
|
|
25
27
|
/** Terminal mode: hadRunnerSet betöltés promise-a (recovery bevárhatja a DB load-ot). */
|
|
@@ -254,6 +256,8 @@ export declare class CC_AdapterTerminal_ControlService extends DyNTS_SingletonSe
|
|
|
254
256
|
}): Promise<void>;
|
|
255
257
|
/**
|
|
256
258
|
* Várakozás a runner cc:register event-jére (Promise-alapú timeout).
|
|
259
|
+
* REQ-CC-LIFECYCLE-DIAG-001 Slice 1+3: approach-warnings + hint-classification
|
|
260
|
+
* a `CC_RegTimeoutClassifier_Util`-on keresztül.
|
|
257
261
|
*/
|
|
258
262
|
private waitForTerminalRegister;
|
|
259
263
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cc-adapter-terminal.control-service.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"cc-adapter-terminal.control-service.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/_modules/external-sessions/_modules/claude-code/_services/core/terminal/cc-adapter-terminal.control-service.ts"],"names":[],"mappings":"AAKA,OAAO,EAAuB,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAqBpF,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAE5B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,yBAAyB,CAAC;AAEjC;;;;GAIG;AACH,qBAAa,iCAAkC,SAAQ,sBAAsB;IAE3E,MAAM,CAAC,WAAW,IAAI,iC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AO,CAAC,yBAAyB;IAmEjC;;OAEG;IACH,OAAO,CAAC,YAAY;IAgBpB;;OAEG;IACH,OAAO,CAAC,wBAAwB;CAWjC"}
|
|
@@ -24,6 +24,7 @@ const cc_terminal_lifecycle_control_service_1 = require("./cc-terminal-lifecycle
|
|
|
24
24
|
const cc_terminal_runner_spawn_util_1 = require("../../../_collections/utils/terminal/cc-terminal-runner-spawn.util");
|
|
25
25
|
const cc_terminal_runner_control_util_1 = require("../../../_collections/utils/terminal/cc-terminal-runner-control.util");
|
|
26
26
|
const cc_terminal_session_closed_guard_util_1 = require("../../../_collections/utils/terminal/cc-terminal-session-closed-guard.util");
|
|
27
|
+
const cc_reg_timeout_classifier_util_1 = require("../../../_collections/utils/terminal/cc-reg-timeout-classifier.util");
|
|
27
28
|
/**
|
|
28
29
|
* CC Session terminal mode adapter (singleton): Socket.IO namespace + runner lifecycle
|
|
29
30
|
* (spawn / output / exit / disconnect / sequence dedup / ack throttle / flap detect /
|
|
@@ -51,6 +52,8 @@ class CC_AdapterTerminal_ControlService extends nts_dynamo_1.DyNTS_SingletonServ
|
|
|
51
52
|
terminalSocketPort = 0;
|
|
52
53
|
/** Terminal mode: pending register resolve-ok (spawn → register várakozás). */
|
|
53
54
|
pendingRegistrations = new Map();
|
|
55
|
+
/** REQ-CC-LIFECYCLE-DIAG-001 Slice 3: per-session REG-TIMEOUT timestamps (REPEATED-classification ablak 5 min). */
|
|
56
|
+
recentRegTimeouts = new Map();
|
|
54
57
|
/** Terminal mode: azok a sessionId-k, amelyekhez volt már runner (reconnect grace period döntéshez). */
|
|
55
58
|
hadRunnerSet = new Set();
|
|
56
59
|
/** Terminal mode: hadRunnerSet betöltés promise-a (recovery bevárhatja a DB load-ot). */
|
|
@@ -454,6 +457,7 @@ class CC_AdapterTerminal_ControlService extends nts_dynamo_1.DyNTS_SingletonServ
|
|
|
454
457
|
await this.waitForTerminalRegister({
|
|
455
458
|
sessionId: params.sessionId,
|
|
456
459
|
timeoutMs: REGISTER_TIMEOUT_MS,
|
|
460
|
+
workspacePath: params.workspacePath,
|
|
457
461
|
});
|
|
458
462
|
}
|
|
459
463
|
catch (err) {
|
|
@@ -714,11 +718,29 @@ class CC_AdapterTerminal_ControlService extends nts_dynamo_1.DyNTS_SingletonServ
|
|
|
714
718
|
// ── Terminal mode: private ───────────────────────────────────
|
|
715
719
|
/**
|
|
716
720
|
* Várakozás a runner cc:register event-jére (Promise-alapú timeout).
|
|
721
|
+
* REQ-CC-LIFECYCLE-DIAG-001 Slice 1+3: approach-warnings + hint-classification
|
|
722
|
+
* a `CC_RegTimeoutClassifier_Util`-on keresztül.
|
|
717
723
|
*/
|
|
718
724
|
waitForTerminalRegister(params) {
|
|
719
725
|
return new Promise((resolve, reject) => {
|
|
726
|
+
const warningHandles = cc_reg_timeout_classifier_util_1.CC_RegTimeoutClassifier_Util.scheduleApproachWarnings({
|
|
727
|
+
sessionId: params.sessionId,
|
|
728
|
+
timeoutMs: params.timeoutMs,
|
|
729
|
+
});
|
|
720
730
|
const timeoutHandle = setTimeout(() => {
|
|
721
731
|
this.pendingRegistrations.delete(params.sessionId);
|
|
732
|
+
for (const w of warningHandles) {
|
|
733
|
+
clearTimeout(w);
|
|
734
|
+
}
|
|
735
|
+
const classification = cc_reg_timeout_classifier_util_1.CC_RegTimeoutClassifier_Util.classifyTimeout({
|
|
736
|
+
sessionId: params.sessionId,
|
|
737
|
+
workspacePath: params.workspacePath,
|
|
738
|
+
recentRegTimeouts: this.recentRegTimeouts,
|
|
739
|
+
nowMs: Date.now(),
|
|
740
|
+
});
|
|
741
|
+
this.recentRegTimeouts.set(params.sessionId, Date.now());
|
|
742
|
+
const hint = classification.hintPrefix
|
|
743
|
+
+ 'Runner window did not send cc:register — check fail-on-startup, Socket.IO connectivity, slow npm install.';
|
|
722
744
|
const regTimeoutError = new ccap_error_control_model_1.CCAP_Error({
|
|
723
745
|
message: `Terminal runner registration timeout for session: ${params.sessionId}`,
|
|
724
746
|
errorCode: 'CCAP-CCS-TERMINAL-REG-TIMEOUT',
|
|
@@ -729,7 +751,9 @@ class CC_AdapterTerminal_ControlService extends nts_dynamo_1.DyNTS_SingletonServ
|
|
|
729
751
|
source: 'cc-adapter-terminal | waitForTerminalRegister',
|
|
730
752
|
ccSessionId: params.sessionId,
|
|
731
753
|
timeoutMs: params.timeoutMs,
|
|
732
|
-
hint:
|
|
754
|
+
hint: hint,
|
|
755
|
+
hintCategories: classification.categories,
|
|
756
|
+
workspacePath: params.workspacePath,
|
|
733
757
|
},
|
|
734
758
|
}),
|
|
735
759
|
});
|
|
@@ -738,6 +762,9 @@ class CC_AdapterTerminal_ControlService extends nts_dynamo_1.DyNTS_SingletonServ
|
|
|
738
762
|
}, params.timeoutMs);
|
|
739
763
|
this.pendingRegistrations.set(params.sessionId, () => {
|
|
740
764
|
clearTimeout(timeoutHandle);
|
|
765
|
+
for (const w of warningHandles) {
|
|
766
|
+
clearTimeout(w);
|
|
767
|
+
}
|
|
741
768
|
resolve();
|
|
742
769
|
});
|
|
743
770
|
});
|