@blocks-network/sdk 0.1.46 → 0.1.47

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 -21
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -87,16 +87,6 @@ The agent card follows the A2A specification with a `runtime` extension:
87
87
  Note: `identity.agentName` must use only alphanumeric characters and
88
88
  underscores (no hyphens). The pattern is `^[a-zA-Z0-9_]+$`.
89
89
 
90
- ## Blocks Network Subscribe Strategy
91
-
92
- The Node SDK uses Blocks Network Event Engine (`enableEventEngine: true`) on all
93
- subscribing Blocks Network clients (control client, per-task client, and per-stream
94
- client). Event Engine replaces the legacy subscribe manager with a
95
- deterministic state machine for subscribe, reconnect, and retry. The SDK
96
- does not set `autoNetworkDetection` or `restore` (both are browser-only
97
- settings). No explicit `retryConfiguration` is added; the Blocks Network JS SDK
98
- applies a default exponential retry policy when Event Engine is enabled.
99
-
100
90
  ## API
101
91
 
102
92
  ### `await startAgentInstance(options)`
@@ -112,7 +102,7 @@ Go CLI's `blocks publish` command generates the API key and writes
112
102
  it to `.env` automatically. `blocks login` can also do this when
113
103
  invoked with `--write-env` (or by answering "y" to its prompt).
114
104
 
115
- PAM tokens for Blocks Network channel access are managed by the SDK at runtime
105
+ PAM tokens for channel access are managed by the SDK at runtime
116
106
  (granted at registration, refreshed per-task on the control channel).
117
107
  No CLI involvement is needed for PAM.
118
108
 
@@ -371,7 +361,7 @@ extends `Uint8Array`.
371
361
 
372
362
  ### Stream Consumer APIs
373
363
 
374
- All consumer iterators (`bytes()`, `events()`, `readable()`, `inbound`) deliver messages in sequence order. The SDK's reorder buffer transparently corrects out-of-order Blocks Network delivery and drops duplicate messages. To customize or disable reordering, pass `reorderTimeoutMs` to `open()`:
364
+ All consumer iterators (`bytes()`, `events()`, `readable()`, `inbound`) deliver messages in sequence order. The SDK's reorder buffer transparently corrects out-of-order delivery and drops duplicate messages. To customize or disable reordering, pass `reorderTimeoutMs` to `open()`:
375
365
 
376
366
  ```typescript
377
367
  // Default: reorder buffer with 750ms gap timeout
@@ -411,10 +401,9 @@ readable.pipe(createWriteStream('./output.bin'));
411
401
  ### Handling Stream Errors
412
402
 
413
403
  Every `StreamClient` exposes an `onError(cb)` registration method.
414
- The callback fires whenever the stream's Blocks Network subscribe loop
415
- surfaces an error-category status event: PAM revocation, network
416
- issues, timeouts, or any other category the Blocks Network SDK marks as an
417
- error. The payload is a typed `StreamError`:
404
+ The callback fires whenever the stream's subscribe loop surfaces an
405
+ error-category status event: PAM revocation, network issues,
406
+ timeouts, etc. The payload is a typed `StreamError`:
418
407
 
419
408
  ```typescript
420
409
  import type { StreamError } from '@blocks-network/sdk/stream';
@@ -443,7 +432,7 @@ arrive:
443
432
 
444
433
  All other error categories (network transients, timeouts, etc.)
445
434
  fire `onError` with `fatal: false` and leave the stream running so
446
- Blocks Network's built-in retry machinery can recover.
435
+ the built-in retry machinery can recover.
447
436
 
448
437
  ### Opening Task Streams
449
438
 
@@ -505,8 +494,8 @@ The option is supported on both `sendMessage()` and `connect()`.
505
494
 
506
495
  ### Reconnecting to Terminal Tasks
507
496
 
508
- Stream data is **live-only** — Blocks Network does not persist stream
509
- payloads. When `client.connect({ taskId })` returns a session for a
497
+ Stream data is **live-only** — the transport layer does not persist
498
+ stream payloads. When `client.connect({ taskId })` returns a session for a
510
499
  task that has already finished, a stream that was **never opened
511
500
  while the task was active** throws a typed `StreamUnavailableError`
512
501
  from `StreamRef.open()` instead of subscribing to a dead channel.
@@ -587,8 +576,8 @@ are browser-safe — no Node.js `Buffer` polyfill needed:
587
576
  `Blob` field. `fetch` computes the multipart boundary
588
577
  automatically — no manual `Content-Type: multipart/form-data`
589
578
  header, no `Buffer.concat`.
590
- - `downloadArtifact()` handles the three Blocks Network v10 download shapes
591
- (raw `Uint8Array`, `Blob`, and legacy `Blocks NetworkFile` with
579
+ - `downloadArtifact()` handles multiple download shapes (raw
580
+ `Uint8Array`, `Blob`, and legacy file objects with
592
581
  `toArrayBuffer()`) with typeof-guarded branches — no
593
582
  `Buffer.isBuffer` OR-order short-circuits.
594
583
  - `decodeInlineArtifact()` uses `atob` + `Uint8Array` and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocks-network/sdk",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "type": "module",
5
5
  "description": "Blocks Network SDK — build and run A2A agents on Blocks Network",
6
6
  "exports": {