replicas-cli 0.2.596 → 0.2.598

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 +17 -6
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -22446,7 +22446,8 @@ var OPENROUTER_MODELS = [
22446
22446
  DEEPSEEK_V4_FLASH_MODEL,
22447
22447
  "minimax/minimax-m3",
22448
22448
  "xiaomi/mimo-v2.5-pro",
22449
- "moonshotai/kimi-k2.6"
22449
+ "moonshotai/kimi-k2.6",
22450
+ "google/gemini-3.8-flash"
22450
22451
  ];
22451
22452
  function prioritizeDeepseekModels(models) {
22452
22453
  return [
@@ -22520,6 +22521,7 @@ var AGENT_MODELS = {
22520
22521
  "gpt-5.1-codex-max",
22521
22522
  "gpt-5.1-codex-mini",
22522
22523
  "gpt-5-mini",
22524
+ "gemini-3.8-flash",
22523
22525
  "gemini-3.1-pro",
22524
22526
  "gemini-3-flash",
22525
22527
  "grok-4.6",
@@ -22574,6 +22576,7 @@ var MODEL_LABELS = {
22574
22576
  "minimax/minimax-m3": "MiniMax M3 via OpenRouter",
22575
22577
  "xiaomi/mimo-v2.5-pro": "MiMo V2.5 Pro via OpenRouter",
22576
22578
  "moonshotai/kimi-k2.6": "Kimi K2.6 via OpenRouter",
22579
+ "google/gemini-3.8-flash": "Gemini 3.8 Flash via OpenRouter",
22577
22580
  ...ASTER_MODEL_LABELS,
22578
22581
  "gpt-5.4": "GPT-5.4",
22579
22582
  "gpt-5.4-mini": "GPT-5.4 Mini",
@@ -22589,6 +22592,7 @@ var MODEL_LABELS = {
22589
22592
  [CLAUDE_OPUS_4_8_MODEL]: "Opus 4.8",
22590
22593
  "claude-opus-4-7": "Opus 4.7",
22591
22594
  [CLAUDE_HAIKU_4_5_MODEL]: "Haiku 4.5",
22595
+ "gemini-3.8-flash": "Gemini 3.8 Flash",
22592
22596
  "gemini-3.1-pro": "Gemini 3.1 Pro",
22593
22597
  "gemini-3-flash": "Gemini 3 Flash",
22594
22598
  "grok-4.6": "Grok 4.6",
@@ -24552,7 +24556,7 @@ function isTransientErrorText(text, options = {}) {
24552
24556
  }
24553
24557
 
24554
24558
  // ../shared/src/cli-version.ts
24555
- var CLI_VERSION = "0.2.596";
24559
+ var CLI_VERSION = "0.2.598";
24556
24560
 
24557
24561
  // ../shared/src/version.ts
24558
24562
  function compareVersions(v1, v2) {
@@ -25189,6 +25193,7 @@ function coerceBackgroundTaskPayload(payload) {
25189
25193
  prompt: optionalString(payload.prompt),
25190
25194
  lastToolName: optionalString(payload.last_tool_name),
25191
25195
  usage,
25196
+ ambient: optionalBoolean(payload.ambient),
25192
25197
  patch
25193
25198
  };
25194
25199
  }
@@ -26522,6 +26527,7 @@ function parseClaudeEvents(events, parentToolUseId) {
26522
26527
  });
26523
26528
  const toolCallMap = /* @__PURE__ */ new Map();
26524
26529
  const taskMessageMap = /* @__PURE__ */ new Map();
26530
+ const ambientTaskIds = /* @__PURE__ */ new Set();
26525
26531
  const partialIndexes = /* @__PURE__ */ new Map();
26526
26532
  const completedStreamIds = /* @__PURE__ */ new Set();
26527
26533
  const supersededStreamIds = /* @__PURE__ */ new Set();
@@ -26530,9 +26536,10 @@ function parseClaudeEvents(events, parentToolUseId) {
26530
26536
  const assistantTextCounts = /* @__PURE__ */ new Map();
26531
26537
  const acceptedUserMessageIndexes = /* @__PURE__ */ new Set();
26532
26538
  const canonicalUserMessageIndexes = /* @__PURE__ */ new Set();
26539
+ const supersededUserMessageIndexes = /* @__PURE__ */ new Set();
26533
26540
  const findMatchingUserMessageIndex = (indexes, content, timestamp, messageId) => {
26534
26541
  if (typeof messageId === "string") {
26535
- const byId = messages.findIndex((message) => message.type === "user" && message.id === messageId);
26542
+ const byId = messages.findIndex((message, index) => message.type === "user" && message.id === messageId && !supersededUserMessageIndexes.has(index));
26536
26543
  if (byId !== -1) return byId;
26537
26544
  }
26538
26545
  return [...indexes].find((index) => {
@@ -26644,9 +26651,12 @@ function parseClaudeEvents(events, parentToolUseId) {
26644
26651
  };
26645
26652
  if (acceptedIndex === void 0) {
26646
26653
  canonicalUserMessageIndexes.add(messages.push(message) - 1);
26654
+ } else if (acceptedUserMessageIndexes.has(acceptedIndex)) {
26655
+ supersededUserMessageIndexes.add(acceptedIndex);
26656
+ acceptedUserMessageIndexes.delete(acceptedIndex);
26657
+ canonicalUserMessageIndexes.add(messages.push(message) - 1);
26647
26658
  } else {
26648
26659
  messages[acceptedIndex] = message;
26649
- acceptedUserMessageIndexes.delete(acceptedIndex);
26650
26660
  }
26651
26661
  }
26652
26662
  }
@@ -26882,7 +26892,8 @@ function parseClaudeEvents(events, parentToolUseId) {
26882
26892
  }
26883
26893
  if (event.type === "claude-system") {
26884
26894
  const payload = coerceBackgroundTaskPayload(event.payload);
26885
- if (payload) {
26895
+ if (payload?.ambient) ambientTaskIds.add(payload.taskId);
26896
+ if (payload && !ambientTaskIds.has(payload.taskId)) {
26886
26897
  const existing = taskMessageMap.get(payload.taskId);
26887
26898
  const nextStatus = payload.subtype === "task_notification" ? normalizeBackgroundTaskStatus(payload.status) : payload.subtype === "task_updated" ? normalizeBackgroundTaskStatus(payload.patch?.status) : existing?.status ?? "in_progress";
26888
26899
  const nextMessage = {
@@ -26999,7 +27010,7 @@ function parseClaudeEvents(events, parentToolUseId) {
26999
27010
  message.targetProvider = target.subagentType;
27000
27011
  }
27001
27012
  }
27002
- const staleIndexes = /* @__PURE__ */ new Set();
27013
+ const staleIndexes = new Set(supersededUserMessageIndexes);
27003
27014
  for (const streamId of [...completedStreamIds, ...supersededStreamIds]) {
27004
27015
  const refs = partialIndexes.get(streamId);
27005
27016
  if (refs?.reasoning !== void 0) staleIndexes.add(refs.reasoning);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.596",
3
+ "version": "0.2.598",
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": {