replicas-cli 0.3.593 → 0.3.594

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.
Files changed (2) hide show
  1. package/dist/index.cjs +8 -1
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -22806,6 +22806,11 @@ function coerceAuthFallbackPayload(payload) {
22806
22806
  ...typeof fromModel === "string" && typeof toModel === "string" ? { fromModel, toModel } : {}
22807
22807
  };
22808
22808
  }
22809
+ function coerceModelRefusalFallback({ type, payload }) {
22810
+ const { original_model: fromModel, fallback_model: toModel } = payload;
22811
+ if (type !== "claude-system" || payload.subtype !== "model_refusal_fallback" || typeof fromModel !== "string" || typeof toModel !== "string") return null;
22812
+ return { fromModel, toModel, sessionSwitched: payload.scope !== "local" };
22813
+ }
22809
22814
  function parseCodexTurnRetryPayload(payload) {
22810
22815
  const { attempt, maxAttempts, [CODEX_ASP_ITEM_ID_PAYLOAD_KEY]: turnId } = payload;
22811
22816
  return typeof attempt === "number" && typeof maxAttempts === "number" && typeof turnId === "string" ? { attempt, maxAttempts, [CODEX_ASP_ITEM_ID_PAYLOAD_KEY]: turnId } : void 0;
@@ -39215,6 +39220,8 @@ function parseClaudeEvents(events, parentToolUseId) {
39215
39220
  compaction = void 0;
39216
39221
  }
39217
39222
  }
39223
+ const refusalFallback = coerceModelRefusalFallback(event);
39224
+ if (refusalFallback) messages.push({ id: `model-fallback-${event.timestamp}`, type: "model_fallback", ...refusalFallback, timestamp: event.timestamp });
39218
39225
  const payload = coerceBackgroundTaskPayload(event.payload);
39219
39226
  if (payload?.ambient) ambientTaskIds.add(payload.taskId);
39220
39227
  if (payload && !ambientTaskIds.has(payload.taskId)) {
@@ -40727,7 +40734,7 @@ var CLI_VERSION;
40727
40734
  var init_cli_version = __esm({
40728
40735
  "../shared/src/cli-version.ts"() {
40729
40736
  "use strict";
40730
- CLI_VERSION = "0.3.593";
40737
+ CLI_VERSION = "0.3.594";
40731
40738
  }
40732
40739
  });
40733
40740
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.593",
3
+ "version": "0.3.594",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {