@relayburn/sdk 2.8.6 → 2.9.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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [2.9.0] - 2026-05-21
6
+
7
+ ### Added
8
+
9
+ - `writeStamp({ sessionId | messageId, enrichment, ts?, ledgerHome? })` writes
10
+ a stamp by exact selector — companion to `writePendingStamp` for launchers
11
+ that preallocate the session id (Claude `--session-id`).
12
+
5
13
  ## [2.5.0] - 2026-05-08
6
14
 
7
15
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relayburn/sdk",
3
- "version": "2.8.6",
3
+ "version": "2.9.0",
4
4
  "description": "Embeddable Relayburn SDK — napi-rs bindings over the Rust relayburn-sdk crate (2.x). Drop-in replacement for the TS @relayburn/sdk@1.x.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -43,10 +43,10 @@
43
43
  ]
44
44
  },
45
45
  "optionalDependencies": {
46
- "@relayburn/sdk-darwin-arm64": "2.8.6",
47
- "@relayburn/sdk-darwin-x64": "2.8.6",
48
- "@relayburn/sdk-linux-arm64-gnu": "2.8.6",
49
- "@relayburn/sdk-linux-x64-gnu": "2.8.6"
46
+ "@relayburn/sdk-darwin-arm64": "2.9.0",
47
+ "@relayburn/sdk-darwin-x64": "2.9.0",
48
+ "@relayburn/sdk-linux-arm64-gnu": "2.9.0",
49
+ "@relayburn/sdk-linux-x64-gnu": "2.9.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@napi-rs/cli": "^2.18.4",
package/src/index.d.ts CHANGED
@@ -58,6 +58,27 @@ export declare function writePendingStamp(
58
58
  opts: WritePendingStampOptions,
59
59
  ): Promise<PendingStampWriteResult>
60
60
 
61
+ export interface WriteStampOptions {
62
+ /** Target a session by exact id. At least one of `sessionId` or `messageId` must be set. */
63
+ sessionId?: string;
64
+ /** Target a single turn by exact message id. At least one of `sessionId` or `messageId` must be set. */
65
+ messageId?: string;
66
+ /** Enrichment key/value pairs to fold onto matched turns. Must be non-empty. */
67
+ enrichment: Record<string, string>;
68
+ /** ISO timestamp the caller observed, e.g. `2026-05-21T12:00:00Z`. Defaults to now when omitted. */
69
+ ts?: string;
70
+ ledgerHome?: string;
71
+ }
72
+
73
+ /**
74
+ * Write a stamp targeting an exact session id or message id. Use when the
75
+ * launcher knows the session id up front — for example, a Claude launcher
76
+ * that preallocates `--session-id <uuid>` before spawn — so the
77
+ * enrichment lands by selector without going through the sidecar
78
+ * `writePendingStamp` manifest matching path.
79
+ */
80
+ export declare function writeStamp(opts: WriteStampOptions): Promise<void>
81
+
61
82
  export interface SummaryOptions {
62
83
  session?: string;
63
84
  project?: string;
package/src/index.js CHANGED
@@ -124,6 +124,10 @@ export async function writePendingStamp(opts) {
124
124
  return coerceBigInts(await binding.writePendingStamp(opts));
125
125
  }
126
126
 
127
+ export async function writeStamp(opts) {
128
+ await binding.writeStamp(opts);
129
+ }
130
+
127
131
  export function computeCompareExcluded(summary, minimum) {
128
132
  const out = { total: 0, aggregateOnly: 0, costOnly: 0, partial: 0, usageOnly: 0 };
129
133
  if (minimum === 'partial') return out;