@theokit/sdk 4.37.2 → 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 +309 -72
- 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-SmxntivO.d.ts → agent-D7bRK9Kg.d.cts} +108 -41
- package/dist/agent-I3EZZR6S.cjs +55 -0
- package/dist/{agent-IE6IE4NW.cjs.map → agent-I3EZZR6S.cjs.map} +1 -1
- package/dist/agent-KKZYLY5D.js +46 -0
- package/dist/{agent-DW2J37IH.js.map → agent-KKZYLY5D.js.map} +1 -1
- package/dist/{agent-DGv1-d81.d.cts → agent-ZCZa7YQv.d.ts} +108 -41
- 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 +38 -2
- package/dist/auth/index.cjs +15 -15
- package/dist/auth/index.js +4 -4
- package/dist/{batch-SY5GZLFD.js → batch-6KQM3EBA.js} +12 -12
- package/dist/batch-6KQM3EBA.js.map +1 -0
- package/dist/{batch-3SEPDXCU.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-2WFB5ZOX.js → chunk-42IFCKQZ.js} +5 -5
- package/dist/{chunk-2WFB5ZOX.js.map → chunk-42IFCKQZ.js.map} +1 -1
- package/dist/{chunk-DCJ5MCJ3.js → chunk-4F7JQZOX.js} +9 -36
- package/dist/chunk-4F7JQZOX.js.map +1 -0
- package/dist/{chunk-JNIWFCKI.js → chunk-4JSZYSGW.js} +3 -3
- package/dist/{chunk-JNIWFCKI.js.map → chunk-4JSZYSGW.js.map} +1 -1
- package/dist/{chunk-EEZ7CFMM.js → chunk-5KOW3GLE.js} +2 -2
- package/dist/chunk-5KOW3GLE.js.map +1 -0
- package/dist/{chunk-6VP3XGEK.js → chunk-65ONFZWM.js} +12 -11
- package/dist/chunk-65ONFZWM.js.map +1 -0
- package/dist/{chunk-CSZRJ4RE.js → chunk-6EEYRFJC.js} +5 -5
- package/dist/{chunk-CSZRJ4RE.js.map → chunk-6EEYRFJC.js.map} +1 -1
- package/dist/{chunk-FAY3QDGC.cjs → chunk-6LGQECT7.cjs} +11 -11
- package/dist/{chunk-FAY3QDGC.cjs.map → chunk-6LGQECT7.cjs.map} +1 -1
- package/dist/{chunk-PAEJPLVN.cjs → chunk-6NEHIHFU.cjs} +4 -4
- package/dist/{chunk-PAEJPLVN.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-74D7KSBP.cjs +112 -0
- package/dist/chunk-74D7KSBP.cjs.map +1 -0
- package/dist/{chunk-FK4EJD2I.cjs → chunk-75DSEWTJ.cjs} +7 -7
- package/dist/{chunk-FK4EJD2I.cjs.map → chunk-75DSEWTJ.cjs.map} +1 -1
- package/dist/{chunk-SWIBQFPH.cjs → chunk-7OLG7VI4.cjs} +4 -4
- package/dist/{chunk-SWIBQFPH.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-YBFDBOUN.cjs → chunk-7YBJZS5P.cjs} +8 -8
- package/dist/{chunk-YBFDBOUN.cjs.map → chunk-7YBJZS5P.cjs.map} +1 -1
- package/dist/{chunk-GLUWH6JO.js → chunk-AECV3G5Z.js} +4 -4
- package/dist/{chunk-GLUWH6JO.js.map → chunk-AECV3G5Z.js.map} +1 -1
- package/dist/{chunk-UQPDFW4E.js → chunk-AR5MQZ3J.js} +3 -3
- package/dist/{chunk-UQPDFW4E.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-LTCOPATU.cjs → chunk-BCQ3E2ZG.cjs} +12 -3
- package/dist/chunk-BCQ3E2ZG.cjs.map +1 -0
- package/dist/{chunk-ALU3KC4G.cjs → chunk-BPN5ONSW.cjs} +223 -277
- package/dist/chunk-BPN5ONSW.cjs.map +1 -0
- package/dist/{chunk-YHZXBDAW.js → chunk-BQDUEG4C.js} +16 -16
- package/dist/{chunk-YHZXBDAW.js.map → chunk-BQDUEG4C.js.map} +1 -1
- package/dist/{chunk-IT3PWBW4.cjs → chunk-BURYFNOM.cjs} +2 -2
- package/dist/chunk-BURYFNOM.cjs.map +1 -0
- package/dist/{chunk-BJMKQOY2.cjs → chunk-C7OP3FAK.cjs} +47 -11
- package/dist/chunk-C7OP3FAK.cjs.map +1 -0
- package/dist/{chunk-XAYVHS2B.cjs → chunk-CEIHCKTO.cjs} +4 -4
- package/dist/chunk-CEIHCKTO.cjs.map +1 -0
- package/dist/{chunk-2423XDPT.cjs → chunk-CN6UX5EV.cjs} +28 -56
- package/dist/chunk-CN6UX5EV.cjs.map +1 -0
- package/dist/{chunk-VNNK6AKU.js → chunk-D7IULBF2.js} +3 -3
- package/dist/chunk-D7IULBF2.js.map +1 -0
- package/dist/chunk-DCXRHCZJ.cjs +118 -0
- package/dist/chunk-DCXRHCZJ.cjs.map +1 -0
- package/dist/{chunk-ICYBIC6N.cjs → chunk-DGLLVCNB.cjs} +4 -4
- package/dist/chunk-DGLLVCNB.cjs.map +1 -0
- package/dist/{chunk-I35DI7ES.js → chunk-DKFGUOWL.js} +3 -3
- package/dist/{chunk-I35DI7ES.js.map → chunk-DKFGUOWL.js.map} +1 -1
- package/dist/{chunk-TQI3KRXZ.cjs → chunk-DMTZ3FII.cjs} +18 -18
- package/dist/{chunk-TQI3KRXZ.cjs.map → chunk-DMTZ3FII.cjs.map} +1 -1
- package/dist/{chunk-QFMXXUUT.js → chunk-DU7DE543.js} +3 -3
- package/dist/{chunk-QFMXXUUT.js.map → chunk-DU7DE543.js.map} +1 -1
- package/dist/{chunk-W4QN5CMG.cjs → chunk-DWY25VLP.cjs} +9 -9
- package/dist/{chunk-W4QN5CMG.cjs.map → chunk-DWY25VLP.cjs.map} +1 -1
- package/dist/chunk-E2FFG33C.js +109 -0
- package/dist/chunk-E2FFG33C.js.map +1 -0
- package/dist/{chunk-QUFSDDNU.cjs → chunk-E4IUN3JB.cjs} +15 -15
- package/dist/{chunk-QUFSDDNU.cjs.map → chunk-E4IUN3JB.cjs.map} +1 -1
- package/dist/{chunk-THEYGCYS.cjs → chunk-ECHGWE47.cjs} +4 -4
- package/dist/chunk-ECHGWE47.cjs.map +1 -0
- package/dist/{chunk-U2WLFOA3.cjs → chunk-ECW2MLEW.cjs} +4 -4
- package/dist/{chunk-U2WLFOA3.cjs.map → chunk-ECW2MLEW.cjs.map} +1 -1
- package/dist/{chunk-MXSMAGDU.js → chunk-ET6PHZRX.js} +33 -26
- package/dist/chunk-ET6PHZRX.js.map +1 -0
- package/dist/{chunk-G6AASL5T.cjs → chunk-FRUBE44B.cjs} +24 -24
- package/dist/{chunk-G6AASL5T.cjs.map → chunk-FRUBE44B.cjs.map} +1 -1
- package/dist/{chunk-3ILFUXNE.cjs → chunk-FWBSDQZ7.cjs} +5 -5
- package/dist/{chunk-3ILFUXNE.cjs.map → chunk-FWBSDQZ7.cjs.map} +1 -1
- package/dist/{chunk-7DXLNNKH.cjs → chunk-G2Q3ZC6C.cjs} +4 -4
- package/dist/{chunk-7DXLNNKH.cjs.map → chunk-G2Q3ZC6C.cjs.map} +1 -1
- package/dist/{chunk-56ZM6P7Z.cjs → chunk-G4XUXSRN.cjs} +12 -12
- package/dist/chunk-G4XUXSRN.cjs.map +1 -0
- package/dist/{chunk-VYJSHGAY.js → chunk-GIRD3RWH.js} +422 -295
- package/dist/chunk-GIRD3RWH.js.map +1 -0
- package/dist/{chunk-NQ4AC2U4.cjs → chunk-HIQFVHC6.cjs} +9 -9
- package/dist/{chunk-NQ4AC2U4.cjs.map → chunk-HIQFVHC6.cjs.map} +1 -1
- package/dist/{chunk-EXQV452X.js → chunk-HWNVAUK4.js} +3 -3
- package/dist/{chunk-EXQV452X.js.map → chunk-HWNVAUK4.js.map} +1 -1
- package/dist/{chunk-P34DHHYQ.cjs → chunk-I53ZQHU6.cjs} +34 -27
- package/dist/chunk-I53ZQHU6.cjs.map +1 -0
- package/dist/{chunk-MHCKWQR3.cjs → chunk-IHFNRNTJ.cjs} +8 -8
- package/dist/{chunk-MHCKWQR3.cjs.map → chunk-IHFNRNTJ.cjs.map} +1 -1
- package/dist/{chunk-W52DKZBR.cjs → chunk-INSFS5GT.cjs} +680 -553
- package/dist/chunk-INSFS5GT.cjs.map +1 -0
- package/dist/{chunk-TAPQWDW2.js → chunk-IVSD7L22.js} +12 -4
- package/dist/chunk-IVSD7L22.js.map +1 -0
- package/dist/{chunk-WDGCZDRG.js → chunk-J3UK2GMN.js} +3 -3
- package/dist/{chunk-WDGCZDRG.js.map → chunk-J3UK2GMN.js.map} +1 -1
- package/dist/{chunk-4YB7B3RP.cjs → chunk-J6T5LWJ4.cjs} +15 -14
- package/dist/chunk-J6T5LWJ4.cjs.map +1 -0
- package/dist/{chunk-XAEAMI5H.js → chunk-JRLXEYR4.js} +21 -5
- package/dist/chunk-JRLXEYR4.js.map +1 -0
- package/dist/{chunk-ZJN6NTHE.js → chunk-JZUPMTJY.js} +3 -3
- package/dist/{chunk-ZJN6NTHE.js.map → chunk-JZUPMTJY.js.map} +1 -1
- package/dist/{chunk-M5ZQBOIZ.js → chunk-KE6XKRLQ.js} +3 -3
- package/dist/{chunk-M5ZQBOIZ.js.map → chunk-KE6XKRLQ.js.map} +1 -1
- package/dist/chunk-KGRIHEDT.js +110 -0
- package/dist/chunk-KGRIHEDT.js.map +1 -0
- package/dist/{chunk-T4QWDOG6.js → chunk-KWUNN5J2.js} +5 -5
- package/dist/{chunk-T4QWDOG6.js.map → chunk-KWUNN5J2.js.map} +1 -1
- package/dist/{chunk-56OXYUZE.js → chunk-KX7JV5KM.js} +3 -3
- package/dist/chunk-KX7JV5KM.js.map +1 -0
- package/dist/{chunk-D4ZUJTFB.cjs → chunk-LALG2K33.cjs} +8 -8
- package/dist/{chunk-D4ZUJTFB.cjs.map → chunk-LALG2K33.cjs.map} +1 -1
- package/dist/{chunk-QGDKZDPN.js → chunk-LGILIGV3.js} +3 -3
- package/dist/{chunk-QGDKZDPN.js.map → chunk-LGILIGV3.js.map} +1 -1
- package/dist/{chunk-HEN5WXXI.js → chunk-LJX2SQV2.js} +6 -6
- package/dist/{chunk-HEN5WXXI.js.map → chunk-LJX2SQV2.js.map} +1 -1
- package/dist/{chunk-SDIBMLL5.js → chunk-MC5EINBV.js} +44 -8
- package/dist/chunk-MC5EINBV.js.map +1 -0
- package/dist/{chunk-F6Y4IEQM.js → chunk-ML5A5DOJ.js} +4 -4
- package/dist/{chunk-F6Y4IEQM.js.map → chunk-ML5A5DOJ.js.map} +1 -1
- package/dist/{chunk-6EDQBX7U.cjs → chunk-N475ETD6.cjs} +17 -17
- package/dist/{chunk-6EDQBX7U.cjs.map → chunk-N475ETD6.cjs.map} +1 -1
- package/dist/{chunk-YPQF26X7.cjs → chunk-OBA6YK2R.cjs} +2 -2
- package/dist/chunk-OBA6YK2R.cjs.map +1 -0
- package/dist/chunk-OXNYIMZZ.js +31 -0
- package/dist/chunk-OXNYIMZZ.js.map +1 -0
- package/dist/{chunk-NFCKEBHI.js → chunk-PI4RO4GR.js} +3 -3
- package/dist/{chunk-NFCKEBHI.js.map → chunk-PI4RO4GR.js.map} +1 -1
- package/dist/{chunk-2ONFGMBV.js → chunk-PY2RQOA7.js} +2 -2
- package/dist/chunk-PY2RQOA7.js.map +1 -0
- 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-CD73YHEH.js → chunk-SG5ZWT6C.js} +3 -3
- package/dist/{chunk-CD73YHEH.js.map → chunk-SG5ZWT6C.js.map} +1 -1
- package/dist/{chunk-MRODLUGY.cjs → chunk-TIMPJL5V.cjs} +4 -4
- package/dist/{chunk-MRODLUGY.cjs.map → chunk-TIMPJL5V.cjs.map} +1 -1
- package/dist/{chunk-77WHPVXE.js → chunk-TOTP24P6.js} +4 -4
- package/dist/chunk-TOTP24P6.js.map +1 -0
- package/dist/{chunk-3O2ELBST.cjs → chunk-USZTVNUQ.cjs} +5 -5
- package/dist/{chunk-3O2ELBST.cjs.map → chunk-USZTVNUQ.cjs.map} +1 -1
- package/dist/{chunk-YDLNI7J6.js → chunk-V2RBCCN5.js} +3 -3
- package/dist/chunk-V2RBCCN5.js.map +1 -0
- package/dist/{chunk-NNSKJCBM.cjs → chunk-VJYSQXN6.cjs} +10 -10
- package/dist/{chunk-NNSKJCBM.cjs.map → chunk-VJYSQXN6.cjs.map} +1 -1
- package/dist/{chunk-GM7QDQ24.cjs → chunk-W4WKVOOQ.cjs} +11 -11
- package/dist/{chunk-GM7QDQ24.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-ZW345YOI.js → chunk-YP67XZES.js} +4 -4
- package/dist/{chunk-ZW345YOI.js.map → chunk-YP67XZES.js.map} +1 -1
- package/dist/{chunk-YCXMSDSP.js → chunk-YRXY2A5L.js} +4 -4
- package/dist/{chunk-YCXMSDSP.js.map → chunk-YRXY2A5L.js.map} +1 -1
- package/dist/{chunk-IEUDKUPM.cjs → chunk-Z2CUEBXV.cjs} +25 -9
- package/dist/chunk-Z2CUEBXV.cjs.map +1 -0
- package/dist/{chunk-GL7CFBVC.js → chunk-ZYB6B7QJ.js} +112 -165
- package/dist/chunk-ZYB6B7QJ.js.map +1 -0
- package/dist/compact-session-PYEC3NZV.js +18 -0
- package/dist/{compact-session-WNKKIIDW.js.map → compact-session-PYEC3NZV.js.map} +1 -1
- package/dist/compact-session-VVT6IBJG.cjs +55 -0
- package/dist/{compact-session-H5TKLD55.cjs.map → compact-session-VVT6IBJG.cjs.map} +1 -1
- package/dist/compaction.cjs +19 -19
- package/dist/compaction.d.cts +9 -9
- package/dist/compaction.d.ts +9 -9
- 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-ZV33V4DC.cjs.map → context-2FZSC6VQ.cjs.map} +1 -1
- package/dist/context-ATJJAFOS.js +5 -0
- package/dist/{context-VAYLPT4O.js.map → context-ATJJAFOS.js.map} +1 -1
- package/dist/{cron-Dx7B-3WB.d.ts → cron-Bx7tzm5R.d.ts} +54 -2
- package/dist/{cron-BiK_aNJI.d.cts → cron-D-DVjGQe.d.cts} +54 -2
- package/dist/cron.cjs +34 -30
- package/dist/cron.d.cts +3 -3
- package/dist/cron.d.ts +3 -3
- package/dist/cron.js +33 -29
- package/dist/{errors-DyVbXdR4.d.cts → errors-DMY-gLSK.d.cts} +1 -1
- package/dist/{errors-Cua4WC9H.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 +42 -37
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +38 -33
- package/dist/eval.js.map +1 -1
- package/dist/{executor-OZSYXDKF.cjs → executor-BMRICN46.cjs} +26 -25
- package/dist/executor-BMRICN46.cjs.map +1 -0
- package/dist/{executor-PAH72CB5.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-7E7UPLF2.cjs.map → fs-session-store-J5MCFFUM.cjs.map} +1 -1
- package/dist/fs-session-store-O6FNHECD.js +10 -0
- package/dist/{fs-session-store-6MY7PNI2.js.map → fs-session-store-O6FNHECD.js.map} +1 -1
- package/dist/generate-object-UF6WIZLF.cjs +20 -0
- package/dist/{generate-object-5SCEH2EE.cjs.map → generate-object-UF6WIZLF.cjs.map} +1 -1
- package/dist/generate-object-XDCBYVK3.js +7 -0
- package/dist/{generate-object-I7UD4NWN.js.map → generate-object-XDCBYVK3.js.map} +1 -1
- package/dist/index-manager-N7RQYUKT.cjs +20 -0
- package/dist/{index-manager-R6ZJFEZF.cjs.map → index-manager-N7RQYUKT.cjs.map} +1 -1
- package/dist/index-manager-ZVZUHPP7.js +11 -0
- package/dist/{index-manager-KKAK7NT3.js.map → index-manager-ZVZUHPP7.js.map} +1 -1
- package/dist/index.cjs +154 -148
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +201 -43
- package/dist/index.d.ts +201 -43
- package/dist/index.js +62 -59
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-UXNJQTZ6.js → inject-session-GQMTDZUN.js} +8 -7
- package/dist/inject-session-GQMTDZUN.js.map +1 -0
- package/dist/{inject-session-DM4SKTZO.cjs → inject-session-LFCYVSLJ.cjs} +11 -10
- package/dist/inject-session-LFCYVSLJ.cjs.map +1 -0
- package/dist/internal/agent-loop/live-events.d.ts +46 -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/budget/compute-cost.d.ts +1 -1
- package/dist/internal/diagnostics.d.ts +46 -31
- package/dist/internal/error-mappers/anthropic.d.ts +1 -1
- package/dist/internal/global-singleton.d.ts +7 -7
- package/dist/internal/judge/judge-call.d.ts +14 -14
- package/dist/internal/llm/anthropic-shared.d.ts +4 -4
- package/dist/internal/llm/retrying-client.d.ts +29 -29
- package/dist/internal/llm/transport-error.d.ts +2 -2
- 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/exclusive-create.d.cts +2 -2
- package/dist/internal/persistence/exclusive-create.d.ts +2 -2
- package/dist/internal/persistence/fs-session-store.d.cts +18 -18
- package/dist/internal/persistence/fs-session-store.d.ts +18 -18
- package/dist/internal/persistence/index.cjs +25 -25
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +6 -6
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/persistence/paths.d.cts +7 -7
- package/dist/internal/persistence/paths.d.ts +7 -7
- package/dist/internal/persistence/session-transcript.d.cts +13 -7
- package/dist/internal/persistence/session-transcript.d.ts +13 -7
- package/dist/internal/persistence/session-writer.d.cts +30 -13
- package/dist/internal/persistence/session-writer.d.ts +30 -13
- package/dist/internal/runtime/concurrency/subagent-credentials.d.ts +35 -0
- package/dist/internal/runtime/fixtures/fixture-run-base.d.ts +45 -13
- package/dist/internal/runtime/lifecycle/goal-marker.d.ts +8 -8
- 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/agent-session.d.ts +14 -14
- package/dist/internal/session/session-cache.d.ts +9 -9
- package/dist/internal/session/session-types.d.ts +6 -1
- package/dist/judge-call-NA2G6ZMJ.js +5 -0
- package/dist/{judge-call-TAEIXMYG.js.map → judge-call-NA2G6ZMJ.js.map} +1 -1
- package/dist/judge-call-U2D33JOW.cjs +22 -0
- package/dist/{judge-call-SP3G3X2Y.cjs.map → judge-call-U2D33JOW.cjs.map} +1 -1
- package/dist/models.cjs +20 -20
- package/dist/models.cjs.map +1 -1
- package/dist/models.js +5 -5
- package/dist/models.js.map +1 -1
- package/dist/path-safety.cjs +10 -10
- package/dist/path-safety.js +3 -3
- package/dist/persistence.cjs +43 -43
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.d.cts +1 -1
- package/dist/persistence.d.ts +1 -1
- package/dist/persistence.js +14 -14
- package/dist/persistence.js.map +1 -1
- package/dist/project.cjs +5 -5
- package/dist/project.js +3 -3
- package/dist/registry-CAS6Y5ZY.js +9 -0
- package/dist/{registry-SOXE4RY6.js.map → registry-CAS6Y5ZY.js.map} +1 -1
- package/dist/registry-JSDI4WKA.cjs +46 -0
- package/dist/{registry-N3GTKYCI.cjs.map → registry-JSDI4WKA.cjs.map} +1 -1
- package/dist/retry.cjs +4 -4
- package/dist/retry.js +3 -3
- package/dist/{run-CwEJtLPE.d.ts → run-i2-fUohR.d.cts} +217 -174
- package/dist/{run-CwEJtLPE.d.cts → run-i2-fUohR.d.ts} +217 -174
- package/dist/{run-until-YZ2ODWOF.js → run-until-BK56WG4P.js} +3 -3
- package/dist/{run-until-YZ2ODWOF.js.map → run-until-BK56WG4P.js.map} +1 -1
- package/dist/{run-until-ZZ2JLPJM.cjs → run-until-L5KQD3PV.cjs} +4 -4
- package/dist/{run-until-ZZ2JLPJM.cjs.map → run-until-L5KQD3PV.cjs.map} +1 -1
- package/dist/sandbox/bwrap.d.cts +20 -20
- package/dist/sandbox/bwrap.d.ts +20 -20
- package/dist/sandbox/index.cjs +39 -39
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.js +35 -35
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sandbox/linux-sandbox.d.cts +26 -21
- package/dist/sandbox/linux-sandbox.d.ts +26 -21
- package/dist/server/auth/index.cjs.map +1 -1
- package/dist/server/auth/index.d.cts +6 -6
- package/dist/server/auth/index.d.ts +6 -6
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/auth/orchestrator.d.cts +2 -2
- package/dist/server/auth/orchestrator.d.ts +2 -2
- package/dist/server/auth/types.d.cts +4 -4
- package/dist/server/auth/types.d.ts +4 -4
- 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-6WKLYIN4.js.map → session-transcript-3B52DKTG.js.map} +1 -1
- package/dist/session-transcript-H7NUFXXM.cjs +50 -0
- package/dist/{session-transcript-EAKR4D2W.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-Y7YCX3BI.cjs.map → stream-object-4FDU76YW.cjs.map} +1 -1
- package/dist/stream-object-HWDEEQN4.js +7 -0
- package/dist/{stream-object-OFM66VUT.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-prims.d.ts +4 -4
- package/dist/types/agent.d.ts +68 -3
- package/dist/types/conversation.d.ts +7 -0
- package/dist/types/goal-events.d.ts +24 -23
- package/dist/types/messages.d.ts +9 -0
- package/dist/types/run.d.ts +27 -0
- package/dist/types/session-message.d.ts +59 -0
- package/dist/types/session-record.d.ts +14 -13
- 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 +22 -13
- package/dist/agent-DW2J37IH.js +0 -42
- package/dist/agent-IE6IE4NW.cjs +0 -51
- package/dist/batch-3SEPDXCU.cjs.map +0 -1
- package/dist/batch-SY5GZLFD.js.map +0 -1
- package/dist/chunk-2423XDPT.cjs.map +0 -1
- package/dist/chunk-2ONFGMBV.js.map +0 -1
- package/dist/chunk-4YB7B3RP.cjs.map +0 -1
- package/dist/chunk-56OXYUZE.js.map +0 -1
- package/dist/chunk-56ZM6P7Z.cjs.map +0 -1
- package/dist/chunk-5SB4V74H.js +0 -176
- package/dist/chunk-5SB4V74H.js.map +0 -1
- package/dist/chunk-6VP3XGEK.js.map +0 -1
- package/dist/chunk-77WHPVXE.js.map +0 -1
- package/dist/chunk-ALU3KC4G.cjs.map +0 -1
- package/dist/chunk-BJMKQOY2.cjs.map +0 -1
- package/dist/chunk-DCJ5MCJ3.js.map +0 -1
- package/dist/chunk-EEZ7CFMM.js.map +0 -1
- package/dist/chunk-FV3YEMQ7.js.map +0 -1
- package/dist/chunk-G2F67XUR.cjs.map +0 -1
- package/dist/chunk-GL7CFBVC.js.map +0 -1
- package/dist/chunk-H5YVJB4K.cjs +0 -185
- package/dist/chunk-H5YVJB4K.cjs.map +0 -1
- package/dist/chunk-ICYBIC6N.cjs.map +0 -1
- package/dist/chunk-IEUDKUPM.cjs.map +0 -1
- package/dist/chunk-IT3PWBW4.cjs.map +0 -1
- package/dist/chunk-ITLS5LRF.cjs +0 -105
- package/dist/chunk-ITLS5LRF.cjs.map +0 -1
- package/dist/chunk-LTCOPATU.cjs.map +0 -1
- package/dist/chunk-MXSMAGDU.js.map +0 -1
- package/dist/chunk-P34DHHYQ.cjs.map +0 -1
- package/dist/chunk-SDIBMLL5.js.map +0 -1
- package/dist/chunk-TAPQWDW2.js.map +0 -1
- package/dist/chunk-THEYGCYS.cjs.map +0 -1
- package/dist/chunk-VNNK6AKU.js.map +0 -1
- package/dist/chunk-VYJSHGAY.js.map +0 -1
- package/dist/chunk-W52DKZBR.cjs.map +0 -1
- package/dist/chunk-XAEAMI5H.js.map +0 -1
- package/dist/chunk-XAYVHS2B.cjs.map +0 -1
- package/dist/chunk-YDLNI7J6.js.map +0 -1
- package/dist/chunk-YPQF26X7.cjs.map +0 -1
- package/dist/chunk-YVTNFKZO.js +0 -103
- package/dist/chunk-YVTNFKZO.js.map +0 -1
- package/dist/compact-session-H5TKLD55.cjs +0 -54
- package/dist/compact-session-WNKKIIDW.js +0 -17
- package/dist/context-VAYLPT4O.js +0 -5
- package/dist/context-ZV33V4DC.cjs +0 -22
- package/dist/executor-OZSYXDKF.cjs.map +0 -1
- package/dist/executor-PAH72CB5.js.map +0 -1
- package/dist/fs-session-store-6MY7PNI2.js +0 -10
- package/dist/fs-session-store-7E7UPLF2.cjs +0 -19
- package/dist/generate-object-5SCEH2EE.cjs +0 -20
- package/dist/generate-object-I7UD4NWN.js +0 -7
- package/dist/index-manager-KKAK7NT3.js +0 -10
- package/dist/index-manager-R6ZJFEZF.cjs +0 -19
- package/dist/inject-session-DM4SKTZO.cjs.map +0 -1
- package/dist/inject-session-UXNJQTZ6.js.map +0 -1
- package/dist/judge-call-SP3G3X2Y.cjs +0 -22
- package/dist/judge-call-TAEIXMYG.js +0 -5
- package/dist/registry-N3GTKYCI.cjs +0 -46
- package/dist/registry-SOXE4RY6.js +0 -9
- package/dist/session-transcript-6WKLYIN4.js +0 -5
- package/dist/session-transcript-EAKR4D2W.cjs +0 -50
- package/dist/stream-object-OFM66VUT.js +0 -7
- package/dist/stream-object-Y7YCX3BI.cjs +0 -20
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
|
|
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
|
*
|
|
@@ -596,7 +656,7 @@ declare class Agent {
|
|
|
596
656
|
*
|
|
597
657
|
* This bullet used to say the opposite ("Disposed agents are NOT auto-deleted...
|
|
598
658
|
* call `Agent.delete(agentId)` first"). It was measured false in M91:
|
|
599
|
-
* `tests/m91-getorcreate-
|
|
659
|
+
* `tests/m91-getorcreate-after-dispose.test.ts` builds an agent, disposes it, and
|
|
600
660
|
* gets a different instance back. The claim was about the PERSISTENT registry and
|
|
601
661
|
* read as being about the live cache — and consumers built around the wrong half.
|
|
602
662
|
* The agent-builder's M85 interrupt rotates the session id to work around a
|
|
@@ -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
|
*
|
|
@@ -723,7 +818,7 @@ declare class AgentFactory {
|
|
|
723
818
|
* - "subscription_included" routes (Codex CLI, future Claude Pro) →
|
|
724
819
|
* return $0 with status="included".
|
|
725
820
|
* - Provider unknown / pricing missing → status="unknown" with
|
|
726
|
-
* undefined amountUsd (
|
|
821
|
+
* undefined amountUsd (does NOT return a false 0).
|
|
727
822
|
*
|
|
728
823
|
* @internal
|
|
729
824
|
*/
|
|
@@ -743,8 +838,8 @@ declare function computeCost(args: ComputeArgs): CostBreakdown;
|
|
|
743
838
|
* Budget enforcement (ADRs D383, D386, EC-7/8/9).
|
|
744
839
|
*
|
|
745
840
|
* - `preflightCheck(name, estimatedUsd)` — em `block` mode, throw
|
|
746
|
-
* `BudgetExceededError`
|
|
747
|
-
*
|
|
841
|
+
* `BudgetExceededError` before the LLM call if any limit would be
|
|
842
|
+
* exceeded (EC-9 — the caller invokes it inside the mutex section).
|
|
748
843
|
* - `chargeAndCheckThresholds(name, actualUsd)` — apply charge ao
|
|
749
844
|
* ledger + invoca onThreshold/onExceed callbacks isolated em
|
|
750
845
|
* try/catch (EC-8).
|
|
@@ -1021,16 +1116,16 @@ declare class Provider {
|
|
|
1021
1116
|
*/
|
|
1022
1117
|
static builtins(): Plugin[];
|
|
1023
1118
|
/**
|
|
1024
|
-
*
|
|
1119
|
+
* The builtin serving `modelId`, or `undefined` when none does.
|
|
1025
1120
|
*
|
|
1026
|
-
*
|
|
1027
|
-
*
|
|
1028
|
-
* id
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
1121
|
+
* The grammar of a model id — `provider/model` — now has **one** owner. M94: the consumer
|
|
1122
|
+
* redid it by hand with `modelId.slice(0, modelId.indexOf('/'))`, which on an id **without a slash** returns the
|
|
1123
|
+
* id minus its last character (`claude-opus-5` -> `claude-opus-`): it matches no provider and the
|
|
1124
|
+
* caller fell through to the default, without distinguishing that from a hit. A non-routable model was
|
|
1125
|
+
* indistinguishable from the happy path.
|
|
1031
1126
|
*
|
|
1032
|
-
*
|
|
1033
|
-
*
|
|
1127
|
+
* Returns `undefined` instead of throwing: the caller decides whether absence is an error, and only they
|
|
1128
|
+
* know whether the model came from an explicit `--model` (an error) or from the default (normal).
|
|
1034
1129
|
*
|
|
1035
1130
|
* @public
|
|
1036
1131
|
*/
|
|
@@ -1203,32 +1298,32 @@ interface JudgeContext {
|
|
|
1203
1298
|
/** Caller-supplied tuning knobs for the judge call. */
|
|
1204
1299
|
interface JudgeOptions {
|
|
1205
1300
|
/**
|
|
1206
|
-
* Judge model identifier.
|
|
1207
|
-
* `"openai/gpt-4o-mini"`
|
|
1301
|
+
* Judge model identifier. When absent, it DERIVES from {@link agentModel} — and only falls back to the literal
|
|
1302
|
+
* `"openai/gpt-4o-mini"` when neither is provided.
|
|
1208
1303
|
*
|
|
1209
|
-
* M80 —
|
|
1210
|
-
* 404,
|
|
1211
|
-
*
|
|
1212
|
-
*
|
|
1304
|
+
* M80 — the fixed default was provider-blind: it only resolves on OpenRouter. With an Anthropic key it gives
|
|
1305
|
+
* 404, with an OAuth bearer it gives 401, and in both the goal burned 3 whole turns before failing with
|
|
1306
|
+
* a misleading reason. The agent-builder already worked around this by deriving on its own; the knowledge
|
|
1307
|
+
* belongs here.
|
|
1213
1308
|
*/
|
|
1214
1309
|
judgeModel?: string;
|
|
1215
1310
|
/**
|
|
1216
|
-
* M80 —
|
|
1217
|
-
* chat
|
|
1311
|
+
* M80 — the DRIVEN agent's model. It is the basis of the derivation: a judge running on the same model as the
|
|
1312
|
+
* chat works wherever chat works.
|
|
1218
1313
|
*/
|
|
1219
1314
|
agentModel?: string;
|
|
1220
1315
|
/** Override env. Default `process.env.OPENROUTER_API_KEY` (EC-A). */
|
|
1221
1316
|
apiKey?: string;
|
|
1222
1317
|
}
|
|
1223
1318
|
/**
|
|
1224
|
-
* M80 —
|
|
1319
|
+
* M80 — the judge's credential or model does not work: 401/404.
|
|
1225
1320
|
*
|
|
1226
|
-
*
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1321
|
+
* Fails FAST by design. `rules/error-handling.md` § 2 separates recoverable from unrecoverable, and a
|
|
1322
|
+
* nonexistent model does not start existing on retry — folding that into `{parseFailed: true}` made the loop
|
|
1323
|
+
* try three times and report "failed" on a consecutive-failure limit, hiding that the cause was the
|
|
1324
|
+
* credential. A slow, opaque failure traded for a fast, clear one.
|
|
1230
1325
|
*
|
|
1231
|
-
*
|
|
1326
|
+
* PARSE failures and network errors stay folded: they are recoverable, and the loop already decides on
|
|
1232
1327
|
* consecutivas.
|
|
1233
1328
|
*/
|
|
1234
1329
|
declare class JudgeCredentialError extends TheokitAgentError {
|
|
@@ -1259,16 +1354,16 @@ interface RunUntilDeps {
|
|
|
1259
1354
|
}
|
|
1260
1355
|
|
|
1261
1356
|
/**
|
|
1262
|
-
*
|
|
1357
|
+
* The goal-loop's continuation marker — in a LEAF module, on purpose.
|
|
1263
1358
|
*
|
|
1264
|
-
*
|
|
1265
|
-
*
|
|
1266
|
-
*
|
|
1267
|
-
*
|
|
1359
|
+
* It lived in `goal-loop.ts` and was imported by `run-until.ts`, which `goal-loop` in turn
|
|
1360
|
+
* imports back. The cycle was broken at runtime (the return edge is `import type` + a dynamic
|
|
1361
|
+
* `await import()`), but the cycle detector counts the dynamic edge — and counting a dynamic import as a cycle
|
|
1362
|
+
* makes the gate impossible to satisfy without abandoning the canonical cycle-breaking technique.
|
|
1268
1363
|
*
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1364
|
+
* A constant shared by two modules that know each other is the textbook case for extraction into a
|
|
1365
|
+
* leaf: neither needs to import the other to know it. The cycle disappears under ANY detector, with no
|
|
1366
|
+
* tool policy and without changing a line of behavior.
|
|
1272
1367
|
*/
|
|
1273
1368
|
declare const GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
|
|
1274
1369
|
|
|
@@ -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 {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export { GenerateObjectError } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import { Workflow, agentStep } from './chunk-
|
|
7
|
-
import './chunk-
|
|
1
|
+
export { JudgeCredentialError } from './chunk-D7IULBF2.js';
|
|
2
|
+
export { StreamObjectError } from './chunk-DU7DE543.js';
|
|
3
|
+
export { GOAL_CONTINUATION_MARKER } from './chunk-PY2RQOA7.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-5SB4V74H.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-
|
|
20
|
-
import './chunk-
|
|
21
|
-
import
|
|
22
|
-
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
|
+
import './chunk-5KOW3GLE.js';
|
|
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-CSZRJ4RE.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';
|
|
@@ -594,16 +599,16 @@ var Provider = class _Provider {
|
|
|
594
599
|
return listProviders().map((profile) => defineProvider(profile));
|
|
595
600
|
}
|
|
596
601
|
/**
|
|
597
|
-
*
|
|
602
|
+
* The builtin serving `modelId`, or `undefined` when none does.
|
|
598
603
|
*
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
* id
|
|
602
|
-
*
|
|
603
|
-
*
|
|
604
|
+
* The grammar of a model id — `provider/model` — now has **one** owner. M94: the consumer
|
|
605
|
+
* redid it by hand with `modelId.slice(0, modelId.indexOf('/'))`, which on an id **without a slash** returns the
|
|
606
|
+
* id minus its last character (`claude-opus-5` -> `claude-opus-`): it matches no provider and the
|
|
607
|
+
* caller fell through to the default, without distinguishing that from a hit. A non-routable model was
|
|
608
|
+
* indistinguishable from the happy path.
|
|
604
609
|
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
610
|
+
* Returns `undefined` instead of throwing: the caller decides whether absence is an error, and only they
|
|
611
|
+
* know whether the model came from an explicit `--model` (an error) or from the default (normal).
|
|
607
612
|
*
|
|
608
613
|
* @public
|
|
609
614
|
*/
|
|
@@ -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
|
}
|
|
@@ -717,9 +720,9 @@ var EventBus = class {
|
|
|
717
720
|
// src/goal-loop.ts
|
|
718
721
|
function runGoalLoop(agent, goal, options, depsOverride) {
|
|
719
722
|
async function* wrap() {
|
|
720
|
-
const { runUntilImpl } = await import('./run-until-
|
|
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,10 +1603,10 @@ 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
|
-
// `AgentDefinition.model`
|
|
1606
|
-
//
|
|
1608
|
+
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
1609
|
+
// here means "declare nothing and let the default apply" — forwarding the literal would create
|
|
1607
1610
|
// um agente pedindo um modelo chamado `inherit`.
|
|
1608
1611
|
...def.model !== void 0 && def.model !== "inherit" ? { model: def.model } : {},
|
|
1609
1612
|
...def.prompt !== void 0 ? { systemPrompt: def.prompt } : {},
|
|
@@ -1626,12 +1629,12 @@ function createSquad(options) {
|
|
|
1626
1629
|
}
|
|
1627
1630
|
return {
|
|
1628
1631
|
run: async (input) => {
|
|
1629
|
-
const run = await (await
|
|
1632
|
+
const run = await (await buildPipeline(agents, options.name)).run(input);
|
|
1630
1633
|
return { result: run.output, status: run.status, steps: run.stepResults };
|
|
1631
1634
|
}
|
|
1632
1635
|
};
|
|
1633
1636
|
}
|
|
1634
|
-
async function
|
|
1637
|
+
async function buildPipeline(agents, nome) {
|
|
1635
1638
|
let builder = Workflow.create({ name: nome ?? "squad" });
|
|
1636
1639
|
for (let i = 0; i < agents.length; i++) {
|
|
1637
1640
|
const membro = agents[i];
|