@polka-codes/runner 0.8.14 → 0.8.15
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 +20 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32748,7 +32748,7 @@ var {
|
|
|
32748
32748
|
Help
|
|
32749
32749
|
} = import__.default;
|
|
32750
32750
|
// package.json
|
|
32751
|
-
var version = "0.8.
|
|
32751
|
+
var version = "0.8.15";
|
|
32752
32752
|
|
|
32753
32753
|
// src/runner.ts
|
|
32754
32754
|
import { execSync } from "node:child_process";
|
|
@@ -58671,12 +58671,21 @@ class Runner {
|
|
|
58671
58671
|
if (resp.type === "Reply" /* Reply */) {
|
|
58672
58672
|
return responsePrompts.toolResults(request.tool, resp.message);
|
|
58673
58673
|
}
|
|
58674
|
-
return
|
|
58674
|
+
return {
|
|
58675
|
+
type: "error",
|
|
58676
|
+
message: responsePrompts.errorInvokeTool(request.tool, `Unexpected tool response: ${JSON.stringify(resp)}`)
|
|
58677
|
+
};
|
|
58675
58678
|
}
|
|
58676
|
-
return
|
|
58679
|
+
return {
|
|
58680
|
+
type: "error",
|
|
58681
|
+
message: responsePrompts.errorInvokeTool(request.tool, "Tool not available")
|
|
58682
|
+
};
|
|
58677
58683
|
} catch (toolError) {
|
|
58678
58684
|
console.error(`Error executing tool ${request.tool}:`, toolError);
|
|
58679
|
-
return
|
|
58685
|
+
return {
|
|
58686
|
+
type: "error",
|
|
58687
|
+
message: responsePrompts.errorInvokeTool(request.tool, toolError)
|
|
58688
|
+
};
|
|
58680
58689
|
}
|
|
58681
58690
|
};
|
|
58682
58691
|
const respMsg = await fn();
|
|
@@ -58693,6 +58702,13 @@ class Runner {
|
|
|
58693
58702
|
index: request.index
|
|
58694
58703
|
});
|
|
58695
58704
|
return;
|
|
58705
|
+
} else if (respMsg.type === "error") {
|
|
58706
|
+
responses.push({
|
|
58707
|
+
index: request.index,
|
|
58708
|
+
tool: request.tool,
|
|
58709
|
+
response: respMsg.message
|
|
58710
|
+
});
|
|
58711
|
+
break;
|
|
58696
58712
|
}
|
|
58697
58713
|
}
|
|
58698
58714
|
this.wsManager.sendMessage({
|