replicas-engine 0.1.271 → 0.1.272

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.
Files changed (2) hide show
  1. package/dist/src/index.js +22 -3
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -286,7 +286,7 @@ var WORKSPACE_SIZES = ["small", "large"];
286
286
  var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZES.join(", ")}`;
287
287
 
288
288
  // ../shared/src/e2b.ts
289
- var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-06-06-v2";
289
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-06-06-v3";
290
290
 
291
291
  // ../shared/src/runtime-env.ts
292
292
  function parsePosixEnvFile(content) {
@@ -346,6 +346,12 @@ function parsePosixEnvFile(content) {
346
346
 
347
347
  // ../shared/src/git.ts
348
348
  var GIT_PARTIAL_CLONE_FILTER = "blob:none";
349
+ function gitIdentityConfigCommands(identity) {
350
+ return [
351
+ ["config", "--global", "user.name", identity.name],
352
+ ["config", "--global", "user.email", identity.email]
353
+ ];
354
+ }
349
355
 
350
356
  // ../shared/src/in-flight.ts
351
357
  var InFlightMap = class {
@@ -2796,10 +2802,13 @@ var GitHubTokenManager = class extends BaseRefreshManager {
2796
2802
  throw new Error(`Token refresh failed: ${response.status} ${errorText}`);
2797
2803
  }
2798
2804
  const data = await response.json();
2799
- await this.updateGitCredentials(data.token);
2800
2805
  const ghToken = data.userToken?.token ?? data.token;
2801
2806
  const ghUsername = data.userToken?.username ?? "x-access-token";
2807
+ await this.updateGitCredentials(ghToken);
2802
2808
  await this.updateGhHostsFile(ghToken, ghUsername);
2809
+ if (data.gitIdentity) {
2810
+ await this.updateGitIdentity(data.gitIdentity);
2811
+ }
2803
2812
  if (data.userToken) {
2804
2813
  console.log(`[GitHubTokenManager] Token refreshed with user token for PR attribution, installation token expires at ${data.expiresAt}, user token expires at ${data.userToken.expiresAt}`);
2805
2814
  } else {
@@ -2831,6 +2840,16 @@ var GitHubTokenManager = class extends BaseRefreshManager {
2831
2840
  console.error("[GitHubTokenManager] Failed to update gh hosts file:", error);
2832
2841
  }
2833
2842
  }
2843
+ async updateGitIdentity(identity) {
2844
+ try {
2845
+ const [nameArgs, emailArgs] = gitIdentityConfigCommands(identity);
2846
+ await execFileAsync("git", nameArgs);
2847
+ await execFileAsync("git", emailArgs);
2848
+ console.log(`[GitHubTokenManager] Updated git identity to ${identity.name} <${identity.email}>`);
2849
+ } catch (error) {
2850
+ console.error("[GitHubTokenManager] Failed to update git identity:", error);
2851
+ }
2852
+ }
2834
2853
  };
2835
2854
  var githubTokenManager = new GitHubTokenManager();
2836
2855
 
@@ -6727,7 +6746,7 @@ var AspClient = class {
6727
6746
  // src/managers/codex-asp/app-server-process.ts
6728
6747
  var DEFAULT_CODEX_BINARY = "codex";
6729
6748
  var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
6730
- var ENGINE_PACKAGE_VERSION = "0.1.271";
6749
+ var ENGINE_PACKAGE_VERSION = "0.1.272";
6731
6750
  var INITIALIZE_METHOD = "initialize";
6732
6751
  var INITIALIZED_NOTIFICATION = "initialized";
6733
6752
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.271",
3
+ "version": "0.1.272",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",