@theokit/sdk 5.6.0 → 5.7.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 +66 -0
- package/dist/{agent-G6g-uwcB.d.ts → agent-Bqzdhkqr.d.ts} +1 -1
- package/dist/{agent-82d_DrCL.d.cts → agent-Dya5SmhY.d.cts} +1 -1
- package/dist/{agent-JJZM2VIK.js → agent-EQ5HKTWV.js} +11 -10
- package/dist/{agent-JJZM2VIK.js.map → agent-EQ5HKTWV.js.map} +1 -1
- package/dist/{agent-47NS6ZVL.cjs → agent-KA63WDQH.cjs} +12 -11
- package/dist/{agent-47NS6ZVL.cjs.map → agent-KA63WDQH.cjs.map} +1 -1
- package/dist/agent.d.ts +11 -0
- package/dist/{chunk-VUHXC74Q.cjs → chunk-33A27NFX.cjs} +15 -15
- package/dist/{chunk-VUHXC74Q.cjs.map → chunk-33A27NFX.cjs.map} +1 -1
- package/dist/{chunk-HUDNLFY4.js → chunk-3VXQEQE4.js} +13 -4
- package/dist/chunk-3VXQEQE4.js.map +1 -0
- package/dist/{chunk-DZG77WU7.cjs → chunk-3XSWF5AP.cjs} +3 -3
- package/dist/{chunk-DZG77WU7.cjs.map → chunk-3XSWF5AP.cjs.map} +1 -1
- package/dist/{chunk-FPIY5CLV.js → chunk-6JG2RFGK.js} +3 -3
- package/dist/{chunk-FPIY5CLV.js.map → chunk-6JG2RFGK.js.map} +1 -1
- package/dist/{chunk-N2KAIZ5D.js → chunk-7C3HWGCW.js} +3 -19
- package/dist/chunk-7C3HWGCW.js.map +1 -0
- package/dist/{chunk-LD6HASA5.cjs → chunk-7KBNBPFK.cjs} +12 -2
- package/dist/chunk-7KBNBPFK.cjs.map +1 -0
- package/dist/{chunk-GCHZMH42.cjs → chunk-A575WPBL.cjs} +88 -84
- package/dist/chunk-A575WPBL.cjs.map +1 -0
- package/dist/{chunk-5NELQ6LB.js → chunk-A6PDYH55.js} +12 -3
- package/dist/chunk-A6PDYH55.js.map +1 -0
- package/dist/{chunk-2QKV4CGK.js → chunk-CZWN4C6A.js} +3 -3
- package/dist/{chunk-2QKV4CGK.js.map → chunk-CZWN4C6A.js.map} +1 -1
- package/dist/chunk-DQNI52VV.js +20 -0
- package/dist/chunk-DQNI52VV.js.map +1 -0
- package/dist/{chunk-52FDUJSV.cjs → chunk-E6QXZZKE.cjs} +8 -8
- package/dist/{chunk-52FDUJSV.cjs.map → chunk-E6QXZZKE.cjs.map} +1 -1
- package/dist/{chunk-EIOMN5VA.cjs → chunk-EFETPSJZ.cjs} +17 -8
- package/dist/chunk-EFETPSJZ.cjs.map +1 -0
- package/dist/{chunk-HG4UN4MN.cjs → chunk-ER5BOIYD.cjs} +4 -4
- package/dist/{chunk-HG4UN4MN.cjs.map → chunk-ER5BOIYD.cjs.map} +1 -1
- package/dist/{chunk-2UXQASTX.js → chunk-FUUSIT2T.js} +16 -12
- package/dist/chunk-FUUSIT2T.js.map +1 -0
- package/dist/{chunk-7IZKTQ5G.cjs → chunk-GK3UG7YQ.cjs} +2 -21
- package/dist/chunk-GK3UG7YQ.cjs.map +1 -0
- package/dist/{chunk-GFFBXSQT.cjs → chunk-HNAYCTX4.cjs} +5 -5
- package/dist/{chunk-GFFBXSQT.cjs.map → chunk-HNAYCTX4.cjs.map} +1 -1
- package/dist/{chunk-KZSKIUXZ.js → chunk-N7VAE6DZ.js} +31 -3
- package/dist/chunk-N7VAE6DZ.js.map +1 -0
- package/dist/{chunk-7MMTZBTT.js → chunk-P5S3WCSZ.js} +3 -3
- package/dist/{chunk-7MMTZBTT.js.map → chunk-P5S3WCSZ.js.map} +1 -1
- package/dist/{chunk-BZ3YMAMP.js → chunk-R3LBRQAN.js} +3 -3
- package/dist/{chunk-BZ3YMAMP.js.map → chunk-R3LBRQAN.js.map} +1 -1
- package/dist/{chunk-STGSMJMJ.js → chunk-YRLI5DVC.js} +3 -3
- package/dist/{chunk-STGSMJMJ.js.map → chunk-YRLI5DVC.js.map} +1 -1
- package/dist/chunk-YYN6BB7R.cjs +24 -0
- package/dist/chunk-YYN6BB7R.cjs.map +1 -0
- package/dist/{chunk-C4ZQPWXJ.cjs → chunk-ZLMU5EU3.cjs} +33 -4
- package/dist/chunk-ZLMU5EU3.cjs.map +1 -0
- package/dist/{compact-session-7FMYJXQ7.cjs → compact-session-75KD2FCM.cjs} +15 -11
- package/dist/{compact-session-7FMYJXQ7.cjs.map → compact-session-75KD2FCM.cjs.map} +1 -1
- package/dist/{compact-session-YSEK7NQF.js → compact-session-QT6RJOKO.js} +3 -3
- package/dist/{compact-session-YSEK7NQF.js.map → compact-session-QT6RJOKO.js.map} +1 -1
- package/dist/context/index.cjs +11 -7
- package/dist/context/index.cjs.map +1 -1
- package/dist/context/index.js +7 -3
- package/dist/context/index.js.map +1 -1
- package/dist/{context-HR4KMXMA.cjs → context-7RP5JXGM.cjs} +7 -6
- package/dist/{context-HR4KMXMA.cjs.map → context-7RP5JXGM.cjs.map} +1 -1
- package/dist/context-OJIIXJCV.js +7 -0
- package/dist/{context-J5BJ3LBS.js.map → context-OJIIXJCV.js.map} +1 -1
- package/dist/{cron-DWv69ZSD.d.cts → cron-BwxDUscv.d.cts} +1 -1
- package/dist/{cron-GynWtAax.d.ts → cron-D8uB1Xh5.d.ts} +1 -1
- package/dist/cron.cjs +11 -10
- package/dist/cron.d.cts +2 -2
- package/dist/cron.d.ts +2 -2
- package/dist/cron.js +10 -9
- package/dist/eval.cjs +10 -9
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +9 -8
- package/dist/eval.js.map +1 -1
- package/dist/{index-manager-BBHDKMQS.cjs → index-manager-W7RHSL6G.cjs} +6 -6
- package/dist/{index-manager-BBHDKMQS.cjs.map → index-manager-W7RHSL6G.cjs.map} +1 -1
- package/dist/{index-manager-27WLNQEE.js → index-manager-Z4XMRVWQ.js} +5 -5
- package/dist/{index-manager-27WLNQEE.js.map → index-manager-Z4XMRVWQ.js.map} +1 -1
- package/dist/index.cjs +42 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -3
- package/dist/index.d.ts +32 -3
- package/dist/index.js +14 -13
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-PC73TMP2.cjs → inject-session-L6MIIELT.cjs} +4 -4
- package/dist/{inject-session-PC73TMP2.cjs.map → inject-session-L6MIIELT.cjs.map} +1 -1
- package/dist/{inject-session-J4LBWAPH.js → inject-session-XWWN4DAA.js} +3 -3
- package/dist/{inject-session-J4LBWAPH.js.map → inject-session-XWWN4DAA.js.map} +1 -1
- package/dist/internal/memory/storage/index.cjs +32 -32
- package/dist/internal/memory/storage/index.js +3 -3
- package/dist/internal/runtime/context/context-discovery.d.ts +27 -0
- package/dist/internal/session/compact-session.d.ts +36 -0
- package/dist/project.cjs +3 -3
- package/dist/project.js +1 -1
- package/dist/subagents-loader.d.cts +1 -1
- package/dist/subagents-loader.d.ts +1 -1
- package/dist/types/agent.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-2UXQASTX.js.map +0 -1
- package/dist/chunk-5NELQ6LB.js.map +0 -1
- package/dist/chunk-7IZKTQ5G.cjs.map +0 -1
- package/dist/chunk-C4ZQPWXJ.cjs.map +0 -1
- package/dist/chunk-EIOMN5VA.cjs.map +0 -1
- package/dist/chunk-GCHZMH42.cjs.map +0 -1
- package/dist/chunk-HUDNLFY4.js.map +0 -1
- package/dist/chunk-KZSKIUXZ.js.map +0 -1
- package/dist/chunk-LD6HASA5.cjs.map +0 -1
- package/dist/chunk-N2KAIZ5D.js.map +0 -1
- package/dist/context-J5BJ3LBS.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3XSWF5AP_cjs = require('./chunk-3XSWF5AP.cjs');
|
|
4
4
|
var chunkYJNYDJ2T_cjs = require('./chunk-YJNYDJ2T.cjs');
|
|
5
5
|
require('./chunk-YIFFF23U.cjs');
|
|
6
6
|
var chunkGZV6AVRL_cjs = require('./chunk-GZV6AVRL.cjs');
|
|
@@ -10,7 +10,7 @@ require('./chunk-6LHQPOMI.cjs');
|
|
|
10
10
|
|
|
11
11
|
// src/internal/session/inject-session.ts
|
|
12
12
|
async function injectSessionTurn(opts) {
|
|
13
|
-
await
|
|
13
|
+
await chunk3XSWF5AP_cjs.enqueueSessionWrite(opts.loc.cwd, opts.loc.agentId, async () => {
|
|
14
14
|
const prior = await opts.store.readRecords(opts.loc.agentId);
|
|
15
15
|
const transcript = chunkGZV6AVRL_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-L6MIIELT.cjs.map
|
|
29
|
+
//# sourceMappingURL=inject-session-L6MIIELT.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-L6MIIELT.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,4 +1,4 @@
|
|
|
1
|
-
import { enqueueSessionWrite } from './chunk-
|
|
1
|
+
import { enqueueSessionWrite } from './chunk-CZWN4C6A.js';
|
|
2
2
|
import { invalidateSessionCache } from './chunk-2XC6KDJM.js';
|
|
3
3
|
import './chunk-2WXHA33T.js';
|
|
4
4
|
import { SessionTranscript } from './chunk-JOFVLOFY.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-XWWN4DAA.js.map
|
|
27
|
+
//# sourceMappingURL=inject-session-XWWN4DAA.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-XWWN4DAA.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,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkE6QXZZKE_cjs = require('../../../chunk-E6QXZZKE.cjs');
|
|
4
4
|
var chunkTMKTSYDS_cjs = require('../../../chunk-TMKTSYDS.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkHNAYCTX4_cjs = require('../../../chunk-HNAYCTX4.cjs');
|
|
6
6
|
require('../../../chunk-KRD3GQAA.cjs');
|
|
7
7
|
require('../../../chunk-MUUQ2WFJ.cjs');
|
|
8
|
-
require('../../../chunk-
|
|
8
|
+
require('../../../chunk-7KBNBPFK.cjs');
|
|
9
9
|
require('../../../chunk-7A6535RA.cjs');
|
|
10
10
|
require('../../../chunk-SA6K24NB.cjs');
|
|
11
11
|
require('../../../chunk-GZV6AVRL.cjs');
|
|
@@ -19,23 +19,23 @@ require('../../../chunk-6LHQPOMI.cjs');
|
|
|
19
19
|
|
|
20
20
|
Object.defineProperty(exports, "appendDiaryEntry", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkE6QXZZKE_cjs.appendDiaryEntry; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "diaryPath", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkE6QXZZKE_cjs.diaryPath; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "entryHash", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkE6QXZZKE_cjs.entryHash; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "readAllSqliteFacts", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkE6QXZZKE_cjs.readAllSqliteFacts; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "renderDiaryEntry", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkE6QXZZKE_cjs.renderDiaryEntry; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "persistActiveMemoryTranscript", {
|
|
41
41
|
enumerable: true,
|
|
@@ -43,99 +43,99 @@ Object.defineProperty(exports, "persistActiveMemoryTranscript", {
|
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "MEMORY_INDEX_MAX_BYTES", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkHNAYCTX4_cjs.MEMORY_INDEX_MAX_BYTES; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "MEMORY_INDEX_MAX_LINES", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkHNAYCTX4_cjs.MEMORY_INDEX_MAX_LINES; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "appendFact", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkHNAYCTX4_cjs.appendFact; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "appendFactToMarkdown", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkHNAYCTX4_cjs.appendFactToMarkdown; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "asMemoryRoot", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkHNAYCTX4_cjs.asMemoryRoot; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "claudeProjectMemoryDir", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkHNAYCTX4_cjs.claudeProjectMemoryDir; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "collectMarkdownFiles", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkHNAYCTX4_cjs.collectMarkdownFiles; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "defaultIndexPath", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkHNAYCTX4_cjs.defaultIndexPath; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "discoverSessionFiles", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkHNAYCTX4_cjs.discoverSessionFiles; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "discoverWikiFiles", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkHNAYCTX4_cjs.discoverWikiFiles; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "indexBudgetWarning", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkHNAYCTX4_cjs.indexBudgetWarning; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "lanceStoragePath", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkHNAYCTX4_cjs.lanceStoragePath; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "memoryIndexRoot", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkHNAYCTX4_cjs.memoryIndexRoot; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "memoryMdPath", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkHNAYCTX4_cjs.memoryMdPath; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "memoryReadRoots", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkHNAYCTX4_cjs.memoryReadRoots; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "notesDir", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkHNAYCTX4_cjs.notesDir; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "projectMemoryDir", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkHNAYCTX4_cjs.projectMemoryDir; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "readFacts", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkHNAYCTX4_cjs.readFacts; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "readFactsFromMarkdown", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkHNAYCTX4_cjs.readFactsFromMarkdown; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "resolveMemoryRoot", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkHNAYCTX4_cjs.resolveMemoryRoot; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "sessionSummaryPath", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkHNAYCTX4_cjs.sessionSummaryPath; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "sessionsDir", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkHNAYCTX4_cjs.sessionsDir; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "wikiDir", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkHNAYCTX4_cjs.wikiDir; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "writeSessionSummary", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkHNAYCTX4_cjs.writeSessionSummary; }
|
|
139
139
|
});
|
|
140
140
|
//# sourceMappingURL=index.cjs.map
|
|
141
141
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { appendDiaryEntry, diaryPath, entryHash, readAllSqliteFacts, renderDiaryEntry } from '../../../chunk-
|
|
1
|
+
export { appendDiaryEntry, diaryPath, entryHash, readAllSqliteFacts, renderDiaryEntry } from '../../../chunk-YRLI5DVC.js';
|
|
2
2
|
export { persistActiveMemoryTranscript } from '../../../chunk-OR6XIWLB.js';
|
|
3
|
-
export { MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, appendFact, appendFactToMarkdown, asMemoryRoot, claudeProjectMemoryDir, collectMarkdownFiles, defaultIndexPath, discoverSessionFiles, discoverWikiFiles, indexBudgetWarning, lanceStoragePath, memoryIndexRoot, memoryMdPath, memoryReadRoots, notesDir, projectMemoryDir, readFacts, readFactsFromMarkdown, resolveMemoryRoot, sessionSummaryPath, sessionsDir, wikiDir, writeSessionSummary } from '../../../chunk-
|
|
3
|
+
export { MEMORY_INDEX_MAX_BYTES, MEMORY_INDEX_MAX_LINES, appendFact, appendFactToMarkdown, asMemoryRoot, claudeProjectMemoryDir, collectMarkdownFiles, defaultIndexPath, discoverSessionFiles, discoverWikiFiles, indexBudgetWarning, lanceStoragePath, memoryIndexRoot, memoryMdPath, memoryReadRoots, notesDir, projectMemoryDir, readFacts, readFactsFromMarkdown, resolveMemoryRoot, sessionSummaryPath, sessionsDir, wikiDir, writeSessionSummary } from '../../../chunk-R3LBRQAN.js';
|
|
4
4
|
import '../../../chunk-KVNWIAO4.js';
|
|
5
5
|
import '../../../chunk-FD2UT76F.js';
|
|
6
|
-
import '../../../chunk-
|
|
6
|
+
import '../../../chunk-A6PDYH55.js';
|
|
7
7
|
import '../../../chunk-EH6XD3FY.js';
|
|
8
8
|
import '../../../chunk-UKMBRMGT.js';
|
|
9
9
|
import '../../../chunk-JOFVLOFY.js';
|
|
@@ -96,6 +96,33 @@ export interface DiscoverySpec {
|
|
|
96
96
|
*/
|
|
97
97
|
readonly dialect?: string;
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* The mirror of {@link admittedSpecs}: the specs a declaration did NOT admit.
|
|
101
|
+
*
|
|
102
|
+
* It exists because `runDiscovery`'s own docblock admits the gap it closes — *"a shorter result
|
|
103
|
+
* than expected means 'nothing qualified', and this function will not tell you which of those it
|
|
104
|
+
* was"*. After B-081 gates the four repo-root instruction files, a consumer who declares nothing
|
|
105
|
+
* goes from receiving four files to receiving none, and that has to be legible.
|
|
106
|
+
*
|
|
107
|
+
* Returned as a VALUE rather than only logged, because a log line cannot be asserted by a
|
|
108
|
+
* consumer's test, and this repository does not ship controls that cannot be observed. The loud
|
|
109
|
+
* half is the `warnOnce` the caller emits from this list.
|
|
110
|
+
*
|
|
111
|
+
* Each entry carries the grant that WOULD admit it — being told you lost something, without being
|
|
112
|
+
* told what would bring it back, is a diagnosis with no remedy.
|
|
113
|
+
*
|
|
114
|
+
* `undefined` declaredKinds means "no gate configured", which admits everything and therefore
|
|
115
|
+
* withholds nothing. That is NOT the same as `[]`, which is a real declaration of no foreign
|
|
116
|
+
* dialect and withholds every gated spec — the distinction `declaredCompatKinds` already carries,
|
|
117
|
+
* preserved here rather than re-decided.
|
|
118
|
+
*
|
|
119
|
+
* @public — re-exported from `@theokit/sdk/context`, and therefore under semver.
|
|
120
|
+
*/
|
|
121
|
+
export declare function withheldSpecs(specs: ReadonlyArray<DiscoverySpec>, declaredKinds: ReadonlyArray<string> | undefined): ReadonlyArray<{
|
|
122
|
+
readonly id: string;
|
|
123
|
+
readonly pattern: string;
|
|
124
|
+
readonly grant: string;
|
|
125
|
+
}>;
|
|
99
126
|
/**
|
|
100
127
|
* The context files theokit looks for out of the box, in the order they are concatenated.
|
|
101
128
|
*
|
|
@@ -30,6 +30,31 @@ export interface CompactResult {
|
|
|
30
30
|
}
|
|
31
31
|
/** Is this message a summary produced by a PRIOR compaction? (filtered from verbatim preservation). */
|
|
32
32
|
export declare function isCompactSummary(content: string): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* What a pre-compaction handler is told, and what it is given to bail out with.
|
|
35
|
+
*
|
|
36
|
+
* `trigger` is READ from the compaction that is happening, never inferred from the call site: the
|
|
37
|
+
* inference would be right today and silently wrong the first time a third caller appears.
|
|
38
|
+
*
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export interface PreCompactContext {
|
|
42
|
+
/** The messages about to be summarised — what the handler gets a last look at. */
|
|
43
|
+
readonly messages: readonly CompressibleMessage[];
|
|
44
|
+
/** `manual` when a person asked, `auto` when a usage threshold did. */
|
|
45
|
+
readonly trigger: "manual" | "auto";
|
|
46
|
+
/** Aborted when the bound fires, so a long handler can stop rather than be merely ignored. */
|
|
47
|
+
readonly signal: AbortSignal;
|
|
48
|
+
}
|
|
49
|
+
/** @public */
|
|
50
|
+
export type PreCompactHandler = (ctx: PreCompactContext) => void | Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* The bound, in milliseconds, when the caller does not choose one.
|
|
53
|
+
*
|
|
54
|
+
* Same value as `@theokit/agents`' `withPreCompaction`, because B-082's requirement is the same
|
|
55
|
+
* contract as B-002 and not a second one.
|
|
56
|
+
*/
|
|
57
|
+
export declare const DEFAULT_PRE_COMPACT_TIMEOUT_MS = 30000;
|
|
33
58
|
/**
|
|
34
59
|
* Compact one session transcript: summarize the reconstructed history, then append (append-only)
|
|
35
60
|
* a `compact_boundary` + the replacement chain (recent user messages verbatim + marker'd summary).
|
|
@@ -42,6 +67,17 @@ export declare function compactSessionTranscript(opts: {
|
|
|
42
67
|
sessionId: string;
|
|
43
68
|
trigger: "manual" | "auto";
|
|
44
69
|
summarize: (messages: readonly CompressibleMessage[]) => Promise<string>;
|
|
70
|
+
/**
|
|
71
|
+
* Work to run before the transcript is rewritten, on the path the caller actually took.
|
|
72
|
+
*
|
|
73
|
+
* Absent, nothing is entered and the path is byte-identical to before B-082 — asserted by a test
|
|
74
|
+
* rather than left as an inference.
|
|
75
|
+
*/
|
|
76
|
+
onPreCompact?: PreCompactHandler;
|
|
77
|
+
/** Where a handler's failure or timeout is reported. Compaction proceeds either way. */
|
|
78
|
+
onPreCompactError?: (error: unknown) => void;
|
|
79
|
+
/** Overrides {@link DEFAULT_PRE_COMPACT_TIMEOUT_MS}. */
|
|
80
|
+
preCompactTimeoutMs?: number;
|
|
45
81
|
}): Promise<CompactResult>;
|
|
46
82
|
/**
|
|
47
83
|
* M50 review F6 (fixed by the probe) — the summarizer's provider route, PURE and unit-tested.
|
package/dist/project.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7KBNBPFK_cjs = require('./chunk-7KBNBPFK.cjs');
|
|
4
4
|
var chunkJLRLCBJ4_cjs = require('./chunk-JLRLCBJ4.cjs');
|
|
5
5
|
var chunkJ7J7J2GN_cjs = require('./chunk-J7J7J2GN.cjs');
|
|
6
6
|
require('./chunk-6LHQPOMI.cjs');
|
|
@@ -11,7 +11,7 @@ var DEFAULT_FILENAME = "THEO.md";
|
|
|
11
11
|
async function readProjectInstructions(cwd, options) {
|
|
12
12
|
const filename = options?.filename ?? DEFAULT_FILENAME;
|
|
13
13
|
const scope = options?.scope ?? "nearest";
|
|
14
|
-
const paths =
|
|
14
|
+
const paths = chunk7KBNBPFK_cjs.walkUpForFile(cwd, filename, options?.stopDir);
|
|
15
15
|
const files = [];
|
|
16
16
|
for (const path of paths) {
|
|
17
17
|
try {
|
|
@@ -30,7 +30,7 @@ function reduceContent(files, scope) {
|
|
|
30
30
|
}
|
|
31
31
|
async function writeProjectInstructions(cwd, content, options) {
|
|
32
32
|
const filename = options?.filename ?? DEFAULT_FILENAME;
|
|
33
|
-
if (!
|
|
33
|
+
if (!chunk7KBNBPFK_cjs.isSafePattern(filename)) {
|
|
34
34
|
throw new chunkJ7J7J2GN_cjs.ConfigurationError(
|
|
35
35
|
`writeProjectInstructions: unsafe filename ${JSON.stringify(filename)} (no path traversal, separators, or absolute paths)`,
|
|
36
36
|
{ code: "unsafe_filename" }
|
package/dist/project.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { walkUpForFile, isSafePattern } from './chunk-
|
|
1
|
+
import { walkUpForFile, isSafePattern } from './chunk-A6PDYH55.js';
|
|
2
2
|
import { replaceFileAtomic } from './chunk-3JHIFQ4I.js';
|
|
3
3
|
import { ConfigurationError } from './chunk-ALUN2B4W.js';
|
|
4
4
|
import './chunk-CZJ6Q7CW.js';
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export type SettingSource = "project" | "user" | "team" | "mdm" | "plugins" | "a
|
|
|
31
31
|
*
|
|
32
32
|
* @public
|
|
33
33
|
*/
|
|
34
|
-
export type CompatSource = "claude-code" | "theokit" | CompatSourceAdapter;
|
|
34
|
+
export type CompatSource = "claude-code" | "theokit" | "agents" | "gemini" | "cursor" | CompatSourceAdapter;
|
|
35
35
|
/**
|
|
36
36
|
* A surface a foreign configuration source may be admitted to.
|
|
37
37
|
*
|
package/package.json
CHANGED