@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.
- package/dist/cron-Bhdyjl0B.d.ts +2582 -0
- package/dist/cron-M2Xz7lq2.d.cts +2582 -0
- package/dist/cron.cjs +19 -8
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.d.cts +3 -0
- package/dist/cron.d.ts +3 -0
- package/dist/cron.js +19 -8
- package/dist/cron.js.map +1 -1
- package/dist/errors-CG2RpeW-.d.ts +516 -0
- package/dist/errors-gE8612p9.d.cts +516 -0
- package/dist/errors.d.cts +3 -0
- package/dist/eval.cjs +19 -8
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +19 -8
- 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/goal-loop.d.ts +35 -0
- package/dist/index.cjs +139 -130
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2309 -0
- package/dist/index.d.ts +2309 -0
- package/dist/index.js +139 -130
- package/dist/index.js.map +1 -1
- package/dist/internal/runtime/lifecycle/run-until.d.ts +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/provider-catalog.json +1620 -0
- package/dist/run-DFM1H2jW.d.cts +1589 -0
- package/dist/run-DFM1H2jW.d.ts +1589 -0
- 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;
|
|
@@ -6006,7 +6007,9 @@ function isCompactSummary(content) {
|
|
|
6006
6007
|
function plainText(content) {
|
|
6007
6008
|
if (typeof content === "string") return content;
|
|
6008
6009
|
if (!Array.isArray(content)) return void 0;
|
|
6009
|
-
const texts = content.filter(
|
|
6010
|
+
const texts = content.filter(
|
|
6011
|
+
(p) => p !== null && typeof p === "object" && p.type === "text" && typeof p.text === "string"
|
|
6012
|
+
).map((p) => p.text);
|
|
6010
6013
|
return texts.length > 0 ? texts.join("\n") : void 0;
|
|
6011
6014
|
}
|
|
6012
6015
|
async function compactSessionTranscript(opts) {
|
|
@@ -6127,8 +6130,10 @@ async function autoCompactIfNeeded(opts) {
|
|
|
6127
6130
|
return true;
|
|
6128
6131
|
} catch (cause) {
|
|
6129
6132
|
const msg = cause instanceof Error ? cause.message : String(cause);
|
|
6130
|
-
process.stderr.write(
|
|
6131
|
-
`)
|
|
6133
|
+
process.stderr.write(
|
|
6134
|
+
`[theokit-sdk] auto-compaction failed (left transcript untouched): ${msg}
|
|
6135
|
+
`
|
|
6136
|
+
);
|
|
6132
6137
|
return false;
|
|
6133
6138
|
}
|
|
6134
6139
|
}
|
|
@@ -6138,11 +6143,11 @@ var init_compact_session = __esm({
|
|
|
6138
6143
|
init_compaction();
|
|
6139
6144
|
init_router();
|
|
6140
6145
|
init_real_local_run_provider();
|
|
6146
|
+
init_session_transcript();
|
|
6141
6147
|
init_providers();
|
|
6142
6148
|
init_compression_model_registry();
|
|
6143
6149
|
init_compression_summarizer();
|
|
6144
6150
|
init_agent_session();
|
|
6145
|
-
init_session_transcript();
|
|
6146
6151
|
COMPACT_SUMMARY_MARKER = "[[theokit:compact-summary]]";
|
|
6147
6152
|
COMPACT_USER_MESSAGE_MAX_TOKENS = 2e4;
|
|
6148
6153
|
autoCompactAttempts = (() => {
|
|
@@ -6247,10 +6252,17 @@ var init_context = __esm({
|
|
|
6247
6252
|
}
|
|
6248
6253
|
});
|
|
6249
6254
|
|
|
6255
|
+
// src/goal-loop.ts
|
|
6256
|
+
var GOAL_CONTINUATION_MARKER;
|
|
6257
|
+
var init_goal_loop = __esm({
|
|
6258
|
+
"src/goal-loop.ts"() {
|
|
6259
|
+
GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
|
|
6260
|
+
}
|
|
6261
|
+
});
|
|
6262
|
+
|
|
6250
6263
|
// src/internal/runtime/lifecycle/run-until.ts
|
|
6251
6264
|
var run_until_exports = {};
|
|
6252
6265
|
__export(run_until_exports, {
|
|
6253
|
-
GOAL_CONTINUATION_MARKER: () => GOAL_CONTINUATION_MARKER,
|
|
6254
6266
|
composeContinuation: () => composeContinuation,
|
|
6255
6267
|
runUntilImpl: () => runUntilImpl
|
|
6256
6268
|
});
|
|
@@ -6415,10 +6427,9 @@ ${goal}
|
|
|
6415
6427
|
${lastResponse.slice(-1e3)}`
|
|
6416
6428
|
].join("\n");
|
|
6417
6429
|
}
|
|
6418
|
-
var GOAL_CONTINUATION_MARKER;
|
|
6419
6430
|
var init_run_until = __esm({
|
|
6420
6431
|
"src/internal/runtime/lifecycle/run-until.ts"() {
|
|
6421
|
-
|
|
6432
|
+
init_goal_loop();
|
|
6422
6433
|
}
|
|
6423
6434
|
});
|
|
6424
6435
|
|