@theokit/sdk 5.13.0 → 5.15.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 +57 -0
- package/dist/{agent-DSMuwADp.d.ts → agent-B6C9i_qu.d.ts} +31 -213
- package/dist/{agent-iW5kPpfT.d.cts → agent-B6FQad6P.d.cts} +31 -213
- package/dist/{agent-5DSDDH7K.js → agent-DRDGUU6T.js} +21 -20
- package/dist/{agent-5DSDDH7K.js.map → agent-DRDGUU6T.js.map} +1 -1
- package/dist/{agent-WOMRT3KX.cjs → agent-VI2HITPT.cjs} +22 -21
- package/dist/{agent-WOMRT3KX.cjs.map → agent-VI2HITPT.cjs.map} +1 -1
- package/dist/agent.d.ts +2 -3
- package/dist/auth/index.cjs +17 -16
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js +5 -4
- package/dist/auth/index.js.map +1 -1
- package/dist/{batch-EP3FCL6D.js → batch-N2XDYZED.js} +4 -4
- package/dist/{batch-EP3FCL6D.js.map → batch-N2XDYZED.js.map} +1 -1
- package/dist/{batch-IZ5EDKJ5.cjs → batch-VFR2MAUE.cjs} +7 -7
- package/dist/{batch-IZ5EDKJ5.cjs.map → batch-VFR2MAUE.cjs.map} +1 -1
- package/dist/{chunk-XOYNB3YN.js → chunk-23SS4ID4.js} +3 -3
- package/dist/{chunk-XOYNB3YN.js.map → chunk-23SS4ID4.js.map} +1 -1
- package/dist/{chunk-NHOEXFZT.js → chunk-2HXTNVLM.js} +5 -2
- package/dist/chunk-2HXTNVLM.js.map +1 -0
- package/dist/{chunk-2C24NSNV.js → chunk-3BBTHFGJ.js} +3 -3
- package/dist/{chunk-2C24NSNV.js.map → chunk-3BBTHFGJ.js.map} +1 -1
- package/dist/{chunk-NP362THY.cjs → chunk-3F53FLQ7.cjs} +5 -7
- package/dist/chunk-3F53FLQ7.cjs.map +1 -0
- package/dist/{chunk-3FSBE4PS.js → chunk-3GTN4HOO.js} +10 -6
- package/dist/chunk-3GTN4HOO.js.map +1 -0
- package/dist/{chunk-7WARNHWW.cjs → chunk-3UMPP553.cjs} +5 -2
- package/dist/chunk-3UMPP553.cjs.map +1 -0
- package/dist/{chunk-SXH37C7X.cjs → chunk-55LLQFHW.cjs} +6 -6
- package/dist/{chunk-SXH37C7X.cjs.map → chunk-55LLQFHW.cjs.map} +1 -1
- package/dist/{chunk-QISSETTG.cjs → chunk-5645PMVU.cjs} +6 -4
- package/dist/chunk-5645PMVU.cjs.map +1 -0
- package/dist/{chunk-JX4LB6XO.js → chunk-5M5GQYBM.js} +617 -250
- package/dist/chunk-5M5GQYBM.js.map +1 -0
- package/dist/{chunk-KL7ZUMK3.cjs → chunk-64ECM3XM.cjs} +704 -337
- package/dist/chunk-64ECM3XM.cjs.map +1 -0
- package/dist/{chunk-ZJAYFSVI.js → chunk-7ACS6P5Z.js} +5 -7
- package/dist/chunk-7ACS6P5Z.js.map +1 -0
- package/dist/{chunk-5A4UFBHW.cjs → chunk-A77UMVMD.cjs} +15 -11
- package/dist/chunk-A77UMVMD.cjs.map +1 -0
- package/dist/{chunk-ZTP6ZACR.js → chunk-ARC2V7NY.js} +3 -3
- package/dist/{chunk-ZTP6ZACR.js.map → chunk-ARC2V7NY.js.map} +1 -1
- package/dist/{chunk-WDVG5R2Q.cjs → chunk-AUH2EVWY.cjs} +4 -3
- package/dist/chunk-AUH2EVWY.cjs.map +1 -0
- package/dist/chunk-BNEUB52I.cjs +55 -0
- package/dist/chunk-BNEUB52I.cjs.map +1 -0
- package/dist/chunk-BPL5CVZ5.js +53 -0
- package/dist/chunk-BPL5CVZ5.js.map +1 -0
- package/dist/{chunk-2SFLLOMN.js → chunk-CBBT42VX.js} +3 -3
- package/dist/{chunk-2SFLLOMN.js.map → chunk-CBBT42VX.js.map} +1 -1
- package/dist/chunk-CHKV2L2Y.cjs +416 -0
- package/dist/chunk-CHKV2L2Y.cjs.map +1 -0
- package/dist/{chunk-4UYHP6NF.cjs → chunk-DJKGDLYZ.cjs} +93 -63
- package/dist/chunk-DJKGDLYZ.cjs.map +1 -0
- package/dist/{chunk-354F3OF5.js → chunk-FGGVSHDW.js} +3 -3
- package/dist/{chunk-354F3OF5.js.map → chunk-FGGVSHDW.js.map} +1 -1
- package/dist/{chunk-6OCJWGVD.cjs → chunk-FTXY4D44.cjs} +4 -4
- package/dist/{chunk-6OCJWGVD.cjs.map → chunk-FTXY4D44.cjs.map} +1 -1
- package/dist/chunk-INVEGVGO.js +405 -0
- package/dist/chunk-INVEGVGO.js.map +1 -0
- package/dist/{chunk-2PRGRYEQ.js → chunk-IOBHFP2E.js} +50 -20
- package/dist/chunk-IOBHFP2E.js.map +1 -0
- package/dist/{chunk-47EACDOC.cjs → chunk-KMFBNKCT.cjs} +4 -4
- package/dist/{chunk-47EACDOC.cjs.map → chunk-KMFBNKCT.cjs.map} +1 -1
- package/dist/{chunk-DF77RBF4.js → chunk-LCCT5ZXJ.js} +6 -6
- package/dist/{chunk-DF77RBF4.js.map → chunk-LCCT5ZXJ.js.map} +1 -1
- package/dist/{chunk-G7XBVM3T.cjs → chunk-MHUOVS5I.cjs} +5 -5
- package/dist/{chunk-G7XBVM3T.cjs.map → chunk-MHUOVS5I.cjs.map} +1 -1
- package/dist/{chunk-CWQPQTUZ.cjs → chunk-NEH3BPFD.cjs} +15 -15
- package/dist/{chunk-CWQPQTUZ.cjs.map → chunk-NEH3BPFD.cjs.map} +1 -1
- package/dist/{chunk-5AR6O7GW.js → chunk-NK5EOTDY.js} +3 -3
- package/dist/{chunk-5AR6O7GW.js.map → chunk-NK5EOTDY.js.map} +1 -1
- package/dist/{chunk-S46WJTDL.cjs → chunk-P7QYG4RZ.cjs} +27 -19
- package/dist/chunk-P7QYG4RZ.cjs.map +1 -0
- package/dist/chunk-PPU2D4FZ.js +19 -0
- package/dist/chunk-PPU2D4FZ.js.map +1 -0
- package/dist/{chunk-MS3TQSXU.js → chunk-QD6B6W6I.js} +6 -4
- package/dist/chunk-QD6B6W6I.js.map +1 -0
- package/dist/{chunk-AB4OPJLD.js → chunk-RGVMJU57.js} +3 -3
- package/dist/{chunk-AB4OPJLD.js.map → chunk-RGVMJU57.js.map} +1 -1
- package/dist/{chunk-NWWTYBD3.cjs → chunk-RTDVSHJR.cjs} +5 -5
- package/dist/{chunk-NWWTYBD3.cjs.map → chunk-RTDVSHJR.cjs.map} +1 -1
- package/dist/{chunk-5HSMH2ZZ.js → chunk-RZL2W4C3.js} +25 -17
- package/dist/chunk-RZL2W4C3.js.map +1 -0
- package/dist/chunk-SPEN7RJU.cjs +18 -0
- package/dist/{chunk-LO6LIUZ6.cjs.map → chunk-SPEN7RJU.cjs.map} +1 -1
- package/dist/{chunk-ZF2LDKQQ.cjs → chunk-U3DW3WDE.cjs} +9 -8
- package/dist/chunk-U3DW3WDE.cjs.map +1 -0
- package/dist/{chunk-DVP3YMDA.cjs → chunk-U7PRI3XM.cjs} +3 -3
- package/dist/{chunk-DVP3YMDA.cjs.map → chunk-U7PRI3XM.cjs.map} +1 -1
- package/dist/{chunk-H7G65PNI.js → chunk-VCQ37TC5.js} +3 -3
- package/dist/{chunk-H7G65PNI.js.map → chunk-VCQ37TC5.js.map} +1 -1
- package/dist/{chunk-SDZ4XDWS.cjs → chunk-VWYFGE27.cjs} +9 -9
- package/dist/{chunk-SDZ4XDWS.cjs.map → chunk-VWYFGE27.cjs.map} +1 -1
- package/dist/{chunk-RN3XDZGS.js → chunk-WM646HEN.js} +4 -3
- package/dist/chunk-WM646HEN.js.map +1 -0
- package/dist/chunk-X7CE7Y5W.js +305 -0
- package/dist/chunk-X7CE7Y5W.js.map +1 -0
- package/dist/{chunk-CGH4BCIY.cjs → chunk-XE3CAY6Z.cjs} +5 -5
- package/dist/{chunk-CGH4BCIY.cjs.map → chunk-XE3CAY6Z.cjs.map} +1 -1
- package/dist/chunk-XOU3CL7S.cjs +312 -0
- package/dist/chunk-XOU3CL7S.cjs.map +1 -0
- package/dist/{chunk-NKQVLWDF.js → chunk-YKNBTHMD.js} +3 -3
- package/dist/{chunk-NKQVLWDF.js.map → chunk-YKNBTHMD.js.map} +1 -1
- package/dist/{compact-session-B7P6EU3Z.cjs → compact-session-NX7HUNTB.cjs} +18 -18
- package/dist/{compact-session-B7P6EU3Z.cjs.map → compact-session-NX7HUNTB.cjs.map} +1 -1
- package/dist/{compact-session-5HMX6KYT.js → compact-session-Q5IGNFPW.js} +9 -9
- package/dist/{compact-session-5HMX6KYT.js.map → compact-session-Q5IGNFPW.js.map} +1 -1
- package/dist/{cron-BvxrLW5J.d.cts → cron-Bh3aWgQ2.d.cts} +2 -2
- package/dist/{cron-DdKzwJqK.d.ts → cron-CCDxeeFZ.d.ts} +2 -2
- package/dist/cron.cjs +21 -20
- package/dist/cron.d.cts +4 -3
- package/dist/cron.d.ts +4 -3
- package/dist/cron.js +20 -19
- package/dist/eval.cjs +20 -19
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +19 -18
- package/dist/eval.js.map +1 -1
- package/dist/fs-session-store-CYNTEPJZ.cjs +20 -0
- package/dist/{fs-session-store-S2AXVJIX.cjs.map → fs-session-store-CYNTEPJZ.cjs.map} +1 -1
- package/dist/fs-session-store-MYQEVUFL.js +11 -0
- package/dist/{fs-session-store-6ZCCJX3K.js.map → fs-session-store-MYQEVUFL.js.map} +1 -1
- package/dist/{index-manager-HO456AVW.cjs → index-manager-2KH75BRW.cjs} +7 -7
- package/dist/{index-manager-HO456AVW.cjs.map → index-manager-2KH75BRW.cjs.map} +1 -1
- package/dist/{index-manager-QDH56FER.js → index-manager-NF2WRLOU.js} +6 -6
- package/dist/{index-manager-QDH56FER.js.map → index-manager-NF2WRLOU.js.map} +1 -1
- package/dist/index.cjs +93 -273
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -46
- package/dist/index.d.ts +13 -46
- package/dist/index.js +52 -236
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-75L3NCNL.js → inject-session-4ROYLZHY.js} +3 -3
- package/dist/{inject-session-75L3NCNL.js.map → inject-session-4ROYLZHY.js.map} +1 -1
- package/dist/{inject-session-WOH7TPDX.cjs → inject-session-AWKDCGHV.cjs} +4 -4
- package/dist/{inject-session-WOH7TPDX.cjs.map → inject-session-AWKDCGHV.cjs.map} +1 -1
- package/dist/internal/agent-loop/doom-loop-tracker.d.ts +3 -0
- package/dist/internal/agent-loop/prune-tool-results.d.ts +37 -0
- package/dist/internal/agent-loop/types.d.ts +6 -0
- package/dist/internal/auth/credential-store.d.ts +1 -1
- package/dist/internal/auth/types.d.ts +4 -0
- package/dist/internal/error-mappers/anthropic.d.ts +3 -0
- package/dist/internal/error-mappers/openai-compatible.d.ts +2 -3
- package/dist/internal/local-agent/local-agent-dispatch.d.ts +3 -1
- package/dist/internal/local-agent/send-queue.d.ts +31 -0
- package/dist/internal/mcp/client.d.ts +2 -0
- package/dist/internal/mcp/oauth-bearer.d.ts +2 -0
- package/dist/internal/memory/adapters/index.cjs +3 -3
- package/dist/internal/memory/adapters/index.js +2 -2
- package/dist/internal/memory/dreaming/phases.d.ts +15 -0
- package/dist/internal/memory/dreaming/run.d.ts +29 -0
- package/dist/internal/memory/sdk-memory-peer-loader.d.ts +2 -0
- package/dist/internal/memory/storage/index.cjs +51 -35
- package/dist/internal/memory/storage/index.d.cts +2 -0
- package/dist/internal/memory/storage/index.d.ts +2 -0
- package/dist/internal/memory/storage/index.js +4 -4
- package/dist/internal/persistence/cwd-mutex.d.cts +4 -2
- package/dist/internal/persistence/cwd-mutex.d.ts +4 -2
- package/dist/internal/persistence/index.cjs +4 -4
- package/dist/internal/persistence/index.js +2 -2
- package/dist/internal/persistence/sqlite-session-store.d.cts +25 -0
- package/dist/internal/persistence/sqlite-session-store.d.ts +25 -0
- package/dist/internal/providers/registry.d.ts +5 -1
- package/dist/internal/runtime/skills/binary-on-path.d.ts +1 -0
- package/dist/internal/runtime/skills/discover-skills.d.ts +2 -0
- package/dist/mcp-auth.cjs +25 -307
- package/dist/mcp-auth.cjs.map +1 -1
- package/dist/mcp-auth.js +5 -305
- package/dist/mcp-auth.js.map +1 -1
- package/dist/models.cjs +11 -11
- package/dist/models.js +4 -4
- package/dist/persistence.cjs +9 -4
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.d.cts +744 -40
- package/dist/persistence.d.ts +744 -40
- package/dist/persistence.js +3 -2
- package/dist/persistence.js.map +1 -1
- package/dist/providers.cjs +6 -6
- package/dist/providers.js +4 -4
- package/dist/sandbox/docker-sandbox.d.cts +58 -0
- package/dist/sandbox/docker-sandbox.d.ts +58 -0
- package/dist/sandbox/index.cjs +129 -1
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +1 -0
- package/dist/sandbox/index.d.ts +1 -0
- package/dist/sandbox/index.js +132 -5
- package/dist/sandbox/index.js.map +1 -1
- package/dist/{sdk-agent-4-dXI2GS.d.cts → sdk-agent-BA_6_wtc.d.cts} +57 -4
- package/dist/{sdk-agent-CTOJlWA_.d.ts → sdk-agent-CnwPODYH.d.ts} +57 -4
- package/dist/session-store-Dh07jr9N.d.cts +209 -0
- package/dist/session-store-Dh07jr9N.d.ts +209 -0
- package/dist/skills.cjs +4 -4
- package/dist/skills.js +1 -1
- package/dist/sqlite-session-store-BbcpKY1L.d.ts +64 -0
- package/dist/sqlite-session-store-TKXtT4ON.d.cts +64 -0
- package/dist/subagents-loader-KLWF4QPD.cjs +16 -0
- package/dist/{subagents-loader-TXOA5EJJ.cjs.map → subagents-loader-KLWF4QPD.cjs.map} +1 -1
- package/dist/subagents-loader-SXETS2F2.js +7 -0
- package/dist/{subagents-loader-Z744TAKD.js.map → subagents-loader-SXETS2F2.js.map} +1 -1
- package/dist/subagents-loader.cjs +2 -2
- package/dist/subagents-loader.d.cts +3 -2
- package/dist/subagents-loader.d.ts +3 -2
- package/dist/subagents-loader.js +1 -1
- package/dist/types/agent.d.ts +20 -1
- package/dist/types/budget-tracker.d.ts +6 -2
- package/dist/types/mcp.d.ts +14 -0
- package/dist/types/run.d.ts +42 -3
- package/dist/workflow.d.cts +1 -1
- package/dist/workflow.d.ts +1 -1
- package/docs/adr/mutation-testing-scope.md +66 -0
- package/docs/error-codes.md +48 -45
- package/docs/harness-capability-map.md +60 -6
- package/package.json +1 -1
- package/dist/chunk-2PRGRYEQ.js.map +0 -1
- package/dist/chunk-3FSBE4PS.js.map +0 -1
- package/dist/chunk-4UYHP6NF.cjs.map +0 -1
- package/dist/chunk-5A4UFBHW.cjs.map +0 -1
- package/dist/chunk-5HSMH2ZZ.js.map +0 -1
- package/dist/chunk-6CXRYPG7.cjs +0 -211
- package/dist/chunk-6CXRYPG7.cjs.map +0 -1
- package/dist/chunk-7WARNHWW.cjs.map +0 -1
- package/dist/chunk-JX4LB6XO.js.map +0 -1
- package/dist/chunk-KL7ZUMK3.cjs.map +0 -1
- package/dist/chunk-LO6LIUZ6.cjs +0 -18
- package/dist/chunk-MS3TQSXU.js.map +0 -1
- package/dist/chunk-MSEL5E5P.js +0 -204
- package/dist/chunk-MSEL5E5P.js.map +0 -1
- package/dist/chunk-NHOEXFZT.js.map +0 -1
- package/dist/chunk-NP362THY.cjs.map +0 -1
- package/dist/chunk-Q5EWJPRY.js +0 -18
- package/dist/chunk-Q5EWJPRY.js.map +0 -1
- package/dist/chunk-QISSETTG.cjs.map +0 -1
- package/dist/chunk-RN3XDZGS.js.map +0 -1
- package/dist/chunk-S46WJTDL.cjs.map +0 -1
- package/dist/chunk-WDVG5R2Q.cjs.map +0 -1
- package/dist/chunk-ZF2LDKQQ.cjs.map +0 -1
- package/dist/chunk-ZJAYFSVI.js.map +0 -1
- package/dist/fs-session-store-6ZCCJX3K.js +0 -11
- package/dist/fs-session-store-S2AXVJIX.cjs +0 -20
- package/dist/subagents-loader-TXOA5EJJ.cjs +0 -16
- package/dist/subagents-loader-Z744TAKD.js +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"index-manager-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index-manager-NF2WRLOU.js"}
|
package/dist/index.cjs
CHANGED
|
@@ -3,35 +3,37 @@
|
|
|
3
3
|
var chunk2XWAYCFM_cjs = require('./chunk-2XWAYCFM.cjs');
|
|
4
4
|
var chunkOBA6YK2R_cjs = require('./chunk-OBA6YK2R.cjs');
|
|
5
5
|
var chunkAIZ6WXSL_cjs = require('./chunk-AIZ6WXSL.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkCHKV2L2Y_cjs = require('./chunk-CHKV2L2Y.cjs');
|
|
7
7
|
var chunkR427EOZE_cjs = require('./chunk-R427EOZE.cjs');
|
|
8
8
|
require('./chunk-PDOXYXWX.cjs');
|
|
9
9
|
var chunkR35ZJAYT_cjs = require('./chunk-R35ZJAYT.cjs');
|
|
10
10
|
require('./chunk-SETHRLQS.cjs');
|
|
11
|
+
var chunkBNEUB52I_cjs = require('./chunk-BNEUB52I.cjs');
|
|
11
12
|
require('./chunk-VTYY7XL5.cjs');
|
|
12
|
-
var
|
|
13
|
-
var
|
|
13
|
+
var chunkKMFBNKCT_cjs = require('./chunk-KMFBNKCT.cjs');
|
|
14
|
+
var chunk64ECM3XM_cjs = require('./chunk-64ECM3XM.cjs');
|
|
14
15
|
var chunkL7JPXZ2C_cjs = require('./chunk-L7JPXZ2C.cjs');
|
|
15
|
-
require('./chunk-
|
|
16
|
+
require('./chunk-U7PRI3XM.cjs');
|
|
16
17
|
require('./chunk-BUUUWQMB.cjs');
|
|
17
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-NEH3BPFD.cjs');
|
|
18
19
|
require('./chunk-7YUPSBDV.cjs');
|
|
19
20
|
require('./chunk-BV2MWEMV.cjs');
|
|
20
|
-
require('./chunk-
|
|
21
|
+
require('./chunk-XE3CAY6Z.cjs');
|
|
21
22
|
require('./chunk-GHX4P3V2.cjs');
|
|
22
23
|
require('./chunk-RS7YQR4X.cjs');
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
require('./chunk-
|
|
24
|
+
var chunkVWYFGE27_cjs = require('./chunk-VWYFGE27.cjs');
|
|
25
|
+
var chunkFTXY4D44_cjs = require('./chunk-FTXY4D44.cjs');
|
|
26
|
+
var chunkDJKGDLYZ_cjs = require('./chunk-DJKGDLYZ.cjs');
|
|
27
|
+
require('./chunk-55LLQFHW.cjs');
|
|
27
28
|
require('./chunk-YJNYDJ2T.cjs');
|
|
28
|
-
require('./chunk-
|
|
29
|
+
require('./chunk-3F53FLQ7.cjs');
|
|
29
30
|
require('./chunk-QOGNZMHD.cjs');
|
|
30
31
|
var chunkMSW7LB2V_cjs = require('./chunk-MSW7LB2V.cjs');
|
|
31
32
|
require('./chunk-2ZPEDVLM.cjs');
|
|
32
33
|
require('./chunk-QG4SXZ2A.cjs');
|
|
33
34
|
require('./chunk-UDAKAE4Z.cjs');
|
|
34
35
|
require('./chunk-KRD3GQAA.cjs');
|
|
36
|
+
require('./chunk-XOU3CL7S.cjs');
|
|
35
37
|
require('./chunk-3HA7N2BB.cjs');
|
|
36
38
|
require('./chunk-MUUQ2WFJ.cjs');
|
|
37
39
|
var chunkAA27GEYS_cjs = require('./chunk-AA27GEYS.cjs');
|
|
@@ -39,7 +41,7 @@ require('./chunk-YSTXFWQE.cjs');
|
|
|
39
41
|
require('./chunk-FRITRLZQ.cjs');
|
|
40
42
|
require('./chunk-H7HD6RXO.cjs');
|
|
41
43
|
require('./chunk-NINIJCHU.cjs');
|
|
42
|
-
var
|
|
44
|
+
var chunk3UMPP553_cjs = require('./chunk-3UMPP553.cjs');
|
|
43
45
|
require('./chunk-SWALPLFQ.cjs');
|
|
44
46
|
require('./chunk-IJ7M6GOG.cjs');
|
|
45
47
|
require('./chunk-3KIUY67P.cjs');
|
|
@@ -51,21 +53,21 @@ require('./chunk-3WKWBYPO.cjs');
|
|
|
51
53
|
require('./chunk-A4RAL2ER.cjs');
|
|
52
54
|
require('./chunk-AT2PESXB.cjs');
|
|
53
55
|
require('./chunk-POBZXULR.cjs');
|
|
54
|
-
require('./chunk-
|
|
55
|
-
var
|
|
56
|
+
require('./chunk-MHUOVS5I.cjs');
|
|
57
|
+
var chunkU3DW3WDE_cjs = require('./chunk-U3DW3WDE.cjs');
|
|
56
58
|
var chunkBWYC7RZG_cjs = require('./chunk-BWYC7RZG.cjs');
|
|
57
|
-
|
|
58
|
-
require('./chunk-
|
|
59
|
+
require('./chunk-ZOFRNNZD.cjs');
|
|
60
|
+
require('./chunk-AUH2EVWY.cjs');
|
|
59
61
|
var chunkYQ3XC6C2_cjs = require('./chunk-YQ3XC6C2.cjs');
|
|
60
62
|
require('./chunk-6XQLTQB6.cjs');
|
|
61
63
|
var chunkKX5QXLBS_cjs = require('./chunk-KX5QXLBS.cjs');
|
|
62
|
-
require('./chunk-
|
|
64
|
+
require('./chunk-RTDVSHJR.cjs');
|
|
63
65
|
var chunk3EE6LVWT_cjs = require('./chunk-3EE6LVWT.cjs');
|
|
64
|
-
require('./chunk-
|
|
65
|
-
var
|
|
66
|
+
require('./chunk-SPEN7RJU.cjs');
|
|
67
|
+
var chunkP7QYG4RZ_cjs = require('./chunk-P7QYG4RZ.cjs');
|
|
66
68
|
require('./chunk-NVXXWAU7.cjs');
|
|
67
|
-
require('./chunk-
|
|
68
|
-
require('./chunk-
|
|
69
|
+
require('./chunk-A77UMVMD.cjs');
|
|
70
|
+
require('./chunk-5645PMVU.cjs');
|
|
69
71
|
require('./chunk-IOFMRS6T.cjs');
|
|
70
72
|
require('./chunk-EHD25JBZ.cjs');
|
|
71
73
|
var chunkCEGU5AVD_cjs = require('./chunk-CEGU5AVD.cjs');
|
|
@@ -79,8 +81,8 @@ var os = require('os');
|
|
|
79
81
|
// src/agent-factory.ts
|
|
80
82
|
function createAgentFactory(common) {
|
|
81
83
|
return {
|
|
82
|
-
forSession: (agentId, overrides) =>
|
|
83
|
-
getOrCreate: (agentId, overrides) =>
|
|
84
|
+
forSession: (agentId, overrides) => chunk64ECM3XM_cjs.Agent.create(mergeAgentOptions(common, overrides, agentId)),
|
|
85
|
+
getOrCreate: (agentId, overrides) => chunk64ECM3XM_cjs.Agent.getOrCreate(agentId, mergeAgentOptions(common, overrides, agentId))
|
|
84
86
|
};
|
|
85
87
|
}
|
|
86
88
|
function mergeAgentOptions(common, overrides, agentId) {
|
|
@@ -210,7 +212,7 @@ function gcOlderThanOneYear(now) {
|
|
|
210
212
|
}
|
|
211
213
|
async function charge(name, amountUsd) {
|
|
212
214
|
if (amountUsd <= 0) return;
|
|
213
|
-
await
|
|
215
|
+
await chunkU3DW3WDE_cjs.withCwdMutex(MUTEX_KEY, async () => {
|
|
214
216
|
const now = Date.now();
|
|
215
217
|
const list2 = state.logs.get(name) ?? [];
|
|
216
218
|
list2.push({ timestamp: now, amountUsd });
|
|
@@ -571,8 +573,8 @@ var Provider = class _Provider {
|
|
|
571
573
|
* `.plugins(Provider.builtins())` once, then pick a `provider/model` id. @public
|
|
572
574
|
*/
|
|
573
575
|
static builtins() {
|
|
574
|
-
|
|
575
|
-
return
|
|
576
|
+
chunkP7QYG4RZ_cjs.registerBuiltins();
|
|
577
|
+
return chunkP7QYG4RZ_cjs.listProviders().map((profile) => defineProvider(profile));
|
|
576
578
|
}
|
|
577
579
|
/**
|
|
578
580
|
* The builtin serving `modelId`, or `undefined` when none does.
|
|
@@ -601,7 +603,7 @@ async function resolveBody(skill) {
|
|
|
601
603
|
}
|
|
602
604
|
const source = skill.source;
|
|
603
605
|
const skillDir = path.dirname(source);
|
|
604
|
-
const body =
|
|
606
|
+
const body = chunk3UMPP553_cjs.stripSkillFrontmatter(await promises.readFile(source, "utf8"));
|
|
605
607
|
const instructions = body.replaceAll(SKILL_DIR_PLACEHOLDER, skillDir);
|
|
606
608
|
const references = await readReferences(skillDir);
|
|
607
609
|
return references === void 0 ? { instructions } : { instructions, references };
|
|
@@ -624,6 +626,14 @@ async function readReferences(skillDir) {
|
|
|
624
626
|
}
|
|
625
627
|
return Object.keys(refs).length > 0 ? refs : void 0;
|
|
626
628
|
}
|
|
629
|
+
function readNamed(skills, name) {
|
|
630
|
+
const skill = skills.find((s) => s.name === name);
|
|
631
|
+
if (skill === void 0) {
|
|
632
|
+
const available = skills.map((s) => s.name).join(", ");
|
|
633
|
+
return `Skill "${name}" not found. Available skills: ${available.length > 0 ? available : "(none)"}.`;
|
|
634
|
+
}
|
|
635
|
+
return renderSkill(skill);
|
|
636
|
+
}
|
|
627
637
|
var SkillReadInputSchema = zod.z.object({
|
|
628
638
|
name: zod.z.string().min(1, "skill_read: `name` is required.")
|
|
629
639
|
});
|
|
@@ -639,7 +649,9 @@ async function renderSkill(skill) {
|
|
|
639
649
|
}
|
|
640
650
|
return parts.join("\n");
|
|
641
651
|
}
|
|
642
|
-
function defineSkillReadTool(
|
|
652
|
+
function defineSkillReadTool(source) {
|
|
653
|
+
if (typeof source === "function") return lazySkillReadTool(source);
|
|
654
|
+
const skills = source;
|
|
643
655
|
const seen = /* @__PURE__ */ new Set();
|
|
644
656
|
for (const skill of skills) {
|
|
645
657
|
if (seen.has(skill.name)) {
|
|
@@ -660,12 +672,18 @@ function defineSkillReadTool(skills) {
|
|
|
660
672
|
// promise: parse and the not-found answer stay exactly as synchronous as they were.
|
|
661
673
|
handler: (input) => {
|
|
662
674
|
const { name } = SkillReadInputSchema.parse(input);
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
675
|
+
return readNamed(skills, name);
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
function lazySkillReadTool(source) {
|
|
680
|
+
const fixed = defineSkillReadTool([]);
|
|
681
|
+
return {
|
|
682
|
+
...fixed,
|
|
683
|
+
handler: async (input) => {
|
|
684
|
+
const { name } = SkillReadInputSchema.parse(input);
|
|
685
|
+
const skills = await source();
|
|
686
|
+
return readNamed(skills, name);
|
|
669
687
|
}
|
|
670
688
|
};
|
|
671
689
|
}
|
|
@@ -1025,208 +1043,6 @@ function foldLayers(entries, accumulatingKeys = []) {
|
|
|
1025
1043
|
return combined;
|
|
1026
1044
|
}
|
|
1027
1045
|
|
|
1028
|
-
// src/internal/memory/dreaming/phases.ts
|
|
1029
|
-
var DEFAULT_DEDUP_THRESHOLD = 0.95;
|
|
1030
|
-
var DEFAULT_CLUSTER_THRESHOLD = 0.75;
|
|
1031
|
-
var CONSOLIDATABLE_KINDS = /* @__PURE__ */ new Set(["project"]);
|
|
1032
|
-
var ATOMIC_KINDS = /* @__PURE__ */ new Set(["user", "feedback", "reference"]);
|
|
1033
|
-
function dedupPolicy(fact) {
|
|
1034
|
-
if (fact.kind === void 0) return "exact";
|
|
1035
|
-
if (ATOMIC_KINDS.has(fact.kind)) return "never";
|
|
1036
|
-
return CONSOLIDATABLE_KINDS.has(fact.kind) ? "similar" : "never";
|
|
1037
|
-
}
|
|
1038
|
-
function normalizeForExactMatch(text) {
|
|
1039
|
-
return text.trim().toLowerCase().replace(/\s+/g, " ").replace(/[.!?]+$/, "");
|
|
1040
|
-
}
|
|
1041
|
-
async function lightPhase(facts, embedding, threshold = DEFAULT_DEDUP_THRESHOLD) {
|
|
1042
|
-
if (facts.length <= 1) return { kept: [...facts], duplicatesRemoved: 0 };
|
|
1043
|
-
const never = facts.filter((f) => dedupPolicy(f) === "never");
|
|
1044
|
-
const exact = facts.filter((f) => dedupPolicy(f) === "exact");
|
|
1045
|
-
const similar = facts.filter((f) => dedupPolicy(f) === "similar");
|
|
1046
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1047
|
-
const exactKept = [];
|
|
1048
|
-
let removed = 0;
|
|
1049
|
-
for (const f of exact) {
|
|
1050
|
-
const key = normalizeForExactMatch(f.text);
|
|
1051
|
-
if (seen.has(key)) {
|
|
1052
|
-
removed += 1;
|
|
1053
|
-
continue;
|
|
1054
|
-
}
|
|
1055
|
-
seen.add(key);
|
|
1056
|
-
exactKept.push(f);
|
|
1057
|
-
}
|
|
1058
|
-
const sim = similar.length > 1 ? await dedupCandidates(similar, embedding, threshold) : { kept: [...similar], duplicatesRemoved: 0 };
|
|
1059
|
-
return {
|
|
1060
|
-
kept: [...never, ...exactKept, ...sim.kept],
|
|
1061
|
-
duplicatesRemoved: removed + sim.duplicatesRemoved
|
|
1062
|
-
};
|
|
1063
|
-
}
|
|
1064
|
-
async function dedupCandidates(facts, embedding, threshold) {
|
|
1065
|
-
if (facts.length <= 1) return { kept: [...facts], duplicatesRemoved: 0 };
|
|
1066
|
-
const vectors = await embedding.embed(facts.map((f) => f.text));
|
|
1067
|
-
const keptIdx = [];
|
|
1068
|
-
const keptVecs = [];
|
|
1069
|
-
for (let i = 0; i < facts.length; i++) {
|
|
1070
|
-
const vec = vectors[i] ?? [];
|
|
1071
|
-
const isDup = keptVecs.some((kept2) => cosineSimilarity(vec, kept2) >= threshold);
|
|
1072
|
-
if (isDup) continue;
|
|
1073
|
-
keptIdx.push(i);
|
|
1074
|
-
keptVecs.push(vec);
|
|
1075
|
-
}
|
|
1076
|
-
const kept = keptIdx.map((i) => facts[i]);
|
|
1077
|
-
return { kept, duplicatesRemoved: facts.length - kept.length };
|
|
1078
|
-
}
|
|
1079
|
-
var DEFAULT_MAX_FACTS_PER_SWEEP = 500;
|
|
1080
|
-
async function remPhase(facts, embedding, threshold = DEFAULT_CLUSTER_THRESHOLD, maxFactsPerSweep = DEFAULT_MAX_FACTS_PER_SWEEP) {
|
|
1081
|
-
if (facts.length === 0) return { clusters: [], factsLeftOut: 0 };
|
|
1082
|
-
const capped = facts.length > maxFactsPerSweep ? facts.slice(0, maxFactsPerSweep) : facts;
|
|
1083
|
-
const vectors = await embedding.embed(capped.map((f) => f.text));
|
|
1084
|
-
const clusterOfIdx = unionFindByPairs(vectors, threshold);
|
|
1085
|
-
const groups = bucketFactsByClusterRoot(capped, clusterOfIdx);
|
|
1086
|
-
return {
|
|
1087
|
-
clusters: [...groups.values()].map(buildClusterFromMembers),
|
|
1088
|
-
factsLeftOut: facts.length - capped.length
|
|
1089
|
-
};
|
|
1090
|
-
}
|
|
1091
|
-
function unionFindByPairs(vectors, threshold) {
|
|
1092
|
-
const clusterOfIdx = vectors.map((_, i) => i);
|
|
1093
|
-
for (let i = 0; i < vectors.length; i++) {
|
|
1094
|
-
for (let j = i + 1; j < vectors.length; j++) {
|
|
1095
|
-
if (cosineSimilarity(vectors[i] ?? [], vectors[j] ?? []) >= threshold) {
|
|
1096
|
-
unifyClusters(clusterOfIdx, i, j);
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
return clusterOfIdx;
|
|
1101
|
-
}
|
|
1102
|
-
function bucketFactsByClusterRoot(facts, clusterOfIdx) {
|
|
1103
|
-
const groups = /* @__PURE__ */ new Map();
|
|
1104
|
-
for (let i = 0; i < facts.length; i++) {
|
|
1105
|
-
const root = findRoot(clusterOfIdx, i);
|
|
1106
|
-
const list2 = groups.get(root) ?? [];
|
|
1107
|
-
list2.push(facts[i]);
|
|
1108
|
-
groups.set(root, list2);
|
|
1109
|
-
}
|
|
1110
|
-
return groups;
|
|
1111
|
-
}
|
|
1112
|
-
function buildClusterFromMembers(members) {
|
|
1113
|
-
const sorted = [...members].sort((a, b) => b.text.length - a.text.length);
|
|
1114
|
-
return { representativeText: sorted[0]?.text ?? "", members };
|
|
1115
|
-
}
|
|
1116
|
-
function deepPhase(clusters, timestampMs) {
|
|
1117
|
-
if (clusters.length === 0) return "";
|
|
1118
|
-
const isoStamp = new Date(timestampMs).toISOString();
|
|
1119
|
-
const lines = [`# Dreamed ${isoStamp}`, ""];
|
|
1120
|
-
for (let i = 0; i < clusters.length; i++) {
|
|
1121
|
-
const c = clusters[i];
|
|
1122
|
-
if (c === void 0) continue;
|
|
1123
|
-
lines.push(`## Cluster ${i + 1}: ${c.representativeText}`);
|
|
1124
|
-
lines.push("");
|
|
1125
|
-
for (const member of c.members) lines.push(`- ${member.text}`);
|
|
1126
|
-
lines.push("");
|
|
1127
|
-
}
|
|
1128
|
-
return `${lines.join("\n")}
|
|
1129
|
-
`;
|
|
1130
|
-
}
|
|
1131
|
-
function cosineSimilarity(a, b) {
|
|
1132
|
-
if (a.length === 0 || b.length === 0 || a.length !== b.length) return 0;
|
|
1133
|
-
let dot = 0;
|
|
1134
|
-
let aNorm = 0;
|
|
1135
|
-
let bNorm = 0;
|
|
1136
|
-
for (let i = 0; i < a.length; i++) {
|
|
1137
|
-
const ai = a[i] ?? 0;
|
|
1138
|
-
const bi = b[i] ?? 0;
|
|
1139
|
-
dot += ai * bi;
|
|
1140
|
-
aNorm += ai * ai;
|
|
1141
|
-
bNorm += bi * bi;
|
|
1142
|
-
}
|
|
1143
|
-
const denom = Math.sqrt(aNorm) * Math.sqrt(bNorm);
|
|
1144
|
-
return denom === 0 ? 0 : dot / denom;
|
|
1145
|
-
}
|
|
1146
|
-
function findRoot(parents, i) {
|
|
1147
|
-
let root = i;
|
|
1148
|
-
while (parents[root] !== root) {
|
|
1149
|
-
const next = parents[root] ?? root;
|
|
1150
|
-
if (next === root) break;
|
|
1151
|
-
root = next;
|
|
1152
|
-
}
|
|
1153
|
-
parents[i] = root;
|
|
1154
|
-
return root;
|
|
1155
|
-
}
|
|
1156
|
-
function unifyClusters(parents, a, b) {
|
|
1157
|
-
const rootA = findRoot(parents, a);
|
|
1158
|
-
const rootB = findRoot(parents, b);
|
|
1159
|
-
if (rootA !== rootB) parents[rootB] = rootA;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
// src/internal/memory/dreaming/run.ts
|
|
1163
|
-
function runDreamingSweep(options) {
|
|
1164
|
-
return chunkZF2LDKQQ_cjs.withCwdMutex(`dream:${options.cwd}`, () => runInner(options));
|
|
1165
|
-
}
|
|
1166
|
-
async function runInner(options) {
|
|
1167
|
-
const now = options.now ?? Date.now;
|
|
1168
|
-
const timestampMs = now();
|
|
1169
|
-
try {
|
|
1170
|
-
const root = options.memoryRoot ?? chunkSDZ4XDWS_cjs.resolveMemoryRoot(options.cwd);
|
|
1171
|
-
const facts = await chunkSDZ4XDWS_cjs.readFactsFromMarkdown(
|
|
1172
|
-
options.cwd,
|
|
1173
|
-
options.memoryRoot ? { directory: options.memoryRoot } : void 0
|
|
1174
|
-
);
|
|
1175
|
-
if (facts.length === 0) {
|
|
1176
|
-
return emptyResult("skipped");
|
|
1177
|
-
}
|
|
1178
|
-
const dedup = await lightPhase(facts, options.embedding, options.dedupThreshold);
|
|
1179
|
-
const rem = await remPhase(dedup.kept, options.embedding, options.clusterThreshold);
|
|
1180
|
-
const notesWritten = await writeConsolidatedNotes(root, rem.clusters, timestampMs);
|
|
1181
|
-
const result = {
|
|
1182
|
-
status: "ok",
|
|
1183
|
-
factsBefore: facts.length,
|
|
1184
|
-
factsAfter: dedup.kept.length,
|
|
1185
|
-
duplicatesRemoved: dedup.duplicatesRemoved,
|
|
1186
|
-
clustersCreated: rem.clusters.length,
|
|
1187
|
-
notesWritten,
|
|
1188
|
-
diaryEntryHash: void 0,
|
|
1189
|
-
factsLeftOut: rem.factsLeftOut
|
|
1190
|
-
};
|
|
1191
|
-
await chunk6CXRYPG7_cjs.appendDiaryEntry(root, {
|
|
1192
|
-
timestampMs,
|
|
1193
|
-
factsBefore: result.factsBefore,
|
|
1194
|
-
factsAfter: result.factsAfter,
|
|
1195
|
-
duplicatesRemoved: result.duplicatesRemoved,
|
|
1196
|
-
clustersCreated: result.clustersCreated,
|
|
1197
|
-
notesWritten: result.notesWritten
|
|
1198
|
-
});
|
|
1199
|
-
return result;
|
|
1200
|
-
} catch (cause) {
|
|
1201
|
-
const message = cause instanceof Error ? cause.message : String(cause);
|
|
1202
|
-
chunkRNXXYF22_cjs.diag(`[theokit-sdk] dreaming sweep failed: ${message}
|
|
1203
|
-
`);
|
|
1204
|
-
return emptyResult("error");
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
async function writeConsolidatedNotes(root, clusters, timestampMs) {
|
|
1208
|
-
if (clusters.length === 0) return 0;
|
|
1209
|
-
const notesDir = path.join(root, "notes");
|
|
1210
|
-
await promises.mkdir(notesDir, { recursive: true });
|
|
1211
|
-
const isoSlug = new Date(timestampMs).toISOString().replace(/[^\dT]/g, "-");
|
|
1212
|
-
const file = path.join(notesDir, `dreamed-${isoSlug}.md`);
|
|
1213
|
-
const body = deepPhase(clusters, timestampMs);
|
|
1214
|
-
await chunkZOFRNNZD_cjs.replaceFileAtomic(file, body);
|
|
1215
|
-
return 1;
|
|
1216
|
-
}
|
|
1217
|
-
function emptyResult(status) {
|
|
1218
|
-
const result = {
|
|
1219
|
-
status,
|
|
1220
|
-
factsBefore: 0,
|
|
1221
|
-
factsAfter: 0,
|
|
1222
|
-
duplicatesRemoved: 0,
|
|
1223
|
-
clustersCreated: 0,
|
|
1224
|
-
notesWritten: 0,
|
|
1225
|
-
diaryEntryHash: void 0
|
|
1226
|
-
};
|
|
1227
|
-
return status === "skipped" ? { ...result, factsLeftOut: 0 } : result;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
1046
|
// src/internal/memory/sdk-memory-peer-loader.ts
|
|
1231
1047
|
var cachedAttempt;
|
|
1232
1048
|
async function loadPeer() {
|
|
@@ -1283,8 +1099,8 @@ var Memory = {
|
|
|
1283
1099
|
openArgs.embedding = await resolveEmbedding(opts.embedding, peer.MEMORY_EMBEDDING_ADAPTERS);
|
|
1284
1100
|
return await peer.IndexManager.open(openArgs);
|
|
1285
1101
|
}
|
|
1286
|
-
const { IndexManager } = await import('./index-manager-
|
|
1287
|
-
openArgs.embedding = await resolveEmbedding(opts.embedding,
|
|
1102
|
+
const { IndexManager } = await import('./index-manager-2KH75BRW.cjs');
|
|
1103
|
+
openArgs.embedding = await resolveEmbedding(opts.embedding, chunk64ECM3XM_cjs.MEMORY_EMBEDDING_ADAPTERS);
|
|
1288
1104
|
return await IndexManager.open(openArgs);
|
|
1289
1105
|
},
|
|
1290
1106
|
/**
|
|
@@ -1295,14 +1111,14 @@ var Memory = {
|
|
|
1295
1111
|
*/
|
|
1296
1112
|
async runDreamingSweep(opts) {
|
|
1297
1113
|
const peer = await tryLoadSdkMemoryPeer();
|
|
1298
|
-
const catalog = peer !== null ? peer.MEMORY_EMBEDDING_ADAPTERS :
|
|
1114
|
+
const catalog = peer !== null ? peer.MEMORY_EMBEDDING_ADAPTERS : chunk64ECM3XM_cjs.MEMORY_EMBEDDING_ADAPTERS;
|
|
1299
1115
|
const sweepArgs = await buildDreamingSweepArgs(opts, catalog);
|
|
1300
1116
|
const result = peer !== null ? (
|
|
1301
1117
|
// biome-ignore lint/suspicious/noExplicitAny: peer is dynamically loaded — structural compat ensured by sdk-memory
|
|
1302
1118
|
await peer.runDreamingSweep(sweepArgs)
|
|
1303
1119
|
) : (
|
|
1304
1120
|
// biome-ignore lint/suspicious/noExplicitAny: legacy path accepts the same shape
|
|
1305
|
-
await runDreamingSweep(sweepArgs)
|
|
1121
|
+
await chunkCHKV2L2Y_cjs.runDreamingSweep(sweepArgs)
|
|
1306
1122
|
);
|
|
1307
1123
|
return toDreamingSweepResult(result);
|
|
1308
1124
|
}
|
|
@@ -1329,7 +1145,7 @@ async function buildDreamingSweepArgs(opts, catalog) {
|
|
|
1329
1145
|
const runtime = await resolveEmbedding(opts.embedding, catalog);
|
|
1330
1146
|
return {
|
|
1331
1147
|
cwd: opts.cwd,
|
|
1332
|
-
memoryRoot:
|
|
1148
|
+
memoryRoot: chunkVWYFGE27_cjs.resolveMemoryRoot(opts.cwd, { directory: opts.directory }),
|
|
1333
1149
|
embedding: runtime,
|
|
1334
1150
|
...opts.dedupThreshold !== void 0 ? { dedupThreshold: opts.dedupThreshold } : {},
|
|
1335
1151
|
...opts.clusterThreshold !== void 0 ? { clusterThreshold: opts.clusterThreshold } : {}
|
|
@@ -1369,7 +1185,7 @@ async function migrateSqliteToLance2(options) {
|
|
|
1369
1185
|
if (peer !== null) {
|
|
1370
1186
|
return peer.migrateSqliteToLance(options);
|
|
1371
1187
|
}
|
|
1372
|
-
return
|
|
1188
|
+
return chunkCHKV2L2Y_cjs.migrateSqliteToLance(options);
|
|
1373
1189
|
}
|
|
1374
1190
|
|
|
1375
1191
|
// src/permission-engine.ts
|
|
@@ -1906,8 +1722,8 @@ function guardSessionDestruction(sessionId, live) {
|
|
|
1906
1722
|
// src/session-messages.ts
|
|
1907
1723
|
async function readSessionMessages2(options) {
|
|
1908
1724
|
const cwd = options.cwd ?? process.cwd();
|
|
1909
|
-
const baseDir =
|
|
1910
|
-
return chunkMSW7LB2V_cjs.readSessionMessages(new
|
|
1725
|
+
const baseDir = chunk64ECM3XM_cjs.resolveSessionDir({ sessionDir: options.sessionDir });
|
|
1726
|
+
return chunkMSW7LB2V_cjs.readSessionMessages(new chunkFTXY4D44_cjs.FsSessionStore({ baseDir, cwd }), options.sessionId);
|
|
1911
1727
|
}
|
|
1912
1728
|
|
|
1913
1729
|
// src/session-scope.ts
|
|
@@ -1923,7 +1739,7 @@ function isBuiltAgent(m) {
|
|
|
1923
1739
|
return typeof m.send === "function";
|
|
1924
1740
|
}
|
|
1925
1741
|
async function materialize(def, index) {
|
|
1926
|
-
const { Agent: Agent2 } = await import('./agent-
|
|
1742
|
+
const { Agent: Agent2 } = await import('./agent-VI2HITPT.cjs');
|
|
1927
1743
|
return Agent2.create({
|
|
1928
1744
|
// `AgentDefinition.model` admits the sentinel `'inherit'`, which is not a model id. Inheriting
|
|
1929
1745
|
// here means "declare nothing and let the default apply" — forwarding the literal would create
|
|
@@ -2065,7 +1881,7 @@ var FIXTURE_USER = {
|
|
|
2065
1881
|
};
|
|
2066
1882
|
var FIXTURE_MODELS = [
|
|
2067
1883
|
{
|
|
2068
|
-
id:
|
|
1884
|
+
id: chunk64ECM3XM_cjs.DEFAULT_AGENTIC_MODEL_ID,
|
|
2069
1885
|
name: "Gemini 2.0 Flash",
|
|
2070
1886
|
displayName: "Gemini 2.0 Flash",
|
|
2071
1887
|
parameters: [
|
|
@@ -2141,7 +1957,7 @@ async function listLocalModelsViaOpenAiCompat(baseUrl) {
|
|
|
2141
1957
|
try {
|
|
2142
1958
|
response = await fetch(url, { method: "GET" });
|
|
2143
1959
|
} catch (fetchErr) {
|
|
2144
|
-
const mapped =
|
|
1960
|
+
const mapped = chunkDJKGDLYZ_cjs.mapOllamaTransportError({
|
|
2145
1961
|
providerId: "ollama",
|
|
2146
1962
|
cause: fetchErr,
|
|
2147
1963
|
endpoint: "/v1/models"
|
|
@@ -2153,8 +1969,8 @@ async function listLocalModelsViaOpenAiCompat(baseUrl) {
|
|
|
2153
1969
|
);
|
|
2154
1970
|
}
|
|
2155
1971
|
if (!response.ok) {
|
|
2156
|
-
const body = await
|
|
2157
|
-
const mapped =
|
|
1972
|
+
const body = await chunkDJKGDLYZ_cjs.readErrorResponseBody(response);
|
|
1973
|
+
const mapped = chunkDJKGDLYZ_cjs.mapOllamaHttpError({
|
|
2158
1974
|
providerId: "ollama",
|
|
2159
1975
|
status: response.status,
|
|
2160
1976
|
body,
|
|
@@ -2217,9 +2033,9 @@ var Theokit = class {
|
|
|
2217
2033
|
});
|
|
2218
2034
|
},
|
|
2219
2035
|
capabilities: (providerOrModelId) => {
|
|
2220
|
-
|
|
2036
|
+
chunkP7QYG4RZ_cjs.registerBuiltins();
|
|
2221
2037
|
const providerId = providerOrModelId.includes("/") ? providerOrModelId.split("/")[0] ?? providerOrModelId : providerOrModelId;
|
|
2222
|
-
return
|
|
2038
|
+
return chunkP7QYG4RZ_cjs.getCatalogCapabilities(providerId);
|
|
2223
2039
|
}
|
|
2224
2040
|
};
|
|
2225
2041
|
/**
|
|
@@ -2258,8 +2074,8 @@ var Theokit = class {
|
|
|
2258
2074
|
*/
|
|
2259
2075
|
static inspect = {
|
|
2260
2076
|
builtinProviders: () => {
|
|
2261
|
-
|
|
2262
|
-
return
|
|
2077
|
+
chunkP7QYG4RZ_cjs.registerBuiltins();
|
|
2078
|
+
return chunkP7QYG4RZ_cjs.listProviders().map((p) => ({
|
|
2263
2079
|
name: p.name,
|
|
2264
2080
|
apiMode: p.apiMode,
|
|
2265
2081
|
authType: p.authType,
|
|
@@ -2268,7 +2084,7 @@ var Theokit = class {
|
|
|
2268
2084
|
envVars: p.envVars
|
|
2269
2085
|
}));
|
|
2270
2086
|
},
|
|
2271
|
-
embeddingAdapters: () => Object.entries(
|
|
2087
|
+
embeddingAdapters: () => Object.entries(chunk64ECM3XM_cjs.MEMORY_EMBEDDING_ADAPTERS).map(([id, adapter]) => ({
|
|
2272
2088
|
id,
|
|
2273
2089
|
transport: adapter.transport,
|
|
2274
2090
|
defaultModel: adapter.defaultModel
|
|
@@ -2285,9 +2101,9 @@ var Theokit = class {
|
|
|
2285
2101
|
// and may be promoted onto Theokit once the agent.ts cycle is broken.
|
|
2286
2102
|
};
|
|
2287
2103
|
async function maybeListLocalModels(providerName) {
|
|
2288
|
-
|
|
2289
|
-
await
|
|
2290
|
-
const profile =
|
|
2104
|
+
chunkP7QYG4RZ_cjs.registerBuiltins();
|
|
2105
|
+
await chunkDJKGDLYZ_cjs.discoverProviderPlugins();
|
|
2106
|
+
const profile = chunkP7QYG4RZ_cjs.getProviderProfile(providerName);
|
|
2291
2107
|
if (profile === void 0) return void 0;
|
|
2292
2108
|
if (profile.authType !== "none") return void 0;
|
|
2293
2109
|
const baseUrl = resolveLocalProviderBaseUrl(profile.name, profile.baseUrl);
|
|
@@ -2304,13 +2120,13 @@ async function executeCatalogRequest(request) {
|
|
|
2304
2120
|
if (apiKey === void 0) {
|
|
2305
2121
|
throw new chunkCEGU5AVD_cjs.AuthenticationError("Missing API key", { code: "missing_api_key" });
|
|
2306
2122
|
}
|
|
2307
|
-
if (
|
|
2123
|
+
if (chunkDJKGDLYZ_cjs.shouldUseFixtureMode(apiKey)) {
|
|
2308
2124
|
return request.fixture;
|
|
2309
2125
|
}
|
|
2310
|
-
if (!
|
|
2126
|
+
if (!chunkDJKGDLYZ_cjs.isFixtureApiKey(apiKey) && process.env.THEOKIT_API_BASE_URL === void 0) {
|
|
2311
2127
|
throw new chunkCEGU5AVD_cjs.AuthenticationError("Invalid API key", { code: "authentication_error" });
|
|
2312
2128
|
}
|
|
2313
|
-
return
|
|
2129
|
+
return chunkDJKGDLYZ_cjs.httpRequest(request.path, { apiKey });
|
|
2314
2130
|
}
|
|
2315
2131
|
|
|
2316
2132
|
// src/tool-blast-radius.ts
|
|
@@ -2485,45 +2301,49 @@ Object.defineProperty(exports, "fn", {
|
|
|
2485
2301
|
enumerable: true,
|
|
2486
2302
|
get: function () { return chunkR35ZJAYT_cjs.fn; }
|
|
2487
2303
|
});
|
|
2304
|
+
Object.defineProperty(exports, "SqliteSessionStore", {
|
|
2305
|
+
enumerable: true,
|
|
2306
|
+
get: function () { return chunkBNEUB52I_cjs.SqliteSessionStore; }
|
|
2307
|
+
});
|
|
2488
2308
|
Object.defineProperty(exports, "Cron", {
|
|
2489
2309
|
enumerable: true,
|
|
2490
|
-
get: function () { return
|
|
2310
|
+
get: function () { return chunkKMFBNKCT_cjs.Cron; }
|
|
2491
2311
|
});
|
|
2492
2312
|
Object.defineProperty(exports, "Agent", {
|
|
2493
2313
|
enumerable: true,
|
|
2494
|
-
get: function () { return
|
|
2314
|
+
get: function () { return chunk64ECM3XM_cjs.Agent; }
|
|
2495
2315
|
});
|
|
2496
2316
|
Object.defineProperty(exports, "AgentBuilder", {
|
|
2497
2317
|
enumerable: true,
|
|
2498
|
-
get: function () { return
|
|
2318
|
+
get: function () { return chunk64ECM3XM_cjs.AgentBuilder; }
|
|
2499
2319
|
});
|
|
2500
2320
|
Object.defineProperty(exports, "Tool", {
|
|
2501
2321
|
enumerable: true,
|
|
2502
|
-
get: function () { return
|
|
2322
|
+
get: function () { return chunk64ECM3XM_cjs.Tool; }
|
|
2503
2323
|
});
|
|
2504
2324
|
Object.defineProperty(exports, "ToolError", {
|
|
2505
2325
|
enumerable: true,
|
|
2506
|
-
get: function () { return
|
|
2326
|
+
get: function () { return chunk64ECM3XM_cjs.ToolError; }
|
|
2507
2327
|
});
|
|
2508
2328
|
Object.defineProperty(exports, "UsageAccumulator", {
|
|
2509
2329
|
enumerable: true,
|
|
2510
|
-
get: function () { return
|
|
2330
|
+
get: function () { return chunk64ECM3XM_cjs.UsageAccumulator; }
|
|
2511
2331
|
});
|
|
2512
2332
|
Object.defineProperty(exports, "computeCost", {
|
|
2513
2333
|
enumerable: true,
|
|
2514
|
-
get: function () { return
|
|
2334
|
+
get: function () { return chunk64ECM3XM_cjs.computeCost; }
|
|
2515
2335
|
});
|
|
2516
2336
|
Object.defineProperty(exports, "getPricingEntry", {
|
|
2517
2337
|
enumerable: true,
|
|
2518
|
-
get: function () { return
|
|
2338
|
+
get: function () { return chunk64ECM3XM_cjs.getPricingEntry; }
|
|
2519
2339
|
});
|
|
2520
2340
|
Object.defineProperty(exports, "managedSettingsPathFor", {
|
|
2521
2341
|
enumerable: true,
|
|
2522
|
-
get: function () { return
|
|
2342
|
+
get: function () { return chunk64ECM3XM_cjs.managedSettingsPathFor; }
|
|
2523
2343
|
});
|
|
2524
2344
|
Object.defineProperty(exports, "readManagedSettings", {
|
|
2525
2345
|
enumerable: true,
|
|
2526
|
-
get: function () { return
|
|
2346
|
+
get: function () { return chunk64ECM3XM_cjs.readManagedSettings; }
|
|
2527
2347
|
});
|
|
2528
2348
|
Object.defineProperty(exports, "emitRunEvent", {
|
|
2529
2349
|
enumerable: true,
|
|
@@ -2531,15 +2351,15 @@ Object.defineProperty(exports, "emitRunEvent", {
|
|
|
2531
2351
|
});
|
|
2532
2352
|
Object.defineProperty(exports, "inferApiMode", {
|
|
2533
2353
|
enumerable: true,
|
|
2534
|
-
get: function () { return
|
|
2354
|
+
get: function () { return chunkDJKGDLYZ_cjs.inferApiMode; }
|
|
2535
2355
|
});
|
|
2536
2356
|
Object.defineProperty(exports, "normalizeUsage", {
|
|
2537
2357
|
enumerable: true,
|
|
2538
|
-
get: function () { return
|
|
2358
|
+
get: function () { return chunkDJKGDLYZ_cjs.normalizeUsage; }
|
|
2539
2359
|
});
|
|
2540
2360
|
Object.defineProperty(exports, "withCwdMutex", {
|
|
2541
2361
|
enumerable: true,
|
|
2542
|
-
get: function () { return
|
|
2362
|
+
get: function () { return chunkU3DW3WDE_cjs.withCwdMutex; }
|
|
2543
2363
|
});
|
|
2544
2364
|
Object.defineProperty(exports, "TASK_RESERVED_PREFIXES", {
|
|
2545
2365
|
enumerable: true,
|