agent-relay-runner 0.49.0 → 0.51.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-runner",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "Unified provider lifecycle runner for Agent Relay",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"directory": "runner"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"agent-relay-sdk": "0.2.
|
|
23
|
+
"agent-relay-sdk": "0.2.32"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/bun": "latest",
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { AgentRunner } from "./runner";
|
|
|
8
8
|
import { loadGlobalConfig, loadProviderConfig, resolveCwd, runnerId } from "./config";
|
|
9
9
|
import { VERSION } from "./version";
|
|
10
10
|
import type { AgentProfile, WorkspaceMetadata } from "agent-relay-sdk";
|
|
11
|
-
import { errMessage, RELAY_TOKEN_HEADER } from "agent-relay-sdk";
|
|
11
|
+
import { errMessage, normalizeAgentLifecycle, RELAY_TOKEN_HEADER } from "agent-relay-sdk";
|
|
12
12
|
|
|
13
13
|
interface CliOptions {
|
|
14
14
|
provider: "claude" | "codex";
|
|
@@ -95,6 +95,7 @@ export async function main(argv = process.argv): Promise<void> {
|
|
|
95
95
|
spawnRequestId: process.env.AGENT_RELAY_SPAWN_REQUEST_ID,
|
|
96
96
|
automationId: process.env.AGENT_RELAY_AUTOMATION_ID,
|
|
97
97
|
automationRunId: process.env.AGENT_RELAY_AUTOMATION_RUN_ID,
|
|
98
|
+
lifecycle: normalizeAgentLifecycle(process.env.AGENT_RELAY_LIFECYCLE) ?? "persistent",
|
|
98
99
|
startedAt: Date.now(),
|
|
99
100
|
providerConfig,
|
|
100
101
|
adapter,
|
package/src/runner.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { hostname } from "node:os";
|
|
|
2
2
|
import { closeSync, mkdirSync, openSync, readSync, statSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
|
-
import type { AgentProfile, ContextState, Message, MessageSessionMeta, ProviderCapabilities, SendMessageInput, TaskStatusInput, WorkspaceMetadata } from "agent-relay-sdk";
|
|
5
|
+
import type { AgentLifecycle, AgentProfile, ContextState, Message, MessageSessionMeta, ProviderCapabilities, SendMessageInput, TaskStatusInput, WorkspaceMetadata } from "agent-relay-sdk";
|
|
6
6
|
import { errMessage, RelayBusClient, RelayHttpClient } from "agent-relay-sdk";
|
|
7
7
|
import { contextStateFromProbeMetrics, readContextProbeState } from "agent-relay-sdk/context-probe";
|
|
8
8
|
import type { ManagedProcess, ProviderAdapter, ProviderConfig, ProviderPermissionDecision, ProviderPermissionDecisionInput, ProviderSessionEvent, ProviderStatusUpdate, RunnerSpawnConfig, SemanticStatus, TerminalAttachSpec } from "./adapter";
|
|
@@ -91,9 +91,8 @@ interface RunnerOptions {
|
|
|
91
91
|
providerArgs: string[];
|
|
92
92
|
policyName?: string;
|
|
93
93
|
spawnRequestId?: string;
|
|
94
|
-
automationId?: string;
|
|
95
|
-
|
|
96
|
-
workspace?: WorkspaceMetadata;
|
|
94
|
+
automationId?: string; automationRunId?: string;
|
|
95
|
+
workspace?: WorkspaceMetadata; lifecycle?: AgentLifecycle;
|
|
97
96
|
tmuxSession?: string;
|
|
98
97
|
startedAt: number;
|
|
99
98
|
providerConfig: ProviderConfig;
|
|
@@ -355,6 +354,7 @@ export class AgentRunner {
|
|
|
355
354
|
automationId: options.automationId ?? null,
|
|
356
355
|
automationRunId: options.automationRunId ?? null,
|
|
357
356
|
workspace: options.workspace ?? null,
|
|
357
|
+
lifecycle: options.lifecycle ?? "persistent",
|
|
358
358
|
workspaceMode: options.workspace?.requestedMode ?? options.workspace?.mode ?? process.env.AGENT_RELAY_WORKSPACE_MODE ?? null,
|
|
359
359
|
runnerManaged: true,
|
|
360
360
|
cwd: options.cwd,
|
|
@@ -1806,7 +1806,7 @@ export class AgentRunner {
|
|
|
1806
1806
|
automationId: this.options.automationId ?? null,
|
|
1807
1807
|
automationRunId: this.options.automationRunId ?? null,
|
|
1808
1808
|
workspace: this.options.workspace ?? null,
|
|
1809
|
-
workspaceMode: this.options.workspace?.requestedMode ?? this.options.workspace?.mode ?? process.env.AGENT_RELAY_WORKSPACE_MODE ?? null,
|
|
1809
|
+
lifecycle: this.options.lifecycle ?? "persistent", workspaceMode: this.options.workspace?.requestedMode ?? this.options.workspace?.mode ?? process.env.AGENT_RELAY_WORKSPACE_MODE ?? null,
|
|
1810
1810
|
lifecycleAction: this.lifecycleAction ?? null,
|
|
1811
1811
|
profile: this.options.profile ?? null,
|
|
1812
1812
|
...(status === "error" ? { terminalStatus: "error" } : {}),
|