@theokit/sdk 4.19.2 → 4.19.3
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/dist/cron.cjs +15 -24
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.js +15 -24
- package/dist/cron.js.map +1 -1
- package/dist/eval.cjs +15 -24
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +15 -24
- package/dist/eval.js.map +1 -1
- package/dist/filesystem/index.cjs +2 -1
- package/dist/filesystem/index.cjs.map +1 -1
- package/dist/filesystem/index.js +2 -1
- package/dist/filesystem/index.js.map +1 -1
- package/dist/index.cjs +15 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -24
- package/dist/index.js.map +1 -1
- package/dist/internal/persistence/index.cjs +1 -3
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +1 -3
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/security/index.cjs +2 -1
- package/dist/internal/security/index.cjs.map +1 -1
- package/dist/internal/security/index.js +2 -1
- package/dist/internal/security/index.js.map +1 -1
- package/dist/path-safety.cjs +2 -1
- package/dist/path-safety.cjs.map +1 -1
- package/dist/path-safety.js +2 -1
- package/dist/path-safety.js.map +1 -1
- package/dist/persistence.cjs +1 -3
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +1 -3
- package/dist/persistence.js.map +1 -1
- package/dist/provider-catalog.json +469 -144
- package/dist/skills.cjs +2 -1
- package/dist/skills.cjs.map +1 -1
- package/dist/skills.js +2 -1
- package/dist/skills.js.map +1 -1
- package/dist/workflow.cjs.map +1 -1
- package/dist/workflow.js.map +1 -1
- package/package.json +13 -12
package/dist/eval.cjs
CHANGED
|
@@ -860,7 +860,8 @@ function safePathJoin(base, ...parts) {
|
|
|
860
860
|
}
|
|
861
861
|
const baseResolved = path.resolve(base);
|
|
862
862
|
const target = path.resolve(base, ...parts);
|
|
863
|
-
|
|
863
|
+
const prefix = baseResolved.endsWith(path.sep) ? baseResolved : baseResolved + path.sep;
|
|
864
|
+
if (target !== baseResolved && !target.startsWith(prefix)) {
|
|
864
865
|
throw new PathTraversalError(parts.join("/"), target);
|
|
865
866
|
}
|
|
866
867
|
return target;
|
|
@@ -17163,9 +17164,7 @@ async function loadDriver(filePath) {
|
|
|
17163
17164
|
}
|
|
17164
17165
|
try {
|
|
17165
17166
|
const mod = await (driverLoaderOverrides?.nodeSqlite?.() ?? Promise.resolve(
|
|
17166
|
-
process.getBuiltinModule?.(
|
|
17167
|
-
"node:sqlite"
|
|
17168
|
-
) ?? (() => {
|
|
17167
|
+
process.getBuiltinModule?.("node:sqlite") ?? (() => {
|
|
17169
17168
|
throw new Error("node:sqlite built-in unavailable (Node < 22.3)");
|
|
17170
17169
|
})()
|
|
17171
17170
|
));
|
|
@@ -19699,8 +19698,8 @@ async function getRegisteredAgentOrThrow(agentId) {
|
|
|
19699
19698
|
// src/agent.ts
|
|
19700
19699
|
init_errors();
|
|
19701
19700
|
init_discovery();
|
|
19702
|
-
init_agent_factory_registry();
|
|
19703
19701
|
init_agent_session();
|
|
19702
|
+
init_agent_factory_registry();
|
|
19704
19703
|
var streamObjectImport;
|
|
19705
19704
|
var Agent = class _Agent {
|
|
19706
19705
|
constructor() {
|
|
@@ -19992,9 +19991,7 @@ var Agent = class _Agent {
|
|
|
19992
19991
|
reg = getRegisteredAgent(agentId);
|
|
19993
19992
|
}
|
|
19994
19993
|
if (reg === void 0 || reg.runtime !== "local") {
|
|
19995
|
-
throw new UnknownAgentError(
|
|
19996
|
-
`No local agent "${agentId}" registered \u2014 compact targets local sessions.`
|
|
19997
|
-
);
|
|
19994
|
+
throw new UnknownAgentError(`No local agent "${agentId}" registered \u2014 compact targets local sessions.`);
|
|
19998
19995
|
}
|
|
19999
19996
|
const cwd = reg.cwd ?? process.cwd();
|
|
20000
19997
|
const optModel = reg.options.model;
|
|
@@ -20004,20 +20001,16 @@ var Agent = class _Agent {
|
|
|
20004
20001
|
const { defaultBaseDir: defaultBaseDir2, expandTilde: expandTilde2 } = await Promise.resolve().then(() => (init_session_transcript(), session_transcript_exports));
|
|
20005
20002
|
const baseDir = reg.options.local?.baseDir !== void 0 ? expandTilde2(reg.options.local.baseDir) : defaultBaseDir2();
|
|
20006
20003
|
const store = new FsSessionStore2({ baseDir, cwd });
|
|
20007
|
-
return enqueueSessionWrite(
|
|
20008
|
-
|
|
20009
|
-
agentId,
|
|
20010
|
-
|
|
20011
|
-
|
|
20012
|
-
|
|
20013
|
-
|
|
20014
|
-
|
|
20015
|
-
summarize: options.summarize ?? buildDefaultSummarizer2({
|
|
20016
|
-
agentModel: model,
|
|
20017
|
-
...reg.options.apiKey !== void 0 ? { apiKey: reg.options.apiKey } : {}
|
|
20018
|
-
})
|
|
20004
|
+
return enqueueSessionWrite(cwd, agentId, () => compactSessionTranscript2({
|
|
20005
|
+
store,
|
|
20006
|
+
loc: { cwd, agentId, model },
|
|
20007
|
+
sessionId: agentId,
|
|
20008
|
+
trigger: options.trigger ?? "manual",
|
|
20009
|
+
summarize: options.summarize ?? buildDefaultSummarizer2({
|
|
20010
|
+
agentModel: model,
|
|
20011
|
+
...reg.options.apiKey !== void 0 ? { apiKey: reg.options.apiKey } : {}
|
|
20019
20012
|
})
|
|
20020
|
-
);
|
|
20013
|
+
}));
|
|
20021
20014
|
}
|
|
20022
20015
|
/**
|
|
20023
20016
|
* M51 — inject a SYNTHETIC user+assistant pair into a LOCAL session's persisted transcript WITHOUT
|
|
@@ -20034,9 +20027,7 @@ var Agent = class _Agent {
|
|
|
20034
20027
|
reg = getRegisteredAgent(agentId);
|
|
20035
20028
|
}
|
|
20036
20029
|
if (reg === void 0 || reg.runtime !== "local") {
|
|
20037
|
-
throw new UnknownAgentError(
|
|
20038
|
-
`No local agent "${agentId}" registered \u2014 injectSessionTurn targets local sessions.`
|
|
20039
|
-
);
|
|
20030
|
+
throw new UnknownAgentError(`No local agent "${agentId}" registered \u2014 injectSessionTurn targets local sessions.`);
|
|
20040
20031
|
}
|
|
20041
20032
|
const cwd = reg.cwd ?? process.cwd();
|
|
20042
20033
|
const optModel = reg.options.model;
|