You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk-react/src/contract.ts
+39-7
Original file line number
Diff line number
Diff line change
@@ -234,6 +234,17 @@ export const definition = {
234
234
}),
235
235
},
236
236
},
237
+
createEphemeralSetup: {
238
+
method: "POST",
239
+
path: "/ephemeral-setup",
240
+
responses: {
241
+
200: z.object({
242
+
clusterId: z.string(),
243
+
apiKey: z.string(),
244
+
}),
245
+
},
246
+
body: z.undefined(),
247
+
},
237
248
getContract: {
238
249
method: "GET",
239
250
path: "/contract",
@@ -292,6 +303,8 @@ export const definition = {
292
303
resultType: z.string().nullable(),
293
304
createdAt: z.date(),
294
305
blobs: z.array(blobSchema),
306
+
approved: z.boolean().nullable(),
307
+
approvalRequested: z.boolean().nullable(),
295
308
}),
296
309
},
297
310
},
@@ -725,15 +738,23 @@ export const definition = {
725
738
authorization: z.string(),
726
739
}),
727
740
body: z.object({
728
-
runId: z
741
+
id: z
729
742
.string()
730
743
.optional()
731
744
.describe(
732
-
"The run ID. If not provided, a new run will be created. If provided, the run will be created with the given"
745
+
"The run ID. If not provided, a new run will be created. If provided, the run will be created with the given. If the run already exists, it will be returned."
733
746
)
734
747
.refine(
735
-
val=>!val||/^[0-9A-Z]{26}$/.test(val),
736
-
"Run ID must be a valid ULID (26 uppercase alphanumeric characters)"
748
+
val=>!val||/^[0-9A-Za-z-_]{16,128}$/.test(val),
749
+
"Run ID must contain only alphanumeric characters, dashes, and underscores. Must be between 16 and 128 characters long."
750
+
),
751
+
runId: z
752
+
.string()
753
+
.optional()
754
+
.describe("Deprecated. Use `id` instead.")
755
+
.refine(
756
+
val=>!val||/^[0-9A-Za-z-_]{16,128}$/.test(val),
757
+
"Run ID must contain only alphanumeric characters, dashes, and underscores. Must be between 16 and 128 characters long."
737
758
),
738
759
initialPrompt: z
739
760
.string()
@@ -761,9 +782,18 @@ export const definition = {
761
782
),
762
783
onStatusChange: z
763
784
.object({
764
-
statuses: z.array(z.enum(["pending","running","paused","done","failed"])).describe(" A list of Run statuses which should trigger the handler").optional().default(["done","failed"]),
765
-
function: functionReference.describe("A function to call when the run status changes").optional(),
766
-
webhook: z.string().describe("A webhook URL to call when the run status changes").optional(),
0 commit comments