@theokit/sdk 4.40.0 → 4.41.1

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.
Files changed (389) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/README.md +2 -2
  3. package/dist/{agent-BzZwYFiw.d.ts → agent-BiCINq25.d.ts} +2 -2
  4. package/dist/agent-JDJEBJHU.cjs +55 -0
  5. package/dist/{agent-OOXJJD6A.cjs.map → agent-JDJEBJHU.cjs.map} +1 -1
  6. package/dist/agent-LVKAYADR.js +46 -0
  7. package/dist/{agent-MSR3DHO4.js.map → agent-LVKAYADR.js.map} +1 -1
  8. package/dist/{agent-DxEL4fHh.d.cts → agent-Zta1kvGH.d.cts} +2 -2
  9. package/dist/agent-session-store-EPUERCUU.cjs +23 -0
  10. package/dist/{agent-session-store-RHTLZ5OX.cjs.map → agent-session-store-EPUERCUU.cjs.map} +1 -1
  11. package/dist/agent-session-store-TXP5ZVOD.js +6 -0
  12. package/dist/{agent-session-store-EGTTYSKS.js.map → agent-session-store-TXP5ZVOD.js.map} +1 -1
  13. package/dist/auth/index.cjs +19 -15
  14. package/dist/auth/index.d.cts +1 -1
  15. package/dist/auth/index.d.ts +1 -1
  16. package/dist/auth/index.js +4 -4
  17. package/dist/{batch-WX2HLXX2.js → batch-OUF4N2TM.js} +9 -9
  18. package/dist/{batch-WX2HLXX2.js.map → batch-OUF4N2TM.js.map} +1 -1
  19. package/dist/{batch-FO2KZN7W.cjs → batch-URTEXK77.cjs} +26 -26
  20. package/dist/{batch-FO2KZN7W.cjs.map → batch-URTEXK77.cjs.map} +1 -1
  21. package/dist/{chunk-PDOLUFGY.cjs → chunk-27DYRARU.cjs} +4 -4
  22. package/dist/{chunk-PDOLUFGY.cjs.map → chunk-27DYRARU.cjs.map} +1 -1
  23. package/dist/{chunk-LYD3ALDT.js → chunk-2S6B5B2A.js} +5 -5
  24. package/dist/{chunk-LYD3ALDT.js.map → chunk-2S6B5B2A.js.map} +1 -1
  25. package/dist/{chunk-VTDQRUAJ.js → chunk-2WB6EIYW.js} +4 -4
  26. package/dist/{chunk-VTDQRUAJ.js.map → chunk-2WB6EIYW.js.map} +1 -1
  27. package/dist/{chunk-3CAQCFVZ.js → chunk-35NFZ7QB.js} +3 -3
  28. package/dist/{chunk-3CAQCFVZ.js.map → chunk-35NFZ7QB.js.map} +1 -1
  29. package/dist/{chunk-HCRCNI7A.js → chunk-3KY7MHR4.js} +3 -3
  30. package/dist/{chunk-HCRCNI7A.js.map → chunk-3KY7MHR4.js.map} +1 -1
  31. package/dist/{chunk-BURYFNOM.cjs → chunk-4JBHSLQO.cjs} +2 -2
  32. package/dist/chunk-4JBHSLQO.cjs.map +1 -0
  33. package/dist/{chunk-V7CA3CX5.cjs → chunk-4JRRFRV4.cjs} +5 -4
  34. package/dist/chunk-4JRRFRV4.cjs.map +1 -0
  35. package/dist/{chunk-5KOW3GLE.js → chunk-4QEC4CCS.js} +2 -2
  36. package/dist/chunk-4QEC4CCS.js.map +1 -0
  37. package/dist/{chunk-ALDFVGQQ.cjs → chunk-57KX5WTP.cjs} +9 -9
  38. package/dist/{chunk-ALDFVGQQ.cjs.map → chunk-57KX5WTP.cjs.map} +1 -1
  39. package/dist/{chunk-CJHBSSAF.cjs → chunk-64TJCXY5.cjs} +15 -15
  40. package/dist/{chunk-CJHBSSAF.cjs.map → chunk-64TJCXY5.cjs.map} +1 -1
  41. package/dist/{chunk-IEKSEAIV.js → chunk-6FSQ3CHQ.js} +3 -3
  42. package/dist/{chunk-IEKSEAIV.js.map → chunk-6FSQ3CHQ.js.map} +1 -1
  43. package/dist/{chunk-ZVQJHY4Y.cjs → chunk-6W4U2G3J.cjs} +5 -5
  44. package/dist/{chunk-ZVQJHY4Y.cjs.map → chunk-6W4U2G3J.cjs.map} +1 -1
  45. package/dist/{chunk-FMDZZRYE.cjs → chunk-6X2HUT4A.cjs} +8 -8
  46. package/dist/{chunk-FMDZZRYE.cjs.map → chunk-6X2HUT4A.cjs.map} +1 -1
  47. package/dist/{chunk-X2LDDKFM.cjs → chunk-7PESI6YD.cjs} +10 -10
  48. package/dist/{chunk-X2LDDKFM.cjs.map → chunk-7PESI6YD.cjs.map} +1 -1
  49. package/dist/{chunk-EYUZZXHZ.js → chunk-AF4BBKIF.js} +4 -4
  50. package/dist/chunk-AF4BBKIF.js.map +1 -0
  51. package/dist/{chunk-7GFX45DD.js → chunk-AM2CNBKE.js} +2 -2
  52. package/dist/chunk-AM2CNBKE.js.map +1 -0
  53. package/dist/{chunk-2UBBO2MD.js → chunk-AUMSEL33.js} +5 -5
  54. package/dist/{chunk-2UBBO2MD.js.map → chunk-AUMSEL33.js.map} +1 -1
  55. package/dist/{chunk-XKGOIGTJ.js → chunk-AZ6FKDQR.js} +3 -3
  56. package/dist/{chunk-XKGOIGTJ.js.map → chunk-AZ6FKDQR.js.map} +1 -1
  57. package/dist/{chunk-WPZTYOUX.cjs → chunk-BBZYXVLZ.cjs} +2 -2
  58. package/dist/chunk-BBZYXVLZ.cjs.map +1 -0
  59. package/dist/{chunk-LY4KEOOY.cjs → chunk-BRHRQOJA.cjs} +4 -4
  60. package/dist/{chunk-LY4KEOOY.cjs.map → chunk-BRHRQOJA.cjs.map} +1 -1
  61. package/dist/{chunk-4H2QARXM.cjs → chunk-BV42CCRP.cjs} +7 -7
  62. package/dist/{chunk-4H2QARXM.cjs.map → chunk-BV42CCRP.cjs.map} +1 -1
  63. package/dist/{chunk-SKWVAQAY.js → chunk-DEZ75ET5.js} +3 -3
  64. package/dist/{chunk-SKWVAQAY.js.map → chunk-DEZ75ET5.js.map} +1 -1
  65. package/dist/{chunk-ZRQZOJ3N.js → chunk-DHLVOLUX.js} +77 -56
  66. package/dist/chunk-DHLVOLUX.js.map +1 -0
  67. package/dist/{chunk-WJOLIPEM.js → chunk-EON4YTR6.js} +8 -8
  68. package/dist/{chunk-WJOLIPEM.js.map → chunk-EON4YTR6.js.map} +1 -1
  69. package/dist/{chunk-MI3OKONE.js → chunk-F4RUADRC.js} +3 -3
  70. package/dist/{chunk-MI3OKONE.js.map → chunk-F4RUADRC.js.map} +1 -1
  71. package/dist/{chunk-SEWAPWAF.cjs → chunk-FMIKUGF2.cjs} +124 -124
  72. package/dist/chunk-FMIKUGF2.cjs.map +1 -0
  73. package/dist/{chunk-XZ7PO2FM.js → chunk-FRQ6F44U.js} +4 -4
  74. package/dist/{chunk-XZ7PO2FM.js.map → chunk-FRQ6F44U.js.map} +1 -1
  75. package/dist/{chunk-3LK3ZDL5.cjs → chunk-FZ4YMZA3.cjs} +5 -5
  76. package/dist/{chunk-3LK3ZDL5.cjs.map → chunk-FZ4YMZA3.cjs.map} +1 -1
  77. package/dist/{chunk-MM2JKFQV.cjs → chunk-GC44RATP.cjs} +10 -10
  78. package/dist/{chunk-MM2JKFQV.cjs.map → chunk-GC44RATP.cjs.map} +1 -1
  79. package/dist/{chunk-LNTQRD23.cjs → chunk-GH52NOCL.cjs} +26 -26
  80. package/dist/chunk-GH52NOCL.cjs.map +1 -0
  81. package/dist/{chunk-T6KFGMNY.cjs → chunk-GLEKLAUW.cjs} +12 -12
  82. package/dist/chunk-GLEKLAUW.cjs.map +1 -0
  83. package/dist/{chunk-UIPTINIF.js → chunk-GNMPCZNN.js} +6 -6
  84. package/dist/chunk-GNMPCZNN.js.map +1 -0
  85. package/dist/{chunk-6AE4QTSF.cjs → chunk-GTLH2NI2.cjs} +24 -24
  86. package/dist/{chunk-6AE4QTSF.cjs.map → chunk-GTLH2NI2.cjs.map} +1 -1
  87. package/dist/{chunk-K6TWHNT4.cjs → chunk-HECR7KF5.cjs} +11 -11
  88. package/dist/{chunk-K6TWHNT4.cjs.map → chunk-HECR7KF5.cjs.map} +1 -1
  89. package/dist/{chunk-NHXPQN44.js → chunk-HK4HRLWE.js} +3 -3
  90. package/dist/{chunk-NHXPQN44.js.map → chunk-HK4HRLWE.js.map} +1 -1
  91. package/dist/{chunk-LWVKI75U.js → chunk-HKSSM5RK.js} +3 -3
  92. package/dist/{chunk-LWVKI75U.js.map → chunk-HKSSM5RK.js.map} +1 -1
  93. package/dist/{chunk-ELYGL52R.cjs → chunk-HLNLYLNN.cjs} +4 -4
  94. package/dist/{chunk-ELYGL52R.cjs.map → chunk-HLNLYLNN.cjs.map} +1 -1
  95. package/dist/{chunk-ONVIALVV.js → chunk-IMX5YODO.js} +15 -15
  96. package/dist/chunk-IMX5YODO.js.map +1 -0
  97. package/dist/{chunk-C64E2EJS.js → chunk-J5RW43IR.js} +4 -4
  98. package/dist/{chunk-C64E2EJS.js.map → chunk-J5RW43IR.js.map} +1 -1
  99. package/dist/{chunk-4E3HLSYE.cjs → chunk-JA4FEA5Z.cjs} +4 -4
  100. package/dist/{chunk-4E3HLSYE.cjs.map → chunk-JA4FEA5Z.cjs.map} +1 -1
  101. package/dist/{chunk-EJNFZET4.cjs → chunk-JO76RWCA.cjs} +11 -11
  102. package/dist/{chunk-EJNFZET4.cjs.map → chunk-JO76RWCA.cjs.map} +1 -1
  103. package/dist/{chunk-QMIG7TKG.cjs → chunk-KCQUYQ3V.cjs} +17 -17
  104. package/dist/chunk-KCQUYQ3V.cjs.map +1 -0
  105. package/dist/{chunk-AKMPQJPX.js → chunk-L4JFQCG4.js} +5 -5
  106. package/dist/chunk-L4JFQCG4.js.map +1 -0
  107. package/dist/{chunk-HJMFPIRM.js → chunk-LLE7HPRI.js} +5 -5
  108. package/dist/{chunk-HJMFPIRM.js.map → chunk-LLE7HPRI.js.map} +1 -1
  109. package/dist/{chunk-4H2DCO6P.js → chunk-LXKNENHK.js} +3 -3
  110. package/dist/{chunk-4H2DCO6P.js.map → chunk-LXKNENHK.js.map} +1 -1
  111. package/dist/{chunk-PY7G7YWK.cjs → chunk-MMZX557L.cjs} +5 -5
  112. package/dist/{chunk-PY7G7YWK.cjs.map → chunk-MMZX557L.cjs.map} +1 -1
  113. package/dist/{chunk-VQ33XLC6.js → chunk-MRKSSN36.js} +3 -3
  114. package/dist/{chunk-VQ33XLC6.js.map → chunk-MRKSSN36.js.map} +1 -1
  115. package/dist/{chunk-33B2BSME.cjs → chunk-NETYW4V3.cjs} +13 -5
  116. package/dist/chunk-NETYW4V3.cjs.map +1 -0
  117. package/dist/{chunk-OVGNXGCK.cjs → chunk-NNNUQELM.cjs} +9 -9
  118. package/dist/{chunk-OVGNXGCK.cjs.map → chunk-NNNUQELM.cjs.map} +1 -1
  119. package/dist/{chunk-BM7VYZED.js → chunk-NOM2YWFP.js} +5 -5
  120. package/dist/{chunk-BM7VYZED.js.map → chunk-NOM2YWFP.js.map} +1 -1
  121. package/dist/{chunk-WMWZAJMJ.cjs → chunk-NRA36JKG.cjs} +11 -11
  122. package/dist/{chunk-WMWZAJMJ.cjs.map → chunk-NRA36JKG.cjs.map} +1 -1
  123. package/dist/{chunk-4HKAZRTC.js → chunk-O3IZ7JEL.js} +3 -3
  124. package/dist/{chunk-4HKAZRTC.js.map → chunk-O3IZ7JEL.js.map} +1 -1
  125. package/dist/{chunk-RHQJX3EI.cjs → chunk-OEFFPR2S.cjs} +4 -4
  126. package/dist/{chunk-RHQJX3EI.cjs.map → chunk-OEFFPR2S.cjs.map} +1 -1
  127. package/dist/{chunk-4GGXF7YM.js → chunk-OLLOUAUJ.js} +3 -3
  128. package/dist/{chunk-4GGXF7YM.js.map → chunk-OLLOUAUJ.js.map} +1 -1
  129. package/dist/{chunk-RA2UZBYP.js → chunk-PAV4ZPSW.js} +3 -3
  130. package/dist/{chunk-RA2UZBYP.js.map → chunk-PAV4ZPSW.js.map} +1 -1
  131. package/dist/{chunk-RNCN2TTP.js → chunk-PBML2FHN.js} +2 -2
  132. package/dist/{chunk-A76OFN2B.cjs.map → chunk-PBML2FHN.js.map} +1 -1
  133. package/dist/{chunk-XRKFWV7K.js → chunk-PYM5OUL4.js} +5 -5
  134. package/dist/{chunk-XRKFWV7K.js.map → chunk-PYM5OUL4.js.map} +1 -1
  135. package/dist/{chunk-F4SQTWVR.js → chunk-Q4DTGCSD.js} +3 -3
  136. package/dist/{chunk-F4SQTWVR.js.map → chunk-Q4DTGCSD.js.map} +1 -1
  137. package/dist/{chunk-S7OEXQMI.cjs → chunk-R3CKCRK3.cjs} +4 -4
  138. package/dist/{chunk-S7OEXQMI.cjs.map → chunk-R3CKCRK3.cjs.map} +1 -1
  139. package/dist/{chunk-5COPO3H4.cjs → chunk-RBQYHEZD.cjs} +4 -4
  140. package/dist/{chunk-5COPO3H4.cjs.map → chunk-RBQYHEZD.cjs.map} +1 -1
  141. package/dist/{chunk-KRPEPZQY.js → chunk-RJBHWM6D.js} +7 -7
  142. package/dist/chunk-RJBHWM6D.js.map +1 -0
  143. package/dist/{chunk-BVGJXMSB.cjs → chunk-RPL3POFZ.cjs} +336 -315
  144. package/dist/chunk-RPL3POFZ.cjs.map +1 -0
  145. package/dist/{chunk-U53AYSHS.cjs → chunk-S4Q5OMIK.cjs} +11 -11
  146. package/dist/{chunk-U53AYSHS.cjs.map → chunk-S4Q5OMIK.cjs.map} +1 -1
  147. package/dist/{chunk-FUP3ZA5T.js → chunk-SNKY3C2L.js} +4 -4
  148. package/dist/{chunk-FUP3ZA5T.js.map → chunk-SNKY3C2L.js.map} +1 -1
  149. package/dist/{chunk-BBMN4O6E.js → chunk-TJRPNBY5.js} +4 -4
  150. package/dist/{chunk-BBMN4O6E.js.map → chunk-TJRPNBY5.js.map} +1 -1
  151. package/dist/{chunk-27E4EMR6.cjs → chunk-UJMEWGO6.cjs} +4 -4
  152. package/dist/{chunk-27E4EMR6.cjs.map → chunk-UJMEWGO6.cjs.map} +1 -1
  153. package/dist/{chunk-X627TO3A.js → chunk-UTYCG4RB.js} +12 -12
  154. package/dist/chunk-UTYCG4RB.js.map +1 -0
  155. package/dist/{chunk-5XPKYDK7.js → chunk-VQFSEKU5.js} +12 -5
  156. package/dist/chunk-VQFSEKU5.js.map +1 -0
  157. package/dist/{chunk-NJVV5OAV.cjs → chunk-WCXOKGOQ.cjs} +8 -8
  158. package/dist/chunk-WCXOKGOQ.cjs.map +1 -0
  159. package/dist/{chunk-PIBXDEZM.cjs → chunk-WIGJGFH4.cjs} +5 -5
  160. package/dist/{chunk-PIBXDEZM.cjs.map → chunk-WIGJGFH4.cjs.map} +1 -1
  161. package/dist/{chunk-LOTWA65Z.cjs → chunk-X2YQP452.cjs} +11 -11
  162. package/dist/{chunk-LOTWA65Z.cjs.map → chunk-X2YQP452.cjs.map} +1 -1
  163. package/dist/{chunk-ZAKTZ5B4.cjs → chunk-XA3TSBAH.cjs} +8 -8
  164. package/dist/{chunk-ZAKTZ5B4.cjs.map → chunk-XA3TSBAH.cjs.map} +1 -1
  165. package/dist/{chunk-H2V6CXM7.cjs → chunk-XR4LPBXH.cjs} +9 -9
  166. package/dist/{chunk-H2V6CXM7.cjs.map → chunk-XR4LPBXH.cjs.map} +1 -1
  167. package/dist/{chunk-E7WWIX34.cjs → chunk-YULF6FPB.cjs} +8 -8
  168. package/dist/{chunk-E7WWIX34.cjs.map → chunk-YULF6FPB.cjs.map} +1 -1
  169. package/dist/{chunk-23HI77BZ.js → chunk-Z6N6SDNR.js} +4 -4
  170. package/dist/chunk-Z6N6SDNR.js.map +1 -0
  171. package/dist/{chunk-A76OFN2B.cjs → chunk-ZHPET3LZ.cjs} +2 -2
  172. package/dist/chunk-ZHPET3LZ.cjs.map +1 -0
  173. package/dist/{chunk-5VKUZ26Q.js → chunk-ZNW2TXLO.js} +3 -3
  174. package/dist/{chunk-5VKUZ26Q.js.map → chunk-ZNW2TXLO.js.map} +1 -1
  175. package/dist/{chunk-N4JNY5DT.cjs → chunk-ZO2L5U6F.cjs} +32 -32
  176. package/dist/chunk-ZO2L5U6F.cjs.map +1 -0
  177. package/dist/{chunk-RMCHJZNZ.js → chunk-ZS6SLELQ.js} +4 -4
  178. package/dist/{chunk-RMCHJZNZ.js.map → chunk-ZS6SLELQ.js.map} +1 -1
  179. package/dist/{chunk-7PBAJ2WA.js → chunk-ZTEAJAE6.js} +3 -3
  180. package/dist/{chunk-7PBAJ2WA.js.map → chunk-ZTEAJAE6.js.map} +1 -1
  181. package/dist/compact-session-65XCKO6H.js +18 -0
  182. package/dist/{compact-session-AZU2LEAE.js.map → compact-session-65XCKO6H.js.map} +1 -1
  183. package/dist/compact-session-OU6SRPVJ.cjs +55 -0
  184. package/dist/{compact-session-TRCEYCPG.cjs.map → compact-session-OU6SRPVJ.cjs.map} +1 -1
  185. package/dist/compaction.cjs +16 -16
  186. package/dist/compaction.js +3 -3
  187. package/dist/concurrency.cjs +6 -6
  188. package/dist/concurrency.js +4 -4
  189. package/dist/context-2G4375BZ.cjs +22 -0
  190. package/dist/{context-DNFT4B5D.cjs.map → context-2G4375BZ.cjs.map} +1 -1
  191. package/dist/context-GSQYVVMJ.js +5 -0
  192. package/dist/{context-LYE6TJL5.js.map → context-GSQYVVMJ.js.map} +1 -1
  193. package/dist/{cron-BGR0HOz9.d.cts → cron-DgHJnMAK.d.cts} +2 -2
  194. package/dist/{cron-CDAIWCrL.d.ts → cron-DyWQsEG6.d.ts} +2 -2
  195. package/dist/cron.cjs +33 -33
  196. package/dist/cron.d.cts +3 -3
  197. package/dist/cron.d.ts +3 -3
  198. package/dist/cron.js +32 -32
  199. package/dist/{errors-DxQe4_Qy.d.ts → errors-BSoXcl3F.d.cts} +3 -3
  200. package/dist/{errors-L1bxHHO0.d.cts → errors-CHllybaU.d.ts} +3 -3
  201. package/dist/errors.cjs +21 -21
  202. package/dist/errors.d.cts +2 -2
  203. package/dist/errors.d.ts +2 -2
  204. package/dist/errors.js +2 -2
  205. package/dist/eval.cjs +43 -43
  206. package/dist/eval.cjs.map +1 -1
  207. package/dist/eval.js +33 -33
  208. package/dist/eval.js.map +1 -1
  209. package/dist/{executor-TQ3FSZ7F.cjs → executor-CB75B5BH.cjs} +24 -24
  210. package/dist/{executor-TQ3FSZ7F.cjs.map → executor-CB75B5BH.cjs.map} +1 -1
  211. package/dist/{executor-PCRX3533.js → executor-VQLTQY53.js} +7 -7
  212. package/dist/{executor-PCRX3533.js.map → executor-VQLTQY53.js.map} +1 -1
  213. package/dist/filesystem/index.cjs +7 -7
  214. package/dist/filesystem/index.js +3 -3
  215. package/dist/fs-session-store-MAZV5FXJ.cjs +19 -0
  216. package/dist/{fs-session-store-KRZZIG3O.cjs.map → fs-session-store-MAZV5FXJ.cjs.map} +1 -1
  217. package/dist/fs-session-store-ZNUYZHYI.js +10 -0
  218. package/dist/{fs-session-store-I6GUIFRO.js.map → fs-session-store-ZNUYZHYI.js.map} +1 -1
  219. package/dist/generate-object-6PWGH5DZ.cjs +20 -0
  220. package/dist/{generate-object-QILSGTEJ.cjs.map → generate-object-6PWGH5DZ.cjs.map} +1 -1
  221. package/dist/generate-object-IXMJ7FUX.js +7 -0
  222. package/dist/{generate-object-DLHT5RXH.js.map → generate-object-IXMJ7FUX.js.map} +1 -1
  223. package/dist/index-manager-X5IPG2JL.js +11 -0
  224. package/dist/{index-manager-SXF3FAQV.js.map → index-manager-X5IPG2JL.js.map} +1 -1
  225. package/dist/index-manager-YFFEPISE.cjs +20 -0
  226. package/dist/{index-manager-LEMQ73A7.cjs.map → index-manager-YFFEPISE.cjs.map} +1 -1
  227. package/dist/index.cjs +139 -139
  228. package/dist/index.cjs.map +1 -1
  229. package/dist/index.d.cts +13 -13
  230. package/dist/index.d.ts +13 -13
  231. package/dist/index.js +53 -53
  232. package/dist/index.js.map +1 -1
  233. package/dist/{inject-session-BVSERZCI.cjs → inject-session-DDC36KKP.cjs} +11 -11
  234. package/dist/{inject-session-BVSERZCI.cjs.map → inject-session-DDC36KKP.cjs.map} +1 -1
  235. package/dist/{inject-session-E75EP3LL.js → inject-session-UBM4KVSV.js} +8 -8
  236. package/dist/{inject-session-E75EP3LL.js.map → inject-session-UBM4KVSV.js.map} +1 -1
  237. package/dist/internal/auth/credential-store.d.ts +13 -0
  238. package/dist/internal/diagnostics.d.ts +2 -2
  239. package/dist/internal/error-mappers/anthropic.d.ts +1 -1
  240. package/dist/internal/eval/code-runner.d.ts +1 -1
  241. package/dist/internal/global-singleton.d.ts +1 -1
  242. package/dist/internal/judge/judge-call.d.ts +1 -1
  243. package/dist/internal/memory/adapters/index.cjs +8 -8
  244. package/dist/internal/memory/adapters/index.js +7 -7
  245. package/dist/internal/memory/embedding-adapter.d.ts +1 -1
  246. package/dist/internal/memory/memory-index.d.ts +1 -1
  247. package/dist/internal/persistence/atomic-write.d.cts +14 -1
  248. package/dist/internal/persistence/atomic-write.d.ts +14 -1
  249. package/dist/internal/persistence/index.cjs +25 -25
  250. package/dist/internal/persistence/index.js +6 -6
  251. package/dist/internal/persistence/jsonl.d.cts +2 -2
  252. package/dist/internal/persistence/jsonl.d.ts +2 -2
  253. package/dist/internal/persistence/session-artifacts.d.cts +27 -0
  254. package/dist/internal/persistence/session-artifacts.d.ts +27 -0
  255. package/dist/internal/persistence/session-transcript.d.cts +1 -1
  256. package/dist/internal/persistence/session-transcript.d.ts +1 -1
  257. package/dist/internal/runtime/context/context-discovery-runner.d.ts +9 -0
  258. package/dist/internal/runtime/context/context-import-resolver.d.ts +17 -0
  259. package/dist/internal/runtime/lifecycle/env-policy.d.ts +1 -1
  260. package/dist/internal/security/index.cjs +13 -13
  261. package/dist/internal/security/index.js +3 -3
  262. package/dist/internal/session/agent-session.d.ts +1 -1
  263. package/dist/internal/session/compact-session.d.ts +1 -1
  264. package/dist/internal/session/session-cache.d.ts +1 -1
  265. package/dist/judge-call-3QZO5H5N.js +5 -0
  266. package/dist/{judge-call-NPRU7JIQ.js.map → judge-call-3QZO5H5N.js.map} +1 -1
  267. package/dist/judge-call-J5EETJL3.cjs +22 -0
  268. package/dist/{judge-call-AIT3EULV.cjs.map → judge-call-J5EETJL3.cjs.map} +1 -1
  269. package/dist/models.cjs +20 -20
  270. package/dist/models.cjs.map +1 -1
  271. package/dist/models.js +5 -5
  272. package/dist/models.js.map +1 -1
  273. package/dist/path-safety.cjs +10 -10
  274. package/dist/path-safety.js +3 -3
  275. package/dist/persistence.cjs +44 -30
  276. package/dist/persistence.cjs.map +1 -1
  277. package/dist/persistence.d.cts +4 -3
  278. package/dist/persistence.d.ts +4 -3
  279. package/dist/persistence.js +22 -12
  280. package/dist/persistence.js.map +1 -1
  281. package/dist/project.cjs +5 -5
  282. package/dist/project.js +3 -3
  283. package/dist/registry-KB3TS6BM.cjs +46 -0
  284. package/dist/{registry-VKDFTK6L.cjs.map → registry-KB3TS6BM.cjs.map} +1 -1
  285. package/dist/registry-PPFMCM4A.js +9 -0
  286. package/dist/{registry-AXQXPLFH.js.map → registry-PPFMCM4A.js.map} +1 -1
  287. package/dist/retry.cjs +4 -4
  288. package/dist/retry.js +3 -3
  289. package/dist/{run-XXnwwGOT.d.ts → run-C8FBAC8o.d.cts} +21 -2
  290. package/dist/{run-XXnwwGOT.d.cts → run-C8FBAC8o.d.ts} +21 -2
  291. package/dist/{run-until-BK56WG4P.js → run-until-HEQOUVU6.js} +2 -2
  292. package/dist/run-until-HEQOUVU6.js.map +1 -0
  293. package/dist/{run-until-L5KQD3PV.cjs → run-until-U2B5FJJI.cjs} +2 -2
  294. package/dist/run-until-U2B5FJJI.cjs.map +1 -0
  295. package/dist/sandbox/bwrap.d.cts +15 -1
  296. package/dist/sandbox/bwrap.d.ts +15 -1
  297. package/dist/sandbox/index.cjs +39 -24
  298. package/dist/sandbox/index.cjs.map +1 -1
  299. package/dist/sandbox/index.d.cts +1 -1
  300. package/dist/sandbox/index.d.ts +1 -1
  301. package/dist/sandbox/index.js +24 -10
  302. package/dist/sandbox/index.js.map +1 -1
  303. package/dist/sandbox/provision.d.cts +1 -1
  304. package/dist/sandbox/provision.d.ts +1 -1
  305. package/dist/server/errors-envelope.cjs +14 -14
  306. package/dist/server/errors-envelope.d.cts +3 -3
  307. package/dist/server/errors-envelope.d.ts +3 -3
  308. package/dist/server/errors-envelope.js +3 -3
  309. package/dist/session-transcript-7FWTO4BK.js +5 -0
  310. package/dist/{session-transcript-X3UMSVL2.js.map → session-transcript-7FWTO4BK.js.map} +1 -1
  311. package/dist/session-transcript-FYRKWRWV.cjs +50 -0
  312. package/dist/{session-transcript-SLQRKQ72.cjs.map → session-transcript-FYRKWRWV.cjs.map} +1 -1
  313. package/dist/skills.cjs +7 -7
  314. package/dist/skills.js +5 -5
  315. package/dist/stream-object-3R3HZPQN.cjs +20 -0
  316. package/dist/{stream-object-3HEUGMQY.cjs.map → stream-object-3R3HZPQN.cjs.map} +1 -1
  317. package/dist/stream-object-NPJXDZXO.js +7 -0
  318. package/dist/{stream-object-VWYW7FJ2.js.map → stream-object-NPJXDZXO.js.map} +1 -1
  319. package/dist/subagents-loader-5KQVYUNS.js +6 -0
  320. package/dist/{subagents-loader-QUIK6GMV.js.map → subagents-loader-5KQVYUNS.js.map} +1 -1
  321. package/dist/subagents-loader-FDXPBBRA.cjs +15 -0
  322. package/dist/{subagents-loader-F52ARQ62.cjs.map → subagents-loader-FDXPBBRA.cjs.map} +1 -1
  323. package/dist/subagents-loader.cjs +15 -15
  324. package/dist/subagents-loader.cjs.map +1 -1
  325. package/dist/subagents-loader.d.cts +2 -2
  326. package/dist/subagents-loader.d.ts +2 -2
  327. package/dist/subagents-loader.js +14 -14
  328. package/dist/subagents-loader.js.map +1 -1
  329. package/dist/subscription/index.cjs +3 -3
  330. package/dist/subscription/index.js +2 -2
  331. package/dist/task-store.cjs +7 -7
  332. package/dist/task-store.js +4 -4
  333. package/dist/types/run-events.d.ts +20 -1
  334. package/dist/types/session-record.d.ts +1 -1
  335. package/dist/types/usage.d.ts +1 -1
  336. package/dist/workflow.cjs +27 -27
  337. package/dist/workflow.js +6 -6
  338. package/docs/error-codes.md +22 -0
  339. package/docs/harness-capability-map.md +22 -0
  340. package/package.json +1 -1
  341. package/dist/agent-MSR3DHO4.js +0 -46
  342. package/dist/agent-OOXJJD6A.cjs +0 -55
  343. package/dist/agent-session-store-EGTTYSKS.js +0 -6
  344. package/dist/agent-session-store-RHTLZ5OX.cjs +0 -23
  345. package/dist/chunk-23HI77BZ.js.map +0 -1
  346. package/dist/chunk-33B2BSME.cjs.map +0 -1
  347. package/dist/chunk-5KOW3GLE.js.map +0 -1
  348. package/dist/chunk-5XPKYDK7.js.map +0 -1
  349. package/dist/chunk-7GFX45DD.js.map +0 -1
  350. package/dist/chunk-AKMPQJPX.js.map +0 -1
  351. package/dist/chunk-BURYFNOM.cjs.map +0 -1
  352. package/dist/chunk-BVGJXMSB.cjs.map +0 -1
  353. package/dist/chunk-EYUZZXHZ.js.map +0 -1
  354. package/dist/chunk-KRPEPZQY.js.map +0 -1
  355. package/dist/chunk-LNTQRD23.cjs.map +0 -1
  356. package/dist/chunk-N4JNY5DT.cjs.map +0 -1
  357. package/dist/chunk-NJVV5OAV.cjs.map +0 -1
  358. package/dist/chunk-ONVIALVV.js.map +0 -1
  359. package/dist/chunk-QMIG7TKG.cjs.map +0 -1
  360. package/dist/chunk-RNCN2TTP.js.map +0 -1
  361. package/dist/chunk-SEWAPWAF.cjs.map +0 -1
  362. package/dist/chunk-T6KFGMNY.cjs.map +0 -1
  363. package/dist/chunk-UIPTINIF.js.map +0 -1
  364. package/dist/chunk-V7CA3CX5.cjs.map +0 -1
  365. package/dist/chunk-WPZTYOUX.cjs.map +0 -1
  366. package/dist/chunk-X627TO3A.js.map +0 -1
  367. package/dist/chunk-ZRQZOJ3N.js.map +0 -1
  368. package/dist/compact-session-AZU2LEAE.js +0 -18
  369. package/dist/compact-session-TRCEYCPG.cjs +0 -55
  370. package/dist/context-DNFT4B5D.cjs +0 -22
  371. package/dist/context-LYE6TJL5.js +0 -5
  372. package/dist/fs-session-store-I6GUIFRO.js +0 -10
  373. package/dist/fs-session-store-KRZZIG3O.cjs +0 -19
  374. package/dist/generate-object-DLHT5RXH.js +0 -7
  375. package/dist/generate-object-QILSGTEJ.cjs +0 -20
  376. package/dist/index-manager-LEMQ73A7.cjs +0 -20
  377. package/dist/index-manager-SXF3FAQV.js +0 -11
  378. package/dist/judge-call-AIT3EULV.cjs +0 -22
  379. package/dist/judge-call-NPRU7JIQ.js +0 -5
  380. package/dist/registry-AXQXPLFH.js +0 -9
  381. package/dist/registry-VKDFTK6L.cjs +0 -46
  382. package/dist/run-until-BK56WG4P.js.map +0 -1
  383. package/dist/run-until-L5KQD3PV.cjs.map +0 -1
  384. package/dist/session-transcript-SLQRKQ72.cjs +0 -50
  385. package/dist/session-transcript-X3UMSVL2.js +0 -5
  386. package/dist/stream-object-3HEUGMQY.cjs +0 -20
  387. package/dist/stream-object-VWYW7FJ2.js +0 -7
  388. package/dist/subagents-loader-F52ARQ62.cjs +0 -15
  389. package/dist/subagents-loader-QUIK6GMV.js +0 -6
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkN4JNY5DT_cjs = require('./chunk-N4JNY5DT.cjs');
4
- var chunkBURYFNOM_cjs = require('./chunk-BURYFNOM.cjs');
5
- require('./chunk-3LK3ZDL5.cjs');
6
- var chunkNJVV5OAV_cjs = require('./chunk-NJVV5OAV.cjs');
7
- require('./chunk-33B2BSME.cjs');
8
- require('./chunk-A76OFN2B.cjs');
3
+ var chunkZO2L5U6F_cjs = require('./chunk-ZO2L5U6F.cjs');
4
+ var chunk4JBHSLQO_cjs = require('./chunk-4JBHSLQO.cjs');
5
+ require('./chunk-FZ4YMZA3.cjs');
6
+ var chunkWCXOKGOQ_cjs = require('./chunk-WCXOKGOQ.cjs');
7
+ require('./chunk-NETYW4V3.cjs');
8
+ require('./chunk-ZHPET3LZ.cjs');
9
9
 
