replicas-engine 0.1.1390 → 0.1.1392
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-BV4AR7UH.js → asp-host-T3GYNGIC.js} +5 -5
- package/dist/src/{chunk-SI72LBCM.js → chunk-CHJUBXIB.js} +48 -39
- package/dist/src/{chunk-HFILVXO4.js → chunk-CKRLVTRB.js} +4 -1
- package/dist/src/{chunk-WUCYX5HA.js → chunk-EMHLMOTE.js} +2 -2
- package/dist/src/{chunk-IHZWRTKL.js → chunk-INAQRTYM.js} +1 -1
- package/dist/src/{chunk-DFFIEKXX.js → chunk-JXEKJXH7.js} +2 -2
- package/dist/src/{chunk-JYZ5CVTI.js → chunk-OSK2BFVR.js} +2 -2
- package/dist/src/{chunk-KRLVAPBG.js → chunk-SMWDC2ZB.js} +3 -3
- package/dist/src/{chunk-CCDDPRSN.js → chunk-ZUCNXOOK.js} +1 -1
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +19 -20
- 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-CHJUBXIB.js";
|
|
12
|
+
import "./chunk-JXEKJXH7.js";
|
|
13
|
+
import "./chunk-SMWDC2ZB.js";
|
|
14
|
+
import "./chunk-INAQRTYM.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-CKRLVTRB.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JXEKJXH7.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SMWDC2ZB.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-INAQRTYM.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-CKRLVTRB.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-T3GYNGIC.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-T3GYNGIC.js");
|
|
345
345
|
await restartCodexAspHostIfRunning2();
|
|
346
346
|
}
|
|
347
347
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -456,7 +456,7 @@ var codexTokenManager = new CodexTokenManager();
|
|
|
456
456
|
import { existsSync as existsSync3, readFileSync } from "fs";
|
|
457
457
|
|
|
458
458
|
// src/git/service.ts
|
|
459
|
-
import { readdir, readFile as readFile3, stat } from "fs/promises";
|
|
459
|
+
import { readdir, readFile as readFile3, realpath, stat } from "fs/promises";
|
|
460
460
|
import { spawn } from "child_process";
|
|
461
461
|
import { isAbsolute, join as join4 } from "path";
|
|
462
462
|
|
|
@@ -780,9 +780,8 @@ var GitService = class {
|
|
|
780
780
|
}
|
|
781
781
|
async computeListRepos(includeDiffs) {
|
|
782
782
|
const discovered = await this.listTrackedRepositories();
|
|
783
|
-
const states = [];
|
|
784
783
|
let complete = discovered.complete;
|
|
785
|
-
|
|
784
|
+
const states = await Promise.all(discovered.repos.map(async (repo) => {
|
|
786
785
|
try {
|
|
787
786
|
const [persistedState, currentBranchRaw, gitDiff, codeHost] = await Promise.all([
|
|
788
787
|
loadRepoState(repo.name),
|
|
@@ -794,7 +793,7 @@ var GitService = class {
|
|
|
794
793
|
const fullDiff = includeDiffs && gitDiff ? await this.getFullGitDiff(repo.path, repo.defaultBranch) : void 0;
|
|
795
794
|
if (gitDiff === null) complete = false;
|
|
796
795
|
if (fullDiff === null) complete = false;
|
|
797
|
-
|
|
796
|
+
return {
|
|
798
797
|
name: repo.name,
|
|
799
798
|
path: repo.path,
|
|
800
799
|
defaultBranch: repo.defaultBranch,
|
|
@@ -803,30 +802,33 @@ var GitService = class {
|
|
|
803
802
|
gitDiff: includeDiffs && gitDiff ? { ...gitDiff, ...fullDiff === null ? {} : { fullDiff } } : gitDiff,
|
|
804
803
|
startHooksCompleted: persistedState?.startHooksCompleted ?? false,
|
|
805
804
|
...codeHost
|
|
806
|
-
}
|
|
805
|
+
};
|
|
807
806
|
} catch {
|
|
808
807
|
complete = false;
|
|
808
|
+
return null;
|
|
809
809
|
}
|
|
810
|
-
}
|
|
811
|
-
return { repos: [...states, ...discovered.deleted], complete };
|
|
810
|
+
}));
|
|
811
|
+
return { repos: [...states.filter((state) => state !== null), ...discovered.deleted], complete };
|
|
812
812
|
}
|
|
813
813
|
async refreshRepos(observedBranchesByRepo) {
|
|
814
814
|
const discovered = await this.listTrackedRepositories();
|
|
815
|
-
const states = [];
|
|
816
815
|
const prLookupsByGitDir = /* @__PURE__ */ new Map();
|
|
817
|
-
|
|
816
|
+
const states = await Promise.all(discovered.repos.map(async (repo) => {
|
|
818
817
|
try {
|
|
819
|
-
const gitDir
|
|
818
|
+
const [gitDir, persistedState, currentBranchRaw] = await Promise.all([
|
|
819
|
+
runGitCommand(["rev-parse", "--path-format=absolute", "--git-common-dir"], repo.path).catch(() => repo.path),
|
|
820
|
+
loadRepoState(repo.name),
|
|
821
|
+
getCurrentBranch(repo.path)
|
|
822
|
+
]);
|
|
820
823
|
const prLookups = prLookupsByGitDir.get(gitDir) ?? /* @__PURE__ */ new Map();
|
|
821
824
|
prLookupsByGitDir.set(gitDir, prLookups);
|
|
822
|
-
const
|
|
823
|
-
const currentBranch = await getCurrentBranch(repo.path) ?? repo.defaultBranch;
|
|
825
|
+
const currentBranch = currentBranchRaw ?? repo.defaultBranch;
|
|
824
826
|
const startHooksCompleted = persistedState?.startHooksCompleted ?? false;
|
|
825
827
|
const observed = /* @__PURE__ */ new Set([
|
|
826
828
|
...readRepoHeadBranches(repo.path),
|
|
827
829
|
...observedBranchesByRepo?.get(repo.name) ?? []
|
|
828
830
|
]);
|
|
829
|
-
|
|
831
|
+
return await this.refreshRepoMetadata(
|
|
830
832
|
repo,
|
|
831
833
|
currentBranch,
|
|
832
834
|
startHooksCompleted,
|
|
@@ -834,12 +836,11 @@ var GitService = class {
|
|
|
834
836
|
observed,
|
|
835
837
|
prLookups
|
|
836
838
|
);
|
|
837
|
-
states.push(state);
|
|
838
839
|
} catch {
|
|
839
|
-
|
|
840
|
+
return null;
|
|
840
841
|
}
|
|
841
|
-
}
|
|
842
|
-
return [...states, ...discovered.deleted];
|
|
842
|
+
}));
|
|
843
|
+
return [...states.filter((state) => state !== null), ...discovered.deleted];
|
|
843
844
|
}
|
|
844
845
|
async snapshotCurrentBranches() {
|
|
845
846
|
const { repos } = await this.listTrackedRepositories();
|
|
@@ -1004,8 +1005,9 @@ Binary files /dev/null and ${quote(`b/${path2}`)} differ
|
|
|
1004
1005
|
return 0;
|
|
1005
1006
|
}
|
|
1006
1007
|
}
|
|
1007
|
-
getFullGitDiff(repoPath, defaultBranch) {
|
|
1008
|
-
|
|
1008
|
+
async getFullGitDiff(repoPath, defaultBranch) {
|
|
1009
|
+
const key = await realpath(repoPath).catch(() => repoPath);
|
|
1010
|
+
return this.fullDiffInFlight.run(key, async () => {
|
|
1009
1011
|
try {
|
|
1010
1012
|
const diffBase = await resolveDiffBase(repoPath, defaultBranch);
|
|
1011
1013
|
const { stdout: trackedDiff } = await execFileAsync("git", [...BIG_FILE_THRESHOLD_CONFIG, "diff", diffBase, "-M", "-C"], {
|
|
@@ -1212,27 +1214,34 @@ Binary files /dev/null and ${quote(`b/${path2}`)} differ
|
|
|
1212
1214
|
}
|
|
1213
1215
|
async refreshRepoMetadata(repo, currentBranch, startHooksCompleted, persistedState, observedBranches, prLookups) {
|
|
1214
1216
|
const notFound = { status: "not_found" };
|
|
1215
|
-
const
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1217
|
+
const [prUrls, gitDiff, codeHost] = await Promise.all([
|
|
1218
|
+
(async () => {
|
|
1219
|
+
const prResult = currentBranch === repo.defaultBranch ? notFound : await this.getPullRequestUrl(repo.name, repo.path, prLookups, currentBranch, persistedState);
|
|
1220
|
+
let urls = persistedState?.prUrls ?? [];
|
|
1221
|
+
if (prResult.status === "found") {
|
|
1222
|
+
urls = appendUniqueUrl(urls, prResult.url);
|
|
1223
|
+
}
|
|
1224
|
+
for (const branch of observedBranches) {
|
|
1225
|
+
if (branch === currentBranch || branch === repo.defaultBranch) continue;
|
|
1226
|
+
const branchResult = await this.lookupPrOnce(prLookups, repo.name, repo.path, branch);
|
|
1227
|
+
if (branchResult.status === "found") {
|
|
1228
|
+
urls = appendUniqueUrl(urls, branchResult.url);
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
return urls;
|
|
1232
|
+
})(),
|
|
1233
|
+
this.getGitDiffStats(repo.path, repo.defaultBranch),
|
|
1234
|
+
this.resolveCodeHost(repo.path)
|
|
1235
|
+
]);
|
|
1227
1236
|
const state = {
|
|
1228
1237
|
name: repo.name,
|
|
1229
1238
|
path: repo.path,
|
|
1230
1239
|
defaultBranch: repo.defaultBranch,
|
|
1231
1240
|
currentBranch,
|
|
1232
1241
|
prUrls,
|
|
1233
|
-
gitDiff
|
|
1242
|
+
gitDiff,
|
|
1234
1243
|
startHooksCompleted,
|
|
1235
|
-
...
|
|
1244
|
+
...codeHost
|
|
1236
1245
|
};
|
|
1237
1246
|
return saveRepoState(repo.name, state, state);
|
|
1238
1247
|
}
|
|
@@ -9627,7 +9627,10 @@ var EXT_TO_LANGUAGE = {
|
|
|
9627
9627
|
".pl": "perl",
|
|
9628
9628
|
".perl": "perl",
|
|
9629
9629
|
".elm": "elm",
|
|
9630
|
-
".lisp": "lisp"
|
|
9630
|
+
".lisp": "lisp",
|
|
9631
|
+
".tex": "latex",
|
|
9632
|
+
".sty": "latex",
|
|
9633
|
+
".bib": "bibtex"
|
|
9631
9634
|
};
|
|
9632
9635
|
function detectLanguageByPath(filePath) {
|
|
9633
9636
|
const dot = filePath.lastIndexOf(".");
|
|
@@ -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-SMWDC2ZB.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-CKRLVTRB.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-CKRLVTRB.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -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-INAQRTYM.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-CKRLVTRB.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOriginDefaultBranch,
|
|
7
7
|
monolithRequest,
|
|
8
8
|
runGitCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JXEKJXH7.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-CKRLVTRB.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -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-INAQRTYM.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CKRLVTRB.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.1391";
|
|
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-OSK2BFVR.js";
|
|
7
|
+
import "./chunk-JXEKJXH7.js";
|
|
8
|
+
import "./chunk-INAQRTYM.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-CKRLVTRB.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-EMHLMOTE.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-SMWDC2ZB.js";
|
|
22
|
+
import "./chunk-INAQRTYM.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-CKRLVTRB.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-OSK2BFVR.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-EMHLMOTE.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-ZUCNXOOK.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-CHJUBXIB.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-JXEKJXH7.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-SMWDC2ZB.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
163
163
|
execFileAsync
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-INAQRTYM.js";
|
|
165
165
|
import {
|
|
166
166
|
isRecord as isRecord2
|
|
167
167
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -426,7 +426,7 @@ import {
|
|
|
426
426
|
workspaceTokenRequestSchema,
|
|
427
427
|
workspaceTokenResponseSchema,
|
|
428
428
|
wrapInTag
|
|
429
|
-
} from "./chunk-
|
|
429
|
+
} from "./chunk-CKRLVTRB.js";
|
|
430
430
|
import {
|
|
431
431
|
cloneMcpConfig,
|
|
432
432
|
ensureCompatibilityImports,
|
|
@@ -64960,15 +64960,16 @@ async function activate(requested) {
|
|
|
64960
64960
|
const devicesConnected = connectDevices(signal).catch((error) => {
|
|
64961
64961
|
if (!signal.aborted) console.error("Connecting devices failed:", error);
|
|
64962
64962
|
});
|
|
64963
|
-
if (!replicasConfigService.areHooksRunning()) {
|
|
64964
|
-
await timeStartupStep("replicas_config_initialize", () => replicasConfigService.initialize(devicesConnected));
|
|
64965
|
-
}
|
|
64966
|
-
await timeStartupStep(
|
|
64967
|
-
"git_credential_helper_initialize",
|
|
64968
|
-
() => configureManagedGitCredentialHelper(ENGINE_ENV.HOME_DIR)
|
|
64969
|
-
);
|
|
64970
|
-
await timeStartupStep("git_push_tracker_start", startGitPushTracker);
|
|
64971
64963
|
await Promise.all([
|
|
64964
|
+
// Start hooks may ssh to a device.
|
|
64965
|
+
!replicasConfigService.areHooksRunning() && timeStartupStep("replicas_config_initialize", () => replicasConfigService.initialize(devicesConnected)),
|
|
64966
|
+
timeStartupStep(
|
|
64967
|
+
"git_credential_helper_initialize",
|
|
64968
|
+
() => configureManagedGitCredentialHelper(ENGINE_ENV.HOME_DIR)
|
|
64969
|
+
),
|
|
64970
|
+
timeStartupStep("git_push_tracker_start", startGitPushTracker),
|
|
64971
|
+
// Block readiness on the first GitHub token refresh so hosts.yml exists
|
|
64972
|
+
// before any inbound request can hit a diagnostic that checks for it.
|
|
64972
64973
|
timeStartupStep("github_token_initialize", () => githubTokenManager.start()),
|
|
64973
64974
|
// A parked or paused engine started before the hooks that added tools to the login profile.
|
|
64974
64975
|
timeStartupStep("login_path_reload", async () => {
|
|
@@ -64995,10 +64996,8 @@ async function startBackgroundServices(signal) {
|
|
|
64995
64996
|
identityProxyStarted = true;
|
|
64996
64997
|
createIdentityProxy(workspaceIdentityTokens, mcpOAuthTokens).on("error", (error) => console.error("[identity-proxy] failed to listen:", error)).listen(IDENTITY_PROXY_PORT, "127.0.0.1");
|
|
64997
64998
|
}
|
|
64998
|
-
|
|
64999
|
-
|
|
65000
|
-
await manager.start();
|
|
65001
|
-
}
|
|
64999
|
+
if (signal.aborted) return;
|
|
65000
|
+
await Promise.all(tokenManagers.slice(1).map((manager) => manager.start()));
|
|
65002
65001
|
if (signal.aborted) return;
|
|
65003
65002
|
const repos = await gitService.listRepos();
|
|
65004
65003
|
for (const event of [
|
|
@@ -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-ZUCNXOOK.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-CKRLVTRB.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