@compilr-dev/agents 0.3.2 → 0.3.5

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.
@@ -95,5 +95,6 @@ export function createSuggestTool(options = {}) {
95
95
  action: input.action,
96
96
  }));
97
97
  },
98
+ silent: true,
98
99
  });
99
100
  }
@@ -271,6 +271,7 @@ export function createTodoTools(store) {
271
271
  total: input.todos.length,
272
272
  }));
273
273
  },
274
+ silent: true,
274
275
  });
275
276
  const todoRead = defineTool({
276
277
  name: 'todo_read',
@@ -308,6 +309,7 @@ export function createTodoTools(store) {
308
309
  total: todos.length,
309
310
  }));
310
311
  },
312
+ silent: true,
311
313
  });
312
314
  return { todoWrite, todoRead, store: todoStore };
313
315
  }
@@ -29,6 +29,12 @@ export interface DefineToolOptions<T extends object> {
29
29
  * Default: false (sequential execution)
30
30
  */
31
31
  parallel?: boolean;
32
+ /**
33
+ * If true, this tool runs silently without spinner updates or result output.
34
+ * Used for internal housekeeping tools like todo_read, suggest, etc.
35
+ * Default: false (normal visibility)
36
+ */
37
+ silent?: boolean;
32
38
  }
33
39
  /**
34
40
  * Define a tool with type-safe input handling
@@ -33,6 +33,7 @@ export function defineTool(options) {
33
33
  definition,
34
34
  execute: options.execute,
35
35
  parallel: options.parallel,
36
+ silent: options.silent,
36
37
  };
37
38
  }
38
39
  /**
@@ -39,6 +39,19 @@ export interface ToolExecutionContext {
39
39
  * Tool use ID for correlation with events
40
40
  */
41
41
  toolUseId?: string;
42
+ /**
43
+ * AbortSignal for cancelling/backgrounding the tool execution.
44
+ * When aborted with reason 'background', the bash tool should move the
45
+ * process to ShellManager instead of terminating.
46
+ */
47
+ abortSignal?: AbortSignal;
48
+ /**
49
+ * Callback to notify when a process has been moved to background.
50
+ * Called by bash tool when user presses Ctrl+B (abortSignal with 'background' reason).
51
+ * @param shellId - The shell ID in ShellManager for later retrieval
52
+ * @param partialOutput - Output collected so far (stdout + stderr)
53
+ */
54
+ onBackground?: (shellId: string, partialOutput: string) => void;
42
55
  }
43
56
  /**
44
57
  * Tool handler function type
@@ -59,6 +72,12 @@ export interface Tool<T = object> {
59
72
  * Default: false (sequential execution)
60
73
  */
61
74
  parallel?: boolean;
75
+ /**
76
+ * If true, this tool runs silently without spinner updates or result output.
77
+ * Used for internal housekeeping tools like todo_read, suggest, etc.
78
+ * Default: false (normal visibility)
79
+ */
80
+ silent?: boolean;
62
81
  }
63
82
  /**
64
83
  * Tool registry for managing available tools
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/agents",
3
- "version": "0.3.2",
3
+ "version": "0.3.5",
4
4
  "description": "Lightweight multi-LLM agent library for building CLI AI assistants",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "node": ">=18.0.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@anthropic-ai/sdk": "^0.30.0",
55
+ "@anthropic-ai/sdk": "^0.72.1",
56
56
  "@modelcontextprotocol/sdk": "^1.23.0"
57
57
  },
58
58
  "peerDependenciesMeta": {
@@ -64,7 +64,7 @@
64
64
  }
65
65
  },
66
66
  "devDependencies": {
67
- "@anthropic-ai/sdk": "^0.30.1",
67
+ "@anthropic-ai/sdk": "^0.72.1",
68
68
  "@eslint/js": "^9.39.1",
69
69
  "@modelcontextprotocol/sdk": "^1.23.0",
70
70
  "@types/node": "^24.10.1",
@@ -78,5 +78,8 @@
78
78
  },
79
79
  "dependencies": {
80
80
  "@google/genai": "^1.38.0"
81
+ },
82
+ "overrides": {
83
+ "hono": "^4.11.7"
81
84
  }
82
85
  }