@ironflow/browser 0.24.0 → 0.25.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/README.md +10 -13
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -173,7 +173,7 @@ const sub = await ironflow.subscribe('events:order.*', {
173
173
  // Acknowledgment mode: 'auto' (default) | 'manual'
174
174
  ackMode: 'manual',
175
175
 
176
- // Backpressure handling: 'buffer' (default) | 'drop'
176
+ // Backpressure handling: 'buffer' (default) | 'drop' | 'block'
177
177
  backpressure: 'buffer',
178
178
 
179
179
  // Browser-specific: track last event for state access
@@ -501,7 +501,7 @@ sub.unsubscribe();
501
501
 
502
502
  ### `agents.readMemory(projection, opts?)`
503
503
 
504
- Typed read of an agent memory projection. Optional read-your-writes via `minSeq` from a prior `streams.append`.
504
+ Typed read of an agent memory projection. Optional read-your-writes via `minSeq` (a NATS sequence, e.g. `targetSeq` from a prior `waitForEvent`).
505
505
 
506
506
  ```typescript
507
507
  interface DocMemory {
@@ -512,14 +512,16 @@ interface DocMemory {
512
512
  const mem = await ironflow.agents.readMemory<DocMemory>('doc-processor-memory');
513
513
  console.log(mem.state.docs, mem.version);
514
514
 
515
- // Read-your-writes: pass the seq returned by a prior append so the
516
- // projection has caught up before the read.
517
- const { sequence } = await ironflow.streams.append('agent-memory:doc-1', {
515
+ // Read-your-writes: streams.append does not return a NATS sequence under
516
+ // the transactional outbox — wait for the appended event to be processed
517
+ // (the server resolves eventId → seq), then read with the resolved seq.
518
+ const { eventId } = await ironflow.streams.append('agent-memory:doc-1', {
518
519
  name: 'DocProcessed',
519
520
  data: { docId: 'doc-1', status: 'classified' },
520
521
  });
522
+ const wait = await ironflow.waitForEvent(eventId, 'doc-processor-memory', { timeoutMs: 5_000 });
521
523
  const fresh = await ironflow.agents.readMemory<DocMemory>('doc-processor-memory', {
522
- minSeq: sequence,
524
+ minSeq: wait.targetSeq,
523
525
  timeoutMs: 5_000,
524
526
  });
525
527
  ```
@@ -534,10 +536,6 @@ A complete browser-driven demo lives at `examples/agents/doc-processor-agent/web
534
536
 
535
537
  Requires Ironflow server with `waitForProjectionCatchup` (#473) and the unified Trigger path. Any server built from `main` after #608 (Lane D) supports the full surface.
536
538
 
537
- ### Stuck or hanging?
538
-
539
- See `_internal/runbooks/runbook-browser-agent-stuck.md` for triage.
540
-
541
539
  ## Entity Streams (Event Sourcing)
542
540
 
543
541
  Entity streams store domain events per entity with optimistic concurrency control.
@@ -558,8 +556,7 @@ const result = await ironflow.streams.append('order-123', {
558
556
  });
559
557
 
560
558
  console.log(result.entityVersion); // New entity version after append
561
- console.log(result.eventId); // Unique event ID
562
- console.log(result.sequence); // NATS JetStream sequence (pass to projections.waitForCatchup({ minSeq }))
559
+ console.log(result.eventId); // Unique event ID (pass to waitForEvent for read-your-writes)
563
560
  ```
564
561
 
565
562
  ### Read Stream
@@ -938,7 +935,7 @@ await ironflow.roles.delete('role_xyz789');
938
935
  // Create a policy
939
936
  const policy = await ironflow.policies.create({
940
937
  name: 'allow-read',
941
- effect: 'allow',
938
+ effect: 'deny',
942
939
  actions: 'read',
943
940
  resources: '*',
944
941
  org_id: 'org_abc123',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironflow/browser",
3
- "version": "0.24.0",
3
+ "version": "0.25.1",
4
4
  "description": "Browser client for Ironflow event-driven backend platform - real-time subscriptions, workflow triggers, and event emission",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -18,14 +18,14 @@
18
18
  "README.md"
19
19
  ],
20
20
  "dependencies": {
21
- "@bufbuild/protobuf": "^2.12.0",
22
- "@connectrpc/connect": "^2.1.1",
23
- "@connectrpc/connect-web": "^2.1.1",
21
+ "@bufbuild/protobuf": "^2.13.0",
22
+ "@connectrpc/connect": "^2.1.2",
23
+ "@connectrpc/connect-web": "^2.1.2",
24
24
  "zod": "^4.4.3",
25
- "@ironflow/core": "^0.24.0"
25
+ "@ironflow/core": "^0.25.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/node": "^22.19.20",
28
+ "@types/node": "^22.20.1",
29
29
  "esbuild": "^0.27.7",
30
30
  "jsdom": "^26.1.0",
31
31
  "typescript": "^5.9.3",