@theokit/sdk 4.38.0 → 4.39.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 (378) hide show
  1. package/CHANGELOG.md +285 -0
  2. package/dist/a2a/index.cjs +3 -3
  3. package/dist/a2a/index.js +1 -1
  4. package/dist/a2a/subagent.d.cts +1 -0
  5. package/dist/a2a/subagent.d.ts +1 -0
  6. package/dist/agent-6ULDAQT7.js +46 -0
  7. package/dist/{agent-3H3UKD6U.js.map → agent-6ULDAQT7.js.map} +1 -1
  8. package/dist/{agent-U3lBX-5t.d.cts → agent-D7bRK9Kg.d.cts} +70 -5
  9. package/dist/agent-PVUKI3BB.cjs +55 -0
  10. package/dist/{agent-2GZC4W2A.cjs.map → agent-PVUKI3BB.cjs.map} +1 -1
  11. package/dist/{agent-C3AEtM-W.d.ts → agent-ZCZa7YQv.d.ts} +70 -5
  12. package/dist/agent-session-store-N4TVKHBU.cjs +23 -0
  13. package/dist/agent-session-store-N4TVKHBU.cjs.map +1 -0
  14. package/dist/agent-session-store-RHMHP5DG.js +6 -0
  15. package/dist/agent-session-store-RHMHP5DG.js.map +1 -0
  16. package/dist/agent.d.ts +37 -1
  17. package/dist/auth/index.cjs +15 -15
  18. package/dist/auth/index.js +4 -4
  19. package/dist/{batch-LXSALQC3.js → batch-6KQM3EBA.js} +12 -12
  20. package/dist/batch-6KQM3EBA.js.map +1 -0
  21. package/dist/{batch-NZGN6SFV.cjs → batch-X6JKGDPK.cjs} +26 -26
  22. package/dist/batch-X6JKGDPK.cjs.map +1 -0
  23. package/dist/chunk-2RW7K6FN.cjs +34 -0
  24. package/dist/chunk-2RW7K6FN.cjs.map +1 -0
  25. package/dist/chunk-3I4B3OIX.js +105 -0
  26. package/dist/chunk-3I4B3OIX.js.map +1 -0
  27. package/dist/{chunk-KWXC6ERT.js → chunk-42IFCKQZ.js} +5 -5
  28. package/dist/{chunk-KWXC6ERT.js.map → chunk-42IFCKQZ.js.map} +1 -1
  29. package/dist/{chunk-4APWS2YF.js → chunk-4F7JQZOX.js} +9 -36
  30. package/dist/chunk-4F7JQZOX.js.map +1 -0
  31. package/dist/{chunk-VYD6BGKK.js → chunk-4JSZYSGW.js} +3 -3
  32. package/dist/{chunk-VYD6BGKK.js.map → chunk-4JSZYSGW.js.map} +1 -1
  33. package/dist/{chunk-A6GXYF2Q.js → chunk-65ONFZWM.js} +7 -6
  34. package/dist/chunk-65ONFZWM.js.map +1 -0
  35. package/dist/{chunk-SGTMDQ4O.js → chunk-6EEYRFJC.js} +5 -5
  36. package/dist/{chunk-SGTMDQ4O.js.map → chunk-6EEYRFJC.js.map} +1 -1
  37. package/dist/{chunk-M4OGSS66.cjs → chunk-6LGQECT7.cjs} +11 -11
  38. package/dist/{chunk-M4OGSS66.cjs.map → chunk-6LGQECT7.cjs.map} +1 -1
  39. package/dist/{chunk-KTXOHCAE.cjs → chunk-6NEHIHFU.cjs} +4 -4
  40. package/dist/{chunk-KTXOHCAE.cjs.map → chunk-6NEHIHFU.cjs.map} +1 -1
  41. package/dist/chunk-6YNYA7GD.cjs +103 -0
  42. package/dist/chunk-6YNYA7GD.cjs.map +1 -0
  43. package/dist/{chunk-2R6NBT5F.cjs → chunk-74D7KSBP.cjs} +11 -11
  44. package/dist/{chunk-2R6NBT5F.cjs.map → chunk-74D7KSBP.cjs.map} +1 -1
  45. package/dist/{chunk-6OIO4FYX.cjs → chunk-75DSEWTJ.cjs} +7 -7
  46. package/dist/{chunk-6OIO4FYX.cjs.map → chunk-75DSEWTJ.cjs.map} +1 -1
  47. package/dist/{chunk-3XRXORBS.cjs → chunk-7OLG7VI4.cjs} +4 -4
  48. package/dist/{chunk-3XRXORBS.cjs.map → chunk-7OLG7VI4.cjs.map} +1 -1
  49. package/dist/chunk-7U2HAAWB.cjs +199 -0
  50. package/dist/chunk-7U2HAAWB.cjs.map +1 -0
  51. package/dist/{chunk-QJQ2MAZF.cjs → chunk-7YBJZS5P.cjs} +8 -8
  52. package/dist/{chunk-QJQ2MAZF.cjs.map → chunk-7YBJZS5P.cjs.map} +1 -1
  53. package/dist/{chunk-A4XXV2C6.js → chunk-7YSRCQDE.js} +5 -72
  54. package/dist/chunk-7YSRCQDE.js.map +1 -0
  55. package/dist/{chunk-ZFZYPLQI.js → chunk-AECV3G5Z.js} +4 -4
  56. package/dist/{chunk-ZFZYPLQI.js.map → chunk-AECV3G5Z.js.map} +1 -1
  57. package/dist/{chunk-QFWQLXCL.js → chunk-AR5MQZ3J.js} +3 -3
  58. package/dist/{chunk-QFWQLXCL.js.map → chunk-AR5MQZ3J.js.map} +1 -1
  59. package/dist/{chunk-G2F67XUR.cjs → chunk-B4YA6BRS.cjs} +13 -14
  60. package/dist/chunk-B4YA6BRS.cjs.map +1 -0
  61. package/dist/{chunk-BE3W4HYV.cjs → chunk-BCQ3E2ZG.cjs} +12 -3
  62. package/dist/chunk-BCQ3E2ZG.cjs.map +1 -0
  63. package/dist/{chunk-XJ5TMOGA.js → chunk-BQDUEG4C.js} +3 -3
  64. package/dist/{chunk-XJ5TMOGA.js.map → chunk-BQDUEG4C.js.map} +1 -1
  65. package/dist/{chunk-OFWU6UKF.cjs → chunk-C7OP3FAK.cjs} +47 -11
  66. package/dist/chunk-C7OP3FAK.cjs.map +1 -0
  67. package/dist/{chunk-UZBA6YYP.cjs → chunk-CAFV7WPQ.cjs} +540 -534
  68. package/dist/chunk-CAFV7WPQ.cjs.map +1 -0
  69. package/dist/{chunk-BUGVDCI5.cjs → chunk-CEIHCKTO.cjs} +4 -4
  70. package/dist/chunk-CEIHCKTO.cjs.map +1 -0
  71. package/dist/{chunk-3BSP7LSG.cjs → chunk-CN6UX5EV.cjs} +28 -56
  72. package/dist/chunk-CN6UX5EV.cjs.map +1 -0
  73. package/dist/{chunk-5BVBNE2F.js → chunk-D7IULBF2.js} +3 -3
  74. package/dist/{chunk-5BVBNE2F.js.map → chunk-D7IULBF2.js.map} +1 -1
  75. package/dist/{chunk-G7X2Y7Y2.cjs → chunk-DAXEQELR.cjs} +186 -236
  76. package/dist/chunk-DAXEQELR.cjs.map +1 -0
  77. package/dist/{chunk-YVI4YPUP.cjs → chunk-DGLLVCNB.cjs} +4 -4
  78. package/dist/{chunk-YVI4YPUP.cjs.map → chunk-DGLLVCNB.cjs.map} +1 -1
  79. package/dist/{chunk-JI34KBNC.js → chunk-DKFGUOWL.js} +3 -3
  80. package/dist/{chunk-JI34KBNC.js.map → chunk-DKFGUOWL.js.map} +1 -1
  81. package/dist/{chunk-ZET34IZE.cjs → chunk-DMTZ3FII.cjs} +5 -5
  82. package/dist/{chunk-ZET34IZE.cjs.map → chunk-DMTZ3FII.cjs.map} +1 -1
  83. package/dist/{chunk-6XZBKFQ7.js → chunk-DU7DE543.js} +3 -3
  84. package/dist/{chunk-6XZBKFQ7.js.map → chunk-DU7DE543.js.map} +1 -1
  85. package/dist/{chunk-VVMLMKYZ.cjs → chunk-DWY25VLP.cjs} +9 -9
  86. package/dist/{chunk-VVMLMKYZ.cjs.map → chunk-DWY25VLP.cjs.map} +1 -1
  87. package/dist/{chunk-R4AMI7KD.cjs → chunk-E4IUN3JB.cjs} +15 -15
  88. package/dist/{chunk-R4AMI7KD.cjs.map → chunk-E4IUN3JB.cjs.map} +1 -1
  89. package/dist/{chunk-TKDWD3MU.cjs → chunk-ECHGWE47.cjs} +4 -4
  90. package/dist/{chunk-TKDWD3MU.cjs.map → chunk-ECHGWE47.cjs.map} +1 -1
  91. package/dist/{chunk-KL7E244K.cjs → chunk-ECW2MLEW.cjs} +4 -4
  92. package/dist/{chunk-KL7E244K.cjs.map → chunk-ECW2MLEW.cjs.map} +1 -1
  93. package/dist/{chunk-EDI7DBWO.js → chunk-ET6PHZRX.js} +3 -3
  94. package/dist/{chunk-EDI7DBWO.js.map → chunk-ET6PHZRX.js.map} +1 -1
  95. package/dist/{chunk-HLK35TD7.cjs → chunk-FOZC5H7V.cjs} +24 -24
  96. package/dist/{chunk-HLK35TD7.cjs.map → chunk-FOZC5H7V.cjs.map} +1 -1
  97. package/dist/{chunk-SRIF7HMN.cjs → chunk-FWBSDQZ7.cjs} +5 -5
  98. package/dist/{chunk-SRIF7HMN.cjs.map → chunk-FWBSDQZ7.cjs.map} +1 -1
  99. package/dist/{chunk-XKBJT7WI.cjs → chunk-G2Q3ZC6C.cjs} +4 -4
  100. package/dist/{chunk-XKBJT7WI.cjs.map → chunk-G2Q3ZC6C.cjs.map} +1 -1
  101. package/dist/{chunk-4MWBKBS4.cjs → chunk-G4XUXSRN.cjs} +12 -12
  102. package/dist/{chunk-4MWBKBS4.cjs.map → chunk-G4XUXSRN.cjs.map} +1 -1
  103. package/dist/{chunk-EE24WJJR.js → chunk-GTVJIGAH.js} +5 -5
  104. package/dist/{chunk-EE24WJJR.js.map → chunk-GTVJIGAH.js.map} +1 -1
  105. package/dist/{chunk-VUDH4D2M.js → chunk-H3BOKK42.js} +282 -276
  106. package/dist/chunk-H3BOKK42.js.map +1 -0
  107. package/dist/{chunk-BT6DFWZB.cjs → chunk-HIQFVHC6.cjs} +9 -9
  108. package/dist/{chunk-BT6DFWZB.cjs.map → chunk-HIQFVHC6.cjs.map} +1 -1
  109. package/dist/{chunk-HI6G3SNY.js → chunk-HSPVMV6T.js} +76 -125
  110. package/dist/chunk-HSPVMV6T.js.map +1 -0
  111. package/dist/{chunk-UWEALKAN.js → chunk-HWNVAUK4.js} +3 -3
  112. package/dist/{chunk-UWEALKAN.js.map → chunk-HWNVAUK4.js.map} +1 -1
  113. package/dist/{chunk-3VKTDQMX.cjs → chunk-I53ZQHU6.cjs} +4 -4
  114. package/dist/{chunk-3VKTDQMX.cjs.map → chunk-I53ZQHU6.cjs.map} +1 -1
  115. package/dist/{chunk-A3MHE2MQ.cjs → chunk-IHFNRNTJ.cjs} +8 -8
  116. package/dist/{chunk-A3MHE2MQ.cjs.map → chunk-IHFNRNTJ.cjs.map} +1 -1
  117. package/dist/{chunk-KCZW75PI.js → chunk-IVSD7L22.js} +12 -4
  118. package/dist/chunk-IVSD7L22.js.map +1 -0
  119. package/dist/{chunk-JCXIDFRI.js → chunk-J3UK2GMN.js} +3 -3
  120. package/dist/{chunk-JCXIDFRI.js.map → chunk-J3UK2GMN.js.map} +1 -1
  121. package/dist/{chunk-IBDE4R5L.cjs → chunk-J6T5LWJ4.cjs} +10 -9
  122. package/dist/chunk-J6T5LWJ4.cjs.map +1 -0
  123. package/dist/{chunk-AOZYORH7.js → chunk-JRLXEYR4.js} +21 -5
  124. package/dist/chunk-JRLXEYR4.js.map +1 -0
  125. package/dist/{chunk-EUB7YLU2.js → chunk-JZUPMTJY.js} +3 -3
  126. package/dist/{chunk-EUB7YLU2.js.map → chunk-JZUPMTJY.js.map} +1 -1
  127. package/dist/{chunk-ZK3BJ4XQ.js → chunk-KE6XKRLQ.js} +3 -3
  128. package/dist/{chunk-ZK3BJ4XQ.js.map → chunk-KE6XKRLQ.js.map} +1 -1
  129. package/dist/{chunk-4NVV3GRU.js → chunk-KGRIHEDT.js} +5 -5
  130. package/dist/{chunk-4NVV3GRU.js.map → chunk-KGRIHEDT.js.map} +1 -1
  131. package/dist/{chunk-LGCEYEU2.js → chunk-KX7JV5KM.js} +3 -3
  132. package/dist/{chunk-LGCEYEU2.js.map → chunk-KX7JV5KM.js.map} +1 -1
  133. package/dist/{chunk-2K7PRHDB.cjs → chunk-LALG2K33.cjs} +8 -8
  134. package/dist/{chunk-2K7PRHDB.cjs.map → chunk-LALG2K33.cjs.map} +1 -1
  135. package/dist/{chunk-4WIJSKFA.js → chunk-LGILIGV3.js} +3 -3
  136. package/dist/{chunk-4WIJSKFA.js.map → chunk-LGILIGV3.js.map} +1 -1
  137. package/dist/{chunk-7QDTZJRV.js → chunk-LJX2SQV2.js} +6 -6
  138. package/dist/{chunk-7QDTZJRV.js.map → chunk-LJX2SQV2.js.map} +1 -1
  139. package/dist/{chunk-ACHGT3D2.js → chunk-MC5EINBV.js} +44 -8
  140. package/dist/chunk-MC5EINBV.js.map +1 -0
  141. package/dist/{chunk-M6UUTNDT.js → chunk-ML5A5DOJ.js} +4 -4
  142. package/dist/{chunk-M6UUTNDT.js.map → chunk-ML5A5DOJ.js.map} +1 -1
  143. package/dist/{chunk-3MUIYMUG.cjs → chunk-N475ETD6.cjs} +17 -17
  144. package/dist/{chunk-3MUIYMUG.cjs.map → chunk-N475ETD6.cjs.map} +1 -1
  145. package/dist/chunk-OXNYIMZZ.js +31 -0
  146. package/dist/chunk-OXNYIMZZ.js.map +1 -0
  147. package/dist/{chunk-YCHC45BY.js → chunk-PI4RO4GR.js} +3 -3
  148. package/dist/{chunk-YCHC45BY.js.map → chunk-PI4RO4GR.js.map} +1 -1
  149. package/dist/chunk-QKE556YD.js +197 -0
  150. package/dist/chunk-QKE556YD.js.map +1 -0
  151. package/dist/{chunk-FV3YEMQ7.js → chunk-RP5HQVLD.js} +13 -14
  152. package/dist/chunk-RP5HQVLD.js.map +1 -0
  153. package/dist/chunk-SCFW5MJZ.js +100 -0
  154. package/dist/chunk-SCFW5MJZ.js.map +1 -0
  155. package/dist/{chunk-ZYOHF37V.js → chunk-SG5ZWT6C.js} +3 -3
  156. package/dist/{chunk-ZYOHF37V.js.map → chunk-SG5ZWT6C.js.map} +1 -1
  157. package/dist/{chunk-ED7ANP6W.cjs → chunk-TIMPJL5V.cjs} +4 -4
  158. package/dist/{chunk-ED7ANP6W.cjs.map → chunk-TIMPJL5V.cjs.map} +1 -1
  159. package/dist/{chunk-3XKVRLR2.js → chunk-TOTP24P6.js} +4 -4
  160. package/dist/{chunk-3XKVRLR2.js.map → chunk-TOTP24P6.js.map} +1 -1
  161. package/dist/{chunk-PG3QQLWS.cjs → chunk-USZTVNUQ.cjs} +5 -5
  162. package/dist/{chunk-PG3QQLWS.cjs.map → chunk-USZTVNUQ.cjs.map} +1 -1
  163. package/dist/{chunk-XS7SKY2F.js → chunk-V2RBCCN5.js} +3 -3
  164. package/dist/chunk-V2RBCCN5.js.map +1 -0
  165. package/dist/{chunk-D3SJLXYZ.cjs → chunk-VJYSQXN6.cjs} +10 -10
  166. package/dist/{chunk-D3SJLXYZ.cjs.map → chunk-VJYSQXN6.cjs.map} +1 -1
  167. package/dist/{chunk-6ZGD7R27.cjs → chunk-VWI3CDEW.cjs} +8 -75
  168. package/dist/chunk-VWI3CDEW.cjs.map +1 -0
  169. package/dist/{chunk-MXRBNJ6D.cjs → chunk-W4WKVOOQ.cjs} +11 -11
  170. package/dist/{chunk-MXRBNJ6D.cjs.map → chunk-W4WKVOOQ.cjs.map} +1 -1
  171. package/dist/chunk-XYOHKCYG.cjs +109 -0
  172. package/dist/chunk-XYOHKCYG.cjs.map +1 -0
  173. package/dist/{chunk-UD2T7ISG.js → chunk-YP67XZES.js} +4 -4
  174. package/dist/{chunk-UD2T7ISG.js.map → chunk-YP67XZES.js.map} +1 -1
  175. package/dist/{chunk-HHUDNTZC.js → chunk-YRXY2A5L.js} +4 -4
  176. package/dist/{chunk-HHUDNTZC.js.map → chunk-YRXY2A5L.js.map} +1 -1
  177. package/dist/{chunk-6OKPJZMX.cjs → chunk-Z2CUEBXV.cjs} +25 -9
  178. package/dist/chunk-Z2CUEBXV.cjs.map +1 -0
  179. package/dist/compact-session-GKA7GFVT.js +18 -0
  180. package/dist/{compact-session-RR3ILTES.js.map → compact-session-GKA7GFVT.js.map} +1 -1
  181. package/dist/compact-session-XMP6OGY3.cjs +55 -0
  182. package/dist/{compact-session-YOWJJPPB.cjs.map → compact-session-XMP6OGY3.cjs.map} +1 -1
  183. package/dist/compaction.cjs +16 -16
  184. package/dist/compaction.js +3 -3
  185. package/dist/concurrency.cjs +6 -6
  186. package/dist/concurrency.js +4 -4
  187. package/dist/context-2FZSC6VQ.cjs +22 -0
  188. package/dist/{context-Q6ISOCN2.cjs.map → context-2FZSC6VQ.cjs.map} +1 -1
  189. package/dist/context-ATJJAFOS.js +5 -0
  190. package/dist/{context-ZDBBPIHY.js.map → context-ATJJAFOS.js.map} +1 -1
  191. package/dist/{cron-ChQ6zcW2.d.ts → cron-Bx7tzm5R.d.ts} +54 -2
  192. package/dist/{cron-BdXOZco9.d.cts → cron-D-DVjGQe.d.cts} +54 -2
  193. package/dist/cron.cjs +33 -29
  194. package/dist/cron.d.cts +3 -3
  195. package/dist/cron.d.ts +3 -3
  196. package/dist/cron.js +32 -28
  197. package/dist/{errors-BUVjJGJA.d.cts → errors-DMY-gLSK.d.cts} +1 -1
  198. package/dist/{errors-CZIUKLHt.d.ts → errors-DjBQ4Tn8.d.ts} +1 -1
  199. package/dist/errors.cjs +21 -21
  200. package/dist/errors.d.cts +2 -2
  201. package/dist/errors.d.ts +2 -2
  202. package/dist/errors.js +2 -2
  203. package/dist/eval.cjs +41 -36
  204. package/dist/eval.cjs.map +1 -1
  205. package/dist/eval.js +37 -32
  206. package/dist/eval.js.map +1 -1
  207. package/dist/{executor-DPCBSI35.cjs → executor-BMRICN46.cjs} +26 -25
  208. package/dist/executor-BMRICN46.cjs.map +1 -0
  209. package/dist/{executor-ASDDIM2X.js → executor-T65PPOPT.js} +10 -9
  210. package/dist/executor-T65PPOPT.js.map +1 -0
  211. package/dist/filesystem/index.cjs +7 -7
  212. package/dist/filesystem/index.js +3 -3
  213. package/dist/fs-session-store-J5MCFFUM.cjs +19 -0
  214. package/dist/{fs-session-store-T5ZLQX42.cjs.map → fs-session-store-J5MCFFUM.cjs.map} +1 -1
  215. package/dist/fs-session-store-O6FNHECD.js +10 -0
  216. package/dist/{fs-session-store-K5QUPNJZ.js.map → fs-session-store-O6FNHECD.js.map} +1 -1
  217. package/dist/generate-object-UF6WIZLF.cjs +20 -0
  218. package/dist/{generate-object-F56VIZ6U.cjs.map → generate-object-UF6WIZLF.cjs.map} +1 -1
  219. package/dist/generate-object-XDCBYVK3.js +7 -0
  220. package/dist/{generate-object-LPSO6GVW.js.map → generate-object-XDCBYVK3.js.map} +1 -1
  221. package/dist/index-manager-N7RQYUKT.cjs +20 -0
  222. package/dist/{index-manager-DBJ55ZSO.cjs.map → index-manager-N7RQYUKT.cjs.map} +1 -1
  223. package/dist/index-manager-ZVZUHPP7.js +11 -0
  224. package/dist/{index-manager-F2H2RCZU.js.map → index-manager-ZVZUHPP7.js.map} +1 -1
  225. package/dist/index.cjs +138 -132
  226. package/dist/index.cjs.map +1 -1
  227. package/dist/index.d.cts +167 -9
  228. package/dist/index.d.ts +167 -9
  229. package/dist/index.js +47 -44
  230. package/dist/index.js.map +1 -1
  231. package/dist/{inject-session-RKNLUE72.js → inject-session-7P4CZGDT.js} +7 -6
  232. package/dist/inject-session-7P4CZGDT.js.map +1 -0
  233. package/dist/{inject-session-25EC74WV.cjs → inject-session-CC4KBYF6.cjs} +9 -8
  234. package/dist/inject-session-CC4KBYF6.cjs.map +1 -0
  235. package/dist/internal/agent-loop/loop-thinking-steps.d.ts +28 -0
  236. package/dist/internal/agent-loop/message-builders.d.ts +12 -3
  237. package/dist/internal/diagnostics.d.ts +24 -11
  238. package/dist/internal/llm/anthropic-shared.d.ts +4 -4
  239. package/dist/internal/llm/types.d.ts +49 -9
  240. package/dist/internal/local-agent/mcp-pool.d.ts +7 -3
  241. package/dist/internal/memory/adapters/azure-openai-embedding.d.cts +2 -0
  242. package/dist/internal/memory/adapters/catalog.d.cts +1 -0
  243. package/dist/internal/memory/adapters/cohere-embedding.d.cts +2 -0
  244. package/dist/internal/memory/adapters/deepinfra-embedding.d.cts +2 -0
  245. package/dist/internal/memory/adapters/gemini-embedding.d.cts +2 -0
  246. package/dist/internal/memory/adapters/index.cjs +28 -0
  247. package/dist/internal/memory/adapters/index.cjs.map +1 -0
  248. package/dist/internal/memory/adapters/index.d.cts +16 -0
  249. package/dist/internal/memory/adapters/index.d.ts +16 -0
  250. package/dist/internal/memory/adapters/index.js +11 -0
  251. package/dist/internal/memory/adapters/index.js.map +1 -0
  252. package/dist/internal/memory/adapters/jina-embedding.d.cts +2 -0
  253. package/dist/internal/memory/adapters/mistral-embedding.d.cts +2 -0
  254. package/dist/internal/memory/adapters/ollama-embedding.d.cts +34 -0
  255. package/dist/internal/memory/adapters/openai-compatible.d.cts +51 -0
  256. package/dist/internal/memory/adapters/openai-compatible.d.ts +28 -0
  257. package/dist/internal/memory/adapters/openai-embedding.d.cts +2 -0
  258. package/dist/internal/memory/adapters/openrouter-embedding.d.cts +2 -0
  259. package/dist/internal/memory/adapters/voyage-embedding.d.cts +2 -0
  260. package/dist/internal/memory/dreaming/diary.d.ts +4 -0
  261. package/dist/internal/memory/dreaming/phases.d.ts +15 -0
  262. package/dist/internal/memory/dreaming/run.d.ts +10 -0
  263. package/dist/internal/memory/migrate-sqlite-to-lance.d.ts +15 -0
  264. package/dist/internal/memory/sdk-memory-peer-loader.d.ts +21 -0
  265. package/dist/internal/persistence/index.cjs +25 -25
  266. package/dist/internal/persistence/index.js +6 -6
  267. package/dist/internal/persistence/session-transcript.d.cts +6 -0
  268. package/dist/internal/persistence/session-transcript.d.ts +6 -0
  269. package/dist/internal/runtime/concurrency/subagent-credentials.d.ts +35 -0
  270. package/dist/internal/security/index.cjs +13 -13
  271. package/dist/internal/security/index.js +3 -3
  272. package/dist/internal/session/agent-session-store.d.ts +1 -0
  273. package/dist/internal/session/session-types.d.ts +6 -1
  274. package/dist/judge-call-NA2G6ZMJ.js +5 -0
  275. package/dist/{judge-call-3S3T6O2Z.js.map → judge-call-NA2G6ZMJ.js.map} +1 -1
  276. package/dist/judge-call-U2D33JOW.cjs +22 -0
  277. package/dist/{judge-call-XIQJ5GIE.cjs.map → judge-call-U2D33JOW.cjs.map} +1 -1
  278. package/dist/models.cjs +20 -20
  279. package/dist/models.js +5 -5
  280. package/dist/path-safety.cjs +10 -10
  281. package/dist/path-safety.js +3 -3
  282. package/dist/persistence.cjs +35 -35
  283. package/dist/persistence.js +7 -7
  284. package/dist/project.cjs +5 -5
  285. package/dist/project.js +3 -3
  286. package/dist/registry-CAS6Y5ZY.js +9 -0
  287. package/dist/{registry-KMI5RA22.js.map → registry-CAS6Y5ZY.js.map} +1 -1
  288. package/dist/registry-JSDI4WKA.cjs +46 -0
  289. package/dist/{registry-BA3SLAN7.cjs.map → registry-JSDI4WKA.cjs.map} +1 -1
  290. package/dist/retry.cjs +4 -4
  291. package/dist/retry.js +3 -3
  292. package/dist/{run-vJHg2eGw.d.cts → run-i2-fUohR.d.cts} +16 -0
  293. package/dist/{run-vJHg2eGw.d.ts → run-i2-fUohR.d.ts} +16 -0
  294. package/dist/sandbox/index.cjs +6 -6
  295. package/dist/sandbox/index.js +2 -2
  296. package/dist/server/errors-envelope.cjs +14 -14
  297. package/dist/server/errors-envelope.d.cts +3 -3
  298. package/dist/server/errors-envelope.d.ts +3 -3
  299. package/dist/server/errors-envelope.js +3 -3
  300. package/dist/session-transcript-3B52DKTG.js +5 -0
  301. package/dist/{session-transcript-MMPWCESR.js.map → session-transcript-3B52DKTG.js.map} +1 -1
  302. package/dist/session-transcript-H7NUFXXM.cjs +50 -0
  303. package/dist/{session-transcript-DFGX6WNL.cjs.map → session-transcript-H7NUFXXM.cjs.map} +1 -1
  304. package/dist/skills.cjs +7 -7
  305. package/dist/skills.js +5 -5
  306. package/dist/stream-object-4FDU76YW.cjs +20 -0
  307. package/dist/{stream-object-YPXZ4F5P.cjs.map → stream-object-4FDU76YW.cjs.map} +1 -1
  308. package/dist/stream-object-HWDEEQN4.js +7 -0
  309. package/dist/{stream-object-AFERZU63.js.map → stream-object-HWDEEQN4.js.map} +1 -1
  310. package/dist/subagents-loader-A4W6C3QP.cjs +15 -0
  311. package/dist/subagents-loader-A4W6C3QP.cjs.map +1 -0
  312. package/dist/subagents-loader-X33KH2SZ.js +6 -0
  313. package/dist/subagents-loader-X33KH2SZ.js.map +1 -0
  314. package/dist/subagents-loader.cjs +6 -6
  315. package/dist/subagents-loader.d.cts +2 -2
  316. package/dist/subagents-loader.d.ts +2 -2
  317. package/dist/subagents-loader.js +4 -4
  318. package/dist/subscription/index.cjs +3 -3
  319. package/dist/subscription/index.js +2 -2
  320. package/dist/task-store.cjs +7 -7
  321. package/dist/task-store.js +4 -4
  322. package/dist/types/agent.d.ts +68 -3
  323. package/dist/types/conversation.d.ts +7 -0
  324. package/dist/types/messages.d.ts +9 -0
  325. package/dist/types/session-message.d.ts +59 -0
  326. package/dist/types/workflow.d.ts +36 -0
  327. package/dist/workflow.cjs +27 -27
  328. package/dist/workflow.d.cts +17 -1
  329. package/dist/workflow.d.ts +17 -1
  330. package/dist/workflow.js +6 -6
  331. package/docs/harness-capability-map.md +22 -0
  332. package/package.json +11 -1
  333. package/dist/agent-2GZC4W2A.cjs +0 -51
  334. package/dist/agent-3H3UKD6U.js +0 -42
  335. package/dist/batch-LXSALQC3.js.map +0 -1
  336. package/dist/batch-NZGN6SFV.cjs.map +0 -1
  337. package/dist/chunk-3BSP7LSG.cjs.map +0 -1
  338. package/dist/chunk-4APWS2YF.js.map +0 -1
  339. package/dist/chunk-6OKPJZMX.cjs.map +0 -1
  340. package/dist/chunk-6ZGD7R27.cjs.map +0 -1
  341. package/dist/chunk-A4XXV2C6.js.map +0 -1
  342. package/dist/chunk-A6GXYF2Q.js.map +0 -1
  343. package/dist/chunk-ACHGT3D2.js.map +0 -1
  344. package/dist/chunk-AOZYORH7.js.map +0 -1
  345. package/dist/chunk-BE3W4HYV.cjs.map +0 -1
  346. package/dist/chunk-BUGVDCI5.cjs.map +0 -1
  347. package/dist/chunk-FV3YEMQ7.js.map +0 -1
  348. package/dist/chunk-G2F67XUR.cjs.map +0 -1
  349. package/dist/chunk-G7X2Y7Y2.cjs.map +0 -1
  350. package/dist/chunk-HI6G3SNY.js.map +0 -1
  351. package/dist/chunk-IBDE4R5L.cjs.map +0 -1
  352. package/dist/chunk-KCZW75PI.js.map +0 -1
  353. package/dist/chunk-OFWU6UKF.cjs.map +0 -1
  354. package/dist/chunk-UZBA6YYP.cjs.map +0 -1
  355. package/dist/chunk-VUDH4D2M.js.map +0 -1
  356. package/dist/chunk-XS7SKY2F.js.map +0 -1
  357. package/dist/compact-session-RR3ILTES.js +0 -17
  358. package/dist/compact-session-YOWJJPPB.cjs +0 -54
  359. package/dist/context-Q6ISOCN2.cjs +0 -22
  360. package/dist/context-ZDBBPIHY.js +0 -5
  361. package/dist/executor-ASDDIM2X.js.map +0 -1
  362. package/dist/executor-DPCBSI35.cjs.map +0 -1
  363. package/dist/fs-session-store-K5QUPNJZ.js +0 -10
  364. package/dist/fs-session-store-T5ZLQX42.cjs +0 -19
  365. package/dist/generate-object-F56VIZ6U.cjs +0 -20
  366. package/dist/generate-object-LPSO6GVW.js +0 -7
  367. package/dist/index-manager-DBJ55ZSO.cjs +0 -19
  368. package/dist/index-manager-F2H2RCZU.js +0 -10
  369. package/dist/inject-session-25EC74WV.cjs.map +0 -1
  370. package/dist/inject-session-RKNLUE72.js.map +0 -1
  371. package/dist/judge-call-3S3T6O2Z.js +0 -5
  372. package/dist/judge-call-XIQJ5GIE.cjs +0 -22
  373. package/dist/registry-BA3SLAN7.cjs +0 -46
  374. package/dist/registry-KMI5RA22.js +0 -9
  375. package/dist/session-transcript-DFGX6WNL.cjs +0 -50
  376. package/dist/session-transcript-MMPWCESR.js +0 -5
  377. package/dist/stream-object-AFERZU63.js +0 -7
  378. package/dist/stream-object-YPXZ4F5P.cjs +0 -20
