replicas-engine 0.1.377 → 0.1.379

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/src/index.js +69 -5
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -484,7 +484,7 @@ var WORKSPACE_SIZES = ["small", "large"];
484
484
  var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
485
485
 
486
486
  // ../shared/src/e2b.ts
487
- var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-01-v3";
487
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-01-v5";
488
488
 
489
489
  // ../shared/src/runtime-env.ts
490
490
  function parsePosixEnvFile(content) {
@@ -6638,7 +6638,7 @@ var COMMAND_PROTECTION_SAFE_TOOLS = /* @__PURE__ */ new Set([
6638
6638
  "WebFetch",
6639
6639
  "LS"
6640
6640
  ]);
6641
- var CLAUDE_PARTIAL_MESSAGE_FLUSH_MS = 500;
6641
+ var CLAUDE_PARTIAL_MESSAGE_FLUSH_MS = 80;
6642
6642
  function supportsClaudeThinkingDisplay(model) {
6643
6643
  const normalized = (normalizeClaudeModel(model) ?? model).toLowerCase();
6644
6644
  return AGENT_MODELS.claude.includes(normalized) || /^claude-(?:opus|sonnet|haiku)-[4-9]/.test(normalized);
@@ -7828,7 +7828,7 @@ var AspClient = class {
7828
7828
  // src/managers/codex-asp/app-server-process.ts
7829
7829
  var DEFAULT_CODEX_BINARY = "codex";
7830
7830
  var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
7831
- var ENGINE_PACKAGE_VERSION = "0.1.377";
7831
+ var ENGINE_PACKAGE_VERSION = "0.1.379";
7832
7832
  var INITIALIZE_METHOD = "initialize";
7833
7833
  var INITIALIZED_NOTIFICATION = "initialized";
7834
7834
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -8492,7 +8492,7 @@ async function buildThreadStartParams(workingDirectory, request, developerInstru
8492
8492
  sandbox: "danger-full-access",
8493
8493
  ...codexApprovalPolicyOverrides(),
8494
8494
  developerInstructions: developerInstructions ?? null,
8495
- config: { web_search: "live" },
8495
+ config: { web_search: "live", model_reasoning_summary: "auto" },
8496
8496
  experimentalRawEvents: false,
8497
8497
  persistExtendedHistory: false
8498
8498
  };
@@ -8508,7 +8508,7 @@ async function buildThreadResumeParams(workingDirectory, threadId, request, deve
8508
8508
  sandbox: "danger-full-access",
8509
8509
  ...codexApprovalPolicyOverrides(),
8510
8510
  developerInstructions: developerInstructions ?? null,
8511
- config: { web_search: "live" },
8511
+ config: { web_search: "live", model_reasoning_summary: "auto" },
8512
8512
  excludeTurns: false,
8513
8513
  persistExtendedHistory: false
8514
8514
  };
@@ -8566,6 +8566,9 @@ var THREAD_GOAL_CLEARED_METHOD = "thread/goal/cleared";
8566
8566
  var ITEM_STARTED_METHOD = "item/started";
8567
8567
  var ITEM_COMPLETED_METHOD = "item/completed";
8568
8568
  var AGENT_MESSAGE_DELTA_METHOD = "item/agentMessage/delta";
8569
+ var REASONING_SUMMARY_TEXT_DELTA_METHOD = "item/reasoning/summaryTextDelta";
8570
+ var REASONING_TEXT_DELTA_METHOD = "item/reasoning/textDelta";
8571
+ var REASONING_SUMMARY_PART_ADDED_METHOD = "item/reasoning/summaryPartAdded";
8569
8572
  var COMMAND_EXECUTION_OUTPUT_DELTA_METHOD = "item/commandExecution/outputDelta";
8570
8573
  var FILE_CHANGE_OUTPUT_DELTA_METHOD = "item/fileChange/outputDelta";
8571
8574
  var ACCOUNT_RATE_LIMITS_UPDATED_METHOD = "account/rateLimits/updated";
@@ -9117,6 +9120,36 @@ var CodexAspManager = class extends CodingAgentManager {
9117
9120
  );
9118
9121
  this.emitTranscriptUpdated(notification.params.threadId);
9119
9122
  },
9123
+ [REASONING_SUMMARY_TEXT_DELTA_METHOD]: (notification) => {
9124
+ if (!matchesTurn(notification.params.threadId, notification.params.turnId)) return;
9125
+ this.appendReasoningDelta(
9126
+ notification.params.threadId,
9127
+ notification.params.turnId,
9128
+ notification.params.itemId,
9129
+ notification.params.delta
9130
+ );
9131
+ this.emitTranscriptUpdated(notification.params.threadId);
9132
+ },
9133
+ [REASONING_TEXT_DELTA_METHOD]: (notification) => {
9134
+ if (!matchesTurn(notification.params.threadId, notification.params.turnId)) return;
9135
+ this.appendReasoningDelta(
9136
+ notification.params.threadId,
9137
+ notification.params.turnId,
9138
+ notification.params.itemId,
9139
+ notification.params.delta
9140
+ );
9141
+ this.emitTranscriptUpdated(notification.params.threadId);
9142
+ },
9143
+ [REASONING_SUMMARY_PART_ADDED_METHOD]: (notification) => {
9144
+ if (!matchesTurn(notification.params.threadId, notification.params.turnId)) return;
9145
+ this.appendReasoningDelta(
9146
+ notification.params.threadId,
9147
+ notification.params.turnId,
9148
+ notification.params.itemId,
9149
+ "\n\n"
9150
+ );
9151
+ this.emitTranscriptUpdated(notification.params.threadId);
9152
+ },
9120
9153
  [COMMAND_EXECUTION_OUTPUT_DELTA_METHOD]: (notification) => {
9121
9154
  if (!matchesTurn(notification.params.threadId, notification.params.turnId)) return;
9122
9155
  this.appendTranscriptOutput(notification.params.turnId, notification.params.itemId, notification.params.delta);
@@ -9419,6 +9452,9 @@ var CodexAspManager = class extends CodingAgentManager {
9419
9452
  "completed"
9420
9453
  );
9421
9454
  }
9455
+ if (turn.status === "completed" || turn.status === "failed") {
9456
+ transcriptTurn.items = transcriptTurn.items.map((item) => item.type === "reasoning" && item.status === "in_progress" ? { ...item, status: "completed" } : item);
9457
+ }
9422
9458
  if (turn.error) {
9423
9459
  const existingIndex = transcriptTurn.items.findIndex((item) => item.id === `${turn.id}-error`);
9424
9460
  const errorItem = {
@@ -9489,6 +9525,34 @@ var CodexAspManager = class extends CodingAgentManager {
9489
9525
  this.codexAspTranscript.updatedAt = timestamp;
9490
9526
  }
9491
9527
  }
9528
+ appendReasoningDelta(threadId, turnId, itemId, delta) {
9529
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString();
9530
+ const turn = this.ensureTranscriptTurn(threadId, turnId, timestamp);
9531
+ const existingIndex = turn.items.findIndex((item) => item.id === itemId);
9532
+ if (existingIndex === -1) {
9533
+ if (!delta.trim()) return;
9534
+ turn.items.push({
9535
+ type: "reasoning",
9536
+ id: itemId,
9537
+ text: delta,
9538
+ timestamp,
9539
+ status: "in_progress",
9540
+ sequence: this.nextTranscriptSequence()
9541
+ });
9542
+ } else {
9543
+ const existing = turn.items[existingIndex];
9544
+ if (existing.type === "reasoning") {
9545
+ if (!delta.trim() && !existing.text.trim()) return;
9546
+ turn.items[existingIndex] = {
9547
+ ...existing,
9548
+ text: `${existing.text}${delta}`
9549
+ };
9550
+ }
9551
+ }
9552
+ if (this.codexAspTranscript) {
9553
+ this.codexAspTranscript.updatedAt = timestamp;
9554
+ }
9555
+ }
9492
9556
  appendTranscriptOutput(turnId, itemId, delta) {
9493
9557
  if (!this.codexAspTranscript) return;
9494
9558
  const turn = this.codexAspTranscript.turns.find((candidate) => candidate.id === turnId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.377",
3
+ "version": "0.1.379",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",