agent-relay 2.0.25 → 2.0.26
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 +16 -16
- package/packages/api-types/package.json +1 -1
- package/packages/bridge/package.json +8 -8
- package/packages/cli-tester/package.json +1 -1
- package/packages/config/package.json +2 -2
- package/packages/continuity/package.json +1 -1
- package/packages/daemon/dist/consensus-integration.d.ts +2 -1
- package/packages/daemon/dist/consensus.d.ts +1 -3
- package/packages/daemon/dist/enhanced-features.d.ts +2 -1
- package/packages/daemon/dist/orchestrator.js +4 -3
- package/packages/daemon/dist/server.js +48 -0
- package/packages/daemon/package.json +12 -12
- package/packages/hooks/dist/inbox-check/types.d.ts +6 -1
- package/packages/hooks/dist/inbox-check/utils.d.ts +3 -3
- package/packages/hooks/package.json +4 -4
- package/packages/mcp/dist/client.d.ts +57 -46
- package/packages/mcp/dist/client.js +107 -81
- package/packages/mcp/dist/server.js +61 -1
- package/packages/mcp/dist/tools/index.d.ts +5 -0
- package/packages/mcp/dist/tools/index.js +5 -0
- package/packages/mcp/dist/tools/relay-broadcast.d.ts +20 -0
- package/packages/mcp/dist/tools/relay-broadcast.js +25 -0
- package/packages/mcp/dist/tools/relay-channel.d.ts +49 -0
- package/packages/mcp/dist/tools/relay-channel.js +76 -0
- package/packages/mcp/dist/tools/relay-consensus.d.ts +45 -0
- package/packages/mcp/dist/tools/relay-consensus.js +80 -0
- package/packages/mcp/dist/tools/relay-inbox.d.ts +1 -1
- package/packages/mcp/dist/tools/relay-send.d.ts +2 -2
- package/packages/mcp/dist/tools/relay-shadow.d.ts +30 -0
- package/packages/mcp/dist/tools/relay-shadow.js +55 -0
- package/packages/mcp/dist/tools/relay-subscribe.d.ts +27 -0
- package/packages/mcp/dist/tools/relay-subscribe.js +49 -0
- package/packages/mcp/package.json +3 -2
- package/packages/memory/package.json +2 -2
- package/packages/policy/package.json +2 -2
- package/packages/protocol/dist/types.d.ts +130 -2
- package/packages/protocol/package.json +1 -1
- package/packages/resiliency/package.json +1 -1
- package/packages/sdk/dist/client.d.ts +21 -1
- package/packages/sdk/dist/client.js +26 -2
- package/packages/sdk/dist/index.d.ts +1 -1
- package/packages/sdk/dist/protocol/index.d.ts +4 -2
- package/packages/sdk/dist/protocol/index.js +4 -2
- package/packages/sdk/package.json +2 -2
- package/packages/spawner/package.json +1 -1
- package/packages/state/package.json +1 -1
- package/packages/storage/package.json +2 -2
- package/packages/telemetry/package.json +1 -1
- package/packages/trajectory/package.json +2 -2
- package/packages/user-directory/package.json +2 -2
- package/packages/utils/package.json +1 -1
- package/packages/wrapper/package.json +6 -6
- package/scripts/post-publish-verify/README.md +80 -0
- package/scripts/post-publish-verify/run-verify.sh +127 -0
- package/scripts/post-publish-verify/verify-install.sh +249 -0
- package/packages/sdk/dist/protocol/framing.d.ts +0 -80
- package/packages/sdk/dist/protocol/framing.js +0 -206
- package/packages/sdk/dist/protocol/types.d.ts +0 -560
- package/packages/sdk/dist/protocol/types.js +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-relay",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "Real-time agent-to-agent communication system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -87,21 +87,21 @@
|
|
|
87
87
|
},
|
|
88
88
|
"homepage": "https://github.com/AgentWorkforce/relay#readme",
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@agent-relay/bridge": "2.0.
|
|
91
|
-
"@agent-relay/config": "2.0.
|
|
92
|
-
"@agent-relay/continuity": "2.0.
|
|
93
|
-
"@agent-relay/daemon": "2.0.
|
|
94
|
-
"@agent-relay/hooks": "2.0.
|
|
95
|
-
"@agent-relay/mcp": "2.0.
|
|
96
|
-
"@agent-relay/protocol": "2.0.
|
|
97
|
-
"@agent-relay/resiliency": "2.0.
|
|
98
|
-
"@agent-relay/sdk": "2.0.
|
|
99
|
-
"@agent-relay/storage": "2.0.
|
|
100
|
-
"@agent-relay/telemetry": "2.0.
|
|
101
|
-
"@agent-relay/trajectory": "2.0.
|
|
102
|
-
"@agent-relay/user-directory": "2.0.
|
|
103
|
-
"@agent-relay/utils": "2.0.
|
|
104
|
-
"@agent-relay/wrapper": "2.0.
|
|
90
|
+
"@agent-relay/bridge": "2.0.26",
|
|
91
|
+
"@agent-relay/config": "2.0.26",
|
|
92
|
+
"@agent-relay/continuity": "2.0.26",
|
|
93
|
+
"@agent-relay/daemon": "2.0.26",
|
|
94
|
+
"@agent-relay/hooks": "2.0.26",
|
|
95
|
+
"@agent-relay/mcp": "2.0.26",
|
|
96
|
+
"@agent-relay/protocol": "2.0.26",
|
|
97
|
+
"@agent-relay/resiliency": "2.0.26",
|
|
98
|
+
"@agent-relay/sdk": "2.0.26",
|
|
99
|
+
"@agent-relay/storage": "2.0.26",
|
|
100
|
+
"@agent-relay/telemetry": "2.0.26",
|
|
101
|
+
"@agent-relay/trajectory": "2.0.26",
|
|
102
|
+
"@agent-relay/user-directory": "2.0.26",
|
|
103
|
+
"@agent-relay/utils": "2.0.26",
|
|
104
|
+
"@agent-relay/wrapper": "2.0.26",
|
|
105
105
|
"agent-trajectories": "^0.2.3",
|
|
106
106
|
"better-sqlite3": "^12.6.2",
|
|
107
107
|
"chokidar": "^5.0.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-relay/bridge",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "Multi-project bridge client utilities for Relay",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"test:watch": "vitest"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agent-relay/protocol": "2.0.
|
|
26
|
-
"@agent-relay/config": "2.0.
|
|
27
|
-
"@agent-relay/utils": "2.0.
|
|
28
|
-
"@agent-relay/policy": "2.0.
|
|
29
|
-
"@agent-relay/user-directory": "2.0.
|
|
30
|
-
"@agent-relay/wrapper": "2.0.
|
|
31
|
-
"@agent-relay/mcp": "2.0.
|
|
25
|
+
"@agent-relay/protocol": "2.0.26",
|
|
26
|
+
"@agent-relay/config": "2.0.26",
|
|
27
|
+
"@agent-relay/utils": "2.0.26",
|
|
28
|
+
"@agent-relay/policy": "2.0.26",
|
|
29
|
+
"@agent-relay/user-directory": "2.0.26",
|
|
30
|
+
"@agent-relay/wrapper": "2.0.26",
|
|
31
|
+
"@agent-relay/mcp": "2.0.26"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^22.19.3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-relay/config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "Shared configuration schemas and loaders for Agent Relay",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"test:watch": "vitest"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@agent-relay/protocol": "2.0.
|
|
86
|
+
"@agent-relay/protocol": "2.0.26",
|
|
87
87
|
"zod": "^3.23.8",
|
|
88
88
|
"zod-to-json-schema": "^3.23.1"
|
|
89
89
|
},
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
* consensus.processIncomingMessage(from, body);
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
import
|
|
30
|
+
import type { VoteValue, ConsensusType } from '@agent-relay/protocol';
|
|
31
|
+
import { ConsensusEngine, createConsensusEngine, formatProposalMessage, formatResultMessage, parseVoteCommand, parseProposalCommand, isConsensusCommand, type Proposal, type ConsensusResult, type ConsensusConfig, type ParsedProposalCommand } from './consensus.js';
|
|
31
32
|
import type { Router } from './router.js';
|
|
32
33
|
export interface CloudSyncConfig {
|
|
33
34
|
/** Cloud API base URL (defaults to AGENT_RELAY_CLOUD_URL or https://agent-relay.com) */
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
* - Task assignment (weighted by expertise)
|
|
19
19
|
*/
|
|
20
20
|
import { EventEmitter } from 'node:events';
|
|
21
|
-
|
|
22
|
-
export type VoteValue = 'approve' | 'reject' | 'abstain';
|
|
23
|
-
export type ProposalStatus = 'pending' | 'approved' | 'rejected' | 'expired' | 'cancelled';
|
|
21
|
+
import type { ConsensusType, VoteValue, ProposalStatus } from '@agent-relay/protocol';
|
|
24
22
|
export interface AgentWeight {
|
|
25
23
|
/** Agent name */
|
|
26
24
|
agent: string;
|
|
@@ -17,7 +17,8 @@ import { getCompiledPatterns, isInstructionalTextFast, isPlaceholderTargetFast,
|
|
|
17
17
|
import { AgentSigningManager, loadSigningConfig, attachSignature, extractSignature, type AgentSigningConfig, type SignedMessage } from './agent-signing.js';
|
|
18
18
|
import { SQLiteDLQAdapter, PostgresDLQAdapter, InMemoryDLQAdapter, createDLQAdapter, DEFAULT_DLQ_CONFIG, type DLQStorageAdapter, type DLQConfig, type DeadLetter, type DLQStats } from '@agent-relay/storage/dlq-adapter';
|
|
19
19
|
import { ContextCompactor, createContextCompactor, estimateTokens, estimateContextTokens, formatTokenCount, type Message, type CompactionConfig, type CompactionResult } from '@agent-relay/memory';
|
|
20
|
-
import
|
|
20
|
+
import type { VoteValue } from '@agent-relay/protocol';
|
|
21
|
+
import { ConsensusEngine, createConsensusEngine, formatProposalMessage, parseVoteCommand, formatResultMessage, type Proposal, type ConsensusResult, type ConsensusConfig } from './consensus.js';
|
|
21
22
|
export interface EnhancedFeaturesConfig {
|
|
22
23
|
/** Pattern matching configuration */
|
|
23
24
|
patterns?: {
|
|
@@ -21,7 +21,7 @@ function generateId() {
|
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* Determine the default host binding.
|
|
24
|
-
* - In cloud environments
|
|
24
|
+
* - In cloud environments, bind to '::' for IPv6+IPv4 dual-stack (required for Fly.io 6PN)
|
|
25
25
|
* - Locally, bind to localhost for security
|
|
26
26
|
* - Can be overridden with AGENT_RELAY_API_HOST env var
|
|
27
27
|
*/
|
|
@@ -30,12 +30,13 @@ function getDefaultHost() {
|
|
|
30
30
|
if (process.env.AGENT_RELAY_API_HOST) {
|
|
31
31
|
return process.env.AGENT_RELAY_API_HOST;
|
|
32
32
|
}
|
|
33
|
-
// Cloud environment detection - bind to
|
|
33
|
+
// Cloud environment detection - bind to :: for IPv6 + IPv4 dual-stack
|
|
34
|
+
// Fly.io internal network uses IPv6 (fdaa:...), so 0.0.0.0 won't work
|
|
34
35
|
const isCloudEnvironment = process.env.FLY_APP_NAME || // Fly.io
|
|
35
36
|
process.env.WORKSPACE_ID || // Agent Relay workspace
|
|
36
37
|
process.env.RELAY_WORKSPACE_ID || // Alternative workspace ID
|
|
37
38
|
process.env.RUNNING_IN_DOCKER === 'true'; // Docker container
|
|
38
|
-
return isCloudEnvironment ? '
|
|
39
|
+
return isCloudEnvironment ? '::' : 'localhost';
|
|
39
40
|
}
|
|
40
41
|
const DEFAULT_CONFIG = {
|
|
41
42
|
port: 3456,
|
|
@@ -1169,6 +1169,54 @@ export class Daemon {
|
|
|
1169
1169
|
});
|
|
1170
1170
|
break;
|
|
1171
1171
|
}
|
|
1172
|
+
case 'MESSAGES_QUERY': {
|
|
1173
|
+
// Query all messages (used by dashboard) - not filtered by recipient
|
|
1174
|
+
const queryPayload = envelope.payload;
|
|
1175
|
+
const getMessages = async () => {
|
|
1176
|
+
if (!this.storage?.getMessages) {
|
|
1177
|
+
return [];
|
|
1178
|
+
}
|
|
1179
|
+
try {
|
|
1180
|
+
const messages = await this.storage.getMessages({
|
|
1181
|
+
limit: queryPayload.limit || 100,
|
|
1182
|
+
sinceTs: queryPayload.sinceTs,
|
|
1183
|
+
from: queryPayload.from,
|
|
1184
|
+
to: queryPayload.to,
|
|
1185
|
+
thread: queryPayload.thread,
|
|
1186
|
+
order: queryPayload.order || 'desc',
|
|
1187
|
+
});
|
|
1188
|
+
return messages.map(m => ({
|
|
1189
|
+
id: m.id,
|
|
1190
|
+
from: m.from,
|
|
1191
|
+
to: m.to,
|
|
1192
|
+
body: m.body,
|
|
1193
|
+
channel: m.data?.channel,
|
|
1194
|
+
thread: m.thread,
|
|
1195
|
+
timestamp: m.ts,
|
|
1196
|
+
status: m.status,
|
|
1197
|
+
isBroadcast: m.is_broadcast,
|
|
1198
|
+
replyCount: m.replyCount,
|
|
1199
|
+
data: m.data,
|
|
1200
|
+
}));
|
|
1201
|
+
}
|
|
1202
|
+
catch {
|
|
1203
|
+
return [];
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
getMessages().then(messages => {
|
|
1207
|
+
const response = {
|
|
1208
|
+
v: PROTOCOL_VERSION,
|
|
1209
|
+
type: 'MESSAGES_RESPONSE',
|
|
1210
|
+
id: envelope.id,
|
|
1211
|
+
ts: Date.now(),
|
|
1212
|
+
payload: { messages },
|
|
1213
|
+
};
|
|
1214
|
+
connection.send(response);
|
|
1215
|
+
}).catch(err => {
|
|
1216
|
+
this.sendErrorEnvelope(connection, `Failed to get messages: ${err.message}`);
|
|
1217
|
+
});
|
|
1218
|
+
break;
|
|
1219
|
+
}
|
|
1172
1220
|
case 'LIST_AGENTS': {
|
|
1173
1221
|
const listPayload = envelope.payload;
|
|
1174
1222
|
// Get connected agents from router
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-relay/daemon",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "Relay daemon server - agent coordination and message routing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"test:watch": "vitest"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agent-relay/protocol": "2.0.
|
|
26
|
-
"@agent-relay/config": "2.0.
|
|
27
|
-
"@agent-relay/storage": "2.0.
|
|
28
|
-
"@agent-relay/bridge": "2.0.
|
|
29
|
-
"@agent-relay/utils": "2.0.
|
|
30
|
-
"@agent-relay/policy": "2.0.
|
|
31
|
-
"@agent-relay/memory": "2.0.
|
|
32
|
-
"@agent-relay/resiliency": "2.0.
|
|
33
|
-
"@agent-relay/user-directory": "2.0.
|
|
34
|
-
"@agent-relay/wrapper": "2.0.
|
|
35
|
-
"@agent-relay/telemetry": "2.0.
|
|
25
|
+
"@agent-relay/protocol": "2.0.26",
|
|
26
|
+
"@agent-relay/config": "2.0.26",
|
|
27
|
+
"@agent-relay/storage": "2.0.26",
|
|
28
|
+
"@agent-relay/bridge": "2.0.26",
|
|
29
|
+
"@agent-relay/utils": "2.0.26",
|
|
30
|
+
"@agent-relay/policy": "2.0.26",
|
|
31
|
+
"@agent-relay/memory": "2.0.26",
|
|
32
|
+
"@agent-relay/resiliency": "2.0.26",
|
|
33
|
+
"@agent-relay/user-directory": "2.0.26",
|
|
34
|
+
"@agent-relay/wrapper": "2.0.26",
|
|
35
|
+
"@agent-relay/telemetry": "2.0.26",
|
|
36
36
|
"ws": "^8.18.3",
|
|
37
37
|
"better-sqlite3": "^12.6.2",
|
|
38
38
|
"pg": "^8.16.3",
|
|
@@ -17,7 +17,12 @@ export interface HookOutput {
|
|
|
17
17
|
/** Reason for the decision (shown to Claude if blocked) */
|
|
18
18
|
reason?: string;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Parsed message from inbox file.
|
|
22
|
+
* Note: This is different from @agent-relay/protocol's InboxMessage
|
|
23
|
+
* which is for daemon communication.
|
|
24
|
+
*/
|
|
25
|
+
export interface ParsedInboxMessage {
|
|
21
26
|
from: string;
|
|
22
27
|
timestamp: string;
|
|
23
28
|
body: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utility functions for Agent Relay Inbox Check Hook
|
|
3
3
|
*/
|
|
4
|
-
import type { InboxConfig,
|
|
4
|
+
import type { InboxConfig, ParsedInboxMessage } from './types.js';
|
|
5
5
|
/** Default inbox directory */
|
|
6
6
|
export declare const DEFAULT_INBOX_DIR = "/tmp/agent-relay";
|
|
7
7
|
/**
|
|
@@ -32,11 +32,11 @@ export declare function countMessages(inboxPath: string): number;
|
|
|
32
32
|
/**
|
|
33
33
|
* Parse messages from inbox content
|
|
34
34
|
*/
|
|
35
|
-
export declare function parseMessages(inboxPath: string):
|
|
35
|
+
export declare function parseMessages(inboxPath: string): ParsedInboxMessage[];
|
|
36
36
|
/**
|
|
37
37
|
* Format a message for display
|
|
38
38
|
*/
|
|
39
|
-
export declare function formatMessagePreview(msg:
|
|
39
|
+
export declare function formatMessagePreview(msg: ParsedInboxMessage, maxLength?: number): string;
|
|
40
40
|
/**
|
|
41
41
|
* Build the block reason message
|
|
42
42
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-relay/hooks",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "Hook emitter, registry, and trajectory hooks for Agent Relay",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"test:watch": "vitest"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@agent-relay/protocol": "2.0.
|
|
41
|
-
"@agent-relay/config": "2.0.
|
|
42
|
-
"@agent-relay/trajectory": "2.0.
|
|
40
|
+
"@agent-relay/protocol": "2.0.26",
|
|
41
|
+
"@agent-relay/config": "2.0.26",
|
|
42
|
+
"@agent-relay/trajectory": "2.0.26"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^22.19.3",
|
|
@@ -1,52 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* RelayClient - Client for connecting to the Agent Relay daemon
|
|
3
|
+
*
|
|
4
|
+
* This module uses @agent-relay/protocol for wire format handling
|
|
5
|
+
* to avoid code duplication with the SDK.
|
|
3
6
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
issues: Array<{
|
|
8
|
-
severity: string;
|
|
9
|
-
message: string;
|
|
10
|
-
}>;
|
|
11
|
-
recommendations: string[];
|
|
12
|
-
crashes: Array<{
|
|
13
|
-
id: string;
|
|
14
|
-
agentName: string;
|
|
15
|
-
crashedAt: string;
|
|
16
|
-
likelyCause: string;
|
|
17
|
-
summary?: string;
|
|
18
|
-
}>;
|
|
19
|
-
alerts: Array<{
|
|
20
|
-
id: string;
|
|
21
|
-
agentName: string;
|
|
22
|
-
alertType: string;
|
|
23
|
-
message: string;
|
|
24
|
-
createdAt: string;
|
|
25
|
-
}>;
|
|
26
|
-
stats: {
|
|
27
|
-
totalCrashes24h: number;
|
|
28
|
-
totalAlerts24h: number;
|
|
29
|
-
agentCount: number;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
export interface MetricsResponse {
|
|
33
|
-
agents: Array<{
|
|
34
|
-
name: string;
|
|
35
|
-
pid?: number;
|
|
36
|
-
status: string;
|
|
37
|
-
rssBytes?: number;
|
|
38
|
-
cpuPercent?: number;
|
|
39
|
-
trend?: string;
|
|
40
|
-
alertLevel?: string;
|
|
41
|
-
highWatermark?: number;
|
|
42
|
-
uptimeMs?: number;
|
|
43
|
-
}>;
|
|
44
|
-
system: {
|
|
45
|
-
totalMemory: number;
|
|
46
|
-
freeMemory: number;
|
|
47
|
-
heapUsed: number;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
7
|
+
import { type HealthResponsePayload, type MetricsResponsePayload } from '@agent-relay/protocol';
|
|
8
|
+
export type HealthResponse = HealthResponsePayload;
|
|
9
|
+
export type MetricsResponse = MetricsResponsePayload;
|
|
50
10
|
export interface RelayClient {
|
|
51
11
|
send(to: string, message: string, options?: {
|
|
52
12
|
thread?: string;
|
|
@@ -59,6 +19,9 @@ export interface RelayClient {
|
|
|
59
19
|
content: string;
|
|
60
20
|
thread?: string;
|
|
61
21
|
}>;
|
|
22
|
+
broadcast(message: string, options?: {
|
|
23
|
+
kind?: string;
|
|
24
|
+
}): Promise<void>;
|
|
62
25
|
spawn(options: {
|
|
63
26
|
name: string;
|
|
64
27
|
cli: string;
|
|
@@ -68,11 +31,59 @@ export interface RelayClient {
|
|
|
68
31
|
}): Promise<{
|
|
69
32
|
success: boolean;
|
|
70
33
|
error?: string;
|
|
34
|
+
pid?: number;
|
|
71
35
|
}>;
|
|
72
36
|
release(name: string, reason?: string): Promise<{
|
|
73
37
|
success: boolean;
|
|
74
38
|
error?: string;
|
|
75
39
|
}>;
|
|
40
|
+
subscribe(topic: string): Promise<{
|
|
41
|
+
success: boolean;
|
|
42
|
+
error?: string;
|
|
43
|
+
}>;
|
|
44
|
+
unsubscribe(topic: string): Promise<{
|
|
45
|
+
success: boolean;
|
|
46
|
+
error?: string;
|
|
47
|
+
}>;
|
|
48
|
+
joinChannel(channel: string, displayName?: string): Promise<{
|
|
49
|
+
success: boolean;
|
|
50
|
+
error?: string;
|
|
51
|
+
}>;
|
|
52
|
+
leaveChannel(channel: string, reason?: string): Promise<{
|
|
53
|
+
success: boolean;
|
|
54
|
+
error?: string;
|
|
55
|
+
}>;
|
|
56
|
+
sendChannelMessage(channel: string, message: string, options?: {
|
|
57
|
+
thread?: string;
|
|
58
|
+
}): Promise<void>;
|
|
59
|
+
bindAsShadow(primaryAgent: string, options?: {
|
|
60
|
+
speakOn?: string[];
|
|
61
|
+
}): Promise<{
|
|
62
|
+
success: boolean;
|
|
63
|
+
error?: string;
|
|
64
|
+
}>;
|
|
65
|
+
unbindAsShadow(primaryAgent: string): Promise<{
|
|
66
|
+
success: boolean;
|
|
67
|
+
error?: string;
|
|
68
|
+
}>;
|
|
69
|
+
createProposal(options: {
|
|
70
|
+
id: string;
|
|
71
|
+
description: string;
|
|
72
|
+
options: string[];
|
|
73
|
+
votingMethod?: string;
|
|
74
|
+
deadline?: number;
|
|
75
|
+
}): Promise<{
|
|
76
|
+
success: boolean;
|
|
77
|
+
error?: string;
|
|
78
|
+
}>;
|
|
79
|
+
vote(options: {
|
|
80
|
+
proposalId: string;
|
|
81
|
+
vote: string;
|
|
82
|
+
reason?: string;
|
|
83
|
+
}): Promise<{
|
|
84
|
+
success: boolean;
|
|
85
|
+
error?: string;
|
|
86
|
+
}>;
|
|
76
87
|
getStatus(): Promise<{
|
|
77
88
|
connected: boolean;
|
|
78
89
|
agentName: string;
|