gopherhole_openclaw_a2a 0.2.2 → 0.2.3
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/src/connection.js +38 -3
- package/dist/src/types.d.ts +12 -2
- package/package.json +1 -1
- package/src/connection.ts +38 -3
- package/src/types.ts +13 -2
package/dist/src/connection.js
CHANGED
|
@@ -34,9 +34,44 @@ export class A2AConnectionManager {
|
|
|
34
34
|
maxReconnectAttempts: 20,
|
|
35
35
|
requestTimeout: timeoutMs,
|
|
36
36
|
messageTimeout: timeoutMs,
|
|
37
|
-
agentCard: {
|
|
38
|
-
name: this.config.agentName ?? '
|
|
39
|
-
description: '
|
|
37
|
+
agentCard: gphConfig.agentCard ?? {
|
|
38
|
+
name: this.config.agentName ?? 'OpenClaw',
|
|
39
|
+
description: 'Personal AI assistant with tools, web search, browser control, and various skills',
|
|
40
|
+
version: '0.1.0',
|
|
41
|
+
skills: [
|
|
42
|
+
{
|
|
43
|
+
id: 'chat',
|
|
44
|
+
name: 'Chat',
|
|
45
|
+
description: 'General conversation and Q&A',
|
|
46
|
+
tags: ['conversation', 'assistant'],
|
|
47
|
+
inputModes: ['text/plain'],
|
|
48
|
+
outputModes: ['text/plain', 'text/markdown'],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'web-search',
|
|
52
|
+
name: 'Web Search',
|
|
53
|
+
description: 'Search the web and summarize results',
|
|
54
|
+
tags: ['search', 'research', 'web'],
|
|
55
|
+
inputModes: ['text/plain'],
|
|
56
|
+
outputModes: ['text/plain', 'text/markdown'],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'coding',
|
|
60
|
+
name: 'Coding',
|
|
61
|
+
description: 'Write, review, and debug code',
|
|
62
|
+
tags: ['code', 'programming', 'development'],
|
|
63
|
+
inputModes: ['text/plain'],
|
|
64
|
+
outputModes: ['text/plain', 'text/markdown'],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'files',
|
|
68
|
+
name: 'File Operations',
|
|
69
|
+
description: 'Read, write, and manage files',
|
|
70
|
+
tags: ['files', 'documents'],
|
|
71
|
+
inputModes: ['text/plain', 'application/pdf', 'image/*'],
|
|
72
|
+
outputModes: ['text/plain', 'text/markdown'],
|
|
73
|
+
},
|
|
74
|
+
],
|
|
40
75
|
},
|
|
41
76
|
});
|
|
42
77
|
// Set up event handlers
|
package/dist/src/types.d.ts
CHANGED
|
@@ -18,12 +18,21 @@ export interface A2AMessage {
|
|
|
18
18
|
status?: 'working' | 'completed' | 'failed' | 'canceled';
|
|
19
19
|
error?: string;
|
|
20
20
|
}
|
|
21
|
-
export interface
|
|
21
|
+
export interface A2ASkill {
|
|
22
22
|
id: string;
|
|
23
23
|
name: string;
|
|
24
24
|
description?: string;
|
|
25
|
-
|
|
25
|
+
tags?: string[];
|
|
26
|
+
examples?: string[];
|
|
27
|
+
inputModes?: string[];
|
|
28
|
+
outputModes?: string[];
|
|
29
|
+
}
|
|
30
|
+
export interface A2AAgentCard {
|
|
31
|
+
name: string;
|
|
32
|
+
description?: string;
|
|
26
33
|
url?: string;
|
|
34
|
+
version?: string;
|
|
35
|
+
skills?: A2ASkill[];
|
|
27
36
|
}
|
|
28
37
|
export interface A2AResponse {
|
|
29
38
|
text: string;
|
|
@@ -45,6 +54,7 @@ export interface A2AChannelConfig {
|
|
|
45
54
|
apiKey: string;
|
|
46
55
|
hubUrl?: string;
|
|
47
56
|
requestTimeoutMs?: number;
|
|
57
|
+
agentCard?: A2AAgentCard;
|
|
48
58
|
};
|
|
49
59
|
auth?: {
|
|
50
60
|
token?: string;
|
package/package.json
CHANGED
package/src/connection.ts
CHANGED
|
@@ -49,9 +49,44 @@ export class A2AConnectionManager {
|
|
|
49
49
|
maxReconnectAttempts: 20,
|
|
50
50
|
requestTimeout: timeoutMs,
|
|
51
51
|
messageTimeout: timeoutMs,
|
|
52
|
-
agentCard: {
|
|
53
|
-
name: this.config.agentName ?? '
|
|
54
|
-
description: '
|
|
52
|
+
agentCard: gphConfig.agentCard ?? {
|
|
53
|
+
name: this.config.agentName ?? 'OpenClaw',
|
|
54
|
+
description: 'Personal AI assistant with tools, web search, browser control, and various skills',
|
|
55
|
+
version: '0.1.0',
|
|
56
|
+
skills: [
|
|
57
|
+
{
|
|
58
|
+
id: 'chat',
|
|
59
|
+
name: 'Chat',
|
|
60
|
+
description: 'General conversation and Q&A',
|
|
61
|
+
tags: ['conversation', 'assistant'],
|
|
62
|
+
inputModes: ['text/plain'],
|
|
63
|
+
outputModes: ['text/plain', 'text/markdown'],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'web-search',
|
|
67
|
+
name: 'Web Search',
|
|
68
|
+
description: 'Search the web and summarize results',
|
|
69
|
+
tags: ['search', 'research', 'web'],
|
|
70
|
+
inputModes: ['text/plain'],
|
|
71
|
+
outputModes: ['text/plain', 'text/markdown'],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 'coding',
|
|
75
|
+
name: 'Coding',
|
|
76
|
+
description: 'Write, review, and debug code',
|
|
77
|
+
tags: ['code', 'programming', 'development'],
|
|
78
|
+
inputModes: ['text/plain'],
|
|
79
|
+
outputModes: ['text/plain', 'text/markdown'],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: 'files',
|
|
83
|
+
name: 'File Operations',
|
|
84
|
+
description: 'Read, write, and manage files',
|
|
85
|
+
tags: ['files', 'documents'],
|
|
86
|
+
inputModes: ['text/plain', 'application/pdf', 'image/*'],
|
|
87
|
+
outputModes: ['text/plain', 'text/markdown'],
|
|
88
|
+
},
|
|
89
|
+
],
|
|
55
90
|
},
|
|
56
91
|
});
|
|
57
92
|
|
package/src/types.ts
CHANGED
|
@@ -15,12 +15,22 @@ export interface A2AMessage {
|
|
|
15
15
|
error?: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export interface
|
|
18
|
+
export interface A2ASkill {
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
21
|
description?: string;
|
|
22
|
-
|
|
22
|
+
tags?: string[];
|
|
23
|
+
examples?: string[];
|
|
24
|
+
inputModes?: string[];
|
|
25
|
+
outputModes?: string[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface A2AAgentCard {
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
23
31
|
url?: string;
|
|
32
|
+
version?: string;
|
|
33
|
+
skills?: A2ASkill[];
|
|
24
34
|
}
|
|
25
35
|
|
|
26
36
|
export interface A2AResponse {
|
|
@@ -44,6 +54,7 @@ export interface A2AChannelConfig {
|
|
|
44
54
|
apiKey: string;
|
|
45
55
|
hubUrl?: string; // Default: wss://gopherhole.ai/ws
|
|
46
56
|
requestTimeoutMs?: number;
|
|
57
|
+
agentCard?: A2AAgentCard; // Custom agent card (overrides defaults)
|
|
47
58
|
};
|
|
48
59
|
auth?: {
|
|
49
60
|
token?: string;
|