@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
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHIQFVHC6_cjs = require('./chunk-HIQFVHC6.cjs');
|
|
4
|
+
require('./chunk-FWBSDQZ7.cjs');
|
|
5
|
+
require('./chunk-WJVHMTKB.cjs');
|
|
6
|
+
require('./chunk-IHFNRNTJ.cjs');
|
|
7
|
+
require('./chunk-BCQ3E2ZG.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "StreamObjectError", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkHIQFVHC6_cjs.StreamObjectError; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "streamObjectImpl", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkHIQFVHC6_cjs.streamObjectImpl; }
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=stream-object-4FDU76YW.cjs.map
|
|
20
|
+
//# sourceMappingURL=stream-object-4FDU76YW.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"stream-object-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"stream-object-4FDU76YW.cjs"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { StreamObjectError, streamObjectImpl } from './chunk-DU7DE543.js';
|
|
2
|
+
import './chunk-JZUPMTJY.js';
|
|
3
|
+
import './chunk-4VPXM6UU.js';
|
|
4
|
+
import './chunk-SG5ZWT6C.js';
|
|
5
|
+
import './chunk-IVSD7L22.js';
|
|
6
|
+
//# sourceMappingURL=stream-object-HWDEEQN4.js.map
|
|
7
|
+
//# sourceMappingURL=stream-object-HWDEEQN4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"stream-object-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"stream-object-HWDEEQN4.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkW4WKVOOQ_cjs = require('./chunk-W4WKVOOQ.cjs');
|
|
4
|
+
require('./chunk-G2Q3ZC6C.cjs');
|
|
5
|
+
require('./chunk-IHFNRNTJ.cjs');
|
|
6
|
+
require('./chunk-BCQ3E2ZG.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "loadSubagents", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkW4WKVOOQ_cjs.loadSubagents; }
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=subagents-loader-A4W6C3QP.cjs.map
|
|
15
|
+
//# sourceMappingURL=subagents-loader-A4W6C3QP.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-A4W6C3QP.cjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"subagents-loader-X33KH2SZ.js"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkW4WKVOOQ_cjs = require('./chunk-W4WKVOOQ.cjs');
|
|
4
|
+
require('./chunk-G2Q3ZC6C.cjs');
|
|
5
|
+
var chunkIHFNRNTJ_cjs = require('./chunk-IHFNRNTJ.cjs');
|
|
6
|
+
require('./chunk-BCQ3E2ZG.cjs');
|
|
7
7
|
|
|
8
8
|
// src/subagents-loader.ts
|
|
9
9
|
var FONTES_ACEITAS = ["project"];
|
|
@@ -12,7 +12,7 @@ function resolverFontes(options) {
|
|
|
12
12
|
if (declaradas === void 0) return FONTES_ACEITAS;
|
|
13
13
|
for (const fonte of declaradas) {
|
|
14
14
|
if (!FONTES_ACEITAS.includes(fonte)) {
|
|
15
|
-
throw new
|
|
15
|
+
throw new chunkIHFNRNTJ_cjs.ConfigurationError(
|
|
16
16
|
`Unknown subagent setting source "${String(fonte)}" (accepted: ${FONTES_ACEITAS.join(", ")})`,
|
|
17
17
|
{ code: "subagent_unknown_setting_source" }
|
|
18
18
|
);
|
|
@@ -22,7 +22,7 @@ function resolverFontes(options) {
|
|
|
22
22
|
}
|
|
23
23
|
async function discoverSubagents(cwd, options) {
|
|
24
24
|
const fontes = resolverFontes(options);
|
|
25
|
-
return
|
|
25
|
+
return chunkW4WKVOOQ_cjs.loadSubagents(cwd, fontes.includes("project"), void 0);
|
|
26
26
|
}
|
|
27
27
|
async function loadSubagentDefinition(name, cwd, options) {
|
|
28
28
|
return (await discoverSubagents(cwd, options))[name];
|
package/dist/subagents-loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { loadSubagents } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import { ConfigurationError } from './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { loadSubagents } from './chunk-YRXY2A5L.js';
|
|
2
|
+
import './chunk-AR5MQZ3J.js';
|
|
3
|
+
import { ConfigurationError } from './chunk-SG5ZWT6C.js';
|
|
4
|
+
import './chunk-IVSD7L22.js';
|
|
5
5
|
|
|
6
6
|
// src/subagents-loader.ts
|
|
7
7
|
var FONTES_ACEITAS = ["project"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkIHFNRNTJ_cjs = require('../chunk-IHFNRNTJ.cjs');
|
|
4
|
+
require('../chunk-BCQ3E2ZG.cjs');
|
|
5
5
|
|
|
6
6
|
// src/subscription/define-subscription.ts
|
|
7
7
|
function defineSubscription(opts) {
|
|
@@ -138,7 +138,7 @@ function tracked(id, payload) {
|
|
|
138
138
|
}
|
|
139
139
|
return [id, payload];
|
|
140
140
|
}
|
|
141
|
-
var SubscriptionError = class extends
|
|
141
|
+
var SubscriptionError = class extends chunkIHFNRNTJ_cjs.TheokitAgentError {
|
|
142
142
|
name = "SubscriptionError";
|
|
143
143
|
constructor(message, options = {}) {
|
|
144
144
|
super(message, { ...options, isRetryable: false });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TheokitAgentError } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { TheokitAgentError } from '../chunk-SG5ZWT6C.js';
|
|
2
|
+
import '../chunk-IVSD7L22.js';
|
|
3
3
|
|
|
4
4
|
// src/subscription/define-subscription.ts
|
|
5
5
|
function defineSubscription(opts) {
|
package/dist/task-store.cjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunkDWY25VLP_cjs = require('./chunk-DWY25VLP.cjs');
|
|
4
|
+
require('./chunk-DGLLVCNB.cjs');
|
|
5
|
+
require('./chunk-IHFNRNTJ.cjs');
|
|
6
|
+
require('./chunk-BCQ3E2ZG.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "InMemoryTaskStore", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkDWY25VLP_cjs.InMemoryTaskStore; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "JsonFileTaskStore", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkDWY25VLP_cjs.JsonFileTaskStore; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "getTaskStoreFor", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkDWY25VLP_cjs.getTaskStoreFor; }
|
|
21
21
|
});
|
|
22
22
|
//# sourceMappingURL=task-store.cjs.map
|
|
23
23
|
//# sourceMappingURL=task-store.cjs.map
|
package/dist/task-store.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { InMemoryTaskStore, JsonFileTaskStore, getTaskStoreFor } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { InMemoryTaskStore, JsonFileTaskStore, getTaskStoreFor } from './chunk-6EEYRFJC.js';
|
|
2
|
+
import './chunk-KX7JV5KM.js';
|
|
3
|
+
import './chunk-SG5ZWT6C.js';
|
|
4
|
+
import './chunk-IVSD7L22.js';
|
|
5
5
|
//# sourceMappingURL=task-store.js.map
|
|
6
6
|
//# sourceMappingURL=task-store.js.map
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -337,9 +337,11 @@ export interface AgentOptions {
|
|
|
337
337
|
*
|
|
338
338
|
* `'run'` (DEFAULT, and the historical behaviour) spawns a client per `send` and drops it when the
|
|
339
339
|
* run ends. `'session'` pools clients per `(agentId, server, config)` and keeps them across turns,
|
|
340
|
-
* which is what the reference does — Codex holds its
|
|
341
|
-
* (`core/src/state/service.rs:
|
|
342
|
-
*
|
|
340
|
+
* which is what the reference does — Codex holds its MCP runtime in `SessionServices`
|
|
341
|
+
* (`codex-rs/core/src/state/service.rs:51-58`; theokit#155 corrected the earlier
|
|
342
|
+
* `core/src/state/service.rs:116`, which named a parameter of `install_mcp_runtime`, not the
|
|
343
|
+
* owning field). Measured cost of the per-run path: 193 / 138 / 134 ms of spawn + handshake on
|
|
344
|
+
* every turn.
|
|
343
345
|
*
|
|
344
346
|
* Opt-in rather than default because it changes the FAILURE model: a server that dies mid-session
|
|
345
347
|
* becomes a reachable state. One-shot and cron runs gain nothing from pooling and would pay that
|
|
@@ -607,6 +609,69 @@ export type SDKAgentInfo = {
|
|
|
607
609
|
env?: CloudEnv;
|
|
608
610
|
repos?: string[];
|
|
609
611
|
});
|
|
612
|
+
/**
|
|
613
|
+
* theokit#123 — one tool of a registered agent, as a reflection surface sees it.
|
|
614
|
+
*
|
|
615
|
+
* A projection, not the `CustomTool` itself: the handler is an executable that cannot cross a
|
|
616
|
+
* process boundary and has no meaning to a caller enumerating a registry.
|
|
617
|
+
*
|
|
618
|
+
* @public
|
|
619
|
+
*/
|
|
620
|
+
export interface AgentToolDescription {
|
|
621
|
+
name: string;
|
|
622
|
+
description: string;
|
|
623
|
+
/** The JSON Schema sent to the model verbatim — the tool's callable signature. */
|
|
624
|
+
inputSchema: Record<string, unknown>;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* theokit#123 — one subagent of a registered agent (what theokit-studio calls a workflow).
|
|
628
|
+
*
|
|
629
|
+
* `prompt` is deliberately absent. Enumeration asks what a subagent IS and what it may call; its
|
|
630
|
+
* system prompt is instructions, not signature, and a reflection endpoint that serializes it
|
|
631
|
+
* publishes the agent's behaviour to anyone who can reach the endpoint.
|
|
632
|
+
*
|
|
633
|
+
* @public
|
|
634
|
+
*/
|
|
635
|
+
export interface AgentSubagentDescription {
|
|
636
|
+
/** The key under `AgentOptions.agents` — how the parent addresses it. */
|
|
637
|
+
name: string;
|
|
638
|
+
description: string;
|
|
639
|
+
/** `"inherit"` (or absent) means it runs on the parent's model. */
|
|
640
|
+
model?: ModelSelection | "inherit";
|
|
641
|
+
/** Tool whitelist, when the subagent is scoped to a subset of the parent's tools. */
|
|
642
|
+
tools?: string[];
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* theokit#123 — the read-only introspection of a registered agent, returned by `Agent.describe()`.
|
|
646
|
+
*
|
|
647
|
+
* `Agent.list()` / `Agent.get()` enumerate agents and `agent.skills.list()` covers skills; this
|
|
648
|
+
* fills the remaining gap, so a reflection endpoint can report the live registry instead of
|
|
649
|
+
* degrading to empty lists.
|
|
650
|
+
*
|
|
651
|
+
* `tools` and `subagents` are always arrays — never `undefined` — so a caller can distinguish
|
|
652
|
+
* "this agent has none" from "the SDK did not say".
|
|
653
|
+
*
|
|
654
|
+
* @public
|
|
655
|
+
*/
|
|
656
|
+
export interface AgentDescription {
|
|
657
|
+
agentId: string;
|
|
658
|
+
/** Inlined rather than imported from the registry contract: `types/` stays a leaf (theokit#146). */
|
|
659
|
+
runtime: "local" | "cloud";
|
|
660
|
+
model?: ModelSelection;
|
|
661
|
+
/**
|
|
662
|
+
* The agent's DECLARED tool catalog.
|
|
663
|
+
*
|
|
664
|
+
* Plugin-contributed tools and the internal `think` tool (added when `reasoning` is on) are
|
|
665
|
+
* assembled per run and are not knowable from the registry, so they are absent here. Stated
|
|
666
|
+
* rather than implied: a reflection endpoint should not present this as the complete runtime set.
|
|
667
|
+
*/
|
|
668
|
+
tools: readonly AgentToolDescription[];
|
|
669
|
+
/**
|
|
670
|
+
* Every subagent the runtime would resolve — file-based roles from `.theokit/agents/*.md` merged
|
|
671
|
+
* with the inline `agentOptions.agents`, the same set `loadSubagents` builds for a run.
|
|
672
|
+
*/
|
|
673
|
+
subagents: readonly AgentSubagentDescription[];
|
|
674
|
+
}
|
|
610
675
|
/**
|
|
611
676
|
* Options for `Agent.list()`.
|
|
612
677
|
*
|
|
@@ -17,6 +17,13 @@ export interface AssistantMessage {
|
|
|
17
17
|
export interface ThinkingMessage {
|
|
18
18
|
text: string;
|
|
19
19
|
thinkingDurationMs?: number;
|
|
20
|
+
/**
|
|
21
|
+
* theokit#122 — the provider's cryptographic signature for this thinking block, when it issued
|
|
22
|
+
* one. Persisted with the block so a resumed conversation can replay it byte-identically;
|
|
23
|
+
* Anthropic rejects a modified or unsigned thinking block with
|
|
24
|
+
* `400 "thinking blocks cannot be modified"`.
|
|
25
|
+
*/
|
|
26
|
+
signature?: string;
|
|
20
27
|
}
|
|
21
28
|
/**
|
|
22
29
|
* Shell command executed during a run.
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -65,6 +65,15 @@ export interface SDKThinkingMessage {
|
|
|
65
65
|
run_id: string;
|
|
66
66
|
text: string;
|
|
67
67
|
thinking_duration_ms?: number;
|
|
68
|
+
/**
|
|
69
|
+
* theokit#122 — the provider's cryptographic signature for this thinking block, when it issued
|
|
70
|
+
* one. Anthropic requires a resumed conversation to replay each thinking block WITH its
|
|
71
|
+
* signature; without it the next request fails with `400 "thinking blocks cannot be modified"`,
|
|
72
|
+
* which made an extended-thinking session unresumable.
|
|
73
|
+
*
|
|
74
|
+
* Absent for providers that stream reasoning text unsigned (the OpenAI-compatible wire).
|
|
75
|
+
*/
|
|
76
|
+
signature?: string;
|
|
68
77
|
}
|
|
69
78
|
/**
|
|
70
79
|
* Tool invocation lifecycle event. Emitted at start with `args`, then again on
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shape of a persisted session turn, as a HOST reads it.
|
|
3
|
+
*
|
|
4
|
+
* Lives in `types/` because it is public contract — `Agent.transcript()` returns it (theokit#146).
|
|
5
|
+
* `internal/session/session-types.ts` re-exports it so the runtime and the store keep importing
|
|
6
|
+
* from the leaf they always did.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
import type { ToolResultContentBlock } from "./content-blocks.js";
|
|
11
|
+
/**
|
|
12
|
+
* One turn of a session.
|
|
13
|
+
*
|
|
14
|
+
* Two projections of the same turn, and they answer different questions:
|
|
15
|
+
*
|
|
16
|
+
* - `text` is the flat rendering the model replay uses. A tool call folds to `[tool call] NAME` and
|
|
17
|
+
* a result to `[tool result] <body>`.
|
|
18
|
+
* - `parts` is the same turn unflattened, for a host that draws tool CARDS: the call id, the tool
|
|
19
|
+
* name, the arguments, and the `toolUseId` that ties a result back to its call — none of which
|
|
20
|
+
* survive the flat form.
|
|
21
|
+
*
|
|
22
|
+
* `parts` was added in theokit#146 and is additive: `text` is byte-identical to what it always was,
|
|
23
|
+
* so every existing reader is untouched.
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
export interface SessionMessage {
|
|
28
|
+
role: "user" | "assistant";
|
|
29
|
+
text: string;
|
|
30
|
+
/**
|
|
31
|
+
* The structured view. Optional because a `SessionMessage` can also be built in memory during a
|
|
32
|
+
* live turn, where only the text projection exists. Absent means "this projection carries no
|
|
33
|
+
* structure", never "this turn had none".
|
|
34
|
+
*/
|
|
35
|
+
parts?: readonly SessionMessagePart[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* One structured element of a {@link SessionMessage}.
|
|
39
|
+
*
|
|
40
|
+
* Deliberately a session-DISPLAY shape rather than a re-export of the internal LLM part union: the
|
|
41
|
+
* two answer different questions (what to send a provider vs. what to draw), and coupling them
|
|
42
|
+
* would make every provider-wire change a change to what hosts render.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export type SessionMessagePart = {
|
|
47
|
+
readonly type: "text";
|
|
48
|
+
readonly text: string;
|
|
49
|
+
} | {
|
|
50
|
+
readonly type: "tool_use";
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly name: string;
|
|
53
|
+
readonly input: Record<string, unknown>;
|
|
54
|
+
} | {
|
|
55
|
+
readonly type: "tool_result";
|
|
56
|
+
readonly toolUseId: string;
|
|
57
|
+
readonly content: string | ReadonlyArray<ToolResultContentBlock>;
|
|
58
|
+
readonly isError?: boolean;
|
|
59
|
+
};
|
package/dist/types/workflow.d.ts
CHANGED
|
@@ -81,6 +81,42 @@ export interface SuspendStep {
|
|
|
81
81
|
readonly id: string;
|
|
82
82
|
readonly payloadSchema?: ZodType;
|
|
83
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* theokit#161 — one step of a workflow, as a reflection surface sees it.
|
|
86
|
+
*
|
|
87
|
+
* `id` and `kind` are the only fields every step variant shares, and they are what a reflection
|
|
88
|
+
* endpoint renders. Everything else a step carries is an executable — a predicate, a condition, an
|
|
89
|
+
* agent, a prompt template — which cannot cross a process boundary and means nothing to a caller
|
|
90
|
+
* enumerating shape.
|
|
91
|
+
*
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
export interface WorkflowStepDescription {
|
|
95
|
+
readonly id: string;
|
|
96
|
+
readonly kind: Step["kind"];
|
|
97
|
+
/**
|
|
98
|
+
* Nested steps, for the variants that contain them: `parallel` (all branches, flattened — the
|
|
99
|
+
* branch grouping is a scheduling detail, not shape a reader needs), `branch` (each predicate's
|
|
100
|
+
* steps plus the fallback), `foreach` and `dowhile` (their single inner step).
|
|
101
|
+
*
|
|
102
|
+
* Absent for leaf steps. A flat list would misreport a parallel or branching workflow as linear.
|
|
103
|
+
*/
|
|
104
|
+
readonly steps?: readonly WorkflowStepDescription[];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* theokit#161 — the read-only shape of a committed workflow.
|
|
108
|
+
*
|
|
109
|
+
* Returned by `Workflow.describe()`. There is deliberately NO workflow registry to enumerate: a
|
|
110
|
+
* `Workflow` is a value the caller constructs and holds, so the caller already knows which ones
|
|
111
|
+
* exist. What it lacked was a way to DESCRIBE one. A registry would have added process-global state
|
|
112
|
+
* that nothing ever releases, to re-answer a question the host can answer itself.
|
|
113
|
+
*
|
|
114
|
+
* @public
|
|
115
|
+
*/
|
|
116
|
+
export interface WorkflowDescription {
|
|
117
|
+
readonly name: string;
|
|
118
|
+
readonly steps: readonly WorkflowStepDescription[];
|
|
119
|
+
}
|
|
84
120
|
/** D237 — retry policy applied per fn/agent step. */
|
|
85
121
|
export interface RetryPolicy {
|
|
86
122
|
/** Total attempts (MIN 1, MAX 20). `1` = no retry. */
|
package/dist/workflow.cjs
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkC7OP3FAK_cjs = require('./chunk-C7OP3FAK.cjs');
|
|
4
|
+
var chunkCEIHCKTO_cjs = require('./chunk-CEIHCKTO.cjs');
|
|
5
5
|
require('./chunk-PNVDQL5Y.cjs');
|
|
6
6
|
require('./chunk-WJVHMTKB.cjs');
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-DGLLVCNB.cjs');
|
|
8
|
+
require('./chunk-7YBJZS5P.cjs');
|
|
9
|
+
require('./chunk-IHFNRNTJ.cjs');
|
|
10
|
+
require('./chunk-BCQ3E2ZG.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
Object.defineProperty(exports, "Workflow", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkC7OP3FAK_cjs.Workflow; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "WorkflowBuilder", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkC7OP3FAK_cjs.WorkflowBuilder; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "WorkflowToolError", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkC7OP3FAK_cjs.WorkflowToolError; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "agentStep", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkC7OP3FAK_cjs.agentStep; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "cloneWorkflow", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkC7OP3FAK_cjs.cloneWorkflow; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "fn", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkC7OP3FAK_cjs.fn; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "workflowAsTool", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkC7OP3FAK_cjs.workflowAsTool; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "workflowStep", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkC7OP3FAK_cjs.workflowStep; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "WorkflowAlreadyRunningError", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowAlreadyRunningError; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "WorkflowCompensateNotImplementedError", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowCompensateNotImplementedError; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "WorkflowDuplicateStepIdError", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowDuplicateStepIdError; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "WorkflowInputError", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowInputError; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "WorkflowMaxIterationsExceededError", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowMaxIterationsExceededError; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "WorkflowNestedError", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowNestedError; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "WorkflowNotSerializableError", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowNotSerializableError; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "WorkflowOutputError", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowOutputError; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "WorkflowParallelError", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowParallelError; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "WorkflowResumeStepNotFoundError", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowResumeStepNotFoundError; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "WorkflowSnapshotNotFoundError", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowSnapshotNotFoundError; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "WorkflowStateError", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkCEIHCKTO_cjs.WorkflowStateError; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "__resetSnapshotStoresForTests", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkCEIHCKTO_cjs.__resetSnapshotStoresForTests; }
|
|
97
97
|
});
|
|
98
98
|
//# sourceMappingURL=workflow.cjs.map
|
|
99
99
|
//# sourceMappingURL=workflow.cjs.map
|
package/dist/workflow.d.cts
CHANGED
|
@@ -26,7 +26,7 @@ import type { ZodType } from "zod";
|
|
|
26
26
|
import { z } from "zod";
|
|
27
27
|
import type { CustomTool, SDKAgent } from "./types/agent.js";
|
|
28
28
|
import type { MessageOrigin } from "./types/run.js";
|
|
29
|
-
import type { AgentStep, BranchStep, DowhileStep, FnStep, RetryPolicy, Step, StepContext, WorkflowOptions, WorkflowResumeOptions, WorkflowRun, WorkflowRunOptions, WorkflowStream } from "./types/workflow.js";
|
|
29
|
+
import type { AgentStep, BranchStep, DowhileStep, FnStep, RetryPolicy, Step, StepContext, WorkflowDescription, WorkflowOptions, WorkflowResumeOptions, WorkflowRun, WorkflowRunOptions, WorkflowStream } from "./types/workflow.js";
|
|
30
30
|
export declare class WorkflowBuilder<TInput = unknown, TOutput = unknown> {
|
|
31
31
|
private readonly options;
|
|
32
32
|
private readonly _steps;
|
|
@@ -67,6 +67,22 @@ export declare class Workflow<TInput = unknown, TOutput = unknown> {
|
|
|
67
67
|
* immutable `Workflow`.
|
|
68
68
|
*/
|
|
69
69
|
static create<TI = unknown, TO = unknown>(options: WorkflowOptions): WorkflowBuilder<TI, TO>;
|
|
70
|
+
/**
|
|
71
|
+
* theokit#161 — describe this workflow's shape, for a reflection surface.
|
|
72
|
+
*
|
|
73
|
+
* Returns `{ name, steps }`, each step carrying its `id` and `kind`, recursing into `parallel`,
|
|
74
|
+
* `branch`, `foreach` and `dowhile`. Every executable a step holds — predicates, conditions,
|
|
75
|
+
* agents, prompt templates — is omitted: it cannot cross a process boundary and says nothing about
|
|
76
|
+
* shape.
|
|
77
|
+
*
|
|
78
|
+
* There is deliberately no `Workflow.list()`. A workflow is a value the caller constructs and
|
|
79
|
+
* holds, so the caller already knows which ones exist; a registry would add process-global state
|
|
80
|
+
* nothing releases in order to re-answer a question the host can answer itself. A reflection
|
|
81
|
+
* endpoint maps over its own workflows and calls this.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
describe(): WorkflowDescription;
|
|
70
86
|
/**
|
|
71
87
|
* Run this workflow with the given input. Returns a populated
|
|
72
88
|
* `WorkflowRun`. Errors inside a step DO NOT throw — they propagate via
|
package/dist/workflow.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ import type { ZodType } from "zod";
|
|
|
26
26
|
import { z } from "zod";
|
|
27
27
|
import type { CustomTool, SDKAgent } from "./types/agent.js";
|
|
28
28
|
import type { MessageOrigin } from "./types/run.js";
|
|
29
|
-
import type { AgentStep, BranchStep, DowhileStep, FnStep, RetryPolicy, Step, StepContext, WorkflowOptions, WorkflowResumeOptions, WorkflowRun, WorkflowRunOptions, WorkflowStream } from "./types/workflow.js";
|
|
29
|
+
import type { AgentStep, BranchStep, DowhileStep, FnStep, RetryPolicy, Step, StepContext, WorkflowDescription, WorkflowOptions, WorkflowResumeOptions, WorkflowRun, WorkflowRunOptions, WorkflowStream } from "./types/workflow.js";
|
|
30
30
|
export declare class WorkflowBuilder<TInput = unknown, TOutput = unknown> {
|
|
31
31
|
private readonly options;
|
|
32
32
|
private readonly _steps;
|
|
@@ -67,6 +67,22 @@ export declare class Workflow<TInput = unknown, TOutput = unknown> {
|
|
|
67
67
|
* immutable `Workflow`.
|
|
68
68
|
*/
|
|
69
69
|
static create<TI = unknown, TO = unknown>(options: WorkflowOptions): WorkflowBuilder<TI, TO>;
|
|
70
|
+
/**
|
|
71
|
+
* theokit#161 — describe this workflow's shape, for a reflection surface.
|
|
72
|
+
*
|
|
73
|
+
* Returns `{ name, steps }`, each step carrying its `id` and `kind`, recursing into `parallel`,
|
|
74
|
+
* `branch`, `foreach` and `dowhile`. Every executable a step holds — predicates, conditions,
|
|
75
|
+
* agents, prompt templates — is omitted: it cannot cross a process boundary and says nothing about
|
|
76
|
+
* shape.
|
|
77
|
+
*
|
|
78
|
+
* There is deliberately no `Workflow.list()`. A workflow is a value the caller constructs and
|
|
79
|
+
* holds, so the caller already knows which ones exist; a registry would add process-global state
|
|
80
|
+
* nothing releases in order to re-answer a question the host can answer itself. A reflection
|
|
81
|
+
* endpoint maps over its own workflows and calls this.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
describe(): WorkflowDescription;
|
|
70
86
|
/**
|
|
71
87
|
* Run this workflow with the given input. Returns a populated
|
|
72
88
|
* `WorkflowRun`. Errors inside a step DO NOT throw — they propagate via
|
package/dist/workflow.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { Workflow, WorkflowBuilder, WorkflowToolError, agentStep, cloneWorkflow, fn, workflowAsTool, workflowStep } from './chunk-
|
|
2
|
-
export { WorkflowAlreadyRunningError, WorkflowCompensateNotImplementedError, WorkflowDuplicateStepIdError, WorkflowInputError, WorkflowMaxIterationsExceededError, WorkflowNestedError, WorkflowNotSerializableError, WorkflowOutputError, WorkflowParallelError, WorkflowResumeStepNotFoundError, WorkflowSnapshotNotFoundError, WorkflowStateError, __resetSnapshotStoresForTests } from './chunk-
|
|
1
|
+
export { Workflow, WorkflowBuilder, WorkflowToolError, agentStep, cloneWorkflow, fn, workflowAsTool, workflowStep } from './chunk-MC5EINBV.js';
|
|
2
|
+
export { WorkflowAlreadyRunningError, WorkflowCompensateNotImplementedError, WorkflowDuplicateStepIdError, WorkflowInputError, WorkflowMaxIterationsExceededError, WorkflowNestedError, WorkflowNotSerializableError, WorkflowOutputError, WorkflowParallelError, WorkflowResumeStepNotFoundError, WorkflowSnapshotNotFoundError, WorkflowStateError, __resetSnapshotStoresForTests } from './chunk-V2RBCCN5.js';
|
|
3
3
|
import './chunk-CAH3G4IS.js';
|
|
4
4
|
import './chunk-4VPXM6UU.js';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
5
|
+
import './chunk-KX7JV5KM.js';
|
|
6
|
+
import './chunk-J3UK2GMN.js';
|
|
7
|
+
import './chunk-SG5ZWT6C.js';
|
|
8
|
+
import './chunk-IVSD7L22.js';
|
|
9
9
|
//# sourceMappingURL=workflow.js.map
|
|
10
10
|
//# sourceMappingURL=workflow.js.map
|