@polka-codes/runner 0.9.36 → 0.9.37

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 (2) hide show
  1. package/dist/index.js +6 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -30494,7 +30494,7 @@ var {
30494
30494
  Help
30495
30495
  } = import__.default;
30496
30496
  // package.json
30497
- var version = "0.9.36";
30497
+ var version = "0.9.37";
30498
30498
 
30499
30499
  // src/runner.ts
30500
30500
  import { execSync } from "node:child_process";
@@ -55558,6 +55558,7 @@ Request timeout after ${requestTimeoutSeconds} seconds. Canceling current reques
55558
55558
  };
55559
55559
  try {
55560
55560
  resetTimeout();
55561
+ const usageMeterOnFinishHandler = this.config.usageMeter.onFinishHandler(this.ai);
55561
55562
  const streamTextOptions = {
55562
55563
  model: this.ai,
55563
55564
  temperature: 0,
@@ -55576,7 +55577,10 @@ Request timeout after ${requestTimeoutSeconds} seconds. Canceling current reques
55576
55577
  break;
55577
55578
  }
55578
55579
  },
55579
- onFinish: this.config.usageMeter.onFinishHandler(this.ai),
55580
+ onFinish: (evt) => {
55581
+ usageMeterOnFinishHandler(evt);
55582
+ this.#callback({ kind: "Usage" /* Usage */, agent: this, usage: evt.totalUsage });
55583
+ },
55580
55584
  onError: async (error43) => {
55581
55585
  console.error("Error in stream:", error43);
55582
55586
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/runner",
3
- "version": "0.9.36",
3
+ "version": "0.9.37",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",