agent-relay 3.2.22 → 4.0.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/bin/agent-relay-broker-darwin-arm64 +0 -0
- package/bin/agent-relay-broker-darwin-x64 +0 -0
- package/bin/agent-relay-broker-linux-arm64 +0 -0
- package/bin/agent-relay-broker-linux-x64 +0 -0
- package/dist/index.cjs +4989 -1481
- package/dist/src/cli/bootstrap.d.ts.map +1 -1
- package/dist/src/cli/bootstrap.js +2 -0
- package/dist/src/cli/bootstrap.js.map +1 -1
- package/dist/src/cli/commands/agent-management.d.ts.map +1 -1
- package/dist/src/cli/commands/agent-management.js +14 -4
- package/dist/src/cli/commands/agent-management.js.map +1 -1
- package/dist/src/cli/commands/core.d.ts +2 -6
- package/dist/src/cli/commands/core.d.ts.map +1 -1
- package/dist/src/cli/commands/core.js +30 -12
- package/dist/src/cli/commands/core.js.map +1 -1
- package/dist/src/cli/commands/messaging.d.ts.map +1 -1
- package/dist/src/cli/commands/messaging.js +10 -3
- package/dist/src/cli/commands/messaging.js.map +1 -1
- package/dist/src/cli/commands/monitoring.d.ts +2 -2
- package/dist/src/cli/commands/monitoring.d.ts.map +1 -1
- package/dist/src/cli/commands/monitoring.js +15 -6
- package/dist/src/cli/commands/monitoring.js.map +1 -1
- package/dist/src/cli/commands/on/dotfiles.d.ts +35 -0
- package/dist/src/cli/commands/on/dotfiles.d.ts.map +1 -0
- package/dist/src/cli/commands/on/dotfiles.js +157 -0
- package/dist/src/cli/commands/on/dotfiles.js.map +1 -0
- package/dist/src/cli/commands/on/prereqs.d.ts +15 -0
- package/dist/src/cli/commands/on/prereqs.d.ts.map +1 -0
- package/dist/src/cli/commands/on/prereqs.js +103 -0
- package/dist/src/cli/commands/on/prereqs.js.map +1 -0
- package/dist/src/cli/commands/on/provision.d.ts +22 -0
- package/dist/src/cli/commands/on/provision.d.ts.map +1 -0
- package/dist/src/cli/commands/on/provision.js +157 -0
- package/dist/src/cli/commands/on/provision.js.map +1 -0
- package/dist/src/cli/commands/on/scan.d.ts +8 -0
- package/dist/src/cli/commands/on/scan.d.ts.map +1 -0
- package/dist/src/cli/commands/on/scan.js +59 -0
- package/dist/src/cli/commands/on/scan.js.map +1 -0
- package/dist/src/cli/commands/on/services.d.ts +17 -0
- package/dist/src/cli/commands/on/services.d.ts.map +1 -0
- package/dist/src/cli/commands/on/services.js +328 -0
- package/dist/src/cli/commands/on/services.js.map +1 -0
- package/dist/src/cli/commands/on/start.d.ts +61 -0
- package/dist/src/cli/commands/on/start.d.ts.map +1 -0
- package/dist/src/cli/commands/on/start.js +1071 -0
- package/dist/src/cli/commands/on/start.js.map +1 -0
- package/dist/src/cli/commands/on/stop.d.ts +4 -0
- package/dist/src/cli/commands/on/stop.d.ts.map +1 -0
- package/dist/src/cli/commands/on/stop.js +11 -0
- package/dist/src/cli/commands/on/stop.js.map +1 -0
- package/dist/src/cli/commands/on/token.d.ts +8 -0
- package/dist/src/cli/commands/on/token.d.ts.map +1 -0
- package/dist/src/cli/commands/on/token.js +26 -0
- package/dist/src/cli/commands/on/token.js.map +1 -0
- package/dist/src/cli/commands/on/workspace.d.ts +4 -0
- package/dist/src/cli/commands/on/workspace.d.ts.map +1 -0
- package/dist/src/cli/commands/on/workspace.js +241 -0
- package/dist/src/cli/commands/on/workspace.js.map +1 -0
- package/dist/src/cli/commands/on.d.ts +10 -0
- package/dist/src/cli/commands/on.d.ts.map +1 -0
- package/dist/src/cli/commands/on.js +52 -0
- package/dist/src/cli/commands/on.js.map +1 -0
- package/dist/src/cli/commands/setup.d.ts.map +1 -1
- package/dist/src/cli/commands/setup.js +10 -21
- package/dist/src/cli/commands/setup.js.map +1 -1
- package/dist/src/cli/lib/bridge.js +1 -1
- package/dist/src/cli/lib/bridge.js.map +1 -1
- package/dist/src/cli/lib/broker-lifecycle.d.ts +14 -4
- package/dist/src/cli/lib/broker-lifecycle.d.ts.map +1 -1
- package/dist/src/cli/lib/broker-lifecycle.js +82 -120
- package/dist/src/cli/lib/broker-lifecycle.js.map +1 -1
- package/dist/src/cli/lib/client-factory.d.ts +2 -2
- package/dist/src/cli/lib/client-factory.d.ts.map +1 -1
- package/dist/src/cli/lib/client-factory.js +14 -11
- package/dist/src/cli/lib/client-factory.js.map +1 -1
- package/dist/src/cli/lib/core-maintenance.d.ts.map +1 -1
- package/dist/src/cli/lib/core-maintenance.js +11 -22
- package/dist/src/cli/lib/core-maintenance.js.map +1 -1
- package/package.json +14 -11
- package/packages/acp-bridge/package.json +2 -2
- package/packages/brand/package.json +1 -1
- package/packages/cloud/package.json +2 -2
- package/packages/config/package.json +1 -1
- package/packages/hooks/package.json +4 -4
- package/packages/memory/package.json +2 -2
- package/packages/openclaw/package.json +2 -2
- package/packages/policy/package.json +2 -2
- package/packages/sdk/README.md +10 -3
- package/packages/sdk/dist/client.d.ts +108 -196
- package/packages/sdk/dist/client.d.ts.map +1 -1
- package/packages/sdk/dist/client.js +336 -824
- package/packages/sdk/dist/client.js.map +1 -1
- package/packages/sdk/dist/examples/example.js +2 -5
- package/packages/sdk/dist/examples/example.js.map +1 -1
- package/packages/sdk/dist/index.d.ts +3 -1
- package/packages/sdk/dist/index.d.ts.map +1 -1
- package/packages/sdk/dist/index.js +3 -1
- package/packages/sdk/dist/index.js.map +1 -1
- package/packages/sdk/dist/relay-adapter.d.ts +9 -26
- package/packages/sdk/dist/relay-adapter.d.ts.map +1 -1
- package/packages/sdk/dist/relay-adapter.js +75 -47
- package/packages/sdk/dist/relay-adapter.js.map +1 -1
- package/packages/sdk/dist/relay.d.ts +24 -5
- package/packages/sdk/dist/relay.d.ts.map +1 -1
- package/packages/sdk/dist/relay.js +213 -43
- package/packages/sdk/dist/relay.js.map +1 -1
- package/packages/sdk/dist/transport.d.ts +58 -0
- package/packages/sdk/dist/transport.d.ts.map +1 -0
- package/packages/sdk/dist/transport.js +184 -0
- package/packages/sdk/dist/transport.js.map +1 -0
- package/packages/sdk/dist/types.d.ts +69 -0
- package/packages/sdk/dist/types.d.ts.map +1 -0
- package/packages/sdk/dist/types.js +5 -0
- package/packages/sdk/dist/types.js.map +1 -0
- package/packages/sdk/dist/workflows/validator.d.ts.map +1 -1
- package/packages/sdk/dist/workflows/validator.js +17 -2
- package/packages/sdk/dist/workflows/validator.js.map +1 -1
- package/packages/sdk/package.json +2 -2
- package/packages/sdk/src/__tests__/unit.test.ts +100 -1
- package/packages/sdk/src/client.ts +422 -1072
- package/packages/sdk/src/examples/example.ts +2 -5
- package/packages/sdk/src/index.ts +8 -1
- package/packages/sdk/src/relay-adapter.ts +75 -55
- package/packages/sdk/src/relay.ts +260 -57
- package/packages/sdk/src/transport.ts +216 -0
- package/packages/sdk/src/types.ts +75 -0
- package/packages/sdk/src/workflows/validator.ts +20 -2
- package/packages/sdk-py/pyproject.toml +1 -1
- package/packages/sdk-py/src/agent_relay/__init__.py +0 -8
- package/packages/sdk-py/src/agent_relay/client.py +329 -522
- package/packages/sdk-py/src/agent_relay/protocol.py +2 -96
- package/packages/sdk-py/src/agent_relay/relay.py +1 -4
- package/packages/sdk-py/tests/test_wait_for_api_url.py +92 -0
- package/packages/sdk-py/uv.lock +5388 -0
- package/packages/telemetry/dist/client.d.ts.map +1 -1
- package/packages/telemetry/dist/client.js +1 -1
- package/packages/telemetry/dist/client.js.map +1 -1
- package/packages/telemetry/package.json +1 -1
- package/packages/telemetry/src/client.ts +3 -10
- package/packages/trajectory/package.json +2 -2
- package/packages/user-directory/package.json +2 -2
- package/packages/utils/package.json +2 -2
- package/scripts/postinstall.js +121 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared input/output types for the broker SDK.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { AgentRuntime, HeadlessProvider, MessageInjectionMode, RestartPolicy } from './protocol.js';
|
|
6
|
+
|
|
7
|
+
export interface SpawnPtyInput {
|
|
8
|
+
name: string;
|
|
9
|
+
cli: string;
|
|
10
|
+
args?: string[];
|
|
11
|
+
channels?: string[];
|
|
12
|
+
task?: string;
|
|
13
|
+
model?: string;
|
|
14
|
+
cwd?: string;
|
|
15
|
+
team?: string;
|
|
16
|
+
shadowOf?: string;
|
|
17
|
+
shadowMode?: string;
|
|
18
|
+
idleThresholdSecs?: number;
|
|
19
|
+
restartPolicy?: RestartPolicy;
|
|
20
|
+
continueFrom?: string;
|
|
21
|
+
skipRelayPrompt?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface SpawnHeadlessInput {
|
|
25
|
+
name: string;
|
|
26
|
+
provider: HeadlessProvider;
|
|
27
|
+
args?: string[];
|
|
28
|
+
channels?: string[];
|
|
29
|
+
task?: string;
|
|
30
|
+
skipRelayPrompt?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type AgentTransport = 'pty' | 'headless';
|
|
34
|
+
|
|
35
|
+
export interface SpawnProviderInput {
|
|
36
|
+
name: string;
|
|
37
|
+
provider: string;
|
|
38
|
+
transport?: AgentTransport;
|
|
39
|
+
args?: string[];
|
|
40
|
+
channels?: string[];
|
|
41
|
+
task?: string;
|
|
42
|
+
model?: string;
|
|
43
|
+
cwd?: string;
|
|
44
|
+
team?: string;
|
|
45
|
+
shadowOf?: string;
|
|
46
|
+
shadowMode?: string;
|
|
47
|
+
idleThresholdSecs?: number;
|
|
48
|
+
restartPolicy?: RestartPolicy;
|
|
49
|
+
continueFrom?: string;
|
|
50
|
+
skipRelayPrompt?: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface SendMessageInput {
|
|
54
|
+
to: string;
|
|
55
|
+
text: string;
|
|
56
|
+
from?: string;
|
|
57
|
+
threadId?: string;
|
|
58
|
+
workspaceId?: string;
|
|
59
|
+
workspaceAlias?: string;
|
|
60
|
+
priority?: number;
|
|
61
|
+
data?: Record<string, unknown>;
|
|
62
|
+
mode?: MessageInjectionMode;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface ListAgent {
|
|
66
|
+
name: string;
|
|
67
|
+
runtime: AgentRuntime;
|
|
68
|
+
provider?: HeadlessProvider;
|
|
69
|
+
cli?: string;
|
|
70
|
+
model?: string;
|
|
71
|
+
team?: string;
|
|
72
|
+
channels: string[];
|
|
73
|
+
parent?: string;
|
|
74
|
+
pid?: number;
|
|
75
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RelayYamlConfig, AgentDefinition, WorkflowStep } from './types.js';
|
|
2
|
+
import { CodexModels } from '@agent-relay/config';
|
|
2
3
|
|
|
3
4
|
export interface ValidationIssue {
|
|
4
5
|
severity: 'error' | 'warning' | 'info';
|
|
@@ -117,7 +118,24 @@ export function validateWorkflow(config: RelayYamlConfig): ValidationIssue[] {
|
|
|
117
118
|
});
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
// Check 4:
|
|
121
|
+
// Check 4: codex-spark cannot be used in non-interactive mode
|
|
122
|
+
const CODEX_SPARK_MODELS: string[] = [CodexModels.GPT_5_3_CODEX_SPARK];
|
|
123
|
+
if (
|
|
124
|
+
def.interactive === false &&
|
|
125
|
+
def.cli === 'codex' &&
|
|
126
|
+
def.constraints?.model &&
|
|
127
|
+
(CODEX_SPARK_MODELS.includes(def.constraints.model) || /codex-spark/i.test(def.constraints.model))
|
|
128
|
+
) {
|
|
129
|
+
issues.push({
|
|
130
|
+
severity: 'error',
|
|
131
|
+
code: 'CODEX_SPARK_NON_INTERACTIVE',
|
|
132
|
+
message: `Agent "${step.agent}" uses codex-spark model in non-interactive mode. Codex Spark does not support non-interactive (headless) execution.`,
|
|
133
|
+
fix: `Switch to a different model (e.g. gpt-5.3-codex) or set the agent to interactive mode.`,
|
|
134
|
+
location: `step:${step.name}`,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Check 5: non-interactive agent that references relay messaging tools in task
|
|
121
139
|
if (
|
|
122
140
|
def.interactive === false &&
|
|
123
141
|
(task.includes('mcp__relaycast__message_dm_send') || task.includes('mcp__relaycast__message_post') || task.includes('mcp__relaycast__message_inbox_check'))
|
|
@@ -132,7 +150,7 @@ export function validateWorkflow(config: RelayYamlConfig): ValidationIssue[] {
|
|
|
132
150
|
}
|
|
133
151
|
}
|
|
134
152
|
|
|
135
|
-
// Check
|
|
153
|
+
// Check 6: maxConcurrency vs interactive agent count
|
|
136
154
|
const interactiveSteps = (workflow.steps ?? []).filter((s) => {
|
|
137
155
|
if (s.type === 'deterministic') return false;
|
|
138
156
|
const def = agentMap.get(s.agent ?? '');
|
|
@@ -13,13 +13,9 @@ except ImportError:
|
|
|
13
13
|
from .models import Models
|
|
14
14
|
from .client import AgentRelayClient, AgentRelayProtocolError, AgentRelayProcessError
|
|
15
15
|
from .protocol import (
|
|
16
|
-
PROTOCOL_VERSION,
|
|
17
16
|
AgentRuntime,
|
|
18
|
-
AgentSpec,
|
|
19
17
|
BrokerEvent,
|
|
20
18
|
MessageInjectionMode,
|
|
21
|
-
ProtocolEnvelope,
|
|
22
|
-
RestartPolicy as ProtocolRestartPolicy,
|
|
23
19
|
)
|
|
24
20
|
|
|
25
21
|
# ── Secondary API: Workflow builder (backward compatibility) ──────────────────
|
|
@@ -89,13 +85,9 @@ __all__ = [
|
|
|
89
85
|
"AgentRelayClient",
|
|
90
86
|
"AgentRelayProtocolError",
|
|
91
87
|
"AgentRelayProcessError",
|
|
92
|
-
"PROTOCOL_VERSION",
|
|
93
88
|
"AgentRuntime",
|
|
94
|
-
"AgentSpec",
|
|
95
89
|
"BrokerEvent",
|
|
96
90
|
"MessageInjectionMode",
|
|
97
|
-
"ProtocolEnvelope",
|
|
98
|
-
"ProtocolRestartPolicy",
|
|
99
91
|
# Workflow builder (backward compat)
|
|
100
92
|
"workflow",
|
|
101
93
|
"WorkflowBuilder",
|