replicas-engine 0.1.811 → 0.1.813
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-RJ5E77DR.js → asp-host-WNE7M4JW.js} +4 -4
- package/dist/src/{chunk-GRZAULRT.js → chunk-2FNKF7G5.js} +2 -2
- package/dist/src/{chunk-U7INM74K.js → chunk-2UDD657O.js} +2 -2
- package/dist/src/{chunk-S2LVYDTJ.js → chunk-4AILW34C.js} +1 -1
- package/dist/src/{chunk-NSMCPFIL.js → chunk-CWQOJJFR.js} +19 -2
- package/dist/src/{chunk-VPOQS26S.js → chunk-MULRTPDF.js} +1 -1
- package/dist/src/{chunk-U52PAJ7N.js → chunk-TMS535Y4.js} +4 -4
- package/dist/src/command-protection-hook.js +3 -3
- package/dist/src/deepseek-command-protection-plugin.js +4 -4
- package/dist/src/headless-agent.js +2 -2
- package/dist/src/index.js +7 -6
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/relay-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
getCodexAspHost,
|
|
6
6
|
restartCodexAspHost,
|
|
7
7
|
restartCodexAspHostIfRunning
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-TMS535Y4.js";
|
|
9
|
+
import "./chunk-MULRTPDF.js";
|
|
10
|
+
import "./chunk-2UDD657O.js";
|
|
11
11
|
import "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-CWQOJJFR.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
export {
|
|
15
15
|
getCodexAspHost,
|
|
@@ -3,12 +3,12 @@ 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-MULRTPDF.js";
|
|
7
7
|
import {
|
|
8
8
|
extractCommandProtectionCommandText,
|
|
9
9
|
findGitCommitSignals,
|
|
10
10
|
findPrMergeSignals
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CWQOJJFR.js";
|
|
12
12
|
|
|
13
13
|
// src/services/command-protection-service.ts
|
|
14
14
|
var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
HOOK_EXEC_MAX_BUFFER_BYTES,
|
|
6
6
|
isVersionBelow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CWQOJJFR.js";
|
|
8
8
|
|
|
9
9
|
// src/utils/codex-agent-env.ts
|
|
10
10
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -241,7 +241,7 @@ var DEFAULT_CODEX_ARGS = [
|
|
|
241
241
|
var MIN_CODEX_CLI_VERSION = "0.153.3";
|
|
242
242
|
var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
|
|
243
243
|
var codexCliVersionEnsured = null;
|
|
244
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
244
|
+
var ENGINE_PACKAGE_VERSION = "0.1.813";
|
|
245
245
|
var INITIALIZE_METHOD = "initialize";
|
|
246
246
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
247
247
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
findCodeHostPullRequestUrls,
|
|
6
6
|
mayCreatePullRequest
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CWQOJJFR.js";
|
|
8
8
|
|
|
9
9
|
// src/services/post-tool-pr-notifier.ts
|
|
10
10
|
async function notifyPostToolUse(toolName, toolInput, toolResult) {
|
|
@@ -1455,6 +1455,7 @@ import { z as z5 } from "zod";
|
|
|
1455
1455
|
var fallbackHarnessStepSchema = z5.object({
|
|
1456
1456
|
kind: z5.literal("harness"),
|
|
1457
1457
|
provider: z5.enum(VALID_AGENT_PROVIDERS),
|
|
1458
|
+
relayBaseProvider: z5.enum(VALID_RELAY_BASE_PROVIDERS).optional(),
|
|
1458
1459
|
model: z5.string().min(1),
|
|
1459
1460
|
thinkingLevel: z5.enum(VALID_THINKING_LEVELS).optional()
|
|
1460
1461
|
});
|
|
@@ -1485,6 +1486,7 @@ function coerceChatForkInfo(value) {
|
|
|
1485
1486
|
}
|
|
1486
1487
|
var forkChatRequestSchema = z6.object({
|
|
1487
1488
|
provider: z6.enum(VALID_AGENT_PROVIDERS),
|
|
1489
|
+
relayBaseProvider: z6.enum(VALID_RELAY_BASE_PROVIDERS).optional(),
|
|
1488
1490
|
model: z6.string().min(1).optional(),
|
|
1489
1491
|
thinkingLevel: z6.enum(VALID_THINKING_LEVELS).optional(),
|
|
1490
1492
|
title: z6.string().min(1).max(200).optional(),
|
|
@@ -1548,6 +1550,9 @@ function coerceBackgroundTaskPayload(payload) {
|
|
|
1548
1550
|
return {
|
|
1549
1551
|
subtype,
|
|
1550
1552
|
taskId,
|
|
1553
|
+
toolUseId: optionalString(payload.tool_use_id),
|
|
1554
|
+
subagentType: optionalString(payload.subagent_type),
|
|
1555
|
+
isBackgrounded: optionalBoolean(payload.is_backgrounded),
|
|
1551
1556
|
description: optionalString(payload.description),
|
|
1552
1557
|
summary: optionalString(payload.summary),
|
|
1553
1558
|
outputFile: optionalString(payload.output_file),
|
|
@@ -3512,6 +3517,7 @@ var REPLICAS_AGENT_ABILITIES = Object.keys(
|
|
|
3512
3517
|
// ../shared/src/routes/preferences.ts
|
|
3513
3518
|
var EMPTY_AGENT_DEFAULT_SETTINGS = {
|
|
3514
3519
|
agent_provider: null,
|
|
3520
|
+
relay_base_provider: null,
|
|
3515
3521
|
model: null,
|
|
3516
3522
|
thinking_level: null,
|
|
3517
3523
|
goal_mode: null,
|
|
@@ -5227,11 +5233,13 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
5227
5233
|
if (payload?.ambient) ambientTaskIds.add(payload.taskId);
|
|
5228
5234
|
if (payload && !ambientTaskIds.has(payload.taskId)) {
|
|
5229
5235
|
const existing = taskMessageMap.get(payload.taskId);
|
|
5230
|
-
const nextStatus = payload.subtype === "task_notification" ? normalizeBackgroundTaskStatus(payload.status) : payload.subtype === "task_updated" ? normalizeBackgroundTaskStatus(payload.patch?.status) : existing?.status ?? "in_progress";
|
|
5236
|
+
const nextStatus = payload.subtype === "task_notification" ? normalizeBackgroundTaskStatus(payload.status) : payload.subtype === "task_updated" && payload.patch?.status !== void 0 ? normalizeBackgroundTaskStatus(payload.patch?.status) : existing?.status ?? "in_progress";
|
|
5231
5237
|
const nextMessage = {
|
|
5232
5238
|
id: existing?.id ?? `task-${event.timestamp}-${messages.length}`,
|
|
5233
5239
|
type: "background_task",
|
|
5234
5240
|
taskId: payload.taskId,
|
|
5241
|
+
toolUseId: payload.toolUseId ?? existing?.toolUseId,
|
|
5242
|
+
subagentType: payload.subagentType ?? existing?.subagentType,
|
|
5235
5243
|
status: nextStatus,
|
|
5236
5244
|
description: payload.description ?? payload.patch?.description ?? existing?.description,
|
|
5237
5245
|
summary: payload.summary ?? existing?.summary,
|
|
@@ -5242,7 +5250,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
5242
5250
|
lastToolName: payload.lastToolName ?? existing?.lastToolName,
|
|
5243
5251
|
usage: payload.usage ?? existing?.usage,
|
|
5244
5252
|
error: payload.patch?.error ?? existing?.error,
|
|
5245
|
-
isBackgrounded: payload.patch?.isBackgrounded ?? existing?.isBackgrounded,
|
|
5253
|
+
isBackgrounded: payload.isBackgrounded ?? payload.patch?.isBackgrounded ?? existing?.isBackgrounded,
|
|
5246
5254
|
timestamp: existing?.timestamp ?? event.timestamp
|
|
5247
5255
|
};
|
|
5248
5256
|
if (existing) {
|
|
@@ -5335,6 +5343,15 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
5335
5343
|
}
|
|
5336
5344
|
});
|
|
5337
5345
|
for (const message of messages) {
|
|
5346
|
+
if (message.type === "background_task" && message.toolUseId) {
|
|
5347
|
+
const toolInfo = toolCallMap.get(message.toolUseId);
|
|
5348
|
+
const toolMessage = toolInfo ? messages[toolInfo.messageIndex] : void 0;
|
|
5349
|
+
if (toolMessage?.type === "command") message.command = toolMessage.command;
|
|
5350
|
+
if (toolMessage?.type === "subagent") {
|
|
5351
|
+
message.prompt ??= toolMessage.prompt;
|
|
5352
|
+
message.subagentType ??= toolMessage.subagentType;
|
|
5353
|
+
}
|
|
5354
|
+
}
|
|
5338
5355
|
if (message.type !== "subagent_followup") continue;
|
|
5339
5356
|
const target = messages.find((candidate) => candidate.type === "subagent" && candidate.chatId === message.chatId);
|
|
5340
5357
|
if (target?.type === "subagent") {
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
setAgentCredentialSnapshot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MULRTPDF.js";
|
|
9
9
|
import {
|
|
10
10
|
AppServerProcess,
|
|
11
11
|
buildCodexAgentEnv
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2UDD657O.js";
|
|
13
13
|
import {
|
|
14
14
|
CODEX_AUTH_ENV_KEYS,
|
|
15
15
|
CODEX_AUTH_ENV_KEYS_BY_METHOD,
|
|
16
16
|
codexAuthEnvFromResponse,
|
|
17
17
|
createErrorResult,
|
|
18
18
|
createSuccessResult
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CWQOJJFR.js";
|
|
20
20
|
|
|
21
21
|
// src/managers/codex-token-manager.ts
|
|
22
22
|
import { promises as fs } from "fs";
|
|
@@ -232,7 +232,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
232
232
|
const data = await response.json();
|
|
233
233
|
await this.applyCredentialsResponse(data);
|
|
234
234
|
if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
|
|
235
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
235
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-WNE7M4JW.js");
|
|
236
236
|
await restartCodexAspHostIfRunning2();
|
|
237
237
|
}
|
|
238
238
|
if (data.scope) {
|
|
@@ -3,12 +3,12 @@ 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-
|
|
6
|
+
} from "./chunk-2FNKF7G5.js";
|
|
7
|
+
import "./chunk-MULRTPDF.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-CWQOJJFR.js";
|
|
12
12
|
import "./chunk-VEQXQN22.js";
|
|
13
13
|
|
|
14
14
|
// src/command-protection-hook.ts
|
|
@@ -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-
|
|
6
|
+
} from "./chunk-2FNKF7G5.js";
|
|
7
7
|
import {
|
|
8
8
|
notifyPostToolUse
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-4AILW34C.js";
|
|
10
|
+
import "./chunk-MULRTPDF.js";
|
|
11
11
|
import "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-CWQOJJFR.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/deepseek-command-protection-plugin.ts
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
AppServerProcess,
|
|
10
10
|
buildCodexAgentEnv
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2UDD657O.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT,
|
|
14
14
|
getMemoryOutputSafetyViolation,
|
|
15
15
|
headlessAgentRequestSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CWQOJJFR.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
|
|
19
19
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
evaluateCommandProtection,
|
|
92
92
|
extractToolCommand,
|
|
93
93
|
reportCommandProtectionBlock
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-2FNKF7G5.js";
|
|
95
95
|
import {
|
|
96
96
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
97
97
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -124,20 +124,20 @@ import {
|
|
|
124
124
|
recordCredentialFallback,
|
|
125
125
|
recordExhaustedCredential,
|
|
126
126
|
restartCodexAspHost
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-TMS535Y4.js";
|
|
128
128
|
import {
|
|
129
129
|
ENGINE_ENV,
|
|
130
130
|
IS_WARMING_MODE,
|
|
131
131
|
monolithRequest,
|
|
132
132
|
monolithService,
|
|
133
133
|
setAgentCredentialSnapshot
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-MULRTPDF.js";
|
|
135
135
|
import {
|
|
136
136
|
AspClient,
|
|
137
137
|
SUBPROCESS_MAX_BUFFER,
|
|
138
138
|
execAsync,
|
|
139
139
|
execFileAsync
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-2UDD657O.js";
|
|
141
141
|
import {
|
|
142
142
|
isRecord as isRecord2
|
|
143
143
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -343,7 +343,7 @@ import {
|
|
|
343
343
|
spawnRelaySubagentRequestSchema,
|
|
344
344
|
stripAgentDiagnosticErrors,
|
|
345
345
|
withTimeout
|
|
346
|
-
} from "./chunk-
|
|
346
|
+
} from "./chunk-CWQOJJFR.js";
|
|
347
347
|
import {
|
|
348
348
|
__commonJS,
|
|
349
349
|
__export,
|
|
@@ -62134,7 +62134,7 @@ var ChatService = class {
|
|
|
62134
62134
|
/** Resolves once the target chat exists; the handoff and its first turn run in the background. */
|
|
62135
62135
|
async forkChat(sourceChatId, request, trigger = "manual", reason) {
|
|
62136
62136
|
const source = this.requireChat(sourceChatId);
|
|
62137
|
-
const relayBaseProvider = await resolveRelayBaseProvider(request.provider);
|
|
62137
|
+
const relayBaseProvider = await resolveRelayBaseProvider(request.provider, request.relayBaseProvider);
|
|
62138
62138
|
const executionProvider = request.provider === "relay" ? relayBaseProvider : request.provider;
|
|
62139
62139
|
if (trigger === "manual" && (!executionProvider || !isAgentAvailable(executionProvider))) {
|
|
62140
62140
|
throw new ChatProviderUnavailableError(request.provider);
|
|
@@ -62231,6 +62231,7 @@ var ChatService = class {
|
|
|
62231
62231
|
const last = chat.lastSendRequest;
|
|
62232
62232
|
await this.forkChat(chat.persisted.id, {
|
|
62233
62233
|
provider: target.provider,
|
|
62234
|
+
relayBaseProvider: target.relayBaseProvider,
|
|
62234
62235
|
model: target.model,
|
|
62235
62236
|
thinkingLevel: target.thinkingLevel,
|
|
62236
62237
|
enableInteractiveTools: last?.enableInteractiveTools,
|
|
@@ -3,11 +3,11 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
notifyPostToolUse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4AILW34C.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
9
|
} from "./chunk-UZSNFLDQ.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-CWQOJJFR.js";
|
|
11
11
|
import "./chunk-VEQXQN22.js";
|
|
12
12
|
|
|
13
13
|
// src/post-tool-pr-hook.ts
|
package/dist/src/relay-mcp.js
CHANGED