@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,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public compaction / context-management helpers (M2-1, extended V3-3).
|
|
3
|
+
*
|
|
4
|
+
* Promotes the SDK's compaction capability to a public surface so consumers can
|
|
5
|
+
* compact a transcript, mark/filter conversation checkpoints, and detect
|
|
6
|
+
* context-overflow — without reaching into `internal/`.
|
|
7
|
+
*
|
|
8
|
+
* Two recent-window modes (V3-3):
|
|
9
|
+
* - `keepRecent` (turn-count, default) — keeps the last N turns verbatim and
|
|
10
|
+
* always preserves leading system PROMPTS; reuses the internal
|
|
11
|
+
* `selectCompressionWindow` (no second algorithm).
|
|
12
|
+
* - `keepTokens` (token-budget) — keeps the trailing turns whose accumulated
|
|
13
|
+
* `estimateTokens` fits the budget (theocode `splitTranscript` semantics). In
|
|
14
|
+
* this mode leading system prompts are NOT special-cased (D6).
|
|
15
|
+
*
|
|
16
|
+
* Summarization is delegated to a caller-supplied callback (which receives the
|
|
17
|
+
* older window + the summary template). With `failSafe`, a thrown summarizer
|
|
18
|
+
* returns the ORIGINAL transcript + a structured warn (compaction is an
|
|
19
|
+
* optimization, never a cause of data loss); without it, the error propagates.
|
|
20
|
+
*
|
|
21
|
+
* Public from the `@theokit/sdk/compaction` sub-path.
|
|
22
|
+
*/
|
|
23
|
+
import { TheokitAgentError } from "./errors.js";
|
|
24
|
+
/**
|
|
25
|
+
* Minimal message shape for compaction/compression input. THE canonical public origin (leaf type —
|
|
26
|
+
* rollup-plugin-dts cannot re-export types from internal modules into entry bundles; M42 lesson).
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export interface CompressibleMessage {
|
|
31
|
+
role: "user" | "assistant" | "system";
|
|
32
|
+
content: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Sentinel prefix marking a conversation checkpoint turn. A visible, structured,
|
|
36
|
+
* prose-unlikely token (no invisible/control bytes — safe to persist and to read
|
|
37
|
+
* in source). Only {@link buildCheckpoint} should produce content beginning with it.
|
|
38
|
+
*/
|
|
39
|
+
export declare const CHECKPOINT_MARKER = "[[theokit:checkpoint]] ";
|
|
40
|
+
/**
|
|
41
|
+
* The 7-section summary template handed to the `summarize` callback (theocode
|
|
42
|
+
* parity shape). Every header is always present so the summarizer cannot silently
|
|
43
|
+
* drop a category; the model is told to preserve file paths, commands, and error
|
|
44
|
+
* text verbatim. Override per-call via {@link CompactTranscriptOptions.summaryTemplate}.
|
|
45
|
+
*/
|
|
46
|
+
export declare const SUMMARY_TEMPLATE = "Summarize the conversation so far into these sections (keep every header even if empty):\n\n## Goal\nWhat the user is ultimately trying to achieve.\n\n## Constraints\nHard requirements, conventions, and rules stated.\n\n## Progress\nWhat has been done so far.\n\n## Decisions\nChoices made and their rationale.\n\n## Next\nThe immediate next steps.\n\n## Critical\nAnything that MUST NOT be forgotten (preserve verbatim: error messages, exact values).\n\n## Files\nFile paths touched or referenced (verbatim).";
|
|
47
|
+
/** Options for {@link compactTranscript}. */
|
|
48
|
+
export interface CompactTranscriptOptions {
|
|
49
|
+
/** Trailing turns preserved verbatim by COUNT (default 6). Ignored when `keepTokens` is set. */
|
|
50
|
+
keepRecent?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Trailing turns preserved verbatim by TOKEN BUDGET (theocode mode). When set,
|
|
53
|
+
* takes precedence over `keepRecent` and disables system-prompt preservation (D6).
|
|
54
|
+
*/
|
|
55
|
+
keepTokens?: number;
|
|
56
|
+
/** Checkpoint marker (default {@link CHECKPOINT_MARKER}). Must be non-empty. */
|
|
57
|
+
marker?: string;
|
|
58
|
+
/** Summary template passed to `summarize` (default {@link SUMMARY_TEMPLATE}). */
|
|
59
|
+
summaryTemplate?: string;
|
|
60
|
+
/** Summarize the older window into one turn; if omitted, the older window is dropped. */
|
|
61
|
+
summarize?: (older: CompressibleMessage[], template: string) => Promise<CompressibleMessage>;
|
|
62
|
+
/**
|
|
63
|
+
* When true, a thrown `summarize` returns the ORIGINAL transcript + a structured
|
|
64
|
+
* warn (compaction never loses data). Default false: the error propagates.
|
|
65
|
+
*/
|
|
66
|
+
failSafe?: boolean;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Compact a transcript. In `keepRecent` mode (default) the last `keepRecent` turns
|
|
70
|
+
* are kept verbatim and leading system PROMPTS preserved; in `keepTokens` mode the
|
|
71
|
+
* trailing turns within the token budget are kept (no system special-casing, D6).
|
|
72
|
+
* The older window is summarized (via `summarize`, receiving the template) or
|
|
73
|
+
* dropped. Never mutates the input.
|
|
74
|
+
*/
|
|
75
|
+
export declare function compactTranscript(messages: CompressibleMessage[], options?: CompactTranscriptOptions): Promise<CompressibleMessage[]>;
|
|
76
|
+
/**
|
|
77
|
+
* Build a checkpoint marker turn (a `system` turn whose content starts with
|
|
78
|
+
* `marker`, default {@link CHECKPOINT_MARKER}). `marker` must be non-empty.
|
|
79
|
+
*/
|
|
80
|
+
export declare function buildCheckpoint(label?: string, marker?: string): CompressibleMessage;
|
|
81
|
+
/** Options for {@link filterFromLatestCheckpoint}. */
|
|
82
|
+
export interface FilterCheckpointOptions {
|
|
83
|
+
/** Marker to scan for (default {@link CHECKPOINT_MARKER}). */
|
|
84
|
+
marker?: string;
|
|
85
|
+
/**
|
|
86
|
+
* `'after'` (default, M2) returns turns AFTER the latest marker (exclusive);
|
|
87
|
+
* `'from'` (theocode) returns turns FROM the latest marker (inclusive).
|
|
88
|
+
*/
|
|
89
|
+
include?: "after" | "from";
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Return the turns relative to the most recent checkpoint marker (all turns if
|
|
93
|
+
* none). `include: 'after'` (default) excludes the checkpoint; `'from'` includes
|
|
94
|
+
* it (the summary stands in for the pruned head). Never mutates the input.
|
|
95
|
+
*/
|
|
96
|
+
export declare function filterFromLatestCheckpoint(messages: CompressibleMessage[], options?: FilterCheckpointOptions): CompressibleMessage[];
|
|
97
|
+
/**
|
|
98
|
+
* True iff `err` is a {@link TheokitAgentError} (or subclass) reporting a
|
|
99
|
+
* context-window-exceeded condition (the typed `context_too_long` code). Reads
|
|
100
|
+
* both `code` (set by provider mappers) and `metadata.code` (the preferred field)
|
|
101
|
+
* — never a brittle message regex.
|
|
102
|
+
*/
|
|
103
|
+
export declare function isContextOverflowError(err: unknown): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* M77 — the margin is outside `(0, 1]`. Typed, because a margin > 1 would GROW the assumed window,
|
|
106
|
+
* which is the unsafe direction: `shouldCompact` is monotonically decreasing in `contextWindow`, so
|
|
107
|
+
* overestimating it makes the trigger fire too late and the context overflow.
|
|
108
|
+
*/
|
|
109
|
+
export declare class ContextWindowMarginError extends TheokitAgentError {
|
|
110
|
+
readonly margin: number;
|
|
111
|
+
constructor(margin: number);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* M77 — default safety margin on the context window.
|
|
115
|
+
*
|
|
116
|
+
* `0.95` is not a guess: it is the single reference's value. Codex ships
|
|
117
|
+
* `effective_context_window_percent: 95` (`models-manager/src/model_info.rs:158`) and never budgets
|
|
118
|
+
* against 100% of a window. Being MULTIPLICATIVE, it stays conservative at any window size, which a
|
|
119
|
+
* fixed subtraction would not.
|
|
120
|
+
*/
|
|
121
|
+
export declare const CONTEXT_WINDOW_MARGIN = 0.95;
|
|
122
|
+
/**
|
|
123
|
+
* M77 — the floor used ONLY when neither the catalog nor the caller knows the window.
|
|
124
|
+
*
|
|
125
|
+
* Honest about its own weakness. This number has **one** source (the M77 milestone text); the search
|
|
126
|
+
* for a second one failed, because the reference has no fallback at all — Codex returns `Option` and
|
|
127
|
+
* its callers early-return (`core/src/session/turn_context.rs:213`, `core/src/compact_remote.rs:374`).
|
|
128
|
+
*
|
|
129
|
+
* It is conservative only UPWARD. For a model whose real window is larger, budgeting against 128k
|
|
130
|
+
* compacts early — wasteful but safe. For a model whose real window is SMALLER (an 8k or 32k model
|
|
131
|
+
* absent from the catalog), it compacts too late and the context still overflows. That residual risk
|
|
132
|
+
* is real and is why {@link resolveEffectiveContextWindow} never lets this floor compete with a known
|
|
133
|
+
* catalog value, and why the `compaction_fallback` event exists: a surface can show that the budget is
|
|
134
|
+
* a guess instead of the user finding out when the provider rejects the request.
|
|
135
|
+
*/
|
|
136
|
+
export declare const CONTEXT_WINDOW_FLOOR = 128000;
|
|
137
|
+
/** Where the effective window came from — carried into the M77 structured event. */
|
|
138
|
+
export type ContextWindowSource = "override" | "catalog" | "fallback";
|
|
139
|
+
/** Input to {@link resolveEffectiveContextWindow}. */
|
|
140
|
+
export interface EffectiveContextWindowInput {
|
|
141
|
+
/** Caller-supplied window, in tokens. Clamped by `catalog` when both are present. */
|
|
142
|
+
readonly override?: number | undefined;
|
|
143
|
+
/** The model's window from the catalog, in tokens. Absent when the model is unknown. */
|
|
144
|
+
readonly catalog?: number | undefined;
|
|
145
|
+
/** Safety margin in `(0, 1]`. Codex uses 0.95 (`model_info.rs:158`). */
|
|
146
|
+
readonly margin: number;
|
|
147
|
+
/** Conservative floor used ONLY when neither `override` nor `catalog` is available. */
|
|
148
|
+
readonly floor?: number | undefined;
|
|
149
|
+
}
|
|
150
|
+
/** Result of {@link resolveEffectiveContextWindow}. */
|
|
151
|
+
export interface EffectiveContextWindow {
|
|
152
|
+
/** The window to budget against, after clamp and margin. */
|
|
153
|
+
readonly window: number;
|
|
154
|
+
/** Which input won — `"fallback"` means neither override nor catalog was available. */
|
|
155
|
+
readonly source: ContextWindowSource;
|
|
156
|
+
/** `true` when an `override` above the catalog window was clamped down to it. */
|
|
157
|
+
readonly clamped: boolean;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Absolute cap on a declared context window, applied when no catalog entry exists to compare against.
|
|
161
|
+
*
|
|
162
|
+
* **10M**, not 2M. The first version used 2M on the rationale that it sat "comfortably above the
|
|
163
|
+
* largest published window" — adversarial review measured the opposite: Llama 4 Scout publishes
|
|
164
|
+
* **10M**, and it arrives precisely via OpenRouter, the provider **without** a catalog, which is the
|
|
165
|
+
* case this cap exists to cover. The user would have silently lost 80% of the declared window.
|
|
166
|
+
*
|
|
167
|
+
* The cap still serves what motivates it — one extra zero on 400k gives 4M, which passes; two zeros
|
|
168
|
+
* give 40M, which does not. A limit that rejects legitimate configuration is worse than no limit,
|
|
169
|
+
* because failing OPEN is visible when it happens and silently losing 80% is not.
|
|
170
|
+
*/
|
|
171
|
+
export declare const ABSOLUTE_CONTEXT_WINDOW_CAP = 10000000;
|
|
172
|
+
/**
|
|
173
|
+
* Resolve the window to budget against — the fail-SAFE replacement for reading the catalog directly.
|
|
174
|
+
*
|
|
175
|
+
* Today `post-run-lifecycle.ts` reads `getCatalogModelInfo(model)?.limit?.context` and, when that is
|
|
176
|
+
* `undefined`, auto-compaction simply never fires. That is fail-OPEN: the context grows until the
|
|
177
|
+
* provider rejects the request. (The comment there calls it "fail-safe" — M77 corrects it.)
|
|
178
|
+
*
|
|
179
|
+
* Three techniques, two of them borrowed from the single reference:
|
|
180
|
+
*
|
|
181
|
+
* 1. **Override, CLAMPED by the catalog** — Codex `models-manager/src/model_info.rs:26-31` lets
|
|
182
|
+
* config override the window but limits it with `context_window.min(max_context_window)`.
|
|
183
|
+
* Without the clamp, declaring 999k on a 200k model reopens the overflow through another door.
|
|
184
|
+
* 2. **Multiplicative margin** — Codex `model_info.rs:158` (`effective_context_window_percent: 95`)
|
|
185
|
+
* never budgets against 100% of the window. Being multiplicative, it is conservative for ANY
|
|
186
|
+
* window size.
|
|
187
|
+
* 3. **Floor, only when nothing is known** — deliberately NOT a blanket default. A fixed floor is
|
|
188
|
+
* conservative only upward: applied to a small model it would inflate the assumed window and
|
|
189
|
+
* reproduce the very fail-open this function exists to close. Hence the floor never competes
|
|
190
|
+
* with a known catalog value.
|
|
191
|
+
*
|
|
192
|
+
* Pure — no catalog lookup, no I/O. The caller supplies the numbers, mirroring `shouldCompact`.
|
|
193
|
+
*/
|
|
194
|
+
export declare function resolveEffectiveContextWindow(input: EffectiveContextWindowInput): EffectiveContextWindow;
|
|
195
|
+
/** Input to {@link shouldCompact}: an estimate, the model's window, and reserved headroom. */
|
|
196
|
+
export interface ShouldCompactInput {
|
|
197
|
+
/** Estimated token count of the next request (e.g. from {@link estimateTokens}). */
|
|
198
|
+
readonly estimated: number;
|
|
199
|
+
/** The model's total context window, in tokens. */
|
|
200
|
+
readonly contextWindow: number;
|
|
201
|
+
/** Tokens to reserve as headroom (output + safety margin). */
|
|
202
|
+
readonly buffer: number;
|
|
203
|
+
/**
|
|
204
|
+
* Tokens reserved for the model's response generation, SEPARATE from `buffer`.
|
|
205
|
+
* Default 0 — omitting it preserves the legacy
|
|
206
|
+
* `estimated >= contextWindow - buffer` result.
|
|
207
|
+
*/
|
|
208
|
+
readonly maxOutput?: number;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Characters per token in the tokenizer-free estimate below.
|
|
212
|
+
*
|
|
213
|
+
* Exported so the ratio has ONE owner. It used to be a named constant in `built-in-processors.ts`
|
|
214
|
+
* and an inlined `4` here, with both `estimateTokens` functions `@public` from two different package
|
|
215
|
+
* entry points — so tuning the ratio, or switching to code points instead of UTF-16 units (the
|
|
216
|
+
* caveat both docblocks already carried), would have silently diverged them.
|
|
217
|
+
*
|
|
218
|
+
* @public
|
|
219
|
+
*/
|
|
220
|
+
export declare const CHARS_PER_TOKEN = 4;
|
|
221
|
+
/**
|
|
222
|
+
* Tokenizer-free token estimate via the conventional ~4-chars-per-token
|
|
223
|
+
* heuristic: `ceil(text.length / CHARS_PER_TOKEN)`. `""` → 0; any non-empty text → ≥ 1.
|
|
224
|
+
* A cheap PRE-CALL gate for {@link shouldCompact} — NOT exact tokenization
|
|
225
|
+
* (a consumer needing exactness supplies their own tokenizer). Uses UTF-16
|
|
226
|
+
* `.length` (code units), so multibyte text is approximate.
|
|
227
|
+
*
|
|
228
|
+
* `built-in-processors.ts` re-exports this under the same name, so both entry points keep working
|
|
229
|
+
* and there is one implementation behind them.
|
|
230
|
+
*/
|
|
231
|
+
export declare function estimateTokens(text: string): number;
|
|
232
|
+
/**
|
|
233
|
+
* Decide BEFORE sending whether to compact: `true` when the `estimated` token
|
|
234
|
+
* count leaves less than `buffer` headroom in the `contextWindow`
|
|
235
|
+
* (`estimated >= contextWindow - buffer`). A `buffer >= contextWindow`
|
|
236
|
+
* (non-positive threshold) always returns `true`. Pure — the caller supplies
|
|
237
|
+
* the window (e.g. from `resolveModelCapabilities`), keeping this decoupled
|
|
238
|
+
* from the per-model catalog.
|
|
239
|
+
*/
|
|
240
|
+
export declare function shouldCompact(input: ShouldCompactInput): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ABSOLUTE_CONTEXT_WINDOW_CAP, CHARS_PER_TOKEN, CHECKPOINT_MARKER, CONTEXT_WINDOW_FLOOR, CONTEXT_WINDOW_MARGIN, ContextWindowMarginError, SUMMARY_TEMPLATE, buildCheckpoint, compactTranscript, estimateTokens, filterFromLatestCheckpoint, isContextOverflowError, resolveEffectiveContextWindow, shouldCompact } from './chunk-6M2OIS4Y.js';
|
|
2
|
+
import './chunk-ALUN2B4W.js';
|
|
3
|
+
import './chunk-CZJ6Q7CW.js';
|
|
4
|
+
//# sourceMappingURL=compaction.js.map
|
|
5
|
+
//# sourceMappingURL=compaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"compaction.js"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkI2PWY7VM_cjs = require('./chunk-I2PWY7VM.cjs');
|
|
4
|
+
var chunkKTTHHYEW_cjs = require('./chunk-KTTHHYEW.cjs');
|
|
5
|
+
require('./chunk-J7J7J2GN.cjs');
|
|
6
|
+
require('./chunk-6LHQPOMI.cjs');
|
|
7
|
+
|
|
8
|
+
// src/concurrency.ts
|
|
9
|
+
var Semaphore = class {
|
|
10
|
+
constructor() {
|
|
11
|
+
}
|
|
12
|
+
static create(permits) {
|
|
13
|
+
return chunkKTTHHYEW_cjs.createSemaphore(permits);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
Object.defineProperty(exports, "mapWithConcurrency", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkI2PWY7VM_cjs.mapWithConcurrency; }
|
|
20
|
+
});
|
|
21
|
+
exports.Semaphore = Semaphore;
|
|
22
|
+
//# sourceMappingURL=concurrency.cjs.map
|
|
23
|
+
//# sourceMappingURL=concurrency.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/concurrency.ts"],"names":["createSemaphore"],"mappings":";;;;;;;;AAoBO,IAAM,YAAN,MAAgB;AAAA,EACb,WAAA,GAAc;AAAA,EAAC;AAAA,EACvB,OAAO,OAAO,OAAA,EAAiC;AAC7C,IAAA,OAAOA,kCAAgB,OAAO,CAAA;AAAA,EAChC;AACF","file":"concurrency.cjs","sourcesContent":["/**\n * Public concurrency primitives (plan m0-foundation-expose-primitives, M0-2).\n *\n * Thin re-export of the in-house concurrency helpers (ADR D135 — no\n * `p-limit`/`p-map` dependency). Split into its own top-level module so\n * `tsup` builds a dedicated `@theokit/sdk/concurrency` sub-path entry,\n * mirroring the `path-safety` pattern.\n *\n * - `createSemaphore(permits)` — N-permit async-aware counting semaphore.\n * - `mapWithConcurrency(items, concurrency, fn, opts?)` — ordered bounded map.\n */\n\nimport { type AsyncSemaphore, createSemaphore } from \"./internal/concurrency/async-semaphore.js\";\n\nexport type { AsyncSemaphore };\n\n/** SE36 — `Semaphore.create` replaces `createSemaphore` (ADR 0015). @public *\n * `Semaphore.create` returns an **`AsyncSemaphore`** — the class is the namespace and\n * `AsyncSemaphore` is the type callers hold.\n */\nexport class Semaphore {\n private constructor() {}\n static create(permits: number): AsyncSemaphore {\n return createSemaphore(permits);\n }\n}\nexport { mapWithConcurrency } from \"./internal/concurrency/map-with-concurrency.js\";\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public concurrency primitives (plan m0-foundation-expose-primitives, M0-2).
|
|
3
|
+
*
|
|
4
|
+
* Thin re-export of the in-house concurrency helpers (ADR D135 — no
|
|
5
|
+
* `p-limit`/`p-map` dependency). Split into its own top-level module so
|
|
6
|
+
* `tsup` builds a dedicated `@theokit/sdk/concurrency` sub-path entry,
|
|
7
|
+
* mirroring the `path-safety` pattern.
|
|
8
|
+
*
|
|
9
|
+
* - `createSemaphore(permits)` — N-permit async-aware counting semaphore.
|
|
10
|
+
* - `mapWithConcurrency(items, concurrency, fn, opts?)` — ordered bounded map.
|
|
11
|
+
*/
|
|
12
|
+
import { type AsyncSemaphore } from "./internal/concurrency/async-semaphore.js";
|
|
13
|
+
export type { AsyncSemaphore };
|
|
14
|
+
/** SE36 — `Semaphore.create` replaces `createSemaphore` (ADR 0015). @public *
|
|
15
|
+
* `Semaphore.create` returns an **`AsyncSemaphore`** — the class is the namespace and
|
|
16
|
+
* `AsyncSemaphore` is the type callers hold.
|
|
17
|
+
*/
|
|
18
|
+
export declare class Semaphore {
|
|
19
|
+
private constructor();
|
|
20
|
+
static create(permits: number): AsyncSemaphore;
|
|
21
|
+
}
|
|
22
|
+
export { mapWithConcurrency } from "./internal/concurrency/map-with-concurrency.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public concurrency primitives (plan m0-foundation-expose-primitives, M0-2).
|
|
3
|
+
*
|
|
4
|
+
* Thin re-export of the in-house concurrency helpers (ADR D135 — no
|
|
5
|
+
* `p-limit`/`p-map` dependency). Split into its own top-level module so
|
|
6
|
+
* `tsup` builds a dedicated `@theokit/sdk/concurrency` sub-path entry,
|
|
7
|
+
* mirroring the `path-safety` pattern.
|
|
8
|
+
*
|
|
9
|
+
* - `createSemaphore(permits)` — N-permit async-aware counting semaphore.
|
|
10
|
+
* - `mapWithConcurrency(items, concurrency, fn, opts?)` — ordered bounded map.
|
|
11
|
+
*/
|
|
12
|
+
import { type AsyncSemaphore } from "./internal/concurrency/async-semaphore.js";
|
|
13
|
+
export type { AsyncSemaphore };
|
|
14
|
+
/** SE36 — `Semaphore.create` replaces `createSemaphore` (ADR 0015). @public *
|
|
15
|
+
* `Semaphore.create` returns an **`AsyncSemaphore`** — the class is the namespace and
|
|
16
|
+
* `AsyncSemaphore` is the type callers hold.
|
|
17
|
+
*/
|
|
18
|
+
export declare class Semaphore {
|
|
19
|
+
private constructor();
|
|
20
|
+
static create(permits: number): AsyncSemaphore;
|
|
21
|
+
}
|
|
22
|
+
export { mapWithConcurrency } from "./internal/concurrency/map-with-concurrency.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { mapWithConcurrency } from './chunk-4MMWFSCD.js';
|
|
2
|
+
import { createSemaphore } from './chunk-G7BLGBRN.js';
|
|
3
|
+
import './chunk-ALUN2B4W.js';
|
|
4
|
+
import './chunk-CZJ6Q7CW.js';
|
|
5
|
+
|
|
6
|
+
// src/concurrency.ts
|
|
7
|
+
var Semaphore = class {
|
|
8
|
+
constructor() {
|
|
9
|
+
}
|
|
10
|
+
static create(permits) {
|
|
11
|
+
return createSemaphore(permits);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { Semaphore };
|
|
16
|
+
//# sourceMappingURL=concurrency.js.map
|
|
17
|
+
//# sourceMappingURL=concurrency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/concurrency.ts"],"names":[],"mappings":";;;;;;AAoBO,IAAM,YAAN,MAAgB;AAAA,EACb,WAAA,GAAc;AAAA,EAAC;AAAA,EACvB,OAAO,OAAO,OAAA,EAAiC;AAC7C,IAAA,OAAO,gBAAgB,OAAO,CAAA;AAAA,EAChC;AACF","file":"concurrency.js","sourcesContent":["/**\n * Public concurrency primitives (plan m0-foundation-expose-primitives, M0-2).\n *\n * Thin re-export of the in-house concurrency helpers (ADR D135 — no\n * `p-limit`/`p-map` dependency). Split into its own top-level module so\n * `tsup` builds a dedicated `@theokit/sdk/concurrency` sub-path entry,\n * mirroring the `path-safety` pattern.\n *\n * - `createSemaphore(permits)` — N-permit async-aware counting semaphore.\n * - `mapWithConcurrency(items, concurrency, fn, opts?)` — ordered bounded map.\n */\n\nimport { type AsyncSemaphore, createSemaphore } from \"./internal/concurrency/async-semaphore.js\";\n\nexport type { AsyncSemaphore };\n\n/** SE36 — `Semaphore.create` replaces `createSemaphore` (ADR 0015). @public *\n * `Semaphore.create` returns an **`AsyncSemaphore`** — the class is the namespace and\n * `AsyncSemaphore` is the type callers hold.\n */\nexport class Semaphore {\n private constructor() {}\n static create(permits: number): AsyncSemaphore {\n return createSemaphore(permits);\n }\n}\nexport { mapWithConcurrency } from \"./internal/concurrency/map-with-concurrency.js\";\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkIU5N5224_cjs = require('../chunk-IU5N5224.cjs');
|
|
4
|
+
require('../chunk-KRD3GQAA.cjs');
|
|
5
|
+
var chunkLOHMT36V_cjs = require('../chunk-LOHMT36V.cjs');
|
|
6
|
+
require('../chunk-SA6K24NB.cjs');
|
|
7
|
+
|
|
8
|
+
// src/context/index.ts
|
|
9
|
+
function resolveContextImports(content, basePath, options) {
|
|
10
|
+
const internalOptions = {
|
|
11
|
+
visited: options.visited ?? /* @__PURE__ */ new Set(),
|
|
12
|
+
depth: options.depth ?? 0,
|
|
13
|
+
maxBytesPerFile: options.maxBytesPerFile,
|
|
14
|
+
projectRoot: options.projectRoot
|
|
15
|
+
};
|
|
16
|
+
return chunkIU5N5224_cjs.resolveImports(content, basePath, internalOptions);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
Object.defineProperty(exports, "parseRules", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkIU5N5224_cjs.parseRules; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "runDiscovery", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkIU5N5224_cjs.runDiscovery; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "shouldActivateRule", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkIU5N5224_cjs.shouldActivateRule; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "DEFAULT_DISCOVERY_SPECS", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkLOHMT36V_cjs.DEFAULT_DISCOVERY_SPECS; }
|
|
34
|
+
});
|
|
35
|
+
exports.resolveContextImports = resolveContextImports;
|
|
36
|
+
//# sourceMappingURL=index.cjs.map
|
|
37
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/context/index.ts"],"names":["resolveImports"],"mappings":";;;;;;;;AA+FO,SAAS,qBAAA,CACd,OAAA,EACA,QAAA,EACA,OAAA,EACiB;AACjB,EAAA,MAAM,eAAA,GAAyC;AAAA,IAC7C,OAAA,EAAS,OAAA,CAAQ,OAAA,oBAAW,IAAI,GAAA,EAAY;AAAA,IAC5C,KAAA,EAAO,QAAQ,KAAA,IAAS,CAAA;AAAA,IACxB,iBAAiB,OAAA,CAAQ,eAAA;AAAA,IACzB,aAAa,OAAA,CAAQ;AAAA,GACvB;AACA,EAAA,OAAOA,gCAAA,CAAuB,OAAA,EAAS,QAAA,EAAU,eAAe,CAAA;AAClE","file":"index.cjs","sourcesContent":["/**\n * `@theokit/sdk/context` — context assembly, as a SANCTIONED PUBLIC surface.\n *\n * Everything re-exported here is under semver. That is the whole difference from the\n * `internal/*` subpaths (`internal/persistence`, `internal/security`, `internal/memory-adapters`),\n * which the package documents as \"internal API — semver-exempt\" and is retiring:\n * `internal/persistence` is `@deprecated` in favour of the sanctioned `@theokit/sdk/persistence`,\n * and `internal/plugins` + `internal/observability` were deleted as dead public surface in July.\n *\n * **The list is explicit and there is no `export *`.** The tree behind it holds 13 files, including\n * YAML shims and parser internals a consumer never needs. Publishing the directory would commit\n * this package to every file in it; widening this list is a deliberate act.\n *\n * @public\n */\n\nimport {\n type ResolveImportsOptions,\n resolveImports as resolveImportsInternal,\n} from \"../internal/runtime/context/context-import-resolver.js\";\n\nexport type {\n DiscoveryParser,\n DiscoveryScope,\n DiscoverySpec,\n} from \"../internal/runtime/context/context-discovery.js\";\n/**\n * The seven conventions {@link runDiscovery} looks for when `specs` is omitted — `AGENTS.md`,\n * `GEMINI.md`, `CLAUDE.md`, `.cursor/rules/*.mdc`, `.theokit/rules/*.md`, `.theokit/context/*.md`\n * and `.theokit/THEO.md`.\n *\n * Exported because `specs` REPLACES this list rather than extending it. Without the constant, a\n * consumer registering one convention of its own silently loses every built-in one, and the loss is\n * invisible — discovery simply returns fewer sources. Spread it to extend:\n *\n * ```ts\n * await runDiscovery({ cwd, maxBytesPerFile, specs: [...DEFAULT_DISCOVERY_SPECS, mySpec] });\n * ```\n *\n * @public\n */\nexport { DEFAULT_DISCOVERY_SPECS } from \"../internal/runtime/context/context-discovery.js\";\nexport {\n type DiscoveryRunnerOptions,\n runDiscovery,\n} from \"../internal/runtime/context/context-discovery-runner.js\";\nexport {\n parseRules,\n shouldActivateRule,\n} from \"../internal/runtime/context/context-rules-frontmatter.js\";\n\n/**\n * Options for {@link resolveContextImports}.\n *\n * `projectRoot` is REQUIRED here and OPTIONAL on the internal `resolveImports`, and the asymmetry\n * is the point rather than an oversight.\n *\n * Internally the field has to be optional: it was added in 4.41.1 to close a defect where a\n * repository-supplied `CLAUDE.md` could name `@~/.ssh/id_rsa` and have that file inlined into the\n * agent's system prompt, and making it required would have broken every caller that predates it.\n *\n * As a PUBLIC contract the same optionality inverts into a trap. The obvious call omits the field,\n * compiles, and silently restores the un-contained behaviour — so the easiest way to use the API\n * would be the unsafe one, published under semver and therefore unfixable without a breaking\n * change. Requiring it makes the safe call the only call.\n *\n * @public\n */\nexport interface ResolveContextImportsOptions {\n /**\n * The directory an `@import` may not escape, compared after symlink resolution.\n *\n * A document carrying imports is repository-controlled — untrusted input whenever the repository\n * came from somewhere else — so the boundary is not optional.\n */\n readonly projectRoot: string;\n /** Per-import file cap, forwarded to the loader. */\n readonly maxBytesPerFile: number;\n /** Absolute paths already resolved, for cycle detection. Defaults to an empty set. */\n readonly visited?: Set<string>;\n /** Current recursion depth. Defaults to 0; the resolver caps at 5 hops. */\n readonly depth?: number;\n}\n\n/**\n * Expand `@path` import directives in `content`, confined to `options.projectRoot`.\n *\n * A line that is exactly `@some/path` is replaced with that file's content, recursively, with cycle\n * detection and a 5-hop cap. A target resolving outside the root — by `..`, by an absolute path, by\n * `~/`, or through a symlink — is replaced with a refusal placeholder rather than its bytes, and the\n * placeholder echoes the path as the author wrote it rather than as resolved, so a refusal does not\n * leak the layout of the machine back into the same untrusted document.\n *\n * @public\n */\nexport function resolveContextImports(\n content: string,\n basePath: string,\n options: ResolveContextImportsOptions,\n): Promise<string> {\n const internalOptions: ResolveImportsOptions = {\n visited: options.visited ?? new Set<string>(),\n depth: options.depth ?? 0,\n maxBytesPerFile: options.maxBytesPerFile,\n projectRoot: options.projectRoot,\n };\n return resolveImportsInternal(content, basePath, internalOptions);\n}\n"]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@theokit/sdk/context` — context assembly, as a SANCTIONED PUBLIC surface.
|
|
3
|
+
*
|
|
4
|
+
* Everything re-exported here is under semver. That is the whole difference from the
|
|
5
|
+
* `internal/*` subpaths (`internal/persistence`, `internal/security`, `internal/memory-adapters`),
|
|
6
|
+
* which the package documents as "internal API — semver-exempt" and is retiring:
|
|
7
|
+
* `internal/persistence` is `@deprecated` in favour of the sanctioned `@theokit/sdk/persistence`,
|
|
8
|
+
* and `internal/plugins` + `internal/observability` were deleted as dead public surface in July.
|
|
9
|
+
*
|
|
10
|
+
* **The list is explicit and there is no `export *`.** The tree behind it holds 13 files, including
|
|
11
|
+
* YAML shims and parser internals a consumer never needs. Publishing the directory would commit
|
|
12
|
+
* this package to every file in it; widening this list is a deliberate act.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export type { DiscoveryParser, DiscoveryScope, DiscoverySpec, } from "../internal/runtime/context/context-discovery.js";
|
|
17
|
+
/**
|
|
18
|
+
* The seven conventions {@link runDiscovery} looks for when `specs` is omitted — `AGENTS.md`,
|
|
19
|
+
* `GEMINI.md`, `CLAUDE.md`, `.cursor/rules/*.mdc`, `.theokit/rules/*.md`, `.theokit/context/*.md`
|
|
20
|
+
* and `.theokit/THEO.md`.
|
|
21
|
+
*
|
|
22
|
+
* Exported because `specs` REPLACES this list rather than extending it. Without the constant, a
|
|
23
|
+
* consumer registering one convention of its own silently loses every built-in one, and the loss is
|
|
24
|
+
* invisible — discovery simply returns fewer sources. Spread it to extend:
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* await runDiscovery({ cwd, maxBytesPerFile, specs: [...DEFAULT_DISCOVERY_SPECS, mySpec] });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export { DEFAULT_DISCOVERY_SPECS } from "../internal/runtime/context/context-discovery.js";
|
|
33
|
+
export { type DiscoveryRunnerOptions, runDiscovery, } from "../internal/runtime/context/context-discovery-runner.js";
|
|
34
|
+
export { parseRules, shouldActivateRule, } from "../internal/runtime/context/context-rules-frontmatter.js";
|
|
35
|
+
/**
|
|
36
|
+
* Options for {@link resolveContextImports}.
|
|
37
|
+
*
|
|
38
|
+
* `projectRoot` is REQUIRED here and OPTIONAL on the internal `resolveImports`, and the asymmetry
|
|
39
|
+
* is the point rather than an oversight.
|
|
40
|
+
*
|
|
41
|
+
* Internally the field has to be optional: it was added in 4.41.1 to close a defect where a
|
|
42
|
+
* repository-supplied `CLAUDE.md` could name `@~/.ssh/id_rsa` and have that file inlined into the
|
|
43
|
+
* agent's system prompt, and making it required would have broken every caller that predates it.
|
|
44
|
+
*
|
|
45
|
+
* As a PUBLIC contract the same optionality inverts into a trap. The obvious call omits the field,
|
|
46
|
+
* compiles, and silently restores the un-contained behaviour — so the easiest way to use the API
|
|
47
|
+
* would be the unsafe one, published under semver and therefore unfixable without a breaking
|
|
48
|
+
* change. Requiring it makes the safe call the only call.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export interface ResolveContextImportsOptions {
|
|
53
|
+
/**
|
|
54
|
+
* The directory an `@import` may not escape, compared after symlink resolution.
|
|
55
|
+
*
|
|
56
|
+
* A document carrying imports is repository-controlled — untrusted input whenever the repository
|
|
57
|
+
* came from somewhere else — so the boundary is not optional.
|
|
58
|
+
*/
|
|
59
|
+
readonly projectRoot: string;
|
|
60
|
+
/** Per-import file cap, forwarded to the loader. */
|
|
61
|
+
readonly maxBytesPerFile: number;
|
|
62
|
+
/** Absolute paths already resolved, for cycle detection. Defaults to an empty set. */
|
|
63
|
+
readonly visited?: Set<string>;
|
|
64
|
+
/** Current recursion depth. Defaults to 0; the resolver caps at 5 hops. */
|
|
65
|
+
readonly depth?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Expand `@path` import directives in `content`, confined to `options.projectRoot`.
|
|
69
|
+
*
|
|
70
|
+
* A line that is exactly `@some/path` is replaced with that file's content, recursively, with cycle
|
|
71
|
+
* detection and a 5-hop cap. A target resolving outside the root — by `..`, by an absolute path, by
|
|
72
|
+
* `~/`, or through a symlink — is replaced with a refusal placeholder rather than its bytes, and the
|
|
73
|
+
* placeholder echoes the path as the author wrote it rather than as resolved, so a refusal does not
|
|
74
|
+
* leak the layout of the machine back into the same untrusted document.
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveContextImports(content: string, basePath: string, options: ResolveContextImportsOptions): Promise<string>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@theokit/sdk/context` — context assembly, as a SANCTIONED PUBLIC surface.
|
|
3
|
+
*
|
|
4
|
+
* Everything re-exported here is under semver. That is the whole difference from the
|
|
5
|
+
* `internal/*` subpaths (`internal/persistence`, `internal/security`, `internal/memory-adapters`),
|
|
6
|
+
* which the package documents as "internal API — semver-exempt" and is retiring:
|
|
7
|
+
* `internal/persistence` is `@deprecated` in favour of the sanctioned `@theokit/sdk/persistence`,
|
|
8
|
+
* and `internal/plugins` + `internal/observability` were deleted as dead public surface in July.
|
|
9
|
+
*
|
|
10
|
+
* **The list is explicit and there is no `export *`.** The tree behind it holds 13 files, including
|
|
11
|
+
* YAML shims and parser internals a consumer never needs. Publishing the directory would commit
|
|
12
|
+
* this package to every file in it; widening this list is a deliberate act.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export type { DiscoveryParser, DiscoveryScope, DiscoverySpec, } from "../internal/runtime/context/context-discovery.js";
|
|
17
|
+
/**
|
|
18
|
+
* The seven conventions {@link runDiscovery} looks for when `specs` is omitted — `AGENTS.md`,
|
|
19
|
+
* `GEMINI.md`, `CLAUDE.md`, `.cursor/rules/*.mdc`, `.theokit/rules/*.md`, `.theokit/context/*.md`
|
|
20
|
+
* and `.theokit/THEO.md`.
|
|
21
|
+
*
|
|
22
|
+
* Exported because `specs` REPLACES this list rather than extending it. Without the constant, a
|
|
23
|
+
* consumer registering one convention of its own silently loses every built-in one, and the loss is
|
|
24
|
+
* invisible — discovery simply returns fewer sources. Spread it to extend:
|
|
25
|
+
*
|
|
26
|
+
* ```ts
|
|
27
|
+
* await runDiscovery({ cwd, maxBytesPerFile, specs: [...DEFAULT_DISCOVERY_SPECS, mySpec] });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export { DEFAULT_DISCOVERY_SPECS } from "../internal/runtime/context/context-discovery.js";
|
|
33
|
+
export { type DiscoveryRunnerOptions, runDiscovery, } from "../internal/runtime/context/context-discovery-runner.js";
|
|
34
|
+
export { parseRules, shouldActivateRule, } from "../internal/runtime/context/context-rules-frontmatter.js";
|
|
35
|
+
/**
|
|
36
|
+
* Options for {@link resolveContextImports}.
|
|
37
|
+
*
|
|
38
|
+
* `projectRoot` is REQUIRED here and OPTIONAL on the internal `resolveImports`, and the asymmetry
|
|
39
|
+
* is the point rather than an oversight.
|
|
40
|
+
*
|
|
41
|
+
* Internally the field has to be optional: it was added in 4.41.1 to close a defect where a
|
|
42
|
+
* repository-supplied `CLAUDE.md` could name `@~/.ssh/id_rsa` and have that file inlined into the
|
|
43
|
+
* agent's system prompt, and making it required would have broken every caller that predates it.
|
|
44
|
+
*
|
|
45
|
+
* As a PUBLIC contract the same optionality inverts into a trap. The obvious call omits the field,
|
|
46
|
+
* compiles, and silently restores the un-contained behaviour — so the easiest way to use the API
|
|
47
|
+
* would be the unsafe one, published under semver and therefore unfixable without a breaking
|
|
48
|
+
* change. Requiring it makes the safe call the only call.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export interface ResolveContextImportsOptions {
|
|
53
|
+
/**
|
|
54
|
+
* The directory an `@import` may not escape, compared after symlink resolution.
|
|
55
|
+
*
|
|
56
|
+
* A document carrying imports is repository-controlled — untrusted input whenever the repository
|
|
57
|
+
* came from somewhere else — so the boundary is not optional.
|
|
58
|
+
*/
|
|
59
|
+
readonly projectRoot: string;
|
|
60
|
+
/** Per-import file cap, forwarded to the loader. */
|
|
61
|
+
readonly maxBytesPerFile: number;
|
|
62
|
+
/** Absolute paths already resolved, for cycle detection. Defaults to an empty set. */
|
|
63
|
+
readonly visited?: Set<string>;
|
|
64
|
+
/** Current recursion depth. Defaults to 0; the resolver caps at 5 hops. */
|
|
65
|
+
readonly depth?: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Expand `@path` import directives in `content`, confined to `options.projectRoot`.
|
|
69
|
+
*
|
|
70
|
+
* A line that is exactly `@some/path` is replaced with that file's content, recursively, with cycle
|
|
71
|
+
* detection and a 5-hop cap. A target resolving outside the root — by `..`, by an absolute path, by
|
|
72
|
+
* `~/`, or through a symlink — is replaced with a refusal placeholder rather than its bytes, and the
|
|
73
|
+
* placeholder echoes the path as the author wrote it rather than as resolved, so a refusal does not
|
|
74
|
+
* leak the layout of the machine back into the same untrusted document.
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
export declare function resolveContextImports(content: string, basePath: string, options: ResolveContextImportsOptions): Promise<string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { resolveImports } from '../chunk-N6OOOYFZ.js';
|
|
2
|
+
export { parseRules, runDiscovery, shouldActivateRule } from '../chunk-N6OOOYFZ.js';
|
|
3
|
+
import '../chunk-KVNWIAO4.js';
|
|
4
|
+
export { DEFAULT_DISCOVERY_SPECS } from '../chunk-2XRAWOZZ.js';
|
|
5
|
+
import '../chunk-UKMBRMGT.js';
|
|
6
|
+
|
|
7
|
+
// src/context/index.ts
|
|
8
|
+
function resolveContextImports(content, basePath, options) {
|
|
9
|
+
const internalOptions = {
|
|
10
|
+
visited: options.visited ?? /* @__PURE__ */ new Set(),
|
|
11
|
+
depth: options.depth ?? 0,
|
|
12
|
+
maxBytesPerFile: options.maxBytesPerFile,
|
|
13
|
+
projectRoot: options.projectRoot
|
|
14
|
+
};
|
|
15
|
+
return resolveImports(content, basePath, internalOptions);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { resolveContextImports };
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/context/index.ts"],"names":[],"mappings":";;;;;;;AA+FO,SAAS,qBAAA,CACd,OAAA,EACA,QAAA,EACA,OAAA,EACiB;AACjB,EAAA,MAAM,eAAA,GAAyC;AAAA,IAC7C,OAAA,EAAS,OAAA,CAAQ,OAAA,oBAAW,IAAI,GAAA,EAAY;AAAA,IAC5C,KAAA,EAAO,QAAQ,KAAA,IAAS,CAAA;AAAA,IACxB,iBAAiB,OAAA,CAAQ,eAAA;AAAA,IACzB,aAAa,OAAA,CAAQ;AAAA,GACvB;AACA,EAAA,OAAO,cAAA,CAAuB,OAAA,EAAS,QAAA,EAAU,eAAe,CAAA;AAClE","file":"index.js","sourcesContent":["/**\n * `@theokit/sdk/context` — context assembly, as a SANCTIONED PUBLIC surface.\n *\n * Everything re-exported here is under semver. That is the whole difference from the\n * `internal/*` subpaths (`internal/persistence`, `internal/security`, `internal/memory-adapters`),\n * which the package documents as \"internal API — semver-exempt\" and is retiring:\n * `internal/persistence` is `@deprecated` in favour of the sanctioned `@theokit/sdk/persistence`,\n * and `internal/plugins` + `internal/observability` were deleted as dead public surface in July.\n *\n * **The list is explicit and there is no `export *`.** The tree behind it holds 13 files, including\n * YAML shims and parser internals a consumer never needs. Publishing the directory would commit\n * this package to every file in it; widening this list is a deliberate act.\n *\n * @public\n */\n\nimport {\n type ResolveImportsOptions,\n resolveImports as resolveImportsInternal,\n} from \"../internal/runtime/context/context-import-resolver.js\";\n\nexport type {\n DiscoveryParser,\n DiscoveryScope,\n DiscoverySpec,\n} from \"../internal/runtime/context/context-discovery.js\";\n/**\n * The seven conventions {@link runDiscovery} looks for when `specs` is omitted — `AGENTS.md`,\n * `GEMINI.md`, `CLAUDE.md`, `.cursor/rules/*.mdc`, `.theokit/rules/*.md`, `.theokit/context/*.md`\n * and `.theokit/THEO.md`.\n *\n * Exported because `specs` REPLACES this list rather than extending it. Without the constant, a\n * consumer registering one convention of its own silently loses every built-in one, and the loss is\n * invisible — discovery simply returns fewer sources. Spread it to extend:\n *\n * ```ts\n * await runDiscovery({ cwd, maxBytesPerFile, specs: [...DEFAULT_DISCOVERY_SPECS, mySpec] });\n * ```\n *\n * @public\n */\nexport { DEFAULT_DISCOVERY_SPECS } from \"../internal/runtime/context/context-discovery.js\";\nexport {\n type DiscoveryRunnerOptions,\n runDiscovery,\n} from \"../internal/runtime/context/context-discovery-runner.js\";\nexport {\n parseRules,\n shouldActivateRule,\n} from \"../internal/runtime/context/context-rules-frontmatter.js\";\n\n/**\n * Options for {@link resolveContextImports}.\n *\n * `projectRoot` is REQUIRED here and OPTIONAL on the internal `resolveImports`, and the asymmetry\n * is the point rather than an oversight.\n *\n * Internally the field has to be optional: it was added in 4.41.1 to close a defect where a\n * repository-supplied `CLAUDE.md` could name `@~/.ssh/id_rsa` and have that file inlined into the\n * agent's system prompt, and making it required would have broken every caller that predates it.\n *\n * As a PUBLIC contract the same optionality inverts into a trap. The obvious call omits the field,\n * compiles, and silently restores the un-contained behaviour — so the easiest way to use the API\n * would be the unsafe one, published under semver and therefore unfixable without a breaking\n * change. Requiring it makes the safe call the only call.\n *\n * @public\n */\nexport interface ResolveContextImportsOptions {\n /**\n * The directory an `@import` may not escape, compared after symlink resolution.\n *\n * A document carrying imports is repository-controlled — untrusted input whenever the repository\n * came from somewhere else — so the boundary is not optional.\n */\n readonly projectRoot: string;\n /** Per-import file cap, forwarded to the loader. */\n readonly maxBytesPerFile: number;\n /** Absolute paths already resolved, for cycle detection. Defaults to an empty set. */\n readonly visited?: Set<string>;\n /** Current recursion depth. Defaults to 0; the resolver caps at 5 hops. */\n readonly depth?: number;\n}\n\n/**\n * Expand `@path` import directives in `content`, confined to `options.projectRoot`.\n *\n * A line that is exactly `@some/path` is replaced with that file's content, recursively, with cycle\n * detection and a 5-hop cap. A target resolving outside the root — by `..`, by an absolute path, by\n * `~/`, or through a symlink — is replaced with a refusal placeholder rather than its bytes, and the\n * placeholder echoes the path as the author wrote it rather than as resolved, so a refusal does not\n * leak the layout of the machine back into the same untrusted document.\n *\n * @public\n */\nexport function resolveContextImports(\n content: string,\n basePath: string,\n options: ResolveContextImportsOptions,\n): Promise<string> {\n const internalOptions: ResolveImportsOptions = {\n visited: options.visited ?? new Set<string>(),\n depth: options.depth ?? 0,\n maxBytesPerFile: options.maxBytesPerFile,\n projectRoot: options.projectRoot,\n };\n return resolveImportsInternal(content, basePath, internalOptions);\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkKGANQYP7_cjs = require('./chunk-KGANQYP7.cjs');
|
|
4
|
+
require('./chunk-NYQ3IS7K.cjs');
|
|
5
|
+
require('./chunk-J7J7J2GN.cjs');
|
|
6
|
+
require('./chunk-6LHQPOMI.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "currentPersonalityContext", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkKGANQYP7_cjs.currentPersonalityContext; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "warnPersonalitySwitchInsideFork", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkKGANQYP7_cjs.warnPersonalitySwitchInsideFork; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "withPersonalityContext", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkKGANQYP7_cjs.withPersonalityContext; }
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=context-4QOEWRDF.cjs.map
|
|
23
|
+
//# sourceMappingURL=context-4QOEWRDF.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"context-4QOEWRDF.cjs"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { currentPersonalityContext, warnPersonalitySwitchInsideFork, withPersonalityContext } from './chunk-AW6F6HZR.js';
|
|
2
|
+
import './chunk-WMWEI3NS.js';
|
|
3
|
+
import './chunk-ALUN2B4W.js';
|
|
4
|
+
import './chunk-CZJ6Q7CW.js';
|
|
5
|
+
//# sourceMappingURL=context-Z3CFTT3H.js.map
|
|
6
|
+
//# sourceMappingURL=context-Z3CFTT3H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"context-Z3CFTT3H.js"}
|