@theokit/sdk 4.19.0 → 4.19.1
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 +6 -2
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.js +6 -2
- package/dist/cron.js.map +1 -1
- package/dist/eval.cjs +6 -2
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +6 -2
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +24 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +25 -20
- package/dist/index.js.map +1 -1
- package/dist/internal/runtime/lifecycle/run-until.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cron-BoMsrUs1.d.ts +0 -2582
- package/dist/cron-DWc1r8m8.d.cts +0 -2582
- package/dist/cron.d.cts +0 -3
- package/dist/cron.d.ts +0 -3
- package/dist/errors-CG2RpeW-.d.ts +0 -516
- package/dist/errors-gE8612p9.d.cts +0 -516
- package/dist/errors.d.cts +0 -3
- package/dist/index.d.cts +0 -2303
- package/dist/index.d.ts +0 -2303
- package/dist/provider-catalog.json +0 -1620
- package/dist/run-DFM1H2jW.d.cts +0 -1589
- package/dist/run-DFM1H2jW.d.ts +0 -1589
package/dist/index.cjs
CHANGED
|
@@ -6174,7 +6174,7 @@ __export(compact_session_exports, {
|
|
|
6174
6174
|
shouldAutoCompact: () => shouldAutoCompact
|
|
6175
6175
|
});
|
|
6176
6176
|
function isCompactSummary(content) {
|
|
6177
|
-
return content.startsWith(COMPACT_SUMMARY_MARKER);
|
|
6177
|
+
return content.startsWith(COMPACT_SUMMARY_MARKER) || content.startsWith("[[theokit:goal-continuation]]");
|
|
6178
6178
|
}
|
|
6179
6179
|
function plainText(content) {
|
|
6180
6180
|
if (typeof content === "string") return content;
|
|
@@ -7507,6 +7507,7 @@ var init_context = __esm({
|
|
|
7507
7507
|
// src/internal/runtime/lifecycle/run-until.ts
|
|
7508
7508
|
var run_until_exports = {};
|
|
7509
7509
|
__export(run_until_exports, {
|
|
7510
|
+
GOAL_CONTINUATION_MARKER: () => exports.GOAL_CONTINUATION_MARKER,
|
|
7510
7511
|
composeContinuation: () => composeContinuation,
|
|
7511
7512
|
runUntilImpl: () => runUntilImpl
|
|
7512
7513
|
});
|
|
@@ -7647,6 +7648,7 @@ async function* runUntilImpl(agent, goal, options, deps) {
|
|
|
7647
7648
|
}
|
|
7648
7649
|
function composeContinuation(goal, lastResponse) {
|
|
7649
7650
|
return [
|
|
7651
|
+
exports.GOAL_CONTINUATION_MARKER,
|
|
7650
7652
|
"Continue working toward the active goal.",
|
|
7651
7653
|
"",
|
|
7652
7654
|
`<objective>
|
|
@@ -7667,11 +7669,13 @@ ${goal}
|
|
|
7667
7669
|
" current state, requirement by requirement. Treat uncertain or indirect evidence as not achieved.",
|
|
7668
7670
|
"",
|
|
7669
7671
|
`Your last response was:
|
|
7670
|
-
${lastResponse.slice(
|
|
7672
|
+
${lastResponse.slice(-1e3)}`
|
|
7671
7673
|
].join("\n");
|
|
7672
7674
|
}
|
|
7675
|
+
exports.GOAL_CONTINUATION_MARKER = void 0;
|
|
7673
7676
|
var init_run_until = __esm({
|
|
7674
7677
|
"src/internal/runtime/lifecycle/run-until.ts"() {
|
|
7678
|
+
exports.GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
|
|
7675
7679
|
}
|
|
7676
7680
|
});
|
|
7677
7681
|
|
|
@@ -22670,23 +22674,6 @@ async function updateJobStatus(jobId, enabled) {
|
|
|
22670
22674
|
return updated;
|
|
22671
22675
|
}
|
|
22672
22676
|
|
|
22673
|
-
// src/goal-loop.ts
|
|
22674
|
-
function runGoalLoop(agent, goal, options, depsOverride) {
|
|
22675
|
-
async function* wrap() {
|
|
22676
|
-
const { runUntilImpl: runUntilImpl2 } = await Promise.resolve().then(() => (init_run_until(), run_until_exports));
|
|
22677
|
-
const deps = depsOverride ?? await (async () => {
|
|
22678
|
-
const { judgeCallImpl: judgeCallImpl2 } = await Promise.resolve().then(() => (init_judge_call(), judge_call_exports));
|
|
22679
|
-
const { getAgentFacade: getAgentFacade2 } = await Promise.resolve().then(() => (init_agent_factory_registry(), agent_factory_registry_exports));
|
|
22680
|
-
const create = getAgentFacade2().create;
|
|
22681
|
-
return {
|
|
22682
|
-
judge: (ctx, opts) => judgeCallImpl2(ctx, opts, { create })
|
|
22683
|
-
};
|
|
22684
|
-
})();
|
|
22685
|
-
return yield* runUntilImpl2(agent, goal, options, deps);
|
|
22686
|
-
}
|
|
22687
|
-
return wrap();
|
|
22688
|
-
}
|
|
22689
|
-
|
|
22690
22677
|
// src/define-provider.ts
|
|
22691
22678
|
init_builtin();
|
|
22692
22679
|
init_registry();
|
|
@@ -22827,6 +22814,24 @@ var EventBus = class {
|
|
|
22827
22814
|
// src/index.ts
|
|
22828
22815
|
init_generate_object();
|
|
22829
22816
|
|
|
22817
|
+
// src/goal-loop.ts
|
|
22818
|
+
init_run_until();
|
|
22819
|
+
function runGoalLoop(agent, goal, options, depsOverride) {
|
|
22820
|
+
async function* wrap() {
|
|
22821
|
+
const { runUntilImpl: runUntilImpl2 } = await Promise.resolve().then(() => (init_run_until(), run_until_exports));
|
|
22822
|
+
const deps = depsOverride ?? await (async () => {
|
|
22823
|
+
const { judgeCallImpl: judgeCallImpl2 } = await Promise.resolve().then(() => (init_judge_call(), judge_call_exports));
|
|
22824
|
+
const { getAgentFacade: getAgentFacade2 } = await Promise.resolve().then(() => (init_agent_factory_registry(), agent_factory_registry_exports));
|
|
22825
|
+
const create = getAgentFacade2().create;
|
|
22826
|
+
return {
|
|
22827
|
+
judge: (ctx, opts) => judgeCallImpl2(ctx, opts, { create })
|
|
22828
|
+
};
|
|
22829
|
+
})();
|
|
22830
|
+
return yield* runUntilImpl2(agent, goal, options, deps);
|
|
22831
|
+
}
|
|
22832
|
+
return wrap();
|
|
22833
|
+
}
|
|
22834
|
+
|
|
22830
22835
|
// src/internal/budget/tracker/budget-tracker-counter.ts
|
|
22831
22836
|
function createCounterBudgetTracker(options = {}) {
|
|
22832
22837
|
let totalTokens = 0;
|