@theokit/sdk 0.0.0-compat-580-20260905204608
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/CHANGELOG.md +7923 -0
- package/LICENSE +201 -0
- package/README.md +114 -0
- package/dist/a2a/agent-mailbox.d.cts +54 -0
- package/dist/a2a/agent-mailbox.d.ts +54 -0
- package/dist/a2a/index.cjs +138 -0
- package/dist/a2a/index.cjs.map +1 -0
- package/dist/a2a/index.d.cts +10 -0
- package/dist/a2a/index.d.ts +10 -0
- package/dist/a2a/index.js +125 -0
- package/dist/a2a/index.js.map +1 -0
- package/dist/a2a/message-bus.d.cts +118 -0
- package/dist/a2a/message-bus.d.ts +118 -0
- package/dist/a2a/subagent.d.cts +231 -0
- package/dist/a2a/subagent.d.ts +231 -0
- package/dist/a2a/types.d.cts +45 -0
- package/dist/a2a/types.d.ts +45 -0
- package/dist/agent-ARLOD4JX.cjs +67 -0
- package/dist/agent-ARLOD4JX.cjs.map +1 -0
- package/dist/agent-C3KO5LKm.d.cts +1871 -0
- package/dist/agent-CvmTR9uf.d.ts +1871 -0
- package/dist/agent-N6WJ54ML.js +58 -0
- package/dist/agent-N6WJ54ML.js.map +1 -0
- package/dist/agent-builder.d.ts +72 -0
- package/dist/agent-factory-registry-UU46BUMU.cjs +16 -0
- package/dist/agent-factory-registry-UU46BUMU.cjs.map +1 -0
- package/dist/agent-factory-registry-ZVTABLEY.js +3 -0
- package/dist/agent-factory-registry-ZVTABLEY.js.map +1 -0
- package/dist/agent-factory.d.ts +24 -0
- package/dist/agent-generate.d.ts +12 -0
- package/dist/agent-session-store-AFML3AXC.js +6 -0
- package/dist/agent-session-store-AFML3AXC.js.map +1 -0
- package/dist/agent-session-store-MTSIY3MH.cjs +23 -0
- package/dist/agent-session-store-MTSIY3MH.cjs.map +1 -0
- package/dist/agent.d.ts +276 -0
- package/dist/auth/index.cjs +306 -0
- package/dist/auth/index.cjs.map +1 -0
- package/dist/auth/index.d.cts +34 -0
- package/dist/auth/index.d.ts +34 -0
- package/dist/auth/index.js +247 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/batch-I6T6MXZO.cjs +263 -0
- package/dist/batch-I6T6MXZO.cjs.map +1 -0
- package/dist/batch-US4F6WPK.js +260 -0
- package/dist/batch-US4F6WPK.js.map +1 -0
- package/dist/chunk-24MGQDK3.js +31 -0
- package/dist/chunk-24MGQDK3.js.map +1 -0
- package/dist/chunk-24SYBZPL.cjs +121 -0
- package/dist/chunk-24SYBZPL.cjs.map +1 -0
- package/dist/chunk-2HPNT6HH.cjs +3373 -0
- package/dist/chunk-2HPNT6HH.cjs.map +1 -0
- package/dist/chunk-2SFBB54R.js +23 -0
- package/dist/chunk-2SFBB54R.js.map +1 -0
- package/dist/chunk-2WXHA33T.js +105 -0
- package/dist/chunk-2WXHA33T.js.map +1 -0
- package/dist/chunk-2XC6KDJM.js +22 -0
- package/dist/chunk-2XC6KDJM.js.map +1 -0
- package/dist/chunk-2XRAWOZZ.js +172 -0
- package/dist/chunk-2XRAWOZZ.js.map +1 -0
- package/dist/chunk-2ZPEDVLM.cjs +59 -0
- package/dist/chunk-2ZPEDVLM.cjs.map +1 -0
- package/dist/chunk-3EE6LVWT.cjs +29 -0
- package/dist/chunk-3EE6LVWT.cjs.map +1 -0
- package/dist/chunk-3JHIFQ4I.js +102 -0
- package/dist/chunk-3JHIFQ4I.js.map +1 -0
- package/dist/chunk-44I6UYVH.js +133 -0
- package/dist/chunk-44I6UYVH.js.map +1 -0
- package/dist/chunk-47TF32NQ.js +79 -0
- package/dist/chunk-47TF32NQ.js.map +1 -0
- package/dist/chunk-4A3SKJ53.cjs +297 -0
- package/dist/chunk-4A3SKJ53.cjs.map +1 -0
- package/dist/chunk-4HS6FFGL.cjs +433 -0
- package/dist/chunk-4HS6FFGL.cjs.map +1 -0
- package/dist/chunk-4MMWFSCD.js +25 -0
- package/dist/chunk-4MMWFSCD.js.map +1 -0
- package/dist/chunk-4NLCWGH7.cjs +177 -0
- package/dist/chunk-4NLCWGH7.cjs.map +1 -0
- package/dist/chunk-55GB6JYQ.js +208 -0
- package/dist/chunk-55GB6JYQ.js.map +1 -0
- package/dist/chunk-5WKQDIGO.js +136 -0
- package/dist/chunk-5WKQDIGO.js.map +1 -0
- package/dist/chunk-67SBTGMA.cjs +457 -0
- package/dist/chunk-67SBTGMA.cjs.map +1 -0
- package/dist/chunk-6LHQPOMI.cjs +193 -0
- package/dist/chunk-6LHQPOMI.cjs.map +1 -0
- package/dist/chunk-6M2OIS4Y.js +158 -0
- package/dist/chunk-6M2OIS4Y.js.map +1 -0
- package/dist/chunk-6PWOWXMC.js +121 -0
- package/dist/chunk-6PWOWXMC.js.map +1 -0
- package/dist/chunk-6X6ID4MO.js +20 -0
- package/dist/chunk-6X6ID4MO.js.map +1 -0
- package/dist/chunk-7A6535RA.cjs +231 -0
- package/dist/chunk-7A6535RA.cjs.map +1 -0
- package/dist/chunk-7FDKWDA2.cjs +135 -0
- package/dist/chunk-7FDKWDA2.cjs.map +1 -0
- package/dist/chunk-7I5Z3UBJ.js +10 -0
- package/dist/chunk-7I5Z3UBJ.js.map +1 -0
- package/dist/chunk-7JJ3A6AT.cjs +88 -0
- package/dist/chunk-7JJ3A6AT.cjs.map +1 -0
- package/dist/chunk-7SZAV6QG.js +593 -0
- package/dist/chunk-7SZAV6QG.js.map +1 -0
- package/dist/chunk-A4RAL2ER.cjs +51 -0
- package/dist/chunk-A4RAL2ER.cjs.map +1 -0
- package/dist/chunk-AA27GEYS.cjs +12 -0
- package/dist/chunk-AA27GEYS.cjs.map +1 -0
- package/dist/chunk-AAEZSPTC.js +133 -0
- package/dist/chunk-AAEZSPTC.js.map +1 -0
- package/dist/chunk-AGACYRJ2.js +11 -0
- package/dist/chunk-AGACYRJ2.js.map +1 -0
- package/dist/chunk-ALUN2B4W.js +356 -0
- package/dist/chunk-ALUN2B4W.js.map +1 -0
- package/dist/chunk-ANMJJD6D.cjs +18 -0
- package/dist/chunk-ANMJJD6D.cjs.map +1 -0
- package/dist/chunk-ATT276RD.cjs +173 -0
- package/dist/chunk-ATT276RD.cjs.map +1 -0
- package/dist/chunk-AW6F6HZR.js +166 -0
- package/dist/chunk-AW6F6HZR.js.map +1 -0
- package/dist/chunk-AWINL3ZC.js +109 -0
- package/dist/chunk-AWINL3ZC.js.map +1 -0
- package/dist/chunk-BJUJT5ED.cjs +186 -0
- package/dist/chunk-BJUJT5ED.cjs.map +1 -0
- package/dist/chunk-BUUUWQMB.cjs +34 -0
- package/dist/chunk-BUUUWQMB.cjs.map +1 -0
- package/dist/chunk-BV2MWEMV.cjs +26 -0
- package/dist/chunk-BV2MWEMV.cjs.map +1 -0
- package/dist/chunk-CFE6QF2Q.js +221 -0
- package/dist/chunk-CFE6QF2Q.js.map +1 -0
- package/dist/chunk-CZJ6Q7CW.js +183 -0
- package/dist/chunk-CZJ6Q7CW.js.map +1 -0
- package/dist/chunk-D3CCY3A2.cjs +10995 -0
- package/dist/chunk-D3CCY3A2.cjs.map +1 -0
- package/dist/chunk-D6POWE7E.cjs +210 -0
- package/dist/chunk-D6POWE7E.cjs.map +1 -0
- package/dist/chunk-DMRT67Y6.js +100 -0
- package/dist/chunk-DMRT67Y6.js.map +1 -0
- package/dist/chunk-DQZU7JK6.cjs +125 -0
- package/dist/chunk-DQZU7JK6.cjs.map +1 -0
- package/dist/chunk-EFMFILPG.js +77 -0
- package/dist/chunk-EFMFILPG.js.map +1 -0
- package/dist/chunk-EH6XD3FY.js +222 -0
- package/dist/chunk-EH6XD3FY.js.map +1 -0
- package/dist/chunk-EIQFAOFD.js +229 -0
- package/dist/chunk-EIQFAOFD.js.map +1 -0
- package/dist/chunk-EPSICJLZ.js +79 -0
- package/dist/chunk-EPSICJLZ.js.map +1 -0
- package/dist/chunk-EXTRW7GW.cjs +155 -0
- package/dist/chunk-EXTRW7GW.cjs.map +1 -0
- package/dist/chunk-FD2UT76F.js +3 -0
- package/dist/chunk-FD2UT76F.js.map +1 -0
- package/dist/chunk-FJWQP6EE.js +122 -0
- package/dist/chunk-FJWQP6EE.js.map +1 -0
- package/dist/chunk-FRITRLZQ.cjs +24 -0
- package/dist/chunk-FRITRLZQ.cjs.map +1 -0
- package/dist/chunk-FUSDYC2B.cjs +280 -0
- package/dist/chunk-FUSDYC2B.cjs.map +1 -0
- package/dist/chunk-G7BLGBRN.js +43 -0
- package/dist/chunk-G7BLGBRN.js.map +1 -0
- package/dist/chunk-GBCVPKHE.js +282 -0
- package/dist/chunk-GBCVPKHE.js.map +1 -0
- package/dist/chunk-GHX4P3V2.cjs +34 -0
- package/dist/chunk-GHX4P3V2.cjs.map +1 -0
- package/dist/chunk-GZV6AVRL.cjs +282 -0
- package/dist/chunk-GZV6AVRL.cjs.map +1 -0
- package/dist/chunk-H73MEMQB.js +31 -0
- package/dist/chunk-H73MEMQB.js.map +1 -0
- package/dist/chunk-HCT4HPCL.cjs +235 -0
- package/dist/chunk-HCT4HPCL.cjs.map +1 -0
- package/dist/chunk-HFEJE7AC.js +424 -0
- package/dist/chunk-HFEJE7AC.js.map +1 -0
- package/dist/chunk-HKCKOAIO.js +57 -0
- package/dist/chunk-HKCKOAIO.js.map +1 -0
- package/dist/chunk-HUFSABUZ.cjs +48 -0
- package/dist/chunk-HUFSABUZ.cjs.map +1 -0
- package/dist/chunk-HW7SEELD.cjs +46 -0
- package/dist/chunk-HW7SEELD.cjs.map +1 -0
- package/dist/chunk-HY66GLM6.js +13 -0
- package/dist/chunk-HY66GLM6.js.map +1 -0
- package/dist/chunk-I2PWY7VM.cjs +27 -0
- package/dist/chunk-I2PWY7VM.cjs.map +1 -0
- package/dist/chunk-IJ7M6GOG.cjs +28 -0
- package/dist/chunk-IJ7M6GOG.cjs.map +1 -0
- package/dist/chunk-IU5N5224.cjs +288 -0
- package/dist/chunk-IU5N5224.cjs.map +1 -0
- package/dist/chunk-IUMAQURF.js +130 -0
- package/dist/chunk-IUMAQURF.js.map +1 -0
- package/dist/chunk-J7J7J2GN.cjs +377 -0
- package/dist/chunk-J7J7J2GN.cjs.map +1 -0
- package/dist/chunk-JLRLCBJ4.cjs +108 -0
- package/dist/chunk-JLRLCBJ4.cjs.map +1 -0
- package/dist/chunk-JMDDYA22.js +171 -0
- package/dist/chunk-JMDDYA22.js.map +1 -0
- package/dist/chunk-JNAA4G4H.js +43 -0
- package/dist/chunk-JNAA4G4H.js.map +1 -0
- package/dist/chunk-JOFVLOFY.js +268 -0
- package/dist/chunk-JOFVLOFY.js.map +1 -0
- package/dist/chunk-K2BQQ445.js +30 -0
- package/dist/chunk-K2BQQ445.js.map +1 -0
- package/dist/chunk-K2VMFZQ5.js +487 -0
- package/dist/chunk-K2VMFZQ5.js.map +1 -0
- package/dist/chunk-K3NH62DG.js +3343 -0
- package/dist/chunk-K3NH62DG.js.map +1 -0
- package/dist/chunk-KGANQYP7.cjs +172 -0
- package/dist/chunk-KGANQYP7.cjs.map +1 -0
- package/dist/chunk-KRD3GQAA.cjs +71 -0
- package/dist/chunk-KRD3GQAA.cjs.map +1 -0
- package/dist/chunk-KTTHHYEW.cjs +45 -0
- package/dist/chunk-KTTHHYEW.cjs.map +1 -0
- package/dist/chunk-KVNWIAO4.js +68 -0
- package/dist/chunk-KVNWIAO4.js.map +1 -0
- package/dist/chunk-KVSAY6NZ.cjs +497 -0
- package/dist/chunk-KVSAY6NZ.cjs.map +1 -0
- package/dist/chunk-LOHMT36V.cjs +178 -0
- package/dist/chunk-LOHMT36V.cjs.map +1 -0
- package/dist/chunk-LX7SEXOQ.js +152 -0
- package/dist/chunk-LX7SEXOQ.js.map +1 -0
- package/dist/chunk-MUUQ2WFJ.cjs +4 -0
- package/dist/chunk-MUUQ2WFJ.cjs.map +1 -0
- package/dist/chunk-N6OOOYFZ.js +281 -0
- package/dist/chunk-N6OOOYFZ.js.map +1 -0
- package/dist/chunk-NAF4L3T6.js +22 -0
- package/dist/chunk-NAF4L3T6.js.map +1 -0
- package/dist/chunk-NINIJCHU.cjs +23 -0
- package/dist/chunk-NINIJCHU.cjs.map +1 -0
- package/dist/chunk-NJWYQWDL.js +43 -0
- package/dist/chunk-NJWYQWDL.js.map +1 -0
- package/dist/chunk-NQTD6QOW.cjs +226 -0
- package/dist/chunk-NQTD6QOW.cjs.map +1 -0
- package/dist/chunk-NQTNSHSB.cjs +843 -0
- package/dist/chunk-NQTNSHSB.cjs.map +1 -0
- package/dist/chunk-NVXXWAU7.cjs +13 -0
- package/dist/chunk-NVXXWAU7.cjs.map +1 -0
- package/dist/chunk-NYQ3IS7K.cjs +130 -0
- package/dist/chunk-NYQ3IS7K.cjs.map +1 -0
- package/dist/chunk-O6USDERH.js +165 -0
- package/dist/chunk-O6USDERH.js.map +1 -0
- package/dist/chunk-OBA6YK2R.cjs +8 -0
- package/dist/chunk-OBA6YK2R.cjs.map +1 -0
- package/dist/chunk-OQRGVTQF.js +169 -0
- package/dist/chunk-OQRGVTQF.js.map +1 -0
- package/dist/chunk-OR6XIWLB.js +19 -0
- package/dist/chunk-OR6XIWLB.js.map +1 -0
- package/dist/chunk-OYD3U3LY.js +10981 -0
- package/dist/chunk-OYD3U3LY.js.map +1 -0
- package/dist/chunk-PRZ3BES7.cjs +79 -0
- package/dist/chunk-PRZ3BES7.cjs.map +1 -0
- package/dist/chunk-PY2RQOA7.js +6 -0
- package/dist/chunk-PY2RQOA7.js.map +1 -0
- package/dist/chunk-Q5EWJPRY.js +18 -0
- package/dist/chunk-Q5EWJPRY.js.map +1 -0
- package/dist/chunk-QATRS7JD.cjs +158 -0
- package/dist/chunk-QATRS7JD.cjs.map +1 -0
- package/dist/chunk-QC55H6RJ.cjs +601 -0
- package/dist/chunk-QC55H6RJ.cjs.map +1 -0
- package/dist/chunk-QDM3OHUT.cjs +134 -0
- package/dist/chunk-QDM3OHUT.cjs.map +1 -0
- package/dist/chunk-QKLOP4VC.cjs +90 -0
- package/dist/chunk-QKLOP4VC.cjs.map +1 -0
- package/dist/chunk-QOGNZMHD.cjs +34 -0
- package/dist/chunk-QOGNZMHD.cjs.map +1 -0
- package/dist/chunk-QWD3CZWE.cjs +108 -0
- package/dist/chunk-QWD3CZWE.cjs.map +1 -0
- package/dist/chunk-QWD4RDZ3.cjs +136 -0
- package/dist/chunk-QWD4RDZ3.cjs.map +1 -0
- package/dist/chunk-QYLZQ43D.cjs +172 -0
- package/dist/chunk-QYLZQ43D.cjs.map +1 -0
- package/dist/chunk-R7WIIPUR.js +27 -0
- package/dist/chunk-R7WIIPUR.js.map +1 -0
- package/dist/chunk-RQMCOFAI.cjs +85 -0
- package/dist/chunk-RQMCOFAI.cjs.map +1 -0
- package/dist/chunk-SA6K24NB.cjs +25 -0
- package/dist/chunk-SA6K24NB.cjs.map +1 -0
- package/dist/chunk-SADXXGWU.js +809 -0
- package/dist/chunk-SADXXGWU.js.map +1 -0
- package/dist/chunk-SAGRF4IB.js +25 -0
- package/dist/chunk-SAGRF4IB.js.map +1 -0
- package/dist/chunk-SVQIW5RJ.js +81 -0
- package/dist/chunk-SVQIW5RJ.js.map +1 -0
- package/dist/chunk-TA3K7SBK.js +180 -0
- package/dist/chunk-TA3K7SBK.js.map +1 -0
- package/dist/chunk-TFG5IBZS.cjs +139 -0
- package/dist/chunk-TFG5IBZS.cjs.map +1 -0
- package/dist/chunk-TMKTSYDS.cjs +21 -0
- package/dist/chunk-TMKTSYDS.cjs.map +1 -0
- package/dist/chunk-UADQJBHR.cjs +172 -0
- package/dist/chunk-UADQJBHR.cjs.map +1 -0
- package/dist/chunk-UBR5PWD7.js +275 -0
- package/dist/chunk-UBR5PWD7.js.map +1 -0
- package/dist/chunk-UKMBRMGT.js +22 -0
- package/dist/chunk-UKMBRMGT.js.map +1 -0
- package/dist/chunk-V22DZIXO.js +147 -0
- package/dist/chunk-V22DZIXO.js.map +1 -0
- package/dist/chunk-VE6DFSKU.js +107 -0
- package/dist/chunk-VE6DFSKU.js.map +1 -0
- package/dist/chunk-VPK6PHIE.cjs +211 -0
- package/dist/chunk-VPK6PHIE.cjs.map +1 -0
- package/dist/chunk-VTYY7XL5.cjs +15 -0
- package/dist/chunk-VTYY7XL5.cjs.map +1 -0
- package/dist/chunk-VWUXIVEI.js +583 -0
- package/dist/chunk-VWUXIVEI.js.map +1 -0
- package/dist/chunk-WE22OXQA.js +48 -0
- package/dist/chunk-WE22OXQA.js.map +1 -0
- package/dist/chunk-WMWEI3NS.js +120 -0
- package/dist/chunk-WMWEI3NS.js.map +1 -0
- package/dist/chunk-WS5ULCL4.js +204 -0
- package/dist/chunk-WS5ULCL4.js.map +1 -0
- package/dist/chunk-XB4GI5RZ.js +115 -0
- package/dist/chunk-XB4GI5RZ.js.map +1 -0
- package/dist/chunk-XU6MLSC6.js +455 -0
- package/dist/chunk-XU6MLSC6.js.map +1 -0
- package/dist/chunk-XYFGKVZ7.js +15 -0
- package/dist/chunk-XYFGKVZ7.js.map +1 -0
- package/dist/chunk-Y2KYR2ED.cjs +118 -0
- package/dist/chunk-Y2KYR2ED.cjs.map +1 -0
- package/dist/chunk-YIFFF23U.cjs +109 -0
- package/dist/chunk-YIFFF23U.cjs.map +1 -0
- package/dist/chunk-YJNYDJ2T.cjs +27 -0
- package/dist/chunk-YJNYDJ2T.cjs.map +1 -0
- package/dist/chunk-YSTXFWQE.cjs +127 -0
- package/dist/chunk-YSTXFWQE.cjs.map +1 -0
- package/dist/chunk-Z2JFX372.cjs +595 -0
- package/dist/chunk-Z2JFX372.cjs.map +1 -0
- package/dist/chunk-Z3NTRKIC.cjs +111 -0
- package/dist/chunk-Z3NTRKIC.cjs.map +1 -0
- package/dist/chunk-ZF2LDKQQ.cjs +20 -0
- package/dist/chunk-ZF2LDKQQ.cjs.map +1 -0
- package/dist/client/index.cjs +73 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +12 -0
- package/dist/client/index.d.ts +12 -0
- package/dist/client/index.js +71 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/theokit-client.d.cts +60 -0
- package/dist/client/theokit-client.d.ts +60 -0
- package/dist/client/types.d.cts +51 -0
- package/dist/client/types.d.ts +51 -0
- package/dist/compact-session-BHTPCIHA.cjs +61 -0
- package/dist/compact-session-BHTPCIHA.cjs.map +1 -0
- package/dist/compact-session-W4WLJTHA.js +24 -0
- package/dist/compact-session-W4WLJTHA.js.map +1 -0
- package/dist/compaction.cjs +66 -0
- package/dist/compaction.cjs.map +1 -0
- package/dist/compaction.d.cts +240 -0
- package/dist/compaction.d.ts +240 -0
- package/dist/compaction.js +5 -0
- package/dist/compaction.js.map +1 -0
- package/dist/concurrency.cjs +23 -0
- package/dist/concurrency.cjs.map +1 -0
- package/dist/concurrency.d.cts +22 -0
- package/dist/concurrency.d.ts +22 -0
- package/dist/concurrency.js +17 -0
- package/dist/concurrency.js.map +1 -0
- package/dist/context/index.cjs +37 -0
- package/dist/context/index.cjs.map +1 -0
- package/dist/context/index.d.cts +78 -0
- package/dist/context/index.d.ts +78 -0
- package/dist/context/index.js +20 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context-4QOEWRDF.cjs +23 -0
- package/dist/context-4QOEWRDF.cjs.map +1 -0
- package/dist/context-Z3CFTT3H.js +6 -0
- package/dist/context-Z3CFTT3H.js.map +1 -0
- package/dist/create-skill.d.ts +40 -0
- package/dist/cron-C3PhZED0.d.cts +246 -0
- package/dist/cron-crfMMdAw.d.ts +246 -0
- package/dist/cron.cjs +68 -0
- package/dist/cron.cjs.map +1 -0
- package/dist/cron.d.cts +7 -0
- package/dist/cron.d.ts +7 -0
- package/dist/cron.js +59 -0
- package/dist/cron.js.map +1 -0
- package/dist/define-tool.d.ts +86 -0
- package/dist/errors-CLOAyuiv.d.ts +569 -0
- package/dist/errors-DrDEgyz1.d.cts +569 -0
- package/dist/errors-base-B5g01neU.d.cts +75 -0
- package/dist/errors-base-B5g01neU.d.ts +75 -0
- package/dist/errors-base.d.ts +73 -0
- package/dist/errors.cjs +89 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.cts +4 -0
- package/dist/errors.d.ts +4 -0
- package/dist/errors.js +4 -0
- package/dist/errors.js.map +1 -0
- package/dist/eval.cjs +1056 -0
- package/dist/eval.cjs.map +1 -0
- package/dist/eval.d.cts +77 -0
- package/dist/eval.d.ts +77 -0
- package/dist/eval.js +1042 -0
- package/dist/eval.js.map +1 -0
- package/dist/event-bus.d.ts +42 -0
- package/dist/executor-XQAOQOHD.cjs +993 -0
- package/dist/executor-XQAOQOHD.cjs.map +1 -0
- package/dist/executor-ZNDQDX6Q.js +989 -0
- package/dist/executor-ZNDQDX6Q.js.map +1 -0
- package/dist/filesystem/index.cjs +204 -0
- package/dist/filesystem/index.cjs.map +1 -0
- package/dist/filesystem/index.d.cts +12 -0
- package/dist/filesystem/index.d.ts +12 -0
- package/dist/filesystem/index.js +195 -0
- package/dist/filesystem/index.js.map +1 -0
- package/dist/filesystem/local-filesystem.d.cts +54 -0
- package/dist/filesystem/local-filesystem.d.ts +54 -0
- package/dist/filesystem/types.d.cts +136 -0
- package/dist/filesystem/types.d.ts +136 -0
- package/dist/fork-agent-S2EPIML7.js +61 -0
- package/dist/fork-agent-S2EPIML7.js.map +1 -0
- package/dist/fork-agent-WAEQI2DL.cjs +64 -0
- package/dist/fork-agent-WAEQI2DL.cjs.map +1 -0
- package/dist/fs-session-store-77JU46UZ.js +10 -0
- package/dist/fs-session-store-77JU46UZ.js.map +1 -0
- package/dist/fs-session-store-E4U3P56L.cjs +19 -0
- package/dist/fs-session-store-E4U3P56L.cjs.map +1 -0
- package/dist/generate-object-BXV7BZRP.js +7 -0
- package/dist/generate-object-BXV7BZRP.js.map +1 -0
- package/dist/generate-object-YBI2TDJ3.cjs +20 -0
- package/dist/generate-object-YBI2TDJ3.cjs.map +1 -0
- package/dist/generate-object.d.ts +111 -0
- package/dist/index-manager-3UNPYH34.cjs +26 -0
- package/dist/index-manager-3UNPYH34.cjs.map +1 -0
- package/dist/index-manager-W7FDMGEG.js +17 -0
- package/dist/index-manager-W7FDMGEG.js.map +1 -0
- package/dist/index.cjs +2487 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4166 -0
- package/dist/index.d.ts +4166 -0
- package/dist/index.js +2289 -0
- package/dist/index.js.map +1 -0
- package/dist/inject-session-SUM6TDJF.js +27 -0
- package/dist/inject-session-SUM6TDJF.js.map +1 -0
- package/dist/inject-session-W6A46J3E.cjs +29 -0
- package/dist/inject-session-W6A46J3E.cjs.map +1 -0
- package/dist/interactive/index.cjs +35 -0
- package/dist/interactive/index.cjs.map +1 -0
- package/dist/interactive/index.d.cts +12 -0
- package/dist/interactive/index.d.ts +12 -0
- package/dist/interactive/index.js +30 -0
- package/dist/interactive/index.js.map +1 -0
- package/dist/interactive/types.d.cts +95 -0
- package/dist/interactive/types.d.ts +95 -0
- package/dist/internal/agent/batch.d.ts +11 -0
- package/dist/internal/agent/helpers.d.ts +1 -0
- package/dist/internal/agent-loop/budget-gate.d.ts +1 -0
- package/dist/internal/agent-loop/doom-loop-tracker.d.ts +22 -0
- package/dist/internal/agent-loop/live-events.d.ts +46 -0
- package/dist/internal/agent-loop/loop-context-init.d.ts +2 -0
- package/dist/internal/agent-loop/loop-finalize.d.ts +25 -0
- package/dist/internal/agent-loop/loop-llm-stream.d.ts +1 -0
- package/dist/internal/agent-loop/loop-thinking-steps.d.ts +28 -0
- package/dist/internal/agent-loop/loop.d.ts +7 -0
- package/dist/internal/agent-loop/message-builders.d.ts +21 -0
- package/dist/internal/agent-loop/replay-messages.d.ts +41 -0
- package/dist/internal/agent-loop/tool-dispatch.d.ts +27 -0
- package/dist/internal/agent-loop/tool-executors.d.ts +1 -0
- package/dist/internal/agent-loop/tool-result-guard.d.ts +20 -0
- package/dist/internal/agent-loop/tool-timeout.d.ts +23 -0
- package/dist/internal/agent-loop/types.d.ts +43 -0
- package/dist/internal/agent-loop/usage-and-cost.d.ts +25 -0
- package/dist/internal/auth/api-key-prefix.d.ts +23 -0
- package/dist/internal/auth/api-key-validator.d.ts +46 -0
- package/dist/internal/auth/credential-availability.d.ts +61 -0
- package/dist/internal/auth/credential-store.d.ts +77 -0
- package/dist/internal/auth/oauth-device.d.ts +54 -0
- package/dist/internal/auth/oauth-engine.d.ts +21 -0
- package/dist/internal/auth/resolve-credential.d.ts +56 -0
- package/dist/internal/auth/types.d.ts +175 -0
- package/dist/internal/base-url.d.ts +14 -0
- package/dist/internal/budget/compute-cost.d.ts +28 -0
- package/dist/internal/budget/pricing-registry.d.ts +36 -0
- package/dist/internal/budget/tracker/budget-tracker.d.ts +11 -0
- package/dist/internal/budget/tracker/budget.d.ts +34 -0
- package/dist/internal/budget/usage-accumulator.d.ts +46 -0
- package/dist/internal/cloud-agent/cloud-agent.d.ts +1 -0
- package/dist/internal/cloud-agent/cloud-config-serializer.d.ts +3 -0
- package/dist/internal/cloud-agent/cloud-run.d.ts +1 -0
- package/dist/internal/cloud-agent/cloud-tool-parity.d.ts +1 -0
- package/dist/internal/cloud-agent/index.d.ts +7 -0
- package/dist/internal/cloud-agent/real-cloud-run.d.ts +2 -0
- package/dist/internal/cloud-agent/types.d.ts +56 -0
- package/dist/internal/concurrency/abort-utils.d.ts +21 -0
- package/dist/internal/concurrency/async-local-storage.d.ts +20 -0
- package/dist/internal/concurrency/async-semaphore.d.ts +24 -0
- package/dist/internal/concurrency/delegation-depth.d.ts +27 -0
- package/dist/internal/concurrency/map-with-concurrency.d.ts +28 -0
- package/dist/internal/concurrency/subagent-credentials.d.ts +112 -0
- package/dist/internal/diagnostics.d.ts +69 -0
- package/dist/internal/emit-run-event.d.ts +16 -0
- package/dist/internal/env.d.ts +1 -0
- package/dist/internal/error-mappers/anthropic.d.ts +30 -0
- package/dist/internal/error-mappers/bedrock.d.ts +16 -0
- package/dist/internal/error-mappers/default-retriable.d.ts +1 -0
- package/dist/internal/error-mappers/ollama.d.ts +41 -0
- package/dist/internal/error-mappers/openai-compatible.d.ts +25 -0
- package/dist/internal/error-mappers/shared.d.ts +23 -0
- package/dist/internal/error-mappers/vertex.d.ts +15 -0
- package/dist/internal/eval/aggregate.d.ts +9 -0
- package/dist/internal/eval/assert.d.ts +27 -0
- package/dist/internal/eval/code-runner.d.ts +28 -0
- package/dist/internal/eval/dataset-iter.d.ts +9 -0
- package/dist/internal/eval/runner.d.ts +9 -0
- package/dist/internal/eval/single-flight.d.ts +17 -0
- package/dist/internal/eval/telemetry.d.ts +23 -0
- package/dist/internal/eval/trials.d.ts +19 -0
- package/dist/internal/global-singleton.d.ts +16 -0
- package/dist/internal/http.d.ts +1 -0
- package/dist/internal/ids.d.ts +1 -0
- package/dist/internal/judge/judge-call.d.ts +48 -0
- package/dist/internal/judge/parse-verdict.d.ts +11 -0
- package/dist/internal/llm/abort-error.d.ts +1 -0
- package/dist/internal/llm/anthropic-shared.d.ts +100 -0
- package/dist/internal/llm/anthropic.d.ts +9 -0
- package/dist/internal/llm/bedrock-anthropic.d.ts +36 -0
- package/dist/internal/llm/bedrock-token-cache.d.ts +18 -0
- package/dist/internal/llm/credential-pool-context.d.ts +11 -0
- package/dist/internal/llm/credential-pool-types.d.ts +22 -0
- package/dist/internal/llm/credential-pool.d.ts +18 -0
- package/dist/internal/llm/fallback-client.d.ts +1 -0
- package/dist/internal/llm/fault-injection.d.ts +50 -0
- package/dist/internal/llm/finish.d.ts +1 -0
- package/dist/internal/llm/hermes-tool-extract.d.ts +11 -0
- package/dist/internal/llm/model-capabilities.d.ts +40 -0
- package/dist/internal/llm/model-identifier.d.ts +58 -0
- package/dist/internal/llm/model-option.d.ts +38 -0
- package/dist/internal/llm/ollama-native.d.ts +27 -0
- package/dist/internal/llm/openai-messages.d.ts +2 -0
- package/dist/internal/llm/openai.d.ts +146 -0
- package/dist/internal/llm/pool-aware-client.d.ts +16 -0
- package/dist/internal/llm/prompt-cache-key.d.ts +1 -0
- package/dist/internal/llm/responses.d.ts +97 -0
- package/dist/internal/llm/retry.d.ts +22 -0
- package/dist/internal/llm/retrying-client.d.ts +53 -0
- package/dist/internal/llm/router.d.ts +40 -0
- package/dist/internal/llm/sse.d.ts +21 -0
- package/dist/internal/llm/stream-relay.d.ts +17 -0
- package/dist/internal/llm/tool-result-content.d.ts +40 -0
- package/dist/internal/llm/transport-error.d.ts +9 -0
- package/dist/internal/llm/types.d.ts +226 -0
- package/dist/internal/llm/vertex-anthropic.d.ts +40 -0
- package/dist/internal/llm/vertex-auth.d.ts +30 -0
- package/dist/internal/llm/vertex-gemini.d.ts +28 -0
- package/dist/internal/llm/vertex-router.d.ts +21 -0
- package/dist/internal/local-agent/index.d.ts +6 -0
- package/dist/internal/local-agent/local-agent-bootstrap.d.ts +37 -0
- package/dist/internal/local-agent/local-agent-capabilities.d.ts +38 -0
- package/dist/internal/local-agent/local-agent-dispatch.d.ts +57 -0
- package/dist/internal/local-agent/local-agent-invalidate.d.ts +1 -0
- package/dist/internal/local-agent/local-agent-lifecycle.d.ts +13 -0
- package/dist/internal/local-agent/local-agent-memory-direct.d.ts +12 -0
- package/dist/internal/local-agent/local-agent-memory-hooks.d.ts +41 -0
- package/dist/internal/local-agent/local-agent-memory-provider.d.ts +57 -0
- package/dist/internal/local-agent/local-agent-memory.d.ts +1 -0
- package/dist/internal/local-agent/local-agent-personality-extensions.d.ts +43 -0
- package/dist/internal/local-agent/local-agent-runtime-extensions.d.ts +13 -0
- package/dist/internal/local-agent/local-agent-send.d.ts +42 -0
- package/dist/internal/local-agent/local-agent-task-wrap.d.ts +11 -0
- package/dist/internal/local-agent/local-agent.d.ts +1 -0
- package/dist/internal/local-agent/local-option-keys.d.ts +2 -0
- package/dist/internal/local-agent/local-run.d.ts +1 -0
- package/dist/internal/local-agent/mcp-pool.d.ts +43 -0
- package/dist/internal/local-agent/real-local-run-mcp.d.ts +26 -0
- package/dist/internal/local-agent/real-local-run-options.d.ts +26 -0
- package/dist/internal/local-agent/real-local-run-provider.d.ts +13 -0
- package/dist/internal/local-agent/real-local-run-tools.d.ts +55 -0
- package/dist/internal/local-agent/real-local-run.d.ts +4 -0
- package/dist/internal/mcp/client.d.ts +16 -0
- package/dist/internal/mcp/handshake-timeout.d.ts +53 -0
- package/dist/internal/mcp/oauth.d.ts +19 -0
- package/dist/internal/mcp/token-storage.d.ts +52 -0
- package/dist/internal/memory/active-memory-cache.d.ts +10 -0
- package/dist/internal/memory/active-memory-types.d.ts +8 -0
- package/dist/internal/memory/active-memory.d.ts +56 -0
- package/dist/internal/memory/adapters/azure-openai-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/azure-openai-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/catalog.d.cts +1 -0
- package/dist/internal/memory/adapters/catalog.d.ts +1 -0
- package/dist/internal/memory/adapters/cohere-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/cohere-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/deepinfra-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/deepinfra-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/gemini-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/gemini-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/index.cjs +30 -0
- package/dist/internal/memory/adapters/index.cjs.map +1 -0
- package/dist/internal/memory/adapters/index.d.cts +18 -0
- package/dist/internal/memory/adapters/index.d.ts +18 -0
- package/dist/internal/memory/adapters/index.js +13 -0
- package/dist/internal/memory/adapters/index.js.map +1 -0
- package/dist/internal/memory/adapters/jina-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/jina-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/mistral-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/mistral-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/ollama-embedding.d.cts +34 -0
- package/dist/internal/memory/adapters/ollama-embedding.d.ts +34 -0
- package/dist/internal/memory/adapters/openai-compatible.d.cts +96 -0
- package/dist/internal/memory/adapters/openai-compatible.d.ts +96 -0
- package/dist/internal/memory/adapters/openai-embedding.d.cts +12 -0
- package/dist/internal/memory/adapters/openai-embedding.d.ts +12 -0
- package/dist/internal/memory/adapters/openrouter-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/openrouter-embedding.d.ts +2 -0
- package/dist/internal/memory/adapters/voyage-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/voyage-embedding.d.ts +2 -0
- package/dist/internal/memory/corpus-sync.d.ts +23 -0
- package/dist/internal/memory/dreaming/diary.d.ts +41 -0
- package/dist/internal/memory/dreaming/phases.d.ts +35 -0
- package/dist/internal/memory/dreaming/run.d.ts +10 -0
- package/dist/internal/memory/embedding-adapter.d.ts +42 -0
- package/dist/internal/memory/embedding-cache.d.ts +42 -0
- package/dist/internal/memory/escape-like-pattern.d.ts +22 -0
- package/dist/internal/memory/index-db.d.ts +67 -0
- package/dist/internal/memory/index-manager-contract.d.ts +48 -0
- package/dist/internal/memory/index-manager-dispatch.d.ts +23 -0
- package/dist/internal/memory/index-manager-helpers.d.ts +20 -0
- package/dist/internal/memory/index-manager.d.ts +44 -0
- package/dist/internal/memory/index-repository.d.ts +58 -0
- package/dist/internal/memory/index-schema.d.ts +21 -0
- package/dist/internal/memory/lance-index.d.ts +46 -0
- package/dist/internal/memory/lance-memory-adapter.d.ts +45 -0
- package/dist/internal/memory/memory-index.d.ts +67 -0
- package/dist/internal/memory/migrate-sqlite-to-lance.d.ts +58 -0
- package/dist/internal/memory/migration.d.ts +9 -0
- package/dist/internal/memory/sdk-memory-peer-loader.d.ts +74 -0
- package/dist/internal/memory/sqlite-vec-loader.d.ts +1 -0
- package/dist/internal/memory/storage/chunk-markdown.d.cts +2 -0
- package/dist/internal/memory/storage/chunk-markdown.d.ts +2 -0
- package/dist/internal/memory/storage/index.cjs +141 -0
- package/dist/internal/memory/storage/index.cjs.map +1 -0
- package/dist/internal/memory/storage/index.d.cts +28 -0
- package/dist/internal/memory/storage/index.d.ts +28 -0
- package/dist/internal/memory/storage/index.js +16 -0
- package/dist/internal/memory/storage/index.js.map +1 -0
- package/dist/internal/memory/storage/list-markdown.d.cts +1 -0
- package/dist/internal/memory/storage/list-markdown.d.ts +1 -0
- package/dist/internal/memory/storage/markdown-store.d.cts +48 -0
- package/dist/internal/memory/storage/markdown-store.d.ts +48 -0
- package/dist/internal/memory/storage/memory-file.d.cts +90 -0
- package/dist/internal/memory/storage/memory-file.d.ts +90 -0
- package/dist/internal/memory/storage/memory-root.d.cts +119 -0
- package/dist/internal/memory/storage/memory-root.d.ts +119 -0
- package/dist/internal/memory/storage/reader.d.cts +8 -0
- package/dist/internal/memory/storage/reader.d.ts +8 -0
- package/dist/internal/memory/storage/session-loader.d.cts +35 -0
- package/dist/internal/memory/storage/session-loader.d.ts +35 -0
- package/dist/internal/memory/storage/session-summary-writer.d.cts +50 -0
- package/dist/internal/memory/storage/session-summary-writer.d.ts +50 -0
- package/dist/internal/memory/storage/threat-scan.d.cts +62 -0
- package/dist/internal/memory/storage/threat-scan.d.ts +62 -0
- package/dist/internal/memory/storage/transcript-store.d.cts +38 -0
- package/dist/internal/memory/storage/transcript-store.d.ts +38 -0
- package/dist/internal/memory/storage/wiki-loader.d.cts +27 -0
- package/dist/internal/memory/storage/wiki-loader.d.ts +27 -0
- package/dist/internal/memory/tools.d.ts +21 -0
- package/dist/internal/memory/types.d.ts +78 -0
- package/dist/internal/memory/vec-index.d.ts +28 -0
- package/dist/internal/persistence/atomic-write.d.cts +107 -0
- package/dist/internal/persistence/atomic-write.d.ts +107 -0
- package/dist/internal/persistence/cwd-mutex.d.cts +35 -0
- package/dist/internal/persistence/cwd-mutex.d.ts +35 -0
- package/dist/internal/persistence/exclusive-create.d.cts +53 -0
- package/dist/internal/persistence/exclusive-create.d.ts +53 -0
- package/dist/internal/persistence/file-lock.d.cts +54 -0
- package/dist/internal/persistence/file-lock.d.ts +54 -0
- package/dist/internal/persistence/fs-session-store.d.cts +68 -0
- package/dist/internal/persistence/fs-session-store.d.ts +68 -0
- package/dist/internal/persistence/fts5-sanitize.d.cts +44 -0
- package/dist/internal/persistence/fts5-sanitize.d.ts +44 -0
- package/dist/internal/persistence/index.cjs +127 -0
- package/dist/internal/persistence/index.cjs.map +1 -0
- package/dist/internal/persistence/index.d.cts +33 -0
- package/dist/internal/persistence/index.d.ts +33 -0
- package/dist/internal/persistence/index.js +40 -0
- package/dist/internal/persistence/index.js.map +1 -0
- package/dist/internal/persistence/jsonl.d.cts +43 -0
- package/dist/internal/persistence/jsonl.d.ts +43 -0
- package/dist/internal/persistence/markdown-config-loader.d.cts +35 -0
- package/dist/internal/persistence/markdown-config-loader.d.ts +35 -0
- package/dist/internal/persistence/pagination.d.cts +21 -0
- package/dist/internal/persistence/pagination.d.ts +21 -0
- package/dist/internal/persistence/paths.d.cts +137 -0
- package/dist/internal/persistence/paths.d.ts +137 -0
- package/dist/internal/persistence/persistence-schema.d.cts +29 -0
- package/dist/internal/persistence/persistence-schema.d.ts +29 -0
- package/dist/internal/persistence/schema-version.d.cts +227 -0
- package/dist/internal/persistence/schema-version.d.ts +227 -0
- package/dist/internal/persistence/session-artifacts.d.cts +27 -0
- package/dist/internal/persistence/session-artifacts.d.ts +27 -0
- package/dist/internal/persistence/session-dir.d.cts +1 -0
- package/dist/internal/persistence/session-dir.d.ts +1 -0
- package/dist/internal/persistence/session-transcript.d.cts +128 -0
- package/dist/internal/persistence/session-transcript.d.ts +128 -0
- package/dist/internal/persistence/session-writer.d.cts +104 -0
- package/dist/internal/persistence/session-writer.d.ts +104 -0
- package/dist/internal/persistence/sqlite-cas.d.cts +61 -0
- package/dist/internal/persistence/sqlite-cas.d.ts +61 -0
- package/dist/internal/persistence/sqlite-open.d.cts +61 -0
- package/dist/internal/persistence/sqlite-open.d.ts +61 -0
- package/dist/internal/persistence/sqlite-wal.d.cts +54 -0
- package/dist/internal/persistence/sqlite-wal.d.ts +54 -0
- package/dist/internal/persistence/transcript-ops.d.cts +99 -0
- package/dist/internal/persistence/transcript-ops.d.ts +99 -0
- package/dist/internal/personality/context.d.ts +17 -0
- package/dist/internal/personality/registry.d.ts +17 -0
- package/dist/internal/personality/store.d.ts +27 -0
- package/dist/internal/personality/switch.d.ts +36 -0
- package/dist/internal/personality/types.d.ts +18 -0
- package/dist/internal/plugins/context.d.cts +21 -0
- package/dist/internal/plugins/context.d.ts +21 -0
- package/dist/internal/plugins/enabled-names.d.cts +1 -0
- package/dist/internal/plugins/enabled-names.d.ts +1 -0
- package/dist/internal/plugins/index.d.cts +9 -0
- package/dist/internal/plugins/index.d.ts +9 -0
- package/dist/internal/plugins/lifecycle.d.cts +15 -0
- package/dist/internal/plugins/lifecycle.d.ts +15 -0
- package/dist/internal/plugins/manager.d.cts +57 -0
- package/dist/internal/plugins/manager.d.ts +57 -0
- package/dist/internal/plugins/plugin-guards.d.cts +13 -0
- package/dist/internal/plugins/plugin-guards.d.ts +13 -0
- package/dist/internal/plugins/types.d.cts +26 -0
- package/dist/internal/plugins/types.d.ts +26 -0
- package/dist/internal/providers/builtin/anthropic.d.ts +2 -0
- package/dist/internal/providers/builtin/bedrock.d.ts +25 -0
- package/dist/internal/providers/builtin/cerebras.d.ts +5 -0
- package/dist/internal/providers/builtin/cohere.d.ts +8 -0
- package/dist/internal/providers/builtin/deepinfra.d.ts +2 -0
- package/dist/internal/providers/builtin/gemini.d.ts +10 -0
- package/dist/internal/providers/builtin/google.d.ts +6 -0
- package/dist/internal/providers/builtin/groq.d.ts +2 -0
- package/dist/internal/providers/builtin/index.d.ts +20 -0
- package/dist/internal/providers/builtin/llamacpp.d.ts +1 -0
- package/dist/internal/providers/builtin/lmstudio.d.ts +1 -0
- package/dist/internal/providers/builtin/mistral.d.ts +2 -0
- package/dist/internal/providers/builtin/ollama.d.ts +17 -0
- package/dist/internal/providers/builtin/openai-chatgpt.d.ts +14 -0
- package/dist/internal/providers/builtin/openai-compatible.d.ts +1 -0
- package/dist/internal/providers/builtin/openai.d.ts +2 -0
- package/dist/internal/providers/builtin/openrouter.d.ts +2 -0
- package/dist/internal/providers/builtin/perplexity.d.ts +5 -0
- package/dist/internal/providers/builtin/together.d.ts +2 -0
- package/dist/internal/providers/builtin/vertex.d.ts +27 -0
- package/dist/internal/providers/builtin/xai.d.ts +2 -0
- package/dist/internal/providers/catalog-loader.d.ts +55 -0
- package/dist/internal/providers/catalog-schema.d.ts +202 -0
- package/dist/internal/providers/catalog-source-models-dev.d.ts +80 -0
- package/dist/internal/providers/discovery.d.ts +14 -0
- package/dist/internal/providers/index.d.ts +8 -0
- package/dist/internal/providers/register-plugin-providers.d.ts +22 -0
- package/dist/internal/providers/registry.d.ts +13 -0
- package/dist/internal/providers/types.d.ts +11 -0
- package/dist/internal/retry/circuit-breaker.d.ts +26 -0
- package/dist/internal/retry/with-retry.d.ts +40 -0
- package/dist/internal/runtime/compat/compat-config-file.d.ts +31 -0
- package/dist/internal/runtime/compat/foreign-config-sources.d.ts +139 -0
- package/dist/internal/runtime/compression/compression-attempt.d.ts +24 -0
- package/dist/internal/runtime/compression/compression-config.d.ts +33 -0
- package/dist/internal/runtime/compression/compression-decision.d.ts +10 -0
- package/dist/internal/runtime/compression/compression-helpers.d.ts +18 -0
- package/dist/internal/runtime/compression/compression-model-registry.d.ts +41 -0
- package/dist/internal/runtime/compression/compression-summarizer.d.ts +34 -0
- package/dist/internal/runtime/config/default-model.d.ts +1 -0
- package/dist/internal/runtime/config/providers-manager.d.ts +1 -0
- package/dist/internal/runtime/config/workspace-dir.d.ts +9 -0
- package/dist/internal/runtime/context/context-aggregator.d.ts +26 -0
- package/dist/internal/runtime/context/context-discovery-runner.d.ts +80 -0
- package/dist/internal/runtime/context/context-discovery.d.ts +79 -0
- package/dist/internal/runtime/context/context-frontmatter.d.ts +16 -0
- package/dist/internal/runtime/context/context-glob.d.ts +1 -0
- package/dist/internal/runtime/context/context-import-resolver.d.ts +41 -0
- package/dist/internal/runtime/context/context-loaders.d.ts +42 -0
- package/dist/internal/runtime/context/context-manager.d.ts +28 -0
- package/dist/internal/runtime/context/context-mdc-parser.d.ts +25 -0
- package/dist/internal/runtime/context/context-rules-frontmatter.d.ts +99 -0
- package/dist/internal/runtime/context/context-yaml-lite.d.ts +26 -0
- package/dist/internal/runtime/context/project-instructions.d.ts +66 -0
- package/dist/internal/runtime/context/yaml-frontmatter.d.ts +20 -0
- package/dist/internal/runtime/fixtures/fixture-events.d.ts +12 -0
- package/dist/internal/runtime/fixtures/fixture-mode.d.ts +24 -0
- package/dist/internal/runtime/fixtures/fixture-responder.d.ts +1 -0
- package/dist/internal/runtime/fixtures/fixture-run-base.d.ts +96 -0
- package/dist/internal/runtime/fixtures/fixture-scripts.d.ts +21 -0
- package/dist/internal/runtime/fixtures/types.d.ts +1 -0
- package/dist/internal/runtime/hooks/hooks-executor.d.ts +49 -0
- package/dist/internal/runtime/hooks/hooks-source.d.ts +35 -0
- package/dist/internal/runtime/lifecycle/context-budget-event.d.ts +25 -0
- package/dist/internal/runtime/lifecycle/env-policy.d.ts +29 -0
- package/dist/internal/runtime/lifecycle/fork-agent.d.ts +15 -0
- package/dist/internal/runtime/lifecycle/goal-marker.d.ts +13 -0
- package/dist/internal/runtime/lifecycle/post-run-lifecycle.d.ts +16 -0
- package/dist/internal/runtime/lifecycle/run-to-completion.d.ts +22 -0
- package/dist/internal/runtime/lifecycle/run-until.d.ts +21 -0
- package/dist/internal/runtime/lifecycle/spawn-collect.d.ts +8 -0
- package/dist/internal/runtime/lifecycle/stream-to-completion.d.ts +31 -0
- package/dist/internal/runtime/lifecycle/wrap-completion-check-run.d.ts +30 -0
- package/dist/internal/runtime/memory-glue/memory-provider.d.ts +11 -0
- package/dist/internal/runtime/memory-glue/memory-store.d.ts +4 -0
- package/dist/internal/runtime/memory-glue/select-facts.d.ts +63 -0
- package/dist/internal/runtime/model-selection.d.ts +14 -0
- package/dist/internal/runtime/plugin-loader/plugin-bundles.d.ts +22 -0
- package/dist/internal/runtime/plugin-loader/plugin-frontmatter.d.ts +17 -0
- package/dist/internal/runtime/plugin-loader/plugins-manager.d.ts +1 -0
- package/dist/internal/runtime/processors/run-processors.d.ts +10 -0
- package/dist/internal/runtime/processors/tripwire-run.d.ts +16 -0
- package/dist/internal/runtime/processors/wrap-output-run.d.ts +18 -0
- package/dist/internal/runtime/registry/agent-factory-registry.d.ts +19 -0
- package/dist/internal/runtime/registry/agent-registry-contract.d.ts +31 -0
- package/dist/internal/runtime/registry/agent-registry-store.d.ts +75 -0
- package/dist/internal/runtime/registry/agent-registry.d.ts +6 -0
- package/dist/internal/runtime/registry/live-agent-registry.d.ts +132 -0
- package/dist/internal/runtime/registry/run-registry.d.ts +4 -0
- package/dist/internal/runtime/skills/discover-skills.d.ts +103 -0
- package/dist/internal/runtime/skills/skill-frontmatter.d.ts +6 -0
- package/dist/internal/runtime/skills/skills-block.d.ts +18 -0
- package/dist/internal/runtime/skills/skills-manager.d.ts +1 -0
- package/dist/internal/runtime/skills/subagent-tool-scope.d.ts +25 -0
- package/dist/internal/runtime/skills/subagents-loader.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/escape.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/local-assembly.d.ts +2 -0
- package/dist/internal/runtime/system-prompt/native-reasoning.d.ts +25 -0
- package/dist/internal/runtime/system-prompt/pipeline.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/safe-call.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/active-memory-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/base-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/context-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/memory-provider.d.ts +6 -0
- package/dist/internal/runtime/system-prompt/sources/reasoning-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/sources/skills-provider.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/system-prompt.d.ts +1 -0
- package/dist/internal/runtime/system-prompt/types.d.ts +5 -0
- package/dist/internal/runtime/tools/shell-tool.d.ts +7 -0
- package/dist/internal/runtime/validation/validate-agent-options.d.ts +1 -0
- package/dist/internal/runtime/validation/validate-response.d.ts +18 -0
- package/dist/internal/scorers/levenshtein.d.ts +11 -0
- package/dist/internal/scorers/llm-judge.d.ts +41 -0
- package/dist/internal/security/index.cjs +52 -0
- package/dist/internal/security/index.cjs.map +1 -0
- package/dist/internal/security/index.d.cts +19 -0
- package/dist/internal/security/index.d.ts +19 -0
- package/dist/internal/security/index.js +7 -0
- package/dist/internal/security/index.js.map +1 -0
- package/dist/internal/security/path-containment.d.cts +24 -0
- package/dist/internal/security/path-containment.d.ts +24 -0
- package/dist/internal/security/path-guard.d.cts +166 -0
- package/dist/internal/security/path-guard.d.ts +166 -0
- package/dist/internal/security/redact.d.cts +74 -0
- package/dist/internal/security/redact.d.ts +74 -0
- package/dist/internal/security/test-reset.d.cts +10 -0
- package/dist/internal/security/test-reset.d.ts +10 -0
- package/dist/internal/session/agent-session-store.d.ts +65 -0
- package/dist/internal/session/agent-session.d.ts +48 -0
- package/dist/internal/session/compact-session.d.ts +97 -0
- package/dist/internal/session/index.d.ts +7 -0
- package/dist/internal/session/inject-session.d.ts +15 -0
- package/dist/internal/session/session-cache.d.ts +31 -0
- package/dist/internal/session/types.d.ts +46 -0
- package/dist/internal/structured-output-helpers.d.ts +54 -0
- package/dist/internal/task/registry.d.ts +60 -0
- package/dist/internal/task/ring-buffer.d.ts +10 -0
- package/dist/internal/task/store.d.ts +145 -0
- package/dist/internal/task/subscribe.d.ts +15 -0
- package/dist/internal/task/task-id.d.ts +22 -0
- package/dist/internal/task/task-run-event-bridge.d.ts +10 -0
- package/dist/internal/task/telemetry.d.ts +27 -0
- package/dist/internal/telemetry/adapter-registry.d.ts +12 -0
- package/dist/internal/telemetry/adapters/arize.d.ts +2 -0
- package/dist/internal/telemetry/adapters/braintrust.d.ts +7 -0
- package/dist/internal/telemetry/adapters/datadog.d.ts +2 -0
- package/dist/internal/telemetry/adapters/langfuse.d.ts +2 -0
- package/dist/internal/telemetry/adapters/langsmith.d.ts +7 -0
- package/dist/internal/telemetry/adapters/posthog.d.ts +2 -0
- package/dist/internal/telemetry/adapters/sentry.d.ts +2 -0
- package/dist/internal/telemetry/safe-require.d.ts +1 -0
- package/dist/internal/telemetry/span-names.d.ts +10 -0
- package/dist/internal/telemetry/tracer-loader.d.ts +20 -0
- package/dist/internal/telemetry/tracer.d.ts +57 -0
- package/dist/internal/tool-dispatch/repair-middleware.d.ts +34 -0
- package/dist/internal/tool-dispatch/strip-think.d.ts +22 -0
- package/dist/internal/tool-registry/personality-filter.d.ts +37 -0
- package/dist/internal/workflow/ctx.d.ts +24 -0
- package/dist/internal/workflow/error-shape.d.ts +7 -0
- package/dist/internal/workflow/event-stream.d.ts +13 -0
- package/dist/internal/workflow/evented-executor.d.ts +42 -0
- package/dist/internal/workflow/executor-helpers.d.ts +30 -0
- package/dist/internal/workflow/executor.d.ts +16 -0
- package/dist/internal/workflow/retry-policy.d.ts +14 -0
- package/dist/internal/workflow/run-id.d.ts +9 -0
- package/dist/internal/workflow/scheduler.d.ts +23 -0
- package/dist/internal/workflow/single-flight.d.ts +18 -0
- package/dist/internal/workflow/snapshot-store.d.ts +23 -0
- package/dist/internal/workflow/step-agent.d.ts +12 -0
- package/dist/internal/workflow/step-branch.d.ts +10 -0
- package/dist/internal/workflow/step-dowhile.d.ts +8 -0
- package/dist/internal/workflow/step-execution.d.ts +25 -0
- package/dist/internal/workflow/step-fn.d.ts +10 -0
- package/dist/internal/workflow/step-foreach.d.ts +11 -0
- package/dist/internal/workflow/step-parallel.d.ts +17 -0
- package/dist/internal/workflow/step-sleep.d.ts +7 -0
- package/dist/internal/workflow/telemetry.d.ts +21 -0
- package/dist/internal/zod-to-json-schema.d.ts +11 -0
- package/dist/job-queue.d.ts +68 -0
- package/dist/judge-call-46M2E5FA.cjs +22 -0
- package/dist/judge-call-46M2E5FA.cjs.map +1 -0
- package/dist/judge-call-FGUNNWEI.js +5 -0
- package/dist/judge-call-FGUNNWEI.js.map +1 -0
- package/dist/mcp-auth.cjs +314 -0
- package/dist/mcp-auth.cjs.map +1 -0
- package/dist/mcp-auth.d.cts +19 -0
- package/dist/mcp-auth.d.ts +19 -0
- package/dist/mcp-auth.js +307 -0
- package/dist/mcp-auth.js.map +1 -0
- package/dist/messages.cjs +24 -0
- package/dist/messages.cjs.map +1 -0
- package/dist/messages.d.cts +33 -0
- package/dist/messages.d.ts +33 -0
- package/dist/messages.js +20 -0
- package/dist/messages.js.map +1 -0
- package/dist/models.cjs +295 -0
- package/dist/models.cjs.map +1 -0
- package/dist/models.d.cts +18 -0
- package/dist/models.d.ts +18 -0
- package/dist/models.js +286 -0
- package/dist/models.js.map +1 -0
- package/dist/oauth-transaction-store-5RIR6D5C.js +5 -0
- package/dist/oauth-transaction-store-5RIR6D5C.js.map +1 -0
- package/dist/oauth-transaction-store-SXIE57OD.cjs +38 -0
- package/dist/oauth-transaction-store-SXIE57OD.cjs.map +1 -0
- package/dist/path-safety.cjs +39 -0
- package/dist/path-safety.cjs.map +1 -0
- package/dist/path-safety.d.cts +16 -0
- package/dist/path-safety.d.ts +16 -0
- package/dist/path-safety.js +6 -0
- package/dist/path-safety.js.map +1 -0
- package/dist/permission-engine.d.ts +134 -0
- package/dist/persistence.cjs +197 -0
- package/dist/persistence.cjs.map +1 -0
- package/dist/persistence.d.cts +40 -0
- package/dist/persistence.d.ts +40 -0
- package/dist/persistence.js +100 -0
- package/dist/persistence.js.map +1 -0
- package/dist/project.cjs +45 -0
- package/dist/project.cjs.map +1 -0
- package/dist/project.d.cts +14 -0
- package/dist/project.d.ts +14 -0
- package/dist/project.js +42 -0
- package/dist/project.js.map +1 -0
- package/dist/provider-catalog.json +1295 -0
- package/dist/providers.cjs +23 -0
- package/dist/providers.cjs.map +1 -0
- package/dist/providers.d.cts +31 -0
- package/dist/providers.d.ts +31 -0
- package/dist/providers.js +10 -0
- package/dist/providers.js.map +1 -0
- package/dist/registry-BZQFYRTL.cjs +46 -0
- package/dist/registry-BZQFYRTL.cjs.map +1 -0
- package/dist/registry-DMWCJKRF.js +9 -0
- package/dist/registry-DMWCJKRF.js.map +1 -0
- package/dist/retry.cjs +14 -0
- package/dist/retry.cjs.map +1 -0
- package/dist/retry.d.cts +35 -0
- package/dist/retry.d.ts +35 -0
- package/dist/retry.js +5 -0
- package/dist/retry.js.map +1 -0
- package/dist/run-CTAdRU3U.d.cts +1813 -0
- package/dist/run-CTAdRU3U.d.ts +1813 -0
- package/dist/run-to-completion-DRO77625.js +3 -0
- package/dist/run-to-completion-DRO77625.js.map +1 -0
- package/dist/run-to-completion-X4OWM673.cjs +48 -0
- package/dist/run-to-completion-X4OWM673.cjs.map +1 -0
- package/dist/run-until-6D6TQ4JN.js +146 -0
- package/dist/run-until-6D6TQ4JN.js.map +1 -0
- package/dist/run-until-DG2KXWB2.cjs +149 -0
- package/dist/run-until-DG2KXWB2.cjs.map +1 -0
- package/dist/sandbox/bwrap.d.cts +112 -0
- package/dist/sandbox/bwrap.d.ts +112 -0
- package/dist/sandbox/index.cjs +495 -0
- package/dist/sandbox/index.cjs.map +1 -0
- package/dist/sandbox/index.d.cts +13 -0
- package/dist/sandbox/index.d.ts +13 -0
- package/dist/sandbox/index.js +451 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/sandbox/linux-sandbox.d.cts +218 -0
- package/dist/sandbox/linux-sandbox.d.ts +218 -0
- package/dist/sandbox/local-sandbox.d.cts +66 -0
- package/dist/sandbox/local-sandbox.d.ts +66 -0
- package/dist/sandbox/provision.d.cts +60 -0
- package/dist/sandbox/provision.d.ts +60 -0
- package/dist/sandbox/seccomp.d.cts +16 -0
- package/dist/sandbox/seccomp.d.ts +16 -0
- package/dist/sandbox/shell-escape.d.cts +8 -0
- package/dist/sandbox/shell-escape.d.ts +8 -0
- package/dist/sandbox/types.d.cts +143 -0
- package/dist/sandbox/types.d.ts +143 -0
- package/dist/sanitize/coerce.d.cts +1 -0
- package/dist/sanitize/coerce.d.ts +1 -0
- package/dist/sanitize/index.cjs +12 -0
- package/dist/sanitize/index.cjs.map +1 -0
- package/dist/sanitize/index.d.cts +9 -0
- package/dist/sanitize/index.d.ts +9 -0
- package/dist/sanitize/index.js +3 -0
- package/dist/sanitize/index.js.map +1 -0
- package/dist/sanitize/sanitize-tool-input.d.cts +11 -0
- package/dist/sanitize/sanitize-tool-input.d.ts +11 -0
- package/dist/sanitize/types.d.cts +52 -0
- package/dist/sanitize/types.d.ts +52 -0
- package/dist/scorers.d.ts +181 -0
- package/dist/sdk-agent-BOiKqOgL.d.cts +940 -0
- package/dist/sdk-agent-D4a_BR_6.d.ts +940 -0
- package/dist/server/auth/errors.d.cts +54 -0
- package/dist/server/auth/errors.d.ts +54 -0
- package/dist/server/auth/index.cjs +210 -0
- package/dist/server/auth/index.cjs.map +1 -0
- package/dist/server/auth/index.d.cts +244 -0
- package/dist/server/auth/index.d.ts +244 -0
- package/dist/server/auth/index.js +189 -0
- package/dist/server/auth/index.js.map +1 -0
- package/dist/server/auth/oauth-transaction-store.d.cts +52 -0
- package/dist/server/auth/oauth-transaction-store.d.ts +52 -0
- package/dist/server/auth/orchestrator.d.cts +15 -0
- package/dist/server/auth/orchestrator.d.ts +15 -0
- package/dist/server/auth/types.d.cts +109 -0
- package/dist/server/auth/types.d.ts +109 -0
- package/dist/server/auth/validate-return-to.d.cts +27 -0
- package/dist/server/auth/validate-return-to.d.ts +27 -0
- package/dist/server/errors-envelope.cjs +101 -0
- package/dist/server/errors-envelope.cjs.map +1 -0
- package/dist/server/errors-envelope.d.cts +67 -0
- package/dist/server/errors-envelope.d.ts +67 -0
- package/dist/server/errors-envelope.js +95 -0
- package/dist/server/errors-envelope.js.map +1 -0
- package/dist/session-transcript-LGHSNVY5.cjs +62 -0
- package/dist/session-transcript-LGHSNVY5.cjs.map +1 -0
- package/dist/session-transcript-VTBTCGQX.js +5 -0
- package/dist/session-transcript-VTBTCGQX.js.map +1 -0
- package/dist/skills.cjs +25 -0
- package/dist/skills.cjs.map +1 -0
- package/dist/skills.d.cts +19 -0
- package/dist/skills.d.ts +19 -0
- package/dist/skills.js +8 -0
- package/dist/skills.js.map +1 -0
- package/dist/stream-object-HBFMIZLD.js +7 -0
- package/dist/stream-object-HBFMIZLD.js.map +1 -0
- package/dist/stream-object-QSKHISDJ.cjs +20 -0
- package/dist/stream-object-QSKHISDJ.cjs.map +1 -0
- package/dist/stream-object.d.ts +73 -0
- package/dist/stream-to-completion-QV5HCL3J.js +30 -0
- package/dist/stream-to-completion-QV5HCL3J.js.map +1 -0
- package/dist/stream-to-completion-SRISU5AB.cjs +32 -0
- package/dist/stream-to-completion-SRISU5AB.cjs.map +1 -0
- package/dist/subagents-loader-DOBTTICM.js +7 -0
- package/dist/subagents-loader-DOBTTICM.js.map +1 -0
- package/dist/subagents-loader-GEHYCMEX.cjs +16 -0
- package/dist/subagents-loader-GEHYCMEX.cjs.map +1 -0
- package/dist/subagents-loader.cjs +35 -0
- package/dist/subagents-loader.cjs.map +1 -0
- package/dist/subagents-loader.d.cts +90 -0
- package/dist/subagents-loader.d.ts +90 -0
- package/dist/subagents-loader.js +32 -0
- package/dist/subagents-loader.js.map +1 -0
- package/dist/subagents.cjs +18 -0
- package/dist/subagents.cjs.map +1 -0
- package/dist/subagents.d.cts +14 -0
- package/dist/subagents.d.ts +14 -0
- package/dist/subagents.js +15 -0
- package/dist/subagents.js.map +1 -0
- package/dist/subscription/define-subscription.d.cts +71 -0
- package/dist/subscription/define-subscription.d.ts +71 -0
- package/dist/subscription/index.cjs +408 -0
- package/dist/subscription/index.cjs.map +1 -0
- package/dist/subscription/index.d.cts +20 -0
- package/dist/subscription/index.d.ts +20 -0
- package/dist/subscription/index.js +400 -0
- package/dist/subscription/index.js.map +1 -0
- package/dist/subscription/internal/backpressure.d.cts +24 -0
- package/dist/subscription/internal/backpressure.d.ts +24 -0
- package/dist/subscription/internal/server-integration.d.cts +22 -0
- package/dist/subscription/internal/server-integration.d.ts +22 -0
- package/dist/subscription/internal/sse-encoder.d.cts +13 -0
- package/dist/subscription/internal/sse-encoder.d.ts +13 -0
- package/dist/subscription/internal/sse-parser.d.cts +15 -0
- package/dist/subscription/internal/sse-parser.d.ts +15 -0
- package/dist/subscription/internal/subscription-runtime.d.cts +21 -0
- package/dist/subscription/internal/subscription-runtime.d.ts +21 -0
- package/dist/subscription/internal/types.d.cts +11 -0
- package/dist/subscription/internal/types.d.ts +11 -0
- package/dist/subscription/internal/ws-adapter-node.d.cts +10 -0
- package/dist/subscription/internal/ws-adapter-node.d.ts +10 -0
- package/dist/subscription/theokit-subscribe.d.cts +54 -0
- package/dist/subscription/theokit-subscribe.d.ts +54 -0
- package/dist/subscription/types.d.cts +158 -0
- package/dist/subscription/types.d.ts +158 -0
- package/dist/task-errors.d.ts +58 -0
- package/dist/task-store.cjs +23 -0
- package/dist/task-store.cjs.map +1 -0
- package/dist/task-store.d.cts +10 -0
- package/dist/task-store.d.ts +10 -0
- package/dist/task-store.js +6 -0
- package/dist/task-store.js.map +1 -0
- package/dist/tool-error.d.ts +30 -0
- package/dist/types/agent-prims.d.ts +137 -0
- package/dist/types/agent.d.ts +947 -0
- package/dist/types/batch.d.ts +121 -0
- package/dist/types/budget-tracker.d.ts +80 -0
- package/dist/types/budget.d.ts +97 -0
- package/dist/types/content-blocks.d.ts +50 -0
- package/dist/types/context.d.ts +96 -0
- package/dist/types/conversation.d.ts +127 -0
- package/dist/types/cron.d.ts +172 -0
- package/dist/types/env-policy.d.ts +21 -0
- package/dist/types/eval.d.ts +255 -0
- package/dist/types/fork.d.ts +52 -0
- package/dist/types/goal-events.d.ts +144 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/mcp.d.ts +90 -0
- package/dist/types/memory-adapter.d.ts +189 -0
- package/dist/types/memory-provider.d.ts +206 -0
- package/dist/types/messages-base.d.ts +24 -0
- package/dist/types/messages.d.ts +161 -0
- package/dist/types/plugin.d.ts +308 -0
- package/dist/types/processors.d.ts +87 -0
- package/dist/types/provider-profile.d.ts +116 -0
- package/dist/types/providers.d.ts +116 -0
- package/dist/types/run-events.d.ts +197 -0
- package/dist/types/run.d.ts +671 -0
- package/dist/types/sdk-agent.d.ts +342 -0
- package/dist/types/session-message.d.ts +62 -0
- package/dist/types/session-record.d.ts +103 -0
- package/dist/types/session-store.d.ts +104 -0
- package/dist/types/task.d.ts +146 -0
- package/dist/types/theokit.d.ts +73 -0
- package/dist/types/trajectory.d.ts +52 -0
- package/dist/types/updates.d.ts +184 -0
- package/dist/types/usage.d.ts +64 -0
- package/dist/types/workflow.d.ts +426 -0
- package/dist/workflow-as-tool.d.ts +66 -0
- package/dist/workflow-errors.d.ts +164 -0
- package/dist/workflow.cjs +100 -0
- package/dist/workflow.cjs.map +1 -0
- package/dist/workflow.d.cts +911 -0
- package/dist/workflow.d.ts +911 -0
- package/dist/workflow.js +11 -0
- package/dist/workflow.js.map +1 -0
- package/docs/adr/README.md +2604 -0
- package/docs/error-codes.md +253 -0
- package/docs/harness-capability-map.md +1435 -0
- package/docs/memory-decisions.md +265 -0
- package/package.json +455 -0
|
@@ -0,0 +1,843 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKRD3GQAA_cjs = require('./chunk-KRD3GQAA.cjs');
|
|
4
|
+
var chunkLOHMT36V_cjs = require('./chunk-LOHMT36V.cjs');
|
|
5
|
+
var chunk7A6535RA_cjs = require('./chunk-7A6535RA.cjs');
|
|
6
|
+
var chunkGZV6AVRL_cjs = require('./chunk-GZV6AVRL.cjs');
|
|
7
|
+
var chunkDQZU7JK6_cjs = require('./chunk-DQZU7JK6.cjs');
|
|
8
|
+
var chunkZF2LDKQQ_cjs = require('./chunk-ZF2LDKQQ.cjs');
|
|
9
|
+
var chunkJLRLCBJ4_cjs = require('./chunk-JLRLCBJ4.cjs');
|
|
10
|
+
var chunkJ7J7J2GN_cjs = require('./chunk-J7J7J2GN.cjs');
|
|
11
|
+
var chunk6LHQPOMI_cjs = require('./chunk-6LHQPOMI.cjs');
|
|
12
|
+
var os = require('os');
|
|
13
|
+
var path = require('path');
|
|
14
|
+
var promises = require('fs/promises');
|
|
15
|
+
var crypto = require('crypto');
|
|
16
|
+
var fs = require('fs');
|
|
17
|
+
var module$1 = require('module');
|
|
18
|
+
|
|
19
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
20
|
+
var DEFAULT_SUBPATH = [".theokit", "memory"];
|
|
21
|
+
function asMemoryRoot(dir) {
|
|
22
|
+
return dir;
|
|
23
|
+
}
|
|
24
|
+
function projectMemoryDir(cwd) {
|
|
25
|
+
return path.join(cwd, ...DEFAULT_SUBPATH);
|
|
26
|
+
}
|
|
27
|
+
function claudeProjectMemoryDir(cwd) {
|
|
28
|
+
const home = process.env.CLAUDE_CONFIG_DIR?.trim();
|
|
29
|
+
const root = home !== void 0 && home.length > 0 ? home : path.join(os.homedir(), ".claude");
|
|
30
|
+
return path.join(root, "projects", chunkGZV6AVRL_cjs.encodeProjectDir(chunkLOHMT36V_cjs.findGitRoot(cwd) ?? cwd), "memory");
|
|
31
|
+
}
|
|
32
|
+
function resolveMemoryRoot(cwd, config) {
|
|
33
|
+
const declared = config?.directory;
|
|
34
|
+
if (declared === void 0) return projectMemoryDir(cwd);
|
|
35
|
+
const trimmed = declared.trim();
|
|
36
|
+
if (trimmed.startsWith("~/")) return path.join(os.homedir(), trimmed.slice(2));
|
|
37
|
+
if (trimmed.length === 0 || !path.isAbsolute(trimmed)) {
|
|
38
|
+
throw new chunkJ7J7J2GN_cjs.ConfigurationError(
|
|
39
|
+
`memory.directory must be an absolute path or start with "~/". Received: ${JSON.stringify(declared)}`,
|
|
40
|
+
{ code: "invalid_memory_directory" }
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return trimmed;
|
|
44
|
+
}
|
|
45
|
+
var MEMORY_INDEX_MAX_LINES = 200;
|
|
46
|
+
var MEMORY_INDEX_MAX_BYTES = 25 * 1024;
|
|
47
|
+
function indexBudgetWarning(index, root) {
|
|
48
|
+
if (root !== claudeProjectMemoryDirFor(root)) return void 0;
|
|
49
|
+
const lines = index.split("\n").length;
|
|
50
|
+
const bytes = Buffer.byteLength(index, "utf8");
|
|
51
|
+
const over = [];
|
|
52
|
+
if (lines > MEMORY_INDEX_MAX_LINES) over.push(`${lines} lines (limit ${MEMORY_INDEX_MAX_LINES})`);
|
|
53
|
+
if (bytes > MEMORY_INDEX_MAX_BYTES) {
|
|
54
|
+
over.push(`${Math.round(bytes / 1024)} KB (limit ${MEMORY_INDEX_MAX_BYTES / 1024} KB)`);
|
|
55
|
+
}
|
|
56
|
+
if (over.length === 0) return void 0;
|
|
57
|
+
return `MEMORY.md at ${root} is ${over.join(" and ")}. The Claude Code CLI loads only the first ${MEMORY_INDEX_MAX_LINES} lines / ${MEMORY_INDEX_MAX_BYTES / 1024} KB of an index and drops the rest without saying so, which is where this store is written. Shorten the entries or move detail into the per-memory files. Recall through this SDK is unaffected \u2014 it reads the files, not the index.`;
|
|
58
|
+
}
|
|
59
|
+
function claudeProjectMemoryDirFor(root) {
|
|
60
|
+
const home = process.env.CLAUDE_CONFIG_DIR?.trim();
|
|
61
|
+
const claudeHome = home !== void 0 && home.length > 0 ? home : path.join(os.homedir(), ".claude");
|
|
62
|
+
const prefix = path.join(claudeHome, "projects");
|
|
63
|
+
const isUnderProjects = root.startsWith(`${prefix}${path.sep}`);
|
|
64
|
+
return isUnderProjects && root.endsWith(`${path.sep}memory`) ? root : "";
|
|
65
|
+
}
|
|
66
|
+
function memoryIndexRoot(cwd, store) {
|
|
67
|
+
return claudeProjectMemoryDirFor(store) === "" ? store : projectMemoryDir(cwd);
|
|
68
|
+
}
|
|
69
|
+
function memoryReadRoots(cwd, config) {
|
|
70
|
+
return [
|
|
71
|
+
.../* @__PURE__ */ new Set([
|
|
72
|
+
resolveMemoryRoot(cwd, config),
|
|
73
|
+
projectMemoryDir(cwd),
|
|
74
|
+
claudeProjectMemoryDir(cwd)
|
|
75
|
+
])
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
var MEMORY_KINDS = ["user", "feedback", "project", "reference"];
|
|
79
|
+
function legacyMemoryJsonPath(cwd, config) {
|
|
80
|
+
if (config.storePath !== void 0) {
|
|
81
|
+
return path.resolve(cwd, config.storePath);
|
|
82
|
+
}
|
|
83
|
+
const namespace = chunk7A6535RA_cjs.sanitizeIdentifier(config.namespace ?? "default");
|
|
84
|
+
const scope = chunk7A6535RA_cjs.sanitizeIdentifier(config.scope ?? "agent", { maxLen: 16 });
|
|
85
|
+
const userId = chunk7A6535RA_cjs.sanitizeIdentifier(config.userId ?? "default");
|
|
86
|
+
return chunk7A6535RA_cjs.safePathJoin(cwd, ".theokit", "memory", namespace, `${scope}-${userId}.json`);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// src/internal/memory/storage/memory-file.ts
|
|
90
|
+
var SAFE_SLUG = /^[a-z0-9][a-z0-9_-]*$/;
|
|
91
|
+
var MAX_SLUG_LENGTH = 64;
|
|
92
|
+
var TARGET_SLUG_LENGTH = 32;
|
|
93
|
+
var TITLE_MAX_LENGTH = 40;
|
|
94
|
+
var TITLE_MAX_WORDS = 4;
|
|
95
|
+
var SLUG_STOPWORDS = /* @__PURE__ */ new Set([
|
|
96
|
+
"the",
|
|
97
|
+
"a",
|
|
98
|
+
"an",
|
|
99
|
+
"and",
|
|
100
|
+
"or",
|
|
101
|
+
"but",
|
|
102
|
+
"is",
|
|
103
|
+
"are",
|
|
104
|
+
"was",
|
|
105
|
+
"were",
|
|
106
|
+
"be",
|
|
107
|
+
"been",
|
|
108
|
+
"being",
|
|
109
|
+
"for",
|
|
110
|
+
"of",
|
|
111
|
+
"to",
|
|
112
|
+
"in",
|
|
113
|
+
"on",
|
|
114
|
+
"at",
|
|
115
|
+
"by",
|
|
116
|
+
"with",
|
|
117
|
+
"from",
|
|
118
|
+
"as",
|
|
119
|
+
"that",
|
|
120
|
+
"this",
|
|
121
|
+
"these",
|
|
122
|
+
"those",
|
|
123
|
+
"it",
|
|
124
|
+
"its",
|
|
125
|
+
"he",
|
|
126
|
+
"she",
|
|
127
|
+
"they",
|
|
128
|
+
"we",
|
|
129
|
+
"you",
|
|
130
|
+
"i",
|
|
131
|
+
"do",
|
|
132
|
+
"does",
|
|
133
|
+
"did",
|
|
134
|
+
"has",
|
|
135
|
+
"have",
|
|
136
|
+
"had",
|
|
137
|
+
"will",
|
|
138
|
+
"would",
|
|
139
|
+
"can",
|
|
140
|
+
"could",
|
|
141
|
+
"should",
|
|
142
|
+
"must",
|
|
143
|
+
"not",
|
|
144
|
+
"no",
|
|
145
|
+
"over",
|
|
146
|
+
"under",
|
|
147
|
+
"into",
|
|
148
|
+
"onto",
|
|
149
|
+
"than",
|
|
150
|
+
"then",
|
|
151
|
+
"when",
|
|
152
|
+
"where",
|
|
153
|
+
"which",
|
|
154
|
+
"who",
|
|
155
|
+
"why",
|
|
156
|
+
"how",
|
|
157
|
+
"all",
|
|
158
|
+
"any",
|
|
159
|
+
"each",
|
|
160
|
+
"more",
|
|
161
|
+
"most",
|
|
162
|
+
"other",
|
|
163
|
+
"some",
|
|
164
|
+
"such",
|
|
165
|
+
"only",
|
|
166
|
+
"own",
|
|
167
|
+
"same",
|
|
168
|
+
"so",
|
|
169
|
+
"too",
|
|
170
|
+
"very",
|
|
171
|
+
"just",
|
|
172
|
+
"also",
|
|
173
|
+
"about",
|
|
174
|
+
"after",
|
|
175
|
+
"before",
|
|
176
|
+
"between",
|
|
177
|
+
"during",
|
|
178
|
+
"up",
|
|
179
|
+
"down",
|
|
180
|
+
"out",
|
|
181
|
+
"off",
|
|
182
|
+
"again",
|
|
183
|
+
"once",
|
|
184
|
+
"here",
|
|
185
|
+
"there",
|
|
186
|
+
"if",
|
|
187
|
+
"because",
|
|
188
|
+
"while"
|
|
189
|
+
]);
|
|
190
|
+
function topicWords(text) {
|
|
191
|
+
return text.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g, "").split(/[^a-z0-9]+/).filter((w) => w.length >= 2 && !SLUG_STOPWORDS.has(w));
|
|
192
|
+
}
|
|
193
|
+
function slugForFact(text) {
|
|
194
|
+
const words = topicWords(text);
|
|
195
|
+
let slug = "";
|
|
196
|
+
for (const w of words) {
|
|
197
|
+
const next = slug.length === 0 ? w : `${slug}-${w}`;
|
|
198
|
+
if (next.length > TARGET_SLUG_LENGTH && slug.length > 0) break;
|
|
199
|
+
if (next.length > MAX_SLUG_LENGTH) break;
|
|
200
|
+
slug = next;
|
|
201
|
+
}
|
|
202
|
+
if (slug.length === 0) {
|
|
203
|
+
slug = text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, MAX_SLUG_LENGTH).replace(/-+$/, "");
|
|
204
|
+
}
|
|
205
|
+
return SAFE_SLUG.test(slug) ? slug : chunk7A6535RA_cjs.safeFilenameForId(text);
|
|
206
|
+
}
|
|
207
|
+
function titleForFact(text) {
|
|
208
|
+
const words = topicWords(text);
|
|
209
|
+
if (words.length === 0) return text.trim().slice(0, TITLE_MAX_LENGTH);
|
|
210
|
+
let title = "";
|
|
211
|
+
let used = 0;
|
|
212
|
+
for (const w of words) {
|
|
213
|
+
if (used >= TITLE_MAX_WORDS) break;
|
|
214
|
+
const next = title.length === 0 ? w : `${title} ${w}`;
|
|
215
|
+
if (next.length > TITLE_MAX_LENGTH && title.length > 0) break;
|
|
216
|
+
title = next;
|
|
217
|
+
used += 1;
|
|
218
|
+
}
|
|
219
|
+
if (title.length === 0) title = words[0];
|
|
220
|
+
return title.charAt(0).toUpperCase() + title.slice(1);
|
|
221
|
+
}
|
|
222
|
+
function readMetadata(raw) {
|
|
223
|
+
const metadata = raw ?? {};
|
|
224
|
+
const rawKind = metadata.type;
|
|
225
|
+
const kind = typeof rawKind === "string" && MEMORY_KINDS.includes(rawKind) ? rawKind : void 0;
|
|
226
|
+
const modified = typeof metadata.modified === "string" ? metadata.modified : void 0;
|
|
227
|
+
const observations = readObservationCount(metadata.observations);
|
|
228
|
+
return {
|
|
229
|
+
...kind !== void 0 ? { kind } : {},
|
|
230
|
+
...modified !== void 0 ? { modified } : {},
|
|
231
|
+
...observations !== void 0 ? { observations } : {}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function readObservationCount(raw) {
|
|
235
|
+
if (typeof raw !== "number") return void 0;
|
|
236
|
+
if (!Number.isInteger(raw) || raw <= 0) return void 0;
|
|
237
|
+
return raw;
|
|
238
|
+
}
|
|
239
|
+
function renderMemoryFile(fields) {
|
|
240
|
+
const metadata = [" node_type: memory"];
|
|
241
|
+
if (fields.kind !== void 0) metadata.push(` type: ${fields.kind}`);
|
|
242
|
+
if (fields.modified !== void 0) metadata.push(` modified: ${fields.modified}`);
|
|
243
|
+
if (fields.observations !== void 0) {
|
|
244
|
+
metadata.push(` observations: ${fields.observations}`);
|
|
245
|
+
}
|
|
246
|
+
return [
|
|
247
|
+
"---",
|
|
248
|
+
`name: ${fields.name}`,
|
|
249
|
+
`description: ${JSON.stringify(fields.description)}`,
|
|
250
|
+
"metadata:",
|
|
251
|
+
...metadata,
|
|
252
|
+
"---",
|
|
253
|
+
"",
|
|
254
|
+
fields.body,
|
|
255
|
+
""
|
|
256
|
+
].join("\n");
|
|
257
|
+
}
|
|
258
|
+
function parseMemoryFile(raw) {
|
|
259
|
+
const { yaml, body } = chunkKRD3GQAA_cjs.splitFrontmatter(raw);
|
|
260
|
+
if (yaml === void 0) return void 0;
|
|
261
|
+
let fields;
|
|
262
|
+
try {
|
|
263
|
+
fields = chunkKRD3GQAA_cjs.parseSimpleYaml(yaml);
|
|
264
|
+
} catch {
|
|
265
|
+
return void 0;
|
|
266
|
+
}
|
|
267
|
+
const name = fields.name;
|
|
268
|
+
const description = fields.description;
|
|
269
|
+
if (typeof name !== "string" || typeof description !== "string") return void 0;
|
|
270
|
+
return {
|
|
271
|
+
name,
|
|
272
|
+
description,
|
|
273
|
+
...readMetadata(fields.metadata),
|
|
274
|
+
body: body.trim()
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
// src/internal/memory/storage/threat-scan.ts
|
|
279
|
+
var INVISIBLE_CLASS = "\\u200B-\\u200F\\u202A-\\u202E\\u2066-\\u2069\\uFEFF";
|
|
280
|
+
var THREAT_PATTERNS = [
|
|
281
|
+
{
|
|
282
|
+
id: "invisible_unicode",
|
|
283
|
+
// Text that renders as one thing to a reviewer and another to a parser is the whole
|
|
284
|
+
// technique.
|
|
285
|
+
test: new RegExp(`[${INVISIBLE_CLASS}]`, "u"),
|
|
286
|
+
why: "contains invisible or bidirectional control characters"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: "instruction_override",
|
|
290
|
+
// The framing that tries to make recalled text outrank the system prompt. A memory entry
|
|
291
|
+
// states what was learned; it never addresses the model's instructions.
|
|
292
|
+
test: /\b(?:ignore|disregard|forget|override)\s+(?:all\s+|any\s+|the\s+|your\s+|previous\s+|prior\s+|earlier\s+|above\s+)*(?:instruction|prompt|rule|directive|guideline|system\s+prompt)/i,
|
|
293
|
+
why: "addresses the model's instructions instead of stating what was learned"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
id: "role_reassignment",
|
|
297
|
+
test: /\b(?:you\s+are\s+now|from\s+now\s+on\s+you\s+(?:are|will|must)|new\s+system\s+prompt|act\s+as\s+(?:if\s+you\s+are\s+)?(?:an?\s+)?(?:unrestricted|jailbroken|developer\s+mode))/i,
|
|
298
|
+
why: "attempts to reassign the agent's role"
|
|
299
|
+
},
|
|
300
|
+
// A `pipe_to_shell` pattern (`curl … | sh`) was written here and REMOVED after measurement.
|
|
301
|
+
// It fired on 1 of 797 real memory files, and the hit was legitimate: a note documenting the
|
|
302
|
+
// product's own install command in a table. Fetch-and-execute in a hostile entry and in an
|
|
303
|
+
// install instruction are textually identical, so the pattern cannot be narrowed — only
|
|
304
|
+
// traded. Rejecting the write would mean the first person to save install docs to memory
|
|
305
|
+
// gets a hard failure, which buys nothing: an entry the agent READS is not an entry the
|
|
306
|
+
// agent RUNS, and execution is gated at the tool boundary, where it belongs. Left out on
|
|
307
|
+
// purpose, so nobody re-adds it without repeating the measurement.
|
|
308
|
+
{
|
|
309
|
+
id: "encoded_payload",
|
|
310
|
+
// A base64 run this long is not prose. Short tokens are left alone precisely so that hashes,
|
|
311
|
+
// commit SHAs and identifiers keep working.
|
|
312
|
+
test: /[A-Za-z0-9+/]{256,}={0,2}/,
|
|
313
|
+
why: "carries a long encoded payload rather than readable text"
|
|
314
|
+
}
|
|
315
|
+
];
|
|
316
|
+
var EXCERPT_RADIUS = 40;
|
|
317
|
+
var EXCERPT_SCRUB = new RegExp(`[\\u0000-\\u001F${INVISIBLE_CLASS}]`, "gu");
|
|
318
|
+
function scanForThreats(text) {
|
|
319
|
+
for (const pattern of THREAT_PATTERNS) {
|
|
320
|
+
const m = pattern.test.exec(text);
|
|
321
|
+
if (m === null) continue;
|
|
322
|
+
const at = m.index;
|
|
323
|
+
const start = Math.max(0, at - EXCERPT_RADIUS);
|
|
324
|
+
const end = Math.min(text.length, at + m[0].length + EXCERPT_RADIUS);
|
|
325
|
+
const window = text.slice(start, end).replace(EXCERPT_SCRUB, "\u2423");
|
|
326
|
+
return {
|
|
327
|
+
id: pattern.id,
|
|
328
|
+
why: pattern.why,
|
|
329
|
+
excerpt: `${start > 0 ? "\u2026" : ""}${window}${end < text.length ? "\u2026" : ""}`
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
return void 0;
|
|
333
|
+
}
|
|
334
|
+
THREAT_PATTERNS.map((p) => p.id);
|
|
335
|
+
|
|
336
|
+
// src/internal/memory/storage/markdown-store.ts
|
|
337
|
+
var MEMORY_MD_HEADER = "# Memory Index\n";
|
|
338
|
+
var FACTS_HEADING = "## Facts";
|
|
339
|
+
var MAX_NAME_VARIANTS = 50;
|
|
340
|
+
function memoryMdPath(root) {
|
|
341
|
+
return path.join(root, "MEMORY.md");
|
|
342
|
+
}
|
|
343
|
+
function notesDir(root) {
|
|
344
|
+
return path.join(root, "notes");
|
|
345
|
+
}
|
|
346
|
+
function byNaturalName(a, b) {
|
|
347
|
+
const split = (f) => {
|
|
348
|
+
const stem = f.replace(/\.md$/, "");
|
|
349
|
+
const m = /^(.*?)-(\d+)$/.exec(stem);
|
|
350
|
+
return m === null ? [stem, 0] : [m[1], Number(m[2])];
|
|
351
|
+
};
|
|
352
|
+
const [baseA, nA] = split(a);
|
|
353
|
+
const [baseB, nB] = split(b);
|
|
354
|
+
return baseA === baseB ? nA - nB : baseA.localeCompare(baseB);
|
|
355
|
+
}
|
|
356
|
+
async function readFactsFromMarkdown(cwd, config) {
|
|
357
|
+
const facts = [];
|
|
358
|
+
const roots = memoryReadRoots(cwd, config);
|
|
359
|
+
for (const dir of roots) facts.push(...await readMemoryFilesIn(dir));
|
|
360
|
+
for (const dir of roots) facts.push(...await readLegacyFactsSectionIn(dir));
|
|
361
|
+
return facts;
|
|
362
|
+
}
|
|
363
|
+
async function readMemoryFilesIn(dir) {
|
|
364
|
+
let entries;
|
|
365
|
+
try {
|
|
366
|
+
entries = await promises.readdir(dir);
|
|
367
|
+
} catch {
|
|
368
|
+
return [];
|
|
369
|
+
}
|
|
370
|
+
const facts = [];
|
|
371
|
+
for (const entry of entries.sort(byNaturalName)) {
|
|
372
|
+
const fact = await readMemoryFileIn(dir, entry);
|
|
373
|
+
if (fact !== void 0) facts.push(fact);
|
|
374
|
+
}
|
|
375
|
+
facts.sort((a, b) => (a.modified ?? "").localeCompare(b.modified ?? ""));
|
|
376
|
+
return facts;
|
|
377
|
+
}
|
|
378
|
+
async function readLegacyFactsSectionIn(dir) {
|
|
379
|
+
try {
|
|
380
|
+
return parseFactsSection(await promises.readFile(path.join(dir, "MEMORY.md"), "utf8"));
|
|
381
|
+
} catch {
|
|
382
|
+
return [];
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
async function readMemoryFileIn(dir, entry) {
|
|
386
|
+
if (!entry.endsWith(".md") || entry === "MEMORY.md") return void 0;
|
|
387
|
+
let raw;
|
|
388
|
+
try {
|
|
389
|
+
raw = await promises.readFile(path.join(dir, entry), "utf8");
|
|
390
|
+
} catch {
|
|
391
|
+
return void 0;
|
|
392
|
+
}
|
|
393
|
+
const parsed = parseMemoryFile(raw);
|
|
394
|
+
if (parsed === void 0) return void 0;
|
|
395
|
+
const body = parsed.body.trim();
|
|
396
|
+
return {
|
|
397
|
+
text: body.length > 0 ? body : parsed.description,
|
|
398
|
+
...parsed.kind !== void 0 ? { kind: parsed.kind } : {},
|
|
399
|
+
...parsed.modified !== void 0 ? { modified: parsed.modified } : {},
|
|
400
|
+
...parsed.observations !== void 0 ? { observations: parsed.observations } : {}
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
function assertWritable(fact, text) {
|
|
404
|
+
if (fact.kind !== void 0 && !MEMORY_KINDS.includes(fact.kind)) {
|
|
405
|
+
throw new chunkJ7J7J2GN_cjs.ConfigurationError(
|
|
406
|
+
`Unknown memory fact kind "${fact.kind}". Expected one of: ${MEMORY_KINDS.join(", ")}.`,
|
|
407
|
+
{ code: "invalid_memory_kind" }
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
const threat = scanForThreats(text);
|
|
411
|
+
if (threat !== void 0) {
|
|
412
|
+
throw new chunkJ7J7J2GN_cjs.ConfigurationError(
|
|
413
|
+
`Refusing to write a memory entry that ${threat.why}: ${threat.excerpt}`,
|
|
414
|
+
{ code: "memory_threat_rejected" }
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function appendFactToMarkdown(cwd, fact, targetDir = projectMemoryDir(cwd)) {
|
|
419
|
+
return chunkZF2LDKQQ_cjs.withCwdMutex(targetDir, async () => {
|
|
420
|
+
const text = chunk6LHQPOMI_cjs.redactSecrets(fact.text);
|
|
421
|
+
assertWritable(fact, text);
|
|
422
|
+
const title = fact.title?.trim() ?? titleForFact(text);
|
|
423
|
+
const base = fact.title !== void 0 ? slugForFact(fact.title) : slugForFact(text);
|
|
424
|
+
await promises.mkdir(targetDir, { recursive: true });
|
|
425
|
+
const name = await resolveName(targetDir, base, text);
|
|
426
|
+
const description = fact.description?.trim() ?? text;
|
|
427
|
+
const observations = await nextObservationCount(targetDir, name, text);
|
|
428
|
+
await chunkJLRLCBJ4_cjs.replaceFileAtomic(
|
|
429
|
+
path.join(targetDir, `${name}.md`),
|
|
430
|
+
renderMemoryFile({
|
|
431
|
+
name,
|
|
432
|
+
description,
|
|
433
|
+
...fact.kind !== void 0 ? { kind: fact.kind } : {},
|
|
434
|
+
modified: (/* @__PURE__ */ new Date()).toISOString(),
|
|
435
|
+
observations,
|
|
436
|
+
body: text
|
|
437
|
+
})
|
|
438
|
+
);
|
|
439
|
+
const index = await nextIndex(targetDir, description, name, title);
|
|
440
|
+
await chunkJLRLCBJ4_cjs.replaceFileAtomic(path.join(targetDir, "MEMORY.md"), index);
|
|
441
|
+
const warning = indexBudgetWarning(index, targetDir);
|
|
442
|
+
if (warning !== void 0) chunk6LHQPOMI_cjs.diag(`[theokit-sdk] ${warning}
|
|
443
|
+
`);
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
async function resolveName(dir, base, text) {
|
|
447
|
+
const wanted = normalizeFactText(text);
|
|
448
|
+
for (let i = 1; i <= MAX_NAME_VARIANTS; i += 1) {
|
|
449
|
+
const candidate = i === 1 ? base : `${base}-${i}`;
|
|
450
|
+
let existing;
|
|
451
|
+
try {
|
|
452
|
+
existing = await promises.readFile(path.join(dir, `${candidate}.md`), "utf8");
|
|
453
|
+
} catch {
|
|
454
|
+
return candidate;
|
|
455
|
+
}
|
|
456
|
+
const parsed = parseMemoryFile(existing);
|
|
457
|
+
if (parsed === void 0) return candidate;
|
|
458
|
+
if (normalizeFactText(parsed.body) === wanted) return candidate;
|
|
459
|
+
}
|
|
460
|
+
return slugForFact(text) === base ? chunk7A6535RA_cjs.safeFilenameForId(text) : slugForFact(text);
|
|
461
|
+
}
|
|
462
|
+
async function nextObservationCount(dir, name, text) {
|
|
463
|
+
let existing;
|
|
464
|
+
try {
|
|
465
|
+
existing = await promises.readFile(path.join(dir, `${name}.md`), "utf8");
|
|
466
|
+
} catch {
|
|
467
|
+
return 1;
|
|
468
|
+
}
|
|
469
|
+
const parsed = parseMemoryFile(existing);
|
|
470
|
+
if (parsed === void 0) return 1;
|
|
471
|
+
const sameFact = normalizeFactText(parsed.body) === normalizeFactText(text);
|
|
472
|
+
if (!sameFact) return 1;
|
|
473
|
+
return (parsed.observations ?? 1) + 1;
|
|
474
|
+
}
|
|
475
|
+
function normalizeFactText(text) {
|
|
476
|
+
return text.trim().toLowerCase().replace(/\s+/g, " ").replace(/[.!?]+$/, "");
|
|
477
|
+
}
|
|
478
|
+
async function nextIndex(dir, text, name, title) {
|
|
479
|
+
let existing = "";
|
|
480
|
+
try {
|
|
481
|
+
existing = await promises.readFile(path.join(dir, "MEMORY.md"), "utf8");
|
|
482
|
+
} catch {
|
|
483
|
+
existing = "";
|
|
484
|
+
}
|
|
485
|
+
const hook = text.replace(/\s+/g, " ").trim();
|
|
486
|
+
const entry = hook.length > 0 && hook !== title ? `- [${title}](${name}.md) \u2014 ${hook}` : `- [${title}](${name}.md)`;
|
|
487
|
+
const kept = existing.split("\n").filter((line) => !line.startsWith(`- [`) || !line.includes(`](${name}.md)`));
|
|
488
|
+
const body = kept.join("\n").trimEnd();
|
|
489
|
+
const head = body.length > 0 ? body : MEMORY_MD_HEADER;
|
|
490
|
+
return `${head}
|
|
491
|
+
${entry}
|
|
492
|
+
`;
|
|
493
|
+
}
|
|
494
|
+
var INDEX_ENTRY = /^\[[^\]]*\]\([^)]+\.md\)(?:\s+—\s.*)?$/;
|
|
495
|
+
function parseFactsSection(raw) {
|
|
496
|
+
const idx = raw.indexOf(FACTS_HEADING);
|
|
497
|
+
if (idx === -1) return [];
|
|
498
|
+
const tail = raw.slice(idx + FACTS_HEADING.length);
|
|
499
|
+
const nextHeading = tail.search(/\n#{1,2}\s/);
|
|
500
|
+
const block = nextHeading === -1 ? tail : tail.slice(0, nextHeading);
|
|
501
|
+
return block.split("\n").map((line) => line.trim()).filter((line) => line.startsWith("- ")).map((line) => line.slice(2).trim()).filter((body) => !INDEX_ENTRY.test(body)).map((body) => ({ text: body }));
|
|
502
|
+
}
|
|
503
|
+
async function readFacts(cwd, config) {
|
|
504
|
+
if (!config.enabled) return [];
|
|
505
|
+
return readFactsFromMarkdown(cwd, config);
|
|
506
|
+
}
|
|
507
|
+
async function appendFact(cwd, config, fact) {
|
|
508
|
+
if (!config.enabled) return;
|
|
509
|
+
await appendFactToMarkdown(cwd, fact, resolveMemoryRoot(cwd, config));
|
|
510
|
+
}
|
|
511
|
+
var MAX_TURN_CHARS = 2e3;
|
|
512
|
+
function sessionsDir(root) {
|
|
513
|
+
return path.join(root, "sessions");
|
|
514
|
+
}
|
|
515
|
+
function sessionSummaryPath(root, runId) {
|
|
516
|
+
return path.join(sessionsDir(root), `${chunk7A6535RA_cjs.safeFilenameForId(runId, { maxLen: 128 })}.md`);
|
|
517
|
+
}
|
|
518
|
+
function truncate(text) {
|
|
519
|
+
if (text.length <= MAX_TURN_CHARS) return text;
|
|
520
|
+
return `${text.slice(0, MAX_TURN_CHARS)}\u2026`;
|
|
521
|
+
}
|
|
522
|
+
async function writeSessionSummary(input) {
|
|
523
|
+
if (input.status !== "finished") return;
|
|
524
|
+
const path = sessionSummaryPath(input.memoryRoot, input.runId);
|
|
525
|
+
await promises.mkdir(sessionsDir(input.memoryRoot), { recursive: true });
|
|
526
|
+
const safeUser = chunk6LHQPOMI_cjs.redactSecrets(truncate(input.userText));
|
|
527
|
+
const safeAssistant = chunk6LHQPOMI_cjs.redactSecrets(truncate(input.assistantText));
|
|
528
|
+
const iso = new Date(input.at).toISOString();
|
|
529
|
+
const body = [
|
|
530
|
+
"---",
|
|
531
|
+
`runId: ${input.runId}`,
|
|
532
|
+
`agentId: ${input.agentId}`,
|
|
533
|
+
`at: ${iso}`,
|
|
534
|
+
`status: ${input.status}`,
|
|
535
|
+
"---",
|
|
536
|
+
"",
|
|
537
|
+
"## User",
|
|
538
|
+
"",
|
|
539
|
+
safeUser,
|
|
540
|
+
"",
|
|
541
|
+
"## Assistant",
|
|
542
|
+
"",
|
|
543
|
+
safeAssistant,
|
|
544
|
+
""
|
|
545
|
+
].join("\n");
|
|
546
|
+
await chunkJLRLCBJ4_cjs.replaceFileAtomic(path, body);
|
|
547
|
+
}
|
|
548
|
+
async function listMarkdownIn(dir, root, options = {}) {
|
|
549
|
+
let entries;
|
|
550
|
+
try {
|
|
551
|
+
entries = await promises.readdir(dir);
|
|
552
|
+
} catch (cause) {
|
|
553
|
+
if (cause.code === "ENOENT") return [];
|
|
554
|
+
throw cause;
|
|
555
|
+
}
|
|
556
|
+
const skip = options.skip ?? [];
|
|
557
|
+
return entries.filter((entry) => entry.endsWith(".md") && !skip.includes(entry)).map((entry) => {
|
|
558
|
+
const absolutePath = path.join(dir, entry);
|
|
559
|
+
return { absolutePath, relPath: path.relative(root, absolutePath) };
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
// src/internal/memory/storage/session-loader.ts
|
|
564
|
+
async function discoverSessionFiles(root) {
|
|
565
|
+
return await listMarkdownIn(sessionsDir(root), root);
|
|
566
|
+
}
|
|
567
|
+
function wikiDir(root) {
|
|
568
|
+
return path.join(root, "wiki");
|
|
569
|
+
}
|
|
570
|
+
async function discoverWikiFiles(root) {
|
|
571
|
+
return await listMarkdownIn(wikiDir(root), root);
|
|
572
|
+
}
|
|
573
|
+
function resolveWeights(options) {
|
|
574
|
+
const vectorWeight = options.vectorWeight ?? 0.6;
|
|
575
|
+
const textWeight = options.textWeight ?? 0.4;
|
|
576
|
+
const total = vectorWeight + textWeight || 1;
|
|
577
|
+
return { vectorWeight, textWeight, total };
|
|
578
|
+
}
|
|
579
|
+
function blendScores(hit, vectorScore, weights) {
|
|
580
|
+
const score = (vectorScore * weights.vectorWeight + hit.textScore * weights.textWeight) / weights.total;
|
|
581
|
+
return {
|
|
582
|
+
path: hit.path,
|
|
583
|
+
startLine: hit.startLine,
|
|
584
|
+
endLine: hit.endLine,
|
|
585
|
+
score,
|
|
586
|
+
textScore: hit.textScore,
|
|
587
|
+
snippet: hit.snippet,
|
|
588
|
+
source: hit.source,
|
|
589
|
+
citation: hit.citation,
|
|
590
|
+
...vectorScore > 0 ? { vectorScore } : {}
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
async function markdownFilesIn(dir, root, skip = []) {
|
|
594
|
+
const files = await listMarkdownIn(dir, root, { skip });
|
|
595
|
+
return files.map((file) => ({ ...file, source: "memory" }));
|
|
596
|
+
}
|
|
597
|
+
async function collectMarkdownFiles(root) {
|
|
598
|
+
const results = [];
|
|
599
|
+
try {
|
|
600
|
+
await promises.stat(memoryMdPath(root));
|
|
601
|
+
results.push({
|
|
602
|
+
absolutePath: memoryMdPath(root),
|
|
603
|
+
relPath: path.relative(root, memoryMdPath(root)),
|
|
604
|
+
source: "memory"
|
|
605
|
+
});
|
|
606
|
+
} catch {
|
|
607
|
+
}
|
|
608
|
+
results.push(...await markdownFilesIn(root, root, ["MEMORY.md"]));
|
|
609
|
+
results.push(...await markdownFilesIn(notesDir(root), root));
|
|
610
|
+
const wikiFiles = await discoverWikiFiles(root);
|
|
611
|
+
for (const wiki of wikiFiles) {
|
|
612
|
+
results.push({
|
|
613
|
+
absolutePath: wiki.absolutePath,
|
|
614
|
+
relPath: wiki.relPath,
|
|
615
|
+
source: "wiki"
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
const sessionFiles = await discoverSessionFiles(root);
|
|
619
|
+
for (const session of sessionFiles) {
|
|
620
|
+
results.push({
|
|
621
|
+
absolutePath: session.absolutePath,
|
|
622
|
+
relPath: session.relPath,
|
|
623
|
+
source: "sessions"
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
return results;
|
|
627
|
+
}
|
|
628
|
+
function sha256(text) {
|
|
629
|
+
return crypto.createHash("sha256").update(text).digest("hex");
|
|
630
|
+
}
|
|
631
|
+
function truncateSnippet(text) {
|
|
632
|
+
const max = 500;
|
|
633
|
+
return text.length <= max ? text : `${text.slice(0, max)}\u2026`;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
// src/internal/memory/index-schema.ts
|
|
637
|
+
var SCHEMA_STATEMENTS = [
|
|
638
|
+
`CREATE TABLE IF NOT EXISTS files (
|
|
639
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
640
|
+
path TEXT UNIQUE NOT NULL,
|
|
641
|
+
rel_path TEXT NOT NULL,
|
|
642
|
+
mtime INTEGER NOT NULL,
|
|
643
|
+
hash TEXT NOT NULL,
|
|
644
|
+
source TEXT NOT NULL DEFAULT 'memory'
|
|
645
|
+
)`,
|
|
646
|
+
`CREATE TABLE IF NOT EXISTS chunks (
|
|
647
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
648
|
+
file_id INTEGER NOT NULL REFERENCES files(id) ON DELETE CASCADE,
|
|
649
|
+
start_line INTEGER NOT NULL,
|
|
650
|
+
end_line INTEGER NOT NULL,
|
|
651
|
+
text TEXT NOT NULL,
|
|
652
|
+
hash TEXT NOT NULL,
|
|
653
|
+
session_key TEXT
|
|
654
|
+
)`,
|
|
655
|
+
`CREATE VIRTUAL TABLE IF NOT EXISTS chunks_fts USING fts5(
|
|
656
|
+
text,
|
|
657
|
+
content='chunks',
|
|
658
|
+
content_rowid='id'
|
|
659
|
+
)`,
|
|
660
|
+
`CREATE TRIGGER IF NOT EXISTS chunks_fts_insert AFTER INSERT ON chunks BEGIN
|
|
661
|
+
INSERT INTO chunks_fts(rowid, text) VALUES (new.id, new.text);
|
|
662
|
+
END`,
|
|
663
|
+
`CREATE TRIGGER IF NOT EXISTS chunks_fts_delete AFTER DELETE ON chunks BEGIN
|
|
664
|
+
INSERT INTO chunks_fts(chunks_fts, rowid, text) VALUES ('delete', old.id, old.text);
|
|
665
|
+
END`,
|
|
666
|
+
`CREATE TABLE IF NOT EXISTS meta (
|
|
667
|
+
key TEXT PRIMARY KEY,
|
|
668
|
+
value TEXT
|
|
669
|
+
)`,
|
|
670
|
+
`CREATE INDEX IF NOT EXISTS idx_chunks_file_id ON chunks(file_id)`
|
|
671
|
+
];
|
|
672
|
+
var PRAGMA_STATEMENTS = [
|
|
673
|
+
"PRAGMA synchronous=NORMAL",
|
|
674
|
+
"PRAGMA foreign_keys=ON"
|
|
675
|
+
];
|
|
676
|
+
|
|
677
|
+
// src/internal/memory/index-db.ts
|
|
678
|
+
async function openMemoryDb(opts) {
|
|
679
|
+
return chunkDQZU7JK6_cjs.openSqliteResilient({
|
|
680
|
+
filePath: opts.filePath,
|
|
681
|
+
label: "memory-index",
|
|
682
|
+
recoverCorrupt: opts.recoverCorrupt,
|
|
683
|
+
onOpen: (db) => {
|
|
684
|
+
for (const pragma of PRAGMA_STATEMENTS) db.exec(pragma);
|
|
685
|
+
for (const stmt of SCHEMA_STATEMENTS) db.exec(stmt);
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
function defaultIndexPath(root) {
|
|
690
|
+
return path.join(root, ".index", "memory.sqlite");
|
|
691
|
+
}
|
|
692
|
+
function requireLance() {
|
|
693
|
+
try {
|
|
694
|
+
const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-NQTNSHSB.cjs', document.baseURI).href)));
|
|
695
|
+
return r("@lancedb/lancedb");
|
|
696
|
+
} catch (cause) {
|
|
697
|
+
throw new chunkJ7J7J2GN_cjs.ConfigurationError(
|
|
698
|
+
'Lance backend selected but `@lancedb/lancedb` is not installed. Install with: `pnpm add @lancedb/lancedb`. SQLite remains available as the default (omit `backend: "lance"`).',
|
|
699
|
+
{ code: "lance_backend_unavailable", cause }
|
|
700
|
+
);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
var LanceIndex = class _LanceIndex {
|
|
704
|
+
constructor(table, embedding, embeddingDim) {
|
|
705
|
+
this.table = table;
|
|
706
|
+
this.embedding = embedding;
|
|
707
|
+
this.embeddingDim = embeddingDim;
|
|
708
|
+
}
|
|
709
|
+
table;
|
|
710
|
+
embedding;
|
|
711
|
+
embeddingDim;
|
|
712
|
+
static async open(opts) {
|
|
713
|
+
const lance = requireLance();
|
|
714
|
+
const storagePath = opts.storagePath ?? lanceStoragePath(opts.memoryRoot ?? resolveMemoryRoot(opts.cwd));
|
|
715
|
+
fs.mkdirSync(storagePath, { recursive: true });
|
|
716
|
+
const conn = await lance.connect(storagePath);
|
|
717
|
+
const dim = opts.embedding.dimension;
|
|
718
|
+
const tableName = "facts";
|
|
719
|
+
const existing = await conn.tableNames();
|
|
720
|
+
let table;
|
|
721
|
+
if (existing.includes(tableName)) {
|
|
722
|
+
table = await conn.openTable(tableName);
|
|
723
|
+
const schema = await table.schema();
|
|
724
|
+
const embField = schema.fields.find((f) => f.name === "embedding");
|
|
725
|
+
const existingDim = embField?.type?.listSize ?? embField?.type?.fixedSize;
|
|
726
|
+
if (typeof existingDim === "number" && existingDim !== dim) {
|
|
727
|
+
throw new chunkJ7J7J2GN_cjs.ConfigurationError(
|
|
728
|
+
`Embedding dimension mismatch in Lance index: storage has ${existingDim}-dim vectors, current provider yields ${dim}-dim. Re-embed with \`migrateSqliteToLance\` after switching providers, or use a different storagePath.`,
|
|
729
|
+
{ code: "embedding_dimension_mismatch" }
|
|
730
|
+
);
|
|
731
|
+
}
|
|
732
|
+
} else {
|
|
733
|
+
const bootstrap = {
|
|
734
|
+
id: "__bootstrap__",
|
|
735
|
+
text: "",
|
|
736
|
+
source: "memory",
|
|
737
|
+
embedding: new Array(dim).fill(0),
|
|
738
|
+
namespace: "__bootstrap__",
|
|
739
|
+
scope: "__bootstrap__",
|
|
740
|
+
user_id: "__bootstrap__",
|
|
741
|
+
timestamp: 0
|
|
742
|
+
};
|
|
743
|
+
table = await conn.createTable(tableName, [bootstrap]);
|
|
744
|
+
await table.delete("namespace = '__bootstrap__'");
|
|
745
|
+
}
|
|
746
|
+
return new _LanceIndex(table, opts.embedding, dim);
|
|
747
|
+
}
|
|
748
|
+
async addFacts(facts) {
|
|
749
|
+
if (facts.length === 0) return;
|
|
750
|
+
const texts = facts.map((f) => f.text);
|
|
751
|
+
const embeddings = await this.embedding.embed(texts);
|
|
752
|
+
const rows = facts.map((f, i) => ({
|
|
753
|
+
...f,
|
|
754
|
+
embedding: embeddings[i] ?? new Array(this.embeddingDim).fill(0)
|
|
755
|
+
}));
|
|
756
|
+
await this.table.add(rows);
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* Search facts by semantic similarity. EC-1: filters use Lance's
|
|
760
|
+
* structured object filter — NEVER string interpolation.
|
|
761
|
+
*/
|
|
762
|
+
async search(query, opts) {
|
|
763
|
+
const [embedding] = await this.embedding.embed([query]);
|
|
764
|
+
if (embedding === void 0) return [];
|
|
765
|
+
const predicates = [`namespace = '${escapeSqlValue(opts.namespace)}'`];
|
|
766
|
+
if (opts.scope !== void 0) {
|
|
767
|
+
predicates.push(`scope = '${escapeSqlValue(opts.scope)}'`);
|
|
768
|
+
}
|
|
769
|
+
let q = this.table.search(embedding).where(predicates.join(" AND "));
|
|
770
|
+
if (opts.limit !== void 0) q = q.limit(opts.limit);
|
|
771
|
+
const results = await q.toArray();
|
|
772
|
+
return results.filter((r) => opts.sources === void 0 || opts.sources.includes(r.source)).map((r) => ({
|
|
773
|
+
id: r.id,
|
|
774
|
+
text: r.text,
|
|
775
|
+
source: r.source,
|
|
776
|
+
namespace: r.namespace,
|
|
777
|
+
scope: r.scope,
|
|
778
|
+
userId: r.user_id,
|
|
779
|
+
// Lower _distance = better match; normalize to 0..1 (1=best).
|
|
780
|
+
score: 1 / (1 + (r._distance ?? 1))
|
|
781
|
+
}));
|
|
782
|
+
}
|
|
783
|
+
async countFacts(namespace) {
|
|
784
|
+
return this.table.countRows();
|
|
785
|
+
}
|
|
786
|
+
async removeFacts(ids) {
|
|
787
|
+
if (ids.length === 0) return;
|
|
788
|
+
const escaped = ids.map((id) => `'${id.replace(/'/g, "''")}'`).join(", ");
|
|
789
|
+
await this.table.delete(`id IN (${escaped})`);
|
|
790
|
+
}
|
|
791
|
+
async close() {
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
function escapeSqlValue(value) {
|
|
795
|
+
for (let i = 0; i < value.length; i++) {
|
|
796
|
+
const code = value.charCodeAt(i);
|
|
797
|
+
if (code === 0 || code >= 1 && code <= 31 || code === 127) {
|
|
798
|
+
throw new chunkJ7J7J2GN_cjs.ConfigurationError(
|
|
799
|
+
`SQL filter value contains control character at position ${i} (0x${code.toString(16)}). This may indicate an injection attempt.`,
|
|
800
|
+
{ code: "sql_injection_blocked" }
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
return value.replace(/\\/g, "\\\\").replace(/'/g, "''");
|
|
805
|
+
}
|
|
806
|
+
function lanceStoragePath(root) {
|
|
807
|
+
return path.join(root, "lance");
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
exports.LanceIndex = LanceIndex;
|
|
811
|
+
exports.MEMORY_INDEX_MAX_BYTES = MEMORY_INDEX_MAX_BYTES;
|
|
812
|
+
exports.MEMORY_INDEX_MAX_LINES = MEMORY_INDEX_MAX_LINES;
|
|
813
|
+
exports.MEMORY_KINDS = MEMORY_KINDS;
|
|
814
|
+
exports.appendFact = appendFact;
|
|
815
|
+
exports.appendFactToMarkdown = appendFactToMarkdown;
|
|
816
|
+
exports.asMemoryRoot = asMemoryRoot;
|
|
817
|
+
exports.blendScores = blendScores;
|
|
818
|
+
exports.claudeProjectMemoryDir = claudeProjectMemoryDir;
|
|
819
|
+
exports.collectMarkdownFiles = collectMarkdownFiles;
|
|
820
|
+
exports.defaultIndexPath = defaultIndexPath;
|
|
821
|
+
exports.discoverSessionFiles = discoverSessionFiles;
|
|
822
|
+
exports.discoverWikiFiles = discoverWikiFiles;
|
|
823
|
+
exports.indexBudgetWarning = indexBudgetWarning;
|
|
824
|
+
exports.lanceStoragePath = lanceStoragePath;
|
|
825
|
+
exports.legacyMemoryJsonPath = legacyMemoryJsonPath;
|
|
826
|
+
exports.memoryIndexRoot = memoryIndexRoot;
|
|
827
|
+
exports.memoryMdPath = memoryMdPath;
|
|
828
|
+
exports.memoryReadRoots = memoryReadRoots;
|
|
829
|
+
exports.notesDir = notesDir;
|
|
830
|
+
exports.openMemoryDb = openMemoryDb;
|
|
831
|
+
exports.projectMemoryDir = projectMemoryDir;
|
|
832
|
+
exports.readFacts = readFacts;
|
|
833
|
+
exports.readFactsFromMarkdown = readFactsFromMarkdown;
|
|
834
|
+
exports.resolveMemoryRoot = resolveMemoryRoot;
|
|
835
|
+
exports.resolveWeights = resolveWeights;
|
|
836
|
+
exports.sessionSummaryPath = sessionSummaryPath;
|
|
837
|
+
exports.sessionsDir = sessionsDir;
|
|
838
|
+
exports.sha256 = sha256;
|
|
839
|
+
exports.truncateSnippet = truncateSnippet;
|
|
840
|
+
exports.wikiDir = wikiDir;
|
|
841
|
+
exports.writeSessionSummary = writeSessionSummary;
|
|
842
|
+
//# sourceMappingURL=chunk-NQTNSHSB.cjs.map
|
|
843
|
+
//# sourceMappingURL=chunk-NQTNSHSB.cjs.map
|