@tangle-network/agent-runtime 0.50.0 → 0.51.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 (37) hide show
  1. package/dist/agent.js +1 -1
  2. package/dist/{chunk-RHW75JW5.js → chunk-47SWANFA.js} +2 -2
  3. package/dist/{chunk-ML4IXGTV.js → chunk-FKHNHUXP.js} +2 -2
  4. package/dist/{chunk-CM2IK7VS.js → chunk-FQH33M5N.js} +13 -4
  5. package/dist/chunk-FQH33M5N.js.map +1 -0
  6. package/dist/chunk-G3RGMA7C.js +361 -0
  7. package/dist/chunk-G3RGMA7C.js.map +1 -0
  8. package/dist/{chunk-NDM5VXZW.js → chunk-HAA4KZUD.js} +7 -5
  9. package/dist/{chunk-NDM5VXZW.js.map → chunk-HAA4KZUD.js.map} +1 -1
  10. package/dist/{chunk-OM3YNZIW.js → chunk-HYG4ISNS.js} +5 -360
  11. package/dist/chunk-HYG4ISNS.js.map +1 -0
  12. package/dist/{chunk-BKAIVNFA.js → chunk-XEI7AIHU.js} +3 -3
  13. package/dist/improvement.d.ts +96 -8
  14. package/dist/improvement.js +191 -9
  15. package/dist/improvement.js.map +1 -1
  16. package/dist/index.js +8 -7
  17. package/dist/index.js.map +1 -1
  18. package/dist/intelligence.d.ts +423 -0
  19. package/dist/intelligence.js +427 -0
  20. package/dist/intelligence.js.map +1 -0
  21. package/dist/loop-runner-bin.js +4 -3
  22. package/dist/loops.js +1 -1
  23. package/dist/mcp/bin.js +5 -4
  24. package/dist/mcp/bin.js.map +1 -1
  25. package/dist/mcp/index.js +6 -5
  26. package/dist/mcp/index.js.map +1 -1
  27. package/dist/platform.d.ts +120 -62
  28. package/dist/platform.js +68 -26
  29. package/dist/platform.js.map +1 -1
  30. package/dist/runtime.js +1 -1
  31. package/dist/workflow.js +1 -1
  32. package/package.json +6 -1
  33. package/dist/chunk-CM2IK7VS.js.map +0 -1
  34. package/dist/chunk-OM3YNZIW.js.map +0 -1
  35. /package/dist/{chunk-RHW75JW5.js.map → chunk-47SWANFA.js.map} +0 -0
  36. /package/dist/{chunk-ML4IXGTV.js.map → chunk-FKHNHUXP.js.map} +0 -0
  37. /package/dist/{chunk-BKAIVNFA.js.map → chunk-XEI7AIHU.js.map} +0 -0
package/dist/agent.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-7JITYN6T.js";
4
4
  import {
5
5
  createSandboxForSpec
6
- } from "./chunk-CM2IK7VS.js";
6
+ } from "./chunk-FQH33M5N.js";
7
7
  import {
8
8
  mapSandboxEvent
9
9
  } from "./chunk-GSUO5QS6.js";
@@ -3,7 +3,7 @@ import {
3
3
  createDelegationTraceCollector,
4
4
  formatDetachedSessionRef,
5
5
  generateDelegationSpanId
6
- } from "./chunk-OM3YNZIW.js";
6
+ } from "./chunk-HYG4ISNS.js";
7
7
  import {
8
8
  AgentEvalError,
9
9
  NotFoundError,
@@ -1353,4 +1353,4 @@ export {
1353
1353
  validateDelegationStatusArgs,
1354
1354
  createDelegationStatusHandler
1355
1355
  };
1356
- //# sourceMappingURL=chunk-RHW75JW5.js.map
1356
+ //# sourceMappingURL=chunk-47SWANFA.js.map
@@ -14,7 +14,7 @@ import {
14
14
  DELEGATION_STATUS_DESCRIPTION,
15
15
  DELEGATION_STATUS_INPUT_SCHEMA,
16
16
  DELEGATION_STATUS_TOOL_NAME
17
- } from "./chunk-RHW75JW5.js";
17
+ } from "./chunk-47SWANFA.js";
18
18
 
19
19
  // src/mcp/openai-tools.ts
20
20
  function buildTool(name, description, parameters) {
@@ -61,4 +61,4 @@ export {
61
61
  mcpToolsForRuntimeMcp,
62
62
  mcpToolsForRuntimeMcpSubset
63
63
  };
64
- //# sourceMappingURL=chunk-ML4IXGTV.js.map
64
+ //# sourceMappingURL=chunk-FKHNHUXP.js.map
@@ -1112,15 +1112,24 @@ function inlineSandboxClient(factory) {
1112
1112
  try {
1113
1113
  const artifact = await settle(exec, message, controller.signal);
1114
1114
  const out = artifact.out;
1115
+ const tokensIn = artifact.spent.tokens.input;
1116
+ const tokensOut = artifact.spent.tokens.output;
1117
+ const costUsd = artifact.spent.usd;
1118
+ if (tokensIn || tokensOut || costUsd) {
1119
+ yield {
1120
+ type: "llm_call",
1121
+ data: { tokensIn, tokensOut, costUsd }
1122
+ };
1123
+ }
1115
1124
  yield {
1116
1125
  type: "result",
1117
1126
  data: {
1118
1127
  finalText: out?.content ?? "",
1119
1128
  tokenUsage: {
1120
- inputTokens: artifact.spent.tokens.input,
1121
- outputTokens: artifact.spent.tokens.output
1129
+ inputTokens: tokensIn,
1130
+ outputTokens: tokensOut
1122
1131
  },
1123
- costUsd: artifact.spent.usd
1132
+ costUsd
1124
1133
  }
1125
1134
  };
1126
1135
  } finally {
@@ -6519,4 +6528,4 @@ export {
6519
6528
  gitWorkspace,
6520
6529
  jjWorkspace
6521
6530
  };
6522
- //# sourceMappingURL=chunk-CM2IK7VS.js.map
6531
+ //# sourceMappingURL=chunk-FQH33M5N.js.map