@openscout/protocol 0.2.50 → 0.2.52

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/README.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  This package is intentionally not named `relay`. Relay is now a surface and compatibility layer. The control protocol is the canonical model underneath it.
6
6
 
7
+ For the definitive Scout glossary, see [docs/glossary.md](../../docs/glossary.md). For Scout's current A2A posture and vocabulary mapping, see [docs/a2a-alignment.md](../../docs/a2a-alignment.md).
8
+
9
+ Scout is aware of adjacent standards such as A2A, but this package is not trying to become an A2A clone. The goal is clean correspondence without giving up Scout-specific mechanics such as broker-owned routing, `invocation` plus `flight`, or the `question` / `work_item` collaboration model.
10
+
7
11
  ## What Makes This A Good Local Communication Protocol
8
12
 
9
13
  The target is a protocol that is:
@@ -32,6 +36,8 @@ The protocol keeps a small set of nouns and gives each one a single job:
32
36
  - `binding`: a mapping from an OpenScout conversation to an external thread or channel
33
37
  - `event`: an append-only fact emitted whenever one of the durable records changes
34
38
 
39
+ For discovery, Scout also uses a `ScoutAgentCard`: a local discovery and routing card that overlaps intentionally with A2A-style discovery fields such as provider, skills, supported interfaces, and security hints without claiming to be the A2A wire-level `AgentCard`.
40
+
35
41
  ## Emerging Collaboration Model
36
42
 
37
43
  The protocol package now also exports a collaboration vocabulary for the next layer above
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export * from "./actors.js";
3
3
  export * from "./agent-identity.js";
4
4
  export * from "./agent-address.js";
5
5
  export * from "./agent-selectors.js";
6
- export * from "./relay-agent-card.js";
6
+ export * from "./scout-agent-card.js";
7
7
  export * from "./mesh.js";
8
8
  export * from "./conversations.js";
9
9
  export * from "./collaboration.js";
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ export * from "./actors.js";
3
3
  export * from "./agent-identity.js";
4
4
  export * from "./agent-address.js";
5
5
  export * from "./agent-selectors.js";
6
- export * from "./relay-agent-card.js";
6
+ export * from "./scout-agent-card.js";
7
7
  export * from "./mesh.js";
8
8
  export * from "./conversations.js";
9
9
  export * from "./collaboration.js";
