@alan-ai-hq/agent-manager 0.1.106 → 0.1.107

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/index.cjs +14 -3
  2. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -15504,7 +15504,7 @@ function describeError(error61) {
15504
15504
  }
15505
15505
 
15506
15506
  // src/version.ts
15507
- var AGENT_VERSION = "0.1.106";
15507
+ var AGENT_VERSION = "0.1.107";
15508
15508
 
15509
15509
  // src/daemon-worktree.ts
15510
15510
  var import_node_child_process3 = require("child_process");
@@ -40802,6 +40802,7 @@ function planExternalMcpDelivery(config2, processEnv) {
40802
40802
  }
40803
40803
  return { servers, env, verbatim };
40804
40804
  }
40805
+ var ALAN_MCP_BEARER_TOKEN_ENV = "ALAN_MCP_BEARER_TOKEN";
40805
40806
  function requiredHeader(registration, name) {
40806
40807
  const entry = Object.entries(registration.headers).find(
40807
40808
  ([candidate]) => candidate.toLowerCase() === name
@@ -40817,6 +40818,9 @@ function requireManagedAuthorization(registration) {
40817
40818
  }
40818
40819
  return authorization;
40819
40820
  }
40821
+ function requireManagedBearerToken(registration) {
40822
+ return requireManagedAuthorization(registration).slice(7).trim();
40823
+ }
40820
40824
  function requireManagedRunId(registration) {
40821
40825
  return requiredHeader(registration, "x-alan-run-id");
40822
40826
  }
@@ -42574,7 +42578,7 @@ function buildCodexManagedMcpArgs(registration, options = {}) {
42574
42578
  "-c",
42575
42579
  `mcp_servers.alan.url=${JSON.stringify(registration.url)}`,
42576
42580
  "-c",
42577
- `mcp_servers.alan.env_http_headers.Authorization=${JSON.stringify(ALAN_MCP_AUTHORIZATION_ENV)}`,
42581
+ `mcp_servers.alan.bearer_token_env_var=${JSON.stringify(ALAN_MCP_BEARER_TOKEN_ENV)}`,
42578
42582
  "-c",
42579
42583
  `mcp_servers.alan.env_http_headers.x-alan-run-id=${JSON.stringify(ALAN_RUN_ID_ENV)}`,
42580
42584
  "-c",
@@ -42622,6 +42626,7 @@ function createCodexRuntimeBackend(command = "codex", defaultArgs = []) {
42622
42626
  ...context.env,
42623
42627
  ...externalMcp?.env,
42624
42628
  [ALAN_MCP_AUTHORIZATION_ENV]: requireManagedAuthorization(managedRegistration),
42629
+ [ALAN_MCP_BEARER_TOKEN_ENV]: requireManagedBearerToken(managedRegistration),
42625
42630
  [ALAN_RUN_ID_ENV]: requireManagedRunId(managedRegistration)
42626
42631
  }
42627
42632
  } : context;
@@ -42676,11 +42681,15 @@ function createCodexRuntimeBackend(command = "codex", defaultArgs = []) {
42676
42681
  ...permissionArgs,
42677
42682
  "exec",
42678
42683
  ...managedMcpArgs,
42684
+ // Codex scopes `-c` overrides on both `exec` and `exec resume`.
42685
+ // Keep every config override at the `exec` level: a later
42686
+ // resume-level `-c` replaces the earlier override set, which
42687
+ // silently drops Alan's managed MCP auth on continuation turns.
42688
+ ...effortArgs,
42679
42689
  "resume",
42680
42690
  "--json",
42681
42691
  "--skip-git-repo-check",
42682
42692
  ...modelArgs,
42683
- ...effortArgs,
42684
42693
  ...imageArgs,
42685
42694
  resumeId,
42686
42695
  "-"
@@ -55712,6 +55721,8 @@ var CoreAgent = class _CoreAgent extends BaseMachineAgent {
55712
55721
  else delete augmented.ALAN_RUN_ID;
55713
55722
  if (this.runtimeToken) augmented.ALAN_MCP_AUTHORIZATION = `Bearer ${this.runtimeToken}`;
55714
55723
  else delete augmented.ALAN_MCP_AUTHORIZATION;
55724
+ if (this.runtimeToken) augmented[ALAN_MCP_BEARER_TOKEN_ENV] = this.runtimeToken;
55725
+ else delete augmented[ALAN_MCP_BEARER_TOKEN_ENV];
55715
55726
  const backendKind = this.runtime.backendKind ?? "";
55716
55727
  const providerApiKey = this.providerApiKey ?? "";
55717
55728
  if (backendKind === "antigravity_cli" && providerApiKey.trim()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alan-ai-hq/agent-manager",
3
- "version": "0.1.106",
3
+ "version": "0.1.107",
4
4
  "type": "module",
5
5
  "description": "Alan agent runtime — cloud sandbox and local daemon (alan-agent CLI)",
6
6
  "bin": {
@@ -24,9 +24,9 @@
24
24
  "tsup": "^8.5.1",
25
25
  "tsx": "^4.19.0",
26
26
  "typescript": "~5.9.3",
27
+ "@alan-ai/sandbox-runtime-spec": "0.1.0",
27
28
  "@alan-ai/agent-core": "0.1.0",
28
- "@alan-ai/shared": "0.1.0",
29
- "@alan-ai/sandbox-runtime-spec": "0.1.0"
29
+ "@alan-ai/shared": "0.1.0"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsup",