replicas-cli 0.3.173 → 0.3.175

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 +53 -1
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -23022,6 +23022,7 @@ var CODEX_ASP_ITEM_ID_PAYLOAD_KEY = "codexAspItemId";
23022
23022
  var CODEX_ITEM_EVENT_TYPE = "codex-item";
23023
23023
  var CODEX_ITEM_PARTIAL_EVENT_TYPE = "codex-item-partial";
23024
23024
  var CODEX_TURN_EVENT_TYPE = "codex-turn";
23025
+ var CODEX_TURN_RETRY_EVENT_TYPE = "codex-turn-retry";
23025
23026
  var CODEX_QUOTA_STATUS_EVENT_TYPE = "codex-quota-status";
23026
23027
  var CHAT_INTERRUPTED_EVENT_TYPE = "replicas-interrupted";
23027
23028
  var CHAT_MESSAGE_REJECTED_EVENT_TYPE = "replicas-message-rejected";
@@ -23047,6 +23048,10 @@ function coerceAuthFallbackPayload(payload) {
23047
23048
  ...typeof detail === "string" && detail ? { detail } : {}
23048
23049
  };
23049
23050
  }
23051
+ function parseCodexTurnRetryPayload(payload) {
23052
+ const { attempt, maxAttempts, [CODEX_ASP_ITEM_ID_PAYLOAD_KEY]: turnId } = payload;
23053
+ return typeof attempt === "number" && typeof maxAttempts === "number" && typeof turnId === "string" ? { attempt, maxAttempts, [CODEX_ASP_ITEM_ID_PAYLOAD_KEY]: turnId } : void 0;
23054
+ }
23050
23055
 
23051
23056
  // ../shared/src/engine/v1.ts
23052
23057
  var MERGED_MESSAGE_SEPARATOR = "\n\n<!-- replicas:merged -->\n\n";
@@ -23363,6 +23368,17 @@ var createEnvironmentMcpRequestSchema = external_exports.object({
23363
23368
  });
23364
23369
  var updateEnvironmentMcpRequestSchema = createEnvironmentMcpRequestSchema.partial();
23365
23370
 
23371
+ // ../shared/src/routes/mothership.ts
23372
+ var SUBAGENT_SERVICE_TIERS = ["default", "fast", "ultrafast"];
23373
+ var mothershipSubagentSettingsSchema = external_exports.object({
23374
+ coding_agent: external_exports.enum(VALID_AGENT_PROVIDERS),
23375
+ model: external_exports.string().nullable(),
23376
+ thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable(),
23377
+ service_tier: external_exports.enum(SUBAGENT_SERVICE_TIERS),
23378
+ goal_mode: external_exports.boolean(),
23379
+ plan_mode: external_exports.boolean()
23380
+ });
23381
+
23366
23382
  // ../shared/src/routes/workspaces.ts
23367
23383
  var WORKSPACE_STATUSES = ["active", "sleeping", "archived", "preparing", "error"];
23368
23384
  var STALE_PREPARING_MS = 10 * 6e4;
@@ -27188,13 +27204,42 @@ function parseCodexEvents(events) {
27188
27204
  const pendingCommands = /* @__PURE__ */ new Map();
27189
27205
  const pendingToolCalls = /* @__PURE__ */ new Map();
27190
27206
  const pendingPatches = /* @__PURE__ */ new Map();
27207
+ const retriedTurnIds = /* @__PURE__ */ new Set();
27208
+ let pendingRetry = null;
27191
27209
  events.forEach((event, eventIndex) => {
27192
27210
  const turnId = codexItemFromEvent(event)?.turnId ?? codexTurnFromEvent(event)?.turnId;
27193
27211
  if (turnId !== void 0) {
27194
27212
  if (!turnInsertions.has(turnId)) turnInsertions.set(turnId, messages.length);
27213
+ if (pendingRetry && !retriedTurnIds.has(turnId)) {
27214
+ pendingRetry.status = "completed";
27215
+ pendingRetry = null;
27216
+ }
27217
+ return;
27218
+ }
27219
+ if (event.type === CHAT_INTERRUPTED_EVENT_TYPE) {
27220
+ pendingRetry = null;
27221
+ return;
27222
+ }
27223
+ if (event.type === CODEX_TURN_RETRY_EVENT_TYPE) {
27224
+ const retry = parseCodexTurnRetryPayload(event.payload);
27225
+ if (!retry) return;
27226
+ retriedTurnIds.add(retry[CODEX_ASP_ITEM_ID_PAYLOAD_KEY]);
27227
+ pendingRetry = {
27228
+ id: displayId(event, eventIndex, "capacity-retry"),
27229
+ type: "capacity_retry",
27230
+ attempt: retry.attempt,
27231
+ maxAttempts: retry.maxAttempts,
27232
+ status: "in_progress",
27233
+ timestamp: event.timestamp
27234
+ };
27235
+ messages.push(pendingRetry);
27195
27236
  return;
27196
27237
  }
27197
27238
  if (event.type === "codex-asp-error") {
27239
+ if (pendingRetry) {
27240
+ pendingRetry.status = "completed";
27241
+ pendingRetry = null;
27242
+ }
27198
27243
  const failedTurnId = getPayloadString(event, CODEX_ASP_ITEM_ID_PAYLOAD_KEY);
27199
27244
  if (!(failedTurnId && turns.has(failedTurnId))) {
27200
27245
  messages.push({
@@ -27376,6 +27421,13 @@ function parseCodexEvents(events) {
27376
27421
  if (!turn) continue;
27377
27422
  const kept = [];
27378
27423
  for (const message2 of messagesForCodexTurn(turn)) {
27424
+ if (retriedTurnIds.has(turnId)) {
27425
+ if (message2.type === "error") continue;
27426
+ if (message2.type === "reasoning" && message2.status === "in_progress") {
27427
+ kept.push({ ...message2, status: "failed" });
27428
+ continue;
27429
+ }
27430
+ }
27379
27431
  if (message2.type !== "user") {
27380
27432
  kept.push(message2);
27381
27433
  continue;
@@ -29094,7 +29146,7 @@ var headlessAgentRequestSchema = external_exports.object({
29094
29146
  });
29095
29147
 
29096
29148
  // ../shared/src/cli-version.ts
29097
- var CLI_VERSION = "0.3.173";
29149
+ var CLI_VERSION = "0.3.175";
29098
29150
 
29099
29151
  // ../shared/src/version.ts
29100
29152
  function compareVersions(v1, v2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.173",
3
+ "version": "0.3.175",
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": {