@electric-ax/agents 0.4.11 → 0.4.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electric-ax/agents",
3
- "version": "0.4.11",
3
+ "version": "0.4.13",
4
4
  "description": "Built-in Electric Agents runtimes such as Horton and worker",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  "./package.json": "./package.json"
39
39
  },
40
40
  "dependencies": {
41
- "@durable-streams/state": "^0.2.9",
41
+ "@durable-streams/state": "^0.3.1",
42
42
  "@mariozechner/pi-agent-core": "^0.70.2",
43
43
  "@mariozechner/pi-ai": "^0.70.2",
44
44
  "@sinclair/typebox": "^0.34.48",
@@ -47,9 +47,10 @@
47
47
  "pino": "^10.3.1",
48
48
  "pino-pretty": "^13.0.0",
49
49
  "sqlite-vec": "^0.1.9",
50
+ "undici": "^7.24.7",
50
51
  "zod": "^4.3.6",
51
52
  "@electric-ax/agents-mcp": "0.2.2",
52
- "@electric-ax/agents-runtime": "0.3.7"
53
+ "@electric-ax/agents-runtime": "0.3.9"
53
54
  },
54
55
  "devDependencies": {
55
56
  "@types/better-sqlite3": "^7.6.13",
@@ -15,7 +15,7 @@
15
15
  "@radix-ui/themes": "^3.3.0",
16
16
  "@sinclair/typebox": "^0.34.49",
17
17
  "@tanstack/db": "^0.6.0",
18
- "@tanstack/react-db": "^0.1.78",
18
+ "@tanstack/react-db": "^0.1.85",
19
19
  "react": "^19.2.4",
20
20
  "react-dom": "^19.2.4",
21
21
  "streamdown": "^2.5.0"
@@ -56,7 +56,7 @@ The handler is **not** a long-running process. It wakes, does its work (usually
56
56
 
57
57
  ### Spawning Children
58
58
 
59
- Any entity can spawn child entities. When a child finishes (and the parent registered `wake: "runFinished"`), the parent's handler runs again. The wake event includes the child's response and the status of sibling children.
59
+ Any entity can spawn child entities. When a child finishes (and the parent registered `wake: { on: "runFinished", includeResponse: true }`), the parent's handler runs again. The wake event includes the child's response and the status of sibling children.
60
60
 
61
61
  ### The Worker Entity
62
62
 
@@ -184,7 +184,10 @@ function createAnalyzeTool(ctx: HandlerContext) {
184
184
  'You are an optimist analyst. Provide an enthusiastic, positive analysis focusing on opportunities and benefits.',
185
185
  tools: ['bash', 'read'],
186
186
  },
187
- { initialMessage: question, wake: 'runFinished' }
187
+ {
188
+ initialMessage: question,
189
+ wake: { on: 'runFinished', includeResponse: true },
190
+ }
188
191
  )
189
192
  return {
190
193
  content: [
@@ -257,7 +260,10 @@ function createAnalyzeTool(ctx: HandlerContext) {
257
260
  'worker',
258
261
  childId,
259
262
  { systemPrompt: p.systemPrompt, tools: ['bash'] },
260
- { initialMessage: question, wake: 'runFinished' }
263
+ {
264
+ initialMessage: question,
265
+ wake: { on: 'runFinished', includeResponse: true },
266
+ }
261
267
  )
262
268
  ctx.db.actions.children_insert({
263
269
  row: { key: p.id, url: `/worker/${childId}` },
@@ -524,13 +530,13 @@ After explaining, tell the user to restart with `npm run dev:all` (starts both s
524
530
 
525
531
  ## What you learned
526
532
 
527
- | Step | Concept | API |
528
- | ---- | ----------------------- | ----------------------------------------------------------- |
529
- | 1 | Entity types & handlers | `registry.define()`, `ctx.useAgent()`, `ctx.agent.run()` |
530
- | 2 | Spawning children | `ctx.spawn()`, `wake: 'runFinished'` |
531
- | 3 | State collections | `state: { children: { primaryKey: 'key' } }` |
532
- | 4 | Server routes | `createRuntimeServerClient()`, `client.spawnEntity()` |
533
- | 5 | Live frontend | `createAgentsClient`, `entity()`, `useChat`, streaming text |
533
+ | Step | Concept | API |
534
+ | ---- | ----------------------- | ------------------------------------------------------------------- |
535
+ | 1 | Entity types & handlers | `registry.define()`, `ctx.useAgent()`, `ctx.agent.run()` |
536
+ | 2 | Spawning children | `ctx.spawn()`, `wake: { on: 'runFinished', includeResponse: true }` |
537
+ | 3 | State collections | `state: { children: { primaryKey: 'key' } }` |
538
+ | 4 | Server routes | `createRuntimeServerClient()`, `client.spawnEntity()` |
539
+ | 5 | Live frontend | `createAgentsClient`, `entity()`, `useChat`, streaming text |
534
540
 
535
541
  For a complete multi-agent chat app with rooms, agent spawning, and a Slack-style UI, see the [agents-chat-starter](https://github.com/electric-sql/electric/tree/main/examples/agents-chat-starter) example.
536
542