@alan-ai-hq/agent-manager 0.1.92 → 0.1.94

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 +18 -5
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -15451,7 +15451,7 @@ function describeError(error61) {
15451
15451
  }
15452
15452
 
15453
15453
  // src/version.ts
15454
- var AGENT_VERSION = "0.1.92";
15454
+ var AGENT_VERSION = "0.1.94";
15455
15455
 
15456
15456
  // src/daemon-worktree.ts
15457
15457
  var import_node_child_process3 = require("child_process");
@@ -38394,6 +38394,10 @@ var import_crypto7 = require("crypto");
38394
38394
  var import_fs11 = require("fs");
38395
38395
  var import_path11 = require("path");
38396
38396
  var ALAN_MCP_URL_ENV = "ALAN_MCP_URL";
38397
+ var ALAN_RUN_AUTHORIZATION_ENV = "ALAN_RUN_AUTHORIZATION";
38398
+ function managedRunAuthorizationHeader(registration) {
38399
+ return `Bearer ${requireManagedRunReference(registration)}`;
38400
+ }
38397
38401
  function deliversRunReferenceViaEnv(backendKind) {
38398
38402
  return backendKind === "cursor_agent_cli";
38399
38403
  }
@@ -38410,9 +38414,10 @@ function requireManagedRunReference(registration) {
38410
38414
  if (!reference) throw new Error("Alan MCP run reference is missing");
38411
38415
  return reference;
38412
38416
  }
38413
- function managedMcpServerName(registration) {
38417
+ function managedMcpServerName(registration, namespaceScope) {
38414
38418
  const reference = requireManagedRunReference(registration);
38415
- const fingerprint = (0, import_crypto.createHash)("sha256").update(reference).digest("hex").slice(0, 16);
38419
+ const fingerprintSource = namespaceScope?.trim() || reference;
38420
+ const fingerprint = (0, import_crypto.createHash)("sha256").update(fingerprintSource).digest("hex").slice(0, 16);
38416
38421
  return `alan-run-${fingerprint}`;
38417
38422
  }
38418
38423
  var MANAGED_MCP_SERVER_PATTERN = /^alan-run-[a-f0-9]{16}$/;
@@ -41682,7 +41687,10 @@ function buildClaudeManagedMcpArgs(registration, options = {}) {
41682
41687
  mcpServers.alan = {
41683
41688
  type: "http",
41684
41689
  url: registration.url,
41685
- headers: { "x-alan-run-reference": `\${${ALAN_RUN_REFERENCE_ENV}}` }
41690
+ headers: {
41691
+ "x-alan-run-reference": `\${${ALAN_RUN_REFERENCE_ENV}}`,
41692
+ Authorization: `Bearer \${${ALAN_RUN_REFERENCE_ENV}}`
41693
+ }
41686
41694
  };
41687
41695
  return [
41688
41696
  ...options.strict ? ["--strict-mcp-config"] : [],
@@ -42959,6 +42967,8 @@ function buildCodexManagedMcpArgs(registration, options = {}) {
42959
42967
  "-c",
42960
42968
  `mcp_servers.alan.env_http_headers.x-alan-run-reference=${JSON.stringify(ALAN_RUN_REFERENCE_ENV)}`,
42961
42969
  "-c",
42970
+ `mcp_servers.alan.env_http_headers.Authorization=${JSON.stringify(ALAN_RUN_AUTHORIZATION_ENV)}`,
42971
+ "-c",
42962
42972
  "mcp_servers.alan.required=true",
42963
42973
  "-c",
42964
42974
  `mcp_servers.alan.startup_timeout_sec=${ALAN_MCP_STARTUP_TIMEOUT_SEC}`
@@ -43002,7 +43012,8 @@ function createCodexRuntimeBackend(command = "codex", defaultArgs = []) {
43002
43012
  env: {
43003
43013
  ...context.env,
43004
43014
  ...externalMcp?.env,
43005
- [ALAN_RUN_REFERENCE_ENV]: requireManagedRunReference(managedRegistration)
43015
+ [ALAN_RUN_REFERENCE_ENV]: requireManagedRunReference(managedRegistration),
43016
+ [ALAN_RUN_AUTHORIZATION_ENV]: managedRunAuthorizationHeader(managedRegistration)
43006
43017
  }
43007
43018
  } : context;
43008
43019
  const { paths: imagePaths, cleanup } = writeImagesToTempFiles(
@@ -75493,6 +75504,8 @@ async function handleAgentExecute(ctx, payload) {
75493
75504
  teamId: payload.teamId,
75494
75505
  currentUser: payload.currentUser,
75495
75506
  workflowTools: payload.workflowTools,
75507
+ workflowId: payload.workflowId,
75508
+ workflowExecutionId: payload.workflowExecutionId,
75496
75509
  images: payload.images,
75497
75510
  files: payload.files,
75498
75511
  parsedAttachments: payload.parsedAttachments
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alan-ai-hq/agent-manager",
3
- "version": "0.1.92",
3
+ "version": "0.1.94",
4
4
  "type": "module",
5
5
  "description": "Alan agent runtime — cloud sandbox and local daemon (alan-agent CLI)",
6
6
  "bin": {