@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.js
CHANGED
|
@@ -6171,7 +6171,7 @@ __export(compact_session_exports, {
|
|
|
6171
6171
|
shouldAutoCompact: () => shouldAutoCompact
|
|
6172
6172
|
});
|
|
6173
6173
|
function isCompactSummary(content) {
|
|
6174
|
-
return content.startsWith(COMPACT_SUMMARY_MARKER);
|
|
6174
|
+
return content.startsWith(COMPACT_SUMMARY_MARKER) || content.startsWith("[[theokit:goal-continuation]]");
|
|
6175
6175
|
}
|
|
6176
6176
|
function plainText(content) {
|
|
6177
6177
|
if (typeof content === "string") return content;
|
|
@@ -7504,6 +7504,7 @@ var init_context = __esm({
|
|
|
7504
7504
|
// src/internal/runtime/lifecycle/run-until.ts
|
|
7505
7505
|
var run_until_exports = {};
|
|
7506
7506
|
__export(run_until_exports, {
|
|
7507
|
+
GOAL_CONTINUATION_MARKER: () => GOAL_CONTINUATION_MARKER,
|
|
7507
7508
|
composeContinuation: () => composeContinuation,
|
|
7508
7509
|
runUntilImpl: () => runUntilImpl
|
|
7509
7510
|
});
|
|
@@ -7644,6 +7645,7 @@ async function* runUntilImpl(agent, goal, options, deps) {
|
|
|
7644
7645
|
}
|
|
7645
7646
|
function composeContinuation(goal, lastResponse) {
|
|
7646
7647
|
return [
|
|
7648
|
+
GOAL_CONTINUATION_MARKER,
|
|
7647
7649
|
"Continue working toward the active goal.",
|
|
7648
7650
|
"",
|
|
7649
7651
|
`<objective>
|
|
@@ -7664,11 +7666,13 @@ ${goal}
|
|
|
7664
7666
|
" current state, requirement by requirement. Treat uncertain or indirect evidence as not achieved.",
|
|
7665
7667
|
"",
|
|
7666
7668
|
`Your last response was:
|
|
7667
|
-
${lastResponse.slice(
|
|
7669
|
+
${lastResponse.slice(-1e3)}`
|
|
7668
7670
|
].join("\n");
|
|
7669
7671
|
}
|
|
7672
|
+
var GOAL_CONTINUATION_MARKER;
|
|
7670
7673
|
var init_run_until = __esm({
|
|
7671
7674
|
"src/internal/runtime/lifecycle/run-until.ts"() {
|
|
7675
|
+
GOAL_CONTINUATION_MARKER = "[[theokit:goal-continuation]]";
|
|
7672
7676
|
}
|
|
7673
7677
|
});
|
|
7674
7678
|
|
|
@@ -22667,23 +22671,6 @@ async function updateJobStatus(jobId, enabled) {
|
|
|
22667
22671
|
return updated;
|
|
22668
22672
|
}
|
|
22669
22673
|
|
|
22670
|
-
// src/goal-loop.ts
|
|
22671
|
-
function runGoalLoop(agent, goal, options, depsOverride) {
|
|
22672
|
-
async function* wrap() {
|
|
22673
|
-
const { runUntilImpl: runUntilImpl2 } = await Promise.resolve().then(() => (init_run_until(), run_until_exports));
|
|
22674
|
-
const deps = depsOverride ?? await (async () => {
|
|
22675
|
-
const { judgeCallImpl: judgeCallImpl2 } = await Promise.resolve().then(() => (init_judge_call(), judge_call_exports));
|
|
22676
|
-
const { getAgentFacade: getAgentFacade2 } = await Promise.resolve().then(() => (init_agent_factory_registry(), agent_factory_registry_exports));
|
|
22677
|
-
const create = getAgentFacade2().create;
|
|
22678
|
-
return {
|
|
22679
|
-
judge: (ctx, opts) => judgeCallImpl2(ctx, opts, { create })
|
|
22680
|
-
};
|
|
22681
|
-
})();
|
|
22682
|
-
return yield* runUntilImpl2(agent, goal, options, deps);
|
|
22683
|
-
}
|
|
22684
|
-
return wrap();
|
|
22685
|
-
}
|
|
22686
|
-
|
|
22687
22674
|
// src/define-provider.ts
|
|
22688
22675
|
init_builtin();
|
|
22689
22676
|
init_registry();
|
|
@@ -22824,6 +22811,24 @@ var EventBus = class {
|
|
|
22824
22811
|
// src/index.ts
|
|
22825
22812
|
init_generate_object();
|
|
22826
22813
|
|
|
22814
|
+
// src/goal-loop.ts
|
|
22815
|
+
init_run_until();
|
|
22816
|
+
function runGoalLoop(agent, goal, options, depsOverride) {
|
|
22817
|
+
async function* wrap() {
|
|
22818
|
+
const { runUntilImpl: runUntilImpl2 } = await Promise.resolve().then(() => (init_run_until(), run_until_exports));
|
|
22819
|
+
const deps = depsOverride ?? await (async () => {
|
|
22820
|
+
const { judgeCallImpl: judgeCallImpl2 } = await Promise.resolve().then(() => (init_judge_call(), judge_call_exports));
|
|
22821
|
+
const { getAgentFacade: getAgentFacade2 } = await Promise.resolve().then(() => (init_agent_factory_registry(), agent_factory_registry_exports));
|
|
22822
|
+
const create = getAgentFacade2().create;
|
|
22823
|
+
return {
|
|
22824
|
+
judge: (ctx, opts) => judgeCallImpl2(ctx, opts, { create })
|
|
22825
|
+
};
|
|
22826
|
+
})();
|
|
22827
|
+
return yield* runUntilImpl2(agent, goal, options, deps);
|
|
22828
|
+
}
|
|
22829
|
+
return wrap();
|
|
22830
|
+
}
|
|
22831
|
+
|
|
22827
22832
|
// src/internal/budget/tracker/budget-tracker-counter.ts
|
|
22828
22833
|
function createCounterBudgetTracker(options = {}) {
|
|
22829
22834
|
let totalTokens = 0;
|
|
@@ -24519,6 +24524,6 @@ function safeStringify2(v) {
|
|
|
24519
24524
|
// src/index.ts
|
|
24520
24525
|
init_run_events();
|
|
24521
24526
|
|
|
24522
|
-
export { Agent, AgentBuilder, AgentDisposedError, AgentFactory, AgentRunError, AuthenticationError, Budget, BudgetExceededError, ConfigurationError, Cron, EventBus, GenerateObjectError, IntegrationNotConnectedError, InvalidTaskIdError, JobQueue, Memory, MemoryAdapterError, NetworkError, NoopMemoryProvider, PermissionEngine, PermissionPlugin, Plugin, Provider, RateLimitError, Security, Skill, SkillReadTool, Squad, StreamObjectError, Task, TaskNotFoundError, Theokit, TheokitAgentError, TokenLimiter, Tool, ToolError, UnicodeNormalizer, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, UsageAccumulator, applyMode, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, emitRunEvent, estimateTokens2 as estimateTokens, extractRawId, getPricingEntry, inferApiMode, isTransientError, migrateSqliteToLance2 as migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, runGoalLoop, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|
|
24527
|
+
export { Agent, AgentBuilder, AgentDisposedError, AgentFactory, AgentRunError, AuthenticationError, Budget, BudgetExceededError, ConfigurationError, Cron, EventBus, GOAL_CONTINUATION_MARKER, GenerateObjectError, IntegrationNotConnectedError, InvalidTaskIdError, JobQueue, Memory, MemoryAdapterError, NetworkError, NoopMemoryProvider, PermissionEngine, PermissionPlugin, Plugin, Provider, RateLimitError, Security, Skill, SkillReadTool, Squad, StreamObjectError, Task, TaskNotFoundError, Theokit, TheokitAgentError, TokenLimiter, Tool, ToolError, UnicodeNormalizer, UnknownAgentError, UnsupportedBudgetOperationError, UnsupportedRunOperationError, UnsupportedTaskOperationError, UsageAccumulator, applyMode, chargeAndCheckThresholds, computeCost, createCounterBudgetTracker, emitRunEvent, estimateTokens2 as estimateTokens, extractRawId, getPricingEntry, inferApiMode, isTransientError, migrateSqliteToLance2 as migrateSqliteToLance, mkMemoryId, normalizeSchema, normalizeUsage, preflightCheck, runGoalLoop, scopedConversationId, sessionScopePrefix, toShareGptTrajectory, withCwdMutex };
|
|
24523
24528
|
//# sourceMappingURL=index.js.map
|
|
24524
24529
|
//# sourceMappingURL=index.js.map
|