@fifthrevision/axle 0.9.0 → 0.10.0
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/README.md +23 -8
- package/dist/index.d.mts +1173 -0
- package/dist/index.mjs +38 -0
- package/package.json +15 -13
- package/dist/ProceduralMemory-BtEMO_Cx.js +0 -59
- package/dist/cli.js +0 -8
- package/dist/index.d.ts +0 -953
- package/dist/index.js +0 -1
package/README.md
CHANGED
|
@@ -207,10 +207,10 @@ const agent = new Agent({
|
|
|
207
207
|
|
|
208
208
|
Axle maps common names to provider-specific identifiers automatically:
|
|
209
209
|
|
|
210
|
-
| Name | Anthropic
|
|
211
|
-
| ---------------- |
|
|
212
|
-
| `web_search` | `web_search_20250305`
|
|
213
|
-
| `code_execution` | —
|
|
210
|
+
| Name | Anthropic | OpenAI | Gemini |
|
|
211
|
+
| ---------------- | --------------------- | -------------------- | --------------- |
|
|
212
|
+
| `web_search` | `web_search_20250305` | `web_search_preview` | `googleSearch` |
|
|
213
|
+
| `code_execution` | — | `code_interpreter` | `codeExecution` |
|
|
214
214
|
|
|
215
215
|
You can also pass provider-specific names directly. Use the optional `config`
|
|
216
216
|
field for provider-specific options:
|
|
@@ -268,7 +268,10 @@ agent.on((event) => {
|
|
|
268
268
|
case "text:delta":
|
|
269
269
|
process.stdout.write(event.delta);
|
|
270
270
|
break;
|
|
271
|
-
case "
|
|
271
|
+
case "turn:complete":
|
|
272
|
+
console.log(`Turn done: ${event.message.id}`);
|
|
273
|
+
break;
|
|
274
|
+
case "tool:exec-start":
|
|
272
275
|
console.log(`Running tool: ${event.name}`);
|
|
273
276
|
break;
|
|
274
277
|
case "error":
|
|
@@ -282,12 +285,23 @@ const handle = agent.send("Write me a poem.");
|
|
|
282
285
|
const result = await handle.final;
|
|
283
286
|
```
|
|
284
287
|
|
|
285
|
-
Event types include `
|
|
286
|
-
`
|
|
287
|
-
`
|
|
288
|
+
Event types include `turn:start`, `turn:complete`, `tool-results:start`,
|
|
289
|
+
`tool-results:complete`, `text:start`, `text:delta`, `text:end`,
|
|
290
|
+
`thinking:start`, `thinking:delta`, `thinking:end`, `tool:request`,
|
|
291
|
+
`tool:exec-start`, `tool:exec-complete`, `internal-tool:start`,
|
|
292
|
+
`internal-tool:complete`, and `error`. The `turn:*` and `tool-results:*`
|
|
293
|
+
events carry complete `AxleAssistantMessage` and `AxleToolCallMessage` objects
|
|
294
|
+
for client-server architectures that need authoritative message boundaries.
|
|
288
295
|
|
|
289
296
|
Callbacks are registered once and fire on every subsequent `send()`.
|
|
290
297
|
|
|
298
|
+
### Hosting / Sessions
|
|
299
|
+
|
|
300
|
+
Axle stops at the agent runtime boundary. If you need long-lived sessions,
|
|
301
|
+
SSE transport, resumable cursors, or React client hooks, build those concerns
|
|
302
|
+
in your host application on top of `Agent`, `agent.on(...)`, and the streamed
|
|
303
|
+
turn events that Axle emits.
|
|
304
|
+
|
|
291
305
|
## Known Limitations
|
|
292
306
|
|
|
293
307
|
1. Axle does not support multi-modal output right now.
|
|
@@ -382,6 +396,7 @@ task: |
|
|
|
382
396
|
```
|
|
383
397
|
|
|
384
398
|
Each entry supports:
|
|
399
|
+
|
|
385
400
|
- `transport` — `"stdio"` or `"http"` (required)
|
|
386
401
|
- `name` — prefix for tool names from this server (optional)
|
|
387
402
|
- `command` / `args` / `env` — for stdio transport
|