replicas-engine 0.1.378 → 0.1.380

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 -4
  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-v4";
487
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-02-v1";
488
488
 
489
489
  // ../shared/src/runtime-env.ts
490
490
  function parsePosixEnvFile(content) {
@@ -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.378";
7831
+ var ENGINE_PACKAGE_VERSION = "0.1.380";
7832
7832
  var INITIALIZE_METHOD = "initialize";
7833
7833
  var INITIALIZED_NOTIFICATION = "initialized";
7834
7834
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -8205,6 +8205,7 @@ function itemToTranscriptItem(item, timestamp, status) {
8205
8205
  type: "commandExecution",
8206
8206
  id: item.id,
8207
8207
  command: item.command,
8208
+ commandActions: item.commandActions,
8208
8209
  ...item.aggregatedOutput ? { output: truncateCodexAspTranscriptOutput(item.aggregatedOutput) } : {},
8209
8210
  exitCode,
8210
8211
  timestamp,
@@ -8492,7 +8493,7 @@ async function buildThreadStartParams(workingDirectory, request, developerInstru
8492
8493
  sandbox: "danger-full-access",
8493
8494
  ...codexApprovalPolicyOverrides(),
8494
8495
  developerInstructions: developerInstructions ?? null,
8495
- config: { web_search: "live" },
8496
+ config: { web_search: "live", model_reasoning_summary: "auto" },
8496
8497
  experimentalRawEvents: false,
8497
8498
  persistExtendedHistory: false
8498
8499
  };
@@ -8508,7 +8509,7 @@ async function buildThreadResumeParams(workingDirectory, threadId, request, deve
8508
8509
  sandbox: "danger-full-access",
8509
8510
  ...codexApprovalPolicyOverrides(),
8510
8511
  developerInstructions: developerInstructions ?? null,
8511
- config: { web_search: "live" },
8512
+ config: { web_search: "live", model_reasoning_summary: "auto" },
8512
8513
  excludeTurns: false,
8513
8514
  persistExtendedHistory: false
8514
8515
  };
@@ -8566,6 +8567,9 @@ var THREAD_GOAL_CLEARED_METHOD = "thread/goal/cleared";
8566
8567
  var ITEM_STARTED_METHOD = "item/started";
8567
8568
  var ITEM_COMPLETED_METHOD = "item/completed";
8568
8569
  var AGENT_MESSAGE_DELTA_METHOD = "item/agentMessage/delta";
8570
+ var REASONING_SUMMARY_TEXT_DELTA_METHOD = "item/reasoning/summaryTextDelta";
8571
+ var REASONING_TEXT_DELTA_METHOD = "item/reasoning/textDelta";
8572
+ var REASONING_SUMMARY_PART_ADDED_METHOD = "item/reasoning/summaryPartAdded";
8569
8573
  var COMMAND_EXECUTION_OUTPUT_DELTA_METHOD = "item/commandExecution/outputDelta";
8570
8574
  var FILE_CHANGE_OUTPUT_DELTA_METHOD = "item/fileChange/outputDelta";
8571
8575
  var ACCOUNT_RATE_LIMITS_UPDATED_METHOD = "account/rateLimits/updated";
@@ -9117,6 +9121,36 @@ var CodexAspManager = class extends CodingAgentManager {
9117
9121
  );
9118
9122
  this.emitTranscriptUpdated(notification.params.threadId);
9119
9123
  },
9124
+ [REASONING_SUMMARY_TEXT_DELTA_METHOD]: (notification) => {
9125
+ if (!matchesTurn(notification.params.threadId, notification.params.turnId)) return;
9126
+ this.appendReasoningDelta(
9127
+ notification.params.threadId,
9128
+ notification.params.turnId,
9129
+ notification.params.itemId,
9130
+ notification.params.delta
9131
+ );
9132
+ this.emitTranscriptUpdated(notification.params.threadId);
9133
+ },
9134
+ [REASONING_TEXT_DELTA_METHOD]: (notification) => {
9135
+ if (!matchesTurn(notification.params.threadId, notification.params.turnId)) return;
9136
+ this.appendReasoningDelta(
9137
+ notification.params.threadId,
9138
+ notification.params.turnId,
9139
+ notification.params.itemId,
9140
+ notification.params.delta
9141
+ );
9142
+ this.emitTranscriptUpdated(notification.params.threadId);
9143
+ },
9144
+ [REASONING_SUMMARY_PART_ADDED_METHOD]: (notification) => {
9145
+ if (!matchesTurn(notification.params.threadId, notification.params.turnId)) return;
9146
+ this.appendReasoningDelta(
9147
+ notification.params.threadId,
9148
+ notification.params.turnId,
9149
+ notification.params.itemId,
9150
+ "\n\n"
9151
+ );
9152
+ this.emitTranscriptUpdated(notification.params.threadId);
9153
+ },
9120
9154
  [COMMAND_EXECUTION_OUTPUT_DELTA_METHOD]: (notification) => {
9121
9155
  if (!matchesTurn(notification.params.threadId, notification.params.turnId)) return;
9122
9156
  this.appendTranscriptOutput(notification.params.turnId, notification.params.itemId, notification.params.delta);
@@ -9419,6 +9453,9 @@ var CodexAspManager = class extends CodingAgentManager {
9419
9453
  "completed"
9420
9454
  );
9421
9455
  }
9456
+ if (turn.status === "completed" || turn.status === "failed") {
9457
+ transcriptTurn.items = transcriptTurn.items.map((item) => item.type === "reasoning" && item.status === "in_progress" ? { ...item, status: "completed" } : item);
9458
+ }
9422
9459
  if (turn.error) {
9423
9460
  const existingIndex = transcriptTurn.items.findIndex((item) => item.id === `${turn.id}-error`);
9424
9461
  const errorItem = {
@@ -9489,6 +9526,34 @@ var CodexAspManager = class extends CodingAgentManager {
9489
9526
  this.codexAspTranscript.updatedAt = timestamp;
9490
9527
  }
9491
9528
  }
9529
+ appendReasoningDelta(threadId, turnId, itemId, delta) {
9530
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString();
9531
+ const turn = this.ensureTranscriptTurn(threadId, turnId, timestamp);
9532
+ const existingIndex = turn.items.findIndex((item) => item.id === itemId);
9533
+ if (existingIndex === -1) {
9534
+ if (!delta.trim()) return;
9535
+ turn.items.push({
9536
+ type: "reasoning",
9537
+ id: itemId,
9538
+ text: delta,
9539
+ timestamp,
9540
+ status: "in_progress",
9541
+ sequence: this.nextTranscriptSequence()
9542
+ });
9543
+ } else {
9544
+ const existing = turn.items[existingIndex];
9545
+ if (existing.type === "reasoning") {
9546
+ if (!delta.trim() && !existing.text.trim()) return;
9547
+ turn.items[existingIndex] = {
9548
+ ...existing,
9549
+ text: `${existing.text}${delta}`
9550
+ };
9551
+ }
9552
+ }
9553
+ if (this.codexAspTranscript) {
9554
+ this.codexAspTranscript.updatedAt = timestamp;
9555
+ }
9556
+ }
9492
9557
  appendTranscriptOutput(turnId, itemId, delta) {
9493
9558
  if (!this.codexAspTranscript) return;
9494
9559
  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.378",
3
+ "version": "0.1.380",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",