ak-claude 0.0.3 → 0.0.7
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/GUIDE.md +16 -0
- package/README.md +1 -0
- package/code-agent.js +434 -111
- package/index.cjs +514 -127
- package/package.json +1 -1
- package/tool-agent.js +123 -50
- package/types.d.ts +72 -6
package/GUIDE.md
CHANGED
|
@@ -430,6 +430,22 @@ const agent = new ToolAgent({
|
|
|
430
430
|
});
|
|
431
431
|
```
|
|
432
432
|
|
|
433
|
+
### Parallel Tool Execution
|
|
434
|
+
|
|
435
|
+
Control whether tool calls within a round execute in parallel or sequentially:
|
|
436
|
+
|
|
437
|
+
```javascript
|
|
438
|
+
const agent = new ToolAgent({
|
|
439
|
+
tools: [...],
|
|
440
|
+
toolExecutor: myExecutor,
|
|
441
|
+
parallelToolCalls: true, // default: unlimited parallel execution
|
|
442
|
+
// parallelToolCalls: false, // sequential execution
|
|
443
|
+
// parallelToolCalls: 3, // max 3 concurrent tool executions
|
|
444
|
+
});
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
When the model returns multiple tool calls in a single response, parallel execution runs them concurrently — significantly faster for I/O-bound tools (HTTP requests, database queries, etc.).
|
|
448
|
+
|
|
433
449
|
### Streaming
|
|
434
450
|
|
|
435
451
|
Stream the agent's output in real-time --- useful for showing progress in a UI:
|
package/README.md
CHANGED
|
@@ -561,6 +561,7 @@ All classes (except AgentQuery) accept `BaseClaudeOptions`:
|
|
|
561
561
|
| `onBeforeExecution` | function | — | `async (toolName, args) => boolean` — gate execution |
|
|
562
562
|
| `toolChoice` | object | — | Tool choice config (`auto`, `any`, `tool`, `none`) |
|
|
563
563
|
| `disableParallelToolUse` | boolean | `false` | Force sequential tool calls |
|
|
564
|
+
| `parallelToolCalls` | boolean \| number | `true` | Parallel tool execution: `false` = sequential, `true` = unlimited, number = concurrency limit |
|
|
564
565
|
|
|
565
566
|
### CodeAgent-Specific
|
|
566
567
|
|