@theokit/sdk 5.14.0 → 5.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/{agent-T34LCGQM.js → agent-66U5QCPF.js} +18 -17
- package/dist/{agent-T34LCGQM.js.map → agent-66U5QCPF.js.map} +1 -1
- package/dist/{agent-DExqjqYy.d.cts → agent-BL4kxgwq.d.cts} +30 -214
- package/dist/{agent-Dfw3VsIX.d.ts → agent-ByDx7K30.d.ts} +30 -214
- package/dist/{agent-TL4K7BTG.cjs → agent-CB27KF6O.cjs} +19 -18
- package/dist/{agent-TL4K7BTG.cjs.map → agent-CB27KF6O.cjs.map} +1 -1
- package/dist/agent.d.ts +2 -3
- 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-ZOL3L4EH.js → chunk-26GI3OYA.js} +118 -21
- package/dist/chunk-26GI3OYA.js.map +1 -0
- package/dist/{chunk-2WY2OFSC.cjs → chunk-26UQG242.cjs} +616 -318
- package/dist/chunk-26UQG242.cjs.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-SNVYOX46.cjs → chunk-3E3VSMB6.cjs} +160 -63
- package/dist/chunk-3E3VSMB6.cjs.map +1 -0
- package/dist/{chunk-NP362THY.cjs → chunk-3F53FLQ7.cjs} +5 -7
- package/dist/chunk-3F53FLQ7.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-ZJAYFSVI.js → chunk-7ACS6P5Z.js} +5 -7
- package/dist/chunk-7ACS6P5Z.js.map +1 -0
- 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-NVQSBRG6.js → chunk-CBBT42VX.js} +3 -3
- package/dist/{chunk-NVQSBRG6.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-LXG6VL6R.cjs → chunk-FBIDOOJM.cjs} +3 -3
- package/dist/{chunk-LXG6VL6R.cjs.map → chunk-FBIDOOJM.cjs.map} +1 -1
- 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-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-NAVUTK6X.js → chunk-O2RCS3SJ.js} +3 -3
- package/dist/{chunk-NAVUTK6X.js.map → chunk-O2RCS3SJ.js.map} +1 -1
- package/dist/{chunk-4TEGFMSP.cjs → chunk-P7QYG4RZ.cjs} +23 -15
- 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-AB4OPJLD.js → chunk-RGVMJU57.js} +3 -3
- package/dist/{chunk-AB4OPJLD.js.map → chunk-RGVMJU57.js.map} +1 -1
- package/dist/{chunk-4KBI37F3.cjs → chunk-RTDVSHJR.cjs} +5 -5
- package/dist/{chunk-4KBI37F3.cjs.map → chunk-RTDVSHJR.cjs.map} +1 -1
- package/dist/{chunk-CJN5CEI3.js → chunk-RZL2W4C3.js} +23 -15
- package/dist/chunk-RZL2W4C3.js.map +1 -0
- package/dist/chunk-SPEN7RJU.cjs +18 -0
- package/dist/{chunk-R5UQL2R5.cjs.map → chunk-SPEN7RJU.cjs.map} +1 -1
- package/dist/{chunk-BZK5QL3N.cjs → chunk-TRPRTZEH.cjs} +4 -4
- package/dist/{chunk-BZK5QL3N.cjs.map → chunk-TRPRTZEH.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-H7G65PNI.js → chunk-VCQ37TC5.js} +3 -3
- package/dist/{chunk-H7G65PNI.js.map → chunk-VCQ37TC5.js.map} +1 -1
- package/dist/{chunk-3ONIVO2I.js → chunk-VNRNZ3WI.js} +3 -3
- package/dist/{chunk-3ONIVO2I.js.map → chunk-VNRNZ3WI.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-ULEK4OM4.js → chunk-YKNBTHMD.js} +3 -3
- package/dist/{chunk-ULEK4OM4.js.map → chunk-YKNBTHMD.js.map} +1 -1
- package/dist/{chunk-GARVAUCU.js → chunk-ZQWRUJHE.js} +534 -236
- package/dist/chunk-ZQWRUJHE.js.map +1 -0
- package/dist/{compact-session-D2MQDB6G.cjs → compact-session-CHBJOYWP.cjs} +16 -16
- package/dist/{compact-session-D2MQDB6G.cjs.map → compact-session-CHBJOYWP.cjs.map} +1 -1
- package/dist/{compact-session-N2PPHQO6.js → compact-session-F3J3FMEU.js} +7 -7
- package/dist/{compact-session-N2PPHQO6.js.map → compact-session-F3J3FMEU.js.map} +1 -1
- package/dist/{cron-CK2v0VWA.d.cts → cron-B7KH9sHW.d.cts} +2 -2
- package/dist/{cron-BubDpFJG.d.ts → cron-FEO7UAQF.d.ts} +2 -2
- package/dist/cron.cjs +18 -17
- package/dist/cron.d.cts +4 -3
- package/dist/cron.d.ts +4 -3
- package/dist/cron.js +17 -16
- package/dist/eval.cjs +17 -16
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +16 -15
- 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 +66 -262
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -46
- package/dist/index.d.ts +10 -46
- package/dist/index.js +27 -227
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-J26SHHIO.js → inject-session-LC2TROHM.js} +3 -3
- package/dist/{inject-session-J26SHHIO.js.map → inject-session-LC2TROHM.js.map} +1 -1
- package/dist/{inject-session-3ICZIJ2N.cjs → inject-session-T4RXANG3.cjs} +4 -4
- package/dist/{inject-session-3ICZIJ2N.cjs.map → inject-session-T4RXANG3.cjs.map} +1 -1
- package/dist/internal/agent-loop/doom-loop-tracker.d.ts +3 -0
- package/dist/internal/agent-loop/types.d.ts +6 -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/llm/hermes-tool-extract.d.ts +2 -0
- 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/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 +9 -9
- package/dist/models.js +2 -2
- 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 +4 -4
- package/dist/providers.js +2 -2
- 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-DwzHcuxy.d.cts → sdk-agent-BA_6_wtc.d.cts} +30 -2
- package/dist/{sdk-agent-a3fW1xUK.d.ts → sdk-agent-CnwPODYH.d.ts} +30 -2
- package/dist/session-store-Dh07jr9N.d.cts +209 -0
- package/dist/session-store-Dh07jr9N.d.ts +209 -0
- 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 +14 -1
- package/dist/types/budget-tracker.d.ts +6 -2
- package/dist/types/hooks.d.ts +7 -1
- package/dist/types/mcp.d.ts +14 -0
- package/dist/types/run.d.ts +15 -1
- package/dist/workflow.d.cts +1 -1
- package/dist/workflow.d.ts +1 -1
- package/docs/adr/mutation-testing-scope.md +12 -2
- package/docs/error-codes.md +41 -40
- package/docs/harness-capability-map.md +32 -6
- package/package.json +1 -1
- package/dist/chunk-2WY2OFSC.cjs.map +0 -1
- package/dist/chunk-4TEGFMSP.cjs.map +0 -1
- package/dist/chunk-6CXRYPG7.cjs +0 -211
- package/dist/chunk-6CXRYPG7.cjs.map +0 -1
- package/dist/chunk-CJN5CEI3.js.map +0 -1
- package/dist/chunk-GARVAUCU.js.map +0 -1
- package/dist/chunk-MSEL5E5P.js +0 -204
- package/dist/chunk-MSEL5E5P.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-R5UQL2R5.cjs +0 -18
- package/dist/chunk-RN3XDZGS.js.map +0 -1
- package/dist/chunk-SNVYOX46.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/chunk-ZOL3L4EH.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,4 +1,4 @@
|
|
|
1
|
-
import { enqueueSessionWrite } from './chunk-
|
|
1
|
+
import { enqueueSessionWrite } from './chunk-VNRNZ3WI.js';
|
|
2
2
|
import { invalidateSessionCache } from './chunk-2XC6KDJM.js';
|
|
3
3
|
import './chunk-AGO5S5WD.js';
|
|
4
4
|
import { SessionTranscript } from './chunk-XESYJ4JC.js';
|
|
@@ -23,5 +23,5 @@ async function injectSessionTurn(opts) {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export { injectSessionTurn };
|
|
26
|
-
//# sourceMappingURL=inject-session-
|
|
27
|
-
//# sourceMappingURL=inject-session-
|
|
26
|
+
//# sourceMappingURL=inject-session-LC2TROHM.js.map
|
|
27
|
+
//# sourceMappingURL=inject-session-LC2TROHM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":[],"mappings":";;;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAM,oBAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAa,iBAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAA,sBAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-
|
|
1
|
+
{"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":[],"mappings":";;;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAM,oBAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAa,iBAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAA,sBAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-LC2TROHM.js","sourcesContent":["/**\n * M51 (agent-builder) — inject a SYNTHETIC user+assistant pair into a session's persisted transcript\n * WITHOUT running an LLM turn. This is the Codex review-exit mechanism (`exit_success.xml` appended to\n * the parent thread history so follow-ups like \"fix finding 2\" work): the pair chains onto the DAG\n * leaf (M50 pattern) and the in-memory cache is invalidated so the NEXT send re-hydrates with it.\n */\nimport type { SessionStore } from \"../../types/session-store.js\";\nimport { SessionTranscript } from \"../persistence/session-transcript.js\";\nimport { enqueueSessionWrite, invalidateSessionCache } from \"./agent-session.js\";\nimport type { CompactLocation } from \"./compact-session.js\";\n\nexport async function injectSessionTurn(opts: {\n store: SessionStore;\n loc: CompactLocation;\n sessionId: string;\n userText: string;\n assistantText: string;\n}): Promise<void> {\n await enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {\n const prior = await opts.store.readRecords(opts.loc.agentId);\n const transcript = SessionTranscript.fromRecords(prior, {\n cwd: opts.loc.cwd,\n sessionId: opts.sessionId,\n model: opts.loc.model ?? \"unknown\",\n });\n transcript.appendUserTurn(opts.userText);\n transcript.appendAssistantTurn({ text: opts.assistantText });\n await opts.store.appendRecords(opts.loc.agentId, transcript.records().slice(prior.length));\n invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);\n });\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFBIDOOJM_cjs = require('./chunk-FBIDOOJM.cjs');
|
|
4
4
|
var chunkYJNYDJ2T_cjs = require('./chunk-YJNYDJ2T.cjs');
|
|
5
5
|
require('./chunk-MSW7LB2V.cjs');
|
|
6
6
|
var chunk3WKWBYPO_cjs = require('./chunk-3WKWBYPO.cjs');
|
|
@@ -10,7 +10,7 @@ require('./chunk-RNXXYF22.cjs');
|
|
|
10
10
|
|
|
11
11
|
// src/internal/session/inject-session.ts
|
|
12
12
|
async function injectSessionTurn(opts) {
|
|
13
|
-
await
|
|
13
|
+
await chunkFBIDOOJM_cjs.enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {
|
|
14
14
|
const prior = await opts.store.readRecords(opts.loc.agentId);
|
|
15
15
|
const transcript = chunk3WKWBYPO_cjs.SessionTranscript.fromRecords(prior, {
|
|
16
16
|
cwd: opts.loc.cwd,
|
|
@@ -25,5 +25,5 @@ async function injectSessionTurn(opts) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
exports.injectSessionTurn = injectSessionTurn;
|
|
28
|
-
//# sourceMappingURL=inject-session-
|
|
29
|
-
//# sourceMappingURL=inject-session-
|
|
28
|
+
//# sourceMappingURL=inject-session-T4RXANG3.cjs.map
|
|
29
|
+
//# sourceMappingURL=inject-session-T4RXANG3.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":["enqueueSessionWrite","SessionTranscript","invalidateSessionCache"],"mappings":";;;;;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAMA,sCAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAaC,mCAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAAC,wCAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-
|
|
1
|
+
{"version":3,"sources":["../src/internal/session/inject-session.ts"],"names":["enqueueSessionWrite","SessionTranscript","invalidateSessionCache"],"mappings":";;;;;;;;;;;AAWA,eAAsB,kBAAkB,IAAA,EAMtB;AAChB,EAAA,MAAMA,sCAAoB,IAAA,CAAK,GAAA,CAAI,KAAK,IAAA,CAAK,GAAA,CAAI,SAAS,YAAY;AACpE,IAAA,MAAM,QAAQ,MAAM,IAAA,CAAK,MAAM,WAAA,CAAY,IAAA,CAAK,IAAI,OAAO,CAAA;AAC3D,IAAA,MAAM,UAAA,GAAaC,mCAAA,CAAkB,WAAA,CAAY,KAAA,EAAO;AAAA,MACtD,GAAA,EAAK,KAAK,GAAA,CAAI,GAAA;AAAA,MACd,WAAW,IAAA,CAAK,SAAA;AAAA,MAChB,KAAA,EAAO,IAAA,CAAK,GAAA,CAAI,KAAA,IAAS;AAAA,KAC1B,CAAA;AACD,IAAA,UAAA,CAAW,cAAA,CAAe,KAAK,QAAQ,CAAA;AACvC,IAAA,UAAA,CAAW,mBAAA,CAAoB,EAAE,IAAA,EAAM,IAAA,CAAK,eAAe,CAAA;AAC3D,IAAA,MAAM,IAAA,CAAK,KAAA,CAAM,aAAA,CAAc,IAAA,CAAK,GAAA,CAAI,OAAA,EAAS,UAAA,CAAW,OAAA,EAAQ,CAAE,KAAA,CAAM,KAAA,CAAM,MAAM,CAAC,CAAA;AACzF,IAAAC,wCAAA,CAAuB,IAAA,CAAK,GAAA,CAAI,GAAA,EAAK,IAAA,CAAK,IAAI,OAAO,CAAA;AAAA,EACvD,CAAC,CAAA;AACH","file":"inject-session-T4RXANG3.cjs","sourcesContent":["/**\n * M51 (agent-builder) — inject a SYNTHETIC user+assistant pair into a session's persisted transcript\n * WITHOUT running an LLM turn. This is the Codex review-exit mechanism (`exit_success.xml` appended to\n * the parent thread history so follow-ups like \"fix finding 2\" work): the pair chains onto the DAG\n * leaf (M50 pattern) and the in-memory cache is invalidated so the NEXT send re-hydrates with it.\n */\nimport type { SessionStore } from \"../../types/session-store.js\";\nimport { SessionTranscript } from \"../persistence/session-transcript.js\";\nimport { enqueueSessionWrite, invalidateSessionCache } from \"./agent-session.js\";\nimport type { CompactLocation } from \"./compact-session.js\";\n\nexport async function injectSessionTurn(opts: {\n store: SessionStore;\n loc: CompactLocation;\n sessionId: string;\n userText: string;\n assistantText: string;\n}): Promise<void> {\n await enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {\n const prior = await opts.store.readRecords(opts.loc.agentId);\n const transcript = SessionTranscript.fromRecords(prior, {\n cwd: opts.loc.cwd,\n sessionId: opts.sessionId,\n model: opts.loc.model ?? \"unknown\",\n });\n transcript.appendUserTurn(opts.userText);\n transcript.appendAssistantTurn({ text: opts.assistantText });\n await opts.store.appendRecords(opts.loc.agentId, transcript.records().slice(prior.length));\n invalidateSessionCache(opts.loc.cwd, opts.loc.agentId);\n });\n}\n"]}
|
|
@@ -17,6 +17,9 @@ export interface DoomLoopVerdict {
|
|
|
17
17
|
export interface DoomLoopConfig {
|
|
18
18
|
softThreshold: number;
|
|
19
19
|
hardThreshold: number;
|
|
20
|
+
/** Consecutive same-tool calls with CHANGING arguments but an unchanged result (argument churn).
|
|
21
|
+
* Soft nudge at `churnThreshold - 2`, hard stop at `churnThreshold`. */
|
|
22
|
+
churnThreshold: number;
|
|
20
23
|
}
|
|
21
24
|
/** Public config on a send: `false` disables the guard; an object tunes the thresholds; absent = on. */
|
|
22
25
|
export type DoomLoopOption = false | Partial<DoomLoopConfig>;
|
|
@@ -3,6 +3,12 @@ import type { SDKMessage } from "../../types/messages.js";
|
|
|
3
3
|
import type { RunStatus } from "../../types/run.js";
|
|
4
4
|
/** SE7 — what a custom tool handler may return: a string or structured content blocks. */
|
|
5
5
|
export type ToolHandlerResult = string | import("../../types/content-blocks.js").ToolResultContentBlock[];
|
|
6
|
+
export interface SteerQueue {
|
|
7
|
+
/** Take every pending message. */
|
|
8
|
+
drain(): string[];
|
|
9
|
+
/** Like `drain`, but atomically refuses further pushes when nothing was pending. */
|
|
10
|
+
drainOrClose(): string[];
|
|
11
|
+
}
|
|
6
12
|
export interface AgentLoopOutput {
|
|
7
13
|
events: SDKMessage[];
|
|
8
14
|
finalStatus: RunStatus;
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
* mentions context length, else
|
|
11
11
|
* `"invalid_request"`; or
|
|
12
12
|
* `"content_filtered"` for policy.)
|
|
13
|
+
* 404 → `ConfigurationError` (`code: "model_unavailable"` when the
|
|
14
|
+
* body is a `not_found_error` naming a
|
|
15
|
+
* model; other 404s stay `unknown`.)
|
|
13
16
|
* 408 → `NetworkError` (`code: "timeout"`)
|
|
14
17
|
* 5xx → `NetworkError` (`code: "server_error"` — covers 529
|
|
15
18
|
* overloaded_error common at peak
|
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
* Body inspection: looks at `body.error.code` / `body.error.type` to detect
|
|
9
9
|
* `context_too_long`, `content_filtered`, `model_unavailable` semantics, and at
|
|
10
10
|
* `body.error.message` for a 404 that says no endpoint serves the model
|
|
11
|
-
* (OpenRouter's numeric-code body for a retired model id).
|
|
12
|
-
*
|
|
13
|
-
* characters; every other status keeps the bare message.
|
|
11
|
+
* (OpenRouter's numeric-code body for a retired model id). Every message
|
|
12
|
+
* ends with the provider's text, redacted and capped at 512 characters.
|
|
14
13
|
* Falls back to status-based mapping when body doesn't expose `.error`
|
|
15
14
|
* (e.g., HTML server error page, DeepInfra's `{message: "..."}` shape).
|
|
16
15
|
*
|
|
@@ -8,4 +8,6 @@ export interface HermesExtractResult {
|
|
|
8
8
|
* block whose name is not a tool in the current request. Empty when no allowlist was applied or
|
|
9
9
|
* nothing was gated out. The caller logs these so a guard firing is observable in production. */
|
|
10
10
|
droppedNames: string[];
|
|
11
|
+
/** Names of the leaked-call formats recovered (e.g. `gemini-ctrl42`); empty when none. */
|
|
12
|
+
formats: string[];
|
|
11
13
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { AgentDefinition, AgentOptions, ModelSelection } from "../../types/agent.js";
|
|
8
8
|
import type { Run, SDKUserMessage, SendOptions } from "../../types/run.js";
|
|
9
|
-
import type { MemoryToolSpec } from "../agent-loop/types.js";
|
|
9
|
+
import type { MemoryToolSpec, SteerQueue } from "../agent-loop/types.js";
|
|
10
10
|
import type { PersonalityPreset } from "../personality/types.js";
|
|
11
11
|
import type { PluginManager } from "../plugins/manager.js";
|
|
12
12
|
import type { HooksExecutor } from "../runtime/hooks/hooks-executor.js";
|
|
@@ -34,6 +34,7 @@ export declare function buildRealRunOptions(args: {
|
|
|
34
34
|
memoryTools: ReadonlyArray<MemoryToolSpec> | undefined;
|
|
35
35
|
personalityToolWhitelist?: ReadonlyArray<string>;
|
|
36
36
|
personalityName?: string;
|
|
37
|
+
steerQueue?: SteerQueue;
|
|
37
38
|
}): Parameters<typeof createRealLocalRun>[0];
|
|
38
39
|
export declare function createFixtureRunHelper(args: {
|
|
39
40
|
inputs: DispatchInputs;
|
|
@@ -54,4 +55,5 @@ export declare function dispatchLocalRun(args: {
|
|
|
54
55
|
}>;
|
|
55
56
|
memoryTools: ReadonlyArray<MemoryToolSpec> | undefined;
|
|
56
57
|
activePreset: PersonalityPreset | undefined;
|
|
58
|
+
steerQueue?: SteerQueue;
|
|
57
59
|
}): Promise<Run>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Queue-mode state for `LocalAgent.send` (`SendOptions.queueMode`): the steer queue of the turn in
|
|
3
|
+
* flight and the pending collect batch.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
import type { SteerQueue } from "../agent-loop/types.js";
|
|
8
|
+
/** Steer queue of one turn. Refuses pushes once closed so a late message is never silently lost. */
|
|
9
|
+
export declare class TurnSteerQueue implements SteerQueue {
|
|
10
|
+
private pending;
|
|
11
|
+
private closed;
|
|
12
|
+
/** @returns false when the turn can no longer pick the message up. */
|
|
13
|
+
push(text: string): boolean;
|
|
14
|
+
drain(): string[];
|
|
15
|
+
drainOrClose(): string[];
|
|
16
|
+
/** Stop accepting and hand back what no loop iteration picked up. */
|
|
17
|
+
closeAndTake(): string[];
|
|
18
|
+
}
|
|
19
|
+
/** The turn currently holding the send lock. */
|
|
20
|
+
export interface ActiveTurn {
|
|
21
|
+
readonly steer: TurnSteerQueue;
|
|
22
|
+
readonly run: Promise<Run>;
|
|
23
|
+
}
|
|
24
|
+
/** Messages waiting to become one followup turn. */
|
|
25
|
+
export interface CollectBatch {
|
|
26
|
+
readonly messages: Array<string | SDKUserMessage>;
|
|
27
|
+
readonly run: Promise<Run>;
|
|
28
|
+
}
|
|
29
|
+
/** Join a collected batch into the single message the batched turn sends. */
|
|
30
|
+
export declare function joinCollected(messages: ReadonlyArray<string | SDKUserMessage>): string | SDKUserMessage;
|
|
31
|
+
export declare function hasImages(message: string | SDKUserMessage): boolean;
|
|
@@ -8,6 +8,8 @@ export interface McpToolCallResult {
|
|
|
8
8
|
}
|
|
9
9
|
export interface McpClient {
|
|
10
10
|
readonly name: string;
|
|
11
|
+
/** `true` when the server's config sets `sequential`: the loop runs its calls one at a time. */
|
|
12
|
+
readonly sequential?: boolean;
|
|
11
13
|
initialize(): Promise<void>;
|
|
12
14
|
listTools(): Promise<McpTool[]>;
|
|
13
15
|
callTool(name: string, args: Record<string, unknown>): Promise<McpToolCallResult>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXE3CAY6Z_cjs = require('../../../chunk-XE3CAY6Z.cjs');
|
|
4
4
|
var chunkGHX4P3V2_cjs = require('../../../chunk-GHX4P3V2.cjs');
|
|
5
|
-
require('../../../chunk-
|
|
5
|
+
require('../../../chunk-3F53FLQ7.cjs');
|
|
6
6
|
require('../../../chunk-QOGNZMHD.cjs');
|
|
7
7
|
require('../../../chunk-MUUQ2WFJ.cjs');
|
|
8
8
|
require('../../../chunk-3KIUY67P.cjs');
|
|
@@ -17,7 +17,7 @@ require('../../../chunk-RNXXYF22.cjs');
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "createOpenAiCompatibleRuntime", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkXE3CAY6Z_cjs.createOpenAiCompatibleRuntime; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "LruEmbeddingCache", {
|
|
23
23
|
enumerable: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { createOpenAiCompatibleRuntime } from '../../../chunk-
|
|
1
|
+
export { createOpenAiCompatibleRuntime } from '../../../chunk-VCQ37TC5.js';
|
|
2
2
|
export { LruEmbeddingCache, globalEmbeddingCache } from '../../../chunk-H73MEMQB.js';
|
|
3
|
-
import '../../../chunk-
|
|
3
|
+
import '../../../chunk-7ACS6P5Z.js';
|
|
4
4
|
import '../../../chunk-24MGQDK3.js';
|
|
5
5
|
import '../../../chunk-FD2UT76F.js';
|
|
6
6
|
import '../../../chunk-PKRPV3R7.js';
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import type { EmbeddingRuntime } from "../embedding-adapter.js";
|
|
2
2
|
import type { MemoryFact } from "../types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Dreaming/REM phase logic.
|
|
5
|
+
*
|
|
6
|
+
* Three phases:
|
|
7
|
+
* - **light** — drop near-duplicate facts (cosine similarity > 0.95).
|
|
8
|
+
* - **REM** — cluster thematically related facts (cosine ≥ 0.75).
|
|
9
|
+
* - **deep** — pick a representative bullet per cluster (longest text
|
|
10
|
+
* wins) and emit consolidated markdown notes.
|
|
11
|
+
*/
|
|
12
|
+
export interface DedupResult {
|
|
13
|
+
kept: MemoryFact[];
|
|
14
|
+
duplicatesRemoved: number;
|
|
15
|
+
}
|
|
16
|
+
/** A group of semantically similar facts, with the text chosen to represent them. */
|
|
3
17
|
export interface Cluster {
|
|
4
18
|
representativeText: string;
|
|
5
19
|
members: ReadonlyArray<MemoryFact>;
|
|
6
20
|
}
|
|
21
|
+
/** What clustering produced: the clusters and how many facts the per-sweep cap left out. */
|
|
7
22
|
export interface ClusterResult {
|
|
8
23
|
clusters: Cluster[];
|
|
9
24
|
/** How many input facts past the per-sweep cap were not clustered; 0 when none were. */
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
import type { EmbeddingRuntime } from "../embedding-adapter.js";
|
|
2
|
+
import { type MemoryRoot } from "../storage/memory-root.js";
|
|
3
|
+
/**
|
|
4
|
+
* Dreaming sweep orchestrator (ADR D7 of memory-system-peer-project-parity).
|
|
5
|
+
*
|
|
6
|
+
* Phases:
|
|
7
|
+
* 1. **light** — drop near-duplicate facts via cosine similarity.
|
|
8
|
+
* 2. **REM** — cluster thematically related facts.
|
|
9
|
+
* 3. **deep** — write a `notes/dreamed-<ts>.md` per sweep with consolidated
|
|
10
|
+
* clusters; append a diary entry.
|
|
11
|
+
*
|
|
12
|
+
* All file writes go through `replaceFileAtomic` (EC-3) and the entire sweep
|
|
13
|
+
* holds the per-cwd mutex so a `Remember:` append can't race it.
|
|
14
|
+
*/
|
|
15
|
+
export interface DreamingOptions {
|
|
16
|
+
cwd: string;
|
|
17
|
+
/**
|
|
18
|
+
* The memory root to sweep. Defaults to the project store — right for a caller with no
|
|
19
|
+
* `memory.directory`, and wrong for one that has it, which is why it is passable (#463).
|
|
20
|
+
*/
|
|
21
|
+
memoryRoot?: MemoryRoot;
|
|
22
|
+
embedding: EmbeddingRuntime;
|
|
23
|
+
dedupThreshold?: number;
|
|
24
|
+
clusterThreshold?: number;
|
|
25
|
+
/** Test hook — fixed timestamp for the run. */
|
|
26
|
+
now?: () => number;
|
|
27
|
+
}
|
|
28
|
+
/** Outcome of one dreaming sweep: counts before and after, and the note written. */
|
|
1
29
|
export interface DreamingResult {
|
|
2
30
|
status: "ok" | "skipped" | "error";
|
|
3
31
|
factsBefore: number;
|
|
@@ -12,4 +40,5 @@ export interface DreamingResult {
|
|
|
12
40
|
*/
|
|
13
41
|
factsLeftOut?: number;
|
|
14
42
|
}
|
|
43
|
+
/** Run one dreaming sweep (dedupe, cluster, write a consolidated note), serialised per `cwd`. */
|
|
15
44
|
export declare function runDreamingSweep(options: DreamingOptions): Promise<DreamingResult>;
|
|
@@ -34,6 +34,8 @@ export interface SdkMemoryModule {
|
|
|
34
34
|
/** Mirrors @theokit/sdk-memory's runDreamingSweep entrypoint. */
|
|
35
35
|
runDreamingSweep(opts: {
|
|
36
36
|
cwd: string;
|
|
37
|
+
/** The resolved memory root: facts, notes and diary live here (B-442). Absent means `<cwd>/.theokit/memory`. */
|
|
38
|
+
memoryRoot?: string;
|
|
37
39
|
embedding: any;
|
|
38
40
|
dedupThreshold?: number;
|
|
39
41
|
clusterThreshold?: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCHKV2L2Y_cjs = require('../../../chunk-CHKV2L2Y.cjs');
|
|
4
4
|
var chunkRS7YQR4X_cjs = require('../../../chunk-RS7YQR4X.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkVWYFGE27_cjs = require('../../../chunk-VWYFGE27.cjs');
|
|
6
6
|
require('../../../chunk-KRD3GQAA.cjs');
|
|
7
7
|
require('../../../chunk-MUUQ2WFJ.cjs');
|
|
8
8
|
require('../../../chunk-SWALPLFQ.cjs');
|
|
@@ -10,8 +10,8 @@ require('../../../chunk-3KIUY67P.cjs');
|
|
|
10
10
|
require('../../../chunk-SA6K24NB.cjs');
|
|
11
11
|
require('../../../chunk-3WKWBYPO.cjs');
|
|
12
12
|
require('../../../chunk-AT2PESXB.cjs');
|
|
13
|
-
require('../../../chunk-
|
|
14
|
-
require('../../../chunk-
|
|
13
|
+
require('../../../chunk-MHUOVS5I.cjs');
|
|
14
|
+
require('../../../chunk-U3DW3WDE.cjs');
|
|
15
15
|
require('../../../chunk-ZOFRNNZD.cjs');
|
|
16
16
|
require('../../../chunk-CEGU5AVD.cjs');
|
|
17
17
|
require('../../../chunk-RNXXYF22.cjs');
|
|
@@ -20,23 +20,39 @@ require('../../../chunk-RNXXYF22.cjs');
|
|
|
20
20
|
|
|
21
21
|
Object.defineProperty(exports, "appendDiaryEntry", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkCHKV2L2Y_cjs.appendDiaryEntry; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "deepPhase", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkCHKV2L2Y_cjs.deepPhase; }
|
|
24
28
|
});
|
|
25
29
|
Object.defineProperty(exports, "diaryPath", {
|
|
26
30
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkCHKV2L2Y_cjs.diaryPath; }
|
|
28
32
|
});
|
|
29
33
|
Object.defineProperty(exports, "entryHash", {
|
|
30
34
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunkCHKV2L2Y_cjs.entryHash; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "lightPhase", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunkCHKV2L2Y_cjs.lightPhase; }
|
|
32
40
|
});
|
|
33
41
|
Object.defineProperty(exports, "readAllSqliteFacts", {
|
|
34
42
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkCHKV2L2Y_cjs.readAllSqliteFacts; }
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "remPhase", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () { return chunkCHKV2L2Y_cjs.remPhase; }
|
|
36
48
|
});
|
|
37
49
|
Object.defineProperty(exports, "renderDiaryEntry", {
|
|
38
50
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkCHKV2L2Y_cjs.renderDiaryEntry; }
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "runDreamingSweep", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return chunkCHKV2L2Y_cjs.runDreamingSweep; }
|
|
40
56
|
});
|
|
41
57
|
Object.defineProperty(exports, "persistActiveMemoryTranscript", {
|
|
42
58
|
enumerable: true,
|
|
@@ -44,107 +60,107 @@ Object.defineProperty(exports, "persistActiveMemoryTranscript", {
|
|
|
44
60
|
});
|
|
45
61
|
Object.defineProperty(exports, "MEMORY_INDEX_MAX_BYTES", {
|
|
46
62
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkVWYFGE27_cjs.MEMORY_INDEX_MAX_BYTES; }
|
|
48
64
|
});
|
|
49
65
|
Object.defineProperty(exports, "MEMORY_INDEX_MAX_LINES", {
|
|
50
66
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkVWYFGE27_cjs.MEMORY_INDEX_MAX_LINES; }
|
|
52
68
|
});
|
|
53
69
|
Object.defineProperty(exports, "appendFact", {
|
|
54
70
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkVWYFGE27_cjs.appendFact; }
|
|
56
72
|
});
|
|
57
73
|
Object.defineProperty(exports, "appendFactToMarkdown", {
|
|
58
74
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkVWYFGE27_cjs.appendFactToMarkdown; }
|
|
60
76
|
});
|
|
61
77
|
Object.defineProperty(exports, "asMemoryRoot", {
|
|
62
78
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkVWYFGE27_cjs.asMemoryRoot; }
|
|
64
80
|
});
|
|
65
81
|
Object.defineProperty(exports, "ceilingReachedError", {
|
|
66
82
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkVWYFGE27_cjs.ceilingReachedError; }
|
|
68
84
|
});
|
|
69
85
|
Object.defineProperty(exports, "claudeProjectMemoryDir", {
|
|
70
86
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkVWYFGE27_cjs.claudeProjectMemoryDir; }
|
|
72
88
|
});
|
|
73
89
|
Object.defineProperty(exports, "collectMarkdownFiles", {
|
|
74
90
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkVWYFGE27_cjs.collectMarkdownFiles; }
|
|
76
92
|
});
|
|
77
93
|
Object.defineProperty(exports, "defaultIndexPath", {
|
|
78
94
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkVWYFGE27_cjs.defaultIndexPath; }
|
|
80
96
|
});
|
|
81
97
|
Object.defineProperty(exports, "discoverSessionFiles", {
|
|
82
98
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkVWYFGE27_cjs.discoverSessionFiles; }
|
|
84
100
|
});
|
|
85
101
|
Object.defineProperty(exports, "discoverWikiFiles", {
|
|
86
102
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkVWYFGE27_cjs.discoverWikiFiles; }
|
|
88
104
|
});
|
|
89
105
|
Object.defineProperty(exports, "indexBudgetWarning", {
|
|
90
106
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkVWYFGE27_cjs.indexBudgetWarning; }
|
|
92
108
|
});
|
|
93
109
|
Object.defineProperty(exports, "lanceStoragePath", {
|
|
94
110
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkVWYFGE27_cjs.lanceStoragePath; }
|
|
96
112
|
});
|
|
97
113
|
Object.defineProperty(exports, "memoryIndexRoot", {
|
|
98
114
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkVWYFGE27_cjs.memoryIndexRoot; }
|
|
100
116
|
});
|
|
101
117
|
Object.defineProperty(exports, "memoryMdPath", {
|
|
102
118
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkVWYFGE27_cjs.memoryMdPath; }
|
|
104
120
|
});
|
|
105
121
|
Object.defineProperty(exports, "memoryReadRoots", {
|
|
106
122
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkVWYFGE27_cjs.memoryReadRoots; }
|
|
108
124
|
});
|
|
109
125
|
Object.defineProperty(exports, "notesDir", {
|
|
110
126
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkVWYFGE27_cjs.notesDir; }
|
|
112
128
|
});
|
|
113
129
|
Object.defineProperty(exports, "projectMemoryDir", {
|
|
114
130
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkVWYFGE27_cjs.projectMemoryDir; }
|
|
116
132
|
});
|
|
117
133
|
Object.defineProperty(exports, "readFacts", {
|
|
118
134
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkVWYFGE27_cjs.readFacts; }
|
|
120
136
|
});
|
|
121
137
|
Object.defineProperty(exports, "readFactsFromMarkdown", {
|
|
122
138
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkVWYFGE27_cjs.readFactsFromMarkdown; }
|
|
124
140
|
});
|
|
125
141
|
Object.defineProperty(exports, "resolveMaxFacts", {
|
|
126
142
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkVWYFGE27_cjs.resolveMaxFacts; }
|
|
128
144
|
});
|
|
129
145
|
Object.defineProperty(exports, "resolveMemoryRoot", {
|
|
130
146
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkVWYFGE27_cjs.resolveMemoryRoot; }
|
|
132
148
|
});
|
|
133
149
|
Object.defineProperty(exports, "sessionSummaryPath", {
|
|
134
150
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkVWYFGE27_cjs.sessionSummaryPath; }
|
|
136
152
|
});
|
|
137
153
|
Object.defineProperty(exports, "sessionsDir", {
|
|
138
154
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkVWYFGE27_cjs.sessionsDir; }
|
|
140
156
|
});
|
|
141
157
|
Object.defineProperty(exports, "wikiDir", {
|
|
142
158
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkVWYFGE27_cjs.wikiDir; }
|
|
144
160
|
});
|
|
145
161
|
Object.defineProperty(exports, "writeSessionSummary", {
|
|
146
162
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkVWYFGE27_cjs.writeSessionSummary; }
|
|
148
164
|
});
|
|
149
165
|
//# sourceMappingURL=index.cjs.map
|
|
150
166
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* `package.json` `exports`, so the names below must survive into the published declarations.
|
|
17
17
|
*/
|
|
18
18
|
export { appendDiaryEntry, type DiaryEntry, diaryPath, entryHash, renderDiaryEntry, } from "../dreaming/diary.js";
|
|
19
|
+
export { type Cluster, type ClusterResult, type DedupResult, deepPhase, lightPhase, remPhase, } from "../dreaming/phases.js";
|
|
20
|
+
export { type DreamingOptions, type DreamingResult, runDreamingSweep, } from "../dreaming/run.js";
|
|
19
21
|
export { defaultIndexPath } from "../index-db.js";
|
|
20
22
|
export { collectMarkdownFiles, type DiscoveredFile } from "../index-manager-helpers.js";
|
|
21
23
|
export { lanceStoragePath } from "../lance-index.js";
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* `package.json` `exports`, so the names below must survive into the published declarations.
|
|
17
17
|
*/
|
|
18
18
|
export { appendDiaryEntry, type DiaryEntry, diaryPath, entryHash, renderDiaryEntry, } from "../dreaming/diary.js";
|
|
19
|
+
export { type Cluster, type ClusterResult, type DedupResult, deepPhase, lightPhase, remPhase, } from "../dreaming/phases.js";
|
|
20
|
+
export { type DreamingOptions, type DreamingResult, runDreamingSweep, } from "../dreaming/run.js";
|
|
19
21
|
export { defaultIndexPath } from "../index-db.js";
|
|
20
22
|
export { collectMarkdownFiles, type DiscoveredFile } from "../index-manager-helpers.js";
|
|
21
23
|
export { lanceStoragePath } from "../lance-index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { appendDiaryEntry, diaryPath, entryHash, readAllSqliteFacts, renderDiaryEntry } from '../../../chunk-
|
|
1
|
+
export { appendDiaryEntry, deepPhase, diaryPath, entryHash, lightPhase, readAllSqliteFacts, remPhase, renderDiaryEntry, runDreamingSweep } from '../../../chunk-INVEGVGO.js';
|
|
2
2
|
export { persistActiveMemoryTranscript } from '../../../chunk-QK2ERTO3.js';
|
|
3
|
-
export { MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, appendFact, appendFactToMarkdown, asMemoryRoot, ceilingReachedError, claudeProjectMemoryDir, collectMarkdownFiles, defaultIndexPath, discoverSessionFiles, discoverWikiFiles, indexBudgetWarning, lanceStoragePath, memoryIndexRoot, memoryMdPath, memoryReadRoots, notesDir, projectMemoryDir, readFacts, readFactsFromMarkdown, resolveMaxFacts, resolveMemoryRoot, sessionSummaryPath, sessionsDir, wikiDir, writeSessionSummary } from '../../../chunk-
|
|
3
|
+
export { MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, appendFact, appendFactToMarkdown, asMemoryRoot, ceilingReachedError, claudeProjectMemoryDir, collectMarkdownFiles, defaultIndexPath, discoverSessionFiles, discoverWikiFiles, indexBudgetWarning, lanceStoragePath, memoryIndexRoot, memoryMdPath, memoryReadRoots, notesDir, projectMemoryDir, readFacts, readFactsFromMarkdown, resolveMaxFacts, resolveMemoryRoot, sessionSummaryPath, sessionsDir, wikiDir, writeSessionSummary } from '../../../chunk-LCCT5ZXJ.js';
|
|
4
4
|
import '../../../chunk-KVNWIAO4.js';
|
|
5
5
|
import '../../../chunk-FD2UT76F.js';
|
|
6
6
|
import '../../../chunk-4QCJAJAG.js';
|
|
@@ -8,8 +8,8 @@ import '../../../chunk-PKRPV3R7.js';
|
|
|
8
8
|
import '../../../chunk-UKMBRMGT.js';
|
|
9
9
|
import '../../../chunk-XESYJ4JC.js';
|
|
10
10
|
import '../../../chunk-MLJDW2YK.js';
|
|
11
|
-
import '../../../chunk-
|
|
12
|
-
import '../../../chunk-
|
|
11
|
+
import '../../../chunk-FGGVSHDW.js';
|
|
12
|
+
import '../../../chunk-PPU2D4FZ.js';
|
|
13
13
|
import '../../../chunk-M4U24U6G.js';
|
|
14
14
|
import '../../../chunk-TNFOU6SB.js';
|
|
15
15
|
import '../../../chunk-3OY6H3I7.js';
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
* `@theokit/sdk` rather than reimplementing it, precisely so the Map is the same one: a per-package
|
|
27
27
|
* copy would give each package its own queue and let their writes race.
|
|
28
28
|
*
|
|
29
|
-
* The Map is module-scoped, so nothing survives a process restart or a fresh module instance
|
|
30
|
-
*
|
|
29
|
+
* The Map is module-scoped, so nothing survives a process restart or a fresh module instance.
|
|
30
|
+
* An entry is dropped as soon as its key has no call pending.
|
|
31
31
|
* Signature and semantics will not change before sdk-core v3.0.
|
|
32
32
|
*
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
35
|
export declare function withCwdMutex<T>(key: string, fn: () => Promise<T>): Promise<T>;
|
|
36
|
+
/** Number of keys with a call pending. Test-only observation of the queue map. */
|
|
37
|
+
export declare function pendingCwdMutexKeyCount(): number;
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
* `@theokit/sdk` rather than reimplementing it, precisely so the Map is the same one: a per-package
|
|
27
27
|
* copy would give each package its own queue and let their writes race.
|
|
28
28
|
*
|
|
29
|
-
* The Map is module-scoped, so nothing survives a process restart or a fresh module instance
|
|
30
|
-
*
|
|
29
|
+
* The Map is module-scoped, so nothing survives a process restart or a fresh module instance.
|
|
30
|
+
* An entry is dropped as soon as its key has no call pending.
|
|
31
31
|
* Signature and semantics will not change before sdk-core v3.0.
|
|
32
32
|
*
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
35
|
export declare function withCwdMutex<T>(key: string, fn: () => Promise<T>): Promise<T>;
|
|
36
|
+
/** Number of keys with a call pending. Test-only observation of the queue map. */
|
|
37
|
+
export declare function pendingCwdMutexKeyCount(): number;
|
|
@@ -5,8 +5,8 @@ var chunk3HA7N2BB_cjs = require('../../chunk-3HA7N2BB.cjs');
|
|
|
5
5
|
var chunkA4RAL2ER_cjs = require('../../chunk-A4RAL2ER.cjs');
|
|
6
6
|
var chunkAT2PESXB_cjs = require('../../chunk-AT2PESXB.cjs');
|
|
7
7
|
var chunkPOBZXULR_cjs = require('../../chunk-POBZXULR.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var chunkMHUOVS5I_cjs = require('../../chunk-MHUOVS5I.cjs');
|
|
9
|
+
var chunkU3DW3WDE_cjs = require('../../chunk-U3DW3WDE.cjs');
|
|
10
10
|
var chunkZOFRNNZD_cjs = require('../../chunk-ZOFRNNZD.cjs');
|
|
11
11
|
var chunkYQ3XC6C2_cjs = require('../../chunk-YQ3XC6C2.cjs');
|
|
12
12
|
require('../../chunk-CEGU5AVD.cjs');
|
|
@@ -92,11 +92,11 @@ Object.defineProperty(exports, "readJsonlIds", {
|
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "withFileLock", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkMHUOVS5I_cjs.withFileLock; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "withCwdMutex", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkU3DW3WDE_cjs.withCwdMutex; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "atomicWriteJson", {
|
|
102
102
|
enumerable: true,
|
|
@@ -3,8 +3,8 @@ export { migrateSchema, readVersionedJson, writeVersionedJson } from '../../chun
|
|
|
3
3
|
export { containsCjk, sanitizeFts5Query } from '../../chunk-WE22OXQA.js';
|
|
4
4
|
export { applyWalWithFallback, isCorruptionError, openSqliteResilient } from '../../chunk-MLJDW2YK.js';
|
|
5
5
|
export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds } from '../../chunk-KU5O7WPK.js';
|
|
6
|
-
export { withFileLock } from '../../chunk-
|
|
7
|
-
export { withCwdMutex } from '../../chunk-
|
|
6
|
+
export { withFileLock } from '../../chunk-FGGVSHDW.js';
|
|
7
|
+
export { withCwdMutex } from '../../chunk-PPU2D4FZ.js';
|
|
8
8
|
export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-M4U24U6G.js';
|
|
9
9
|
export { displayTheokitHome, getProfilesRoot, getTheokitHome } from '../../chunk-YMVTUV5K.js';
|
|
10
10
|
import '../../chunk-TNFOU6SB.js';
|