@renai-labs/sdk 0.1.2 → 0.1.4
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/generated/@tanstack/react-query.gen.d.ts +73 -9
- package/dist/generated/@tanstack/react-query.gen.js +54 -6
- package/dist/generated/internal/types.gen.d.ts +252 -0
- package/dist/generated/sdk.gen.d.ts +30 -10
- package/dist/generated/sdk.gen.js +52 -12
- package/dist/generated/types.gen.d.ts +194 -69
- package/dist/generated/zod.gen.d.ts +357 -97
- package/dist/generated/zod.gen.js +126 -68
- package/package.json +1 -1
|
@@ -45,6 +45,42 @@ export const zPermissionConfig = z.union([
|
|
|
45
45
|
}),
|
|
46
46
|
z.enum(["allow", "deny", "ask"]),
|
|
47
47
|
]);
|
|
48
|
+
export const zReplayPresignDownloadResponse = z.object({
|
|
49
|
+
url: z.string(),
|
|
50
|
+
expiresAt: z.iso
|
|
51
|
+
.datetime()
|
|
52
|
+
.regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
|
|
53
|
+
});
|
|
54
|
+
export const zReplayMessage = z.object({
|
|
55
|
+
info: z.record(z.string(), z.unknown()),
|
|
56
|
+
parts: z.array(z.record(z.string(), z.unknown())),
|
|
57
|
+
});
|
|
58
|
+
export const zReplayPublicSession = z.object({
|
|
59
|
+
id: z.string(),
|
|
60
|
+
title: z.string(),
|
|
61
|
+
createdAt: z.iso
|
|
62
|
+
.datetime()
|
|
63
|
+
.regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
|
|
64
|
+
});
|
|
65
|
+
export const zWebsiteMetadata = z.object({
|
|
66
|
+
title: z.string().optional(),
|
|
67
|
+
description: z.string().optional(),
|
|
68
|
+
longDescription: z.string().optional(),
|
|
69
|
+
image: z.url().optional(),
|
|
70
|
+
favicon: z.url().optional(),
|
|
71
|
+
supportUrl: z.url().optional(),
|
|
72
|
+
privacyPolicyUrl: z.url().optional(),
|
|
73
|
+
});
|
|
74
|
+
export const zReplayPublicView = z.object({
|
|
75
|
+
id: z.string(),
|
|
76
|
+
slug: z.string(),
|
|
77
|
+
createdAt: z.iso
|
|
78
|
+
.datetime()
|
|
79
|
+
.regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
|
|
80
|
+
websiteMetadata: zWebsiteMetadata.nullable(),
|
|
81
|
+
session: zReplayPublicSession,
|
|
82
|
+
messages: z.array(zReplayMessage),
|
|
83
|
+
});
|
|
48
84
|
export const zBlueprintReplayRef = z.object({
|
|
49
85
|
replayId: z.string(),
|
|
50
86
|
});
|
|
@@ -84,15 +120,6 @@ export const zBlueprintTemplate = z.object({
|
|
|
84
120
|
mcps: z.array(zBlueprintMcpRef),
|
|
85
121
|
replays: z.array(zBlueprintReplayRef),
|
|
86
122
|
});
|
|
87
|
-
export const zWebsiteMetadata = z.object({
|
|
88
|
-
title: z.string().optional(),
|
|
89
|
-
description: z.string().optional(),
|
|
90
|
-
longDescription: z.string().optional(),
|
|
91
|
-
image: z.url().optional(),
|
|
92
|
-
favicon: z.url().optional(),
|
|
93
|
-
supportUrl: z.url().optional(),
|
|
94
|
-
privacyPolicyUrl: z.url().optional(),
|
|
95
|
-
});
|
|
96
123
|
export const zBlueprintPublicView = z.object({
|
|
97
124
|
id: z.string(),
|
|
98
125
|
slug: z.string(),
|
|
@@ -102,31 +129,34 @@ export const zBlueprintPublicView = z.object({
|
|
|
102
129
|
publisherId: z.string(),
|
|
103
130
|
template: zBlueprintTemplate,
|
|
104
131
|
});
|
|
105
|
-
export const
|
|
106
|
-
url: z.
|
|
107
|
-
|
|
108
|
-
.datetime()
|
|
109
|
-
.regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
|
|
110
|
-
});
|
|
111
|
-
export const zReplayMessage = z.object({
|
|
112
|
-
info: z.record(z.string(), z.unknown()),
|
|
113
|
-
parts: z.array(z.record(z.string(), z.unknown())),
|
|
114
|
-
});
|
|
115
|
-
export const zReplayPublicSession = z.object({
|
|
116
|
-
id: z.string(),
|
|
117
|
-
title: z.string(),
|
|
118
|
-
createdAt: z.iso
|
|
119
|
-
.datetime()
|
|
120
|
-
.regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
|
|
132
|
+
export const zRepository = z.object({
|
|
133
|
+
url: z.url().optional(),
|
|
134
|
+
source: z.string().optional(),
|
|
121
135
|
});
|
|
122
|
-
export const
|
|
136
|
+
export const zAgentLatestVersion = z.object({
|
|
123
137
|
id: z.string(),
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
138
|
+
agentId: z.string(),
|
|
139
|
+
version: z.string().regex(/^\d+\.\d+\.\d+$/),
|
|
140
|
+
description: z.string().nullable(),
|
|
141
|
+
skills: z.array(z.object({
|
|
142
|
+
skillId: z.string(),
|
|
143
|
+
skillVersionId: z.string().nullish().default(null),
|
|
144
|
+
skill: z.object({
|
|
145
|
+
id: z.string(),
|
|
146
|
+
slug: z.string(),
|
|
147
|
+
name: z.string(),
|
|
148
|
+
icon: z.string().nullable(),
|
|
149
|
+
}),
|
|
150
|
+
})),
|
|
151
|
+
mcps: z.array(z.object({
|
|
152
|
+
mcpId: z.string(),
|
|
153
|
+
mcp: z.object({
|
|
154
|
+
id: z.string(),
|
|
155
|
+
slug: z.string(),
|
|
156
|
+
name: z.string(),
|
|
157
|
+
icon: z.string().nullable(),
|
|
158
|
+
}),
|
|
159
|
+
})),
|
|
130
160
|
});
|
|
131
161
|
export const zOAuthStartInput = z.object({
|
|
132
162
|
mcpId: z.string().regex(/^mcp_[0-9A-HJKMNP-TV-Z]{26}$/),
|
|
@@ -342,10 +372,6 @@ export const zSkillVersion = z.object({
|
|
|
342
372
|
requiredCredentials: z.array(zRequiredCredential),
|
|
343
373
|
releaseNotes: z.string().nullable(),
|
|
344
374
|
});
|
|
345
|
-
export const zRepository = z.object({
|
|
346
|
-
url: z.url().optional(),
|
|
347
|
-
source: z.string().optional(),
|
|
348
|
-
});
|
|
349
375
|
export const zSkill = z.object({
|
|
350
376
|
id: z.string(),
|
|
351
377
|
slug: z.string(),
|
|
@@ -457,6 +483,9 @@ export const zSessionMessagesPage = z.object({
|
|
|
457
483
|
pageSize: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
458
484
|
total: z.int().gte(-9007199254740991).lte(9007199254740991),
|
|
459
485
|
});
|
|
486
|
+
export const zSessionUrlResponse = z.object({
|
|
487
|
+
url: z.string(),
|
|
488
|
+
});
|
|
460
489
|
export const zOpencodeSession = z.object({
|
|
461
490
|
id: z.string(),
|
|
462
491
|
createdById: z.string(),
|
|
@@ -519,6 +548,7 @@ export const zReplay = z.object({
|
|
|
519
548
|
sessionId: z.string(),
|
|
520
549
|
publisherId: z.string().nullable(),
|
|
521
550
|
slug: z.string(),
|
|
551
|
+
shareToken: z.string().nullable(),
|
|
522
552
|
websiteMetadata: zWebsiteMetadata.nullable(),
|
|
523
553
|
createdAt: z.iso
|
|
524
554
|
.datetime()
|
|
@@ -1113,30 +1143,6 @@ export const zSearchResult = z.object({
|
|
|
1113
1143
|
.datetime()
|
|
1114
1144
|
.regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/),
|
|
1115
1145
|
});
|
|
1116
|
-
export const zAgentLatestVersion = z.object({
|
|
1117
|
-
id: z.string(),
|
|
1118
|
-
agentId: z.string(),
|
|
1119
|
-
version: z.string().regex(/^\d+\.\d+\.\d+$/),
|
|
1120
|
-
skills: z.array(z.object({
|
|
1121
|
-
skillId: z.string(),
|
|
1122
|
-
skillVersionId: z.string().nullish().default(null),
|
|
1123
|
-
skill: z.object({
|
|
1124
|
-
id: z.string(),
|
|
1125
|
-
slug: z.string(),
|
|
1126
|
-
name: z.string(),
|
|
1127
|
-
icon: z.string().nullable(),
|
|
1128
|
-
}),
|
|
1129
|
-
})),
|
|
1130
|
-
mcps: z.array(z.object({
|
|
1131
|
-
mcpId: z.string(),
|
|
1132
|
-
mcp: z.object({
|
|
1133
|
-
id: z.string(),
|
|
1134
|
-
slug: z.string(),
|
|
1135
|
-
name: z.string(),
|
|
1136
|
-
icon: z.string().nullable(),
|
|
1137
|
-
}),
|
|
1138
|
-
})),
|
|
1139
|
-
});
|
|
1140
1146
|
export const zAgent = z.object({
|
|
1141
1147
|
id: z.string(),
|
|
1142
1148
|
slug: z.string(),
|
|
@@ -1163,6 +1169,7 @@ export const zAgent = z.object({
|
|
|
1163
1169
|
.regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$/)
|
|
1164
1170
|
.nullable(),
|
|
1165
1171
|
deprecationMessage: z.string().nullable(),
|
|
1172
|
+
tags: z.array(z.string()).optional().default([]),
|
|
1166
1173
|
latestVersion: zAgentLatestVersion.nullish(),
|
|
1167
1174
|
});
|
|
1168
1175
|
/**
|
|
@@ -1182,6 +1189,28 @@ export const zAgentCreateBody = z.object({
|
|
|
1182
1189
|
name: z.string().min(1).max(256),
|
|
1183
1190
|
icon: z.string().nullish().default(null),
|
|
1184
1191
|
tags: z.array(z.string()).optional(),
|
|
1192
|
+
version: z
|
|
1193
|
+
.union([z.string(), z.enum(["major", "minor", "patch"])])
|
|
1194
|
+
.optional()
|
|
1195
|
+
.default("patch"),
|
|
1196
|
+
description: z.string().optional().default(""),
|
|
1197
|
+
prompt: z.string().optional().default(""),
|
|
1198
|
+
model: z.string().nullish().default(null),
|
|
1199
|
+
permission: zPermissionConfig.optional(),
|
|
1200
|
+
skills: z
|
|
1201
|
+
.array(z.object({
|
|
1202
|
+
skillId: z.string(),
|
|
1203
|
+
skillVersionId: z.string().nullish().default(null),
|
|
1204
|
+
}))
|
|
1205
|
+
.optional()
|
|
1206
|
+
.default([]),
|
|
1207
|
+
mcps: z
|
|
1208
|
+
.array(z.object({
|
|
1209
|
+
mcpId: z.string(),
|
|
1210
|
+
}))
|
|
1211
|
+
.optional()
|
|
1212
|
+
.default([]),
|
|
1213
|
+
releaseNotes: z.string().max(4096).optional(),
|
|
1185
1214
|
});
|
|
1186
1215
|
export const zAgentCreateQuery = z.object({
|
|
1187
1216
|
scope: z.enum(["user"]).optional(),
|
|
@@ -2511,6 +2540,7 @@ export const zReplayCreateBody = z.object({
|
|
|
2511
2540
|
sessionId: z.string(),
|
|
2512
2541
|
publisherId: z.string().nullish().default(null),
|
|
2513
2542
|
websiteMetadata: zWebsiteMetadata.nullish().default(null),
|
|
2543
|
+
shareToken: z.string().nullish().default(null),
|
|
2514
2544
|
});
|
|
2515
2545
|
export const zReplayCreateQuery = z.object({
|
|
2516
2546
|
scope: z.enum(["user"]).optional(),
|
|
@@ -2656,6 +2686,16 @@ export const zSessionUpdateQuery = z.object({
|
|
|
2656
2686
|
* Updated session
|
|
2657
2687
|
*/
|
|
2658
2688
|
export const zSessionUpdateResponse = zOpencodeSession;
|
|
2689
|
+
export const zSessionUrlPath = z.object({
|
|
2690
|
+
id: z.string().min(1),
|
|
2691
|
+
});
|
|
2692
|
+
export const zSessionUrlQuery = z.object({
|
|
2693
|
+
scope: z.enum(["user"]).optional(),
|
|
2694
|
+
});
|
|
2695
|
+
/**
|
|
2696
|
+
* OpenCode URL
|
|
2697
|
+
*/
|
|
2698
|
+
export const zSessionUrlResponse2 = zSessionUrlResponse;
|
|
2659
2699
|
export const zSessionMessagesListPath = z.object({
|
|
2660
2700
|
id: z.string().min(1),
|
|
2661
2701
|
});
|
|
@@ -3316,6 +3356,17 @@ export const zRegistryMcpGetPath = z.object({
|
|
|
3316
3356
|
* MCP details
|
|
3317
3357
|
*/
|
|
3318
3358
|
export const zRegistryMcpGetResponse = zMcp;
|
|
3359
|
+
export const zRegistryBlueprintGetPath = z.object({
|
|
3360
|
+
slug: z
|
|
3361
|
+
.string()
|
|
3362
|
+
.min(1)
|
|
3363
|
+
.max(128)
|
|
3364
|
+
.regex(/^[a-z0-9-]+$/),
|
|
3365
|
+
});
|
|
3366
|
+
/**
|
|
3367
|
+
* Public blueprint view
|
|
3368
|
+
*/
|
|
3369
|
+
export const zRegistryBlueprintGetResponse = zBlueprintPublicView;
|
|
3319
3370
|
export const zRegistryReplayGetPath = z.object({
|
|
3320
3371
|
slug: z
|
|
3321
3372
|
.string()
|
|
@@ -3342,14 +3393,21 @@ export const zRegistryReplayFilesPresignDownloadPath = z.object({
|
|
|
3342
3393
|
* Presigned download URL
|
|
3343
3394
|
*/
|
|
3344
3395
|
export const zRegistryReplayFilesPresignDownloadResponse = zReplayPresignDownloadResponse;
|
|
3345
|
-
export const
|
|
3346
|
-
|
|
3347
|
-
.string()
|
|
3348
|
-
.min(1)
|
|
3349
|
-
.max(128)
|
|
3350
|
-
.regex(/^[a-z0-9-]+$/),
|
|
3396
|
+
export const zRegistryReplaySharedGetPath = z.object({
|
|
3397
|
+
token: z.string().min(1),
|
|
3351
3398
|
});
|
|
3352
3399
|
/**
|
|
3353
|
-
* Public
|
|
3400
|
+
* Public replay view
|
|
3354
3401
|
*/
|
|
3355
|
-
export const
|
|
3402
|
+
export const zRegistryReplaySharedGetResponse = zReplayPublicView;
|
|
3403
|
+
export const zRegistryReplaySharedFilesPresignDownloadBody = z.object({
|
|
3404
|
+
kind: z.enum(["outputs", "uploads"]),
|
|
3405
|
+
filename: z.string().min(1),
|
|
3406
|
+
});
|
|
3407
|
+
export const zRegistryReplaySharedFilesPresignDownloadPath = z.object({
|
|
3408
|
+
token: z.string().min(1),
|
|
3409
|
+
});
|
|
3410
|
+
/**
|
|
3411
|
+
* Presigned download URL
|
|
3412
|
+
*/
|
|
3413
|
+
export const zRegistryReplaySharedFilesPresignDownloadResponse = zReplayPresignDownloadResponse;
|