@replayci/replay 0.1.10 → 0.1.12

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/dist/index.cjs CHANGED
@@ -5461,6 +5461,20 @@ function replay(client, opts = {}) {
5461
5461
  });
5462
5462
  }
5463
5463
  }
5464
+ if (compiledSession?.graphDiagnostics && compiledSession.graphDiagnostics.length > 0) {
5465
+ for (const diag of compiledSession.graphDiagnostics) {
5466
+ emitDiagnostic2(diagnostics, {
5467
+ type: "replay_graph_analysis",
5468
+ session_id: sessionId,
5469
+ check: diag.check,
5470
+ severity: diag.severity,
5471
+ detail: diag.detail,
5472
+ ...diag.tool ? { tool: diag.tool } : {},
5473
+ ...diag.phase ? { phase: diag.phase } : {},
5474
+ ...diag.suggestion ? { suggestion: diag.suggestion } : {}
5475
+ });
5476
+ }
5477
+ }
5464
5478
  const providerConstraints = compiledSession?.providerConstraints ?? opts.providerConstraints ?? null;
5465
5479
  if (providerConstraints) {
5466
5480
  const spec = providerConstraints[provider];
@@ -7910,6 +7924,9 @@ function defaultReplayDiagnosticsHandler(event) {
7910
7924
  case "replay_compile_warning":
7911
7925
  console.warn(`[replayci] compile warning: ${event.details}`);
7912
7926
  break;
7927
+ case "replay_graph_analysis":
7928
+ console.warn(`[replayci] graph analysis: ${event.check} \u2014 ${event.detail}${event.suggestion ? ` (${event.suggestion})` : ""}`);
7929
+ break;
7913
7930
  case "replay_bypass_detected":
7914
7931
  console.warn(`[replayci] bypass detected on session ${event.session_id}`);
7915
7932
  break;
package/dist/index.d.cts CHANGED
@@ -1013,6 +1013,15 @@ type ReplayDiagnosticEvent = {
1013
1013
  checkpoint: string;
1014
1014
  original: number;
1015
1015
  clamped: number;
1016
+ } | {
1017
+ type: "replay_graph_analysis";
1018
+ session_id: string;
1019
+ check: string;
1020
+ severity: "warning" | "error";
1021
+ detail: string;
1022
+ tool?: string;
1023
+ phase?: string;
1024
+ suggestion?: string;
1016
1025
  };
1017
1026
  /**
1018
1027
  * Workflow state snapshot returned by `session.getWorkflowState()`.
package/dist/index.d.ts CHANGED
@@ -1013,6 +1013,15 @@ type ReplayDiagnosticEvent = {
1013
1013
  checkpoint: string;
1014
1014
  original: number;
1015
1015
  clamped: number;
1016
+ } | {
1017
+ type: "replay_graph_analysis";
1018
+ session_id: string;
1019
+ check: string;
1020
+ severity: "warning" | "error";
1021
+ detail: string;
1022
+ tool?: string;
1023
+ phase?: string;
1024
+ suggestion?: string;
1016
1025
  };
1017
1026
  /**
1018
1027
  * Workflow state snapshot returned by `session.getWorkflowState()`.
package/dist/index.js CHANGED
@@ -5452,6 +5452,20 @@ function replay(client, opts = {}) {
5452
5452
  });
5453
5453
  }
5454
5454
  }
5455
+ if (compiledSession?.graphDiagnostics && compiledSession.graphDiagnostics.length > 0) {
5456
+ for (const diag of compiledSession.graphDiagnostics) {
5457
+ emitDiagnostic2(diagnostics, {
5458
+ type: "replay_graph_analysis",
5459
+ session_id: sessionId,
5460
+ check: diag.check,
5461
+ severity: diag.severity,
5462
+ detail: diag.detail,
5463
+ ...diag.tool ? { tool: diag.tool } : {},
5464
+ ...diag.phase ? { phase: diag.phase } : {},
5465
+ ...diag.suggestion ? { suggestion: diag.suggestion } : {}
5466
+ });
5467
+ }
5468
+ }
5455
5469
  const providerConstraints = compiledSession?.providerConstraints ?? opts.providerConstraints ?? null;
5456
5470
  if (providerConstraints) {
5457
5471
  const spec = providerConstraints[provider];
@@ -7901,6 +7915,9 @@ function defaultReplayDiagnosticsHandler(event) {
7901
7915
  case "replay_compile_warning":
7902
7916
  console.warn(`[replayci] compile warning: ${event.details}`);
7903
7917
  break;
7918
+ case "replay_graph_analysis":
7919
+ console.warn(`[replayci] graph analysis: ${event.check} \u2014 ${event.detail}${event.suggestion ? ` (${event.suggestion})` : ""}`);
7920
+ break;
7904
7921
  case "replay_bypass_detected":
7905
7922
  console.warn(`[replayci] bypass detected on session ${event.session_id}`);
7906
7923
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayci/replay",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "description": "ReplayCI SDK for deterministic tool-call validation and observation.",
5
5
  "license": "ISC",
6
6
  "author": "ReplayCI",