@renai-labs/sdk 0.1.3 → 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.
@@ -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}$/),
@@ -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(),
@@ -1114,30 +1143,6 @@ export const zSearchResult = z.object({
1114
1143
  .datetime()
1115
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))$/),
1116
1145
  });
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
1146
  export const zAgent = z.object({
1142
1147
  id: z.string(),
1143
1148
  slug: z.string(),
@@ -1164,6 +1169,7 @@ export const zAgent = z.object({
1164
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))$/)
1165
1170
  .nullable(),
1166
1171
  deprecationMessage: z.string().nullable(),
1172
+ tags: z.array(z.string()).optional().default([]),
1167
1173
  latestVersion: zAgentLatestVersion.nullish(),
1168
1174
  });
1169
1175
  /**
@@ -2680,6 +2686,16 @@ export const zSessionUpdateQuery = z.object({
2680
2686
  * Updated session
2681
2687
  */
2682
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;
2683
2699
  export const zSessionMessagesListPath = z.object({
2684
2700
  id: z.string().min(1),
2685
2701
  });
@@ -3340,6 +3356,17 @@ export const zRegistryMcpGetPath = z.object({
3340
3356
  * MCP details
3341
3357
  */
3342
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;
3343
3370
  export const zRegistryReplayGetPath = z.object({
3344
3371
  slug: z
3345
3372
  .string()
@@ -3384,14 +3411,3 @@ export const zRegistryReplaySharedFilesPresignDownloadPath = z.object({
3384
3411
  * Presigned download URL
3385
3412
  */
3386
3413
  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.4",
4
4
  "description": "TypeScript SDK for the Ren API, generated from OpenAPI.",
5
5
  "license": "MIT",
6
6
  "author": "Ren Labs, Inc.",