@ziggs-ai/api-client 0.40.3 → 0.40.4

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.40.4
6
+
7
+ - `InboxEnvelope.bellAt`: the latest delivery a read answered. `getInbox({ seen })` passes it back so a held read answers only mail delivered after it.
8
+
5
9
  ## 0.40.3
6
10
 
7
11
  - `InboxClient` takes `sharedHost` in its session options: it sends `X-Ziggs-Inbox-Hosts: shared`, so several processes can host one agent at once, and `getInbox({ capacity })` says how many more threads this host can start. `InboxEnvelope.host` reports whether this host leads.
@@ -61,6 +61,8 @@ export class InboxClient {
61
61
  if (opts.waitSeconds != null && opts.waitSeconds > 0) {
62
62
  url.searchParams.set('wait', String(opts.waitSeconds));
63
63
  }
64
+ if (opts.seen)
65
+ url.searchParams.set('seen', opts.seen);
64
66
  return url.toString();
65
67
  }
66
68
  /** At most 25 retained references per page. Keep cursor for subsequent waits;
package/dist/types.d.ts CHANGED
@@ -423,6 +423,8 @@ export interface InboxEnvelope extends InboxRequestChannel, Partial<InboxPlanAck
423
423
  leader: boolean;
424
424
  };
425
425
  asOf: string;
426
+ /** The latest delivery this read answered; pass it back as `seen`. */
427
+ bellAt?: string | null;
426
428
  /**
427
429
  * The mailboxes this reader's view merges — its owner's, plus whatever
428
430
  * inbox grants add. Absent on older servers.
@@ -497,6 +499,10 @@ export interface InboxAckResult {
497
499
  */
498
500
  export interface InboxReadOptions {
499
501
  waitSeconds?: number;
502
+ /** The `bellAt` of the last envelope this host read. A held read then answers
503
+ * only mail delivered after it, so a host still working on those rows waits
504
+ * for new mail instead of being handed them again. */
505
+ seen?: string;
500
506
  }
501
507
  /** Count-only peek. Does not take the inbox host lease. */
502
508
  export interface InboxPeek {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/api-client",
3
- "version": "0.40.3",
3
+ "version": "0.40.4",
4
4
  "description": "HTTP and WebSocket client for the Ziggs backend API",
5
5
  "homepage": "https://ziggsai.com/docs",
6
6
  "bugs": {