package/CHANGELOG.md CHANGED
@@ -1,5 +1,290 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.39.1
4
+
5
+ ### Patch Changes
6
+
7
+ - A retry no longer runs silently: each attempt announces itself through the diagnostics channel.
8
+
9
+ Every attempt now emits its number and ceiling, the backoff it is about to wait, the error class, and
10
+ the provider's `Retry-After` when one arrived. Nothing is written unless a host installs a sink
11
+ (`setDiagnosticsSink`), so the default stays silent — a library does not own the host's terminal.
12
+
13
+ The bug this closes is not a missing retry. `RetryingLlmClient` already wraps every arm of the
14
+ router, and `RateLimitError` is already retryable with a ceiling of 3. The defect was that the retry
15
+ was _unobservable_: the backoff is full-jitter, so three attempts can complete inside milliseconds
16
+ and disappear into the response latency. Issue #165 is the cost, measured — a 429 was investigated on
17
+ the wrong hypothesis for hours, because the available evidence could not distinguish "retried three
18
+ times and failed" from "never retried".
19
+
20
+ ```ts
21
+ import { setDiagnosticsSink } from "@theokit/sdk";
22
+ setDiagnosticsSink((m) => process.stderr.write(m + "\n"));
23
+ ```
24
+
25
+ ## 4.39.0
26
+
27
+ ### Minor Changes
28
+
29
+ - 5143651: New `Agent.describe(agentId)` — read-only introspection of a registered agent (theokit#123).
30
+
31
+ `Agent.list()` / `Agent.get()` enumerate agents and `agent.skills.list()` covers skills, but a
32
+ registered agent's tools and subagents were reachable only through the internal registry record. A
33
+ reflection endpoint — theokit-studio's `theokit dev` — had no way to report them, so it degraded to
34
+ `tools: []` / `workflows: []` with an `unavailable_reason`.
35
+
36
+ `describe` returns `{ agentId, runtime, model?, tools, subagents }`. Tools carry `name`,
37
+ `description` and the `inputSchema` the model is sent; subagents carry `name`, `description`, their
38
+ `model` and their tool whitelist.
39
+
40
+ It is a projection, not the options object: tool handlers and subagent prompts are stripped. A
41
+ handler is an executable that cannot cross a process boundary, and a prompt is the agent's
42
+ instructions rather than its signature — a reflection endpoint serializes whatever it is handed.
43
+
44
+ `tools` and `subagents` are always arrays, so a caller can distinguish "this agent has none" from
45
+ "the SDK did not say". An unknown agent throws `UnknownAgentError` rather than returning an empty
46
+ description, which would be indistinguishable from a real agent with nothing registered.
47
+
48
+ `AgentDescription`, `AgentToolDescription` and `AgentSubagentDescription` are exported from the
49
+ package barrel.
50
+
51
+ - ae27def: Every SDK diagnostic now goes through the interceptable channel (theokit#147).
52
+
53
+ `setDiagnosticsSink` let a TUI host keep the SDK's warnings out of its alternate screen, but the
54
+ original migration only covered `internal/`. Six sites in the package's own modules — `batch.ts`,
55
+ `event-bus.ts`, `compaction.ts` and the Workflow branch step — still wrote straight to
56
+ `process.stderr` / `console.warn`, so a host could install a sink and still have its frame corrupted
57
+ by a batch run or a failed summarizer. Those are routed through the channel, and a lint gate now
58
+ fails the build if a new direct write appears in `src/`.
59
+
60
+ The remaining allowlisted writers are seams whose destination the caller already chooses
61
+ (`opts.warn`, `opts.logger`, the Workflow logger), each listed with its reason.
62
+
63
+ `setDiagnosticsSink` is now exported from the package barrel. It previously existed only on an
64
+ internal path no consumer could import, so the channel these six fixes route into could not actually
65
+ be installed by a host — the reported blocker survived a green suite.
66
+
67
+ **Diagnostics are now silent by default.** With no sink installed the SDK writes nothing to the
68
+ terminal — a library does not own the host's screen. Installing a sink is how you see them:
69
+
70
+ ```ts
71
+ import { setDiagnosticsSink } from "@theokit/sdk";
72
+ setDiagnosticsSink((message) => myLogger.warn(message));
73
+ ```
74
+
75
+ This is a behaviour change for anyone who relied on reading SDK warnings from stderr. Restore the
76
+ old behaviour in one line: `setDiagnosticsSink((m) => process.stderr.write(m))`.
77
+
78
+ - 0bd082f: Three advertised embedding providers now actually work (theokit#159).
79
+
80
+ `azure-openai`, `cohere` and `gemini` were in the catalog and rejected on every call. The shared
81
+ runtime spoke exactly one wire — `Authorization: Bearer`, a `{ model, input }` body, a
82
+ `{ data: [{ embedding }] }` response — and none of the three speak it:
83
+
84
+ - **Azure** authenticates an API key with the `api-key` header (`Bearer` carries an Entra ID token,
85
+ not the key from `AZURE_OPENAI_API_KEY`), and the deployment is already in the URL path, so
86
+ `model` does not belong in the body.
87
+ - **Cohere**'s `/v2/embed` names the payload `texts`, requires `input_type`, and answers
88
+ `{ embeddings: { float } }`.
89
+ - **Gemini**'s OpenAI-compatible surface is at `/v1beta/openai/embeddings`, not `/v1/embeddings`.
90
+
91
+ The runtime gained three optional per-provider hooks — auth headers, request body, response reader —
92
+ whose defaults are exactly the previous behaviour, so the seven providers that were already correct
93
+ are untouched. Each divergence is asserted by a test that records the real request.
94
+
95
+ Advertising a provider that cannot work is worse than not advertising it; that is what this closes.
96
+
97
+ - 108679d: A resumed session can be re-rendered as tool cards, not prose (theokit#146).
98
+
99
+ The transcript always replayed correctly to the model, but the only projection a host could read
100
+ folded a tool call to the literal string `[tool call] NAME` — no call id, no arguments — and a
101
+ result to `[tool result] <body>`, with nothing tying the two together. A card-rendering TUI got flat
102
+ text on resume, which made cross-restart resume worth less than starting fresh.
103
+
104
+ Two additions, both additive:
105
+
106
+ - `SessionMessage` gains an optional `parts` array carrying `text`, `tool_use` (id, name, input) and
107
+ `tool_result` (toolUseId, content, isError). `text` is byte-identical to before, so every existing
108
+ reader — including the runtime's own prior-context replay — is untouched.
109
+ - New `Agent.transcript(agentId)` returns a local agent's persisted turns with both projections.
110
+ Read-only; it opens the session store and walks the transcript, appending nothing. Throws
111
+ `UnknownAgentError` for an unknown or non-local agent rather than returning an empty list, so a
112
+ typo cannot look like an empty session.
113
+
114
+ `SessionMessage` and `SessionMessagePart` are exported from the package barrel.
115
+
116
+ - 1e2a5e3: Extended-thinking sessions can be resumed (theokit#122).
117
+
118
+ Anthropic signs each `thinking` block and verifies that signature when the block is replayed on the
119
+ next turn. The SDK captured none of it, so a session that used extended thinking could be persisted
120
+ and then never resumed — the next request failed with `400 "thinking blocks cannot be modified"`.
121
+
122
+ The signature was dropped at four independent points, and fixing any one alone would have changed
123
+ nothing:
124
+
125
+ - the Anthropic adapter never requested extended thinking, so no signature was ever issued;
126
+ - it did not parse `thinking` blocks, so neither the text nor the signature left the stream;
127
+ - the agent loop emitted a thinking event and dropped it — nothing ever produced a `thinkingMessage`
128
+ step, so no thinking reached the transcript at all;
129
+ - the transcript reader discarded `thinking` blocks, so a resumed conversation lost them.
130
+
131
+ All four are closed, and the block now round-trips from the provider through persistence and back
132
+ onto the wire unchanged. Thinking and its answer text stay in one assistant message, in that order,
133
+ as Anthropic requires.
134
+
135
+ A thinking block with no signature — history recorded before this shipped, or reasoning text from an
136
+ OpenAI-compatible provider, which is never signed — is kept in the transcript but not replayed to
137
+ Anthropic. Sending it unsigned would fail the same validation and break the whole turn rather than
138
+ lose one block of context.
139
+
140
+ `SDKThinkingMessage` and the conversation `ThinkingMessage` gain an optional `signature`.
141
+
142
+ - c3f69bc: New `workflow.describe()` — a committed workflow can report its own shape (theokit#161).
143
+
144
+ Returns `{ name, steps }`, each step carrying its `id` and `kind` and recursing into `parallel`,
145
+ `branch`, `foreach` and `dowhile`. Executables a step holds — predicates, conditions, agents, prompt
146
+ templates — are omitted: they cannot cross a process boundary and say nothing about shape.
147
+
148
+ There is deliberately **no** `Workflow.list()`. A workflow is a value the caller constructs and
149
+ holds, so the caller already knows which ones exist; what it lacked was a way to describe one. A
150
+ registry would have added process-global state that nothing releases in order to re-answer a
151
+ question the host can answer itself, and coupling workflows to `AgentOptions` would tie together two
152
+ things that are independent today — a workflow runs perfectly well without an agent.
153
+
154
+ A reflection endpoint maps over its own workflows and calls this.
155
+
156
+ ### Patch Changes
157
+
158
+ - a4a9920: `@theokit/sdk-memory` now uses the SDK's embedding runtime instead of its own copy (theokit#160).
159
+
160
+ The two packages each carried a full copy of `createOpenAiCompatibleRuntime`, and the satellite's
161
+ catalog replaces the SDK's at runtime when installed — so the copy that ran was not the copy most
162
+ people read. That duplication is what produced the two-month adapter gap fixed in theokit#128, and
163
+ every fix since had to be applied to both files by hand.
164
+
165
+ There is now one implementation, imported from `@theokit/sdk/internal/memory-adapters` — a
166
+ semver-exempt sub-path in the same family as `internal/persistence` and `internal/security`, which
167
+ exist for exactly this reason.
168
+
169
+ **Behaviour change for `@theokit/sdk-memory` consumers:** embedding batches now run with bounded
170
+ parallelism instead of serially, and the embedding cache is process-wide instead of per-adapter.
171
+ Both are what the SDK already did; the satellite had silently missed both improvements.
172
+
173
+ - 50ffa6c: Removed the dead `tool_use` and `stop` variants from the internal `LlmEvent` union (theokit#144).
174
+
175
+ They declared a live, provider-level tool channel that never existed: only two providers yielded
176
+ them, the agent loop's collector never read them, and the tool calls they carried duplicated
177
+ `LlmFinish.toolCalls`. A declaration without a consumer is worse than an omission — it cost
178
+ `@theokit/agents` a workaround that held every text delta until the stream drained, which broke
179
+ live token streaming on text-only turns (issue #47).
180
+
181
+ The canonical live tool channel is `onDelta`: the `tool-call-started` / `tool-call-completed`
182
+ `InteractionUpdate`s emitted between LLM rounds, uniform across providers and correlated by
183
+ `callId`. `Run.events()` merges them with the structural messages into one ordered timeline. This
184
+ is now documented on the `LlmEvent` type itself.
185
+
186
+ Internal type only — no public API change.
187
+
188
+ - 0308f9f: `@theokit/sdk-memory` now serves every embedding provider the SDK advertises (theokit#128).
189
+
190
+ `azure-openai`, `cohere`, `jina` and `gemini` landed in the SDK core catalog in June 2026 and the
191
+ satellite never picked them up. That was not cosmetic drift: when `@theokit/sdk-memory` is
192
+ installed, its catalog _replaces_ core's in the routing path, while `Theokit.inspect.embeddingAdapters()`
193
+ kept listing all ten — so asking for one of the four got an "unknown provider" error from a provider
194
+ the SDK itself had just advertised. A cross-package test now fails the build if core ever advertises
195
+ a provider the peer cannot serve.
196
+
197
+ Also fixes the Azure OpenAI endpoint in both packages. Azure addresses the deployment in the URL
198
+ path (`/openai/deployments/{deployment}/embeddings`), and the placeholder was never substituted —
199
+ every Azure embedding request went to a URL containing the literal text `{model}` and could only 404. Providers with a static path are unaffected.
200
+
201
+ - a15d80f: `mcpLifecycle: 'session'` now actually keeps the MCP server alive between turns (theokit#155).
202
+
203
+ The option pooled the client _object_ but not the child _process_: every run's `finally` closed
204
+ every client it had been handed, so the previous turn SIGTERM'd the server and the next turn's
205
+ `initialize()` spawned a new one. Measured at 146 ms +/- 28 (n=12) of spawn + handshake per turn
206
+ for one stdio server, paid identically under `'run'` and `'session'` — the knob bought 0 ms.
207
+
208
+ Two changes, both needed:
209
+
210
+ - A run now closes only the MCP clients it owns. Under `'session'` the pool owns them, and they are
211
+ released by `dispose()` (or by the idle reaper), not by the turn that borrowed them.
212
+ - `initialize()` is a no-op while the child is live, so the per-turn handshake no longer replaces a
213
+ healthy process (which would have orphaned it and paid the spawn cost anyway). The reconnect path
214
+ is unaffected — it re-spawns directly, exactly as before.
215
+
216
+ The regression tests count child PIDs rather than client objects; counting objects is what let the
217
+ defect ship green.
218
+
219
+ - 32a82c4: Subagent credential inheritance no longer rides a property on the tool object (theokit#148).
220
+
221
+ A delegated child inherited its parent's API key through a symbol-keyed slot installed on the
222
+ subagent tool. That contract assumed the object would reach the dispatcher with an extra property
223
+ intact — and it broke twice: once because the bundler inlined two copies of the module that
224
+ disagreed on the key (#142/#143), and once because any layer rebuilding the tool from its known
225
+ fields simply dropped it. `@theokit/agents` hit the second and had to add an explicit symbol-copy
226
+ loop to compensate; the SDK's own tool assembly performs the same rebuild.
227
+
228
+ Credentials now travel on the run's async scope, so they reach the handler no matter what the tool
229
+ object looks like by the time it is dispatched. Consumers that normalize, wrap, or re-create SDK
230
+ tools no longer need to preserve hidden properties — a delegated child gets the parent's key either
231
+ way. The band-aid symbol-copy in `@theokit/agents` becomes unnecessary once the SDK
232
+ carrying this change is the resolved version. Against an OLDER SDK the copy loop is still required:
233
+ the pre-fix runtime reads the credential sink off the tool object, so a band-aid-free
234
+ `@theokit/agents` resolving an SDK below this release reproduces the very credential loss this issue
235
+ reports. `@theokit/agents` declares a caret range on `@theokit/sdk`, so that pairing is a normal
236
+ install rather than a hypothetical — raise the dependency floor in the same release that removes
237
+ the loop.
238
+
239
+ Also fixes a latent defect the old design could not avoid: credentials were stored per tool
240
+ instance, so one subagent tool shared by two concurrently running agents got last-writer-wins. Each
241
+ run now reads its own.
242
+
243
+ - f760c57: Fixes four defects in the extended-thinking support shipped moments earlier (theokit#122).
244
+
245
+ A `/review` of that change found it created, on the most common thinking shape, the exact failure it
246
+ was meant to remove. A round that reasons and then calls a tool **without preamble text** never
247
+ consumed its thinking block: the block survived onto the next round and was persisted against the
248
+ wrong text, carrying a signature that no longer matched its body. And the replayed assistant turn
249
+ never carried the block at all, so the round after a thinking + tool_use turn reached the provider
250
+ missing it.
251
+
252
+ The block is now a value on the round's own output rather than state on the loop context, which
253
+ makes that class of leak unrepresentable, and it is recorded on whichever path closes the round —
254
+ assistant text or tool call. The replayed assistant message leads with it, as the provider requires.
255
+
256
+ Two smaller corrections in the same area: redacting the thinking text now drops the signature
257
+ instead of persisting a pair that cannot verify (the block survives as display-only history, which
258
+ loses one block of context rather than the whole turn), and the provider's own reported block is now
259
+ what the loop consumes — previously it was produced and read by nobody, the same dead-channel shape
260
+ this release deletes elsewhere.
261
+
262
+ ## 4.38.0
263
+
264
+ ### Minor Changes
265
+
266
+ - New `run.events()` — every event of a run in true order, from a single source (theokit#140).
267
+
268
+ A consumer that wanted both structural messages and live token granularity had to fuse two
269
+ incomplete views by hand: `stream()` carries no token deltas, and `SendOptions.onDelta` carries no
270
+ `run_started` / `system`. Reconciling them in the consumer is what produced the ordering and
271
+ duplication bugs this replaces.
272
+
273
+ `events()` returns an `AsyncGenerator<RunTimelineEvent>`, a discriminated union of
274
+ `{ kind: "message" }` and `{ kind: "delta" }` — not a widened `SDKMessage`, because a token delta
275
+ is not a message and pretending otherwise would force every consumer to guess which of the two it
276
+ is holding.
277
+
278
+ Minor rather than major: `stream()` is untouched and remains the SDKMessage-only view, `onDelta` is
279
+ wrapped rather than replaced, and every existing consumer observes no change.
280
+
281
+ `RunTimelineEvent` is exported from the package barrel.
282
+
283
+ > Entry reconstructed on 2026-08-05. The 4.38.0 release was cut by a hand-written version bump
284
+ > (`8beb61da6`) that changed `package.json` alone — no changeset, so this section never existed and
285
+ > the published version shipped without notes. The facts here come from the release commit and the
286
+ > exported type contract, not from a recovered changeset.
287
+
3
288
  ## 4.37.2
4
289
 
5
290
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkG2F67XUR_cjs = require('../chunk-G2F67XUR.cjs');
3
+ var chunkB4YA6BRS_cjs = require('../chunk-B4YA6BRS.cjs');
4
4
  require('../chunk-NINIJCHU.cjs');
5
5
 
6
6
  // src/a2a/agent-mailbox.ts
@@ -96,11 +96,11 @@ var MessageBus = class {
96
96
 
97
97
  Object.defineProperty(exports, "MaxDelegationDepthError", {
98
98
  enumerable: true,
99
- get: function () { return chunkG2F67XUR_cjs.MaxDelegationDepthError; }
99
+ get: function () { return chunkB4YA6BRS_cjs.MaxDelegationDepthError; }
100
100
  });
101
101
  Object.defineProperty(exports, "SubAgent", {
102
102
  enumerable: true,
103
- get: function () { return chunkG2F67XUR_cjs.SubAgent; }
103
+ get: function () { return chunkB4YA6BRS_cjs.SubAgent; }
104
104
  });
105
105
  exports.AgentMailbox = AgentMailbox;
106
106
  exports.MessageBus = MessageBus;
package/dist/a2a/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { MaxDelegationDepthError, SubAgent } from '../chunk-FV3YEMQ7.js';
1
+ export { MaxDelegationDepthError, SubAgent } from '../chunk-RP5HQVLD.js';
2
2
  import '../chunk-6X6ID4MO.js';
3
3
 
4
4
  // src/a2a/agent-mailbox.ts
@@ -11,6 +11,7 @@
11
11
  *
12
12
  * @public
13
13
  */
14
+ import { type InheritedCredentials } from "../internal/runtime/concurrency/subagent-credentials.js";
14
15
  import type { AgentOptions, CustomTool, ToolContextMessage } from "../types/agent.js";
15
16
  import type { ModelSelection } from "../types/agent-prims.js";
16
17
  /** Arguments passed to {@link SubAgentSpec.messageFilter} (SE12). */
@@ -11,6 +11,7 @@
11
11
  *
12
12
  * @public
13
13
  */
14
+ import { type InheritedCredentials } from "../internal/runtime/concurrency/subagent-credentials.js";
14
15
  import type { AgentOptions, CustomTool, ToolContextMessage } from "../types/agent.js";
15
16
  import type { ModelSelection } from "../types/agent-prims.js";
16
17
  /** Arguments passed to {@link SubAgentSpec.messageFilter} (SE12). */
@@ -0,0 +1,46 @@
1
+ export { Agent } from './chunk-H3BOKK42.js';
2
+ import './chunk-2SFBB54R.js';
3
+ import './chunk-LJX2SQV2.js';
4
+ import './chunk-K2BQQ445.js';
5
+ import './chunk-7YSRCQDE.js';
6
+ import './chunk-KGRIHEDT.js';
7
+ import './chunk-HSPVMV6T.js';
8
+ import './chunk-HWNVAUK4.js';
9
+ import './chunk-5KOW3GLE.js';
10
+ import './chunk-3I4B3OIX.js';
11
+ import './chunk-4F7JQZOX.js';
12
+ import './chunk-ML5A5DOJ.js';
13
+ import './chunk-7GFX45DD.js';
14
+ import './chunk-YP67XZES.js';
15
+ import './chunk-QKE556YD.js';
16
+ import './chunk-SCFW5MJZ.js';
17
+ import './chunk-OXNYIMZZ.js';
18
+ import './chunk-FD2UT76F.js';
19
+ import './chunk-U54XCYG3.js';
20
+ import './chunk-RP5HQVLD.js';
21
+ import './chunk-6X6ID4MO.js';
22
+ import './chunk-UJ7IQJAG.js';
23
+ import './chunk-7AD3ZTZL.js';
24
+ import './chunk-LGILIGV3.js';
25
+ import './chunk-PI4RO4GR.js';
26
+ import './chunk-ET6PHZRX.js';
27
+ import './chunk-JRLXEYR4.js';
28
+ import './chunk-BQDUEG4C.js';
29
+ import './chunk-AECV3G5Z.js';
30
+ import './chunk-2XLKLVVR.js';
31
+ import './chunk-6EEYRFJC.js';
32
+ import './chunk-4VPXM6UU.js';
33
+ import './chunk-KX7JV5KM.js';
34
+ import './chunk-YRXY2A5L.js';
35
+ import './chunk-65ONFZWM.js';
36
+ import './chunk-X2FR4OIT.js';
37
+ import './chunk-TOTP24P6.js';
38
+ import './chunk-DKFGUOWL.js';
39
+ import './chunk-5NBUH3NO.js';
40
+ import './chunk-42IFCKQZ.js';
41
+ import './chunk-J3UK2GMN.js';
42
+ import './chunk-AR5MQZ3J.js';
43
+ import './chunk-SG5ZWT6C.js';
44
+ import './chunk-IVSD7L22.js';
45
+ //# sourceMappingURL=agent-6ULDAQT7.js.map
46
+ //# sourceMappingURL=agent-6ULDAQT7.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-3H3UKD6U.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-6ULDAQT7.js"}
@@ -1,4 +1,4 @@
1
- import { M as ModelSelection, ad as SDKUserMessage, af as SendOptions, b as Run, G as GenerateOptions, n as GenerateRunResult, $ as RunToCompletionOptions, a0 as RunToCompletionResult, S as SDKMessage, am as StreamToCompletionResult, C as CustomTool, c as PermissionMode, a as McpServerConfig, P as Processor } from './run-vJHg2eGw.cjs';
1
+ import { M as ModelSelection, ad as SDKUserMessage, af as SendOptions, b as Run, G as GenerateOptions, n as GenerateRunResult, $ as RunToCompletionOptions, a0 as RunToCompletionResult, S as SDKMessage, am as StreamToCompletionResult, C as CustomTool, c as PermissionMode, a as McpServerConfig, P as Processor } from './run-i2-fUohR.cjs';
2
2
  import * as zod from 'zod';
3
3
 
4
4
  /**
@@ -1820,9 +1820,11 @@ interface AgentOptions {
1820
1820
  *
1821
1821
  * `'run'` (DEFAULT, and the historical behaviour) spawns a client per `send` and drops it when the
1822
1822
  * run ends. `'session'` pools clients per `(agentId, server, config)` and keeps them across turns,
1823
- * which is what the reference does — Codex holds its connection manager in `SessionServices`
1824
- * (`core/src/state/service.rs:116`). Measured cost of the per-run path: 193 / 138 / 134 ms of
1825
- * spawn + handshake on every turn.
1823
+ * which is what the reference does — Codex holds its MCP runtime in `SessionServices`
1824
+ * (`codex-rs/core/src/state/service.rs:51-58`; theokit#155 corrected the earlier
1825
+ * `core/src/state/service.rs:116`, which named a parameter of `install_mcp_runtime`, not the
1826
+ * owning field). Measured cost of the per-run path: 193 / 138 / 134 ms of spawn + handshake on
1827
+ * every turn.
1826
1828
  *
1827
1829
  * Opt-in rather than default because it changes the FAILURE model: a server that dies mid-session
1828
1830
  * becomes a reachable state. One-shot and cron runs gain nothing from pooling and would pay that
@@ -2090,6 +2092,69 @@ type SDKAgentInfo = {
2090
2092
  env?: CloudEnv;
2091
2093
  repos?: string[];
2092
2094
  });
2095
+ /**
2096
+ * theokit#123 — one tool of a registered agent, as a reflection surface sees it.
2097
+ *
2098
+ * A projection, not the `CustomTool` itself: the handler is an executable that cannot cross a
2099
+ * process boundary and has no meaning to a caller enumerating a registry.
2100
+ *
2101
+ * @public
2102
+ */
2103
+ interface AgentToolDescription {
2104
+ name: string;
2105
+ description: string;
2106
+ /** The JSON Schema sent to the model verbatim — the tool's callable signature. */
2107
+ inputSchema: Record<string, unknown>;
2108
+ }
2109
+ /**
2110
+ * theokit#123 — one subagent of a registered agent (what theokit-studio calls a workflow).
2111
+ *
2112
+ * `prompt` is deliberately absent. Enumeration asks what a subagent IS and what it may call; its
2113
+ * system prompt is instructions, not signature, and a reflection endpoint that serializes it
2114
+ * publishes the agent's behaviour to anyone who can reach the endpoint.
2115
+ *
2116
+ * @public
2117
+ */
2118
+ interface AgentSubagentDescription {
2119
+ /** The key under `AgentOptions.agents` — how the parent addresses it. */
2120
+ name: string;
2121
+ description: string;
2122
+ /** `"inherit"` (or absent) means it runs on the parent's model. */
2123
+ model?: ModelSelection | "inherit";
2124
+ /** Tool whitelist, when the subagent is scoped to a subset of the parent's tools. */
2125
+ tools?: string[];
2126
+ }
2127
+ /**
2128
+ * theokit#123 — the read-only introspection of a registered agent, returned by `Agent.describe()`.
2129
+ *
2130
+ * `Agent.list()` / `Agent.get()` enumerate agents and `agent.skills.list()` covers skills; this
2131
+ * fills the remaining gap, so a reflection endpoint can report the live registry instead of
2132
+ * degrading to empty lists.
2133
+ *
2134
+ * `tools` and `subagents` are always arrays — never `undefined` — so a caller can distinguish
2135
+ * "this agent has none" from "the SDK did not say".
2136
+ *
2137
+ * @public
2138
+ */
2139
+ interface AgentDescription {
2140
+ agentId: string;
2141
+ /** Inlined rather than imported from the registry contract: `types/` stays a leaf (theokit#146). */
2142
+ runtime: "local" | "cloud";
2143
+ model?: ModelSelection;
2144
+ /**
2145
+ * The agent's DECLARED tool catalog.
2146
+ *
2147
+ * Plugin-contributed tools and the internal `think` tool (added when `reasoning` is on) are
2148
+ * assembled per run and are not knowable from the registry, so they are absent here. Stated
2149
+ * rather than implied: a reflection endpoint should not present this as the complete runtime set.
2150
+ */
2151
+ tools: readonly AgentToolDescription[];
2152
+ /**
2153
+ * Every subagent the runtime would resolve — file-based roles from `.theokit/agents/*.md` merged
2154
+ * with the inline `agentOptions.agents`, the same set `loadSubagents` builds for a run.
2155
+ */
2156
+ subagents: readonly AgentSubagentDescription[];
2157
+ }
2093
2158
  /**
2094
2159
  * Options for `Agent.list()`.
2095
2160
  *
@@ -2165,4 +2230,4 @@ interface ListResult<T> {
2165
2230
  nextCursor?: string;
2166
2231
  }
2167
2232
 
2168
- export { type MemoryToolSchema as $, type AgentOptions as A, type BudgetTracker as B, type CloudOptions as C, type CloudEnv as D, type CloudRepo as E, type ContextBudget as F, type GetAgentOptions as G, type ContextManagerKind as H, type InlineSkill as I, type JudgeResult as J, type ContextSnapshot as K, type LocalOptions as L, type MemorySettings as M, type ContextSource as N, type ContextSourceStatus as O, type ProviderRoutingSettings as P, type CreateSkillSpec as Q, type HookName as R, type SystemPromptResolver as S, type InvalidateCacheOptions as T, type MemoryAdapter as U, type MemoryAdapterCapabilities as V, type MemoryContext as W, type MemoryFact as X, type MemoryProviderHandle as Y, type MemoryProviderInitOptions as Z, type MemoryRevision as _, type AgentDefinition as a, type MemoryTurnMessage as a0, type PersonalityPreset as a1, type PluginContext as a2, type PostAssistantReplyContext as a3, type PostToolCallContext as a4, type PreToolCallContext as a5, type PreUserSendContext as a6, type PreUserSendResult as a7, type ProviderCapability as a8, type ProviderRoute as a9, type Verdict as aA, type ProviderTransform as aa, type ProviderTransformContext as ab, type RecordSessionSummaryArgs as ac, type ResolvedProviderRoute as ad, type RunUntilIterator as ae, type SDKAgentPlugins as af, type SDKAgentSkillDetail as ag, type SDKAgentSkills as ah, type SDKArtifact as ai, type SDKContextManager as aj, type SDKPluginMetadata as ak, type SDKProvidersManager as al, type SessionLifecycleContext as am, type SessionRecord as an, type SessionStore as ao, type SettingSource as ap, Skill as aq, type SkillsResolver as ar, type SkillsResolverContext as as, type SystemPromptContext as at, type SystemPromptMemoryFact as au, type SystemPromptSkillRef as av, type TelemetrySettings as aw, type ToolCallSummary as ax, type ToolResultTransformContext as ay, type TransformContext as az, type ContextSettings as b, type PluginsSettings as c, type SkillsSettings as d, type SDKAgent as e, type ListAgentsOptions as f, type ListResult as g, type SDKAgentInfo as h, type ListRunsOptions as i, type GetRunOptions as j, type AgentOperationOptions as k, type Plugin as l, type ProviderProfile as m, type GoalOptions as n, type GoalEvent as o, type GoalResult as p, type MemoryProvider as q, type MemoryId as r, type PreToolCallDecision as s, type SDKProvider as t, type ActiveMemoryPassArgs as u, type ActiveMemoryPassResult as v, type AgentMemory as w, type BudgetCheck as x, type BudgetTotal as y, type BudgetUsageEvent as z };
2233
+ export { type MemoryProviderHandle as $, type AgentOptions as A, type BudgetTracker as B, type CloudOptions as C, type BudgetCheck as D, type BudgetTotal as E, type BudgetUsageEvent as F, type GetAgentOptions as G, type CloudEnv as H, type InlineSkill as I, type JudgeResult as J, type CloudRepo as K, type LocalOptions as L, type MemorySettings as M, type ContextBudget as N, type ContextManagerKind as O, type ProviderRoutingSettings as P, type ContextSnapshot as Q, type ContextSource as R, type SystemPromptResolver as S, type ContextSourceStatus as T, type CreateSkillSpec as U, type HookName as V, type InvalidateCacheOptions as W, type MemoryAdapter as X, type MemoryAdapterCapabilities as Y, type MemoryContext as Z, type MemoryFact as _, type AgentDefinition as a, type MemoryProviderInitOptions as a0, type MemoryRevision as a1, type MemoryToolSchema as a2, type MemoryTurnMessage as a3, type PersonalityPreset as a4, type PluginContext as a5, type PostAssistantReplyContext as a6, type PostToolCallContext as a7, type PreToolCallContext as a8, type PreUserSendContext as a9, type ToolCallSummary as aA, type ToolResultTransformContext as aB, type TransformContext as aC, type Verdict as aD, type PreUserSendResult as aa, type ProviderCapability as ab, type ProviderRoute as ac, type ProviderTransform as ad, type ProviderTransformContext as ae, type RecordSessionSummaryArgs as af, type ResolvedProviderRoute as ag, type RunUntilIterator as ah, type SDKAgentPlugins as ai, type SDKAgentSkillDetail as aj, type SDKAgentSkills as ak, type SDKArtifact as al, type SDKContextManager as am, type SDKPluginMetadata as an, type SDKProvidersManager as ao, type SessionLifecycleContext as ap, type SessionRecord as aq, type SessionStore as ar, type SettingSource as as, Skill as at, type SkillsResolver as au, type SkillsResolverContext as av, type SystemPromptContext as aw, type SystemPromptMemoryFact as ax, type SystemPromptSkillRef as ay, type TelemetrySettings as az, type ContextSettings as b, type PluginsSettings as c, type SkillsSettings as d, type SDKAgent as e, type ListAgentsOptions as f, type ListResult as g, type SDKAgentInfo as h, type ListRunsOptions as i, type GetRunOptions as j, type AgentOperationOptions as k, type AgentDescription as l, type Plugin as m, type ProviderProfile as n, type GoalOptions as o, type GoalEvent as p, type GoalResult as q, type MemoryProvider as r, type MemoryId as s, type PreToolCallDecision as t, type SDKProvider as u, type ActiveMemoryPassArgs as v, type ActiveMemoryPassResult as w, type AgentMemory as x, type AgentSubagentDescription as y, type AgentToolDescription as z };
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+
3
+ var chunkCAFV7WPQ_cjs = require('./chunk-CAFV7WPQ.cjs');
4
+ require('./chunk-BV2MWEMV.cjs');
5
+ require('./chunk-N475ETD6.cjs');
6
+ require('./chunk-BUUUWQMB.cjs');
7
+ require('./chunk-VWI3CDEW.cjs');
8
+ require('./chunk-74D7KSBP.cjs');
9
+ require('./chunk-DAXEQELR.cjs');
10
+ require('./chunk-ECW2MLEW.cjs');
11
+ require('./chunk-BURYFNOM.cjs');
12
+ require('./chunk-XYOHKCYG.cjs');
13
+ require('./chunk-CN6UX5EV.cjs');
14
+ require('./chunk-6LGQECT7.cjs');
15
+ require('./chunk-WPZTYOUX.cjs');
16
+ require('./chunk-LALG2K33.cjs');
17
+ require('./chunk-7U2HAAWB.cjs');
18
+ require('./chunk-6YNYA7GD.cjs');
19
+ require('./chunk-2RW7K6FN.cjs');
20
+ require('./chunk-MUUQ2WFJ.cjs');
21
+ require('./chunk-6JSIEDKL.cjs');
22
+ require('./chunk-B4YA6BRS.cjs');
23
+ require('./chunk-NINIJCHU.cjs');
24
+ require('./chunk-YPEPCZHF.cjs');
25
+ require('./chunk-VJ26EKGJ.cjs');
26
+ require('./chunk-7OLG7VI4.cjs');
27
+ require('./chunk-TIMPJL5V.cjs');
28
+ require('./chunk-I53ZQHU6.cjs');
29
+ require('./chunk-Z2CUEBXV.cjs');
30
+ require('./chunk-DMTZ3FII.cjs');
31
+ require('./chunk-75DSEWTJ.cjs');
32
+ require('./chunk-YLQQX5W2.cjs');
33
+ require('./chunk-DWY25VLP.cjs');
34
+ require('./chunk-WJVHMTKB.cjs');
35
+ require('./chunk-DGLLVCNB.cjs');
36
+ require('./chunk-W4WKVOOQ.cjs');
37
+ require('./chunk-J6T5LWJ4.cjs');
38
+ require('./chunk-VYHJZVL5.cjs');
39
+ require('./chunk-G4XUXSRN.cjs');
40
+ require('./chunk-6NEHIHFU.cjs');
41
+ require('./chunk-C6Y6CWYD.cjs');
42
+ require('./chunk-E4IUN3JB.cjs');
43
+ require('./chunk-7YBJZS5P.cjs');
44
+ require('./chunk-G2Q3ZC6C.cjs');
45
+ require('./chunk-IHFNRNTJ.cjs');
46
+ require('./chunk-BCQ3E2ZG.cjs');
47
+
48
+
49
+
50
+ Object.defineProperty(exports, "Agent", {
51
+ enumerable: true,
52
+ get: function () { return chunkCAFV7WPQ_cjs.Agent; }
53
+ });
54
+ //# sourceMappingURL=agent-PVUKI3BB.cjs.map
55
+ //# sourceMappingURL=agent-PVUKI3BB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-2GZC4W2A.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"agent-PVUKI3BB.cjs"}