replicas-engine 0.1.1416 → 0.1.1417
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-TFSRRQ4S.js → asp-host-DB5I5WUL.js} +2 -2
- package/dist/src/{chunk-347EQ6HQ.js → chunk-4YU72SVO.js} +1 -1
- package/dist/src/{chunk-UDSFMXPX.js → chunk-6XEXVZZ3.js} +1 -1
- package/dist/src/{chunk-EJVJNVP6.js → chunk-RROTSHQA.js} +3 -3
- package/dist/src/headless-agent.js +2 -2
- package/dist/src/index.js +17 -16
- package/package.json +1 -1
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
listCodexModelsForDetails,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RROTSHQA.js";
|
|
12
12
|
import "./chunk-GYZTIXZK.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-4YU72SVO.js";
|
|
14
14
|
import "./chunk-BQDT3CJD.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
16
|
import "./chunk-VIYU4HQB.js";
|
|
@@ -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.1417";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4YU72SVO.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
@@ -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-DB5I5WUL.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-DB5I5WUL.js");
|
|
345
345
|
await restartCodexAspHostIfRunning2();
|
|
346
346
|
}
|
|
347
347
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
recoverCompletedTurn,
|
|
15
15
|
spawnMuseMsp,
|
|
16
16
|
startMuseSession
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6XEXVZZ3.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4YU72SVO.js";
|
|
22
22
|
import "./chunk-BQDT3CJD.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT,
|
package/dist/src/index.js
CHANGED
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
spawnMuseMsp,
|
|
66
66
|
startMuseSession,
|
|
67
67
|
uuidV7
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-6XEXVZZ3.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
71
|
} from "./chunk-GSTNPMZP.js";
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
timestampFromSeconds,
|
|
144
144
|
upsertCredentialFileLines,
|
|
145
145
|
writeSecureCredentialFile
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-RROTSHQA.js";
|
|
147
147
|
import {
|
|
148
148
|
ENGINE_ENV,
|
|
149
149
|
monolithRequest,
|
|
@@ -156,7 +156,7 @@ import {
|
|
|
156
156
|
} from "./chunk-GYZTIXZK.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-4YU72SVO.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
@@ -16164,7 +16164,7 @@ import { Agent as CursorAgent2, AuthenticationError, CursorSdkError } from "@cur
|
|
|
16164
16164
|
|
|
16165
16165
|
// src/services/native-command-protection-hooks.ts
|
|
16166
16166
|
import { existsSync as existsSync7 } from "fs";
|
|
16167
|
-
import { mkdir as mkdir10, readFile as readFile8
|
|
16167
|
+
import { mkdir as mkdir10, readFile as readFile8 } from "fs/promises";
|
|
16168
16168
|
import { basename, dirname as dirname4, join as join13 } from "path";
|
|
16169
16169
|
import { fileURLToPath } from "url";
|
|
16170
16170
|
var moduleDirectory = dirname4(fileURLToPath(import.meta.url));
|
|
@@ -16198,7 +16198,8 @@ async function ensureCursorCommandProtectionHook() {
|
|
|
16198
16198
|
const path7 = join13(ENGINE_ENV.HOME_DIR, ".cursor", "hooks.json");
|
|
16199
16199
|
let config = {};
|
|
16200
16200
|
try {
|
|
16201
|
-
const
|
|
16201
|
+
const content = await readFile8(path7, "utf8");
|
|
16202
|
+
const parsed = content.trim() ? JSON.parse(content) : {};
|
|
16202
16203
|
if (!isRecord2(parsed)) throw new Error("Invalid Cursor hooks configuration.");
|
|
16203
16204
|
config = parsed;
|
|
16204
16205
|
} catch (error) {
|
|
@@ -16216,8 +16217,8 @@ async function ensureCursorCommandProtectionHook() {
|
|
|
16216
16217
|
{ command: shellCommand(postToolHookPath) }
|
|
16217
16218
|
];
|
|
16218
16219
|
await mkdir10(dirname4(path7), { recursive: true });
|
|
16219
|
-
await
|
|
16220
|
-
|
|
16220
|
+
await atomicWriteFile(path7, `${JSON.stringify({ ...config, version: 1, hooks }, null, 2)}
|
|
16221
|
+
`);
|
|
16221
16222
|
}
|
|
16222
16223
|
|
|
16223
16224
|
// src/managers/cursor-run-recovery.ts
|
|
@@ -44446,7 +44447,7 @@ function humanizeName(name) {
|
|
|
44446
44447
|
}
|
|
44447
44448
|
|
|
44448
44449
|
// ../node_modules/.bun/pi-mcp-adapter@2.32.1+04b0d7b0bc944965/node_modules/pi-mcp-adapter/mcp-trace.ts
|
|
44449
|
-
import { appendFile as appendFile3, mkdir as mkdir14, writeFile as
|
|
44450
|
+
import { appendFile as appendFile3, mkdir as mkdir14, writeFile as writeFile6 } from "fs/promises";
|
|
44450
44451
|
import { Buffer as Buffer3 } from "buffer";
|
|
44451
44452
|
import { dirname as dirname11, isAbsolute as isAbsolute2, resolve as resolve3 } from "path";
|
|
44452
44453
|
var MCP_TRACE_SCHEMA_VERSION = 1;
|
|
@@ -44515,7 +44516,7 @@ var McpTraceWriter = class {
|
|
|
44515
44516
|
await appendFile3(path7, data, appendOptions);
|
|
44516
44517
|
});
|
|
44517
44518
|
this.resetFile = options.writeFile ?? (async (path7, data, writeOptions) => {
|
|
44518
|
-
await
|
|
44519
|
+
await writeFile6(path7, data, writeOptions);
|
|
44519
44520
|
});
|
|
44520
44521
|
this.makeDirectory = options.mkdir ?? (async (path7) => {
|
|
44521
44522
|
await mkdir14(path7, { recursive: true });
|
|
@@ -48503,7 +48504,7 @@ function stringifyStructuredContent(value) {
|
|
|
48503
48504
|
|
|
48504
48505
|
// ../node_modules/.bun/pi-mcp-adapter@2.32.1+04b0d7b0bc944965/node_modules/pi-mcp-adapter/mcp-output-guard.ts
|
|
48505
48506
|
import { randomBytes as randomBytes3 } from "crypto";
|
|
48506
|
-
import { mkdtemp, rm as rm5, writeFile as
|
|
48507
|
+
import { mkdtemp, rm as rm5, writeFile as writeFile7 } from "fs/promises";
|
|
48507
48508
|
import { tmpdir as tmpdir2 } from "os";
|
|
48508
48509
|
import { dirname as dirname13, join as join20 } from "path";
|
|
48509
48510
|
var DEFAULT_MCP_OUTPUT_MAX_BYTES = 50 * 1024;
|
|
@@ -48815,7 +48816,7 @@ async function saveArtifact(kind, text) {
|
|
|
48815
48816
|
try {
|
|
48816
48817
|
const dir = await mkdtemp(join20(tmpdir2(), "pi-mcp-output-"));
|
|
48817
48818
|
const path7 = join20(dir, `${kind}-${randomBytes3(4).toString("hex")}.txt`);
|
|
48818
|
-
await
|
|
48819
|
+
await writeFile7(path7, text, { encoding: "utf8", mode: 384 });
|
|
48819
48820
|
return { path: path7 };
|
|
48820
48821
|
} catch (error) {
|
|
48821
48822
|
return { error: error instanceof Error ? error.message : String(error) };
|
|
@@ -60253,7 +60254,7 @@ async function uploadEngineLog(input, timeoutMs) {
|
|
|
60253
60254
|
|
|
60254
60255
|
// src/services/chat/fork-handoff.ts
|
|
60255
60256
|
import { createHash as createHash9 } from "crypto";
|
|
60256
|
-
import { mkdir as mkdir17, open as open3, readFile as readFile16, writeFile as
|
|
60257
|
+
import { mkdir as mkdir17, open as open3, readFile as readFile16, writeFile as writeFile8 } from "fs/promises";
|
|
60257
60258
|
import { homedir as homedir9 } from "os";
|
|
60258
60259
|
import { join as join28 } from "path";
|
|
60259
60260
|
var EXCERPT_MAX_CHARS = 24e3;
|
|
@@ -60344,7 +60345,7 @@ async function buildForkHandoff(input) {
|
|
|
60344
60345
|
const header = sourceTruncated ? `_This file was generated from only the most recent ${MAX_SANITIZED_SOURCE_BYTES / 1024 / 1024} MB of ${sources.length > 1 ? "each part of " : ""}the source chat.${fullHistory ? ` The complete raw event ${sources.length > 1 ? `logs are, oldest first: ${rawHistoryPaths.join(", ")}` : `log is at ${rawHistoryPaths[0]}`}; grep ${sources.length > 1 ? "them" : "it"} for anything earlier.` : ""}_
|
|
60345
60346
|
|
|
60346
60347
|
` : "";
|
|
60347
|
-
await
|
|
60348
|
+
await writeFile8(transcriptPath, `${header}${blocks.join("\n\n")}
|
|
60348
60349
|
`, "utf-8");
|
|
60349
60350
|
const { excerpt, truncated } = tailBlocks(blocks, EXCERPT_MAX_CHARS);
|
|
60350
60351
|
return {
|
|
@@ -62828,7 +62829,7 @@ import { existsSync as existsSync16 } from "fs";
|
|
|
62828
62829
|
import { join as join33 } from "path";
|
|
62829
62830
|
|
|
62830
62831
|
// src/services/warm-hook-logs-service.ts
|
|
62831
|
-
import { mkdir as mkdir19, readFile as readFile19, writeFile as
|
|
62832
|
+
import { mkdir as mkdir19, readFile as readFile19, writeFile as writeFile9, readdir as readdir9, appendFile as appendFile6, unlink as unlink2 } from "fs/promises";
|
|
62832
62833
|
import { homedir as homedir11 } from "os";
|
|
62833
62834
|
import { join as join32 } from "path";
|
|
62834
62835
|
var LOGS_DIR2 = join32(homedir11(), ".replicas", "warm-hook-logs");
|
|
@@ -62848,7 +62849,7 @@ var WarmHookLogsService = class {
|
|
|
62848
62849
|
hookName: "environment",
|
|
62849
62850
|
...entry
|
|
62850
62851
|
};
|
|
62851
|
-
await
|
|
62852
|
+
await writeFile9(join32(LOGS_DIR2, ENVIRONMENT_HOOK_LOG_FILENAME), `${JSON.stringify(log, null, 2)}
|
|
62852
62853
|
`, "utf-8");
|
|
62853
62854
|
}
|
|
62854
62855
|
async saveRepoHookLog(repoName, entry) {
|
|
@@ -62858,7 +62859,7 @@ var WarmHookLogsService = class {
|
|
|
62858
62859
|
hookName: repoName,
|
|
62859
62860
|
...entry
|
|
62860
62861
|
};
|
|
62861
|
-
await
|
|
62862
|
+
await writeFile9(join32(LOGS_DIR2, repoHookLogFilename(repoName)), `${JSON.stringify(log, null, 2)}
|
|
62862
62863
|
`, "utf-8");
|
|
62863
62864
|
}
|
|
62864
62865
|
async getAllLogs() {
|