@mastra/client-js 1.52.0-alpha.4 → 1.52.0-alpha.5
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/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/channels.d.ts +10 -0
- package/dist/resources/channels.d.ts.map +1 -1
- package/dist/route-types.generated.d.ts +55 -24
- package/dist/route-types.generated.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -35,6 +35,16 @@ export declare class Channels extends BaseResource {
|
|
|
35
35
|
* @returns Discriminated connect result — check `type` for the authorization flow
|
|
36
36
|
*/
|
|
37
37
|
connect(platform: PathParams<'POST /channels/:platform/connect'>['platform'], agentId: Body<'POST /channels/:platform/connect'>['agentId'], options?: Body<'POST /channels/:platform/connect'>['options']): Promise<ChannelConnectResult>;
|
|
38
|
+
/**
|
|
39
|
+
* Reconciles an agent's installation with platform state — activates a
|
|
40
|
+
* pending installation whose connect flow completed out-of-band (e.g. a
|
|
41
|
+
* Discord bot invite finished in another tab). No-op (returns null) on
|
|
42
|
+
* platforms without reconciliation.
|
|
43
|
+
* @param platform - Platform identifier (e.g., "discord")
|
|
44
|
+
* @param agentId - Agent whose installation to reconcile
|
|
45
|
+
* @returns The (possibly updated) installation, or null
|
|
46
|
+
*/
|
|
47
|
+
reconcileInstallation(platform: PathParams<'POST /channels/:platform/:agentId/reconcile'>['platform'], agentId: PathParams<'POST /channels/:platform/:agentId/reconcile'>['agentId']): Promise<RouteResponse<'POST /channels/:platform/:agentId/reconcile'>>;
|
|
38
48
|
/**
|
|
39
49
|
* Disconnects an agent from a channel platform.
|
|
40
50
|
* @param platform - Platform identifier (e.g., "slack")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/res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AAa,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAE9C;IAED;;;;;OAKG;IACG,iBAAiB,CACrB,QAAQ,EAAE,UAAU,CAAC,uCAAuC,CAAC,CAAC,UAAU,CAAC,EACzE,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAMpC;IAED;;;;;;OAMG;IACH,OAAO,CACL,QAAQ,EAAE,UAAU,CAAC,kCAAkC,CAAC,CAAC,UAAU,CAAC,EACpE,OAAO,EAAE,IAAI,CAAC,kCAAkC,CAAC,CAAC,SAAS,CAAC,EAC5D,OAAO,CAAC,EAAE,IAAI,CAAC,kCAAkC,CAAC,CAAC,SAAS,CAAC,GAC5D,OAAO,CAAC,oBAAoB,CAAC,CAK/B;IAED;;;;;;;;OAQG;IACH,qBAAqB,CACnB,QAAQ,EAAE,UAAU,CAAC,6CAA6C,CAAC,CAAC,UAAU,CAAC,EAC/E,OAAO,EAAE,UAAU,CAAC,6CAA6C,CAAC,CAAC,SAAS,CAAC,GAC5E,OAAO,CAAC,aAAa,CAAC,6CAA6C,CAAC,CAAC,CAIvE;IAED;;;;OAIG;IACH,UAAU,CACR,QAAQ,EAAE,UAAU,CAAC,8CAA8C,CAAC,CAAC,UAAU,CAAC,EAChF,OAAO,EAAE,UAAU,CAAC,8CAA8C,CAAC,CAAC,SAAS,CAAC,GAC7E,OAAO,CAAC,aAAa,CAAC,8CAA8C,CAAC,CAAC,CAIxE;CACF"}
|
|
@@ -109,7 +109,7 @@ type InputShared_Auxiliary_254 = {
|
|
|
109
109
|
none: InputShared_Auxiliary_204;
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
|
-
type
|
|
112
|
+
type InputShared_Auxiliary_682 = {
|
|
113
113
|
op: 'eq' | 'ne' | 'lt' | 'lte' | 'gt' | 'gte';
|
|
114
114
|
left: {
|
|
115
115
|
path: string;
|
|
@@ -141,17 +141,17 @@ type InputShared_Auxiliary_679 = {
|
|
|
141
141
|
};
|
|
142
142
|
} | {
|
|
143
143
|
op: 'and' | 'or';
|
|
144
|
-
args:
|
|
144
|
+
args: InputShared_Auxiliary_682[];
|
|
145
145
|
} | {
|
|
146
146
|
op: 'not';
|
|
147
|
-
arg:
|
|
147
|
+
arg: InputShared_Auxiliary_682;
|
|
148
148
|
};
|
|
149
|
-
type
|
|
149
|
+
type InputShared_Auxiliary_756 = {
|
|
150
150
|
id?: string | undefined;
|
|
151
151
|
name: string;
|
|
152
152
|
type: 'file' | 'folder';
|
|
153
153
|
content?: string | undefined;
|
|
154
|
-
children?:
|
|
154
|
+
children?: InputShared_Auxiliary_756[] | undefined;
|
|
155
155
|
};
|
|
156
156
|
type Shared_Auxiliary_764 = {
|
|
157
157
|
id?: string | undefined;
|
|
@@ -690,6 +690,10 @@ type InputShared_Type_34 = {
|
|
|
690
690
|
} | {
|
|
691
691
|
type: 'prompt_block_ref';
|
|
692
692
|
id: string;
|
|
693
|
+
rules?: {
|
|
694
|
+
operator: 'AND' | 'OR';
|
|
695
|
+
conditions: InputShared_Type_33[];
|
|
696
|
+
} | undefined;
|
|
693
697
|
} | {
|
|
694
698
|
type: 'prompt_block';
|
|
695
699
|
content: string;
|
|
@@ -1303,7 +1307,7 @@ type InputShared_Type_88 = {
|
|
|
1303
1307
|
[key: string]: unknown;
|
|
1304
1308
|
} | undefined;
|
|
1305
1309
|
steps: InputShared_Type_83[];
|
|
1306
|
-
predicates:
|
|
1310
|
+
predicates: InputShared_Auxiliary_682[];
|
|
1307
1311
|
};
|
|
1308
1312
|
type InputShared_Type_89 = {
|
|
1309
1313
|
type: 'loop';
|
|
@@ -1314,7 +1318,7 @@ type InputShared_Type_89 = {
|
|
|
1314
1318
|
} | undefined;
|
|
1315
1319
|
step: InputShared_Type_83;
|
|
1316
1320
|
loopType: 'dowhile' | 'dountil';
|
|
1317
|
-
predicate:
|
|
1321
|
+
predicate: InputShared_Auxiliary_682;
|
|
1318
1322
|
};
|
|
1319
1323
|
type InputShared_Type_90 = InputShared_Type_80 | InputShared_Type_81 | InputShared_Type_82 | {
|
|
1320
1324
|
type: 'workflow';
|
|
@@ -1769,6 +1773,7 @@ type Shared_Type_11 = {
|
|
|
1769
1773
|
} | {
|
|
1770
1774
|
type: 'prompt_block_ref';
|
|
1771
1775
|
id: string;
|
|
1776
|
+
rules?: Shared_Type_10 | undefined;
|
|
1772
1777
|
} | {
|
|
1773
1778
|
type: 'prompt_block';
|
|
1774
1779
|
content: string;
|
|
@@ -3407,6 +3412,20 @@ type Shared_Type_99 = {
|
|
|
3407
3412
|
createdAt: number;
|
|
3408
3413
|
updatedAt: number;
|
|
3409
3414
|
};
|
|
3415
|
+
type Shared_Type_100 = {
|
|
3416
|
+
/** Installation identifier */
|
|
3417
|
+
id: string;
|
|
3418
|
+
/** Platform identifier */
|
|
3419
|
+
platform: string;
|
|
3420
|
+
/** Connected agent identifier */
|
|
3421
|
+
agentId: string;
|
|
3422
|
+
/** Installation status */
|
|
3423
|
+
status: 'active' | 'pending';
|
|
3424
|
+
/** Platform-specific display name */
|
|
3425
|
+
displayName?: string | undefined;
|
|
3426
|
+
/** Installation timestamp */
|
|
3427
|
+
installedAt?: Date | undefined;
|
|
3428
|
+
};
|
|
3410
3429
|
export type GetAgents_QueryParams = {
|
|
3411
3430
|
partial?: string | undefined;
|
|
3412
3431
|
};
|
|
@@ -14323,7 +14342,7 @@ export type PostStoredSkills_Body = {
|
|
|
14323
14342
|
/** List of asset file paths */
|
|
14324
14343
|
assets?: string[] | undefined;
|
|
14325
14344
|
/** Full file tree structure for the skill */
|
|
14326
|
-
files?:
|
|
14345
|
+
files?: InputShared_Auxiliary_756[] | undefined;
|
|
14327
14346
|
/** Additional metadata for the skill */
|
|
14328
14347
|
metadata?: {
|
|
14329
14348
|
[key: string]: unknown;
|
|
@@ -14373,7 +14392,7 @@ export type PatchStoredSkillsStoredSkillId_Body = {
|
|
|
14373
14392
|
/** List of asset file paths */
|
|
14374
14393
|
assets?: (string[] | undefined) | undefined;
|
|
14375
14394
|
/** Full file tree structure for the skill */
|
|
14376
|
-
files?: (
|
|
14395
|
+
files?: (InputShared_Auxiliary_756[] | undefined) | undefined;
|
|
14377
14396
|
/** Additional metadata for the skill */
|
|
14378
14397
|
metadata?: ({
|
|
14379
14398
|
[key: string]: unknown;
|
|
@@ -17437,20 +17456,7 @@ export type GetChannelsPlatformInstallations_PathParams = {
|
|
|
17437
17456
|
/** Channel platform identifier (e.g., "slack") */
|
|
17438
17457
|
platform: string;
|
|
17439
17458
|
};
|
|
17440
|
-
export type GetChannelsPlatformInstallations_Response =
|
|
17441
|
-
/** Installation identifier */
|
|
17442
|
-
id: string;
|
|
17443
|
-
/** Platform identifier */
|
|
17444
|
-
platform: string;
|
|
17445
|
-
/** Connected agent identifier */
|
|
17446
|
-
agentId: string;
|
|
17447
|
-
/** Installation status */
|
|
17448
|
-
status: 'active' | 'pending';
|
|
17449
|
-
/** Platform-specific display name */
|
|
17450
|
-
displayName?: string | undefined;
|
|
17451
|
-
/** Installation timestamp */
|
|
17452
|
-
installedAt?: Date | undefined;
|
|
17453
|
-
}[];
|
|
17459
|
+
export type GetChannelsPlatformInstallations_Response = Shared_Type_100[];
|
|
17454
17460
|
export type GetChannelsPlatformInstallations_Request = Simplify<(GetChannelsPlatformInstallations_PathParams extends never ? {} : {
|
|
17455
17461
|
params: GetChannelsPlatformInstallations_PathParams;
|
|
17456
17462
|
}) & (never extends never ? {} : {} extends never ? {
|
|
@@ -17518,12 +17524,33 @@ export interface PostChannelsPlatformConnect_RouteContract {
|
|
|
17518
17524
|
response: PostChannelsPlatformConnect_Response;
|
|
17519
17525
|
responseType: 'json';
|
|
17520
17526
|
}
|
|
17521
|
-
export type
|
|
17527
|
+
export type PostChannelsPlatformAgentIdReconcile_PathParams = {
|
|
17522
17528
|
/** Channel platform identifier (e.g., "slack") */
|
|
17523
17529
|
platform: string;
|
|
17524
17530
|
/** Agent identifier */
|
|
17525
17531
|
agentId: string;
|
|
17526
17532
|
};
|
|
17533
|
+
export type PostChannelsPlatformAgentIdReconcile_Response = Shared_Type_100 | null;
|
|
17534
|
+
export type PostChannelsPlatformAgentIdReconcile_Request = Simplify<(PostChannelsPlatformAgentIdReconcile_PathParams extends never ? {} : {
|
|
17535
|
+
params: PostChannelsPlatformAgentIdReconcile_PathParams;
|
|
17536
|
+
}) & (never extends never ? {} : {} extends never ? {
|
|
17537
|
+
query?: never;
|
|
17538
|
+
} : {
|
|
17539
|
+
query: never;
|
|
17540
|
+
}) & (never extends never ? {} : {} extends never ? {
|
|
17541
|
+
body?: never;
|
|
17542
|
+
} : {
|
|
17543
|
+
body: never;
|
|
17544
|
+
})>;
|
|
17545
|
+
export interface PostChannelsPlatformAgentIdReconcile_RouteContract {
|
|
17546
|
+
pathParams: PostChannelsPlatformAgentIdReconcile_PathParams;
|
|
17547
|
+
queryParams: never;
|
|
17548
|
+
body: never;
|
|
17549
|
+
request: PostChannelsPlatformAgentIdReconcile_Request;
|
|
17550
|
+
response: PostChannelsPlatformAgentIdReconcile_Response;
|
|
17551
|
+
responseType: 'json';
|
|
17552
|
+
}
|
|
17553
|
+
export type PostChannelsPlatformAgentIdDisconnect_PathParams = PostChannelsPlatformAgentIdReconcile_PathParams;
|
|
17527
17554
|
export type PostChannelsPlatformAgentIdDisconnect_Response = PostAuthRefresh_Response;
|
|
17528
17555
|
export type PostChannelsPlatformAgentIdDisconnect_Request = Simplify<(PostChannelsPlatformAgentIdDisconnect_PathParams extends never ? {} : {
|
|
17529
17556
|
params: PostChannelsPlatformAgentIdDisconnect_PathParams;
|
|
@@ -18971,6 +18998,7 @@ export interface RouteTypes {
|
|
|
18971
18998
|
'GET /channels/platforms': GetChannelsPlatforms_RouteContract;
|
|
18972
18999
|
'GET /channels/:platform/installations': GetChannelsPlatformInstallations_RouteContract;
|
|
18973
19000
|
'POST /channels/:platform/connect': PostChannelsPlatformConnect_RouteContract;
|
|
19001
|
+
'POST /channels/:platform/:agentId/reconcile': PostChannelsPlatformAgentIdReconcile_RouteContract;
|
|
18974
19002
|
'POST /channels/:platform/:agentId/disconnect': PostChannelsPlatformAgentIdDisconnect_RouteContract;
|
|
18975
19003
|
'GET /agent-controller': GetAgentController_RouteContract;
|
|
18976
19004
|
'GET /agent-controller/:controllerId/modes': GetAgentControllerControllerIdModes_RouteContract;
|
|
@@ -19354,6 +19382,9 @@ export interface Client {
|
|
|
19354
19382
|
'/channels/:platform/:agentId/disconnect': {
|
|
19355
19383
|
POST: PostChannelsPlatformAgentIdDisconnect_RouteContract;
|
|
19356
19384
|
};
|
|
19385
|
+
'/channels/:platform/:agentId/reconcile': {
|
|
19386
|
+
POST: PostChannelsPlatformAgentIdReconcile_RouteContract;
|
|
19387
|
+
};
|
|
19357
19388
|
'/channels/:platform/connect': {
|
|
19358
19389
|
POST: PostChannelsPlatformConnect_RouteContract;
|
|
19359
19390
|
};
|