replicas-engine 0.1.506 → 0.1.507
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.
- package/dist/src/index.js +27 -5
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -611,7 +611,7 @@ var WORKSPACE_SIZES = ["small", "large"];
|
|
|
611
611
|
var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
|
|
612
612
|
|
|
613
613
|
// ../shared/src/e2b.ts
|
|
614
|
-
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-25-
|
|
614
|
+
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-25-v9";
|
|
615
615
|
|
|
616
616
|
// ../shared/src/runtime-env.ts
|
|
617
617
|
function shellQuotePosix(value) {
|
|
@@ -8810,6 +8810,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
8810
8810
|
sessionLoop = null;
|
|
8811
8811
|
sessionLinearForwarder = null;
|
|
8812
8812
|
pendingTurn = null;
|
|
8813
|
+
sdkTurnActive = false;
|
|
8813
8814
|
pendingInterrupt = false;
|
|
8814
8815
|
activeBackgroundTasks = /* @__PURE__ */ new Set();
|
|
8815
8816
|
partialMessageStreams = /* @__PURE__ */ new Map();
|
|
@@ -8865,6 +8866,9 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
8865
8866
|
isAuthRetrying() {
|
|
8866
8867
|
return this.authRetrying;
|
|
8867
8868
|
}
|
|
8869
|
+
isProcessing() {
|
|
8870
|
+
return super.isProcessing() || this.sdkTurnActive;
|
|
8871
|
+
}
|
|
8868
8872
|
hasActiveBackgroundTasks() {
|
|
8869
8873
|
return this.activeBackgroundTasks.size > 0;
|
|
8870
8874
|
}
|
|
@@ -9433,8 +9437,17 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
9433
9437
|
if (this.pendingTurn && _ClaudeManager.isTurnActivity(msg)) {
|
|
9434
9438
|
this.pendingTurn.sawActivity = true;
|
|
9435
9439
|
}
|
|
9436
|
-
|
|
9440
|
+
if (msg.type === "system" && msg.subtype === "init") {
|
|
9441
|
+
this.sdkTurnActive = true;
|
|
9442
|
+
} else if (msg.type === "result") {
|
|
9443
|
+
this.sdkTurnActive = false;
|
|
9444
|
+
}
|
|
9445
|
+
const hadActiveBackgroundTasks = this.activeBackgroundTasks.size > 0;
|
|
9437
9446
|
_ClaudeManager.updateBackgroundTaskState(msg, this.activeBackgroundTasks);
|
|
9447
|
+
if (hadActiveBackgroundTasks && this.activeBackgroundTasks.size === 0) {
|
|
9448
|
+
this.sdkTurnActive = true;
|
|
9449
|
+
}
|
|
9450
|
+
await this.handleMessage(msg);
|
|
9438
9451
|
if (linearSessionId && this.sessionLinearForwarder) {
|
|
9439
9452
|
this.sessionLinearForwarder.processClaudeEventForPlan(msg);
|
|
9440
9453
|
this.sessionLinearForwarder.sendEvent(convertClaudeEvent(msg, linearSessionId));
|
|
@@ -9479,6 +9492,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
9479
9492
|
this.activeSessionPermissionMode = null;
|
|
9480
9493
|
this.sessionLinearForwarder = null;
|
|
9481
9494
|
this.sessionLoop = null;
|
|
9495
|
+
this.sdkTurnActive = false;
|
|
9482
9496
|
this.activeBackgroundTasks.clear();
|
|
9483
9497
|
for (const timer of this.partialMessageFlushTimers.values()) {
|
|
9484
9498
|
clearTimeout(timer);
|
|
@@ -9523,6 +9537,13 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
|
|
|
9523
9537
|
}
|
|
9524
9538
|
static updateBackgroundTaskState(message, activeTasks) {
|
|
9525
9539
|
if (message.type !== "system") return;
|
|
9540
|
+
if (message.subtype === "background_tasks_changed") {
|
|
9541
|
+
activeTasks.clear();
|
|
9542
|
+
for (const task of message.tasks) {
|
|
9543
|
+
activeTasks.add(task.task_id);
|
|
9544
|
+
}
|
|
9545
|
+
return;
|
|
9546
|
+
}
|
|
9526
9547
|
const payload = coerceBackgroundTaskPayload(message);
|
|
9527
9548
|
if (!payload) return;
|
|
9528
9549
|
const status = payload.subtype === "task_updated" ? payload.patch?.status : payload.status;
|
|
@@ -9958,7 +9979,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
|
|
|
9958
9979
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
9959
9980
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
9960
9981
|
var codexCliVersionEnsured = null;
|
|
9961
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
9982
|
+
var ENGINE_PACKAGE_VERSION = "0.1.507";
|
|
9962
9983
|
var INITIALIZE_METHOD = "initialize";
|
|
9963
9984
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
9964
9985
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -15252,7 +15273,7 @@ var ChatService = class {
|
|
|
15252
15273
|
}
|
|
15253
15274
|
}).catch(() => {
|
|
15254
15275
|
});
|
|
15255
|
-
if (event.type === "replicas-tool-input-request" || event.type === "replicas-tool-input-resolved" || event.type === "compaction-status" || event.type === AUTH_RETRY_STATUS_EVENT_TYPE || event.type === CHAT_GOAL_EVENT_TYPE) {
|
|
15276
|
+
if (event.type === "replicas-tool-input-request" || event.type === "replicas-tool-input-resolved" || event.type === "compaction-status" || event.type === AUTH_RETRY_STATUS_EVENT_TYPE || event.type === CHAT_GOAL_EVENT_TYPE || event.type === "claude-result" || event.type === "claude-system" && event.payload.subtype === "init") {
|
|
15256
15277
|
this.publish({
|
|
15257
15278
|
type: "chat.updated",
|
|
15258
15279
|
payload: { chat: this.toSummary(chat) }
|
|
@@ -15275,7 +15296,8 @@ var ChatService = class {
|
|
|
15275
15296
|
type: "chat.turn.completed",
|
|
15276
15297
|
payload: {
|
|
15277
15298
|
chatId,
|
|
15278
|
-
isComplete: true
|
|
15299
|
+
isComplete: true,
|
|
15300
|
+
processing: chat.provider.hasActiveBackgroundTasks?.() ?? false
|
|
15279
15301
|
}
|
|
15280
15302
|
}).catch(() => {
|
|
15281
15303
|
});
|