@theokit/sdk 2.23.0 → 2.24.0

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.
@@ -1,4 +1,4 @@
1
- import { C as CustomTool, M as ModelSelection, Z as SDKUserMessage, $ as SendOptions, b as Run, G as GenerateOptions, j as GenerateRunResult, F as RunToCompletionOptions, H as RunToCompletionResult, S as SDKMessage, a6 as StreamToCompletionResult, a as McpServerConfig } from './run-CrIulPF7.cjs';
1
+ import { C as CustomTool, M as ModelSelection, Z as SDKUserMessage, $ as SendOptions, b as Run, G as GenerateOptions, j as GenerateRunResult, F as RunToCompletionOptions, H as RunToCompletionResult, S as SDKMessage, a6 as StreamToCompletionResult, a as McpServerConfig } from './run-Cr0C6cOM.cjs';
2
2
  import * as zod from 'zod';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as CustomTool, M as ModelSelection, Z as SDKUserMessage, $ as SendOptions, b as Run, G as GenerateOptions, j as GenerateRunResult, F as RunToCompletionOptions, H as RunToCompletionResult, S as SDKMessage, a6 as StreamToCompletionResult, a as McpServerConfig } from './run-CrIulPF7.js';
1
+ import { C as CustomTool, M as ModelSelection, Z as SDKUserMessage, $ as SendOptions, b as Run, G as GenerateOptions, j as GenerateRunResult, F as RunToCompletionOptions, H as RunToCompletionResult, S as SDKMessage, a6 as StreamToCompletionResult, a as McpServerConfig } from './run-Cr0C6cOM.js';
2
2
  import * as zod from 'zod';
3
3
 
4
4
  /**
package/dist/cron.cjs CHANGED
@@ -13307,6 +13307,7 @@ function levenshtein(a, b) {
13307
13307
  }
13308
13308
 
13309
13309
  // src/internal/runtime/local-agent/real-local-run.ts
13310
+ init_async_local_storage();
13310
13311
  function createRealLocalRun(options) {
13311
13312
  const { userText, id, startTime } = prepareRunContext(options.message);
13312
13313
  const supported = /* @__PURE__ */ new Set(["stream", "wait", "cancel", "conversation"]);
@@ -13418,6 +13419,7 @@ function buildLoopInputs(options, runId, userText) {
13418
13419
  ...options.onStep !== void 0 ? { onStep: options.onStep } : {},
13419
13420
  ...options.onDelta !== void 0 ? { onDelta: options.onDelta } : {},
13420
13421
  ...options.sendOptions.toolChoice !== void 0 ? { toolChoice: options.sendOptions.toolChoice } : {},
13422
+ ...options.sendOptions.activeTools !== void 0 ? { activeTools: options.sendOptions.activeTools } : {},
13421
13423
  ...options.priorMessages !== void 0 ? { priorMessages: options.priorMessages } : {},
13422
13424
  ...options.memoryTools !== void 0 && options.memoryTools.length > 0 ? { memoryTools: options.memoryTools } : {},
13423
13425
  ...buildCustomToolsInput(
@@ -13548,7 +13550,7 @@ var RealLocalRun = class extends FixtureRunBase {
13548
13550
  }
13549
13551
  async executeAgentLoop(inputs) {
13550
13552
  try {
13551
- const output = await runAgentLoop(inputs);
13553
+ const output = inputs.activeTools !== void 0 ? await withToolWhitelist(new Set(inputs.activeTools), () => runAgentLoop(inputs)) : await runAgentLoop(inputs);
13552
13554
  this.applyAgentLoopOutput(output);
13553
13555
  this.transitionTo(output.finalStatus);
13554
13556
  } catch (cause) {