replicas-engine 0.1.478 → 0.1.480
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 +43 -5
- package/package.json +1 -1
package/dist/src/index.js
CHANGED
|
@@ -582,7 +582,7 @@ var WORKSPACE_SIZES = ["small", "large"];
|
|
|
582
582
|
var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
|
|
583
583
|
|
|
584
584
|
// ../shared/src/e2b.ts
|
|
585
|
-
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-22-
|
|
585
|
+
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-07-22-v5";
|
|
586
586
|
|
|
587
587
|
// ../shared/src/runtime-env.ts
|
|
588
588
|
function shellQuotePosix(value) {
|
|
@@ -5494,7 +5494,7 @@ var GitService = class {
|
|
|
5494
5494
|
const data = await response.json();
|
|
5495
5495
|
if (!Array.isArray(data)) return { status: "not_found" };
|
|
5496
5496
|
const branchMatches = data.filter((item) => isRecord4(item) && item.source_branch === branch);
|
|
5497
|
-
const mergeRequest = branchMatches.find((item) => item.state === "opened") ?? branchMatches[0]
|
|
5497
|
+
const mergeRequest = branchMatches.find((item) => item.state === "opened") ?? branchMatches[0];
|
|
5498
5498
|
if (!isRecord4(mergeRequest)) return { status: "not_found" };
|
|
5499
5499
|
const webUrl = mergeRequest.web_url;
|
|
5500
5500
|
if (typeof webUrl === "string" && webUrl.length > 0) return { status: "found", url: webUrl };
|
|
@@ -5592,14 +5592,15 @@ var GitService = class {
|
|
|
5592
5592
|
}
|
|
5593
5593
|
}
|
|
5594
5594
|
async refreshRepoMetadata(repo, currentBranch, startHooksCompleted, persistedState, observedBranches, includeDiffs = false) {
|
|
5595
|
-
const
|
|
5595
|
+
const notFound = { status: "not_found" };
|
|
5596
|
+
const prResult = currentBranch === repo.defaultBranch ? notFound : await this.getPullRequestUrl(repo.name, repo.path, currentBranch, persistedState);
|
|
5596
5597
|
let prUrls = persistedState?.prUrls ?? [];
|
|
5597
5598
|
if (prResult.status === "found") {
|
|
5598
5599
|
prUrls = appendUniqueUrl(prUrls, prResult.url);
|
|
5599
5600
|
}
|
|
5600
5601
|
if (observedBranches) {
|
|
5601
5602
|
for (const branch of observedBranches) {
|
|
5602
|
-
if (branch === currentBranch) continue;
|
|
5603
|
+
if (branch === currentBranch || branch === repo.defaultBranch) continue;
|
|
5603
5604
|
const branchResult = await this.lookupPrOnRemote(repo.name, repo.path, branch);
|
|
5604
5605
|
if (branchResult.status === "found") {
|
|
5605
5606
|
prUrls = appendUniqueUrl(prUrls, branchResult.url);
|
|
@@ -6314,6 +6315,7 @@ var EnvironmentDetailsService = class {
|
|
|
6314
6315
|
details.engineVersion = E2B_TEMPLATE_NAME;
|
|
6315
6316
|
details.supportsMidTurnSteering = true;
|
|
6316
6317
|
details.supportsGoalUpdates = true;
|
|
6318
|
+
details.supportsQueuedMessageEditing = true;
|
|
6317
6319
|
details.claudeAuthMethod = detectClaudeAuthMethod();
|
|
6318
6320
|
details.codexAuthMethod = detectCodexAuthMethod();
|
|
6319
6321
|
details.cursorAuthMethod = detectCursorAuthMethod();
|
|
@@ -7709,6 +7711,12 @@ var MessageQueueService = class {
|
|
|
7709
7711
|
this.queue = [];
|
|
7710
7712
|
return true;
|
|
7711
7713
|
}
|
|
7714
|
+
updateQueuedMessage(messageId, message) {
|
|
7715
|
+
const queuedMessage = this.queue.find((item) => item.id === messageId);
|
|
7716
|
+
if (!queuedMessage) return false;
|
|
7717
|
+
queuedMessage.message = message;
|
|
7718
|
+
return true;
|
|
7719
|
+
}
|
|
7712
7720
|
takeFromQueue(messageId) {
|
|
7713
7721
|
const index = this.queue.findIndex((m) => m.id === messageId);
|
|
7714
7722
|
if (index === -1) return null;
|
|
@@ -7839,6 +7847,9 @@ var CodingAgentManager = class {
|
|
|
7839
7847
|
clearQueue() {
|
|
7840
7848
|
return this.messageQueue.clearQueue();
|
|
7841
7849
|
}
|
|
7850
|
+
updateQueuedMessage(messageId, message) {
|
|
7851
|
+
return this.messageQueue.updateQueuedMessage(messageId, message);
|
|
7852
|
+
}
|
|
7842
7853
|
reorderQueue(messageId, newPosition) {
|
|
7843
7854
|
return this.messageQueue.reorderQueue(messageId, newPosition);
|
|
7844
7855
|
}
|
|
@@ -9790,7 +9801,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
|
|
|
9790
9801
|
var MIN_CODEX_CLI_VERSION = "0.144.6";
|
|
9791
9802
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
9792
9803
|
var codexCliVersionEnsured = null;
|
|
9793
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
9804
|
+
var ENGINE_PACKAGE_VERSION = "0.1.480";
|
|
9794
9805
|
var INITIALIZE_METHOD = "initialize";
|
|
9795
9806
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
9796
9807
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -13815,6 +13826,9 @@ var RelayManager = class {
|
|
|
13815
13826
|
clearQueue() {
|
|
13816
13827
|
return this.inner.clearQueue();
|
|
13817
13828
|
}
|
|
13829
|
+
updateQueuedMessage(messageId, message) {
|
|
13830
|
+
return this.inner.updateQueuedMessage(messageId, message);
|
|
13831
|
+
}
|
|
13818
13832
|
reorderQueue(messageId, newPosition) {
|
|
13819
13833
|
return this.inner.reorderQueue(messageId, newPosition);
|
|
13820
13834
|
}
|
|
@@ -14548,6 +14562,14 @@ var ChatService = class {
|
|
|
14548
14562
|
queue: chat.provider.getQueue()
|
|
14549
14563
|
};
|
|
14550
14564
|
}
|
|
14565
|
+
updateQueuedMessage(chatId, messageId, message) {
|
|
14566
|
+
const chat = this.requireChat(chatId);
|
|
14567
|
+
const success = chat.provider.updateQueuedMessage(messageId, message);
|
|
14568
|
+
return {
|
|
14569
|
+
success,
|
|
14570
|
+
queue: chat.provider.getQueue()
|
|
14571
|
+
};
|
|
14572
|
+
}
|
|
14551
14573
|
reorderQueue(chatId, messageId, position) {
|
|
14552
14574
|
const chat = this.requireChat(chatId);
|
|
14553
14575
|
const success = chat.provider.reorderQueue(messageId, position);
|
|
@@ -16143,6 +16165,22 @@ function createV1Routes(deps) {
|
|
|
16143
16165
|
return c.json(jsonError("Failed to remove from queue", error instanceof Error ? error.message : "Unknown error"), 500);
|
|
16144
16166
|
}
|
|
16145
16167
|
});
|
|
16168
|
+
app2.patch("/chats/:chatId/queue/:messageId", async (c) => {
|
|
16169
|
+
try {
|
|
16170
|
+
const body = await c.req.json();
|
|
16171
|
+
const message = body.message?.trim();
|
|
16172
|
+
if (!message) {
|
|
16173
|
+
return c.json(jsonError("Invalid request", "message is required"), 400);
|
|
16174
|
+
}
|
|
16175
|
+
const result = deps.chatService.updateQueuedMessage(c.req.param("chatId"), c.req.param("messageId"), message);
|
|
16176
|
+
return c.json(result);
|
|
16177
|
+
} catch (error) {
|
|
16178
|
+
if (error instanceof ChatNotFoundError) {
|
|
16179
|
+
return c.json(jsonError("Chat not found", error.message), 404);
|
|
16180
|
+
}
|
|
16181
|
+
return c.json(jsonError("Failed to update queued message", error instanceof Error ? error.message : "Unknown error"), 500);
|
|
16182
|
+
}
|
|
16183
|
+
});
|
|
16146
16184
|
app2.post("/chats/:chatId/queue/:messageId/steer", async (c) => {
|
|
16147
16185
|
try {
|
|
16148
16186
|
const result = await deps.chatService.steerFromQueue(c.req.param("chatId"), c.req.param("messageId"));
|