agentalk 0.1.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.
@@ -0,0 +1,149 @@
1
+ export type TaskState = "TASK_STATE_UNSPECIFIED" | "TASK_STATE_SUBMITTED" | "TASK_STATE_WORKING" | "TASK_STATE_COMPLETED" | "TASK_STATE_FAILED" | "TASK_STATE_CANCELED" | "TASK_STATE_INPUT_REQUIRED" | "TASK_STATE_REJECTED" | "TASK_STATE_AUTH_REQUIRED";
2
+ export type Role = "ROLE_UNSPECIFIED" | "ROLE_USER" | "ROLE_AGENT";
3
+ export interface Part {
4
+ text?: string;
5
+ data?: unknown;
6
+ raw?: string;
7
+ url?: string;
8
+ filename?: string;
9
+ mediaType?: string;
10
+ metadata?: Record<string, unknown>;
11
+ }
12
+ export interface Message {
13
+ messageId: string;
14
+ role: Role;
15
+ parts: Part[];
16
+ contextId?: string;
17
+ taskId?: string;
18
+ referenceTaskIds?: string[];
19
+ extensions?: string[];
20
+ metadata?: Record<string, unknown>;
21
+ }
22
+ export interface TaskStatus {
23
+ state: TaskState;
24
+ message?: Message;
25
+ timestamp?: string;
26
+ }
27
+ export interface Artifact {
28
+ artifactId: string;
29
+ name?: string;
30
+ description?: string;
31
+ parts: Part[];
32
+ extensions?: string[];
33
+ metadata?: Record<string, unknown>;
34
+ }
35
+ export interface Task {
36
+ id: string;
37
+ contextId?: string;
38
+ status: TaskStatus;
39
+ artifacts?: Artifact[];
40
+ history?: Message[];
41
+ metadata?: Record<string, unknown>;
42
+ }
43
+ export interface AgentProvider {
44
+ organization: string;
45
+ url?: string;
46
+ }
47
+ export interface AgentSkill {
48
+ id: string;
49
+ name: string;
50
+ description?: string;
51
+ tags?: string[];
52
+ examples?: string[];
53
+ inputModes?: string[];
54
+ outputModes?: string[];
55
+ }
56
+ export interface AgentExtension {
57
+ uri: string;
58
+ description?: string;
59
+ required?: boolean;
60
+ params?: Record<string, unknown>;
61
+ }
62
+ export interface AgentInterface {
63
+ url: string;
64
+ protocolBinding: string;
65
+ protocolVersion?: string;
66
+ tenant?: string;
67
+ }
68
+ export interface AgentCapabilities {
69
+ streaming?: boolean;
70
+ pushNotifications?: boolean;
71
+ extendedAgentCard?: boolean;
72
+ extensions?: AgentExtension[];
73
+ }
74
+ export interface AgentCard {
75
+ name: string;
76
+ description?: string;
77
+ version?: string;
78
+ provider?: AgentProvider;
79
+ capabilities?: AgentCapabilities;
80
+ skills?: AgentSkill[];
81
+ defaultInputModes?: string[];
82
+ defaultOutputModes?: string[];
83
+ supportedInterfaces?: AgentInterface[];
84
+ iconUrl?: string;
85
+ documentationUrl?: string;
86
+ securitySchemes?: Record<string, unknown>;
87
+ securityRequirements?: Record<string, unknown>[];
88
+ signatures?: unknown[];
89
+ }
90
+ export interface SendMessageConfiguration {
91
+ acceptedOutputModes?: string[];
92
+ historyLength?: number;
93
+ returnImmediately?: boolean;
94
+ }
95
+ export interface SendMessageRequest {
96
+ message: Message;
97
+ configuration?: SendMessageConfiguration;
98
+ metadata?: Record<string, unknown>;
99
+ tenant?: string;
100
+ }
101
+ export interface SendMessageResponse {
102
+ task?: Task;
103
+ message?: Message;
104
+ }
105
+ export interface GetTaskRequest {
106
+ id: string;
107
+ historyLength?: number;
108
+ tenant?: string;
109
+ }
110
+ export interface CancelTaskRequest {
111
+ id: string;
112
+ metadata?: Record<string, unknown>;
113
+ tenant?: string;
114
+ }
115
+ export interface ListTasksRequest {
116
+ contextId?: string;
117
+ status?: TaskState;
118
+ historyLength?: number;
119
+ includeArtifacts?: boolean;
120
+ pageSize?: number;
121
+ pageToken?: string;
122
+ tenant?: string;
123
+ }
124
+ export interface ListTasksResponse {
125
+ tasks: Task[];
126
+ nextPageToken?: string;
127
+ pageSize?: number;
128
+ totalSize?: number;
129
+ }
130
+ export interface TaskStatusUpdateEvent {
131
+ taskId: string;
132
+ contextId?: string;
133
+ status: TaskStatus;
134
+ metadata?: Record<string, unknown>;
135
+ }
136
+ export interface TaskArtifactUpdateEvent {
137
+ taskId: string;
138
+ contextId?: string;
139
+ artifact: Artifact;
140
+ append?: boolean;
141
+ lastChunk?: boolean;
142
+ metadata?: Record<string, unknown>;
143
+ }
144
+ export interface StreamResponse {
145
+ message?: Message;
146
+ task?: Task;
147
+ statusUpdate?: TaskStatusUpdateEvent;
148
+ artifactUpdate?: TaskArtifactUpdateEvent;
149
+ }
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ // A2A Protocol v1.0 Types
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,0BAA0B"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "agentalk",
3
+ "version": "0.1.0",
4
+ "description": "A2A Protocol CLI client — discover and interact with A2A agents",
5
+ "type": "module",
6
+ "bin": {
7
+ "agentalk": "./dist/cli.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "!dist/test"
12
+ ],
13
+ "keywords": [
14
+ "a2a",
15
+ "agent",
16
+ "cli",
17
+ "agent-to-agent",
18
+ "agentalk"
19
+ ],
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/IchenDEV/agentalk.git"
23
+ },
24
+ "license": "MIT",
25
+ "dependencies": {
26
+ "chalk": "^5.3.0",
27
+ "commander": "^12.1.0",
28
+ "eventsource-parser": "^3.0.0"
29
+ },
30
+ "devDependencies": {
31
+ "@types/node": "^22.0.0",
32
+ "typescript": "^5.7.0"
33
+ },
34
+ "scripts": {
35
+ "build": "tsc",
36
+ "dev": "tsc --watch",
37
+ "start": "node dist/cli.js",
38
+ "test": "node --test dist/test/**/*.test.js"
39
+ }
40
+ }