@atmaticai/agent-tools-a2a 1.0.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.
- package/dist/index.d.mts +169 -0
- package/dist/index.d.ts +169 -0
- package/package.json +37 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
interface AgentCard {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
url: string;
|
|
5
|
+
version: string;
|
|
6
|
+
provider?: {
|
|
7
|
+
organization: string;
|
|
8
|
+
url: string;
|
|
9
|
+
};
|
|
10
|
+
capabilities: {
|
|
11
|
+
streaming: boolean;
|
|
12
|
+
pushNotifications: boolean;
|
|
13
|
+
stateTransitionHistory?: boolean;
|
|
14
|
+
};
|
|
15
|
+
authentication?: {
|
|
16
|
+
schemes: string[];
|
|
17
|
+
};
|
|
18
|
+
defaultInputModes: string[];
|
|
19
|
+
defaultOutputModes: string[];
|
|
20
|
+
skills: Skill[];
|
|
21
|
+
}
|
|
22
|
+
interface Skill {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
tags?: string[];
|
|
27
|
+
examples?: string[];
|
|
28
|
+
inputModes?: string[];
|
|
29
|
+
outputModes?: string[];
|
|
30
|
+
}
|
|
31
|
+
type TaskState = 'submitted' | 'working' | 'input-required' | 'completed' | 'failed' | 'canceled';
|
|
32
|
+
interface Task {
|
|
33
|
+
id: string;
|
|
34
|
+
sessionId?: string;
|
|
35
|
+
status: TaskStatus;
|
|
36
|
+
artifacts?: Artifact[];
|
|
37
|
+
history?: Message[];
|
|
38
|
+
}
|
|
39
|
+
interface TaskStatus {
|
|
40
|
+
state: TaskState;
|
|
41
|
+
message?: Message;
|
|
42
|
+
timestamp: string;
|
|
43
|
+
}
|
|
44
|
+
interface Message {
|
|
45
|
+
role: 'user' | 'agent';
|
|
46
|
+
parts: Part[];
|
|
47
|
+
}
|
|
48
|
+
type Part = TextPart | FilePart | DataPart;
|
|
49
|
+
interface TextPart {
|
|
50
|
+
type: 'text';
|
|
51
|
+
text: string;
|
|
52
|
+
}
|
|
53
|
+
interface FilePart {
|
|
54
|
+
type: 'file';
|
|
55
|
+
file: {
|
|
56
|
+
name?: string;
|
|
57
|
+
mimeType?: string;
|
|
58
|
+
bytes?: string;
|
|
59
|
+
uri?: string;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
interface DataPart {
|
|
63
|
+
type: 'data';
|
|
64
|
+
data: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
interface Artifact {
|
|
67
|
+
name?: string;
|
|
68
|
+
description?: string;
|
|
69
|
+
parts: Part[];
|
|
70
|
+
index: number;
|
|
71
|
+
append?: boolean;
|
|
72
|
+
lastChunk?: boolean;
|
|
73
|
+
}
|
|
74
|
+
interface TaskSendParams {
|
|
75
|
+
id: string;
|
|
76
|
+
sessionId?: string;
|
|
77
|
+
message: Message;
|
|
78
|
+
acceptedOutputModes?: string[];
|
|
79
|
+
pushNotification?: PushNotificationConfig;
|
|
80
|
+
historyLength?: number;
|
|
81
|
+
metadata?: Record<string, unknown>;
|
|
82
|
+
}
|
|
83
|
+
interface TaskCreateParams {
|
|
84
|
+
skill: string;
|
|
85
|
+
input: TaskInput;
|
|
86
|
+
sessionId?: string;
|
|
87
|
+
}
|
|
88
|
+
interface TaskInput {
|
|
89
|
+
action: string;
|
|
90
|
+
data?: unknown;
|
|
91
|
+
options?: Record<string, unknown>;
|
|
92
|
+
}
|
|
93
|
+
interface PushNotificationConfig {
|
|
94
|
+
url: string;
|
|
95
|
+
token?: string;
|
|
96
|
+
}
|
|
97
|
+
interface TaskQueryParams {
|
|
98
|
+
id: string;
|
|
99
|
+
historyLength?: number;
|
|
100
|
+
}
|
|
101
|
+
interface TaskCancelParams {
|
|
102
|
+
id: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare function getAgentCard(baseUrl: string): Promise<AgentCard>;
|
|
106
|
+
declare function createTask(params: TaskCreateParams): Promise<Task>;
|
|
107
|
+
declare function getTask(params: TaskQueryParams): Task | null;
|
|
108
|
+
declare function cancelTask(params: TaskCancelParams): Task | null;
|
|
109
|
+
declare function listTasks(): Task[];
|
|
110
|
+
declare function clearCompletedTasks(): number;
|
|
111
|
+
|
|
112
|
+
declare const jsonSkill: Skill;
|
|
113
|
+
declare function handleJsonSkill(input: TaskInput): Promise<Part[]>;
|
|
114
|
+
|
|
115
|
+
declare const csvSkill: Skill;
|
|
116
|
+
declare function handleCsvSkill(input: TaskInput): Promise<Part[]>;
|
|
117
|
+
|
|
118
|
+
declare const pdfSkill: Skill;
|
|
119
|
+
declare function handlePdfSkill(input: TaskInput): Promise<Part[]>;
|
|
120
|
+
|
|
121
|
+
declare const xmlSkill: Skill;
|
|
122
|
+
declare function handleXmlSkill(input: TaskInput): Promise<Part[]>;
|
|
123
|
+
|
|
124
|
+
declare const excelSkill: Skill;
|
|
125
|
+
declare function handleExcelSkill(input: TaskInput): Promise<Part[]>;
|
|
126
|
+
|
|
127
|
+
declare const imageSkill: Skill;
|
|
128
|
+
declare function handleImageSkill(input: TaskInput): Promise<Part[]>;
|
|
129
|
+
|
|
130
|
+
declare const markdownSkill: Skill;
|
|
131
|
+
declare function handleMarkdownSkill(input: TaskInput): Promise<Part[]>;
|
|
132
|
+
|
|
133
|
+
declare const archiveSkill: Skill;
|
|
134
|
+
declare function handleArchiveSkill(input: TaskInput): Promise<Part[]>;
|
|
135
|
+
|
|
136
|
+
declare const regexSkill: Skill;
|
|
137
|
+
declare function handleRegexSkill(input: TaskInput): Promise<Part[]>;
|
|
138
|
+
|
|
139
|
+
declare const diffSkill: Skill;
|
|
140
|
+
declare function handleDiffSkill(input: TaskInput): Promise<Part[]>;
|
|
141
|
+
|
|
142
|
+
declare const sqlSkill: Skill;
|
|
143
|
+
declare function handleSqlSkill(input: TaskInput): Promise<Part[]>;
|
|
144
|
+
|
|
145
|
+
declare const cryptoSkill: Skill;
|
|
146
|
+
declare function handleCryptoSkill(input: TaskInput): Promise<Part[]>;
|
|
147
|
+
|
|
148
|
+
declare const datetimeSkill: Skill;
|
|
149
|
+
declare function handleDatetimeSkill(input: TaskInput): Promise<Part[]>;
|
|
150
|
+
|
|
151
|
+
declare const textSkill: Skill;
|
|
152
|
+
declare function handleTextSkill(input: TaskInput): Promise<Part[]>;
|
|
153
|
+
|
|
154
|
+
declare const mathSkill: Skill;
|
|
155
|
+
declare function handleMathSkill(input: TaskInput): Promise<Part[]>;
|
|
156
|
+
|
|
157
|
+
declare const colorSkill: Skill;
|
|
158
|
+
declare function handleColorSkill(input: TaskInput): Promise<Part[]>;
|
|
159
|
+
|
|
160
|
+
declare const physicsSkill: Skill;
|
|
161
|
+
declare function handlePhysicsSkill(input: TaskInput): Promise<Part[]>;
|
|
162
|
+
|
|
163
|
+
declare const structuralSkill: Skill;
|
|
164
|
+
declare function handleStructuralSkill(input: TaskInput): Promise<Part[]>;
|
|
165
|
+
|
|
166
|
+
declare const skills: Skill[];
|
|
167
|
+
declare function handleSkill(skillId: string, input: TaskInput): Promise<Part[]>;
|
|
168
|
+
|
|
169
|
+
export { type AgentCard, type Artifact, type DataPart, type FilePart, type Message, type Part, type PushNotificationConfig, type Skill, type Task, type TaskCancelParams, type TaskCreateParams, type TaskInput, type TaskQueryParams, type TaskSendParams, type TaskState, type TaskStatus, type TextPart, archiveSkill, cancelTask, clearCompletedTasks, colorSkill, createTask, cryptoSkill, csvSkill, datetimeSkill, diffSkill, excelSkill, getAgentCard, getTask, handleArchiveSkill, handleColorSkill, handleCryptoSkill, handleCsvSkill, handleDatetimeSkill, handleDiffSkill, handleExcelSkill, handleImageSkill, handleJsonSkill, handleMarkdownSkill, handleMathSkill, handlePdfSkill, handlePhysicsSkill, handleRegexSkill, handleSkill, handleSqlSkill, handleStructuralSkill, handleTextSkill, handleXmlSkill, imageSkill, jsonSkill, listTasks, markdownSkill, mathSkill, pdfSkill, physicsSkill, regexSkill, skills, sqlSkill, structuralSkill, textSkill, xmlSkill };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
interface AgentCard {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
url: string;
|
|
5
|
+
version: string;
|
|
6
|
+
provider?: {
|
|
7
|
+
organization: string;
|
|
8
|
+
url: string;
|
|
9
|
+
};
|
|
10
|
+
capabilities: {
|
|
11
|
+
streaming: boolean;
|
|
12
|
+
pushNotifications: boolean;
|
|
13
|
+
stateTransitionHistory?: boolean;
|
|
14
|
+
};
|
|
15
|
+
authentication?: {
|
|
16
|
+
schemes: string[];
|
|
17
|
+
};
|
|
18
|
+
defaultInputModes: string[];
|
|
19
|
+
defaultOutputModes: string[];
|
|
20
|
+
skills: Skill[];
|
|
21
|
+
}
|
|
22
|
+
interface Skill {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
tags?: string[];
|
|
27
|
+
examples?: string[];
|
|
28
|
+
inputModes?: string[];
|
|
29
|
+
outputModes?: string[];
|
|
30
|
+
}
|
|
31
|
+
type TaskState = 'submitted' | 'working' | 'input-required' | 'completed' | 'failed' | 'canceled';
|
|
32
|
+
interface Task {
|
|
33
|
+
id: string;
|
|
34
|
+
sessionId?: string;
|
|
35
|
+
status: TaskStatus;
|
|
36
|
+
artifacts?: Artifact[];
|
|
37
|
+
history?: Message[];
|
|
38
|
+
}
|
|
39
|
+
interface TaskStatus {
|
|
40
|
+
state: TaskState;
|
|
41
|
+
message?: Message;
|
|
42
|
+
timestamp: string;
|
|
43
|
+
}
|
|
44
|
+
interface Message {
|
|
45
|
+
role: 'user' | 'agent';
|
|
46
|
+
parts: Part[];
|
|
47
|
+
}
|
|
48
|
+
type Part = TextPart | FilePart | DataPart;
|
|
49
|
+
interface TextPart {
|
|
50
|
+
type: 'text';
|
|
51
|
+
text: string;
|
|
52
|
+
}
|
|
53
|
+
interface FilePart {
|
|
54
|
+
type: 'file';
|
|
55
|
+
file: {
|
|
56
|
+
name?: string;
|
|
57
|
+
mimeType?: string;
|
|
58
|
+
bytes?: string;
|
|
59
|
+
uri?: string;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
interface DataPart {
|
|
63
|
+
type: 'data';
|
|
64
|
+
data: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
interface Artifact {
|
|
67
|
+
name?: string;
|
|
68
|
+
description?: string;
|
|
69
|
+
parts: Part[];
|
|
70
|
+
index: number;
|
|
71
|
+
append?: boolean;
|
|
72
|
+
lastChunk?: boolean;
|
|
73
|
+
}
|
|
74
|
+
interface TaskSendParams {
|
|
75
|
+
id: string;
|
|
76
|
+
sessionId?: string;
|
|
77
|
+
message: Message;
|
|
78
|
+
acceptedOutputModes?: string[];
|
|
79
|
+
pushNotification?: PushNotificationConfig;
|
|
80
|
+
historyLength?: number;
|
|
81
|
+
metadata?: Record<string, unknown>;
|
|
82
|
+
}
|
|
83
|
+
interface TaskCreateParams {
|
|
84
|
+
skill: string;
|
|
85
|
+
input: TaskInput;
|
|
86
|
+
sessionId?: string;
|
|
87
|
+
}
|
|
88
|
+
interface TaskInput {
|
|
89
|
+
action: string;
|
|
90
|
+
data?: unknown;
|
|
91
|
+
options?: Record<string, unknown>;
|
|
92
|
+
}
|
|
93
|
+
interface PushNotificationConfig {
|
|
94
|
+
url: string;
|
|
95
|
+
token?: string;
|
|
96
|
+
}
|
|
97
|
+
interface TaskQueryParams {
|
|
98
|
+
id: string;
|
|
99
|
+
historyLength?: number;
|
|
100
|
+
}
|
|
101
|
+
interface TaskCancelParams {
|
|
102
|
+
id: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare function getAgentCard(baseUrl: string): Promise<AgentCard>;
|
|
106
|
+
declare function createTask(params: TaskCreateParams): Promise<Task>;
|
|
107
|
+
declare function getTask(params: TaskQueryParams): Task | null;
|
|
108
|
+
declare function cancelTask(params: TaskCancelParams): Task | null;
|
|
109
|
+
declare function listTasks(): Task[];
|
|
110
|
+
declare function clearCompletedTasks(): number;
|
|
111
|
+
|
|
112
|
+
declare const jsonSkill: Skill;
|
|
113
|
+
declare function handleJsonSkill(input: TaskInput): Promise<Part[]>;
|
|
114
|
+
|
|
115
|
+
declare const csvSkill: Skill;
|
|
116
|
+
declare function handleCsvSkill(input: TaskInput): Promise<Part[]>;
|
|
117
|
+
|
|
118
|
+
declare const pdfSkill: Skill;
|
|
119
|
+
declare function handlePdfSkill(input: TaskInput): Promise<Part[]>;
|
|
120
|
+
|
|
121
|
+
declare const xmlSkill: Skill;
|
|
122
|
+
declare function handleXmlSkill(input: TaskInput): Promise<Part[]>;
|
|
123
|
+
|
|
124
|
+
declare const excelSkill: Skill;
|
|
125
|
+
declare function handleExcelSkill(input: TaskInput): Promise<Part[]>;
|
|
126
|
+
|
|
127
|
+
declare const imageSkill: Skill;
|
|
128
|
+
declare function handleImageSkill(input: TaskInput): Promise<Part[]>;
|
|
129
|
+
|
|
130
|
+
declare const markdownSkill: Skill;
|
|
131
|
+
declare function handleMarkdownSkill(input: TaskInput): Promise<Part[]>;
|
|
132
|
+
|
|
133
|
+
declare const archiveSkill: Skill;
|
|
134
|
+
declare function handleArchiveSkill(input: TaskInput): Promise<Part[]>;
|
|
135
|
+
|
|
136
|
+
declare const regexSkill: Skill;
|
|
137
|
+
declare function handleRegexSkill(input: TaskInput): Promise<Part[]>;
|
|
138
|
+
|
|
139
|
+
declare const diffSkill: Skill;
|
|
140
|
+
declare function handleDiffSkill(input: TaskInput): Promise<Part[]>;
|
|
141
|
+
|
|
142
|
+
declare const sqlSkill: Skill;
|
|
143
|
+
declare function handleSqlSkill(input: TaskInput): Promise<Part[]>;
|
|
144
|
+
|
|
145
|
+
declare const cryptoSkill: Skill;
|
|
146
|
+
declare function handleCryptoSkill(input: TaskInput): Promise<Part[]>;
|
|
147
|
+
|
|
148
|
+
declare const datetimeSkill: Skill;
|
|
149
|
+
declare function handleDatetimeSkill(input: TaskInput): Promise<Part[]>;
|
|
150
|
+
|
|
151
|
+
declare const textSkill: Skill;
|
|
152
|
+
declare function handleTextSkill(input: TaskInput): Promise<Part[]>;
|
|
153
|
+
|
|
154
|
+
declare const mathSkill: Skill;
|
|
155
|
+
declare function handleMathSkill(input: TaskInput): Promise<Part[]>;
|
|
156
|
+
|
|
157
|
+
declare const colorSkill: Skill;
|
|
158
|
+
declare function handleColorSkill(input: TaskInput): Promise<Part[]>;
|
|
159
|
+
|
|
160
|
+
declare const physicsSkill: Skill;
|
|
161
|
+
declare function handlePhysicsSkill(input: TaskInput): Promise<Part[]>;
|
|
162
|
+
|
|
163
|
+
declare const structuralSkill: Skill;
|
|
164
|
+
declare function handleStructuralSkill(input: TaskInput): Promise<Part[]>;
|
|
165
|
+
|
|
166
|
+
declare const skills: Skill[];
|
|
167
|
+
declare function handleSkill(skillId: string, input: TaskInput): Promise<Part[]>;
|
|
168
|
+
|
|
169
|
+
export { type AgentCard, type Artifact, type DataPart, type FilePart, type Message, type Part, type PushNotificationConfig, type Skill, type Task, type TaskCancelParams, type TaskCreateParams, type TaskInput, type TaskQueryParams, type TaskSendParams, type TaskState, type TaskStatus, type TextPart, archiveSkill, cancelTask, clearCompletedTasks, colorSkill, createTask, cryptoSkill, csvSkill, datetimeSkill, diffSkill, excelSkill, getAgentCard, getTask, handleArchiveSkill, handleColorSkill, handleCryptoSkill, handleCsvSkill, handleDatetimeSkill, handleDiffSkill, handleExcelSkill, handleImageSkill, handleJsonSkill, handleMarkdownSkill, handleMathSkill, handlePdfSkill, handlePhysicsSkill, handleRegexSkill, handleSkill, handleSqlSkill, handleStructuralSkill, handleTextSkill, handleXmlSkill, imageSkill, jsonSkill, listTasks, markdownSkill, mathSkill, pdfSkill, physicsSkill, regexSkill, skills, sqlSkill, structuralSkill, textSkill, xmlSkill };
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atmaticai/agent-tools-a2a",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A2A agent for Agent Tools data transformation tools",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsup",
|
|
20
|
+
"dev": "tsup --watch",
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"lint": "eslint src/",
|
|
24
|
+
"clean": "rm -rf dist .turbo"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@atmaticai/agent-tools-core": "workspace:*",
|
|
28
|
+
"uuid": "^11.0.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/uuid": "^10.0.0",
|
|
32
|
+
"pdf-lib": "^1.17.0",
|
|
33
|
+
"tsup": "^8.3.0",
|
|
34
|
+
"typescript": "^5.7.0",
|
|
35
|
+
"vitest": "^3.2.0"
|
|
36
|
+
}
|
|
37
|
+
}
|