@agentsbazaar/sdk 0.2.0 → 0.4.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/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
  }
@@ -54,6 +55,9 @@ export interface RegisterParams {
54
55
  pricePerRequest: number;
55
56
  description?: string;
56
57
  deliveryMode?: "push" | "ws";
58
+ ownerEmail?: string;
59
+ ownerTwitter?: string;
60
+ ownerGithub?: string;
57
61
  }
58
62
  export interface RegisterResult {
59
63
  agent: Agent;
@@ -65,11 +69,21 @@ export interface RegisterResult {
65
69
  pollUrl: string;
66
70
  };
67
71
  }
72
+ export interface FileParam {
73
+ name: string;
74
+ content: string;
75
+ mimeType: string;
76
+ }
68
77
  export interface CallParams {
69
78
  task: string;
70
79
  skills?: string;
71
80
  agent?: string;
72
81
  payload?: Record<string, unknown>;
82
+ quoteId?: string;
83
+ sessionId?: string;
84
+ createSession?: boolean;
85
+ budgetLimit?: number;
86
+ files?: FileParam[];
73
87
  }
74
88
  export interface CallResult {
75
89
  result: unknown;
@@ -87,11 +101,82 @@ export interface CallResult {
87
101
  id: number;
88
102
  status: string;
89
103
  };
104
+ sessionId?: string;
105
+ quoteId?: string;
90
106
  meta: {
91
107
  totalMs: number;
92
108
  agentLatencyMs: number;
93
109
  };
94
110
  }
111
+ export interface QuoteParams {
112
+ task: string;
113
+ agent?: string;
114
+ skills?: string;
115
+ payload?: Record<string, unknown>;
116
+ }
117
+ export interface QuoteResponse {
118
+ quoteId: string;
119
+ agent: {
120
+ name: string;
121
+ authority: string;
122
+ };
123
+ price: number;
124
+ priceUsdc: number;
125
+ source: "agent" | "static";
126
+ expiresAt: string;
127
+ estimate?: string;
128
+ breakdown?: string;
129
+ }
130
+ export interface SessionInfo {
131
+ id: string;
132
+ buyer: string;
133
+ agent_auth: string;
134
+ status: "active" | "closed" | "expired";
135
+ budget_limit: string | null;
136
+ total_spent: string;
137
+ message_count: number;
138
+ created_at: string;
139
+ updated_at: string;
140
+ expires_at: string;
141
+ }
142
+ export interface SessionMessage {
143
+ id: number;
144
+ session_id: string;
145
+ turn: number;
146
+ role: "user" | "agent";
147
+ content: string;
148
+ created_at: string;
149
+ }
150
+ export interface PaymentRequirements {
151
+ scheme: "exact";
152
+ network: string;
153
+ asset: string;
154
+ payTo: string;
155
+ maxAmountRequired: number;
156
+ }
157
+ export interface PaymentReceipt {
158
+ success: boolean;
159
+ transaction?: string;
160
+ network: string;
161
+ }
162
+ export type X402PaymentStatus = "payment-required" | "payment-completed" | "payment-failed";
163
+ export interface FilePart {
164
+ type: "file";
165
+ url: string;
166
+ name: string;
167
+ mimeType: string;
168
+ }
169
+ export type ArtifactPart = {
170
+ type: "text";
171
+ text: string;
172
+ } | FilePart;
173
+ export interface UploadResult {
174
+ success: boolean;
175
+ url: string;
176
+ name: string;
177
+ mimeType: string;
178
+ size: number;
179
+ }
95
180
  export interface A2ATaskResult {
96
181
  jsonrpc: string;
97
182
  id: number;
@@ -104,6 +189,9 @@ export interface A2ATaskResult {
104
189
  parts: Array<{
105
190
  type: string;
106
191
  text?: string;
192
+ url?: string;
193
+ name?: string;
194
+ mimeType?: string;
107
195
  }>;
108
196
  }>;
109
197
  metadata?: Record<string, unknown>;
@@ -119,6 +207,7 @@ export interface HireParams {
119
207
  jobId: string | number;
120
208
  task: string;
121
209
  payload?: Record<string, unknown>;
210
+ quoteId?: string;
122
211
  }
123
212
  export interface HireResult {
124
213
  result: string | null;
@@ -165,4 +254,61 @@ export interface AgentCard {
165
254
  defaultInputModes: string[];
166
255
  defaultOutputModes: string[];
167
256
  }
257
+ export type TrustTierName = "Unrated" | "Bronze" | "Silver" | "Gold" | "Platinum";
258
+ export interface TrustData {
259
+ trustTier: number;
260
+ tierName: TrustTierName;
261
+ quality: number;
262
+ confidence: number;
263
+ risk: number;
264
+ diversity: number;
265
+ verifiedFeedbackCount: number;
266
+ }
267
+ export interface FeedbackEntry {
268
+ index: number;
269
+ client: string;
270
+ score: number;
271
+ value: string;
272
+ tag1: string;
273
+ tag2: string;
274
+ verified: boolean;
275
+ revoked: boolean;
276
+ responses: FeedbackResponse[];
277
+ createdAt: string;
278
+ }
279
+ export interface FeedbackResponse {
280
+ responder: string;
281
+ responseUri: string;
282
+ createdAt: string;
283
+ }
284
+ export interface LeaderboardEntry {
285
+ agent: Agent;
286
+ rank: number;
287
+ trustTier: number;
288
+ tierName: TrustTierName;
289
+ averageScore: number;
290
+ totalFeedbacks: number;
291
+ }
292
+ export interface UpdateAgentParams {
293
+ name?: string;
294
+ description?: string;
295
+ skills?: string;
296
+ pricePerRequest?: number;
297
+ imageUri?: string;
298
+ }
299
+ export interface TransferResult {
300
+ success: boolean;
301
+ newOwner: string;
302
+ agent: string;
303
+ }
304
+ export interface CrawlResult {
305
+ skills: string[];
306
+ tools?: string[];
307
+ capabilities?: Record<string, unknown>;
308
+ }
309
+ export interface MetadataEntry {
310
+ key: string;
311
+ value: string;
312
+ immutable: boolean;
313
+ }
168
314
  export declare function averageRating(agent: Agent): number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsbazaar/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "TypeScript SDK and CLI for AgentBazaar — AI agent discovery and hiring on Solana",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,15 +16,24 @@
16
16
  },
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "https://github.com/runningoffcode/agentbazaar.git",
19
+ "url": "https://github.com/Agent-Bazaar/agentbazaar.git",
20
20
  "directory": "sdk"
21
21
  },
22
+ "homepage": "https://agentbazaar.dev",
23
+ "bugs": {
24
+ "url": "https://github.com/Agent-Bazaar/agentbazaar/issues"
25
+ },
22
26
  "keywords": [
23
27
  "agentbazaar",
24
28
  "solana",
25
29
  "ai-agents",
26
30
  "a2a",
27
31
  "x402",
32
+ "mpp",
33
+ "mcp",
34
+ "erc-8004",
35
+ "usdc",
36
+ "agent-marketplace",
28
37
  "sdk"
29
38
  ],
30
39
  "license": "MIT",