@theokit/agents 0.38.1 → 0.39.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.
package/dist/bridge.js CHANGED
@@ -46,7 +46,7 @@ import {
46
46
  translateToUIMessageStream,
47
47
  validateUniqueRoutes,
48
48
  walkAgentMetadata
49
- } from "./chunk-MX5JVERM.js";
49
+ } from "./chunk-JID4DOB3.js";
50
50
  import "./chunk-NERDIS45.js";
51
51
  import "./chunk-7QVYU63E.js";
52
52
  export {
@@ -995,13 +995,16 @@ async function loadSdkRuntime() {
995
995
  try {
996
996
  const sdk = await import("@theokit/sdk");
997
997
  const InMemory = sdk.InMemoryConversationStorage;
998
+ const skillReadTool = "SkillReadTool" in sdk ? sdk.SkillReadTool : void 0;
998
999
  return {
999
1000
  Agent: sdk.Agent,
1000
- defineTool: sdk.defineTool,
1001
+ // `.bind` keeps the static factory callable when detached from `sdk.Tool` (it takes no `this`,
1002
+ // but binding is explicit + satisfies unbound-method rather than relying on that).
1003
+ defineTool: sdk.Tool.create.bind(sdk.Tool),
1001
1004
  InMemoryConversationStorage: InMemory,
1002
1005
  FileSystemConversationStorage: "FileSystemConversationStorage" in sdk ? sdk.FileSystemConversationStorage : InMemory,
1003
- ..."defineSkillReadTool" in sdk ? {
1004
- defineSkillReadTool: sdk.defineSkillReadTool
1006
+ ...skillReadTool ? {
1007
+ defineSkillReadTool: /* @__PURE__ */ __name((skills) => skillReadTool.create(skills), "defineSkillReadTool")
1005
1008
  } : {}
1006
1009
  };
1007
1010
  } catch (err) {
@@ -1149,7 +1152,7 @@ function hasZodInputSchema(schema) {
1149
1152
  __name(hasZodInputSchema, "hasZodInputSchema");
1150
1153
  function withRunContext(handler, runContext) {
1151
1154
  return (input, ctx) => handler(input, {
1152
- signal: ctx?.signal,
1155
+ ...ctx,
1153
1156
  context: runContext
1154
1157
  });
1155
1158
  }
@@ -2258,8 +2261,8 @@ async function startRound(factory, prompt, sessionId, signal, retry) {
2258
2261
  }
2259
2262
  }, "open");
2260
2263
  if (!retry) return open();
2261
- const { withRetry } = await import("@theokit/sdk/retry");
2262
- return withRetry(open, {
2264
+ const { Retry } = await import("@theokit/sdk/retry");
2265
+ return Retry.create(open, {
2263
2266
  ...retry,
2264
2267
  signal: retry.signal ?? signal
2265
2268
  });
@@ -2983,4 +2986,4 @@ export {
2983
2986
  generateAgentManifest,
2984
2987
  agentsPlugin
2985
2988
  };
2986
- //# sourceMappingURL=chunk-MX5JVERM.js.map
2989
+ //# sourceMappingURL=chunk-JID4DOB3.js.map