agent-relay-orchestrator 0.50.0 → 0.52.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-orchestrator",
3
- "version": "0.50.0",
3
+ "version": "0.52.0",
4
4
  "description": "Agent Relay orchestrator — manages agent lifecycle across hosts",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,7 +16,7 @@
16
16
  "test": "bun test"
17
17
  },
18
18
  "dependencies": {
19
- "agent-relay-sdk": "0.2.31"
19
+ "agent-relay-sdk": "0.2.33"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/bun": "latest",
package/src/control.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { errMessage, isRecord, normalizeWorkspaceMode } from "agent-relay-sdk";
1
+ import { errMessage, isRecord, normalizeAgentLifecycle, normalizeWorkspaceMode } from "agent-relay-sdk";
2
2
  import type { OrchestratorConfig } from "./config";
3
3
  import type { ManagedAgentReport, RelayClient, RelayCommand } from "./relay";
4
4
  import { handleSelfUpgrade } from "./self-upgrade";
@@ -225,6 +225,7 @@ function spawnOptionsFromRecord(source: Record<string, any>, config: Orchestrato
225
225
  effort: typeof source.effort === "string" ? source.effort : undefined,
226
226
  profile: typeof source.profile === "string" ? source.profile : undefined,
227
227
  workspaceMode: normalizeWorkspaceMode(source.workspaceMode),
228
+ lifecycle: normalizeAgentLifecycle(source.lifecycle) ?? "persistent",
228
229
  workspaceSymlinks: stringArray(source.workspaceSymlinks),
229
230
  agentProfile: isRecord(source.agentProfile) ? source.agentProfile : undefined,
230
231
  label: typeof source.label === "string" ? source.label : undefined,
package/src/relay.ts CHANGED
@@ -2,7 +2,7 @@ import type { OrchestratorConfig } from "./config";
2
2
  import type { ProviderProbeCache } from "./provider-probe";
3
3
  import { detectSelfSupervision } from "./self-supervision";
4
4
  import { GIT_SHA, ORCHESTRATOR_PROTOCOL_VERSION, VERSION, runtimeMetadata } from "./version";
5
- import type { WorkspaceMetadata, WorkspaceMode, ManagedSessionExitDiagnostics as SdkManagedSessionExitDiagnostics } from "agent-relay-sdk";
5
+ import type { AgentLifecycle, WorkspaceMetadata, WorkspaceMode, ManagedSessionExitDiagnostics as SdkManagedSessionExitDiagnostics } from "agent-relay-sdk";
6
6
  import { ReconnectionManager, RelayHttpClient } from "agent-relay-sdk";
7
7
 
8
8
  export interface RelayClient {
@@ -30,6 +30,7 @@ export interface ManagedAgentReport {
30
30
  effort?: string;
31
31
  profile?: string;
32
32
  workspaceMode?: WorkspaceMode;
33
+ lifecycle?: AgentLifecycle;
33
34
  workspace?: WorkspaceMetadata;
34
35
  sessionName?: string;
35
36
  supervisor?: "process" | "systemd" | "launchd" | "unknown";
package/src/spawn.ts CHANGED
@@ -5,7 +5,7 @@ import { artifactProxyBaseUrl } from "./artifact-proxy";
5
5
  import type { OrchestratorConfig } from "./config";
6
6
  import type { ManagedAgentReport, ManagedSessionExitDiagnostics } from "./relay";
7
7
  import { resolveSpawnWorkspace, workspacesRoot } from "./workspace-probe";
8
- import type { WorkspaceMetadata, WorkspaceMode } from "agent-relay-sdk";
8
+ import type { AgentLifecycle, WorkspaceMetadata, WorkspaceMode } from "agent-relay-sdk";
9
9
  import { errMessage, extractClaudeModelUnavailableMessage } from "agent-relay-sdk";
10
10
  import { isPidAlive, parseProcStateIsZombie } from "agent-relay-sdk/process-utils";
11
11
  import { shellEscape } from "agent-relay-sdk/shell-utils";
@@ -18,8 +18,7 @@ export interface SpawnOptions {
18
18
  rig?: string;
19
19
  model?: string;
20
20
  effort?: string;
21
- profile?: string;
22
- workspaceMode?: WorkspaceMode;
21
+ profile?: string; workspaceMode?: WorkspaceMode; lifecycle?: AgentLifecycle;
23
22
  workspace?: WorkspaceMetadata;
24
23
  /** Untracked files/dirs to symlink from main into an isolated worktree (relay's global workspace config). */
25
24
  workspaceSymlinks?: string[];
@@ -96,8 +95,7 @@ export interface SessionRecord {
96
95
  provider: string;
97
96
  model?: string;
98
97
  effort?: string;
99
- profile?: string;
100
- workspaceMode?: WorkspaceMode;
98
+ profile?: string; workspaceMode?: WorkspaceMode; lifecycle?: AgentLifecycle;
101
99
  workspace?: WorkspaceMetadata;
102
100
  label?: string;
103
101
  cwd: string;
@@ -238,7 +236,7 @@ export function buildEnv(opts: SpawnOptions & { label: string; agentId: string }
238
236
  ...(opts.label ? { AGENT_RELAY_LABEL: opts.label } : {}),
239
237
  ...(opts.policyName ? { AGENT_RELAY_POLICY: opts.policyName } : {}),
240
238
  ...(opts.spawnRequestId ? { AGENT_RELAY_SPAWN_REQUEST_ID: opts.spawnRequestId } : {}),
241
- AGENT_RELAY_WORKSPACE_MODE: opts.workspaceMode ?? "inherit",
239
+ AGENT_RELAY_LIFECYCLE: opts.lifecycle ?? "persistent", AGENT_RELAY_WORKSPACE_MODE: opts.workspaceMode ?? "inherit",
242
240
  ...(opts.workspace ? { AGENT_RELAY_WORKSPACE_JSON: JSON.stringify(opts.workspace) } : {}),
243
241
  ...(opts.automationId ? { AGENT_RELAY_AUTOMATION_ID: opts.automationId } : {}),
244
242
  ...(opts.automationRunId ? { AGENT_RELAY_AUTOMATION_RUN_ID: opts.automationRunId } : {}),
@@ -388,7 +386,7 @@ export async function spawnAgent(
388
386
  model: spawnOpts.model,
389
387
  effort: spawnOpts.effort,
390
388
  profile: spawnOpts.profile,
391
- workspaceMode: spawnOpts.workspaceMode,
389
+ workspaceMode: spawnOpts.workspaceMode, lifecycle: spawnOpts.lifecycle ?? "persistent",
392
390
  workspace: spawnOpts.workspace,
393
391
  label,
394
392
  cwd: spawnOpts.cwd,
@@ -409,7 +407,7 @@ export async function spawnAgent(
409
407
  model: spawnOpts.model,
410
408
  effort: spawnOpts.effort,
411
409
  profile: spawnOpts.profile,
412
- workspaceMode: spawnOpts.workspaceMode,
410
+ workspaceMode: spawnOpts.workspaceMode, lifecycle: spawnOpts.lifecycle ?? "persistent",
413
411
  workspace: spawnOpts.workspace,
414
412
  ...sessionReportFields({ name, supervisor: runner.supervisor, runnerInfoFile, agentId, provider: spawnOpts.provider }),
415
413
  cwd: spawnOpts.cwd,