nemo-relay-openclaw 0.3.0-beta.2 → 0.3.0-rc.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.
package/README.md CHANGED
@@ -175,7 +175,7 @@ do not use, or set their `enabled` fields to `false`.
175
175
  Fields inside `config.plugins` are NeMo Relay generic plugin configuration, so
176
176
  they use `snake_case` regardless of language. For the full exporter field list,
177
177
  see the NeMo Relay Observability Plugin schema in the top-level NeMo Relay
178
- documentation at [nvidia.github.io/NeMo-Relay](https://nvidia.github.io/NeMo-Relay/).
178
+ documentation at [docs.nvidia.com/nemo/relay](https://docs.nvidia.com/nemo/relay).
179
179
 
180
180
  ## Verify the Integration
181
181
 
@@ -84,6 +84,8 @@ export declare class HookReplayBackend {
84
84
  private emitSessionMark;
85
85
  /** Close every active session with the same lifecycle summary. */
86
86
  private closeAllSessions;
87
+ /** Wait for native subscriber/exporter delivery after a replay closure boundary. */
88
+ private flushSubscriberDelivery;
87
89
  /** Build the narrow manager interface consumed by focused replay modules. */
88
90
  private sessionManager;
89
91
  /** Log one warning per key to avoid noisy repeated hook failures. */
@@ -253,6 +253,7 @@ export class HookReplayBackend {
253
253
  async closeSession(session, summary) {
254
254
  drainSession(this.sessionManager(), session);
255
255
  closeSessionRoot(this.sessionManager(), session, summary, session.finalOutput ?? summary);
256
+ this.flushSubscriberDelivery('session_close');
256
257
  deleteSession(this.stateValue, session);
257
258
  }
258
259
  /** Emit a session-level OpenClaw lifecycle mark. */
@@ -273,6 +274,15 @@ export class HookReplayBackend {
273
274
  await this.closeSession(session, summary);
274
275
  }
275
276
  }
277
+ /** Wait for native subscriber/exporter delivery after a replay closure boundary. */
278
+ flushSubscriberDelivery(label) {
279
+ try {
280
+ this.nf.flushSubscribers?.();
281
+ }
282
+ catch (error) {
283
+ this.logBoundedWarn(`flush-subscribers:${label}`, `nemo-relay subscriber flush failed: label=${label} error=${toMessage(error)}`);
284
+ }
285
+ }
276
286
  /** Build the narrow manager interface consumed by focused replay modules. */
277
287
  sessionManager() {
278
288
  return {
@@ -20,6 +20,7 @@ export type NemoRelayRuntimeModule = Omit<Pick<typeof NemoRelayRuntime, NemoRela
20
20
  ScopeType: {
21
21
  Agent?: Parameters<typeof NemoRelayRuntime.pushScope>[1];
22
22
  } | undefined;
23
+ flushSubscribers?: typeof NemoRelayRuntime.flushSubscribers;
23
24
  };
24
25
  /**
25
26
  * @internal Package-owned subset of the dynamically imported
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nemo-relay-openclaw",
3
- "version": "0.3.0-beta.2",
3
+ "version": "0.3.0-rc.1",
4
4
  "description": "NeMo Relay-authored observability plugin for OpenClaw.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -42,12 +42,12 @@
42
42
  "./dist/index.js"
43
43
  ],
44
44
  "compat": {
45
- "pluginApi": ">=2026.5.12",
46
- "minGatewayVersion": "2026.5.12"
45
+ "pluginApi": ">=2026.5.26",
46
+ "minGatewayVersion": "2026.5.26"
47
47
  },
48
48
  "build": {
49
- "openclawVersion": "2026.5.12",
50
- "pluginSdkVersion": "2026.5.12"
49
+ "openclawVersion": "2026.5.26",
50
+ "pluginSdkVersion": "2026.5.26"
51
51
  }
52
52
  },
53
53
  "scripts": {
@@ -60,10 +60,10 @@
60
60
  "test:live": "npm run build:test && node scripts/test-live.mjs"
61
61
  },
62
62
  "peerDependencies": {
63
- "openclaw": ">=2026.5.12"
63
+ "openclaw": "^2026.5.26"
64
64
  },
65
65
  "dependencies": {
66
- "nemo-relay-node": "0.3.0-beta.2"
66
+ "nemo-relay-node": "0.3.0-rc.1"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@types/node": "^24.0.0",
@@ -376,6 +376,7 @@ export class HookReplayBackend {
376
376
  private async closeSession(session: SessionState, summary: JsonRecord): Promise<void> {
377
377
  drainSession(this.sessionManager(), session);
378
378
  closeSessionRoot(this.sessionManager(), session, summary, session.finalOutput ?? summary);
379
+ this.flushSubscriberDelivery('session_close');
379
380
  deleteSession(this.stateValue, session);
380
381
  }
381
382
 
@@ -399,6 +400,18 @@ export class HookReplayBackend {
399
400
  }
400
401
  }
401
402
 
403
+ /** Wait for native subscriber/exporter delivery after a replay closure boundary. */
404
+ private flushSubscriberDelivery(label: string): void {
405
+ try {
406
+ this.nf.flushSubscribers?.();
407
+ } catch (error) {
408
+ this.logBoundedWarn(
409
+ `flush-subscribers:${label}`,
410
+ `nemo-relay subscriber flush failed: label=${label} error=${toMessage(error)}`,
411
+ );
412
+ }
413
+ }
414
+
402
415
  /** Build the narrow manager interface consumed by focused replay modules. */
403
416
  private sessionManager() {
404
417
  return {
package/src/modules.ts CHANGED
@@ -41,6 +41,7 @@ export type NemoRelayRuntimeModule = Omit<Pick<typeof NemoRelayRuntime, NemoRela
41
41
  Agent?: Parameters<typeof NemoRelayRuntime.pushScope>[1];
42
42
  }
43
43
  | undefined;
44
+ flushSubscribers?: typeof NemoRelayRuntime.flushSubscribers;
44
45
  };
45
46
 
46
47
  /**