@theokit/sdk 4.38.0 → 4.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +237 -0
- package/dist/a2a/index.cjs +3 -3
- package/dist/a2a/index.js +1 -1
- package/dist/a2a/subagent.d.cts +1 -0
- package/dist/a2a/subagent.d.ts +1 -0
- package/dist/{agent-U3lBX-5t.d.cts → agent-D7bRK9Kg.d.cts} +70 -5
- package/dist/agent-I3EZZR6S.cjs +55 -0
- package/dist/{agent-2GZC4W2A.cjs.map → agent-I3EZZR6S.cjs.map} +1 -1
- package/dist/agent-KKZYLY5D.js +46 -0
- package/dist/{agent-3H3UKD6U.js.map → agent-KKZYLY5D.js.map} +1 -1
- package/dist/{agent-C3AEtM-W.d.ts → agent-ZCZa7YQv.d.ts} +70 -5
- package/dist/agent-session-store-N4TVKHBU.cjs +23 -0
- package/dist/agent-session-store-N4TVKHBU.cjs.map +1 -0
- package/dist/agent-session-store-RHMHP5DG.js +6 -0
- package/dist/agent-session-store-RHMHP5DG.js.map +1 -0
- package/dist/agent.d.ts +37 -1
- package/dist/auth/index.cjs +15 -15
- package/dist/auth/index.js +4 -4
- package/dist/{batch-LXSALQC3.js → batch-6KQM3EBA.js} +12 -12
- package/dist/batch-6KQM3EBA.js.map +1 -0
- package/dist/{batch-NZGN6SFV.cjs → batch-X6JKGDPK.cjs} +26 -26
- package/dist/batch-X6JKGDPK.cjs.map +1 -0
- package/dist/chunk-2RW7K6FN.cjs +34 -0
- package/dist/chunk-2RW7K6FN.cjs.map +1 -0
- package/dist/chunk-3I4B3OIX.js +105 -0
- package/dist/chunk-3I4B3OIX.js.map +1 -0
- package/dist/{chunk-KWXC6ERT.js → chunk-42IFCKQZ.js} +5 -5
- package/dist/{chunk-KWXC6ERT.js.map → chunk-42IFCKQZ.js.map} +1 -1
- package/dist/{chunk-4APWS2YF.js → chunk-4F7JQZOX.js} +9 -36
- package/dist/chunk-4F7JQZOX.js.map +1 -0
- package/dist/{chunk-VYD6BGKK.js → chunk-4JSZYSGW.js} +3 -3
- package/dist/{chunk-VYD6BGKK.js.map → chunk-4JSZYSGW.js.map} +1 -1
- package/dist/{chunk-A6GXYF2Q.js → chunk-65ONFZWM.js} +7 -6
- package/dist/chunk-65ONFZWM.js.map +1 -0
- package/dist/{chunk-SGTMDQ4O.js → chunk-6EEYRFJC.js} +5 -5
- package/dist/{chunk-SGTMDQ4O.js.map → chunk-6EEYRFJC.js.map} +1 -1
- package/dist/{chunk-M4OGSS66.cjs → chunk-6LGQECT7.cjs} +11 -11
- package/dist/{chunk-M4OGSS66.cjs.map → chunk-6LGQECT7.cjs.map} +1 -1
- package/dist/{chunk-KTXOHCAE.cjs → chunk-6NEHIHFU.cjs} +4 -4
- package/dist/{chunk-KTXOHCAE.cjs.map → chunk-6NEHIHFU.cjs.map} +1 -1
- package/dist/chunk-6YNYA7GD.cjs +103 -0
- package/dist/chunk-6YNYA7GD.cjs.map +1 -0
- package/dist/{chunk-2R6NBT5F.cjs → chunk-74D7KSBP.cjs} +11 -11
- package/dist/{chunk-2R6NBT5F.cjs.map → chunk-74D7KSBP.cjs.map} +1 -1
- package/dist/{chunk-6OIO4FYX.cjs → chunk-75DSEWTJ.cjs} +7 -7
- package/dist/{chunk-6OIO4FYX.cjs.map → chunk-75DSEWTJ.cjs.map} +1 -1
- package/dist/{chunk-3XRXORBS.cjs → chunk-7OLG7VI4.cjs} +4 -4
- package/dist/{chunk-3XRXORBS.cjs.map → chunk-7OLG7VI4.cjs.map} +1 -1
- package/dist/chunk-7U2HAAWB.cjs +199 -0
- package/dist/chunk-7U2HAAWB.cjs.map +1 -0
- package/dist/{chunk-QJQ2MAZF.cjs → chunk-7YBJZS5P.cjs} +8 -8
- package/dist/{chunk-QJQ2MAZF.cjs.map → chunk-7YBJZS5P.cjs.map} +1 -1
- package/dist/{chunk-ZFZYPLQI.js → chunk-AECV3G5Z.js} +4 -4
- package/dist/{chunk-ZFZYPLQI.js.map → chunk-AECV3G5Z.js.map} +1 -1
- package/dist/{chunk-QFWQLXCL.js → chunk-AR5MQZ3J.js} +3 -3
- package/dist/{chunk-QFWQLXCL.js.map → chunk-AR5MQZ3J.js.map} +1 -1
- package/dist/{chunk-G2F67XUR.cjs → chunk-B4YA6BRS.cjs} +13 -14
- package/dist/chunk-B4YA6BRS.cjs.map +1 -0
- package/dist/{chunk-BE3W4HYV.cjs → chunk-BCQ3E2ZG.cjs} +12 -3
- package/dist/chunk-BCQ3E2ZG.cjs.map +1 -0
- package/dist/{chunk-G7X2Y7Y2.cjs → chunk-BPN5ONSW.cjs} +182 -236
- package/dist/chunk-BPN5ONSW.cjs.map +1 -0
- package/dist/{chunk-XJ5TMOGA.js → chunk-BQDUEG4C.js} +3 -3
- package/dist/{chunk-XJ5TMOGA.js.map → chunk-BQDUEG4C.js.map} +1 -1
- package/dist/{chunk-OFWU6UKF.cjs → chunk-C7OP3FAK.cjs} +47 -11
- package/dist/chunk-C7OP3FAK.cjs.map +1 -0
- package/dist/{chunk-BUGVDCI5.cjs → chunk-CEIHCKTO.cjs} +4 -4
- package/dist/chunk-CEIHCKTO.cjs.map +1 -0
- package/dist/{chunk-3BSP7LSG.cjs → chunk-CN6UX5EV.cjs} +28 -56
- package/dist/chunk-CN6UX5EV.cjs.map +1 -0
- package/dist/{chunk-5BVBNE2F.js → chunk-D7IULBF2.js} +3 -3
- package/dist/{chunk-5BVBNE2F.js.map → chunk-D7IULBF2.js.map} +1 -1
- package/dist/{chunk-6ZGD7R27.cjs → chunk-DCXRHCZJ.cjs} +8 -75
- package/dist/chunk-DCXRHCZJ.cjs.map +1 -0
- package/dist/{chunk-YVI4YPUP.cjs → chunk-DGLLVCNB.cjs} +4 -4
- package/dist/{chunk-YVI4YPUP.cjs.map → chunk-DGLLVCNB.cjs.map} +1 -1
- package/dist/{chunk-JI34KBNC.js → chunk-DKFGUOWL.js} +3 -3
- package/dist/{chunk-JI34KBNC.js.map → chunk-DKFGUOWL.js.map} +1 -1
- package/dist/{chunk-ZET34IZE.cjs → chunk-DMTZ3FII.cjs} +5 -5
- package/dist/{chunk-ZET34IZE.cjs.map → chunk-DMTZ3FII.cjs.map} +1 -1
- package/dist/{chunk-6XZBKFQ7.js → chunk-DU7DE543.js} +3 -3
- package/dist/{chunk-6XZBKFQ7.js.map → chunk-DU7DE543.js.map} +1 -1
- package/dist/{chunk-VVMLMKYZ.cjs → chunk-DWY25VLP.cjs} +9 -9
- package/dist/{chunk-VVMLMKYZ.cjs.map → chunk-DWY25VLP.cjs.map} +1 -1
- package/dist/{chunk-A4XXV2C6.js → chunk-E2FFG33C.js} +5 -72
- package/dist/chunk-E2FFG33C.js.map +1 -0
- package/dist/{chunk-R4AMI7KD.cjs → chunk-E4IUN3JB.cjs} +15 -15
- package/dist/{chunk-R4AMI7KD.cjs.map → chunk-E4IUN3JB.cjs.map} +1 -1
- package/dist/{chunk-TKDWD3MU.cjs → chunk-ECHGWE47.cjs} +4 -4
- package/dist/{chunk-TKDWD3MU.cjs.map → chunk-ECHGWE47.cjs.map} +1 -1
- package/dist/{chunk-KL7E244K.cjs → chunk-ECW2MLEW.cjs} +4 -4
- package/dist/{chunk-KL7E244K.cjs.map → chunk-ECW2MLEW.cjs.map} +1 -1
- package/dist/{chunk-EDI7DBWO.js → chunk-ET6PHZRX.js} +3 -3
- package/dist/{chunk-EDI7DBWO.js.map → chunk-ET6PHZRX.js.map} +1 -1
- package/dist/{chunk-HLK35TD7.cjs → chunk-FRUBE44B.cjs} +24 -24
- package/dist/{chunk-HLK35TD7.cjs.map → chunk-FRUBE44B.cjs.map} +1 -1
- package/dist/{chunk-SRIF7HMN.cjs → chunk-FWBSDQZ7.cjs} +5 -5
- package/dist/{chunk-SRIF7HMN.cjs.map → chunk-FWBSDQZ7.cjs.map} +1 -1
- package/dist/{chunk-XKBJT7WI.cjs → chunk-G2Q3ZC6C.cjs} +4 -4
- package/dist/{chunk-XKBJT7WI.cjs.map → chunk-G2Q3ZC6C.cjs.map} +1 -1
- package/dist/{chunk-4MWBKBS4.cjs → chunk-G4XUXSRN.cjs} +12 -12
- package/dist/{chunk-4MWBKBS4.cjs.map → chunk-G4XUXSRN.cjs.map} +1 -1
- package/dist/{chunk-VUDH4D2M.js → chunk-GIRD3RWH.js} +282 -276
- package/dist/chunk-GIRD3RWH.js.map +1 -0
- package/dist/{chunk-BT6DFWZB.cjs → chunk-HIQFVHC6.cjs} +9 -9
- package/dist/{chunk-BT6DFWZB.cjs.map → chunk-HIQFVHC6.cjs.map} +1 -1
- package/dist/{chunk-UWEALKAN.js → chunk-HWNVAUK4.js} +3 -3
- package/dist/{chunk-UWEALKAN.js.map → chunk-HWNVAUK4.js.map} +1 -1
- package/dist/{chunk-3VKTDQMX.cjs → chunk-I53ZQHU6.cjs} +4 -4
- package/dist/{chunk-3VKTDQMX.cjs.map → chunk-I53ZQHU6.cjs.map} +1 -1
- package/dist/{chunk-A3MHE2MQ.cjs → chunk-IHFNRNTJ.cjs} +8 -8
- package/dist/{chunk-A3MHE2MQ.cjs.map → chunk-IHFNRNTJ.cjs.map} +1 -1
- package/dist/{chunk-UZBA6YYP.cjs → chunk-INSFS5GT.cjs} +540 -534
- package/dist/chunk-INSFS5GT.cjs.map +1 -0
- package/dist/{chunk-KCZW75PI.js → chunk-IVSD7L22.js} +12 -4
- package/dist/chunk-IVSD7L22.js.map +1 -0
- package/dist/{chunk-JCXIDFRI.js → chunk-J3UK2GMN.js} +3 -3
- package/dist/{chunk-JCXIDFRI.js.map → chunk-J3UK2GMN.js.map} +1 -1
- package/dist/{chunk-IBDE4R5L.cjs → chunk-J6T5LWJ4.cjs} +10 -9
- package/dist/chunk-J6T5LWJ4.cjs.map +1 -0
- package/dist/{chunk-AOZYORH7.js → chunk-JRLXEYR4.js} +21 -5
- package/dist/chunk-JRLXEYR4.js.map +1 -0
- package/dist/{chunk-EUB7YLU2.js → chunk-JZUPMTJY.js} +3 -3
- package/dist/{chunk-EUB7YLU2.js.map → chunk-JZUPMTJY.js.map} +1 -1
- package/dist/{chunk-ZK3BJ4XQ.js → chunk-KE6XKRLQ.js} +3 -3
- package/dist/{chunk-ZK3BJ4XQ.js.map → chunk-KE6XKRLQ.js.map} +1 -1
- package/dist/{chunk-4NVV3GRU.js → chunk-KGRIHEDT.js} +5 -5
- package/dist/{chunk-4NVV3GRU.js.map → chunk-KGRIHEDT.js.map} +1 -1
- package/dist/{chunk-EE24WJJR.js → chunk-KWUNN5J2.js} +5 -5
- package/dist/{chunk-EE24WJJR.js.map → chunk-KWUNN5J2.js.map} +1 -1
- package/dist/{chunk-LGCEYEU2.js → chunk-KX7JV5KM.js} +3 -3
- package/dist/{chunk-LGCEYEU2.js.map → chunk-KX7JV5KM.js.map} +1 -1
- package/dist/{chunk-2K7PRHDB.cjs → chunk-LALG2K33.cjs} +8 -8
- package/dist/{chunk-2K7PRHDB.cjs.map → chunk-LALG2K33.cjs.map} +1 -1
- package/dist/{chunk-4WIJSKFA.js → chunk-LGILIGV3.js} +3 -3
- package/dist/{chunk-4WIJSKFA.js.map → chunk-LGILIGV3.js.map} +1 -1
- package/dist/{chunk-7QDTZJRV.js → chunk-LJX2SQV2.js} +6 -6
- package/dist/{chunk-7QDTZJRV.js.map → chunk-LJX2SQV2.js.map} +1 -1
- package/dist/{chunk-ACHGT3D2.js → chunk-MC5EINBV.js} +44 -8
- package/dist/chunk-MC5EINBV.js.map +1 -0
- package/dist/{chunk-M6UUTNDT.js → chunk-ML5A5DOJ.js} +4 -4
- package/dist/{chunk-M6UUTNDT.js.map → chunk-ML5A5DOJ.js.map} +1 -1
- package/dist/{chunk-3MUIYMUG.cjs → chunk-N475ETD6.cjs} +17 -17
- package/dist/{chunk-3MUIYMUG.cjs.map → chunk-N475ETD6.cjs.map} +1 -1
- package/dist/chunk-OXNYIMZZ.js +31 -0
- package/dist/chunk-OXNYIMZZ.js.map +1 -0
- package/dist/{chunk-YCHC45BY.js → chunk-PI4RO4GR.js} +3 -3
- package/dist/{chunk-YCHC45BY.js.map → chunk-PI4RO4GR.js.map} +1 -1
- package/dist/chunk-QKE556YD.js +197 -0
- package/dist/chunk-QKE556YD.js.map +1 -0
- package/dist/{chunk-FV3YEMQ7.js → chunk-RP5HQVLD.js} +13 -14
- package/dist/chunk-RP5HQVLD.js.map +1 -0
- package/dist/chunk-SCFW5MJZ.js +100 -0
- package/dist/chunk-SCFW5MJZ.js.map +1 -0
- package/dist/{chunk-ZYOHF37V.js → chunk-SG5ZWT6C.js} +3 -3
- package/dist/{chunk-ZYOHF37V.js.map → chunk-SG5ZWT6C.js.map} +1 -1
- package/dist/{chunk-ED7ANP6W.cjs → chunk-TIMPJL5V.cjs} +4 -4
- package/dist/{chunk-ED7ANP6W.cjs.map → chunk-TIMPJL5V.cjs.map} +1 -1
- package/dist/{chunk-3XKVRLR2.js → chunk-TOTP24P6.js} +4 -4
- package/dist/{chunk-3XKVRLR2.js.map → chunk-TOTP24P6.js.map} +1 -1
- package/dist/{chunk-PG3QQLWS.cjs → chunk-USZTVNUQ.cjs} +5 -5
- package/dist/{chunk-PG3QQLWS.cjs.map → chunk-USZTVNUQ.cjs.map} +1 -1
- package/dist/{chunk-XS7SKY2F.js → chunk-V2RBCCN5.js} +3 -3
- package/dist/chunk-V2RBCCN5.js.map +1 -0
- package/dist/{chunk-D3SJLXYZ.cjs → chunk-VJYSQXN6.cjs} +10 -10
- package/dist/{chunk-D3SJLXYZ.cjs.map → chunk-VJYSQXN6.cjs.map} +1 -1
- package/dist/{chunk-MXRBNJ6D.cjs → chunk-W4WKVOOQ.cjs} +11 -11
- package/dist/{chunk-MXRBNJ6D.cjs.map → chunk-W4WKVOOQ.cjs.map} +1 -1
- package/dist/chunk-XYOHKCYG.cjs +109 -0
- package/dist/chunk-XYOHKCYG.cjs.map +1 -0
- package/dist/{chunk-UD2T7ISG.js → chunk-YP67XZES.js} +4 -4
- package/dist/{chunk-UD2T7ISG.js.map → chunk-YP67XZES.js.map} +1 -1
- package/dist/{chunk-HHUDNTZC.js → chunk-YRXY2A5L.js} +4 -4
- package/dist/{chunk-HHUDNTZC.js.map → chunk-YRXY2A5L.js.map} +1 -1
- package/dist/{chunk-6OKPJZMX.cjs → chunk-Z2CUEBXV.cjs} +25 -9
- package/dist/chunk-Z2CUEBXV.cjs.map +1 -0
- package/dist/{chunk-HI6G3SNY.js → chunk-ZYB6B7QJ.js} +72 -125
- package/dist/chunk-ZYB6B7QJ.js.map +1 -0
- package/dist/compact-session-PYEC3NZV.js +18 -0
- package/dist/{compact-session-RR3ILTES.js.map → compact-session-PYEC3NZV.js.map} +1 -1
- package/dist/compact-session-VVT6IBJG.cjs +55 -0
- package/dist/{compact-session-YOWJJPPB.cjs.map → compact-session-VVT6IBJG.cjs.map} +1 -1
- package/dist/compaction.cjs +16 -16
- package/dist/compaction.js +3 -3
- package/dist/concurrency.cjs +6 -6
- package/dist/concurrency.js +4 -4
- package/dist/context-2FZSC6VQ.cjs +22 -0
- package/dist/{context-Q6ISOCN2.cjs.map → context-2FZSC6VQ.cjs.map} +1 -1
- package/dist/context-ATJJAFOS.js +5 -0
- package/dist/{context-ZDBBPIHY.js.map → context-ATJJAFOS.js.map} +1 -1
- package/dist/{cron-ChQ6zcW2.d.ts → cron-Bx7tzm5R.d.ts} +54 -2
- package/dist/{cron-BdXOZco9.d.cts → cron-D-DVjGQe.d.cts} +54 -2
- package/dist/cron.cjs +33 -29
- package/dist/cron.d.cts +3 -3
- package/dist/cron.d.ts +3 -3
- package/dist/cron.js +32 -28
- package/dist/{errors-BUVjJGJA.d.cts → errors-DMY-gLSK.d.cts} +1 -1
- package/dist/{errors-CZIUKLHt.d.ts → errors-DjBQ4Tn8.d.ts} +1 -1
- package/dist/errors.cjs +21 -21
- package/dist/errors.d.cts +2 -2
- package/dist/errors.d.ts +2 -2
- package/dist/errors.js +2 -2
- package/dist/eval.cjs +41 -36
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +37 -32
- package/dist/eval.js.map +1 -1
- package/dist/{executor-DPCBSI35.cjs → executor-BMRICN46.cjs} +26 -25
- package/dist/executor-BMRICN46.cjs.map +1 -0
- package/dist/{executor-ASDDIM2X.js → executor-T65PPOPT.js} +10 -9
- package/dist/executor-T65PPOPT.js.map +1 -0
- package/dist/filesystem/index.cjs +7 -7
- package/dist/filesystem/index.js +3 -3
- package/dist/fs-session-store-J5MCFFUM.cjs +19 -0
- package/dist/{fs-session-store-T5ZLQX42.cjs.map → fs-session-store-J5MCFFUM.cjs.map} +1 -1
- package/dist/fs-session-store-O6FNHECD.js +10 -0
- package/dist/{fs-session-store-K5QUPNJZ.js.map → fs-session-store-O6FNHECD.js.map} +1 -1
- package/dist/generate-object-UF6WIZLF.cjs +20 -0
- package/dist/{generate-object-F56VIZ6U.cjs.map → generate-object-UF6WIZLF.cjs.map} +1 -1
- package/dist/generate-object-XDCBYVK3.js +7 -0
- package/dist/{generate-object-LPSO6GVW.js.map → generate-object-XDCBYVK3.js.map} +1 -1
- package/dist/index-manager-N7RQYUKT.cjs +20 -0
- package/dist/{index-manager-DBJ55ZSO.cjs.map → index-manager-N7RQYUKT.cjs.map} +1 -1
- package/dist/index-manager-ZVZUHPP7.js +11 -0
- package/dist/{index-manager-F2H2RCZU.js.map → index-manager-ZVZUHPP7.js.map} +1 -1
- package/dist/index.cjs +138 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +167 -9
- package/dist/index.d.ts +167 -9
- package/dist/index.js +47 -44
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-RKNLUE72.js → inject-session-GQMTDZUN.js} +7 -6
- package/dist/inject-session-GQMTDZUN.js.map +1 -0
- package/dist/{inject-session-25EC74WV.cjs → inject-session-LFCYVSLJ.cjs} +9 -8
- package/dist/inject-session-LFCYVSLJ.cjs.map +1 -0
- package/dist/internal/agent-loop/loop-thinking-steps.d.ts +28 -0
- package/dist/internal/agent-loop/message-builders.d.ts +12 -3
- package/dist/internal/diagnostics.d.ts +24 -11
- package/dist/internal/llm/anthropic-shared.d.ts +4 -4
- package/dist/internal/llm/types.d.ts +49 -9
- package/dist/internal/local-agent/mcp-pool.d.ts +7 -3
- package/dist/internal/memory/adapters/azure-openai-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/catalog.d.cts +1 -0
- package/dist/internal/memory/adapters/cohere-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/deepinfra-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/gemini-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/index.cjs +28 -0
- package/dist/internal/memory/adapters/index.cjs.map +1 -0
- package/dist/internal/memory/adapters/index.d.cts +16 -0
- package/dist/internal/memory/adapters/index.d.ts +16 -0
- package/dist/internal/memory/adapters/index.js +11 -0
- package/dist/internal/memory/adapters/index.js.map +1 -0
- package/dist/internal/memory/adapters/jina-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/mistral-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/ollama-embedding.d.cts +34 -0
- package/dist/internal/memory/adapters/openai-compatible.d.cts +51 -0
- package/dist/internal/memory/adapters/openai-compatible.d.ts +28 -0
- package/dist/internal/memory/adapters/openai-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/openrouter-embedding.d.cts +2 -0
- package/dist/internal/memory/adapters/voyage-embedding.d.cts +2 -0
- package/dist/internal/memory/dreaming/diary.d.ts +4 -0
- package/dist/internal/memory/dreaming/phases.d.ts +15 -0
- package/dist/internal/memory/dreaming/run.d.ts +10 -0
- package/dist/internal/memory/migrate-sqlite-to-lance.d.ts +15 -0
- package/dist/internal/memory/sdk-memory-peer-loader.d.ts +21 -0
- package/dist/internal/persistence/index.cjs +25 -25
- package/dist/internal/persistence/index.js +6 -6
- package/dist/internal/persistence/session-transcript.d.cts +6 -0
- package/dist/internal/persistence/session-transcript.d.ts +6 -0
- package/dist/internal/runtime/concurrency/subagent-credentials.d.ts +35 -0
- package/dist/internal/security/index.cjs +13 -13
- package/dist/internal/security/index.js +3 -3
- package/dist/internal/session/agent-session-store.d.ts +1 -0
- package/dist/internal/session/session-types.d.ts +6 -1
- package/dist/judge-call-NA2G6ZMJ.js +5 -0
- package/dist/{judge-call-3S3T6O2Z.js.map → judge-call-NA2G6ZMJ.js.map} +1 -1
- package/dist/judge-call-U2D33JOW.cjs +22 -0
- package/dist/{judge-call-XIQJ5GIE.cjs.map → judge-call-U2D33JOW.cjs.map} +1 -1
- package/dist/models.cjs +20 -20
- package/dist/models.js +5 -5
- package/dist/path-safety.cjs +10 -10
- package/dist/path-safety.js +3 -3
- package/dist/persistence.cjs +35 -35
- package/dist/persistence.js +7 -7
- package/dist/project.cjs +5 -5
- package/dist/project.js +3 -3
- package/dist/registry-CAS6Y5ZY.js +9 -0
- package/dist/{registry-KMI5RA22.js.map → registry-CAS6Y5ZY.js.map} +1 -1
- package/dist/registry-JSDI4WKA.cjs +46 -0
- package/dist/{registry-BA3SLAN7.cjs.map → registry-JSDI4WKA.cjs.map} +1 -1
- package/dist/retry.cjs +4 -4
- package/dist/retry.js +3 -3
- package/dist/{run-vJHg2eGw.d.cts → run-i2-fUohR.d.cts} +16 -0
- package/dist/{run-vJHg2eGw.d.ts → run-i2-fUohR.d.ts} +16 -0
- package/dist/sandbox/index.cjs +6 -6
- package/dist/sandbox/index.js +2 -2
- package/dist/server/errors-envelope.cjs +14 -14
- package/dist/server/errors-envelope.d.cts +3 -3
- package/dist/server/errors-envelope.d.ts +3 -3
- package/dist/server/errors-envelope.js +3 -3
- package/dist/session-transcript-3B52DKTG.js +5 -0
- package/dist/{session-transcript-MMPWCESR.js.map → session-transcript-3B52DKTG.js.map} +1 -1
- package/dist/session-transcript-H7NUFXXM.cjs +50 -0
- package/dist/{session-transcript-DFGX6WNL.cjs.map → session-transcript-H7NUFXXM.cjs.map} +1 -1
- package/dist/skills.cjs +7 -7
- package/dist/skills.js +5 -5
- package/dist/stream-object-4FDU76YW.cjs +20 -0
- package/dist/{stream-object-YPXZ4F5P.cjs.map → stream-object-4FDU76YW.cjs.map} +1 -1
- package/dist/stream-object-HWDEEQN4.js +7 -0
- package/dist/{stream-object-AFERZU63.js.map → stream-object-HWDEEQN4.js.map} +1 -1
- package/dist/subagents-loader-A4W6C3QP.cjs +15 -0
- package/dist/subagents-loader-A4W6C3QP.cjs.map +1 -0
- package/dist/subagents-loader-X33KH2SZ.js +6 -0
- package/dist/subagents-loader-X33KH2SZ.js.map +1 -0
- package/dist/subagents-loader.cjs +6 -6
- package/dist/subagents-loader.d.cts +2 -2
- package/dist/subagents-loader.d.ts +2 -2
- package/dist/subagents-loader.js +4 -4
- package/dist/subscription/index.cjs +3 -3
- package/dist/subscription/index.js +2 -2
- package/dist/task-store.cjs +7 -7
- package/dist/task-store.js +4 -4
- package/dist/types/agent.d.ts +68 -3
- package/dist/types/conversation.d.ts +7 -0
- package/dist/types/messages.d.ts +9 -0
- package/dist/types/session-message.d.ts +59 -0
- package/dist/types/workflow.d.ts +36 -0
- package/dist/workflow.cjs +27 -27
- package/dist/workflow.d.cts +17 -1
- package/dist/workflow.d.ts +17 -1
- package/dist/workflow.js +6 -6
- package/docs/harness-capability-map.md +22 -0
- package/package.json +11 -1
- package/dist/agent-2GZC4W2A.cjs +0 -51
- package/dist/agent-3H3UKD6U.js +0 -42
- package/dist/batch-LXSALQC3.js.map +0 -1
- package/dist/batch-NZGN6SFV.cjs.map +0 -1
- package/dist/chunk-3BSP7LSG.cjs.map +0 -1
- package/dist/chunk-4APWS2YF.js.map +0 -1
- package/dist/chunk-6OKPJZMX.cjs.map +0 -1
- package/dist/chunk-6ZGD7R27.cjs.map +0 -1
- package/dist/chunk-A4XXV2C6.js.map +0 -1
- package/dist/chunk-A6GXYF2Q.js.map +0 -1
- package/dist/chunk-ACHGT3D2.js.map +0 -1
- package/dist/chunk-AOZYORH7.js.map +0 -1
- package/dist/chunk-BE3W4HYV.cjs.map +0 -1
- package/dist/chunk-BUGVDCI5.cjs.map +0 -1
- package/dist/chunk-FV3YEMQ7.js.map +0 -1
- package/dist/chunk-G2F67XUR.cjs.map +0 -1
- package/dist/chunk-G7X2Y7Y2.cjs.map +0 -1
- package/dist/chunk-HI6G3SNY.js.map +0 -1
- package/dist/chunk-IBDE4R5L.cjs.map +0 -1
- package/dist/chunk-KCZW75PI.js.map +0 -1
- package/dist/chunk-OFWU6UKF.cjs.map +0 -1
- package/dist/chunk-UZBA6YYP.cjs.map +0 -1
- package/dist/chunk-VUDH4D2M.js.map +0 -1
- package/dist/chunk-XS7SKY2F.js.map +0 -1
- package/dist/compact-session-RR3ILTES.js +0 -17
- package/dist/compact-session-YOWJJPPB.cjs +0 -54
- package/dist/context-Q6ISOCN2.cjs +0 -22
- package/dist/context-ZDBBPIHY.js +0 -5
- package/dist/executor-ASDDIM2X.js.map +0 -1
- package/dist/executor-DPCBSI35.cjs.map +0 -1
- package/dist/fs-session-store-K5QUPNJZ.js +0 -10
- package/dist/fs-session-store-T5ZLQX42.cjs +0 -19
- package/dist/generate-object-F56VIZ6U.cjs +0 -20
- package/dist/generate-object-LPSO6GVW.js +0 -7
- package/dist/index-manager-DBJ55ZSO.cjs +0 -19
- package/dist/index-manager-F2H2RCZU.js +0 -10
- package/dist/inject-session-25EC74WV.cjs.map +0 -1
- package/dist/inject-session-RKNLUE72.js.map +0 -1
- package/dist/judge-call-3S3T6O2Z.js +0 -5
- package/dist/judge-call-XIQJ5GIE.cjs +0 -22
- package/dist/registry-BA3SLAN7.cjs +0 -46
- package/dist/registry-KMI5RA22.js +0 -9
- package/dist/session-transcript-DFGX6WNL.cjs +0 -50
- package/dist/session-transcript-MMPWCESR.js +0 -5
- package/dist/stream-object-AFERZU63.js +0 -7
- package/dist/stream-object-YPXZ4F5P.cjs +0 -20
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-
|
|
2
|
-
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-
|
|
3
|
-
import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as Plugin$1,
|
|
4
|
-
export {
|
|
5
|
-
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig,
|
|
6
|
-
export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunTimelineEvent, $ as RunToCompletionOptions, a0 as RunToCompletionResult, a1 as RunToolProgressEvent, a2 as RunTripwireEvent, a3 as SDKAssistantMessage, a4 as SDKImage, a5 as SDKImageDimension, a6 as SDKObjectDelta, a7 as SDKRequestMessage, a8 as SDKStatusMessage, a9 as SDKSystemMessage, aa as SDKTaskMessage, ab as SDKThinkingMessage, ac as SDKToolUseMessage, ad as SDKUserMessage, ae as SDKUserMessageEvent, af as SendOptions, ag as ShellCommand, ah as ShellConversationTurn, ai as ShellOutput, aj as ShellOutputDeltaUpdate, ak as StepCompletedUpdate, al as StepStartedUpdate, am as StreamToCompletionResult, an as SummaryCompletedUpdate, ao as SummaryStartedUpdate, ap as SummaryUpdate, aq as TextBlock, ar as TextDeltaUpdate, as as ThinkingCompletedUpdate, at as ThinkingDeltaUpdate, au as ThinkingMessage, av as TokenDeltaUpdate, aw as TokenUsage, ax as ToolCall, ay as ToolCallCompletedUpdate, az as ToolCallStartedUpdate, aA as ToolContextMessage, aB as ToolResult, aC as ToolResultGuardOptions, aD as ToolUseBlock, aE as TurnEndedUpdate, aF as UserMessage, aG as UserMessageAppendedUpdate, aH as applyMode, aI as emitRunEvent } from './run-
|
|
1
|
+
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-DMY-gLSK.cjs';
|
|
2
|
+
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-DMY-gLSK.cjs';
|
|
3
|
+
import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as AgentDescription, m as Plugin$1, n as ProviderProfile, I as InlineSkill, J as JudgeResult, o as GoalOptions, p as GoalEvent, q as GoalResult, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './agent-D7bRK9Kg.cjs';
|
|
4
|
+
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as AgentSubagentDescription, z as AgentToolDescription, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, K as CloudRepo, N as ContextBudget, O as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as HookName, W as InvalidateCacheOptions, X as MemoryAdapter, Y as MemoryAdapterCapabilities, Z as MemoryContext, _ as MemoryFact, $ as MemoryProviderHandle, a0 as MemoryProviderInitOptions, a1 as MemoryRevision, a2 as MemoryToolSchema, a3 as MemoryTurnMessage, a4 as PersonalityPreset, a5 as PluginContext, a6 as PostAssistantReplyContext, a7 as PostToolCallContext, a8 as PreToolCallContext, a9 as PreUserSendContext, aa as PreUserSendResult, ab as ProviderCapability, ac as ProviderRoute, ad as ProviderTransform, ae as ProviderTransformContext, af as RecordSessionSummaryArgs, ag as ResolvedProviderRoute, ah as RunUntilIterator, ai as SDKAgentPlugins, aj as SDKAgentSkillDetail, ak as SDKAgentSkills, al as SDKArtifact, am as SDKContextManager, an as SDKPluginMetadata, ao as SDKProvidersManager, ap as SessionLifecycleContext, aq as SessionRecord, ar as SessionStore, as as SettingSource, at as Skill, au as SkillsResolver, av as SkillsResolverContext, aw as SystemPromptContext, ax as SystemPromptMemoryFact, ay as SystemPromptSkillRef, az as TelemetrySettings, aA as ToolCallSummary, aB as ToolResultTransformContext, aC as TransformContext, aD as Verdict } from './agent-D7bRK9Kg.cjs';
|
|
5
|
+
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-i2-fUohR.cjs';
|
|
6
|
+
export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunTimelineEvent, $ as RunToCompletionOptions, a0 as RunToCompletionResult, a1 as RunToolProgressEvent, a2 as RunTripwireEvent, a3 as SDKAssistantMessage, a4 as SDKImage, a5 as SDKImageDimension, a6 as SDKObjectDelta, a7 as SDKRequestMessage, a8 as SDKStatusMessage, a9 as SDKSystemMessage, aa as SDKTaskMessage, ab as SDKThinkingMessage, ac as SDKToolUseMessage, ad as SDKUserMessage, ae as SDKUserMessageEvent, af as SendOptions, ag as ShellCommand, ah as ShellConversationTurn, ai as ShellOutput, aj as ShellOutputDeltaUpdate, ak as StepCompletedUpdate, al as StepStartedUpdate, am as StreamToCompletionResult, an as SummaryCompletedUpdate, ao as SummaryStartedUpdate, ap as SummaryUpdate, aq as TextBlock, ar as TextDeltaUpdate, as as ThinkingCompletedUpdate, at as ThinkingDeltaUpdate, au as ThinkingMessage, av as TokenDeltaUpdate, aw as TokenUsage, ax as ToolCall, ay as ToolCallCompletedUpdate, az as ToolCallStartedUpdate, aA as ToolContextMessage, aB as ToolResult, aC as ToolResultGuardOptions, aD as ToolUseBlock, aE as TurnEndedUpdate, aF as UserMessage, aG as UserMessageAppendedUpdate, aH as applyMode, aI as emitRunEvent } from './run-i2-fUohR.cjs';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
|
-
import { S as StepResult } from './cron-
|
|
10
|
-
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-
|
|
9
|
+
import { S as StepResult } from './cron-D-DVjGQe.cjs';
|
|
10
|
+
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-D-DVjGQe.cjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Public compaction / context-management helpers (M2-1, extended V3-3).
|
|
@@ -468,6 +468,66 @@ declare class LiveAgentRegistry {
|
|
|
468
468
|
ids(): readonly string[];
|
|
469
469
|
}
|
|
470
470
|
|
|
471
|
+
/**
|
|
472
|
+
* The shape of a persisted session turn, as a HOST reads it.
|
|
473
|
+
*
|
|
474
|
+
* Lives in `types/` because it is public contract — `Agent.transcript()` returns it (theokit#146).
|
|
475
|
+
* `internal/session/session-types.ts` re-exports it so the runtime and the store keep importing
|
|
476
|
+
* from the leaf they always did.
|
|
477
|
+
*
|
|
478
|
+
* @public
|
|
479
|
+
*/
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* One turn of a session.
|
|
483
|
+
*
|
|
484
|
+
* Two projections of the same turn, and they answer different questions:
|
|
485
|
+
*
|
|
486
|
+
* - `text` is the flat rendering the model replay uses. A tool call folds to `[tool call] NAME` and
|
|
487
|
+
* a result to `[tool result] <body>`.
|
|
488
|
+
* - `parts` is the same turn unflattened, for a host that draws tool CARDS: the call id, the tool
|
|
489
|
+
* name, the arguments, and the `toolUseId` that ties a result back to its call — none of which
|
|
490
|
+
* survive the flat form.
|
|
491
|
+
*
|
|
492
|
+
* `parts` was added in theokit#146 and is additive: `text` is byte-identical to what it always was,
|
|
493
|
+
* so every existing reader is untouched.
|
|
494
|
+
*
|
|
495
|
+
* @public
|
|
496
|
+
*/
|
|
497
|
+
interface SessionMessage {
|
|
498
|
+
role: "user" | "assistant";
|
|
499
|
+
text: string;
|
|
500
|
+
/**
|
|
501
|
+
* The structured view. Optional because a `SessionMessage` can also be built in memory during a
|
|
502
|
+
* live turn, where only the text projection exists. Absent means "this projection carries no
|
|
503
|
+
* structure", never "this turn had none".
|
|
504
|
+
*/
|
|
505
|
+
parts?: readonly SessionMessagePart[];
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* One structured element of a {@link SessionMessage}.
|
|
509
|
+
*
|
|
510
|
+
* Deliberately a session-DISPLAY shape rather than a re-export of the internal LLM part union: the
|
|
511
|
+
* two answer different questions (what to send a provider vs. what to draw), and coupling them
|
|
512
|
+
* would make every provider-wire change a change to what hosts render.
|
|
513
|
+
*
|
|
514
|
+
* @public
|
|
515
|
+
*/
|
|
516
|
+
type SessionMessagePart = {
|
|
517
|
+
readonly type: "text";
|
|
518
|
+
readonly text: string;
|
|
519
|
+
} | {
|
|
520
|
+
readonly type: "tool_use";
|
|
521
|
+
readonly id: string;
|
|
522
|
+
readonly name: string;
|
|
523
|
+
readonly input: Record<string, unknown>;
|
|
524
|
+
} | {
|
|
525
|
+
readonly type: "tool_result";
|
|
526
|
+
readonly toolUseId: string;
|
|
527
|
+
readonly content: string | ReadonlyArray<ToolResultContentBlock>;
|
|
528
|
+
readonly isError?: boolean;
|
|
529
|
+
};
|
|
530
|
+
|
|
471
531
|
/**
|
|
472
532
|
* Result of a one-shot {@link Agent.prompt} call.
|
|
473
533
|
*
|
|
@@ -679,6 +739,41 @@ declare class Agent {
|
|
|
679
739
|
userText: string;
|
|
680
740
|
assistantText: string;
|
|
681
741
|
}): Promise<void>;
|
|
742
|
+
/**
|
|
743
|
+
* theokit#146 — read a LOCAL agent's persisted transcript as STRUCTURE, for rendering.
|
|
744
|
+
*
|
|
745
|
+
* A resumed session already replays correctly to the model, but a host had no way to draw it:
|
|
746
|
+
* the only projection available folded a tool call to the string `[tool call] NAME`, dropping the
|
|
747
|
+
* call id and every argument. A card UI got prose, so cross-restart resume was worth less than
|
|
748
|
+
* starting fresh — which is what at least one consumer did.
|
|
749
|
+
*
|
|
750
|
+
* Each returned message carries both projections: `text` (unchanged, what the model replay uses)
|
|
751
|
+
* and `parts` (`text` / `tool_use` / `tool_result` with ids, names, arguments and the
|
|
752
|
+
* `toolUseId` that correlates a result back to its call).
|
|
753
|
+
*
|
|
754
|
+
* Read-only and local-only: it opens the agent's session store and walks the transcript, exactly
|
|
755
|
+
* as {@link Agent.compact} and {@link Agent.injectSessionTurn} do. It appends nothing.
|
|
756
|
+
*
|
|
757
|
+
* @throws UnknownAgentError when `agentId` names no local agent.
|
|
758
|
+
* @public
|
|
759
|
+
*/
|
|
760
|
+
static transcript(agentId: string): Promise<readonly SessionMessage[]>;
|
|
761
|
+
/**
|
|
762
|
+
* theokit#123 — read-only introspection of a registered agent's tools and subagents.
|
|
763
|
+
*
|
|
764
|
+
* `Agent.list()` / `Agent.get()` enumerate agents and `agent.skills.list()` covers skills, but
|
|
765
|
+
* tools and subagents lived only on `RegisteredAgent.options` — an internal contract. A
|
|
766
|
+
* reflection endpoint (theokit-studio's `theokit dev`) therefore had to report empty lists for
|
|
767
|
+
* both, and say so with an `unavailable_reason`.
|
|
768
|
+
*
|
|
769
|
+
* A PROJECTION, not the options object. Tool handlers and subagent prompts are stripped: a
|
|
770
|
+
* handler is an executable that cannot cross a process boundary, and a prompt is the agent's
|
|
771
|
+
* instructions rather than its signature — a reflection endpoint serializes what it is handed.
|
|
772
|
+
*
|
|
773
|
+
* @throws UnknownAgentError when `agentId` names no registered agent.
|
|
774
|
+
* @public
|
|
775
|
+
*/
|
|
776
|
+
static describe(agentId: string): Promise<AgentDescription>;
|
|
682
777
|
/**
|
|
683
778
|
* Permanently delete a cloud agent.
|
|
684
779
|
*
|
|
@@ -1339,6 +1434,69 @@ declare function createCounterBudgetTracker(options?: CounterBudgetTrackerOption
|
|
|
1339
1434
|
nextIteration(): void;
|
|
1340
1435
|
};
|
|
1341
1436
|
|
|
1437
|
+
/**
|
|
1438
|
+
* The library's single diagnostics channel — silent by default (#147).
|
|
1439
|
+
*
|
|
1440
|
+
* ## O problema
|
|
1441
|
+
*
|
|
1442
|
+
* The SDK wrote diagnostics straight to `process.stderr` from hot paths — 92 sites across 51
|
|
1443
|
+
* files under `internal/`. In a TUI host (Ink, alternate screen), those writes interleave with the
|
|
1444
|
+
* render and **corrupt the frame**. And the host had no way to intercept them: there was no
|
|
1445
|
+
* injectable logger. One consumer went as far as installing `proper-lockfile` just to silence ONE
|
|
1446
|
+
* of them.
|
|
1447
|
+
*
|
|
1448
|
+
* A library cannot assume `stdout`/`stderr` are free sinks. The application owns the terminal, not
|
|
1449
|
+
* the dependency.
|
|
1450
|
+
*
|
|
1451
|
+
* ## O contrato
|
|
1452
|
+
*
|
|
1453
|
+
* - **`setDiagnosticsSink(fn)`** hands the messages to the application, which decides where to put
|
|
1454
|
+
* them (a status line, a file, a panel). It is what was missing for a TUI to coexist with the SDK.
|
|
1455
|
+
* - **With no sink, nothing is emitted.** A library does not own the host's terminal.
|
|
1456
|
+
*
|
|
1457
|
+
* ## Silent by default, and how 36 suites survived the flip
|
|
1458
|
+
*
|
|
1459
|
+
* The default WAS `stderr`, and 36 test files spy on `process.stderr.write` to assert a given
|
|
1460
|
+
* warning is emitted. That contract is real and had to survive; migrating all 36 by hand, across
|
|
1461
|
+
* four different spy styles, is how you weaken 36 suites in one commit.
|
|
1462
|
+
*
|
|
1463
|
+
* So the flip happened at the default, and `vitest.setup.ts` installs a sink that FORWARDS to
|
|
1464
|
+
* `stderr` for the duration of every test. Those assertions still test what they always tested —
|
|
1465
|
+
* "this condition emits a diagnostic" — through the channel a host would use, while production
|
|
1466
|
+
* emits nothing unless asked.
|
|
1467
|
+
*
|
|
1468
|
+
* The cost is stated rather than hidden: no test observes the production default by accident, so
|
|
1469
|
+
* `tests/diagnostics-public-entry.test.ts` pins it explicitly by clearing the sink first.
|
|
1470
|
+
*
|
|
1471
|
+
* ## Coverage is the whole guarantee
|
|
1472
|
+
*
|
|
1473
|
+
* The first sweep migrated the 92 sites under `internal/` and left `src/`'s own modules —
|
|
1474
|
+
* `event-bus.ts`, `batch.ts`, `compaction.ts`, `internal/workflow/step-branch.ts`. A host could
|
|
1475
|
+
* therefore install a sink and still have its frame corrupted by a batch run, which is the reported
|
|
1476
|
+
* defect with a smaller blast radius. Those are routed here too, and
|
|
1477
|
+
* `tests/lint/no-direct-terminal-write.test.ts` is what keeps the next hot path from
|
|
1478
|
+
* reintroducing one. "Mostly interceptable" is not interceptable.
|
|
1479
|
+
*
|
|
1480
|
+
* The remaining direct writers are allowlisted there with a reason, and every one of them is a seam
|
|
1481
|
+
* whose destination the CALLER already chooses (`opts.warn`, `opts.logger`, the Workflow logger).
|
|
1482
|
+
*
|
|
1483
|
+
* ## What this is NOT
|
|
1484
|
+
*
|
|
1485
|
+
* It is not a logger with levels, formatting or multiple destinations. It is the minimum that
|
|
1486
|
+
* resolves the reported blocker; a full logger here would be inventing a requirement nobody asked
|
|
1487
|
+
* for.
|
|
1488
|
+
*/
|
|
1489
|
+
/** Receives each diagnostic message already formatted, with the trailing `\n`. */
|
|
1490
|
+
type DiagnosticsSink = (message: string) => void;
|
|
1491
|
+
/**
|
|
1492
|
+
* Installs (or removes, by passing `undefined`) the diagnostics destination.
|
|
1493
|
+
*
|
|
1494
|
+
* When a sink is present it is the ONLY destination — `stderr` gets no copy. Duplicating
|
|
1495
|
+
* destinations would hand the problem back to the TUI that installed the sink precisely to get the
|
|
1496
|
+
* messages out of the terminal.
|
|
1497
|
+
*/
|
|
1498
|
+
declare function setDiagnosticsSink(next: DiagnosticsSink | undefined): void;
|
|
1499
|
+
|
|
1342
1500
|
declare function withCwdMutex<T>(key: string, fn: () => Promise<T>): Promise<T>;
|
|
1343
1501
|
|
|
1344
1502
|
/**
|
|
@@ -2352,4 +2510,4 @@ declare function toShareGptTrajectory(result: BatchResult, options?: {
|
|
|
2352
2510
|
model?: string;
|
|
2353
2511
|
}): ShareGptTrajectory | null;
|
|
2354
2512
|
|
|
2355
|
-
export { Agent, AgentBuilder, AgentDefinition, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, runGoalLoop, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|
|
2513
|
+
export { Agent, AgentBuilder, AgentDefinition, AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, withCwdMutex };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-
|
|
2
|
-
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-
|
|
3
|
-
import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as Plugin$1,
|
|
4
|
-
export {
|
|
5
|
-
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig,
|
|
6
|
-
export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunTimelineEvent, $ as RunToCompletionOptions, a0 as RunToCompletionResult, a1 as RunToolProgressEvent, a2 as RunTripwireEvent, a3 as SDKAssistantMessage, a4 as SDKImage, a5 as SDKImageDimension, a6 as SDKObjectDelta, a7 as SDKRequestMessage, a8 as SDKStatusMessage, a9 as SDKSystemMessage, aa as SDKTaskMessage, ab as SDKThinkingMessage, ac as SDKToolUseMessage, ad as SDKUserMessage, ae as SDKUserMessageEvent, af as SendOptions, ag as ShellCommand, ah as ShellConversationTurn, ai as ShellOutput, aj as ShellOutputDeltaUpdate, ak as StepCompletedUpdate, al as StepStartedUpdate, am as StreamToCompletionResult, an as SummaryCompletedUpdate, ao as SummaryStartedUpdate, ap as SummaryUpdate, aq as TextBlock, ar as TextDeltaUpdate, as as ThinkingCompletedUpdate, at as ThinkingDeltaUpdate, au as ThinkingMessage, av as TokenDeltaUpdate, aw as TokenUsage, ax as ToolCall, ay as ToolCallCompletedUpdate, az as ToolCallStartedUpdate, aA as ToolContextMessage, aB as ToolResult, aC as ToolResultGuardOptions, aD as ToolUseBlock, aE as TurnEndedUpdate, aF as UserMessage, aG as UserMessageAppendedUpdate, aH as applyMode, aI as emitRunEvent } from './run-
|
|
1
|
+
import { T as TheokitAgentError, B as BudgetOptions, a as BudgetHandle, b as BudgetSnapshot, E as ErrorMetadata } from './errors-DjBQ4Tn8.js';
|
|
2
|
+
export { A as AgentDisposedError, c as AgentRunError, d as AgentRunErrorCode, e as AuthenticationError, f as BudgetExceedEvent, g as BudgetExceededError, h as BudgetLimit, i as BudgetMode, j as BudgetScope, k as BudgetThresholdEvent, l as BudgetWindow, C as ConfigurationError, m as ErrorCode, I as IntegrationNotConnectedError, n as InvalidTaskIdError, M as MemoryAdapterError, o as MemoryAdapterErrorCode, N as NetworkError, R as RateLimitError, p as TaskNotFoundError, U as UnknownAgentError, q as UnsupportedBudgetOperationError, r as UnsupportedRunOperationError, s as UnsupportedTaskOperationError, t as isTransientError } from './errors-DjBQ4Tn8.js';
|
|
3
|
+
import { A as AgentOptions, L as LocalOptions, P as ProviderRoutingSettings, S as SystemPromptResolver, C as CloudOptions, M as MemorySettings, a as AgentDefinition, b as ContextSettings, c as PluginsSettings, d as SkillsSettings, e as SDKAgent, f as ListAgentsOptions, g as ListResult, h as SDKAgentInfo, G as GetAgentOptions, i as ListRunsOptions, j as GetRunOptions, k as AgentOperationOptions, l as AgentDescription, m as Plugin$1, n as ProviderProfile, I as InlineSkill, J as JudgeResult, o as GoalOptions, p as GoalEvent, q as GoalResult, B as BudgetTracker, r as MemoryProvider, s as MemoryId, t as PreToolCallDecision, u as SDKProvider } from './agent-ZCZa7YQv.js';
|
|
4
|
+
export { v as ActiveMemoryPassArgs, w as ActiveMemoryPassResult, x as AgentMemory, y as AgentSubagentDescription, z as AgentToolDescription, D as BudgetCheck, E as BudgetTotal, F as BudgetUsageEvent, H as CloudEnv, K as CloudRepo, N as ContextBudget, O as ContextManagerKind, Q as ContextSnapshot, R as ContextSource, T as ContextSourceStatus, U as CreateSkillSpec, V as HookName, W as InvalidateCacheOptions, X as MemoryAdapter, Y as MemoryAdapterCapabilities, Z as MemoryContext, _ as MemoryFact, $ as MemoryProviderHandle, a0 as MemoryProviderInitOptions, a1 as MemoryRevision, a2 as MemoryToolSchema, a3 as MemoryTurnMessage, a4 as PersonalityPreset, a5 as PluginContext, a6 as PostAssistantReplyContext, a7 as PostToolCallContext, a8 as PreToolCallContext, a9 as PreUserSendContext, aa as PreUserSendResult, ab as ProviderCapability, ac as ProviderRoute, ad as ProviderTransform, ae as ProviderTransformContext, af as RecordSessionSummaryArgs, ag as ResolvedProviderRoute, ah as RunUntilIterator, ai as SDKAgentPlugins, aj as SDKAgentSkillDetail, ak as SDKAgentSkills, al as SDKArtifact, am as SDKContextManager, an as SDKPluginMetadata, ao as SDKProvidersManager, ap as SessionLifecycleContext, aq as SessionRecord, ar as SessionStore, as as SettingSource, at as Skill, au as SkillsResolver, av as SkillsResolverContext, aw as SystemPromptContext, ax as SystemPromptMemoryFact, ay as SystemPromptSkillRef, az as TelemetrySettings, aA as ToolCallSummary, aB as ToolResultTransformContext, aC as TransformContext, aD as Verdict } from './agent-ZCZa7YQv.js';
|
|
5
|
+
import { R as RunResult, M as ModelSelection, C as CustomTool, a as McpServerConfig, T as ToolResultContentBlock, b as Run, P as Processor, c as PermissionMode, d as PermissionEngine, e as RunEventSink, S as SDKMessage } from './run-i2-fUohR.js';
|
|
6
|
+
export { A as AgentConversationTurn, f as AssistantMessage, g as CompletionCheck, h as CompletionCheckResult, i as ConversationStep, j as ConversationTurn, k as CostBreakdown, l as CostSource, m as CostStatus, D as DoomLoopThresholds, G as GenerateOptions, n as GenerateRunResult, I as ImageBlock, o as InputProcessorContext, p as InteractionUpdate, q as McpAuthConfig, r as McpHttpServerConfig, s as McpOAuthConfig, t as McpStdioServerConfig, u as MessageOrigin, v as ModelParameterValue, O as OutputProcessorContext, w as PartialToolCallUpdate, x as PermissionAction, y as PermissionEngineOptions, z as PermissionRule, B as ProcessorControls, E as ProcessorTripwire, F as ProcessorViolation, H as RunCompactBoundaryEvent, J as RunCompletionCheckEvent, K as RunErrorDetail, L as RunEvent, N as RunGitInfo, Q as RunOperation, U as RunPermissionDeniedEvent, V as RunRateLimitEvent, W as RunStatus, X as RunTaskCompletedEvent, Y as RunTaskStartedEvent, Z as RunTaskUpdatedEvent, _ as RunTimelineEvent, $ as RunToCompletionOptions, a0 as RunToCompletionResult, a1 as RunToolProgressEvent, a2 as RunTripwireEvent, a3 as SDKAssistantMessage, a4 as SDKImage, a5 as SDKImageDimension, a6 as SDKObjectDelta, a7 as SDKRequestMessage, a8 as SDKStatusMessage, a9 as SDKSystemMessage, aa as SDKTaskMessage, ab as SDKThinkingMessage, ac as SDKToolUseMessage, ad as SDKUserMessage, ae as SDKUserMessageEvent, af as SendOptions, ag as ShellCommand, ah as ShellConversationTurn, ai as ShellOutput, aj as ShellOutputDeltaUpdate, ak as StepCompletedUpdate, al as StepStartedUpdate, am as StreamToCompletionResult, an as SummaryCompletedUpdate, ao as SummaryStartedUpdate, ap as SummaryUpdate, aq as TextBlock, ar as TextDeltaUpdate, as as ThinkingCompletedUpdate, at as ThinkingDeltaUpdate, au as ThinkingMessage, av as TokenDeltaUpdate, aw as TokenUsage, ax as ToolCall, ay as ToolCallCompletedUpdate, az as ToolCallStartedUpdate, aA as ToolContextMessage, aB as ToolResult, aC as ToolResultGuardOptions, aD as ToolUseBlock, aE as TurnEndedUpdate, aF as UserMessage, aG as UserMessageAppendedUpdate, aH as applyMode, aI as emitRunEvent } from './run-i2-fUohR.js';
|
|
7
7
|
import * as zod from 'zod';
|
|
8
8
|
import { ZodType, z } from 'zod';
|
|
9
|
-
import { S as StepResult } from './cron-
|
|
10
|
-
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-
|
|
9
|
+
import { S as StepResult } from './cron-Bx7tzm5R.js';
|
|
10
|
+
export { C as Cron, a as CronCreateOptions, b as CronGetOptions, c as CronJob, d as CronJobStatus, e as CronListOptions, f as CronOperationOptions, g as CronRunOptions, h as CronRuntime, i as CronSchedulerStatus, j as CronStartOptions } from './cron-Bx7tzm5R.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Public compaction / context-management helpers (M2-1, extended V3-3).
|
|
@@ -468,6 +468,66 @@ declare class LiveAgentRegistry {
|
|
|
468
468
|
ids(): readonly string[];
|
|
469
469
|
}
|
|
470
470
|
|
|
471
|
+
/**
|
|
472
|
+
* The shape of a persisted session turn, as a HOST reads it.
|
|
473
|
+
*
|
|
474
|
+
* Lives in `types/` because it is public contract — `Agent.transcript()` returns it (theokit#146).
|
|
475
|
+
* `internal/session/session-types.ts` re-exports it so the runtime and the store keep importing
|
|
476
|
+
* from the leaf they always did.
|
|
477
|
+
*
|
|
478
|
+
* @public
|
|
479
|
+
*/
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* One turn of a session.
|
|
483
|
+
*
|
|
484
|
+
* Two projections of the same turn, and they answer different questions:
|
|
485
|
+
*
|
|
486
|
+
* - `text` is the flat rendering the model replay uses. A tool call folds to `[tool call] NAME` and
|
|
487
|
+
* a result to `[tool result] <body>`.
|
|
488
|
+
* - `parts` is the same turn unflattened, for a host that draws tool CARDS: the call id, the tool
|
|
489
|
+
* name, the arguments, and the `toolUseId` that ties a result back to its call — none of which
|
|
490
|
+
* survive the flat form.
|
|
491
|
+
*
|
|
492
|
+
* `parts` was added in theokit#146 and is additive: `text` is byte-identical to what it always was,
|
|
493
|
+
* so every existing reader is untouched.
|
|
494
|
+
*
|
|
495
|
+
* @public
|
|
496
|
+
*/
|
|
497
|
+
interface SessionMessage {
|
|
498
|
+
role: "user" | "assistant";
|
|
499
|
+
text: string;
|
|
500
|
+
/**
|
|
501
|
+
* The structured view. Optional because a `SessionMessage` can also be built in memory during a
|
|
502
|
+
* live turn, where only the text projection exists. Absent means "this projection carries no
|
|
503
|
+
* structure", never "this turn had none".
|
|
504
|
+
*/
|
|
505
|
+
parts?: readonly SessionMessagePart[];
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* One structured element of a {@link SessionMessage}.
|
|
509
|
+
*
|
|
510
|
+
* Deliberately a session-DISPLAY shape rather than a re-export of the internal LLM part union: the
|
|
511
|
+
* two answer different questions (what to send a provider vs. what to draw), and coupling them
|
|
512
|
+
* would make every provider-wire change a change to what hosts render.
|
|
513
|
+
*
|
|
514
|
+
* @public
|
|
515
|
+
*/
|
|
516
|
+
type SessionMessagePart = {
|
|
517
|
+
readonly type: "text";
|
|
518
|
+
readonly text: string;
|
|
519
|
+
} | {
|
|
520
|
+
readonly type: "tool_use";
|
|
521
|
+
readonly id: string;
|
|
522
|
+
readonly name: string;
|
|
523
|
+
readonly input: Record<string, unknown>;
|
|
524
|
+
} | {
|
|
525
|
+
readonly type: "tool_result";
|
|
526
|
+
readonly toolUseId: string;
|
|
527
|
+
readonly content: string | ReadonlyArray<ToolResultContentBlock>;
|
|
528
|
+
readonly isError?: boolean;
|
|
529
|
+
};
|
|
530
|
+
|
|
471
531
|
/**
|
|
472
532
|
* Result of a one-shot {@link Agent.prompt} call.
|
|
473
533
|
*
|
|
@@ -679,6 +739,41 @@ declare class Agent {
|
|
|
679
739
|
userText: string;
|
|
680
740
|
assistantText: string;
|
|
681
741
|
}): Promise<void>;
|
|
742
|
+
/**
|
|
743
|
+
* theokit#146 — read a LOCAL agent's persisted transcript as STRUCTURE, for rendering.
|
|
744
|
+
*
|
|
745
|
+
* A resumed session already replays correctly to the model, but a host had no way to draw it:
|
|
746
|
+
* the only projection available folded a tool call to the string `[tool call] NAME`, dropping the
|
|
747
|
+
* call id and every argument. A card UI got prose, so cross-restart resume was worth less than
|
|
748
|
+
* starting fresh — which is what at least one consumer did.
|
|
749
|
+
*
|
|
750
|
+
* Each returned message carries both projections: `text` (unchanged, what the model replay uses)
|
|
751
|
+
* and `parts` (`text` / `tool_use` / `tool_result` with ids, names, arguments and the
|
|
752
|
+
* `toolUseId` that correlates a result back to its call).
|
|
753
|
+
*
|
|
754
|
+
* Read-only and local-only: it opens the agent's session store and walks the transcript, exactly
|
|
755
|
+
* as {@link Agent.compact} and {@link Agent.injectSessionTurn} do. It appends nothing.
|
|
756
|
+
*
|
|
757
|
+
* @throws UnknownAgentError when `agentId` names no local agent.
|
|
758
|
+
* @public
|
|
759
|
+
*/
|
|
760
|
+
static transcript(agentId: string): Promise<readonly SessionMessage[]>;
|
|
761
|
+
/**
|
|
762
|
+
* theokit#123 — read-only introspection of a registered agent's tools and subagents.
|
|
763
|
+
*
|
|
764
|
+
* `Agent.list()` / `Agent.get()` enumerate agents and `agent.skills.list()` covers skills, but
|
|
765
|
+
* tools and subagents lived only on `RegisteredAgent.options` — an internal contract. A
|
|
766
|
+
* reflection endpoint (theokit-studio's `theokit dev`) therefore had to report empty lists for
|
|
767
|
+
* both, and say so with an `unavailable_reason`.
|
|
768
|
+
*
|
|
769
|
+
* A PROJECTION, not the options object. Tool handlers and subagent prompts are stripped: a
|
|
770
|
+
* handler is an executable that cannot cross a process boundary, and a prompt is the agent's
|
|
771
|
+
* instructions rather than its signature — a reflection endpoint serializes what it is handed.
|
|
772
|
+
*
|
|
773
|
+
* @throws UnknownAgentError when `agentId` names no registered agent.
|
|
774
|
+
* @public
|
|
775
|
+
*/
|
|
776
|
+
static describe(agentId: string): Promise<AgentDescription>;
|
|
682
777
|
/**
|
|
683
778
|
* Permanently delete a cloud agent.
|
|
684
779
|
*
|
|
@@ -1339,6 +1434,69 @@ declare function createCounterBudgetTracker(options?: CounterBudgetTrackerOption
|
|
|
1339
1434
|
nextIteration(): void;
|
|
1340
1435
|
};
|
|
1341
1436
|
|
|
1437
|
+
/**
|
|
1438
|
+
* The library's single diagnostics channel — silent by default (#147).
|
|
1439
|
+
*
|
|
1440
|
+
* ## O problema
|
|
1441
|
+
*
|
|
1442
|
+
* The SDK wrote diagnostics straight to `process.stderr` from hot paths — 92 sites across 51
|
|
1443
|
+
* files under `internal/`. In a TUI host (Ink, alternate screen), those writes interleave with the
|
|
1444
|
+
* render and **corrupt the frame**. And the host had no way to intercept them: there was no
|
|
1445
|
+
* injectable logger. One consumer went as far as installing `proper-lockfile` just to silence ONE
|
|
1446
|
+
* of them.
|
|
1447
|
+
*
|
|
1448
|
+
* A library cannot assume `stdout`/`stderr` are free sinks. The application owns the terminal, not
|
|
1449
|
+
* the dependency.
|
|
1450
|
+
*
|
|
1451
|
+
* ## O contrato
|
|
1452
|
+
*
|
|
1453
|
+
* - **`setDiagnosticsSink(fn)`** hands the messages to the application, which decides where to put
|
|
1454
|
+
* them (a status line, a file, a panel). It is what was missing for a TUI to coexist with the SDK.
|
|
1455
|
+
* - **With no sink, nothing is emitted.** A library does not own the host's terminal.
|
|
1456
|
+
*
|
|
1457
|
+
* ## Silent by default, and how 36 suites survived the flip
|
|
1458
|
+
*
|
|
1459
|
+
* The default WAS `stderr`, and 36 test files spy on `process.stderr.write` to assert a given
|
|
1460
|
+
* warning is emitted. That contract is real and had to survive; migrating all 36 by hand, across
|
|
1461
|
+
* four different spy styles, is how you weaken 36 suites in one commit.
|
|
1462
|
+
*
|
|
1463
|
+
* So the flip happened at the default, and `vitest.setup.ts` installs a sink that FORWARDS to
|
|
1464
|
+
* `stderr` for the duration of every test. Those assertions still test what they always tested —
|
|
1465
|
+
* "this condition emits a diagnostic" — through the channel a host would use, while production
|
|
1466
|
+
* emits nothing unless asked.
|
|
1467
|
+
*
|
|
1468
|
+
* The cost is stated rather than hidden: no test observes the production default by accident, so
|
|
1469
|
+
* `tests/diagnostics-public-entry.test.ts` pins it explicitly by clearing the sink first.
|
|
1470
|
+
*
|
|
1471
|
+
* ## Coverage is the whole guarantee
|
|
1472
|
+
*
|
|
1473
|
+
* The first sweep migrated the 92 sites under `internal/` and left `src/`'s own modules —
|
|
1474
|
+
* `event-bus.ts`, `batch.ts`, `compaction.ts`, `internal/workflow/step-branch.ts`. A host could
|
|
1475
|
+
* therefore install a sink and still have its frame corrupted by a batch run, which is the reported
|
|
1476
|
+
* defect with a smaller blast radius. Those are routed here too, and
|
|
1477
|
+
* `tests/lint/no-direct-terminal-write.test.ts` is what keeps the next hot path from
|
|
1478
|
+
* reintroducing one. "Mostly interceptable" is not interceptable.
|
|
1479
|
+
*
|
|
1480
|
+
* The remaining direct writers are allowlisted there with a reason, and every one of them is a seam
|
|
1481
|
+
* whose destination the CALLER already chooses (`opts.warn`, `opts.logger`, the Workflow logger).
|
|
1482
|
+
*
|
|
1483
|
+
* ## What this is NOT
|
|
1484
|
+
*
|
|
1485
|
+
* It is not a logger with levels, formatting or multiple destinations. It is the minimum that
|
|
1486
|
+
* resolves the reported blocker; a full logger here would be inventing a requirement nobody asked
|
|
1487
|
+
* for.
|
|
1488
|
+
*/
|
|
1489
|
+
/** Receives each diagnostic message already formatted, with the trailing `\n`. */
|
|
1490
|
+
type DiagnosticsSink = (message: string) => void;
|
|
1491
|
+
/**
|
|
1492
|
+
* Installs (or removes, by passing `undefined`) the diagnostics destination.
|
|
1493
|
+
*
|
|
1494
|
+
* When a sink is present it is the ONLY destination — `stderr` gets no copy. Duplicating
|
|
1495
|
+
* destinations would hand the problem back to the TUI that installed the sink precisely to get the
|
|
1496
|
+
* messages out of the terminal.
|
|
1497
|
+
*/
|
|
1498
|
+
declare function setDiagnosticsSink(next: DiagnosticsSink | undefined): void;
|
|
1499
|
+
|
|
1342
1500
|
declare function withCwdMutex<T>(key: string, fn: () => Promise<T>): Promise<T>;
|
|
1343
1501
|
|
|
1344
1502
|
/**
|
|
@@ -2352,4 +2510,4 @@ declare function toShareGptTrajectory(result: BatchResult, options?: {
|
|
|
2352
2510
|
model?: string;
|
|
2353
2511
|
}): ShareGptTrajectory | null;
|
|
2354
2512
|
|
|
2355
|
-
export { Agent, AgentBuilder, AgentDefinition, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, runGoalLoop, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|
|
2513
|
+
export { Agent, AgentBuilder, AgentDefinition, AgentDescription, AgentFactory, AgentOperationOptions, AgentOptions, type AgentPromptResult, type AgentRegistryOptions, type BatchItem, type BatchOptions, type BatchProgress, type BatchResult, Budget, BudgetHandle, BudgetOptions, BudgetSnapshot, BudgetTracker, CloudOptions, ContextSettings, type CounterBudgetTrackerOptions, CustomTool, type DeepPartial, type DefineProviderOptions, type DefineToolSpec, type DiagnosticsSink, type DreamingSweepOptions, type DreamingSweepResult, ErrorMetadata, EventBus, type EvictReason, GOAL_CONTINUATION_MARKER, GenerateObjectError, type GenerateObjectOptions, type GenerateObjectResult, GetAgentOptions, GetRunOptions, GoalEvent, type GoalLoopAgent, GoalOptions, GoalResult, InlineSkill, JobQueue, type JobQueueOptions, JudgeCredentialError, JudgeResult, ListAgentsOptions, ListResult, ListRunsOptions, LiveAgentRegistry, LocalOptions, McpServerConfig, Memory, MemoryId, MemoryProvider, MemorySettings, type MigrateOptions, type MigrateResult, type ModelListItem, type ModelParameterDefinition, ModelSelection, type ModelVariant, NoopMemoryProvider, type NormalizedJsonSchema, PermissionEngine, type PermissionGate, type PermissionGateContext, type PermissionGateDecision, PermissionMode, PermissionPlugin, type PermissionPluginOptions, Plugin, PluginsSettings, PreToolCallDecision, Processor, Provider, ProviderProfile, ProviderRoutingSettings, Run, RunEventSink, RunResult, SDKAgent, SDKAgentInfo, SDKMessage, type SDKModel, SDKProvider, type SDKRepository, type SDKUser, Security, type SessionMessage, type SessionMessagePart, type SessionScope, type ShareGptMessage, type ShareGptTrajectory, SkillReadTool, SkillsSettings, Squad, type SquadOptions, type SquadRun, StreamObjectError, type StreamObjectEvent, type StreamObjectOptions, SystemPromptResolver, TASK_RESERVED_PREFIXES, Task, type TaskCancelResult, type TaskConfigureOptions, type TaskEvent, type TaskFilter, type TaskHandle, type TaskKind, type TaskState, type TaskStoreOptions, type TaskSubmitOptions, type TaskWorkContext, type TaskWorkFn, Theokit, TheokitAgentError, type TheokitRequestOptions, TokenLimiter, type TokenLimiterOptions, Tool, ToolError, ToolResultContentBlock, UnicodeNormalizer, type UnicodeNormalizerOptions, UsageAccumulator, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, estimateTokens, extractRawId, getPricingEntry, inferApiMode, isValidTaskId, migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, runGoalLoop, scopedConversationId, sessionScopePrefix, setDiagnosticsSink, toShareGptTrajectory, withCwdMutex };
|
package/dist/index.js
CHANGED
|
@@ -1,56 +1,61 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { JudgeCredentialError } from './chunk-D7IULBF2.js';
|
|
2
|
+
export { StreamObjectError } from './chunk-DU7DE543.js';
|
|
2
3
|
export { GOAL_CONTINUATION_MARKER } from './chunk-PY2RQOA7.js';
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import
|
|
7
|
-
import './chunk-XS7SKY2F.js';
|
|
4
|
+
export { GenerateObjectError } from './chunk-KE6XKRLQ.js';
|
|
5
|
+
import './chunk-JZUPMTJY.js';
|
|
6
|
+
import { Workflow, agentStep } from './chunk-MC5EINBV.js';
|
|
7
|
+
import './chunk-V2RBCCN5.js';
|
|
8
8
|
import './chunk-CAH3G4IS.js';
|
|
9
|
-
export { Cron } from './chunk-
|
|
10
|
-
import { MEMORY_EMBEDDING_ADAPTERS, resolveApiKey, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-
|
|
11
|
-
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-
|
|
9
|
+
export { Cron } from './chunk-KWUNN5J2.js';
|
|
10
|
+
import { MEMORY_EMBEDDING_ADAPTERS, resolveApiKey, DEFAULT_AGENTIC_MODEL_ID, Agent } from './chunk-GIRD3RWH.js';
|
|
11
|
+
export { Agent, AgentBuilder, Tool, ToolError, UsageAccumulator, computeCost, getPricingEntry } from './chunk-GIRD3RWH.js';
|
|
12
12
|
import './chunk-2SFBB54R.js';
|
|
13
|
-
import { configure, submit, list, get, cancel, subscribe } from './chunk-
|
|
14
|
-
export { emitRunEvent } from './chunk-
|
|
15
|
-
import './chunk-A4XXV2C6.js';
|
|
13
|
+
import { configure, submit, list, get, cancel, subscribe } from './chunk-LJX2SQV2.js';
|
|
14
|
+
export { emitRunEvent } from './chunk-LJX2SQV2.js';
|
|
16
15
|
import './chunk-K2BQQ445.js';
|
|
17
|
-
import './chunk-
|
|
18
|
-
import
|
|
19
|
-
import './chunk-
|
|
16
|
+
import './chunk-E2FFG33C.js';
|
|
17
|
+
import './chunk-KGRIHEDT.js';
|
|
18
|
+
import { discoverProviderPlugins, shouldUseFixtureMode, isFixtureApiKey, httpRequest, mapOllamaTransportError, readErrorResponseBody, mapOllamaHttpError } from './chunk-ZYB6B7QJ.js';
|
|
19
|
+
import './chunk-HWNVAUK4.js';
|
|
20
20
|
import './chunk-5KOW3GLE.js';
|
|
21
|
-
import
|
|
22
|
-
import './chunk-
|
|
21
|
+
import './chunk-3I4B3OIX.js';
|
|
22
|
+
import { lanceStoragePath, LanceIndex, readFactsFromMarkdown, defaultIndexPath, openMemoryDb, memoryDir } from './chunk-4F7JQZOX.js';
|
|
23
|
+
import './chunk-ML5A5DOJ.js';
|
|
23
24
|
import './chunk-7GFX45DD.js';
|
|
24
|
-
import './chunk-
|
|
25
|
+
import './chunk-YP67XZES.js';
|
|
26
|
+
import './chunk-QKE556YD.js';
|
|
27
|
+
import './chunk-SCFW5MJZ.js';
|
|
28
|
+
import './chunk-OXNYIMZZ.js';
|
|
25
29
|
import './chunk-FD2UT76F.js';
|
|
26
30
|
import './chunk-U54XCYG3.js';
|
|
27
|
-
import './chunk-
|
|
31
|
+
import './chunk-RP5HQVLD.js';
|
|
28
32
|
import './chunk-6X6ID4MO.js';
|
|
29
33
|
import './chunk-UJ7IQJAG.js';
|
|
30
34
|
import './chunk-7AD3ZTZL.js';
|
|
31
|
-
import './chunk-
|
|
32
|
-
import './chunk-
|
|
33
|
-
import './chunk-
|
|
34
|
-
import './chunk-
|
|
35
|
-
import './chunk-
|
|
35
|
+
import './chunk-LGILIGV3.js';
|
|
36
|
+
import './chunk-PI4RO4GR.js';
|
|
37
|
+
import './chunk-ET6PHZRX.js';
|
|
38
|
+
import './chunk-JRLXEYR4.js';
|
|
39
|
+
import './chunk-BQDUEG4C.js';
|
|
40
|
+
import './chunk-AECV3G5Z.js';
|
|
36
41
|
import { withCwdMutex } from './chunk-2XLKLVVR.js';
|
|
37
42
|
export { withCwdMutex } from './chunk-2XLKLVVR.js';
|
|
38
|
-
import './chunk-
|
|
39
|
-
import './chunk-SGTMDQ4O.js';
|
|
43
|
+
import './chunk-6EEYRFJC.js';
|
|
40
44
|
import { toJsonSchema } from './chunk-4VPXM6UU.js';
|
|
41
|
-
import { replaceFileAtomic } from './chunk-
|
|
42
|
-
import './chunk-
|
|
43
|
-
import './chunk-
|
|
45
|
+
import { replaceFileAtomic } from './chunk-KX7JV5KM.js';
|
|
46
|
+
import './chunk-YRXY2A5L.js';
|
|
47
|
+
import './chunk-65ONFZWM.js';
|
|
44
48
|
import { parseModelId } from './chunk-X2FR4OIT.js';
|
|
45
|
-
import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-
|
|
46
|
-
import './chunk-
|
|
49
|
+
import { registerBuiltins, listProviders, getCatalogCapabilities, getProviderProfile } from './chunk-TOTP24P6.js';
|
|
50
|
+
import './chunk-DKFGUOWL.js';
|
|
47
51
|
import './chunk-5NBUH3NO.js';
|
|
48
|
-
import './chunk-
|
|
49
|
-
import './chunk-
|
|
50
|
-
import './chunk-
|
|
51
|
-
import { BudgetExceededError, MemoryAdapterError, AuthenticationError, ConfigurationError } from './chunk-
|
|
52
|
-
export { AgentDisposedError, AgentRunError, AuthenticationError, BudgetExceededError, ConfigurationError, IntegrationNotConnectedError, InvalidTaskIdError, MemoryAdapterError, NetworkError, RateLimitError, TaskNotFoundError, TheokitAgentError, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, isTransientError } from './chunk-
|
|
53
|
-
import { diag, redactSecrets, addPattern } from './chunk-
|
|
52
|
+
import './chunk-42IFCKQZ.js';
|
|
53
|
+
import './chunk-J3UK2GMN.js';
|
|
54
|
+
import './chunk-AR5MQZ3J.js';
|
|
55
|
+
import { BudgetExceededError, MemoryAdapterError, AuthenticationError, ConfigurationError } from './chunk-SG5ZWT6C.js';
|
|
56
|
+
export { AgentDisposedError, AgentRunError, AuthenticationError, BudgetExceededError, ConfigurationError, IntegrationNotConnectedError, InvalidTaskIdError, MemoryAdapterError, NetworkError, RateLimitError, TaskNotFoundError, TheokitAgentError, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, isTransientError } from './chunk-SG5ZWT6C.js';
|
|
57
|
+
import { diag, redactSecrets, addPattern } from './chunk-IVSD7L22.js';
|
|
58
|
+
export { setDiagnosticsSink } from './chunk-IVSD7L22.js';
|
|
54
59
|
import { z } from 'zod';
|
|
55
60
|
import { randomUUID, createHash } from 'crypto';
|
|
56
61
|
import { mkdir, readFile } from 'fs/promises';
|
|
@@ -694,10 +699,8 @@ var EventBus = class {
|
|
|
694
699
|
} catch (cause) {
|
|
695
700
|
this.#handlerErrorCount += 1;
|
|
696
701
|
const message = cause instanceof Error ? cause.message : String(cause);
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
`
|
|
700
|
-
);
|
|
702
|
+
diag(`[theokit-sdk] event-bus: handler for "${String(event)}" threw: ${message}
|
|
703
|
+
`);
|
|
701
704
|
}
|
|
702
705
|
}
|
|
703
706
|
}
|
|
@@ -719,7 +722,7 @@ function runGoalLoop(agent, goal, options, depsOverride) {
|
|
|
719
722
|
async function* wrap() {
|
|
720
723
|
const { runUntilImpl } = await import('./run-until-BK56WG4P.js');
|
|
721
724
|
const deps = depsOverride ?? await (async () => {
|
|
722
|
-
const { judgeCallImpl } = await import('./judge-call-
|
|
725
|
+
const { judgeCallImpl } = await import('./judge-call-NA2G6ZMJ.js');
|
|
723
726
|
const { getAgentFacade } = await import('./agent-factory-registry-ZVTABLEY.js');
|
|
724
727
|
const create = getAgentFacade().create;
|
|
725
728
|
return {
|
|
@@ -1166,7 +1169,7 @@ var Memory = {
|
|
|
1166
1169
|
openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
|
|
1167
1170
|
return await peer.IndexManager.open(openArgs);
|
|
1168
1171
|
}
|
|
1169
|
-
const { IndexManager } = await import('./index-manager-
|
|
1172
|
+
const { IndexManager } = await import('./index-manager-ZVZUHPP7.js');
|
|
1170
1173
|
openArgs.embedding = await resolveEmbedding(opts.embedding, MEMORY_EMBEDDING_ADAPTERS);
|
|
1171
1174
|
return await IndexManager.open(openArgs);
|
|
1172
1175
|
},
|
|
@@ -1600,7 +1603,7 @@ function ehAgenteConstruido(m) {
|
|
|
1600
1603
|
return typeof m.send === "function";
|
|
1601
1604
|
}
|
|
1602
1605
|
async function materializar(def, indice) {
|
|
1603
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
1606
|
+
const { Agent: Agent2 } = await import('./agent-KKZYLY5D.js');
|
|
1604
1607
|
return Agent2.create({
|
|
1605
1608
|
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
1606
1609
|
// here means "declare nothing and let the default apply" — forwarding the literal would create
|