@theokit/sdk 4.63.4 → 5.0.0-next.2
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 +847 -23
- package/dist/a2a/index.cjs +29 -13
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.d.cts +1 -1
- package/dist/a2a/index.d.ts +1 -1
- package/dist/a2a/index.js +26 -11
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/message-bus.d.cts +26 -3
- package/dist/a2a/message-bus.d.ts +26 -3
- package/dist/a2a/subagent.d.cts +8 -3
- package/dist/a2a/subagent.d.ts +8 -3
- package/dist/{agent-X0DKA943.d.cts → agent-C3KO5LKm.d.cts} +251 -36
- package/dist/{agent-BFno7Sfn.d.ts → agent-CvmTR9uf.d.ts} +251 -36
- package/dist/agent-GPV2JWZG.cjs +67 -0
- package/dist/{agent-UX7WFI6B.cjs.map → agent-GPV2JWZG.cjs.map} +1 -1
- package/dist/agent-Y24I5JBM.js +58 -0
- package/dist/{agent-A5XMIVNP.js.map → agent-Y24I5JBM.js.map} +1 -1
- package/dist/agent-session-store-AFML3AXC.js +6 -0
- package/dist/{agent-session-store-OPGRB4XM.js.map → agent-session-store-AFML3AXC.js.map} +1 -1
- package/dist/agent-session-store-MTSIY3MH.cjs +23 -0
- package/dist/{agent-session-store-6EL5NPA4.cjs.map → agent-session-store-MTSIY3MH.cjs.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/auth/index.cjs +33 -34
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +6 -7
- package/dist/auth/index.js.map +1 -1
- package/dist/{batch-BXYTW2DP.cjs → batch-I6T6MXZO.cjs} +58 -40
- package/dist/batch-I6T6MXZO.cjs.map +1 -0
- package/dist/{batch-L4ZXS46M.js → batch-US4F6WPK.js} +42 -24
- 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-UGT7GK7I.cjs → chunk-24SYBZPL.cjs} +36 -18
- package/dist/chunk-24SYBZPL.cjs.map +1 -0
- package/dist/{chunk-KYAJINUI.cjs → chunk-2HPNT6HH.cjs} +581 -401
- package/dist/chunk-2HPNT6HH.cjs.map +1 -0
- package/dist/{chunk-VLVVJLDH.cjs → chunk-2NE7DTOK.cjs} +234 -193
- package/dist/chunk-2NE7DTOK.cjs.map +1 -0
- package/dist/{chunk-N2U4AZGB.js → chunk-2WXHA33T.js} +3 -3
- 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-L3MTL4NA.js → chunk-2ZLVT7H3.js} +223 -182
- package/dist/chunk-2ZLVT7H3.js.map +1 -0
- package/dist/{chunk-2GUYQR5P.js → chunk-3JHIFQ4I.js} +39 -13
- package/dist/chunk-3JHIFQ4I.js.map +1 -0
- package/dist/{chunk-BU4KFWXF.js → chunk-44I6UYVH.js} +8 -17
- package/dist/chunk-44I6UYVH.js.map +1 -0
- package/dist/{chunk-UNYXQ4M5.js → chunk-47TF32NQ.js} +10 -5
- package/dist/chunk-47TF32NQ.js.map +1 -0
- package/dist/{chunk-WNO3C3N2.cjs → chunk-4A3SKJ53.cjs} +56 -27
- package/dist/chunk-4A3SKJ53.cjs.map +1 -0
- package/dist/{chunk-YML4ME27.cjs → chunk-4HS6FFGL.cjs} +55 -46
- package/dist/chunk-4HS6FFGL.cjs.map +1 -0
- package/dist/{chunk-C72AZW7J.js → chunk-4MMWFSCD.js} +4 -4
- package/dist/chunk-4MMWFSCD.js.map +1 -0
- package/dist/{chunk-6HKGLTJI.cjs → chunk-4NLCWGH7.cjs} +15 -15
- package/dist/chunk-4NLCWGH7.cjs.map +1 -0
- package/dist/{chunk-LKBEROHN.js → chunk-4S5TWFIZ.js} +14 -14
- package/dist/chunk-4S5TWFIZ.js.map +1 -0
- package/dist/{chunk-UBDMVMBZ.js → chunk-55GB6JYQ.js} +33 -22
- package/dist/chunk-55GB6JYQ.js.map +1 -0
- package/dist/{chunk-U6IFHFWK.js → chunk-5WKQDIGO.js} +8 -17
- package/dist/chunk-5WKQDIGO.js.map +1 -0
- package/dist/chunk-67ADYSTW.js +120 -0
- package/dist/chunk-67ADYSTW.js.map +1 -0
- package/dist/{chunk-XL7Q7HB2.cjs → chunk-6LHQPOMI.cjs} +39 -6
- package/dist/chunk-6LHQPOMI.cjs.map +1 -0
- package/dist/{chunk-A4JVILQU.js → chunk-6M2OIS4Y.js} +7 -7
- package/dist/chunk-6M2OIS4Y.js.map +1 -0
- package/dist/{chunk-LWGSI6M3.js → chunk-6PWOWXMC.js} +4 -4
- package/dist/{chunk-LWGSI6M3.js.map → chunk-6PWOWXMC.js.map} +1 -1
- package/dist/{chunk-RNB4APBZ.js → chunk-6WAKKTBO.js} +9 -5
- package/dist/chunk-6WAKKTBO.js.map +1 -0
- package/dist/{chunk-V2BOS4WF.cjs → chunk-7A6535RA.cjs} +11 -11
- package/dist/chunk-7A6535RA.cjs.map +1 -0
- package/dist/{chunk-ZLQSWSJ2.cjs → chunk-7FDKWDA2.cjs} +11 -11
- package/dist/{chunk-ZLQSWSJ2.cjs.map → chunk-7FDKWDA2.cjs.map} +1 -1
- package/dist/{chunk-4VPXM6UU.js → chunk-7I5Z3UBJ.js} +3 -3
- package/dist/{chunk-4VPXM6UU.js.map → chunk-7I5Z3UBJ.js.map} +1 -1
- package/dist/{chunk-B4EOJWOY.cjs → chunk-7JJ3A6AT.cjs} +13 -7
- package/dist/chunk-7JJ3A6AT.cjs.map +1 -0
- package/dist/{chunk-WJVHMTKB.cjs → chunk-AA27GEYS.cjs} +3 -3
- package/dist/{chunk-WJVHMTKB.cjs.map → chunk-AA27GEYS.cjs.map} +1 -1
- package/dist/{chunk-BP46RJ5X.js → chunk-AAEZSPTC.js} +5 -5
- package/dist/{chunk-BP46RJ5X.js.map → chunk-AAEZSPTC.js.map} +1 -1
- package/dist/chunk-AGACYRJ2.js +11 -0
- package/dist/chunk-AGACYRJ2.js.map +1 -0
- package/dist/{chunk-ZZMZWBR6.js → chunk-ALUN2B4W.js} +81 -58
- 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-DXGZ2NUG.cjs → chunk-ATT276RD.cjs} +12 -11
- package/dist/chunk-ATT276RD.cjs.map +1 -0
- package/dist/{chunk-4FFBAUFS.js → chunk-AWINL3ZC.js} +6 -6
- package/dist/chunk-AWINL3ZC.js.map +1 -0
- package/dist/{chunk-UU36SHFY.cjs → chunk-BJUJT5ED.cjs} +9 -8
- package/dist/chunk-BJUJT5ED.cjs.map +1 -0
- package/dist/{chunk-D4CUGAKZ.js → chunk-CZJ6Q7CW.js} +36 -6
- package/dist/chunk-CZJ6Q7CW.js.map +1 -0
- package/dist/{chunk-KQ7TS7WW.cjs → chunk-D6POWE7E.cjs} +37 -26
- package/dist/chunk-D6POWE7E.cjs.map +1 -0
- package/dist/{chunk-AWO27VRZ.js → chunk-DMRT67Y6.js} +6 -5
- package/dist/chunk-DMRT67Y6.js.map +1 -0
- package/dist/{chunk-5VB22SYX.cjs → chunk-DQZU7JK6.cjs} +7 -7
- package/dist/{chunk-5VB22SYX.cjs.map → chunk-DQZU7JK6.cjs.map} +1 -1
- package/dist/{chunk-3NSS2OIZ.cjs → chunk-DRL7URI4.cjs} +6 -6
- package/dist/{chunk-3NSS2OIZ.cjs.map → chunk-DRL7URI4.cjs.map} +1 -1
- package/dist/{chunk-RFXWMRFC.js → chunk-EFMFILPG.js} +14 -6
- package/dist/chunk-EFMFILPG.js.map +1 -0
- package/dist/{chunk-HS7AVXTF.js → chunk-EH6XD3FY.js} +4 -4
- package/dist/chunk-EH6XD3FY.js.map +1 -0
- package/dist/{chunk-KQRW2GPZ.js → chunk-EIQFAOFD.js} +6 -6
- package/dist/chunk-EIQFAOFD.js.map +1 -0
- package/dist/{chunk-XJCXEKMD.cjs → chunk-EXTRW7GW.cjs} +4 -4
- package/dist/chunk-EXTRW7GW.cjs.map +1 -0
- package/dist/{chunk-U54XCYG3.js → chunk-FJWQP6EE.js} +12 -6
- package/dist/chunk-FJWQP6EE.js.map +1 -0
- package/dist/{chunk-O7DK5PBJ.cjs → chunk-FUSDYC2B.cjs} +26 -42
- package/dist/chunk-FUSDYC2B.cjs.map +1 -0
- package/dist/{chunk-4QZSA2HJ.js → chunk-G7BLGBRN.js} +4 -4
- package/dist/chunk-G7BLGBRN.js.map +1 -0
- package/dist/{chunk-BZRFXJHA.js → chunk-GBCVPKHE.js} +55 -26
- package/dist/chunk-GBCVPKHE.js.map +1 -0
- package/dist/chunk-GGZ5GPE3.cjs +130 -0
- package/dist/chunk-GGZ5GPE3.cjs.map +1 -0
- package/dist/{chunk-5HEG4CQH.cjs → chunk-GZV6AVRL.cjs} +8 -8
- package/dist/{chunk-5HEG4CQH.cjs.map → chunk-GZV6AVRL.cjs.map} +1 -1
- package/dist/{chunk-VCLBZAZU.cjs → chunk-H6YM3PV6.cjs} +17 -17
- package/dist/chunk-H6YM3PV6.cjs.map +1 -0
- package/dist/{chunk-RFMBZPOW.cjs → chunk-HCT4HPCL.cjs} +10 -10
- package/dist/chunk-HCT4HPCL.cjs.map +1 -0
- package/dist/{chunk-OSEG74VJ.js → chunk-HFEJE7AC.js} +52 -43
- package/dist/chunk-HFEJE7AC.js.map +1 -0
- package/dist/{chunk-52NKC5HT.cjs → chunk-HUFSABUZ.cjs} +12 -8
- package/dist/chunk-HUFSABUZ.cjs.map +1 -0
- package/dist/{chunk-4CLOXP6H.cjs → chunk-HW7SEELD.cjs} +4 -4
- package/dist/{chunk-4CLOXP6H.cjs.map → chunk-HW7SEELD.cjs.map} +1 -1
- package/dist/{chunk-ZSWPZ23K.cjs → chunk-I2PWY7VM.cjs} +5 -5
- package/dist/chunk-I2PWY7VM.cjs.map +1 -0
- package/dist/{chunk-VJ26EKGJ.cjs → chunk-IJ7M6GOG.cjs} +3 -3
- package/dist/chunk-IJ7M6GOG.cjs.map +1 -0
- package/dist/{chunk-SAVIWMZB.js → chunk-ILGZ2ZZV.js} +3 -3
- package/dist/chunk-ILGZ2ZZV.js.map +1 -0
- package/dist/{chunk-4ZHTIJNE.cjs → chunk-J7J7J2GN.cjs} +87 -63
- package/dist/chunk-J7J7J2GN.cjs.map +1 -0
- package/dist/{chunk-UALX2J2Q.cjs → chunk-JLRLCBJ4.cjs} +38 -11
- package/dist/chunk-JLRLCBJ4.cjs.map +1 -0
- package/dist/{chunk-2QDYBS2A.js → chunk-JMDDYA22.js} +4 -4
- package/dist/chunk-JMDDYA22.js.map +1 -0
- package/dist/{chunk-LXQ6HKPS.js → chunk-JNAA4G4H.js} +3 -3
- package/dist/{chunk-LXQ6HKPS.js.map → chunk-JNAA4G4H.js.map} +1 -1
- package/dist/{chunk-UMP6OJIM.js → chunk-JOFVLOFY.js} +4 -4
- package/dist/{chunk-UMP6OJIM.js.map → chunk-JOFVLOFY.js.map} +1 -1
- package/dist/{chunk-A46SWMIF.js → chunk-K2VMFZQ5.js} +7 -7
- package/dist/chunk-K2VMFZQ5.js.map +1 -0
- package/dist/{chunk-DN2PACRI.js → chunk-K3NH62DG.js} +461 -282
- package/dist/chunk-K3NH62DG.js.map +1 -0
- package/dist/{chunk-LYTOXSRH.js → chunk-KDR53EO7.js} +1939 -1864
- package/dist/chunk-KDR53EO7.js.map +1 -0
- package/dist/{chunk-XWTLIGO3.cjs → chunk-KTTHHYEW.cjs} +5 -5
- package/dist/chunk-KTTHHYEW.cjs.map +1 -0
- package/dist/{chunk-3FFAEAUJ.cjs → chunk-KVSAY6NZ.cjs} +18 -18
- package/dist/chunk-KVSAY6NZ.cjs.map +1 -0
- package/dist/{chunk-IAHZCGBE.cjs → chunk-LHSWHYF3.cjs} +120 -146
- package/dist/chunk-LHSWHYF3.cjs.map +1 -0
- package/dist/{chunk-3OR54XG4.js → chunk-NJWYQWDL.js} +12 -8
- package/dist/chunk-NJWYQWDL.js.map +1 -0
- package/dist/chunk-NVXXWAU7.cjs +13 -0
- package/dist/chunk-NVXXWAU7.cjs.map +1 -0
- package/dist/{chunk-2D34UTDC.js → chunk-O6USDERH.js} +31 -11
- package/dist/chunk-O6USDERH.js.map +1 -0
- package/dist/{chunk-XO4SOZN6.js → chunk-OR6XIWLB.js} +4 -4
- package/dist/{chunk-XO4SOZN6.js.map → chunk-OR6XIWLB.js.map} +1 -1
- package/dist/{chunk-4PYZ5AX3.cjs → chunk-PRZ3BES7.cjs} +16 -8
- package/dist/chunk-PRZ3BES7.cjs.map +1 -0
- package/dist/{chunk-HCZD23VS.cjs → chunk-QC55H6RJ.cjs} +65 -39
- package/dist/chunk-QC55H6RJ.cjs.map +1 -0
- package/dist/{chunk-4O5TGQBW.cjs → chunk-QME6FDFG.cjs} +9 -5
- package/dist/chunk-QME6FDFG.cjs.map +1 -0
- package/dist/chunk-QOGNZMHD.cjs +34 -0
- package/dist/chunk-QOGNZMHD.cjs.map +1 -0
- package/dist/{chunk-7VT4P3Z4.cjs → chunk-QUAEOKDW.cjs} +1642 -1567
- package/dist/chunk-QUAEOKDW.cjs.map +1 -0
- package/dist/{chunk-B2J4ZMZL.cjs → chunk-QWD3CZWE.cjs} +6 -5
- package/dist/chunk-QWD3CZWE.cjs.map +1 -0
- package/dist/{chunk-SZVR77EJ.cjs → chunk-QWD4RDZ3.cjs} +15 -24
- package/dist/chunk-QWD4RDZ3.cjs.map +1 -0
- package/dist/{chunk-7BG5UH3T.cjs → chunk-RHZ6HP23.cjs} +4 -4
- package/dist/chunk-RHZ6HP23.cjs.map +1 -0
- package/dist/{chunk-2HVF2WJY.cjs → chunk-RQMCOFAI.cjs} +8 -8
- package/dist/{chunk-2HVF2WJY.cjs.map → chunk-RQMCOFAI.cjs.map} +1 -1
- package/dist/{chunk-VKJ7V7EB.cjs → chunk-SA6K24NB.cjs} +3 -3
- package/dist/chunk-SA6K24NB.cjs.map +1 -0
- package/dist/{chunk-7AD3ZTZL.js → chunk-SAGRF4IB.js} +3 -3
- package/dist/chunk-SAGRF4IB.js.map +1 -0
- package/dist/{chunk-PUAEFLYK.js → chunk-SVQIW5RJ.js} +4 -4
- package/dist/{chunk-PUAEFLYK.js.map → chunk-SVQIW5RJ.js.map} +1 -1
- package/dist/{chunk-43ZQRWAP.cjs → chunk-SYVWE64W.cjs} +22 -22
- package/dist/chunk-SYVWE64W.cjs.map +1 -0
- package/dist/{chunk-3O42QOMJ.js → chunk-TA3K7SBK.js} +7 -6
- package/dist/chunk-TA3K7SBK.js.map +1 -0
- package/dist/{chunk-LYRDF5TQ.cjs → chunk-TFG5IBZS.cjs} +14 -23
- package/dist/chunk-TFG5IBZS.cjs.map +1 -0
- package/dist/{chunk-GKEFRLU7.cjs → chunk-TMKTSYDS.cjs} +6 -6
- package/dist/{chunk-GKEFRLU7.cjs.map → chunk-TMKTSYDS.cjs.map} +1 -1
- package/dist/{chunk-J24VJOH3.cjs → chunk-UADQJBHR.cjs} +31 -11
- package/dist/chunk-UADQJBHR.cjs.map +1 -0
- package/dist/{chunk-TAZVKYWJ.js → chunk-UBR5PWD7.js} +26 -40
- package/dist/chunk-UBR5PWD7.js.map +1 -0
- package/dist/{chunk-IPYYKCRC.js → chunk-UFPUHJWS.js} +5 -5
- package/dist/{chunk-IPYYKCRC.js.map → chunk-UFPUHJWS.js.map} +1 -1
- package/dist/{chunk-OHLDPWTA.cjs → chunk-UGRS7ZA7.cjs} +15 -15
- package/dist/{chunk-OHLDPWTA.cjs.map → chunk-UGRS7ZA7.cjs.map} +1 -1
- package/dist/{chunk-RIAM53CP.js → chunk-UKMBRMGT.js} +3 -3
- package/dist/chunk-UKMBRMGT.js.map +1 -0
- package/dist/{chunk-L4BDVXIM.js → chunk-UNK4HNJH.js} +97 -123
- package/dist/chunk-UNK4HNJH.js.map +1 -0
- package/dist/{chunk-C3NT3PVE.js → chunk-V22DZIXO.js} +3 -3
- package/dist/chunk-V22DZIXO.js.map +1 -0
- package/dist/{chunk-OFRFZRQ4.cjs → chunk-V6ZY4AX6.cjs} +24 -14
- package/dist/chunk-V6ZY4AX6.cjs.map +1 -0
- package/dist/{chunk-B3IMEBOA.js → chunk-VE6DFSKU.js} +3 -3
- package/dist/{chunk-B3IMEBOA.js.map → chunk-VE6DFSKU.js.map} +1 -1
- package/dist/{chunk-WLQNMXQE.js → chunk-VWUXIVEI.js} +53 -26
- package/dist/chunk-VWUXIVEI.js.map +1 -0
- package/dist/{chunk-GMLBYDW4.cjs → chunk-VXDEKILY.cjs} +108 -109
- package/dist/chunk-VXDEKILY.cjs.map +1 -0
- package/dist/{chunk-ACDLHN3W.js → chunk-WJXOICRC.js} +16 -6
- package/dist/chunk-WJXOICRC.js.map +1 -0
- package/dist/{chunk-7YGCPMGB.js → chunk-XB4GI5RZ.js} +27 -12
- package/dist/chunk-XB4GI5RZ.js.map +1 -0
- package/dist/{chunk-O73J46PV.js → chunk-XDANGA2C.js} +5 -5
- package/dist/{chunk-O73J46PV.js.map → chunk-XDANGA2C.js.map} +1 -1
- package/dist/{chunk-NDGGJQTZ.js → chunk-XJZEBGXD.js} +10 -10
- package/dist/chunk-XJZEBGXD.js.map +1 -0
- package/dist/{chunk-UTSRIDKZ.js → chunk-XYFGKVZ7.js} +3 -3
- package/dist/chunk-XYFGKVZ7.js.map +1 -0
- package/dist/{chunk-RMWTPV3M.cjs → chunk-Y2KYR2ED.cjs} +27 -27
- package/dist/chunk-Y2KYR2ED.cjs.map +1 -0
- package/dist/{chunk-O7LZFG6O.cjs → chunk-YIFFF23U.cjs} +5 -5
- package/dist/chunk-YIFFF23U.cjs.map +1 -0
- package/dist/{chunk-4OTIXDMU.cjs → chunk-YJNYDJ2T.cjs} +12 -4
- package/dist/chunk-YJNYDJ2T.cjs.map +1 -0
- package/dist/{chunk-6JSIEDKL.cjs → chunk-YSTXFWQE.cjs} +13 -7
- package/dist/chunk-YSTXFWQE.cjs.map +1 -0
- package/dist/{chunk-I6HGWHPU.cjs → chunk-Z3NTRKIC.cjs} +4 -4
- package/dist/{chunk-I6HGWHPU.cjs.map → chunk-Z3NTRKIC.cjs.map} +1 -1
- package/dist/{chunk-32WTYBUH.js → chunk-ZH26RNQA.js} +91 -92
- package/dist/chunk-ZH26RNQA.js.map +1 -0
- package/dist/compact-session-BHTPCIHA.cjs +61 -0
- package/dist/{compact-session-QV57KR66.cjs.map → compact-session-BHTPCIHA.cjs.map} +1 -1
- package/dist/compact-session-W4WLJTHA.js +24 -0
- package/dist/{compact-session-RIGOWC4Y.js.map → compact-session-W4WLJTHA.js.map} +1 -1
- package/dist/compaction.cjs +20 -17
- package/dist/compaction.d.cts +15 -1
- package/dist/compaction.d.ts +15 -1
- package/dist/compaction.js +3 -4
- package/dist/concurrency.cjs +6 -7
- package/dist/concurrency.cjs.map +1 -1
- package/dist/concurrency.d.cts +6 -3
- package/dist/concurrency.d.ts +6 -3
- package/dist/concurrency.js +4 -5
- package/dist/concurrency.js.map +1 -1
- package/dist/context/index.cjs +6 -6
- package/dist/context/index.js +3 -3
- package/dist/context-NI33FS2R.cjs +23 -0
- package/dist/{context-WFLTTMK3.cjs.map → context-NI33FS2R.cjs.map} +1 -1
- package/dist/context-Y7B7SI5X.js +6 -0
- package/dist/{context-WI2DFG7V.js.map → context-Y7B7SI5X.js.map} +1 -1
- package/dist/create-skill.d.ts +4 -1
- package/dist/{cron-BuiRPrvt.d.cts → cron-C3PhZED0.d.cts} +8 -2
- package/dist/{cron-C2SIi31n.d.ts → cron-crfMMdAw.d.ts} +8 -2
- package/dist/cron.cjs +46 -45
- package/dist/cron.d.cts +5 -4
- package/dist/cron.d.ts +5 -4
- package/dist/cron.js +45 -44
- package/dist/{errors-BgJH9PHi.d.cts → errors-CLOAyuiv.d.ts} +133 -95
- package/dist/{errors-C5fJUqLk.d.ts → errors-DrDEgyz1.d.cts} +133 -95
- 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 +25 -22
- package/dist/errors.d.cts +3 -2
- package/dist/errors.d.ts +3 -2
- package/dist/errors.js +2 -3
- package/dist/eval.cjs +74 -78
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +64 -68
- package/dist/eval.js.map +1 -1
- package/dist/{executor-6CYCA7MI.cjs → executor-XQAOQOHD.cjs} +60 -54
- package/dist/executor-XQAOQOHD.cjs.map +1 -0
- package/dist/{executor-QSEC3MRH.js → executor-ZNDQDX6Q.js} +43 -37
- package/dist/executor-ZNDQDX6Q.js.map +1 -0
- package/dist/filesystem/index.cjs +24 -26
- package/dist/filesystem/index.cjs.map +1 -1
- package/dist/filesystem/index.js +20 -22
- package/dist/filesystem/index.js.map +1 -1
- package/dist/filesystem/types.d.cts +11 -5
- package/dist/filesystem/types.d.ts +11 -5
- package/dist/{fork-agent-RSV4E3EA.js → fork-agent-S2EPIML7.js} +3 -3
- package/dist/fork-agent-S2EPIML7.js.map +1 -0
- package/dist/{fork-agent-Y2IK2RYU.cjs → fork-agent-WAEQI2DL.cjs} +4 -4
- package/dist/fork-agent-WAEQI2DL.cjs.map +1 -0
- package/dist/fs-session-store-77JU46UZ.js +10 -0
- package/dist/{fs-session-store-NM6YSTE2.js.map → fs-session-store-77JU46UZ.js.map} +1 -1
- package/dist/fs-session-store-E4U3P56L.cjs +19 -0
- package/dist/{fs-session-store-4PIHT5UX.cjs.map → fs-session-store-E4U3P56L.cjs.map} +1 -1
- package/dist/generate-object-BXV7BZRP.js +7 -0
- package/dist/{generate-object-GUNAUVBX.js.map → generate-object-BXV7BZRP.js.map} +1 -1
- package/dist/generate-object-YBI2TDJ3.cjs +20 -0
- package/dist/{generate-object-R7HTMW7F.cjs.map → generate-object-YBI2TDJ3.cjs.map} +1 -1
- package/dist/generate-object.d.ts +2 -4
- package/dist/index-manager-DXR2RSFI.cjs +26 -0
- package/dist/{index-manager-2SRX45WJ.cjs.map → index-manager-DXR2RSFI.cjs.map} +1 -1
- package/dist/index-manager-QH6OXEV5.js +17 -0
- package/dist/{index-manager-SP4ISSDX.js.map → index-manager-QH6OXEV5.js.map} +1 -1
- package/dist/index.cjs +234 -194
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +243 -41
- package/dist/index.d.ts +243 -41
- package/dist/index.js +140 -102
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-DAR7OUCW.js → inject-session-SUM6TDJF.js} +9 -9
- package/dist/{inject-session-DAR7OUCW.js.map → inject-session-SUM6TDJF.js.map} +1 -1
- package/dist/inject-session-W6A46J3E.cjs +29 -0
- package/dist/{inject-session-WQKMC3GR.cjs.map → inject-session-W6A46J3E.cjs.map} +1 -1
- package/dist/interactive/index.cjs +12 -6
- package/dist/interactive/index.cjs.map +1 -1
- package/dist/interactive/index.js +12 -6
- package/dist/interactive/index.js.map +1 -1
- package/dist/interactive/types.d.cts +14 -4
- package/dist/interactive/types.d.ts +14 -4
- package/dist/internal/agent-loop/loop-context-init.d.ts +1 -1
- package/dist/internal/agent-loop/loop-finalize.d.ts +25 -0
- package/dist/internal/agent-loop/loop.d.ts +1 -1
- package/dist/internal/agent-loop/message-builders.d.ts +1 -1
- package/dist/internal/agent-loop/tool-dispatch.d.ts +2 -2
- package/dist/internal/agent-loop/usage-and-cost.d.ts +1 -1
- package/dist/internal/auth/credential-availability.d.ts +61 -0
- package/dist/internal/auth/credential-store.d.ts +1 -1
- package/dist/internal/auth/oauth-device.d.ts +1 -1
- package/dist/internal/auth/oauth-engine.d.ts +1 -1
- package/dist/internal/auth/resolve-credential.d.ts +1 -1
- package/dist/internal/base-url.d.ts +14 -0
- package/dist/internal/cloud-agent/cloud-config-serializer.d.ts +1 -1
- package/dist/internal/{runtime/concurrency → concurrency}/subagent-credentials.d.ts +2 -2
- package/dist/internal/emit-run-event.d.ts +16 -0
- package/dist/internal/error-mappers/shared.d.ts +14 -1
- package/dist/internal/eval/assert.d.ts +2 -1
- package/dist/internal/eval/single-flight.d.ts +2 -1
- package/dist/internal/global-singleton.d.ts +6 -3
- package/dist/internal/llm/responses.d.ts +10 -0
- package/dist/internal/local-agent/local-agent-bootstrap.d.ts +5 -3
- package/dist/internal/local-agent/local-agent-capabilities.d.ts +38 -0
- package/dist/internal/local-agent/local-agent-dispatch.d.ts +2 -2
- package/dist/internal/local-agent/local-agent-memory-provider.d.ts +1 -1
- package/dist/internal/local-agent/local-agent-personality-extensions.d.ts +25 -1
- package/dist/internal/local-agent/local-agent-send.d.ts +42 -1
- 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-tools.d.ts +21 -4
- package/dist/internal/local-agent/real-local-run.d.ts +2 -2
- package/dist/internal/mcp/handshake-timeout.d.ts +53 -0
- package/dist/internal/memory/active-memory.d.ts +1 -1
- package/dist/internal/memory/adapters/index.cjs +10 -10
- package/dist/internal/memory/adapters/index.js +9 -9
- package/dist/internal/memory/adapters/openai-embedding.d.cts +10 -0
- package/dist/internal/memory/adapters/openai-embedding.d.ts +10 -0
- package/dist/internal/memory/corpus-sync.d.ts +23 -0
- package/dist/internal/memory/index-db.d.ts +15 -1
- package/dist/internal/memory/index-manager-contract.d.ts +12 -0
- package/dist/internal/memory/index-manager.d.ts +4 -10
- package/dist/internal/memory/index-repository.d.ts +58 -0
- package/dist/internal/memory/lance-memory-adapter.d.ts +16 -14
- package/dist/internal/memory/memory-index.d.ts +15 -0
- package/dist/internal/memory/sdk-memory-peer-loader.d.ts +54 -1
- package/dist/internal/memory/storage/index.cjs +39 -40
- package/dist/internal/memory/storage/index.js +10 -11
- package/dist/internal/memory/storage/memory-root.d.cts +2 -3
- package/dist/internal/memory/storage/memory-root.d.ts +2 -3
- package/dist/internal/persistence/atomic-write.d.cts +4 -4
- package/dist/internal/persistence/atomic-write.d.ts +4 -4
- package/dist/internal/persistence/index.cjs +24 -25
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +7 -8
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/persistence/jsonl.d.cts +3 -1
- package/dist/internal/persistence/jsonl.d.ts +3 -1
- package/dist/internal/persistence/paths.d.cts +25 -12
- package/dist/internal/persistence/paths.d.ts +25 -12
- package/dist/internal/persistence/transcript-ops.d.cts +11 -2
- package/dist/internal/persistence/transcript-ops.d.ts +11 -2
- package/dist/internal/plugins/context.d.cts +0 -10
- package/dist/internal/plugins/context.d.ts +0 -10
- package/dist/internal/plugins/types.d.cts +1 -1
- package/dist/internal/plugins/types.d.ts +1 -1
- package/dist/internal/providers/catalog-schema.d.ts +94 -0
- package/dist/internal/providers/catalog-source-models-dev.d.ts +11 -0
- package/dist/internal/runtime/compat/compat-config-file.d.ts +31 -0
- package/dist/internal/runtime/compat/foreign-config-sources.d.ts +58 -34
- package/dist/internal/runtime/compression/compression-model-registry.d.ts +1 -1
- package/dist/internal/runtime/compression/compression-summarizer.d.ts +5 -1
- package/dist/internal/runtime/fixtures/fixture-events.d.ts +1 -1
- package/dist/internal/runtime/fixtures/fixture-mode.d.ts +8 -14
- package/dist/internal/runtime/fixtures/fixture-run-base.d.ts +1 -1
- package/dist/internal/runtime/fixtures/fixture-scripts.d.ts +2 -2
- package/dist/internal/runtime/hooks/hooks-executor.d.ts +6 -1
- package/dist/internal/runtime/lifecycle/wrap-completion-check-run.d.ts +1 -1
- package/dist/internal/runtime/{memory → memory-glue}/memory-provider.d.ts +1 -1
- package/dist/internal/runtime/{plugins → plugin-loader}/plugin-bundles.d.ts +4 -1
- package/dist/internal/runtime/processors/wrap-output-run.d.ts +1 -1
- package/dist/internal/runtime/registry/live-agent-registry.d.ts +9 -1
- package/dist/internal/runtime/system-prompt/local-assembly.d.ts +2 -1
- package/dist/internal/scorers/llm-judge.d.ts +12 -0
- package/dist/internal/security/index.cjs +14 -15
- package/dist/internal/security/index.d.cts +6 -1
- package/dist/internal/security/index.d.ts +6 -1
- package/dist/internal/security/index.js +4 -5
- package/dist/internal/security/path-containment.d.ts +24 -0
- package/dist/internal/session/agent-session-store.d.ts +1 -1
- package/dist/internal/session/agent-session.d.ts +1 -1
- package/dist/internal/session/index.d.ts +1 -1
- package/dist/internal/session/session-cache.d.ts +9 -3
- package/dist/internal/task/registry.d.ts +1 -1
- package/dist/internal/task/store.d.ts +1 -1
- package/dist/internal/task/subscribe.d.ts +1 -1
- package/dist/internal/task/task-id.d.ts +22 -0
- package/dist/internal/telemetry/adapter-registry.d.ts +12 -2
- package/dist/internal/telemetry/adapters/braintrust.d.ts +6 -1
- package/dist/internal/telemetry/adapters/langsmith.d.ts +6 -1
- package/dist/internal/workflow/executor.d.ts +2 -1
- package/dist/internal/workflow/snapshot-store.d.ts +1 -1
- package/dist/internal/workflow/step-branch.d.ts +2 -2
- package/dist/internal/workflow/step-dowhile.d.ts +2 -2
- package/dist/internal/workflow/step-execution.d.ts +25 -0
- package/dist/internal/workflow/step-foreach.d.ts +2 -2
- package/dist/internal/workflow/step-parallel.d.ts +2 -2
- package/dist/judge-call-6MVARKU2.js +5 -0
- package/dist/{judge-call-LVXABPS3.js.map → judge-call-6MVARKU2.js.map} +1 -1
- package/dist/judge-call-I3P4D5QR.cjs +22 -0
- package/dist/{judge-call-LAHMBJ57.cjs.map → judge-call-I3P4D5QR.cjs.map} +1 -1
- package/dist/mcp-auth.cjs +14 -15
- package/dist/mcp-auth.cjs.map +1 -1
- package/dist/mcp-auth.d.cts +2 -0
- package/dist/mcp-auth.d.ts +2 -0
- package/dist/mcp-auth.js +4 -5
- package/dist/mcp-auth.js.map +1 -1
- package/dist/models.cjs +52 -42
- package/dist/models.cjs.map +1 -1
- package/dist/models.js +39 -29
- package/dist/models.js.map +1 -1
- package/dist/oauth-transaction-store-5RIR6D5C.js +5 -0
- package/dist/{oauth-transaction-store-W52KVHQ4.js.map → oauth-transaction-store-5RIR6D5C.js.map} +1 -1
- package/dist/oauth-transaction-store-SXIE57OD.cjs +38 -0
- package/dist/{oauth-transaction-store-BT4GLTLK.cjs.map → oauth-transaction-store-SXIE57OD.cjs.map} +1 -1
- package/dist/path-safety.cjs +11 -12
- package/dist/path-safety.d.cts +2 -0
- package/dist/path-safety.d.ts +2 -0
- package/dist/path-safety.js +4 -5
- package/dist/permission-engine.d.ts +10 -17
- package/dist/persistence.cjs +31 -31
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.d.cts +9 -1
- package/dist/persistence.d.ts +9 -1
- package/dist/persistence.js +12 -13
- package/dist/persistence.js.map +1 -1
- package/dist/project.cjs +5 -6
- package/dist/project.cjs.map +1 -1
- package/dist/project.js +3 -4
- package/dist/project.js.map +1 -1
- package/dist/providers.cjs +10 -10
- package/dist/providers.d.cts +2 -0
- package/dist/providers.d.ts +2 -0
- package/dist/providers.js +8 -8
- package/dist/registry-BZQFYRTL.cjs +46 -0
- package/dist/{registry-V7BDQ6QB.cjs.map → registry-BZQFYRTL.cjs.map} +1 -1
- package/dist/registry-DMWCJKRF.js +9 -0
- package/dist/{registry-75W33OGL.js.map → registry-DMWCJKRF.js.map} +1 -1
- package/dist/retry.cjs +4 -5
- package/dist/retry.d.cts +20 -5
- package/dist/retry.d.ts +20 -5
- package/dist/retry.js +3 -4
- package/dist/{run-BYSHf58D.d.ts → run-CTAdRU3U.d.cts} +120 -152
- package/dist/{run-BYSHf58D.d.cts → run-CTAdRU3U.d.ts} +120 -152
- package/dist/{run-until-HEQOUVU6.js → run-until-6D6TQ4JN.js} +27 -59
- package/dist/run-until-6D6TQ4JN.js.map +1 -0
- package/dist/{run-until-U2B5FJJI.cjs → run-until-DG2KXWB2.cjs} +27 -59
- package/dist/run-until-DG2KXWB2.cjs.map +1 -0
- package/dist/sandbox/bwrap.d.cts +11 -1
- package/dist/sandbox/bwrap.d.ts +11 -1
- package/dist/sandbox/index.cjs +26 -30
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +8 -1
- package/dist/sandbox/index.d.ts +8 -1
- package/dist/sandbox/index.js +10 -14
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/linux-sandbox.d.cts +20 -4
- package/dist/sandbox/linux-sandbox.d.ts +20 -4
- package/dist/sandbox/types.d.cts +18 -2
- package/dist/sandbox/types.d.ts +18 -2
- package/dist/sanitize/index.cjs +2 -2
- package/dist/sanitize/index.js +1 -1
- package/dist/sanitize/types.d.cts +15 -2
- package/dist/sanitize/types.d.ts +15 -2
- package/dist/{sdk-agent-D8qJVkuV.d.ts → sdk-agent-BOiKqOgL.d.cts} +197 -117
- package/dist/{sdk-agent-DEoKhA8a.d.cts → sdk-agent-D4a_BR_6.d.ts} +197 -117
- package/dist/server/auth/errors.d.cts +4 -3
- package/dist/server/auth/errors.d.ts +4 -3
- package/dist/server/auth/index.cjs +28 -28
- package/dist/server/auth/index.cjs.map +1 -1
- package/dist/server/auth/index.d.cts +28 -5
- package/dist/server/auth/index.d.ts +28 -5
- package/dist/server/auth/index.js +13 -13
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/auth/oauth-transaction-store.d.cts +2 -1
- package/dist/server/auth/oauth-transaction-store.d.ts +2 -1
- package/dist/server/auth/orchestrator.d.cts +4 -1
- package/dist/server/auth/orchestrator.d.ts +4 -1
- package/dist/server/auth/types.d.cts +18 -0
- package/dist/server/auth/types.d.ts +18 -0
- package/dist/server/errors-envelope.cjs +14 -15
- package/dist/server/errors-envelope.cjs.map +1 -1
- package/dist/server/errors-envelope.d.cts +3 -3
- package/dist/server/errors-envelope.d.ts +3 -3
- package/dist/server/errors-envelope.js +3 -4
- package/dist/server/errors-envelope.js.map +1 -1
- package/dist/session-transcript-LGHSNVY5.cjs +62 -0
- package/dist/{session-transcript-6WNITKRE.cjs.map → session-transcript-LGHSNVY5.cjs.map} +1 -1
- package/dist/session-transcript-VTBTCGQX.js +5 -0
- package/dist/{session-transcript-XAEKW6P7.js.map → session-transcript-VTBTCGQX.js.map} +1 -1
- package/dist/skills.cjs +8 -9
- package/dist/skills.js +6 -7
- package/dist/stream-object-HBFMIZLD.js +7 -0
- package/dist/{stream-object-UF4QRQRU.js.map → stream-object-HBFMIZLD.js.map} +1 -1
- package/dist/stream-object-QSKHISDJ.cjs +20 -0
- package/dist/{stream-object-ZJTQNKY3.cjs.map → stream-object-QSKHISDJ.cjs.map} +1 -1
- package/dist/stream-object.d.ts +2 -4
- package/dist/subagents-loader-TPZLTXYZ.cjs +16 -0
- package/dist/{subagents-loader-UCNO7FUH.cjs.map → subagents-loader-TPZLTXYZ.cjs.map} +1 -1
- package/dist/subagents-loader-Y6JFYXAY.js +7 -0
- package/dist/{subagents-loader-XP5ERVDZ.js.map → subagents-loader-Y6JFYXAY.js.map} +1 -1
- package/dist/subagents-loader.cjs +7 -8
- package/dist/subagents-loader.cjs.map +1 -1
- package/dist/subagents-loader.d.cts +5 -3
- package/dist/subagents-loader.d.ts +5 -3
- package/dist/subagents-loader.js +5 -6
- package/dist/subagents-loader.js.map +1 -1
- package/dist/subagents.cjs +2 -2
- package/dist/subagents.cjs.map +1 -1
- package/dist/subagents.js +1 -1
- package/dist/subagents.js.map +1 -1
- package/dist/subscription/define-subscription.d.cts +4 -1
- package/dist/subscription/define-subscription.d.ts +4 -1
- package/dist/subscription/index.cjs +4 -5
- package/dist/subscription/index.cjs.map +1 -1
- package/dist/subscription/index.d.cts +2 -0
- package/dist/subscription/index.d.ts +2 -0
- package/dist/subscription/index.js +3 -4
- package/dist/subscription/index.js.map +1 -1
- package/dist/subscription/internal/server-integration.d.cts +5 -0
- package/dist/subscription/internal/server-integration.d.ts +5 -0
- package/dist/subscription/internal/subscription-runtime.d.cts +13 -1
- package/dist/subscription/internal/subscription-runtime.d.ts +13 -1
- package/dist/task-errors.d.ts +58 -0
- package/dist/task-store.cjs +7 -8
- package/dist/task-store.d.cts +2 -0
- package/dist/task-store.d.ts +2 -0
- package/dist/task-store.js +4 -5
- package/dist/types/agent-prims.d.ts +21 -0
- package/dist/types/agent.d.ts +109 -15
- package/dist/types/batch.d.ts +3 -0
- package/dist/types/budget-tracker.d.ts +3 -0
- package/dist/types/budget.d.ts +12 -3
- package/dist/types/content-blocks.d.ts +3 -0
- package/dist/types/context.d.ts +3 -0
- package/dist/types/conversation.d.ts +5 -0
- package/dist/types/cron.d.ts +5 -0
- package/dist/types/env-policy.d.ts +3 -0
- package/dist/types/eval.d.ts +3 -0
- package/dist/types/fork.d.ts +3 -0
- package/dist/types/goal-events.d.ts +3 -0
- package/dist/types/mcp.d.ts +5 -0
- package/dist/types/memory-adapter.d.ts +3 -0
- package/dist/types/memory-provider.d.ts +44 -5
- package/dist/types/messages-base.d.ts +4 -0
- package/dist/types/messages.d.ts +5 -0
- package/dist/types/plugin.d.ts +32 -4
- package/dist/types/processors.d.ts +3 -0
- package/dist/types/provider-profile.d.ts +3 -0
- package/dist/types/providers.d.ts +3 -0
- package/dist/types/run-events.d.ts +36 -9
- package/dist/types/run.d.ts +29 -2
- package/dist/types/sdk-agent.d.ts +71 -1
- package/dist/types/session-message.d.ts +3 -0
- package/dist/types/session-record.d.ts +3 -0
- package/dist/types/session-store.d.ts +45 -0
- package/dist/types/task.d.ts +3 -11
- package/dist/types/theokit.d.ts +3 -0
- package/dist/types/trajectory.d.ts +3 -0
- package/dist/types/updates.d.ts +5 -0
- package/dist/types/usage.d.ts +4 -1
- package/dist/types/workflow.d.ts +13 -135
- package/dist/workflow-as-tool.d.ts +66 -0
- package/dist/workflow-errors.d.ts +164 -0
- package/dist/workflow.cjs +29 -30
- package/dist/workflow.d.cts +135 -74
- package/dist/workflow.d.ts +135 -74
- package/dist/workflow.js +8 -9
- package/docs/adr/README.md +2604 -0
- package/docs/error-codes.md +139 -105
- package/docs/harness-capability-map.md +32 -20
- package/docs/memory-decisions.md +1 -1
- package/package.json +3 -7
- package/bin/theokit-migrate-config.mjs +0 -278
- package/bin/theokit-migrate-memory.mjs +0 -116
- package/dist/agent-A5XMIVNP.js +0 -57
- package/dist/agent-UX7WFI6B.cjs +0 -66
- package/dist/agent-session-store-6EL5NPA4.cjs +0 -24
- package/dist/agent-session-store-OPGRB4XM.js +0 -7
- package/dist/batch-BXYTW2DP.cjs.map +0 -1
- package/dist/batch-L4ZXS46M.js.map +0 -1
- package/dist/chunk-247ZTLNU.js +0 -73
- package/dist/chunk-247ZTLNU.js.map +0 -1
- package/dist/chunk-2D34UTDC.js.map +0 -1
- package/dist/chunk-2GUYQR5P.js.map +0 -1
- package/dist/chunk-2QDYBS2A.js.map +0 -1
- package/dist/chunk-32WTYBUH.js.map +0 -1
- package/dist/chunk-3FFAEAUJ.cjs.map +0 -1
- package/dist/chunk-3O42QOMJ.js.map +0 -1
- package/dist/chunk-3OR54XG4.js.map +0 -1
- package/dist/chunk-43ZQRWAP.cjs.map +0 -1
- package/dist/chunk-4FFBAUFS.js.map +0 -1
- package/dist/chunk-4O5TGQBW.cjs.map +0 -1
- package/dist/chunk-4OTIXDMU.cjs.map +0 -1
- package/dist/chunk-4PYZ5AX3.cjs.map +0 -1
- package/dist/chunk-4QZSA2HJ.js.map +0 -1
- package/dist/chunk-4ZHTIJNE.cjs.map +0 -1
- package/dist/chunk-52NKC5HT.cjs.map +0 -1
- package/dist/chunk-6HKGLTJI.cjs.map +0 -1
- package/dist/chunk-6JSIEDKL.cjs.map +0 -1
- package/dist/chunk-7AD3ZTZL.js.map +0 -1
- package/dist/chunk-7BG5UH3T.cjs.map +0 -1
- package/dist/chunk-7VT4P3Z4.cjs.map +0 -1
- package/dist/chunk-7YGCPMGB.js.map +0 -1
- package/dist/chunk-A46SWMIF.js.map +0 -1
- package/dist/chunk-A4JVILQU.js.map +0 -1
- package/dist/chunk-ACDLHN3W.js.map +0 -1
- package/dist/chunk-AKJP2STZ.cjs +0 -81
- package/dist/chunk-AKJP2STZ.cjs.map +0 -1
- package/dist/chunk-AWO27VRZ.js.map +0 -1
- package/dist/chunk-B2J4ZMZL.cjs.map +0 -1
- package/dist/chunk-B4EOJWOY.cjs.map +0 -1
- package/dist/chunk-BU4KFWXF.js.map +0 -1
- package/dist/chunk-BZRFXJHA.js.map +0 -1
- package/dist/chunk-C3NT3PVE.js.map +0 -1
- package/dist/chunk-C72AZW7J.js.map +0 -1
- package/dist/chunk-D4CUGAKZ.js.map +0 -1
- package/dist/chunk-DN2PACRI.js.map +0 -1
- package/dist/chunk-DXGZ2NUG.cjs.map +0 -1
- package/dist/chunk-EG4QM7ZJ.cjs +0 -39
- package/dist/chunk-EG4QM7ZJ.cjs.map +0 -1
- package/dist/chunk-GMLBYDW4.cjs.map +0 -1
- package/dist/chunk-HCZD23VS.cjs.map +0 -1
- package/dist/chunk-HS7AVXTF.js.map +0 -1
- package/dist/chunk-IAHZCGBE.cjs.map +0 -1
- package/dist/chunk-J24VJOH3.cjs.map +0 -1
- package/dist/chunk-JPBKYL3B.cjs +0 -18
- package/dist/chunk-JPBKYL3B.cjs.map +0 -1
- package/dist/chunk-KQ7TS7WW.cjs.map +0 -1
- package/dist/chunk-KQRW2GPZ.js.map +0 -1
- package/dist/chunk-KYAJINUI.cjs.map +0 -1
- package/dist/chunk-L3MTL4NA.js.map +0 -1
- package/dist/chunk-L4BDVXIM.js.map +0 -1
- package/dist/chunk-LKBEROHN.js.map +0 -1
- package/dist/chunk-LYRDF5TQ.cjs.map +0 -1
- package/dist/chunk-LYTOXSRH.js.map +0 -1
- package/dist/chunk-N2U4AZGB.js.map +0 -1
- package/dist/chunk-NDGGJQTZ.js.map +0 -1
- package/dist/chunk-O7DK5PBJ.cjs.map +0 -1
- package/dist/chunk-O7LZFG6O.cjs.map +0 -1
- package/dist/chunk-OFRFZRQ4.cjs.map +0 -1
- package/dist/chunk-OSEG74VJ.js.map +0 -1
- package/dist/chunk-RFMBZPOW.cjs.map +0 -1
- package/dist/chunk-RFXWMRFC.js.map +0 -1
- package/dist/chunk-RIAM53CP.js.map +0 -1
- package/dist/chunk-RMWTPV3M.cjs.map +0 -1
- package/dist/chunk-RNB4APBZ.js.map +0 -1
- package/dist/chunk-SAVIWMZB.js.map +0 -1
- package/dist/chunk-SZVR77EJ.cjs.map +0 -1
- package/dist/chunk-TAZVKYWJ.js.map +0 -1
- package/dist/chunk-U54XCYG3.js.map +0 -1
- package/dist/chunk-U6IFHFWK.js.map +0 -1
- package/dist/chunk-UALX2J2Q.cjs.map +0 -1
- package/dist/chunk-UBDMVMBZ.js.map +0 -1
- package/dist/chunk-UGT7GK7I.cjs.map +0 -1
- package/dist/chunk-UNYXQ4M5.js.map +0 -1
- package/dist/chunk-UTSRIDKZ.js.map +0 -1
- package/dist/chunk-UU36SHFY.cjs.map +0 -1
- package/dist/chunk-V2BOS4WF.cjs.map +0 -1
- package/dist/chunk-VCLBZAZU.cjs.map +0 -1
- package/dist/chunk-VJ26EKGJ.cjs.map +0 -1
- package/dist/chunk-VKJ7V7EB.cjs.map +0 -1
- package/dist/chunk-VLVVJLDH.cjs.map +0 -1
- package/dist/chunk-WLQNMXQE.js.map +0 -1
- package/dist/chunk-WNO3C3N2.cjs.map +0 -1
- package/dist/chunk-WTMU7J4U.js +0 -14
- package/dist/chunk-WTMU7J4U.js.map +0 -1
- package/dist/chunk-XEQ3TM66.js +0 -35
- package/dist/chunk-XEQ3TM66.js.map +0 -1
- package/dist/chunk-XJCXEKMD.cjs.map +0 -1
- package/dist/chunk-XL7Q7HB2.cjs.map +0 -1
- package/dist/chunk-XWTLIGO3.cjs.map +0 -1
- package/dist/chunk-YML4ME27.cjs.map +0 -1
- package/dist/chunk-ZSWPZ23K.cjs.map +0 -1
- package/dist/chunk-ZZMZWBR6.js.map +0 -1
- package/dist/compact-session-QV57KR66.cjs +0 -59
- package/dist/compact-session-RIGOWC4Y.js +0 -22
- package/dist/context-WFLTTMK3.cjs +0 -24
- package/dist/context-WI2DFG7V.js +0 -7
- package/dist/executor-6CYCA7MI.cjs.map +0 -1
- package/dist/executor-QSEC3MRH.js.map +0 -1
- package/dist/fork-agent-RSV4E3EA.js.map +0 -1
- package/dist/fork-agent-Y2IK2RYU.cjs.map +0 -1
- package/dist/fs-session-store-4PIHT5UX.cjs +0 -20
- package/dist/fs-session-store-NM6YSTE2.js +0 -11
- package/dist/generate-object-GUNAUVBX.js +0 -8
- package/dist/generate-object-R7HTMW7F.cjs +0 -21
- package/dist/index-manager-2SRX45WJ.cjs +0 -27
- package/dist/index-manager-SP4ISSDX.js +0 -18
- package/dist/inject-session-WQKMC3GR.cjs +0 -29
- package/dist/internal/persistence/credential-pool-store.d.cts +0 -32
- package/dist/internal/persistence/credential-pool-store.d.ts +0 -32
- package/dist/internal/runtime/memory/memory-path-selector.d.ts +0 -73
- package/dist/judge-call-LAHMBJ57.cjs +0 -23
- package/dist/judge-call-LVXABPS3.js +0 -6
- package/dist/oauth-transaction-store-BT4GLTLK.cjs +0 -36
- package/dist/oauth-transaction-store-W52KVHQ4.js +0 -3
- package/dist/registry-75W33OGL.js +0 -10
- package/dist/registry-V7BDQ6QB.cjs +0 -47
- package/dist/run-until-HEQOUVU6.js.map +0 -1
- package/dist/run-until-U2B5FJJI.cjs.map +0 -1
- package/dist/server/adapter/express.d.cts +0 -9
- package/dist/server/adapter/express.d.ts +0 -9
- package/dist/server/adapter/fastify.d.cts +0 -9
- package/dist/server/adapter/fastify.d.ts +0 -9
- package/dist/server/adapter/hono.d.cts +0 -9
- package/dist/server/adapter/hono.d.ts +0 -9
- package/dist/server/adapter/shared-handler.d.cts +0 -9
- package/dist/server/adapter/shared-handler.d.ts +0 -9
- package/dist/server/adapter/types.d.cts +0 -33
- package/dist/server/adapter/types.d.ts +0 -33
- package/dist/session-transcript-6WNITKRE.cjs +0 -63
- package/dist/session-transcript-XAEKW6P7.js +0 -6
- package/dist/stream-object-UF4QRQRU.js +0 -8
- package/dist/stream-object-ZJTQNKY3.cjs +0 -21
- package/dist/subagents-loader-UCNO7FUH.cjs +0 -17
- package/dist/subagents-loader-XP5ERVDZ.js +0 -8
- /package/dist/{batch.d.ts → internal/agent/batch.d.ts} +0 -0
- /package/dist/{agent-helpers.d.ts → internal/agent/helpers.d.ts} +0 -0
- /package/dist/internal/agent-loop/{loop-types.d.ts → types.d.ts} +0 -0
- /package/dist/internal/auth/{auth-types.d.ts → types.d.ts} +0 -0
- /package/dist/internal/cloud-agent/{cloud-payload-types.d.ts → types.d.ts} +0 -0
- /package/dist/internal/{runtime/concurrency → concurrency}/abort-utils.d.ts +0 -0
- /package/dist/internal/{runtime/concurrency → concurrency}/async-local-storage.d.ts +0 -0
- /package/dist/internal/{runtime/concurrency → concurrency}/async-semaphore.d.ts +0 -0
- /package/dist/internal/{runtime/concurrency → concurrency}/delegation-depth.d.ts +0 -0
- /package/dist/internal/{runtime/concurrency → concurrency}/map-with-concurrency.d.ts +0 -0
- /package/dist/internal/{runtime/retry → error-mappers}/default-retriable.d.ts +0 -0
- /package/dist/internal/{runtime/fixtures/fixture-types.d.ts → memory/storage/list-markdown.d.cts} +0 -0
- /package/dist/internal/{runtime/plugins/plugins-manager.d.ts → memory/storage/list-markdown.d.ts} +0 -0
- /package/dist/internal/{resilience → retry}/circuit-breaker.d.ts +0 -0
- /package/dist/internal/{runtime/retry → retry}/with-retry.d.ts +0 -0
- /package/dist/internal/{security/secret-redactor.d.cts → runtime/fixtures/types.d.ts} +0 -0
- /package/dist/internal/runtime/{memory → memory-glue}/memory-store.d.ts +0 -0
- /package/dist/internal/runtime/{memory → memory-glue}/select-facts.d.ts +0 -0
- /package/dist/internal/runtime/{plugins → plugin-loader}/plugin-frontmatter.d.ts +0 -0
- /package/dist/internal/{security/secret-redactor.d.ts → runtime/plugin-loader/plugins-manager.d.ts} +0 -0
- /package/dist/internal/runtime/{reasoning → system-prompt}/native-reasoning.d.ts +0 -0
- /package/dist/internal/{runtime/context/path-containment.d.ts → security/path-containment.d.cts} +0 -0
- /package/dist/internal/session/{session-types.d.ts → types.d.ts} +0 -0
- /package/dist/internal/{zod/to-json-schema.d.ts → zod-to-json-schema.d.ts} +0 -0
- /package/dist/subscription/internal/{adapter-types.d.cts → types.d.cts} +0 -0
- /package/dist/subscription/internal/{adapter-types.d.ts → types.d.ts} +0 -0
|
@@ -4,7 +4,7 @@ Every public symbol the TheoKit workspace publishes, and the exact specifier to
|
|
|
4
4
|
|
|
5
5
|
A symbol listed under two specifiers is reachable from both, but that does NOT make the two interchangeable: a class emitted separately into a subpath entry is a distinct nominal type from the one in the root bundle, so passing one where the other is expected fails on a private field. When a symbol appears twice, import it and everything it is passed to from the SAME specifier.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
1189 export(s) across 46 entry point(s).
|
|
8
8
|
|
|
9
9
|
## `@theokit/acp`
|
|
10
10
|
|
|
@@ -67,6 +67,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
67
67
|
| `AgentDisposedError` | class | T1.6 — Thrown when a consumer calls `agent.send()` or any method on an agent that has already been `dispose()`d. |
|
|
68
68
|
| `AgentFactory` | class | Handle returned by {@link createAgentFactory } . |
|
|
69
69
|
| `AgentMemory` | interface | Direct memory API exposed on `SDKAgent.memory`. |
|
|
70
|
+
| `AgentOperation` | type | An operation a consumer may ask an {@link SDKAgent } about via `supports()`. |
|
|
70
71
|
| `AgentOperationOptions` | interface | Options for archive/unarchive/delete. |
|
|
71
72
|
| `AgentOptions` | interface | Top-level options accepted by `Agent.create()`. |
|
|
72
73
|
| `AgentPromptResult` | type | Result of a one-shot {@link Agent.prompt } call. |
|
|
@@ -102,7 +103,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
102
103
|
| `BudgetLimit` | interface | A single limit; stacked in an array (D384, ANY exceeded blocks). |
|
|
103
104
|
| `BudgetMode` | type | Enforcement mode (D383). |
|
|
104
105
|
| `BudgetOptions` | interface | Options for `Budget.create`. |
|
|
105
|
-
| `BudgetScope` | type |
|
|
106
|
+
| `BudgetScope` | type | Accounting scope for a budget. |
|
|
106
107
|
| `BudgetSnapshot` | interface | Per-window snapshot returned by `Budget.snapshot()`. |
|
|
107
108
|
| `BudgetThresholdEvent` | interface | Threshold event emitted at 80% and 95% in `warn` and `block` modes. |
|
|
108
109
|
| `BudgetTotal` | interface | Aggregate snapshot of usage so far. |
|
|
@@ -114,12 +115,15 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
114
115
|
| `CloudEnv` | interface | Cloud execution environment. |
|
|
115
116
|
| `CloudOptions` | interface | Cloud agent configuration. |
|
|
116
117
|
| `CloudRepo` | interface | Repo to clone into a cloud agent's VM. |
|
|
118
|
+
| `CompatSource` | type | A foreign configuration dialect this SDK can read. |
|
|
119
|
+
| `CompatSourceAdapter` | interface | A foreign source admitted to named surfaces only. |
|
|
120
|
+
| `CompatSurface` | type | A surface a foreign configuration source may be admitted to. |
|
|
117
121
|
| `CompletionCheck` | interface | SE34 — the per-send completion criterion (see {@link SendOptions.completionCheck } ). |
|
|
118
122
|
| `CompletionCheckResult` | interface | SE34 — the resolved per-send completion verdict (see {@link RunResult.completionCheck } ). |
|
|
119
123
|
| `computeCost` | function | Returns CostBreakdown with `status="estimated"`, `"unknown"`, or `"included"`. |
|
|
120
124
|
| `ConfigurationError` | class | Invalid model, bad request parameters, malformed options. |
|
|
121
125
|
| `ContextBudget` | interface | Token budget used by the context manager for a single agent. |
|
|
122
|
-
| `ContextManagerKind` | type |
|
|
126
|
+
| `ContextManagerKind` | type | Owner: `src/` (1 of 2 importers). |
|
|
123
127
|
| `ContextSettings` | interface | Context configuration accepted by `Agent.create()` via {@link AgentOptions.context } . |
|
|
124
128
|
| `ContextSnapshot` | interface | Result of `agent.context.snapshot()`. |
|
|
125
129
|
| `ContextSource` | interface | A single context source resolved by the context manager. |
|
|
@@ -164,7 +168,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
164
168
|
| `EnvReachabilityInput` | interface | The three lists the audit compares: every key the product declares, the subset an environment variable can set, and the documented exemptions. |
|
|
165
169
|
| `ErrorCode` | type | Finite, machine-readable error codes for provider-originated errors (ADR D66). |
|
|
166
170
|
| `ErrorMetadata` | interface | Structured context for errors that originated from a provider HTTP call (ADR D65). |
|
|
167
|
-
| `estimateTokens` | function |
|
|
171
|
+
| `estimateTokens` | function | Tokenizer-free token estimate via the conventional ~4-chars-per-token heuristic: `ceil(text.length / CHARS_PER_TOKEN)`. |
|
|
168
172
|
| `evaluateBlastRadius` | function | Decide one declared action against the scopes the operator granted. |
|
|
169
173
|
| `EventBus` | class | A typed publish/subscribe bus, parameterised by a map of event name to payload type. |
|
|
170
174
|
| `EvictReason` | type | Live-agent cache for production deploys (Production-Readiness #2, ADRs D307-D310). |
|
|
@@ -226,6 +230,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
226
230
|
| `MemoryFact` | interface | A single memory fact returned by `recall` or `get`. |
|
|
227
231
|
| `MemoryId` | type | Branded provider memory ID. |
|
|
228
232
|
| `MemoryProvider` | interface | The kernel-facing contract. |
|
|
233
|
+
| `MemoryProviderAgentRef` | interface | The agent identity a `MemoryProvider` is given — the whole of it. |
|
|
229
234
|
| `MemoryProviderFactory` | type | Memory provider factory shape (ADR D141). |
|
|
230
235
|
| `MemoryProviderHandle` | interface | Opaque handle returned by `init()`. |
|
|
231
236
|
| `MemoryProviderInitOptions` | interface | Options for `MemoryProvider.init(...)`. |
|
|
@@ -257,7 +262,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
257
262
|
| `PermissionGate` | type | SE1 — the enriched `canUseTool` gate (the Anthropic-parity shape). |
|
|
258
263
|
| `PermissionGateContext` | interface | SE1 — context passed to the {@link PermissionGate } . |
|
|
259
264
|
| `PermissionGateDecision` | type | SE1 — the resolution of an `"ask"` verdict by the host gate. |
|
|
260
|
-
| `PermissionMode` | type |
|
|
265
|
+
| `PermissionMode` | type | How the permission engine treats the UNMATCHED verdict. |
|
|
261
266
|
| `PermissionPlugin` | class | SE36 — `PermissionPlugin.create` replaces `createPermissionPlugin` (ADR 0015). |
|
|
262
267
|
| `PermissionPluginOptions` | interface | Options for {@link createPermissionPlugin } . |
|
|
263
268
|
| `PermissionRule` | interface | One entry in a {@link PermissionEngine } 's ordered rule list. |
|
|
@@ -265,6 +270,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
265
270
|
| `planReaping` | function | Sort artifacts into keep, reap, and undetermined — and delete nothing. |
|
|
266
271
|
| `Plugin` | type | SE36 — `Plugin.create` replaces `definePlugin` (ADR 0015). |
|
|
267
272
|
| `PluginContext` | interface | The registration surface passed to a `"general"` plugin's `register(ctx)`, and the plugin's only route into the agent. |
|
|
273
|
+
| `PluginHookDisposer` | type | Detaches a hook handler attached with {@link PluginContext.on } . |
|
|
268
274
|
| `PluginsSettings` | interface | Plugins configuration accepted by `Agent.create()` via {@link AgentOptions.plugins } . |
|
|
269
275
|
| `PostAssistantReplyContext` | interface | Context passed to `post_assistant_reply` hook handlers (ADR D145). |
|
|
270
276
|
| `PostToolCallContext` | interface | #65 — context for the `post_tool_call` hook (fired after a tool runs). |
|
|
@@ -278,7 +284,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
278
284
|
| `ProcessorTripwire` | interface | The tripwire detail attached to {@link RunResult.tripwire } when a processor aborts, and carried by the `tripwire` run-event. |
|
|
279
285
|
| `ProcessorViolation` | interface | A policy violation surfaced to a processor's {@link Processor.onViolation } callback — on `abort()` (blocking) AND on `warn()` (non-blocking). |
|
|
280
286
|
| `Provider` | class | SE36 — uniform namespace API. |
|
|
281
|
-
| `ProviderCapability` | type |
|
|
287
|
+
| `ProviderCapability` | type | Owner: `src/` (4 of 9 importers). |
|
|
282
288
|
| `ProviderProfile` | interface | A data-only declaration of an LLM provider: its name, HTTP dialect, auth style, base URL and fallback models. |
|
|
283
289
|
| `ProviderRoute` | interface | A single user-declared routing rule. |
|
|
284
290
|
| `ProviderRoutingSettings` | interface | Provider routing configuration accepted by `Agent.create()` via {@link AgentOptions.providers } . |
|
|
@@ -298,10 +304,11 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
298
304
|
| `RunCompactBoundaryEvent` | interface | The conversation crossed a compaction boundary (history was summarized). |
|
|
299
305
|
| `RunCompletionCheckEvent` | interface | SE34 — the per-send completion check (`isTaskComplete`) produced a verdict. |
|
|
300
306
|
| `RunErrorDetail` | interface | Structured error attached to a {@link RunResult } when the underlying run transitioned to `"error"` status. |
|
|
301
|
-
| `RunEvent` | type |
|
|
302
|
-
| `RunEventSink` | type |
|
|
307
|
+
| `RunEvent` | type | Owner: `internal/agent-loop/` (3 of 11 importers). |
|
|
308
|
+
| `RunEventSink` | type | Receives every {@link RunEvent } a run emits, in emission order. |
|
|
303
309
|
| `RunGitInfo` | interface | Git metadata attached to cloud runs. |
|
|
304
310
|
| `runGoalLoop` | function | Run the goal-driven loop (`send → judge → continuation`) over ANY `send → wait` surface. |
|
|
311
|
+
| `RunMemoryDegradedEvent` | interface | A memory stage failed and the run continued without it. |
|
|
305
312
|
| `RunOperation` | type | Operations that may or may not be supported on a given {@link Run } , or on its parent agent. |
|
|
306
313
|
| `RunPermissionDeniedEvent` | interface | A tool call was DENIED before dispatch — by the permission gate/plugin (SE1), an operator file-hook `preToolUse`, or the fork tool-whitelist. |
|
|
307
314
|
| `RunRateLimitEvent` | interface | The provider returned a rate-limit (HTTP 429); the loop will back off + retry. |
|
|
@@ -340,12 +347,12 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
340
347
|
| `SDKTaskMessage` | interface | Task-level milestones and summaries. |
|
|
341
348
|
| `SDKThinkingMessage` | interface | Reasoning content. |
|
|
342
349
|
| `SDKToolUseMessage` | interface | Tool invocation lifecycle event. |
|
|
343
|
-
| `SDKUser` | interface |
|
|
350
|
+
| `SDKUser` | interface | Owner: `internal/catalog/` (2 of 3 importers). |
|
|
344
351
|
| `SDKUserMessage` | interface | Structured form of `agent.send()`'s message argument. |
|
|
345
352
|
| `SDKUserMessageEvent` | interface | Echo of the user prompt for this run. |
|
|
346
353
|
| `Security` | class | Public security namespace (T2.1, ADR D68). |
|
|
347
354
|
| `SecurityFloorInput` | interface | The vocabulary, the layer names, and the values to resolve. |
|
|
348
|
-
| `SendOptions` | interface | Per-send overrides and callbacks.
|
|
355
|
+
| `SendOptions` | interface | Per-send overrides and callbacks. |
|
|
349
356
|
| `SessionLifecycleContext` | interface | #65 — context for the `on_session_start` / `on_session_end` hooks. |
|
|
350
357
|
| `SessionMessage` | interface | One turn of a session. |
|
|
351
358
|
| `SessionMessagePart` | type | One structured element of a {@link SessionMessage } . |
|
|
@@ -441,7 +448,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
441
448
|
| `UsageAccumulator` | class | Sums the per-step token counts of a multi-step run into one `TokenUsage`. |
|
|
442
449
|
| `UserMessage` | interface | User-authored message in a conversation history. |
|
|
443
450
|
| `UserMessageAppendedUpdate` | interface | User message appended to the conversation. |
|
|
444
|
-
| `Verdict` | type |
|
|
451
|
+
| `Verdict` | type | Owner: `internal/judge/` (3 of 8 importers). |
|
|
445
452
|
| `verifyLayerOrdering` | function | Assert that each layer strictly outranks the one before it. |
|
|
446
453
|
| `WiredEntity` | interface | What one capability asked for, and what it got. |
|
|
447
454
|
| `WiringRecordInput` | interface | The two halves of the observation: the gate that was applied, and what was handed to the builder. |
|
|
@@ -618,7 +625,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
618
625
|
| `memoryMdPath` | function | Path to `MEMORY.md`, the index that points at the per-memory files — and, in stores written before #389, the flat `## Facts` list itself. |
|
|
619
626
|
| `MemoryReadResult` | interface | Result of `reader.readFile`. |
|
|
620
627
|
| `memoryReadRoots` | function | Every directory a read must cover, deduplicated and in precedence order. |
|
|
621
|
-
| `MemoryRoot` | type | A
|
|
628
|
+
| `MemoryRoot` | type | A directory that has been RESOLVED as a memory root, distinguished from a bare `cwd`. |
|
|
622
629
|
| `MemorySearchHit` | interface | Memory index manager contract — leaf types shared by `index-manager.ts` (orchestrator), `index-manager-dispatch.ts` (backend dispatch), `lance-memory-adapter.ts` (Lance backend), and `memory-index.... |
|
|
623
630
|
| `MemorySearchToolOptions` | interface | Options for {@link createMemorySearchTool } . |
|
|
624
631
|
| `MemoryTool` | interface | A memory tool ready to hand to the agent loop: the JSON-serialisable description an LLM sees, plus the `execute` that runs it. |
|
|
@@ -800,6 +807,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
800
807
|
| Symbol | Kind | Summary |
|
|
801
808
|
|---|---|---|
|
|
802
809
|
| `A2AMessage` | interface | One message as a handler receives it. |
|
|
810
|
+
| `A2APeerNotRegisteredError` | class | Thrown by {@link MessageBus.send } and {@link MessageBus.request } when `to` has no registered handler. |
|
|
803
811
|
| `A2ARequestTimeoutError` | class | A peer did not answer a {@link MessageBus.request } within its timeout. |
|
|
804
812
|
| `AgentMailbox` | class | One agent's endpoint on a {@link MessageBus } : registers `agentId` on construction and forwards inbound messages to the handler installed by `onMessage`. |
|
|
805
813
|
| `DelegationCompleteContext` | interface | Context passed to {@link SubAgentSpec.onDelegationComplete } after the child settles. |
|
|
@@ -868,6 +876,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
868
876
|
|---|---|---|
|
|
869
877
|
| `ABSOLUTE_CONTEXT_WINDOW_CAP` | const | Absolute cap on a declared context window, applied when no catalog entry exists to compare against. |
|
|
870
878
|
| `buildCheckpoint` | function | Build a checkpoint marker turn (a `system` turn whose content starts with `marker`, default {@link CHECKPOINT_MARKER } ). |
|
|
879
|
+
| `CHARS_PER_TOKEN` | const | Characters per token in the tokenizer-free estimate below. |
|
|
871
880
|
| `CHECKPOINT_MARKER` | const | Sentinel prefix marking a conversation checkpoint turn. |
|
|
872
881
|
| `compactTranscript` | function | Compact a transcript. |
|
|
873
882
|
| `CompactTranscriptOptions` | interface | Options for {@link compactTranscript } . |
|
|
@@ -878,7 +887,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
878
887
|
| `ContextWindowSource` | type | Where the effective window came from — carried into the M77 structured event. |
|
|
879
888
|
| `EffectiveContextWindow` | interface | Result of {@link resolveEffectiveContextWindow } . |
|
|
880
889
|
| `EffectiveContextWindowInput` | interface | Input to {@link resolveEffectiveContextWindow } . |
|
|
881
|
-
| `estimateTokens` | function | Tokenizer-free token estimate via the conventional ~4-chars-per-token heuristic: `ceil(text.length /
|
|
890
|
+
| `estimateTokens` | function | Tokenizer-free token estimate via the conventional ~4-chars-per-token heuristic: `ceil(text.length / CHARS_PER_TOKEN)`. |
|
|
882
891
|
| `FilterCheckpointOptions` | interface | Options for {@link filterFromLatestCheckpoint } . |
|
|
883
892
|
| `filterFromLatestCheckpoint` | function | Return the turns relative to the most recent checkpoint marker (all turns if none). |
|
|
884
893
|
| `isContextOverflowError` | function | True iff `err` is a {@link TheokitAgentError } (or subclass) reporting a context-window-exceeded condition (the typed `context_too_long` code). |
|
|
@@ -938,6 +947,8 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
938
947
|
| `MemoryAdapterErrorCode` | type | Finite error codes specific to memory adapter operations (ADR D141). |
|
|
939
948
|
| `NetworkError` | class | Service unavailable, timeout, transport-level failure. |
|
|
940
949
|
| `RateLimitError` | class | Too many requests or usage limits exceeded. |
|
|
950
|
+
| `StructuredOutputError` | class | The failure contract shared by `generateObject` and `streamObject`. |
|
|
951
|
+
| `StructuredOutputErrorCode` | type | Why a structured-output call failed. |
|
|
941
952
|
| `TaskNotFoundError` | class | Thrown when `Task.subscribe(id)` is called for a task that has been evicted, never submitted, or evicted after retention (D373). |
|
|
942
953
|
| `TheokitAgentError` | class | Base class for all errors thrown by `@theokit/sdk`. |
|
|
943
954
|
| `UnknownAgentError` | class | Catch-all for unclassified server or runtime errors. |
|
|
@@ -999,7 +1010,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
999
1010
|
| `InteractiveBackend` | class | Pluggable interactive-session backend. |
|
|
1000
1011
|
| `InteractiveProvider` | type | A backend OR a per-request resolver of one — mirrors {@link FilesystemProvider } . |
|
|
1001
1012
|
| `InteractiveUnavailableError` | class | Thrown when the interactive path is requested but no backend can provide it (no provider injected, or a local backend whose native module / spawn failed). |
|
|
1002
|
-
| `NoSuchSessionError` | class | Thrown (typed) when a write/kill targets an unknown or already-exited session, so callers branch on the type instead of string-matching a message.
|
|
1013
|
+
| `NoSuchSessionError` | class | Thrown (typed) when a write/kill targets an unknown or already-exited session, so callers branch on the type instead of string-matching a message. |
|
|
1003
1014
|
| `resolveInteractive` | function | Resolve an {@link InteractiveProvider } to a concrete backend for `ctx`. |
|
|
1004
1015
|
| `StartInteractiveOptions` | interface | Bounds a start call. |
|
|
1005
1016
|
| `StartInteractiveResult` | interface | Result of starting a session: its id + whatever the program printed on startup. |
|
|
@@ -1041,7 +1052,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1041
1052
|
| `MemoryLocationConfig` | type | Only `directory` is read; the full config is accepted so callers pass what they already hold. |
|
|
1042
1053
|
| `memoryMdPath` | function | Path to `MEMORY.md`, the index that points at the per-memory files — and, in stores written before #389, the flat `## Facts` list itself. |
|
|
1043
1054
|
| `memoryReadRoots` | function | Every directory a read must cover, deduplicated and in precedence order. |
|
|
1044
|
-
| `MemoryRoot` | type | A
|
|
1055
|
+
| `MemoryRoot` | type | A directory that has been RESOLVED as a memory root, distinguished from a bare `cwd`. |
|
|
1045
1056
|
| `notesDir` | function | Path to `<memory root>/notes`, where per-topic notes and the consolidated notes a dreaming sweep writes live. |
|
|
1046
1057
|
| `persistActiveMemoryTranscript` | function | Write one active-memory recall transcript under `<memory root>/transcripts/active-memory`. |
|
|
1047
1058
|
| `projectMemoryDir` | function | The project store: `<cwd>/.theokit/memory`. |
|
|
@@ -1184,6 +1195,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1184
1195
|
| `isCorruptionError` | function | True when an open error indicates an unreadable / corrupt database file. |
|
|
1185
1196
|
| `JsonlParseError` | class | Raised when a JSONL line is not valid JSON or is not a JSON object. |
|
|
1186
1197
|
| `LiveSessionError` | class | M81 — the target is a protected session (live pointer / most-recent transcript / active entry). |
|
|
1198
|
+
| `LiveTranscriptError` | class | M81 — the target is a protected session (live pointer / most-recent transcript / active entry). |
|
|
1187
1199
|
| `loadJsonl` | function | Parse a JSONL file into rows. |
|
|
1188
1200
|
| `openSqliteResilient` | function | Open a SQLite file with WAL (+ DELETE fallback) and corruption recovery. |
|
|
1189
1201
|
| `OpenSqliteResilientOptions` | interface | Input to {@link openSqliteResilient } . |
|
|
@@ -1229,7 +1241,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1229
1241
|
|
|
1230
1242
|
| Symbol | Kind | Summary |
|
|
1231
1243
|
|---|---|---|
|
|
1232
|
-
| `Retry` | class | SE36 —
|
|
1244
|
+
| `Retry` | class | SE36 — replaces `withRetry` (ADR 0015 / ADR-P2). |
|
|
1233
1245
|
| `RetryOptions` | interface | Options for {@link withRetry } . |
|
|
1234
1246
|
|
|
1235
1247
|
## `@theokit/sdk/sandbox`
|
|
@@ -1256,9 +1268,9 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1256
1268
|
| `realProbeCount` | function | How many real probes ran. |
|
|
1257
1269
|
| `realProbes` | const | Real probes used in production. |
|
|
1258
1270
|
| `RepoProvisionError` | class | Raised when cloning or checking out a repo fails. |
|
|
1259
|
-
| `resetBwrapMemo` | function |
|
|
1260
|
-
| `resetInteractiveWarnLatch` | function | Reset for tests — the latch is module state and tests need isolation.
|
|
1261
|
-
| `resetSandboxWarnLatch` | function | Test seam: reset the WARN-once latch.
|
|
1271
|
+
| `resetBwrapMemo` | function | Clears the `detectBwrapMemoized` memo. |
|
|
1272
|
+
| `resetInteractiveWarnLatch` | function | Reset for tests — the latch is module state and tests need isolation. |
|
|
1273
|
+
| `resetSandboxWarnLatch` | function | Test seam: reset the WARN-once latch. |
|
|
1262
1274
|
| `resolveSandbox` | function | Resolve a {@link SandboxProvider } to a concrete backend for `ctx`. |
|
|
1263
1275
|
| `resolveSandboxPosture` | function | MEDIUM-2: compute the posture so a surface (TUI footer) can show enforcement DURABLY instead of a one-shot warn. |
|
|
1264
1276
|
| `restrictedSeccompPath` | function | M57 — exported so the interactive PTY backend reuses the SAME memoized x64-gated seccomp program. |
|
|
@@ -1399,7 +1411,7 @@ A symbol listed under two specifiers is reachable from both, but that does NOT m
|
|
|
1399
1411
|
| `WorkflowNotSerializableError` | class | EC-4 absorbed — JSON.stringify failed on snapshot payload. |
|
|
1400
1412
|
| `WorkflowOptions` | interface | Configuration for `Workflow.create()`, validated by Zod before the builder is handed back: a `name` outside 1..128 characters, or `persistence.backend: "json"` without a `dir`, throws there rather ... |
|
|
1401
1413
|
| `WorkflowOutputError` | class | SE27 — the whole-workflow `outputSchema` rejected the final output (on `completed`). |
|
|
1402
|
-
| `WorkflowParallelError` | class | Aggregate failure from parallel branches.
|
|
1414
|
+
| `WorkflowParallelError` | class | Aggregate failure from parallel branches. |
|
|
1403
1415
|
| `WorkflowPersistenceOptions` | interface | Where suspend snapshots are kept. |
|
|
1404
1416
|
| `WorkflowResumeOptions` | interface | Arguments for `Workflow.resume()`. |
|
|
1405
1417
|
| `WorkflowResumeStepNotFoundError` | class | EC-8 absorbed — `currentStepId` from snapshot not found in resumed workflow. |
|
package/docs/memory-decisions.md
CHANGED
|
@@ -219,7 +219,7 @@ index by hand against a non-default directory has to pass it.
|
|
|
219
219
|
process cwd — put the store in two different places, and picking one silently is how a store ends up
|
|
220
220
|
split across both. `ConfigurationError` with code `invalid_memory_directory`.
|
|
221
221
|
|
|
222
|
-
**How to check it still holds:** `tests/memory
|
|
222
|
+
**How to check it still holds:** `tests/memory/root.test.ts`, in particular
|
|
223
223
|
`test_the_indexer_scans_the_configured_directory_so_the_fact_is_searchable` and
|
|
224
224
|
`test_the_project_store_gets_no_second_index_pointing_at_files_it_does_not_have` — the two halves
|
|
225
225
|
that were broken.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theokit/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-next.2",
|
|
4
4
|
"description": "TypeScript SDK for the Theo agent harness — same surface, local or cloud.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/usetheokit/theokit-sdk#readme",
|
|
@@ -362,16 +362,11 @@
|
|
|
362
362
|
},
|
|
363
363
|
"files": [
|
|
364
364
|
"dist",
|
|
365
|
-
"bin",
|
|
366
365
|
"docs",
|
|
367
366
|
"README.md",
|
|
368
367
|
"CHANGELOG.md",
|
|
369
368
|
"LICENSE"
|
|
370
369
|
],
|
|
371
|
-
"bin": {
|
|
372
|
-
"theokit-migrate-config": "./bin/theokit-migrate-config.mjs",
|
|
373
|
-
"theokit-migrate-memory": "./bin/theokit-migrate-memory.mjs"
|
|
374
|
-
},
|
|
375
370
|
"sideEffects": [
|
|
376
371
|
"**/agent.ts",
|
|
377
372
|
"**/agent.js",
|
|
@@ -444,7 +439,8 @@
|
|
|
444
439
|
"proper-lockfile": "^4.1.2",
|
|
445
440
|
"sqlite-vec": "^0.1.9",
|
|
446
441
|
"typedoc": "^0.28.19",
|
|
447
|
-
"ws": "^8.18.0"
|
|
442
|
+
"ws": "^8.18.0",
|
|
443
|
+
"@theokit/sdk-budget": "0.3.5-next.1"
|
|
448
444
|
},
|
|
449
445
|
"scripts": {
|
|
450
446
|
"build": "tsup && cp src/internal/providers/provider-catalog.json dist/provider-catalog.json && node ../../tools/repair-dts-imports.mjs .",
|
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// CLI for markdown config migration (ADR D78).
|
|
4
|
-
// Converts legacy .theokit/hooks.json + .theokit/context.json +
|
|
5
|
-
// .theokit/plugins/<name>/plugin.json to the markdown + YAML frontmatter
|
|
6
|
-
// format (ADR D74).
|
|
7
|
-
//
|
|
8
|
-
// Usage: theokit-migrate-config [--cwd <path>] [--apply] [--no-backup] [--help]
|
|
9
|
-
|
|
10
|
-
import { randomBytes } from "node:crypto";
|
|
11
|
-
import { existsSync } from "node:fs";
|
|
12
|
-
import { mkdir, readdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
13
|
-
import { join } from "node:path";
|
|
14
|
-
|
|
15
|
-
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: arg parser keeps the if/else chain inline for clarity (tiny CLI)
|
|
16
|
-
function parseArgs(argv) {
|
|
17
|
-
const args = {
|
|
18
|
-
cwd: process.cwd(),
|
|
19
|
-
apply: false,
|
|
20
|
-
backup: true,
|
|
21
|
-
help: false,
|
|
22
|
-
};
|
|
23
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
24
|
-
const a = argv[i];
|
|
25
|
-
if (a === "--help" || a === "-h") args.help = true;
|
|
26
|
-
else if (a === "--cwd") args.cwd = argv[++i] ?? args.cwd;
|
|
27
|
-
else if (a === "--apply") args.apply = true;
|
|
28
|
-
else if (a === "--no-backup") args.backup = false;
|
|
29
|
-
}
|
|
30
|
-
return args;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function printHelp() {
|
|
34
|
-
process.stdout.write(
|
|
35
|
-
`theokit-migrate-config — convert .theokit/ JSON configs to markdown (ADR D74-D78)
|
|
36
|
-
|
|
37
|
-
Usage:
|
|
38
|
-
theokit-migrate-config [options]
|
|
39
|
-
|
|
40
|
-
Options:
|
|
41
|
-
--cwd <path> Workspace directory (default: cwd)
|
|
42
|
-
--apply Write the migrated .md files (default: dry-run, prints diff)
|
|
43
|
-
--no-backup Skip renaming originals to .json.<ts>.bak
|
|
44
|
-
--help, -h Show this help
|
|
45
|
-
|
|
46
|
-
Migrates:
|
|
47
|
-
.theokit/hooks.json → .theokit/hooks/<slug>.md
|
|
48
|
-
.theokit/context.json → .theokit/context/<slug>.md
|
|
49
|
-
.theokit/plugins/<name>/plugin.json → .theokit/plugins/<name>/PLUGIN.md
|
|
50
|
-
|
|
51
|
-
Pre-flight aborts if MD destination already exists (avoids overwriting
|
|
52
|
-
manual edits). Atomic write per file (crash mid-write is safe).
|
|
53
|
-
`,
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Atomic write: tmpfile + rename. Mirrors atomicWriteText in the SDK.
|
|
59
|
-
*
|
|
60
|
-
* The suffix comes from `randomBytes`, matching `atomicWriteTempPath` in
|
|
61
|
-
* src/internal/persistence/atomic-write.ts — `<file>.<pid>.<16 hex>.tmp`. It used
|
|
62
|
-
* `Math.random()`, which this comment already claimed it did not: a temp name in a
|
|
63
|
-
* directory an attacker can also write to is guessable, and the window between
|
|
64
|
-
* choosing the name and `rename` is where a symlink gets planted.
|
|
65
|
-
*/
|
|
66
|
-
async function atomicWriteText(filePath, content) {
|
|
67
|
-
await mkdir(join(filePath, ".."), { recursive: true });
|
|
68
|
-
const tmp = `${filePath}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
|
|
69
|
-
await writeFile(tmp, content, "utf8");
|
|
70
|
-
await rename(tmp, filePath);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function timestampSuffix() {
|
|
74
|
-
return String(Math.floor(Date.now() / 1000));
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function slugify(name) {
|
|
78
|
-
return (
|
|
79
|
-
name
|
|
80
|
-
.toLowerCase()
|
|
81
|
-
.replace(/[^a-z0-9_-]+/g, "-")
|
|
82
|
-
.replace(/^-+|-+$/g, "")
|
|
83
|
-
.slice(0, 60) || "unnamed"
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function renderFrontmatter(fields, body) {
|
|
88
|
-
const lines = ["---"];
|
|
89
|
-
for (const [k, v] of Object.entries(fields)) {
|
|
90
|
-
if (v === undefined) continue;
|
|
91
|
-
if (Array.isArray(v)) {
|
|
92
|
-
lines.push(`${k}: [${v.join(", ")}]`);
|
|
93
|
-
} else {
|
|
94
|
-
lines.push(`${k}: ${v}`);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
lines.push("---");
|
|
98
|
-
if (body && body.length > 0) {
|
|
99
|
-
lines.push("");
|
|
100
|
-
lines.push(body);
|
|
101
|
-
}
|
|
102
|
-
lines.push("");
|
|
103
|
-
return lines.join("\n");
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: nested JSON-shape parse + grouping by event — splitting reduces clarity
|
|
107
|
-
async function migrateHooks(cwd, args, plan) {
|
|
108
|
-
const jsonPath = join(cwd, ".theokit", "hooks.json");
|
|
109
|
-
if (!existsSync(jsonPath)) return;
|
|
110
|
-
let parsed;
|
|
111
|
-
try {
|
|
112
|
-
parsed = JSON.parse(await readFile(jsonPath, "utf8"));
|
|
113
|
-
} catch (cause) {
|
|
114
|
-
plan.errors.push(`hooks.json: invalid JSON (${cause.message})`);
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const hookGroups = parsed?.hooks ?? {};
|
|
118
|
-
for (const [event, list] of Object.entries(hookGroups)) {
|
|
119
|
-
if (!Array.isArray(list)) continue;
|
|
120
|
-
for (const [idx, entry] of list.entries()) {
|
|
121
|
-
const slug = `${event}-${idx + 1}`;
|
|
122
|
-
const dest = join(cwd, ".theokit", "hooks", `${slug}.md`);
|
|
123
|
-
const fields = {
|
|
124
|
-
event,
|
|
125
|
-
matcher: entry.matcher ?? ".",
|
|
126
|
-
command: entry.command ?? "",
|
|
127
|
-
};
|
|
128
|
-
if (entry.timeoutMs !== undefined) fields.timeoutMs = entry.timeoutMs;
|
|
129
|
-
const body = `TODO: explain why this hook exists.`;
|
|
130
|
-
const content = renderFrontmatter(fields, body);
|
|
131
|
-
plan.writes.push({ dest, content, kind: "hook" });
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
if (args.backup && plan.writes.some((w) => w.kind === "hook")) {
|
|
135
|
-
plan.backups.push({ from: jsonPath, to: `${jsonPath}.${timestampSuffix()}.bak` });
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
async function migrateContext(cwd, args, plan) {
|
|
140
|
-
const jsonPath = join(cwd, ".theokit", "context.json");
|
|
141
|
-
if (!existsSync(jsonPath)) return;
|
|
142
|
-
let parsed;
|
|
143
|
-
try {
|
|
144
|
-
parsed = JSON.parse(await readFile(jsonPath, "utf8"));
|
|
145
|
-
} catch (cause) {
|
|
146
|
-
plan.errors.push(`context.json: invalid JSON (${cause.message})`);
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
const sources = parsed?.sources ?? [];
|
|
150
|
-
for (const src of sources) {
|
|
151
|
-
if (typeof src?.name !== "string" || typeof src?.path !== "string") continue;
|
|
152
|
-
const slug = slugify(src.name);
|
|
153
|
-
const dest = join(cwd, ".theokit", "context", `${slug}.md`);
|
|
154
|
-
const fields = { name: src.name, path: src.path };
|
|
155
|
-
const body = `TODO: explain why "${src.path}" is part of the agent context.`;
|
|
156
|
-
plan.writes.push({ dest, content: renderFrontmatter(fields, body), kind: "context" });
|
|
157
|
-
}
|
|
158
|
-
if (args.backup && plan.writes.some((w) => w.kind === "context")) {
|
|
159
|
-
plan.backups.push({ from: jsonPath, to: `${jsonPath}.${timestampSuffix()}.bak` });
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: per-plugin shape mapping needs the branch table inline
|
|
164
|
-
async function migratePlugins(cwd, args, plan) {
|
|
165
|
-
const pluginsRoot = join(cwd, ".theokit", "plugins");
|
|
166
|
-
if (!existsSync(pluginsRoot)) return;
|
|
167
|
-
let entries;
|
|
168
|
-
try {
|
|
169
|
-
entries = await readdir(pluginsRoot, { withFileTypes: true });
|
|
170
|
-
} catch {
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
for (const entry of entries) {
|
|
174
|
-
if (!entry.isDirectory()) continue;
|
|
175
|
-
const jsonPath = join(pluginsRoot, entry.name, "plugin.json");
|
|
176
|
-
if (!existsSync(jsonPath)) continue;
|
|
177
|
-
let parsed;
|
|
178
|
-
try {
|
|
179
|
-
parsed = JSON.parse(await readFile(jsonPath, "utf8"));
|
|
180
|
-
} catch (cause) {
|
|
181
|
-
plan.errors.push(`plugins/${entry.name}/plugin.json: invalid JSON (${cause.message})`);
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
const dest = join(pluginsRoot, entry.name, "PLUGIN.md");
|
|
185
|
-
const fields = {};
|
|
186
|
-
if (typeof parsed.name === "string") fields.name = parsed.name;
|
|
187
|
-
if (typeof parsed.version === "string") fields.version = parsed.version;
|
|
188
|
-
if (Array.isArray(parsed.capabilities))
|
|
189
|
-
fields.capabilities = parsed.capabilities.filter((c) => typeof c === "string");
|
|
190
|
-
if (typeof parsed.entry === "string") fields.entry = parsed.entry;
|
|
191
|
-
const body = `TODO: explain what plugin "${entry.name}" does.`;
|
|
192
|
-
plan.writes.push({ dest, content: renderFrontmatter(fields, body), kind: "plugin" });
|
|
193
|
-
if (args.backup) {
|
|
194
|
-
plan.backups.push({ from: jsonPath, to: `${jsonPath}.${timestampSuffix()}.bak` });
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
async function preFlight(plan) {
|
|
200
|
-
const conflicts = [];
|
|
201
|
-
for (const w of plan.writes) {
|
|
202
|
-
if (existsSync(w.dest)) conflicts.push(w.dest);
|
|
203
|
-
}
|
|
204
|
-
return conflicts;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: CLI entry orchestrates plan → preflight → write → backup; splitting hides the linear flow
|
|
208
|
-
async function main() {
|
|
209
|
-
const args = parseArgs(process.argv.slice(2));
|
|
210
|
-
if (args.help) {
|
|
211
|
-
printHelp();
|
|
212
|
-
return 0;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
const plan = { writes: [], backups: [], errors: [] };
|
|
216
|
-
await migrateHooks(args.cwd, args, plan);
|
|
217
|
-
await migrateContext(args.cwd, args, plan);
|
|
218
|
-
await migratePlugins(args.cwd, args, plan);
|
|
219
|
-
|
|
220
|
-
if (plan.errors.length > 0) {
|
|
221
|
-
process.stderr.write(`Errors during migration plan:\n`);
|
|
222
|
-
for (const e of plan.errors) process.stderr.write(` - ${e}\n`);
|
|
223
|
-
return 1;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
if (plan.writes.length === 0) {
|
|
227
|
-
process.stdout.write(
|
|
228
|
-
`Nothing to migrate. No legacy JSON configs found under ${args.cwd}/.theokit/\n`,
|
|
229
|
-
);
|
|
230
|
-
return 0;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
const conflicts = await preFlight(plan);
|
|
234
|
-
if (conflicts.length > 0) {
|
|
235
|
-
process.stderr.write(
|
|
236
|
-
`Pre-flight aborted: destination MD files already exist:\n` +
|
|
237
|
-
conflicts.map((c) => ` - ${c}`).join("\n") +
|
|
238
|
-
`\n\nRemove or merge these files manually, then re-run.\n`,
|
|
239
|
-
);
|
|
240
|
-
return 2;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
if (!args.apply) {
|
|
244
|
-
process.stdout.write(`Migration plan (dry-run; pass --apply to write):\n\n`);
|
|
245
|
-
for (const w of plan.writes) {
|
|
246
|
-
process.stdout.write(` + ${w.dest} [${w.kind}]\n`);
|
|
247
|
-
}
|
|
248
|
-
if (args.backup) {
|
|
249
|
-
process.stdout.write(`\nBackups would be created:\n`);
|
|
250
|
-
for (const b of plan.backups) {
|
|
251
|
-
process.stdout.write(` - ${b.from} → ${b.to}\n`);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
return 0;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
// Apply
|
|
258
|
-
for (const w of plan.writes) {
|
|
259
|
-
await atomicWriteText(w.dest, w.content);
|
|
260
|
-
process.stdout.write(`wrote ${w.dest}\n`);
|
|
261
|
-
}
|
|
262
|
-
if (args.backup) {
|
|
263
|
-
for (const b of plan.backups) {
|
|
264
|
-
await rename(b.from, b.to);
|
|
265
|
-
process.stdout.write(`backed up ${b.from} → ${b.to}\n`);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
process.stdout.write(`\nMigration complete. ${plan.writes.length} file(s) written.\n`);
|
|
269
|
-
return 0;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
main().then(
|
|
273
|
-
(code) => process.exit(code ?? 0),
|
|
274
|
-
(err) => {
|
|
275
|
-
process.stderr.write(`Fatal: ${err?.stack ?? err}\n`);
|
|
276
|
-
process.exit(1);
|
|
277
|
-
},
|
|
278
|
-
);
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// CLI wrapper for memory migration SQLite → Lance (ADR D44).
|
|
4
|
-
//
|
|
5
|
-
// Usage: theokit-migrate-memory [--cwd <path>] [--dry-run] [--keep-sqlite]
|
|
6
|
-
// [--batch-size <n>] [--help]
|
|
7
|
-
|
|
8
|
-
import { rmSync } from "node:fs";
|
|
9
|
-
import { join } from "node:path";
|
|
10
|
-
import { createInterface } from "node:readline/promises";
|
|
11
|
-
|
|
12
|
-
// Resolve the SDK build dist so this script works both from npm-installed
|
|
13
|
-
// `pnpm exec theokit-migrate-memory` and from the workspace.
|
|
14
|
-
import { migrateSqliteToLance } from "../dist/index.js";
|
|
15
|
-
|
|
16
|
-
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: arg parser must enumerate every flag inline; tiny CLI keeps the switch local.
|
|
17
|
-
function parseArgs(argv) {
|
|
18
|
-
const args = {
|
|
19
|
-
cwd: process.cwd(),
|
|
20
|
-
dryRun: false,
|
|
21
|
-
keepSqlite: false,
|
|
22
|
-
batchSize: 100,
|
|
23
|
-
help: false,
|
|
24
|
-
};
|
|
25
|
-
for (let i = 0; i < argv.length; i += 1) {
|
|
26
|
-
const a = argv[i];
|
|
27
|
-
if (a === "--help" || a === "-h") args.help = true;
|
|
28
|
-
else if (a === "--cwd") args.cwd = argv[++i] ?? args.cwd;
|
|
29
|
-
else if (a === "--dry-run") args.dryRun = true;
|
|
30
|
-
else if (a === "--keep-sqlite") args.keepSqlite = true;
|
|
31
|
-
else if (a === "--batch-size") args.batchSize = Number(argv[++i] ?? 100);
|
|
32
|
-
}
|
|
33
|
-
return args;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function printHelp() {
|
|
37
|
-
process.stdout.write(
|
|
38
|
-
`theokit-migrate-memory — migrate Memory.index from SQLite to LanceDB (ADR D44)
|
|
39
|
-
|
|
40
|
-
Usage:
|
|
41
|
-
theokit-migrate-memory [options]
|
|
42
|
-
|
|
43
|
-
Options:
|
|
44
|
-
--cwd <path> Workspace directory (default: cwd)
|
|
45
|
-
--dry-run Read SQLite, validate counts, but DO NOT write Lance
|
|
46
|
-
--keep-sqlite Skip the "delete SQLite db?" prompt
|
|
47
|
-
--batch-size <n> Migration batch size (default: 100)
|
|
48
|
-
--help, -h Show this help
|
|
49
|
-
|
|
50
|
-
Algorithm:
|
|
51
|
-
1. Read all facts from .theokit/memory/index.sqlite
|
|
52
|
-
2. Write to .theokit/memory/lance-new/ (Lance staging dir)
|
|
53
|
-
3. Validate: count match + sample-of-10 NFC unicode-normalized text match
|
|
54
|
-
4. On success: rename lance-new/ → lance/ (atomic commit)
|
|
55
|
-
5. Prompt to delete SQLite db (skipped with --keep-sqlite)
|
|
56
|
-
6. On validation failure: leave SQLite intact, remove lance-new/
|
|
57
|
-
`,
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: main orchestrates the CLI lifecycle (parse, validate, migrate, prompt, exit-code) — keeping it linear matches the user-facing flow.
|
|
62
|
-
async function main() {
|
|
63
|
-
const args = parseArgs(process.argv.slice(2));
|
|
64
|
-
if (args.help) {
|
|
65
|
-
printHelp();
|
|
66
|
-
process.exit(0);
|
|
67
|
-
}
|
|
68
|
-
process.stderr.write(`theokit-migrate-memory: cwd=${args.cwd} dry-run=${args.dryRun}\n`);
|
|
69
|
-
let result;
|
|
70
|
-
try {
|
|
71
|
-
result = await migrateSqliteToLance({
|
|
72
|
-
cwd: args.cwd,
|
|
73
|
-
dryRun: args.dryRun,
|
|
74
|
-
batchSize: args.batchSize,
|
|
75
|
-
logger: (m) => process.stdout.write(`${m}\n`),
|
|
76
|
-
});
|
|
77
|
-
} catch (cause) {
|
|
78
|
-
process.stderr.write(`FAILED: ${cause instanceof Error ? cause.message : String(cause)}\n`);
|
|
79
|
-
process.exit(2);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (result.countSqlite === 0) {
|
|
83
|
-
process.stdout.write("Nothing to migrate (empty workspace).\n");
|
|
84
|
-
process.exit(0);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
process.stdout.write(`\nSummary:\n`);
|
|
88
|
-
process.stdout.write(` SQLite facts: ${result.countSqlite}\n`);
|
|
89
|
-
process.stdout.write(` Lance facts: ${result.countLance}\n`);
|
|
90
|
-
process.stdout.write(
|
|
91
|
-
` Sample compare: ${result.sampleComparisons.filter((c) => c.match).length}/${result.sampleComparisons.length} match\n`,
|
|
92
|
-
);
|
|
93
|
-
process.stdout.write(` Committed: ${result.committed}\n`);
|
|
94
|
-
|
|
95
|
-
if (!result.validated) {
|
|
96
|
-
process.stderr.write("Validation FAILED. SQLite preserved.\n");
|
|
97
|
-
process.exit(3);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (result.committed && !args.keepSqlite) {
|
|
101
|
-
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
102
|
-
const answer = await rl.question(
|
|
103
|
-
`Delete SQLite db at ${join(args.cwd, ".theokit/memory/index.sqlite")}? [y/N] `,
|
|
104
|
-
);
|
|
105
|
-
rl.close();
|
|
106
|
-
if (answer.trim().toLowerCase() === "y") {
|
|
107
|
-
rmSync(join(args.cwd, ".theokit/memory/index.sqlite"), { force: true });
|
|
108
|
-
process.stdout.write("SQLite db deleted.\n");
|
|
109
|
-
} else {
|
|
110
|
-
process.stdout.write("SQLite db preserved.\n");
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
process.exit(0);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
await main();
|