@opengeni/sdk 0.15.0 → 0.20.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 CHANGED
@@ -44,12 +44,39 @@ contiguous `sequence` number:
44
44
  - Ends gracefully when the provided `AbortSignal` aborts; throws on
45
45
  non-retryable failures (e.g. 401/403/404).
46
46
 
47
- Use `client.listEvents(workspaceId, sessionId, { before, after, limit })` for
48
- durable replay pages. `before` is an exclusive sequence cursor that returns the
49
- newest matching page, still ordered ascending in the response. Pass
50
- `compact: true` for history windows that do not need individual delta fragments;
51
- delta runs may be coalesced and expose `payload.coalescedUntil` as the true last
52
- sequence for stream resume cursors.
47
+ Use `client.listEventPage(...)` when monitoring another session. A call without
48
+ a cursor is safe by default: it returns a newest-first-selected (but
49
+ ascending-in-response) semantic tail, uses bounded `summary` payloads, and omits
50
+ raw message/reasoning/command/PTY deltas. The page returns exact
51
+ `coveredSequence`, `nextBefore`/`nextAfter`, byte, truncation, and projection
52
+ metadata. Filters can select canonical event types or the `control`, `terminal`,
53
+ `failure`, `checkpoint`, `tool_receipt`, and `provider_account` semantic classes;
54
+ `latest` is an exclusive typed lookup that returns the newest event in exactly
55
+ the requested class. It cannot be combined with any type or class include/exclude
56
+ filter, so an unrelated newer event cannot displace the requested result and an
57
+ exclusion cannot remove it.
58
+
59
+ ```ts
60
+ const terminal = await client.listEventPage(workspaceId, sessionId, {
61
+ latest: "terminal",
62
+ payloadMode: "summary",
63
+ });
64
+
65
+ const older = await client.listEventPage(workspaceId, sessionId, {
66
+ before: terminal.nextBefore ?? undefined,
67
+ includeClasses: ["failure", "checkpoint"],
68
+ payloadMode: "none",
69
+ });
70
+ ```
71
+
72
+ Use explicit `mode: "forensic", payloadMode: "full"` with `after`/`before` for
73
+ exact retained audit replay. “Full” means the exact durable audit projection;
74
+ it cannot restore source bytes that the audit boundary never retained. REST/SDK
75
+ pages remain count- and byte-bounded, so continue with the returned cursor. The
76
+ convenience `client.listEvents(...)` returns only the page's event array. Pass
77
+ `compact: true` for forensic history windows that do not need individual delta
78
+ fragments; delta runs may be coalesced and expose `payload.coalescedUntil` as
79
+ the true last sequence for stream resume cursors.
53
80
 
54
81
  ```ts
55
82
  const controller = new AbortController();