replicas-engine 0.1.1230 → 0.1.1233
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-S5VIUXGQ.js → asp-host-HYB3QPNZ.js} +5 -5
- package/dist/src/{chunk-SOWKXPU3.js → chunk-DESHWPZO.js} +2 -2
- package/dist/src/{chunk-3EB5JBOB.js → chunk-GUWCSUIJ.js} +38 -34
- package/dist/src/{chunk-JTL6OI2V.js → chunk-K76BTS25.js} +1 -1
- package/dist/src/{chunk-BQ7N4ZEE.js → chunk-LJY3ZN3W.js} +2 -2
- package/dist/src/{chunk-XTRKRSAA.js → chunk-PKKJTVV3.js} +1 -1
- package/dist/src/{chunk-ULD7MOPE.js → chunk-SGV7VALU.js} +6 -6
- package/dist/src/{chunk-NIJQQIK2.js → chunk-XIRIE7RG.js} +3 -3
- package/dist/src/{chunk-WGRWQVPL.js → chunk-YWUBMZVE.js} +2 -2
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +18 -10
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
listRunningCodexModels,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-SGV7VALU.js";
|
|
12
|
+
import "./chunk-YWUBMZVE.js";
|
|
13
|
+
import "./chunk-XIRIE7RG.js";
|
|
14
|
+
import "./chunk-K76BTS25.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-GUWCSUIJ.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
AspClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XIRIE7RG.js";
|
|
7
7
|
import {
|
|
8
8
|
ASTER_BASE_URL,
|
|
9
9
|
ASTER_PROVIDER,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isRecord,
|
|
14
14
|
readOllamaAuthEnv,
|
|
15
15
|
readOpenAICompatibleAuthEnv
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GUWCSUIJ.js";
|
|
17
17
|
|
|
18
18
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
19
19
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -6029,6 +6029,7 @@ function messageForItem(item) {
|
|
|
6029
6029
|
command: item.command,
|
|
6030
6030
|
...skillNames.length > 0 ? { skillNames } : {},
|
|
6031
6031
|
output: item.output,
|
|
6032
|
+
...item.replicasOmitted ? { outputOmitted: item.replicasOmitted } : {},
|
|
6032
6033
|
exitCode: item.exitCode ?? void 0,
|
|
6033
6034
|
status: normalizeCodexAspTranscriptStatus(item.status),
|
|
6034
6035
|
timestamp: item.timestamp
|
|
@@ -6052,6 +6053,7 @@ function messageForItem(item) {
|
|
|
6052
6053
|
tool: item.tool,
|
|
6053
6054
|
input: inputForDisplay(item.input),
|
|
6054
6055
|
output: item.output,
|
|
6056
|
+
...item.replicasOmitted ? { outputOmitted: item.replicasOmitted } : {},
|
|
6055
6057
|
status: normalizeCodexAspTranscriptStatus(item.status),
|
|
6056
6058
|
timestamp: item.timestamp
|
|
6057
6059
|
});
|
|
@@ -6068,6 +6070,7 @@ function messageForItem(item) {
|
|
|
6068
6070
|
...item.model ? { model: item.model } : {},
|
|
6069
6071
|
status: normalizeCodexAspTranscriptStatus(item.status),
|
|
6070
6072
|
...item.output ? { output: item.output } : {},
|
|
6073
|
+
...item.replicasOmitted ? { outputOmitted: item.replicasOmitted } : {},
|
|
6071
6074
|
nestedEvents: [],
|
|
6072
6075
|
timestamp: item.timestamp
|
|
6073
6076
|
};
|
|
@@ -7230,6 +7233,7 @@ function extractToolResult(event) {
|
|
|
7230
7233
|
toolResult,
|
|
7231
7234
|
toolUseId: toolResult.tool_use_id,
|
|
7232
7235
|
output,
|
|
7236
|
+
outputOmitted: toolResult.replicasOmitted,
|
|
7233
7237
|
exitCode: exitCode === void 0 ? void 0 : parseInt(exitCode, 10),
|
|
7234
7238
|
status: toolResult.is_error ? "failed" : "completed"
|
|
7235
7239
|
};
|
|
@@ -7256,6 +7260,21 @@ function isClaudeResultError(payload) {
|
|
|
7256
7260
|
return Boolean(payload.is_error) || payload.subtype !== "success";
|
|
7257
7261
|
}
|
|
7258
7262
|
var LOCAL_COMMAND_ECHO_REGEX = /^<(?:command-name|command-message|local-command-stdout|local-command-stderr)>/;
|
|
7263
|
+
function readClaudeUserPrompt(payload, content) {
|
|
7264
|
+
if (payload.isSynthetic || content.some((c) => c.type === "tool_result" && c.tool_use_id)) return void 0;
|
|
7265
|
+
const text3 = content.filter((c) => c.type === "text").map((c) => c.text || "").join("\n");
|
|
7266
|
+
if (LOCAL_COMMAND_ECHO_REGEX.test(text3.trim())) return void 0;
|
|
7267
|
+
const images = content.filter((c) => c.type === "image" && c.source).map((c) => {
|
|
7268
|
+
const source = c.source;
|
|
7269
|
+
return {
|
|
7270
|
+
type: "image",
|
|
7271
|
+
mediaType: source.media_type || "image/png",
|
|
7272
|
+
data: source.data || "",
|
|
7273
|
+
...c.replicasOmitted ? { replicasOmitted: c.replicasOmitted } : {}
|
|
7274
|
+
};
|
|
7275
|
+
}).filter((img) => img.data || img.replicasOmitted);
|
|
7276
|
+
return text3 || images.length > 0 ? { text: text3, images } : void 0;
|
|
7277
|
+
}
|
|
7259
7278
|
function parseClaudeEvents(events, parentToolUseId) {
|
|
7260
7279
|
const messages = [];
|
|
7261
7280
|
const filterValue = parentToolUseId !== void 0 ? parentToolUseId : null;
|
|
@@ -7371,22 +7390,9 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7371
7390
|
}
|
|
7372
7391
|
return;
|
|
7373
7392
|
}
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
const textContent = content.filter((c) => c.type === "text").map((c) => c.text || "").join("\n");
|
|
7378
|
-
if (LOCAL_COMMAND_ECHO_REGEX.test(textContent.trim())) {
|
|
7379
|
-
return;
|
|
7380
|
-
}
|
|
7381
|
-
const images = content.filter((c) => c.type === "image" && c.source).map((c) => {
|
|
7382
|
-
const source = c.source;
|
|
7383
|
-
return {
|
|
7384
|
-
type: "image",
|
|
7385
|
-
mediaType: source.media_type || "image/png",
|
|
7386
|
-
data: source.data || ""
|
|
7387
|
-
};
|
|
7388
|
-
}).filter((img) => img.data);
|
|
7389
|
-
if (textContent || images.length > 0) {
|
|
7393
|
+
const prompt = readClaudeUserPrompt(event.payload, content);
|
|
7394
|
+
if (prompt) {
|
|
7395
|
+
const { text: textContent, images } = prompt;
|
|
7390
7396
|
const stampedId = event.payload[USER_MESSAGE_ID_PAYLOAD_KEY];
|
|
7391
7397
|
const acceptedIndex = findMatchingUserMessageIndex(
|
|
7392
7398
|
acceptedUserMessageIndexes,
|
|
@@ -7667,7 +7673,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7667
7673
|
filteredEvents.forEach((event) => {
|
|
7668
7674
|
const result = readToolResult(event);
|
|
7669
7675
|
if (!result) return;
|
|
7670
|
-
const { toolResult, output: resultContent, status } = result;
|
|
7676
|
+
const { toolResult, output: resultContent, outputOmitted, status } = result;
|
|
7671
7677
|
const toolInfo = toolCallMap.get(result.toolUseId);
|
|
7672
7678
|
if (!toolInfo) return;
|
|
7673
7679
|
const isError = status === "failed";
|
|
@@ -7678,6 +7684,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7678
7684
|
if (!message2) return;
|
|
7679
7685
|
if (message2.type === "command") {
|
|
7680
7686
|
message2.output = resultContent;
|
|
7687
|
+
message2.outputOmitted = outputOmitted;
|
|
7681
7688
|
message2.status = status;
|
|
7682
7689
|
message2.exitCode = result.exitCode ?? (isError ? 1 : 0);
|
|
7683
7690
|
} else if (message2.type === "patch") {
|
|
@@ -7686,13 +7693,15 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
7686
7693
|
message2.status = status;
|
|
7687
7694
|
} else if (message2.type === "tool_call") {
|
|
7688
7695
|
message2.output = resultContent;
|
|
7696
|
+
message2.outputOmitted = outputOmitted;
|
|
7689
7697
|
message2.status = status;
|
|
7690
7698
|
} else if (message2.type === "skill" && isError && message2.path) {
|
|
7691
|
-
messages[toolInfo.messageIndex] = { id: message2.id, type: "tool_call", server: "claude", tool: toolInfo.toolName, input: toolInfo.input, output: resultContent, status, timestamp: message2.timestamp };
|
|
7699
|
+
messages[toolInfo.messageIndex] = { id: message2.id, type: "tool_call", server: "claude", tool: toolInfo.toolName, input: toolInfo.input, output: resultContent, outputOmitted, status, timestamp: message2.timestamp };
|
|
7692
7700
|
} else if (message2.type === "skill") {
|
|
7693
7701
|
message2.status = status;
|
|
7694
7702
|
} else if (message2.type === "subagent") {
|
|
7695
7703
|
message2.output = resultContent;
|
|
7704
|
+
message2.outputOmitted = outputOmitted;
|
|
7696
7705
|
message2.status = status;
|
|
7697
7706
|
}
|
|
7698
7707
|
});
|
|
@@ -8073,7 +8082,8 @@ async function readJsonlPage(args) {
|
|
|
8073
8082
|
turnStart = first;
|
|
8074
8083
|
}
|
|
8075
8084
|
}
|
|
8076
|
-
|
|
8085
|
+
if (included.size === args.turns.count) first = turnStart;
|
|
8086
|
+
if (turnStart === -1) first = candidates.length;
|
|
8077
8087
|
}
|
|
8078
8088
|
if (first === candidates.length) {
|
|
8079
8089
|
selectedBytes = 0;
|
|
@@ -8084,21 +8094,7 @@ async function readJsonlPage(args) {
|
|
|
8084
8094
|
}
|
|
8085
8095
|
const records = recordStarts.reverse().flat();
|
|
8086
8096
|
const floor = records[Math.max(0, records.length - args.limit)] ?? Infinity;
|
|
8087
|
-
|
|
8088
|
-
while (floorFirst > 0 && candidates[floorFirst - 1].startByte >= floor) floorFirst--;
|
|
8089
|
-
if (args.turns && floorFirst < first) {
|
|
8090
|
-
const { turnId } = args.turns;
|
|
8091
|
-
const startsTurn = (index) => turnId(candidates[index].item) !== void 0 || index === 0 && startByte === 0;
|
|
8092
|
-
let start = floorFirst;
|
|
8093
|
-
while (start > 0 && !startsTurn(start)) start--;
|
|
8094
|
-
const bytes = candidates.slice(start, first).reduce((sum, candidate) => sum + candidate.bytes, selectedBytes);
|
|
8095
|
-
if (!startsTurn(start) || bytes > maxBytes) {
|
|
8096
|
-
start = floorFirst;
|
|
8097
|
-
while (start < first && !startsTurn(start)) start++;
|
|
8098
|
-
}
|
|
8099
|
-
floorFirst = start;
|
|
8100
|
-
}
|
|
8101
|
-
first = floorFirst;
|
|
8097
|
+
while (first > 0 && candidates[first - 1].startByte >= floor) first--;
|
|
8102
8098
|
const selected = candidates.slice(first);
|
|
8103
8099
|
const firstCompleteLine = headTerminated ? head.length + 1 : 0;
|
|
8104
8100
|
let before = 0;
|
|
@@ -9890,6 +9886,14 @@ var workspaceChangedEventSchema = z23.discriminatedUnion("type", [
|
|
|
9890
9886
|
chatId: z23.string(),
|
|
9891
9887
|
ts: z23.string()
|
|
9892
9888
|
}),
|
|
9889
|
+
z23.object({
|
|
9890
|
+
type: z23.literal("workspace.chat.advanced"),
|
|
9891
|
+
workspaceId: z23.string(),
|
|
9892
|
+
chatId: z23.string(),
|
|
9893
|
+
afterCursor: z23.string().optional(),
|
|
9894
|
+
processing: z23.boolean(),
|
|
9895
|
+
ts: z23.string()
|
|
9896
|
+
}),
|
|
9893
9897
|
z23.object({ type: z23.literal("presence.changed"), ts: z23.string() }),
|
|
9894
9898
|
z23.object({
|
|
9895
9899
|
type: z23.literal("mobile-testing.changed"),
|
|
@@ -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-GUWCSUIJ.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
getOriginDefaultBranch,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
runGitCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YWUBMZVE.js";
|
|
9
9
|
import {
|
|
10
10
|
extractCommandProtectionCommandText,
|
|
11
11
|
findCommandProtectionGitLookups,
|
|
12
12
|
findGitCommitSignals,
|
|
13
13
|
findPrMergeSignals,
|
|
14
14
|
parseCommandProtectionRequest
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GUWCSUIJ.js";
|
|
16
16
|
|
|
17
17
|
// src/services/command-protection-service.ts
|
|
18
18
|
import { readFile, stat } from "fs/promises";
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YWUBMZVE.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XIRIE7RG.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-K76BTS25.js";
|
|
22
22
|
import {
|
|
23
23
|
isRecord
|
|
24
24
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
resolveOpenAICompatibleModelsUrl,
|
|
56
56
|
splitMothershipInstructions,
|
|
57
57
|
withTimeout
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-GUWCSUIJ.js";
|
|
59
59
|
|
|
60
60
|
// src/managers/codex-token-manager.ts
|
|
61
61
|
import { promises as fs } from "fs";
|
|
@@ -291,7 +291,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
291
291
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
292
292
|
await this.applyCredentialsResponse(data);
|
|
293
293
|
setAgentCredentialSnapshot("codex", data);
|
|
294
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
294
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-HYB3QPNZ.js");
|
|
295
295
|
await restartCodexAspHostIfRunning2();
|
|
296
296
|
});
|
|
297
297
|
await this.start(true);
|
|
@@ -313,7 +313,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
313
313
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
314
314
|
await this.applyCredentialsResponse(data);
|
|
315
315
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
316
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
316
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-HYB3QPNZ.js");
|
|
317
317
|
await restartCodexAspHostIfRunning2();
|
|
318
318
|
}
|
|
319
319
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -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-K76BTS25.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GUWCSUIJ.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.1233";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
SUBPROCESS_MAX_BUFFER,
|
|
6
6
|
execFileAsync
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-K76BTS25.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord as isRecord2
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
isValidAgentProvider,
|
|
19
19
|
parsePosixEnvFile,
|
|
20
20
|
readReplicasRuntimeEnv
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-GUWCSUIJ.js";
|
|
22
22
|
|
|
23
23
|
// src/runtime-env-loader.ts
|
|
24
24
|
import { readFileSync } from "fs";
|
|
@@ -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-LJY3ZN3W.js";
|
|
7
|
+
import "./chunk-YWUBMZVE.js";
|
|
8
|
+
import "./chunk-K76BTS25.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-GUWCSUIJ.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
recoverCompletedTurn,
|
|
14
14
|
spawnMuseMsp,
|
|
15
15
|
startMuseSession
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DESHWPZO.js";
|
|
17
17
|
import {
|
|
18
18
|
AppServerProcess,
|
|
19
19
|
buildCodexAgentEnv
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-XIRIE7RG.js";
|
|
21
|
+
import "./chunk-K76BTS25.js";
|
|
22
22
|
import {
|
|
23
23
|
AGENT,
|
|
24
24
|
OPENCODE_GO_PROVIDER,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
headlessAgentUsagePath,
|
|
29
29
|
isRecord,
|
|
30
30
|
withTimeout
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-GUWCSUIJ.js";
|
|
32
32
|
import "./chunk-VEQXQN22.js";
|
|
33
33
|
|
|
34
34
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
evaluateCommandProtection,
|
|
28
28
|
extractToolCommand,
|
|
29
29
|
reportCommandProtectionBlock
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LJY3ZN3W.js";
|
|
31
31
|
import {
|
|
32
32
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
33
33
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -64,10 +64,10 @@ import {
|
|
|
64
64
|
spawnMuseMsp,
|
|
65
65
|
startMuseSession,
|
|
66
66
|
uuidV7
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-DESHWPZO.js";
|
|
68
68
|
import {
|
|
69
69
|
publishedPullRequestUrls
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-PKKJTVV3.js";
|
|
71
71
|
import {
|
|
72
72
|
ACCOUNT_RATE_LIMITS_READ_METHOD,
|
|
73
73
|
AsyncLock,
|
|
@@ -140,7 +140,7 @@ import {
|
|
|
140
140
|
timestampFromSeconds,
|
|
141
141
|
upsertCredentialFileLines,
|
|
142
142
|
writeSecureCredentialFile
|
|
143
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-SGV7VALU.js";
|
|
144
144
|
import {
|
|
145
145
|
ENGINE_ENV,
|
|
146
146
|
monolithRequest,
|
|
@@ -149,15 +149,15 @@ import {
|
|
|
149
149
|
reloadEngineEnv,
|
|
150
150
|
resolveDiffBase,
|
|
151
151
|
setAgentCredentialSnapshot
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-YWUBMZVE.js";
|
|
153
153
|
import {
|
|
154
154
|
getCodexModelProvider
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-XIRIE7RG.js";
|
|
156
156
|
import {
|
|
157
157
|
SUBPROCESS_MAX_BUFFER,
|
|
158
158
|
execAsync,
|
|
159
159
|
execFileAsync
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-K76BTS25.js";
|
|
161
161
|
import {
|
|
162
162
|
isRecord as isRecord2
|
|
163
163
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -394,7 +394,7 @@ import {
|
|
|
394
394
|
workspaceTokenRequestSchema,
|
|
395
395
|
workspaceTokenResponseSchema,
|
|
396
396
|
wrapInTag
|
|
397
|
-
} from "./chunk-
|
|
397
|
+
} from "./chunk-GUWCSUIJ.js";
|
|
398
398
|
import {
|
|
399
399
|
cloneMcpConfig,
|
|
400
400
|
ensureCompatibilityImports,
|
|
@@ -10550,6 +10550,13 @@ function areDuplicateUserMessages(a, b) {
|
|
|
10550
10550
|
) : false;
|
|
10551
10551
|
}
|
|
10552
10552
|
var eventJsonCache = /* @__PURE__ */ new WeakMap();
|
|
10553
|
+
function claudeToolResultId(event) {
|
|
10554
|
+
if (event.type !== "claude-user") return null;
|
|
10555
|
+
const { message } = event.payload;
|
|
10556
|
+
const content = isRecord(message) ? message.content : void 0;
|
|
10557
|
+
const result = Array.isArray(content) ? content.find((block) => isRecord(block) && block.type === "tool_result") : void 0;
|
|
10558
|
+
return isRecord(result) && typeof result.tool_use_id === "string" ? `tool_result:${result.tool_use_id}` : null;
|
|
10559
|
+
}
|
|
10553
10560
|
function workspaceChatEventSignals(event) {
|
|
10554
10561
|
let json = eventJsonCache.get(event);
|
|
10555
10562
|
if (json === void 0) {
|
|
@@ -10557,7 +10564,7 @@ function workspaceChatEventSignals(event) {
|
|
|
10557
10564
|
eventJsonCache.set(event, json);
|
|
10558
10565
|
}
|
|
10559
10566
|
return {
|
|
10560
|
-
streamId: getEventStreamId(event),
|
|
10567
|
+
streamId: getEventStreamId(event) ?? claudeToolResultId(event),
|
|
10561
10568
|
json,
|
|
10562
10569
|
userMessage: getComparableUserMessage(event),
|
|
10563
10570
|
userMessageId: event.type === QUEUED_MESSAGE_REMOVED_EVENT_TYPE ? null : getUserMessageId(event)
|
|
@@ -12511,7 +12518,8 @@ var CodexHistoryFile = class {
|
|
|
12511
12518
|
return {
|
|
12512
12519
|
events: result.items,
|
|
12513
12520
|
beforeCursor: createChatHistoryCursor({ events: result.before, turns: null }),
|
|
12514
|
-
...cursor === void 0 ? { afterCursor: String(size) } : {}
|
|
12521
|
+
...cursor === void 0 ? { afterCursor: String(size) } : {},
|
|
12522
|
+
...page2.userTurns ? { userTurns: page2.userTurns } : {}
|
|
12515
12523
|
};
|
|
12516
12524
|
}) ?? { events: [], beforeCursor: null };
|
|
12517
12525
|
}
|
|
@@ -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-PKKJTVV3.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-GUWCSUIJ.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