replicas-engine 0.1.908 → 0.1.910

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.
@@ -5,11 +5,11 @@ import {
5
5
  getCodexAspHost,
6
6
  restartCodexAspHost,
7
7
  restartCodexAspHostIfRunning
8
- } from "./chunk-J4YMMWVX.js";
9
- import "./chunk-7R7AQ77Z.js";
10
- import "./chunk-XALZL5AE.js";
8
+ } from "./chunk-5CL42RWH.js";
9
+ import "./chunk-PRJY4Y7V.js";
10
+ import "./chunk-EE6PRRN4.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-T4HLIO43.js";
12
+ import "./chunk-PZHMAH33.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
  export {
15
15
  getCodexAspHost,
@@ -5,13 +5,13 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  setAgentCredentialSnapshot
8
- } from "./chunk-7R7AQ77Z.js";
8
+ } from "./chunk-PRJY4Y7V.js";
9
9
  import {
10
10
  AppServerProcess,
11
11
  SUBPROCESS_MAX_BUFFER,
12
12
  buildCodexAgentEnv,
13
13
  execFileAsync
14
- } from "./chunk-XALZL5AE.js";
14
+ } from "./chunk-EE6PRRN4.js";
15
15
  import {
16
16
  isRecord
17
17
  } from "./chunk-UZSNFLDQ.js";
@@ -25,7 +25,7 @@ import {
25
25
  listOpenAICompatibleModels,
26
26
  readOllamaAuthEnv,
27
27
  resolveOpenAICompatibleModelsUrl
28
- } from "./chunk-T4HLIO43.js";
28
+ } from "./chunk-PZHMAH33.js";
29
29
 
30
30
  // src/managers/codex-token-manager.ts
31
31
  import { promises as fs } from "fs";
@@ -254,8 +254,8 @@ var CodexTokenManager = class extends BaseRefreshManager {
254
254
  async switchCredentials(data) {
255
255
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
256
256
  await this.applyCredentialsResponse(data);
257
- if (data.scope) setAgentCredentialSnapshot("codex", { method: data.type, scope: data.scope, revision: data.revision });
258
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-NQESGIUW.js");
257
+ setAgentCredentialSnapshot("codex", data);
258
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-7J3NRDPV.js");
259
259
  await restartCodexAspHostIfRunning2();
260
260
  });
261
261
  await this.start(true);
@@ -275,16 +275,10 @@ var CodexTokenManager = class extends BaseRefreshManager {
275
275
  await this.applyCredentialUpdate(generation, async () => {
276
276
  await this.applyCredentialsResponse(data);
277
277
  if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
278
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-NQESGIUW.js");
278
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-7J3NRDPV.js");
279
279
  await restartCodexAspHostIfRunning2();
280
280
  }
281
- if (data.scope) {
282
- setAgentCredentialSnapshot("codex", {
283
- method: data.type,
284
- scope: data.scope,
285
- ...data.revision ? { revision: data.revision } : {}
286
- });
287
- }
281
+ setAgentCredentialSnapshot("codex", data);
288
282
  });
289
283
  console.log(`[CodexTokenManager] Credentials refreshed (method=${data.type})`);
290
284
  return data;
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  HOOK_EXEC_MAX_BUFFER_BYTES,
6
6
  isVersionBelow
7
- } from "./chunk-T4HLIO43.js";
7
+ } from "./chunk-PZHMAH33.js";
8
8
 
9
9
  // src/utils/codex-agent-env.ts
10
10
  function buildCodexAgentEnv(source = process.env) {
@@ -245,7 +245,7 @@ function getCodexModelProvider(method) {
245
245
  if (method === "foundry") return "azure";
246
246
  return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
247
247
  }
248
- var ENGINE_PACKAGE_VERSION = "0.1.908";
248
+ var ENGINE_PACKAGE_VERSION = "0.1.910";
249
249
  var INITIALIZE_METHOD = "initialize";
250
250
  var INITIALIZED_NOTIFICATION = "initialized";
251
251
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  monolithRequest
6
- } from "./chunk-7R7AQ77Z.js";
6
+ } from "./chunk-PRJY4Y7V.js";
7
7
  import {
8
8
  extractCommandProtectionCommandText,
9
9
  findGitCommitSignals,
10
10
  findPrMergeSignals
11
- } from "./chunk-T4HLIO43.js";
11
+ } from "./chunk-PZHMAH33.js";
12
12
 
13
13
  // src/services/command-protection-service.ts
14
14
  var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
@@ -15,7 +15,7 @@ import {
15
15
  isValidRelayBaseProvider,
16
16
  parsePosixEnvFile,
17
17
  readReplicasRuntimeEnv
18
- } from "./chunk-T4HLIO43.js";
18
+ } from "./chunk-PZHMAH33.js";
19
19
 
20
20
  // src/engine-env.ts
21
21
  import { readFileSync as readFileSync2 } from "fs";
@@ -141,7 +141,6 @@ function loadEngineEnv() {
141
141
  CODEX_OPENAI_AUTHORIZATION_HEADER: readEnv("CODEX_OPENAI_AUTHORIZATION_HEADER"),
142
142
  CURSOR_API_KEY: readEnv("CURSOR_API_KEY"),
143
143
  AI_GATEWAY_API_KEY: readEnv("AI_GATEWAY_API_KEY"),
144
- GEMINI_API_KEY: readEnv("GEMINI_API_KEY"),
145
144
  CLAUDE_CODE_USE_BEDROCK: readEnv("CLAUDE_CODE_USE_BEDROCK"),
146
145
  AWS_ACCESS_KEY_ID: readEnv("AWS_ACCESS_KEY_ID"),
147
146
  AWS_SECRET_ACCESS_KEY: readEnv("AWS_SECRET_ACCESS_KEY"),
@@ -162,10 +161,11 @@ function loadEngineEnv() {
162
161
  return env;
163
162
  }
164
163
  var ENGINE_ENV = loadEngineEnv();
165
- function setAgentCredentialSnapshot(provider, snapshot) {
164
+ function setAgentCredentialSnapshot(provider, { type, scope, revision, account }) {
165
+ if (!scope) return;
166
166
  ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS = {
167
167
  ...ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS,
168
- [provider]: snapshot
168
+ [provider]: { method: type, scope, ...revision ? { revision } : {}, ...account ? { account } : {} }
169
169
  };
170
170
  process.env.REPLICAS_AGENT_CREDENTIALS = JSON.stringify(ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS);
171
171
  }