replicas-engine 0.1.1315 → 0.1.1316
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-N7BKUV3E.js → asp-host-ODE5XLJ7.js} +5 -5
- package/dist/src/{chunk-WS3GVLJ2.js → chunk-2E6IP4OG.js} +10 -2
- package/dist/src/{chunk-W3WYNT2B.js → chunk-4G3GJD4G.js} +2 -2
- package/dist/src/{chunk-YPGEGHAO.js → chunk-4U6EPPZF.js} +1 -1
- package/dist/src/{chunk-6XZJIOBX.js → chunk-7OUVPGTE.js} +2 -2
- package/dist/src/{chunk-NLBGKIXF.js → chunk-O4UY6MG5.js} +6 -6
- package/dist/src/{chunk-5MSEDYGZ.js → chunk-QNFQZSM4.js} +1 -1
- package/dist/src/{chunk-KJL7WKAT.js → chunk-WWLQEDZK.js} +3 -3
- package/dist/src/{chunk-6ZNT2UKY.js → chunk-X57JBOEJ.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 +16 -14
- 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-O4UY6MG5.js";
|
|
12
|
+
import "./chunk-WWLQEDZK.js";
|
|
13
|
+
import "./chunk-X57JBOEJ.js";
|
|
14
|
+
import "./chunk-4U6EPPZF.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-2E6IP4OG.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -1139,6 +1139,7 @@ var CREDENTIAL_SCOPE_PRIORITY = [CREDENTIAL_SCOPE.USER, CREDENTIAL_SCOPE.ORG];
|
|
|
1139
1139
|
var CREDENTIAL_METHOD = {
|
|
1140
1140
|
OAUTH: "oauth",
|
|
1141
1141
|
API_KEY: "api_key",
|
|
1142
|
+
ANTHROPIC_COMPATIBLE: "anthropic-compatible",
|
|
1142
1143
|
OPENAI_COMPATIBLE: "openai-compatible",
|
|
1143
1144
|
OLLAMA: "ollama",
|
|
1144
1145
|
FOUNDRY: "foundry",
|
|
@@ -1151,6 +1152,7 @@ var CREDENTIAL_METHOD = {
|
|
|
1151
1152
|
var CREDENTIAL_TYPE = {
|
|
1152
1153
|
CLAUDE_OAUTH: "claude",
|
|
1153
1154
|
ANTHROPIC_API_KEY: "claude_anthropic_api_key",
|
|
1155
|
+
ANTHROPIC_COMPATIBLE: "anthropic_compatible",
|
|
1154
1156
|
CLAUDE_FOUNDRY: "claude_foundry",
|
|
1155
1157
|
CLAUDE_BEDROCK: "claude_bedrock",
|
|
1156
1158
|
CODEX_OAUTH: "codex",
|
|
@@ -1183,12 +1185,14 @@ var INFERENCE_PROVIDER_LABELS = {
|
|
|
1183
1185
|
[CREDENTIAL_METHOD.OPENCODE_GO]: "OpenCode Go",
|
|
1184
1186
|
[CREDENTIAL_METHOD.ASTER]: "Aster",
|
|
1185
1187
|
[CREDENTIAL_METHOD.OPENROUTER]: "OpenRouter",
|
|
1186
|
-
[CREDENTIAL_METHOD.OPENAI_COMPATIBLE]: "OpenAI-compatible endpoint"
|
|
1188
|
+
[CREDENTIAL_METHOD.OPENAI_COMPATIBLE]: "OpenAI-compatible endpoint",
|
|
1189
|
+
[CREDENTIAL_METHOD.ANTHROPIC_COMPATIBLE]: "Anthropic-compatible endpoint"
|
|
1187
1190
|
};
|
|
1188
1191
|
var AGENT_CREDENTIAL_METHODS_IN_ORDER = {
|
|
1189
1192
|
[AGENT.CLAUDE]: [
|
|
1190
1193
|
{ method: CREDENTIAL_METHOD.OAUTH, credentialType: CREDENTIAL_TYPE.CLAUDE_OAUTH },
|
|
1191
1194
|
{ method: CREDENTIAL_METHOD.API_KEY, credentialType: CREDENTIAL_TYPE.ANTHROPIC_API_KEY },
|
|
1195
|
+
{ method: CREDENTIAL_METHOD.ANTHROPIC_COMPATIBLE, credentialType: CREDENTIAL_TYPE.ANTHROPIC_COMPATIBLE },
|
|
1192
1196
|
{ method: CREDENTIAL_METHOD.FOUNDRY, credentialType: CREDENTIAL_TYPE.CLAUDE_FOUNDRY },
|
|
1193
1197
|
{ method: CREDENTIAL_METHOD.BEDROCK, credentialType: CREDENTIAL_TYPE.CLAUDE_BEDROCK },
|
|
1194
1198
|
{ method: CREDENTIAL_METHOD.OLLAMA, credentialType: CREDENTIAL_TYPE.OLLAMA }
|
|
@@ -1244,6 +1248,7 @@ function getCredentialMethodLabel(agent, method) {
|
|
|
1244
1248
|
case CREDENTIAL_METHOD.ASTER:
|
|
1245
1249
|
case CREDENTIAL_METHOD.OPENROUTER:
|
|
1246
1250
|
case CREDENTIAL_METHOD.OPENAI_COMPATIBLE:
|
|
1251
|
+
case CREDENTIAL_METHOD.ANTHROPIC_COMPATIBLE:
|
|
1247
1252
|
return INFERENCE_PROVIDER_LABELS[method];
|
|
1248
1253
|
case CREDENTIAL_METHOD.MUSE_OAUTH:
|
|
1249
1254
|
return "Muse account";
|
|
@@ -9443,6 +9448,7 @@ var CODEX_AUTH_ENV_KEYS_BY_METHOD = {
|
|
|
9443
9448
|
"REPLICAS_CODEX_AUTH_METHOD"
|
|
9444
9449
|
],
|
|
9445
9450
|
ollama: ["OPENAI_API_KEY", "CODEX_OPENAI_BASE_URL", "REPLICAS_CODEX_AUTH_METHOD", "REPLICAS_CODEX_OLLAMA_API_KEY", "REPLICAS_CODEX_OLLAMA_BASE_URL"],
|
|
9451
|
+
"anthropic-compatible": [],
|
|
9446
9452
|
bedrock: [],
|
|
9447
9453
|
foundry: ["AZURE_OPENAI_API_KEY", "CODEX_FOUNDRY_BASE_URL", "CODEX_FOUNDRY_MODEL", "REPLICAS_CODEX_AUTH_METHOD"]
|
|
9448
9454
|
};
|
|
@@ -9469,11 +9475,12 @@ var CLAUDE_AUTH_ENV_KEYS = [
|
|
|
9469
9475
|
function claudeAuthEnvFromResponse(response) {
|
|
9470
9476
|
switch (response.type) {
|
|
9471
9477
|
case "ollama":
|
|
9478
|
+
case "anthropic-compatible":
|
|
9472
9479
|
return {
|
|
9473
9480
|
ANTHROPIC_API_KEY: "",
|
|
9474
9481
|
ANTHROPIC_AUTH_TOKEN: response.apiKey,
|
|
9475
9482
|
ANTHROPIC_BASE_URL: response.baseUrl,
|
|
9476
|
-
REPLICAS_CLAUDE_AUTH_METHOD:
|
|
9483
|
+
REPLICAS_CLAUDE_AUTH_METHOD: response.type
|
|
9477
9484
|
};
|
|
9478
9485
|
case "oauth":
|
|
9479
9486
|
return response.refreshToken ? { REPLICAS_CLAUDE_AUTH_METHOD: "oauth" } : { CLAUDE_CODE_OAUTH_TOKEN: response.accessToken, REPLICAS_CLAUDE_AUTH_METHOD: "oauth" };
|
|
@@ -9506,6 +9513,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
|
|
|
9506
9513
|
api_key: ["ANTHROPIC_API_KEY", "REPLICAS_CLAUDE_AUTH_METHOD"],
|
|
9507
9514
|
"openai-compatible": [],
|
|
9508
9515
|
ollama: ["ANTHROPIC_API_KEY", "ANTHROPIC_AUTH_TOKEN", "ANTHROPIC_BASE_URL", "REPLICAS_CLAUDE_AUTH_METHOD"],
|
|
9516
|
+
"anthropic-compatible": ["ANTHROPIC_API_KEY", "ANTHROPIC_AUTH_TOKEN", "ANTHROPIC_BASE_URL", "REPLICAS_CLAUDE_AUTH_METHOD"],
|
|
9509
9517
|
bedrock: [
|
|
9510
9518
|
"CLAUDE_CODE_USE_BEDROCK",
|
|
9511
9519
|
"AWS_ACCESS_KEY_ID",
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOriginDefaultBranch,
|
|
7
7
|
monolithRequest,
|
|
8
8
|
runGitCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WWLQEDZK.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-2E6IP4OG.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -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-2E6IP4OG.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -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-X57JBOEJ.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-2E6IP4OG.js";
|
|
19
19
|
|
|
20
20
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
21
21
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WWLQEDZK.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-X57JBOEJ.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4U6EPPZF.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-2E6IP4OG.js";
|
|
60
60
|
|
|
61
61
|
// src/managers/codex-token-manager.ts
|
|
62
62
|
import { promises as fs } from "fs";
|
|
@@ -306,7 +306,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
306
306
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
307
307
|
await this.applyCredentialsResponse(data);
|
|
308
308
|
setAgentCredentialSnapshot("codex", data);
|
|
309
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
309
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-ODE5XLJ7.js");
|
|
310
310
|
await restartCodexAspHostIfRunning2();
|
|
311
311
|
});
|
|
312
312
|
await this.start(true);
|
|
@@ -328,7 +328,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
328
328
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
329
329
|
await this.applyCredentialsResponse(data);
|
|
330
330
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
331
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
331
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-ODE5XLJ7.js");
|
|
332
332
|
await restartCodexAspHostIfRunning2();
|
|
333
333
|
}
|
|
334
334
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -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-4U6EPPZF.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-2E6IP4OG.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -89,7 +89,7 @@ function requireValidURL(value, name) {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
function parseClaudeAuthMethod(value) {
|
|
92
|
-
if (value === "ollama" || value === "oauth" || value === "api_key" || value === "bedrock" || value === "foundry") {
|
|
92
|
+
if (value === "ollama" || value === "oauth" || value === "api_key" || value === "anthropic-compatible" || value === "bedrock" || value === "foundry") {
|
|
93
93
|
return value;
|
|
94
94
|
}
|
|
95
95
|
return void 0;
|
|
@@ -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-4U6EPPZF.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2E6IP4OG.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.1316";
|
|
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-4G3GJD4G.js";
|
|
7
|
+
import "./chunk-WWLQEDZK.js";
|
|
8
|
+
import "./chunk-4U6EPPZF.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-2E6IP4OG.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-7OUVPGTE.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-X57JBOEJ.js";
|
|
22
|
+
import "./chunk-4U6EPPZF.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-2E6IP4OG.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-4G3GJD4G.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-7OUVPGTE.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-QNFQZSM4.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-O4UY6MG5.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-WWLQEDZK.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-X57JBOEJ.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
163
163
|
execFileAsync
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-4U6EPPZF.js";
|
|
165
165
|
import {
|
|
166
166
|
isRecord as isRecord2
|
|
167
167
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -415,7 +415,7 @@ import {
|
|
|
415
415
|
workspaceTokenRequestSchema,
|
|
416
416
|
workspaceTokenResponseSchema,
|
|
417
417
|
wrapInTag
|
|
418
|
-
} from "./chunk-
|
|
418
|
+
} from "./chunk-2E6IP4OG.js";
|
|
419
419
|
import {
|
|
420
420
|
cloneMcpConfig,
|
|
421
421
|
ensureCompatibilityImports,
|
|
@@ -8836,7 +8836,7 @@ var ClaudeTokenManager = class extends BaseRefreshManager {
|
|
|
8836
8836
|
}
|
|
8837
8837
|
getSkipReason() {
|
|
8838
8838
|
const method = ENGINE_ENV.REPLICAS_CLAUDE_AUTH_METHOD;
|
|
8839
|
-
if ((method === "ollama" || method === "api_key" || method === "bedrock" || method === "foundry") && !this.fellBack) {
|
|
8839
|
+
if ((method === "ollama" || method === "api_key" || method === "anthropic-compatible" || method === "bedrock" || method === "foundry") && !this.fellBack) {
|
|
8840
8840
|
return `auth method is ${method}`;
|
|
8841
8841
|
}
|
|
8842
8842
|
return null;
|
|
@@ -8867,7 +8867,7 @@ var ClaudeTokenManager = class extends BaseRefreshManager {
|
|
|
8867
8867
|
}
|
|
8868
8868
|
async fetchFreshCredentials(failureReason, failureKind = "rejected", failedCredential = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.claude, allowedMethods, resetsAt) {
|
|
8869
8869
|
const configuredMethod = ENGINE_ENV.REPLICAS_CLAUDE_AUTH_METHOD;
|
|
8870
|
-
const failedMethod = failedCredential?.method === "ollama" || failedCredential?.method === "oauth" || failedCredential?.method === "api_key" || failedCredential?.method === "bedrock" || failedCredential?.method === "foundry" ? failedCredential.method : configuredMethod === "ollama" || configuredMethod === "oauth" || configuredMethod === "api_key" || configuredMethod === "bedrock" || configuredMethod === "foundry" ? configuredMethod : void 0;
|
|
8870
|
+
const failedMethod = failedCredential?.method === "ollama" || failedCredential?.method === "oauth" || failedCredential?.method === "api_key" || failedCredential?.method === "anthropic-compatible" || failedCredential?.method === "bedrock" || failedCredential?.method === "foundry" ? failedCredential.method : configuredMethod === "ollama" || configuredMethod === "oauth" || configuredMethod === "api_key" || configuredMethod === "anthropic-compatible" || configuredMethod === "bedrock" || configuredMethod === "foundry" ? configuredMethod : void 0;
|
|
8871
8871
|
this.fellBack = true;
|
|
8872
8872
|
return this.swapCredentials({
|
|
8873
8873
|
provider: "claude",
|
|
@@ -9509,7 +9509,9 @@ function detectCodexAuthMethod() {
|
|
|
9509
9509
|
// src/managers/agent-auth-detection.ts
|
|
9510
9510
|
var CLAUDE_CREDENTIALS_PATH = join2(homedir2(), ".claude", ".credentials.json");
|
|
9511
9511
|
function detectClaudeAuthMethod() {
|
|
9512
|
-
if (ENGINE_ENV.REPLICAS_CLAUDE_AUTH_METHOD === "ollama"
|
|
9512
|
+
if (ENGINE_ENV.REPLICAS_CLAUDE_AUTH_METHOD === "ollama" || ENGINE_ENV.REPLICAS_CLAUDE_AUTH_METHOD === "anthropic-compatible") {
|
|
9513
|
+
return ENGINE_ENV.REPLICAS_CLAUDE_AUTH_METHOD;
|
|
9514
|
+
}
|
|
9513
9515
|
if (existsSync(CLAUDE_CREDENTIALS_PATH) || process.env.CLAUDE_CODE_OAUTH_TOKEN) {
|
|
9514
9516
|
return "oauth";
|
|
9515
9517
|
}
|
|
@@ -10623,7 +10625,7 @@ import { join as join29 } from "path";
|
|
|
10623
10625
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
10624
10626
|
|
|
10625
10627
|
// ../shared/src/workspace-chat.ts
|
|
10626
|
-
var WORKSPACE_CHATS_QUERY_SCHEMA_VERSION =
|
|
10628
|
+
var WORKSPACE_CHATS_QUERY_SCHEMA_VERSION = 17;
|
|
10627
10629
|
var WORKSPACE_CHATS_QUERY_ROOT = `workspace-chats:v${WORKSPACE_CHATS_QUERY_SCHEMA_VERSION}`;
|
|
10628
10630
|
function isAcceptedUserMessage(event) {
|
|
10629
10631
|
return getUserMessage(event) !== null && event.payload.source === ACCEPTED_USER_MESSAGE_SOURCE;
|
|
@@ -11315,7 +11317,7 @@ function describeLoginFailure(provider, login, configuredMethod, revoked) {
|
|
|
11315
11317
|
const fixer = orgLogin ? "an organization admin" : login?.account?.ownerName ?? "you";
|
|
11316
11318
|
return `${agent} could not sign in with ${name}. The login expired or was revoked. Replicas recently switched to one-year Claude logins, so ${fixer} should update the Replicas CLI (\`npm install -g replicas-cli@latest\`) and reconnect with \`replicas claude-auth${orgLogin ? " --org" : ""}\`. Claude logins are listed in ${agentsPage}`;
|
|
11317
11319
|
}
|
|
11318
|
-
const why = revoked ? "It was signed out, revoked, or expired." : method === "api_key" ? "The key may be invalid, revoked, out of credits, or missing access to the selected model." : method === "bedrock" ? "Check its credentials, region, IAM permissions, and Claude model access." : method === "foundry" ? `Check its API key, resource, and ${agent} deployment names.` : "It was rejected even after a refresh.";
|
|
11320
|
+
const why = revoked ? "It was signed out, revoked, or expired." : method === "api_key" ? "The key may be invalid, revoked, out of credits, or missing access to the selected model." : method === "bedrock" ? "Check its credentials, region, IAM permissions, and Claude model access." : method === "foundry" ? `Check its API key, resource, and ${agent} deployment names.` : method === "anthropic-compatible" ? "Check its endpoint URL, API key, and that it serves the selected model." : "It was rejected even after a refresh.";
|
|
11319
11321
|
const reconnect = orgLogin ? `An organization admin can reconnect it in ${agentsPage}` : `Reconnect it in ${agentsPage}`;
|
|
11320
11322
|
return `${agent} could not sign in with ${name}. ${why} ${reconnect}`;
|
|
11321
11323
|
}
|
|
@@ -12202,7 +12204,7 @@ function buildClaudeAgentEnv(overrides) {
|
|
|
12202
12204
|
env.ANTHROPIC_API_KEY = void 0;
|
|
12203
12205
|
}
|
|
12204
12206
|
if (method && method !== "none" && method !== "oauth") env.CLAUDE_CODE_OAUTH_TOKEN = void 0;
|
|
12205
|
-
if (method === "ollama") env.ANTHROPIC_API_KEY = "";
|
|
12207
|
+
if (method === "ollama" || method === "anthropic-compatible") env.ANTHROPIC_API_KEY = "";
|
|
12206
12208
|
if (isBedrock) {
|
|
12207
12209
|
env.CLAUDE_CODE_USE_BEDROCK = "1";
|
|
12208
12210
|
env.CLAUDE_CODE_USE_MANTLE = "1";
|
|
@@ -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-QNFQZSM4.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-2E6IP4OG.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