@replayci/replay 0.1.8 → 0.1.9

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
@@ -4958,6 +4958,17 @@ function replay(client, opts = {}) {
4958
4958
  const compiledLimits = compiledSession?.sessionLimits;
4959
4959
  const mergedLimits = { ...contractLimits ?? {}, ...compiledLimits ?? {} };
4960
4960
  const resolvedSessionLimits = Object.keys(mergedLimits).length > 0 ? mergedLimits : null;
4961
+ if (resolvedSessionLimits?.max_tool_calls_mode === "narrow" && resolvedSessionLimits.max_calls_per_tool) {
4962
+ const budgetedTools = new Set(Object.keys(resolvedSessionLimits.max_calls_per_tool));
4963
+ const unbudgeted = contracts.map((c) => c.tool).filter((t) => !budgetedTools.has(t));
4964
+ if (unbudgeted.length > 0) {
4965
+ emitDiagnostic2(diagnostics, {
4966
+ type: "replay_narrow_unbudgeted_tools",
4967
+ session_id: sessionId,
4968
+ tools: unbudgeted
4969
+ });
4970
+ }
4971
+ }
4961
4972
  const store = opts.store ?? null;
4962
4973
  let storeLoadPromise = null;
4963
4974
  let storeLoadDone = false;
package/dist/index.d.cts CHANGED
@@ -866,6 +866,10 @@ type ReplayDiagnosticEvent = {
866
866
  session_id: string;
867
867
  state_version: number;
868
868
  contract_drift: boolean;
869
+ } | {
870
+ type: "replay_narrow_unbudgeted_tools";
871
+ session_id: string;
872
+ tools: string[];
869
873
  } | {
870
874
  type: "replay_narrow_injected";
871
875
  session_id: string;
package/dist/index.d.ts CHANGED
@@ -866,6 +866,10 @@ type ReplayDiagnosticEvent = {
866
866
  session_id: string;
867
867
  state_version: number;
868
868
  contract_drift: boolean;
869
+ } | {
870
+ type: "replay_narrow_unbudgeted_tools";
871
+ session_id: string;
872
+ tools: string[];
869
873
  } | {
870
874
  type: "replay_narrow_injected";
871
875
  session_id: string;
package/dist/index.js CHANGED
@@ -4949,6 +4949,17 @@ function replay(client, opts = {}) {
4949
4949
  const compiledLimits = compiledSession?.sessionLimits;
4950
4950
  const mergedLimits = { ...contractLimits ?? {}, ...compiledLimits ?? {} };
4951
4951
  const resolvedSessionLimits = Object.keys(mergedLimits).length > 0 ? mergedLimits : null;
4952
+ if (resolvedSessionLimits?.max_tool_calls_mode === "narrow" && resolvedSessionLimits.max_calls_per_tool) {
4953
+ const budgetedTools = new Set(Object.keys(resolvedSessionLimits.max_calls_per_tool));
4954
+ const unbudgeted = contracts.map((c) => c.tool).filter((t) => !budgetedTools.has(t));
4955
+ if (unbudgeted.length > 0) {
4956
+ emitDiagnostic2(diagnostics, {
4957
+ type: "replay_narrow_unbudgeted_tools",
4958
+ session_id: sessionId,
4959
+ tools: unbudgeted
4960
+ });
4961
+ }
4962
+ }
4952
4963
  const store = opts.store ?? null;
4953
4964
  let storeLoadPromise = null;
4954
4965
  let storeLoadDone = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replayci/replay",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "ReplayCI SDK for deterministic tool-call validation and observation.",
5
5
  "license": "ISC",
6
6
  "author": "ReplayCI",