replicas-engine 0.1.998 → 0.1.1001
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/{asp-host-I3NXF25H.js → asp-host-XVFSG3YF.js} +5 -5
- package/dist/src/{chunk-2REKTW24.js → chunk-2DRZES2X.js} +6 -6
- package/dist/src/{chunk-OMH263GC.js → chunk-7CQ5HPG5.js} +1 -1
- package/dist/src/{chunk-2T44H6OX.js → chunk-IIJ5KKS3.js} +1 -1
- package/dist/src/{chunk-ZZTR4I2H.js → chunk-MHXGZIJQ.js} +1 -1
- package/dist/src/{chunk-23ETVAOQ.js → chunk-NOZZLX6A.js} +1 -1
- package/dist/src/{chunk-PY5AEEQ3.js → chunk-YCHNQQI2.js} +3 -3
- package/dist/src/{chunk-F5KDHXJO.js → chunk-ZNAZMTD2.js} +3 -3
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +3 -3
- package/dist/src/index.js +32 -8
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +2 -2
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
getCodexAspHost,
|
|
6
6
|
restartCodexAspHost,
|
|
7
7
|
restartCodexAspHostIfRunning
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2DRZES2X.js";
|
|
9
|
+
import "./chunk-7CQ5HPG5.js";
|
|
10
|
+
import "./chunk-YCHNQQI2.js";
|
|
11
|
+
import "./chunk-IIJ5KKS3.js";
|
|
12
12
|
import "./chunk-UZSNFLDQ.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-NOZZLX6A.js";
|
|
14
14
|
import "./chunk-VEQXQN22.js";
|
|
15
15
|
export {
|
|
16
16
|
getCodexAspHost,
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
setAgentCredentialSnapshot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7CQ5HPG5.js";
|
|
9
9
|
import {
|
|
10
10
|
AppServerProcess,
|
|
11
11
|
buildCodexAgentEnv
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YCHNQQI2.js";
|
|
13
13
|
import {
|
|
14
14
|
SUBPROCESS_MAX_BUFFER,
|
|
15
15
|
execFileAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IIJ5KKS3.js";
|
|
17
17
|
import {
|
|
18
18
|
isRecord
|
|
19
19
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
listOpenAICompatibleModels,
|
|
29
29
|
readOllamaAuthEnv,
|
|
30
30
|
resolveOpenAICompatibleModelsUrl
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NOZZLX6A.js";
|
|
32
32
|
|
|
33
33
|
// src/managers/codex-token-manager.ts
|
|
34
34
|
import { promises as fs } from "fs";
|
|
@@ -264,7 +264,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
264
264
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
265
265
|
await this.applyCredentialsResponse(data);
|
|
266
266
|
setAgentCredentialSnapshot("codex", data);
|
|
267
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
267
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-XVFSG3YF.js");
|
|
268
268
|
await restartCodexAspHostIfRunning2();
|
|
269
269
|
});
|
|
270
270
|
await this.start(true);
|
|
@@ -285,7 +285,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
285
285
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
286
286
|
await this.applyCredentialsResponse(data);
|
|
287
287
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
288
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
288
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-XVFSG3YF.js");
|
|
289
289
|
await restartCodexAspHostIfRunning2();
|
|
290
290
|
}
|
|
291
291
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
HOOK_EXEC_MAX_BUFFER_BYTES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NOZZLX6A.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -4562,7 +4562,7 @@ replicas automation create "Re-check PR #142 CI" \\
|
|
|
4562
4562
|
- \`--in <duration>\` (\`30m\`, \`2h\`, \`3d\`, \`1w\`, \`1d12h\`) or \`--at <ISO-8601 with offset>\` (e.g. "tomorrow at 9am" \u2192 \`--at 2026-10-08T09:00:00-07:00\`, using the user's timezone if you know it; otherwise say which timezone you assumed).
|
|
4563
4563
|
- Inside a workspace, one-time follow-ups default to \`--workspace current\`, so you resume with this conversation's context. Inside a workspace, \`--environment\` defaults to this workspace's environment (same repositories), including for \`--workspace new\` and \`reuse\`.
|
|
4564
4564
|
- Write \`--prompt\` as instructions to your future self: the links, what to check, what "done" looks like, and how to report back (e.g. reply in the original Slack thread). It runs with no memory of why it was scheduled beyond what you write.
|
|
4565
|
-
- \`--background\` keeps
|
|
4565
|
+
- \`--background\` keeps follow-ups out of the user's main automations list (they are still visible under **Background**). Use it for every one-time follow-up that reports back into this conversation, even one that leads to a big decision. Omit it only for recurring automations the user wants to see and manage, such as ongoing monitoring.
|
|
4566
4566
|
- \`--personal\` makes the automation the user's own. Omit it only when the follow-up belongs to the organization.
|
|
4567
4567
|
- Recurring with an end: \`--trigger-cron "0 9 * * *" --max-runs 5 --workspace current\` runs daily five times, then deletes itself. \`--workspace reuse\` creates one new workspace on the first run and sends every later run to it; \`--workspace new\` (the default for non-one-time automations) creates a fresh workspace per run.
|
|
4568
4568
|
- Only schedule when the user asked for a follow-up or clearly agreed to one; not for "maybe I'll look at this later".
|
|
@@ -3,10 +3,10 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
execFileAsync
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IIJ5KKS3.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NOZZLX6A.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/codex-agent-env.ts
|
|
12
12
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -240,7 +240,7 @@ function getCodexModelProvider(method) {
|
|
|
240
240
|
if (method === "foundry") return "azure";
|
|
241
241
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
242
242
|
}
|
|
243
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
243
|
+
var ENGINE_PACKAGE_VERSION = "0.1.1001";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -3,18 +3,18 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
monolithRequest
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7CQ5HPG5.js";
|
|
7
7
|
import {
|
|
8
8
|
SUBPROCESS_MAX_BUFFER,
|
|
9
9
|
execFileAsync
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IIJ5KKS3.js";
|
|
11
11
|
import {
|
|
12
12
|
extractCommandProtectionCommandText,
|
|
13
13
|
findCommandProtectionGitLookups,
|
|
14
14
|
findGitCommitSignals,
|
|
15
15
|
findPrMergeSignals,
|
|
16
16
|
parseCommandProtectionRequest
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NOZZLX6A.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
evaluateCommandProtection
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-ZNAZMTD2.js";
|
|
7
|
+
import "./chunk-7CQ5HPG5.js";
|
|
8
|
+
import "./chunk-IIJ5KKS3.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NOZZLX6A.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
AppServerProcess,
|
|
9
9
|
buildCodexAgentEnv
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-YCHNQQI2.js";
|
|
11
|
+
import "./chunk-IIJ5KKS3.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT,
|
|
14
14
|
headlessAgentRequestSchema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NOZZLX6A.js";
|
|
16
16
|
import "./chunk-VEQXQN22.js";
|
|
17
17
|
|
|
18
18
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
reportCommandProtectionBlock,
|
|
33
33
|
resolveDiffBase,
|
|
34
34
|
runGitCommand
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZNAZMTD2.js";
|
|
36
36
|
import {
|
|
37
37
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
38
38
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "./chunk-P73LGPQO.js";
|
|
58
58
|
import {
|
|
59
59
|
publishedPullRequestUrls
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-MHXGZIJQ.js";
|
|
61
61
|
import {
|
|
62
62
|
BaseRefreshManager,
|
|
63
63
|
CodexAspAuthMethodChangedError,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
refreshDelayMs,
|
|
72
72
|
restartCodexAspHost,
|
|
73
73
|
routineRefreshRequest
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-2DRZES2X.js";
|
|
75
75
|
import {
|
|
76
76
|
ENGINE_ENV,
|
|
77
77
|
monolithRequest,
|
|
@@ -79,16 +79,16 @@ import {
|
|
|
79
79
|
readRuntimeEnvFile,
|
|
80
80
|
reloadEngineEnv,
|
|
81
81
|
setAgentCredentialSnapshot
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-7CQ5HPG5.js";
|
|
83
83
|
import {
|
|
84
84
|
AspClient,
|
|
85
85
|
getCodexModelProvider
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-YCHNQQI2.js";
|
|
87
87
|
import {
|
|
88
88
|
SUBPROCESS_MAX_BUFFER,
|
|
89
89
|
execAsync,
|
|
90
90
|
execFileAsync
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-IIJ5KKS3.js";
|
|
92
92
|
import {
|
|
93
93
|
isRecord as isRecord2
|
|
94
94
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -316,7 +316,7 @@ import {
|
|
|
316
316
|
workspaceCredentialProviderSchema,
|
|
317
317
|
workspaceTokenRequestSchema,
|
|
318
318
|
workspaceTokenResponseSchema
|
|
319
|
-
} from "./chunk-
|
|
319
|
+
} from "./chunk-NOZZLX6A.js";
|
|
320
320
|
import {
|
|
321
321
|
cloneMcpConfig,
|
|
322
322
|
ensureCompatibilityImports,
|
|
@@ -10167,6 +10167,7 @@ var EnvironmentDetailsService = class {
|
|
|
10167
10167
|
details.engineVersion = ENGINE_ENV.REPLICAS_SANDBOX_IMAGE_VERSION;
|
|
10168
10168
|
details.supportsMidTurnSteering = true;
|
|
10169
10169
|
details.supportsClaudeMidTurnSteering = true;
|
|
10170
|
+
details.supportsCursorMidTurnSteering = true;
|
|
10170
10171
|
details.supportsSendNow = true;
|
|
10171
10172
|
details.supportsClaudeGoals = true;
|
|
10172
10173
|
details.supportsGoalUpdates = true;
|
|
@@ -16445,6 +16446,7 @@ async function listCursorCommandsInDirectory(directory) {
|
|
|
16445
16446
|
var CursorManager = class extends CodingAgentManager {
|
|
16446
16447
|
agent = null;
|
|
16447
16448
|
activeRun = null;
|
|
16449
|
+
pendingSteers = /* @__PURE__ */ new Set();
|
|
16448
16450
|
activeModel = null;
|
|
16449
16451
|
abortActiveTurn = null;
|
|
16450
16452
|
reconnectNoticeVisible = false;
|
|
@@ -16471,6 +16473,27 @@ var CursorManager = class extends CodingAgentManager {
|
|
|
16471
16473
|
await this.cancelRun(this.activeRun);
|
|
16472
16474
|
this.abortActiveTurn?.();
|
|
16473
16475
|
}
|
|
16476
|
+
// Cursor's steer API is text-only, so an image message interrupts the turn and runs next instead.
|
|
16477
|
+
async steerFromQueue(messageId) {
|
|
16478
|
+
await this.initialized;
|
|
16479
|
+
const queued = this.messageQueue.getQueue().find(({ id }) => id === messageId);
|
|
16480
|
+
return queued?.images?.length ? this.sendNow(messageId) : super.steerFromQueue(messageId);
|
|
16481
|
+
}
|
|
16482
|
+
// Cursor's steer resolves once the turn appends the message, so it settles later; the turn
|
|
16483
|
+
// waits for pending steers before completing, and an unread one is requeued as a follow-up.
|
|
16484
|
+
async steerRequest(request) {
|
|
16485
|
+
const run = this.activeRun;
|
|
16486
|
+
if (!run?.steer || run.status !== "running" || request.images?.length) return false;
|
|
16487
|
+
const pending = run.steer(request.message).then((outcome) => {
|
|
16488
|
+
if (outcome !== "complete_delivered") return;
|
|
16489
|
+
const steer = this.markSteerRead(request.id);
|
|
16490
|
+
if (steer) this.recordUserMessageHistoryEvent(steer, this.historyFile);
|
|
16491
|
+
}).catch((error) => {
|
|
16492
|
+
console.error("[CursorManager] Failed to steer Cursor run:", error);
|
|
16493
|
+
}).finally(() => this.pendingSteers.delete(pending));
|
|
16494
|
+
this.pendingSteers.add(pending);
|
|
16495
|
+
return true;
|
|
16496
|
+
}
|
|
16474
16497
|
async cancelRun(run) {
|
|
16475
16498
|
if (!run || run.status !== "running") return;
|
|
16476
16499
|
try {
|
|
@@ -16707,6 +16730,7 @@ var CursorManager = class extends CodingAgentManager {
|
|
|
16707
16730
|
this.abortActiveTurn = null;
|
|
16708
16731
|
this.activeRun = null;
|
|
16709
16732
|
this.activeModel = null;
|
|
16733
|
+
await raceWithTimeout(Promise.allSettled(this.pendingSteers), CURSOR_RUN_SETTLE_TIMEOUT_MS);
|
|
16710
16734
|
await this.historyFile.flush();
|
|
16711
16735
|
await this.onTurnComplete();
|
|
16712
16736
|
}
|
|
@@ -61688,7 +61712,7 @@ var ChatService = class {
|
|
|
61688
61712
|
}
|
|
61689
61713
|
let eventToPublish = event;
|
|
61690
61714
|
if (event.type === "event_msg" && event.payload.type === "user_message") {
|
|
61691
|
-
if (chat.activeMessageId) {
|
|
61715
|
+
if (chat.activeMessageId && !event.payload[USER_MESSAGE_ID_PAYLOAD_KEY]) {
|
|
61692
61716
|
event.payload[USER_MESSAGE_ID_PAYLOAD_KEY] = chat.activeMessageId;
|
|
61693
61717
|
eventToPublish = {
|
|
61694
61718
|
...event,
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
publishedPullRequestUrls
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MHXGZIJQ.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
9
|
} from "./chunk-UZSNFLDQ.js";
|
|
10
10
|
import {
|
|
11
11
|
shouldRefreshPullRequests
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NOZZLX6A.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/services/post-tool-pr-notifier.ts
|
package/dist/src/subagent-mcp.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "replicas-engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1001",
|
|
4
4
|
"description": "Lightweight API server for Replicas workspaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@anthropic-ai/claude-agent-sdk": "0.3.284",
|
|
43
43
|
"@anthropic-ai/sdk": "0.128.0",
|
|
44
44
|
"@connectrpc/connect-node": "1.7.0",
|
|
45
|
-
"@cursor/sdk": "1.0.
|
|
45
|
+
"@cursor/sdk": "1.0.36",
|
|
46
46
|
"@earendil-works/pi-ai": "0.85.0",
|
|
47
47
|
"@earendil-works/pi-coding-agent": "0.85.0",
|
|
48
48
|
"@earendil-works/pi-server": "0.85.0",
|