@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/cron.cjs
CHANGED
|
@@ -861,7 +861,8 @@ function safePathJoin(base, ...parts) {
|
|
|
861
861
|
}
|
|
862
862
|
const baseResolved = path.resolve(base);
|
|
863
863
|
const target = path.resolve(base, ...parts);
|
|
864
|
-
|
|
864
|
+
const prefix = baseResolved.endsWith(path.sep) ? baseResolved : baseResolved + path.sep;
|
|
865
|
+
if (target !== baseResolved && !target.startsWith(prefix)) {
|
|
865
866
|
throw new PathTraversalError(parts.join("/"), target);
|
|
866
867
|
}
|
|
867
868
|
return target;
|
|
@@ -17168,9 +17169,7 @@ async function loadDriver(filePath) {
|
|
|
17168
17169
|
}
|
|
17169
17170
|
try {
|
|
17170
17171
|
const mod = await (driverLoaderOverrides?.nodeSqlite?.() ?? Promise.resolve(
|
|
17171
|
-
process.getBuiltinModule?.(
|
|
17172
|
-
"node:sqlite"
|
|
17173
|
-
) ?? (() => {
|
|
17172
|
+
process.getBuiltinModule?.("node:sqlite") ?? (() => {
|
|
17174
17173
|
throw new Error("node:sqlite built-in unavailable (Node < 22.3)");
|
|
17175
17174
|
})()
|
|
17176
17175
|
));
|
|
@@ -19704,8 +19703,8 @@ async function getRegisteredAgentOrThrow(agentId) {
|
|
|
19704
19703
|
// src/agent.ts
|
|
19705
19704
|
init_errors();
|
|
19706
19705
|
init_discovery();
|
|
19707
|
-
init_agent_factory_registry();
|
|
19708
19706
|
init_agent_session();
|
|
19707
|
+
init_agent_factory_registry();
|
|
19709
19708
|
var streamObjectImport;
|
|
19710
19709
|
var Agent = class _Agent {
|
|
19711
19710
|
constructor() {
|
|
@@ -19997,9 +19996,7 @@ var Agent = class _Agent {
|
|
|
19997
19996
|
reg = getRegisteredAgent(agentId);
|
|
19998
19997
|
}
|
|
19999
19998
|
if (reg === void 0 || reg.runtime !== "local") {
|
|
20000
|
-
throw new UnknownAgentError(
|
|
20001
|
-
`No local agent "${agentId}" registered \u2014 compact targets local sessions.`
|
|
20002
|
-
);
|
|
19999
|
+
throw new UnknownAgentError(`No local agent "${agentId}" registered \u2014 compact targets local sessions.`);
|
|
20003
20000
|
}
|
|
20004
20001
|
const cwd = reg.cwd ?? process.cwd();
|
|
20005
20002
|
const optModel = reg.options.model;
|
|
@@ -20009,20 +20006,16 @@ var Agent = class _Agent {
|
|
|
20009
20006
|
const { defaultBaseDir: defaultBaseDir2, expandTilde: expandTilde2 } = await Promise.resolve().then(() => (init_session_transcript(), session_transcript_exports));
|
|
20010
20007
|
const baseDir = reg.options.local?.baseDir !== void 0 ? expandTilde2(reg.options.local.baseDir) : defaultBaseDir2();
|
|
20011
20008
|
const store = new FsSessionStore2({ baseDir, cwd });
|
|
20012
|
-
return enqueueSessionWrite(
|
|
20013
|
-
|
|
20014
|
-
agentId,
|
|
20015
|
-
|
|
20016
|
-
|
|
20017
|
-
|
|
20018
|
-
|
|
20019
|
-
|
|
20020
|
-
summarize: options.summarize ?? buildDefaultSummarizer2({
|
|
20021
|
-
agentModel: model,
|
|
20022
|
-
...reg.options.apiKey !== void 0 ? { apiKey: reg.options.apiKey } : {}
|
|
20023
|
-
})
|
|
20009
|
+
return enqueueSessionWrite(cwd, agentId, () => compactSessionTranscript2({
|
|
20010
|
+
store,
|
|
20011
|
+
loc: { cwd, agentId, model },
|
|
20012
|
+
sessionId: agentId,
|
|
20013
|
+
trigger: options.trigger ?? "manual",
|
|
20014
|
+
summarize: options.summarize ?? buildDefaultSummarizer2({
|
|
20015
|
+
agentModel: model,
|
|
20016
|
+
...reg.options.apiKey !== void 0 ? { apiKey: reg.options.apiKey } : {}
|
|
20024
20017
|
})
|
|
20025
|
-
);
|
|
20018
|
+
}));
|
|
20026
20019
|
}
|
|
20027
20020
|
/**
|
|
20028
20021
|
* M51 — inject a SYNTHETIC user+assistant pair into a LOCAL session's persisted transcript WITHOUT
|
|
@@ -20039,9 +20032,7 @@ var Agent = class _Agent {
|
|
|
20039
20032
|
reg = getRegisteredAgent(agentId);
|
|
20040
20033
|
}
|
|
20041
20034
|
if (reg === void 0 || reg.runtime !== "local") {
|
|
20042
|
-
throw new UnknownAgentError(
|
|
20043
|
-
`No local agent "${agentId}" registered \u2014 injectSessionTurn targets local sessions.`
|
|
20044
|
-
);
|
|
20035
|
+
throw new UnknownAgentError(`No local agent "${agentId}" registered \u2014 injectSessionTurn targets local sessions.`);
|
|
20045
20036
|
}
|
|
20046
20037
|
const cwd = reg.cwd ?? process.cwd();
|
|
20047
20038
|
const optModel = reg.options.model;
|