@ainetwork/adk 0.3.2 → 0.3.4
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/README.md +62 -29
- package/dist/cjs/{chunk-RCOESZIX.cjs → chunk-3COIZ4H5.cjs} +5 -5
- package/dist/cjs/chunk-3COIZ4H5.cjs.map +1 -0
- package/dist/cjs/chunk-4VIZ52C2.cjs +37 -0
- package/dist/cjs/chunk-4VIZ52C2.cjs.map +1 -0
- package/dist/cjs/{chunk-X46GJS7X.cjs → chunk-4ZTPNV3C.cjs} +4 -4
- package/dist/cjs/chunk-4ZTPNV3C.cjs.map +1 -0
- package/dist/cjs/{chunk-A2I7D6JW.cjs → chunk-6HUEBFXL.cjs} +1 -1
- package/dist/cjs/{chunk-A2I7D6JW.cjs.map → chunk-6HUEBFXL.cjs.map} +1 -1
- package/dist/cjs/{chunk-EA3YMPST.cjs → chunk-6JO4LWIY.cjs} +7 -14
- package/dist/cjs/chunk-6JO4LWIY.cjs.map +1 -0
- package/dist/cjs/{chunk-NEWJ7PXH.cjs → chunk-7E3A6PCO.cjs} +9 -8
- package/dist/cjs/chunk-7E3A6PCO.cjs.map +1 -0
- package/dist/cjs/chunk-7XYVRO76.cjs +68 -0
- package/dist/cjs/chunk-7XYVRO76.cjs.map +1 -0
- package/dist/cjs/chunk-AQGJBXBU.cjs +8 -0
- package/dist/cjs/chunk-AQGJBXBU.cjs.map +1 -0
- package/dist/cjs/chunk-CHREGFB3.cjs +38 -0
- package/dist/cjs/chunk-CHREGFB3.cjs.map +1 -0
- package/dist/cjs/chunk-CKZDAQBG.cjs +17 -0
- package/dist/cjs/chunk-CKZDAQBG.cjs.map +1 -0
- package/dist/cjs/chunk-EQWAVDJY.cjs +47 -0
- package/dist/cjs/chunk-EQWAVDJY.cjs.map +1 -0
- package/dist/cjs/{chunk-5FZ7QLJD.cjs → chunk-EUNCRF3F.cjs} +4 -4
- package/dist/cjs/chunk-EUNCRF3F.cjs.map +1 -0
- package/dist/cjs/chunk-FLPLVYXQ.cjs +45 -0
- package/dist/cjs/chunk-FLPLVYXQ.cjs.map +1 -0
- package/dist/cjs/chunk-GA6NTHXB.cjs +17 -0
- package/dist/cjs/chunk-GA6NTHXB.cjs.map +1 -0
- package/dist/cjs/{chunk-NNYPZA6W.cjs → chunk-HDF5WQFQ.cjs} +31 -26
- package/dist/cjs/chunk-HDF5WQFQ.cjs.map +1 -0
- package/dist/cjs/{chunk-YCTPMLZO.cjs → chunk-HVNTK4O7.cjs} +12 -8
- package/dist/cjs/chunk-HVNTK4O7.cjs.map +1 -0
- package/dist/cjs/chunk-I72VEOEC.cjs +62 -0
- package/dist/cjs/chunk-I72VEOEC.cjs.map +1 -0
- package/dist/cjs/{chunk-OZPPTVUA.cjs → chunk-IP6P2TQM.cjs} +121 -37
- package/dist/cjs/chunk-IP6P2TQM.cjs.map +1 -0
- package/dist/cjs/chunk-JQIAM5N4.cjs +18 -0
- package/dist/cjs/chunk-JQIAM5N4.cjs.map +1 -0
- package/dist/cjs/chunk-LTBTLUJD.cjs +74 -0
- package/dist/cjs/chunk-LTBTLUJD.cjs.map +1 -0
- package/dist/cjs/chunk-MSPDYSCC.cjs +21 -0
- package/dist/cjs/chunk-MSPDYSCC.cjs.map +1 -0
- package/dist/cjs/chunk-NFEFQTIX.cjs +104 -0
- package/dist/cjs/chunk-NFEFQTIX.cjs.map +1 -0
- package/dist/cjs/{chunk-QCYLIOXZ.cjs → chunk-NLONGI2K.cjs} +7 -4
- package/dist/cjs/chunk-NLONGI2K.cjs.map +1 -0
- package/dist/cjs/chunk-NNVC34HX.cjs +95 -0
- package/dist/cjs/chunk-NNVC34HX.cjs.map +1 -0
- package/dist/cjs/{chunk-Z6TQ7TFO.cjs → chunk-OERUQFT7.cjs} +1 -1
- package/dist/cjs/chunk-OERUQFT7.cjs.map +1 -0
- package/dist/cjs/{chunk-TZ6JOGWV.cjs → chunk-PH5CFKLN.cjs} +4 -1
- package/dist/cjs/chunk-PH5CFKLN.cjs.map +1 -0
- package/dist/cjs/{chunk-FJ2JWXSL.cjs → chunk-QHDIM62U.cjs} +12 -8
- package/dist/cjs/chunk-QHDIM62U.cjs.map +1 -0
- package/dist/cjs/{chunk-5QSLQX4H.cjs → chunk-TDHM5TWT.cjs} +24 -34
- package/dist/cjs/chunk-TDHM5TWT.cjs.map +1 -0
- package/dist/cjs/{chunk-W224GBH7.cjs → chunk-UNRN7WF6.cjs} +1 -1
- package/dist/cjs/{chunk-W224GBH7.cjs.map → chunk-UNRN7WF6.cjs.map} +1 -1
- package/dist/cjs/chunk-VM74R2KP.cjs +170 -0
- package/dist/cjs/chunk-VM74R2KP.cjs.map +1 -0
- package/dist/cjs/chunk-WQIUHNUX.cjs +45 -0
- package/dist/cjs/chunk-WQIUHNUX.cjs.map +1 -0
- package/dist/cjs/chunk-ZWJ6IAP2.cjs +89 -0
- package/dist/cjs/chunk-ZWJ6IAP2.cjs.map +1 -0
- package/dist/cjs/{chunk-4Z4HSVCQ.cjs → chunk-ZZP6LQ5R.cjs} +4 -5
- package/dist/cjs/chunk-ZZP6LQ5R.cjs.map +1 -0
- package/dist/cjs/config/agent.cjs +9 -0
- package/dist/cjs/config/agent.cjs.map +1 -0
- package/dist/cjs/config/modules.cjs +19 -0
- package/dist/cjs/config/modules.cjs.map +1 -0
- package/dist/cjs/config/options.cjs +11 -0
- package/dist/cjs/config/options.cjs.map +1 -0
- package/dist/cjs/container/controllers.cjs +16 -0
- package/dist/cjs/container/controllers.cjs.map +1 -0
- package/dist/cjs/container/index.cjs +40 -0
- package/dist/cjs/container/index.cjs.map +1 -0
- package/dist/cjs/container/services.cjs +25 -0
- package/dist/cjs/container/services.cjs.map +1 -0
- package/dist/cjs/controllers/api/agent.api.controller.cjs +2 -2
- package/dist/cjs/controllers/api/threads.api.controller.cjs +2 -2
- package/dist/cjs/controllers/api/workflow.api.controller.cjs +7 -0
- package/dist/cjs/controllers/api/workflow.api.controller.cjs.map +1 -0
- package/dist/cjs/controllers/index.cjs +7 -8
- package/dist/cjs/controllers/index.cjs.map +1 -1
- package/dist/cjs/controllers/query.controller.cjs +3 -4
- package/dist/cjs/controllers/query.controller.cjs.map +1 -1
- package/dist/cjs/index.cjs +74 -50
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/middlewares/auth.middleware.cjs +3 -3
- package/dist/cjs/modules/a2a/a2a.module.cjs +1 -1
- package/dist/cjs/modules/auth/auth.module.cjs +7 -0
- package/dist/cjs/modules/auth/auth.module.cjs.map +1 -0
- package/dist/cjs/modules/index.cjs +9 -9
- package/dist/cjs/modules/index.cjs.map +1 -1
- package/dist/cjs/modules/memory/memory.module.cjs +2 -2
- package/dist/cjs/routes/a2a.routes.cjs +29 -11
- package/dist/cjs/routes/a2a.routes.cjs.map +1 -1
- package/dist/cjs/routes/api/agent.routes.cjs +30 -3
- package/dist/cjs/routes/api/agent.routes.cjs.map +1 -1
- package/dist/cjs/routes/api/intent.routes.cjs +29 -3
- package/dist/cjs/routes/api/intent.routes.cjs.map +1 -1
- package/dist/cjs/routes/api/model.routes.cjs +29 -2
- package/dist/cjs/routes/api/model.routes.cjs.map +1 -1
- package/dist/cjs/routes/api/threads.routes.cjs +30 -4
- package/dist/cjs/routes/api/threads.routes.cjs.map +1 -1
- package/dist/cjs/routes/api/workflow.routes.cjs +35 -0
- package/dist/cjs/routes/api/workflow.routes.cjs.map +1 -0
- package/dist/cjs/routes/api.routes.cjs +33 -9
- package/dist/cjs/routes/api.routes.cjs.map +1 -1
- package/dist/cjs/routes/index.cjs +36 -24
- package/dist/cjs/routes/index.cjs.map +1 -1
- package/dist/cjs/routes/intent.routes.cjs +27 -15
- package/dist/cjs/routes/intent.routes.cjs.map +1 -1
- package/dist/cjs/routes/query.routes.cjs +27 -12
- package/dist/cjs/routes/query.routes.cjs.map +1 -1
- package/dist/cjs/services/a2a.service.cjs +2 -2
- package/dist/cjs/services/index.cjs +14 -19
- package/dist/cjs/services/index.cjs.map +1 -1
- package/dist/cjs/services/intents/aggregate.service.cjs +10 -0
- package/dist/cjs/services/intents/aggregate.service.cjs.map +1 -0
- package/dist/cjs/services/intents/fulfill.service.cjs +6 -3
- package/dist/cjs/services/intents/fulfill.service.cjs.map +1 -1
- package/dist/cjs/services/intents/multi-trigger.service.cjs +8 -0
- package/dist/cjs/services/intents/multi-trigger.service.cjs.map +1 -0
- package/dist/cjs/services/intents/single-trigger.service.cjs +8 -0
- package/dist/cjs/services/intents/single-trigger.service.cjs.map +1 -0
- package/dist/cjs/services/intents/trigger.service.cjs +4 -2
- package/dist/cjs/services/intents/trigger.service.cjs.map +1 -1
- package/dist/cjs/services/query.service.cjs +4 -8
- package/dist/cjs/services/query.service.cjs.map +1 -1
- package/dist/cjs/services/thread.service.cjs +2 -2
- package/dist/cjs/services/utils/aggregate.common.cjs +9 -0
- package/dist/cjs/services/utils/aggregate.common.cjs.map +1 -0
- package/dist/cjs/types/agent.cjs +2 -2
- package/dist/cjs/types/memory.cjs +2 -2
- package/dist/esm/{chunk-275JHD5P.js → chunk-2VGXYWJD.js} +5 -5
- package/dist/esm/chunk-2VGXYWJD.js.map +1 -0
- package/dist/esm/{chunk-A5PRJ33H.js → chunk-44CTGJX4.js} +116 -32
- package/dist/esm/chunk-44CTGJX4.js.map +1 -0
- package/dist/esm/{chunk-GRN6CHNO.js → chunk-4BHU7SPZ.js} +1 -1
- package/dist/esm/{chunk-GRN6CHNO.js.map → chunk-4BHU7SPZ.js.map} +1 -1
- package/dist/esm/{chunk-SPRW6KUR.js → chunk-6YBQCUNB.js} +12 -8
- package/dist/esm/chunk-6YBQCUNB.js.map +1 -0
- package/dist/esm/chunk-7DH4SI44.js +89 -0
- package/dist/esm/chunk-7DH4SI44.js.map +1 -0
- package/dist/esm/{chunk-OUIXXZFI.js → chunk-7GV6DSPE.js} +4 -1
- package/dist/esm/chunk-7GV6DSPE.js.map +1 -0
- package/dist/esm/chunk-7XQPJVYO.js +62 -0
- package/dist/esm/chunk-7XQPJVYO.js.map +1 -0
- package/dist/esm/{chunk-6AN7Z5OC.js → chunk-AEBBZSQ4.js} +10 -17
- package/dist/esm/chunk-AEBBZSQ4.js.map +1 -0
- package/dist/esm/chunk-BS52JTBH.js +8 -0
- package/dist/esm/chunk-BS52JTBH.js.map +1 -0
- package/dist/esm/chunk-BZUWX7HX.js +68 -0
- package/dist/esm/chunk-BZUWX7HX.js.map +1 -0
- package/dist/esm/{chunk-WUNZG3WP.js → chunk-C5JXXLCW.js} +1 -1
- package/dist/esm/chunk-C5JXXLCW.js.map +1 -0
- package/dist/esm/chunk-CC6DWPHZ.js +95 -0
- package/dist/esm/chunk-CC6DWPHZ.js.map +1 -0
- package/dist/esm/chunk-CG35V3ZH.js +21 -0
- package/dist/esm/chunk-CG35V3ZH.js.map +1 -0
- package/dist/esm/{chunk-JHKBIDPX.js → chunk-D6STNZ2L.js} +30 -25
- package/dist/esm/chunk-D6STNZ2L.js.map +1 -0
- package/dist/esm/chunk-FCH7BUK4.js +17 -0
- package/dist/esm/chunk-FCH7BUK4.js.map +1 -0
- package/dist/esm/chunk-I4P7JMJC.js +104 -0
- package/dist/esm/chunk-I4P7JMJC.js.map +1 -0
- package/dist/esm/chunk-IG3B5AXN.js +74 -0
- package/dist/esm/chunk-IG3B5AXN.js.map +1 -0
- package/dist/esm/{chunk-JCXAHLRN.js → chunk-JXGQVFCO.js} +20 -30
- package/dist/esm/chunk-JXGQVFCO.js.map +1 -0
- package/dist/esm/chunk-LMOWEXWF.js +38 -0
- package/dist/esm/chunk-LMOWEXWF.js.map +1 -0
- package/dist/esm/chunk-O3MPFL5J.js +47 -0
- package/dist/esm/chunk-O3MPFL5J.js.map +1 -0
- package/dist/esm/chunk-PZQRSWST.js +18 -0
- package/dist/esm/chunk-PZQRSWST.js.map +1 -0
- package/dist/esm/{chunk-KOCOM7IC.js → chunk-QQZ5ANSD.js} +8 -7
- package/dist/esm/chunk-QQZ5ANSD.js.map +1 -0
- package/dist/esm/chunk-TQJCYP7X.js +170 -0
- package/dist/esm/chunk-TQJCYP7X.js.map +1 -0
- package/dist/esm/{chunk-WZQVH4XY.js → chunk-V23GKNNJ.js} +7 -7
- package/dist/esm/chunk-V23GKNNJ.js.map +1 -0
- package/dist/esm/chunk-VBK4WM2M.js +17 -0
- package/dist/esm/chunk-VBK4WM2M.js.map +1 -0
- package/dist/esm/{chunk-F3SGL62A.js → chunk-VP5Q63JU.js} +12 -8
- package/dist/esm/chunk-VP5Q63JU.js.map +1 -0
- package/dist/esm/chunk-VSQVYW2H.js +37 -0
- package/dist/esm/chunk-VSQVYW2H.js.map +1 -0
- package/dist/esm/{chunk-TUEEIIR3.js → chunk-WKFSYGMH.js} +5 -6
- package/dist/esm/chunk-WKFSYGMH.js.map +1 -0
- package/dist/esm/{chunk-OTBWAUJF.js → chunk-YDER5JOU.js} +5 -2
- package/dist/esm/chunk-YDER5JOU.js.map +1 -0
- package/dist/esm/{chunk-4LBR3TIJ.js → chunk-ZJVWC666.js} +6 -6
- package/dist/esm/chunk-ZJVWC666.js.map +1 -0
- package/dist/esm/{chunk-AMRKK46V.js → chunk-ZK3HZBER.js} +5 -5
- package/dist/esm/chunk-ZK3HZBER.js.map +1 -0
- package/dist/esm/chunk-ZNZZZ4NN.js +45 -0
- package/dist/esm/chunk-ZNZZZ4NN.js.map +1 -0
- package/dist/esm/{chunk-RL6SRSSK.js → chunk-ZVYC5Y6Z.js} +1 -1
- package/dist/esm/chunk-ZVYC5Y6Z.js.map +1 -0
- package/dist/esm/config/agent.d.ts +25 -0
- package/dist/esm/config/agent.js +9 -0
- package/dist/esm/config/manifest.d.ts +3 -0
- package/dist/esm/config/modules.d.ts +34 -0
- package/dist/esm/config/modules.js +19 -0
- package/dist/esm/config/options.d.ts +14 -0
- package/dist/esm/config/options.js +11 -0
- package/dist/esm/container/controllers.d.ts +57 -0
- package/dist/esm/container/controllers.js +16 -0
- package/dist/esm/container/index.d.ts +68 -0
- package/dist/esm/container/index.js +40 -0
- package/dist/esm/container/index.js.map +1 -0
- package/dist/esm/container/services.d.ts +42 -0
- package/dist/esm/container/services.js +25 -0
- package/dist/esm/container/services.js.map +1 -0
- package/dist/esm/controllers/a2a.controller.d.ts +11 -7
- package/dist/esm/controllers/api/agent.api.controller.d.ts +3 -17
- package/dist/esm/controllers/api/agent.api.controller.js +1 -1
- package/dist/esm/controllers/api/threads.api.controller.js +1 -1
- package/dist/esm/controllers/api/workflow.api.controller.d.ts +16 -0
- package/dist/esm/controllers/api/workflow.api.controller.js +7 -0
- package/dist/esm/controllers/api/workflow.api.controller.js.map +1 -0
- package/dist/esm/controllers/index.d.ts +9 -11
- package/dist/esm/controllers/index.js +7 -8
- package/dist/esm/controllers/query.controller.d.ts +13 -11
- package/dist/esm/controllers/query.controller.js +2 -3
- package/dist/esm/index.d.ts +16 -10
- package/dist/esm/index.js +77 -53
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/middlewares/auth.middleware.d.ts +2 -2
- package/dist/esm/middlewares/auth.middleware.js +2 -2
- package/dist/esm/middlewares/error.middleware.d.ts +3 -0
- package/dist/esm/modules/a2a/a2a.module.js +1 -1
- package/dist/esm/modules/auth/{base.auth.d.ts → auth.module.d.ts} +2 -2
- package/dist/esm/modules/auth/auth.module.js +7 -0
- package/dist/esm/modules/auth/auth.module.js.map +1 -0
- package/dist/esm/modules/index.d.ts +2 -2
- package/dist/esm/modules/index.js +9 -9
- package/dist/esm/modules/memory/base.memory.d.ts +13 -2
- package/dist/esm/modules/memory/memory.module.d.ts +2 -1
- package/dist/esm/modules/memory/memory.module.js +1 -1
- package/dist/esm/routes/a2a.routes.d.ts +1 -22
- package/dist/esm/routes/a2a.routes.js +28 -10
- package/dist/esm/routes/api/agent.routes.d.ts +1 -20
- package/dist/esm/routes/api/agent.routes.js +29 -2
- package/dist/esm/routes/api/intent.routes.d.ts +1 -4
- package/dist/esm/routes/api/intent.routes.js +28 -2
- package/dist/esm/routes/api/model.routes.d.ts +1 -6
- package/dist/esm/routes/api/model.routes.js +28 -1
- package/dist/esm/routes/api/threads.routes.d.ts +1 -4
- package/dist/esm/routes/api/threads.routes.js +29 -3
- package/dist/esm/routes/api/workflow.routes.d.ts +5 -0
- package/dist/esm/routes/api/workflow.routes.js +35 -0
- package/dist/esm/routes/api/workflow.routes.js.map +1 -0
- package/dist/esm/routes/api.routes.d.ts +1 -20
- package/dist/esm/routes/api.routes.js +32 -8
- package/dist/esm/routes/index.d.ts +0 -19
- package/dist/esm/routes/index.js +39 -27
- package/dist/esm/routes/intent.routes.d.ts +1 -20
- package/dist/esm/routes/intent.routes.js +26 -14
- package/dist/esm/routes/query.routes.d.ts +1 -20
- package/dist/esm/routes/query.routes.js +26 -11
- package/dist/esm/services/a2a.service.d.ts +14 -10
- package/dist/esm/services/a2a.service.js +1 -1
- package/dist/esm/services/index.d.ts +9 -9
- package/dist/esm/services/index.js +16 -21
- package/dist/esm/services/intents/aggregate.service.d.ts +41 -0
- package/dist/esm/services/intents/aggregate.service.js +10 -0
- package/dist/esm/services/intents/aggregate.service.js.map +1 -0
- package/dist/esm/services/intents/fulfill.service.d.ts +23 -7
- package/dist/esm/services/intents/fulfill.service.js +5 -2
- package/dist/esm/services/intents/multi-trigger.service.d.ts +27 -0
- package/dist/esm/services/intents/multi-trigger.service.js +8 -0
- package/dist/esm/services/intents/multi-trigger.service.js.map +1 -0
- package/dist/esm/services/intents/single-trigger.service.d.ts +28 -0
- package/dist/esm/services/intents/single-trigger.service.js +8 -0
- package/dist/esm/services/intents/single-trigger.service.js.map +1 -0
- package/dist/esm/services/intents/trigger.service.d.ts +9 -4
- package/dist/esm/services/intents/trigger.service.js +3 -1
- package/dist/esm/services/query.service.d.ts +21 -15
- package/dist/esm/services/query.service.js +3 -7
- package/dist/esm/services/thread.service.d.ts +2 -2
- package/dist/esm/services/thread.service.js +1 -1
- package/dist/esm/services/utils/aggregate.common.d.ts +10 -0
- package/dist/esm/services/utils/aggregate.common.js +9 -0
- package/dist/esm/services/utils/aggregate.common.js.map +1 -0
- package/dist/esm/types/agent.d.ts +9 -1
- package/dist/esm/types/agent.js +1 -1
- package/dist/esm/types/memory.d.ts +23 -1
- package/dist/esm/types/memory.js +1 -1
- package/dist/esm/types/stream.d.ts +11 -0
- package/package.json +1 -1
- package/dist/cjs/chunk-2P3ZBNVN.cjs +0 -45
- package/dist/cjs/chunk-2P3ZBNVN.cjs.map +0 -1
- package/dist/cjs/chunk-3RS6NVSN.cjs +0 -41
- package/dist/cjs/chunk-3RS6NVSN.cjs.map +0 -1
- package/dist/cjs/chunk-4Z4HSVCQ.cjs.map +0 -1
- package/dist/cjs/chunk-5FZ7QLJD.cjs.map +0 -1
- package/dist/cjs/chunk-5QSLQX4H.cjs.map +0 -1
- package/dist/cjs/chunk-6T2YGFSD.cjs +0 -28
- package/dist/cjs/chunk-6T2YGFSD.cjs.map +0 -1
- package/dist/cjs/chunk-7KXB6FOT.cjs +0 -112
- package/dist/cjs/chunk-7KXB6FOT.cjs.map +0 -1
- package/dist/cjs/chunk-AHNKY3JY.cjs +0 -30
- package/dist/cjs/chunk-AHNKY3JY.cjs.map +0 -1
- package/dist/cjs/chunk-DGXLVGIM.cjs +0 -36
- package/dist/cjs/chunk-DGXLVGIM.cjs.map +0 -1
- package/dist/cjs/chunk-E3PD4Q76.cjs +0 -41
- package/dist/cjs/chunk-E3PD4Q76.cjs.map +0 -1
- package/dist/cjs/chunk-EA3YMPST.cjs.map +0 -1
- package/dist/cjs/chunk-FJ2JWXSL.cjs.map +0 -1
- package/dist/cjs/chunk-HF2QUMQV.cjs +0 -30
- package/dist/cjs/chunk-HF2QUMQV.cjs.map +0 -1
- package/dist/cjs/chunk-HF7GKQ6Y.cjs +0 -105
- package/dist/cjs/chunk-HF7GKQ6Y.cjs.map +0 -1
- package/dist/cjs/chunk-MT722JJC.cjs +0 -1
- package/dist/cjs/chunk-MT722JJC.cjs.map +0 -1
- package/dist/cjs/chunk-NEWJ7PXH.cjs.map +0 -1
- package/dist/cjs/chunk-NNYPZA6W.cjs.map +0 -1
- package/dist/cjs/chunk-OZPPTVUA.cjs.map +0 -1
- package/dist/cjs/chunk-QCYLIOXZ.cjs.map +0 -1
- package/dist/cjs/chunk-RCOESZIX.cjs.map +0 -1
- package/dist/cjs/chunk-RVT67VJL.cjs +0 -105
- package/dist/cjs/chunk-RVT67VJL.cjs.map +0 -1
- package/dist/cjs/chunk-TZ6JOGWV.cjs.map +0 -1
- package/dist/cjs/chunk-U47SG7XG.cjs +0 -168
- package/dist/cjs/chunk-U47SG7XG.cjs.map +0 -1
- package/dist/cjs/chunk-X46GJS7X.cjs.map +0 -1
- package/dist/cjs/chunk-XEAJBA3S.cjs +0 -30
- package/dist/cjs/chunk-XEAJBA3S.cjs.map +0 -1
- package/dist/cjs/chunk-XQTVE64W.cjs +0 -8
- package/dist/cjs/chunk-XQTVE64W.cjs.map +0 -1
- package/dist/cjs/chunk-YCTPMLZO.cjs.map +0 -1
- package/dist/cjs/chunk-YY7HSXBP.cjs +0 -36
- package/dist/cjs/chunk-YY7HSXBP.cjs.map +0 -1
- package/dist/cjs/chunk-Z6TQ7TFO.cjs.map +0 -1
- package/dist/cjs/modules/auth/base.auth.cjs +0 -7
- package/dist/cjs/modules/auth/base.auth.cjs.map +0 -1
- package/dist/cjs/services/intents/fulfill-stream.service.cjs +0 -12
- package/dist/cjs/services/intents/fulfill-stream.service.cjs.map +0 -1
- package/dist/cjs/services/query-stream.service.cjs +0 -16
- package/dist/cjs/services/query-stream.service.cjs.map +0 -1
- package/dist/esm/chunk-275JHD5P.js.map +0 -1
- package/dist/esm/chunk-4LBR3TIJ.js.map +0 -1
- package/dist/esm/chunk-6AN7Z5OC.js.map +0 -1
- package/dist/esm/chunk-A5PRJ33H.js.map +0 -1
- package/dist/esm/chunk-AMRKK46V.js.map +0 -1
- package/dist/esm/chunk-F3SGL62A.js.map +0 -1
- package/dist/esm/chunk-FF5RJ4L2.js +0 -8
- package/dist/esm/chunk-FF5RJ4L2.js.map +0 -1
- package/dist/esm/chunk-JCXAHLRN.js.map +0 -1
- package/dist/esm/chunk-JHKBIDPX.js.map +0 -1
- package/dist/esm/chunk-KOCOM7IC.js.map +0 -1
- package/dist/esm/chunk-OTBWAUJF.js.map +0 -1
- package/dist/esm/chunk-OUIXXZFI.js.map +0 -1
- package/dist/esm/chunk-Q7NLA5X4.js +0 -30
- package/dist/esm/chunk-Q7NLA5X4.js.map +0 -1
- package/dist/esm/chunk-RL6SRSSK.js.map +0 -1
- package/dist/esm/chunk-SPRW6KUR.js.map +0 -1
- package/dist/esm/chunk-TUEEIIR3.js.map +0 -1
- package/dist/esm/chunk-U7REZSMO.js +0 -1
- package/dist/esm/chunk-UEUZ7G5P.js +0 -168
- package/dist/esm/chunk-UEUZ7G5P.js.map +0 -1
- package/dist/esm/chunk-WO2QJ6UM.js +0 -28
- package/dist/esm/chunk-WO2QJ6UM.js.map +0 -1
- package/dist/esm/chunk-WUNZG3WP.js.map +0 -1
- package/dist/esm/chunk-WZQVH4XY.js.map +0 -1
- package/dist/esm/chunk-Y7BKUWRJ.js +0 -105
- package/dist/esm/chunk-Y7BKUWRJ.js.map +0 -1
- package/dist/esm/chunk-YJTWW6QK.js +0 -41
- package/dist/esm/chunk-YJTWW6QK.js.map +0 -1
- package/dist/esm/modules/auth/base.auth.js +0 -7
- package/dist/esm/services/intents/fulfill-stream.service.d.ts +0 -50
- package/dist/esm/services/intents/fulfill-stream.service.js +0 -12
- package/dist/esm/services/query-stream.service.d.ts +0 -54
- package/dist/esm/services/query-stream.service.js +0 -16
- /package/dist/esm/{chunk-U7REZSMO.js.map → config/agent.js.map} +0 -0
- /package/dist/esm/{modules/auth/base.auth.js.map → config/modules.js.map} +0 -0
- /package/dist/esm/{services/intents/fulfill-stream.service.js.map → config/options.js.map} +0 -0
- /package/dist/esm/{services/query-stream.service.js.map → container/controllers.js.map} +0 -0
|
@@ -1,19 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createQueryRouter
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-PZQRSWST.js";
|
|
4
|
+
import "../chunk-IG3B5AXN.js";
|
|
5
|
+
import "../chunk-I4P7JMJC.js";
|
|
6
|
+
import "../chunk-DFXHJUGV.js";
|
|
7
|
+
import "../chunk-BZUWX7HX.js";
|
|
8
|
+
import "../chunk-WKFSYGMH.js";
|
|
9
|
+
import "../chunk-UA44VKFE.js";
|
|
10
|
+
import "../chunk-ZVYC5Y6Z.js";
|
|
11
|
+
import "../chunk-YUKPKFX5.js";
|
|
12
|
+
import "../chunk-D6STNZ2L.js";
|
|
13
|
+
import "../chunk-7DH4SI44.js";
|
|
14
|
+
import "../chunk-ZNZZZ4NN.js";
|
|
15
|
+
import "../chunk-QQZ5ANSD.js";
|
|
16
|
+
import "../chunk-CC6DWPHZ.js";
|
|
17
|
+
import "../chunk-44CTGJX4.js";
|
|
10
18
|
import "../chunk-7BH6AYP7.js";
|
|
19
|
+
import "../chunk-TQJCYP7X.js";
|
|
20
|
+
import "../chunk-O3MPFL5J.js";
|
|
21
|
+
import "../chunk-ZJVWC666.js";
|
|
22
|
+
import "../chunk-JXGQVFCO.js";
|
|
23
|
+
import "../chunk-5IIF5O4A.js";
|
|
24
|
+
import "../chunk-V23GKNNJ.js";
|
|
11
25
|
import "../chunk-7CULQDJF.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-JHKBIDPX.js";
|
|
14
|
-
import "../chunk-GRN6CHNO.js";
|
|
15
|
-
import "../chunk-WUNZG3WP.js";
|
|
26
|
+
import "../chunk-C5JXXLCW.js";
|
|
16
27
|
import "../chunk-VUMI4XOY.js";
|
|
28
|
+
import "../chunk-2J2TQRP4.js";
|
|
29
|
+
import "../chunk-CG35V3ZH.js";
|
|
30
|
+
import "../chunk-4BHU7SPZ.js";
|
|
31
|
+
import "../chunk-VSQVYW2H.js";
|
|
17
32
|
export {
|
|
18
33
|
createQueryRouter
|
|
19
34
|
};
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import { AgentExecutor, ExecutionEventBus, RequestContext } from '@a2a-js/sdk/server';
|
|
2
|
-
import {
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '../types/connector.js';
|
|
2
|
+
import { QueryService } from './query.service.js';
|
|
3
|
+
import './intents/fulfill.service.js';
|
|
4
|
+
import './intents/trigger.service.js';
|
|
6
5
|
import '../types/stream.js';
|
|
7
6
|
import '../types/memory.js';
|
|
7
|
+
import '../types/connector.js';
|
|
8
|
+
import '../modules/memory/memory.module.js';
|
|
9
|
+
import '../modules/memory/base.memory.js';
|
|
10
|
+
import '../modules/models/base.model.js';
|
|
11
|
+
import '../modules/models/model.module.js';
|
|
12
|
+
import '../modules/a2a/a2a.module.js';
|
|
13
|
+
import '@a2a-js/sdk';
|
|
8
14
|
import '../modules/mcp/mcp.module.js';
|
|
9
15
|
import '../types/mcp.js';
|
|
10
16
|
import '@modelcontextprotocol/sdk/client/sse.js';
|
|
11
17
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
12
18
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
13
|
-
import '../
|
|
14
|
-
import '
|
|
15
|
-
import '../modules/models/base.model.js';
|
|
16
|
-
import '../modules/models/model.module.js';
|
|
19
|
+
import '../types/agent.js';
|
|
20
|
+
import 'http-status-codes';
|
|
17
21
|
|
|
18
22
|
/**
|
|
19
23
|
* Implements the AgentExecutor interface from the a2a-js-sdk.
|
|
20
24
|
* This service is responsible for the core business logic of executing an A2A task.
|
|
21
25
|
*/
|
|
22
26
|
declare class A2AService implements AgentExecutor {
|
|
23
|
-
private
|
|
27
|
+
private queryService;
|
|
24
28
|
private canceledTasks;
|
|
25
|
-
constructor(
|
|
29
|
+
constructor(queryService: QueryService);
|
|
26
30
|
cancelTask: (taskId: string, _eventBus: ExecutionEventBus) => Promise<void>;
|
|
27
31
|
private createTaskStatusUpdateEvent;
|
|
28
32
|
execute(requestContext: RequestContext, eventBus: ExecutionEventBus): Promise<void>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export { A2AService } from './a2a.service.js';
|
|
2
2
|
export { IntentFulfillService } from './intents/fulfill.service.js';
|
|
3
|
-
export { IntentFulfillStreamService } from './intents/fulfill-stream.service.js';
|
|
4
3
|
export { IntentTriggerService } from './intents/trigger.service.js';
|
|
5
4
|
export { QueryService } from './query.service.js';
|
|
6
|
-
export { QueryStreamService } from './query-stream.service.js';
|
|
7
5
|
import '@a2a-js/sdk/server';
|
|
8
|
-
import '../modules/a2a/a2a.module.js';
|
|
9
|
-
import '@a2a-js/sdk';
|
|
10
|
-
import '../types/connector.js';
|
|
11
6
|
import '../types/stream.js';
|
|
12
7
|
import '../types/memory.js';
|
|
8
|
+
import '../types/connector.js';
|
|
9
|
+
import '../modules/memory/memory.module.js';
|
|
10
|
+
import '../modules/memory/base.memory.js';
|
|
11
|
+
import '../modules/models/base.model.js';
|
|
12
|
+
import '../modules/models/model.module.js';
|
|
13
|
+
import '../modules/a2a/a2a.module.js';
|
|
14
|
+
import '@a2a-js/sdk';
|
|
13
15
|
import '../modules/mcp/mcp.module.js';
|
|
14
16
|
import '../types/mcp.js';
|
|
15
17
|
import '@modelcontextprotocol/sdk/client/sse.js';
|
|
16
18
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
17
19
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
18
|
-
import '../
|
|
19
|
-
import '
|
|
20
|
-
import '../modules/models/model.module.js';
|
|
21
|
-
import '../modules/models/base.model.js';
|
|
20
|
+
import '../types/agent.js';
|
|
21
|
+
import 'http-status-codes';
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import "../chunk-U7REZSMO.js";
|
|
2
1
|
import {
|
|
3
|
-
|
|
4
|
-
} from "../chunk-
|
|
2
|
+
IntentTriggerService
|
|
3
|
+
} from "../chunk-ZNZZZ4NN.js";
|
|
4
|
+
import "../chunk-QQZ5ANSD.js";
|
|
5
|
+
import "../chunk-CC6DWPHZ.js";
|
|
5
6
|
import {
|
|
6
7
|
IntentFulfillService
|
|
7
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-44CTGJX4.js";
|
|
9
|
+
import "../chunk-7BH6AYP7.js";
|
|
10
|
+
import "../chunk-TQJCYP7X.js";
|
|
11
|
+
import "../chunk-O3MPFL5J.js";
|
|
8
12
|
import {
|
|
9
|
-
|
|
10
|
-
} from "../chunk-
|
|
13
|
+
A2AService
|
|
14
|
+
} from "../chunk-ZJVWC666.js";
|
|
11
15
|
import {
|
|
12
|
-
|
|
13
|
-
} from "../chunk-
|
|
16
|
+
QueryService
|
|
17
|
+
} from "../chunk-JXGQVFCO.js";
|
|
14
18
|
import "../chunk-5IIF5O4A.js";
|
|
15
|
-
import {
|
|
16
|
-
IntentTriggerService
|
|
17
|
-
} from "../chunk-KOCOM7IC.js";
|
|
18
|
-
import "../chunk-7BH6AYP7.js";
|
|
19
19
|
import "../chunk-7CULQDJF.js";
|
|
20
|
-
import
|
|
21
|
-
A2AService
|
|
22
|
-
} from "../chunk-4LBR3TIJ.js";
|
|
23
|
-
import "../chunk-2J2TQRP4.js";
|
|
24
|
-
import "../chunk-GRN6CHNO.js";
|
|
25
|
-
import "../chunk-WUNZG3WP.js";
|
|
20
|
+
import "../chunk-C5JXXLCW.js";
|
|
26
21
|
import "../chunk-VUMI4XOY.js";
|
|
22
|
+
import "../chunk-2J2TQRP4.js";
|
|
23
|
+
import "../chunk-4BHU7SPZ.js";
|
|
27
24
|
export {
|
|
28
25
|
A2AService,
|
|
29
26
|
IntentFulfillService,
|
|
30
|
-
IntentFulfillStreamService,
|
|
31
27
|
IntentTriggerService,
|
|
32
|
-
QueryService
|
|
33
|
-
QueryStreamService
|
|
28
|
+
QueryService
|
|
34
29
|
};
|
|
35
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { StreamEvent } from '../../types/stream.js';
|
|
2
|
+
import { FulfillmentResult } from '../../types/memory.js';
|
|
3
|
+
import { ModelModule } from '../../modules/models/model.module.js';
|
|
4
|
+
import '../../types/connector.js';
|
|
5
|
+
import '../../modules/models/base.model.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Service for determining whether multiple fulfillment results need to be
|
|
9
|
+
* aggregated into a unified response, and generating that response if needed.
|
|
10
|
+
*/
|
|
11
|
+
declare class AggregateService {
|
|
12
|
+
private modelModule;
|
|
13
|
+
constructor(modelModule: ModelModule);
|
|
14
|
+
/**
|
|
15
|
+
* Analyzes fulfillment results and either returns the last response as-is
|
|
16
|
+
* or generates a unified response combining all results.
|
|
17
|
+
*
|
|
18
|
+
* @param originalQuery - The user's original query
|
|
19
|
+
* @param results - Array of fulfillment results from each intent
|
|
20
|
+
* @returns AsyncGenerator yielding StreamEvent objects
|
|
21
|
+
*/
|
|
22
|
+
aggregateIfNeeded(originalQuery: string, results: FulfillmentResult[]): AsyncGenerator<StreamEvent>;
|
|
23
|
+
/**
|
|
24
|
+
* Asks LLM to decide whether the results need to be aggregated.
|
|
25
|
+
*/
|
|
26
|
+
private shouldAggregate;
|
|
27
|
+
/**
|
|
28
|
+
* Generates a unified response by streaming from the model.
|
|
29
|
+
*/
|
|
30
|
+
private generateAggregatedResponse;
|
|
31
|
+
/**
|
|
32
|
+
* Builds the prompt for the aggregation decision.
|
|
33
|
+
*/
|
|
34
|
+
private buildDecisionPrompt;
|
|
35
|
+
/**
|
|
36
|
+
* Builds the prompt for generating an aggregated response.
|
|
37
|
+
*/
|
|
38
|
+
private buildAggregatePrompt;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { AggregateService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -2,23 +2,27 @@ import { A2AModule } from '../../modules/a2a/a2a.module.js';
|
|
|
2
2
|
import { MCPModule } from '../../modules/mcp/mcp.module.js';
|
|
3
3
|
import { TriggeredIntent, ThreadObject } from '../../types/memory.js';
|
|
4
4
|
import { MemoryModule } from '../../modules/memory/memory.module.js';
|
|
5
|
+
import { StreamEvent } from '../../types/stream.js';
|
|
5
6
|
import { ModelModule } from '../../modules/models/model.module.js';
|
|
7
|
+
import { OnIntentFallback } from '../../types/agent.js';
|
|
6
8
|
import '@a2a-js/sdk';
|
|
7
9
|
import '../../types/connector.js';
|
|
8
|
-
import '../../types/stream.js';
|
|
9
10
|
import '../../types/mcp.js';
|
|
10
11
|
import '@modelcontextprotocol/sdk/client/sse.js';
|
|
11
12
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
12
13
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
13
14
|
import '../../modules/memory/base.memory.js';
|
|
14
15
|
import '../../modules/models/base.model.js';
|
|
16
|
+
import 'http-status-codes';
|
|
15
17
|
|
|
16
18
|
declare class IntentFulfillService {
|
|
17
19
|
private modelModule;
|
|
20
|
+
private memoryModule;
|
|
18
21
|
private a2aModule?;
|
|
19
22
|
private mcpModule?;
|
|
20
|
-
private
|
|
21
|
-
|
|
23
|
+
private onIntentFallback?;
|
|
24
|
+
private aggregateService;
|
|
25
|
+
constructor(modelModule: ModelModule, memoryModule: MemoryModule, a2aModule?: A2AModule, mcpModule?: MCPModule, onIntentFallback?: OnIntentFallback);
|
|
22
26
|
private addToThreadMessages;
|
|
23
27
|
/**
|
|
24
28
|
* Fulfills the detected intent by generating a streaming response.
|
|
@@ -38,13 +42,25 @@ declare class IntentFulfillService {
|
|
|
38
42
|
*/
|
|
39
43
|
private intentFulfilling;
|
|
40
44
|
/**
|
|
41
|
-
*
|
|
45
|
+
* Returns the appropriate stream for a triggered intent.
|
|
46
|
+
* Uses fallback handler if no intent matched and fallback is configured.
|
|
47
|
+
*/
|
|
48
|
+
private getIntentStream;
|
|
49
|
+
/**
|
|
50
|
+
* Processes all triggered intents and generates a unified response.
|
|
42
51
|
*
|
|
43
|
-
*
|
|
52
|
+
* Workflow:
|
|
53
|
+
* 1. Process each intent sequentially, collecting results
|
|
54
|
+
* 2. Yield thinking_process events for progress visibility
|
|
55
|
+
* 3. Use RewriteService to determine if results need unification
|
|
56
|
+
* 4. Stream the final (possibly rewritten) response
|
|
57
|
+
*
|
|
58
|
+
* @param intents - Array of triggered intents to process
|
|
44
59
|
* @param thread - The thread history
|
|
45
|
-
* @
|
|
60
|
+
* @param originalQuery - The user's original query (for rewrite context)
|
|
61
|
+
* @returns AsyncGenerator yielding StreamEvent objects
|
|
46
62
|
*/
|
|
47
|
-
intentFulfill(intents: Array<TriggeredIntent>, thread: ThreadObject):
|
|
63
|
+
intentFulfill(intents: Array<TriggeredIntent>, thread: ThreadObject, originalQuery: string): AsyncGenerator<StreamEvent>;
|
|
48
64
|
}
|
|
49
65
|
|
|
50
66
|
export { IntentFulfillService };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IntentFulfillService
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-44CTGJX4.js";
|
|
4
4
|
import "../../chunk-7BH6AYP7.js";
|
|
5
|
+
import "../../chunk-TQJCYP7X.js";
|
|
6
|
+
import "../../chunk-O3MPFL5J.js";
|
|
5
7
|
import "../../chunk-7CULQDJF.js";
|
|
6
|
-
import "../../chunk-GRN6CHNO.js";
|
|
7
8
|
import "../../chunk-VUMI4XOY.js";
|
|
9
|
+
import "../../chunk-2J2TQRP4.js";
|
|
10
|
+
import "../../chunk-4BHU7SPZ.js";
|
|
8
11
|
export {
|
|
9
12
|
IntentFulfillService
|
|
10
13
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ThreadObject, TriggeredIntent } from '../../types/memory.js';
|
|
2
|
+
import { MemoryModule } from '../../modules/memory/memory.module.js';
|
|
3
|
+
import { ModelModule } from '../../modules/models/model.module.js';
|
|
4
|
+
import '../../modules/memory/base.memory.js';
|
|
5
|
+
import '../../modules/models/base.model.js';
|
|
6
|
+
import '../../types/connector.js';
|
|
7
|
+
import '../../types/stream.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Service for multi-intent triggering.
|
|
11
|
+
* Decomposes queries into multiple subqueries and maps each to an intent.
|
|
12
|
+
*/
|
|
13
|
+
declare class MultiIntentTriggerService {
|
|
14
|
+
private modelModule;
|
|
15
|
+
private memoryModule;
|
|
16
|
+
constructor(modelModule: ModelModule, memoryModule: MemoryModule);
|
|
17
|
+
/**
|
|
18
|
+
* Detects multiple intents from context by decomposing queries into subqueries.
|
|
19
|
+
*
|
|
20
|
+
* @param query - The user's input query
|
|
21
|
+
* @param thread - The thread history
|
|
22
|
+
* @returns Array of TriggeredIntent objects
|
|
23
|
+
*/
|
|
24
|
+
intentTriggering(query: string, thread: ThreadObject | undefined): Promise<Array<TriggeredIntent>>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { MultiIntentTriggerService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ThreadObject, TriggeredIntent } from '../../types/memory.js';
|
|
2
|
+
import { MemoryModule } from '../../modules/memory/memory.module.js';
|
|
3
|
+
import { ModelModule } from '../../modules/models/model.module.js';
|
|
4
|
+
import '../../modules/memory/base.memory.js';
|
|
5
|
+
import '../../modules/models/base.model.js';
|
|
6
|
+
import '../../types/connector.js';
|
|
7
|
+
import '../../types/stream.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Service for single-intent triggering.
|
|
11
|
+
* Identifies a single intent without decomposing queries into subqueries.
|
|
12
|
+
*/
|
|
13
|
+
declare class SingleIntentTriggerService {
|
|
14
|
+
private modelModule;
|
|
15
|
+
private memoryModule;
|
|
16
|
+
constructor(modelModule: ModelModule, memoryModule: MemoryModule);
|
|
17
|
+
/**
|
|
18
|
+
* Detects a single intent from context.
|
|
19
|
+
* Simpler prompt that doesn't decompose queries into subqueries.
|
|
20
|
+
*
|
|
21
|
+
* @param query - The user's input query
|
|
22
|
+
* @param thread - The thread history
|
|
23
|
+
* @returns Array with single TriggeredIntent
|
|
24
|
+
*/
|
|
25
|
+
intentTriggering(query: string, thread: ThreadObject | undefined): Promise<Array<TriggeredIntent>>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { SingleIntentTriggerService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -6,16 +6,21 @@ import '../../modules/models/base.model.js';
|
|
|
6
6
|
import '../../types/connector.js';
|
|
7
7
|
import '../../types/stream.js';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Service for intent triggering.
|
|
11
|
+
* Routes to single or multi-intent triggering based on DISABLE_MULTI_INTENTS env var.
|
|
12
|
+
*/
|
|
9
13
|
declare class IntentTriggerService {
|
|
10
|
-
private
|
|
11
|
-
private
|
|
12
|
-
constructor(modelModule: ModelModule, memoryModule
|
|
14
|
+
private singleTriggerService;
|
|
15
|
+
private multiTriggerService;
|
|
16
|
+
constructor(modelModule: ModelModule, memoryModule: MemoryModule);
|
|
13
17
|
/**
|
|
14
18
|
* Detects the intent from context.
|
|
19
|
+
* Routes to single or multi-intent triggering based on DISABLE_MULTI_INTENTS env var.
|
|
15
20
|
*
|
|
16
21
|
* @param query - The user's input query
|
|
17
22
|
* @param thread - The thread history
|
|
18
|
-
* @returns The detected intent
|
|
23
|
+
* @returns The detected intent(s)
|
|
19
24
|
*/
|
|
20
25
|
intentTriggering(query: string, thread: ThreadObject | undefined): Promise<Array<TriggeredIntent>>;
|
|
21
26
|
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ThreadType } from '../types/memory.js';
|
|
1
|
+
import { StreamEvent } from '../types/stream.js';
|
|
2
|
+
import { MessageObject, ThreadType } from '../types/memory.js';
|
|
4
3
|
import { MemoryModule } from '../modules/memory/memory.module.js';
|
|
5
4
|
import { ModelFetchOptions } from '../modules/models/base.model.js';
|
|
6
5
|
import { ModelModule } from '../modules/models/model.module.js';
|
|
7
|
-
import '
|
|
6
|
+
import { IntentFulfillService } from './intents/fulfill.service.js';
|
|
7
|
+
import { IntentTriggerService } from './intents/trigger.service.js';
|
|
8
8
|
import '../types/connector.js';
|
|
9
|
-
import '../
|
|
9
|
+
import '../modules/memory/base.memory.js';
|
|
10
|
+
import '../modules/a2a/a2a.module.js';
|
|
11
|
+
import '@a2a-js/sdk';
|
|
12
|
+
import '../modules/mcp/mcp.module.js';
|
|
10
13
|
import '../types/mcp.js';
|
|
11
14
|
import '@modelcontextprotocol/sdk/client/sse.js';
|
|
12
15
|
import '@modelcontextprotocol/sdk/client/stdio.js';
|
|
13
16
|
import '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
14
|
-
import '../
|
|
17
|
+
import '../types/agent.js';
|
|
18
|
+
import 'http-status-codes';
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
21
|
* Service for processing user queries through the agent's AI pipeline.
|
|
@@ -22,34 +26,36 @@ import '../modules/memory/base.memory.js';
|
|
|
22
26
|
*/
|
|
23
27
|
declare class QueryService {
|
|
24
28
|
private modelModule;
|
|
25
|
-
private memoryModule
|
|
29
|
+
private memoryModule;
|
|
26
30
|
private intentTriggerService;
|
|
27
31
|
private intentFulfillService;
|
|
28
|
-
constructor(modelModule: ModelModule,
|
|
32
|
+
constructor(modelModule: ModelModule, memoryModule: MemoryModule, intentTriggerService: IntentTriggerService, intentFulfillService: IntentFulfillService);
|
|
33
|
+
addToThreadMessages(userId: string, threadId: string, messages: Array<MessageObject>): Promise<void>;
|
|
29
34
|
/**
|
|
30
|
-
* Main entry point for processing user queries.
|
|
35
|
+
* Main entry point for processing streaming user queries.
|
|
31
36
|
*
|
|
32
37
|
* Handles the complete query lifecycle:
|
|
33
38
|
* 1. Loads or creates thread from memory
|
|
34
39
|
* 2. Detects intent from the query
|
|
35
|
-
* 3. Fulfills the intent with AI response
|
|
36
|
-
* 4. Updates conversation history
|
|
40
|
+
* 3. Fulfills the intent with streaming AI response
|
|
41
|
+
* 4. Updates conversation history in real-time
|
|
37
42
|
*
|
|
38
43
|
* @param threadMetadata - Metadata containing type, userId, and optional threadId
|
|
39
44
|
* @param threadMetadata.type - The type of thread (e.g., chat, workflow)
|
|
40
45
|
* @param threadMetadata.userId - The user's unique identifier
|
|
41
46
|
* @param threadMetadata.threadId - Optional thread identifier
|
|
42
47
|
* @param query - The user's input query
|
|
43
|
-
* @returns
|
|
48
|
+
* @returns AsyncGenerator yielding StreamEvent objects for SSE
|
|
44
49
|
*/
|
|
45
50
|
handleQuery(threadMetadata: {
|
|
46
51
|
type: ThreadType;
|
|
47
52
|
userId: string;
|
|
48
53
|
threadId?: string;
|
|
49
54
|
options?: ModelFetchOptions;
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
}, queryData: {
|
|
56
|
+
query: string;
|
|
57
|
+
displayQuery?: string;
|
|
58
|
+
}, isA2A?: boolean): AsyncGenerator<StreamEvent>;
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
export { QueryService };
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
QueryService
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-UEUZ7G5P.js";
|
|
3
|
+
} from "../chunk-JXGQVFCO.js";
|
|
5
4
|
import "../chunk-5IIF5O4A.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-7BH6AYP7.js";
|
|
8
|
-
import "../chunk-7CULQDJF.js";
|
|
9
|
-
import "../chunk-GRN6CHNO.js";
|
|
10
|
-
import "../chunk-WUNZG3WP.js";
|
|
5
|
+
import "../chunk-C5JXXLCW.js";
|
|
11
6
|
import "../chunk-VUMI4XOY.js";
|
|
7
|
+
import "../chunk-4BHU7SPZ.js";
|
|
12
8
|
export {
|
|
13
9
|
QueryService
|
|
14
10
|
};
|
|
@@ -3,8 +3,8 @@ import { MemoryModule } from '../modules/memory/memory.module.js';
|
|
|
3
3
|
import '../modules/memory/base.memory.js';
|
|
4
4
|
|
|
5
5
|
declare class ThreadService {
|
|
6
|
-
private memoryModule
|
|
7
|
-
constructor(memoryModule
|
|
6
|
+
private memoryModule;
|
|
7
|
+
constructor(memoryModule: MemoryModule);
|
|
8
8
|
getThread(userId: string, threadId: string): Promise<ThreadObject | undefined>;
|
|
9
9
|
createThread(type: ThreadType, userId: string, threadId: string, title: string): Promise<ThreadObject>;
|
|
10
10
|
addMessagesToThread(userId: string, threadId: string, messages: Array<MessageObject>): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System prompt for deciding whether to aggregate/combine multiple responses.
|
|
3
|
+
*/
|
|
4
|
+
declare const AGGREGATE_DECISION_SYSTEM_PROMPT = "You are an assistant that determines whether multiple task responses need to be aggregated into a unified response.\n\nAnalyze the original query and the responses from each task.\n\n**Return JSON only:**\n{\n \"needsAggregation\": boolean,\n \"reason\": string // Write the reason in the same language as the original query\n}\n\n**Set needsAggregation to FALSE when:**\n- The last response already synthesizes/summarizes all previous results\n- The last task explicitly asks for a \"report\", \"summary\", \"\uACB0\uACFC\uBB3C\", \"\uB808\uD3EC\uD2B8\", \"\uC815\uB9AC\" based on previous tasks\n- The last response comprehensively addresses the original query by incorporating previous results\n\n**Set needsAggregation to TRUE when:**\n- Each response is independent and doesn't reference other results\n- The original query asks for multiple distinct things that weren't combined\n- Important information from earlier responses is missing in the final response\n\nExamples:\n\nQuery: \"A\uD558\uACE0, B\uD558\uACE0, \uADF8\uAC78 \uAE30\uBC18\uC73C\uB85C \uB808\uD3EC\uD2B8 \uB9CC\uB4E4\uC5B4\uC918\"\n\u2192 needsAggregation: false (last task already creates a combined report)\n\nQuery: \"A\uD558\uACE0, B\uB3C4 \uD574\uC918\"\n\u2192 needsAggregation: true (independent tasks, need combination)\n\nQuery: \"\uB0A0\uC528 \uC54C\uB824\uC8FC\uACE0, \uC77C\uC815\uB3C4 \uD655\uC778\uD574\uC918\"\n\u2192 needsAggregation: true (independent queries, results should be combined)";
|
|
5
|
+
/**
|
|
6
|
+
* System prompt for generating a unified response from multiple results.
|
|
7
|
+
*/
|
|
8
|
+
declare const AGGREGATE_GENERATION_SYSTEM_PROMPT = "You are an assistant that combines multiple task responses into a single, coherent response.\n\nGuidelines:\n- Preserve all important information from each response\n- Create a natural, flowing response that addresses the original query\n- Don't use section headers like \"[Task 1]\" - integrate smoothly\n- If responses have related information, synthesize them logically\n- Keep the tone consistent with the original responses\n- Be concise - don't add unnecessary filler\n- Respond in the same language as the original query";
|
|
9
|
+
|
|
10
|
+
export { AGGREGATE_DECISION_SYSTEM_PROMPT, AGGREGATE_GENERATION_SYSTEM_PROMPT };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { StatusCodes } from 'http-status-codes';
|
|
2
|
+
import { TriggeredIntent, ThreadObject } from './memory.js';
|
|
3
|
+
import { StreamEvent } from './stream.js';
|
|
4
|
+
import './connector.js';
|
|
2
5
|
|
|
6
|
+
type IntentFallbackContext = {
|
|
7
|
+
triggeredIntent: TriggeredIntent;
|
|
8
|
+
thread: ThreadObject;
|
|
9
|
+
};
|
|
10
|
+
type OnIntentFallback = (context: IntentFallbackContext) => AsyncGenerator<StreamEvent> | undefined;
|
|
3
11
|
/**
|
|
4
12
|
* Agent manifest containing essential metadata and configuration.
|
|
5
13
|
*
|
|
@@ -33,4 +41,4 @@ declare class AinHttpError extends Error {
|
|
|
33
41
|
constructor(status: StatusCodes, message: string);
|
|
34
42
|
}
|
|
35
43
|
|
|
36
|
-
export { type AinAgentManifest, AinHttpError };
|
|
44
|
+
export { type AinAgentManifest, AinHttpError, type IntentFallbackContext, type OnIntentFallback };
|
package/dist/esm/types/agent.js
CHANGED
|
@@ -97,5 +97,27 @@ type TriggeredIntent = {
|
|
|
97
97
|
intent?: Intent;
|
|
98
98
|
actionPlan?: string;
|
|
99
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Result of fulfilling a single intent.
|
|
102
|
+
* Used to collect all results before the rewrite step.
|
|
103
|
+
*/
|
|
104
|
+
type FulfillmentResult = {
|
|
105
|
+
/** Original subquery that was processed */
|
|
106
|
+
subquery: string;
|
|
107
|
+
/** Matched intent (may be undefined if no match) */
|
|
108
|
+
intent?: Intent;
|
|
109
|
+
/** Action plan description */
|
|
110
|
+
actionPlan?: string;
|
|
111
|
+
/** Response text generated for this intent */
|
|
112
|
+
response: string;
|
|
113
|
+
};
|
|
114
|
+
interface Workflow {
|
|
115
|
+
workflowId: string;
|
|
116
|
+
userId?: string;
|
|
117
|
+
title: string;
|
|
118
|
+
description: string;
|
|
119
|
+
active: boolean;
|
|
120
|
+
content: string;
|
|
121
|
+
}
|
|
100
122
|
|
|
101
|
-
export { type Intent, type MessageContentObject, type MessageObject, MessageRole, type ThreadMetadata, type ThreadObject, ThreadType, type TriggeredIntent };
|
|
123
|
+
export { type FulfillmentResult, type Intent, type MessageContentObject, type MessageObject, MessageRole, type ThreadMetadata, type ThreadObject, ThreadType, type TriggeredIntent, type Workflow };
|