@renai-labs/sdk 0.1.3 → 0.1.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.
@@ -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 zReplayPresignDownloadResponse = z.object({
106
- url: z.string(),
107
- expiresAt: z.iso
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 zReplayPublicView = z.object({
136
+ export const zAgentLatestVersion = z.object({
123
137
  id: z.string(),
124
- slug: z.string(),
125
- createdAt: z.iso
126
- .datetime()
127
- .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))$/),
128
- session: zReplayPublicSession,
129
- messages: z.array(zReplayMessage),
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}$/),
@@ -231,6 +261,10 @@ export const zVault = z.object({
231
261
  .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))$/)
232
262
  .nullable(),
233
263
  });
264
+ export const zSlackChannel = z.object({
265
+ id: z.string(),
266
+ name: z.string(),
267
+ });
234
268
  export const zSlackInstallationResponse = z.object({
235
269
  id: z.string(),
236
270
  orgId: z.string(),
@@ -239,6 +273,12 @@ export const zSlackInstallationResponse = z.object({
239
273
  teamName: z.string().nullable(),
240
274
  botUserId: z.string(),
241
275
  scope: z.string(),
276
+ channelMappings: z.record(z.string(), z.object({
277
+ channelName: z.string().nullable(),
278
+ projectId: z.string(),
279
+ defaultProjectAgentId: z.string().nullable(),
280
+ fallbackSenderUserId: z.string().nullable(),
281
+ })),
242
282
  createdAt: z.iso
243
283
  .datetime()
244
284
  .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))$/),
@@ -259,7 +299,7 @@ export const zWebhookTrigger = z.object({
259
299
  projectId: z.string(),
260
300
  projectAgentId: z.string(),
261
301
  senderUserId: z.string(),
262
- provider: z.enum(["slack", "generic"]),
302
+ provider: z.enum(["generic"]),
263
303
  providerInstallId: z.string().nullable(),
264
304
  scopeFilter: z
265
305
  .object({
@@ -342,10 +382,6 @@ export const zSkillVersion = z.object({
342
382
  requiredCredentials: z.array(zRequiredCredential),
343
383
  releaseNotes: z.string().nullable(),
344
384
  });
345
- export const zRepository = z.object({
346
- url: z.url().optional(),
347
- source: z.string().optional(),
348
- });
349
385
  export const zSkill = z.object({
350
386
  id: z.string(),
351
387
  slug: z.string(),
@@ -395,7 +431,7 @@ export const zSessionFilesPresignUploadResponse = z.object({
395
431
  uploadUrl: z.string(),
396
432
  sandboxPath: z.string(),
397
433
  podVolume: z.object({
398
- projectId: z.string(),
434
+ projectSlug: z.string(),
399
435
  sessionId: z.string(),
400
436
  kind: z.enum(["outputs", "uploads"]),
401
437
  filename: z.string(),
@@ -457,6 +493,9 @@ export const zSessionMessagesPage = z.object({
457
493
  pageSize: z.int().gte(-9007199254740991).lte(9007199254740991),
458
494
  total: z.int().gte(-9007199254740991).lte(9007199254740991),
459
495
  });
496
+ export const zSessionUrlResponse = z.object({
497
+ url: z.string(),
498
+ });
460
499
  export const zOpencodeSession = z.object({
461
500
  id: z.string(),
462
501
  createdById: z.string(),
@@ -1114,30 +1153,6 @@ export const zSearchResult = z.object({
1114
1153
  .datetime()
1115
1154
  .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))$/),
1116
1155
  });
1117
- export const zAgentLatestVersion = z.object({
1118
- id: z.string(),
1119
- agentId: z.string(),
1120
- version: z.string().regex(/^\d+\.\d+\.\d+$/),
1121
- skills: z.array(z.object({
1122
- skillId: z.string(),
1123
- skillVersionId: z.string().nullish().default(null),
1124
- skill: z.object({
1125
- id: z.string(),
1126
- slug: z.string(),
1127
- name: z.string(),
1128
- icon: z.string().nullable(),
1129
- }),
1130
- })),
1131
- mcps: z.array(z.object({
1132
- mcpId: z.string(),
1133
- mcp: z.object({
1134
- id: z.string(),
1135
- slug: z.string(),
1136
- name: z.string(),
1137
- icon: z.string().nullable(),
1138
- }),
1139
- })),
1140
- });
1141
1156
  export const zAgent = z.object({
1142
1157
  id: z.string(),
1143
1158
  slug: z.string(),
@@ -1164,6 +1179,7 @@ export const zAgent = z.object({
1164
1179
  .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))$/)
1165
1180
  .nullable(),
1166
1181
  deprecationMessage: z.string().nullable(),
1182
+ tags: z.array(z.string()).optional().default([]),
1167
1183
  latestVersion: zAgentLatestVersion.nullish(),
1168
1184
  });
1169
1185
  /**
@@ -2668,7 +2684,7 @@ export const zSessionUpdateBody = z.object({
2668
2684
  details: z.record(z.string(), z.unknown()).optional(),
2669
2685
  })
2670
2686
  .nullish(),
2671
- currentProjectAgentId: z.string().optional(),
2687
+ currentAgentSlug: z.string().optional(),
2672
2688
  });
2673
2689
  export const zSessionUpdatePath = z.object({
2674
2690
  id: z.string().min(1),
@@ -2680,6 +2696,16 @@ export const zSessionUpdateQuery = z.object({
2680
2696
  * Updated session
2681
2697
  */
2682
2698
  export const zSessionUpdateResponse = zOpencodeSession;
2699
+ export const zSessionUrlPath = z.object({
2700
+ id: z.string().min(1),
2701
+ });
2702
+ export const zSessionUrlQuery = z.object({
2703
+ scope: z.enum(["user"]).optional(),
2704
+ });
2705
+ /**
2706
+ * OpenCode URL
2707
+ */
2708
+ export const zSessionUrlResponse2 = zSessionUrlResponse;
2683
2709
  export const zSessionMessagesListPath = z.object({
2684
2710
  id: z.string().min(1),
2685
2711
  });
@@ -3043,7 +3069,7 @@ export const zWebhookTriggerCreateBody = z.object({
3043
3069
  projectId: z.string().regex(/^prj_[0-9A-HJKMNP-TV-Z]{26}$/),
3044
3070
  projectAgentId: z.string(),
3045
3071
  senderUserId: z.string(),
3046
- provider: z.enum(["slack", "generic"]),
3072
+ provider: z.enum(["generic"]),
3047
3073
  providerInstallId: z.string().nullable(),
3048
3074
  scopeFilter: z
3049
3075
  .object({
@@ -3121,6 +3147,44 @@ export const zSlackInstallationRemoveQuery = z.object({
3121
3147
  * Removed
3122
3148
  */
3123
3149
  export const zSlackInstallationRemoveResponse = z.void();
3150
+ export const zSlackInstallationChannelListPath = z.object({
3151
+ id: z.string().regex(/^sli_[0-9A-HJKMNP-TV-Z]{26}$/),
3152
+ });
3153
+ export const zSlackInstallationChannelListQuery = z.object({
3154
+ scope: z.enum(["user"]).optional(),
3155
+ });
3156
+ /**
3157
+ * Channels visible to the Ren bot
3158
+ */
3159
+ export const zSlackInstallationChannelListResponse = z.array(zSlackChannel);
3160
+ export const zSlackInstallationChannelRemovePath = z.object({
3161
+ id: z.string().regex(/^sli_[0-9A-HJKMNP-TV-Z]{26}$/),
3162
+ channelId: z.string().min(1),
3163
+ });
3164
+ export const zSlackInstallationChannelRemoveQuery = z.object({
3165
+ scope: z.enum(["user"]).optional(),
3166
+ });
3167
+ /**
3168
+ * Updated installation
3169
+ */
3170
+ export const zSlackInstallationChannelRemoveResponse = zSlackInstallationResponse;
3171
+ export const zSlackInstallationChannelSetBody = z.object({
3172
+ channelName: z.string().nullable(),
3173
+ projectId: z.string(),
3174
+ defaultProjectAgentId: z.string().nullable(),
3175
+ fallbackSenderUserId: z.string().nullable(),
3176
+ });
3177
+ export const zSlackInstallationChannelSetPath = z.object({
3178
+ id: z.string().regex(/^sli_[0-9A-HJKMNP-TV-Z]{26}$/),
3179
+ channelId: z.string().min(1),
3180
+ });
3181
+ export const zSlackInstallationChannelSetQuery = z.object({
3182
+ scope: z.enum(["user"]).optional(),
3183
+ });
3184
+ /**
3185
+ * Updated installation
3186
+ */
3187
+ export const zSlackInstallationChannelSetResponse = zSlackInstallationResponse;
3124
3188
  export const zVaultListQuery = z.object({
3125
3189
  scope: z.enum(["user"]).optional(),
3126
3190
  limit: z.number().gte(1).lte(1000).optional(),
@@ -3340,6 +3404,17 @@ export const zRegistryMcpGetPath = z.object({
3340
3404
  * MCP details
3341
3405
  */
3342
3406
  export const zRegistryMcpGetResponse = zMcp;
3407
+ export const zRegistryBlueprintGetPath = z.object({
3408
+ slug: z
3409
+ .string()
3410
+ .min(1)
3411
+ .max(128)
3412
+ .regex(/^[a-z0-9-]+$/),
3413
+ });
3414
+ /**
3415
+ * Public blueprint view
3416
+ */
3417
+ export const zRegistryBlueprintGetResponse = zBlueprintPublicView;
3343
3418
  export const zRegistryReplayGetPath = z.object({
3344
3419
  slug: z
3345
3420
  .string()
@@ -3384,14 +3459,3 @@ export const zRegistryReplaySharedFilesPresignDownloadPath = z.object({
3384
3459
  * Presigned download URL
3385
3460
  */
3386
3461
  export const zRegistryReplaySharedFilesPresignDownloadResponse = zReplayPresignDownloadResponse;
3387
- export const zRegistryBlueprintGetPath = z.object({
3388
- slug: z
3389
- .string()
3390
- .min(1)
3391
- .max(128)
3392
- .regex(/^[a-z0-9-]+$/),
3393
- });
3394
- /**
3395
- * Public blueprint view
3396
- */
3397
- export const zRegistryBlueprintGetResponse = zBlueprintPublicView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renai-labs/sdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "TypeScript SDK for the Ren API, generated from OpenAPI.",
5
5
  "license": "MIT",
6
6
  "author": "Ren Labs, Inc.",