@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.
Files changed (40) hide show
  1. package/dist/cron.cjs +15 -24
  2. package/dist/cron.cjs.map +1 -1
  3. package/dist/cron.js +15 -24
  4. package/dist/cron.js.map +1 -1
  5. package/dist/eval.cjs +15 -24
  6. package/dist/eval.cjs.map +1 -1
  7. package/dist/eval.js +15 -24
  8. package/dist/eval.js.map +1 -1
  9. package/dist/filesystem/index.cjs +2 -1
  10. package/dist/filesystem/index.cjs.map +1 -1
  11. package/dist/filesystem/index.js +2 -1
  12. package/dist/filesystem/index.js.map +1 -1
  13. package/dist/index.cjs +15 -24
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.js +15 -24
  16. package/dist/index.js.map +1 -1
  17. package/dist/internal/persistence/index.cjs +1 -3
  18. package/dist/internal/persistence/index.cjs.map +1 -1
  19. package/dist/internal/persistence/index.js +1 -3
  20. package/dist/internal/persistence/index.js.map +1 -1
  21. package/dist/internal/security/index.cjs +2 -1
  22. package/dist/internal/security/index.cjs.map +1 -1
  23. package/dist/internal/security/index.js +2 -1
  24. package/dist/internal/security/index.js.map +1 -1
  25. package/dist/path-safety.cjs +2 -1
  26. package/dist/path-safety.cjs.map +1 -1
  27. package/dist/path-safety.js +2 -1
  28. package/dist/path-safety.js.map +1 -1
  29. package/dist/persistence.cjs +1 -3
  30. package/dist/persistence.cjs.map +1 -1
  31. package/dist/persistence.js +1 -3
  32. package/dist/persistence.js.map +1 -1
  33. package/dist/provider-catalog.json +469 -144
  34. package/dist/skills.cjs +2 -1
  35. package/dist/skills.cjs.map +1 -1
  36. package/dist/skills.js +2 -1
  37. package/dist/skills.js.map +1 -1
  38. package/dist/workflow.cjs.map +1 -1
  39. package/dist/workflow.js.map +1 -1
  40. 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
- if (target !== baseResolved && !target.startsWith(baseResolved + path.sep)) {
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
- cwd,
20014
- agentId,
20015
- () => compactSessionTranscript2({
20016
- store,
20017
- loc: { cwd, agentId, model },
20018
- sessionId: agentId,
20019
- trigger: options.trigger ?? "manual",
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;