replicas-engine 0.1.1396 → 0.1.1397
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-XIJLW32T.js → asp-host-V4Z2IWIC.js} +5 -5
- package/dist/src/{chunk-SO2UIHUL.js → chunk-7SNCJCAM.js} +2 -2
- package/dist/src/{chunk-X26DQM4O.js → chunk-F35HDB4V.js} +1 -1
- package/dist/src/{chunk-PLWH35VJ.js → chunk-FYNT73JM.js} +76 -27
- package/dist/src/{chunk-LOSMI7ZJ.js → chunk-MMXN6UVW.js} +2 -2
- package/dist/src/{chunk-GYXINP6G.js → chunk-NM7LRVLC.js} +1 -1
- package/dist/src/{chunk-SAKMDQVZ.js → chunk-PT2A7PFQ.js} +2 -2
- package/dist/src/{chunk-5E5VR45A.js → chunk-QWFVHYTA.js} +6 -6
- package/dist/src/{chunk-4Q4SOJUT.js → chunk-ZAWHU4YI.js} +3 -3
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +13 -8
- 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-QWFVHYTA.js";
|
|
12
|
+
import "./chunk-PT2A7PFQ.js";
|
|
13
|
+
import "./chunk-ZAWHU4YI.js";
|
|
14
|
+
import "./chunk-F35HDB4V.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-FYNT73JM.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-ZAWHU4YI.js";
|
|
7
7
|
import {
|
|
8
8
|
ASTER_BASE_URL,
|
|
9
9
|
ASTER_PROVIDER,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
isRecord,
|
|
16
16
|
readOllamaAuthEnv,
|
|
17
17
|
readOpenAICompatibleAuthEnv
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FYNT73JM.js";
|
|
19
19
|
|
|
20
20
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
21
21
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -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-FYNT73JM.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -11108,7 +11108,8 @@ function chatHistoryPageParamsFromQuery(rawQuery) {
|
|
|
11108
11108
|
beforeCursor: query.beforeCursor || void 0,
|
|
11109
11109
|
afterCursor: query.afterCursor || void 0,
|
|
11110
11110
|
userTurns: parse(query.userTurns) || void 0,
|
|
11111
|
-
compact: query.compact === "1" || void 0
|
|
11111
|
+
compact: query.compact === "1" || void 0,
|
|
11112
|
+
subagents: query.subagents === "1" || void 0
|
|
11112
11113
|
};
|
|
11113
11114
|
}
|
|
11114
11115
|
function getChatHistoryPageWindow(totalItems, limit, before) {
|
|
@@ -14800,6 +14801,7 @@ function normalizeBackgroundTaskStatus(status) {
|
|
|
14800
14801
|
var USER_MESSAGE_MATCH_GRACE_PERIOD_MS = 3e4;
|
|
14801
14802
|
var COMPACTION_CONTENT = "Context compacted";
|
|
14802
14803
|
var GOAL_TOOL_NAME = "goal";
|
|
14804
|
+
var CLAUDE_SUBAGENT_TOOL_NAMES = /* @__PURE__ */ new Set(["Task", "Agent"]);
|
|
14803
14805
|
|
|
14804
14806
|
// ../shared/src/user-message-parser/chat-fork.ts
|
|
14805
14807
|
var OPEN_MARKER = "<!-- replicas:chat-fork ";
|
|
@@ -17797,7 +17799,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
17797
17799
|
toolName,
|
|
17798
17800
|
input: toolInput
|
|
17799
17801
|
});
|
|
17800
|
-
if (toolName
|
|
17802
|
+
if (CLAUDE_SUBAGENT_TOOL_NAMES.has(toolName)) {
|
|
17801
17803
|
const inputObj = typeof toolInput === "string" ? safeJsonParse(toolInput, {}) : toolInput;
|
|
17802
17804
|
const nestedEvents = collectNestedEvents(toolUseId);
|
|
17803
17805
|
messages.push(createSubagentMessage(event.timestamp, {
|
|
@@ -18032,6 +18034,7 @@ function parseClaudeEvents(events, parentToolUseId) {
|
|
|
18032
18034
|
if (toolMessage?.type === "subagent") {
|
|
18033
18035
|
message2.prompt ??= toolMessage.prompt;
|
|
18034
18036
|
message2.subagentType ??= toolMessage.subagentType;
|
|
18037
|
+
toolMessage.status = message2.status === "stopped" ? "failed" : message2.status;
|
|
18035
18038
|
}
|
|
18036
18039
|
}
|
|
18037
18040
|
}
|
|
@@ -18364,6 +18367,16 @@ async function readExactRange(readRange, startByte, endByte, error) {
|
|
|
18364
18367
|
if (bytes.length !== endByte - startByte) throw new Error(error);
|
|
18365
18368
|
return bytes;
|
|
18366
18369
|
}
|
|
18370
|
+
function forEachJsonlRecord(bytes, lineStart, offset, visit) {
|
|
18371
|
+
for (let lineEnd = bytes.indexOf(10, lineStart); lineEnd !== -1; lineEnd = bytes.indexOf(10, lineStart)) {
|
|
18372
|
+
try {
|
|
18373
|
+
visit(JSON.parse(decoder.decode(bytes.subarray(lineStart, lineEnd))), { offset: offset + lineStart, length: lineEnd - lineStart });
|
|
18374
|
+
} catch {
|
|
18375
|
+
}
|
|
18376
|
+
lineStart = lineEnd + 1;
|
|
18377
|
+
}
|
|
18378
|
+
return lineStart;
|
|
18379
|
+
}
|
|
18367
18380
|
async function readJsonlPage(args) {
|
|
18368
18381
|
const maxBytes = args.maxBytes ?? Infinity;
|
|
18369
18382
|
const rangeBytes = Number.isFinite(maxBytes) ? Math.min(maxBytes, MAX_SOURCE_PAGE_BYTES) : SOURCE_RANGE_BYTES;
|
|
@@ -18405,23 +18418,16 @@ async function readJsonlPage(args) {
|
|
|
18405
18418
|
const firstLineEnd = bytes.indexOf(10);
|
|
18406
18419
|
const page = [];
|
|
18407
18420
|
const pageRecordStarts = [];
|
|
18408
|
-
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
const turnId = args.turns?.turnId(item);
|
|
18419
|
-
if (turnId !== void 0) turnIds.add(turnId);
|
|
18420
|
-
}
|
|
18421
|
-
} catch {
|
|
18422
|
-
}
|
|
18423
|
-
lineStart = lineEnd + 1;
|
|
18424
|
-
}
|
|
18421
|
+
forEachJsonlRecord(bytes, startByte > 0 ? firstLineEnd + 1 : 0, startByte, (value, record) => {
|
|
18422
|
+
pageRecordStarts.push(record.offset);
|
|
18423
|
+
const item = args.parse(value, record);
|
|
18424
|
+
if (item === void 0) return;
|
|
18425
|
+
const itemSize = item === value ? record.length : encoder.encode(JSON.stringify(item)).byteLength;
|
|
18426
|
+
page.push({ item, startByte: record.offset, bytes: itemSize });
|
|
18427
|
+
itemBytes += itemSize;
|
|
18428
|
+
const turnId = args.turns?.turnId(item);
|
|
18429
|
+
if (turnId !== void 0) turnIds.add(turnId);
|
|
18430
|
+
});
|
|
18425
18431
|
head = firstLineEnd === -1 ? bytes : bytes.subarray(0, startByte > 0 ? firstLineEnd : 0);
|
|
18426
18432
|
headTerminated = firstLineEnd !== -1;
|
|
18427
18433
|
pages.push(page);
|
|
@@ -18493,16 +18499,30 @@ async function readJsonlAppended(args) {
|
|
|
18493
18499
|
const bytes = await readExactRange(args.readRange, from, args.size, "Incomplete JSONL append read");
|
|
18494
18500
|
if (start > 0 && bytes[0] !== 10) return null;
|
|
18495
18501
|
const items = [];
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
|
|
18502
|
+
const end = forEachJsonlRecord(bytes, start - from, from, (value, record) => {
|
|
18503
|
+
const item = args.parse(value, record);
|
|
18504
|
+
if (item !== void 0) items.push(item);
|
|
18505
|
+
});
|
|
18506
|
+
return { items, after: String(from + end) };
|
|
18507
|
+
}
|
|
18508
|
+
var FORWARD_RANGE_BYTES = 8 * 1024 * 1024;
|
|
18509
|
+
async function readJsonlForward(args) {
|
|
18510
|
+
const items = [];
|
|
18511
|
+
let carry = new Uint8Array();
|
|
18512
|
+
let carryOffset = 0;
|
|
18513
|
+
for (let start = 0; start < args.size; start += FORWARD_RANGE_BYTES) {
|
|
18514
|
+
const chunk = await readExactRange(args.readRange, start, Math.min(args.size, start + FORWARD_RANGE_BYTES), "Incomplete JSONL read");
|
|
18515
|
+
const bytes = new Uint8Array(carry.length + chunk.length);
|
|
18516
|
+
bytes.set(carry);
|
|
18517
|
+
bytes.set(chunk, carry.length);
|
|
18518
|
+
const end = forEachJsonlRecord(bytes, 0, carryOffset, (value, record) => {
|
|
18519
|
+
const item = args.parse(value, record);
|
|
18500
18520
|
if (item !== void 0) items.push(item);
|
|
18501
|
-
}
|
|
18502
|
-
|
|
18503
|
-
|
|
18521
|
+
});
|
|
18522
|
+
carry = bytes.subarray(end);
|
|
18523
|
+
carryOffset += end;
|
|
18504
18524
|
}
|
|
18505
|
-
return
|
|
18525
|
+
return items;
|
|
18506
18526
|
}
|
|
18507
18527
|
var MAX_RECORD_BYTES = 64 * 1024 * 1024;
|
|
18508
18528
|
async function readJsonlRecord(args) {
|
|
@@ -18674,6 +18694,34 @@ function parseCodexHistoryEvents(content, options) {
|
|
|
18674
18694
|
for (const event of parseAgentEventJsonl(content, options)) folder.push(event);
|
|
18675
18695
|
return folder.finish();
|
|
18676
18696
|
}
|
|
18697
|
+
function createSubagentHistoryFilter() {
|
|
18698
|
+
const spawnIds = /* @__PURE__ */ new Set();
|
|
18699
|
+
return (event) => {
|
|
18700
|
+
const { type, payload } = event;
|
|
18701
|
+
if (typeof payload.parent_tool_use_id === "string" || getUserMessageId(event) !== null || getReplacedMessageId(event) !== null) return true;
|
|
18702
|
+
if (type === CODEX_ITEM_EVENT_TYPE) return codexItemFromEvent(event)?.item.type === "subagent";
|
|
18703
|
+
if (coerceBackgroundTaskPayload(payload)) return true;
|
|
18704
|
+
const blocks = normalizeContentBlocks(isRecord(payload.message) ? payload.message.content : void 0);
|
|
18705
|
+
if (type === "claude-assistant") {
|
|
18706
|
+
const spawns = blocks.filter((block) => block.type === "tool_use" && block.id && CLAUDE_SUBAGENT_TOOL_NAMES.has(block.name ?? ""));
|
|
18707
|
+
for (const block of spawns) if (block.id) spawnIds.add(block.id);
|
|
18708
|
+
return spawns.length > 0;
|
|
18709
|
+
}
|
|
18710
|
+
return type === "claude-user" && blocks.some((block) => block.type === "tool_result" && spawnIds.has(block.tool_use_id ?? ""));
|
|
18711
|
+
};
|
|
18712
|
+
}
|
|
18713
|
+
function readChatSubagentHistory({ size, compact, readRange }) {
|
|
18714
|
+
const keep = createSubagentHistoryFilter();
|
|
18715
|
+
return readJsonlForward({
|
|
18716
|
+
size,
|
|
18717
|
+
readRange,
|
|
18718
|
+
parse: (value, record) => {
|
|
18719
|
+
const event = toChatHistoryPageEvent(value);
|
|
18720
|
+
if (!event || !keep(event)) return void 0;
|
|
18721
|
+
return compact ? compactChatHistoryEvent(event, record) : event;
|
|
18722
|
+
}
|
|
18723
|
+
});
|
|
18724
|
+
}
|
|
18677
18725
|
|
|
18678
18726
|
// ../shared/src/memory-safety.ts
|
|
18679
18727
|
var SECRET_PATTERNS = [
|
|
@@ -20870,6 +20918,7 @@ export {
|
|
|
20870
20918
|
readChatHistoryRecord,
|
|
20871
20919
|
codexHistoryFormatEvent,
|
|
20872
20920
|
CodexHistoryEventFolder,
|
|
20921
|
+
readChatSubagentHistory,
|
|
20873
20922
|
canonicalizeChatTranscriptBlocks,
|
|
20874
20923
|
lastUserBlockText,
|
|
20875
20924
|
percentage,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOriginDefaultBranch,
|
|
7
7
|
monolithRequest,
|
|
8
8
|
runGitCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PT2A7PFQ.js";
|
|
10
10
|
import {
|
|
11
11
|
extractCommandProtectionCommandText,
|
|
12
12
|
findCommandProtectionGitLookups,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
findPrMergeSignals,
|
|
15
15
|
findScoutRepoWriteSignals,
|
|
16
16
|
parseCommandProtectionRequest
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FYNT73JM.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -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-F35HDB4V.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord as isRecord2
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
provisionedDeviceSchema,
|
|
22
22
|
readReplicasRuntimeEnv,
|
|
23
23
|
serializePosixEnvFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-FYNT73JM.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PT2A7PFQ.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZAWHU4YI.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-F35HDB4V.js";
|
|
22
22
|
import {
|
|
23
23
|
isRecord
|
|
24
24
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
resolveOpenAICompatibleModelsUrl,
|
|
57
57
|
splitMothershipInstructions,
|
|
58
58
|
withTimeout
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-FYNT73JM.js";
|
|
60
60
|
|
|
61
61
|
// src/managers/codex-token-manager.ts
|
|
62
62
|
import { promises as fs } from "fs";
|
|
@@ -319,7 +319,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
319
319
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
320
320
|
await this.applyCredentialsResponse(data);
|
|
321
321
|
setAgentCredentialSnapshot("codex", data);
|
|
322
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
322
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-V4Z2IWIC.js");
|
|
323
323
|
await restartCodexAspHostIfRunning2();
|
|
324
324
|
});
|
|
325
325
|
await this.start(true);
|
|
@@ -341,7 +341,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
341
341
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
342
342
|
await this.applyCredentialsResponse(data);
|
|
343
343
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
344
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
344
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-V4Z2IWIC.js");
|
|
345
345
|
await restartCodexAspHostIfRunning2();
|
|
346
346
|
}
|
|
347
347
|
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-F35HDB4V.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FYNT73JM.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.1397";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -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-MMXN6UVW.js";
|
|
7
|
+
import "./chunk-PT2A7PFQ.js";
|
|
8
|
+
import "./chunk-F35HDB4V.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-FYNT73JM.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
recoverCompletedTurn,
|
|
15
15
|
spawnMuseMsp,
|
|
16
16
|
startMuseSession
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7SNCJCAM.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-ZAWHU4YI.js";
|
|
22
|
+
import "./chunk-F35HDB4V.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT,
|
|
25
25
|
OPENCODE_GO_PROVIDER,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
headlessAgentUsagePath,
|
|
30
30
|
isRecord,
|
|
31
31
|
withTimeout
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-FYNT73JM.js";
|
|
33
33
|
import "./chunk-VEQXQN22.js";
|
|
34
34
|
|
|
35
35
|
// 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-MMXN6UVW.js";
|
|
31
31
|
import {
|
|
32
32
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
33
33
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
spawnMuseMsp,
|
|
66
66
|
startMuseSession,
|
|
67
67
|
uuidV7
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-7SNCJCAM.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-NM7LRVLC.js";
|
|
72
72
|
import {
|
|
73
73
|
ACCOUNT_RATE_LIMITS_READ_METHOD,
|
|
74
74
|
AsyncLock,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
timestampFromSeconds,
|
|
144
144
|
upsertCredentialFileLines,
|
|
145
145
|
writeSecureCredentialFile
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-QWFVHYTA.js";
|
|
147
147
|
import {
|
|
148
148
|
ENGINE_ENV,
|
|
149
149
|
monolithRequest,
|
|
@@ -153,15 +153,15 @@ import {
|
|
|
153
153
|
resolveDiffBase,
|
|
154
154
|
setAgentCredentialSnapshot,
|
|
155
155
|
setLinearSessionId
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-PT2A7PFQ.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-ZAWHU4YI.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
163
163
|
execFileAsync
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-F35HDB4V.js";
|
|
165
165
|
import {
|
|
166
166
|
isRecord as isRecord2
|
|
167
167
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -398,6 +398,7 @@ import {
|
|
|
398
398
|
readChatHistoryAppended,
|
|
399
399
|
readChatHistoryPage,
|
|
400
400
|
readChatHistoryRecord,
|
|
401
|
+
readChatSubagentHistory,
|
|
401
402
|
readOllamaAuthEnv,
|
|
402
403
|
readOpenAICompatibleAuthEnv,
|
|
403
404
|
readReplicasRuntimeEnv,
|
|
@@ -427,7 +428,7 @@ import {
|
|
|
427
428
|
workspaceTokenRequestSchema,
|
|
428
429
|
workspaceTokenResponseSchema,
|
|
429
430
|
wrapInTag
|
|
430
|
-
} from "./chunk-
|
|
431
|
+
} from "./chunk-FYNT73JM.js";
|
|
431
432
|
import {
|
|
432
433
|
cloneMcpConfig,
|
|
433
434
|
ensureCompatibilityImports,
|
|
@@ -12856,6 +12857,10 @@ var CodexHistoryFile = class {
|
|
|
12856
12857
|
return folder.finish();
|
|
12857
12858
|
}
|
|
12858
12859
|
async loadEventsPage(page2) {
|
|
12860
|
+
if (page2.subagents) {
|
|
12861
|
+
const events = await this.read((size, readRange) => readChatSubagentHistory({ size, compact: page2.compact, readRange }));
|
|
12862
|
+
return { events: events ?? [], beforeCursor: null };
|
|
12863
|
+
}
|
|
12859
12864
|
if (page2.limit === void 0) return { events: await this.loadAll() };
|
|
12860
12865
|
const cursor = parseChatHistoryCursor(page2.beforeCursor);
|
|
12861
12866
|
if (page2.beforeCursor !== void 0 && cursor?.mode !== "range") throw new RangeError("Invalid chat history cursor");
|
|
@@ -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-NM7LRVLC.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-FYNT73JM.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