@theokit/sdk 4.56.0 → 4.58.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 +170 -0
- package/dist/{agent-K3PQBS7D.js → agent-6WM4QOWS.js} +15 -14
- package/dist/{agent-K3PQBS7D.js.map → agent-6WM4QOWS.js.map} +1 -1
- package/dist/{agent-PJMBK7HQ.cjs → agent-MIYY7TXV.cjs} +16 -15
- package/dist/{agent-PJMBK7HQ.cjs.map → agent-MIYY7TXV.cjs.map} +1 -1
- package/dist/agent-session-store-G2BMUZQV.js +7 -0
- package/dist/{agent-session-store-P6V3FINW.js.map → agent-session-store-G2BMUZQV.js.map} +1 -1
- package/dist/agent-session-store-WAKLOKWK.cjs +24 -0
- package/dist/{agent-session-store-ZJ3JSRS4.cjs.map → agent-session-store-WAKLOKWK.cjs.map} +1 -1
- package/dist/{chunk-6VLKVX7O.cjs → chunk-27AXGJMV.cjs} +26 -15
- package/dist/chunk-27AXGJMV.cjs.map +1 -0
- package/dist/{chunk-HLPSLDGL.cjs → chunk-43GFJ5SD.cjs} +7 -7
- package/dist/{chunk-HLPSLDGL.cjs.map → chunk-43GFJ5SD.cjs.map} +1 -1
- package/dist/{chunk-M7UHYBEY.js → chunk-5QOIQJ5J.js} +3 -3
- package/dist/{chunk-M7UHYBEY.js.map → chunk-5QOIQJ5J.js.map} +1 -1
- package/dist/{chunk-E3WZ6Y4H.cjs → chunk-7BG5UH3T.cjs} +8 -8
- package/dist/{chunk-E3WZ6Y4H.cjs.map → chunk-7BG5UH3T.cjs.map} +1 -1
- package/dist/chunk-AQO3NSRG.cjs +41 -0
- package/dist/chunk-AQO3NSRG.cjs.map +1 -0
- package/dist/{chunk-JHPGF3FP.cjs → chunk-BUIK7GUA.cjs} +22 -2
- package/dist/chunk-BUIK7GUA.cjs.map +1 -0
- package/dist/{chunk-KBXWEWKS.js → chunk-CF5OMCZG.js} +87 -43
- package/dist/chunk-CF5OMCZG.js.map +1 -0
- package/dist/{chunk-DZBSJX6J.js → chunk-FKMUFNQE.js} +21 -4
- package/dist/chunk-FKMUFNQE.js.map +1 -0
- package/dist/{chunk-BMAZLQQ4.js → chunk-G24KZRSA.js} +3 -3
- package/dist/{chunk-BMAZLQQ4.js.map → chunk-G24KZRSA.js.map} +1 -1
- package/dist/{chunk-MVAPK2BX.js → chunk-IACR5LEM.js} +3 -3
- package/dist/{chunk-MVAPK2BX.js.map → chunk-IACR5LEM.js.map} +1 -1
- package/dist/{chunk-U2AC6JUP.cjs → chunk-J2UROOIG.cjs} +2 -27
- package/dist/chunk-J2UROOIG.cjs.map +1 -0
- package/dist/{chunk-V2UUGUY4.cjs → chunk-KKK3FZ4A.cjs} +6 -6
- package/dist/{chunk-V2UUGUY4.cjs.map → chunk-KKK3FZ4A.cjs.map} +1 -1
- package/dist/{chunk-ZNW6V4Y6.cjs → chunk-LKFET5A3.cjs} +23 -2
- package/dist/chunk-LKFET5A3.cjs.map +1 -0
- package/dist/{chunk-YMA4S2WO.js → chunk-MZ2FGBLZ.js} +33 -11
- package/dist/chunk-MZ2FGBLZ.js.map +1 -0
- package/dist/{chunk-LQYQHXIW.cjs → chunk-N47KLTKD.cjs} +163 -119
- package/dist/chunk-N47KLTKD.cjs.map +1 -0
- package/dist/{chunk-53CBTBWO.cjs → chunk-P6H23T43.cjs} +33 -11
- package/dist/chunk-P6H23T43.cjs.map +1 -0
- package/dist/{chunk-YPJ5NH5N.cjs → chunk-QI7WE46I.cjs} +29 -6
- package/dist/chunk-QI7WE46I.cjs.map +1 -0
- package/dist/{chunk-H5GOSXSC.cjs → chunk-QIRDQZYL.cjs} +4 -4
- package/dist/{chunk-H5GOSXSC.cjs.map → chunk-QIRDQZYL.cjs.map} +1 -1
- package/dist/{chunk-7FHZ4VQX.js → chunk-SAVIWMZB.js} +3 -3
- package/dist/{chunk-7FHZ4VQX.js.map → chunk-SAVIWMZB.js.map} +1 -1
- package/dist/{chunk-UPRJR6IP.js → chunk-UCBJBJ27.js} +3 -25
- package/dist/chunk-UCBJBJ27.js.map +1 -0
- package/dist/chunk-UFLD2HEV.js +35 -0
- package/dist/chunk-UFLD2HEV.js.map +1 -0
- package/dist/{chunk-GTKFV7O5.js → chunk-WFC26L6Y.js} +23 -2
- package/dist/chunk-WFC26L6Y.js.map +1 -0
- package/dist/{chunk-OHBIUXKM.js → chunk-WG7R5W6R.js} +4 -4
- package/dist/{chunk-OHBIUXKM.js.map → chunk-WG7R5W6R.js.map} +1 -1
- package/dist/{chunk-ODTZ7HX3.js → chunk-WLZ7XRWH.js} +25 -15
- package/dist/chunk-WLZ7XRWH.js.map +1 -0
- package/dist/{chunk-HJBMA5MB.cjs → chunk-WNTAPVU5.cjs} +47 -6
- package/dist/chunk-WNTAPVU5.cjs.map +1 -0
- package/dist/{chunk-GJ6RK75E.js → chunk-YJDH3CKG.js} +29 -6
- package/dist/chunk-YJDH3CKG.js.map +1 -0
- package/dist/{chunk-CTCGWIUD.cjs → chunk-Z4BCLVTI.cjs} +5 -5
- package/dist/{chunk-CTCGWIUD.cjs.map → chunk-Z4BCLVTI.cjs.map} +1 -1
- package/dist/{chunk-2QKTVKH3.js → chunk-ZHPWGIUX.js} +48 -8
- package/dist/chunk-ZHPWGIUX.js.map +1 -0
- package/dist/{compact-session-FUJDVF7B.js → compact-session-QGDNP45U.js} +4 -4
- package/dist/{compact-session-FUJDVF7B.js.map → compact-session-QGDNP45U.js.map} +1 -1
- package/dist/{compact-session-LEWF554G.cjs → compact-session-YHFQIXV5.cjs} +12 -12
- package/dist/{compact-session-LEWF554G.cjs.map → compact-session-YHFQIXV5.cjs.map} +1 -1
- package/dist/context/index.cjs +7 -7
- package/dist/context/index.js +3 -3
- package/dist/{context-VMIE4BMD.cjs → context-LCKNH2XI.cjs} +7 -6
- package/dist/{context-VMIE4BMD.cjs.map → context-LCKNH2XI.cjs.map} +1 -1
- package/dist/context-MZSKGKYR.js +7 -0
- package/dist/{context-FDOON2DB.js.map → context-MZSKGKYR.js.map} +1 -1
- package/dist/cron.cjs +15 -14
- package/dist/cron.js +14 -13
- package/dist/eval.cjs +14 -13
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +13 -12
- package/dist/eval.js.map +1 -1
- package/dist/{fs-session-store-IN7JTTXD.js → fs-session-store-4BHGIWRE.js} +4 -4
- package/dist/{fs-session-store-IN7JTTXD.js.map → fs-session-store-4BHGIWRE.js.map} +1 -1
- package/dist/{fs-session-store-3MOJQGP2.cjs → fs-session-store-XZ7ZTB3A.cjs} +5 -5
- package/dist/{fs-session-store-3MOJQGP2.cjs.map → fs-session-store-XZ7ZTB3A.cjs.map} +1 -1
- package/dist/{index-manager-WC5ZVJWO.cjs → index-manager-J2QIDI6I.cjs} +5 -4
- package/dist/{index-manager-WC5ZVJWO.cjs.map → index-manager-J2QIDI6I.cjs.map} +1 -1
- package/dist/{index-manager-WBIMDVQT.js → index-manager-WYESAVTX.js} +4 -3
- package/dist/{index-manager-WBIMDVQT.js.map → index-manager-WYESAVTX.js.map} +1 -1
- package/dist/index.cjs +44 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -18
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-WQGGMCQY.cjs → inject-session-MLCJMYDG.cjs} +7 -7
- package/dist/{inject-session-WQGGMCQY.cjs.map → inject-session-MLCJMYDG.cjs.map} +1 -1
- package/dist/{inject-session-BJMJH5BX.js → inject-session-RBQZ45UM.js} +5 -5
- package/dist/{inject-session-BJMJH5BX.js.map → inject-session-RBQZ45UM.js.map} +1 -1
- package/dist/internal/memory/storage/markdown-store.d.ts +13 -0
- package/dist/internal/persistence/index.cjs +17 -16
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +2 -1
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/persistence/paths.d.cts +42 -0
- package/dist/internal/persistence/paths.d.ts +42 -0
- package/dist/internal/persistence/session-transcript.d.cts +40 -1
- package/dist/internal/persistence/session-transcript.d.ts +40 -1
- package/dist/internal/runtime/plugins/plugin-bundles.d.ts +19 -0
- package/dist/persistence.cjs +4 -4
- package/dist/persistence.js +1 -1
- package/dist/project.cjs +3 -3
- package/dist/project.js +1 -1
- package/dist/session-transcript-HF5GEU5M.cjs +63 -0
- package/dist/{session-transcript-JXHFTB7G.cjs.map → session-transcript-HF5GEU5M.cjs.map} +1 -1
- package/dist/session-transcript-P462ZRHX.js +6 -0
- package/dist/{session-transcript-AKDYYGXQ.js.map → session-transcript-P462ZRHX.js.map} +1 -1
- package/dist/subagents-loader-6ATCDEKN.js +8 -0
- package/dist/{subagents-loader-J54ESLDV.js.map → subagents-loader-6ATCDEKN.js.map} +1 -1
- package/dist/subagents-loader-X5QKODCL.cjs +17 -0
- package/dist/{subagents-loader-AZIXJ7D3.cjs.map → subagents-loader-X5QKODCL.cjs.map} +1 -1
- package/dist/subagents-loader.cjs +3 -2
- package/dist/subagents-loader.cjs.map +1 -1
- package/dist/subagents-loader.js +2 -1
- package/dist/subagents-loader.js.map +1 -1
- package/docs/error-codes.md +19 -19
- package/docs/harness-capability-map.md +1 -1
- package/package.json +5 -9
- package/dist/agent-session-store-P6V3FINW.js +0 -7
- package/dist/agent-session-store-ZJ3JSRS4.cjs +0 -24
- package/dist/chunk-2QKTVKH3.js.map +0 -1
- package/dist/chunk-53CBTBWO.cjs.map +0 -1
- package/dist/chunk-6VLKVX7O.cjs.map +0 -1
- package/dist/chunk-DZBSJX6J.js.map +0 -1
- package/dist/chunk-GJ6RK75E.js.map +0 -1
- package/dist/chunk-GTKFV7O5.js.map +0 -1
- package/dist/chunk-HJBMA5MB.cjs.map +0 -1
- package/dist/chunk-JHPGF3FP.cjs.map +0 -1
- package/dist/chunk-KBXWEWKS.js.map +0 -1
- package/dist/chunk-LQYQHXIW.cjs.map +0 -1
- package/dist/chunk-ODTZ7HX3.js.map +0 -1
- package/dist/chunk-U2AC6JUP.cjs.map +0 -1
- package/dist/chunk-UPRJR6IP.js.map +0 -1
- package/dist/chunk-YMA4S2WO.js.map +0 -1
- package/dist/chunk-YPJ5NH5N.cjs.map +0 -1
- package/dist/chunk-ZNW6V4Y6.cjs.map +0 -1
- package/dist/context-FDOON2DB.js +0 -6
- package/dist/session-transcript-AKDYYGXQ.js +0 -6
- package/dist/session-transcript-JXHFTB7G.cjs +0 -51
- package/dist/subagents-loader-AZIXJ7D3.cjs +0 -16
- package/dist/subagents-loader-J54ESLDV.js +0 -7
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKKK3FZ4A_cjs = require('./chunk-KKK3FZ4A.cjs');
|
|
4
4
|
var chunk4OTIXDMU_cjs = require('./chunk-4OTIXDMU.cjs');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
var
|
|
5
|
+
require('./chunk-Z4BCLVTI.cjs');
|
|
6
|
+
var chunkBUIK7GUA_cjs = require('./chunk-BUIK7GUA.cjs');
|
|
7
7
|
require('./chunk-I6TGFUCO.cjs');
|
|
8
8
|
require('./chunk-JTB5Q42C.cjs');
|
|
9
9
|
require('./chunk-NUKRL3I6.cjs');
|
|
10
10
|
|
|
11
11
|
// src/internal/session/inject-session.ts
|
|
12
12
|
async function injectSessionTurn(opts) {
|
|
13
|
-
await
|
|
13
|
+
await chunkKKK3FZ4A_cjs.enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {
|
|
14
14
|
const prior = await opts.store.readRecords(opts.loc.agentId);
|
|
15
|
-
const transcript =
|
|
15
|
+
const transcript = chunkBUIK7GUA_cjs.SessionTranscript.fromRecords(prior, {
|
|
16
16
|
cwd: opts.loc.cwd,
|
|
17
17
|
sessionId: opts.sessionId,
|
|
18
18
|
model: opts.loc.model ?? "unknown"
|
|
@@ -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-MLCJMYDG.cjs.map
|
|
29
|
+
//# sourceMappingURL=inject-session-MLCJMYDG.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-MLCJMYDG.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"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { enqueueSessionWrite } from './chunk-
|
|
1
|
+
import { enqueueSessionWrite } from './chunk-WG7R5W6R.js';
|
|
2
2
|
import { invalidateSessionCache } from './chunk-WTMU7J4U.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { SessionTranscript } from './chunk-
|
|
3
|
+
import './chunk-G24KZRSA.js';
|
|
4
|
+
import { SessionTranscript } from './chunk-FKMUFNQE.js';
|
|
5
5
|
import './chunk-VF7EWVDG.js';
|
|
6
6
|
import './chunk-T7XEKOVW.js';
|
|
7
7
|
import './chunk-T7O6K6PX.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-RBQZ45UM.js.map
|
|
27
|
+
//# sourceMappingURL=inject-session-RBQZ45UM.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-RBQZ45UM.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,5 +1,18 @@
|
|
|
1
1
|
import { type MemoryConfig, type MemoryFact } from "../types.js";
|
|
2
2
|
export declare function memoryDir(cwd: string): string;
|
|
3
|
+
/**
|
|
4
|
+
* Where the Claude Code CLI keeps THIS project's memories.
|
|
5
|
+
*
|
|
6
|
+
* `<claudeHome>/projects/<encoded-cwd>/memory` — the same `encodeProjectDir` scheme the transcripts
|
|
7
|
+
* already use, which is why no new encoding is invented here. `CLAUDE_CONFIG_DIR` names the home
|
|
8
|
+
* when set (the CLI's own variable); `~/.claude` otherwise.
|
|
9
|
+
*
|
|
10
|
+
* Read, never written. Writing here by default would relocate every existing consumer's memories,
|
|
11
|
+
* and an additive change must not move what is already on disk — so this is the direction that
|
|
12
|
+
* costs nothing: a memory the CLI wrote becomes visible, and a memory the SDK wrote stays where the
|
|
13
|
+
* SDK put it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function claudeProjectMemoryDir(cwd: string): string;
|
|
3
16
|
export declare function memoryMdPath(cwd: string): string;
|
|
4
17
|
export declare function notesDir(cwd: string): string;
|
|
5
18
|
/**
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkVTYY7XL5_cjs = require('../../chunk-VTYY7XL5.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkJ2UROOIG_cjs = require('../../chunk-J2UROOIG.cjs');
|
|
5
5
|
var chunkSKXBJ2NU_cjs = require('../../chunk-SKXBJ2NU.cjs');
|
|
6
6
|
var chunk2ADR2GSO_cjs = require('../../chunk-2ADR2GSO.cjs');
|
|
7
7
|
var chunkZF2LDKQQ_cjs = require('../../chunk-ZF2LDKQQ.cjs');
|
|
8
8
|
var chunkI6TGFUCO_cjs = require('../../chunk-I6TGFUCO.cjs');
|
|
9
|
+
var chunkAQO3NSRG_cjs = require('../../chunk-AQO3NSRG.cjs');
|
|
9
10
|
require('../../chunk-K3FW2XZD.cjs');
|
|
10
11
|
require('../../chunk-JTB5Q42C.cjs');
|
|
11
12
|
require('../../chunk-NUKRL3I6.cjs');
|
|
@@ -40,29 +41,17 @@ Object.defineProperty(exports, "PersistenceSchema", {
|
|
|
40
41
|
enumerable: true,
|
|
41
42
|
get: function () { return chunkVTYY7XL5_cjs.PersistenceSchema; }
|
|
42
43
|
});
|
|
43
|
-
Object.defineProperty(exports, "displayTheokitHome", {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () { return chunkU2AC6JUP_cjs.displayTheokitHome; }
|
|
46
|
-
});
|
|
47
|
-
Object.defineProperty(exports, "getProfilesRoot", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: function () { return chunkU2AC6JUP_cjs.getProfilesRoot; }
|
|
50
|
-
});
|
|
51
|
-
Object.defineProperty(exports, "getTheokitHome", {
|
|
52
|
-
enumerable: true,
|
|
53
|
-
get: function () { return chunkU2AC6JUP_cjs.getTheokitHome; }
|
|
54
|
-
});
|
|
55
44
|
Object.defineProperty(exports, "migrateSchema", {
|
|
56
45
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkJ2UROOIG_cjs.migrateSchema; }
|
|
58
47
|
});
|
|
59
48
|
Object.defineProperty(exports, "readVersionedJson", {
|
|
60
49
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkJ2UROOIG_cjs.readVersionedJson; }
|
|
62
51
|
});
|
|
63
52
|
Object.defineProperty(exports, "writeVersionedJson", {
|
|
64
53
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkJ2UROOIG_cjs.writeVersionedJson; }
|
|
66
55
|
});
|
|
67
56
|
Object.defineProperty(exports, "applyWalWithFallback", {
|
|
68
57
|
enumerable: true,
|
|
@@ -120,6 +109,18 @@ Object.defineProperty(exports, "replaceFileAtomic", {
|
|
|
120
109
|
enumerable: true,
|
|
121
110
|
get: function () { return chunkI6TGFUCO_cjs.replaceFileAtomic; }
|
|
122
111
|
});
|
|
112
|
+
Object.defineProperty(exports, "displayTheokitHome", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () { return chunkAQO3NSRG_cjs.displayTheokitHome; }
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "getProfilesRoot", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () { return chunkAQO3NSRG_cjs.getProfilesRoot; }
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "getTheokitHome", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () { return chunkAQO3NSRG_cjs.getTheokitHome; }
|
|
123
|
+
});
|
|
123
124
|
exports.casUpdate = casUpdate;
|
|
124
125
|
exports.createExclusive = createExclusive;
|
|
125
126
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":["open"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":["open"],"mappings":";;;;;;;;;;;;;;AAwDA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAMA,aAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACdO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.cjs","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS not honoring O_EXCL is documented (D61 — same stance as\n * `withFileLock`); the SDK target is ext4/APFS/NTFS.\n *\n * @internal\n */\n\nimport { open } from \"node:fs/promises\";\n\nexport interface CreateExclusiveOptions {\n /** Unix mode for the new file (default 0o600 — owner-only). */\n mode?: number;\n}\n\n/**\n * Create `path` holding `data`, but only if it does not exist yet. Returns `true` when this call\n * created it, `false` when it was already there.\n *\n * The check and the create are one `open(path, \"wx\")` syscall, so of N processes racing to create\n * the same path exactly one gets `true` — no window between testing and writing. The content is\n * written after the create, so the `false` branch tells you the file exists, not that another\n * writer has finished filling it.\n *\n * Only `EEXIST` becomes `false`. Every other error propagates: a missing parent directory is\n * `ENOENT`, an unwritable one `EACCES`. This never creates directories.\n *\n * The file is created with mode 0600 unless `options.mode` says otherwise, and the mode is\n * subject to the process umask. That default is deliberate — the callers are token files,\n * lockfiles and PID files, and 0644 under a typical umask would make them world-readable.\n *\n * **Choosing between this and the locks.** `createExclusive` claims a NAME once and is the right\n * tool for first-writer-wins: seeding a config, electing a single owner, writing a credential\n * exactly once. It cannot guard repeated updates, because a file that already exists always loses.\n * For read-modify-write on a path several writers touch, take a lock instead —\n * {@link withFileLock} across processes, `withCwdMutex` when the writers are all in this one. For\n * an in-place update guarded by a version column in SQLite, `casUpdate` is the equivalent\n * primitive.\n *\n * Atomicity is the filesystem's `O_EXCL`, which NFS does not reliably honor; the SDK targets\n * ext4, APFS and NTFS.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport async function createExclusive(\n path: string,\n data: string | Uint8Array,\n options?: CreateExclusiveOptions,\n): Promise<boolean> {\n const mode = options?.mode ?? 0o600;\n try {\n const handle = await open(path, \"wx\", mode);\n try {\n await handle.writeFile(data);\n return true;\n } finally {\n await handle.close();\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"EEXIST\") {\n return false;\n }\n throw err;\n }\n}\n","/**\n * SQLite optimistic compare-and-swap (ADR D83).\n *\n * `casUpdate(db, sql, params, expectedChanges)` executes a prepared\n * UPDATE and returns true if `result.changes === expectedChanges`.\n * Caller provides the full SQL (including `WHERE version = ?` predicate);\n * helper does NOT generate SQL — DRY at the level of \"wrap the\n * convention\", not \"build queries\".\n *\n * Use case canonical (Hermes `kanban_db.py:1922-1934`):\n *\n * const won = casUpdate(\n * db,\n * \"UPDATE registry SET status = ?, version = version + 1 WHERE id = ? AND version = ?\",\n * [\"running\", \"agent-foo\", 3],\n * );\n * if (!won) { ... re-read and retry ... }\n *\n * Helper does NOT retry — caller responsible for backoff (avoids hidden\n * loops). Helper does NOT cache prepared statements — `better-sqlite3`\n * caches internally; SDK use is one-shot per mutation, not hot loops.\n *\n * NOTE — no internal-visibility tag in this block. `tsconfig.base.json` sets `stripInternal: true`,\n * and TypeScript scans EVERY leading comment range of the declaration that follows, including the\n * import right below this one. The tag that used to sit here deleted that import from the emitted\n * `.d.ts`, leaving the types it binds unresolvable for any consumer running type-aware lint\n * (usetheodev/theokit-sdk#283 records the same trap on a declaration).\n */\n\nimport type Database from \"better-sqlite3\";\n\ntype DatabaseInstance = InstanceType<typeof Database>;\n\n/**\n * Run an UPDATE and report whether it changed exactly the number of rows you expected — the\n * optimistic-concurrency equivalent of taking a lock.\n *\n * `sql` is yours, in full, including the guard that makes it a compare-and-swap: the\n * `WHERE ... AND version = ?` predicate and the `SET version = version + 1` that closes it. This\n * function generates nothing. It prepares the statement, runs it with `params`, and compares\n * `changes` against `expectedChanges` (default 1).\n *\n * `false` means the guard did not match — someone else moved the row first, or the id does not\n * exist. Those two are indistinguishable here; if you need to tell them apart, re-read the row.\n * A `false` return means NOTHING was written, so the caller owns the re-read-and-retry, with\n * whatever backoff it wants. There is no retry loop hidden in here, by design.\n *\n * SQL errors propagate — bad syntax, a closed database, a constraint violation, a busy writer.\n * Only the row-count mismatch is reported as `false`.\n *\n * Runs as a single implicit transaction, so no explicit BEGIN is needed for one statement. Wrap\n * the call yourself when the swap has to commit together with other writes.\n *\n * **Choosing between this and the locks.** `casUpdate` never blocks and never waits: the loser\n * finds out immediately and decides what to do. Prefer it when the contended state is already a\n * row with a version column. When the contended state is a FILE, there is no version column to\n * swap on — use `withFileLock` across processes, or `withCwdMutex` within one. When the goal is\n * to create something exactly once rather than update it, `createExclusive` is the primitive.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function casUpdate(\n db: DatabaseInstance,\n sql: string,\n params: ReadonlyArray<unknown>,\n expectedChanges: number = 1,\n): boolean {\n const stmt = db.prepare(sql);\n const result = stmt.run(...(params as unknown[]));\n return result.changes === expectedChanges;\n}\n"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export { PersistenceSchema } from '../../chunk-HY66GLM6.js';
|
|
2
|
-
export {
|
|
2
|
+
export { migrateSchema, readVersionedJson, writeVersionedJson } from '../../chunk-UCBJBJ27.js';
|
|
3
3
|
export { applyWalWithFallback, containsCjk, isCorruptionError, openSqliteResilient, sanitizeFts5Query } from '../../chunk-CQ2TQ32Y.js';
|
|
4
4
|
export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds, withFileLock } from '../../chunk-CV7XMBHP.js';
|
|
5
5
|
export { withCwdMutex } from '../../chunk-Q5EWJPRY.js';
|
|
6
6
|
export { atomicWriteJson, atomicWriteText, replaceFileAtomic } from '../../chunk-VF7EWVDG.js';
|
|
7
|
+
export { displayTheokitHome, getProfilesRoot, getTheokitHome } from '../../chunk-UFLD2HEV.js';
|
|
7
8
|
import '../../chunk-IDCKSLYH.js';
|
|
8
9
|
import '../../chunk-T7XEKOVW.js';
|
|
9
10
|
import '../../chunk-T7O6K6PX.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/internal/persistence/exclusive-create.ts","../../../src/internal/persistence/sqlite-cas.ts"],"names":[],"mappings":";;;;;;;;;;;;AAwDA,eAAsB,eAAA,CACpB,IAAA,EACA,IAAA,EACA,OAAA,EACkB;AAClB,EAAA,MAAM,IAAA,GAAO,SAAS,IAAA,IAAQ,GAAA;AAC9B,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,MAAM,IAAA,CAAK,IAAA,EAAM,MAAM,IAAI,CAAA;AAC1C,IAAA,IAAI;AACF,MAAA,MAAM,MAAA,CAAO,UAAU,IAAI,CAAA;AAC3B,MAAA,OAAO,IAAA;AAAA,IACT,CAAA,SAAE;AACA,MAAA,MAAM,OAAO,KAAA,EAAM;AAAA,IACrB;AAAA,EACF,SAAS,GAAA,EAAK;AACZ,IAAA,IAAK,GAAA,CAA8B,SAAS,QAAA,EAAU;AACpD,MAAA,OAAO,KAAA;AAAA,IACT;AACA,IAAA,MAAM,GAAA;AAAA,EACR;AACF;;;ACdO,SAAS,SAAA,CACd,EAAA,EACA,GAAA,EACA,MAAA,EACA,kBAA0B,CAAA,EACjB;AACT,EAAA,MAAM,IAAA,GAAO,EAAA,CAAG,OAAA,CAAQ,GAAG,CAAA;AAC3B,EAAA,MAAM,MAAA,GAAS,IAAA,CAAK,GAAA,CAAI,GAAI,MAAoB,CAAA;AAChD,EAAA,OAAO,OAAO,OAAA,KAAY,eAAA;AAC5B","file":"index.js","sourcesContent":["/**\n * O_EXCL exclusive file creation (ADR D82).\n *\n * `createExclusive(path, data, { mode })` creates a file in a single\n * syscall (`open(path, \"wx\", mode)`). Returns `true` if created, `false`\n * if it already existed (EEXIST swallowed — caller decides). All other\n * errors propagate.\n *\n * Default mode is 0o600 (owner-only) — EC-2 fix from edge-case review:\n * token files, lockfiles, and PID files MUST NOT default to world-\n * readable 0o644 under typical umask 022. Callers writing non-sensitive\n * files can pass `mode: 0o644` explicitly.\n *\n * NFS not honoring O_EXCL is documented (D61 — same stance as\n * `withFileLock`); the SDK target is ext4/APFS/NTFS.\n *\n * @internal\n */\n\nimport { open } from \"node:fs/promises\";\n\nexport interface CreateExclusiveOptions {\n /** Unix mode for the new file (default 0o600 — owner-only). */\n mode?: number;\n}\n\n/**\n * Create `path` holding `data`, but only if it does not exist yet. Returns `true` when this call\n * created it, `false` when it was already there.\n *\n * The check and the create are one `open(path, \"wx\")` syscall, so of N processes racing to create\n * the same path exactly one gets `true` — no window between testing and writing. The content is\n * written after the create, so the `false` branch tells you the file exists, not that another\n * writer has finished filling it.\n *\n * Only `EEXIST` becomes `false`. Every other error propagates: a missing parent directory is\n * `ENOENT`, an unwritable one `EACCES`. This never creates directories.\n *\n * The file is created with mode 0600 unless `options.mode` says otherwise, and the mode is\n * subject to the process umask. That default is deliberate — the callers are token files,\n * lockfiles and PID files, and 0644 under a typical umask would make them world-readable.\n *\n * **Choosing between this and the locks.** `createExclusive` claims a NAME once and is the right\n * tool for first-writer-wins: seeding a config, electing a single owner, writing a credential\n * exactly once. It cannot guard repeated updates, because a file that already exists always loses.\n * For read-modify-write on a path several writers touch, take a lock instead —\n * {@link withFileLock} across processes, `withCwdMutex` when the writers are all in this one. For\n * an in-place update guarded by a version column in SQLite, `casUpdate` is the equivalent\n * primitive.\n *\n * Atomicity is the filesystem's `O_EXCL`, which NFS does not reliably honor; the SDK targets\n * ext4, APFS and NTFS.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport async function createExclusive(\n path: string,\n data: string | Uint8Array,\n options?: CreateExclusiveOptions,\n): Promise<boolean> {\n const mode = options?.mode ?? 0o600;\n try {\n const handle = await open(path, \"wx\", mode);\n try {\n await handle.writeFile(data);\n return true;\n } finally {\n await handle.close();\n }\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === \"EEXIST\") {\n return false;\n }\n throw err;\n }\n}\n","/**\n * SQLite optimistic compare-and-swap (ADR D83).\n *\n * `casUpdate(db, sql, params, expectedChanges)` executes a prepared\n * UPDATE and returns true if `result.changes === expectedChanges`.\n * Caller provides the full SQL (including `WHERE version = ?` predicate);\n * helper does NOT generate SQL — DRY at the level of \"wrap the\n * convention\", not \"build queries\".\n *\n * Use case canonical (Hermes `kanban_db.py:1922-1934`):\n *\n * const won = casUpdate(\n * db,\n * \"UPDATE registry SET status = ?, version = version + 1 WHERE id = ? AND version = ?\",\n * [\"running\", \"agent-foo\", 3],\n * );\n * if (!won) { ... re-read and retry ... }\n *\n * Helper does NOT retry — caller responsible for backoff (avoids hidden\n * loops). Helper does NOT cache prepared statements — `better-sqlite3`\n * caches internally; SDK use is one-shot per mutation, not hot loops.\n *\n * NOTE — no internal-visibility tag in this block. `tsconfig.base.json` sets `stripInternal: true`,\n * and TypeScript scans EVERY leading comment range of the declaration that follows, including the\n * import right below this one. The tag that used to sit here deleted that import from the emitted\n * `.d.ts`, leaving the types it binds unresolvable for any consumer running type-aware lint\n * (usetheodev/theokit-sdk#283 records the same trap on a declaration).\n */\n\nimport type Database from \"better-sqlite3\";\n\ntype DatabaseInstance = InstanceType<typeof Database>;\n\n/**\n * Run an UPDATE and report whether it changed exactly the number of rows you expected — the\n * optimistic-concurrency equivalent of taking a lock.\n *\n * `sql` is yours, in full, including the guard that makes it a compare-and-swap: the\n * `WHERE ... AND version = ?` predicate and the `SET version = version + 1` that closes it. This\n * function generates nothing. It prepares the statement, runs it with `params`, and compares\n * `changes` against `expectedChanges` (default 1).\n *\n * `false` means the guard did not match — someone else moved the row first, or the id does not\n * exist. Those two are indistinguishable here; if you need to tell them apart, re-read the row.\n * A `false` return means NOTHING was written, so the caller owns the re-read-and-retry, with\n * whatever backoff it wants. There is no retry loop hidden in here, by design.\n *\n * SQL errors propagate — bad syntax, a closed database, a constraint violation, a busy writer.\n * Only the row-count mismatch is reported as `false`.\n *\n * Runs as a single implicit transaction, so no explicit BEGIN is needed for one statement. Wrap\n * the call yourself when the swap has to commit together with other writes.\n *\n * **Choosing between this and the locks.** `casUpdate` never blocks and never waits: the loser\n * finds out immediately and decides what to do. Prefer it when the contended state is already a\n * row with a version column. When the contended state is a FILE, there is no version column to\n * swap on — use `withFileLock` across processes, or `withCwdMutex` within one. When the goal is\n * to create something exactly once rather than update it, `createExclusive` is the primitive.\n *\n * Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package\n * declares in `exports` but does NOT cover with its semver contract.\n */\nexport function casUpdate(\n db: DatabaseInstance,\n sql: string,\n params: ReadonlyArray<unknown>,\n expectedChanges: number = 1,\n): boolean {\n const stmt = db.prepare(sql);\n const result = stmt.run(...(params as unknown[]));\n return result.changes === expectedChanges;\n}\n"]}
|
|
@@ -48,6 +48,48 @@
|
|
|
48
48
|
* declares in `exports` but does NOT cover with its semver contract.
|
|
49
49
|
*/
|
|
50
50
|
export declare function getTheokitHome(cwd: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Every directory a project's configuration may be read from, in precedence order.
|
|
53
|
+
*
|
|
54
|
+
* `.theokit` first, then `.claude`. The order is the whole contract: a project that declares a
|
|
55
|
+
* skill, agent or rule in both means the explicit namespace to win, and a caller merging these
|
|
56
|
+
* roots must therefore keep the FIRST occurrence of a name rather than the last.
|
|
57
|
+
*
|
|
58
|
+
* `.claude` is read because the formats already agree and only the location did not. Measured
|
|
59
|
+
* 2026-08-26: the SKILL.md frontmatter this SDK requires (`name` + `description`) is exactly what
|
|
60
|
+
* the CLI writes, its hook config is the same JSON shape, and 59 of the CLI's agent declarations
|
|
61
|
+
* parse here unchanged. A repository set up for the CLI was failing on the directory name alone.
|
|
62
|
+
*
|
|
63
|
+
* NOT a rename of `.theokit`, and not a migration. Both are read, so nothing that works today stops
|
|
64
|
+
* working — which is why this returns a LIST and not a single resolved answer.
|
|
65
|
+
*
|
|
66
|
+
* Deliberately NOT affected by `THEOKIT_HOME`, and this is the one thing to remember about it.
|
|
67
|
+
* That variable relocates cwd-anchored SDK *state* — sessions, the credential store. A project's
|
|
68
|
+
* *configuration* is a property of the repository, not of where this SDK keeps its state, and the
|
|
69
|
+
* loaders that read these directories have always anchored on `cwd` directly. Honouring the
|
|
70
|
+
* override here would silently move where a project's agents and skills come from, which is a
|
|
71
|
+
* behaviour change wearing the costume of a refactor.
|
|
72
|
+
*
|
|
73
|
+
* Creates nothing and checks nothing; either path may not exist, and the caller owns that.
|
|
74
|
+
*
|
|
75
|
+
* Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package
|
|
76
|
+
* declares in `exports` but does NOT cover with its semver contract.
|
|
77
|
+
*/
|
|
78
|
+
export declare function projectConfigRoots(cwd: string): string[];
|
|
79
|
+
/**
|
|
80
|
+
* Every directory that may hold a plugin BUNDLE contributed by the Claude Code CLI.
|
|
81
|
+
*
|
|
82
|
+
* A CLI plugin is not a JS entry point — it is a folder whose `skills/` and `agents/` are what it
|
|
83
|
+
* exists to provide. Measured 2026-08-26 on an installed one: seven agents and three skills beside
|
|
84
|
+
* a manifest in `.claude-plugin/plugin.json`. Parsing that manifest and stopping there produced a
|
|
85
|
+
* plugin that loaded and did nothing.
|
|
86
|
+
*
|
|
87
|
+
* Project-scoped deliberately. The CLI also keeps plugins under `~/.claude/plugins/cache`, behind
|
|
88
|
+
* its own installer and enable/disable state — reproducing that is an installation system, not
|
|
89
|
+
* reading a project's configuration, and guessing at someone's enablement would run code they
|
|
90
|
+
* turned off.
|
|
91
|
+
*/
|
|
92
|
+
export declare function pluginBundleRoots(cwd: string): string[];
|
|
51
93
|
/**
|
|
52
94
|
* The directory holding every profile: always `~/.theokit/profiles`, from `os.homedir()`.
|
|
53
95
|
*
|
|
@@ -48,6 +48,48 @@
|
|
|
48
48
|
* declares in `exports` but does NOT cover with its semver contract.
|
|
49
49
|
*/
|
|
50
50
|
export declare function getTheokitHome(cwd: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Every directory a project's configuration may be read from, in precedence order.
|
|
53
|
+
*
|
|
54
|
+
* `.theokit` first, then `.claude`. The order is the whole contract: a project that declares a
|
|
55
|
+
* skill, agent or rule in both means the explicit namespace to win, and a caller merging these
|
|
56
|
+
* roots must therefore keep the FIRST occurrence of a name rather than the last.
|
|
57
|
+
*
|
|
58
|
+
* `.claude` is read because the formats already agree and only the location did not. Measured
|
|
59
|
+
* 2026-08-26: the SKILL.md frontmatter this SDK requires (`name` + `description`) is exactly what
|
|
60
|
+
* the CLI writes, its hook config is the same JSON shape, and 59 of the CLI's agent declarations
|
|
61
|
+
* parse here unchanged. A repository set up for the CLI was failing on the directory name alone.
|
|
62
|
+
*
|
|
63
|
+
* NOT a rename of `.theokit`, and not a migration. Both are read, so nothing that works today stops
|
|
64
|
+
* working — which is why this returns a LIST and not a single resolved answer.
|
|
65
|
+
*
|
|
66
|
+
* Deliberately NOT affected by `THEOKIT_HOME`, and this is the one thing to remember about it.
|
|
67
|
+
* That variable relocates cwd-anchored SDK *state* — sessions, the credential store. A project's
|
|
68
|
+
* *configuration* is a property of the repository, not of where this SDK keeps its state, and the
|
|
69
|
+
* loaders that read these directories have always anchored on `cwd` directly. Honouring the
|
|
70
|
+
* override here would silently move where a project's agents and skills come from, which is a
|
|
71
|
+
* behaviour change wearing the costume of a refactor.
|
|
72
|
+
*
|
|
73
|
+
* Creates nothing and checks nothing; either path may not exist, and the caller owns that.
|
|
74
|
+
*
|
|
75
|
+
* Semver-exempt: reachable via the `@theokit/sdk/internal/persistence` sub-path, which the package
|
|
76
|
+
* declares in `exports` but does NOT cover with its semver contract.
|
|
77
|
+
*/
|
|
78
|
+
export declare function projectConfigRoots(cwd: string): string[];
|
|
79
|
+
/**
|
|
80
|
+
* Every directory that may hold a plugin BUNDLE contributed by the Claude Code CLI.
|
|
81
|
+
*
|
|
82
|
+
* A CLI plugin is not a JS entry point — it is a folder whose `skills/` and `agents/` are what it
|
|
83
|
+
* exists to provide. Measured 2026-08-26 on an installed one: seven agents and three skills beside
|
|
84
|
+
* a manifest in `.claude-plugin/plugin.json`. Parsing that manifest and stopping there produced a
|
|
85
|
+
* plugin that loaded and did nothing.
|
|
86
|
+
*
|
|
87
|
+
* Project-scoped deliberately. The CLI also keeps plugins under `~/.claude/plugins/cache`, behind
|
|
88
|
+
* its own installer and enable/disable state — reproducing that is an installation system, not
|
|
89
|
+
* reading a project's configuration, and guessing at someone's enablement would run code they
|
|
90
|
+
* turned off.
|
|
91
|
+
*/
|
|
92
|
+
export declare function pluginBundleRoots(cwd: string): string[];
|
|
51
93
|
/**
|
|
52
94
|
* The directory holding every profile: always `~/.theokit/profiles`, from `os.homedir()`.
|
|
53
95
|
*
|
|
@@ -81,8 +81,47 @@ export declare function defaultBaseDir(): string;
|
|
|
81
81
|
* paths without a leading tilde pass through untouched.
|
|
82
82
|
*/
|
|
83
83
|
export declare function expandTilde(p: string): string;
|
|
84
|
-
/**
|
|
84
|
+
/** Is this id already a canonical UUID, and therefore usable as a filename verbatim? */
|
|
85
|
+
export declare function isSessionUuid(id: string): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* The transcript filename for an agent id — always a UUID.
|
|
88
|
+
*
|
|
89
|
+
* #400: the Claude Code CLI resumes a transcript ONLY when its basename is a UUID. Measured against
|
|
90
|
+
* CLI 2.1.236: `<uuid>.jsonl` resumes; `agent-<uuid>.jsonl` and `billing-bot.jsonl` are both ignored,
|
|
91
|
+
* with no error — the session simply is not offered. So a session written under a human-readable
|
|
92
|
+
* agent id was invisible to `claude --continue`, which is the interoperability this project claims
|
|
93
|
+
* as its difference from a proprietary session store.
|
|
94
|
+
*
|
|
95
|
+
* An id that is ALREADY a UUID passes through verbatim, so a transcript Claude Code wrote keeps its
|
|
96
|
+
* own name and the two directions stay symmetric. Anything else is derived with a UUIDv8, which is
|
|
97
|
+
* deterministic: the same agent id always yields the same filename, so nothing has to be persisted
|
|
98
|
+
* to map one back to the other.
|
|
99
|
+
*
|
|
100
|
+
* A DERIVED name is version 8 — RFC 9562's slot for a UUID whose bits come from an
|
|
101
|
+
* implementation-defined scheme, which is exactly what this is. The obvious alternative was v5, but
|
|
102
|
+
* RFC 4122 fixes v5's hash to SHA-1, and reaching for SHA-1 in 2026 means either shipping a weak
|
|
103
|
+
* primitive or arguing with every scanner that flags it, forever. v8 lets the hash be SHA-256 and
|
|
104
|
+
* lets the version nibble say honestly that this is our scheme rather than a standard one.
|
|
105
|
+
*
|
|
106
|
+
* There is no security claim here either way — no secret, no signature, and nothing an attacker
|
|
107
|
+
* gains by colliding two agent ids inside one consumer's own directory. The hash is a naming
|
|
108
|
+
* function. The point of preferring SHA-256 is not that SHA-1 was exploitable here; it is that a
|
|
109
|
+
* weak primitive in the tree costs a permanent argument with every scanner that sees it.
|
|
110
|
+
*
|
|
111
|
+
* The version nibble was measured, not assumed: CLI 2.1.236 resumes a v8-named transcript exactly as
|
|
112
|
+
* it does a v4 one.
|
|
113
|
+
*/
|
|
114
|
+
export declare function sessionUuidFor(id: string): string;
|
|
115
|
+
/** The `.jsonl` path for a session: `<baseDir>/projects/<encoded-cwd>/<session-uuid>.jsonl`. */
|
|
85
116
|
export declare function transcriptPath(baseDir: string, cwd: string, sessionId: string): string;
|
|
117
|
+
/**
|
|
118
|
+
* The path this session used BEFORE #400 made transcript filenames UUIDs.
|
|
119
|
+
*
|
|
120
|
+
* Kept so an existing transcript is never orphaned: {@link FsSessionStore} prefers this file when it
|
|
121
|
+
* exists, so history written under the old scheme keeps accumulating in the same file instead of
|
|
122
|
+
* being silently abandoned for a fresh one under the new name.
|
|
123
|
+
*/
|
|
124
|
+
export declare function legacyTranscriptPath(baseDir: string, cwd: string, sessionId: string): string;
|
|
86
125
|
/** Write records as one JSONL line each (atomic; parent dir created). Returns the path. */
|
|
87
126
|
export declare function writeTranscript(path: string, records: readonly SessionRecord[]): Promise<string>;
|
|
88
127
|
/** Parse a transcript `.jsonl` into records; a missing file yields `[]`; malformed lines are skipped. */
|
|
@@ -81,8 +81,47 @@ export declare function defaultBaseDir(): string;
|
|
|
81
81
|
* paths without a leading tilde pass through untouched.
|
|
82
82
|
*/
|
|
83
83
|
export declare function expandTilde(p: string): string;
|
|
84
|
-
/**
|
|
84
|
+
/** Is this id already a canonical UUID, and therefore usable as a filename verbatim? */
|
|
85
|
+
export declare function isSessionUuid(id: string): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* The transcript filename for an agent id — always a UUID.
|
|
88
|
+
*
|
|
89
|
+
* #400: the Claude Code CLI resumes a transcript ONLY when its basename is a UUID. Measured against
|
|
90
|
+
* CLI 2.1.236: `<uuid>.jsonl` resumes; `agent-<uuid>.jsonl` and `billing-bot.jsonl` are both ignored,
|
|
91
|
+
* with no error — the session simply is not offered. So a session written under a human-readable
|
|
92
|
+
* agent id was invisible to `claude --continue`, which is the interoperability this project claims
|
|
93
|
+
* as its difference from a proprietary session store.
|
|
94
|
+
*
|
|
95
|
+
* An id that is ALREADY a UUID passes through verbatim, so a transcript Claude Code wrote keeps its
|
|
96
|
+
* own name and the two directions stay symmetric. Anything else is derived with a UUIDv8, which is
|
|
97
|
+
* deterministic: the same agent id always yields the same filename, so nothing has to be persisted
|
|
98
|
+
* to map one back to the other.
|
|
99
|
+
*
|
|
100
|
+
* A DERIVED name is version 8 — RFC 9562's slot for a UUID whose bits come from an
|
|
101
|
+
* implementation-defined scheme, which is exactly what this is. The obvious alternative was v5, but
|
|
102
|
+
* RFC 4122 fixes v5's hash to SHA-1, and reaching for SHA-1 in 2026 means either shipping a weak
|
|
103
|
+
* primitive or arguing with every scanner that flags it, forever. v8 lets the hash be SHA-256 and
|
|
104
|
+
* lets the version nibble say honestly that this is our scheme rather than a standard one.
|
|
105
|
+
*
|
|
106
|
+
* There is no security claim here either way — no secret, no signature, and nothing an attacker
|
|
107
|
+
* gains by colliding two agent ids inside one consumer's own directory. The hash is a naming
|
|
108
|
+
* function. The point of preferring SHA-256 is not that SHA-1 was exploitable here; it is that a
|
|
109
|
+
* weak primitive in the tree costs a permanent argument with every scanner that sees it.
|
|
110
|
+
*
|
|
111
|
+
* The version nibble was measured, not assumed: CLI 2.1.236 resumes a v8-named transcript exactly as
|
|
112
|
+
* it does a v4 one.
|
|
113
|
+
*/
|
|
114
|
+
export declare function sessionUuidFor(id: string): string;
|
|
115
|
+
/** The `.jsonl` path for a session: `<baseDir>/projects/<encoded-cwd>/<session-uuid>.jsonl`. */
|
|
85
116
|
export declare function transcriptPath(baseDir: string, cwd: string, sessionId: string): string;
|
|
117
|
+
/**
|
|
118
|
+
* The path this session used BEFORE #400 made transcript filenames UUIDs.
|
|
119
|
+
*
|
|
120
|
+
* Kept so an existing transcript is never orphaned: {@link FsSessionStore} prefers this file when it
|
|
121
|
+
* exists, so history written under the old scheme keeps accumulating in the same file instead of
|
|
122
|
+
* being silently abandoned for a fresh one under the new name.
|
|
123
|
+
*/
|
|
124
|
+
export declare function legacyTranscriptPath(baseDir: string, cwd: string, sessionId: string): string;
|
|
86
125
|
/** Write records as one JSONL line each (atomic; parent dir created). Returns the path. */
|
|
87
126
|
export declare function writeTranscript(path: string, records: readonly SessionRecord[]): Promise<string>;
|
|
88
127
|
/** Parse a transcript `.jsonl` into records; a missing file yields `[]`; malformed lines are skipped. */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locating the plugin bundles a project carries.
|
|
3
|
+
*
|
|
4
|
+
* Shared by the skills and subagents loaders, which both need the same answer to "which folders in
|
|
5
|
+
* this project are plugins" and would otherwise each grow their own copy of the directory walk.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Every plugin folder under the project's plugin roots.
|
|
11
|
+
*
|
|
12
|
+
* Returns the FOLDERS, not their contents — what a bundle contributes (`skills/`, `agents/`) is the
|
|
13
|
+
* caller's business, and a loader that also knew the layout would have to change whenever the other
|
|
14
|
+
* one did.
|
|
15
|
+
*
|
|
16
|
+
* A missing root is not an error: most projects carry no plugins, and treating their absence as a
|
|
17
|
+
* failure would make "none installed" indistinguishable from "the directory could not be read".
|
|
18
|
+
*/
|
|
19
|
+
export declare function pluginBundleDirs(cwd: string): Promise<string[]>;
|
package/dist/persistence.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkVTYY7XL5_cjs = require('./chunk-VTYY7XL5.cjs');
|
|
4
4
|
var chunk4I55V454_cjs = require('./chunk-4I55V454.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkBUIK7GUA_cjs = require('./chunk-BUIK7GUA.cjs');
|
|
6
6
|
var chunkSKXBJ2NU_cjs = require('./chunk-SKXBJ2NU.cjs');
|
|
7
7
|
var chunk2ADR2GSO_cjs = require('./chunk-2ADR2GSO.cjs');
|
|
8
8
|
var chunkZF2LDKQQ_cjs = require('./chunk-ZF2LDKQQ.cjs');
|
|
@@ -114,15 +114,15 @@ Object.defineProperty(exports, "sessionHasWriter", {
|
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "encodeProjectDir", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkBUIK7GUA_cjs.encodeProjectDir; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "transcriptPath", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkBUIK7GUA_cjs.transcriptPath; }
|
|
122
122
|
});
|
|
123
123
|
Object.defineProperty(exports, "transcriptRoot", {
|
|
124
124
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkBUIK7GUA_cjs.transcriptRoot; }
|
|
126
126
|
});
|
|
127
127
|
Object.defineProperty(exports, "applyWalWithFallback", {
|
|
128
128
|
enumerable: true,
|
package/dist/persistence.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { PersistenceSchema } from './chunk-HY66GLM6.js';
|
|
2
2
|
export { SessionBusyError, acquireSessionWriter, sessionHasWriter } from './chunk-44JAAH4X.js';
|
|
3
|
-
export { encodeProjectDir, transcriptPath, transcriptRoot } from './chunk-
|
|
3
|
+
export { encodeProjectDir, transcriptPath, transcriptRoot } from './chunk-FKMUFNQE.js';
|
|
4
4
|
export { applyWalWithFallback, isCorruptionError, openSqliteResilient, sanitizeFts5Query } from './chunk-CQ2TQ32Y.js';
|
|
5
5
|
export { JsonlParseError, appendJsonl, loadJsonl, readJsonlIds, withFileLock } from './chunk-CV7XMBHP.js';
|
|
6
6
|
export { withCwdMutex } from './chunk-Q5EWJPRY.js';
|
package/dist/project.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLKFET5A3_cjs = require('./chunk-LKFET5A3.cjs');
|
|
4
4
|
var chunkI6TGFUCO_cjs = require('./chunk-I6TGFUCO.cjs');
|
|
5
5
|
var chunkK3FW2XZD_cjs = require('./chunk-K3FW2XZD.cjs');
|
|
6
6
|
require('./chunk-JTB5Q42C.cjs');
|
|
@@ -12,7 +12,7 @@ var DEFAULT_FILENAME = "THEO.md";
|
|
|
12
12
|
async function readProjectInstructions(cwd, options) {
|
|
13
13
|
const filename = options?.filename ?? DEFAULT_FILENAME;
|
|
14
14
|
const scope = options?.scope ?? "nearest";
|
|
15
|
-
const paths =
|
|
15
|
+
const paths = chunkLKFET5A3_cjs.walkUpForFile(cwd, filename, options?.stopDir);
|
|
16
16
|
const files = [];
|
|
17
17
|
for (const path of paths) {
|
|
18
18
|
try {
|
|
@@ -31,7 +31,7 @@ function reduceContent(files, scope) {
|
|
|
31
31
|
}
|
|
32
32
|
async function writeProjectInstructions(cwd, content, options) {
|
|
33
33
|
const filename = options?.filename ?? DEFAULT_FILENAME;
|
|
34
|
-
if (!
|
|
34
|
+
if (!chunkLKFET5A3_cjs.isSafePattern(filename)) {
|
|
35
35
|
throw new chunkK3FW2XZD_cjs.ConfigurationError(
|
|
36
36
|
`writeProjectInstructions: unsafe filename ${JSON.stringify(filename)} (no path traversal, separators, or absolute paths)`,
|
|
37
37
|
{ code: "unsafe_filename" }
|
package/dist/project.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { walkUpForFile, isSafePattern } from './chunk-
|
|
1
|
+
import { walkUpForFile, isSafePattern } from './chunk-WFC26L6Y.js';
|
|
2
2
|
import { replaceFileAtomic } from './chunk-VF7EWVDG.js';
|
|
3
3
|
import { ConfigurationError } from './chunk-IDCKSLYH.js';
|
|
4
4
|
import './chunk-T7XEKOVW.js';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkBUIK7GUA_cjs = require('./chunk-BUIK7GUA.cjs');
|
|
4
|
+
require('./chunk-I6TGFUCO.cjs');
|
|
5
|
+
require('./chunk-JTB5Q42C.cjs');
|
|
6
|
+
require('./chunk-NUKRL3I6.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "SessionTranscript", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunkBUIK7GUA_cjs.SessionTranscript; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "defaultBaseDir", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return chunkBUIK7GUA_cjs.defaultBaseDir; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "encodeProjectDir", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return chunkBUIK7GUA_cjs.encodeProjectDir; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "expandTilde", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return chunkBUIK7GUA_cjs.expandTilde; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "isSessionUuid", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return chunkBUIK7GUA_cjs.isSessionUuid; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "legacyTranscriptPath", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return chunkBUIK7GUA_cjs.legacyTranscriptPath; }
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "readTranscript", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return chunkBUIK7GUA_cjs.readTranscript; }
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "reconstructMessages", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return chunkBUIK7GUA_cjs.reconstructMessages; }
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "safeSessionId", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return chunkBUIK7GUA_cjs.safeSessionId; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "sessionUuidFor", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return chunkBUIK7GUA_cjs.sessionUuidFor; }
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "transcriptPath", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () { return chunkBUIK7GUA_cjs.transcriptPath; }
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "transcriptRoot", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () { return chunkBUIK7GUA_cjs.transcriptRoot; }
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "writeTranscript", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return chunkBUIK7GUA_cjs.writeTranscript; }
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=session-transcript-HF5GEU5M.cjs.map
|
|
63
|
+
//# sourceMappingURL=session-transcript-HF5GEU5M.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"session-transcript-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"session-transcript-HF5GEU5M.cjs"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { SessionTranscript, defaultBaseDir, encodeProjectDir, expandTilde, isSessionUuid, legacyTranscriptPath, readTranscript, reconstructMessages, safeSessionId, sessionUuidFor, transcriptPath, transcriptRoot, writeTranscript } from './chunk-FKMUFNQE.js';
|
|
2
|
+
import './chunk-VF7EWVDG.js';
|
|
3
|
+
import './chunk-T7XEKOVW.js';
|
|
4
|
+
import './chunk-T7O6K6PX.js';
|
|
5
|
+
//# sourceMappingURL=session-transcript-P462ZRHX.js.map
|
|
6
|
+
//# sourceMappingURL=session-transcript-P462ZRHX.js.map
|