@mastra/client-js 1.7.1 → 1.7.2
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/CHANGELOG.md +22 -0
- package/LICENSE.md +15 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/a2a.d.ts.map +1 -1
- package/dist/resources/base.d.ts.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1321,6 +1321,10 @@ var BaseResource = class {
|
|
|
1321
1321
|
return data;
|
|
1322
1322
|
} catch (error) {
|
|
1323
1323
|
lastError = error;
|
|
1324
|
+
const status = error.status;
|
|
1325
|
+
if (status !== void 0 && status >= 400 && status < 500) {
|
|
1326
|
+
throw error;
|
|
1327
|
+
}
|
|
1324
1328
|
if (attempt === retries) {
|
|
1325
1329
|
break;
|
|
1326
1330
|
}
|
|
@@ -3407,6 +3411,8 @@ var A2A = class extends BaseResource {
|
|
|
3407
3411
|
const response = await this.request(`/a2a/${this.agentId}`, {
|
|
3408
3412
|
method: "POST",
|
|
3409
3413
|
body: {
|
|
3414
|
+
jsonrpc: "2.0",
|
|
3415
|
+
id: crypto.randomUUID(),
|
|
3410
3416
|
method: "message/send",
|
|
3411
3417
|
params
|
|
3412
3418
|
}
|
|
@@ -3423,6 +3429,8 @@ var A2A = class extends BaseResource {
|
|
|
3423
3429
|
const response = await this.request(`/a2a/${this.agentId}`, {
|
|
3424
3430
|
method: "POST",
|
|
3425
3431
|
body: {
|
|
3432
|
+
jsonrpc: "2.0",
|
|
3433
|
+
id: crypto.randomUUID(),
|
|
3426
3434
|
method: "message/stream",
|
|
3427
3435
|
params
|
|
3428
3436
|
},
|
|
@@ -3439,6 +3447,8 @@ var A2A = class extends BaseResource {
|
|
|
3439
3447
|
const response = await this.request(`/a2a/${this.agentId}`, {
|
|
3440
3448
|
method: "POST",
|
|
3441
3449
|
body: {
|
|
3450
|
+
jsonrpc: "2.0",
|
|
3451
|
+
id: crypto.randomUUID(),
|
|
3442
3452
|
method: "tasks/get",
|
|
3443
3453
|
params
|
|
3444
3454
|
}
|
|
@@ -3454,6 +3464,8 @@ var A2A = class extends BaseResource {
|
|
|
3454
3464
|
return this.request(`/a2a/${this.agentId}`, {
|
|
3455
3465
|
method: "POST",
|
|
3456
3466
|
body: {
|
|
3467
|
+
jsonrpc: "2.0",
|
|
3468
|
+
id: crypto.randomUUID(),
|
|
3457
3469
|
method: "tasks/cancel",
|
|
3458
3470
|
params
|
|
3459
3471
|
}
|