10
10
  // src/internal/session/inject-session.ts
11
11
  async function injectSessionTurn(opts) {
12
- await chunkN4JNY5DT_cjs.enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {
12
+ await chunkZO2L5U6F_cjs.enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {
13
13
  const prior = await opts.store.readRecords(opts.loc.agentId);
14
- const transcript = chunkNJVV5OAV_cjs.SessionTranscript.fromRecords(prior, {
14
+ const transcript = chunkWCXOKGOQ_cjs.SessionTranscript.fromRecords(prior, {
15
15
  cwd: opts.loc.cwd,
16
16
  sessionId: opts.sessionId,
17
17
  model: opts.loc.model ?? "unknown"
@@ -19,10 +19,10 @@ async function injectSessionTurn(opts) {
19
19
  transcript.appendUserTurn(opts.userText);
20
20
  transcript.appendAssistantTurn({ text: opts.assistantText });
21
21
  await opts.store.appendRecords(opts.loc.agentId, transcript.records().slice(prior.length));
22
- chunkBURYFNOM_cjs.invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);
22
+ chunk4JBHSLQO_cjs.invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);
23
23
  });
24
24
  }
25
25
 
26
26
  exports.injectSessionTurn = injectSessionTurn;
27
- //# sourceMappingURL=inject-session-BVSERZCI.cjs.map
28
- //# sourceMappingURL=inject-session-BVSERZCI.cjs.map
27
+ //# sourceMappingURL=inject-session-DDC36KKP.cjs.map
28
+ //# sourceMappingURL=inject-session-DDC36KKP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":["enqueueSessionWrite","SessionTranscript","invalidateSessionCache"],"mappings":";;;;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAMA,sCAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAaC,mCAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAAC,wCAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-BVSERZCI.cjs","sourcesContent":["/**\n * M51 (agent-builder) — inject a SYNTHETIC user+assistant pair into a session's persisted transcript\n * WITHOUT running an LLM turn. This is the Codex review-exit mechanism (`exit_success.xml` appended to\n * the parent thread history so follow-ups like \"fix finding 2\" work): the pair chains onto the DAG\n * leaf (M50 pattern) and the in-memory cache is invalidated so the NEXT send re-hydrates with it.\n */\nimport type { SessionStore } from \"../../types/session-store.js\";\nimport { SessionTranscript } from \"../persistence/session-transcript.js\";\nimport { enqueueSessionWrite, invalidateSessionCache } from \"./agent-session.js\";\nimport type { CompactLocation } from \"./compact-session.js\";\n\nexport async function injectSessionTurn(opts: {\n store: SessionStore;\n loc: CompactLocation;\n sessionId: string;\n userText: string;\n assistantText: string;\n}): Promise<void> {\n await enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {\n const prior = await opts.store.readRecords(opts.loc.agentId);\n const transcript = SessionTranscript.fromRecords(prior, {\n cwd: opts.loc.cwd,\n sessionId: opts.sessionId,\n model: opts.loc.model ?? \"unknown\",\n });\n transcript.appendUserTurn(opts.userText);\n transcript.appendAssistantTurn({ text: opts.assistantText });\n await opts.store.appendRecords(opts.loc.agentId, transcript.records().slice(prior.length));\n invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);\n });\n}\n"]}
1
+ {"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":["enqueueSessionWrite","SessionTranscript","invalidateSessionCache"],"mappings":";;;;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAMA,sCAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAaC,mCAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAAC,wCAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-DDC36KKP.cjs","sourcesContent":["/**\n * M51 (agent-builder) — inject a SYNTHETIC user+assistant pair into a session's persisted transcript\n * WITHOUT running an LLM turn. This is the Codex review-exit mechanism (`exit_success.xml` appended to\n * the parent thread history so follow-ups like \"fix finding 2\" work): the pair chains onto the DAG\n * leaf (M50 pattern) and the in-memory cache is invalidated so the NEXT send re-hydrates with it.\n */\nimport type { SessionStore } from \"../../types/session-store.js\";\nimport { SessionTranscript } from \"../persistence/session-transcript.js\";\nimport { enqueueSessionWrite, invalidateSessionCache } from \"./agent-session.js\";\nimport type { CompactLocation } from \"./compact-session.js\";\n\nexport async function injectSessionTurn(opts: {\n store: SessionStore;\n loc: CompactLocation;\n sessionId: string;\n userText: string;\n assistantText: string;\n}): Promise<void> {\n await enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {\n const prior = await opts.store.readRecords(opts.loc.agentId);\n const transcript = SessionTranscript.fromRecords(prior, {\n cwd: opts.loc.cwd,\n sessionId: opts.sessionId,\n model: opts.loc.model ?? \"unknown\",\n });\n transcript.appendUserTurn(opts.userText);\n transcript.appendAssistantTurn({ text: opts.assistantText });\n await opts.store.appendRecords(opts.loc.agentId, transcript.records().slice(prior.length));\n invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);\n });\n}\n"]}
@@ -1,9 +1,9 @@
1
- import { enqueueSessionWrite } from './chunk-ONVIALVV.js';
2
- import { invalidateSessionCache } from './chunk-5KOW3GLE.js';
3
- import './chunk-7PBAJ2WA.js';
4
- import { SessionTranscript } from './chunk-EYUZZXHZ.js';
5
- import './chunk-5XPKYDK7.js';
6
- import './chunk-RNCN2TTP.js';
1
+ import { enqueueSessionWrite } from './chunk-IMX5YODO.js';
2
+ import { invalidateSessionCache } from './chunk-4QEC4CCS.js';
3
+ import './chunk-ZTEAJAE6.js';
4
+ import { SessionTranscript } from './chunk-AF4BBKIF.js';
5
+ import './chunk-VQFSEKU5.js';
6
+ import './chunk-PBML2FHN.js';
7
7
 
8
8
  // src/internal/session/inject-session.ts
9
9
  async function injectSessionTurn(opts) {
@@ -22,5 +22,5 @@ async function injectSessionTurn(opts) {
22
22
  }
23
23
 
24
24
  export { injectSessionTurn };
25
- //# sourceMappingURL=inject-session-E75EP3LL.js.map
26
- //# sourceMappingURL=inject-session-E75EP3LL.js.map
25
+ //# sourceMappingURL=inject-session-UBM4KVSV.js.map
26
+ //# sourceMappingURL=inject-session-UBM4KVSV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":[],"mappings":";;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAM,oBAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAa,iBAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAA,sBAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-E75EP3LL.js","sourcesContent":["/**\n * M51 (agent-builder) — inject a SYNTHETIC user+assistant pair into a session's persisted transcript\n * WITHOUT running an LLM turn. This is the Codex review-exit mechanism (`exit_success.xml` appended to\n * the parent thread history so follow-ups like \"fix finding 2\" work): the pair chains onto the DAG\n * leaf (M50 pattern) and the in-memory cache is invalidated so the NEXT send re-hydrates with it.\n */\nimport type { SessionStore } from \"../../types/session-store.js\";\nimport { SessionTranscript } from \"../persistence/session-transcript.js\";\nimport { enqueueSessionWrite, invalidateSessionCache } from \"./agent-session.js\";\nimport type { CompactLocation } from \"./compact-session.js\";\n\nexport async function injectSessionTurn(opts: {\n store: SessionStore;\n loc: CompactLocation;\n sessionId: string;\n userText: string;\n assistantText: string;\n}): Promise<void> {\n await enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {\n const prior = await opts.store.readRecords(opts.loc.agentId);\n const transcript = SessionTranscript.fromRecords(prior, {\n cwd: opts.loc.cwd,\n sessionId: opts.sessionId,\n model: opts.loc.model ?? \"unknown\",\n });\n transcript.appendUserTurn(opts.userText);\n transcript.appendAssistantTurn({ text: opts.assistantText });\n await opts.store.appendRecords(opts.loc.agentId, transcript.records().slice(prior.length));\n invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);\n });\n}\n"]}
1
+ {"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":[],"mappings":";;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAM,oBAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAa,iBAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAA,sBAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-UBM4KVSV.js","sourcesContent":["/**\n * M51 (agent-builder) — inject a SYNTHETIC user+assistant pair into a session's persisted transcript\n * WITHOUT running an LLM turn. This is the Codex review-exit mechanism (`exit_success.xml` appended to\n * the parent thread history so follow-ups like \"fix finding 2\" work): the pair chains onto the DAG\n * leaf (M50 pattern) and the in-memory cache is invalidated so the NEXT send re-hydrates with it.\n */\nimport type { SessionStore } from \"../../types/session-store.js\";\nimport { SessionTranscript } from \"../persistence/session-transcript.js\";\nimport { enqueueSessionWrite, invalidateSessionCache } from \"./agent-session.js\";\nimport type { CompactLocation } from \"./compact-session.js\";\n\nexport async function injectSessionTurn(opts: {\n store: SessionStore;\n loc: CompactLocation;\n sessionId: string;\n userText: string;\n assistantText: string;\n}): Promise<void> {\n await enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {\n const prior = await opts.store.readRecords(opts.loc.agentId);\n const transcript = SessionTranscript.fromRecords(prior, {\n cwd: opts.loc.cwd,\n sessionId: opts.sessionId,\n model: opts.loc.model ?? \"unknown\",\n });\n transcript.appendUserTurn(opts.userText);\n transcript.appendAssistantTurn({ text: opts.assistantText });\n await opts.store.appendRecords(opts.loc.agentId, transcript.records().slice(prior.length));\n invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);\n });\n}\n"]}
@@ -23,6 +23,19 @@ export declare function authFilePath(config: CredentialStoreConfig, env?: Record
23
23
  export declare class CredentialError extends AuthenticationError {
24
24
  readonly name: string;
25
25
  }
26
+ /**
27
+ * Read the credential file. Absent ⇒ `undefined` (the normal case). Present-but-wrong is a typed error
28
+ * naming the file: a malformed credential store must not surface as a raw parse crash. Enforces the
29
+ * 0700 dir / 0600 file mode gates (ported verbatim — a writable dir lets an attacker swap the file for a
30
+ * symlink to their own account).
31
+ */
32
+ /**
33
+ * The 0700-dir / 0600-file mode gates (ported verbatim). The DIRECTORY matters as much as the file:
34
+ * `mkdirSync(mode)` applies only at creation, so a pre-existing store dir keeps whatever mode it had, and a
35
+ * writable dir lets an attacker replace the credential file with a symlink to their own 0600 file — the
36
+ * agent then runs on THEIR account.
37
+ */
38
+ export declare function assertSecureModes(dirPath: string, path: string): void;
26
39
  export declare function readAuthFile(config: CredentialStoreConfig, env?: Record<string, string | undefined>): StoredCredential | undefined;
27
40
  /**
28
41
  * Read the stored OAuth credential (with its refresh token), or `undefined` when the store is absent or
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The library's single diagnostics channel — silent by default (#147).
3
3
  *
4
- * ## O problema
4
+ * ## The problem
5
5
  *
6
6
  * The SDK wrote diagnostics straight to `process.stderr` from hot paths — 92 sites across 51
7
7
  * files under `internal/`. In a TUI host (Ink, alternate screen), those writes interleave with the
@@ -12,7 +12,7 @@
12
12
  * A library cannot assume `stdout`/`stderr` are free sinks. The application owns the terminal, not
13
13
  * the dependency.
14
14
  *
15
- * ## O contrato
15
+ * ## The contract
16
16
  *
17
17
  * - **`setDiagnosticsSink(fn)`** hands the messages to the application, which decides where to put
18
18
  * them (a status line, a file, a panel). It is what was missing for a TUI to coexist with the SDK.
@@ -13,7 +13,7 @@
13
13
  * 408 → `NetworkError` (`code: "timeout"`)
14
14
  * 5xx → `NetworkError` (`code: "server_error"` — covers 529
15
15
  * overloaded_error common at peak
16
- * de pico)
16
+ * at peak)
17
17
  * other → `UnknownAgentError` (`code: "unknown"`)
18
18
  *
19
19
  * Never throws — caller is already in an error path.
@@ -8,7 +8,7 @@
8
8
  * verify-gate grades. Every command rides {@link SandboxBackend.execute}
9
9
  * (ADR D2 — portable across Local/Docker/E2B).
10
10
  *
11
- * referencia: knowledge-base/references/theocode-eval/lib/swebench-batch.ts:154
11
+ * reference: knowledge-base/references/theocode-eval/lib/swebench-batch.ts:154
12
12
  * (build prediction from captured diff), :157 (reverse apply-check on the
13
13
  * mutated tree).
14
14
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Singleton por realm, chaveado por `Symbol.for`.
2
+ * One singleton per realm, keyed by `Symbol.for`.
3
3
  *
4
4
  * It exists because a package can be loaded more than once in the same process (two copies in
5
5
  * `node_modules`, ESM and CJS side by side, a monorepo with distinct versions) — and then a module-level
@@ -34,7 +34,7 @@ export interface JudgeOptions {
34
34
  * credential. A slow, opaque failure traded for a fast, clear one.
35
35
  *
36
36
  * PARSE failures and network errors stay folded: they are recoverable, and the loop already decides on
37
- * consecutivas.
37
+ * in a row.
38
38
  */
39
39
  export declare class JudgeCredentialError extends TheokitAgentError {
40
40
  readonly httpStatus: number;
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkX2LDDKFM_cjs = require('../../../chunk-X2LDDKFM.cjs');
4
- require('../../../chunk-U53AYSHS.cjs');
3
+ var chunk7PESI6YD_cjs = require('../../../chunk-7PESI6YD.cjs');
4
+ require('../../../chunk-S4Q5OMIK.cjs');
5
5
  var chunk2RW7K6FN_cjs = require('../../../chunk-2RW7K6FN.cjs');
6
6
  require('../../../chunk-MUUQ2WFJ.cjs');
7
- require('../../../chunk-RHQJX3EI.cjs');
8
- require('../../../chunk-PDOLUFGY.cjs');
9
- require('../../../chunk-ZAKTZ5B4.cjs');
10
- require('../../../chunk-E7WWIX34.cjs');
11
- require('../../../chunk-A76OFN2B.cjs');
7
+ require('../../../chunk-OEFFPR2S.cjs');
8
+ require('../../../chunk-27DYRARU.cjs');
9
+ require('../../../chunk-XA3TSBAH.cjs');
10
+ require('../../../chunk-YULF6FPB.cjs');
11
+ require('../../../chunk-ZHPET3LZ.cjs');
12
12
 
13
13
 
14
14
 
15
15
  Object.defineProperty(exports, "createOpenAiCompatibleRuntime", {
16
16
  enumerable: true,
17
- get: function () { return chunkX2LDDKFM_cjs.createOpenAiCompatibleRuntime; }
17
+ get: function () { return chunk7PESI6YD_cjs.createOpenAiCompatibleRuntime; }
18
18
  });
19
19
  Object.defineProperty(exports, "LruEmbeddingCache", {
20
20
  enumerable: true,
@@ -1,11 +1,11 @@
1
- export { createOpenAiCompatibleRuntime } from '../../../chunk-HJMFPIRM.js';
2
- import '../../../chunk-FUP3ZA5T.js';
1
+ export { createOpenAiCompatibleRuntime } from '../../../chunk-LLE7HPRI.js';
2
+ import '../../../chunk-SNKY3C2L.js';
3
3
  export { LruEmbeddingCache, globalEmbeddingCache } from '../../../chunk-OXNYIMZZ.js';
4
4
  import '../../../chunk-FD2UT76F.js';
5
- import '../../../chunk-XKGOIGTJ.js';
6
- import '../../../chunk-F4SQTWVR.js';
7
- import '../../../chunk-IEKSEAIV.js';
8
- import '../../../chunk-VQ33XLC6.js';
9
- import '../../../chunk-RNCN2TTP.js';
5
+ import '../../../chunk-AZ6FKDQR.js';
6
+ import '../../../chunk-Q4DTGCSD.js';
7
+ import '../../../chunk-6FSQ3CHQ.js';
8
+ import '../../../chunk-MRKSSN36.js';
9
+ import '../../../chunk-PBML2FHN.js';
10
10
  //# sourceMappingURL=index.js.map
11
11
  //# sourceMappingURL=index.js.map
@@ -2,7 +2,7 @@
2
2
  * Memory embedding provider adapter contract (ADR D3 of memory-system-peer-project-parity).
3
3
  *
4
4
  * Mirrors peer-project's `MemoryEmbeddingProviderAdapter` from
5
- * `referencia/peer-project/extensions/openai/memory-embedding-adapter.ts` so
5
+ * `reference/peer-project/extensions/openai/memory-embedding-adapter.ts` so
6
6
  * adding a new provider becomes one new file under `adapters/`.
7
7
  *
8
8
  * @internal
@@ -8,7 +8,7 @@
8
8
  * `close()` — the union of those four methods is the portable surface.
9
9
  *
10
10
  * Why a separate file (vs declaring inline in `index-manager.ts`)? D43
11
- * promised "extrair interface abstrata `MemoryIndex` em
11
+ * promised "extract an abstract `MemoryIndex` interface in
12
12
  * `internal/memory/index-interface.ts`". Keeping the contract physically
13
13
  * separated from one of its implementations preserves OCP — future
14
14
  * backends (Qdrant, PGVector) can land without touching IndexManager.
@@ -1 +1,14 @@
1
- export {};
1
+ /**
2
+ * U-9 — the file a leftover temp was replacing, or `undefined` if this is not one of ours.
3
+ *
4
+ * A crash between the open and the rename leaves `<file>.<pid>.<hex>.tmp` behind, and nothing here
5
+ * collects it: this module creates temps and has no opinion about sweeping them. A consumer that
6
+ * wants to has to know the format — which lived only in the implementation, so one copied it out of
7
+ * a compiled chunk as a regex. That copy would have gone on reporting "nothing to collect" the day
8
+ * the format changed, which is the quietest possible way for a cleanup to stop working.
9
+ *
10
+ * Deliberately strict: the pid must be digits and the suffix exactly 16 hex characters. Matching any
11
+ * `.tmp` would claim editors' swap files and other tools' scratch, on a path whose purpose is
12
+ * deleting them.
13
+ */
14
+ export declare function atomicWriteTempTarget(name: string): string | undefined;
@@ -1 +1,14 @@
1
- export {};
1
+ /**
2
+ * U-9 — the file a leftover temp was replacing, or `undefined` if this is not one of ours.
3
+ *
4
+ * A crash between the open and the rename leaves `<file>.<pid>.<hex>.tmp` behind, and nothing here
5
+ * collects it: this module creates temps and has no opinion about sweeping them. A consumer that
6
+ * wants to has to know the format — which lived only in the implementation, so one copied it out of
7
+ * a compiled chunk as a regex. That copy would have gone on reporting "nothing to collect" the day
8
+ * the format changed, which is the quietest possible way for a cleanup to stop working.
9
+ *
10
+ * Deliberately strict: the pid must be digits and the suffix exactly 16 hex characters. Matching any
11
+ * `.tmp` would claim editors' swap files and other tools' scratch, on a path whose purpose is
12
+ * deleting them.
13
+ */
14
+ export declare function atomicWriteTempTarget(name: string): string | undefined;
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkPNVDQL5Y_cjs = require('../../chunk-PNVDQL5Y.cjs');
4
- var chunkFMDZZRYE_cjs = require('../../chunk-FMDZZRYE.cjs');
5
- var chunkZVQJHY4Y_cjs = require('../../chunk-ZVQJHY4Y.cjs');
6
- var chunk4H2QARXM_cjs = require('../../chunk-4H2QARXM.cjs');
4
+ var chunk6X2HUT4A_cjs = require('../../chunk-6X2HUT4A.cjs');
5
+ var chunk6W4U2G3J_cjs = require('../../chunk-6W4U2G3J.cjs');
6
+ var chunkBV42CCRP_cjs = require('../../chunk-BV42CCRP.cjs');
7
7
  var chunkYLQQX5W2_cjs = require('../../chunk-YLQQX5W2.cjs');
8
- var chunk33B2BSME_cjs = require('../../chunk-33B2BSME.cjs');
9
- require('../../chunk-E7WWIX34.cjs');
10
- require('../../chunk-A76OFN2B.cjs');
8
+ var chunkNETYW4V3_cjs = require('../../chunk-NETYW4V3.cjs');
9
+ require('../../chunk-YULF6FPB.cjs');
10
+ require('../../chunk-ZHPET3LZ.cjs');
11
11
  var promises = require('fs/promises');
12
12
 
13
13
  async function createExclusive(path, data, options) {
@@ -41,67 +41,67 @@ Object.defineProperty(exports, "PersistenceSchema", {
41
41
  });
42
42
  Object.defineProperty(exports, "displayTheokitHome", {
43
43
  enumerable: true,
44
- get: function () { return chunkFMDZZRYE_cjs.displayTheokitHome; }
44
+ get: function () { return chunk6X2HUT4A_cjs.displayTheokitHome; }
45
45
  });
46
46
  Object.defineProperty(exports, "getProfilesRoot", {
47
47
  enumerable: true,
48
- get: function () { return chunkFMDZZRYE_cjs.getProfilesRoot; }
48
+ get: function () { return chunk6X2HUT4A_cjs.getProfilesRoot; }
49
49
  });
50
50
  Object.defineProperty(exports, "getTheokitHome", {
51
51
  enumerable: true,
52
- get: function () { return chunkFMDZZRYE_cjs.getTheokitHome; }
52
+ get: function () { return chunk6X2HUT4A_cjs.getTheokitHome; }
53
53
  });
54
54
  Object.defineProperty(exports, "migrateSchema", {
55
55
  enumerable: true,
56
- get: function () { return chunkFMDZZRYE_cjs.migrateSchema; }
56
+ get: function () { return chunk6X2HUT4A_cjs.migrateSchema; }
57
57
  });
58
58
  Object.defineProperty(exports, "readVersionedJson", {
59
59
  enumerable: true,
60
- get: function () { return chunkFMDZZRYE_cjs.readVersionedJson; }
60
+ get: function () { return chunk6X2HUT4A_cjs.readVersionedJson; }
61
61
  });
62
62
  Object.defineProperty(exports, "writeVersionedJson", {
63
63
  enumerable: true,
64
- get: function () { return chunkFMDZZRYE_cjs.writeVersionedJson; }
64
+ get: function () { return chunk6X2HUT4A_cjs.writeVersionedJson; }
65
65
  });
66
66
  Object.defineProperty(exports, "JsonlParseError", {
67
67
  enumerable: true,
68
- get: function () { return chunkZVQJHY4Y_cjs.JsonlParseError; }
68
+ get: function () { return chunk6W4U2G3J_cjs.JsonlParseError; }
69
69
  });
70
70
  Object.defineProperty(exports, "appendJsonl", {
71
71
  enumerable: true,
72
- get: function () { return chunkZVQJHY4Y_cjs.appendJsonl; }
72
+ get: function () { return chunk6W4U2G3J_cjs.appendJsonl; }
73
73
  });
74
74
  Object.defineProperty(exports, "loadJsonl", {
75
75
  enumerable: true,
76
- get: function () { return chunkZVQJHY4Y_cjs.loadJsonl; }
76
+ get: function () { return chunk6W4U2G3J_cjs.loadJsonl; }
77
77
  });
78
78
  Object.defineProperty(exports, "readJsonlIds", {
79
79
  enumerable: true,
80
- get: function () { return chunkZVQJHY4Y_cjs.readJsonlIds; }
80
+ get: function () { return chunk6W4U2G3J_cjs.readJsonlIds; }
81
81
  });
82
82
  Object.defineProperty(exports, "withFileLock", {
83
83
  enumerable: true,
84
- get: function () { return chunkZVQJHY4Y_cjs.withFileLock; }
84
+ get: function () { return chunk6W4U2G3J_cjs.withFileLock; }
85
85
  });
86
86
  Object.defineProperty(exports, "applyWalWithFallback", {
87
87
  enumerable: true,
88
- get: function () { return chunk4H2QARXM_cjs.applyWalWithFallback; }
88
+ get: function () { return chunkBV42CCRP_cjs.applyWalWithFallback; }
89
89
  });
90
90
  Object.defineProperty(exports, "containsCjk", {
91
91
  enumerable: true,
92
- get: function () { return chunk4H2QARXM_cjs.containsCjk; }
92
+ get: function () { return chunkBV42CCRP_cjs.containsCjk; }
93
93
  });
94
94
  Object.defineProperty(exports, "isCorruptionError", {
95
95
  enumerable: true,
96
- get: function () { return chunk4H2QARXM_cjs.isCorruptionError; }
96
+ get: function () { return chunkBV42CCRP_cjs.isCorruptionError; }
97
97
  });
98
98
  Object.defineProperty(exports, "openSqliteResilient", {
99
99
  enumerable: true,
100
- get: function () { return chunk4H2QARXM_cjs.openSqliteResilient; }
100
+ get: function () { return chunkBV42CCRP_cjs.openSqliteResilient; }
101
101
  });
102
102
  Object.defineProperty(exports, "sanitizeFts5Query", {
103
103
  enumerable: true,
104
- get: function () { return chunk4H2QARXM_cjs.sanitizeFts5Query; }
104
+ get: function () { return chunkBV42CCRP_cjs.sanitizeFts5Query; }
105
105
  });
106
106
  Object.defineProperty(exports, "withCwdMutex", {
107
107
  enumerable: true,
@@ -109,15 +109,15 @@ Object.defineProperty(exports, "withCwdMutex", {
109
109
  });
110
110
  Object.defineProperty(exports, "atomicWriteJson", {
111
111
  enumerable: true,
112
- get: function () { return chunk33B2BSME_cjs.atomicWriteJson; }
112
+ get: function () { return chunkNETYW4V3_cjs.atomicWriteJson; }
113
113
  });
114
114
  Object.defineProperty(exports, "atomicWriteText", {
115
115
  enumerable: true,
116
- get: function () { return chunk33B2BSME_cjs.atomicWriteText; }
116
+ get: function () { return chunkNETYW4V3_cjs.atomicWriteText; }
117
117
  });
118
118
  Object.defineProperty(exports, "replaceFileAtomic", {
119
119
  enumerable: true,
120
- get: function () { return chunk33B2BSME_cjs.replaceFileAtomic; }
120
+ get: function () { return chunkNETYW4V3_cjs.replaceFileAtomic; }
121
121
  });
122
122
  exports.casUpdate = casUpdate;
123
123
  exports.createExclusive = createExclusive;
@@ -1,11 +1,11 @@
1
1
  export { PersistenceSchema } from '../../chunk-CAH3G4IS.js';
2
- export { displayTheokitHome, getProfilesRoot, getTheokitHome, migrateSchema, readVersionedJson, writeVersionedJson } from '../../chunk-RMCHJZNZ.js';
3
- export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds, withFileLock } from '../../chunk-5VKUZ26Q.js';
4
- export { applyWalWithFallback, containsCjk, isCorruptionError, openSqliteResilient, sanitizeFts5Query } from '../../chunk-VTDQRUAJ.js';
2
+ export { displayTheokitHome, getProfilesRoot, getTheokitHome, migrateSchema, readVersionedJson, writeVersionedJson } from '../../chunk-ZS6SLELQ.js';
3
+ export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds, withFileLock } from '../../chunk-ZNW2TXLO.js';
4
+ export { applyWalWithFallback, containsCjk, isCorruptionError, openSqliteResilient, sanitizeFts5Query } from '../../chunk-2WB6EIYW.js';
5
5
  export { withCwdMutex } from '../../chunk-2XLKLVVR.js';
6
- export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-5XPKYDK7.js';
7
- import '../../chunk-VQ33XLC6.js';
8
- import '../../chunk-RNCN2TTP.js';
6
+ export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-VQFSEKU5.js';
7
+ import '../../chunk-MRKSSN36.js';
8
+ import '../../chunk-PBML2FHN.js';
9
9
  import { open } from 'fs/promises';
10
10
 
11
11
  async function createExclusive(path, data, options) {
@@ -25,7 +25,7 @@ export declare function loadJsonl<T = Record<string, unknown>>(path: string, opt
25
25
  * the event loop serializes writes and each call writes its line atomically —
26
26
  * interleave-safe for the bounded-concurrency batch runner.
27
27
  *
28
- * referencia: swebench-batch.ts:192 (mkdir-before-append), :205 (per-line flush).
28
+ * reference: swebench-batch.ts:192 (mkdir-before-append), :205 (per-line flush).
29
29
  */
30
30
  export declare function appendJsonl(path: string, record: unknown): void;
31
31
  /**
@@ -35,7 +35,7 @@ export declare function appendJsonl(path: string, record: unknown): void;
35
35
  * interrupted append is tolerated (skipped, not thrown), and a missing file
36
36
  * yields an empty set.
37
37
  *
38
- * referencia: swebench-batch.ts:113 (readDoneIds), :129 (success-only),
38
+ * reference: swebench-batch.ts:113 (readDoneIds), :129 (success-only),
39
39
  * :131 (tolerate partial line).
40
40
  */
41
41
  export declare function readJsonlIds(path: string, keyFn: (parsed: Record<string, unknown>) => string | undefined): Set<string>;
@@ -25,7 +25,7 @@ export declare function loadJsonl<T = Record<string, unknown>>(path: string, opt
25
25
  * the event loop serializes writes and each call writes its line atomically —
26
26
  * interleave-safe for the bounded-concurrency batch runner.
27
27
  *
28
- * referencia: swebench-batch.ts:192 (mkdir-before-append), :205 (per-line flush).
28
+ * reference: swebench-batch.ts:192 (mkdir-before-append), :205 (per-line flush).
29
29
  */
30
30
  export declare function appendJsonl(path: string, record: unknown): void;
31
31
  /**
@@ -35,7 +35,7 @@ export declare function appendJsonl(path: string, record: unknown): void;
35
35
  * interrupted append is tolerated (skipped, not thrown), and a missing file
36
36
  * yields an empty set.
37
37
  *
38
- * referencia: swebench-batch.ts:113 (readDoneIds), :129 (success-only),
38
+ * reference: swebench-batch.ts:113 (readDoneIds), :129 (success-only),
39
39
  * :131 (tolerate partial line).
40
40
  */
41
41
  export declare function readJsonlIds(path: string, keyFn: (parsed: Record<string, unknown>) => string | undefined): Set<string>;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The kinds of file this SDK leaves in a project's transcript directory.
3
+ *
4
+ * - `transcript` — the session itself (`transcriptPath`).
5
+ * - `writer-lock` — the cross-process writer lease (`session-writer.ts`, `<file>.writer.lock`).
6
+ * - `lock-directory` — `withFileLock`'s companion, taken by `mkdir`, so it is a DIRECTORY.
7
+ * - `temp` — what `replaceFileAtomic` leaves when a process dies between the open and the rename.
8
+ */
9
+ export type SessionArtifact = "transcript" | "writer-lock" | "lock-directory" | "temp";
10
+ /**
11
+ * U-1 — what is this entry, if it is one of ours?
12
+ *
13
+ * The SDK writes four kinds of file into a project directory and reasons about none of them
14
+ * afterwards: there is no retention, no collector, and there was no way even to ask what an entry
15
+ * IS. A consumer wanting to reclaim disk had to re-derive the suffixes by reading this source — and
16
+ * one did, which means a suffix changing here would have left its classifier silently mislabelling
17
+ * files on a path that deletes them.
18
+ *
19
+ * This is deliberately NOT a garbage collector. Retention is policy — how many days, how many to
20
+ * keep, which session is live, whether to delete at all — and policy belongs to the application,
21
+ * which is the only one that can know. What belongs here is the half only the SDK can answer.
22
+ *
23
+ * `undefined` means "not written by this SDK", and it is the answer that matters most: a caller
24
+ * deleting what it does not recognise is how an editor's swap file gets collected. The `temp` case
25
+ * defers to {@link atomicWriteTempTarget} rather than matching `.tmp`, for exactly that reason.
26
+ */
27
+ export declare function classifySessionArtifact(name: string, isDirectory: boolean): SessionArtifact | undefined;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The kinds of file this SDK leaves in a project's transcript directory.
3
+ *
4
+ * - `transcript` — the session itself (`transcriptPath`).
5
+ * - `writer-lock` — the cross-process writer lease (`session-writer.ts`, `<file>.writer.lock`).
6
+ * - `lock-directory` — `withFileLock`'s companion, taken by `mkdir`, so it is a DIRECTORY.
7
+ * - `temp` — what `replaceFileAtomic` leaves when a process dies between the open and the rename.
8
+ */
9
+ export type SessionArtifact = "transcript" | "writer-lock" | "lock-directory" | "temp";
10
+ /**
11
+ * U-1 — what is this entry, if it is one of ours?
12
+ *
13
+ * The SDK writes four kinds of file into a project directory and reasons about none of them
14
+ * afterwards: there is no retention, no collector, and there was no way even to ask what an entry
15
+ * IS. A consumer wanting to reclaim disk had to re-derive the suffixes by reading this source — and
16
+ * one did, which means a suffix changing here would have left its classifier silently mislabelling
17
+ * files on a path that deletes them.
18
+ *
19
+ * This is deliberately NOT a garbage collector. Retention is policy — how many days, how many to
20
+ * keep, which session is live, whether to delete at all — and policy belongs to the application,
21
+ * which is the only one that can know. What belongs here is the half only the SDK can answer.
22
+ *
23
+ * `undefined` means "not written by this SDK", and it is the answer that matters most: a caller
24
+ * deleting what it does not recognise is how an editor's swap file gets collected. The `temp` case
25
+ * defers to {@link atomicWriteTempTarget} rather than matching `.tmp`, for exactly that reason.
26
+ */
27
+ export declare function classifySessionArtifact(name: string, isDirectory: boolean): SessionArtifact | undefined;
@@ -61,7 +61,7 @@ export declare class SessionTranscript {
61
61
  */
62
62
  export declare function reconstructMessages(records: readonly SessionRecord[]): LlmMessage[];
63
63
  /**
64
- * Raiz do estado de transcript.
64
+ * Root of the transcript state.
65
65
  *
66
66
  * `THEOKIT_HOME` wins; the fallback is `~/.theokit`. Home-anchored on purpose, and NOT
67
67
  * `paths.ts`'s `getTheokitHome(cwd)`: that one falls back to `<cwd>/.theokit`, and switching
@@ -61,7 +61,7 @@ export declare class SessionTranscript {
61
61
  */
62
62
  export declare function reconstructMessages(records: readonly SessionRecord[]): LlmMessage[];
63
63
  /**
64
- * Raiz do estado de transcript.
64
+ * Root of the transcript state.
65
65
  *
66
66
  * `THEOKIT_HOME` wins; the fallback is `~/.theokit`. Home-anchored on purpose, and NOT
67
67
  * `paths.ts`'s `getTheokitHome(cwd)`: that one falls back to `<cwd>/.theokit`, and switching
@@ -24,4 +24,13 @@ export interface DiscoveryRunnerOptions {
24
24
  readonly touchedFiles?: ReadonlyArray<string>;
25
25
  /** When true, skip `theokit-context` spec — caller already handles the legacy path. */
26
26
  readonly skipLegacyTheokitContext?: boolean;
27
+ /**
28
+ * The root an `@import` may not escape. Defaults to `gitRoot ?? cwd` — the same value
29
+ * this runner already uses to keep absolute paths out of `<source name="">`.
30
+ *
31
+ * Present so an embedder with a trust boundary narrower than the repository can declare
32
+ * it. Absent, the repository IS the boundary, which is the honest default for a document
33
+ * discovered by walking the repository.
34
+ */
35
+ readonly importRoot?: string;
27
36
  }
@@ -21,4 +21,21 @@ export interface ResolveImportsOptions {
21
21
  readonly depth: number;
22
22
  /** Per-import file cap (EC-D). Forwarded to loadPlainMarkdown. */
23
23
  readonly maxBytesPerFile: number;
24
+ /**
25
+ * The directory an import may not escape. When set, a target resolving outside it is
26
+ * refused and replaced with a placeholder.
27
+ *
28
+ * The file carrying the import is REPOSITORY-CONTROLLED — `CLAUDE.md` and `GEMINI.md`
29
+ * are the two default specs with `followImports: true`, and both are found by
30
+ * `git-root-walk` inside the tree the agent was pointed at. Without a root, a cloned
31
+ * repository could name `@~/.ssh/id_rsa` or any absolute path and have its contents
32
+ * inlined into the system prompt, and from there sent to the model provider. The
33
+ * traversal guard that already existed (`isSafePattern`) guards the discovery PATTERN,
34
+ * not the import TARGET, so it never saw this.
35
+ *
36
+ * OPTIONAL, so a caller outside the discovery path keeps the previous behaviour rather
37
+ * than breaking on an upgrade. `runDiscovery` always supplies `gitRoot ?? cwd` — the
38
+ * same value it already uses to keep absolute paths out of `<source name="">`.
39
+ */
40
+ readonly projectRoot?: string;
24
41
  }
@@ -5,7 +5,7 @@
5
5
  * so API keys, tokens and passwords leaked into hook scripts and shell tools.
6
6
  * `resolveChildEnv` computes the env a child receives under an explicit policy,
7
7
  * modeled on codex's `ShellEnvironmentPolicy`
8
- * (referencia: codex/codex-rs/protocol/src/shell_environment.rs).
8
+ * (reference: codex/codex-rs/protocol/src/shell_environment.rs).
9
9
  *
10
10
  * Modes:
11
11
  * - `inherit-scrubbed` (DEFAULT) — inherit all parent vars EXCEPT secret-like