@theokit/sdk 4.29.0 → 4.30.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.
Files changed (36) hide show
  1. package/dist/{agent-FBTLZI6V.js → agent-7YUGJJTU.js} +3 -3
  2. package/dist/{agent-FBTLZI6V.js.map → agent-7YUGJJTU.js.map} +1 -1
  3. package/dist/{agent-CdjSCbYz.d.cts → agent-Bzg2_uGr.d.cts} +55 -1
  4. package/dist/{agent-BZz4X8ZM.d.ts → agent-Ekv8y7_c.d.ts} +55 -1
  5. package/dist/{agent-LBCEK6VH.cjs → agent-LD76RI74.cjs} +4 -4
  6. package/dist/{agent-LBCEK6VH.cjs.map → agent-LD76RI74.cjs.map} +1 -1
  7. package/dist/{chunk-EULKRTB5.js → chunk-5YCAR23S.js} +3 -3
  8. package/dist/{chunk-EULKRTB5.js.map → chunk-5YCAR23S.js.map} +1 -1
  9. package/dist/{chunk-YQAPEYUV.cjs → chunk-GWMQ5CS3.cjs} +15 -7
  10. package/dist/chunk-GWMQ5CS3.cjs.map +1 -0
  11. package/dist/{chunk-VUJ3NVDC.js → chunk-ISZ3MBUD.js} +13 -5
  12. package/dist/chunk-ISZ3MBUD.js.map +1 -0
  13. package/dist/{chunk-54YLX4Q6.cjs → chunk-NG6B2PMA.cjs} +5 -5
  14. package/dist/{chunk-54YLX4Q6.cjs.map → chunk-NG6B2PMA.cjs.map} +1 -1
  15. package/dist/{cron-CIIshMs3.d.cts → cron-CjzvXGT2.d.cts} +1 -1
  16. package/dist/{cron-dElBjDaL.d.ts → cron-D0Z29gI-.d.ts} +1 -1
  17. package/dist/cron.cjs +3 -3
  18. package/dist/cron.d.cts +2 -2
  19. package/dist/cron.d.ts +2 -2
  20. package/dist/cron.js +2 -2
  21. package/dist/eval.cjs +2 -2
  22. package/dist/eval.js +1 -1
  23. package/dist/index.cjs +21 -21
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +4 -4
  26. package/dist/index.d.ts +4 -4
  27. package/dist/index.js +4 -4
  28. package/dist/index.js.map +1 -1
  29. package/dist/internal/plugins/types.d.cts +1 -1
  30. package/dist/internal/plugins/types.d.ts +1 -1
  31. package/dist/subagents-loader.d.cts +1 -1
  32. package/dist/subagents-loader.d.ts +1 -1
  33. package/dist/types/plugin.d.ts +32 -0
  34. package/package.json +1 -1
  35. package/dist/chunk-VUJ3NVDC.js.map +0 -1
  36. package/dist/chunk-YQAPEYUV.cjs.map +0 -1
@@ -6782,9 +6782,12 @@ async function runIteration(inputs, ctx) {
6782
6782
  async function transformLlmOutputText(inputs, text, ctx) {
6783
6783
  return inputs.pluginManager !== void 0 ? inputs.pluginManager.runTransformLlmOutputHooks(text, ctx) : text;
6784
6784
  }
6785
- async function guardAndTransformToolResults(inputs, raw, ctx) {
6785
+ async function guardAndTransformToolResults(inputs, raw, ctx, toolCalls) {
6786
6786
  const guarded = inputs.toolResultGuard !== void 0 ? applyToolResultGuard(raw, inputs.toolResultGuard) : raw;
6787
- return inputs.pluginManager !== void 0 ? inputs.pluginManager.runTransformToolResultHooks(guarded, ctx) : guarded;
6787
+ return inputs.pluginManager !== void 0 ? inputs.pluginManager.runTransformToolResultHooks(guarded, {
6788
+ ...ctx,
6789
+ toolCalls: toolCalls.map((c) => ({ id: c.id, name: c.name, args: c.input }))
6790
+ }) : guarded;
6788
6791
  }
6789
6792
  async function continueOrTerminate(inputs, ctx, llmOutput) {
6790
6793
  if (llmOutput.errored) return "error";
@@ -6807,7 +6810,12 @@ async function continueOrTerminate(inputs, ctx, llmOutput) {
6807
6810
  ctx.sendSpan
6808
6811
  // M3 #64 — nest tool.call spans under agent.send
6809
6812
  );
6810
- const toolResults = await guardAndTransformToolResults(inputs, rawResults, tCtx);
6813
+ const toolResults = await guardAndTransformToolResults(
6814
+ inputs,
6815
+ rawResults,
6816
+ tCtx,
6817
+ llmOutput.toolCalls
6818
+ );
6811
6819
  ctx.messages.push({ role: "user", content: toolResults });
6812
6820
  if (inputs.onStep !== void 0) {
6813
6821
  const cb = inputs.onStep;
@@ -10453,5 +10461,5 @@ async function abrirStoreLocal(reg) {
10453
10461
  }
10454
10462
 
10455
10463
  export { Agent, AgentBuilder, DEFAULT_AGENTIC_MODEL_ID, MEMORY_EMBEDDING_ADAPTERS, Tool, ToolError, UsageAccumulator, computeCost, generateCronId, getPricingEntry, httpRequest, isFixtureApiKey, openRouterMemoryEmbeddingProviderAdapter, resolveApiKey, shouldUseFixtureMode };
10456
- //# sourceMappingURL=chunk-VUJ3NVDC.js.map
10457
- //# sourceMappingURL=chunk-VUJ3NVDC.js.map
10464
+ //# sourceMappingURL=chunk-ISZ3MBUD.js.map
10465
+ //# sourceMappingURL=chunk-ISZ3MBUD.js.map