agentix-cli 0.50.0 → 0.51.0
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/apps/mac-voice/Sources/AgentXVoice/AgentClient.swift +67 -14
- package/apps/mac-voice/Sources/AgentXVoice/Config.swift +20 -3
- package/apps/mac-voice/Sources/AgentXVoice/Panel.swift +24 -31
- package/apps/mac-voice/Sources/AgentXVoice/Speech.swift +16 -2
- package/apps/mac-voice/Sources/AgentXVoice/StatusMenu.swift +173 -0
- package/apps/mac-voice/Sources/AgentXVoice/main.swift +62 -15
- package/dist/{App-KE4SURSS.js → App-QVNQ5BQK.js} +2 -2
- package/dist/{ChatApp-NNHIKXO2.js → ChatApp-CC57XC23.js} +2 -2
- package/dist/agent-ILH6ANOM.js +2 -0
- package/dist/{article-fields-L4D2BOGY.js → article-fields-PITN4NHA.js} +2 -2
- package/dist/{article-quality-44ONVGLN.js → article-quality-JFJMZWFQ.js} +2 -2
- package/dist/{audit-4245CX6P.js → audit-CMJ2TZ3K.js} +2 -2
- package/dist/{backfill-MTD2B62I.js → backfill-7TCF4SHG.js} +2 -2
- package/dist/{board-dashboard-RUOASCSQ.js → board-dashboard-XPPBRPQE.js} +117 -117
- package/dist/board-dashboard-XPPBRPQE.js.map +1 -0
- package/dist/{builtin-B67DMJ3M.js → builtin-W6KNX7RS.js} +2 -2
- package/dist/calibration-MCCVYGZQ.js +2 -0
- package/dist/{chunk-3SCPRYJB.js → chunk-2AXFYDWF.js} +2 -2
- package/dist/{chunk-4TITGMPX.js → chunk-2KQTE4XI.js} +2 -2
- package/dist/{chunk-QDE75R4U.js → chunk-6HAZ6YWI.js} +2 -2
- package/dist/{chunk-F4HZTZHW.js → chunk-72SZI2UW.js} +2 -2
- package/dist/{chunk-L2WSPY6S.js → chunk-7I7IEX4S.js} +2 -2
- package/dist/{chunk-OTW5MPFT.js → chunk-CAA546XN.js} +2 -2
- package/dist/{chunk-5XQCGPQJ.js → chunk-F7WY24UZ.js} +2 -2
- package/dist/{chunk-ZTEU5JVQ.js → chunk-FCPTN6NF.js} +2 -2
- package/dist/{chunk-AJONZWLT.js → chunk-FX3D7YON.js} +2 -2
- package/dist/{chunk-5ALS7SVV.js → chunk-H2TWRZC2.js} +2 -2
- package/dist/{chunk-WPMX3VGI.js → chunk-J3SOEFRE.js} +2 -2
- package/dist/{chunk-4NBWF4TL.js → chunk-JQR3NTHI.js} +2 -2
- package/dist/{chunk-OUZ7YVQZ.js → chunk-KFALP5NO.js} +2 -2
- package/dist/{chunk-Y6I3BYWV.js → chunk-LBMZP7TG.js} +95 -95
- package/dist/chunk-LBMZP7TG.js.map +1 -0
- package/dist/{chunk-WQLBJ2O5.js → chunk-PSDCRZZM.js} +6 -6
- package/dist/chunk-QIJLFPWE.js +2 -0
- package/dist/{chunk-PZCTCCC5.js → chunk-QP6XNTBB.js} +2 -2
- package/dist/{chunk-BH3GTCZ6.js → chunk-RGDKHYY2.js} +2 -2
- package/dist/{chunk-JVNFRS26.js → chunk-ROCUOXCW.js} +2 -2
- package/dist/{chunk-FULEQYM6.js → chunk-S7CVSKOX.js} +2 -2
- package/dist/chunk-S7CVSKOX.js.map +1 -0
- package/dist/{chunk-K33GIBSE.js → chunk-SIU6STB2.js} +2 -2
- package/dist/{chunk-P2ZYT5D6.js → chunk-SRCXUZM2.js} +5 -5
- package/dist/{chunk-P2ZYT5D6.js.map → chunk-SRCXUZM2.js.map} +1 -1
- package/dist/{chunk-LCIREYTD.js → chunk-SZJMS7K4.js} +2 -2
- package/dist/{chunk-AJ5RMU7X.js → chunk-TFVUOC2C.js} +2 -2
- package/dist/chunk-U67EG5IF.js +19 -0
- package/dist/chunk-U67EG5IF.js.map +1 -0
- package/dist/{chunk-BYD55JXH.js → chunk-UBRMOTBH.js} +181 -180
- package/dist/chunk-UBRMOTBH.js.map +1 -0
- package/dist/chunk-V7XZN3MQ.js +123 -0
- package/dist/chunk-V7XZN3MQ.js.map +1 -0
- package/dist/{chunk-NLZD2QKF.js → chunk-VMS3HVTT.js} +2 -2
- package/dist/{chunk-TUNQFPVA.js → chunk-WCMQRSVU.js} +2 -2
- package/dist/{chunk-OHA3J5ZV.js → chunk-WDQ3BPFS.js} +2 -2
- package/dist/{chunk-6VKCUMCN.js → chunk-WKTFP3SK.js} +2 -2
- package/dist/{chunk-Q7C3X3R6.js → chunk-WP6KLXTP.js} +2 -2
- package/dist/{chunk-IXUEJBHD.js → chunk-XZTR5MBJ.js} +2 -2
- package/dist/{chunk-W5C2GDNC.js → chunk-Y57CULGE.js} +2 -2
- package/dist/chunk-YE2BUU3Z.js +28 -0
- package/dist/chunk-YE2BUU3Z.js.map +1 -0
- package/dist/{chunk-TTL37CS5.js → chunk-YEV6W34S.js} +55 -55
- package/dist/{chunk-TTL37CS5.js.map → chunk-YEV6W34S.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/client-I7GAAM3T.js +2 -0
- package/dist/{compaction-PIZINFHR.js → compaction-NWPBPWY2.js} +4 -4
- package/dist/{config-R47ITLIY.js → config-TVW7UCKG.js} +2 -2
- package/dist/config-mutator-JHM53P5A.js +2 -0
- package/dist/{conflict-detector-ZPOT3M2C.js → conflict-detector-KS7OSS45.js} +2 -2
- package/dist/{context-planner-FJMU5WAT.js → context-planner-LJT5IKH6.js} +3 -3
- package/dist/debug-FTAGG7MN.js +2 -0
- package/dist/{discover-D4VVRNAI.js → discover-7YFQNYLC.js} +2 -2
- package/dist/doctor-CXFMV6PT.js +2 -0
- package/dist/{editor-chat-MOMQHMO4.js → editor-chat-V24MXQIB.js} +2 -2
- package/dist/{entry-triage-LK34TSQD.js → entry-triage-LZWMMLLN.js} +2 -2
- package/dist/{facts-YVEJOM7O.js → facts-4YPSHIXJ.js} +2 -2
- package/dist/{failure-candidates-ARRMFXRY.js → failure-candidates-RIXA3Y6D.js} +2 -2
- package/dist/heal-HVYQD3EZ.js +2 -0
- package/dist/index.d.ts +256 -6
- package/dist/index.js +2 -2
- package/dist/{ingest-whatsapp-NS4OWDOU.js → ingest-whatsapp-4POCTRTP.js} +2 -2
- package/dist/loader-EVHZ2R73.js +2 -0
- package/dist/loader-KKMG24O5.js +2 -0
- package/dist/memory-extract-MGGXIZTE.js +2 -0
- package/dist/{migrate-v2-V4WN2VVM.js → migrate-v2-5VGHWPBW.js} +2 -2
- package/dist/{ntfy-X7EPB3TG.js → ntfy-ZY2NPGBA.js} +2 -2
- package/dist/processes-CMTMB7LG.js +2 -0
- package/dist/program-ZCFMO4ZD.js +2 -0
- package/dist/{projects-api-QE6L65SK.js → projects-api-E337EQNV.js} +2 -2
- package/dist/{projects-mutate-MY7JTLSZ.js → projects-mutate-S5MY7V3V.js} +2 -2
- package/dist/promote-4T64VW5K.js +2 -0
- package/dist/proposals-O4B5LD5T.js +2 -0
- package/dist/providers-NRPX2FHP.js +2 -0
- package/dist/query-6IKL52WT.js +2 -0
- package/dist/{questions-4B4KSPXG.js → questions-2V2VGIT4.js} +2 -2
- package/dist/recipes-423CIPZ3.js +2 -0
- package/dist/registry-E4QUXHMQ.js +2 -0
- package/dist/{request-planner-PEAYYXAP.js → request-planner-BRLDCYU5.js} +2 -2
- package/dist/{review-candidates-W7NIHNAI.js → review-candidates-QWW5PDUU.js} +2 -2
- package/dist/{review-store-B4YE3EFK.js → review-store-PW3OBGZQ.js} +2 -2
- package/dist/{rotation-memo-QEO3COFH.js → rotation-memo-453FXKHQ.js} +2 -2
- package/dist/routing-DP6S7OJL.js +2 -0
- package/dist/runner-56G3N7M4.js +2 -0
- package/dist/schedule-tool-TPJ6GR47.js +2 -0
- package/dist/scheduler-7QPG6OTY.js +2 -0
- package/dist/seat-3KUNRM5Z.js +2 -0
- package/dist/{select-4XYRIZ5L.js → select-ILXHYJGD.js} +2 -2
- package/dist/shutdown-ZAF7RW25.js +2 -0
- package/dist/store-TWQPEM5V.js +2 -0
- package/dist/{subagent-2SJHSSJS.js → subagent-XY5N7TUU.js} +2 -2
- package/dist/{surface-usage-V2BX4SBD.js → surface-usage-HVVP22SA.js} +2 -2
- package/dist/timers-KK7GF77Y.js +2 -0
- package/dist/{tool-PAQ47HV2.js → tool-SF3BCY55.js} +2 -2
- package/dist/{triage-backtest-JNO7RKX7.js → triage-backtest-DLKYJSEB.js} +2 -2
- package/dist/types-DO3KLIBS.js +2 -0
- package/dist/types-S6NHM5C3.js +2 -0
- package/dist/{whatsapp-state-6D6FHHD2.js → whatsapp-state-LB3R32BK.js} +2 -2
- package/dist/wiki-WETANN3W.js +2 -0
- package/dist/{workspace-setup-G6KGWPHY.js → workspace-setup-42ARC42I.js} +2 -2
- package/package.json +1 -1
- package/dist/agent-RY7Z3IYY.js +0 -2
- package/dist/board-dashboard-RUOASCSQ.js.map +0 -1
- package/dist/calibration-ILS5OI44.js +0 -2
- package/dist/chunk-B5XHX44Y.js +0 -123
- package/dist/chunk-B5XHX44Y.js.map +0 -1
- package/dist/chunk-BYD55JXH.js.map +0 -1
- package/dist/chunk-EMI3VJLH.js +0 -28
- package/dist/chunk-EMI3VJLH.js.map +0 -1
- package/dist/chunk-FIOB3MEX.js +0 -2
- package/dist/chunk-FULEQYM6.js.map +0 -1
- package/dist/chunk-N2XXKFJ6.js +0 -19
- package/dist/chunk-N2XXKFJ6.js.map +0 -1
- package/dist/chunk-Y6I3BYWV.js.map +0 -1
- package/dist/client-JZTH46N2.js +0 -2
- package/dist/config-mutator-T6JGXJ26.js +0 -2
- package/dist/debug-3MEUO2P2.js +0 -2
- package/dist/doctor-2DMGAWMW.js +0 -2
- package/dist/heal-FVLBHYP7.js +0 -2
- package/dist/loader-4ZGTK7LD.js +0 -2
- package/dist/loader-BOKE5M5S.js +0 -2
- package/dist/memory-extract-OWTI6MN5.js +0 -2
- package/dist/processes-KUJJ7XE7.js +0 -2
- package/dist/program-KY5ZYPFN.js +0 -2
- package/dist/promote-57YNOVXV.js +0 -2
- package/dist/proposals-TX2HBBYV.js +0 -2
- package/dist/providers-KO2DODIO.js +0 -2
- package/dist/query-ZT7WXY2F.js +0 -2
- package/dist/recipes-7S4MC5OJ.js +0 -2
- package/dist/registry-LLAFJJN4.js +0 -2
- package/dist/routing-7LCO7UJ7.js +0 -2
- package/dist/runner-YRBVNYTY.js +0 -2
- package/dist/schedule-tool-ZD3VBUBW.js +0 -2
- package/dist/scheduler-GC3FQKXY.js +0 -2
- package/dist/seat-HR6QMAR2.js +0 -2
- package/dist/shutdown-6GCMKYAD.js +0 -2
- package/dist/store-MCOA6N4F.js +0 -2
- package/dist/timers-PCB4ZIBD.js +0 -2
- package/dist/types-H5ENIUIT.js +0 -2
- package/dist/types-OIFU3KSQ.js +0 -2
- package/dist/wiki-EREMPSAE.js +0 -2
- /package/dist/{App-KE4SURSS.js.map → App-QVNQ5BQK.js.map} +0 -0
- /package/dist/{ChatApp-NNHIKXO2.js.map → ChatApp-CC57XC23.js.map} +0 -0
- /package/dist/{agent-RY7Z3IYY.js.map → agent-ILH6ANOM.js.map} +0 -0
- /package/dist/{article-fields-L4D2BOGY.js.map → article-fields-PITN4NHA.js.map} +0 -0
- /package/dist/{article-quality-44ONVGLN.js.map → article-quality-JFJMZWFQ.js.map} +0 -0
- /package/dist/{audit-4245CX6P.js.map → audit-CMJ2TZ3K.js.map} +0 -0
- /package/dist/{backfill-MTD2B62I.js.map → backfill-7TCF4SHG.js.map} +0 -0
- /package/dist/{builtin-B67DMJ3M.js.map → builtin-W6KNX7RS.js.map} +0 -0
- /package/dist/{calibration-ILS5OI44.js.map → calibration-MCCVYGZQ.js.map} +0 -0
- /package/dist/{chunk-3SCPRYJB.js.map → chunk-2AXFYDWF.js.map} +0 -0
- /package/dist/{chunk-4TITGMPX.js.map → chunk-2KQTE4XI.js.map} +0 -0
- /package/dist/{chunk-QDE75R4U.js.map → chunk-6HAZ6YWI.js.map} +0 -0
- /package/dist/{chunk-F4HZTZHW.js.map → chunk-72SZI2UW.js.map} +0 -0
- /package/dist/{chunk-L2WSPY6S.js.map → chunk-7I7IEX4S.js.map} +0 -0
- /package/dist/{chunk-OTW5MPFT.js.map → chunk-CAA546XN.js.map} +0 -0
- /package/dist/{chunk-5XQCGPQJ.js.map → chunk-F7WY24UZ.js.map} +0 -0
- /package/dist/{chunk-ZTEU5JVQ.js.map → chunk-FCPTN6NF.js.map} +0 -0
- /package/dist/{chunk-AJONZWLT.js.map → chunk-FX3D7YON.js.map} +0 -0
- /package/dist/{chunk-5ALS7SVV.js.map → chunk-H2TWRZC2.js.map} +0 -0
- /package/dist/{chunk-WPMX3VGI.js.map → chunk-J3SOEFRE.js.map} +0 -0
- /package/dist/{chunk-4NBWF4TL.js.map → chunk-JQR3NTHI.js.map} +0 -0
- /package/dist/{chunk-OUZ7YVQZ.js.map → chunk-KFALP5NO.js.map} +0 -0
- /package/dist/{chunk-WQLBJ2O5.js.map → chunk-PSDCRZZM.js.map} +0 -0
- /package/dist/{chunk-FIOB3MEX.js.map → chunk-QIJLFPWE.js.map} +0 -0
- /package/dist/{chunk-PZCTCCC5.js.map → chunk-QP6XNTBB.js.map} +0 -0
- /package/dist/{chunk-BH3GTCZ6.js.map → chunk-RGDKHYY2.js.map} +0 -0
- /package/dist/{chunk-JVNFRS26.js.map → chunk-ROCUOXCW.js.map} +0 -0
- /package/dist/{chunk-K33GIBSE.js.map → chunk-SIU6STB2.js.map} +0 -0
- /package/dist/{chunk-LCIREYTD.js.map → chunk-SZJMS7K4.js.map} +0 -0
- /package/dist/{chunk-AJ5RMU7X.js.map → chunk-TFVUOC2C.js.map} +0 -0
- /package/dist/{chunk-NLZD2QKF.js.map → chunk-VMS3HVTT.js.map} +0 -0
- /package/dist/{chunk-TUNQFPVA.js.map → chunk-WCMQRSVU.js.map} +0 -0
- /package/dist/{chunk-OHA3J5ZV.js.map → chunk-WDQ3BPFS.js.map} +0 -0
- /package/dist/{chunk-6VKCUMCN.js.map → chunk-WKTFP3SK.js.map} +0 -0
- /package/dist/{chunk-Q7C3X3R6.js.map → chunk-WP6KLXTP.js.map} +0 -0
- /package/dist/{chunk-IXUEJBHD.js.map → chunk-XZTR5MBJ.js.map} +0 -0
- /package/dist/{chunk-W5C2GDNC.js.map → chunk-Y57CULGE.js.map} +0 -0
- /package/dist/{client-JZTH46N2.js.map → client-I7GAAM3T.js.map} +0 -0
- /package/dist/{compaction-PIZINFHR.js.map → compaction-NWPBPWY2.js.map} +0 -0
- /package/dist/{config-R47ITLIY.js.map → config-TVW7UCKG.js.map} +0 -0
- /package/dist/{config-mutator-T6JGXJ26.js.map → config-mutator-JHM53P5A.js.map} +0 -0
- /package/dist/{conflict-detector-ZPOT3M2C.js.map → conflict-detector-KS7OSS45.js.map} +0 -0
- /package/dist/{context-planner-FJMU5WAT.js.map → context-planner-LJT5IKH6.js.map} +0 -0
- /package/dist/{debug-3MEUO2P2.js.map → debug-FTAGG7MN.js.map} +0 -0
- /package/dist/{discover-D4VVRNAI.js.map → discover-7YFQNYLC.js.map} +0 -0
- /package/dist/{doctor-2DMGAWMW.js.map → doctor-CXFMV6PT.js.map} +0 -0
- /package/dist/{editor-chat-MOMQHMO4.js.map → editor-chat-V24MXQIB.js.map} +0 -0
- /package/dist/{entry-triage-LK34TSQD.js.map → entry-triage-LZWMMLLN.js.map} +0 -0
- /package/dist/{facts-YVEJOM7O.js.map → facts-4YPSHIXJ.js.map} +0 -0
- /package/dist/{failure-candidates-ARRMFXRY.js.map → failure-candidates-RIXA3Y6D.js.map} +0 -0
- /package/dist/{heal-FVLBHYP7.js.map → heal-HVYQD3EZ.js.map} +0 -0
- /package/dist/{ingest-whatsapp-NS4OWDOU.js.map → ingest-whatsapp-4POCTRTP.js.map} +0 -0
- /package/dist/{loader-4ZGTK7LD.js.map → loader-EVHZ2R73.js.map} +0 -0
- /package/dist/{loader-BOKE5M5S.js.map → loader-KKMG24O5.js.map} +0 -0
- /package/dist/{memory-extract-OWTI6MN5.js.map → memory-extract-MGGXIZTE.js.map} +0 -0
- /package/dist/{migrate-v2-V4WN2VVM.js.map → migrate-v2-5VGHWPBW.js.map} +0 -0
- /package/dist/{ntfy-X7EPB3TG.js.map → ntfy-ZY2NPGBA.js.map} +0 -0
- /package/dist/{processes-KUJJ7XE7.js.map → processes-CMTMB7LG.js.map} +0 -0
- /package/dist/{program-KY5ZYPFN.js.map → program-ZCFMO4ZD.js.map} +0 -0
- /package/dist/{projects-api-QE6L65SK.js.map → projects-api-E337EQNV.js.map} +0 -0
- /package/dist/{projects-mutate-MY7JTLSZ.js.map → projects-mutate-S5MY7V3V.js.map} +0 -0
- /package/dist/{promote-57YNOVXV.js.map → promote-4T64VW5K.js.map} +0 -0
- /package/dist/{proposals-TX2HBBYV.js.map → proposals-O4B5LD5T.js.map} +0 -0
- /package/dist/{providers-KO2DODIO.js.map → providers-NRPX2FHP.js.map} +0 -0
- /package/dist/{query-ZT7WXY2F.js.map → query-6IKL52WT.js.map} +0 -0
- /package/dist/{questions-4B4KSPXG.js.map → questions-2V2VGIT4.js.map} +0 -0
- /package/dist/{recipes-7S4MC5OJ.js.map → recipes-423CIPZ3.js.map} +0 -0
- /package/dist/{registry-LLAFJJN4.js.map → registry-E4QUXHMQ.js.map} +0 -0
- /package/dist/{request-planner-PEAYYXAP.js.map → request-planner-BRLDCYU5.js.map} +0 -0
- /package/dist/{review-candidates-W7NIHNAI.js.map → review-candidates-QWW5PDUU.js.map} +0 -0
- /package/dist/{review-store-B4YE3EFK.js.map → review-store-PW3OBGZQ.js.map} +0 -0
- /package/dist/{rotation-memo-QEO3COFH.js.map → rotation-memo-453FXKHQ.js.map} +0 -0
- /package/dist/{routing-7LCO7UJ7.js.map → routing-DP6S7OJL.js.map} +0 -0
- /package/dist/{runner-YRBVNYTY.js.map → runner-56G3N7M4.js.map} +0 -0
- /package/dist/{schedule-tool-ZD3VBUBW.js.map → schedule-tool-TPJ6GR47.js.map} +0 -0
- /package/dist/{scheduler-GC3FQKXY.js.map → scheduler-7QPG6OTY.js.map} +0 -0
- /package/dist/{seat-HR6QMAR2.js.map → seat-3KUNRM5Z.js.map} +0 -0
- /package/dist/{select-4XYRIZ5L.js.map → select-ILXHYJGD.js.map} +0 -0
- /package/dist/{shutdown-6GCMKYAD.js.map → shutdown-ZAF7RW25.js.map} +0 -0
- /package/dist/{store-MCOA6N4F.js.map → store-TWQPEM5V.js.map} +0 -0
- /package/dist/{subagent-2SJHSSJS.js.map → subagent-XY5N7TUU.js.map} +0 -0
- /package/dist/{surface-usage-V2BX4SBD.js.map → surface-usage-HVVP22SA.js.map} +0 -0
- /package/dist/{timers-PCB4ZIBD.js.map → timers-KK7GF77Y.js.map} +0 -0
- /package/dist/{tool-PAQ47HV2.js.map → tool-SF3BCY55.js.map} +0 -0
- /package/dist/{triage-backtest-JNO7RKX7.js.map → triage-backtest-DLKYJSEB.js.map} +0 -0
- /package/dist/{types-H5ENIUIT.js.map → types-DO3KLIBS.js.map} +0 -0
- /package/dist/{types-OIFU3KSQ.js.map → types-S6NHM5C3.js.map} +0 -0
- /package/dist/{whatsapp-state-6D6FHHD2.js.map → whatsapp-state-LB3R32BK.js.map} +0 -0
- /package/dist/{wiki-EREMPSAE.js.map → wiki-WETANN3W.js.map} +0 -0
- /package/dist/{workspace-setup-G6KGWPHY.js.map → workspace-setup-42ARC42I.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as n}from"./chunk-
|
|
2
|
+
import{a as n}from"./chunk-LBMZP7TG.js";import"./chunk-KFALP5NO.js";import"./chunk-WCMQRSVU.js";import"./chunk-Z3IP66SL.js";import"./chunk-4BNQSUWV.js";import"./chunk-CAA546XN.js";import"./chunk-RKPAVWXF.js";import"./chunk-GV7S5BAX.js";import"./chunk-GSX4NK2N.js";import"./chunk-SZDACK6O.js";import"./chunk-UBRMOTBH.js";import"./chunk-YE2BUU3Z.js";import"./chunk-QP6XNTBB.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S7CVSKOX.js";import"./chunk-WDQ3BPFS.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-L53FTKEP.js";import"./chunk-YEV6W34S.js";import"./chunk-U67EG5IF.js";import"./chunk-N6EWZGIX.js";import"./chunk-WP6KLXTP.js";import"./chunk-DP7RTNDM.js";import"./chunk-PSDCRZZM.js";import"./chunk-SFQUP3BP.js";import"./chunk-F7WY24UZ.js";import"./chunk-V7XZN3MQ.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VMS3HVTT.js";import"./chunk-H2TWRZC2.js";import"./chunk-DWADWDMU.js";import"./chunk-WKTFP3SK.js";import"./chunk-HRBKSZ34.js";import"./chunk-VWTBHLMX.js";import"./chunk-XZTR5MBJ.js";import"./chunk-ROCUOXCW.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-6HAZ6YWI.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import"./chunk-JQR3NTHI.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import"./chunk-SZJMS7K4.js";import"./chunk-7I7IEX4S.js";import"./chunk-VDMYBPYB.js";import"./chunk-DSYKYZMT.js";import"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";var r=["SIGINT","SIGTERM"];function o(t=process){for(let i of r)t.on(i,()=>{t.listenerCount(i)<=1&&t.exit(0)})}o();async function s(){let t=await n();if(process.argv.slice(2).length===0){t.outputHelp();return}t.parse()}s();
|
|
3
3
|
//# sourceMappingURL=cli.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y}from"./chunk-QOYAX2FT.js";import"./chunk-
|
|
1
|
+
import{a as y}from"./chunk-QOYAX2FT.js";import"./chunk-QIJLFPWE.js";import{readFileSync as O,writeFileSync as k,existsSync as w,mkdirSync as E}from"fs";import{resolve as f}from"path";function d(t,o){let n=new Map;for(let r of t){if(r.role!=="agent")continue;let s=y(r.content);for(let c of s)n.set(c,(n.get(c)||0)+1)}let e=[...n.entries()].sort((r,s)=>s[1]-r[1]).slice(0,50).map(([r])=>r);return{lexicon:n,toolCalls:o||[],topKeywords:e,capturedAt:new Date().toISOString(),messageCount:t.length}}function S(t,o){let n=T(t,o),{distance:e,newTools:r,missingTools:s}=b(t,o),c=I(t,o),a=Math.min(1,n*.4+e*.3+c*.3),m=t.topKeywords.filter(u=>!o.lexicon.has(u)||(o.lexicon.get(u)||0)===0).slice(0,10);return{overallScore:Math.round(a*100)/100,lexiconDecay:Math.round(n*100)/100,toolShift:Math.round(e*100)/100,semanticDrift:Math.round(c*100)/100,lostWords:m,newTools:r,missingTools:s}}function T(t,o){if(t.topKeywords.length===0)return 0;let n=0;for(let e of t.topKeywords)o.lexicon.has(e)||n++;return n/t.topKeywords.length}function b(t,o){let n=new Set(t.toolCalls),e=new Set(o.toolCalls);if(n.size===0&&e.size===0)return{distance:0,newTools:[],missingTools:[]};let r=[...n].filter(l=>e.has(l)),s=new Set([...n,...e]),a=1-r.length/s.size,m=[...e].filter(l=>!n.has(l)),u=[...n].filter(l=>!e.has(l));return{distance:a,newTools:m,missingTools:u}}function I(t,o){if(t.topKeywords.length===0)return 0;let n=new Set(o.topKeywords),e=0;for(let r of t.topKeywords)n.has(r)&&e++;return 1-e/t.topKeywords.length}var C=".agentx/drift";function M(t,o,n=process.cwd()){let e=f(n,C);w(e)||E(e,{recursive:!0});let r={...o,lexicon:Object.fromEntries(o.lexicon)};k(f(e,`${t}.json`),JSON.stringify(r,null,2))}function v(t,o=process.cwd()){let n=f(o,C,`${t}.json`);if(!w(n))return null;try{let e=JSON.parse(O(n,"utf-8"));return{...e,lexicon:new Map(Object.entries(e.lexicon))}}catch{return null}}var R="claude-haiku-4-20250514";var A=5e4,K=6,F=8,P=`You are a conversation summarizer. Given a conversation history between a user and an AI agent, produce a concise summary that preserves:
|
|
2
2
|
|
|
3
3
|
1. Key decisions made and their reasoning
|
|
4
4
|
2. Important facts learned (names, IDs, paths, URLs, credentials shared)
|
|
@@ -17,12 +17,12 @@ Format as a structured summary:
|
|
|
17
17
|
Keep it under 500 words. Prioritize actionable information over conversational flow.
|
|
18
18
|
Do NOT include greetings, acknowledgments, or meta-commentary about the conversation.`;function G(t){return t.length<F?!1:t.reduce((n,e)=>n+e.content.length,0)>A}async function J(t,o,n,e){if(t.length<F)return{summary:"",compactedCount:0,keptCount:t.length,memoryFlushed:!1};let r=Math.max(0,t.length-K),s=t.slice(0,r),c=t.slice(r);if(s.length===0)return{summary:"",compactedCount:0,keptCount:c.length,memoryFlushed:!1};let a=d(s);M(o,a);let m=!1;if(n)try{await $(o,s,n,e),m=!0}catch{}let u=j(s),l=await z(u),{qualityScore:i,lostEntities:g}=B(u,l),p,x=[{role:"agent",content:l,timestamp:new Date().toISOString()}],D=d(x),h=v(o);return h&&(p=S(h,D)),{summary:l,compactedCount:s.length,keptCount:c.length,memoryFlushed:m,qualityScore:i,lostEntities:g.length>0?g:void 0,drift:p&&p.overallScore>.1?p:void 0}}function B(t,o){let n=_(t);if(n.length===0)return{qualityScore:100,lostEntities:[]};let e=o.toLowerCase(),r=[],s=[];for(let a of n)e.includes(a.toLowerCase())?r.push(a):s.push(a);return{qualityScore:Math.round(r.length/n.length*100),lostEntities:s}}function _(t){let o=[],n=new Set,e=i=>{let g=i.toLowerCase().trim();g.length<3||n.has(g)||(n.add(g),o.push(i.trim()))},r=t.match(/https?:\/\/[^\s<>)"]+/g)||[];for(let i of r)e(i.slice(0,80));let s=t.match(/(?:\/[\w.-]+){2,}/g)||[];for(let i of s)e(i);let c=t.match(/[#!]\d{2,}/g)||[];for(let i of c)e(i);let a=t.match(/[\w.-]+@[\w.-]+\.\w+/g)||[];for(let i of a)e(i);let m=t.match(/"([^"]{3,40})"/g)||[];for(let i of m)e(i.slice(1,-1));let u=t.match(/[A-Z][a-z]+(?:\s+[A-Z][a-z]+)+/g)||[];for(let i of u)e(i);let l=t.match(/[a-f0-9]{8,}/gi)||[];for(let i of l.slice(0,5))e(i);return o.slice(0,30)}function W(t,o){if(o.compactedCount===0)return t;let n=t.slice(-o.keptCount);return[{role:"agent",name:"system",content:`[Compacted conversation summary \u2014 ${o.compactedCount} earlier messages]
|
|
19
19
|
|
|
20
|
-
${o.summary}`,timestamp:new Date().toISOString()},...n]}async function $(t,o,n,e){let r=[],s=[];for(let a of o)a.role==="user"?r.push(`${a.name||"User"}: ${a.content}`):s.push(a.content);if(r.length===0||s.length===0)return;let{extractMemories:c}=await import("./memory-extract-
|
|
20
|
+
${o.summary}`,timestamp:new Date().toISOString()},...n]}async function $(t,o,n,e){let r=[],s=[];for(let a of o)a.role==="user"?r.push(`${a.name||"User"}: ${a.content}`):s.push(a.content);if(r.length===0||s.length===0)return;let{extractMemories:c}=await import("./memory-extract-MGGXIZTE.js");await c(t,r.join(`
|
|
21
21
|
`),s.join(`
|
|
22
22
|
`),{channel:e?.channel??"compaction",chatId:e?.chatId??"flush",sender:"compaction"},n)}function j(t){return t.map(o=>{let n=o.timestamp.slice(11,16),e=o.role==="user"?o.name||"User":o.name||"Agent";return`[${n}] ${e}: ${o.content}`}).join(`
|
|
23
23
|
|
|
24
|
-
`)}async function z(t){let n=t.length>2e4?t.slice(-2e4):t;try{let{createProvider:e}=await import("./providers-
|
|
24
|
+
`)}async function z(t){let n=t.length>2e4?t.slice(-2e4):t;try{let{createProvider:e}=await import("./providers-NRPX2FHP.js");return(await e("claude").generate([{role:"system",content:P},{role:"user",content:n}],{model:R,maxTokens:1024})).content.trim()}catch{let s=t.split(`
|
|
25
25
|
`).slice(-20);return`[Summary unavailable \u2014 keeping last ${s.length} lines]
|
|
26
26
|
${s.join(`
|
|
27
27
|
`)}`}}export{W as applyCompaction,J as compactSession,G as needsCompaction};
|
|
28
|
-
//# sourceMappingURL=compaction-
|
|
28
|
+
//# sourceMappingURL=compaction-NWPBPWY2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as a,j as b,k as c,l as d,m as e,n as f,p as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=config-
|
|
1
|
+
import{i as a,j as b,k as c,l as d,m as e,n as f,p as g}from"./chunk-SRCXUZM2.js";import"./chunk-QIJLFPWE.js";g();export{a as INTEGRATION_KINDS,b as approvalsConfigSchema,c as daemonConfigSchema,d as expandEnvVars,e as loadDaemonConfig,f as validateWorkspaces};
|
|
2
|
+
//# sourceMappingURL=config-TVW7UCKG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-
|
|
2
|
-
//# sourceMappingURL=conflict-detector-
|
|
1
|
+
import"./chunk-QIJLFPWE.js";function u(r,g){let n=[];for(let o of r)n.push(...c(o,g));return n}function c(r,g){let n=[],o=g.channels.gitlab;if(!o?.enabled||!o.agentMappings?.length)return n;let l=new Set(["on:gitlab-issue","on:gitlab-mr","on:gitlab-note"]);for(let i of r.nodes){let s,t;if(i.type==="trigger.channel"){let e=i.config;if(e?.source!=="gitlab-issue")continue;t=e.filter?.project,s=`trigger.channel(gitlab-issue, project=${t??"*"})`}else if(i.type==="trigger.hook"){let e=i.config;if(!e?.event||!l.has(e.event))continue;t=void 0,s=`trigger.hook(${e.event})`}else continue;let a=o.agentMappings.filter(e=>!t||t==="*"?!0:o.routes.find(f=>f.project===t)?.agent===e.agentId);a.length!==0&&n.push({kind:"workflow-vs-gitlab-agentmapping",severity:"warn",workflowId:r.id,summary:`workflow "${r.id}" ${s} overlaps with gitlab agentMapping(s) ${a.map(e=>e.agentId).join(", ")}`,details:{triggerNodeId:i.id,triggerType:i.type,project:t??"*",overlappingAgents:a.map(e=>e.agentId)},suggestion:"set `hookBlocked: true` on the gitlab trigger so the channel router's default-target dispatch defers to the workflow",autoFix:!0})}return n}export{u as detectConflicts};
|
|
2
|
+
//# sourceMappingURL=conflict-detector-KS7OSS45.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as y,b as C}from"./chunk-
|
|
1
|
+
import{a as y,b as C}from"./chunk-FX3D7YON.js";import"./chunk-QIJLFPWE.js";C();var I="claude-haiku-4-5-20251001",M=`You are a context planner for an AI agent. Given the user's current message and recent conversation tail, decide what historical context the agent needs.
|
|
2
2
|
|
|
3
3
|
Output ONE JSON object on one line, no prose, no fences:
|
|
4
4
|
{ "recentTurns": number, "memory": { "include": boolean, "query": string }, "crossChat": boolean, "reasoning": string }
|
|
@@ -11,7 +11,7 @@ Rules:
|
|
|
11
11
|
|
|
12
12
|
Be conservative \u2014 unneeded context costs tokens. When in doubt, exclude.`;async function P(e){let c=Date.now(),i=e.timeoutMs??8e3,r=T(e.sessions,e.agentId,e.channel,e.chatId,4),o=[`Agent: ${e.agentId}`,`Channel: ${e.channel}`,r?`Recent conversation:
|
|
13
13
|
${r}`:"Recent conversation: (none \u2014 first message)","",`Current message: ${e.message.slice(0,1500)}`].join(`
|
|
14
|
-
`),n;try{let{createProvider:m}=await import("./providers-
|
|
14
|
+
`),n;try{let{createProvider:m}=await import("./providers-NRPX2FHP.js"),b=m("claude"),p=new AbortController,x=setTimeout(()=>p.abort(),i);try{let S=await b.generate([{role:"system",content:M},{role:"user",content:o}],{model:I,maxTokens:256});n=y(S.content)}finally{clearTimeout(x)}}catch(m){return process.env.AGENTX_PLANNER_DEBUG&&console.error(`[planner] error: ${m?.message??m}`),null}if(!n||typeof n!="object")return null;let l=v(n.recentTurns,0,6,3),t=!!n.memory?.include,s=typeof n.memory?.query=="string"?n.memory.query:"",a=!!n.crossChat,g=typeof n.reasoning=="string"?n.reasoning:void 0,f=w(e.sessions,e.agentId,e.channel,e.chatId,l),u="",h=[];if(t&&s)try{let m=e.memoryStore.findRelevant(s,e.agentId,5);u=e.memoryStore.buildContext(m),h=e.memoryStore.contextFacts(m)}catch{}let d="";return a&&(d=e.sessions.getCrossSessionSummary(e.agentId,e.channel,e.chatId,"")),{sessionHistory:f,memoryContext:u,memoryFacts:h,crossChatContext:d,debug:{recentTurns:l,memoryIncluded:t,memoryQuery:s||void 0,crossChatIncluded:a,reasoning:g,planLatencyMs:Date.now()-c}}}function w(e,c,i,r,o){if(o<=0)return"";let n=e.getSession(c,i,r);if(n.messages.length===0)return"";let l=Math.min(n.messages.length,o*2),t=n.messages.slice(-l),s=[`[Recent exchange \u2014 last ${t.length} messages]`];for(let a of t){let g=a.name||(a.role==="user"?"User":"Agent");s.push(`${g}: ${a.content}`)}return s.push("[End recent exchange \u2014 respond to the latest message above]"),s.push(""),s.join(`
|
|
15
15
|
`)}function T(e,c,i,r,o){let n=e.getSession(c,i,r);return n.messages.length===0?"":n.messages.slice(-o).map(t=>{let s=t.name||(t.role==="user"?"User":"Agent"),a=t.content.length>200?t.content.slice(0,200)+"\u2026":t.content;return` ${s}: ${a}`}).join(`
|
|
16
16
|
`)}function v(e,c,i,r){let o=typeof e=="number"?Math.floor(e):Number.parseInt(String(e??""),10);return Number.isFinite(o)?Math.min(i,Math.max(c,o)):r}export{P as planContext};
|
|
17
|
-
//# sourceMappingURL=context-planner-
|
|
17
|
+
//# sourceMappingURL=context-planner-LJT5IKH6.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-QIJLFPWE.js";var $=/\bssh\s+(?:-i\s+(\S+)\s+)?([a-z_][a-z0-9_-]*)@([a-z0-9][a-z0-9.-]+|\d{1,3}(?:\.\d{1,3}){3})/gi,R=/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,y=/\b([a-z0-9][a-z0-9._-]*)@([a-z0-9][a-z0-9.-]+\.[a-z]{2,})\b/gi;var k=/groups\/([a-z0-9][a-z0-9._-]+)[^\n|]*\(?\s*ID:?\s*(\d+)\s*\)?/gi,_=/(\/Users\/[^\s)`'"\]]+|\/home\/[^\s)`'"\]]+|\/var\/www\/[^\s)`'"\]]+|\/etc\/[^\s)`'"\]]+)/g,v=/(\+\d{1,3}[\s.-]?(?:\(\d+\)[\s.-]?)?\d[\s.\d-]{6,}\d)/g,z=/^(?:127\.|10\.|192\.168\.|172\.(?:1[6-9]|2\d|3[01])\.)/;function x(i,r){let s={byKind:{ssh:[],gitlab:[],path:[],contact:[]},scannedSkills:[],diagnostics:[]},c=new Set;for(let a of i){let e=a.frontmatter,n=a.instructions??"";if(r.filter?.length){let t=[e.name,e.description,...e.tags??[],e.category??"",a.path??"",n.slice(0,500)].join(" ").toLowerCase();if(!r.filter.some(u=>t.includes(u.toLowerCase())))continue}s.scannedSkills.push(e.name);let o=e.name;for(let t of w(n,r.namespace,o))m(s,t,"ssh",c)&&s.diagnostics.push({skill:e.name,kind:"ssh",id:t.id});for(let t of E(n,r.namespace,r.gitlabHost))m(s,t,"gitlab",c)&&s.diagnostics.push({skill:e.name,kind:"gitlab",id:t.id});for(let t of I(n,r.namespace))m(s,t,"path",c)&&s.diagnostics.push({skill:e.name,kind:"path",id:t.id});for(let t of j(n,r.namespace))m(s,t,"contact",c)&&s.diagnostics.push({skill:e.name,kind:"contact",id:t.id})}return s}function m(i,r,s,c){return c.has(r.id)?!1:(c.add(r.id),i.byKind[s].push(r),!0)}function w(i,r,s){let c=[];for(let e of i.matchAll($)){let[,n,o,t]=e;if(!o||!t)continue;let d=g(`${o}-${t.replace(/[^a-z0-9-]/gi,"-")}`);c.push({id:`${r}.ssh.${d}`,kind:"ssh",summary:`SSH ${o}@${t}`,fields:D({user:o,host:t,key:n}),tags:["discovered"],ownerAgent:s})}let a=new Set(c.flatMap(e=>Object.values(e.fields)));for(let e of i.matchAll(R)){let n=e[0];if(a.has(n)||z.test(n))continue;let o=g(`host-${n.replace(/\./g,"-")}`);c.push({id:`${r}.ssh.${o}`,kind:"ssh",summary:`Host ${n} (user not detected \u2014 fill in)`,fields:{host:n},tags:["discovered","needs-review"],ownerAgent:s}),a.add(n)}return c}var C=/\b([a-z0-9][a-z0-9._-]{1,40})\/([a-z0-9][a-z0-9._-]{1,40})\b/i,A=/\b(\d{1,8})\b/g;function E(i,r,s){let c=[];if(s&&!i.includes(s.replace(/^https?:\/\//,"")))return c;for(let e of i.matchAll(k)){let[,n,o]=e;!n||!o||c.push({id:`${r}.gitlab.group.${g(n)}`,kind:"gitlab",summary:`GitLab group ${n}`,fields:{groupId:Number(o),path:n},tags:["discovered"]})}let a=new RegExp(C.source,"gi");for(let e of i.split(/\r?\n/)){if(!/^\s*\|.+\|/.test(e)&&!/\bID[:\s]/i.test(e)&&!/gitlab/i.test(e))continue;let o,t,d=e.match(/https?:\/\/[^\s)]*gitlab[^\s)]*?\/([a-z0-9][a-z0-9._-]+)\/([a-z0-9][a-z0-9._-]+)/i);if(d&&d[1]&&d[2])o=d[1],t=d[2].replace(/[).,;:]+$/,"");else for(let f of e.matchAll(a)){let p=f[1],h=f[2];!p||!h||p==="wp-content"||h==="wp-content"||p.includes(".")||S(h)||(o=p,t=h)}if(!o||!t)continue;let l=[...e.matchAll(A)].map(f=>Number(f[1])).find(f=>f>=10&&f<=9999999);l&&c.push({id:`${r}.gitlab.project.${g(t)}`,kind:"gitlab",summary:`GitLab project ${o}/${t}`,fields:{projectId:l,path:`${o}/${t}`},tags:["discovered"]})}return c}function S(i){return/\.(md|ya?ml|json|ts|tsx|js|jsx|py|sh|conf|env)$/i.test(i)}function I(i,r){let s=[];for(let c of i.matchAll(_)){let a=c[1].replace(/[.,;:)]+$/,"");if(a.length<4)continue;let e=g(a.replace(/^\//,"").replace(/[/.]/g,"-"));s.push({id:`${r}.paths.${e}`,kind:"path",summary:a,fields:{path:a},tags:["discovered"]})}return s}function j(i,r){let s=[];for(let a of i.matchAll(y)){let[,e,n]=a;if(n.endsWith(".png")||n.endsWith(".jpg"))continue;let o=g(e);s.push({id:`${r}.contacts.${o}`,kind:"contact",summary:`${e}@${n}`,fields:{email:`${e}@${n}`},tags:["discovered"]})}let c=[...i.matchAll(v)].map(a=>a[1].trim());for(let a of c){let e=g(`phone-${a.replace(/\D+/g,"")}`);s.push({id:`${r}.contacts.${e}`,kind:"contact",summary:`Phone ${a}`,fields:{mobile:a},tags:["discovered","needs-review"]})}return s}function D(i){let r={};for(let[s,c]of Object.entries(i))c===void 0||c===""||(r[s]=c);return r}function g(i){return i.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60)||"x"}function L(i,r){let s={},c={ssh:"ssh.yaml",gitlab:"gitlab.yaml",path:"paths.yaml",contact:"contacts.yaml"};for(let[a,e]of Object.entries(i.byKind)){if(e.length===0)continue;let n=`${r}.${a==="path"?"paths":a==="contact"?"contacts":a}`,o=["# Discovered automatically by 'agentx references discover'.",'# Review every card \u2014 flagged ones (tags include "needs-review") are',"# best-effort guesses. Set lastVerified once you've confirmed.",`namespace: ${n}`,"cards:"];for(let t of e){let d=t.id.startsWith(`${n}.`)?t.id.slice(n.length+1):t.id;o.push(` - id: ${d}`),o.push(` kind: ${t.kind}`),o.push(` summary: ${b(t.summary)}`),o.push(" fields:");for(let[u,l]of Object.entries(t.fields))o.push(` ${u}: ${typeof l=="number"||typeof l=="boolean"?l:b(String(l))}`);o.push(` tags: [${t.tags.join(", ")}]`),t.ownerAgent&&o.push(` ownerAgent: ${t.ownerAgent}`)}s[c[a]]=o.join(`
|
|
2
2
|
`)+`
|
|
3
3
|
`}return s}function b(i){return/^[A-Za-z0-9_./@+:-]+$/.test(i)&&!/^\d/.test(i)?i:`"${i.replace(/"/g,'\\"')}"`}export{x as discoverFromSkills,L as renderDiscovery};
|
|
4
|
-
//# sourceMappingURL=discover-
|
|
4
|
+
//# sourceMappingURL=discover-7YFQNYLC.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-QIJLFPWE.js";function c(o){let s=o.store.list().map(t=>({id:t.id,title:t.title})),e=[];if(e.push(r),e.push(""),e.push(i),e.push(""),e.push("# Environment \u2014 only reference values that exist"),e.push(""),e.push("## Available agents (for `agent` nodes)"),o.availableAgents.length===0)e.push(" (none registered \u2014 the user must add an agent first for `agent` nodes to work)");else for(let t of o.availableAgents)e.push(` - \`${t.id}\`${t.description?` \u2014 ${t.description}`:""}`);if(e.push(""),e.push("## Assignees (for `userTask.assignTo`)"),e.push(" Any agent id above, or a plain string naming the person responsible."),e.push(""),e.push("## Available roles (for `userTask.assignTo`)"),e.push(""),e.push("## Available channels (for `action.*` and `trigger.channel`)"),e.push(` ${o.availableChannels.length?o.availableChannels.map(t=>`\`${t}\``).join(", "):"(none live on this node)"}`),e.push(""),e.push("## Existing workflows (for `subProcess.workflowId`)"),s.length===0)e.push(" (no other workflows defined)");else for(let t of s)e.push(` - \`${t.id}\` \u2014 ${t.title}`);e.push(""),o.currentWorkflow&&(e.push("# Current workflow on canvas"),e.push(""),e.push("The user is editing this workflow. Build on it \u2014 do NOT replace it unless they explicitly ask."),e.push(""),e.push("```json"),e.push(JSON.stringify(o.currentWorkflow,null,2)),e.push("```"),e.push("")),e.push("# Conversation"),e.push("");for(let t of o.messages){let a=t.role==="user"?"USER":"ASSISTANT";e.push(`${a}: ${t.content}`),e.push("")}return e.push(l),e.join(`
|
|
2
2
|
`)}function u(o){let s=/```(?:json)?\s*\n([\s\S]*?)```/.exec(o),e=[];s&&e.push(s[1]);let t=o.match(/\{[\s\S]*\}/);t&&e.push(t[0]);for(let a of e)try{let n=JSON.parse(a);if(n&&typeof n=="object"&&"id"in n&&"nodes"in n)return n}catch{}return null}var r=`You are AgentX's workflow author. The user describes a business process in
|
|
3
3
|
plain language; you return a valid V2 workflow JSON that implements it.
|
|
4
4
|
|
|
@@ -134,4 +134,4 @@ Only reference agent ids, actor ids, role ids, and channel names that
|
|
|
134
134
|
appear in the Environment section above. If the user asks for an agent
|
|
135
135
|
that doesn't exist, tell them which agent to register first. Never
|
|
136
136
|
invent workflowIds for subProcess that aren't in the existing list.`;export{c as buildWorkflowAuthorPrompt,u as extractWorkflowJson};
|
|
137
|
-
//# sourceMappingURL=editor-chat-
|
|
137
|
+
//# sourceMappingURL=editor-chat-V24MXQIB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r,b as c,c as u,f as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=entry-triage-
|
|
1
|
+
import{a as r,b as c,c as u,f as g}from"./chunk-72SZI2UW.js";import"./chunk-QIJLFPWE.js";g();var w="entry-triage",f={person:"A named human, team, or agent",project:"A named piece of work with a lifecycle",place:"A server, environment, repository, or system",concept:"A durable idea, term, or explanation",event:"Something that happened at a time \u2014 an incident, deploy, meeting",decision:"A choice made, and why",pattern:"A recurring way of doing or seeing something",none:"Nothing that fits a wiki article \u2014 chatter, a transient status, a duplicate, or noise"},T={citeWorthy:r("Would a curated wiki cite this entry for anything at all \u2014 a fact, a date, a name, a decision \u2014 even a single sentence inside an article about something else?"),type:c(f,"What kind of wiki article, if any, does this entry belong in?"),worthKeeping:r("Would this entry still be useful to someone in six months?"),procedure:r("Does this entry describe how to do something, step by step?"),durability:u(["True only in the moment it was written","True for days \u2014 a status, a run, a transient state","True for months \u2014 a project, a person's role, a current setup","True indefinitely \u2014 a decision, an incident that happened, a rule"],"How long will what this entry says remain true?")};function A(e,t=2e3){let n=String(e.content??"").replace(/\s+/g," ").trim();return{date:e.date??null,source:e.source??null,context:e.sourceContext?l(e.sourceContext,200):null,content:l(n,t)}}function x(e,t={}){let n=e.type,o=e.worthKeeping.noul,p=e.procedure.noul,i=e.durability.score,y=t.minTypeConfidence??.5,d=t.minWorth??.5,m=t.minDurability??1.5,h=n.choice!=="none"&&n.confidence>=y,a=o>=d,s=i>=m;return{type:n.choice,typeConfidence:n.confidence,worthKeeping:o,procedure:p,durability:i,absorb:h&&a&&s,rememberOnly:!s&&a}}function l(e,t){return e.length>t?e.slice(0,t):e}export{w as ENTRY_TRIAGE_SEAT,f as ENTRY_TYPES,T as entryTriageQuestions,x as triage,A as triageState};
|
|
2
|
+
//# sourceMappingURL=entry-triage-LZWMMLLN.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-QIJLFPWE.js";import{existsSync as E,readFileSync as T}from"fs";import{resolve as j}from"path";import{execFile as N}from"child_process";function p(e,t,o={}){return new Promise(n=>{N(e,t,{timeout:o.timeoutMs??15e3,signal:o.signal,maxBuffer:4*1024*1024,env:{...process.env,PATH:[process.env.PATH??"","/opt/homebrew/bin","/usr/local/bin",`${process.env.HOME??""}/.local/bin`].filter(Boolean).join(":")}},(r,a,i)=>{let s=r&&typeof r.code=="number"?r.code:r?1:0;n({stdout:String(a??""),stderr:String(i??""),code:s})})})}async function y(e){let{code:t}=await p("command",["-v",e],{timeoutMs:3e3}).catch(()=>({code:1}));if(t===0)return!0;let{code:o}=await p("/usr/bin/which",[e],{timeoutMs:3e3});return o===0}var G=[["216","Tunisia"],["966","Saudi Arabia"],["971","UAE"],["974","Qatar"],["965","Kuwait"],["973","Bahrain"],["968","Oman"],["962","Jordan"],["961","Lebanon"],["212","Morocco"],["213","Algeria"],["218","Libya"],["249","Sudan"],["20","Egypt"],["90","Turkey"],["33","France"],["49","Germany"],["39","Italy"],["34","Spain"],["44","United Kingdom"],["31","Netherlands"],["32","Belgium"],["41","Switzerland"],["1","US/Canada"]];function m(e){let t=e.replace(/\D/g,""),o,n=0;for(let[r,a]of G)t.startsWith(r)&&r.length>n&&(o=a,n=r.length);return o}function F(e){let t=[];for(let o of e.split(`
|
|
2
2
|
`)){let n=o.trim();if(!n||n.startsWith("ALIAS"))continue;let r=n.split(/\s{2,}/).filter(Boolean);if(r.length<2)continue;let a=r[r.length-1];if(!a.includes("@"))continue;let i=r[r.length-2],s=r.length>=3?r[r.length-3]:"";if(!s||!/\d/.test(i))continue;let l=m(i);t.push({name:s,source:"wacli",fields:{phone:`+${i.replace(/\D/g,"")}`,whatsapp:a,...l?{country:l}:{}}})}return t}function w(){return{name:"wacli",provides:["contact value","country"],async available(){if(!await y("wacli"))return{kind:"not-installed",hint:"brew install wacli \u2014 see https://wacli.sh"};let{stdout:e,stderr:t,code:o}=await p("wacli",["contacts","search","__agentx_probe__"],{timeoutMs:1e4});return o!==0&&/auth|not logged in|no session|login/i.test(e+t)?{kind:"not-configured",hint:"wacli auth \u2014 scan the QR to link the account"}:null},async lookup(e,t){let o=[],n=new Set;for(let r of e)for(let a of P(r.name)){let{stdout:i,code:s}=await p("wacli",["contacts","search",a],{signal:t,timeoutMs:15e3});if(s!==0)continue;let l=F(i).filter(u=>A(u.name,r.name));if(l.length!==0){for(let u of l){let c=u.fields.whatsapp;n.has(c)||(n.add(c),o.push({...u,fuzzy:!I(u.name,r.name)}))}break}}return o}}}var h=e=>e.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9 ]/g,"").trim(),I=(e,t)=>h(e)===h(t);function P(e){let t=h(e).split(/\s+/).filter(o=>o.length>2);return t.length>1?[e,t[t.length-1]]:[e]}function A(e,t){let o=h(e).split(/\s+/).filter(Boolean),n=h(t).split(/\s+/).filter(Boolean);if(o.length===0||n.length===0)return!1;let[r,a]=o.length<=n.length?[o,n]:[n,o];return r.every(i=>a.includes(i))}var M={whatsapp:"whatsapp",telegram:"telegram",gitlab:"gitlab",github:"github",email:"email",phone:"phone",slack:"slack",discord:"discord"};function D(e=".agentx"){return j(process.cwd(),e,"contacts.json")}function S(e){if(!E(e))return[];try{let t=JSON.parse(T(e,"utf-8"));return Array.isArray(t?.contacts)?t.contacts:[]}catch{return[]}}var b=e=>e.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9 ]/g,"").trim();function C(e){return[e.name,e.id,...e.aliases??[]].filter(t=>!!(t&&t.trim())).map(b)}function _(e){let t={};for(let[o,n]of Object.entries(e.channels??{})){let r=String(n??"").trim();if(!r)continue;let a=M[o.toLowerCase()]??o.toLowerCase();if(a==="whatsapp"){let i=r.split("@")[0].replace(/\D/g,"");if(t.whatsapp=r.includes("@")?r:`${i}@s.whatsapp.net`,i){t.phone??=`+${i}`;let s=m(i);s&&(t.country??=s)}continue}if(a==="phone"){let i=r.replace(/\D/g,"");t.phone=r.startsWith("+")?r:`+${i}`;let s=m(i);s&&(t.country??=s);continue}if(a==="telegram"&&/^\d+$/.test(r)){t.telegramId=r;continue}t[a]=a==="gitlab"||a==="github"?r.startsWith("@")?r:`@${r}`:r}return t}function k(e={}){let t=e.path??D();return{name:"contacts",provides:["contact value","handles","country"],async available(){return E(t)?S(t).length>0?null:{kind:"not-configured",hint:`${t} has no contacts`}:{kind:"not-configured",hint:`no ${t} \u2014 add {"contacts":[{"name":"\u2026","aliases":[],"channels":{"whatsapp":"\u2026"}}]}`}},async lookup(o){let n=S(t);if(n.length===0)return[];let r=new Map;for(let s of n)for(let l of C(s))l&&r.set(l,s);let a=[],i=new Set;for(let s of o){let l=r.get(b(s.name));if(!l||i.has(l))continue;i.add(l);let u=_(l);Object.keys(u).length!==0&&a.push({name:l.name??s.name,source:"contacts",fields:u,fuzzy:b(l.name??"")!==b(s.name)})}return a}}}function v(e={}){let t=(e.baseUrl??process.env.GITLAB_URL??"").replace(/\/+$/,""),o=e.token??process.env.GITLAB_ADMIN_TOKEN??process.env.GITLAB_TOKEN;return{name:"gitlab",provides:["email","handle","profile URL"],async available(){if(!t)return{kind:"not-configured",hint:"export GITLAB_URL=https://<your-gitlab-host>"};if(!o)return{kind:"not-configured",hint:"export GITLAB_ADMIN_TOKEN=<PAT> (read_api scope is enough)"};try{let n=await fetch(`${t}/api/v4/user`,{headers:{"PRIVATE-TOKEN":o}});if(n.status===401||n.status===403)return{kind:"not-configured",hint:`GitLab rejected the token (${n.status}) \u2014 set a valid GITLAB_ADMIN_TOKEN`};if(!n.ok)return{kind:"failed",hint:`GitLab returned ${n.status} for the auth probe`}}catch(n){return{kind:"failed",hint:`cannot reach ${t}: ${String(n?.message??n)}`}}return null},async lookup(n,r){if(!o||!t)return[];let a=[],i=new Set;for(let s of n){let l=`${t}/api/v4/users?search=${encodeURIComponent(s.name)}&per_page=5`,u;try{let c=await fetch(l,{headers:{"PRIVATE-TOKEN":o},signal:r});if(!c.ok)continue;u=await c.json()}catch{continue}if(Array.isArray(u))for(let c of u){let d=c.username??c.web_url??"";if(!d||i.has(d))continue;i.add(d);let f={},g=c.email||c.public_email;g&&(f.email=g),c.username&&(f.gitlab=`@${c.username}`),c.web_url&&(f.profile=c.web_url),c.organization&&(f.organisation=c.organization),c.job_title&&(f.role=c.job_title),c.state&&c.state!=="active"&&(f.accountState=c.state),Object.keys(f).length!==0&&a.push({name:c.name??s.name,source:"gitlab",fields:f,fuzzy:(c.name??"").toLowerCase()!==s.name.toLowerCase()})}}return a}}}function x(){return{name:"gog",provides:["contact value","email","organisation","role","country"],async available(){if(!await y("gog"))return{kind:"not-installed",hint:"brew install gog \u2014 Google CLI"};let{stdout:e,stderr:t}=await p("gog",["contacts","list","-j"],{timeoutMs:2e4}),o=e+t;return/unknown flag|Run with --help/i.test(o)?{kind:"failed",hint:`gog rejected the probe: ${o.split(`
|
|
3
3
|
`)[0]}`}:/accessNotConfigured|has not been used in project/i.test(o)?{kind:"not-configured",hint:"enable the People API on the gog OAuth project, then retry (console.developers.google.com \u2192 APIs \u2192 People API)"}:/invalid_grant|PERMISSION_DENIED|unauthenticated/i.test(o)?{kind:"not-configured",hint:"gog auth login \u2014 the stored token is expired or lacks contacts scope"}:null},async lookup(e,t){let o=[];for(let n of e){let{stdout:r,code:a}=await p("gog",["contacts","search",n.name,"-j","--results-only"],{signal:t,timeoutMs:2e4});if(a!==0)continue;let i;try{i=JSON.parse(r)}catch{continue}let s=Array.isArray(i)?i:i?.results??i?.people??[];for(let l of s){let u={},c=l.phoneNumbers?.[0]?.value,d=l.emailAddresses?.[0]?.value,f=l.organizations?.[0];c&&(u.phone=c),d&&(u.email=d),f?.name&&(u.organisation=f.name),f?.title&&(u.role=f.title);let g=l.addresses?.[0]?.country;g&&(u.country=g),Object.keys(u).length!==0&&o.push({name:l.names?.[0]?.displayName??n.name,source:"gog",fields:u})}}return o}}}var R=e=>typeof e=="string"&&e.trim()?e.trim():void 0;function L(e){return String(e??"").split("@")[0].split(":")[0].toLowerCase()}function z(e){let t=new Map;for(let o of e){let n=R(o.meta?.sender);if(!n)continue;let r=R(o.meta?.senderId),a=R(o.meta?.senderUsername),i=L(o.source),s={};if(r&&/@s\.whatsapp\.net$/.test(r)){let c=r.split("@")[0].replace(/\D/g,"");if(c){s.phone=`+${c}`,s.whatsapp=r;let d=m(c);d&&(s.country=d)}}else if(i==="whatsapp"&&r&&/^\d{6,}$/.test(r)){s.phone=`+${r}`,s.whatsapp=`${r}@s.whatsapp.net`;let c=m(r);c&&(s.country=c)}if(a){let c=a.startsWith("@")?a:`@${a}`;i==="gitlab"?s.gitlab=c:i==="github"?s.github=c:i==="telegram"?s.telegram=c:s.handle=c}if(r&&!s.phone&&!a&&(s[`${i||"platform"}Id`]=r),Object.keys(s).length===0)continue;let l=n.toLowerCase(),u=t.get(l);if(!u){t.set(l,{name:n,source:"entries",fields:s});continue}for(let[c,d]of Object.entries(s))u.fields[c]??=d}return Array.from(t.values())}function H(e){let t;return{...e,available:()=>t??=e.available(),lookup:(o,n)=>e.lookup(o,n)}}function O(){return[k(),w(),v(),x()].map(H)}function ct(e,t={}){let o=t.max??25,n=new Map;for(let a of e){let i=(a.sender??"").trim();i&&$(i)&&n.set(i.toLowerCase(),{name:i,origin:"sender",type:"person"})}for(let a of e){let i=(a.context??"").trim();if(!$(i))continue;let s=i.toLowerCase();n.has(s)||n.set(s,{name:i,origin:"context"})}let r=(t.known??[]).filter(a=>a.trim().length>2);if(r.length>0){let a=e.map(i=>i.content??"").join(`
|
|
4
4
|
`).toLowerCase();for(let i of r){let s=i.toLowerCase().trim();n.has(s)||a.includes(s)&&n.set(s,{name:i,origin:"body",type:"person"})}}return Array.from(n.values()).slice(0,o)}var U=new Set(["me","user","system","cron","unknown","anonymous","bot","agent","self","test","admin","none","null","n/a"]),B=new Set(["group","team","chat","channel","squad","crew","room","family","project","board","committee","club","staff","office","dept","department","support","sales","ops","admins","everyone","all"]);function $(e){let t=e.trim();if(!t||t.length>48||U.has(t.toLowerCase())||/[\d@/\\#:|_]/.test(t))return!1;let o=t.split(/\s+/);return o.length<2||o.length>4||o.some(n=>B.has(n.toLowerCase()))?!1:o.every(n=>/^[\p{Lu}][\p{L}'’.-]*$/u.test(n))}async function lt(e,t={}){let o=t.sources??O(),n=e.slice(0,t.maxEntities??25);if(n.length===0)return{records:[],results:[]};let r=new AbortController,a=setTimeout(()=>r.abort(),t.timeoutMs??12e4);try{let i=await Promise.all(o.map(async s=>{let l=Date.now();try{let u=await s.available();if(u)return{source:s.name,records:[],unavailable:u,ms:Date.now()-l};let c=await s.lookup(n,r.signal);return{source:s.name,records:c,ms:Date.now()-l}}catch(u){return{source:s.name,records:[],unavailable:{kind:"failed",hint:String(u?.message??u)},ms:Date.now()-l}}}));for(let s of i)t.onResult?.(s);return{records:i.flatMap(s=>s.records),results:i}}finally{clearTimeout(a)}}function ut(e,t=O()){let o=new Map(t.map(n=>[n.name,n.provides]));return e.filter(n=>n.unavailable&&n.unavailable.kind!=="failed").map(n=>({source:n.source,kind:n.unavailable.kind,hint:n.unavailable.hint,provides:o.get(n.source)??[]}))}function ft(e){let t=new Map;for(let o of e){let n=o.name.toLowerCase().trim(),r=t.get(n);r||(r={name:o.name,fields:{}},t.set(n,r));for(let[a,i]of Object.entries(o.fields)){if(!i?.trim())continue;let s=r.fields[a];if(!s){r.fields[a]={value:i,source:o.source};continue}s.value!==i&&(r.fields[`${a} (${o.source})`]??={value:i,source:o.source})}}return Array.from(t.values())}function dt(e){if(e.length===0)return"";let t=e.filter(o=>Object.keys(o.fields).length>0).map(o=>{let n=Object.entries(o.fields).map(([r,a])=>` - ${r}: \`${a.value}\` _(${a.source})_`).join(`
|
|
@@ -19,4 +19,4 @@ contradicts the entries, this wins and the entry is stale.
|
|
|
19
19
|
${t.join(`
|
|
20
20
|
`)}
|
|
21
21
|
`}export{m as countryFromPhone,k as createContactsSource,v as createGitlabSource,x as createGogSource,w as createWacliSource,O as defaultSources,ct as extractHints,_ as factsFrom,ut as installPrompts,$ as isPersonName,S as loadContacts,H as memoizeAvailability,ft as mergeRecords,C as namesOf,F as parseContactsTable,L as platformOf,A as plausible,z as recordsFromEntries,dt as renderFactsBlock,lt as resolveFacts};
|
|
22
|
-
//# sourceMappingURL=facts-
|
|
22
|
+
//# sourceMappingURL=facts-4YPSHIXJ.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{f,k as I}from"./chunk-
|
|
1
|
+
import{f,k as I}from"./chunk-WP6KLXTP.js";import"./chunk-FCPTN6NF.js";import"./chunk-QIJLFPWE.js";import{createHash as $}from"crypto";var k="failure:",x=3,p=5,A=["error","timeout"],T=["memory-promote","procedure-miner"];function h(t,s){return(s??"").toLowerCase().replace(/https?:\/\/\S+/g,"<url>").replace(/(["'`]).*?\1/g,"<v>").replace(/(?:~|\.{0,2})?\/[\w.@-]+(?:\/[\w.@-]+)*/g,"<path>").replace(/\b[0-9a-z]*\d[0-9a-z]*\b/g,"<n>").replace(/[^a-z<>\s]+/g," ").replace(/\s+/g," ").trim().split(" ").filter(Boolean).slice(0,8).join(" ")||t}function y(t){return`${t.agentId}|${t.tool??"no-tool"}|${t.status}|${h(t.status,t.error)}`}function S(t){return $("sha1").update(t).digest("hex").slice(0,10)}function w(t,s){return`${k}${S(t)}@${Math.floor(Math.log2(Math.max(1,s)))}`}function F(t){return t.finalSessionId??t.resumeSessionId??t.taskId}function _(t,s={}){return A.flatMap(e=>I(t,{status:e,since:s.since,limit:1e3})).filter(e=>!T.some(i=>(e.chatId??"").startsWith(i))).map(e=>{let{tool:i,error:n}=b(f(t,e.taskId)?.steps??[]);return{taskId:e.taskId,agentId:e.agentId,chatId:e.chatId,sessionId:F(e),status:e.status,startedAt:e.startedAt,error:n??e.error,messagePreview:e.messagePreview,tool:i}})}function b(t){let s=null,a=null;for(let e of t)e.name==="tool_use"&&e.action?(s=e.action,e.status==="error"&&(a={tool:e.action,error:e.error??e.outputSummary})):e.name==="tool_result"&&e.status==="error"&&(a={tool:e.action??s,error:e.error??e.outputSummary});return a??{tool:s,error:null}}function C(t,s={}){let a=Math.max(2,s.minSessions??x),e=new Map;for(let n of t){let r=y(n);e.set(r,[...e.get(r)??[],n])}let i=[];for(let[n,r]of e){let l=[...new Set([...r].sort((c,g)=>g.startedAt-c.startedAt).map(c=>c.sessionId))];if(l.length<a)continue;r.sort((c,g)=>g.startedAt-c.startedAt);let o=r[0],u=o.tool??"no tool",d=h(o.status,o.error),m=`failure-${S(n)}`;i.push({occurrences:l.length,sessions:l.slice(0,p),tasks:r.slice(0,p).map(c=>c.taskId),failure:{tool:u,errorClass:d,runs:r.length},agentId:o.agentId,key:`${o.agentId}/feedback_${m}`,stamp:w(n,l.length),memory:{name:m,type:"feedback",description:`${o.agentId}: ${u} keeps failing (${d}) in ${l.length} sessions`.slice(0,200),body:E(o.agentId,u,d,l.length,r),createdAt:new Date(r[r.length-1].startedAt).toISOString(),updatedAt:new Date(o.startedAt).toISOString()}})}return i.sort((n,r)=>r.occurrences-n.occurrences)}function E(t,s,a,e,i){let n=i.slice(0,p).map(r=>{let l=(r.messagePreview??"").replace(/\s+/g," ").trim().slice(0,120),o=(r.error??r.status).replace(/\s+/g," ").trim().slice(0,160);return`- ${new Date(r.startedAt).toISOString().slice(0,10)} \`${r.taskId}\` (${r.status})${l?` \u2014 task: ${l}`:""}
|
|
2
2
|
error: ${o}`});return[`**${t}** hit the same failure in ${e} separate sessions (${i.length} runs).`,`- Tool: \`${s}\`
|
|
3
3
|
- Error class: \`${a}\``,"Recurrence across sessions is the finding: any one of these runs is session state. Propose the fix that stops it recurring \u2014 what fails, the likely cause, and what to do instead (a missing fact, a better approach, or a tool or configuration change to make) \u2014 or skip it if the examples do not share a cause.",`**Examples (newest first):**
|
|
4
4
|
${n.join(`
|
|
5
5
|
`)}`].join(`
|
|
6
6
|
|
|
7
7
|
`)}export{x as DEFAULT_MIN_SESSIONS,k as FAILURE_STAMP_PREFIX,p as MAX_FAILURE_EXAMPLES,h as errorClass,b as failingTool,y as failureSignature,w as failureStamp,C as failuresToCandidates,_ as loadFailedTraces,F as sessionOf};
|
|
8
|
-
//# sourceMappingURL=failure-candidates-
|
|
8
|
+
//# sourceMappingURL=failure-candidates-RIXA3Y6D.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -3964,6 +3964,15 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3964
3964
|
windowMinutes?: number | undefined;
|
|
3965
3965
|
} | undefined;
|
|
3966
3966
|
}>>;
|
|
3967
|
+
/** The in-process event bus (src/events). `ringSize` bounds how many
|
|
3968
|
+
* recent events GET /events/recent can return. */
|
|
3969
|
+
events: z.ZodDefault<z.ZodObject<{
|
|
3970
|
+
ringSize: z.ZodDefault<z.ZodNumber>;
|
|
3971
|
+
}, "strip", z.ZodTypeAny, {
|
|
3972
|
+
ringSize: number;
|
|
3973
|
+
}, {
|
|
3974
|
+
ringSize?: number | undefined;
|
|
3975
|
+
}>>;
|
|
3967
3976
|
screen: z.ZodDefault<z.ZodObject<{
|
|
3968
3977
|
/** Pixel budget for a captured frame; larger captures are downscaled. */
|
|
3969
3978
|
maxPixels: z.ZodDefault<z.ZodNumber>;
|
|
@@ -5821,6 +5830,9 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
5821
5830
|
} | undefined;
|
|
5822
5831
|
};
|
|
5823
5832
|
};
|
|
5833
|
+
events: {
|
|
5834
|
+
ringSize: number;
|
|
5835
|
+
};
|
|
5824
5836
|
meshVoices: Record<string, {
|
|
5825
5837
|
system?: string | Record<string, string> | undefined;
|
|
5826
5838
|
provider?: "system" | "elevenlabs" | undefined;
|
|
@@ -6418,6 +6430,9 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6418
6430
|
} | undefined;
|
|
6419
6431
|
} | undefined;
|
|
6420
6432
|
} | undefined;
|
|
6433
|
+
events?: {
|
|
6434
|
+
ringSize?: number | undefined;
|
|
6435
|
+
} | undefined;
|
|
6421
6436
|
meshVoices?: Record<string, {
|
|
6422
6437
|
system?: string | Record<string, string> | undefined;
|
|
6423
6438
|
provider?: "system" | "elevenlabs" | undefined;
|
|
@@ -6674,6 +6689,36 @@ declare function loadDaemonConfig(configPath?: string): DaemonConfig;
|
|
|
6674
6689
|
*/
|
|
6675
6690
|
declare function validateWorkspaces(config: DaemonConfig): string[];
|
|
6676
6691
|
|
|
6692
|
+
interface EventEnvelope {
|
|
6693
|
+
id: string;
|
|
6694
|
+
/** The entry point this event descends from (inbound message, cron fire,
|
|
6695
|
+
* webhook, mesh task). Events with no known entry point are their own
|
|
6696
|
+
* root. Carried across mesh forwards so peers share it. */
|
|
6697
|
+
rootId: string;
|
|
6698
|
+
/** The event that directly caused this one, when known (for example the
|
|
6699
|
+
* mesh forward on the sending node). */
|
|
6700
|
+
parentId?: string;
|
|
6701
|
+
/** Node that published the event. */
|
|
6702
|
+
node: string;
|
|
6703
|
+
agentId?: string;
|
|
6704
|
+
/** Coarse family: message, agent, run, task, signal, mesh, channel, status. */
|
|
6705
|
+
kind: string;
|
|
6706
|
+
/** Specific event within the family, for example "task:started" or "failed". */
|
|
6707
|
+
type: string;
|
|
6708
|
+
at: string;
|
|
6709
|
+
/** Human-readable, at most SUMMARY_MAX characters. */
|
|
6710
|
+
summary: string;
|
|
6711
|
+
/** Pointer to the durable record: a trace id, run id or task id. */
|
|
6712
|
+
ref?: string;
|
|
6713
|
+
}
|
|
6714
|
+
interface RecentQuery {
|
|
6715
|
+
/** An event id (returns events after it) or an ISO timestamp. */
|
|
6716
|
+
since?: string;
|
|
6717
|
+
kind?: string;
|
|
6718
|
+
agent?: string;
|
|
6719
|
+
limit?: number;
|
|
6720
|
+
}
|
|
6721
|
+
|
|
6677
6722
|
interface PeerState {
|
|
6678
6723
|
peer: MeshPeer;
|
|
6679
6724
|
client: A2AClient;
|
|
@@ -6868,6 +6913,203 @@ declare class A2AMesh {
|
|
|
6868
6913
|
}>;
|
|
6869
6914
|
}
|
|
6870
6915
|
|
|
6916
|
+
/**
|
|
6917
|
+
* Lifecycle events the daemon emits. Keep this list narrow and stable
|
|
6918
|
+
* — every event becomes a public contract once a subscriber depends on
|
|
6919
|
+
* it. Add events sparingly and never remove or rename without a major
|
|
6920
|
+
* version bump.
|
|
6921
|
+
*/
|
|
6922
|
+
interface AgentXEvents {
|
|
6923
|
+
/** Inbound message arrived at the router and was matched to an agent.
|
|
6924
|
+
* Fired AFTER the routing pipeline produces a `match` decision. Drops
|
|
6925
|
+
* fire `message:dropped` instead. */
|
|
6926
|
+
"message:matched": {
|
|
6927
|
+
channel: string;
|
|
6928
|
+
chatId: string;
|
|
6929
|
+
msgId: string;
|
|
6930
|
+
accountId?: string;
|
|
6931
|
+
agentId: string;
|
|
6932
|
+
decidingStage: string;
|
|
6933
|
+
at: string;
|
|
6934
|
+
};
|
|
6935
|
+
/** Inbound message dropped by the routing pipeline. */
|
|
6936
|
+
"message:dropped": {
|
|
6937
|
+
channel: string;
|
|
6938
|
+
chatId: string;
|
|
6939
|
+
msgId: string;
|
|
6940
|
+
accountId?: string;
|
|
6941
|
+
decidingStage: string;
|
|
6942
|
+
reason: string;
|
|
6943
|
+
at: string;
|
|
6944
|
+
};
|
|
6945
|
+
/** A task is about to be dispatched to the agent runtime.
|
|
6946
|
+
*
|
|
6947
|
+
* taskId is the ULID for the per-execution trace
|
|
6948
|
+
* (src/storage/traces.ts). Emitters generate it BEFORE firing this
|
|
6949
|
+
* event so it can also be threaded into the runtime call chain;
|
|
6950
|
+
* the SQLite subscriber uses it to open the trace row, and the
|
|
6951
|
+
* streaming parser uses it to record per-step tool_use/tool_result
|
|
6952
|
+
* rows. Optional for backward compatibility — emitters that haven't
|
|
6953
|
+
* been updated still produce a valid event and the subscriber
|
|
6954
|
+
* falls back to allocating its own id. */
|
|
6955
|
+
"task:started": {
|
|
6956
|
+
agentId: string;
|
|
6957
|
+
channel: string;
|
|
6958
|
+
chatId: string;
|
|
6959
|
+
messagePreview: string;
|
|
6960
|
+
/** Full untruncated message — used by SQLite subscriber to populate
|
|
6961
|
+
* task_traces.original_message so `agentx trace replay <taskId>` can
|
|
6962
|
+
* re-fire the exact original task. Optional for back-compat with
|
|
6963
|
+
* older emitters that only carried the preview. */
|
|
6964
|
+
fullMessage?: string;
|
|
6965
|
+
at: string;
|
|
6966
|
+
taskId?: string;
|
|
6967
|
+
/** Resume after restart (#103): how to re-enter the run (JSON), its
|
|
6968
|
+
* attempt number, and the cut-off run it continues. */
|
|
6969
|
+
resumeOrigin?: string | null;
|
|
6970
|
+
resumeAttempt?: number;
|
|
6971
|
+
resumedFrom?: string;
|
|
6972
|
+
};
|
|
6973
|
+
/** A single step inside an in-flight task — typically a tool call or
|
|
6974
|
+
* tool result inside the Claude streaming response. Producer is the
|
|
6975
|
+
* per-event callback inside registry.execute's streaming path; the
|
|
6976
|
+
* SQLite subscriber persists each step into task_trace_steps under
|
|
6977
|
+
* the task's ULID. inputSummary / outputSummary are caller-byte-
|
|
6978
|
+
* capped (typically 8KB) so a runaway tool result can't blow up the
|
|
6979
|
+
* bus payload or DB row size.
|
|
6980
|
+
*
|
|
6981
|
+
* Conventional `name` values: "tool_use" | "tool_result" |
|
|
6982
|
+
* "llm_message" | "session_rotation" | "error" | "preflight". Free-
|
|
6983
|
+
* form strings are accepted to let future capture sites extend
|
|
6984
|
+
* without a schema bump. */
|
|
6985
|
+
"task:step": {
|
|
6986
|
+
taskId: string;
|
|
6987
|
+
agentId: string;
|
|
6988
|
+
name: string;
|
|
6989
|
+
action?: string;
|
|
6990
|
+
status?: "ok" | "error" | "in-flight";
|
|
6991
|
+
inputSummary?: string;
|
|
6992
|
+
outputSummary?: string;
|
|
6993
|
+
error?: string;
|
|
6994
|
+
ms?: number;
|
|
6995
|
+
at: string;
|
|
6996
|
+
};
|
|
6997
|
+
/** Task finished — success or failure. Includes usage so subscribers
|
|
6998
|
+
* can write to billing, sqlite, or analytics without re-querying.
|
|
6999
|
+
*
|
|
7000
|
+
* Tier-2 fields hold the portion of THIS task's tokens that fell into
|
|
7001
|
+
* the "above-threshold" pricing tier (decided at record time by
|
|
7002
|
+
* TokenTracker; see usage_daily v5 in src/storage/sqlite.ts). They are
|
|
7003
|
+
* optional and additive — emitters that don't compute the split simply
|
|
7004
|
+
* omit them and subscribers treat the missing values as 0. */
|
|
7005
|
+
"task:completed": {
|
|
7006
|
+
/** Trace ULID — when present, lets subscribers finalize the exact
|
|
7007
|
+
* trace row that the matching task:started opened, eliminating the
|
|
7008
|
+
* ambiguity when two tasks for the same (agent, channel, chatId)
|
|
7009
|
+
* overlap. Optional for backward compatibility; subscribers fall
|
|
7010
|
+
* back to a pending-map lookup when absent. */
|
|
7011
|
+
taskId?: string;
|
|
7012
|
+
agentId: string;
|
|
7013
|
+
channel: string;
|
|
7014
|
+
chatId: string;
|
|
7015
|
+
durationMs: number;
|
|
7016
|
+
error?: string;
|
|
7017
|
+
inputTokens?: number;
|
|
7018
|
+
outputTokens?: number;
|
|
7019
|
+
cacheReadTokens?: number;
|
|
7020
|
+
cacheCreateTokens?: number;
|
|
7021
|
+
tier2InputTokens?: number;
|
|
7022
|
+
tier2OutputTokens?: number;
|
|
7023
|
+
tier2CacheReadTokens?: number;
|
|
7024
|
+
tier2CacheCreateTokens?: number;
|
|
7025
|
+
/** Whether this turn continued a provider session, and which one. The
|
|
7026
|
+
* resume decision happens after task:started (staleness, rotation,
|
|
7027
|
+
* planner), so it can only be reported here. */
|
|
7028
|
+
resumed?: boolean;
|
|
7029
|
+
resumeSessionId?: string;
|
|
7030
|
+
/** Request-gate experiment arm when the gate was active. */
|
|
7031
|
+
jevArm?: "treatment" | "holdout";
|
|
7032
|
+
/** Runtime-reported turn count, when the runtime reports one. */
|
|
7033
|
+
numTurns?: number;
|
|
7034
|
+
/** Lessons injected into this turn's prompt (memory, procedures, wiki). */
|
|
7035
|
+
injectedContext?: {
|
|
7036
|
+
memory: string[];
|
|
7037
|
+
procedures: string[];
|
|
7038
|
+
wiki: boolean;
|
|
7039
|
+
};
|
|
7040
|
+
/** Agent's final reply text — recorded into task_traces.final_response
|
|
7041
|
+
* so `replay --diff` can show original vs current output side-by-side.
|
|
7042
|
+
* Optional for back-compat. */
|
|
7043
|
+
finalResponse?: string;
|
|
7044
|
+
/** Model the upstream API actually billed (claude-opus-4-7, gpt-5.5, …)
|
|
7045
|
+
* so per-agent / per-tier traffic is priced at its real rate instead
|
|
7046
|
+
* of the daemon-wide default. Producers prefer `response.billedModel`
|
|
7047
|
+
* (parsed from the runtime's reply) and fall back to the agent's
|
|
7048
|
+
* configured `model`. Subscribers fall back to the constant default
|
|
7049
|
+
* passed to attachSqliteSubscribers when this is absent. */
|
|
7050
|
+
billedModel?: string;
|
|
7051
|
+
at: string;
|
|
7052
|
+
};
|
|
7053
|
+
/** Claude session rotation fired (stale / max-turns / tier-2). */
|
|
7054
|
+
"session:rotated": {
|
|
7055
|
+
/** Trace ULID of the in-flight task at rotation time, when known.
|
|
7056
|
+
* When set, the rotation is recorded as a step on that trace. */
|
|
7057
|
+
taskId?: string;
|
|
7058
|
+
agentId: string;
|
|
7059
|
+
channel: string;
|
|
7060
|
+
chatId: string;
|
|
7061
|
+
reason: "stale" | "max-turns" | "tier-2" | "continuity";
|
|
7062
|
+
lastTurnInputTokens?: number;
|
|
7063
|
+
at: string;
|
|
7064
|
+
};
|
|
7065
|
+
}
|
|
7066
|
+
type EventName = keyof AgentXEvents;
|
|
7067
|
+
type Listener$1<E extends EventName> = (payload: AgentXEvents[E]) => void;
|
|
7068
|
+
/** Input to publish(). id, at, node and rootId are filled in when absent;
|
|
7069
|
+
* rootId comes from the current root context (see envelope.ts). `data`
|
|
7070
|
+
* is delivered to subscribers alongside the envelope but is never kept in
|
|
7071
|
+
* the ring buffer; the daemon's /events adapter uses it to keep its wire
|
|
7072
|
+
* shape. */
|
|
7073
|
+
interface PublishInput {
|
|
7074
|
+
kind: string;
|
|
7075
|
+
type: string;
|
|
7076
|
+
summary: string;
|
|
7077
|
+
agentId?: string;
|
|
7078
|
+
ref?: string;
|
|
7079
|
+
id?: string;
|
|
7080
|
+
at?: string;
|
|
7081
|
+
rootId?: string;
|
|
7082
|
+
parentId?: string;
|
|
7083
|
+
data?: Record<string, unknown>;
|
|
7084
|
+
}
|
|
7085
|
+
type EnvelopeListener = (e: EventEnvelope, data?: Record<string, unknown>) => void;
|
|
7086
|
+
/** The one in-process bus. Typed lifecycle events keep their names and
|
|
7087
|
+
* payloads for `on` subscribers; every event, typed or not, is also
|
|
7088
|
+
* published as an EventEnvelope to `subscribe` listeners and the ring. */
|
|
7089
|
+
declare class TypedEventBus {
|
|
7090
|
+
private inner;
|
|
7091
|
+
private envelopeListeners;
|
|
7092
|
+
private ring;
|
|
7093
|
+
private node;
|
|
7094
|
+
constructor();
|
|
7095
|
+
/** Set the publishing node name and ring size (daemon boot / reload). */
|
|
7096
|
+
configure(opts: {
|
|
7097
|
+
node?: string;
|
|
7098
|
+
ringSize?: number;
|
|
7099
|
+
}): this;
|
|
7100
|
+
on<E extends EventName>(event: E, listener: Listener$1<E>): this;
|
|
7101
|
+
off<E extends EventName>(event: E, listener: Listener$1<E>): this;
|
|
7102
|
+
emit<E extends EventName>(event: E, payload: AgentXEvents[E]): boolean;
|
|
7103
|
+
/** The single publish API. Returns the envelope as delivered. */
|
|
7104
|
+
publish(input: PublishInput): EventEnvelope;
|
|
7105
|
+
/** Receive every envelope. Returns an unsubscribe function. */
|
|
7106
|
+
subscribe(fn: EnvelopeListener): () => void;
|
|
7107
|
+
recent(q?: RecentQuery): EventEnvelope[];
|
|
7108
|
+
listenerCount<E extends EventName>(event: E): number;
|
|
7109
|
+
/** Test/dev helper — drop every subscriber and the ring. */
|
|
7110
|
+
removeAllListeners(): this;
|
|
7111
|
+
}
|
|
7112
|
+
|
|
6871
7113
|
type EventKind = "run" | "task" | "signal" | "mesh" | "channel" | "status";
|
|
6872
7114
|
interface BaseEvent {
|
|
6873
7115
|
kind: EventKind;
|
|
@@ -6875,6 +7117,10 @@ interface BaseEvent {
|
|
|
6875
7117
|
id: string;
|
|
6876
7118
|
/** ISO-8601 emit time. */
|
|
6877
7119
|
at: string;
|
|
7120
|
+
/** Entry point this event descends from (set by the bus). */
|
|
7121
|
+
rootId?: string;
|
|
7122
|
+
/** Node that published the event (set by the bus). */
|
|
7123
|
+
node?: string;
|
|
6878
7124
|
}
|
|
6879
7125
|
interface RunEvent extends BaseEvent {
|
|
6880
7126
|
kind: "run";
|
|
@@ -6942,13 +7188,14 @@ interface SubscriptionFilter {
|
|
|
6942
7188
|
runId?: string;
|
|
6943
7189
|
}
|
|
6944
7190
|
type Listener = (e: DaemonEvent) => void;
|
|
6945
|
-
/**
|
|
6946
|
-
*
|
|
6947
|
-
*
|
|
6948
|
-
*
|
|
6949
|
-
* can't break the fanout. */
|
|
7191
|
+
/** Filtered publish/subscribe over the process bus. Subscribers see events
|
|
7192
|
+
* in publish order; listener callbacks run synchronously and a throwing
|
|
7193
|
+
* listener cannot break the fanout. Pass the shared bus in production;
|
|
7194
|
+
* the default gives each instance a private one (tests). */
|
|
6950
7195
|
declare class EventBus {
|
|
6951
|
-
private
|
|
7196
|
+
private core;
|
|
7197
|
+
private count;
|
|
7198
|
+
constructor(core?: TypedEventBus);
|
|
6952
7199
|
subscribe(filter: SubscriptionFilter, fn: Listener): () => void;
|
|
6953
7200
|
/** Publish an event. The `id` and `at` fields are filled in if absent.
|
|
6954
7201
|
* We deliberately accept a loose input shape — callers construct the
|
|
@@ -10744,7 +10991,10 @@ declare class MessageRouter {
|
|
|
10744
10991
|
* no resolution to write).
|
|
10745
10992
|
*/
|
|
10746
10993
|
private recordRouterDecisionInLedger;
|
|
10994
|
+
/** Each inbound message is an entry point: every event it causes
|
|
10995
|
+
* (routing, agent task, workflow run, mesh forward) shares one root id. */
|
|
10747
10996
|
private handleMessage;
|
|
10997
|
+
private routeMessage;
|
|
10748
10998
|
/** The actual processing body — split out so handleMessage can wrap it in
|
|
10749
10999
|
* the inflight try/finally without drowning the happy path in indentation. */
|
|
10750
11000
|
private processResolvedMessage;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as L}from"./chunk-
|
|
1
|
+
import{a as L}from"./chunk-Y57CULGE.js";import{a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,ia as bt,ja as Tt,ka as Mt}from"./chunk-UBRMOTBH.js";import"./chunk-YE2BUU3Z.js";import"./chunk-QP6XNTBB.js";import"./chunk-LQRBGQIR.js";import"./chunk-ZVP6GB4G.js";import"./chunk-S7CVSKOX.js";import"./chunk-WDQ3BPFS.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-L53FTKEP.js";import{O as yt,l as lt,m as ct,n as dt,o as mt,p as pt}from"./chunk-YEV6W34S.js";import"./chunk-U67EG5IF.js";import"./chunk-N6EWZGIX.js";import"./chunk-WP6KLXTP.js";import"./chunk-DP7RTNDM.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-PSDCRZZM.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-F7WY24UZ.js";import{s as ut}from"./chunk-V7XZN3MQ.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import"./chunk-VMS3HVTT.js";import"./chunk-H2TWRZC2.js";import"./chunk-DWADWDMU.js";import"./chunk-WKTFP3SK.js";import"./chunk-HRBKSZ34.js";import"./chunk-VWTBHLMX.js";import"./chunk-XZTR5MBJ.js";import{a as gt,b as ft,e as ht}from"./chunk-ROCUOXCW.js";import"./chunk-PNWNVOEZ.js";import"./chunk-64P4QHSZ.js";import"./chunk-6HAZ6YWI.js";import"./chunk-TFVUOC2C.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-JQR3NTHI.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-SZJMS7K4.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{a as Fe,b as Le,c as A,d as De}from"./chunk-VDMYBPYB.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{k as tt,m as st,n as ot,p as nt}from"./chunk-SRCXUZM2.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
|
|
2
2
|
`)}
|
|
3
3
|
|
|
4
|
-
${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-
|
|
4
|
+
${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-EVHZ2R73.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).
|
|
5
5
|
You create high-quality SKILL.md files that provide reusable instructions for AI coding agents.
|
|
6
6
|
|
|
7
7
|
A skill is a markdown document with YAML frontmatter that teaches an agent how to perform a specific task.
|