@openscout/protocol 0.2.53 → 0.2.54
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/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/relay-agent-card.d.ts +38 -1
- package/dist/relay-agent-card.js +34 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/relay-agent-card.ts +74 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./agent-identity.js";
|
|
|
4
4
|
export * from "./agent-address.js";
|
|
5
5
|
export * from "./agent-selectors.js";
|
|
6
6
|
export * from "./scout-agent-card.js";
|
|
7
|
+
export * from "./relay-agent-card.js";
|
|
7
8
|
export * from "./mesh.js";
|
|
8
9
|
export * from "./conversations.js";
|
|
9
10
|
export * from "./collaboration.js";
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./agent-identity.js";
|
|
|
4
4
|
export * from "./agent-address.js";
|
|
5
5
|
export * from "./agent-selectors.js";
|
|
6
6
|
export * from "./scout-agent-card.js";
|
|
7
|
+
export * from "./relay-agent-card.js";
|
|
7
8
|
export * from "./mesh.js";
|
|
8
9
|
export * from "./conversations.js";
|
|
9
10
|
export * from "./collaboration.js";
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AgentEndpoint, AgentHarness } from "./actors.js";
|
|
2
|
+
import type { MetadataMap, ScoutId } from "./common.js";
|
|
3
|
+
export interface RelayReturnAddress {
|
|
4
|
+
actorId: ScoutId;
|
|
5
|
+
handle: string;
|
|
6
|
+
displayName?: string;
|
|
7
|
+
selector?: string;
|
|
8
|
+
defaultSelector?: string;
|
|
9
|
+
conversationId?: ScoutId;
|
|
10
|
+
replyToMessageId?: ScoutId;
|
|
11
|
+
nodeId?: ScoutId;
|
|
12
|
+
projectRoot?: string;
|
|
13
|
+
sessionId?: string;
|
|
14
|
+
metadata?: MetadataMap;
|
|
15
|
+
}
|
|
16
|
+
export interface RelayAgentCard {
|
|
17
|
+
id: ScoutId;
|
|
18
|
+
agentId: ScoutId;
|
|
19
|
+
definitionId: ScoutId;
|
|
20
|
+
displayName: string;
|
|
21
|
+
handle: string;
|
|
22
|
+
selector?: string;
|
|
23
|
+
defaultSelector?: string;
|
|
24
|
+
projectName?: string;
|
|
25
|
+
projectRoot: string;
|
|
26
|
+
currentDirectory: string;
|
|
27
|
+
harness: AgentHarness;
|
|
28
|
+
transport: AgentEndpoint["transport"];
|
|
29
|
+
sessionId?: string;
|
|
30
|
+
branch?: string;
|
|
31
|
+
createdAt: number;
|
|
32
|
+
createdById?: ScoutId;
|
|
33
|
+
brokerRegistered: boolean;
|
|
34
|
+
inboxConversationId?: ScoutId;
|
|
35
|
+
returnAddress: RelayReturnAddress;
|
|
36
|
+
metadata?: MetadataMap;
|
|
37
|
+
}
|
|
38
|
+
export declare function buildRelayReturnAddress(input: RelayReturnAddress): RelayReturnAddress;
|
package/dist/relay-agent-card.js
CHANGED
|
@@ -1 +1,34 @@
|
|
|
1
|
-
export
|
|
1
|
+
export function buildRelayReturnAddress(input) {
|
|
2
|
+
const next = {
|
|
3
|
+
actorId: input.actorId,
|
|
4
|
+
handle: input.handle.trim(),
|
|
5
|
+
};
|
|
6
|
+
if (input.displayName?.trim()) {
|
|
7
|
+
next.displayName = input.displayName.trim();
|
|
8
|
+
}
|
|
9
|
+
if (input.selector?.trim()) {
|
|
10
|
+
next.selector = input.selector.trim();
|
|
11
|
+
}
|
|
12
|
+
if (input.defaultSelector?.trim()) {
|
|
13
|
+
next.defaultSelector = input.defaultSelector.trim();
|
|
14
|
+
}
|
|
15
|
+
if (input.conversationId?.trim()) {
|
|
16
|
+
next.conversationId = input.conversationId.trim();
|
|
17
|
+
}
|
|
18
|
+
if (input.replyToMessageId?.trim()) {
|
|
19
|
+
next.replyToMessageId = input.replyToMessageId.trim();
|
|
20
|
+
}
|
|
21
|
+
if (input.nodeId?.trim()) {
|
|
22
|
+
next.nodeId = input.nodeId.trim();
|
|
23
|
+
}
|
|
24
|
+
if (input.projectRoot?.trim()) {
|
|
25
|
+
next.projectRoot = input.projectRoot.trim();
|
|
26
|
+
}
|
|
27
|
+
if (input.sessionId?.trim()) {
|
|
28
|
+
next.sessionId = input.sessionId.trim();
|
|
29
|
+
}
|
|
30
|
+
if (input.metadata && Object.keys(input.metadata).length > 0) {
|
|
31
|
+
next.metadata = input.metadata;
|
|
32
|
+
}
|
|
33
|
+
return next;
|
|
34
|
+
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./agent-identity.js";
|
|
|
4
4
|
export * from "./agent-address.js";
|
|
5
5
|
export * from "./agent-selectors.js";
|
|
6
6
|
export * from "./scout-agent-card.js";
|
|
7
|
+
export * from "./relay-agent-card.js";
|
|
7
8
|
export * from "./mesh.js";
|
|
8
9
|
export * from "./conversations.js";
|
|
9
10
|
export * from "./collaboration.js";
|
package/src/relay-agent-card.ts
CHANGED
|
@@ -1 +1,74 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AgentEndpoint, AgentHarness } from "./actors.js";
|
|
2
|
+
import type { MetadataMap, ScoutId } from "./common.js";
|
|
3
|
+
|
|
4
|
+
export interface RelayReturnAddress {
|
|
5
|
+
actorId: ScoutId;
|
|
6
|
+
handle: string;
|
|
7
|
+
displayName?: string;
|
|
8
|
+
selector?: string;
|
|
9
|
+
defaultSelector?: string;
|
|
10
|
+
conversationId?: ScoutId;
|
|
11
|
+
replyToMessageId?: ScoutId;
|
|
12
|
+
nodeId?: ScoutId;
|
|
13
|
+
projectRoot?: string;
|
|
14
|
+
sessionId?: string;
|
|
15
|
+
metadata?: MetadataMap;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface RelayAgentCard {
|
|
19
|
+
id: ScoutId;
|
|
20
|
+
agentId: ScoutId;
|
|
21
|
+
definitionId: ScoutId;
|
|
22
|
+
displayName: string;
|
|
23
|
+
handle: string;
|
|
24
|
+
selector?: string;
|
|
25
|
+
defaultSelector?: string;
|
|
26
|
+
projectName?: string;
|
|
27
|
+
projectRoot: string;
|
|
28
|
+
currentDirectory: string;
|
|
29
|
+
harness: AgentHarness;
|
|
30
|
+
transport: AgentEndpoint["transport"];
|
|
31
|
+
sessionId?: string;
|
|
32
|
+
branch?: string;
|
|
33
|
+
createdAt: number;
|
|
34
|
+
createdById?: ScoutId;
|
|
35
|
+
brokerRegistered: boolean;
|
|
36
|
+
inboxConversationId?: ScoutId;
|
|
37
|
+
returnAddress: RelayReturnAddress;
|
|
38
|
+
metadata?: MetadataMap;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function buildRelayReturnAddress(input: RelayReturnAddress): RelayReturnAddress {
|
|
42
|
+
const next: RelayReturnAddress = {
|
|
43
|
+
actorId: input.actorId,
|
|
44
|
+
handle: input.handle.trim(),
|
|
45
|
+
};
|
|
46
|
+
if (input.displayName?.trim()) {
|
|
47
|
+
next.displayName = input.displayName.trim();
|
|
48
|
+
}
|
|
49
|
+
if (input.selector?.trim()) {
|
|
50
|
+
next.selector = input.selector.trim();
|
|
51
|
+
}
|
|
52
|
+
if (input.defaultSelector?.trim()) {
|
|
53
|
+
next.defaultSelector = input.defaultSelector.trim();
|
|
54
|
+
}
|
|
55
|
+
if (input.conversationId?.trim()) {
|
|
56
|
+
next.conversationId = input.conversationId.trim();
|
|
57
|
+
}
|
|
58
|
+
if (input.replyToMessageId?.trim()) {
|
|
59
|
+
next.replyToMessageId = input.replyToMessageId.trim();
|
|
60
|
+
}
|
|
61
|
+
if (input.nodeId?.trim()) {
|
|
62
|
+
next.nodeId = input.nodeId.trim();
|
|
63
|
+
}
|
|
64
|
+
if (input.projectRoot?.trim()) {
|
|
65
|
+
next.projectRoot = input.projectRoot.trim();
|
|
66
|
+
}
|
|
67
|
+
if (input.sessionId?.trim()) {
|
|
68
|
+
next.sessionId = input.sessionId.trim();
|
|
69
|
+
}
|
|
70
|
+
if (input.metadata && Object.keys(input.metadata).length > 0) {
|
|
71
|
+
next.metadata = input.metadata;
|
|
72
|
+
}
|
|
73
|
+
return next;
|
|
74
|
+
}
|