@keystrokehq/replicate 0.1.0 → 0.1.2
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/action.cjs.map +1 -1
- package/dist/action.mjs.map +1 -1
- package/dist/actions/account-get.cjs +3 -3
- package/dist/actions/account-get.cjs.map +1 -1
- package/dist/actions/account-get.d.cts +8 -3
- package/dist/actions/account-get.d.cts.map +1 -1
- package/dist/actions/account-get.d.mts +8 -3
- package/dist/actions/account-get.d.mts.map +1 -1
- package/dist/actions/account-get.mjs +3 -3
- package/dist/actions/account-get.mjs.map +1 -1
- package/dist/actions/cancel-prediction.cjs +6 -6
- package/dist/actions/cancel-prediction.cjs.map +1 -1
- package/dist/actions/cancel-prediction.d.cts +43 -3
- package/dist/actions/cancel-prediction.d.cts.map +1 -1
- package/dist/actions/cancel-prediction.d.mts +43 -3
- package/dist/actions/cancel-prediction.d.mts.map +1 -1
- package/dist/actions/cancel-prediction.mjs +6 -6
- package/dist/actions/cancel-prediction.mjs.map +1 -1
- package/dist/actions/collections-get.cjs +8 -8
- package/dist/actions/collections-get.cjs.map +1 -1
- package/dist/actions/collections-get.d.cts +26 -3
- package/dist/actions/collections-get.d.cts.map +1 -1
- package/dist/actions/collections-get.d.mts +26 -3
- package/dist/actions/collections-get.d.mts.map +1 -1
- package/dist/actions/collections-get.mjs +8 -8
- package/dist/actions/collections-get.mjs.map +1 -1
- package/dist/actions/collections-list.cjs +3 -3
- package/dist/actions/collections-list.cjs.map +1 -1
- package/dist/actions/collections-list.d.cts +15 -3
- package/dist/actions/collections-list.d.cts.map +1 -1
- package/dist/actions/collections-list.d.mts +15 -3
- package/dist/actions/collections-list.d.mts.map +1 -1
- package/dist/actions/collections-list.mjs +3 -3
- package/dist/actions/collections-list.mjs.map +1 -1
- package/dist/actions/create-model.cjs +7 -7
- package/dist/actions/create-model.cjs.map +1 -1
- package/dist/actions/create-model.d.cts +39 -3
- package/dist/actions/create-model.d.cts.map +1 -1
- package/dist/actions/create-model.d.mts +39 -3
- package/dist/actions/create-model.d.mts.map +1 -1
- package/dist/actions/create-model.mjs +7 -7
- package/dist/actions/create-model.mjs.map +1 -1
- package/dist/actions/create-prediction.cjs +8 -8
- package/dist/actions/create-prediction.cjs.map +1 -1
- package/dist/actions/create-prediction.d.cts +40 -3
- package/dist/actions/create-prediction.d.cts.map +1 -1
- package/dist/actions/create-prediction.d.mts +40 -3
- package/dist/actions/create-prediction.d.mts.map +1 -1
- package/dist/actions/create-prediction.mjs +8 -8
- package/dist/actions/create-prediction.mjs.map +1 -1
- package/dist/actions/deployments-create.cjs +12 -12
- package/dist/actions/deployments-create.cjs.map +1 -1
- package/dist/actions/deployments-create.d.cts +38 -3
- package/dist/actions/deployments-create.d.cts.map +1 -1
- package/dist/actions/deployments-create.d.mts +38 -3
- package/dist/actions/deployments-create.d.mts.map +1 -1
- package/dist/actions/deployments-create.mjs +12 -12
- package/dist/actions/deployments-create.mjs.map +1 -1
- package/dist/actions/deployments-delete.cjs.map +1 -1
- package/dist/actions/deployments-delete.d.cts +12 -3
- package/dist/actions/deployments-delete.d.cts.map +1 -1
- package/dist/actions/deployments-delete.d.mts +12 -3
- package/dist/actions/deployments-delete.d.mts.map +1 -1
- package/dist/actions/deployments-delete.mjs.map +1 -1
- package/dist/actions/deployments-get.cjs.map +1 -1
- package/dist/actions/deployments-get.d.cts +30 -3
- package/dist/actions/deployments-get.d.cts.map +1 -1
- package/dist/actions/deployments-get.d.mts +30 -3
- package/dist/actions/deployments-get.d.mts.map +1 -1
- package/dist/actions/deployments-get.mjs.map +1 -1
- package/dist/actions/deployments-list.cjs +12 -12
- package/dist/actions/deployments-list.cjs.map +1 -1
- package/dist/actions/deployments-list.d.cts +32 -3
- package/dist/actions/deployments-list.d.cts.map +1 -1
- package/dist/actions/deployments-list.d.mts +32 -3
- package/dist/actions/deployments-list.d.mts.map +1 -1
- package/dist/actions/deployments-list.mjs +12 -12
- package/dist/actions/deployments-list.mjs.map +1 -1
- package/dist/actions/files-create.cjs +5 -5
- package/dist/actions/files-create.cjs.map +1 -1
- package/dist/actions/files-create.d.cts +35 -3
- package/dist/actions/files-create.d.cts.map +1 -1
- package/dist/actions/files-create.d.mts +35 -3
- package/dist/actions/files-create.d.mts.map +1 -1
- package/dist/actions/files-create.mjs +5 -5
- package/dist/actions/files-create.mjs.map +1 -1
- package/dist/actions/files-delete.cjs.map +1 -1
- package/dist/actions/files-delete.d.cts +10 -3
- package/dist/actions/files-delete.d.cts.map +1 -1
- package/dist/actions/files-delete.d.mts +10 -3
- package/dist/actions/files-delete.d.mts.map +1 -1
- package/dist/actions/files-delete.mjs.map +1 -1
- package/dist/actions/files-get.cjs +6 -6
- package/dist/actions/files-get.cjs.map +1 -1
- package/dist/actions/files-get.d.cts +23 -3
- package/dist/actions/files-get.d.cts.map +1 -1
- package/dist/actions/files-get.d.mts +23 -3
- package/dist/actions/files-get.d.mts.map +1 -1
- package/dist/actions/files-get.mjs +6 -6
- package/dist/actions/files-get.mjs.map +1 -1
- package/dist/actions/files-list.cjs +7 -7
- package/dist/actions/files-list.cjs.map +1 -1
- package/dist/actions/files-list.d.cts +27 -3
- package/dist/actions/files-list.d.cts.map +1 -1
- package/dist/actions/files-list.d.mts +27 -3
- package/dist/actions/files-list.d.mts.map +1 -1
- package/dist/actions/files-list.mjs +7 -7
- package/dist/actions/files-list.mjs.map +1 -1
- package/dist/actions/get-prediction.cjs +7 -7
- package/dist/actions/get-prediction.cjs.map +1 -1
- package/dist/actions/get-prediction.d.cts +42 -3
- package/dist/actions/get-prediction.d.cts.map +1 -1
- package/dist/actions/get-prediction.d.mts +42 -3
- package/dist/actions/get-prediction.d.mts.map +1 -1
- package/dist/actions/get-prediction.mjs +7 -7
- package/dist/actions/get-prediction.mjs.map +1 -1
- package/dist/actions/hardware-list.cjs +2 -2
- package/dist/actions/hardware-list.cjs.map +1 -1
- package/dist/actions/hardware-list.d.cts +8 -3
- package/dist/actions/hardware-list.d.cts.map +1 -1
- package/dist/actions/hardware-list.d.mts +8 -3
- package/dist/actions/hardware-list.d.mts.map +1 -1
- package/dist/actions/hardware-list.mjs +2 -2
- package/dist/actions/hardware-list.mjs.map +1 -1
- package/dist/actions/models-examples-list.cjs +7 -7
- package/dist/actions/models-examples-list.cjs.map +1 -1
- package/dist/actions/models-examples-list.d.cts +37 -3
- package/dist/actions/models-examples-list.d.cts.map +1 -1
- package/dist/actions/models-examples-list.d.mts +37 -3
- package/dist/actions/models-examples-list.d.mts.map +1 -1
- package/dist/actions/models-examples-list.mjs +7 -7
- package/dist/actions/models-examples-list.mjs.map +1 -1
- package/dist/actions/models-get.cjs +20 -20
- package/dist/actions/models-get.cjs.map +1 -1
- package/dist/actions/models-get.d.cts +77 -3
- package/dist/actions/models-get.d.cts.map +1 -1
- package/dist/actions/models-get.d.mts +77 -3
- package/dist/actions/models-get.d.mts.map +1 -1
- package/dist/actions/models-get.mjs +20 -20
- package/dist/actions/models-get.mjs.map +1 -1
- package/dist/actions/models-list.cjs +8 -8
- package/dist/actions/models-list.cjs.map +1 -1
- package/dist/actions/models-list.d.cts +39 -3
- package/dist/actions/models-list.d.cts.map +1 -1
- package/dist/actions/models-list.d.mts +39 -3
- package/dist/actions/models-list.d.mts.map +1 -1
- package/dist/actions/models-list.mjs +8 -8
- package/dist/actions/models-list.mjs.map +1 -1
- package/dist/actions/models-predictions-create.cjs +5 -5
- package/dist/actions/models-predictions-create.cjs.map +1 -1
- package/dist/actions/models-predictions-create.d.cts +46 -3
- package/dist/actions/models-predictions-create.d.cts.map +1 -1
- package/dist/actions/models-predictions-create.d.mts +46 -3
- package/dist/actions/models-predictions-create.d.mts.map +1 -1
- package/dist/actions/models-predictions-create.mjs +5 -5
- package/dist/actions/models-predictions-create.mjs.map +1 -1
- package/dist/actions/models-readme-get.cjs +1 -1
- package/dist/actions/models-readme-get.cjs.map +1 -1
- package/dist/actions/models-readme-get.d.cts +11 -3
- package/dist/actions/models-readme-get.d.cts.map +1 -1
- package/dist/actions/models-readme-get.d.mts +11 -3
- package/dist/actions/models-readme-get.d.mts.map +1 -1
- package/dist/actions/models-readme-get.mjs +1 -1
- package/dist/actions/models-readme-get.mjs.map +1 -1
- package/dist/actions/models-versions-get.cjs +3 -3
- package/dist/actions/models-versions-get.cjs.map +1 -1
- package/dist/actions/models-versions-get.d.cts +16 -3
- package/dist/actions/models-versions-get.d.cts.map +1 -1
- package/dist/actions/models-versions-get.d.mts +16 -3
- package/dist/actions/models-versions-get.d.mts.map +1 -1
- package/dist/actions/models-versions-get.mjs +3 -3
- package/dist/actions/models-versions-get.mjs.map +1 -1
- package/dist/actions/models-versions-list.cjs +3 -3
- package/dist/actions/models-versions-list.cjs.map +1 -1
- package/dist/actions/models-versions-list.d.cts +20 -3
- package/dist/actions/models-versions-list.d.cts.map +1 -1
- package/dist/actions/models-versions-list.d.mts +20 -3
- package/dist/actions/models-versions-list.d.mts.map +1 -1
- package/dist/actions/models-versions-list.mjs +3 -3
- package/dist/actions/models-versions-list.mjs.map +1 -1
- package/dist/actions/predictions-create.cjs +5 -5
- package/dist/actions/predictions-create.cjs.map +1 -1
- package/dist/actions/predictions-create.d.cts +47 -3
- package/dist/actions/predictions-create.d.cts.map +1 -1
- package/dist/actions/predictions-create.d.mts +47 -3
- package/dist/actions/predictions-create.d.mts.map +1 -1
- package/dist/actions/predictions-create.mjs +5 -5
- package/dist/actions/predictions-create.mjs.map +1 -1
- package/dist/actions/predictions-list.cjs +9 -9
- package/dist/actions/predictions-list.cjs.map +1 -1
- package/dist/actions/predictions-list.d.cts +38 -3
- package/dist/actions/predictions-list.d.cts.map +1 -1
- package/dist/actions/predictions-list.d.mts +38 -3
- package/dist/actions/predictions-list.d.mts.map +1 -1
- package/dist/actions/predictions-list.mjs +9 -9
- package/dist/actions/predictions-list.mjs.map +1 -1
- package/dist/actions/search.cjs +19 -19
- package/dist/actions/search.cjs.map +1 -1
- package/dist/actions/search.d.cts +80 -3
- package/dist/actions/search.d.cts.map +1 -1
- package/dist/actions/search.d.mts +80 -3
- package/dist/actions/search.d.mts.map +1 -1
- package/dist/actions/search.mjs +19 -19
- package/dist/actions/search.mjs.map +1 -1
- package/dist/actions/trainings-cancel.cjs +6 -6
- package/dist/actions/trainings-cancel.cjs.map +1 -1
- package/dist/actions/trainings-cancel.d.cts +26 -3
- package/dist/actions/trainings-cancel.d.cts.map +1 -1
- package/dist/actions/trainings-cancel.d.mts +26 -3
- package/dist/actions/trainings-cancel.d.mts.map +1 -1
- package/dist/actions/trainings-cancel.mjs +6 -6
- package/dist/actions/trainings-cancel.mjs.map +1 -1
- package/dist/actions/trainings-create.cjs +5 -5
- package/dist/actions/trainings-create.cjs.map +1 -1
- package/dist/actions/trainings-create.d.cts +46 -3
- package/dist/actions/trainings-create.d.cts.map +1 -1
- package/dist/actions/trainings-create.d.mts +46 -3
- package/dist/actions/trainings-create.d.mts.map +1 -1
- package/dist/actions/trainings-create.mjs +5 -5
- package/dist/actions/trainings-create.mjs.map +1 -1
- package/dist/actions/trainings-list.cjs +8 -8
- package/dist/actions/trainings-list.cjs.map +1 -1
- package/dist/actions/trainings-list.d.cts +35 -3
- package/dist/actions/trainings-list.d.cts.map +1 -1
- package/dist/actions/trainings-list.d.mts +35 -3
- package/dist/actions/trainings-list.d.mts.map +1 -1
- package/dist/actions/trainings-list.mjs +8 -8
- package/dist/actions/trainings-list.mjs.map +1 -1
- package/dist/actions/update-models.cjs +6 -6
- package/dist/actions/update-models.cjs.map +1 -1
- package/dist/actions/update-models.d.cts +35 -3
- package/dist/actions/update-models.d.cts.map +1 -1
- package/dist/actions/update-models.d.mts +35 -3
- package/dist/actions/update-models.d.mts.map +1 -1
- package/dist/actions/update-models.mjs +6 -6
- package/dist/actions/update-models.mjs.map +1 -1
- package/dist/actions/webhooks-secret-get.cjs +1 -1
- package/dist/actions/webhooks-secret-get.cjs.map +1 -1
- package/dist/actions/webhooks-secret-get.d.cts +5 -3
- package/dist/actions/webhooks-secret-get.d.cts.map +1 -1
- package/dist/actions/webhooks-secret-get.d.mts +5 -3
- package/dist/actions/webhooks-secret-get.d.mts.map +1 -1
- package/dist/actions/webhooks-secret-get.mjs +1 -1
- package/dist/actions/webhooks-secret-get.mjs.map +1 -1
- package/dist/catalog.cjs +7 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +8 -0
- package/dist/catalog.d.mts +8 -0
- package/dist/catalog.mjs +7 -1
- package/dist/catalog.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -16,9 +16,9 @@ const ReplicatePredictionsCreateInput = zod.z.object({
|
|
|
16
16
|
])).describe("Controls webhook triggers. Options: 'start', 'output', 'logs', 'completed'. Output/logs events throttled to once per 500ms").optional()
|
|
17
17
|
}).describe("Request schema for creating a prediction by version ID.");
|
|
18
18
|
const ReplicatePredictionsCreate_PredictionUrlsSchema = zod.z.object({
|
|
19
|
-
get: zod.z.string().describe("API endpoint URL to get the prediction details"),
|
|
19
|
+
get: zod.z.string().describe("API endpoint URL to get the prediction details").nullable(),
|
|
20
20
|
web: zod.z.string().describe("Web URL for viewing the prediction in a browser").nullable().optional(),
|
|
21
|
-
cancel: zod.z.string().describe("API endpoint URL to cancel the prediction"),
|
|
21
|
+
cancel: zod.z.string().describe("API endpoint URL to cancel the prediction").nullable(),
|
|
22
22
|
stream: zod.z.string().describe("Streaming URL for the prediction, if available").nullable().optional()
|
|
23
23
|
}).describe("URLs associated with a prediction.\n\nNote: The official OpenAPI schema (https://api.replicate.com/openapi.json) marks 'web'\nas required, but actual API responses from default_example objects omit this field.\nTo ensure compatibility with real API responses, 'web' is marked as optional.");
|
|
24
24
|
const ReplicatePredictionsCreate_PredictionMetricsSchema = zod.z.object({
|
|
@@ -26,17 +26,17 @@ const ReplicatePredictionsCreate_PredictionMetricsSchema = zod.z.object({
|
|
|
26
26
|
predict_time: zod.z.number().describe("CPU/GPU seconds used during model execution").nullable().optional()
|
|
27
27
|
}).passthrough().describe("Metrics associated with a prediction.");
|
|
28
28
|
const ReplicatePredictionsCreateOutput = zod.z.object({
|
|
29
|
-
id: zod.z.string().describe("Unique prediction identifier"),
|
|
29
|
+
id: zod.z.string().describe("Unique prediction identifier").nullable(),
|
|
30
30
|
logs: zod.z.string().describe("Captured output from prediction execution").nullable().optional(),
|
|
31
31
|
urls: ReplicatePredictionsCreate_PredictionUrlsSchema.nullable(),
|
|
32
32
|
error: zod.z.string().describe("Error message if prediction failed").nullable().optional(),
|
|
33
33
|
input: zod.z.record(zod.z.string(), zod.z.unknown()).describe("The input parameters provided"),
|
|
34
34
|
model: zod.z.string().describe("Model identifier in format {owner}/{name}").nullable().optional(),
|
|
35
35
|
output: zod.z.unknown().describe("Model results; null after automatic data removal (~1 hour)").nullable().optional(),
|
|
36
|
-
status: zod.z.string().describe("One of 'starting', 'processing', 'succeeded', 'failed', 'canceled'"),
|
|
36
|
+
status: zod.z.string().describe("One of 'starting', 'processing', 'succeeded', 'failed', 'canceled'").nullable(),
|
|
37
37
|
metrics: ReplicatePredictionsCreate_PredictionMetricsSchema.nullable().optional(),
|
|
38
38
|
version: zod.z.string().describe("64-character model version ID").nullable().optional(),
|
|
39
|
-
created_at: zod.z.string().describe("ISO 8601 timestamp of creation"),
|
|
39
|
+
created_at: zod.z.string().describe("ISO 8601 timestamp of creation").nullable(),
|
|
40
40
|
started_at: zod.z.string().describe("ISO 8601 timestamp when processing began").nullable().optional(),
|
|
41
41
|
completed_at: zod.z.string().describe("ISO 8601 timestamp when prediction finished").nullable().optional(),
|
|
42
42
|
data_removed: zod.z.boolean().describe("Whether input/output data was deleted").nullable().optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictions-create.cjs","names":["z","action"],"sources":["../../src/actions/predictions-create.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ReplicatePredictionsCreateInput
|
|
1
|
+
{"version":3,"file":"predictions-create.cjs","names":["z","action"],"sources":["../../src/actions/predictions-create.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ReplicatePredictionsCreateInput = z.object({\n input: z.record(z.string(), z.unknown()).describe(\"Model inputs as JSON object. Schema varies by model. Files should be HTTP URLs (for files >256kb or reusable) or data URLs (for files ≤256kb)\"),\n stream: z.boolean().describe(\"Deprecated. Streaming availability is now included in response urls\").optional(),\n version: z.string().describe(\"Model version identifier. Accepts formats: {owner}/{name}, {owner}/{name}:{version_id}, or {version_id} alone\"),\n webhook: z.string().describe(\"HTTPS URL to receive POST requests when prediction updates occur. Body mirrors the get prediction response\").optional(),\n wait_for: z.number().int().describe(\"Seconds (1-60) to hold connection open until model finishes. Adds 'Prefer: wait=<n>' header\").optional(),\n cancel_after: z.string().describe(\"Maximum runtime before automatic cancellation. Accepts durations with optional suffixes (s/m/h). Minimum: 5 seconds. Examples: '30s', '5m', '1h30m45s'\").optional(),\n webhook_events_filter: z.array(z.enum([\"start\", \"output\", \"logs\", \"completed\"])).describe(\"Controls webhook triggers. Options: 'start', 'output', 'logs', 'completed'. Output/logs events throttled to once per 500ms\").optional(),\n}).describe(\"Request schema for creating a prediction by version ID.\");\nconst ReplicatePredictionsCreate_PredictionUrlsSchema = z.object({\n get: z.string().describe(\"API endpoint URL to get the prediction details\").nullable(),\n web: z.string().describe(\"Web URL for viewing the prediction in a browser\").nullable().optional(),\n cancel: z.string().describe(\"API endpoint URL to cancel the prediction\").nullable(),\n stream: z.string().describe(\"Streaming URL for the prediction, if available\").nullable().optional(),\n}).describe(\"URLs associated with a prediction.\\n\\nNote: The official OpenAPI schema (https://api.replicate.com/openapi.json) marks 'web'\\nas required, but actual API responses from default_example objects omit this field.\\nTo ensure compatibility with real API responses, 'web' is marked as optional.\");\nconst ReplicatePredictionsCreate_PredictionMetricsSchema = z.object({\n total_time: z.number().describe(\"Total time in seconds for the prediction\").nullable().optional(),\n predict_time: z.number().describe(\"CPU/GPU seconds used during model execution\").nullable().optional(),\n}).passthrough().describe(\"Metrics associated with a prediction.\");\nexport const ReplicatePredictionsCreateOutput = z.object({\n id: z.string().describe(\"Unique prediction identifier\").nullable(),\n logs: z.string().describe(\"Captured output from prediction execution\").nullable().optional(),\n urls: ReplicatePredictionsCreate_PredictionUrlsSchema.nullable(),\n error: z.string().describe(\"Error message if prediction failed\").nullable().optional(),\n input: z.record(z.string(), z.unknown()).describe(\"The input parameters provided\"),\n model: z.string().describe(\"Model identifier in format {owner}/{name}\").nullable().optional(),\n output: z.unknown().describe(\"Model results; null after automatic data removal (~1 hour)\").nullable().optional(),\n status: z.string().describe(\"One of 'starting', 'processing', 'succeeded', 'failed', 'canceled'\").nullable(),\n metrics: ReplicatePredictionsCreate_PredictionMetricsSchema.nullable().optional(),\n version: z.string().describe(\"64-character model version ID\").nullable().optional(),\n created_at: z.string().describe(\"ISO 8601 timestamp of creation\").nullable(),\n started_at: z.string().describe(\"ISO 8601 timestamp when processing began\").nullable().optional(),\n completed_at: z.string().describe(\"ISO 8601 timestamp when prediction finished\").nullable().optional(),\n data_removed: z.boolean().describe(\"Whether input/output data was deleted\").nullable().optional(),\n}).describe(\"Response schema for creating a prediction.\");\n\nexport const replicatePredictionsCreate = action(\"REPLICATE_PREDICTIONS_CREATE\", {\n slug: \"replicate-predictions-create\",\n name: \"Create Prediction\",\n description: \"Tool to create a prediction to run a model by version ID. Use when you have a specific model version identifier and need to run inference with provided inputs. Supports synchronous waiting and webhook notifications.\",\n input: ReplicatePredictionsCreateInput,\n output: ReplicatePredictionsCreateOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkCA,IAAAA,EAAE,OAAO;CACtD,OAAOA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,+IAA+I;CACjM,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CAC7G,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+GAA+G;CAC5I,SAASA,IAAAA,EAAE,OAAO,CAAC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ACP,QAAQ;AACV,CAAC"}
|
|
@@ -1,9 +1,53 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/predictions-create.d.ts
|
|
4
|
-
declare const ReplicatePredictionsCreateInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const ReplicatePredictionsCreateInput: z.ZodObject<{
|
|
5
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6
|
+
stream: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
version: z.ZodString;
|
|
8
|
+
webhook: z.ZodOptional<z.ZodString>;
|
|
9
|
+
wait_for: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
cancel_after: z.ZodOptional<z.ZodString>;
|
|
11
|
+
webhook_events_filter: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
12
|
+
output: "output";
|
|
13
|
+
logs: "logs";
|
|
14
|
+
start: "start";
|
|
15
|
+
completed: "completed";
|
|
16
|
+
}>>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
declare const ReplicatePredictionsCreateOutput: z.ZodObject<{
|
|
19
|
+
id: z.ZodNullable<z.ZodString>;
|
|
20
|
+
logs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
urls: z.ZodNullable<z.ZodObject<{
|
|
22
|
+
get: z.ZodNullable<z.ZodString>;
|
|
23
|
+
web: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
cancel: z.ZodNullable<z.ZodString>;
|
|
25
|
+
stream: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
29
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
31
|
+
status: z.ZodNullable<z.ZodString>;
|
|
32
|
+
metrics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
33
|
+
total_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
34
|
+
predict_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
}, z.core.$loose>>>;
|
|
36
|
+
version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
38
|
+
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
|
+
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
|
+
data_removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
declare const replicatePredictionsCreate: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
43
|
+
input: Record<string, unknown>;
|
|
44
|
+
version: string;
|
|
45
|
+
stream?: boolean | undefined;
|
|
46
|
+
webhook?: string | undefined;
|
|
47
|
+
wait_for?: number | undefined;
|
|
48
|
+
cancel_after?: string | undefined;
|
|
49
|
+
webhook_events_filter?: ("output" | "logs" | "start" | "completed")[] | undefined;
|
|
50
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
51
|
//#endregion
|
|
8
52
|
export { replicatePredictionsCreate };
|
|
9
53
|
//# sourceMappingURL=predictions-create.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictions-create.d.cts","names":[],"sources":["../../src/actions/predictions-create.ts"],"mappings":";;;cAIa,+BAAA,
|
|
1
|
+
{"version":3,"file":"predictions-create.d.cts","names":[],"sources":["../../src/actions/predictions-create.ts"],"mappings":";;;cAIa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAmB/B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;cAiBhC,0BAAA,gCAA0B,wBAAA;SAMrC,MAAA"}
|
|
@@ -1,9 +1,53 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/predictions-create.d.ts
|
|
4
|
-
declare const ReplicatePredictionsCreateInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const ReplicatePredictionsCreateInput: z.ZodObject<{
|
|
5
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6
|
+
stream: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
version: z.ZodString;
|
|
8
|
+
webhook: z.ZodOptional<z.ZodString>;
|
|
9
|
+
wait_for: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
cancel_after: z.ZodOptional<z.ZodString>;
|
|
11
|
+
webhook_events_filter: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
12
|
+
output: "output";
|
|
13
|
+
logs: "logs";
|
|
14
|
+
start: "start";
|
|
15
|
+
completed: "completed";
|
|
16
|
+
}>>>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
declare const ReplicatePredictionsCreateOutput: z.ZodObject<{
|
|
19
|
+
id: z.ZodNullable<z.ZodString>;
|
|
20
|
+
logs: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
urls: z.ZodNullable<z.ZodObject<{
|
|
22
|
+
get: z.ZodNullable<z.ZodString>;
|
|
23
|
+
web: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
|
+
cancel: z.ZodNullable<z.ZodString>;
|
|
25
|
+
stream: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
29
|
+
model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
output: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
31
|
+
status: z.ZodNullable<z.ZodString>;
|
|
32
|
+
metrics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
33
|
+
total_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
34
|
+
predict_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
}, z.core.$loose>>>;
|
|
36
|
+
version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
38
|
+
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
|
+
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
|
+
data_removed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
declare const replicatePredictionsCreate: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
43
|
+
input: Record<string, unknown>;
|
|
44
|
+
version: string;
|
|
45
|
+
stream?: boolean | undefined;
|
|
46
|
+
webhook?: string | undefined;
|
|
47
|
+
wait_for?: number | undefined;
|
|
48
|
+
cancel_after?: string | undefined;
|
|
49
|
+
webhook_events_filter?: ("output" | "logs" | "start" | "completed")[] | undefined;
|
|
50
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
51
|
//#endregion
|
|
8
52
|
export { replicatePredictionsCreate };
|
|
9
53
|
//# sourceMappingURL=predictions-create.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictions-create.d.mts","names":[],"sources":["../../src/actions/predictions-create.ts"],"mappings":";;;cAIa,+BAAA,
|
|
1
|
+
{"version":3,"file":"predictions-create.d.mts","names":[],"sources":["../../src/actions/predictions-create.ts"],"mappings":";;;cAIa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;cAmB/B,gCAAA,EAAgC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;cAiBhC,0BAAA,gCAA0B,wBAAA;SAMrC,MAAA"}
|
|
@@ -16,9 +16,9 @@ const ReplicatePredictionsCreateInput = z.object({
|
|
|
16
16
|
])).describe("Controls webhook triggers. Options: 'start', 'output', 'logs', 'completed'. Output/logs events throttled to once per 500ms").optional()
|
|
17
17
|
}).describe("Request schema for creating a prediction by version ID.");
|
|
18
18
|
const ReplicatePredictionsCreate_PredictionUrlsSchema = z.object({
|
|
19
|
-
get: z.string().describe("API endpoint URL to get the prediction details"),
|
|
19
|
+
get: z.string().describe("API endpoint URL to get the prediction details").nullable(),
|
|
20
20
|
web: z.string().describe("Web URL for viewing the prediction in a browser").nullable().optional(),
|
|
21
|
-
cancel: z.string().describe("API endpoint URL to cancel the prediction"),
|
|
21
|
+
cancel: z.string().describe("API endpoint URL to cancel the prediction").nullable(),
|
|
22
22
|
stream: z.string().describe("Streaming URL for the prediction, if available").nullable().optional()
|
|
23
23
|
}).describe("URLs associated with a prediction.\n\nNote: The official OpenAPI schema (https://api.replicate.com/openapi.json) marks 'web'\nas required, but actual API responses from default_example objects omit this field.\nTo ensure compatibility with real API responses, 'web' is marked as optional.");
|
|
24
24
|
const ReplicatePredictionsCreate_PredictionMetricsSchema = z.object({
|
|
@@ -31,17 +31,17 @@ const replicatePredictionsCreate = action("REPLICATE_PREDICTIONS_CREATE", {
|
|
|
31
31
|
description: "Tool to create a prediction to run a model by version ID. Use when you have a specific model version identifier and need to run inference with provided inputs. Supports synchronous waiting and webhook notifications.",
|
|
32
32
|
input: ReplicatePredictionsCreateInput,
|
|
33
33
|
output: z.object({
|
|
34
|
-
id: z.string().describe("Unique prediction identifier"),
|
|
34
|
+
id: z.string().describe("Unique prediction identifier").nullable(),
|
|
35
35
|
logs: z.string().describe("Captured output from prediction execution").nullable().optional(),
|
|
36
36
|
urls: ReplicatePredictionsCreate_PredictionUrlsSchema.nullable(),
|
|
37
37
|
error: z.string().describe("Error message if prediction failed").nullable().optional(),
|
|
38
38
|
input: z.record(z.string(), z.unknown()).describe("The input parameters provided"),
|
|
39
39
|
model: z.string().describe("Model identifier in format {owner}/{name}").nullable().optional(),
|
|
40
40
|
output: z.unknown().describe("Model results; null after automatic data removal (~1 hour)").nullable().optional(),
|
|
41
|
-
status: z.string().describe("One of 'starting', 'processing', 'succeeded', 'failed', 'canceled'"),
|
|
41
|
+
status: z.string().describe("One of 'starting', 'processing', 'succeeded', 'failed', 'canceled'").nullable(),
|
|
42
42
|
metrics: ReplicatePredictionsCreate_PredictionMetricsSchema.nullable().optional(),
|
|
43
43
|
version: z.string().describe("64-character model version ID").nullable().optional(),
|
|
44
|
-
created_at: z.string().describe("ISO 8601 timestamp of creation"),
|
|
44
|
+
created_at: z.string().describe("ISO 8601 timestamp of creation").nullable(),
|
|
45
45
|
started_at: z.string().describe("ISO 8601 timestamp when processing began").nullable().optional(),
|
|
46
46
|
completed_at: z.string().describe("ISO 8601 timestamp when prediction finished").nullable().optional(),
|
|
47
47
|
data_removed: z.boolean().describe("Whether input/output data was deleted").nullable().optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictions-create.mjs","names":[],"sources":["../../src/actions/predictions-create.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ReplicatePredictionsCreateInput
|
|
1
|
+
{"version":3,"file":"predictions-create.mjs","names":[],"sources":["../../src/actions/predictions-create.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ReplicatePredictionsCreateInput = z.object({\n input: z.record(z.string(), z.unknown()).describe(\"Model inputs as JSON object. Schema varies by model. Files should be HTTP URLs (for files >256kb or reusable) or data URLs (for files ≤256kb)\"),\n stream: z.boolean().describe(\"Deprecated. Streaming availability is now included in response urls\").optional(),\n version: z.string().describe(\"Model version identifier. Accepts formats: {owner}/{name}, {owner}/{name}:{version_id}, or {version_id} alone\"),\n webhook: z.string().describe(\"HTTPS URL to receive POST requests when prediction updates occur. Body mirrors the get prediction response\").optional(),\n wait_for: z.number().int().describe(\"Seconds (1-60) to hold connection open until model finishes. Adds 'Prefer: wait=<n>' header\").optional(),\n cancel_after: z.string().describe(\"Maximum runtime before automatic cancellation. Accepts durations with optional suffixes (s/m/h). Minimum: 5 seconds. Examples: '30s', '5m', '1h30m45s'\").optional(),\n webhook_events_filter: z.array(z.enum([\"start\", \"output\", \"logs\", \"completed\"])).describe(\"Controls webhook triggers. Options: 'start', 'output', 'logs', 'completed'. Output/logs events throttled to once per 500ms\").optional(),\n}).describe(\"Request schema for creating a prediction by version ID.\");\nconst ReplicatePredictionsCreate_PredictionUrlsSchema = z.object({\n get: z.string().describe(\"API endpoint URL to get the prediction details\").nullable(),\n web: z.string().describe(\"Web URL for viewing the prediction in a browser\").nullable().optional(),\n cancel: z.string().describe(\"API endpoint URL to cancel the prediction\").nullable(),\n stream: z.string().describe(\"Streaming URL for the prediction, if available\").nullable().optional(),\n}).describe(\"URLs associated with a prediction.\\n\\nNote: The official OpenAPI schema (https://api.replicate.com/openapi.json) marks 'web'\\nas required, but actual API responses from default_example objects omit this field.\\nTo ensure compatibility with real API responses, 'web' is marked as optional.\");\nconst ReplicatePredictionsCreate_PredictionMetricsSchema = z.object({\n total_time: z.number().describe(\"Total time in seconds for the prediction\").nullable().optional(),\n predict_time: z.number().describe(\"CPU/GPU seconds used during model execution\").nullable().optional(),\n}).passthrough().describe(\"Metrics associated with a prediction.\");\nexport const ReplicatePredictionsCreateOutput = z.object({\n id: z.string().describe(\"Unique prediction identifier\").nullable(),\n logs: z.string().describe(\"Captured output from prediction execution\").nullable().optional(),\n urls: ReplicatePredictionsCreate_PredictionUrlsSchema.nullable(),\n error: z.string().describe(\"Error message if prediction failed\").nullable().optional(),\n input: z.record(z.string(), z.unknown()).describe(\"The input parameters provided\"),\n model: z.string().describe(\"Model identifier in format {owner}/{name}\").nullable().optional(),\n output: z.unknown().describe(\"Model results; null after automatic data removal (~1 hour)\").nullable().optional(),\n status: z.string().describe(\"One of 'starting', 'processing', 'succeeded', 'failed', 'canceled'\").nullable(),\n metrics: ReplicatePredictionsCreate_PredictionMetricsSchema.nullable().optional(),\n version: z.string().describe(\"64-character model version ID\").nullable().optional(),\n created_at: z.string().describe(\"ISO 8601 timestamp of creation\").nullable(),\n started_at: z.string().describe(\"ISO 8601 timestamp when processing began\").nullable().optional(),\n completed_at: z.string().describe(\"ISO 8601 timestamp when prediction finished\").nullable().optional(),\n data_removed: z.boolean().describe(\"Whether input/output data was deleted\").nullable().optional(),\n}).describe(\"Response schema for creating a prediction.\");\n\nexport const replicatePredictionsCreate = action(\"REPLICATE_PREDICTIONS_CREATE\", {\n slug: \"replicate-predictions-create\",\n name: \"Create Prediction\",\n description: \"Tool to create a prediction to run a model by version ID. Use when you have a specific model version identifier and need to run inference with provided inputs. Supports synchronous waiting and webhook notifications.\",\n input: ReplicatePredictionsCreateInput,\n output: ReplicatePredictionsCreateOutput,\n});\n"],"mappings":";;;AAIA,MAAa,kCAAkC,EAAE,OAAO;CACtD,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,+IAA+I;CACjM,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CAC7G,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,+GAA+G;CAC5I,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,4GAA4G,CAAC,CAAC,SAAS;CACpJ,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6FAA6F,CAAC,CAAC,SAAS;CAC5I,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,wJAAwJ,CAAC,CAAC,SAAS;CACrM,uBAAuB,EAAE,MAAM,EAAE,KAAK;EAAC;EAAS;EAAU;EAAQ;CAAW,CAAC,CAAC,CAAC,CAAC,SAAS,4HAA4H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AC,SAAS,CAAC,CAAC,SAAS;EAC5F,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/G,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;EAC3G,SAAS,mDAAmD,SAAS,CAAC,CAAC,SAAS;EAChF,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,+BAA+B,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAClF,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS;EAC3E,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAChG,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrG,cAAc,EAAE,QAAQ,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClG,CAAC,CAAC,CAAC,SAAS,4CAOF;AACV,CAAC"}
|
|
@@ -7,9 +7,9 @@ const ReplicatePredictionsListInput = zod.z.object({
|
|
|
7
7
|
created_before: zod.z.string().describe("Include only predictions created before this date-time, in ISO 8601 format (e.g., '2024-12-31T23:59:59Z'). Useful for filtering older predictions.").optional()
|
|
8
8
|
}).describe("Request schema for listing predictions with optional date filtering.");
|
|
9
9
|
const ReplicatePredictionsList_PredictionUrlsSchema = zod.z.object({
|
|
10
|
-
get: zod.z.string().describe("API endpoint URL to get the prediction details"),
|
|
10
|
+
get: zod.z.string().describe("API endpoint URL to get the prediction details").nullable(),
|
|
11
11
|
web: zod.z.string().describe("Web URL for viewing the prediction in a browser").nullable().optional(),
|
|
12
|
-
cancel: zod.z.string().describe("API endpoint URL to cancel the prediction"),
|
|
12
|
+
cancel: zod.z.string().describe("API endpoint URL to cancel the prediction").nullable(),
|
|
13
13
|
stream: zod.z.string().describe("Streaming URL for the prediction, if available").nullable().optional()
|
|
14
14
|
}).describe("URLs associated with a prediction.\n\nNote: The official OpenAPI schema (https://api.replicate.com/openapi.json) marks 'web'\nas required, but actual API responses from default_example objects omit this field.\nTo ensure compatibility with real API responses, 'web' is marked as optional.");
|
|
15
15
|
const ReplicatePredictionsList_PredictionMetricsSchema = zod.z.object({
|
|
@@ -17,11 +17,11 @@ const ReplicatePredictionsList_PredictionMetricsSchema = zod.z.object({
|
|
|
17
17
|
predict_time: zod.z.number().describe("CPU/GPU seconds used during model execution").nullable().optional()
|
|
18
18
|
}).passthrough().describe("Metrics associated with a prediction.");
|
|
19
19
|
const ReplicatePredictionsList_PredictionSchema = zod.z.object({
|
|
20
|
-
id: zod.z.string().describe("Unique identifier for this prediction"),
|
|
20
|
+
id: zod.z.string().describe("Unique identifier for this prediction").nullable(),
|
|
21
21
|
urls: ReplicatePredictionsList_PredictionUrlsSchema.nullable(),
|
|
22
22
|
error: zod.z.string().describe("Error message if the prediction failed, null otherwise").nullable().optional(),
|
|
23
23
|
input: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Input parameters provided to the model").nullable().optional(),
|
|
24
|
-
model: zod.z.string().describe("Model identifier in format {owner}/{name}"),
|
|
24
|
+
model: zod.z.string().describe("Model identifier in format {owner}/{name}").nullable(),
|
|
25
25
|
output: zod.z.union([
|
|
26
26
|
zod.z.string(),
|
|
27
27
|
zod.z.number().int(),
|
|
@@ -30,14 +30,14 @@ const ReplicatePredictionsList_PredictionSchema = zod.z.object({
|
|
|
30
30
|
zod.z.array(zod.z.unknown()),
|
|
31
31
|
zod.z.record(zod.z.string(), zod.z.unknown())
|
|
32
32
|
]).nullable().optional(),
|
|
33
|
-
source: zod.z.string().describe("How the prediction was created: 'web' or 'api'"),
|
|
34
|
-
status: zod.z.string().describe("Current state of the prediction: 'starting', 'processing', 'succeeded', 'failed', or 'canceled'"),
|
|
33
|
+
source: zod.z.string().describe("How the prediction was created: 'web' or 'api'").nullable(),
|
|
34
|
+
status: zod.z.string().describe("Current state of the prediction: 'starting', 'processing', 'succeeded', 'failed', or 'canceled'").nullable(),
|
|
35
35
|
metrics: ReplicatePredictionsList_PredictionMetricsSchema.nullable().optional(),
|
|
36
|
-
version: zod.z.string().describe("Unique ID of the model version used for this prediction"),
|
|
37
|
-
created_at: zod.z.string().describe("ISO 8601 timestamp when the prediction was created"),
|
|
36
|
+
version: zod.z.string().describe("Unique ID of the model version used for this prediction").nullable(),
|
|
37
|
+
created_at: zod.z.string().describe("ISO 8601 timestamp when the prediction was created").nullable(),
|
|
38
38
|
started_at: zod.z.string().describe("ISO 8601 timestamp when processing began, null if not started").nullable().optional(),
|
|
39
39
|
completed_at: zod.z.string().describe("ISO 8601 timestamp when the prediction completed, null if not completed").nullable().optional(),
|
|
40
|
-
data_removed: zod.z.boolean().describe("Whether input/output data has been deleted from the system")
|
|
40
|
+
data_removed: zod.z.boolean().describe("Whether input/output data has been deleted from the system").nullable()
|
|
41
41
|
}).describe("Representation of a prediction object.");
|
|
42
42
|
const ReplicatePredictionsListOutput = zod.z.object({
|
|
43
43
|
next: zod.z.string().describe("URL for the next page of results, null if no more pages available").nullable().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictions-list.cjs","names":["z","action"],"sources":["../../src/actions/predictions-list.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ReplicatePredictionsListInput
|
|
1
|
+
{"version":3,"file":"predictions-list.cjs","names":["z","action"],"sources":["../../src/actions/predictions-list.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ReplicatePredictionsListInput = z.object({\n cursor: z.string().describe(\"Cursor for pagination. Use the cursor from 'next' URL of previous response.\").optional(),\n created_after: z.string().describe(\"Include only predictions created at or after this date-time, in ISO 8601 format (e.g., '2024-01-01T00:00:00Z'). Useful for filtering recent predictions.\").optional(),\n created_before: z.string().describe(\"Include only predictions created before this date-time, in ISO 8601 format (e.g., '2024-12-31T23:59:59Z'). Useful for filtering older predictions.\").optional(),\n}).describe(\"Request schema for listing predictions with optional date filtering.\");\nconst ReplicatePredictionsList_PredictionUrlsSchema = z.object({\n get: z.string().describe(\"API endpoint URL to get the prediction details\").nullable(),\n web: z.string().describe(\"Web URL for viewing the prediction in a browser\").nullable().optional(),\n cancel: z.string().describe(\"API endpoint URL to cancel the prediction\").nullable(),\n stream: z.string().describe(\"Streaming URL for the prediction, if available\").nullable().optional(),\n}).describe(\"URLs associated with a prediction.\\n\\nNote: The official OpenAPI schema (https://api.replicate.com/openapi.json) marks 'web'\\nas required, but actual API responses from default_example objects omit this field.\\nTo ensure compatibility with real API responses, 'web' is marked as optional.\");\nconst ReplicatePredictionsList_PredictionMetricsSchema = z.object({\n total_time: z.number().describe(\"Total time in seconds for the prediction\").nullable().optional(),\n predict_time: z.number().describe(\"CPU/GPU seconds used during model execution\").nullable().optional(),\n}).passthrough().describe(\"Metrics associated with a prediction.\");\nconst ReplicatePredictionsList_PredictionSchema = z.object({\n id: z.string().describe(\"Unique identifier for this prediction\").nullable(),\n urls: ReplicatePredictionsList_PredictionUrlsSchema.nullable(),\n error: z.string().describe(\"Error message if the prediction failed, null otherwise\").nullable().optional(),\n input: z.record(z.string(), z.unknown()).describe(\"Input parameters provided to the model\").nullable().optional(),\n model: z.string().describe(\"Model identifier in format {owner}/{name}\").nullable(),\n output: z.union([z.string(), z.number().int(), z.number(), z.boolean(), z.array(z.unknown()), z.record(z.string(), z.unknown())]).nullable().optional(),\n source: z.string().describe(\"How the prediction was created: 'web' or 'api'\").nullable(),\n status: z.string().describe(\"Current state of the prediction: 'starting', 'processing', 'succeeded', 'failed', or 'canceled'\").nullable(),\n metrics: ReplicatePredictionsList_PredictionMetricsSchema.nullable().optional(),\n version: z.string().describe(\"Unique ID of the model version used for this prediction\").nullable(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the prediction was created\").nullable(),\n started_at: z.string().describe(\"ISO 8601 timestamp when processing began, null if not started\").nullable().optional(),\n completed_at: z.string().describe(\"ISO 8601 timestamp when the prediction completed, null if not completed\").nullable().optional(),\n data_removed: z.boolean().describe(\"Whether input/output data has been deleted from the system\").nullable(),\n}).describe(\"Representation of a prediction object.\");\nexport const ReplicatePredictionsListOutput = z.object({\n next: z.string().describe(\"URL for the next page of results, null if no more pages available\").nullable().optional(),\n results: z.array(ReplicatePredictionsList_PredictionSchema).describe(\"Array of prediction objects on this page (up to 100 predictions per page)\"),\n previous: z.string().describe(\"URL for the previous page of results, null if on the first page\").nullable().optional(),\n}).describe(\"Paginated list of predictions.\");\n\nexport const replicatePredictionsList = action(\"REPLICATE_PREDICTIONS_LIST\", {\n slug: \"replicate-predictions-list\",\n name: \"List All Predictions\",\n description: \"Tool to list all predictions for the authenticated user or organization with pagination. Use when you need to retrieve prediction history or filter predictions by creation date.\",\n input: ReplicatePredictionsListInput,\n output: ReplicatePredictionsListOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAAgCA,IAAAA,EAAE,OAAO;CACpD,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6EAA6E,CAAC,CAAC,SAAS;CACpH,eAAeA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0JAA0J,CAAC,CAAC,SAAS;CACxM,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oJAAoJ,CAAC,CAAC,SAAS;AACrM,CAAC,CAAC,CAAC,SAAS,sEAAsE;AAClF,MAAM,gDAAgDA,IAAAA,EAAE,OAAO;CAC7D,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACpF,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CAClF,QAAQA,IAAAA,EAAE,OAA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
6
|
-
|
|
4
|
+
declare const ReplicatePredictionsListInput: z.ZodObject<{
|
|
5
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
6
|
+
created_after: z.ZodOptional<z.ZodString>;
|
|
7
|
+
created_before: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
declare const ReplicatePredictionsListOutput: z.ZodObject<{
|
|
10
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
results: z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodNullable<z.ZodString>;
|
|
13
|
+
urls: z.ZodNullable<z.ZodObject<{
|
|
14
|
+
get: z.ZodNullable<z.ZodString>;
|
|
15
|
+
web: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
cancel: z.ZodNullable<z.ZodString>;
|
|
17
|
+
stream: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
input: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
21
|
+
model: z.ZodNullable<z.ZodString>;
|
|
22
|
+
output: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
|
|
23
|
+
source: z.ZodNullable<z.ZodString>;
|
|
24
|
+
status: z.ZodNullable<z.ZodString>;
|
|
25
|
+
metrics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
26
|
+
total_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
27
|
+
predict_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
28
|
+
}, z.core.$loose>>>;
|
|
29
|
+
version: z.ZodNullable<z.ZodString>;
|
|
30
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
31
|
+
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
data_removed: z.ZodNullable<z.ZodBoolean>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
previous: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
declare const replicatePredictionsList: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
38
|
+
cursor?: string | undefined;
|
|
39
|
+
created_after?: string | undefined;
|
|
40
|
+
created_before?: string | undefined;
|
|
41
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
42
|
//#endregion
|
|
8
43
|
export { replicatePredictionsList };
|
|
9
44
|
//# sourceMappingURL=predictions-list.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictions-list.d.cts","names":[],"sources":["../../src/actions/predictions-list.ts"],"mappings":";;;cAIa,6BAAA,
|
|
1
|
+
{"version":3,"file":"predictions-list.d.cts","names":[],"sources":["../../src/actions/predictions-list.ts"],"mappings":";;;cAIa,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;cA+B7B,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAM9B,wBAAA,gCAAwB,wBAAA"}
|
|
@@ -1,9 +1,44 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/actions/predictions-list.d.ts
|
|
4
|
-
declare const ReplicatePredictionsListInput: z.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
declare const ReplicatePredictionsListInput: z.ZodObject<{
|
|
5
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
6
|
+
created_after: z.ZodOptional<z.ZodString>;
|
|
7
|
+
created_before: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
declare const ReplicatePredictionsListOutput: z.ZodObject<{
|
|
10
|
+
next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
results: z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodNullable<z.ZodString>;
|
|
13
|
+
urls: z.ZodNullable<z.ZodObject<{
|
|
14
|
+
get: z.ZodNullable<z.ZodString>;
|
|
15
|
+
web: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
cancel: z.ZodNullable<z.ZodString>;
|
|
17
|
+
stream: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
input: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
21
|
+
model: z.ZodNullable<z.ZodString>;
|
|
22
|
+
output: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>>;
|
|
23
|
+
source: z.ZodNullable<z.ZodString>;
|
|
24
|
+
status: z.ZodNullable<z.ZodString>;
|
|
25
|
+
metrics: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
26
|
+
total_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
27
|
+
predict_time: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
28
|
+
}, z.core.$loose>>>;
|
|
29
|
+
version: z.ZodNullable<z.ZodString>;
|
|
30
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
31
|
+
started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
+
completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
data_removed: z.ZodNullable<z.ZodBoolean>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
previous: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
declare const replicatePredictionsList: import("@keystrokehq/action").WorkflowActionDefinition<{
|
|
38
|
+
cursor?: string | undefined;
|
|
39
|
+
created_after?: string | undefined;
|
|
40
|
+
created_before?: string | undefined;
|
|
41
|
+
}, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
42
|
//#endregion
|
|
8
43
|
export { replicatePredictionsList };
|
|
9
44
|
//# sourceMappingURL=predictions-list.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictions-list.d.mts","names":[],"sources":["../../src/actions/predictions-list.ts"],"mappings":";;;cAIa,6BAAA,
|
|
1
|
+
{"version":3,"file":"predictions-list.d.mts","names":[],"sources":["../../src/actions/predictions-list.ts"],"mappings":";;;cAIa,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;cA+B7B,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAM9B,wBAAA,gCAAwB,wBAAA"}
|
|
@@ -7,9 +7,9 @@ const ReplicatePredictionsListInput = z.object({
|
|
|
7
7
|
created_before: z.string().describe("Include only predictions created before this date-time, in ISO 8601 format (e.g., '2024-12-31T23:59:59Z'). Useful for filtering older predictions.").optional()
|
|
8
8
|
}).describe("Request schema for listing predictions with optional date filtering.");
|
|
9
9
|
const ReplicatePredictionsList_PredictionUrlsSchema = z.object({
|
|
10
|
-
get: z.string().describe("API endpoint URL to get the prediction details"),
|
|
10
|
+
get: z.string().describe("API endpoint URL to get the prediction details").nullable(),
|
|
11
11
|
web: z.string().describe("Web URL for viewing the prediction in a browser").nullable().optional(),
|
|
12
|
-
cancel: z.string().describe("API endpoint URL to cancel the prediction"),
|
|
12
|
+
cancel: z.string().describe("API endpoint URL to cancel the prediction").nullable(),
|
|
13
13
|
stream: z.string().describe("Streaming URL for the prediction, if available").nullable().optional()
|
|
14
14
|
}).describe("URLs associated with a prediction.\n\nNote: The official OpenAPI schema (https://api.replicate.com/openapi.json) marks 'web'\nas required, but actual API responses from default_example objects omit this field.\nTo ensure compatibility with real API responses, 'web' is marked as optional.");
|
|
15
15
|
const ReplicatePredictionsList_PredictionMetricsSchema = z.object({
|
|
@@ -17,11 +17,11 @@ const ReplicatePredictionsList_PredictionMetricsSchema = z.object({
|
|
|
17
17
|
predict_time: z.number().describe("CPU/GPU seconds used during model execution").nullable().optional()
|
|
18
18
|
}).passthrough().describe("Metrics associated with a prediction.");
|
|
19
19
|
const ReplicatePredictionsList_PredictionSchema = z.object({
|
|
20
|
-
id: z.string().describe("Unique identifier for this prediction"),
|
|
20
|
+
id: z.string().describe("Unique identifier for this prediction").nullable(),
|
|
21
21
|
urls: ReplicatePredictionsList_PredictionUrlsSchema.nullable(),
|
|
22
22
|
error: z.string().describe("Error message if the prediction failed, null otherwise").nullable().optional(),
|
|
23
23
|
input: z.record(z.string(), z.unknown()).describe("Input parameters provided to the model").nullable().optional(),
|
|
24
|
-
model: z.string().describe("Model identifier in format {owner}/{name}"),
|
|
24
|
+
model: z.string().describe("Model identifier in format {owner}/{name}").nullable(),
|
|
25
25
|
output: z.union([
|
|
26
26
|
z.string(),
|
|
27
27
|
z.number().int(),
|
|
@@ -30,14 +30,14 @@ const ReplicatePredictionsList_PredictionSchema = z.object({
|
|
|
30
30
|
z.array(z.unknown()),
|
|
31
31
|
z.record(z.string(), z.unknown())
|
|
32
32
|
]).nullable().optional(),
|
|
33
|
-
source: z.string().describe("How the prediction was created: 'web' or 'api'"),
|
|
34
|
-
status: z.string().describe("Current state of the prediction: 'starting', 'processing', 'succeeded', 'failed', or 'canceled'"),
|
|
33
|
+
source: z.string().describe("How the prediction was created: 'web' or 'api'").nullable(),
|
|
34
|
+
status: z.string().describe("Current state of the prediction: 'starting', 'processing', 'succeeded', 'failed', or 'canceled'").nullable(),
|
|
35
35
|
metrics: ReplicatePredictionsList_PredictionMetricsSchema.nullable().optional(),
|
|
36
|
-
version: z.string().describe("Unique ID of the model version used for this prediction"),
|
|
37
|
-
created_at: z.string().describe("ISO 8601 timestamp when the prediction was created"),
|
|
36
|
+
version: z.string().describe("Unique ID of the model version used for this prediction").nullable(),
|
|
37
|
+
created_at: z.string().describe("ISO 8601 timestamp when the prediction was created").nullable(),
|
|
38
38
|
started_at: z.string().describe("ISO 8601 timestamp when processing began, null if not started").nullable().optional(),
|
|
39
39
|
completed_at: z.string().describe("ISO 8601 timestamp when the prediction completed, null if not completed").nullable().optional(),
|
|
40
|
-
data_removed: z.boolean().describe("Whether input/output data has been deleted from the system")
|
|
40
|
+
data_removed: z.boolean().describe("Whether input/output data has been deleted from the system").nullable()
|
|
41
41
|
}).describe("Representation of a prediction object.");
|
|
42
42
|
const replicatePredictionsList = action("REPLICATE_PREDICTIONS_LIST", {
|
|
43
43
|
slug: "replicate-predictions-list",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"predictions-list.mjs","names":[],"sources":["../../src/actions/predictions-list.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ReplicatePredictionsListInput
|
|
1
|
+
{"version":3,"file":"predictions-list.mjs","names":[],"sources":["../../src/actions/predictions-list.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ReplicatePredictionsListInput = z.object({\n cursor: z.string().describe(\"Cursor for pagination. Use the cursor from 'next' URL of previous response.\").optional(),\n created_after: z.string().describe(\"Include only predictions created at or after this date-time, in ISO 8601 format (e.g., '2024-01-01T00:00:00Z'). Useful for filtering recent predictions.\").optional(),\n created_before: z.string().describe(\"Include only predictions created before this date-time, in ISO 8601 format (e.g., '2024-12-31T23:59:59Z'). Useful for filtering older predictions.\").optional(),\n}).describe(\"Request schema for listing predictions with optional date filtering.\");\nconst ReplicatePredictionsList_PredictionUrlsSchema = z.object({\n get: z.string().describe(\"API endpoint URL to get the prediction details\").nullable(),\n web: z.string().describe(\"Web URL for viewing the prediction in a browser\").nullable().optional(),\n cancel: z.string().describe(\"API endpoint URL to cancel the prediction\").nullable(),\n stream: z.string().describe(\"Streaming URL for the prediction, if available\").nullable().optional(),\n}).describe(\"URLs associated with a prediction.\\n\\nNote: The official OpenAPI schema (https://api.replicate.com/openapi.json) marks 'web'\\nas required, but actual API responses from default_example objects omit this field.\\nTo ensure compatibility with real API responses, 'web' is marked as optional.\");\nconst ReplicatePredictionsList_PredictionMetricsSchema = z.object({\n total_time: z.number().describe(\"Total time in seconds for the prediction\").nullable().optional(),\n predict_time: z.number().describe(\"CPU/GPU seconds used during model execution\").nullable().optional(),\n}).passthrough().describe(\"Metrics associated with a prediction.\");\nconst ReplicatePredictionsList_PredictionSchema = z.object({\n id: z.string().describe(\"Unique identifier for this prediction\").nullable(),\n urls: ReplicatePredictionsList_PredictionUrlsSchema.nullable(),\n error: z.string().describe(\"Error message if the prediction failed, null otherwise\").nullable().optional(),\n input: z.record(z.string(), z.unknown()).describe(\"Input parameters provided to the model\").nullable().optional(),\n model: z.string().describe(\"Model identifier in format {owner}/{name}\").nullable(),\n output: z.union([z.string(), z.number().int(), z.number(), z.boolean(), z.array(z.unknown()), z.record(z.string(), z.unknown())]).nullable().optional(),\n source: z.string().describe(\"How the prediction was created: 'web' or 'api'\").nullable(),\n status: z.string().describe(\"Current state of the prediction: 'starting', 'processing', 'succeeded', 'failed', or 'canceled'\").nullable(),\n metrics: ReplicatePredictionsList_PredictionMetricsSchema.nullable().optional(),\n version: z.string().describe(\"Unique ID of the model version used for this prediction\").nullable(),\n created_at: z.string().describe(\"ISO 8601 timestamp when the prediction was created\").nullable(),\n started_at: z.string().describe(\"ISO 8601 timestamp when processing began, null if not started\").nullable().optional(),\n completed_at: z.string().describe(\"ISO 8601 timestamp when the prediction completed, null if not completed\").nullable().optional(),\n data_removed: z.boolean().describe(\"Whether input/output data has been deleted from the system\").nullable(),\n}).describe(\"Representation of a prediction object.\");\nexport const ReplicatePredictionsListOutput = z.object({\n next: z.string().describe(\"URL for the next page of results, null if no more pages available\").nullable().optional(),\n results: z.array(ReplicatePredictionsList_PredictionSchema).describe(\"Array of prediction objects on this page (up to 100 predictions per page)\"),\n previous: z.string().describe(\"URL for the previous page of results, null if on the first page\").nullable().optional(),\n}).describe(\"Paginated list of predictions.\");\n\nexport const replicatePredictionsList = action(\"REPLICATE_PREDICTIONS_LIST\", {\n slug: \"replicate-predictions-list\",\n name: \"List All Predictions\",\n description: \"Tool to list all predictions for the authenticated user or organization with pagination. Use when you need to retrieve prediction history or filter predictions by creation date.\",\n input: ReplicatePredictionsListInput,\n output: ReplicatePredictionsListOutput,\n});\n"],"mappings":";;;AAIA,MAAa,gCAAgC,EAAE,OAAO;CACpD,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,6EAA6E,CAAC,CAAC,SAAS;CACpH,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,0JAA0J,CAAC,CAAC,SAAS;CACxM,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,oJAAoJ,CAAC,CAAC,SAAS;AACrM,CAAC,CAAC,CAAC,SAAS,sEAAsE;AAClF,MAAM,gDAAgD,EAAE,OAAO;CAC7D,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACpF,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAChG,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CAClF,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACpG,CAAC,CAAC,CAAC,SAAS,kSAAkS;AAC9S,MAAM,mDAAmD,EAAE,OAAO;CAChE,YAAY,EAAE,OAAO,CAAC,C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