agent-relay-server 0.64.0 → 0.64.1

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/docs/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Agent Relay API",
5
- "version": "0.64.0",
5
+ "version": "0.64.1",
6
6
  "description": "Real-time message bus for inter-agent communication. Agent-first: this spec is designed for machine consumption — agents can self-discover the full API surface via GET /api/spec.",
7
7
  "license": {
8
8
  "name": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-server",
3
- "version": "0.64.0",
3
+ "version": "0.64.1",
4
4
  "description": "Lightweight HTTP message relay for inter-agent communication across machines",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
@@ -89,6 +89,16 @@ export function runtimeTokenExpiresAtFromEnv(): string | undefined {
89
89
  return process.env.AGENT_RELAY_TOKEN_EXPIRES_AT;
90
90
  }
91
91
 
92
+ // Deadline for a freshly spawned runner's INITIAL relay registration. Reconnects after the
93
+ // first registration retry forever (a long-lived agent rides out a relay blip), but the
94
+ // initial handshake is bounded: a runner that can never register (a token the relay rejects,
95
+ // an unreachable relay) must EXIT instead of hanging `active` forever — a hung runner is
96
+ // invisible to the orchestrator's exit detection, so the spawn-parent is never notified.
97
+ export function registrationTimeoutMsFromEnv(): number {
98
+ const parsed = Number(process.env.AGENT_RELAY_REGISTRATION_TIMEOUT_MS);
99
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : 60_000;
100
+ }
101
+
92
102
  export function agentProfileNameFromEnv(): string | undefined {
93
103
  return process.env.AGENT_RELAY_AGENT_PROFILE;
94
104
  }
package/src/security.ts CHANGED
@@ -529,7 +529,7 @@ function isTokenConstraints(value: unknown): value is TokenConstraints {
529
529
  for (const [key, item] of Object.entries(record)) {
530
530
  if (["terminalAttach", "logsRead", "canDelegate"].includes(key)) {
531
531
  if (typeof item !== "boolean") return false;
532
- } else if (key === "cwd" || key === "spawnedBy" || key === "teamId") {
532
+ } else if (key === "cwd" || key === "spawnedBy" || key === "teamId" || key === "projectId") {
533
533
  if (typeof item !== "string") return false;
534
534
  } else if (key === "maxSpawnedAgents") {
535
535
  if (typeof item !== "number") return false;