@@ -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;
1
+ export * from "./scout-agent-card.js";
@@ -1,34 +1 @@
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
- }
1
+ export * from "./scout-agent-card.js";
@@ -0,0 +1,81 @@
1
+ import type { AgentEndpoint, AgentHarness } from "./actors.js";
2
+ import type { MetadataMap, ScoutId } from "./common.js";
3
+ export interface ScoutAgentProvider {
4
+ organization?: string;
5
+ url?: string;
6
+ }
7
+ export interface ScoutAgentSkill {
8
+ id?: string;
9
+ name: string;
10
+ description?: string;
11
+ tags?: string[];
12
+ examples?: string[];
13
+ }
14
+ export interface ScoutSupportedInterface {
15
+ protocol: string;
16
+ transport?: string;
17
+ url?: string;
18
+ description?: string;
19
+ }
20
+ export interface ScoutSecurityScheme {
21
+ type: string;
22
+ description?: string;
23
+ name?: string;
24
+ in?: string;
25
+ scheme?: string;
26
+ bearerFormat?: string;
27
+ openIdConnectUrl?: string;
28
+ }
29
+ export interface ScoutReturnAddress {
30
+ actorId: ScoutId;
31
+ handle: string;
32
+ displayName?: string;
33
+ selector?: string;
34
+ defaultSelector?: string;
35
+ conversationId?: ScoutId;
36
+ replyToMessageId?: ScoutId;
37
+ nodeId?: ScoutId;
38
+ projectRoot?: string;
39
+ sessionId?: string;
40
+ metadata?: MetadataMap;
41
+ }
42
+ /**
43
+ * Scout's local discovery and routing card for one addressable agent target.
44
+ *
45
+ * This is intentionally not the A2A wire-level `AgentCard`, but it overlaps
46
+ * with A2A on discovery-oriented fields such as provider, skills, interfaces,
47
+ * and security hints so Scout can project cleanly to adjacent protocols later.
48
+ */
49
+ export interface ScoutAgentCard {
50
+ id: ScoutId;
51
+ agentId: ScoutId;
52
+ definitionId: ScoutId;
53
+ displayName: string;
54
+ description?: string;
55
+ provider?: ScoutAgentProvider;
56
+ version?: string;
57
+ documentationUrl?: string;
58
+ skills?: ScoutAgentSkill[];
59
+ defaultInputModes?: string[];
60
+ defaultOutputModes?: string[];
61
+ supportedInterfaces?: ScoutSupportedInterface[];
62
+ securitySchemes?: Record<string, ScoutSecurityScheme>;
63
+ securityRequirements?: string[][];
64
+ handle: string;
65
+ selector?: string;
66
+ defaultSelector?: string;
67
+ projectName?: string;
68
+ projectRoot: string;
69
+ currentDirectory: string;
70
+ harness: AgentHarness;
71
+ transport: AgentEndpoint["transport"];
72
+ sessionId?: string;
73
+ branch?: string;
74
+ createdAt: number;
75
+ createdById?: ScoutId;
76
+ brokerRegistered: boolean;
77
+ inboxConversationId?: ScoutId;
78
+ returnAddress: ScoutReturnAddress;
79
+ metadata?: MetadataMap;
80
+ }
81
+ export declare function buildScoutReturnAddress(input: ScoutReturnAddress): ScoutReturnAddress;
@@ -0,0 +1,34 @@
1
+ export function buildScoutReturnAddress(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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openscout/protocol",
3
- "version": "0.2.50",
3
+ "version": "0.2.52",
4
4
  "description": "Typed protocol for the OpenScout local control plane",
5
5
  "type": "module",
6
6
  "exports": {
package/src/index.ts CHANGED
@@ -3,7 +3,7 @@ export * from "./actors.js";
3
3
  export * from "./agent-identity.js";
4
4
  export * from "./agent-address.js";
5
5
  export * from "./agent-selectors.js";
6
- export * from "./relay-agent-card.js";
6
+ export * from "./scout-agent-card.js";
7
7
  export * from "./mesh.js";
8
8
  export * from "./conversations.js";
9
9
  export * from "./collaboration.js";
@@ -1,76 +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
-
47
- if (input.displayName?.trim()) {
48
- next.displayName = input.displayName.trim();
49
- }
50
- if (input.selector?.trim()) {
51
- next.selector = input.selector.trim();
52
- }
53
- if (input.defaultSelector?.trim()) {
54
- next.defaultSelector = input.defaultSelector.trim();
55
- }
56
- if (input.conversationId?.trim()) {
57
- next.conversationId = input.conversationId.trim();
58
- }
59
- if (input.replyToMessageId?.trim()) {
60
- next.replyToMessageId = input.replyToMessageId.trim();
61
- }
62
- if (input.nodeId?.trim()) {
63
- next.nodeId = input.nodeId.trim();
64
- }
65
- if (input.projectRoot?.trim()) {
66
- next.projectRoot = input.projectRoot.trim();
67
- }
68
- if (input.sessionId?.trim()) {
69
- next.sessionId = input.sessionId.trim();
70
- }
71
- if (input.metadata && Object.keys(input.metadata).length > 0) {
72
- next.metadata = input.metadata;
73
- }
74
-
75
- return next;
76
- }
1
+ export * from "./scout-agent-card.js";
@@ -1,10 +1,10 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
 
3
- import { buildRelayReturnAddress } from "./relay-agent-card";
3
+ import { buildScoutReturnAddress } from "./scout-agent-card";
4
4
 
5
- describe("buildRelayReturnAddress", () => {
5
+ describe("buildScoutReturnAddress", () => {
6
6
  test("keeps only meaningful optional fields", () => {
7
- const address = buildRelayReturnAddress({
7
+ const address = buildScoutReturnAddress({
8
8
  actorId: "dewey.node.workspace",
9
9
  handle: "dewey",
10
10
  displayName: "Dewey",
@@ -38,7 +38,7 @@ describe("buildRelayReturnAddress", () => {
38
38
  });
39
39
 
40
40
  test("drops empty optional fields", () => {
41
- const address = buildRelayReturnAddress({
41
+ const address = buildScoutReturnAddress({
42
42
  actorId: "arc",
43
43
  handle: "arc",
44
44
  displayName: " ",
@@ -0,0 +1,123 @@
1
+ import type { AgentEndpoint, AgentHarness } from "./actors.js";
2
+ import type { MetadataMap, ScoutId } from "./common.js";
3
+
4
+ export interface ScoutAgentProvider {
5
+ organization?: string;
6
+ url?: string;
7
+ }
8
+
9
+ export interface ScoutAgentSkill {
10
+ id?: string;
11
+ name: string;
12
+ description?: string;
13
+ tags?: string[];
14
+ examples?: string[];
15
+ }
16
+
17
+ export interface ScoutSupportedInterface {
18
+ protocol: string;
19
+ transport?: string;
20
+ url?: string;
21
+ description?: string;
22
+ }
23
+
24
+ export interface ScoutSecurityScheme {
25
+ type: string;
26
+ description?: string;
27
+ name?: string;
28
+ in?: string;
29
+ scheme?: string;
30
+ bearerFormat?: string;
31
+ openIdConnectUrl?: string;
32
+ }
33
+
34
+ export interface ScoutReturnAddress {
35
+ actorId: ScoutId;
36
+ handle: string;
37
+ displayName?: string;
38
+ selector?: string;
39
+ defaultSelector?: string;
40
+ conversationId?: ScoutId;
41
+ replyToMessageId?: ScoutId;
42
+ nodeId?: ScoutId;
43
+ projectRoot?: string;
44
+ sessionId?: string;
45
+ metadata?: MetadataMap;
46
+ }
47
+
48
+ /**
49
+ * Scout's local discovery and routing card for one addressable agent target.
50
+ *
51
+ * This is intentionally not the A2A wire-level `AgentCard`, but it overlaps
52
+ * with A2A on discovery-oriented fields such as provider, skills, interfaces,
53
+ * and security hints so Scout can project cleanly to adjacent protocols later.
54
+ */
55
+ export interface ScoutAgentCard {
56
+ id: ScoutId;
57
+ agentId: ScoutId;
58
+ definitionId: ScoutId;
59
+ displayName: string;
60
+ description?: string;
61
+ provider?: ScoutAgentProvider;
62
+ version?: string;
63
+ documentationUrl?: string;
64
+ skills?: ScoutAgentSkill[];
65
+ defaultInputModes?: string[];
66
+ defaultOutputModes?: string[];
67
+ supportedInterfaces?: ScoutSupportedInterface[];
68
+ securitySchemes?: Record<string, ScoutSecurityScheme>;
69
+ securityRequirements?: string[][];
70
+ handle: string;
71
+ selector?: string;
72
+ defaultSelector?: string;
73
+ projectName?: string;
74
+ projectRoot: string;
75
+ currentDirectory: string;
76
+ harness: AgentHarness;
77
+ transport: AgentEndpoint["transport"];
78
+ sessionId?: string;
79
+ branch?: string;
80
+ createdAt: number;
81
+ createdById?: ScoutId;
82
+ brokerRegistered: boolean;
83
+ inboxConversationId?: ScoutId;
84
+ returnAddress: ScoutReturnAddress;
85
+ metadata?: MetadataMap;
86
+ }
87
+
88
+ export function buildScoutReturnAddress(input: ScoutReturnAddress): ScoutReturnAddress {
89
+ const next: ScoutReturnAddress = {
90
+ actorId: input.actorId,
91
+ handle: input.handle.trim(),
92
+ };
93
+
94
+ if (input.displayName?.trim()) {
95
+ next.displayName = input.displayName.trim();
96
+ }
97
+ if (input.selector?.trim()) {
98
+ next.selector = input.selector.trim();
99
+ }
100
+ if (input.defaultSelector?.trim()) {
101
+ next.defaultSelector = input.defaultSelector.trim();
102
+ }
103
+ if (input.conversationId?.trim()) {
104
+ next.conversationId = input.conversationId.trim();
105
+ }
106
+ if (input.replyToMessageId?.trim()) {
107
+ next.replyToMessageId = input.replyToMessageId.trim();
108
+ }
109
+ if (input.nodeId?.trim()) {
110
+ next.nodeId = input.nodeId.trim();
111
+ }
112
+ if (input.projectRoot?.trim()) {
113
+ next.projectRoot = input.projectRoot.trim();
114
+ }
115
+ if (input.sessionId?.trim()) {
116
+ next.sessionId = input.sessionId.trim();
117
+ }
118
+ if (input.metadata && Object.keys(input.metadata).length > 0) {
119
+ next.metadata = input.metadata;
120
+ }
121
+
122
+ return next;
123
+ }