@theokit/sdk 4.19.1 → 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 (45) hide show
  1. package/dist/cron-Bhdyjl0B.d.ts +2582 -0
  2. package/dist/cron-M2Xz7lq2.d.cts +2582 -0
  3. package/dist/cron.cjs +19 -8
  4. package/dist/cron.cjs.map +1 -1
  5. package/dist/cron.d.cts +3 -0
  6. package/dist/cron.d.ts +3 -0
  7. package/dist/cron.js +19 -8
  8. package/dist/cron.js.map +1 -1
  9. package/dist/errors-CG2RpeW-.d.ts +516 -0
  10. package/dist/errors-gE8612p9.d.cts +516 -0
  11. package/dist/errors.d.cts +3 -0
  12. package/dist/eval.cjs +19 -8
  13. package/dist/eval.cjs.map +1 -1
  14. package/dist/eval.js +19 -8
  15. package/dist/eval.js.map +1 -1
  16. package/dist/filesystem/index.cjs +2 -1
  17. package/dist/filesystem/index.cjs.map +1 -1
  18. package/dist/filesystem/index.js +2 -1
  19. package/dist/filesystem/index.js.map +1 -1
  20. package/dist/goal-loop.d.ts +35 -0
  21. package/dist/index.cjs +139 -130
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +2309 -0
  24. package/dist/index.d.ts +2309 -0
  25. package/dist/index.js +139 -130
  26. package/dist/index.js.map +1 -1
  27. package/dist/internal/runtime/lifecycle/run-until.d.ts +1 -1
  28. package/dist/internal/security/index.cjs +2 -1
  29. package/dist/internal/security/index.cjs.map +1 -1
  30. package/dist/internal/security/index.js +2 -1
  31. package/dist/internal/security/index.js.map +1 -1
  32. package/dist/path-safety.cjs +2 -1
  33. package/dist/path-safety.cjs.map +1 -1
  34. package/dist/path-safety.js +2 -1
  35. package/dist/path-safety.js.map +1 -1
  36. package/dist/provider-catalog.json +1620 -0
  37. package/dist/run-DFM1H2jW.d.cts +1589 -0
  38. package/dist/run-DFM1H2jW.d.ts +1589 -0
  39. package/dist/skills.cjs +2 -1
  40. package/dist/skills.cjs.map +1 -1
  41. package/dist/skills.js +2 -1
  42. package/dist/skills.js.map +1 -1
  43. package/dist/workflow.cjs.map +1 -1
  44. package/dist/workflow.js.map +1 -1
  45. package/package.json +13 -12
@@ -0,0 +1,3 @@
1
+ export { R as Cron } from './cron-M2Xz7lq2.cjs';
2
+ import './run-DFM1H2jW.cjs';
3
+ import 'zod';
package/dist/cron.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { R as Cron } from './cron-Bhdyjl0B.js';
2
+ import './run-DFM1H2jW.js';
3
+ import 'zod';
package/dist/cron.js CHANGED
@@ -858,7 +858,8 @@ function safePathJoin(base, ...parts) {
858
858
  }
859
859
  const baseResolved = resolve(base);
860
860
  const target = resolve(base, ...parts);
861
- if (target !== baseResolved && !target.startsWith(baseResolved + sep)) {
861
+ const prefix = baseResolved.endsWith(sep) ? baseResolved : baseResolved + sep;
862
+ if (target !== baseResolved && !target.startsWith(prefix)) {
862
863
  throw new PathTraversalError(parts.join("/"), target);
863
864
  }
864
865
  return target;
@@ -6003,7 +6004,9 @@ function isCompactSummary(content) {
6003
6004
  function plainText(content) {
6004
6005
  if (typeof content === "string") return content;
6005
6006
  if (!Array.isArray(content)) return void 0;
6006
- const texts = content.filter((p) => p !== null && typeof p === "object" && p.type === "text" && typeof p.text === "string").map((p) => p.text);
6007
+ const texts = content.filter(
6008
+ (p) => p !== null && typeof p === "object" && p.type === "text" && typeof p.text === "string"
6009
+ ).map((p) => p.text);
6007
6010
  return texts.length > 0 ? texts.join("\n") : void 0;
6008
6011
  }
6009
6012
  async function compactSessionTranscript(opts) {
@@ -6124,8 +6127,10 @@ async function autoCompactIfNeeded(opts) {
6124
6127
  return true;
6125
6128
  } catch (cause) {
6126
6129
  const msg = cause instanceof Error ? cause.message : String(cause);
6127
- process.stderr.write(`[theokit-sdk] auto-compaction failed (left transcript untouched): ${msg}
6128
- `);
6130
+ process.stderr.write(
6131
+ `[theokit-sdk] auto-compaction failed (left transcript untouched): ${msg}
6132
+ `
6133
+ );
6129
6134
  return false;
6130
6135
  }
6131
6136
  }
@@ -6135,11 +6140,11 @@ var init_compact_session = __esm({
6135
6140
  init_compaction();
6136
6141
  init_router();
6137
6142
  init_real_local_run_provider();
6143
+ init_session_transcript();
6138
6144
  init_providers();
6139
6145
  init_compression_model_registry();
6140
6146
  init_compression_summarizer();
6141
6147
  init_agent_session();
6142
- init_session_transcript();
6143
6148
  COMPACT_SUMMARY_MARKER = "[[theokit:compact-summary]]";
6144
6149
  COMPACT_USER_MESSAGE_MAX_TOKENS = 2e4;
6145
6150
  autoCompactAttempts = (() => {
@@ -6244,10 +6249,17 @@ var init_context = __esm({
6244
6249
  }
6245
6250
  });
6246
6251
 
6252
+ // src/goal-loop.ts
6253
+ var GOAL_CONTINUATION_MARKER;
6254
+ var init_goal_loop = __esm({
6255
+ "src/goal-loop.ts"() {
6256
+ GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
6257
+ }
6258
+ });
6259
+
6247
6260
  // src/internal/runtime/lifecycle/run-until.ts
6248
6261
  var run_until_exports = {};
6249
6262
  __export(run_until_exports, {
6250
- GOAL_CONTINUATION_MARKER: () => GOAL_CONTINUATION_MARKER,
6251
6263
  composeContinuation: () => composeContinuation,
6252
6264
  runUntilImpl: () => runUntilImpl
6253
6265
  });
@@ -6412,10 +6424,9 @@ ${goal}
6412
6424
  ${lastResponse.slice(-1e3)}`
6413
6425
  ].join("\n");
6414
6426
  }
6415
- var GOAL_CONTINUATION_MARKER;
6416
6427
  var init_run_until = __esm({
6417
6428
  "src/internal/runtime/lifecycle/run-until.ts"() {
6418
- GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
6429
+ init_goal_loop();
6419
6430
  }
6420
6431
  });
6421
6432