@polka-codes/runner 0.9.36 → 0.9.38
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/index.js +30 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29926,7 +29926,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
29926
29926
|
if (websocket._socket[kWebSocket] === undefined)
|
|
29927
29927
|
return;
|
|
29928
29928
|
websocket._socket.removeListener("data", socketOnData);
|
|
29929
|
-
process.nextTick(
|
|
29929
|
+
process.nextTick(resume2, websocket._socket);
|
|
29930
29930
|
if (code === 1005)
|
|
29931
29931
|
websocket.close();
|
|
29932
29932
|
else
|
|
@@ -29941,7 +29941,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
29941
29941
|
const websocket = this[kWebSocket];
|
|
29942
29942
|
if (websocket._socket[kWebSocket] !== undefined) {
|
|
29943
29943
|
websocket._socket.removeListener("data", socketOnData);
|
|
29944
|
-
process.nextTick(
|
|
29944
|
+
process.nextTick(resume2, websocket._socket);
|
|
29945
29945
|
websocket.close(err[kStatusCode]);
|
|
29946
29946
|
}
|
|
29947
29947
|
if (!websocket._errorEmitted) {
|
|
@@ -29964,7 +29964,7 @@ var require_websocket = __commonJS((exports, module) => {
|
|
|
29964
29964
|
function receiverOnPong(data) {
|
|
29965
29965
|
this[kWebSocket].emit("pong", data);
|
|
29966
29966
|
}
|
|
29967
|
-
function
|
|
29967
|
+
function resume2(stream) {
|
|
29968
29968
|
stream.resume();
|
|
29969
29969
|
}
|
|
29970
29970
|
function senderOnError(err) {
|
|
@@ -30494,7 +30494,7 @@ var {
|
|
|
30494
30494
|
Help
|
|
30495
30495
|
} = import__.default;
|
|
30496
30496
|
// package.json
|
|
30497
|
-
var version = "0.9.
|
|
30497
|
+
var version = "0.9.38";
|
|
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:
|
|
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
|
},
|
|
@@ -56671,6 +56675,13 @@ class StepsBuilder {
|
|
|
56671
56675
|
step
|
|
56672
56676
|
});
|
|
56673
56677
|
}
|
|
56678
|
+
loop(id, config2) {
|
|
56679
|
+
return this.step({
|
|
56680
|
+
...config2,
|
|
56681
|
+
id,
|
|
56682
|
+
type: "loop"
|
|
56683
|
+
});
|
|
56684
|
+
}
|
|
56674
56685
|
custom(idOrSpec, run) {
|
|
56675
56686
|
if (typeof idOrSpec === "string") {
|
|
56676
56687
|
if (!run) {
|
|
@@ -56684,6 +56695,13 @@ class StepsBuilder {
|
|
|
56684
56695
|
}
|
|
56685
56696
|
return this.step(idOrSpec);
|
|
56686
56697
|
}
|
|
56698
|
+
workflow(id, config2) {
|
|
56699
|
+
return this.step({
|
|
56700
|
+
...config2,
|
|
56701
|
+
id,
|
|
56702
|
+
type: "workflow"
|
|
56703
|
+
});
|
|
56704
|
+
}
|
|
56687
56705
|
agent(id, spec2) {
|
|
56688
56706
|
return this.step({
|
|
56689
56707
|
...spec2,
|
|
@@ -56691,6 +56709,13 @@ class StepsBuilder {
|
|
|
56691
56709
|
type: "agent"
|
|
56692
56710
|
});
|
|
56693
56711
|
}
|
|
56712
|
+
branch(id, config2) {
|
|
56713
|
+
return this.step({
|
|
56714
|
+
...config2,
|
|
56715
|
+
id,
|
|
56716
|
+
type: "branch"
|
|
56717
|
+
});
|
|
56718
|
+
}
|
|
56694
56719
|
}
|
|
56695
56720
|
// ../cli-shared/src/config.ts
|
|
56696
56721
|
var import_lodash3 = __toESM(require_lodash(), 1);
|