botholomew 0.6.0 → 0.6.1

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/package.json +1 -1
  2. package/src/daemon/llm.ts +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botholomew",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "An AI agent for knowledge work",
5
5
  "type": "module",
6
6
  "bin": {
package/src/daemon/llm.ts CHANGED
@@ -259,7 +259,16 @@ async function executeToolCall(
259
259
  };
260
260
  }
261
261
 
262
- const result = await tool.execute(parsed.data, ctx);
262
+ let result: unknown;
263
+ try {
264
+ result = await tool.execute(parsed.data, ctx);
265
+ } catch (err) {
266
+ return {
267
+ output: `Tool ${toolUse.name} threw an error: ${err}. You may retry with different parameters or try an alternative approach.`,
268
+ terminal: false,
269
+ isError: true,
270
+ };
271
+ }
263
272
  const isError =
264
273
  typeof result === "object" && result !== null && "is_error" in result
265
274
  ? (result as { is_error: boolean }).is_error