@agentsbazaar/sdk 0.2.0 → 0.3.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/README.md +519 -106
- package/dist/cli.js +71 -1
- package/dist/client.d.ts +380 -4
- package/dist/client.js +588 -40
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +143 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export interface Agent {
|
|
|
17
17
|
image_url: string | null;
|
|
18
18
|
delivery_mode: "push" | "ws";
|
|
19
19
|
slug: string | null;
|
|
20
|
+
supports_quoting: boolean;
|
|
20
21
|
created_at: string;
|
|
21
22
|
updated_at: string;
|
|
22
23
|
}
|
|
@@ -65,11 +66,21 @@ export interface RegisterResult {
|
|
|
65
66
|
pollUrl: string;
|
|
66
67
|
};
|
|
67
68
|
}
|
|
69
|
+
export interface FileParam {
|
|
70
|
+
name: string;
|
|
71
|
+
content: string;
|
|
72
|
+
mimeType: string;
|
|
73
|
+
}
|
|
68
74
|
export interface CallParams {
|
|
69
75
|
task: string;
|
|
70
76
|
skills?: string;
|
|
71
77
|
agent?: string;
|
|
72
78
|
payload?: Record<string, unknown>;
|
|
79
|
+
quoteId?: string;
|
|
80
|
+
sessionId?: string;
|
|
81
|
+
createSession?: boolean;
|
|
82
|
+
budgetLimit?: number;
|
|
83
|
+
files?: FileParam[];
|
|
73
84
|
}
|
|
74
85
|
export interface CallResult {
|
|
75
86
|
result: unknown;
|
|
@@ -87,11 +98,82 @@ export interface CallResult {
|
|
|
87
98
|
id: number;
|
|
88
99
|
status: string;
|
|
89
100
|
};
|
|
101
|
+
sessionId?: string;
|
|
102
|
+
quoteId?: string;
|
|
90
103
|
meta: {
|
|
91
104
|
totalMs: number;
|
|
92
105
|
agentLatencyMs: number;
|
|
93
106
|
};
|
|
94
107
|
}
|
|
108
|
+
export interface QuoteParams {
|
|
109
|
+
task: string;
|
|
110
|
+
agent?: string;
|
|
111
|
+
skills?: string;
|
|
112
|
+
payload?: Record<string, unknown>;
|
|
113
|
+
}
|
|
114
|
+
export interface QuoteResponse {
|
|
115
|
+
quoteId: string;
|
|
116
|
+
agent: {
|
|
117
|
+
name: string;
|
|
118
|
+
authority: string;
|
|
119
|
+
};
|
|
120
|
+
price: number;
|
|
121
|
+
priceUsdc: number;
|
|
122
|
+
source: "agent" | "static";
|
|
123
|
+
expiresAt: string;
|
|
124
|
+
estimate?: string;
|
|
125
|
+
breakdown?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface SessionInfo {
|
|
128
|
+
id: string;
|
|
129
|
+
buyer: string;
|
|
130
|
+
agent_auth: string;
|
|
131
|
+
status: "active" | "closed" | "expired";
|
|
132
|
+
budget_limit: string | null;
|
|
133
|
+
total_spent: string;
|
|
134
|
+
message_count: number;
|
|
135
|
+
created_at: string;
|
|
136
|
+
updated_at: string;
|
|
137
|
+
expires_at: string;
|
|
138
|
+
}
|
|
139
|
+
export interface SessionMessage {
|
|
140
|
+
id: number;
|
|
141
|
+
session_id: string;
|
|
142
|
+
turn: number;
|
|
143
|
+
role: "user" | "agent";
|
|
144
|
+
content: string;
|
|
145
|
+
created_at: string;
|
|
146
|
+
}
|
|
147
|
+
export interface PaymentRequirements {
|
|
148
|
+
scheme: "exact";
|
|
149
|
+
network: string;
|
|
150
|
+
asset: string;
|
|
151
|
+
payTo: string;
|
|
152
|
+
maxAmountRequired: number;
|
|
153
|
+
}
|
|
154
|
+
export interface PaymentReceipt {
|
|
155
|
+
success: boolean;
|
|
156
|
+
transaction?: string;
|
|
157
|
+
network: string;
|
|
158
|
+
}
|
|
159
|
+
export type X402PaymentStatus = "payment-required" | "payment-completed" | "payment-failed";
|
|
160
|
+
export interface FilePart {
|
|
161
|
+
type: "file";
|
|
162
|
+
url: string;
|
|
163
|
+
name: string;
|
|
164
|
+
mimeType: string;
|
|
165
|
+
}
|
|
166
|
+
export type ArtifactPart = {
|
|
167
|
+
type: "text";
|
|
168
|
+
text: string;
|
|
169
|
+
} | FilePart;
|
|
170
|
+
export interface UploadResult {
|
|
171
|
+
success: boolean;
|
|
172
|
+
url: string;
|
|
173
|
+
name: string;
|
|
174
|
+
mimeType: string;
|
|
175
|
+
size: number;
|
|
176
|
+
}
|
|
95
177
|
export interface A2ATaskResult {
|
|
96
178
|
jsonrpc: string;
|
|
97
179
|
id: number;
|
|
@@ -104,6 +186,9 @@ export interface A2ATaskResult {
|
|
|
104
186
|
parts: Array<{
|
|
105
187
|
type: string;
|
|
106
188
|
text?: string;
|
|
189
|
+
url?: string;
|
|
190
|
+
name?: string;
|
|
191
|
+
mimeType?: string;
|
|
107
192
|
}>;
|
|
108
193
|
}>;
|
|
109
194
|
metadata?: Record<string, unknown>;
|
|
@@ -119,6 +204,7 @@ export interface HireParams {
|
|
|
119
204
|
jobId: string | number;
|
|
120
205
|
task: string;
|
|
121
206
|
payload?: Record<string, unknown>;
|
|
207
|
+
quoteId?: string;
|
|
122
208
|
}
|
|
123
209
|
export interface HireResult {
|
|
124
210
|
result: string | null;
|
|
@@ -165,4 +251,61 @@ export interface AgentCard {
|
|
|
165
251
|
defaultInputModes: string[];
|
|
166
252
|
defaultOutputModes: string[];
|
|
167
253
|
}
|
|
254
|
+
export type TrustTierName = "Unrated" | "Bronze" | "Silver" | "Gold" | "Platinum";
|
|
255
|
+
export interface TrustData {
|
|
256
|
+
trustTier: number;
|
|
257
|
+
tierName: TrustTierName;
|
|
258
|
+
quality: number;
|
|
259
|
+
confidence: number;
|
|
260
|
+
risk: number;
|
|
261
|
+
diversity: number;
|
|
262
|
+
verifiedFeedbackCount: number;
|
|
263
|
+
}
|
|
264
|
+
export interface FeedbackEntry {
|
|
265
|
+
index: number;
|
|
266
|
+
client: string;
|
|
267
|
+
score: number;
|
|
268
|
+
value: string;
|
|
269
|
+
tag1: string;
|
|
270
|
+
tag2: string;
|
|
271
|
+
verified: boolean;
|
|
272
|
+
revoked: boolean;
|
|
273
|
+
responses: FeedbackResponse[];
|
|
274
|
+
createdAt: string;
|
|
275
|
+
}
|
|
276
|
+
export interface FeedbackResponse {
|
|
277
|
+
responder: string;
|
|
278
|
+
responseUri: string;
|
|
279
|
+
createdAt: string;
|
|
280
|
+
}
|
|
281
|
+
export interface LeaderboardEntry {
|
|
282
|
+
agent: Agent;
|
|
283
|
+
rank: number;
|
|
284
|
+
trustTier: number;
|
|
285
|
+
tierName: TrustTierName;
|
|
286
|
+
averageScore: number;
|
|
287
|
+
totalFeedbacks: number;
|
|
288
|
+
}
|
|
289
|
+
export interface UpdateAgentParams {
|
|
290
|
+
name?: string;
|
|
291
|
+
description?: string;
|
|
292
|
+
skills?: string;
|
|
293
|
+
pricePerRequest?: number;
|
|
294
|
+
imageUri?: string;
|
|
295
|
+
}
|
|
296
|
+
export interface TransferResult {
|
|
297
|
+
success: boolean;
|
|
298
|
+
newOwner: string;
|
|
299
|
+
agent: string;
|
|
300
|
+
}
|
|
301
|
+
export interface CrawlResult {
|
|
302
|
+
skills: string[];
|
|
303
|
+
tools?: string[];
|
|
304
|
+
capabilities?: Record<string, unknown>;
|
|
305
|
+
}
|
|
306
|
+
export interface MetadataEntry {
|
|
307
|
+
key: string;
|
|
308
|
+
value: string;
|
|
309
|
+
immutable: boolean;
|
|
310
|
+
}
|
|
168
311
|
export declare function averageRating(agent: Agent): number | null;
|