@theokit/sdk 4.32.0 → 4.33.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 +15 -0
- package/dist/{agent-ES57DGAT.cjs → agent-2STDGKNI.cjs} +11 -10
- package/dist/{agent-ES57DGAT.cjs.map → agent-2STDGKNI.cjs.map} +1 -1
- package/dist/{agent-FBFPSBTX.js → agent-LFSVFAUI.js} +10 -9
- package/dist/{agent-FBFPSBTX.js.map → agent-LFSVFAUI.js.map} +1 -1
- package/dist/{chunk-DQSILMWU.cjs → chunk-2DYI7MIF.cjs} +2 -2
- package/dist/chunk-2DYI7MIF.cjs.map +1 -0
- package/dist/{chunk-OIYQBUW4.cjs → chunk-6M6A6WWW.cjs} +2 -2
- package/dist/{chunk-OIYQBUW4.cjs.map → chunk-6M6A6WWW.cjs.map} +1 -1
- package/dist/chunk-B3HUL2OQ.js +78 -0
- package/dist/chunk-B3HUL2OQ.js.map +1 -0
- package/dist/{chunk-I4QDIQ45.cjs → chunk-E33A7YIR.cjs} +28 -6
- package/dist/chunk-E33A7YIR.cjs.map +1 -0
- package/dist/chunk-FER7UMIC.cjs +75 -0
- package/dist/chunk-FER7UMIC.cjs.map +1 -0
- package/dist/{chunk-CVSNCUBU.cjs → chunk-FTRNHGAD.cjs} +11 -11
- package/dist/{chunk-CVSNCUBU.cjs.map → chunk-FTRNHGAD.cjs.map} +1 -1
- package/dist/{chunk-EVADEGM7.cjs → chunk-FX2DAR5R.cjs} +7 -5
- package/dist/chunk-FX2DAR5R.cjs.map +1 -0
- package/dist/{chunk-WA3FO4R7.js → chunk-GBCQ5742.js} +7 -6
- package/dist/chunk-GBCQ5742.js.map +1 -0
- package/dist/{chunk-JPG7NMNH.cjs → chunk-HTO4C32Q.cjs} +54 -48
- package/dist/chunk-HTO4C32Q.cjs.map +1 -0
- package/dist/{chunk-SQVQH4EK.js → chunk-KT6SWUY6.js} +4 -4
- package/dist/{chunk-SQVQH4EK.js.map → chunk-KT6SWUY6.js.map} +1 -1
- package/dist/chunk-LDDUIXWS.cjs +81 -0
- package/dist/chunk-LDDUIXWS.cjs.map +1 -0
- package/dist/chunk-OMDRRHRF.js +73 -0
- package/dist/chunk-OMDRRHRF.js.map +1 -0
- package/dist/{chunk-OQX2DG36.cjs → chunk-PZ4Q5K7O.cjs} +5 -5
- package/dist/{chunk-OQX2DG36.cjs.map → chunk-PZ4Q5K7O.cjs.map} +1 -1
- package/dist/{chunk-WPBTPSKQ.js → chunk-Q56IYTBZ.js} +2 -2
- package/dist/chunk-Q56IYTBZ.js.map +1 -0
- package/dist/{chunk-334WDVFZ.js → chunk-SDYJESYZ.js} +27 -6
- package/dist/chunk-SDYJESYZ.js.map +1 -0
- package/dist/{chunk-NI4PAMJQ.js → chunk-TKE4RTYA.js} +18 -12
- package/dist/chunk-TKE4RTYA.js.map +1 -0
- package/dist/{chunk-HBTEK5LK.js → chunk-WBGCDZDV.js} +3 -3
- package/dist/{chunk-HBTEK5LK.js.map → chunk-WBGCDZDV.js.map} +1 -1
- package/dist/{chunk-DGRZNMTU.js → chunk-XV2RBL6D.js} +2 -2
- package/dist/{chunk-DGRZNMTU.js.map → chunk-XV2RBL6D.js.map} +1 -1
- package/dist/{compact-session-OKXLKJIS.cjs → compact-session-24PK2G4M.cjs} +13 -13
- package/dist/{compact-session-OKXLKJIS.cjs.map → compact-session-24PK2G4M.cjs.map} +1 -1
- package/dist/{compact-session-UHGMWPMW.js → compact-session-J7VNCICZ.js} +5 -5
- package/dist/{compact-session-UHGMWPMW.js.map → compact-session-J7VNCICZ.js.map} +1 -1
- package/dist/compaction.cjs +17 -13
- package/dist/compaction.d.cts +8 -0
- package/dist/compaction.d.ts +8 -0
- package/dist/compaction.js +1 -1
- package/dist/cron.cjs +10 -9
- package/dist/cron.js +9 -8
- package/dist/eval.cjs +9 -8
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +8 -7
- package/dist/eval.js.map +1 -1
- package/dist/fs-session-store-MZ4GD2C6.js +10 -0
- package/dist/{fs-session-store-2J5JOXC2.js.map → fs-session-store-MZ4GD2C6.js.map} +1 -1
- package/dist/fs-session-store-YMBSJ5Y7.cjs +19 -0
- package/dist/{fs-session-store-DNAJ6RQG.cjs.map → fs-session-store-YMBSJ5Y7.cjs.map} +1 -1
- package/dist/index.cjs +35 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-24FJ65LP.cjs → inject-session-343WIDCM.cjs} +6 -6
- package/dist/{inject-session-24FJ65LP.cjs.map → inject-session-343WIDCM.cjs.map} +1 -1
- package/dist/{inject-session-JXQO33T3.js → inject-session-RZEDWO53.js} +4 -4
- package/dist/{inject-session-JXQO33T3.js.map → inject-session-RZEDWO53.js.map} +1 -1
- package/dist/internal/local-agent/local-agent.d.ts +93 -1
- package/dist/internal/persistence/fs-session-store.d.cts +16 -0
- package/dist/internal/persistence/fs-session-store.d.ts +16 -0
- package/dist/internal/persistence/index.cjs +7 -7
- package/dist/internal/persistence/index.js +1 -1
- package/dist/internal/persistence/paths.d.cts +11 -1
- package/dist/internal/persistence/paths.d.ts +11 -1
- package/dist/internal/persistence/session-writer.d.cts +8 -0
- package/dist/internal/persistence/session-writer.d.ts +8 -0
- package/dist/internal/session/agent-session.d.ts +22 -0
- package/dist/persistence.cjs +13 -39
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.d.cts +1 -1
- package/dist/persistence.d.ts +1 -1
- package/dist/persistence.js +4 -36
- package/dist/persistence.js.map +1 -1
- package/dist/{session-transcript-QS6CXHHD.js → session-transcript-F2ANTA2M.js} +3 -3
- package/dist/{session-transcript-QS6CXHHD.js.map → session-transcript-F2ANTA2M.js.map} +1 -1
- package/dist/{session-transcript-F5OXXO6G.cjs → session-transcript-JXFMPLOT.cjs} +13 -13
- package/dist/{session-transcript-F5OXXO6G.cjs.map → session-transcript-JXFMPLOT.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-334WDVFZ.js.map +0 -1
- package/dist/chunk-DQSILMWU.cjs.map +0 -1
- package/dist/chunk-EIPSZ4GA.js +0 -28
- package/dist/chunk-EIPSZ4GA.js.map +0 -1
- package/dist/chunk-EVADEGM7.cjs.map +0 -1
- package/dist/chunk-HCXDDR6P.cjs +0 -30
- package/dist/chunk-HCXDDR6P.cjs.map +0 -1
- package/dist/chunk-I4QDIQ45.cjs.map +0 -1
- package/dist/chunk-JPG7NMNH.cjs.map +0 -1
- package/dist/chunk-NI4PAMJQ.js.map +0 -1
- package/dist/chunk-WA3FO4R7.js.map +0 -1
- package/dist/chunk-WPBTPSKQ.js.map +0 -1
- package/dist/fs-session-store-2J5JOXC2.js +0 -8
- package/dist/fs-session-store-DNAJ6RQG.cjs +0 -17
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { extractCodePlugins } from './chunk-2SFBB54R.js';
|
|
2
2
|
import { submit, emitRunEvent } from './chunk-HRA3CPGG.js';
|
|
3
|
-
import { enqueueSessionWrite, hydrateSession, flushSessionWrites, persistTurnToTranscript, appendSessionMessage, getSessionMessages, clearSession } from './chunk-
|
|
4
|
-
import { FsSessionStore } from './chunk-
|
|
5
|
-
import { discoverProviderPlugins, CircuitBreaker, buildDefaultSummarizer, parseSseStream, resolveProviderChain, inferProviderFromApiKey, detectPrimaryProvider, tryFirstEvent, relayStream, mapOpenAICompatibleError, renderToolResultContentText } from './chunk-
|
|
3
|
+
import { enqueueSessionWrite, hydrateSession, flushSessionWrites, descartarSessao, persistTurnToTranscript, appendSessionMessage, getSessionMessages, clearSession } from './chunk-SDYJESYZ.js';
|
|
4
|
+
import { FsSessionStore } from './chunk-OMDRRHRF.js';
|
|
5
|
+
import { discoverProviderPlugins, CircuitBreaker, buildDefaultSummarizer, parseSseStream, resolveProviderChain, inferProviderFromApiKey, detectPrimaryProvider, tryFirstEvent, relayStream, mapOpenAICompatibleError, renderToolResultContentText } from './chunk-KT6SWUY6.js';
|
|
6
6
|
import { IndexManager, writeSessionSummary, memoryDir, globalEmbeddingCache, appendFact, readFacts, legacyMemoryJsonPath, memoryMdPath, appendFactToMarkdown } from './chunk-XAUBQMQU.js';
|
|
7
7
|
import { loadHookConfig, warnOnce, currentPersonalityContext, warnPersonalitySwitchInsideFork } from './chunk-XIG2IE3L.js';
|
|
8
8
|
import { resolveChildEnv } from './chunk-7GFX45DD.js';
|
|
9
|
-
import { readVersionedJson, getTheokitHome, writeVersionedJson } from './chunk-
|
|
9
|
+
import { readVersionedJson, getTheokitHome, writeVersionedJson } from './chunk-XV2RBL6D.js';
|
|
10
10
|
import { sanitizeToolInput } from './chunk-U54XCYG3.js';
|
|
11
11
|
import { subAgentToolsFromDefinitions, inheritSubAgentCredentials } from './chunk-FV3YEMQ7.js';
|
|
12
12
|
import { setAgentFacade } from './chunk-6X6ID4MO.js';
|
|
@@ -15,11 +15,11 @@ import { withToolWhitelist, checkToolWhitelist } from './chunk-7AD3ZTZL.js';
|
|
|
15
15
|
import { mapWithConcurrency } from './chunk-V4XRLPEF.js';
|
|
16
16
|
import { withFileLock } from './chunk-UAYYNWYJ.js';
|
|
17
17
|
import { withCwdMutex } from './chunk-2XLKLVVR.js';
|
|
18
|
-
import { defaultBaseDir, expandTilde } from './chunk-
|
|
18
|
+
import { defaultBaseDir, expandTilde } from './chunk-Q56IYTBZ.js';
|
|
19
19
|
import { toJsonSchema } from './chunk-4VPXM6UU.js';
|
|
20
20
|
import { atomicWriteJson } from './chunk-S2BBRVQX.js';
|
|
21
21
|
import { loadSubagents } from './chunk-BNIFFFH3.js';
|
|
22
|
-
import { resolveEffectiveContextWindow, CONTEXT_WINDOW_FLOOR, CONTEXT_WINDOW_MARGIN } from './chunk-
|
|
22
|
+
import { resolveEffectiveContextWindow, CONTEXT_WINDOW_FLOOR, CONTEXT_WINDOW_MARGIN } from './chunk-GBCQ5742.js';
|
|
23
23
|
import { parseModelId } from './chunk-X2FR4OIT.js';
|
|
24
24
|
import { getCatalogModelInfo, registerBuiltins, getProviderProfile, registerProvider, isPatchedModelKey } from './chunk-KAP4GJHO.js';
|
|
25
25
|
import { escapeBlockBody, buildSkillsBlock, discoverSkills, stripSkillFrontmatter } from './chunk-5IB2UKSN.js';
|
|
@@ -9509,6 +9509,10 @@ function registerRunAsTask(run, agentId, taskOpt, userText) {
|
|
|
9509
9509
|
}
|
|
9510
9510
|
|
|
9511
9511
|
// src/internal/local-agent/local-agent.ts
|
|
9512
|
+
async function disposeSessionStore(store) {
|
|
9513
|
+
const d = store.dispose;
|
|
9514
|
+
if (typeof d === "function") await d.call(store);
|
|
9515
|
+
}
|
|
9512
9516
|
var LocalAgent = class {
|
|
9513
9517
|
agentId;
|
|
9514
9518
|
model;
|
|
@@ -9815,6 +9819,8 @@ var LocalAgent = class {
|
|
|
9815
9819
|
disposeSessionMcpClients(this.agentId);
|
|
9816
9820
|
await flushSessionWrites();
|
|
9817
9821
|
await flushRegistrySaves(this.workspaceCwd);
|
|
9822
|
+
await disposeSessionStore(this.sessionStore);
|
|
9823
|
+
descartarSessao(this.workspaceCwd, this.agentId);
|
|
9818
9824
|
}
|
|
9819
9825
|
[Symbol.asyncDispose]() {
|
|
9820
9826
|
return this.dispose();
|
|
@@ -10418,7 +10424,7 @@ var Agent = class _Agent {
|
|
|
10418
10424
|
`No local agent "${agentId}" registered \u2014 compact targets local sessions.`
|
|
10419
10425
|
);
|
|
10420
10426
|
}
|
|
10421
|
-
const { compactSessionTranscript, buildDefaultSummarizer: buildDefaultSummarizer2 } = await import('./compact-session-
|
|
10427
|
+
const { compactSessionTranscript, buildDefaultSummarizer: buildDefaultSummarizer2 } = await import('./compact-session-J7VNCICZ.js');
|
|
10422
10428
|
const { cwd, model, store } = await abrirStoreLocal(reg);
|
|
10423
10429
|
return enqueueSessionWrite(
|
|
10424
10430
|
cwd,
|
|
@@ -10454,7 +10460,7 @@ var Agent = class _Agent {
|
|
|
10454
10460
|
`No local agent "${agentId}" registered \u2014 injectSessionTurn targets local sessions.`
|
|
10455
10461
|
);
|
|
10456
10462
|
}
|
|
10457
|
-
const { injectSessionTurn } = await import('./inject-session-
|
|
10463
|
+
const { injectSessionTurn } = await import('./inject-session-RZEDWO53.js');
|
|
10458
10464
|
const { cwd, model, store } = await abrirStoreLocal(reg);
|
|
10459
10465
|
await injectSessionTurn({
|
|
10460
10466
|
store,
|
|
@@ -10501,12 +10507,12 @@ async function abrirStoreLocal(reg) {
|
|
|
10501
10507
|
const cwd = reg.cwd ?? process.cwd();
|
|
10502
10508
|
const optModel = reg.options.model;
|
|
10503
10509
|
const model = reg.model?.id ?? (typeof optModel === "string" ? optModel : optModel?.id) ?? "unknown";
|
|
10504
|
-
const { FsSessionStore: FsSessionStore2 } = await import('./fs-session-store-
|
|
10505
|
-
const { defaultBaseDir: defaultBaseDir2, expandTilde: expandTilde2 } = await import('./session-transcript-
|
|
10510
|
+
const { FsSessionStore: FsSessionStore2 } = await import('./fs-session-store-MZ4GD2C6.js');
|
|
10511
|
+
const { defaultBaseDir: defaultBaseDir2, expandTilde: expandTilde2 } = await import('./session-transcript-F2ANTA2M.js');
|
|
10506
10512
|
const baseDir = reg.options.local?.baseDir !== void 0 ? expandTilde2(reg.options.local.baseDir) : defaultBaseDir2();
|
|
10507
10513
|
return { cwd, model, store: new FsSessionStore2({ baseDir, cwd }) };
|
|
10508
10514
|
}
|
|
10509
10515
|
|
|
10510
10516
|
export { Agent, AgentBuilder, DEFAULT_AGENTIC_MODEL_ID, MEMORY_EMBEDDING_ADAPTERS, Tool, ToolError, UsageAccumulator, computeCost, generateCronId, getPricingEntry, httpRequest, isFixtureApiKey, openRouterMemoryEmbeddingProviderAdapter, resolveApiKey, shouldUseFixtureMode };
|
|
10511
|
-
//# sourceMappingURL=chunk-
|
|
10512
|
-
//# sourceMappingURL=chunk-
|
|
10517
|
+
//# sourceMappingURL=chunk-TKE4RTYA.js.map
|
|
10518
|
+
//# sourceMappingURL=chunk-TKE4RTYA.js.map
|