@reminix/cli 1.0.0-rc.7 → 1.0.0-rc.9
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/CHANGELOG.md +179 -0
- package/dist/reminix.mjs +1228 -664
- package/package.json +4 -4
package/dist/reminix.mjs
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __export = (target, all) => {
|
|
4
|
+
for (var name in all)
|
|
5
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
|
+
};
|
|
2
7
|
|
|
3
8
|
// src/main.ts
|
|
4
9
|
import { spawn } from "node:child_process";
|
|
@@ -16,6 +21,8 @@ var brand_default = {
|
|
|
16
21
|
topics: ["scripts", "automation", "ai-agents", "mcp", "api-client", "sdk"]
|
|
17
22
|
},
|
|
18
23
|
domain: "reminix.com",
|
|
24
|
+
devDomain: "reminix.dev",
|
|
25
|
+
labs: ["lab"],
|
|
19
26
|
discordInvite: "https://discord.gg/UU9NbEcNQj",
|
|
20
27
|
summary: "Reminix lets your whole team, your software and your agents run your team's scripts, and the ones AI writes: one publish gives a form, an API and an agent tool, with keys kept out of the code and every run on record.",
|
|
21
28
|
expectedAssets: [
|
|
@@ -28,25 +35,52 @@ var brand_default = {
|
|
|
28
35
|
"apple-touch-icon.png"
|
|
29
36
|
],
|
|
30
37
|
colors: {
|
|
31
|
-
brand: "#
|
|
32
|
-
brandForeground: "#
|
|
33
|
-
brandDark: "#
|
|
34
|
-
brandDarkForeground: "#
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
graphite: "#
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
brand: "#151515",
|
|
39
|
+
brandForeground: "#F7F6F2",
|
|
40
|
+
brandDark: "#FFC72C",
|
|
41
|
+
brandDarkForeground: "#151515",
|
|
42
|
+
black: "#151515",
|
|
43
|
+
signal: "#FFC72C",
|
|
44
|
+
paper: "#F7F6F2",
|
|
45
|
+
graphite: "#1A1A19",
|
|
46
|
+
lemon: "#FFF2C2",
|
|
47
|
+
done: "#2F9E44",
|
|
48
|
+
waiting: "#C2410C",
|
|
49
|
+
failed: "#C92A2A",
|
|
50
|
+
night: "#0D0D0D",
|
|
51
|
+
signalDark: "#FFC72C",
|
|
52
|
+
paperDark: "#0D0D0D",
|
|
53
|
+
graphiteDark: "#1F1F1D",
|
|
54
|
+
lemonDark: "#1E1B10",
|
|
55
|
+
doneDark: "#51CF66",
|
|
56
|
+
waitingDark: "#FF8A4C",
|
|
57
|
+
failedDark: "#FF6B6B",
|
|
58
|
+
lemonBorder: "#F0DC8E",
|
|
59
|
+
lemonBorderDark: "#3A3315",
|
|
60
|
+
waitingBackground: "#FFF1E8",
|
|
61
|
+
waitingBackgroundDark: "#2A1A12"
|
|
41
62
|
},
|
|
42
63
|
fonts: {
|
|
43
|
-
display: "
|
|
44
|
-
body: "
|
|
64
|
+
display: "Schibsted Grotesk Variable",
|
|
65
|
+
body: "Instrument Sans Variable",
|
|
66
|
+
code: "IBM Plex Mono"
|
|
67
|
+
},
|
|
68
|
+
layout: {
|
|
69
|
+
radius: "12px",
|
|
70
|
+
gutter: "1.5rem",
|
|
71
|
+
contentWidth: "72rem",
|
|
72
|
+
readableWidth: "42rem",
|
|
73
|
+
sectionGap: "2rem",
|
|
74
|
+
navGap: "1.5rem",
|
|
75
|
+
barPadding: "1rem",
|
|
76
|
+
navCurrentWeight: "400",
|
|
77
|
+
radiusControl: "8px"
|
|
45
78
|
},
|
|
46
79
|
signIn: {
|
|
47
80
|
providerOrder: ["github", "google"],
|
|
48
81
|
emailSignUp: "button"
|
|
49
|
-
}
|
|
82
|
+
},
|
|
83
|
+
devPortOffset: 200
|
|
50
84
|
};
|
|
51
85
|
|
|
52
86
|
// src/brand/index.ts
|
|
@@ -71,6 +105,12 @@ var brand = {
|
|
|
71
105
|
*/
|
|
72
106
|
legalName: optional.legalName ?? brand_default.productName,
|
|
73
107
|
domain: brand_default.domain,
|
|
108
|
+
/**
|
|
109
|
+
* The apex of everything that isn't prod: stage is `*.stage.<devDomain>`
|
|
110
|
+
* (docs/deployment.md "Domains for stage and lab"). `domain` unless
|
|
111
|
+
* brand.json sets one.
|
|
112
|
+
*/
|
|
113
|
+
devDomain: optional.devDomain ?? brand_default.domain,
|
|
74
114
|
/**
|
|
75
115
|
* Where the product's community talks: https://<domain>/discord, the
|
|
76
116
|
* site's redirect to brand.json `discordInvite` (pnpm brand:sync); null
|
|
@@ -83,7 +123,21 @@ var brand = {
|
|
|
83
123
|
securityContact: optional.securityContact ?? `security@${brand_default.domain}`,
|
|
84
124
|
/** The support address the /contact page shows. Defaults to support@<domain>. */
|
|
85
125
|
supportContact: optional.supportContact ?? `support@${brand_default.domain}`,
|
|
126
|
+
/**
|
|
127
|
+
* Where operational alerts go (dead letters, failed crons, unhandled
|
|
128
|
+
* API errors, failed uptime probes — the worker's `sendOpsAlert`).
|
|
129
|
+
* Defaults to ops@<domain>; null when brand.json sets `false` (the
|
|
130
|
+
* platform's own deployment: no customers, alerts only logged).
|
|
131
|
+
*/
|
|
132
|
+
opsContact: optional.opsContact === false ? null : optional.opsContact ?? `ops@${brand_default.domain}`,
|
|
86
133
|
colors: brand_default.colors,
|
|
134
|
+
/**
|
|
135
|
+
* True once the product has launched (brand.json `launched`, set at
|
|
136
|
+
* launch, never back): its data is customers', so the pre-launch
|
|
137
|
+
* product reset's `/ops` route is not mounted at all
|
|
138
|
+
* (docs/deployment.md "Resetting product data"). False when absent.
|
|
139
|
+
*/
|
|
140
|
+
launched: optional.launched === true,
|
|
87
141
|
/** True once the product has its own brand (brand.json `status: "ready"`), not the platform's placeholders. */
|
|
88
142
|
ready: brand_default.status === "ready"
|
|
89
143
|
};
|
|
@@ -103,11 +157,11 @@ function resolveProductFeatures(features) {
|
|
|
103
157
|
guests: teams && on("guests"),
|
|
104
158
|
/** The public `/v1` API: its router, the OpenAPI spec and reference, SDK and CLI publishing. */
|
|
105
159
|
publicApi,
|
|
106
|
-
/** Workspace API keys: Settings →
|
|
160
|
+
/** Workspace API keys: Settings → Developers, `/internal/workspace/api-keys`, `sk_` authentication on `/v1`. */
|
|
107
161
|
apiKeys: publicApi && on("apiKeys"),
|
|
108
162
|
/** Personal access tokens: Account → API tokens, `/internal/account/pats`, `/v1/user/*`, `pat_` authentication, the CLI's sign-in. */
|
|
109
163
|
personalTokens: publicApi && on("personalTokens"),
|
|
110
|
-
/** Outgoing webhooks: Settings →
|
|
164
|
+
/** Outgoing webhooks: Settings → Developers, `/internal/workspace/webhooks`, the admin tab, queued deliveries. */
|
|
111
165
|
webhooks: on("webhooks"),
|
|
112
166
|
/** Billing: Settings → Billing, the Stripe plugin, the admin Billing surfaces, the site's pricing page; a free product. */
|
|
113
167
|
billing: on("billing"),
|
|
@@ -125,7 +179,8 @@ function resolveProductEnvironments(environments, defaultEnvironment, docs) {
|
|
|
125
179
|
name: env.name,
|
|
126
180
|
keyPrefix: env.keyPrefix,
|
|
127
181
|
readOnlyWorkspace: env.readOnlyWorkspace ?? false,
|
|
128
|
-
description: env.description ?? ""
|
|
182
|
+
description: env.description ?? "",
|
|
183
|
+
agentLabel: env.agentLabel ?? env.description ?? ""
|
|
129
184
|
}));
|
|
130
185
|
const names = new Set(list.map((env) => env.name));
|
|
131
186
|
const prefixes = new Set(list.map((env) => env.keyPrefix));
|
|
@@ -668,17 +723,27 @@ function apiErrorFrom(error, response) {
|
|
|
668
723
|
return new ApiError(response.status, envelope.error?.code ?? "http_error", envelope.error?.message ?? `HTTP ${response.status}`, envelope.error?.requestId);
|
|
669
724
|
}
|
|
670
725
|
|
|
726
|
+
// node_modules/@reminix/sdk/dist/product/index.js
|
|
727
|
+
var product_exports = {};
|
|
728
|
+
__export(product_exports, {
|
|
729
|
+
RunError: () => RunError,
|
|
730
|
+
productMethods: () => productMethods,
|
|
731
|
+
run: () => run,
|
|
732
|
+
uploadFile: () => uploadFile,
|
|
733
|
+
waitForRun: () => waitForRun
|
|
734
|
+
});
|
|
735
|
+
|
|
671
736
|
// node_modules/@reminix/sdk/dist/product/upload.js
|
|
672
737
|
async function uploadFile(client, file, options = {}) {
|
|
673
738
|
const body = file.data instanceof Blob ? file.data : new Blob([file.data], {
|
|
674
|
-
type: file.
|
|
739
|
+
type: file.mediaType ?? "application/octet-stream"
|
|
675
740
|
});
|
|
676
741
|
return unwrap(await client.POST("/files", {
|
|
677
742
|
params: { query: { name: file.name } },
|
|
678
743
|
body,
|
|
679
744
|
bodySerializer: (value) => value,
|
|
680
745
|
headers: {
|
|
681
|
-
"content-type": file.
|
|
746
|
+
"content-type": file.mediaType ?? (body.type || "application/octet-stream"),
|
|
682
747
|
...options.idempotencyKey ? { "idempotency-key": options.idempotencyKey } : {}
|
|
683
748
|
}
|
|
684
749
|
}));
|
|
@@ -699,7 +764,7 @@ async function withFileIds(client, inputs, idempotencyKey) {
|
|
|
699
764
|
let uploaded = 0;
|
|
700
765
|
const upload = async (value) => (await uploadFile(client, value instanceof Blob ? {
|
|
701
766
|
name: "name" in value ? String(value.name) : "upload",
|
|
702
|
-
|
|
767
|
+
mediaType: value.type,
|
|
703
768
|
data: value
|
|
704
769
|
} : value, idempotencyKey ? { idempotencyKey: `${idempotencyKey}:file-${++uploaded}` } : {})).id;
|
|
705
770
|
const out = {};
|
|
@@ -741,7 +806,7 @@ async function run(client, slug, inputs = {}, options = {}) {
|
|
|
741
806
|
inputs: await withFileIds(client, inputs, options.idempotencyKey)
|
|
742
807
|
};
|
|
743
808
|
const keyed = options.idempotencyKey ? { idempotencyKey: options.idempotencyKey } : {};
|
|
744
|
-
const started = options.version === void 0 ? await client.runs.create(slug, body, keyed) : await client.scriptVersions.
|
|
809
|
+
const started = options.version === void 0 ? await client.runs.create(slug, body, keyed) : await client.scriptVersions.testRun(slug, options.version, body, keyed);
|
|
745
810
|
if (started.status === "awaiting_approval") {
|
|
746
811
|
options.onApproval?.(started.approval?.approveUrl ?? null);
|
|
747
812
|
}
|
|
@@ -817,11 +882,7 @@ function resources(client) {
|
|
|
817
882
|
files: {
|
|
818
883
|
download: (
|
|
819
884
|
/** Download a file */
|
|
820
|
-
(fileId, options) => call(client, { "method": "get", "path": "/files/{fileId}/
|
|
821
|
-
),
|
|
822
|
-
upload: (
|
|
823
|
-
/** Upload a file */
|
|
824
|
-
(content, input, options) => call(client, { "method": "post", "path": "/files", "query": ["name"], "hasBody": false, "rawBody": "application/octet-stream" }, {}, input, options, content)
|
|
885
|
+
(fileId, options) => call(client, { "method": "get", "path": "/files/{fileId}/download", "query": [], "hasBody": false, "rawResponse": "application/octet-stream" }, { "fileId": fileId }, void 0, options)
|
|
825
886
|
),
|
|
826
887
|
get: (
|
|
827
888
|
/** Get a file */
|
|
@@ -829,7 +890,11 @@ function resources(client) {
|
|
|
829
890
|
),
|
|
830
891
|
list: (
|
|
831
892
|
/** List files */
|
|
832
|
-
(input, options) => call(client, { "method": "get", "path": "/files", "query": ["limit", "cursor", "script", "
|
|
893
|
+
(input, options) => call(client, { "method": "get", "path": "/files", "query": ["limit", "cursor", "before", "script", "origin", "name"], "hasBody": false }, {}, input, options)
|
|
894
|
+
),
|
|
895
|
+
upload: (
|
|
896
|
+
/** Upload a file */
|
|
897
|
+
(content, input, options) => call(client, { "method": "post", "path": "/files", "query": ["name"], "hasBody": false, "rawBody": "application/octet-stream" }, {}, input, options, content)
|
|
833
898
|
)
|
|
834
899
|
},
|
|
835
900
|
runs: {
|
|
@@ -847,11 +912,11 @@ function resources(client) {
|
|
|
847
912
|
),
|
|
848
913
|
list: (
|
|
849
914
|
/** List runs */
|
|
850
|
-
(input, options) => call(client, { "method": "get", "path": "/runs", "query": ["limit", "cursor", "script"], "hasBody": false }, {}, input, options)
|
|
915
|
+
(input, options) => call(client, { "method": "get", "path": "/runs", "query": ["limit", "cursor", "before", "script", "status"], "hasBody": false }, {}, input, options)
|
|
851
916
|
),
|
|
852
|
-
|
|
917
|
+
log: (
|
|
853
918
|
/** Get a run's log */
|
|
854
|
-
(runId, options) => call(client, { "method": "get", "path": "/runs/{runId}/
|
|
919
|
+
(runId, options) => call(client, { "method": "get", "path": "/runs/{runId}/log", "query": [], "hasBody": false }, { "runId": runId }, void 0, options)
|
|
855
920
|
)
|
|
856
921
|
},
|
|
857
922
|
schedules: {
|
|
@@ -909,21 +974,21 @@ function resources(client) {
|
|
|
909
974
|
)
|
|
910
975
|
},
|
|
911
976
|
scriptVersions: {
|
|
912
|
-
create: (
|
|
913
|
-
/** Upload a version */
|
|
914
|
-
(slug, input, options) => call(client, { "method": "post", "path": "/scripts/{slug}/versions", "query": [], "hasBody": true }, { "slug": slug }, input, options)
|
|
915
|
-
),
|
|
916
977
|
list: (
|
|
917
978
|
/** List a script's versions */
|
|
918
979
|
(slug, options) => call(client, { "method": "get", "path": "/scripts/{slug}/versions", "query": [], "hasBody": false }, { "slug": slug }, void 0, options)
|
|
919
980
|
),
|
|
920
981
|
publish: (
|
|
921
982
|
/** Publish a version */
|
|
922
|
-
(slug,
|
|
983
|
+
(slug, version, options) => call(client, { "method": "post", "path": "/scripts/{slug}/versions/{version}/publish", "query": [], "hasBody": false }, { "slug": slug, "version": version }, void 0, options)
|
|
923
984
|
),
|
|
924
|
-
|
|
985
|
+
testRun: (
|
|
925
986
|
/** Test-run a version */
|
|
926
|
-
(slug,
|
|
987
|
+
(slug, version, input, options) => call(client, { "method": "post", "path": "/scripts/{slug}/versions/{version}/runs", "query": [], "hasBody": true }, { "slug": slug, "version": version }, input, options)
|
|
988
|
+
),
|
|
989
|
+
upload: (
|
|
990
|
+
/** Upload a version */
|
|
991
|
+
(slug, input, options) => call(client, { "method": "post", "path": "/scripts/{slug}/versions", "query": [], "hasBody": true }, { "slug": slug }, input, options)
|
|
927
992
|
)
|
|
928
993
|
},
|
|
929
994
|
secrets: {
|
|
@@ -938,8 +1003,10 @@ function resources(client) {
|
|
|
938
1003
|
set: (
|
|
939
1004
|
/** Save a secret */
|
|
940
1005
|
(name, input, options) => call(client, { "method": "put", "path": "/secrets/{name}", "query": [], "hasBody": true }, { "name": name }, input, options)
|
|
941
|
-
)
|
|
942
|
-
|
|
1006
|
+
)
|
|
1007
|
+
},
|
|
1008
|
+
secretValues: {
|
|
1009
|
+
delete: (
|
|
943
1010
|
/** Remove a secret's value from an environment */
|
|
944
1011
|
(name, environment2, options) => call(client, { "method": "delete", "path": "/secrets/{name}/values/{environment}", "query": [], "hasBody": false }, { "name": name, "environment": environment2 }, void 0, options)
|
|
945
1012
|
)
|
|
@@ -996,7 +1063,7 @@ function resources(client) {
|
|
|
996
1063
|
auditEvents: {
|
|
997
1064
|
list: (
|
|
998
1065
|
/** List workspace audit events */
|
|
999
|
-
(input, options) => call(client, { "method": "get", "path": "/workspace/audit-events", "query": ["limit", "cursor"], "hasBody": false }, {}, input, options)
|
|
1066
|
+
(input, options) => call(client, { "method": "get", "path": "/workspace/audit-events", "query": ["limit", "cursor", "before", "action", "actor"], "hasBody": false }, {}, input, options)
|
|
1000
1067
|
)
|
|
1001
1068
|
},
|
|
1002
1069
|
eventTypes: {
|
|
@@ -1034,7 +1101,7 @@ function resources(client) {
|
|
|
1034
1101
|
webhookDeliveries: {
|
|
1035
1102
|
list: (
|
|
1036
1103
|
/** List an endpoint's deliveries */
|
|
1037
|
-
(endpointId, input, options) => call(client, { "method": "get", "path": "/workspace/webhook-endpoints/{endpointId}/deliveries", "query": ["limit", "cursor"], "hasBody": false }, { "endpointId": endpointId }, input, options)
|
|
1104
|
+
(endpointId, input, options) => call(client, { "method": "get", "path": "/workspace/webhook-endpoints/{endpointId}/deliveries", "query": ["limit", "cursor", "before", "status"], "hasBody": false }, { "endpointId": endpointId }, input, options)
|
|
1038
1105
|
),
|
|
1039
1106
|
redeliver: (
|
|
1040
1107
|
/** Redeliver an event */
|
|
@@ -1065,6 +1132,10 @@ function resources(client) {
|
|
|
1065
1132
|
test: (
|
|
1066
1133
|
/** Send a test event */
|
|
1067
1134
|
(endpointId, options) => call(client, { "method": "post", "path": "/workspace/webhook-endpoints/{endpointId}/test", "query": [], "hasBody": false }, { "endpointId": endpointId }, void 0, options)
|
|
1135
|
+
),
|
|
1136
|
+
update: (
|
|
1137
|
+
/** Update a webhook endpoint */
|
|
1138
|
+
(endpointId, input, options) => call(client, { "method": "patch", "path": "/workspace/webhook-endpoints/{endpointId}", "query": [], "hasBody": true }, { "endpointId": endpointId }, input, options)
|
|
1068
1139
|
)
|
|
1069
1140
|
}
|
|
1070
1141
|
}
|
|
@@ -1077,6 +1148,8 @@ var RETRY_STATUSES = /* @__PURE__ */ new Set([408, 429, 500, 502, 503, 504]);
|
|
|
1077
1148
|
var DEFAULT_MAX_RETRIES = 2;
|
|
1078
1149
|
var MAX_WAIT_MS = 2e4;
|
|
1079
1150
|
var MAX_BASE_KEY = 200;
|
|
1151
|
+
var PRODUCT_RETRY_HEADER = "x-sdk-product-retry";
|
|
1152
|
+
var productRetry = () => "productRetry" in product_exports ? Reflect.get(product_exports, "productRetry") ?? null : null;
|
|
1080
1153
|
var wait = (ms) => new Promise((done) => setTimeout(done, ms));
|
|
1081
1154
|
function backoff(attempt) {
|
|
1082
1155
|
const base = Math.min(500 * 2 ** attempt, 8e3);
|
|
@@ -1104,10 +1177,24 @@ async function retryable(response) {
|
|
|
1104
1177
|
return false;
|
|
1105
1178
|
}
|
|
1106
1179
|
}
|
|
1180
|
+
function takeProductRetryHeader(request) {
|
|
1181
|
+
if (!request.headers.has(PRODUCT_RETRY_HEADER))
|
|
1182
|
+
return [request, false];
|
|
1183
|
+
const returns = request.headers.get(PRODUCT_RETRY_HEADER) === "return";
|
|
1184
|
+
const headers = new Headers(request.headers);
|
|
1185
|
+
headers.delete(PRODUCT_RETRY_HEADER);
|
|
1186
|
+
return [new Request(request, { headers }), returns];
|
|
1187
|
+
}
|
|
1188
|
+
function withoutProductRetryHeader(fetch2) {
|
|
1189
|
+
return (request) => fetch2(takeProductRetryHeader(request)[0]);
|
|
1190
|
+
}
|
|
1107
1191
|
function withRetries(fetch2, options = {}) {
|
|
1108
1192
|
const maxRetries = options.maxRetries ?? DEFAULT_MAX_RETRIES;
|
|
1109
1193
|
const sleep = options.sleep ?? wait;
|
|
1194
|
+
const later = options.product === void 0 ? productRetry() : options.product;
|
|
1110
1195
|
return async (request) => {
|
|
1196
|
+
let returnLater;
|
|
1197
|
+
[request, returnLater] = takeProductRetryHeader(request);
|
|
1111
1198
|
if (WRITES.has(request.method) && !request.headers.has("idempotency-key")) {
|
|
1112
1199
|
const url = new URL(request.url);
|
|
1113
1200
|
const key = options.key ? await options.key(request.method, url.pathname) : crypto.randomUUID();
|
|
@@ -1115,9 +1202,11 @@ function withRetries(fetch2, options = {}) {
|
|
|
1115
1202
|
headers.set("idempotency-key", key);
|
|
1116
1203
|
request = new Request(request, { headers });
|
|
1117
1204
|
}
|
|
1205
|
+
let laterTries = 0;
|
|
1206
|
+
let laterWaited = 0;
|
|
1118
1207
|
for (let attempt = 0; ; attempt++) {
|
|
1119
1208
|
const last = attempt >= maxRetries;
|
|
1120
|
-
const sending = last ? request : request.clone();
|
|
1209
|
+
const sending = last && !later ? request : request.clone();
|
|
1121
1210
|
let response;
|
|
1122
1211
|
try {
|
|
1123
1212
|
response = await fetch2(sending);
|
|
@@ -1127,6 +1216,18 @@ function withRetries(fetch2, options = {}) {
|
|
|
1127
1216
|
await sleep(backoff(attempt));
|
|
1128
1217
|
continue;
|
|
1129
1218
|
}
|
|
1219
|
+
const laterMs = later ? await later.wait(response, laterTries) : null;
|
|
1220
|
+
if (laterMs !== null && later) {
|
|
1221
|
+
if (returnLater || laterWaited + laterMs > later.budgetMs) {
|
|
1222
|
+
return response;
|
|
1223
|
+
}
|
|
1224
|
+
laterTries++;
|
|
1225
|
+
laterWaited += laterMs;
|
|
1226
|
+
await response.body?.cancel();
|
|
1227
|
+
await sleep(laterMs);
|
|
1228
|
+
attempt--;
|
|
1229
|
+
continue;
|
|
1230
|
+
}
|
|
1130
1231
|
if (last || !await retryable(response))
|
|
1131
1232
|
return response;
|
|
1132
1233
|
const delay = retryAfter(response) ?? backoff(attempt);
|
|
@@ -1228,10 +1329,11 @@ async function verifyWebhook(body, headers, secret, options = {}) {
|
|
|
1228
1329
|
|
|
1229
1330
|
// node_modules/@reminix/sdk/dist/index.js
|
|
1230
1331
|
var API_KEY_ENV = `${brand2.identifier.toUpperCase()}_API_KEY`;
|
|
1332
|
+
var TOKEN_ENV = `${brand2.identifier.toUpperCase()}_TOKEN`;
|
|
1231
1333
|
var DEFAULT_API = `https://api.${brand2.domain}`;
|
|
1232
1334
|
function createClient2(options = {}) {
|
|
1233
1335
|
const client = createBaseClient(options);
|
|
1234
|
-
const extend = productMethods;
|
|
1336
|
+
const extend = Reflect.get(product_exports, "productMethods");
|
|
1235
1337
|
if (!extend)
|
|
1236
1338
|
return client;
|
|
1237
1339
|
const methods = extend(client);
|
|
@@ -1243,15 +1345,18 @@ function createClient2(options = {}) {
|
|
|
1243
1345
|
return Object.assign(client, methods);
|
|
1244
1346
|
}
|
|
1245
1347
|
function createBaseClient(options) {
|
|
1246
|
-
|
|
1348
|
+
if (options.apiKey && options.token) {
|
|
1349
|
+
throw new Error(`${brand2.productName}: pass apiKey or token, not both.`);
|
|
1350
|
+
}
|
|
1351
|
+
const token = options.apiKey || options.token || credentialFromEnvironment();
|
|
1247
1352
|
if (!token) {
|
|
1248
|
-
throw new Error(`${brand2.productName}: no API key. Pass {
|
|
1353
|
+
throw new Error(`${brand2.productName}: no API key. Pass { apiKey } or set ${API_KEY_ENV}.`);
|
|
1249
1354
|
}
|
|
1250
|
-
const origin = (options.api ?? DEFAULT_API)
|
|
1355
|
+
const origin = withoutTrailingSlashes(options.api ?? DEFAULT_API);
|
|
1251
1356
|
const send = options.fetch ?? ((request) => fetch(request));
|
|
1252
1357
|
const client = createClient({
|
|
1253
1358
|
baseUrl: `${origin}/v1`,
|
|
1254
|
-
fetch: options.maxRetries === 0 ? send : withRetries(send, { maxRetries: options.maxRetries })
|
|
1359
|
+
fetch: options.maxRetries === 0 ? withoutProductRetryHeader(send) : withRetries(send, { maxRetries: options.maxRetries })
|
|
1255
1360
|
});
|
|
1256
1361
|
client.use({
|
|
1257
1362
|
onRequest({ request }) {
|
|
@@ -1269,9 +1374,10 @@ function createBaseClient(options) {
|
|
|
1269
1374
|
webhooks: { verify: verifyWebhook }
|
|
1270
1375
|
});
|
|
1271
1376
|
}
|
|
1272
|
-
function
|
|
1377
|
+
function credentialFromEnvironment() {
|
|
1273
1378
|
const runtime = globalThis;
|
|
1274
|
-
|
|
1379
|
+
const env = runtime.process?.env;
|
|
1380
|
+
return env?.[API_KEY_ENV] || env?.[TOKEN_ENV] || void 0;
|
|
1275
1381
|
}
|
|
1276
1382
|
function unwrap(result) {
|
|
1277
1383
|
if (result.error !== void 0 || !result.response.ok) {
|
|
@@ -1279,6 +1385,12 @@ function unwrap(result) {
|
|
|
1279
1385
|
}
|
|
1280
1386
|
return result.data;
|
|
1281
1387
|
}
|
|
1388
|
+
function withoutTrailingSlashes(url) {
|
|
1389
|
+
let end = url.length;
|
|
1390
|
+
while (end > 0 && url[end - 1] === "/")
|
|
1391
|
+
end--;
|
|
1392
|
+
return url.slice(0, end);
|
|
1393
|
+
}
|
|
1282
1394
|
|
|
1283
1395
|
// node_modules/commander/lib/error.js
|
|
1284
1396
|
var CommanderError = class extends Error {
|
|
@@ -4720,14 +4832,14 @@ function browserLogin(options) {
|
|
|
4720
4832
|
send(
|
|
4721
4833
|
200,
|
|
4722
4834
|
"You are signed in",
|
|
4723
|
-
"Return to your terminal
|
|
4835
|
+
"Return to your terminal. You can close this tab."
|
|
4724
4836
|
);
|
|
4725
4837
|
finish(() => resolve4(token));
|
|
4726
4838
|
});
|
|
4727
4839
|
const timer = setTimeout(
|
|
4728
4840
|
() => finish(
|
|
4729
4841
|
() => reject(
|
|
4730
|
-
new Error("timed out waiting for the browser
|
|
4842
|
+
new Error("timed out waiting for the browser. Run login again.")
|
|
4731
4843
|
)
|
|
4732
4844
|
),
|
|
4733
4845
|
options.timeoutMs ?? 5 * 60 * 1e3
|
|
@@ -4753,8 +4865,8 @@ function webOriginFor(api2) {
|
|
|
4753
4865
|
url.hostname = `app.${url.hostname.slice(4)}`;
|
|
4754
4866
|
return url.origin;
|
|
4755
4867
|
}
|
|
4756
|
-
if ((url.hostname === "localhost" || url.hostname === "127.0.0.1") && url.port
|
|
4757
|
-
url.port =
|
|
4868
|
+
if ((url.hostname === "localhost" || url.hostname === "127.0.0.1") && Number(url.port) >= 8787 && Number(url.port) % 100 === 87) {
|
|
4869
|
+
url.port = String(Number(url.port) - 5787);
|
|
4758
4870
|
return url.origin;
|
|
4759
4871
|
}
|
|
4760
4872
|
return null;
|
|
@@ -4781,7 +4893,7 @@ function readConfig(homeDir) {
|
|
|
4781
4893
|
try {
|
|
4782
4894
|
return JSON.parse(readFileSync(path2, "utf8"));
|
|
4783
4895
|
} catch {
|
|
4784
|
-
throw new Error(`${path2} is not valid JSON
|
|
4896
|
+
throw new Error(`${path2} is not valid JSON. Fix or delete it.`);
|
|
4785
4897
|
}
|
|
4786
4898
|
}
|
|
4787
4899
|
function writeConfig(homeDir, config2) {
|
|
@@ -4799,11 +4911,18 @@ function resolveSettings(env, homeDir, flags = {}) {
|
|
|
4799
4911
|
const environment2 = flags.environment ? { environment: flags.environment, environmentSource: "flag" } : env[environmentEnvVar()] ? { environment: env[environmentEnvVar()], environmentSource: "env" } : config2.environment ? { environment: config2.environment, environmentSource: "config" } : { environment: void 0, environmentSource: null };
|
|
4800
4912
|
return {
|
|
4801
4913
|
...environment2,
|
|
4802
|
-
api: (
|
|
4914
|
+
api: withoutTrailingSlashes2(
|
|
4915
|
+
env[`${brand.identifier.toUpperCase()}_API`] ?? config2.api ?? DEFAULT_API
|
|
4916
|
+
),
|
|
4803
4917
|
token: env[tokenEnvVar()] ?? config2.token,
|
|
4804
4918
|
workspace: env[`${brand.identifier.toUpperCase()}_WORKSPACE`] ?? config2.workspace
|
|
4805
4919
|
};
|
|
4806
4920
|
}
|
|
4921
|
+
function withoutTrailingSlashes2(url) {
|
|
4922
|
+
let end = url.length;
|
|
4923
|
+
while (end > 0 && url[end - 1] === "/") end--;
|
|
4924
|
+
return url.slice(0, end);
|
|
4925
|
+
}
|
|
4807
4926
|
|
|
4808
4927
|
// src/http.ts
|
|
4809
4928
|
async function rawRequest(ctx, options) {
|
|
@@ -4853,7 +4972,9 @@ function writeEnvVar(path2, name, value) {
|
|
|
4853
4972
|
}
|
|
4854
4973
|
var approvals = (program3, ctx) => {
|
|
4855
4974
|
const workspace2 = program3.commands.find((c) => c.name() === "workspace") ?? program3.command("workspace");
|
|
4856
|
-
const group = workspace2.command("approval-requests").description(
|
|
4975
|
+
const group = workspace2.command("approval-requests").description(
|
|
4976
|
+
"Ask a person to approve an action, and collect what it creates"
|
|
4977
|
+
);
|
|
4857
4978
|
group.command("redeem <request-id>").description(
|
|
4858
4979
|
"Collect an approved secret once, into an env file (never printed)"
|
|
4859
4980
|
).requiredOption(
|
|
@@ -4884,7 +5005,7 @@ var approvals = (program3, ctx) => {
|
|
|
4884
5005
|
}
|
|
4885
5006
|
if (request.status !== "approved") {
|
|
4886
5007
|
throw new Error(
|
|
4887
|
-
request.status === "pending" ? `Not approved yet
|
|
5008
|
+
request.status === "pending" ? `Not approved yet. Ask a person to approve it: ${request.approveUrl}` : `This request is ${request.status}; nothing to collect.`
|
|
4888
5009
|
);
|
|
4889
5010
|
}
|
|
4890
5011
|
const redeemed = await call3(
|
|
@@ -4926,7 +5047,7 @@ async function saveToken(ctx, token, api2) {
|
|
|
4926
5047
|
writeConfig(ctx.io.homeDir, previous);
|
|
4927
5048
|
const reason = error instanceof Error ? error.message : String(error);
|
|
4928
5049
|
throw new Error(
|
|
4929
|
-
`could not verify the token (${reason})
|
|
5050
|
+
`could not verify the token (${reason}). Nothing was saved.`,
|
|
4930
5051
|
{ cause: error }
|
|
4931
5052
|
);
|
|
4932
5053
|
}
|
|
@@ -4934,7 +5055,7 @@ async function saveToken(ctx, token, api2) {
|
|
|
4934
5055
|
`Logged in. Token stored in ${configPath(ctx.io.homeDir)} (0600).`
|
|
4935
5056
|
);
|
|
4936
5057
|
ctx.io.stdout(
|
|
4937
|
-
`Hello ${user.name} <${user.email}
|
|
5058
|
+
`Hello ${user.name} <${user.email}>. You have ${user.workspaces.length} workspace(s).`
|
|
4938
5059
|
);
|
|
4939
5060
|
if (!config2.workspace && user.workspaces.length === 1) {
|
|
4940
5061
|
config2.workspace = user.workspaces[0].slug;
|
|
@@ -4946,7 +5067,7 @@ async function saveToken(ctx, token, api2) {
|
|
|
4946
5067
|
}
|
|
4947
5068
|
var login = (program3, ctx) => {
|
|
4948
5069
|
program3.command("login").description(
|
|
4949
|
-
"Sign in through the browser
|
|
5070
|
+
"Sign in through the browser, or store a personal access token with --token"
|
|
4950
5071
|
).option("--token <pat>", "a personal access token (CI, servers)").option("--api <origin>", `API origin (default ${DEFAULT_API})`).option("--web <origin>", "web app origin for the browser sign-in").action(async (options) => {
|
|
4951
5072
|
if (!productFeatures.personalTokens) {
|
|
4952
5073
|
throw new Error(
|
|
@@ -4959,7 +5080,7 @@ var login = (program3, ctx) => {
|
|
|
4959
5080
|
}
|
|
4960
5081
|
if (!ctx.io.interactive) {
|
|
4961
5082
|
ctx.io.stderr(
|
|
4962
|
-
`Paste a personal access token (Account \u2192
|
|
5083
|
+
`Paste a personal access token (Account \u2192 Personal access tokens in ${brand.productName}), then Enter:`
|
|
4963
5084
|
);
|
|
4964
5085
|
await saveToken(ctx, (await ctx.io.stdin()).trim(), options.api);
|
|
4965
5086
|
return;
|
|
@@ -4968,7 +5089,7 @@ var login = (program3, ctx) => {
|
|
|
4968
5089
|
const webOrigin = options.web ?? webOriginFor(api2);
|
|
4969
5090
|
if (!webOrigin) {
|
|
4970
5091
|
throw new Error(
|
|
4971
|
-
`cannot tell the web app's address from ${api2}
|
|
5092
|
+
`cannot tell the web app's address from ${api2}. Pass --web <origin>.`
|
|
4972
5093
|
);
|
|
4973
5094
|
}
|
|
4974
5095
|
const token = await browserLogin({
|
|
@@ -4995,13 +5116,13 @@ var logout = (program3, ctx) => {
|
|
|
4995
5116
|
).catch(() => null);
|
|
4996
5117
|
if (revoked && !revoked.ok && revoked.status !== 401) {
|
|
4997
5118
|
ctx.io.stderr(
|
|
4998
|
-
`Could not revoke the token (HTTP ${revoked.status})
|
|
5119
|
+
`Could not revoke the token (HTTP ${revoked.status}). Revoke it under Account \u2192 Personal access tokens.`
|
|
4999
5120
|
);
|
|
5000
5121
|
}
|
|
5001
5122
|
}
|
|
5002
5123
|
delete config2.token;
|
|
5003
5124
|
writeConfig(ctx.io.homeDir, config2);
|
|
5004
|
-
ctx.io.stdout("Logged out
|
|
5125
|
+
ctx.io.stdout("Logged out. The token is revoked and forgotten.");
|
|
5005
5126
|
});
|
|
5006
5127
|
};
|
|
5007
5128
|
async function printWorkspaces(ctx, asJson) {
|
|
@@ -5024,13 +5145,13 @@ async function printWorkspaces(ctx, asJson) {
|
|
|
5024
5145
|
);
|
|
5025
5146
|
}
|
|
5026
5147
|
var whoami = (program3, ctx) => {
|
|
5027
|
-
program3.command("whoami").description("
|
|
5148
|
+
program3.command("whoami").description("Show who the token acts as and which workspaces it can use").option("--json", "machine-readable output").action(
|
|
5028
5149
|
(options) => printWorkspaces(ctx, options.json === true)
|
|
5029
5150
|
);
|
|
5030
5151
|
};
|
|
5031
5152
|
var workspace = (program3, ctx) => {
|
|
5032
5153
|
const group = program3.command("workspace").description(
|
|
5033
|
-
"
|
|
5154
|
+
"Work with your workspaces and the current one's members, webhooks, approvals and usage"
|
|
5034
5155
|
);
|
|
5035
5156
|
group.command("list", { isDefault: true }).description("List the workspaces the token can act in").option("--json", "machine-readable output").action(
|
|
5036
5157
|
(options) => printWorkspaces(ctx, options.json === true)
|
|
@@ -5047,7 +5168,7 @@ var workspace = (program3, ctx) => {
|
|
|
5047
5168
|
});
|
|
5048
5169
|
};
|
|
5049
5170
|
var environment = (program3, ctx) => {
|
|
5050
|
-
const group = program3.command("environment").description("
|
|
5171
|
+
const group = program3.command("environment").description("Choose the environment commands act in");
|
|
5051
5172
|
group.command("list", { isDefault: true }).description("Show the environment commands act in").action(() => {
|
|
5052
5173
|
const { environment: current, environmentSource } = ctx.settings();
|
|
5053
5174
|
const from = environmentSource ? `(from ${{ flag: "--environment", env: environmentEnvVar(), config: "config" }[environmentSource]})` : null;
|
|
@@ -5061,14 +5182,14 @@ var environment = (program3, ctx) => {
|
|
|
5061
5182
|
return;
|
|
5062
5183
|
}
|
|
5063
5184
|
ctx.io.stdout(
|
|
5064
|
-
current ? `${current} ${from}` : "None set
|
|
5185
|
+
current ? `${current} ${from}` : "None set. The API acts in the workspace's default."
|
|
5065
5186
|
);
|
|
5066
5187
|
});
|
|
5067
5188
|
group.command("use <name>").description("Make <name> the default environment for commands").action((name) => {
|
|
5068
5189
|
const declared = productEnvironments.list.map((env) => env.name);
|
|
5069
5190
|
if (declared.length > 0 && !declared.includes(name)) {
|
|
5070
5191
|
throw new Error(
|
|
5071
|
-
`unknown environment '${name}'
|
|
5192
|
+
`unknown environment '${name}'. ${brand.productName}'s environments are ${declared.join(", ")}.`
|
|
5072
5193
|
);
|
|
5073
5194
|
}
|
|
5074
5195
|
const config2 = readConfig(ctx.io.homeDir);
|
|
@@ -5077,7 +5198,7 @@ var environment = (program3, ctx) => {
|
|
|
5077
5198
|
ctx.io.stdout(`Default environment: ${name}`);
|
|
5078
5199
|
});
|
|
5079
5200
|
group.command("unset").description(
|
|
5080
|
-
"Forget the default environment
|
|
5201
|
+
"Forget the default environment and go back to the product's default"
|
|
5081
5202
|
).action(() => {
|
|
5082
5203
|
const config2 = readConfig(ctx.io.homeDir);
|
|
5083
5204
|
delete config2.environment;
|
|
@@ -5086,7 +5207,7 @@ var environment = (program3, ctx) => {
|
|
|
5086
5207
|
});
|
|
5087
5208
|
};
|
|
5088
5209
|
var api = (program3, ctx) => {
|
|
5089
|
-
program3.command("api <method> <path>").description("Call any endpoint
|
|
5210
|
+
program3.command("api <method> <path>").description("Call any API endpoint directly, in the selected workspace").option("--data <json>", "JSON request body").option("--workspace <slug>", "act in this workspace for one call").action(
|
|
5090
5211
|
async (method, path2, options) => {
|
|
5091
5212
|
if (!path2.startsWith("/")) {
|
|
5092
5213
|
throw new Error("usage: api <method> </v1/...> [--data '<json>']");
|
|
@@ -5106,7 +5227,7 @@ var api = (program3, ctx) => {
|
|
|
5106
5227
|
);
|
|
5107
5228
|
};
|
|
5108
5229
|
var config = (program3, ctx) => {
|
|
5109
|
-
program3.command("config").description("Show the
|
|
5230
|
+
program3.command("config").description("Show the settings in effect, with the token hidden").action(() => {
|
|
5110
5231
|
const settings = ctx.settings();
|
|
5111
5232
|
ctx.io.stdout(
|
|
5112
5233
|
json({
|
|
@@ -5152,8 +5273,11 @@ function operationRequest(op, input, body = {}) {
|
|
|
5152
5273
|
json2[field.name] = value;
|
|
5153
5274
|
}
|
|
5154
5275
|
}
|
|
5155
|
-
const
|
|
5156
|
-
|
|
5276
|
+
const open = path2.indexOf("{");
|
|
5277
|
+
const close = open === -1 ? -1 : path2.indexOf("}", open + 1);
|
|
5278
|
+
if (close > open + 1) {
|
|
5279
|
+
throw new Error(`missing ${path2.slice(open + 1, close)}`);
|
|
5280
|
+
}
|
|
5157
5281
|
const qs = query.toString();
|
|
5158
5282
|
return {
|
|
5159
5283
|
method: op.method.toUpperCase(),
|
|
@@ -5176,20 +5300,20 @@ var OPERATIONS = [
|
|
|
5176
5300
|
},
|
|
5177
5301
|
"mcp": {
|
|
5178
5302
|
"exposed": false,
|
|
5179
|
-
"reason": "Environments hold secret values and rules
|
|
5303
|
+
"reason": "Environments hold secret values and rules. A person sets them up, and an agent asks a person to."
|
|
5180
5304
|
},
|
|
5181
|
-
"description": "Adds an environment with no secret values yet
|
|
5305
|
+
"description": "Adds an environment with no secret values yet. To save its values, call secrets.set with X-Environment set to the new environment. Workspace owners, admins and API keys can add an environment.",
|
|
5182
5306
|
"fields": [
|
|
5183
5307
|
{
|
|
5184
5308
|
"name": "name",
|
|
5185
5309
|
"in": "body",
|
|
5186
5310
|
"type": "string",
|
|
5187
5311
|
"required": true,
|
|
5188
|
-
"description": "
|
|
5312
|
+
"description": "The environment's name, unique in the workspace. It's up to 32 lowercase letters, digits and dashes, and starts with a letter.",
|
|
5189
5313
|
"example": "staging",
|
|
5190
5314
|
"schema": {
|
|
5191
5315
|
"type": "string",
|
|
5192
|
-
"description": "
|
|
5316
|
+
"description": "The environment's name, unique in the workspace. It's up to 32 lowercase letters, digits and dashes, and starts with a letter."
|
|
5193
5317
|
}
|
|
5194
5318
|
},
|
|
5195
5319
|
{
|
|
@@ -5197,7 +5321,8 @@ var OPERATIONS = [
|
|
|
5197
5321
|
"in": "body",
|
|
5198
5322
|
"type": "string",
|
|
5199
5323
|
"required": false,
|
|
5200
|
-
"description": "Which runs here wait for a person's approval: `none`, `agents`
|
|
5324
|
+
"description": "Which runs here wait for a person's approval: `none`, `agents` for runs an agent starts, or `always` for every run. A run uses the stricter of this policy and its script's policy. The default is `none`.",
|
|
5325
|
+
"example": "agents",
|
|
5201
5326
|
"schema": {
|
|
5202
5327
|
"type": "string",
|
|
5203
5328
|
"enum": [
|
|
@@ -5205,7 +5330,7 @@ var OPERATIONS = [
|
|
|
5205
5330
|
"agents",
|
|
5206
5331
|
"always"
|
|
5207
5332
|
],
|
|
5208
|
-
"description": "Which runs here wait for a person's approval: `none`, `agents`
|
|
5333
|
+
"description": "Which runs here wait for a person's approval: `none`, `agents` for runs an agent starts, or `always` for every run. A run uses the stricter of this policy and its script's policy. The default is `none`."
|
|
5209
5334
|
}
|
|
5210
5335
|
},
|
|
5211
5336
|
{
|
|
@@ -5213,15 +5338,16 @@ var OPERATIONS = [
|
|
|
5213
5338
|
"in": "body",
|
|
5214
5339
|
"type": "boolean",
|
|
5215
5340
|
"required": false,
|
|
5216
|
-
"description": "Whether agents
|
|
5341
|
+
"description": "Whether agents connected through MCP can run scripts in this environment. When it's false, Reminix also refuses schedules and triggers an agent adds here. The default is true.",
|
|
5217
5342
|
"schema": {
|
|
5218
5343
|
"type": "boolean",
|
|
5219
|
-
"description": "Whether agents
|
|
5344
|
+
"description": "Whether agents connected through MCP can run scripts in this environment. When it's false, Reminix also refuses schedules and triggers an agent adds here. The default is true."
|
|
5220
5345
|
}
|
|
5221
5346
|
}
|
|
5222
5347
|
],
|
|
5223
5348
|
"hasBody": true,
|
|
5224
5349
|
"workspace": true,
|
|
5350
|
+
"acceptsApiKey": true,
|
|
5225
5351
|
"scope": "environments:write"
|
|
5226
5352
|
},
|
|
5227
5353
|
{
|
|
@@ -5238,23 +5364,26 @@ var OPERATIONS = [
|
|
|
5238
5364
|
},
|
|
5239
5365
|
"mcp": {
|
|
5240
5366
|
"exposed": false,
|
|
5241
|
-
"reason": "Environments hold secret values and rules
|
|
5367
|
+
"reason": "Environments hold secret values and rules. A person sets them up, and an agent asks a person to."
|
|
5242
5368
|
},
|
|
5243
|
-
"description": "Deletes
|
|
5369
|
+
"description": "Deletes an environment and every secret value it holds. Get the environment first to see how many values that is. You can't delete the only environment, the default environment, or one that a schedule or trigger runs in. Workspace owners, admins and API keys can delete an environment.",
|
|
5244
5370
|
"fields": [
|
|
5245
5371
|
{
|
|
5246
5372
|
"name": "environment",
|
|
5247
5373
|
"in": "path",
|
|
5248
5374
|
"type": "string",
|
|
5249
5375
|
"required": true,
|
|
5376
|
+
"description": "The environment's ID.",
|
|
5250
5377
|
"example": "staging",
|
|
5251
5378
|
"schema": {
|
|
5252
|
-
"type": "string"
|
|
5379
|
+
"type": "string",
|
|
5380
|
+
"description": "The environment's ID."
|
|
5253
5381
|
}
|
|
5254
5382
|
}
|
|
5255
5383
|
],
|
|
5256
5384
|
"hasBody": false,
|
|
5257
5385
|
"workspace": true,
|
|
5386
|
+
"acceptsApiKey": true,
|
|
5258
5387
|
"scope": "environments:write"
|
|
5259
5388
|
},
|
|
5260
5389
|
{
|
|
@@ -5278,21 +5407,24 @@ var OPERATIONS = [
|
|
|
5278
5407
|
"idempotentHint": true
|
|
5279
5408
|
}
|
|
5280
5409
|
},
|
|
5281
|
-
"description": "
|
|
5410
|
+
"description": "Returns one environment and what uses it: its secret values, and the schedules and triggers that run in it. Deleting the environment deletes its secret values. You can't delete it while a schedule or trigger runs in it.",
|
|
5282
5411
|
"fields": [
|
|
5283
5412
|
{
|
|
5284
5413
|
"name": "environment",
|
|
5285
5414
|
"in": "path",
|
|
5286
5415
|
"type": "string",
|
|
5287
5416
|
"required": true,
|
|
5417
|
+
"description": "The environment's ID.",
|
|
5288
5418
|
"example": "staging",
|
|
5289
5419
|
"schema": {
|
|
5290
|
-
"type": "string"
|
|
5420
|
+
"type": "string",
|
|
5421
|
+
"description": "The environment's ID."
|
|
5291
5422
|
}
|
|
5292
5423
|
}
|
|
5293
5424
|
],
|
|
5294
5425
|
"hasBody": false,
|
|
5295
5426
|
"workspace": true,
|
|
5427
|
+
"acceptsApiKey": true,
|
|
5296
5428
|
"scope": "environments:read"
|
|
5297
5429
|
},
|
|
5298
5430
|
{
|
|
@@ -5314,10 +5446,11 @@ var OPERATIONS = [
|
|
|
5314
5446
|
"idempotentHint": true
|
|
5315
5447
|
}
|
|
5316
5448
|
},
|
|
5317
|
-
"description": "
|
|
5449
|
+
"description": "Lists the workspace's environments, oldest first, and shows which one is the default. To act in an environment, name it in the X-Environment header.",
|
|
5318
5450
|
"fields": [],
|
|
5319
5451
|
"hasBody": false,
|
|
5320
5452
|
"workspace": true,
|
|
5453
|
+
"acceptsApiKey": true,
|
|
5321
5454
|
"scope": "environments:read"
|
|
5322
5455
|
},
|
|
5323
5456
|
{
|
|
@@ -5334,18 +5467,20 @@ var OPERATIONS = [
|
|
|
5334
5467
|
},
|
|
5335
5468
|
"mcp": {
|
|
5336
5469
|
"exposed": false,
|
|
5337
|
-
"reason": "Environments hold secret values and rules
|
|
5470
|
+
"reason": "Environments hold secret values and rules. A person sets them up, and an agent asks a person to."
|
|
5338
5471
|
},
|
|
5339
|
-
"description": "Renames
|
|
5472
|
+
"description": "Renames an environment, changes its rules, or makes it the workspace's default with `isDefault: true`. Runs keep the environment name they ran under. Workspace owners, admins and API keys can change an environment.",
|
|
5340
5473
|
"fields": [
|
|
5341
5474
|
{
|
|
5342
5475
|
"name": "environment",
|
|
5343
5476
|
"in": "path",
|
|
5344
5477
|
"type": "string",
|
|
5345
5478
|
"required": true,
|
|
5479
|
+
"description": "The environment's ID.",
|
|
5346
5480
|
"example": "staging",
|
|
5347
5481
|
"schema": {
|
|
5348
|
-
"type": "string"
|
|
5482
|
+
"type": "string",
|
|
5483
|
+
"description": "The environment's ID."
|
|
5349
5484
|
}
|
|
5350
5485
|
},
|
|
5351
5486
|
{
|
|
@@ -5353,10 +5488,10 @@ var OPERATIONS = [
|
|
|
5353
5488
|
"in": "body",
|
|
5354
5489
|
"type": "string",
|
|
5355
5490
|
"required": false,
|
|
5356
|
-
"description": "
|
|
5491
|
+
"description": "The environment's name, unique in the workspace. It's up to 32 lowercase letters, digits and dashes, and starts with a letter.",
|
|
5357
5492
|
"schema": {
|
|
5358
5493
|
"type": "string",
|
|
5359
|
-
"description": "
|
|
5494
|
+
"description": "The environment's name, unique in the workspace. It's up to 32 lowercase letters, digits and dashes, and starts with a letter."
|
|
5360
5495
|
}
|
|
5361
5496
|
},
|
|
5362
5497
|
{
|
|
@@ -5364,7 +5499,8 @@ var OPERATIONS = [
|
|
|
5364
5499
|
"in": "body",
|
|
5365
5500
|
"type": "string",
|
|
5366
5501
|
"required": false,
|
|
5367
|
-
"description": "Which runs here wait for a person's approval: `none`, `agents`
|
|
5502
|
+
"description": "Which runs here wait for a person's approval: `none`, `agents` for runs an agent starts, or `always` for every run. A run uses the stricter of this policy and its script's policy.",
|
|
5503
|
+
"example": "agents",
|
|
5368
5504
|
"schema": {
|
|
5369
5505
|
"type": "string",
|
|
5370
5506
|
"enum": [
|
|
@@ -5372,7 +5508,7 @@ var OPERATIONS = [
|
|
|
5372
5508
|
"agents",
|
|
5373
5509
|
"always"
|
|
5374
5510
|
],
|
|
5375
|
-
"description": "Which runs here wait for a person's approval: `none`, `agents`
|
|
5511
|
+
"description": "Which runs here wait for a person's approval: `none`, `agents` for runs an agent starts, or `always` for every run. A run uses the stricter of this policy and its script's policy."
|
|
5376
5512
|
}
|
|
5377
5513
|
},
|
|
5378
5514
|
{
|
|
@@ -5380,10 +5516,10 @@ var OPERATIONS = [
|
|
|
5380
5516
|
"in": "body",
|
|
5381
5517
|
"type": "boolean",
|
|
5382
5518
|
"required": false,
|
|
5383
|
-
"description": "Whether agents
|
|
5519
|
+
"description": "Whether agents connected through MCP can run scripts in this environment. When it's false, Reminix also refuses schedules and triggers an agent adds here.",
|
|
5384
5520
|
"schema": {
|
|
5385
5521
|
"type": "boolean",
|
|
5386
|
-
"description": "Whether agents
|
|
5522
|
+
"description": "Whether agents connected through MCP can run scripts in this environment. When it's false, Reminix also refuses schedules and triggers an agent adds here."
|
|
5387
5523
|
}
|
|
5388
5524
|
},
|
|
5389
5525
|
{
|
|
@@ -5391,24 +5527,25 @@ var OPERATIONS = [
|
|
|
5391
5527
|
"in": "body",
|
|
5392
5528
|
"type": "boolean",
|
|
5393
5529
|
"required": false,
|
|
5394
|
-
"description": "
|
|
5530
|
+
"description": "Makes this the default environment. To change the default, make another environment the default.",
|
|
5395
5531
|
"schema": {
|
|
5396
5532
|
"type": "boolean",
|
|
5397
5533
|
"enum": [
|
|
5398
5534
|
true
|
|
5399
5535
|
],
|
|
5400
|
-
"description": "
|
|
5536
|
+
"description": "Makes this the default environment. To change the default, make another environment the default."
|
|
5401
5537
|
}
|
|
5402
5538
|
}
|
|
5403
5539
|
],
|
|
5404
5540
|
"hasBody": true,
|
|
5405
5541
|
"workspace": true,
|
|
5542
|
+
"acceptsApiKey": true,
|
|
5406
5543
|
"scope": "environments:write"
|
|
5407
5544
|
},
|
|
5408
5545
|
{
|
|
5409
|
-
"operationId": "files.
|
|
5546
|
+
"operationId": "files.download",
|
|
5410
5547
|
"method": "get",
|
|
5411
|
-
"path": "/files/{fileId}/
|
|
5548
|
+
"path": "/files/{fileId}/download",
|
|
5412
5549
|
"summary": "Download a file",
|
|
5413
5550
|
"cli": {
|
|
5414
5551
|
"command": "files download",
|
|
@@ -5421,59 +5558,27 @@ var OPERATIONS = [
|
|
|
5421
5558
|
"exposed": false,
|
|
5422
5559
|
"reason": "Returns raw bytes; agents use the file's downloadUrl (files.get) instead."
|
|
5423
5560
|
},
|
|
5424
|
-
"description": "
|
|
5561
|
+
"description": "Returns the file's bytes as a download. The response always has `Content-Disposition: attachment`, so a browser saves the file instead of showing it as a page.",
|
|
5425
5562
|
"fields": [
|
|
5426
5563
|
{
|
|
5427
5564
|
"name": "fileId",
|
|
5428
5565
|
"in": "path",
|
|
5429
5566
|
"type": "string",
|
|
5430
5567
|
"required": true,
|
|
5568
|
+
"description": "The file's ID.",
|
|
5569
|
+
"example": "file_4c1e\u2026",
|
|
5431
5570
|
"schema": {
|
|
5432
|
-
"type": "string"
|
|
5571
|
+
"type": "string",
|
|
5572
|
+
"description": "The file's ID."
|
|
5433
5573
|
}
|
|
5434
5574
|
}
|
|
5435
5575
|
],
|
|
5436
5576
|
"hasBody": false,
|
|
5437
5577
|
"rawResponse": "application/octet-stream",
|
|
5438
5578
|
"workspace": true,
|
|
5579
|
+
"acceptsApiKey": true,
|
|
5439
5580
|
"scope": "runs:read"
|
|
5440
5581
|
},
|
|
5441
|
-
{
|
|
5442
|
-
"operationId": "files.create",
|
|
5443
|
-
"method": "post",
|
|
5444
|
-
"path": "/files",
|
|
5445
|
-
"summary": "Upload a file",
|
|
5446
|
-
"cli": {
|
|
5447
|
-
"command": "files upload",
|
|
5448
|
-
"args": [],
|
|
5449
|
-
"confirm": false
|
|
5450
|
-
},
|
|
5451
|
-
"mcp": {
|
|
5452
|
-
"exposed": false,
|
|
5453
|
-
"reason": "Takes raw bytes, which an agent's tool call can't carry; agents pass an https link as the file input instead."
|
|
5454
|
-
},
|
|
5455
|
-
"description": 'Uploads a file to give a run: send its bytes as the body with its `Content-Type` and `Content-Length`, and its name as `?name=`. Then pass the returned id as a file input (`{ "<input>": "file_\u2026" }`). An upload no run uses within a day is deleted; one run uses it.',
|
|
5456
|
-
"fields": [
|
|
5457
|
-
{
|
|
5458
|
-
"name": "name",
|
|
5459
|
-
"in": "query",
|
|
5460
|
-
"type": "string",
|
|
5461
|
-
"required": true,
|
|
5462
|
-
"description": "The file's name.",
|
|
5463
|
-
"example": "adjustments.csv",
|
|
5464
|
-
"schema": {
|
|
5465
|
-
"type": "string",
|
|
5466
|
-
"minLength": 1,
|
|
5467
|
-
"maxLength": 500,
|
|
5468
|
-
"description": "The file's name."
|
|
5469
|
-
}
|
|
5470
|
-
}
|
|
5471
|
-
],
|
|
5472
|
-
"hasBody": false,
|
|
5473
|
-
"rawBody": "application/octet-stream",
|
|
5474
|
-
"workspace": true,
|
|
5475
|
-
"scope": "runs:write"
|
|
5476
|
-
},
|
|
5477
5582
|
{
|
|
5478
5583
|
"operationId": "files.get",
|
|
5479
5584
|
"method": "get",
|
|
@@ -5495,20 +5600,24 @@ var OPERATIONS = [
|
|
|
5495
5600
|
"idempotentHint": true
|
|
5496
5601
|
}
|
|
5497
5602
|
},
|
|
5498
|
-
"description": "
|
|
5603
|
+
"description": "Returns a file's name, media type and size, the run that took or saved it, and a download link that works for an hour. Anyone who can see a run can read its files. Until a run uses an upload, only the person who uploaded it, a workspace owner or admin, or a workspace API key can read it.",
|
|
5499
5604
|
"fields": [
|
|
5500
5605
|
{
|
|
5501
5606
|
"name": "fileId",
|
|
5502
5607
|
"in": "path",
|
|
5503
5608
|
"type": "string",
|
|
5504
5609
|
"required": true,
|
|
5610
|
+
"description": "The file's ID.",
|
|
5611
|
+
"example": "file_4c1e\u2026",
|
|
5505
5612
|
"schema": {
|
|
5506
|
-
"type": "string"
|
|
5613
|
+
"type": "string",
|
|
5614
|
+
"description": "The file's ID."
|
|
5507
5615
|
}
|
|
5508
5616
|
}
|
|
5509
5617
|
],
|
|
5510
5618
|
"hasBody": false,
|
|
5511
5619
|
"workspace": true,
|
|
5620
|
+
"acceptsApiKey": true,
|
|
5512
5621
|
"scope": "runs:read"
|
|
5513
5622
|
},
|
|
5514
5623
|
{
|
|
@@ -5530,7 +5639,7 @@ var OPERATIONS = [
|
|
|
5530
5639
|
"idempotentHint": true
|
|
5531
5640
|
}
|
|
5532
5641
|
},
|
|
5533
|
-
"description": "
|
|
5642
|
+
"description": "Lists the files that runs saved, newest first, across the scripts you can see. A file stays in the list until it expires. Pass `?script=<slug>` for one script's files. Pass `?origin=input` for the files runs took as inputs, or `?origin=all` for both. Pass `?name=` to match file names. Each file comes with a download link that works for an hour. Pass `?before=` to start from a moment. Paginate with the opaque `nextCursor` token.",
|
|
5534
5643
|
"fields": [
|
|
5535
5644
|
{
|
|
5536
5645
|
"name": "limit",
|
|
@@ -5558,52 +5667,105 @@ var OPERATIONS = [
|
|
|
5558
5667
|
"description": "Opaque token from a previous page's nextCursor."
|
|
5559
5668
|
}
|
|
5560
5669
|
},
|
|
5670
|
+
{
|
|
5671
|
+
"name": "before",
|
|
5672
|
+
"in": "query",
|
|
5673
|
+
"type": "string",
|
|
5674
|
+
"required": false,
|
|
5675
|
+
"description": "Start from this moment: items older than it, newest first. Ignored with `cursor`, which already says where to go on.",
|
|
5676
|
+
"example": "2026-11-01T00:00:00.000Z",
|
|
5677
|
+
"schema": {
|
|
5678
|
+
"type": "string",
|
|
5679
|
+
"format": "date-time",
|
|
5680
|
+
"description": "Start from this moment: items older than it, newest first. Ignored with `cursor`, which already says where to go on."
|
|
5681
|
+
}
|
|
5682
|
+
},
|
|
5561
5683
|
{
|
|
5562
5684
|
"name": "script",
|
|
5563
5685
|
"in": "query",
|
|
5564
5686
|
"type": "string",
|
|
5565
5687
|
"required": false,
|
|
5566
|
-
"description": "Only files from this script's runs
|
|
5688
|
+
"description": "Only files from this script's runs, by its slug.",
|
|
5567
5689
|
"example": "monthly-report",
|
|
5568
5690
|
"schema": {
|
|
5569
5691
|
"type": "string",
|
|
5570
|
-
"
|
|
5692
|
+
"maxLength": 100,
|
|
5693
|
+
"description": "Only files from this script's runs, by its slug."
|
|
5571
5694
|
}
|
|
5572
5695
|
},
|
|
5573
5696
|
{
|
|
5574
|
-
"name": "
|
|
5697
|
+
"name": "origin",
|
|
5575
5698
|
"in": "query",
|
|
5576
5699
|
"type": "string",
|
|
5577
5700
|
"required": false,
|
|
5578
|
-
"description": "`
|
|
5701
|
+
"description": "Which files to list: `saved` for files runs saved (the default), `input` for files runs took as inputs, or `all` for both.",
|
|
5579
5702
|
"schema": {
|
|
5580
5703
|
"type": "string",
|
|
5581
5704
|
"enum": [
|
|
5582
|
-
"
|
|
5583
|
-
"
|
|
5705
|
+
"input",
|
|
5706
|
+
"saved",
|
|
5584
5707
|
"all"
|
|
5585
5708
|
],
|
|
5586
|
-
"description": "`
|
|
5709
|
+
"description": "Which files to list: `saved` for files runs saved (the default), `input` for files runs took as inputs, or `all` for both."
|
|
5587
5710
|
}
|
|
5588
5711
|
},
|
|
5589
5712
|
{
|
|
5590
|
-
"name": "
|
|
5713
|
+
"name": "name",
|
|
5591
5714
|
"in": "query",
|
|
5592
5715
|
"type": "string",
|
|
5593
5716
|
"required": false,
|
|
5594
|
-
"description": "Only files whose name contains this.",
|
|
5717
|
+
"description": "Only files whose name contains this text.",
|
|
5595
5718
|
"example": "revenue",
|
|
5596
5719
|
"schema": {
|
|
5597
5720
|
"type": "string",
|
|
5598
5721
|
"maxLength": 200,
|
|
5599
|
-
"description": "Only files whose name contains this."
|
|
5722
|
+
"description": "Only files whose name contains this text."
|
|
5600
5723
|
}
|
|
5601
5724
|
}
|
|
5602
5725
|
],
|
|
5603
5726
|
"hasBody": false,
|
|
5604
5727
|
"workspace": true,
|
|
5728
|
+
"acceptsApiKey": true,
|
|
5605
5729
|
"scope": "runs:read"
|
|
5606
5730
|
},
|
|
5731
|
+
{
|
|
5732
|
+
"operationId": "files.upload",
|
|
5733
|
+
"method": "post",
|
|
5734
|
+
"path": "/files",
|
|
5735
|
+
"summary": "Upload a file",
|
|
5736
|
+
"cli": {
|
|
5737
|
+
"command": "files upload",
|
|
5738
|
+
"args": [],
|
|
5739
|
+
"confirm": false,
|
|
5740
|
+
"sample": "reminix files upload ./adjustments.csv"
|
|
5741
|
+
},
|
|
5742
|
+
"mcp": {
|
|
5743
|
+
"exposed": false,
|
|
5744
|
+
"reason": "Takes raw bytes, which an agent's tool call can't carry; agents pass an https link as the file input instead."
|
|
5745
|
+
},
|
|
5746
|
+
"description": 'Uploads a file that a run can take as a file input. Send the file\'s bytes as the request body, with `Content-Type` and `Content-Length` headers, and its name as `?name=`. Then pass the returned id as the file input\'s value (`{ "adjustments": "file_4c1e\u2026" }`). You can give each upload to only one run. If no run uses an upload within a day, Reminix deletes it. Your plan sets the largest file you can upload. Reminix refuses a file over 1,000 MB on every plan.',
|
|
5747
|
+
"fields": [
|
|
5748
|
+
{
|
|
5749
|
+
"name": "name",
|
|
5750
|
+
"in": "query",
|
|
5751
|
+
"type": "string",
|
|
5752
|
+
"required": true,
|
|
5753
|
+
"description": "The file's name.",
|
|
5754
|
+
"example": "adjustments.csv",
|
|
5755
|
+
"schema": {
|
|
5756
|
+
"type": "string",
|
|
5757
|
+
"minLength": 1,
|
|
5758
|
+
"maxLength": 500,
|
|
5759
|
+
"description": "The file's name."
|
|
5760
|
+
}
|
|
5761
|
+
}
|
|
5762
|
+
],
|
|
5763
|
+
"hasBody": false,
|
|
5764
|
+
"rawBody": "application/octet-stream",
|
|
5765
|
+
"workspace": true,
|
|
5766
|
+
"acceptsApiKey": true,
|
|
5767
|
+
"scope": "runs:write"
|
|
5768
|
+
},
|
|
5607
5769
|
{
|
|
5608
5770
|
"operationId": "runs.cancel",
|
|
5609
5771
|
"method": "post",
|
|
@@ -5625,20 +5787,24 @@ var OPERATIONS = [
|
|
|
5625
5787
|
"idempotentHint": false
|
|
5626
5788
|
}
|
|
5627
5789
|
},
|
|
5628
|
-
"description": "
|
|
5790
|
+
"description": "Cancels a long run that is still running. The run's code stops, the run ends `cancelled`, and Reminix sends a `run.cancelled` event. The person who started the run, the script owner, a workspace owner or admin, or a workspace API key can cancel it.",
|
|
5629
5791
|
"fields": [
|
|
5630
5792
|
{
|
|
5631
5793
|
"name": "runId",
|
|
5632
5794
|
"in": "path",
|
|
5633
5795
|
"type": "string",
|
|
5634
5796
|
"required": true,
|
|
5797
|
+
"description": "The run's ID.",
|
|
5798
|
+
"example": "run_7b1a\u2026",
|
|
5635
5799
|
"schema": {
|
|
5636
|
-
"type": "string"
|
|
5800
|
+
"type": "string",
|
|
5801
|
+
"description": "The run's ID."
|
|
5637
5802
|
}
|
|
5638
5803
|
}
|
|
5639
5804
|
],
|
|
5640
5805
|
"hasBody": false,
|
|
5641
5806
|
"workspace": true,
|
|
5807
|
+
"acceptsApiKey": true,
|
|
5642
5808
|
"scope": "runs:write"
|
|
5643
5809
|
},
|
|
5644
5810
|
{
|
|
@@ -5663,16 +5829,18 @@ var OPERATIONS = [
|
|
|
5663
5829
|
"idempotentHint": false
|
|
5664
5830
|
}
|
|
5665
5831
|
},
|
|
5666
|
-
"description": "Runs the script's
|
|
5832
|
+
"description": "Runs the script's published version with these inputs, and returns the run when it finishes, with its output or error. Reminix first checks the inputs against the version's input schema. If they don't match, the request returns 400 with one `details` entry per field. For a file input, pass a file id or an https link that Reminix fetches. The id can be a file you uploaded with files.upload, or a file another run saved. The script runs on its own fresh machine and can reach only the hosts its version declares. A run can last up to its version's `timeoutSeconds`, at most 30, counted from when its code starts. Getting a machine can take up to 2 minutes first. If the run is still in progress after 60 seconds, the request returns 202 with status `running`, and you follow the run with runs.get. If the version's `timeoutSeconds` is over 30, the run is a long run. A long run runs durably, and the request returns 202 at once. Every run counts toward the workspace's `runs` usage.",
|
|
5667
5833
|
"fields": [
|
|
5668
5834
|
{
|
|
5669
5835
|
"name": "slug",
|
|
5670
5836
|
"in": "path",
|
|
5671
5837
|
"type": "string",
|
|
5672
5838
|
"required": true,
|
|
5839
|
+
"description": "The slug's ID.",
|
|
5673
5840
|
"example": "unlock-account",
|
|
5674
5841
|
"schema": {
|
|
5675
|
-
"type": "string"
|
|
5842
|
+
"type": "string",
|
|
5843
|
+
"description": "The slug's ID."
|
|
5676
5844
|
}
|
|
5677
5845
|
},
|
|
5678
5846
|
{
|
|
@@ -5680,7 +5848,7 @@ var OPERATIONS = [
|
|
|
5680
5848
|
"in": "body",
|
|
5681
5849
|
"type": "json",
|
|
5682
5850
|
"required": false,
|
|
5683
|
-
"description": "The script's inputs, by name.
|
|
5851
|
+
"description": "The script's inputs, by name. The default is no inputs.",
|
|
5684
5852
|
"example": {
|
|
5685
5853
|
"email": "jane@example.com"
|
|
5686
5854
|
},
|
|
@@ -5688,7 +5856,7 @@ var OPERATIONS = [
|
|
|
5688
5856
|
"type": "object",
|
|
5689
5857
|
"additionalProperties": {},
|
|
5690
5858
|
"default": {},
|
|
5691
|
-
"description": "The script's inputs, by name.
|
|
5859
|
+
"description": "The script's inputs, by name. The default is no inputs."
|
|
5692
5860
|
}
|
|
5693
5861
|
},
|
|
5694
5862
|
{
|
|
@@ -5696,19 +5864,20 @@ var OPERATIONS = [
|
|
|
5696
5864
|
"in": "body",
|
|
5697
5865
|
"type": "string",
|
|
5698
5866
|
"required": false,
|
|
5699
|
-
"description": "
|
|
5867
|
+
"description": "Where the run came from, for the history. The default is `api`. Reminix records an agent's runs as `agent` whatever this says.",
|
|
5700
5868
|
"schema": {
|
|
5701
5869
|
"type": "string",
|
|
5702
5870
|
"enum": [
|
|
5703
5871
|
"api",
|
|
5704
5872
|
"cli"
|
|
5705
5873
|
],
|
|
5706
|
-
"description": "
|
|
5874
|
+
"description": "Where the run came from, for the history. The default is `api`. Reminix records an agent's runs as `agent` whatever this says."
|
|
5707
5875
|
}
|
|
5708
5876
|
}
|
|
5709
5877
|
],
|
|
5710
5878
|
"hasBody": true,
|
|
5711
5879
|
"workspace": true,
|
|
5880
|
+
"acceptsApiKey": true,
|
|
5712
5881
|
"scope": "runs:write"
|
|
5713
5882
|
},
|
|
5714
5883
|
{
|
|
@@ -5732,20 +5901,24 @@ var OPERATIONS = [
|
|
|
5732
5901
|
"idempotentHint": true
|
|
5733
5902
|
}
|
|
5734
5903
|
},
|
|
5735
|
-
"description": "
|
|
5904
|
+
"description": "Returns one run, with its inputs, status, output or error, and who started it and how. The response also has the run's files, both given and saved, each with a download link.",
|
|
5736
5905
|
"fields": [
|
|
5737
5906
|
{
|
|
5738
5907
|
"name": "runId",
|
|
5739
5908
|
"in": "path",
|
|
5740
5909
|
"type": "string",
|
|
5741
5910
|
"required": true,
|
|
5911
|
+
"description": "The run's ID.",
|
|
5912
|
+
"example": "run_7b1a\u2026",
|
|
5742
5913
|
"schema": {
|
|
5743
|
-
"type": "string"
|
|
5914
|
+
"type": "string",
|
|
5915
|
+
"description": "The run's ID."
|
|
5744
5916
|
}
|
|
5745
5917
|
}
|
|
5746
5918
|
],
|
|
5747
5919
|
"hasBody": false,
|
|
5748
5920
|
"workspace": true,
|
|
5921
|
+
"acceptsApiKey": true,
|
|
5749
5922
|
"scope": "runs:read"
|
|
5750
5923
|
},
|
|
5751
5924
|
{
|
|
@@ -5767,7 +5940,7 @@ var OPERATIONS = [
|
|
|
5767
5940
|
"idempotentHint": true
|
|
5768
5941
|
}
|
|
5769
5942
|
},
|
|
5770
|
-
"description": "
|
|
5943
|
+
"description": "Lists the workspace's runs, newest first. Pass `?script=<slug>` for one script's runs and `?status=` for runs in one state. Pass `?before=` to start from a moment. Paginate with the opaque `nextCursor` token.",
|
|
5771
5944
|
"fields": [
|
|
5772
5945
|
{
|
|
5773
5946
|
"name": "limit",
|
|
@@ -5795,30 +5968,64 @@ var OPERATIONS = [
|
|
|
5795
5968
|
"description": "Opaque token from a previous page's nextCursor."
|
|
5796
5969
|
}
|
|
5797
5970
|
},
|
|
5971
|
+
{
|
|
5972
|
+
"name": "before",
|
|
5973
|
+
"in": "query",
|
|
5974
|
+
"type": "string",
|
|
5975
|
+
"required": false,
|
|
5976
|
+
"description": "Start from this moment: items older than it, newest first. Ignored with `cursor`, which already says where to go on.",
|
|
5977
|
+
"example": "2026-11-01T00:00:00.000Z",
|
|
5978
|
+
"schema": {
|
|
5979
|
+
"type": "string",
|
|
5980
|
+
"format": "date-time",
|
|
5981
|
+
"description": "Start from this moment: items older than it, newest first. Ignored with `cursor`, which already says where to go on."
|
|
5982
|
+
}
|
|
5983
|
+
},
|
|
5798
5984
|
{
|
|
5799
5985
|
"name": "script",
|
|
5800
5986
|
"in": "query",
|
|
5801
5987
|
"type": "string",
|
|
5802
5988
|
"required": false,
|
|
5803
|
-
"description": "Only this script's runs
|
|
5989
|
+
"description": "Only this script's runs, by its slug.",
|
|
5804
5990
|
"example": "unlock-account",
|
|
5805
5991
|
"schema": {
|
|
5806
5992
|
"type": "string",
|
|
5807
|
-
"
|
|
5993
|
+
"maxLength": 100,
|
|
5994
|
+
"description": "Only this script's runs, by its slug."
|
|
5995
|
+
}
|
|
5996
|
+
},
|
|
5997
|
+
{
|
|
5998
|
+
"name": "status",
|
|
5999
|
+
"in": "query",
|
|
6000
|
+
"type": "string",
|
|
6001
|
+
"required": false,
|
|
6002
|
+
"description": "Only runs in this state.",
|
|
6003
|
+
"example": "failed",
|
|
6004
|
+
"schema": {
|
|
6005
|
+
"type": "string",
|
|
6006
|
+
"enum": [
|
|
6007
|
+
"awaiting_approval",
|
|
6008
|
+
"running",
|
|
6009
|
+
"succeeded",
|
|
6010
|
+
"failed",
|
|
6011
|
+
"cancelled"
|
|
6012
|
+
],
|
|
6013
|
+
"description": "Only runs in this state."
|
|
5808
6014
|
}
|
|
5809
6015
|
}
|
|
5810
6016
|
],
|
|
5811
6017
|
"hasBody": false,
|
|
5812
6018
|
"workspace": true,
|
|
6019
|
+
"acceptsApiKey": true,
|
|
5813
6020
|
"scope": "runs:read"
|
|
5814
6021
|
},
|
|
5815
6022
|
{
|
|
5816
|
-
"operationId": "runs.
|
|
6023
|
+
"operationId": "runs.log",
|
|
5817
6024
|
"method": "get",
|
|
5818
|
-
"path": "/runs/{runId}/
|
|
6025
|
+
"path": "/runs/{runId}/log",
|
|
5819
6026
|
"summary": "Get a run's log",
|
|
5820
6027
|
"cli": {
|
|
5821
|
-
"command": "runs
|
|
6028
|
+
"command": "runs log",
|
|
5822
6029
|
"args": [
|
|
5823
6030
|
"runId"
|
|
5824
6031
|
],
|
|
@@ -5826,27 +6033,31 @@ var OPERATIONS = [
|
|
|
5826
6033
|
},
|
|
5827
6034
|
"mcp": {
|
|
5828
6035
|
"exposed": true,
|
|
5829
|
-
"name": "
|
|
6036
|
+
"name": "runs_log",
|
|
5830
6037
|
"hints": {
|
|
5831
6038
|
"readOnlyHint": true,
|
|
5832
6039
|
"destructiveHint": false,
|
|
5833
6040
|
"idempotentHint": true
|
|
5834
6041
|
}
|
|
5835
6042
|
},
|
|
5836
|
-
"description": "
|
|
6043
|
+
"description": "Returns the run's log: what the script wrote to standard error, line by line. The log also has a line for each request the script made.",
|
|
5837
6044
|
"fields": [
|
|
5838
6045
|
{
|
|
5839
6046
|
"name": "runId",
|
|
5840
6047
|
"in": "path",
|
|
5841
6048
|
"type": "string",
|
|
5842
6049
|
"required": true,
|
|
6050
|
+
"description": "The run's ID.",
|
|
6051
|
+
"example": "run_7b1a\u2026",
|
|
5843
6052
|
"schema": {
|
|
5844
|
-
"type": "string"
|
|
6053
|
+
"type": "string",
|
|
6054
|
+
"description": "The run's ID."
|
|
5845
6055
|
}
|
|
5846
6056
|
}
|
|
5847
6057
|
],
|
|
5848
6058
|
"hasBody": false,
|
|
5849
6059
|
"workspace": true,
|
|
6060
|
+
"acceptsApiKey": true,
|
|
5850
6061
|
"scope": "runs:read"
|
|
5851
6062
|
},
|
|
5852
6063
|
{
|
|
@@ -5863,18 +6074,20 @@ var OPERATIONS = [
|
|
|
5863
6074
|
},
|
|
5864
6075
|
"mcp": {
|
|
5865
6076
|
"exposed": false,
|
|
5866
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
6077
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
5867
6078
|
},
|
|
5868
|
-
"description": "
|
|
6079
|
+
"description": "Schedules the script's published version to run on a cron in a timezone, with these inputs. The runs act as you. The cron has 5 fields, and its runs must be at least 5 minutes apart. If every run of the script, or every run in the environment, needs approval, only workspace owners and admins can create a schedule. If you can no longer run the script, Reminix disables the schedule and sets `disabledReason`.",
|
|
5869
6080
|
"fields": [
|
|
5870
6081
|
{
|
|
5871
6082
|
"name": "slug",
|
|
5872
6083
|
"in": "path",
|
|
5873
6084
|
"type": "string",
|
|
5874
6085
|
"required": true,
|
|
6086
|
+
"description": "The slug's ID.",
|
|
5875
6087
|
"example": "monthly-report",
|
|
5876
6088
|
"schema": {
|
|
5877
|
-
"type": "string"
|
|
6089
|
+
"type": "string",
|
|
6090
|
+
"description": "The slug's ID."
|
|
5878
6091
|
}
|
|
5879
6092
|
},
|
|
5880
6093
|
{
|
|
@@ -5910,11 +6123,11 @@ var OPERATIONS = [
|
|
|
5910
6123
|
"in": "body",
|
|
5911
6124
|
"type": "string",
|
|
5912
6125
|
"required": false,
|
|
5913
|
-
"description": "The timezone the cron is read in.
|
|
6126
|
+
"description": "The timezone the cron is read in. The default is UTC.",
|
|
5914
6127
|
"example": "Europe/Berlin",
|
|
5915
6128
|
"schema": {
|
|
5916
6129
|
"type": "string",
|
|
5917
|
-
"description": "The timezone the cron is read in.
|
|
6130
|
+
"description": "The timezone the cron is read in. The default is UTC."
|
|
5918
6131
|
}
|
|
5919
6132
|
},
|
|
5920
6133
|
{
|
|
@@ -5934,15 +6147,16 @@ var OPERATIONS = [
|
|
|
5934
6147
|
"in": "body",
|
|
5935
6148
|
"type": "string",
|
|
5936
6149
|
"required": false,
|
|
5937
|
-
"description": "The environment
|
|
6150
|
+
"description": "The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment.",
|
|
5938
6151
|
"schema": {
|
|
5939
6152
|
"type": "string",
|
|
5940
|
-
"description": "The environment
|
|
6153
|
+
"description": "The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment."
|
|
5941
6154
|
}
|
|
5942
6155
|
}
|
|
5943
6156
|
],
|
|
5944
6157
|
"hasBody": true,
|
|
5945
6158
|
"workspace": true,
|
|
6159
|
+
"acceptsApiKey": false,
|
|
5946
6160
|
"scope": "scripts:write"
|
|
5947
6161
|
},
|
|
5948
6162
|
{
|
|
@@ -5960,18 +6174,20 @@ var OPERATIONS = [
|
|
|
5960
6174
|
},
|
|
5961
6175
|
"mcp": {
|
|
5962
6176
|
"exposed": false,
|
|
5963
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
6177
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
5964
6178
|
},
|
|
5965
|
-
"description": "
|
|
6179
|
+
"description": "Deletes a schedule. The schedule's creator, a workspace owner or admin, or a workspace API key can delete it.",
|
|
5966
6180
|
"fields": [
|
|
5967
6181
|
{
|
|
5968
6182
|
"name": "slug",
|
|
5969
6183
|
"in": "path",
|
|
5970
6184
|
"type": "string",
|
|
5971
6185
|
"required": true,
|
|
6186
|
+
"description": "The slug's ID.",
|
|
5972
6187
|
"example": "monthly-report",
|
|
5973
6188
|
"schema": {
|
|
5974
|
-
"type": "string"
|
|
6189
|
+
"type": "string",
|
|
6190
|
+
"description": "The slug's ID."
|
|
5975
6191
|
}
|
|
5976
6192
|
},
|
|
5977
6193
|
{
|
|
@@ -5979,13 +6195,17 @@ var OPERATIONS = [
|
|
|
5979
6195
|
"in": "path",
|
|
5980
6196
|
"type": "string",
|
|
5981
6197
|
"required": true,
|
|
6198
|
+
"description": "The schedule's ID.",
|
|
6199
|
+
"example": "sch_2b9f\u2026",
|
|
5982
6200
|
"schema": {
|
|
5983
|
-
"type": "string"
|
|
6201
|
+
"type": "string",
|
|
6202
|
+
"description": "The schedule's ID."
|
|
5984
6203
|
}
|
|
5985
6204
|
}
|
|
5986
6205
|
],
|
|
5987
6206
|
"hasBody": false,
|
|
5988
6207
|
"workspace": true,
|
|
6208
|
+
"acceptsApiKey": true,
|
|
5989
6209
|
"scope": "scripts:write"
|
|
5990
6210
|
},
|
|
5991
6211
|
{
|
|
@@ -6009,21 +6229,24 @@ var OPERATIONS = [
|
|
|
6009
6229
|
"idempotentHint": true
|
|
6010
6230
|
}
|
|
6011
6231
|
},
|
|
6012
|
-
"description": "
|
|
6232
|
+
"description": "Lists a script's schedules, with when each one runs next.",
|
|
6013
6233
|
"fields": [
|
|
6014
6234
|
{
|
|
6015
6235
|
"name": "slug",
|
|
6016
6236
|
"in": "path",
|
|
6017
6237
|
"type": "string",
|
|
6018
6238
|
"required": true,
|
|
6239
|
+
"description": "The slug's ID.",
|
|
6019
6240
|
"example": "monthly-report",
|
|
6020
6241
|
"schema": {
|
|
6021
|
-
"type": "string"
|
|
6242
|
+
"type": "string",
|
|
6243
|
+
"description": "The slug's ID."
|
|
6022
6244
|
}
|
|
6023
6245
|
}
|
|
6024
6246
|
],
|
|
6025
6247
|
"hasBody": false,
|
|
6026
6248
|
"workspace": true,
|
|
6249
|
+
"acceptsApiKey": true,
|
|
6027
6250
|
"scope": "scripts:read"
|
|
6028
6251
|
},
|
|
6029
6252
|
{
|
|
@@ -6041,18 +6264,20 @@ var OPERATIONS = [
|
|
|
6041
6264
|
},
|
|
6042
6265
|
"mcp": {
|
|
6043
6266
|
"exposed": false,
|
|
6044
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
6267
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
6045
6268
|
},
|
|
6046
|
-
"description": "
|
|
6269
|
+
"description": "Changes a schedule's name, cron, timezone, inputs or environment, or whether it's enabled. The schedule's creator, a workspace owner or admin, or a workspace API key can change it.",
|
|
6047
6270
|
"fields": [
|
|
6048
6271
|
{
|
|
6049
6272
|
"name": "slug",
|
|
6050
6273
|
"in": "path",
|
|
6051
6274
|
"type": "string",
|
|
6052
6275
|
"required": true,
|
|
6276
|
+
"description": "The slug's ID.",
|
|
6053
6277
|
"example": "monthly-report",
|
|
6054
6278
|
"schema": {
|
|
6055
|
-
"type": "string"
|
|
6279
|
+
"type": "string",
|
|
6280
|
+
"description": "The slug's ID."
|
|
6056
6281
|
}
|
|
6057
6282
|
},
|
|
6058
6283
|
{
|
|
@@ -6060,8 +6285,11 @@ var OPERATIONS = [
|
|
|
6060
6285
|
"in": "path",
|
|
6061
6286
|
"type": "string",
|
|
6062
6287
|
"required": true,
|
|
6288
|
+
"description": "The schedule's ID.",
|
|
6289
|
+
"example": "sch_2b9f\u2026",
|
|
6063
6290
|
"schema": {
|
|
6064
|
-
"type": "string"
|
|
6291
|
+
"type": "string",
|
|
6292
|
+
"description": "The schedule's ID."
|
|
6065
6293
|
}
|
|
6066
6294
|
},
|
|
6067
6295
|
{
|
|
@@ -6096,11 +6324,11 @@ var OPERATIONS = [
|
|
|
6096
6324
|
"in": "body",
|
|
6097
6325
|
"type": "string",
|
|
6098
6326
|
"required": false,
|
|
6099
|
-
"description": "The timezone the cron is read in.
|
|
6327
|
+
"description": "The timezone the cron is read in. The default is UTC.",
|
|
6100
6328
|
"example": "Europe/Berlin",
|
|
6101
6329
|
"schema": {
|
|
6102
6330
|
"type": "string",
|
|
6103
|
-
"description": "The timezone the cron is read in.
|
|
6331
|
+
"description": "The timezone the cron is read in. The default is UTC."
|
|
6104
6332
|
}
|
|
6105
6333
|
},
|
|
6106
6334
|
{
|
|
@@ -6120,10 +6348,10 @@ var OPERATIONS = [
|
|
|
6120
6348
|
"in": "body",
|
|
6121
6349
|
"type": "boolean",
|
|
6122
6350
|
"required": false,
|
|
6123
|
-
"description": "Whether
|
|
6351
|
+
"description": "Whether the schedule runs. With `false`, it's disabled.",
|
|
6124
6352
|
"schema": {
|
|
6125
6353
|
"type": "boolean",
|
|
6126
|
-
"description": "Whether
|
|
6354
|
+
"description": "Whether the schedule runs. With `false`, it's disabled."
|
|
6127
6355
|
}
|
|
6128
6356
|
},
|
|
6129
6357
|
{
|
|
@@ -6131,15 +6359,16 @@ var OPERATIONS = [
|
|
|
6131
6359
|
"in": "body",
|
|
6132
6360
|
"type": "string",
|
|
6133
6361
|
"required": false,
|
|
6134
|
-
"description": "
|
|
6362
|
+
"description": "Another environment for the schedule's runs to use.",
|
|
6135
6363
|
"schema": {
|
|
6136
6364
|
"type": "string",
|
|
6137
|
-
"description": "
|
|
6365
|
+
"description": "Another environment for the schedule's runs to use."
|
|
6138
6366
|
}
|
|
6139
6367
|
}
|
|
6140
6368
|
],
|
|
6141
6369
|
"hasBody": true,
|
|
6142
6370
|
"workspace": true,
|
|
6371
|
+
"acceptsApiKey": true,
|
|
6143
6372
|
"scope": "scripts:write"
|
|
6144
6373
|
},
|
|
6145
6374
|
{
|
|
@@ -6156,23 +6385,26 @@ var OPERATIONS = [
|
|
|
6156
6385
|
},
|
|
6157
6386
|
"mcp": {
|
|
6158
6387
|
"exposed": false,
|
|
6159
|
-
"reason": "Stopping a script the team relies on is a person's decision
|
|
6388
|
+
"reason": "Stopping a script the team relies on is a person's decision. An agent asks a person to."
|
|
6160
6389
|
},
|
|
6161
|
-
"description": "
|
|
6390
|
+
"description": "Archives a script, which stops it. An archived script leaves the scripts list, nobody can run it, and its schedules and triggers skip it. Reminix never deletes a script, so its runs and versions stay. You can't archive a script while one of its runs is in progress or waiting for approval. The script owner, a workspace owner or admin, or a workspace API key can archive a script.",
|
|
6162
6391
|
"fields": [
|
|
6163
6392
|
{
|
|
6164
6393
|
"name": "slug",
|
|
6165
6394
|
"in": "path",
|
|
6166
6395
|
"type": "string",
|
|
6167
6396
|
"required": true,
|
|
6397
|
+
"description": "The slug's ID.",
|
|
6168
6398
|
"example": "unlock-account",
|
|
6169
6399
|
"schema": {
|
|
6170
|
-
"type": "string"
|
|
6400
|
+
"type": "string",
|
|
6401
|
+
"description": "The slug's ID."
|
|
6171
6402
|
}
|
|
6172
6403
|
}
|
|
6173
6404
|
],
|
|
6174
6405
|
"hasBody": false,
|
|
6175
6406
|
"workspace": true,
|
|
6407
|
+
"acceptsApiKey": true,
|
|
6176
6408
|
"scope": "scripts:write"
|
|
6177
6409
|
},
|
|
6178
6410
|
{
|
|
@@ -6194,18 +6426,18 @@ var OPERATIONS = [
|
|
|
6194
6426
|
"idempotentHint": false
|
|
6195
6427
|
}
|
|
6196
6428
|
},
|
|
6197
|
-
"description": "Creates an empty script
|
|
6429
|
+
"description": "Creates an empty script. Upload a version next, then publish it. The `slug` names the script everywhere: in the API path, in the agent's tool name and in the CLI. Each slug is unique in the workspace.",
|
|
6198
6430
|
"fields": [
|
|
6199
6431
|
{
|
|
6200
6432
|
"name": "slug",
|
|
6201
6433
|
"in": "body",
|
|
6202
6434
|
"type": "string",
|
|
6203
6435
|
"required": true,
|
|
6204
|
-
"description": "
|
|
6436
|
+
"description": "The script's id in URLs and commands. It's 2 to 64 lowercase letters, digits and dashes, starts with a letter, and is unique in the workspace.",
|
|
6205
6437
|
"example": "unlock-account",
|
|
6206
6438
|
"schema": {
|
|
6207
6439
|
"type": "string",
|
|
6208
|
-
"description": "
|
|
6440
|
+
"description": "The script's id in URLs and commands. It's 2 to 64 lowercase letters, digits and dashes, starts with a letter, and is unique in the workspace."
|
|
6209
6441
|
}
|
|
6210
6442
|
},
|
|
6211
6443
|
{
|
|
@@ -6213,13 +6445,13 @@ var OPERATIONS = [
|
|
|
6213
6445
|
"in": "body",
|
|
6214
6446
|
"type": "string",
|
|
6215
6447
|
"required": true,
|
|
6216
|
-
"description": "
|
|
6448
|
+
"description": "The name people see in the app.",
|
|
6217
6449
|
"example": "Unlock an account",
|
|
6218
6450
|
"schema": {
|
|
6219
6451
|
"type": "string",
|
|
6220
6452
|
"minLength": 1,
|
|
6221
6453
|
"maxLength": 100,
|
|
6222
|
-
"description": "
|
|
6454
|
+
"description": "The name people see in the app."
|
|
6223
6455
|
}
|
|
6224
6456
|
},
|
|
6225
6457
|
{
|
|
@@ -6227,16 +6459,18 @@ var OPERATIONS = [
|
|
|
6227
6459
|
"in": "body",
|
|
6228
6460
|
"type": "string",
|
|
6229
6461
|
"required": false,
|
|
6230
|
-
"description": "What
|
|
6462
|
+
"description": "What the script does, in a sentence or two.",
|
|
6463
|
+
"example": "Unlocks a customer's account after too many failed sign-ins.",
|
|
6231
6464
|
"schema": {
|
|
6232
6465
|
"type": "string",
|
|
6233
6466
|
"maxLength": 1e3,
|
|
6234
|
-
"description": "What
|
|
6467
|
+
"description": "What the script does, in a sentence or two."
|
|
6235
6468
|
}
|
|
6236
6469
|
}
|
|
6237
6470
|
],
|
|
6238
6471
|
"hasBody": true,
|
|
6239
6472
|
"workspace": true,
|
|
6473
|
+
"acceptsApiKey": true,
|
|
6240
6474
|
"scope": "scripts:write"
|
|
6241
6475
|
},
|
|
6242
6476
|
{
|
|
@@ -6260,21 +6494,24 @@ var OPERATIONS = [
|
|
|
6260
6494
|
"idempotentHint": true
|
|
6261
6495
|
}
|
|
6262
6496
|
},
|
|
6263
|
-
"description": "
|
|
6497
|
+
"description": "Returns one script by its slug, with its name, owner, status, published version and README. The response also lists what uses the script: the people who run it, its schedules and triggers, and the scripts its runs start.",
|
|
6264
6498
|
"fields": [
|
|
6265
6499
|
{
|
|
6266
6500
|
"name": "slug",
|
|
6267
6501
|
"in": "path",
|
|
6268
6502
|
"type": "string",
|
|
6269
6503
|
"required": true,
|
|
6504
|
+
"description": "The slug's ID.",
|
|
6270
6505
|
"example": "unlock-account",
|
|
6271
6506
|
"schema": {
|
|
6272
|
-
"type": "string"
|
|
6507
|
+
"type": "string",
|
|
6508
|
+
"description": "The slug's ID."
|
|
6273
6509
|
}
|
|
6274
6510
|
}
|
|
6275
6511
|
],
|
|
6276
6512
|
"hasBody": false,
|
|
6277
6513
|
"workspace": true,
|
|
6514
|
+
"acceptsApiKey": true,
|
|
6278
6515
|
"scope": "scripts:read"
|
|
6279
6516
|
},
|
|
6280
6517
|
{
|
|
@@ -6296,7 +6533,7 @@ var OPERATIONS = [
|
|
|
6296
6533
|
"idempotentHint": true
|
|
6297
6534
|
}
|
|
6298
6535
|
},
|
|
6299
|
-
"description": "
|
|
6536
|
+
"description": "Lists the workspace's scripts that you can see, newest first, with the version each one runs, its tags and its 30-day stats. Search with `q` to get the best match first. Filter with `tag`, `owner` or `published`. Check here for an existing script before writing a new one. Paginate with the opaque `nextCursor` token.",
|
|
6300
6537
|
"fields": [
|
|
6301
6538
|
{
|
|
6302
6539
|
"name": "limit",
|
|
@@ -6329,11 +6566,11 @@ var OPERATIONS = [
|
|
|
6329
6566
|
"in": "query",
|
|
6330
6567
|
"type": "string",
|
|
6331
6568
|
"required": false,
|
|
6332
|
-
"description": "
|
|
6569
|
+
"description": "Words to search for in the name, slug, description and tags. Each word matches the start of a word. Results come best match first, on one page with no cursor.",
|
|
6333
6570
|
"schema": {
|
|
6334
6571
|
"type": "string",
|
|
6335
6572
|
"maxLength": 200,
|
|
6336
|
-
"description": "
|
|
6573
|
+
"description": "Words to search for in the name, slug, description and tags. Each word matches the start of a word. Results come best match first, on one page with no cursor."
|
|
6337
6574
|
}
|
|
6338
6575
|
},
|
|
6339
6576
|
{
|
|
@@ -6353,10 +6590,10 @@ var OPERATIONS = [
|
|
|
6353
6590
|
"in": "query",
|
|
6354
6591
|
"type": "string",
|
|
6355
6592
|
"required": false,
|
|
6356
|
-
"description": "
|
|
6593
|
+
"description": "Only scripts this person owns, by their user id.",
|
|
6357
6594
|
"schema": {
|
|
6358
6595
|
"type": "string",
|
|
6359
|
-
"description": "
|
|
6596
|
+
"description": "Only scripts this person owns, by their user id."
|
|
6360
6597
|
}
|
|
6361
6598
|
},
|
|
6362
6599
|
{
|
|
@@ -6364,14 +6601,14 @@ var OPERATIONS = [
|
|
|
6364
6601
|
"in": "query",
|
|
6365
6602
|
"type": "string",
|
|
6366
6603
|
"required": false,
|
|
6367
|
-
"description": "`true
|
|
6604
|
+
"description": "With `true`, only scripts that have a published version.",
|
|
6368
6605
|
"schema": {
|
|
6369
6606
|
"type": "string",
|
|
6370
6607
|
"enum": [
|
|
6371
6608
|
"true",
|
|
6372
6609
|
"false"
|
|
6373
6610
|
],
|
|
6374
|
-
"description": "`true
|
|
6611
|
+
"description": "With `true`, only scripts that have a published version."
|
|
6375
6612
|
}
|
|
6376
6613
|
},
|
|
6377
6614
|
{
|
|
@@ -6379,19 +6616,20 @@ var OPERATIONS = [
|
|
|
6379
6616
|
"in": "query",
|
|
6380
6617
|
"type": "string",
|
|
6381
6618
|
"required": false,
|
|
6382
|
-
"description": "`true
|
|
6619
|
+
"description": "With `true`, only archived scripts. The list leaves them out otherwise.",
|
|
6383
6620
|
"schema": {
|
|
6384
6621
|
"type": "string",
|
|
6385
6622
|
"enum": [
|
|
6386
6623
|
"true",
|
|
6387
6624
|
"false"
|
|
6388
6625
|
],
|
|
6389
|
-
"description": "`true
|
|
6626
|
+
"description": "With `true`, only archived scripts. The list leaves them out otherwise."
|
|
6390
6627
|
}
|
|
6391
6628
|
}
|
|
6392
6629
|
],
|
|
6393
6630
|
"hasBody": false,
|
|
6394
6631
|
"workspace": true,
|
|
6632
|
+
"acceptsApiKey": true,
|
|
6395
6633
|
"scope": "scripts:read"
|
|
6396
6634
|
},
|
|
6397
6635
|
{
|
|
@@ -6408,23 +6646,26 @@ var OPERATIONS = [
|
|
|
6408
6646
|
},
|
|
6409
6647
|
"mcp": {
|
|
6410
6648
|
"exposed": false,
|
|
6411
|
-
"reason": "Stopping a script the team relies on is a person's decision
|
|
6649
|
+
"reason": "Stopping a script the team relies on is a person's decision. An agent asks a person to."
|
|
6412
6650
|
},
|
|
6413
|
-
"description": "
|
|
6651
|
+
"description": "Restores an archived script. The script comes back to the scripts list, people can run it again, and its schedules and triggers resume. The script owner, a workspace owner or admin, or a workspace API key can restore a script.",
|
|
6414
6652
|
"fields": [
|
|
6415
6653
|
{
|
|
6416
6654
|
"name": "slug",
|
|
6417
6655
|
"in": "path",
|
|
6418
6656
|
"type": "string",
|
|
6419
6657
|
"required": true,
|
|
6658
|
+
"description": "The slug's ID.",
|
|
6420
6659
|
"example": "unlock-account",
|
|
6421
6660
|
"schema": {
|
|
6422
|
-
"type": "string"
|
|
6661
|
+
"type": "string",
|
|
6662
|
+
"description": "The slug's ID."
|
|
6423
6663
|
}
|
|
6424
6664
|
}
|
|
6425
6665
|
],
|
|
6426
6666
|
"hasBody": false,
|
|
6427
6667
|
"workspace": true,
|
|
6668
|
+
"acceptsApiKey": true,
|
|
6428
6669
|
"scope": "scripts:write"
|
|
6429
6670
|
},
|
|
6430
6671
|
{
|
|
@@ -6448,16 +6689,18 @@ var OPERATIONS = [
|
|
|
6448
6689
|
"idempotentHint": false
|
|
6449
6690
|
}
|
|
6450
6691
|
},
|
|
6451
|
-
"description": "Changes
|
|
6692
|
+
"description": "Changes a script's name, description or tags, who can see and run it, and which runs need a person's approval. The script owner, a workspace owner or admin, or a workspace API key can change a script. An agent can't change `access`, `teamIds` or `approvalPolicy`.",
|
|
6452
6693
|
"fields": [
|
|
6453
6694
|
{
|
|
6454
6695
|
"name": "slug",
|
|
6455
6696
|
"in": "path",
|
|
6456
6697
|
"type": "string",
|
|
6457
6698
|
"required": true,
|
|
6699
|
+
"description": "The slug's ID.",
|
|
6458
6700
|
"example": "unlock-account",
|
|
6459
6701
|
"schema": {
|
|
6460
|
-
"type": "string"
|
|
6702
|
+
"type": "string",
|
|
6703
|
+
"description": "The slug's ID."
|
|
6461
6704
|
}
|
|
6462
6705
|
},
|
|
6463
6706
|
{
|
|
@@ -6465,12 +6708,12 @@ var OPERATIONS = [
|
|
|
6465
6708
|
"in": "body",
|
|
6466
6709
|
"type": "string",
|
|
6467
6710
|
"required": false,
|
|
6468
|
-
"description": "
|
|
6711
|
+
"description": "The name people see in the app.",
|
|
6469
6712
|
"schema": {
|
|
6470
6713
|
"type": "string",
|
|
6471
6714
|
"minLength": 1,
|
|
6472
6715
|
"maxLength": 100,
|
|
6473
|
-
"description": "
|
|
6716
|
+
"description": "The name people see in the app."
|
|
6474
6717
|
}
|
|
6475
6718
|
},
|
|
6476
6719
|
{
|
|
@@ -6478,11 +6721,11 @@ var OPERATIONS = [
|
|
|
6478
6721
|
"in": "body",
|
|
6479
6722
|
"type": "string",
|
|
6480
6723
|
"required": false,
|
|
6481
|
-
"description": "What
|
|
6724
|
+
"description": "What the script does, in a sentence or two.",
|
|
6482
6725
|
"schema": {
|
|
6483
6726
|
"type": "string",
|
|
6484
6727
|
"maxLength": 1e3,
|
|
6485
|
-
"description": "What
|
|
6728
|
+
"description": "What the script does, in a sentence or two."
|
|
6486
6729
|
}
|
|
6487
6730
|
},
|
|
6488
6731
|
{
|
|
@@ -6490,14 +6733,14 @@ var OPERATIONS = [
|
|
|
6490
6733
|
"in": "body",
|
|
6491
6734
|
"type": "string",
|
|
6492
6735
|
"required": false,
|
|
6493
|
-
"description": "
|
|
6736
|
+
"description": "Who can see and run the script. With `workspace`, every member can. With `teams`, only members of `teamIds` and workspace owners and admins can.",
|
|
6494
6737
|
"schema": {
|
|
6495
6738
|
"type": "string",
|
|
6496
6739
|
"enum": [
|
|
6497
6740
|
"workspace",
|
|
6498
6741
|
"teams"
|
|
6499
6742
|
],
|
|
6500
|
-
"description": "
|
|
6743
|
+
"description": "Who can see and run the script. With `workspace`, every member can. With `teams`, only members of `teamIds` and workspace owners and admins can."
|
|
6501
6744
|
}
|
|
6502
6745
|
},
|
|
6503
6746
|
{
|
|
@@ -6505,14 +6748,14 @@ var OPERATIONS = [
|
|
|
6505
6748
|
"in": "body",
|
|
6506
6749
|
"type": "json",
|
|
6507
6750
|
"required": false,
|
|
6508
|
-
"description": "With `access: teams
|
|
6751
|
+
"description": "With `access: teams`, the teams whose members can see and run the script.",
|
|
6509
6752
|
"schema": {
|
|
6510
6753
|
"type": "array",
|
|
6511
6754
|
"items": {
|
|
6512
6755
|
"type": "string"
|
|
6513
6756
|
},
|
|
6514
6757
|
"maxItems": 50,
|
|
6515
|
-
"description": "With `access: teams
|
|
6758
|
+
"description": "With `access: teams`, the teams whose members can see and run the script."
|
|
6516
6759
|
}
|
|
6517
6760
|
},
|
|
6518
6761
|
{
|
|
@@ -6520,7 +6763,7 @@ var OPERATIONS = [
|
|
|
6520
6763
|
"in": "body",
|
|
6521
6764
|
"type": "json",
|
|
6522
6765
|
"required": false,
|
|
6523
|
-
"description": "Up to 10
|
|
6766
|
+
"description": "Up to 10 tags, each 1 to 30 lowercase letters, digits and dashes.",
|
|
6524
6767
|
"example": [
|
|
6525
6768
|
"support",
|
|
6526
6769
|
"accounts"
|
|
@@ -6531,7 +6774,7 @@ var OPERATIONS = [
|
|
|
6531
6774
|
"type": "string"
|
|
6532
6775
|
},
|
|
6533
6776
|
"maxItems": 10,
|
|
6534
|
-
"description": "Up to 10
|
|
6777
|
+
"description": "Up to 10 tags, each 1 to 30 lowercase letters, digits and dashes."
|
|
6535
6778
|
}
|
|
6536
6779
|
},
|
|
6537
6780
|
{
|
|
@@ -6539,7 +6782,7 @@ var OPERATIONS = [
|
|
|
6539
6782
|
"in": "body",
|
|
6540
6783
|
"type": "string",
|
|
6541
6784
|
"required": false,
|
|
6542
|
-
"description": "Which runs wait for a person's approval: `none`, `agents`
|
|
6785
|
+
"description": "Which runs wait for a person's approval: `none`, `agents` for runs started with an agent's token, or `always` for every run. A token issued for the MCP server can't change this field, `access` or `teamIds`.",
|
|
6543
6786
|
"schema": {
|
|
6544
6787
|
"type": "string",
|
|
6545
6788
|
"enum": [
|
|
@@ -6547,12 +6790,13 @@ var OPERATIONS = [
|
|
|
6547
6790
|
"agents",
|
|
6548
6791
|
"always"
|
|
6549
6792
|
],
|
|
6550
|
-
"description": "Which runs wait for a person's approval: `none`, `agents`
|
|
6793
|
+
"description": "Which runs wait for a person's approval: `none`, `agents` for runs started with an agent's token, or `always` for every run. A token issued for the MCP server can't change this field, `access` or `teamIds`."
|
|
6551
6794
|
}
|
|
6552
6795
|
}
|
|
6553
6796
|
],
|
|
6554
6797
|
"hasBody": true,
|
|
6555
6798
|
"workspace": true,
|
|
6799
|
+
"acceptsApiKey": true,
|
|
6556
6800
|
"scope": "scripts:write"
|
|
6557
6801
|
},
|
|
6558
6802
|
{
|
|
@@ -6574,10 +6818,11 @@ var OPERATIONS = [
|
|
|
6574
6818
|
"idempotentHint": true
|
|
6575
6819
|
}
|
|
6576
6820
|
},
|
|
6577
|
-
"description": "
|
|
6821
|
+
"description": "Returns how the workspace governs scripts, such as whether publishing needs a second person.",
|
|
6578
6822
|
"fields": [],
|
|
6579
6823
|
"hasBody": false,
|
|
6580
6824
|
"workspace": true,
|
|
6825
|
+
"acceptsApiKey": true,
|
|
6581
6826
|
"scope": "scripts:read"
|
|
6582
6827
|
},
|
|
6583
6828
|
{
|
|
@@ -6594,98 +6839,283 @@ var OPERATIONS = [
|
|
|
6594
6839
|
"exposed": false,
|
|
6595
6840
|
"reason": "Governance settings are a person's to change; an agent must not loosen them"
|
|
6596
6841
|
},
|
|
6597
|
-
"description": "Workspace owners and admins,
|
|
6842
|
+
"description": "Changes how the workspace governs scripts. Workspace owners and admins can change these settings, and so can a workspace API key. Turning on second-person publishing needs the Business plan.",
|
|
6598
6843
|
"fields": [
|
|
6599
6844
|
{
|
|
6600
6845
|
"name": "publishNeedsSecondPerson",
|
|
6601
6846
|
"in": "body",
|
|
6602
6847
|
"type": "boolean",
|
|
6603
6848
|
"required": false,
|
|
6604
|
-
"description": "
|
|
6849
|
+
"description": "Whether publishing needs a second person. When it's on, each publish becomes a request. Another owner or admin, not the person who asked, approves it.",
|
|
6850
|
+
"example": false,
|
|
6605
6851
|
"schema": {
|
|
6606
6852
|
"type": "boolean",
|
|
6607
|
-
"description": "
|
|
6853
|
+
"description": "Whether publishing needs a second person. When it's on, each publish becomes a request. Another owner or admin, not the person who asked, approves it."
|
|
6608
6854
|
}
|
|
6609
6855
|
}
|
|
6610
6856
|
],
|
|
6611
6857
|
"hasBody": true,
|
|
6612
6858
|
"workspace": true,
|
|
6859
|
+
"acceptsApiKey": true,
|
|
6613
6860
|
"scope": "scripts:write"
|
|
6614
6861
|
},
|
|
6615
6862
|
{
|
|
6616
|
-
"operationId": "scriptVersions.
|
|
6617
|
-
"method": "
|
|
6863
|
+
"operationId": "scriptVersions.list",
|
|
6864
|
+
"method": "get",
|
|
6618
6865
|
"path": "/scripts/{slug}/versions",
|
|
6619
|
-
"summary": "
|
|
6866
|
+
"summary": "List a script's versions",
|
|
6620
6867
|
"cli": {
|
|
6621
|
-
"command": "script-versions
|
|
6868
|
+
"command": "script-versions list",
|
|
6622
6869
|
"args": [
|
|
6623
6870
|
"slug"
|
|
6624
6871
|
],
|
|
6625
|
-
"confirm": false
|
|
6626
|
-
"shortcut": "publish --draft [dir...]"
|
|
6872
|
+
"confirm": false
|
|
6627
6873
|
},
|
|
6628
6874
|
"mcp": {
|
|
6629
6875
|
"exposed": true,
|
|
6630
|
-
"name": "
|
|
6876
|
+
"name": "script_versions_list",
|
|
6631
6877
|
"hints": {
|
|
6632
|
-
"readOnlyHint":
|
|
6878
|
+
"readOnlyHint": true,
|
|
6633
6879
|
"destructiveHint": false,
|
|
6634
|
-
"idempotentHint":
|
|
6880
|
+
"idempotentHint": true
|
|
6635
6881
|
}
|
|
6636
6882
|
},
|
|
6637
|
-
"description": "
|
|
6883
|
+
"description": "Lists every version of a script, newest first, and marks the published one.",
|
|
6638
6884
|
"fields": [
|
|
6639
6885
|
{
|
|
6640
6886
|
"name": "slug",
|
|
6641
6887
|
"in": "path",
|
|
6642
6888
|
"type": "string",
|
|
6643
6889
|
"required": true,
|
|
6890
|
+
"description": "The slug's ID.",
|
|
6644
6891
|
"example": "unlock-account",
|
|
6645
6892
|
"schema": {
|
|
6646
|
-
"type": "string"
|
|
6893
|
+
"type": "string",
|
|
6894
|
+
"description": "The slug's ID."
|
|
6647
6895
|
}
|
|
6648
|
-
}
|
|
6896
|
+
}
|
|
6897
|
+
],
|
|
6898
|
+
"hasBody": false,
|
|
6899
|
+
"workspace": true,
|
|
6900
|
+
"acceptsApiKey": true,
|
|
6901
|
+
"scope": "scripts:read"
|
|
6902
|
+
},
|
|
6903
|
+
{
|
|
6904
|
+
"operationId": "scriptVersions.publish",
|
|
6905
|
+
"method": "post",
|
|
6906
|
+
"path": "/scripts/{slug}/versions/{version}/publish",
|
|
6907
|
+
"summary": "Publish a version",
|
|
6908
|
+
"cli": {
|
|
6909
|
+
"command": "script-versions publish",
|
|
6910
|
+
"args": [
|
|
6911
|
+
"slug",
|
|
6912
|
+
"version"
|
|
6913
|
+
],
|
|
6914
|
+
"confirm": false
|
|
6915
|
+
},
|
|
6916
|
+
"mcp": {
|
|
6917
|
+
"exposed": true,
|
|
6918
|
+
"name": "script_versions_publish",
|
|
6919
|
+
"hints": {
|
|
6920
|
+
"readOnlyHint": false,
|
|
6921
|
+
"destructiveHint": false,
|
|
6922
|
+
"idempotentHint": false
|
|
6923
|
+
}
|
|
6924
|
+
},
|
|
6925
|
+
"description": "Makes a version the one every run of the script uses, however the run starts. Publishing an older version again rolls the script back. The script owner or a workspace owner or admin can publish. An agent's publish becomes a request that a person approves, and the call returns 202. If the workspace requires a second person to publish, everyone's publish becomes a request like this.",
|
|
6926
|
+
"fields": [
|
|
6649
6927
|
{
|
|
6650
|
-
"name": "
|
|
6651
|
-
"in": "
|
|
6928
|
+
"name": "slug",
|
|
6929
|
+
"in": "path",
|
|
6652
6930
|
"type": "string",
|
|
6653
|
-
"required":
|
|
6654
|
-
"description": "
|
|
6655
|
-
"example": "
|
|
6931
|
+
"required": true,
|
|
6932
|
+
"description": "The slug's ID.",
|
|
6933
|
+
"example": "unlock-account",
|
|
6656
6934
|
"schema": {
|
|
6657
6935
|
"type": "string",
|
|
6658
|
-
"
|
|
6659
|
-
"maxLength": 2e3,
|
|
6660
|
-
"description": "What a run executes. `{name}` is an input; `[ \u2026 ]` is left out when its inputs are empty. Run as arguments, never through a shell. Omitted: worked out from the folder, or a 400 saying what to add."
|
|
6936
|
+
"description": "The slug's ID."
|
|
6661
6937
|
}
|
|
6662
6938
|
},
|
|
6663
6939
|
{
|
|
6664
|
-
"name": "
|
|
6665
|
-
"in": "
|
|
6666
|
-
"type": "
|
|
6667
|
-
"required":
|
|
6668
|
-
"description": "
|
|
6669
|
-
"example":
|
|
6940
|
+
"name": "version",
|
|
6941
|
+
"in": "path",
|
|
6942
|
+
"type": "number",
|
|
6943
|
+
"required": true,
|
|
6944
|
+
"description": "The version's ID.",
|
|
6945
|
+
"example": 3,
|
|
6670
6946
|
"schema": {
|
|
6671
|
-
"type":
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
],
|
|
6675
|
-
"maxLength": 2e3,
|
|
6676
|
-
"description": "Replaces the usual install (requirements.txt, else pyproject.toml, into .deps; package.json with npm). Runs in the folder with the package registries reachable."
|
|
6947
|
+
"type": "integer",
|
|
6948
|
+
"minimum": 1,
|
|
6949
|
+
"description": "The version's ID."
|
|
6677
6950
|
}
|
|
6678
|
-
}
|
|
6951
|
+
}
|
|
6952
|
+
],
|
|
6953
|
+
"hasBody": false,
|
|
6954
|
+
"workspace": true,
|
|
6955
|
+
"acceptsApiKey": false,
|
|
6956
|
+
"scope": "scripts:write"
|
|
6957
|
+
},
|
|
6958
|
+
{
|
|
6959
|
+
"operationId": "scriptVersions.testRun",
|
|
6960
|
+
"method": "post",
|
|
6961
|
+
"path": "/scripts/{slug}/versions/{version}/runs",
|
|
6962
|
+
"summary": "Test-run a version",
|
|
6963
|
+
"cli": {
|
|
6964
|
+
"command": "script-versions test-run",
|
|
6965
|
+
"args": [
|
|
6966
|
+
"slug",
|
|
6967
|
+
"version"
|
|
6968
|
+
],
|
|
6969
|
+
"confirm": false
|
|
6970
|
+
},
|
|
6971
|
+
"mcp": {
|
|
6972
|
+
"exposed": true,
|
|
6973
|
+
"name": "script_versions_test_run",
|
|
6974
|
+
"hints": {
|
|
6975
|
+
"readOnlyHint": false,
|
|
6976
|
+
"destructiveHint": false,
|
|
6977
|
+
"idempotentHint": false
|
|
6978
|
+
}
|
|
6979
|
+
},
|
|
6980
|
+
"description": "Test-runs one version of a script with these inputs, such as a draft before it's published. Reminix records a test run with `test: true` and leaves it out of the script's stats. A test run sends no run events, so no webhooks or triggers fire. The version's uploader, the script owner, a workspace owner or admin, or a workspace API key can test-run a version. The script's approval policy still applies. Use a test run to prove a draft works before asking a person to publish it.",
|
|
6981
|
+
"fields": [
|
|
6679
6982
|
{
|
|
6680
|
-
"name": "
|
|
6681
|
-
"in": "
|
|
6983
|
+
"name": "slug",
|
|
6984
|
+
"in": "path",
|
|
6985
|
+
"type": "string",
|
|
6986
|
+
"required": true,
|
|
6987
|
+
"description": "The slug's ID.",
|
|
6988
|
+
"example": "unlock-account",
|
|
6989
|
+
"schema": {
|
|
6990
|
+
"type": "string",
|
|
6991
|
+
"description": "The slug's ID."
|
|
6992
|
+
}
|
|
6993
|
+
},
|
|
6994
|
+
{
|
|
6995
|
+
"name": "version",
|
|
6996
|
+
"in": "path",
|
|
6997
|
+
"type": "number",
|
|
6998
|
+
"required": true,
|
|
6999
|
+
"description": "The version's ID.",
|
|
7000
|
+
"example": 3,
|
|
7001
|
+
"schema": {
|
|
7002
|
+
"type": "integer",
|
|
7003
|
+
"minimum": 1,
|
|
7004
|
+
"description": "The version's ID."
|
|
7005
|
+
}
|
|
7006
|
+
},
|
|
7007
|
+
{
|
|
7008
|
+
"name": "inputs",
|
|
7009
|
+
"in": "body",
|
|
7010
|
+
"type": "json",
|
|
7011
|
+
"required": false,
|
|
7012
|
+
"description": "The script's inputs, by name. The default is no inputs.",
|
|
7013
|
+
"example": {
|
|
7014
|
+
"email": "jane@example.com"
|
|
7015
|
+
},
|
|
7016
|
+
"schema": {
|
|
7017
|
+
"type": "object",
|
|
7018
|
+
"additionalProperties": {},
|
|
7019
|
+
"default": {},
|
|
7020
|
+
"description": "The script's inputs, by name. The default is no inputs."
|
|
7021
|
+
}
|
|
7022
|
+
},
|
|
7023
|
+
{
|
|
7024
|
+
"name": "via",
|
|
7025
|
+
"in": "body",
|
|
7026
|
+
"type": "string",
|
|
7027
|
+
"required": false,
|
|
7028
|
+
"description": "Where the run came from, for the history. The default is `api`. Reminix records an agent's runs as `agent` whatever this says.",
|
|
7029
|
+
"schema": {
|
|
7030
|
+
"type": "string",
|
|
7031
|
+
"enum": [
|
|
7032
|
+
"api",
|
|
7033
|
+
"cli"
|
|
7034
|
+
],
|
|
7035
|
+
"description": "Where the run came from, for the history. The default is `api`. Reminix records an agent's runs as `agent` whatever this says."
|
|
7036
|
+
}
|
|
7037
|
+
}
|
|
7038
|
+
],
|
|
7039
|
+
"hasBody": true,
|
|
7040
|
+
"workspace": true,
|
|
7041
|
+
"acceptsApiKey": true,
|
|
7042
|
+
"scope": "runs:write"
|
|
7043
|
+
},
|
|
7044
|
+
{
|
|
7045
|
+
"operationId": "scriptVersions.upload",
|
|
7046
|
+
"method": "post",
|
|
7047
|
+
"path": "/scripts/{slug}/versions",
|
|
7048
|
+
"summary": "Upload a version",
|
|
7049
|
+
"cli": {
|
|
7050
|
+
"command": "script-versions upload",
|
|
7051
|
+
"args": [
|
|
7052
|
+
"slug"
|
|
7053
|
+
],
|
|
7054
|
+
"confirm": false,
|
|
7055
|
+
"shortcut": "upload [dir...]"
|
|
7056
|
+
},
|
|
7057
|
+
"mcp": {
|
|
7058
|
+
"exposed": true,
|
|
7059
|
+
"name": "script_versions_upload",
|
|
7060
|
+
"hints": {
|
|
7061
|
+
"readOnlyHint": false,
|
|
7062
|
+
"destructiveHint": false,
|
|
7063
|
+
"idempotentHint": false
|
|
7064
|
+
}
|
|
7065
|
+
},
|
|
7066
|
+
"description": "Uploads a new draft version of a script. Send the version's source, the command that runs it and the JSON Schema of its inputs. The source is the script's folder as a .tar.gz file in base64, and the CLI makes it for you. If you leave out the command, Reminix works it out from the folder: the one script in pyproject.toml, the `bin`, `start` or `main` in package.json, or the folder's one .py, .js, .ts or .sh file. If you leave out the input schema, each `{name}` in the command becomes a text input. If you leave out the README, Reminix uses the folder's README.md. Reminix installs the dependencies from requirements.txt, pyproject.toml or package.json once, during the upload. If the install fails, the request returns 400 with what the install printed. Runs keep using the published version until you publish this one. To upload and publish in one call, pass `publish: true`, and add `create: true` for a new script.",
|
|
7067
|
+
"fields": [
|
|
7068
|
+
{
|
|
7069
|
+
"name": "slug",
|
|
7070
|
+
"in": "path",
|
|
7071
|
+
"type": "string",
|
|
7072
|
+
"required": true,
|
|
7073
|
+
"description": "The slug's ID.",
|
|
7074
|
+
"example": "unlock-account",
|
|
7075
|
+
"schema": {
|
|
7076
|
+
"type": "string",
|
|
7077
|
+
"description": "The slug's ID."
|
|
7078
|
+
}
|
|
7079
|
+
},
|
|
7080
|
+
{
|
|
7081
|
+
"name": "command",
|
|
7082
|
+
"in": "body",
|
|
7083
|
+
"type": "string",
|
|
7084
|
+
"required": false,
|
|
7085
|
+
"description": "The command a run executes. Each `{name}` in it is an input, and Reminix drops a part inside `[ \u2026 ]` when its inputs are empty. Reminix runs the command as arguments, never through a shell. If you leave it out, Reminix works it out from the folder, or returns 400 saying what to add.",
|
|
7086
|
+
"example": "python unlock.py {email}",
|
|
7087
|
+
"schema": {
|
|
7088
|
+
"type": "string",
|
|
7089
|
+
"minLength": 1,
|
|
7090
|
+
"maxLength": 2e3,
|
|
7091
|
+
"description": "The command a run executes. Each `{name}` in it is an input, and Reminix drops a part inside `[ \u2026 ]` when its inputs are empty. Reminix runs the command as arguments, never through a shell. If you leave it out, Reminix works it out from the folder, or returns 400 saying what to add."
|
|
7092
|
+
}
|
|
7093
|
+
},
|
|
7094
|
+
{
|
|
7095
|
+
"name": "install",
|
|
7096
|
+
"in": "body",
|
|
7097
|
+
"type": "string",
|
|
7098
|
+
"required": false,
|
|
7099
|
+
"description": "A command that replaces the usual install. The usual install puts Python packages from requirements.txt, or else pyproject.toml, into .deps, and installs package.json with npm. Your command runs in the folder, and it can reach the package registries.",
|
|
7100
|
+
"schema": {
|
|
7101
|
+
"type": [
|
|
7102
|
+
"string",
|
|
7103
|
+
"null"
|
|
7104
|
+
],
|
|
7105
|
+
"maxLength": 2e3,
|
|
7106
|
+
"description": "A command that replaces the usual install. The usual install puts Python packages from requirements.txt, or else pyproject.toml, into .deps, and installs package.json with npm. Your command runs in the folder, and it can reach the package registries."
|
|
7107
|
+
}
|
|
7108
|
+
},
|
|
7109
|
+
{
|
|
7110
|
+
"name": "inputSchema",
|
|
7111
|
+
"in": "body",
|
|
6682
7112
|
"type": "json",
|
|
6683
7113
|
"required": false,
|
|
6684
|
-
"description": "The inputs, as JSON Schema.
|
|
7114
|
+
"description": "The inputs, as JSON Schema. If you leave it out, each `{name}` in the command becomes a required text input, or an optional one inside `[ \u2026 ]`.",
|
|
6685
7115
|
"schema": {
|
|
6686
7116
|
"type": "object",
|
|
6687
7117
|
"additionalProperties": {},
|
|
6688
|
-
"description": "The inputs, as JSON Schema.
|
|
7118
|
+
"description": "The inputs, as JSON Schema. If you leave it out, each `{name}` in the command becomes a required text input, or an optional one inside `[ \u2026 ]`."
|
|
6689
7119
|
}
|
|
6690
7120
|
},
|
|
6691
7121
|
{
|
|
@@ -6693,25 +7123,26 @@ var OPERATIONS = [
|
|
|
6693
7123
|
"in": "body",
|
|
6694
7124
|
"type": "json",
|
|
6695
7125
|
"required": false,
|
|
6696
|
-
"description": "
|
|
7126
|
+
"description": "What the script returns on standard output, as JSON Schema.",
|
|
6697
7127
|
"schema": {
|
|
6698
7128
|
"type": [
|
|
6699
7129
|
"object",
|
|
6700
7130
|
"null"
|
|
6701
7131
|
],
|
|
6702
7132
|
"additionalProperties": {},
|
|
6703
|
-
"description": "
|
|
7133
|
+
"description": "What the script returns on standard output, as JSON Schema."
|
|
6704
7134
|
}
|
|
6705
7135
|
},
|
|
6706
7136
|
{
|
|
6707
|
-
"name": "
|
|
7137
|
+
"name": "source",
|
|
6708
7138
|
"in": "body",
|
|
6709
7139
|
"type": "string",
|
|
6710
7140
|
"required": true,
|
|
6711
|
-
"description": "The script's folder as a .tar.gz
|
|
7141
|
+
"description": "The script's folder as a .tar.gz file in base64, at most 10 MB. Leave out its dependencies, because Reminix installs them during the upload.",
|
|
7142
|
+
"example": "H4sIAAAAAAAAA\u2026",
|
|
6712
7143
|
"schema": {
|
|
6713
7144
|
"type": "string",
|
|
6714
|
-
"description": "The script's folder as a .tar.gz
|
|
7145
|
+
"description": "The script's folder as a .tar.gz file in base64, at most 10 MB. Leave out its dependencies, because Reminix installs them during the upload."
|
|
6715
7146
|
}
|
|
6716
7147
|
},
|
|
6717
7148
|
{
|
|
@@ -6719,7 +7150,7 @@ var OPERATIONS = [
|
|
|
6719
7150
|
"in": "body",
|
|
6720
7151
|
"type": "json",
|
|
6721
7152
|
"required": false,
|
|
6722
|
-
"description": "The only hosts the script
|
|
7153
|
+
"description": "The only hosts the script can reach, over HTTPS. If you leave it out, the script has no network access.",
|
|
6723
7154
|
"example": [
|
|
6724
7155
|
"api.yourapp.com"
|
|
6725
7156
|
],
|
|
@@ -6728,7 +7159,7 @@ var OPERATIONS = [
|
|
|
6728
7159
|
"items": {
|
|
6729
7160
|
"type": "string"
|
|
6730
7161
|
},
|
|
6731
|
-
"description": "The only hosts the script
|
|
7162
|
+
"description": "The only hosts the script can reach, over HTTPS. If you leave it out, the script has no network access."
|
|
6732
7163
|
}
|
|
6733
7164
|
},
|
|
6734
7165
|
{
|
|
@@ -6736,7 +7167,14 @@ var OPERATIONS = [
|
|
|
6736
7167
|
"in": "body",
|
|
6737
7168
|
"type": "json",
|
|
6738
7169
|
"required": false,
|
|
6739
|
-
"description": "
|
|
7170
|
+
"description": "The secrets to attach to requests to some of `hosts`, by name. In each environment, the secret's value must allow at least one of those hosts.",
|
|
7171
|
+
"example": {
|
|
7172
|
+
"ADMIN_KEY": {
|
|
7173
|
+
"host": "api.yourapp.com",
|
|
7174
|
+
"header": "Authorization",
|
|
7175
|
+
"format": "Bearer {secret}"
|
|
7176
|
+
}
|
|
7177
|
+
},
|
|
6740
7178
|
"schema": {
|
|
6741
7179
|
"type": "object",
|
|
6742
7180
|
"additionalProperties": {
|
|
@@ -6747,7 +7185,7 @@ var OPERATIONS = [
|
|
|
6747
7185
|
"items": {
|
|
6748
7186
|
"type": "string"
|
|
6749
7187
|
},
|
|
6750
|
-
"description": "
|
|
7188
|
+
"description": "Which of the version's hosts get the secret. A run attaches it only to those that the secret's value in the run's environment allows."
|
|
6751
7189
|
},
|
|
6752
7190
|
"host": {
|
|
6753
7191
|
"type": "string",
|
|
@@ -6756,44 +7194,44 @@ var OPERATIONS = [
|
|
|
6756
7194
|
"header": {
|
|
6757
7195
|
"type": "string"
|
|
6758
7196
|
},
|
|
6759
|
-
"
|
|
7197
|
+
"format": {
|
|
6760
7198
|
"type": "string",
|
|
6761
|
-
"description": "The header's value
|
|
7199
|
+
"description": "The header's value, with `{secret}` where the secret goes. Default: `{secret}`."
|
|
6762
7200
|
}
|
|
6763
7201
|
},
|
|
6764
7202
|
"required": [
|
|
6765
7203
|
"header"
|
|
6766
7204
|
]
|
|
6767
7205
|
},
|
|
6768
|
-
"description": "
|
|
7206
|
+
"description": "The secrets to attach to requests to some of `hosts`, by name. In each environment, the secret's value must allow at least one of those hosts."
|
|
6769
7207
|
}
|
|
6770
7208
|
},
|
|
6771
7209
|
{
|
|
6772
|
-
"name": "
|
|
7210
|
+
"name": "envVars",
|
|
6773
7211
|
"in": "body",
|
|
6774
7212
|
"type": "json",
|
|
6775
7213
|
"required": false,
|
|
6776
|
-
"description": "Secrets the script reads as environment variables
|
|
7214
|
+
"description": "Secrets the script reads as environment variables. Each secret must allow this with `allowEnvVar`.",
|
|
6777
7215
|
"schema": {
|
|
6778
7216
|
"type": "array",
|
|
6779
7217
|
"items": {
|
|
6780
7218
|
"type": "string"
|
|
6781
7219
|
},
|
|
6782
|
-
"description": "Secrets the script reads as environment variables
|
|
7220
|
+
"description": "Secrets the script reads as environment variables. Each secret must allow this with `allowEnvVar`."
|
|
6783
7221
|
}
|
|
6784
7222
|
},
|
|
6785
7223
|
{
|
|
6786
|
-
"name": "
|
|
7224
|
+
"name": "timeoutSeconds",
|
|
6787
7225
|
"in": "body",
|
|
6788
7226
|
"type": "number",
|
|
6789
7227
|
"required": false,
|
|
6790
|
-
"description": "
|
|
6791
|
-
"example":
|
|
7228
|
+
"description": "How long a run can take, in seconds. The default is 30. With more than 30, the script's runs are long runs. A long run returns 202 at once. It shows a live log and progress, and you can cancel it. Long runs need the Pro plan or above.",
|
|
7229
|
+
"example": 30,
|
|
6792
7230
|
"schema": {
|
|
6793
7231
|
"type": "integer",
|
|
6794
7232
|
"minimum": 1,
|
|
6795
7233
|
"maximum": 900,
|
|
6796
|
-
"description": "
|
|
7234
|
+
"description": "How long a run can take, in seconds. The default is 30. With more than 30, the script's runs are long runs. A long run returns 202 at once. It shows a live log and progress, and you can cancel it. Long runs need the Pro plan or above."
|
|
6797
7235
|
}
|
|
6798
7236
|
},
|
|
6799
7237
|
{
|
|
@@ -6801,14 +7239,14 @@ var OPERATIONS = [
|
|
|
6801
7239
|
"in": "body",
|
|
6802
7240
|
"type": "string",
|
|
6803
7241
|
"required": false,
|
|
6804
|
-
"description": "README
|
|
7242
|
+
"description": "The README, in Markdown. The script's page shows it while this version is the published one.",
|
|
6805
7243
|
"schema": {
|
|
6806
7244
|
"type": [
|
|
6807
7245
|
"string",
|
|
6808
7246
|
"null"
|
|
6809
7247
|
],
|
|
6810
7248
|
"maxLength": 1e5,
|
|
6811
|
-
"description": "README
|
|
7249
|
+
"description": "The README, in Markdown. The script's page shows it while this version is the published one."
|
|
6812
7250
|
}
|
|
6813
7251
|
},
|
|
6814
7252
|
{
|
|
@@ -6816,7 +7254,7 @@ var OPERATIONS = [
|
|
|
6816
7254
|
"in": "body",
|
|
6817
7255
|
"type": "json",
|
|
6818
7256
|
"required": false,
|
|
6819
|
-
"description": "
|
|
7257
|
+
"description": "If given, these become the script's tags.",
|
|
6820
7258
|
"example": [
|
|
6821
7259
|
"support",
|
|
6822
7260
|
"accounts"
|
|
@@ -6827,7 +7265,7 @@ var OPERATIONS = [
|
|
|
6827
7265
|
"type": "string"
|
|
6828
7266
|
},
|
|
6829
7267
|
"maxItems": 10,
|
|
6830
|
-
"description": "
|
|
7268
|
+
"description": "If given, these become the script's tags."
|
|
6831
7269
|
}
|
|
6832
7270
|
},
|
|
6833
7271
|
{
|
|
@@ -6835,7 +7273,7 @@ var OPERATIONS = [
|
|
|
6835
7273
|
"in": "body",
|
|
6836
7274
|
"type": "string",
|
|
6837
7275
|
"required": false,
|
|
6838
|
-
"description": "
|
|
7276
|
+
"description": "Where the upload came from, kept in the history. The default is `api`.",
|
|
6839
7277
|
"schema": {
|
|
6840
7278
|
"type": "string",
|
|
6841
7279
|
"enum": [
|
|
@@ -6843,7 +7281,7 @@ var OPERATIONS = [
|
|
|
6843
7281
|
"api",
|
|
6844
7282
|
"app"
|
|
6845
7283
|
],
|
|
6846
|
-
"description": "
|
|
7284
|
+
"description": "Where the upload came from, kept in the history. The default is `api`."
|
|
6847
7285
|
}
|
|
6848
7286
|
},
|
|
6849
7287
|
{
|
|
@@ -6851,10 +7289,10 @@ var OPERATIONS = [
|
|
|
6851
7289
|
"in": "body",
|
|
6852
7290
|
"type": "boolean",
|
|
6853
7291
|
"required": false,
|
|
6854
|
-
"description": "
|
|
7292
|
+
"description": "With `true`, creates the script if no script has this slug. The new script's name comes from `name` if you send one. Otherwise it comes from pyproject.toml or package.json, or else from the slug. By default an unknown slug returns 404 instead, which keeps a typo from creating a script.",
|
|
6855
7293
|
"schema": {
|
|
6856
7294
|
"type": "boolean",
|
|
6857
|
-
"description": "
|
|
7295
|
+
"description": "With `true`, creates the script if no script has this slug. The new script's name comes from `name` if you send one. Otherwise it comes from pyproject.toml or package.json, or else from the slug. By default an unknown slug returns 404 instead, which keeps a typo from creating a script."
|
|
6858
7296
|
}
|
|
6859
7297
|
},
|
|
6860
7298
|
{
|
|
@@ -6862,13 +7300,13 @@ var OPERATIONS = [
|
|
|
6862
7300
|
"in": "body",
|
|
6863
7301
|
"type": "string",
|
|
6864
7302
|
"required": false,
|
|
6865
|
-
"description": "
|
|
6866
|
-
"example": "Unlock account",
|
|
7303
|
+
"description": "If given, this becomes the script's name. It applies to every upload that sends it.",
|
|
7304
|
+
"example": "Unlock an account",
|
|
6867
7305
|
"schema": {
|
|
6868
7306
|
"type": "string",
|
|
6869
7307
|
"minLength": 1,
|
|
6870
7308
|
"maxLength": 100,
|
|
6871
|
-
"description": "
|
|
7309
|
+
"description": "If given, this becomes the script's name. It applies to every upload that sends it."
|
|
6872
7310
|
}
|
|
6873
7311
|
},
|
|
6874
7312
|
{
|
|
@@ -6876,11 +7314,11 @@ var OPERATIONS = [
|
|
|
6876
7314
|
"in": "body",
|
|
6877
7315
|
"type": "string",
|
|
6878
7316
|
"required": false,
|
|
6879
|
-
"description": "
|
|
7317
|
+
"description": "If given, this becomes the script's description, in the same way as `name`.",
|
|
6880
7318
|
"schema": {
|
|
6881
7319
|
"type": "string",
|
|
6882
7320
|
"maxLength": 500,
|
|
6883
|
-
"description": "
|
|
7321
|
+
"description": "If given, this becomes the script's description, in the same way as `name`."
|
|
6884
7322
|
}
|
|
6885
7323
|
},
|
|
6886
7324
|
{
|
|
@@ -6888,186 +7326,18 @@ var OPERATIONS = [
|
|
|
6888
7326
|
"in": "body",
|
|
6889
7327
|
"type": "boolean",
|
|
6890
7328
|
"required": false,
|
|
6891
|
-
"description":
|
|
7329
|
+
"description": "With `true`, also publishes this version in the same call, exactly as Publish a version does. If publishing needs a person's approval, the response carries `approval`, and Reminix publishes the version once a person approves it.",
|
|
6892
7330
|
"schema": {
|
|
6893
7331
|
"type": "boolean",
|
|
6894
|
-
"description":
|
|
7332
|
+
"description": "With `true`, also publishes this version in the same call, exactly as Publish a version does. If publishing needs a person's approval, the response carries `approval`, and Reminix publishes the version once a person approves it."
|
|
6895
7333
|
}
|
|
6896
7334
|
}
|
|
6897
7335
|
],
|
|
6898
7336
|
"hasBody": true,
|
|
6899
7337
|
"workspace": true,
|
|
7338
|
+
"acceptsApiKey": false,
|
|
6900
7339
|
"scope": "scripts:write"
|
|
6901
7340
|
},
|
|
6902
|
-
{
|
|
6903
|
-
"operationId": "scriptVersions.list",
|
|
6904
|
-
"method": "get",
|
|
6905
|
-
"path": "/scripts/{slug}/versions",
|
|
6906
|
-
"summary": "List a script's versions",
|
|
6907
|
-
"cli": {
|
|
6908
|
-
"command": "script-versions list",
|
|
6909
|
-
"args": [
|
|
6910
|
-
"slug"
|
|
6911
|
-
],
|
|
6912
|
-
"confirm": false
|
|
6913
|
-
},
|
|
6914
|
-
"mcp": {
|
|
6915
|
-
"exposed": true,
|
|
6916
|
-
"name": "script_versions_list",
|
|
6917
|
-
"hints": {
|
|
6918
|
-
"readOnlyHint": true,
|
|
6919
|
-
"destructiveHint": false,
|
|
6920
|
-
"idempotentHint": true
|
|
6921
|
-
}
|
|
6922
|
-
},
|
|
6923
|
-
"description": "Every version, newest first, and which one is published.",
|
|
6924
|
-
"fields": [
|
|
6925
|
-
{
|
|
6926
|
-
"name": "slug",
|
|
6927
|
-
"in": "path",
|
|
6928
|
-
"type": "string",
|
|
6929
|
-
"required": true,
|
|
6930
|
-
"example": "unlock-account",
|
|
6931
|
-
"schema": {
|
|
6932
|
-
"type": "string"
|
|
6933
|
-
}
|
|
6934
|
-
}
|
|
6935
|
-
],
|
|
6936
|
-
"hasBody": false,
|
|
6937
|
-
"workspace": true,
|
|
6938
|
-
"scope": "scripts:read"
|
|
6939
|
-
},
|
|
6940
|
-
{
|
|
6941
|
-
"operationId": "scriptVersions.publish",
|
|
6942
|
-
"method": "post",
|
|
6943
|
-
"path": "/scripts/{slug}/versions/{number}/publish",
|
|
6944
|
-
"summary": "Publish a version",
|
|
6945
|
-
"cli": {
|
|
6946
|
-
"command": "script-versions publish",
|
|
6947
|
-
"args": [
|
|
6948
|
-
"slug",
|
|
6949
|
-
"number"
|
|
6950
|
-
],
|
|
6951
|
-
"confirm": false
|
|
6952
|
-
},
|
|
6953
|
-
"mcp": {
|
|
6954
|
-
"exposed": true,
|
|
6955
|
-
"name": "script_versions_publish",
|
|
6956
|
-
"hints": {
|
|
6957
|
-
"readOnlyHint": false,
|
|
6958
|
-
"destructiveHint": false,
|
|
6959
|
-
"idempotentHint": false
|
|
6960
|
-
}
|
|
6961
|
-
},
|
|
6962
|
-
"description": "Makes this version the one every run uses \u2014 from the app, the API, agents and schedules. Publishing an older version again rolls back. The script's owner, or a workspace owner or admin. An agent's publish (and anyone's, when the workspace requires a second person) becomes a request a person approves \u2014 answered 202.",
|
|
6963
|
-
"fields": [
|
|
6964
|
-
{
|
|
6965
|
-
"name": "slug",
|
|
6966
|
-
"in": "path",
|
|
6967
|
-
"type": "string",
|
|
6968
|
-
"required": true,
|
|
6969
|
-
"example": "unlock-account",
|
|
6970
|
-
"schema": {
|
|
6971
|
-
"type": "string"
|
|
6972
|
-
}
|
|
6973
|
-
},
|
|
6974
|
-
{
|
|
6975
|
-
"name": "number",
|
|
6976
|
-
"in": "path",
|
|
6977
|
-
"type": "number",
|
|
6978
|
-
"required": true,
|
|
6979
|
-
"example": 3,
|
|
6980
|
-
"schema": {
|
|
6981
|
-
"type": "integer",
|
|
6982
|
-
"minimum": 1
|
|
6983
|
-
}
|
|
6984
|
-
}
|
|
6985
|
-
],
|
|
6986
|
-
"hasBody": false,
|
|
6987
|
-
"workspace": true,
|
|
6988
|
-
"scope": "scripts:write"
|
|
6989
|
-
},
|
|
6990
|
-
{
|
|
6991
|
-
"operationId": "scriptVersions.run",
|
|
6992
|
-
"method": "post",
|
|
6993
|
-
"path": "/scripts/{slug}/versions/{number}/runs",
|
|
6994
|
-
"summary": "Test-run a version",
|
|
6995
|
-
"cli": {
|
|
6996
|
-
"command": "script-versions run",
|
|
6997
|
-
"args": [
|
|
6998
|
-
"slug",
|
|
6999
|
-
"number"
|
|
7000
|
-
],
|
|
7001
|
-
"confirm": false
|
|
7002
|
-
},
|
|
7003
|
-
"mcp": {
|
|
7004
|
-
"exposed": true,
|
|
7005
|
-
"name": "script_versions_run",
|
|
7006
|
-
"hints": {
|
|
7007
|
-
"readOnlyHint": false,
|
|
7008
|
-
"destructiveHint": false,
|
|
7009
|
-
"idempotentHint": false
|
|
7010
|
-
}
|
|
7011
|
-
},
|
|
7012
|
-
"description": "Runs one VERSION \u2014 a draft before publishing \u2014 with these inputs, as a test run: recorded with `test: true`, not counted as the script's use, and without run events (no webhooks, no triggers). For the version's uploader, the script's owner, or an owner or admin; the script's approval policy still applies. Prove a draft works before asking a person to publish it.",
|
|
7013
|
-
"fields": [
|
|
7014
|
-
{
|
|
7015
|
-
"name": "slug",
|
|
7016
|
-
"in": "path",
|
|
7017
|
-
"type": "string",
|
|
7018
|
-
"required": true,
|
|
7019
|
-
"example": "unlock-account",
|
|
7020
|
-
"schema": {
|
|
7021
|
-
"type": "string"
|
|
7022
|
-
}
|
|
7023
|
-
},
|
|
7024
|
-
{
|
|
7025
|
-
"name": "number",
|
|
7026
|
-
"in": "path",
|
|
7027
|
-
"type": "number",
|
|
7028
|
-
"required": true,
|
|
7029
|
-
"example": 2,
|
|
7030
|
-
"schema": {
|
|
7031
|
-
"type": "integer",
|
|
7032
|
-
"minimum": 1
|
|
7033
|
-
}
|
|
7034
|
-
},
|
|
7035
|
-
{
|
|
7036
|
-
"name": "inputs",
|
|
7037
|
-
"in": "body",
|
|
7038
|
-
"type": "json",
|
|
7039
|
-
"required": false,
|
|
7040
|
-
"description": "The script's inputs, by name. Default: none.",
|
|
7041
|
-
"example": {
|
|
7042
|
-
"email": "jane@example.com"
|
|
7043
|
-
},
|
|
7044
|
-
"schema": {
|
|
7045
|
-
"type": "object",
|
|
7046
|
-
"additionalProperties": {},
|
|
7047
|
-
"default": {},
|
|
7048
|
-
"description": "The script's inputs, by name. Default: none."
|
|
7049
|
-
}
|
|
7050
|
-
},
|
|
7051
|
-
{
|
|
7052
|
-
"name": "via",
|
|
7053
|
-
"in": "body",
|
|
7054
|
-
"type": "string",
|
|
7055
|
-
"required": false,
|
|
7056
|
-
"description": "How it was started (for the history). Default: api; agents' runs are recorded as mcp.",
|
|
7057
|
-
"schema": {
|
|
7058
|
-
"type": "string",
|
|
7059
|
-
"enum": [
|
|
7060
|
-
"api",
|
|
7061
|
-
"cli"
|
|
7062
|
-
],
|
|
7063
|
-
"description": "How it was started (for the history). Default: api; agents' runs are recorded as mcp."
|
|
7064
|
-
}
|
|
7065
|
-
}
|
|
7066
|
-
],
|
|
7067
|
-
"hasBody": true,
|
|
7068
|
-
"workspace": true,
|
|
7069
|
-
"scope": "runs:write"
|
|
7070
|
-
},
|
|
7071
7341
|
{
|
|
7072
7342
|
"operationId": "secrets.delete",
|
|
7073
7343
|
"method": "delete",
|
|
@@ -7084,21 +7354,24 @@ var OPERATIONS = [
|
|
|
7084
7354
|
"exposed": false,
|
|
7085
7355
|
"reason": "Secret values are a person's to handle; an agent asks the person to add the secret"
|
|
7086
7356
|
},
|
|
7087
|
-
"description": "Deletes
|
|
7357
|
+
"description": "Deletes a secret and its value in every environment. Runs of scripts that use it fail until someone saves it again. Workspace owners, admins and API keys can delete a secret.",
|
|
7088
7358
|
"fields": [
|
|
7089
7359
|
{
|
|
7090
7360
|
"name": "name",
|
|
7091
7361
|
"in": "path",
|
|
7092
7362
|
"type": "string",
|
|
7093
7363
|
"required": true,
|
|
7364
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.",
|
|
7094
7365
|
"example": "ADMIN_KEY",
|
|
7095
7366
|
"schema": {
|
|
7096
|
-
"type": "string"
|
|
7367
|
+
"type": "string",
|
|
7368
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters."
|
|
7097
7369
|
}
|
|
7098
7370
|
}
|
|
7099
7371
|
],
|
|
7100
7372
|
"hasBody": false,
|
|
7101
7373
|
"workspace": true,
|
|
7374
|
+
"acceptsApiKey": true,
|
|
7102
7375
|
"scope": "secrets:write"
|
|
7103
7376
|
},
|
|
7104
7377
|
{
|
|
@@ -7120,10 +7393,11 @@ var OPERATIONS = [
|
|
|
7120
7393
|
"idempotentHint": true
|
|
7121
7394
|
}
|
|
7122
7395
|
},
|
|
7123
|
-
"description": "
|
|
7396
|
+
"description": "Lists the workspace's secrets by name, with the environments that have a value and the hosts each value may go to. The list never includes the values themselves.",
|
|
7124
7397
|
"fields": [],
|
|
7125
7398
|
"hasBody": false,
|
|
7126
7399
|
"workspace": true,
|
|
7400
|
+
"acceptsApiKey": true,
|
|
7127
7401
|
"scope": "secrets:read"
|
|
7128
7402
|
},
|
|
7129
7403
|
{
|
|
@@ -7136,22 +7410,25 @@ var OPERATIONS = [
|
|
|
7136
7410
|
"args": [
|
|
7137
7411
|
"name"
|
|
7138
7412
|
],
|
|
7139
|
-
"confirm": false
|
|
7413
|
+
"confirm": false,
|
|
7414
|
+
"sample": 'printf %s "$ADMIN_KEY" | \\\n reminix secrets set ADMIN_KEY \\\n --hosts api.yourapp.com'
|
|
7140
7415
|
},
|
|
7141
7416
|
"mcp": {
|
|
7142
7417
|
"exposed": false,
|
|
7143
7418
|
"reason": "Secret values are a person's to handle; an agent asks the person to add the secret"
|
|
7144
7419
|
},
|
|
7145
|
-
"description": "Saves
|
|
7420
|
+
"description": "Saves a secret's value in the request's environment. Saving creates the secret if it's new, or replaces the value and its hosts to rotate it. Reminix encrypts the value, and no call ever returns it. Reminix sends the value only to the hosts in `hosts`. Workspace owners, admins and API keys can save a secret.",
|
|
7146
7421
|
"fields": [
|
|
7147
7422
|
{
|
|
7148
7423
|
"name": "name",
|
|
7149
7424
|
"in": "path",
|
|
7150
7425
|
"type": "string",
|
|
7151
7426
|
"required": true,
|
|
7427
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.",
|
|
7152
7428
|
"example": "ADMIN_KEY",
|
|
7153
7429
|
"schema": {
|
|
7154
|
-
"type": "string"
|
|
7430
|
+
"type": "string",
|
|
7431
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters."
|
|
7155
7432
|
}
|
|
7156
7433
|
},
|
|
7157
7434
|
{
|
|
@@ -7159,10 +7436,11 @@ var OPERATIONS = [
|
|
|
7159
7436
|
"in": "body",
|
|
7160
7437
|
"type": "string",
|
|
7161
7438
|
"required": true,
|
|
7162
|
-
"description": "The secret itself.",
|
|
7439
|
+
"description": "The secret itself, at most 16,384 bytes.",
|
|
7440
|
+
"example": "ak_live_\u2026",
|
|
7163
7441
|
"schema": {
|
|
7164
7442
|
"type": "string",
|
|
7165
|
-
"description": "The secret itself."
|
|
7443
|
+
"description": "The secret itself, at most 16,384 bytes."
|
|
7166
7444
|
}
|
|
7167
7445
|
},
|
|
7168
7446
|
{
|
|
@@ -7170,6 +7448,7 @@ var OPERATIONS = [
|
|
|
7170
7448
|
"in": "body",
|
|
7171
7449
|
"type": "json",
|
|
7172
7450
|
"required": true,
|
|
7451
|
+
"description": "The only hosts Reminix sends this value to, such as `api.stripe.com`.",
|
|
7173
7452
|
"example": [
|
|
7174
7453
|
"api.yourapp.com"
|
|
7175
7454
|
],
|
|
@@ -7177,32 +7456,34 @@ var OPERATIONS = [
|
|
|
7177
7456
|
"type": "array",
|
|
7178
7457
|
"items": {
|
|
7179
7458
|
"type": "string"
|
|
7180
|
-
}
|
|
7459
|
+
},
|
|
7460
|
+
"description": "The only hosts Reminix sends this value to, such as `api.stripe.com`."
|
|
7181
7461
|
}
|
|
7182
7462
|
},
|
|
7183
7463
|
{
|
|
7184
|
-
"name": "
|
|
7464
|
+
"name": "allowEnvVar",
|
|
7185
7465
|
"in": "body",
|
|
7186
7466
|
"type": "boolean",
|
|
7187
7467
|
"required": false,
|
|
7188
|
-
"description": "
|
|
7468
|
+
"description": "Whether scripts can read the secret as an environment variable. The default is false, so Reminix only attaches it to requests.",
|
|
7189
7469
|
"schema": {
|
|
7190
7470
|
"type": "boolean",
|
|
7191
|
-
"description": "
|
|
7471
|
+
"description": "Whether scripts can read the secret as an environment variable. The default is false, so Reminix only attaches it to requests."
|
|
7192
7472
|
}
|
|
7193
7473
|
}
|
|
7194
7474
|
],
|
|
7195
7475
|
"hasBody": true,
|
|
7196
7476
|
"workspace": true,
|
|
7477
|
+
"acceptsApiKey": true,
|
|
7197
7478
|
"scope": "secrets:write"
|
|
7198
7479
|
},
|
|
7199
7480
|
{
|
|
7200
|
-
"operationId": "
|
|
7481
|
+
"operationId": "secretValues.delete",
|
|
7201
7482
|
"method": "delete",
|
|
7202
7483
|
"path": "/secrets/{name}/values/{environment}",
|
|
7203
7484
|
"summary": "Remove a secret's value from an environment",
|
|
7204
7485
|
"cli": {
|
|
7205
|
-
"command": "
|
|
7486
|
+
"command": "secret-values delete",
|
|
7206
7487
|
"args": [
|
|
7207
7488
|
"name",
|
|
7208
7489
|
"environment"
|
|
@@ -7213,16 +7494,18 @@ var OPERATIONS = [
|
|
|
7213
7494
|
"exposed": false,
|
|
7214
7495
|
"reason": "Secret values are a person's to handle; an agent asks the person to add the secret"
|
|
7215
7496
|
},
|
|
7216
|
-
"description": "Removes
|
|
7497
|
+
"description": "Removes a secret's value from one environment. The secret and its values in other environments stay. Runs in that environment that use the secret fail until someone saves a value there again. Workspace owners, admins and API keys can remove a value.",
|
|
7217
7498
|
"fields": [
|
|
7218
7499
|
{
|
|
7219
7500
|
"name": "name",
|
|
7220
7501
|
"in": "path",
|
|
7221
7502
|
"type": "string",
|
|
7222
7503
|
"required": true,
|
|
7504
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.",
|
|
7223
7505
|
"example": "ADMIN_KEY",
|
|
7224
7506
|
"schema": {
|
|
7225
|
-
"type": "string"
|
|
7507
|
+
"type": "string",
|
|
7508
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters."
|
|
7226
7509
|
}
|
|
7227
7510
|
},
|
|
7228
7511
|
{
|
|
@@ -7230,14 +7513,17 @@ var OPERATIONS = [
|
|
|
7230
7513
|
"in": "path",
|
|
7231
7514
|
"type": "string",
|
|
7232
7515
|
"required": true,
|
|
7516
|
+
"description": "The environment's ID.",
|
|
7233
7517
|
"example": "staging",
|
|
7234
7518
|
"schema": {
|
|
7235
|
-
"type": "string"
|
|
7519
|
+
"type": "string",
|
|
7520
|
+
"description": "The environment's ID."
|
|
7236
7521
|
}
|
|
7237
7522
|
}
|
|
7238
7523
|
],
|
|
7239
7524
|
"hasBody": false,
|
|
7240
7525
|
"workspace": true,
|
|
7526
|
+
"acceptsApiKey": true,
|
|
7241
7527
|
"scope": "secrets:write"
|
|
7242
7528
|
},
|
|
7243
7529
|
{
|
|
@@ -7254,18 +7540,20 @@ var OPERATIONS = [
|
|
|
7254
7540
|
},
|
|
7255
7541
|
"mcp": {
|
|
7256
7542
|
"exposed": false,
|
|
7257
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
7543
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
7258
7544
|
},
|
|
7259
|
-
"description": "Starts a run, as you, when an event of `eventType` happens in the workspace
|
|
7545
|
+
"description": "Starts a run of the script, as you, when an event of `eventType` happens in the workspace and its data matches `filter`. GET /v1/workspace/event-types lists the event types. The run starts within about a minute of the event. A chain of triggered runs stops after 3. If every run of the script, or every run in the environment, needs approval, only workspace owners and admins can create a trigger.",
|
|
7260
7546
|
"fields": [
|
|
7261
7547
|
{
|
|
7262
7548
|
"name": "slug",
|
|
7263
7549
|
"in": "path",
|
|
7264
7550
|
"type": "string",
|
|
7265
7551
|
"required": true,
|
|
7552
|
+
"description": "The slug's ID.",
|
|
7266
7553
|
"example": "alert-on-failure",
|
|
7267
7554
|
"schema": {
|
|
7268
|
-
"type": "string"
|
|
7555
|
+
"type": "string",
|
|
7556
|
+
"description": "The slug's ID."
|
|
7269
7557
|
}
|
|
7270
7558
|
},
|
|
7271
7559
|
{
|
|
@@ -7287,12 +7575,12 @@ var OPERATIONS = [
|
|
|
7287
7575
|
"in": "body",
|
|
7288
7576
|
"type": "string",
|
|
7289
7577
|
"required": true,
|
|
7290
|
-
"description": "The event that starts a run
|
|
7578
|
+
"description": "The event that starts a run. It can be any webhook event type, such as `run.failed`.",
|
|
7291
7579
|
"example": "run.failed",
|
|
7292
7580
|
"schema": {
|
|
7293
7581
|
"type": "string",
|
|
7294
7582
|
"minLength": 1,
|
|
7295
|
-
"description": "The event that starts a run
|
|
7583
|
+
"description": "The event that starts a run. It can be any webhook event type, such as `run.failed`."
|
|
7296
7584
|
}
|
|
7297
7585
|
},
|
|
7298
7586
|
{
|
|
@@ -7300,14 +7588,14 @@ var OPERATIONS = [
|
|
|
7300
7588
|
"in": "body",
|
|
7301
7589
|
"type": "json",
|
|
7302
7590
|
"required": false,
|
|
7303
|
-
"description": "Event data fields
|
|
7591
|
+
"description": "Event data fields, as dotted paths, that must equal these values.",
|
|
7304
7592
|
"example": {
|
|
7305
7593
|
"script.slug": "nightly-sync"
|
|
7306
7594
|
},
|
|
7307
7595
|
"schema": {
|
|
7308
7596
|
"type": "object",
|
|
7309
7597
|
"additionalProperties": {},
|
|
7310
|
-
"description": "Event data fields
|
|
7598
|
+
"description": "Event data fields, as dotted paths, that must equal these values."
|
|
7311
7599
|
}
|
|
7312
7600
|
},
|
|
7313
7601
|
{
|
|
@@ -7315,7 +7603,7 @@ var OPERATIONS = [
|
|
|
7315
7603
|
"in": "body",
|
|
7316
7604
|
"type": "json",
|
|
7317
7605
|
"required": false,
|
|
7318
|
-
"description": `The script's inputs for each run, by name
|
|
7606
|
+
"description": `The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.`,
|
|
7319
7607
|
"example": {
|
|
7320
7608
|
"runId": "{{event.data.runId}}",
|
|
7321
7609
|
"error": "{{event.data.error}}"
|
|
@@ -7323,7 +7611,7 @@ var OPERATIONS = [
|
|
|
7323
7611
|
"schema": {
|
|
7324
7612
|
"type": "object",
|
|
7325
7613
|
"additionalProperties": {},
|
|
7326
|
-
"description": `The script's inputs for each run, by name
|
|
7614
|
+
"description": `The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.`
|
|
7327
7615
|
}
|
|
7328
7616
|
},
|
|
7329
7617
|
{
|
|
@@ -7331,15 +7619,16 @@ var OPERATIONS = [
|
|
|
7331
7619
|
"in": "body",
|
|
7332
7620
|
"type": "string",
|
|
7333
7621
|
"required": false,
|
|
7334
|
-
"description": "The environment
|
|
7622
|
+
"description": "The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment.",
|
|
7335
7623
|
"schema": {
|
|
7336
7624
|
"type": "string",
|
|
7337
|
-
"description": "The environment
|
|
7625
|
+
"description": "The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment."
|
|
7338
7626
|
}
|
|
7339
7627
|
}
|
|
7340
7628
|
],
|
|
7341
7629
|
"hasBody": true,
|
|
7342
7630
|
"workspace": true,
|
|
7631
|
+
"acceptsApiKey": false,
|
|
7343
7632
|
"scope": "scripts:write"
|
|
7344
7633
|
},
|
|
7345
7634
|
{
|
|
@@ -7357,18 +7646,20 @@ var OPERATIONS = [
|
|
|
7357
7646
|
},
|
|
7358
7647
|
"mcp": {
|
|
7359
7648
|
"exposed": false,
|
|
7360
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
7649
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
7361
7650
|
},
|
|
7362
|
-
"description": "
|
|
7651
|
+
"description": "Deletes a trigger. The trigger's creator, a workspace owner or admin, or a workspace API key can delete it.",
|
|
7363
7652
|
"fields": [
|
|
7364
7653
|
{
|
|
7365
7654
|
"name": "slug",
|
|
7366
7655
|
"in": "path",
|
|
7367
7656
|
"type": "string",
|
|
7368
7657
|
"required": true,
|
|
7658
|
+
"description": "The slug's ID.",
|
|
7369
7659
|
"example": "alert-on-failure",
|
|
7370
7660
|
"schema": {
|
|
7371
|
-
"type": "string"
|
|
7661
|
+
"type": "string",
|
|
7662
|
+
"description": "The slug's ID."
|
|
7372
7663
|
}
|
|
7373
7664
|
},
|
|
7374
7665
|
{
|
|
@@ -7376,13 +7667,17 @@ var OPERATIONS = [
|
|
|
7376
7667
|
"in": "path",
|
|
7377
7668
|
"type": "string",
|
|
7378
7669
|
"required": true,
|
|
7670
|
+
"description": "The trigger's ID.",
|
|
7671
|
+
"example": "trg_6e4a\u2026",
|
|
7379
7672
|
"schema": {
|
|
7380
|
-
"type": "string"
|
|
7673
|
+
"type": "string",
|
|
7674
|
+
"description": "The trigger's ID."
|
|
7381
7675
|
}
|
|
7382
7676
|
}
|
|
7383
7677
|
],
|
|
7384
7678
|
"hasBody": false,
|
|
7385
7679
|
"workspace": true,
|
|
7680
|
+
"acceptsApiKey": true,
|
|
7386
7681
|
"scope": "scripts:write"
|
|
7387
7682
|
},
|
|
7388
7683
|
{
|
|
@@ -7406,21 +7701,24 @@ var OPERATIONS = [
|
|
|
7406
7701
|
"idempotentHint": true
|
|
7407
7702
|
}
|
|
7408
7703
|
},
|
|
7409
|
-
"description": "
|
|
7704
|
+
"description": "Lists a script's triggers, which are the events that start it.",
|
|
7410
7705
|
"fields": [
|
|
7411
7706
|
{
|
|
7412
7707
|
"name": "slug",
|
|
7413
7708
|
"in": "path",
|
|
7414
7709
|
"type": "string",
|
|
7415
7710
|
"required": true,
|
|
7711
|
+
"description": "The slug's ID.",
|
|
7416
7712
|
"example": "alert-on-failure",
|
|
7417
7713
|
"schema": {
|
|
7418
|
-
"type": "string"
|
|
7714
|
+
"type": "string",
|
|
7715
|
+
"description": "The slug's ID."
|
|
7419
7716
|
}
|
|
7420
7717
|
}
|
|
7421
7718
|
],
|
|
7422
7719
|
"hasBody": false,
|
|
7423
7720
|
"workspace": true,
|
|
7721
|
+
"acceptsApiKey": true,
|
|
7424
7722
|
"scope": "scripts:read"
|
|
7425
7723
|
},
|
|
7426
7724
|
{
|
|
@@ -7438,18 +7736,20 @@ var OPERATIONS = [
|
|
|
7438
7736
|
},
|
|
7439
7737
|
"mcp": {
|
|
7440
7738
|
"exposed": false,
|
|
7441
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
7739
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
7442
7740
|
},
|
|
7443
|
-
"description": "
|
|
7741
|
+
"description": "Changes a trigger's name, filter, inputs or environment, or whether it's enabled. The trigger's creator, a workspace owner or admin, or a workspace API key can change it.",
|
|
7444
7742
|
"fields": [
|
|
7445
7743
|
{
|
|
7446
7744
|
"name": "slug",
|
|
7447
7745
|
"in": "path",
|
|
7448
7746
|
"type": "string",
|
|
7449
7747
|
"required": true,
|
|
7748
|
+
"description": "The slug's ID.",
|
|
7450
7749
|
"example": "alert-on-failure",
|
|
7451
7750
|
"schema": {
|
|
7452
|
-
"type": "string"
|
|
7751
|
+
"type": "string",
|
|
7752
|
+
"description": "The slug's ID."
|
|
7453
7753
|
}
|
|
7454
7754
|
},
|
|
7455
7755
|
{
|
|
@@ -7457,8 +7757,11 @@ var OPERATIONS = [
|
|
|
7457
7757
|
"in": "path",
|
|
7458
7758
|
"type": "string",
|
|
7459
7759
|
"required": true,
|
|
7760
|
+
"description": "The trigger's ID.",
|
|
7761
|
+
"example": "trg_6e4a\u2026",
|
|
7460
7762
|
"schema": {
|
|
7461
|
-
"type": "string"
|
|
7763
|
+
"type": "string",
|
|
7764
|
+
"description": "The trigger's ID."
|
|
7462
7765
|
}
|
|
7463
7766
|
},
|
|
7464
7767
|
{
|
|
@@ -7479,14 +7782,14 @@ var OPERATIONS = [
|
|
|
7479
7782
|
"in": "body",
|
|
7480
7783
|
"type": "json",
|
|
7481
7784
|
"required": false,
|
|
7482
|
-
"description": "Event data fields
|
|
7785
|
+
"description": "Event data fields, as dotted paths, that must equal these values.",
|
|
7483
7786
|
"example": {
|
|
7484
7787
|
"script.slug": "nightly-sync"
|
|
7485
7788
|
},
|
|
7486
7789
|
"schema": {
|
|
7487
7790
|
"type": "object",
|
|
7488
7791
|
"additionalProperties": {},
|
|
7489
|
-
"description": "Event data fields
|
|
7792
|
+
"description": "Event data fields, as dotted paths, that must equal these values."
|
|
7490
7793
|
}
|
|
7491
7794
|
},
|
|
7492
7795
|
{
|
|
@@ -7494,7 +7797,7 @@ var OPERATIONS = [
|
|
|
7494
7797
|
"in": "body",
|
|
7495
7798
|
"type": "json",
|
|
7496
7799
|
"required": false,
|
|
7497
|
-
"description": `The script's inputs for each run, by name
|
|
7800
|
+
"description": `The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.`,
|
|
7498
7801
|
"example": {
|
|
7499
7802
|
"runId": "{{event.data.runId}}",
|
|
7500
7803
|
"error": "{{event.data.error}}"
|
|
@@ -7502,7 +7805,7 @@ var OPERATIONS = [
|
|
|
7502
7805
|
"schema": {
|
|
7503
7806
|
"type": "object",
|
|
7504
7807
|
"additionalProperties": {},
|
|
7505
|
-
"description": `The script's inputs for each run, by name
|
|
7808
|
+
"description": `The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.`
|
|
7506
7809
|
}
|
|
7507
7810
|
},
|
|
7508
7811
|
{
|
|
@@ -7510,10 +7813,10 @@ var OPERATIONS = [
|
|
|
7510
7813
|
"in": "body",
|
|
7511
7814
|
"type": "boolean",
|
|
7512
7815
|
"required": false,
|
|
7513
|
-
"description": "Whether
|
|
7816
|
+
"description": "Whether the trigger starts runs. With `false`, it's disabled.",
|
|
7514
7817
|
"schema": {
|
|
7515
7818
|
"type": "boolean",
|
|
7516
|
-
"description": "Whether
|
|
7819
|
+
"description": "Whether the trigger starts runs. With `false`, it's disabled."
|
|
7517
7820
|
}
|
|
7518
7821
|
},
|
|
7519
7822
|
{
|
|
@@ -7521,15 +7824,16 @@ var OPERATIONS = [
|
|
|
7521
7824
|
"in": "body",
|
|
7522
7825
|
"type": "string",
|
|
7523
7826
|
"required": false,
|
|
7524
|
-
"description": "
|
|
7827
|
+
"description": "Another environment for the trigger's runs to use.",
|
|
7525
7828
|
"schema": {
|
|
7526
7829
|
"type": "string",
|
|
7527
|
-
"description": "
|
|
7830
|
+
"description": "Another environment for the trigger's runs to use."
|
|
7528
7831
|
}
|
|
7529
7832
|
}
|
|
7530
7833
|
],
|
|
7531
7834
|
"hasBody": true,
|
|
7532
7835
|
"workspace": true,
|
|
7836
|
+
"acceptsApiKey": true,
|
|
7533
7837
|
"scope": "scripts:write"
|
|
7534
7838
|
},
|
|
7535
7839
|
{
|
|
@@ -7544,12 +7848,13 @@ var OPERATIONS = [
|
|
|
7544
7848
|
},
|
|
7545
7849
|
"mcp": {
|
|
7546
7850
|
"exposed": false,
|
|
7547
|
-
"reason": "
|
|
7851
|
+
"reason": "Only a personal access token can call this. An agent's connection acts in one workspace, which workspace_get returns."
|
|
7548
7852
|
},
|
|
7549
|
-
"description": 'Returns the user the personal access token belongs to,
|
|
7853
|
+
"description": 'Returns the user the personal access token belongs to, and their workspace memberships. Use it as a smoke test for an integration ("who am I?").',
|
|
7550
7854
|
"fields": [],
|
|
7551
7855
|
"hasBody": false,
|
|
7552
|
-
"workspace": false
|
|
7856
|
+
"workspace": false,
|
|
7857
|
+
"acceptsApiKey": false
|
|
7553
7858
|
},
|
|
7554
7859
|
{
|
|
7555
7860
|
"operationId": "user.revokeToken",
|
|
@@ -7563,12 +7868,13 @@ var OPERATIONS = [
|
|
|
7563
7868
|
},
|
|
7564
7869
|
"mcp": {
|
|
7565
7870
|
"exposed": false,
|
|
7566
|
-
"reason": "Revokes a person's own credential
|
|
7871
|
+
"reason": "Revokes a person's own credential. Agents connect through OAuth and never use personal tokens."
|
|
7567
7872
|
},
|
|
7568
|
-
"description": "Revokes the personal access token
|
|
7873
|
+
"description": "Revokes the personal access token that makes the request. Use it to sign out from a script or the CLI (`logout`). The token stops working immediately. Your other tokens keep working.",
|
|
7569
7874
|
"fields": [],
|
|
7570
7875
|
"hasBody": false,
|
|
7571
|
-
"workspace": false
|
|
7876
|
+
"workspace": false,
|
|
7877
|
+
"acceptsApiKey": false
|
|
7572
7878
|
},
|
|
7573
7879
|
{
|
|
7574
7880
|
"operationId": "workspace.approvalActions.list",
|
|
@@ -7589,10 +7895,11 @@ var OPERATIONS = [
|
|
|
7589
7895
|
"idempotentHint": true
|
|
7590
7896
|
}
|
|
7591
7897
|
},
|
|
7592
|
-
"description": "
|
|
7898
|
+
"description": "Lists the actions a credential can't take itself but can ask a person to approve. Each action comes with its input as a JSON Schema, who can approve it and whether it creates a secret.",
|
|
7593
7899
|
"fields": [],
|
|
7594
7900
|
"hasBody": false,
|
|
7595
7901
|
"workspace": true,
|
|
7902
|
+
"acceptsApiKey": true,
|
|
7596
7903
|
"scope": "workspace.approvals:read"
|
|
7597
7904
|
},
|
|
7598
7905
|
{
|
|
@@ -7614,7 +7921,7 @@ var OPERATIONS = [
|
|
|
7614
7921
|
"idempotentHint": false
|
|
7615
7922
|
}
|
|
7616
7923
|
},
|
|
7617
|
-
"description": "
|
|
7924
|
+
"description": "Creates a request for an action you can't take yourself and notifies everyone who can approve it. The actions you can ask for are in approval-actions. Show the person `approveUrl` and why you need the action. Then check the request until a person decides. A request expires after 24 hours. A personal access token or an app a person connected can ask. A workspace API key can't.",
|
|
7618
7925
|
"fields": [
|
|
7619
7926
|
{
|
|
7620
7927
|
"name": "action",
|
|
@@ -7633,7 +7940,7 @@ var OPERATIONS = [
|
|
|
7633
7940
|
"in": "body",
|
|
7634
7941
|
"type": "json",
|
|
7635
7942
|
"required": true,
|
|
7636
|
-
"description": "The action's input
|
|
7943
|
+
"description": "The action's input. It must match the action's JSON Schema.",
|
|
7637
7944
|
"example": {
|
|
7638
7945
|
"name": "acme-web",
|
|
7639
7946
|
"scopes": [
|
|
@@ -7643,7 +7950,7 @@ var OPERATIONS = [
|
|
|
7643
7950
|
"schema": {
|
|
7644
7951
|
"type": "object",
|
|
7645
7952
|
"additionalProperties": {},
|
|
7646
|
-
"description": "The action's input
|
|
7953
|
+
"description": "The action's input. It must match the action's JSON Schema."
|
|
7647
7954
|
}
|
|
7648
7955
|
},
|
|
7649
7956
|
{
|
|
@@ -7651,17 +7958,19 @@ var OPERATIONS = [
|
|
|
7651
7958
|
"in": "body",
|
|
7652
7959
|
"type": "string",
|
|
7653
7960
|
"required": true,
|
|
7654
|
-
"description": "Why
|
|
7961
|
+
"description": "Why you need the action. The person reads it before deciding.",
|
|
7962
|
+
"example": "A key for the deploy pipeline.",
|
|
7655
7963
|
"schema": {
|
|
7656
7964
|
"type": "string",
|
|
7657
7965
|
"minLength": 1,
|
|
7658
7966
|
"maxLength": 500,
|
|
7659
|
-
"description": "Why
|
|
7967
|
+
"description": "Why you need the action. The person reads it before deciding."
|
|
7660
7968
|
}
|
|
7661
7969
|
}
|
|
7662
7970
|
],
|
|
7663
7971
|
"hasBody": true,
|
|
7664
7972
|
"workspace": true,
|
|
7973
|
+
"acceptsApiKey": false,
|
|
7665
7974
|
"scope": "workspace.approvals:write"
|
|
7666
7975
|
},
|
|
7667
7976
|
{
|
|
@@ -7685,7 +7994,7 @@ var OPERATIONS = [
|
|
|
7685
7994
|
"idempotentHint": true
|
|
7686
7995
|
}
|
|
7687
7996
|
},
|
|
7688
|
-
"description": "
|
|
7997
|
+
"description": "Returns an approval request you created, with its status. A `pending` request is waiting for a person to decide. A `completed` request's action ran, and `result` holds the outcome. An `approved` request is waiting for the CLI to redeem it. A request can also be `denied`, `failed` or `expired`.",
|
|
7689
7998
|
"fields": [
|
|
7690
7999
|
{
|
|
7691
8000
|
"name": "requestId",
|
|
@@ -7693,6 +8002,7 @@ var OPERATIONS = [
|
|
|
7693
8002
|
"type": "string",
|
|
7694
8003
|
"required": true,
|
|
7695
8004
|
"description": "The request's id.",
|
|
8005
|
+
"example": "apr_7c2e\u2026",
|
|
7696
8006
|
"schema": {
|
|
7697
8007
|
"type": "string",
|
|
7698
8008
|
"description": "The request's id."
|
|
@@ -7701,6 +8011,7 @@ var OPERATIONS = [
|
|
|
7701
8011
|
],
|
|
7702
8012
|
"hasBody": false,
|
|
7703
8013
|
"workspace": true,
|
|
8014
|
+
"acceptsApiKey": true,
|
|
7704
8015
|
"scope": "workspace.approvals:read"
|
|
7705
8016
|
},
|
|
7706
8017
|
{
|
|
@@ -7717,9 +8028,9 @@ var OPERATIONS = [
|
|
|
7717
8028
|
},
|
|
7718
8029
|
"mcp": {
|
|
7719
8030
|
"exposed": false,
|
|
7720
|
-
"reason": "Returns a secret
|
|
8031
|
+
"reason": "Returns a secret. Secrets never enter an agent's conversation. The CLI writes them to a file instead."
|
|
7721
8032
|
},
|
|
7722
|
-
"description": "Runs an approved
|
|
8033
|
+
"description": "Runs an approved action that creates a secret, and returns the secret. The action runs only once. Only the personal access token that asked can redeem it. The CLI writes the secret to a file without printing it.",
|
|
7723
8034
|
"fields": [
|
|
7724
8035
|
{
|
|
7725
8036
|
"name": "requestId",
|
|
@@ -7727,6 +8038,7 @@ var OPERATIONS = [
|
|
|
7727
8038
|
"type": "string",
|
|
7728
8039
|
"required": true,
|
|
7729
8040
|
"description": "The request's id.",
|
|
8041
|
+
"example": "apr_7c2e\u2026",
|
|
7730
8042
|
"schema": {
|
|
7731
8043
|
"type": "string",
|
|
7732
8044
|
"description": "The request's id."
|
|
@@ -7735,6 +8047,7 @@ var OPERATIONS = [
|
|
|
7735
8047
|
],
|
|
7736
8048
|
"hasBody": false,
|
|
7737
8049
|
"workspace": true,
|
|
8050
|
+
"acceptsApiKey": false,
|
|
7738
8051
|
"scope": "workspace.approvals:write"
|
|
7739
8052
|
},
|
|
7740
8053
|
{
|
|
@@ -7756,7 +8069,7 @@ var OPERATIONS = [
|
|
|
7756
8069
|
"idempotentHint": true
|
|
7757
8070
|
}
|
|
7758
8071
|
},
|
|
7759
|
-
"description": "
|
|
8072
|
+
"description": "Lists the workspace's audit events, newest first. Paginate with the opaque `nextCursor` token. `limit` takes 1 to 100 and defaults to 25. `before` starts from a moment. `action` keeps one kind of event, and `actor` what one person, key or token did. With a personal access token, only workspace owners can call this, as with the audit page in the app. A workspace API key always can, because it acts as the workspace itself.",
|
|
7760
8073
|
"fields": [
|
|
7761
8074
|
{
|
|
7762
8075
|
"name": "limit",
|
|
@@ -7783,10 +8096,50 @@ var OPERATIONS = [
|
|
|
7783
8096
|
"type": "string",
|
|
7784
8097
|
"description": "Opaque token from a previous page's nextCursor."
|
|
7785
8098
|
}
|
|
8099
|
+
},
|
|
8100
|
+
{
|
|
8101
|
+
"name": "before",
|
|
8102
|
+
"in": "query",
|
|
8103
|
+
"type": "string",
|
|
8104
|
+
"required": false,
|
|
8105
|
+
"description": "Start from this moment: items older than it, newest first. Ignored with `cursor`, which already says where to go on.",
|
|
8106
|
+
"example": "2026-11-01T00:00:00.000Z",
|
|
8107
|
+
"schema": {
|
|
8108
|
+
"type": "string",
|
|
8109
|
+
"format": "date-time",
|
|
8110
|
+
"description": "Start from this moment: items older than it, newest first. Ignored with `cursor`, which already says where to go on."
|
|
8111
|
+
}
|
|
8112
|
+
},
|
|
8113
|
+
{
|
|
8114
|
+
"name": "action",
|
|
8115
|
+
"in": "query",
|
|
8116
|
+
"type": "string",
|
|
8117
|
+
"required": false,
|
|
8118
|
+
"description": "Only events of this action.",
|
|
8119
|
+
"example": "workspace.member_invited",
|
|
8120
|
+
"schema": {
|
|
8121
|
+
"type": "string",
|
|
8122
|
+
"maxLength": 100,
|
|
8123
|
+
"description": "Only events of this action."
|
|
8124
|
+
}
|
|
8125
|
+
},
|
|
8126
|
+
{
|
|
8127
|
+
"name": "actor",
|
|
8128
|
+
"in": "query",
|
|
8129
|
+
"type": "string",
|
|
8130
|
+
"required": false,
|
|
8131
|
+
"description": "Only what one person did (`user:` and the item's `actor.id`), or one key or token (`credential:` and the item's `credential.id`).",
|
|
8132
|
+
"example": "user:usr_k3TAiF2ZP5sQ",
|
|
8133
|
+
"schema": {
|
|
8134
|
+
"type": "string",
|
|
8135
|
+
"pattern": "^(user|credential):[\\w-]+$",
|
|
8136
|
+
"description": "Only what one person did (`user:` and the item's `actor.id`), or one key or token (`credential:` and the item's `credential.id`)."
|
|
8137
|
+
}
|
|
7786
8138
|
}
|
|
7787
8139
|
],
|
|
7788
8140
|
"hasBody": false,
|
|
7789
8141
|
"workspace": true,
|
|
8142
|
+
"acceptsApiKey": true,
|
|
7790
8143
|
"scope": "workspace.audit:read"
|
|
7791
8144
|
},
|
|
7792
8145
|
{
|
|
@@ -7808,10 +8161,11 @@ var OPERATIONS = [
|
|
|
7808
8161
|
"idempotentHint": true
|
|
7809
8162
|
}
|
|
7810
8163
|
},
|
|
7811
|
-
"description": "
|
|
8164
|
+
"description": "Lists every workspace event a webhook endpoint can subscribe to, and what each one means. Pass some as `eventTypes` when you add an endpoint. An endpoint without a list receives every event.",
|
|
7812
8165
|
"fields": [],
|
|
7813
8166
|
"hasBody": false,
|
|
7814
8167
|
"workspace": true,
|
|
8168
|
+
"acceptsApiKey": true,
|
|
7815
8169
|
"scope": "workspace.webhooks:read"
|
|
7816
8170
|
},
|
|
7817
8171
|
{
|
|
@@ -7833,10 +8187,11 @@ var OPERATIONS = [
|
|
|
7833
8187
|
"idempotentHint": true
|
|
7834
8188
|
}
|
|
7835
8189
|
},
|
|
7836
|
-
"description":
|
|
8190
|
+
"description": 'Returns the workspace the credential acts in. For an API key, that is the key\'s own workspace. For a personal access token, it is the one named in `X-Workspace`. Use it as a smoke test for an integration ("who am I?").',
|
|
7837
8191
|
"fields": [],
|
|
7838
8192
|
"hasBody": false,
|
|
7839
8193
|
"workspace": true,
|
|
8194
|
+
"acceptsApiKey": true,
|
|
7840
8195
|
"scope": "workspace:read"
|
|
7841
8196
|
},
|
|
7842
8197
|
{
|
|
@@ -7858,7 +8213,7 @@ var OPERATIONS = [
|
|
|
7858
8213
|
"idempotentHint": true
|
|
7859
8214
|
}
|
|
7860
8215
|
},
|
|
7861
|
-
"description": "
|
|
8216
|
+
"description": "Lists the invitations that are not yet accepted, declined or expired, newest first. With a personal credential, only owners and admins can call this, as in the app. A workspace API key always can. Paginate with the opaque `nextCursor`.",
|
|
7862
8217
|
"fields": [
|
|
7863
8218
|
{
|
|
7864
8219
|
"name": "limit",
|
|
@@ -7889,6 +8244,7 @@ var OPERATIONS = [
|
|
|
7889
8244
|
],
|
|
7890
8245
|
"hasBody": false,
|
|
7891
8246
|
"workspace": true,
|
|
8247
|
+
"acceptsApiKey": true,
|
|
7892
8248
|
"scope": "workspace.members:read"
|
|
7893
8249
|
},
|
|
7894
8250
|
{
|
|
@@ -7910,7 +8266,7 @@ var OPERATIONS = [
|
|
|
7910
8266
|
"idempotentHint": true
|
|
7911
8267
|
}
|
|
7912
8268
|
},
|
|
7913
|
-
"description": "
|
|
8269
|
+
"description": "Lists the workspace's members and their roles, newest first. Paginate with the opaque `nextCursor`. `limit` takes 1 to 100 and defaults to 25. Invite members, remove them and give them roles in the app.",
|
|
7914
8270
|
"fields": [
|
|
7915
8271
|
{
|
|
7916
8272
|
"name": "limit",
|
|
@@ -7941,6 +8297,7 @@ var OPERATIONS = [
|
|
|
7941
8297
|
],
|
|
7942
8298
|
"hasBody": false,
|
|
7943
8299
|
"workspace": true,
|
|
8300
|
+
"acceptsApiKey": true,
|
|
7944
8301
|
"scope": "workspace.members:read"
|
|
7945
8302
|
},
|
|
7946
8303
|
{
|
|
@@ -7962,7 +8319,7 @@ var OPERATIONS = [
|
|
|
7962
8319
|
"idempotentHint": true
|
|
7963
8320
|
}
|
|
7964
8321
|
},
|
|
7965
|
-
"description": "
|
|
8322
|
+
"description": "Lists the workspace's teams and their members' user ids, newest first. Paginate with the opaque `nextCursor`. `limit` takes 1 to 100 and defaults to 25. Create teams and add members to them in the app.",
|
|
7966
8323
|
"fields": [
|
|
7967
8324
|
{
|
|
7968
8325
|
"name": "limit",
|
|
@@ -7993,6 +8350,7 @@ var OPERATIONS = [
|
|
|
7993
8350
|
],
|
|
7994
8351
|
"hasBody": false,
|
|
7995
8352
|
"workspace": true,
|
|
8353
|
+
"acceptsApiKey": true,
|
|
7996
8354
|
"scope": "workspace.teams:read"
|
|
7997
8355
|
},
|
|
7998
8356
|
{
|
|
@@ -8014,10 +8372,11 @@ var OPERATIONS = [
|
|
|
8014
8372
|
"idempotentHint": true
|
|
8015
8373
|
}
|
|
8016
8374
|
},
|
|
8017
|
-
"description": "
|
|
8375
|
+
"description": "Returns what the workspace used this period, with one entry for each thing its plan counts. Each entry has the plan's limit, or null when there is no limit. A period is one month from the workspace's billing date. That date comes from its subscription or, without one, from the day you created the workspace. On an annual plan, the counts still reset every month from the subscription's start.",
|
|
8018
8376
|
"fields": [],
|
|
8019
8377
|
"hasBody": false,
|
|
8020
8378
|
"workspace": true,
|
|
8379
|
+
"acceptsApiKey": true,
|
|
8021
8380
|
"scope": "workspace:read"
|
|
8022
8381
|
},
|
|
8023
8382
|
{
|
|
@@ -8041,16 +8400,18 @@ var OPERATIONS = [
|
|
|
8041
8400
|
"idempotentHint": true
|
|
8042
8401
|
}
|
|
8043
8402
|
},
|
|
8044
|
-
"description": "
|
|
8403
|
+
"description": "Lists one endpoint's delivery history, newest first. Each entry shows the event's status, attempts and last HTTP status. Payloads aren't included. We keep the history for 30 days. Paginate with the opaque `nextCursor`. `before` starts from a moment, and `status` keeps one kind of delivery. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8045
8404
|
"fields": [
|
|
8046
8405
|
{
|
|
8047
8406
|
"name": "endpointId",
|
|
8048
8407
|
"in": "path",
|
|
8049
8408
|
"type": "string",
|
|
8050
8409
|
"required": true,
|
|
8410
|
+
"description": "The endpoint's ID.",
|
|
8051
8411
|
"example": "we_3f0c\u2026",
|
|
8052
8412
|
"schema": {
|
|
8053
|
-
"type": "string"
|
|
8413
|
+
"type": "string",
|
|
8414
|
+
"description": "The endpoint's ID."
|
|
8054
8415
|
}
|
|
8055
8416
|
},
|
|
8056
8417
|
{
|
|
@@ -8078,10 +8439,41 @@ var OPERATIONS = [
|
|
|
8078
8439
|
"type": "string",
|
|
8079
8440
|
"description": "Opaque token from a previous page's nextCursor."
|
|
8080
8441
|
}
|
|
8442
|
+
},
|
|
8443
|
+
{
|
|
8444
|
+
"name": "before",
|
|
8445
|
+
"in": "query",
|
|
8446
|
+
"type": "string",
|
|
8447
|
+
"required": false,
|
|
8448
|
+
"description": "Start from this moment: items older than it, newest first. Ignored with `cursor`, which already says where to go on.",
|
|
8449
|
+
"example": "2026-11-01T00:00:00.000Z",
|
|
8450
|
+
"schema": {
|
|
8451
|
+
"type": "string",
|
|
8452
|
+
"format": "date-time",
|
|
8453
|
+
"description": "Start from this moment: items older than it, newest first. Ignored with `cursor`, which already says where to go on."
|
|
8454
|
+
}
|
|
8455
|
+
},
|
|
8456
|
+
{
|
|
8457
|
+
"name": "status",
|
|
8458
|
+
"in": "query",
|
|
8459
|
+
"type": "string",
|
|
8460
|
+
"required": false,
|
|
8461
|
+
"description": "Only deliveries with this status.",
|
|
8462
|
+
"example": "failed",
|
|
8463
|
+
"schema": {
|
|
8464
|
+
"type": "string",
|
|
8465
|
+
"enum": [
|
|
8466
|
+
"pending",
|
|
8467
|
+
"delivered",
|
|
8468
|
+
"failed"
|
|
8469
|
+
],
|
|
8470
|
+
"description": "Only deliveries with this status."
|
|
8471
|
+
}
|
|
8081
8472
|
}
|
|
8082
8473
|
],
|
|
8083
8474
|
"hasBody": false,
|
|
8084
8475
|
"workspace": true,
|
|
8476
|
+
"acceptsApiKey": true,
|
|
8085
8477
|
"scope": "workspace.webhooks:read"
|
|
8086
8478
|
},
|
|
8087
8479
|
{
|
|
@@ -8106,16 +8498,18 @@ var OPERATIONS = [
|
|
|
8106
8498
|
"idempotentHint": false
|
|
8107
8499
|
}
|
|
8108
8500
|
},
|
|
8109
|
-
"description": "Sends a recorded delivery's event again, as a new delivery
|
|
8501
|
+
"description": "Sends a recorded delivery's event again, as a new delivery. The new delivery gets its own history entry. The event id stays the same, so receivers can deduplicate. Redelivery only works on an enabled endpoint. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8110
8502
|
"fields": [
|
|
8111
8503
|
{
|
|
8112
8504
|
"name": "endpointId",
|
|
8113
8505
|
"in": "path",
|
|
8114
8506
|
"type": "string",
|
|
8115
8507
|
"required": true,
|
|
8508
|
+
"description": "The endpoint's ID.",
|
|
8116
8509
|
"example": "we_3f0c\u2026",
|
|
8117
8510
|
"schema": {
|
|
8118
|
-
"type": "string"
|
|
8511
|
+
"type": "string",
|
|
8512
|
+
"description": "The endpoint's ID."
|
|
8119
8513
|
}
|
|
8120
8514
|
},
|
|
8121
8515
|
{
|
|
@@ -8123,14 +8517,17 @@ var OPERATIONS = [
|
|
|
8123
8517
|
"in": "path",
|
|
8124
8518
|
"type": "string",
|
|
8125
8519
|
"required": true,
|
|
8520
|
+
"description": "The delivery's ID.",
|
|
8126
8521
|
"example": "del_8a1b\u2026",
|
|
8127
8522
|
"schema": {
|
|
8128
|
-
"type": "string"
|
|
8523
|
+
"type": "string",
|
|
8524
|
+
"description": "The delivery's ID."
|
|
8129
8525
|
}
|
|
8130
8526
|
}
|
|
8131
8527
|
],
|
|
8132
8528
|
"hasBody": false,
|
|
8133
8529
|
"workspace": true,
|
|
8530
|
+
"acceptsApiKey": true,
|
|
8134
8531
|
"scope": "workspace.webhooks:write"
|
|
8135
8532
|
},
|
|
8136
8533
|
{
|
|
@@ -8145,22 +8542,22 @@ var OPERATIONS = [
|
|
|
8145
8542
|
},
|
|
8146
8543
|
"mcp": {
|
|
8147
8544
|
"exposed": false,
|
|
8148
|
-
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192
|
|
8545
|
+
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
|
|
8149
8546
|
},
|
|
8150
|
-
"description": "Registers an
|
|
8547
|
+
"description": "Registers an HTTPS URL to receive the workspace's events. Deliveries use the same signature format as Svix. The response includes the endpoint's signing secret (`whsec_\u2026`). You see it only once, so store it to verify deliveries. The API refuses private hosts and hosts without HTTPS. A workspace can have at most 10 endpoints. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8151
8548
|
"fields": [
|
|
8152
8549
|
{
|
|
8153
8550
|
"name": "url",
|
|
8154
8551
|
"in": "body",
|
|
8155
8552
|
"type": "string",
|
|
8156
8553
|
"required": true,
|
|
8157
|
-
"description": "The
|
|
8554
|
+
"description": "The HTTPS URL that receives the events.",
|
|
8158
8555
|
"example": "https://example.com/hooks",
|
|
8159
8556
|
"schema": {
|
|
8160
8557
|
"type": "string",
|
|
8161
8558
|
"minLength": 1,
|
|
8162
8559
|
"maxLength": 2048,
|
|
8163
|
-
"description": "The
|
|
8560
|
+
"description": "The HTTPS URL that receives the events."
|
|
8164
8561
|
}
|
|
8165
8562
|
},
|
|
8166
8563
|
{
|
|
@@ -8180,7 +8577,7 @@ var OPERATIONS = [
|
|
|
8180
8577
|
"in": "body",
|
|
8181
8578
|
"type": "json",
|
|
8182
8579
|
"required": false,
|
|
8183
|
-
"description": "
|
|
8580
|
+
"description": "Send only these event types, from event-types. Leave it out for every event.",
|
|
8184
8581
|
"example": [
|
|
8185
8582
|
"workspace.member.joined"
|
|
8186
8583
|
],
|
|
@@ -8190,12 +8587,13 @@ var OPERATIONS = [
|
|
|
8190
8587
|
"type": "string"
|
|
8191
8588
|
},
|
|
8192
8589
|
"maxItems": 100,
|
|
8193
|
-
"description": "
|
|
8590
|
+
"description": "Send only these event types, from event-types. Leave it out for every event."
|
|
8194
8591
|
}
|
|
8195
8592
|
}
|
|
8196
8593
|
],
|
|
8197
8594
|
"hasBody": true,
|
|
8198
8595
|
"workspace": true,
|
|
8596
|
+
"acceptsApiKey": true,
|
|
8199
8597
|
"scope": "workspace.webhooks:write"
|
|
8200
8598
|
},
|
|
8201
8599
|
{
|
|
@@ -8212,23 +8610,26 @@ var OPERATIONS = [
|
|
|
8212
8610
|
},
|
|
8213
8611
|
"mcp": {
|
|
8214
8612
|
"exposed": false,
|
|
8215
|
-
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192
|
|
8613
|
+
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
|
|
8216
8614
|
},
|
|
8217
|
-
"description": "
|
|
8615
|
+
"description": "Deletes the endpoint and its signing secret. All deliveries to the endpoint stop. Its delivery history goes with it. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8218
8616
|
"fields": [
|
|
8219
8617
|
{
|
|
8220
8618
|
"name": "endpointId",
|
|
8221
8619
|
"in": "path",
|
|
8222
8620
|
"type": "string",
|
|
8223
8621
|
"required": true,
|
|
8622
|
+
"description": "The endpoint's ID.",
|
|
8224
8623
|
"example": "we_3f0c\u2026",
|
|
8225
8624
|
"schema": {
|
|
8226
|
-
"type": "string"
|
|
8625
|
+
"type": "string",
|
|
8626
|
+
"description": "The endpoint's ID."
|
|
8227
8627
|
}
|
|
8228
8628
|
}
|
|
8229
8629
|
],
|
|
8230
8630
|
"hasBody": false,
|
|
8231
8631
|
"workspace": true,
|
|
8632
|
+
"acceptsApiKey": true,
|
|
8232
8633
|
"scope": "workspace.webhooks:write"
|
|
8233
8634
|
},
|
|
8234
8635
|
{
|
|
@@ -8245,23 +8646,26 @@ var OPERATIONS = [
|
|
|
8245
8646
|
},
|
|
8246
8647
|
"mcp": {
|
|
8247
8648
|
"exposed": false,
|
|
8248
|
-
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192
|
|
8649
|
+
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
|
|
8249
8650
|
},
|
|
8250
|
-
"description": "Resumes deliveries to an endpoint that
|
|
8651
|
+
"description": "Resumes deliveries to an endpoint that stopped after repeated failures. The endpoint keeps its signing secret. Its failure count resets. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8251
8652
|
"fields": [
|
|
8252
8653
|
{
|
|
8253
8654
|
"name": "endpointId",
|
|
8254
8655
|
"in": "path",
|
|
8255
8656
|
"type": "string",
|
|
8256
8657
|
"required": true,
|
|
8658
|
+
"description": "The endpoint's ID.",
|
|
8257
8659
|
"example": "we_3f0c\u2026",
|
|
8258
8660
|
"schema": {
|
|
8259
|
-
"type": "string"
|
|
8661
|
+
"type": "string",
|
|
8662
|
+
"description": "The endpoint's ID."
|
|
8260
8663
|
}
|
|
8261
8664
|
}
|
|
8262
8665
|
],
|
|
8263
8666
|
"hasBody": false,
|
|
8264
8667
|
"workspace": true,
|
|
8668
|
+
"acceptsApiKey": true,
|
|
8265
8669
|
"scope": "workspace.webhooks:write"
|
|
8266
8670
|
},
|
|
8267
8671
|
{
|
|
@@ -8285,21 +8689,24 @@ var OPERATIONS = [
|
|
|
8285
8689
|
"idempotentHint": true
|
|
8286
8690
|
}
|
|
8287
8691
|
},
|
|
8288
|
-
"description": "
|
|
8692
|
+
"description": "Returns one endpoint without its signing secret. It shows whether the endpoint is on, its consecutive failures and its last delivery status. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8289
8693
|
"fields": [
|
|
8290
8694
|
{
|
|
8291
8695
|
"name": "endpointId",
|
|
8292
8696
|
"in": "path",
|
|
8293
8697
|
"type": "string",
|
|
8294
8698
|
"required": true,
|
|
8699
|
+
"description": "The endpoint's ID.",
|
|
8295
8700
|
"example": "we_3f0c\u2026",
|
|
8296
8701
|
"schema": {
|
|
8297
|
-
"type": "string"
|
|
8702
|
+
"type": "string",
|
|
8703
|
+
"description": "The endpoint's ID."
|
|
8298
8704
|
}
|
|
8299
8705
|
}
|
|
8300
8706
|
],
|
|
8301
8707
|
"hasBody": false,
|
|
8302
8708
|
"workspace": true,
|
|
8709
|
+
"acceptsApiKey": true,
|
|
8303
8710
|
"scope": "workspace.webhooks:read"
|
|
8304
8711
|
},
|
|
8305
8712
|
{
|
|
@@ -8321,10 +8728,11 @@ var OPERATIONS = [
|
|
|
8321
8728
|
"idempotentHint": true
|
|
8322
8729
|
}
|
|
8323
8730
|
},
|
|
8324
|
-
"description": "
|
|
8731
|
+
"description": "Lists the workspace's outgoing webhook endpoints, newest first. The list leaves out their signing secrets. A workspace has at most 10 endpoints, so the list is a single page. Its `nextCursor` is null. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8325
8732
|
"fields": [],
|
|
8326
8733
|
"hasBody": false,
|
|
8327
8734
|
"workspace": true,
|
|
8735
|
+
"acceptsApiKey": true,
|
|
8328
8736
|
"scope": "workspace.webhooks:read"
|
|
8329
8737
|
},
|
|
8330
8738
|
{
|
|
@@ -8348,21 +8756,110 @@ var OPERATIONS = [
|
|
|
8348
8756
|
"idempotentHint": false
|
|
8349
8757
|
}
|
|
8350
8758
|
},
|
|
8351
|
-
"description": "Sends a `ping` event to the endpoint, signed like every delivery
|
|
8759
|
+
"description": "Sends a `ping` event to the endpoint, signed like every delivery. Use it to check that an integration verifies and accepts deliveries. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8352
8760
|
"fields": [
|
|
8353
8761
|
{
|
|
8354
8762
|
"name": "endpointId",
|
|
8355
8763
|
"in": "path",
|
|
8356
8764
|
"type": "string",
|
|
8357
8765
|
"required": true,
|
|
8766
|
+
"description": "The endpoint's ID.",
|
|
8358
8767
|
"example": "we_3f0c\u2026",
|
|
8359
8768
|
"schema": {
|
|
8360
|
-
"type": "string"
|
|
8769
|
+
"type": "string",
|
|
8770
|
+
"description": "The endpoint's ID."
|
|
8361
8771
|
}
|
|
8362
8772
|
}
|
|
8363
8773
|
],
|
|
8364
8774
|
"hasBody": false,
|
|
8365
8775
|
"workspace": true,
|
|
8776
|
+
"acceptsApiKey": true,
|
|
8777
|
+
"scope": "workspace.webhooks:write"
|
|
8778
|
+
},
|
|
8779
|
+
{
|
|
8780
|
+
"operationId": "workspace.webhookEndpoints.update",
|
|
8781
|
+
"method": "patch",
|
|
8782
|
+
"path": "/workspace/webhook-endpoints/{endpointId}",
|
|
8783
|
+
"summary": "Update a webhook endpoint",
|
|
8784
|
+
"cli": {
|
|
8785
|
+
"command": "workspace webhook-endpoints update",
|
|
8786
|
+
"args": [
|
|
8787
|
+
"endpointId"
|
|
8788
|
+
],
|
|
8789
|
+
"confirm": false
|
|
8790
|
+
},
|
|
8791
|
+
"mcp": {
|
|
8792
|
+
"exposed": false,
|
|
8793
|
+
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
|
|
8794
|
+
},
|
|
8795
|
+
"description": "Changes an endpoint's URL, description or event types in place. Only the fields you send change. The endpoint keeps its signing secret, so receivers keep verifying deliveries. A new URL must pass the same checks as on create. It must use HTTPS and can't be a private host. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8796
|
+
"fields": [
|
|
8797
|
+
{
|
|
8798
|
+
"name": "endpointId",
|
|
8799
|
+
"in": "path",
|
|
8800
|
+
"type": "string",
|
|
8801
|
+
"required": true,
|
|
8802
|
+
"description": "The endpoint's ID.",
|
|
8803
|
+
"example": "we_3f0c\u2026",
|
|
8804
|
+
"schema": {
|
|
8805
|
+
"type": "string",
|
|
8806
|
+
"description": "The endpoint's ID."
|
|
8807
|
+
}
|
|
8808
|
+
},
|
|
8809
|
+
{
|
|
8810
|
+
"name": "url",
|
|
8811
|
+
"in": "body",
|
|
8812
|
+
"type": "string",
|
|
8813
|
+
"required": false,
|
|
8814
|
+
"description": "The HTTPS URL that receives the events.",
|
|
8815
|
+
"example": "https://example.com/hooks",
|
|
8816
|
+
"schema": {
|
|
8817
|
+
"type": "string",
|
|
8818
|
+
"minLength": 1,
|
|
8819
|
+
"maxLength": 2048,
|
|
8820
|
+
"description": "The HTTPS URL that receives the events."
|
|
8821
|
+
}
|
|
8822
|
+
},
|
|
8823
|
+
{
|
|
8824
|
+
"name": "description",
|
|
8825
|
+
"in": "body",
|
|
8826
|
+
"type": "string",
|
|
8827
|
+
"required": false,
|
|
8828
|
+
"description": "A note for people managing the endpoint. Null clears it.",
|
|
8829
|
+
"schema": {
|
|
8830
|
+
"type": [
|
|
8831
|
+
"string",
|
|
8832
|
+
"null"
|
|
8833
|
+
],
|
|
8834
|
+
"maxLength": 200,
|
|
8835
|
+
"description": "A note for people managing the endpoint. Null clears it."
|
|
8836
|
+
}
|
|
8837
|
+
},
|
|
8838
|
+
{
|
|
8839
|
+
"name": "eventTypes",
|
|
8840
|
+
"in": "body",
|
|
8841
|
+
"type": "json",
|
|
8842
|
+
"required": false,
|
|
8843
|
+
"description": "Send only these event types, from event-types. Null or an empty list means every event.",
|
|
8844
|
+
"example": [
|
|
8845
|
+
"workspace.member.joined"
|
|
8846
|
+
],
|
|
8847
|
+
"schema": {
|
|
8848
|
+
"type": [
|
|
8849
|
+
"array",
|
|
8850
|
+
"null"
|
|
8851
|
+
],
|
|
8852
|
+
"items": {
|
|
8853
|
+
"type": "string"
|
|
8854
|
+
},
|
|
8855
|
+
"maxItems": 100,
|
|
8856
|
+
"description": "Send only these event types, from event-types. Null or an empty list means every event."
|
|
8857
|
+
}
|
|
8858
|
+
}
|
|
8859
|
+
],
|
|
8860
|
+
"hasBody": true,
|
|
8861
|
+
"workspace": true,
|
|
8862
|
+
"acceptsApiKey": true,
|
|
8366
8863
|
"scope": "workspace.webhooks:write"
|
|
8367
8864
|
}
|
|
8368
8865
|
];
|
|
@@ -8452,14 +8949,15 @@ ${op.description}`);
|
|
|
8452
8949
|
if (op.workspace) {
|
|
8453
8950
|
command.option("--workspace <slug>", "act in this workspace for one call");
|
|
8454
8951
|
}
|
|
8455
|
-
if (op.cli.confirm)
|
|
8952
|
+
if (op.cli.confirm)
|
|
8953
|
+
command.option("--yes", "confirm an operation that cannot be undone");
|
|
8456
8954
|
command.option("--json", "machine-readable output");
|
|
8457
8955
|
command.action(async (...input) => {
|
|
8458
8956
|
const values = input.slice(0, op.cli.args.length);
|
|
8459
8957
|
const options = input[op.cli.args.length];
|
|
8460
8958
|
if (op.cli.confirm && !options.yes) {
|
|
8461
8959
|
throw new Error(
|
|
8462
|
-
`${op.summary} cannot be undone
|
|
8960
|
+
`${op.summary} cannot be undone. Run it again with --yes to confirm.`
|
|
8463
8961
|
);
|
|
8464
8962
|
}
|
|
8465
8963
|
const args = Object.fromEntries(
|
|
@@ -8610,7 +9108,7 @@ async function uploadPath(ctx, path2, workspace2) {
|
|
|
8610
9108
|
});
|
|
8611
9109
|
}
|
|
8612
9110
|
async function downloadBytes(ctx, id, workspace2) {
|
|
8613
|
-
const result = await ctx.client({ workspace: workspace2 }).GET("/files/{fileId}/
|
|
9111
|
+
const result = await ctx.client({ workspace: workspace2 }).GET("/files/{fileId}/download", {
|
|
8614
9112
|
params: { path: { fileId: id } },
|
|
8615
9113
|
parseAs: "arrayBuffer"
|
|
8616
9114
|
});
|
|
@@ -8622,7 +9120,7 @@ async function downloadBytes(ctx, id, workspace2) {
|
|
|
8622
9120
|
}
|
|
8623
9121
|
return new Uint8Array(result.data);
|
|
8624
9122
|
}
|
|
8625
|
-
function
|
|
9123
|
+
function localPath(dir, name) {
|
|
8626
9124
|
const root = resolve(dir);
|
|
8627
9125
|
const path2 = resolve(root, name);
|
|
8628
9126
|
if (path2 !== root && !path2.startsWith(root + sep)) {
|
|
@@ -8630,10 +9128,10 @@ function outputPath(dir, name) {
|
|
|
8630
9128
|
}
|
|
8631
9129
|
return path2;
|
|
8632
9130
|
}
|
|
8633
|
-
async function
|
|
9131
|
+
async function downloadSavedFiles(ctx, files, dir, workspace2) {
|
|
8634
9132
|
const saved = [];
|
|
8635
|
-
for (const file of files.filter((f) => f.
|
|
8636
|
-
const path2 =
|
|
9133
|
+
for (const file of files.filter((f) => f.origin === "saved")) {
|
|
9134
|
+
const path2 = localPath(dir, file.name);
|
|
8637
9135
|
mkdirSync2(dirname(path2), { recursive: true });
|
|
8638
9136
|
writeFileSync4(path2, await downloadBytes(ctx, file.id, workspace2));
|
|
8639
9137
|
saved.push(path2);
|
|
@@ -8648,7 +9146,7 @@ var fileCommands = (program3, ctx) => {
|
|
|
8648
9146
|
ctx.io.stdout(options.json ? json(file) : file.id);
|
|
8649
9147
|
}
|
|
8650
9148
|
);
|
|
8651
|
-
group.command("download <file-id>").description("
|
|
9149
|
+
group.command("download <file-id>").description("Download a file that a run received or saved").option("--out <path>", "where to save it").option("--workspace <slug>", "act in this workspace for one call").option("--json", "print the file and where it was saved").action(
|
|
8652
9150
|
async (id, options) => {
|
|
8653
9151
|
const client = ctx.client({ workspace: options.workspace });
|
|
8654
9152
|
const meta = await client.GET("/files/{fileId}", {
|
|
@@ -8662,19 +9160,29 @@ var fileCommands = (program3, ctx) => {
|
|
|
8662
9160
|
const path2 = options.out ?? join2(".", basename(meta.data.name) || meta.data.id);
|
|
8663
9161
|
mkdirSync2(dirname(resolve(path2)), { recursive: true });
|
|
8664
9162
|
writeFileSync4(path2, await downloadBytes(ctx, id, options.workspace));
|
|
8665
|
-
ctx.io.stdout(
|
|
9163
|
+
ctx.io.stdout(
|
|
9164
|
+
options.json ? json({ ...meta.data, path: path2 }) : `Downloaded ${path2}`
|
|
9165
|
+
);
|
|
8666
9166
|
}
|
|
8667
9167
|
);
|
|
8668
9168
|
};
|
|
8669
|
-
function
|
|
8670
|
-
return files.filter((f) => f.
|
|
8671
|
-
(f) => `
|
|
9169
|
+
function describeSavedFiles(files) {
|
|
9170
|
+
return files.filter((f) => f.origin === "saved").map(
|
|
9171
|
+
(f) => `Saved ${f.name}: ${f.downloadUrl ?? `${brand.name} files download ${f.id}`}`
|
|
8672
9172
|
);
|
|
8673
9173
|
}
|
|
8674
9174
|
|
|
8675
9175
|
// src/product/scripts.ts
|
|
8676
9176
|
import { spawnSync } from "node:child_process";
|
|
8677
|
-
import {
|
|
9177
|
+
import {
|
|
9178
|
+
closeSync,
|
|
9179
|
+
existsSync as existsSync3,
|
|
9180
|
+
fstatSync,
|
|
9181
|
+
openSync,
|
|
9182
|
+
readdirSync,
|
|
9183
|
+
readFileSync as readFileSync5,
|
|
9184
|
+
statSync
|
|
9185
|
+
} from "node:fs";
|
|
8678
9186
|
import { basename as basename2, join as join3, relative, resolve as resolve2 } from "node:path";
|
|
8679
9187
|
|
|
8680
9188
|
// node_modules/smol-toml/dist/error.js
|
|
@@ -9649,8 +10157,8 @@ function withName(result, folder) {
|
|
|
9649
10157
|
}
|
|
9650
10158
|
function inputSchemaForCommand(command) {
|
|
9651
10159
|
const optional2 = new Set(
|
|
9652
|
-
|
|
9653
|
-
(group) => [...group
|
|
10160
|
+
optionalGroups(command).flatMap(
|
|
10161
|
+
(group) => [...group.matchAll(/\{([A-Za-z_][\w-]*)\}/g)].map((m) => m[1])
|
|
9654
10162
|
)
|
|
9655
10163
|
);
|
|
9656
10164
|
const names = [
|
|
@@ -9666,9 +10174,22 @@ function inputSchemaForCommand(command) {
|
|
|
9666
10174
|
)
|
|
9667
10175
|
};
|
|
9668
10176
|
}
|
|
10177
|
+
function optionalGroups(command) {
|
|
10178
|
+
const groups = [];
|
|
10179
|
+
let from = 0;
|
|
10180
|
+
for (; ; ) {
|
|
10181
|
+
const open = command.indexOf("[", from);
|
|
10182
|
+
if (open === -1) break;
|
|
10183
|
+
const close = command.indexOf("]", open + 1);
|
|
10184
|
+
if (close === -1) break;
|
|
10185
|
+
groups.push(command.slice(open, close + 1));
|
|
10186
|
+
from = close + 1;
|
|
10187
|
+
}
|
|
10188
|
+
return groups;
|
|
10189
|
+
}
|
|
9669
10190
|
|
|
9670
10191
|
// src/product/scripts.ts
|
|
9671
|
-
var
|
|
10192
|
+
var MAX_SOURCE_BYTES = 1e7;
|
|
9672
10193
|
function readReadme(dir) {
|
|
9673
10194
|
for (const name of ["README.md", "readme.md", "Readme.md"]) {
|
|
9674
10195
|
try {
|
|
@@ -9682,11 +10203,14 @@ function localFolder(dir, files) {
|
|
|
9682
10203
|
return {
|
|
9683
10204
|
files,
|
|
9684
10205
|
read: (path2) => {
|
|
10206
|
+
let fd;
|
|
9685
10207
|
try {
|
|
9686
|
-
|
|
9687
|
-
return
|
|
10208
|
+
fd = openSync(join3(dir, path2), "r");
|
|
10209
|
+
return fstatSync(fd).size <= 1e6 ? readFileSync5(fd, "utf8") : null;
|
|
9688
10210
|
} catch {
|
|
9689
10211
|
return null;
|
|
10212
|
+
} finally {
|
|
10213
|
+
if (fd !== void 0) closeSync(fd);
|
|
9690
10214
|
}
|
|
9691
10215
|
},
|
|
9692
10216
|
executable: (path2) => {
|
|
@@ -9733,7 +10257,7 @@ function loadScriptDir(dir, flags = {}) {
|
|
|
9733
10257
|
return {
|
|
9734
10258
|
manifest,
|
|
9735
10259
|
files,
|
|
9736
|
-
|
|
10260
|
+
source: pack(dir, files),
|
|
9737
10261
|
readme: readReadme(dir),
|
|
9738
10262
|
detected: command ? null : detected,
|
|
9739
10263
|
explicit: {
|
|
@@ -9772,15 +10296,15 @@ function walk(root, dir) {
|
|
|
9772
10296
|
}
|
|
9773
10297
|
function pack(dir, files) {
|
|
9774
10298
|
const size = files.reduce((sum, f) => sum + statSync(join3(dir, f)).size, 0);
|
|
9775
|
-
if (size >
|
|
10299
|
+
if (size > MAX_SOURCE_BYTES * 5) {
|
|
9776
10300
|
throw new Error(
|
|
9777
|
-
`The folder holds ${(size / 1e6).toFixed(1)} MB of files
|
|
10301
|
+
`The folder holds ${(size / 1e6).toFixed(1)} MB of files. Leave out data and installed dependencies, which Reminix installs at upload.`
|
|
9778
10302
|
);
|
|
9779
10303
|
}
|
|
9780
10304
|
const tar = spawnSync("tar", ["-czf", "-", "--null", "-T", "-"], {
|
|
9781
10305
|
cwd: dir,
|
|
9782
10306
|
input: files.join("\0"),
|
|
9783
|
-
maxBuffer:
|
|
10307
|
+
maxBuffer: MAX_SOURCE_BYTES * 2,
|
|
9784
10308
|
// macOS: no AppleDouble (._*) files in the archive.
|
|
9785
10309
|
env: { ...process.env, COPYFILE_DISABLE: "1" }
|
|
9786
10310
|
});
|
|
@@ -9789,9 +10313,9 @@ function pack(dir, files) {
|
|
|
9789
10313
|
`Could not pack the folder: ${tar.stderr?.toString().trim() || tar.error?.message}`
|
|
9790
10314
|
);
|
|
9791
10315
|
}
|
|
9792
|
-
if (tar.stdout.length >
|
|
10316
|
+
if (tar.stdout.length > MAX_SOURCE_BYTES) {
|
|
9793
10317
|
throw new Error(
|
|
9794
|
-
`The packed folder is ${(tar.stdout.length / 1e6).toFixed(1)} MB
|
|
10318
|
+
`The packed folder is ${(tar.stdout.length / 1e6).toFixed(1)} MB, and the limit is ${MAX_SOURCE_BYTES / 1e6} MB. Leave out data and installed dependencies.`
|
|
9795
10319
|
);
|
|
9796
10320
|
}
|
|
9797
10321
|
return tar.stdout;
|
|
@@ -9838,88 +10362,88 @@ function describeDetected(manifest, detected) {
|
|
|
9838
10362
|
if (command) lines.push(` command ${command}`);
|
|
9839
10363
|
return lines.join("\n");
|
|
9840
10364
|
}
|
|
9841
|
-
async function publishFolder(ctx, dir, options) {
|
|
9842
|
-
const { manifest,
|
|
9843
|
-
if (options.
|
|
10365
|
+
async function publishFolder(ctx, dir, options, mode) {
|
|
10366
|
+
const { manifest, source, explicit, detected } = loadScriptDir(dir, options);
|
|
10367
|
+
if (options.dryRun) {
|
|
9844
10368
|
return {
|
|
9845
10369
|
slug: manifest.slug,
|
|
9846
10370
|
version: null,
|
|
9847
10371
|
script: null,
|
|
9848
10372
|
line: `${describeDetected(manifest, detected)}
|
|
9849
|
-
Nothing was uploaded (--
|
|
10373
|
+
Nothing was uploaded (--dry-run).`
|
|
9850
10374
|
};
|
|
9851
10375
|
}
|
|
9852
10376
|
const call3 = (method, path2, body) => rawRequest(ctx, { method, path: path2, body, workspace: options.workspace });
|
|
9853
10377
|
const slug = encodeURIComponent(manifest.slug);
|
|
9854
10378
|
if (options.number !== void 0) {
|
|
9855
|
-
const
|
|
9856
|
-
if (!Number.isInteger(
|
|
9857
|
-
throw new Error("--number: a version number, like --number 3");
|
|
9858
|
-
}
|
|
9859
|
-
if (options.draft) {
|
|
9860
|
-
throw new Error(
|
|
9861
|
-
"--number publishes a version already uploaded; leave out --draft"
|
|
9862
|
-
);
|
|
10379
|
+
const version2 = Number(options.number);
|
|
10380
|
+
if (!Number.isInteger(version2) || version2 < 1) {
|
|
10381
|
+
throw new Error("--number: a version's number, like --number 3");
|
|
9863
10382
|
}
|
|
9864
10383
|
const script2 = await call3(
|
|
9865
10384
|
"POST",
|
|
9866
|
-
`/v1/scripts/${slug}/versions/${
|
|
10385
|
+
`/v1/scripts/${slug}/versions/${version2}/publish`
|
|
9867
10386
|
);
|
|
9868
10387
|
const approveUrl2 = script2.approval?.approveUrl ?? null;
|
|
9869
10388
|
return {
|
|
9870
10389
|
slug: manifest.slug,
|
|
9871
|
-
version: {
|
|
10390
|
+
version: { version: version2 },
|
|
9872
10391
|
script: script2,
|
|
9873
|
-
line: approveUrl2 ? `Publishing ${manifest.slug} version ${
|
|
10392
|
+
line: approveUrl2 ? `Publishing ${manifest.slug} version ${version2} waits for a person's approval: ${approveUrl2}` : `Published ${manifest.slug} version ${version2}.`
|
|
9874
10393
|
};
|
|
9875
10394
|
}
|
|
9876
10395
|
const version = await call3("POST", `/v1/scripts/${slug}/versions`, {
|
|
9877
10396
|
command: manifest.command,
|
|
9878
|
-
|
|
10397
|
+
install: manifest.install ?? null,
|
|
9879
10398
|
inputSchema: manifest.inputSchema,
|
|
9880
10399
|
outputSchema: manifest.outputSchema ?? null,
|
|
9881
10400
|
hosts: manifest.hosts,
|
|
9882
10401
|
secrets: manifest.secrets,
|
|
9883
|
-
|
|
10402
|
+
envVars: manifest.envVars,
|
|
9884
10403
|
tags: manifest.tags,
|
|
9885
|
-
|
|
9886
|
-
|
|
10404
|
+
timeoutSeconds: manifest.timeoutSeconds,
|
|
10405
|
+
source: source.toString("base64"),
|
|
9887
10406
|
via: "cli",
|
|
9888
10407
|
create: true,
|
|
9889
10408
|
...explicit,
|
|
9890
|
-
publish:
|
|
10409
|
+
publish: mode === "publish"
|
|
9891
10410
|
});
|
|
9892
10411
|
const script = null;
|
|
9893
10412
|
const approveUrl = version.approval?.approveUrl ?? null;
|
|
9894
|
-
const line = approveUrl ? `Uploaded ${manifest.slug} version ${version.
|
|
10413
|
+
const line = approveUrl ? `Uploaded ${manifest.slug} version ${version.version}; publishing waits for a person's approval: ${approveUrl}` : mode === "upload" ? `Uploaded ${manifest.slug} version ${version.version} as a draft. Test it with \`${brand.name} run ${manifest.slug} --number ${version.version}\`, then publish it in the app or with \`${brand.name} publish --number ${version.version}\`.` : `Published ${manifest.slug} version ${version.version}.`;
|
|
9895
10414
|
const found = detected ? `${describeDetected(manifest, detected)}
|
|
9896
10415
|
` : "";
|
|
9897
10416
|
return { slug: manifest.slug, version, script, line: `${found}${line}` };
|
|
9898
10417
|
}
|
|
9899
|
-
var definePublish = (command, ctx) =>
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
)
|
|
9908
|
-
"
|
|
9909
|
-
|
|
9910
|
-
|
|
10418
|
+
var definePublish = (mode) => (command, ctx) => defineFolderOptions(
|
|
10419
|
+
mode === "publish" ? covers(
|
|
10420
|
+
command,
|
|
10421
|
+
"scripts.create",
|
|
10422
|
+
"scriptVersions.upload",
|
|
10423
|
+
"scriptVersions.publish"
|
|
10424
|
+
).option(
|
|
10425
|
+
"--number <n>",
|
|
10426
|
+
"publish version n, already uploaded (the draft you tested), instead of uploading (--version is the CLI's own)"
|
|
10427
|
+
) : covers(command, "scripts.create", "scriptVersions.upload"),
|
|
10428
|
+
ctx,
|
|
10429
|
+
mode
|
|
10430
|
+
);
|
|
10431
|
+
var defineFolderOptions = (command, ctx, mode) => command.option(
|
|
9911
10432
|
"--command <line>",
|
|
9912
10433
|
`how it runs, when the folder doesn't say: "python report.py {month}"`
|
|
9913
10434
|
).option("--name <name>", "the name people see (default: from the folder)").option(
|
|
9914
10435
|
"--slug <slug>",
|
|
9915
10436
|
"its id in URLs and commands (default: from the folder)"
|
|
9916
|
-
).option(
|
|
10437
|
+
).option(
|
|
10438
|
+
"--dry-run",
|
|
10439
|
+
`show what would be ${mode === "publish" ? "published" : "uploaded"}, and upload nothing`
|
|
10440
|
+
).option("--workspace <slug>", "act in this workspace for one call").option("--json", "machine-readable output").addHelpText(
|
|
9917
10441
|
"after",
|
|
9918
10442
|
`
|
|
9919
|
-
Publishes the folder as it is: it says how it runs (pyproject.toml, package.json,
|
|
10443
|
+
${mode === "publish" ? "Publishes" : "Uploads"} the folder as it is: it says how it runs (pyproject.toml, package.json,
|
|
9920
10444
|
or its one .py, .js, .ts or .sh file). Customize it with a reminix.json.
|
|
9921
|
-
Several folders
|
|
9922
|
-
subfolder that is one: \`${brand.name}
|
|
10445
|
+
Several folders go one after another; a folder of scripts does each
|
|
10446
|
+
subfolder that is one: \`${brand.name} ${mode} scripts/\` does them all.`
|
|
9923
10447
|
).action(
|
|
9924
10448
|
async (dirs, options) => {
|
|
9925
10449
|
const { folders, missing, skipped: skipped2 } = scriptFolders(dirs);
|
|
@@ -9930,7 +10454,7 @@ subfolder that is one: \`${brand.name} publish scripts/\` publishes them all.`
|
|
|
9930
10454
|
throw new Error("--number publishes one script: name one folder");
|
|
9931
10455
|
}
|
|
9932
10456
|
if (folders.length === 1 && missing.length === 0) {
|
|
9933
|
-
const result = await publishFolder(ctx, folders[0], options);
|
|
10457
|
+
const result = await publishFolder(ctx, folders[0], options, mode);
|
|
9934
10458
|
ctx.io.stdout(
|
|
9935
10459
|
options.json ? json({ version: result.version, script: result.script }) : result.line
|
|
9936
10460
|
);
|
|
@@ -9948,7 +10472,7 @@ subfolder that is one: \`${brand.name} publish scripts/\` publishes them all.`
|
|
|
9948
10472
|
}
|
|
9949
10473
|
for (const dir of folders) {
|
|
9950
10474
|
try {
|
|
9951
|
-
const result = await publishFolder(ctx, dir, options);
|
|
10475
|
+
const result = await publishFolder(ctx, dir, options, mode);
|
|
9952
10476
|
results.push({
|
|
9953
10477
|
dir,
|
|
9954
10478
|
version: result.version,
|
|
@@ -9967,20 +10491,20 @@ subfolder that is one: \`${brand.name} publish scripts/\` publishes them all.`
|
|
|
9967
10491
|
}
|
|
9968
10492
|
}
|
|
9969
10493
|
);
|
|
9970
|
-
var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions.
|
|
10494
|
+
var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions.testRun").option("--input <json>", "the inputs, as a JSON object", "{}").option(
|
|
9971
10495
|
"--file <input=path>",
|
|
9972
10496
|
"upload a file as a file input (repeat it for several)",
|
|
9973
10497
|
(value, all) => [...all, value],
|
|
9974
10498
|
[]
|
|
9975
10499
|
).option(
|
|
9976
10500
|
"--out <dir>",
|
|
9977
|
-
"
|
|
10501
|
+
"download the files the run saves into this folder (else their links are printed)"
|
|
9978
10502
|
).option(
|
|
9979
10503
|
"--number <n>",
|
|
9980
|
-
"test-run version n (a draft) instead of the published one"
|
|
10504
|
+
"test-run version n (a draft) instead of the published one (--version is the CLI's own)"
|
|
9981
10505
|
).option("--log", "also print what the run logged (to stderr)").option(
|
|
9982
10506
|
"--no-wait",
|
|
9983
|
-
"answer at once with a run
|
|
10507
|
+
"answer at once with a run awaiting approval or still running, instead of following it"
|
|
9984
10508
|
).option("--workspace <slug>", "act in this workspace for one call").option("--json", "print the whole run, not just its output").action(
|
|
9985
10509
|
async (slug, options) => {
|
|
9986
10510
|
let inputs;
|
|
@@ -10024,7 +10548,7 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
|
|
|
10024
10548
|
}
|
|
10025
10549
|
}
|
|
10026
10550
|
if (options.number !== void 0 && !/^[1-9]\d*$/.test(options.number)) {
|
|
10027
|
-
throw new Error("--number: a version number, like --number 2");
|
|
10551
|
+
throw new Error("--number: a version's number, like --number 2");
|
|
10028
10552
|
}
|
|
10029
10553
|
let run3 = await call3(
|
|
10030
10554
|
"POST",
|
|
@@ -10048,7 +10572,7 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
|
|
|
10048
10572
|
if (!options.log || run3.status === "awaiting_approval") return;
|
|
10049
10573
|
const { lines } = await call3(
|
|
10050
10574
|
"GET",
|
|
10051
|
-
`/v1/runs/${encodeURIComponent(run3.id)}/
|
|
10575
|
+
`/v1/runs/${encodeURIComponent(run3.id)}/log`
|
|
10052
10576
|
);
|
|
10053
10577
|
for (const line of lines.slice(printed)) ctx.io.stderr(line);
|
|
10054
10578
|
printed = Math.max(printed, lines.length);
|
|
@@ -10064,16 +10588,16 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
|
|
|
10064
10588
|
await printLog();
|
|
10065
10589
|
const files = run3.files ?? [];
|
|
10066
10590
|
if (options.out) {
|
|
10067
|
-
for (const path2 of await
|
|
10591
|
+
for (const path2 of await downloadSavedFiles(
|
|
10068
10592
|
ctx,
|
|
10069
10593
|
files,
|
|
10070
10594
|
options.out,
|
|
10071
10595
|
options.workspace
|
|
10072
10596
|
)) {
|
|
10073
|
-
ctx.io.stderr(`
|
|
10597
|
+
ctx.io.stderr(`Downloaded ${path2}`);
|
|
10074
10598
|
}
|
|
10075
10599
|
} else {
|
|
10076
|
-
for (const line of
|
|
10600
|
+
for (const line of describeSavedFiles(files)) ctx.io.stderr(line);
|
|
10077
10601
|
}
|
|
10078
10602
|
if (options.json) {
|
|
10079
10603
|
ctx.io.stdout(json(run3));
|
|
@@ -10096,22 +10620,31 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
|
|
|
10096
10620
|
);
|
|
10097
10621
|
var scriptCommands = (program3, ctx) => {
|
|
10098
10622
|
const group = program3.commands.find((c) => c.name() === "scripts") ?? program3.command("scripts").description("scripts commands");
|
|
10099
|
-
definePublish(group.command("publish [dir...]"), ctx).description(
|
|
10100
|
-
`Upload a folder's script and publish it
|
|
10623
|
+
definePublish("publish")(group.command("publish [dir...]"), ctx).description(
|
|
10624
|
+
`Upload a folder's script and publish it, so runs use that version. Shortcut: ${brand.name} publish`
|
|
10625
|
+
);
|
|
10626
|
+
definePublish("publish")(
|
|
10627
|
+
program3.command("publish [dir...]"),
|
|
10628
|
+
ctx
|
|
10629
|
+
).description(
|
|
10630
|
+
`Upload a folder's script and publish it. Short for ${brand.name} scripts publish`
|
|
10101
10631
|
);
|
|
10102
|
-
definePublish(
|
|
10103
|
-
`
|
|
10632
|
+
definePublish("upload")(group.command("upload [dir...]"), ctx).description(
|
|
10633
|
+
`Upload a folder's script as a draft version, to test before publishing (shortcut: ${brand.name} upload)`
|
|
10634
|
+
);
|
|
10635
|
+
definePublish("upload")(program3.command("upload [dir...]"), ctx).description(
|
|
10636
|
+
`Upload a folder's script as a draft version. Short for ${brand.name} scripts upload`
|
|
10104
10637
|
);
|
|
10105
10638
|
defineRun(group.command("run <slug>"), ctx).description(
|
|
10106
|
-
`Run a script and print its output
|
|
10639
|
+
`Run a script and print its output. Use --number to test a draft. Shortcut: ${brand.name} run`
|
|
10107
10640
|
);
|
|
10108
10641
|
defineRun(program3.command("run <slug>"), ctx).description(
|
|
10109
|
-
`
|
|
10642
|
+
`Run a script and print its output. Use --number to test a draft. Short for ${brand.name} scripts run`
|
|
10110
10643
|
);
|
|
10111
10644
|
};
|
|
10112
10645
|
|
|
10113
10646
|
// src/product/init.ts
|
|
10114
|
-
import {
|
|
10647
|
+
import { closeSync as closeSync2, openSync as openSync2, unlinkSync, writeFileSync as writeFileSync5 } from "node:fs";
|
|
10115
10648
|
import { basename as basename3, join as join4, resolve as resolve3 } from "node:path";
|
|
10116
10649
|
var INIT_HELP = `Say which file and how it runs, like: ${brand.name} init "python report.py --month {month}"`;
|
|
10117
10650
|
function commandFor(dir, given) {
|
|
@@ -10138,16 +10671,35 @@ function inputSchemaFor(command) {
|
|
|
10138
10671
|
)
|
|
10139
10672
|
};
|
|
10140
10673
|
}
|
|
10674
|
+
function createNew(path2) {
|
|
10675
|
+
try {
|
|
10676
|
+
return openSync2(path2, "wx");
|
|
10677
|
+
} catch (error) {
|
|
10678
|
+
if (error.code === "EEXIST") return null;
|
|
10679
|
+
throw error;
|
|
10680
|
+
}
|
|
10681
|
+
}
|
|
10141
10682
|
function scaffold(dir, given) {
|
|
10142
10683
|
const manifest = join4(dir, "reminix.json");
|
|
10143
|
-
|
|
10144
|
-
|
|
10684
|
+
const alreadyExists = () => new Error(`${manifest} already exists`);
|
|
10685
|
+
let command;
|
|
10686
|
+
try {
|
|
10687
|
+
command = commandFor(dir, given);
|
|
10688
|
+
} catch (error) {
|
|
10689
|
+
let probe;
|
|
10690
|
+
try {
|
|
10691
|
+
probe = createNew(manifest);
|
|
10692
|
+
} catch {
|
|
10693
|
+
throw error;
|
|
10694
|
+
}
|
|
10695
|
+
if (probe === null) throw alreadyExists();
|
|
10696
|
+
closeSync2(probe);
|
|
10697
|
+
unlinkSync(manifest);
|
|
10698
|
+
throw error;
|
|
10145
10699
|
}
|
|
10146
|
-
const command = commandFor(dir, given);
|
|
10147
10700
|
const detected = detectScript(localFolder(dir, scriptFiles(dir)));
|
|
10148
10701
|
const slug = (detected.ok ? detected.value.slug : void 0) ?? slugOf(basename3(resolve3(dir))) ?? "my-script";
|
|
10149
|
-
|
|
10150
|
-
writeFileSync5(
|
|
10702
|
+
writeNew(
|
|
10151
10703
|
manifest,
|
|
10152
10704
|
`${JSON.stringify(
|
|
10153
10705
|
{
|
|
@@ -10162,21 +10714,30 @@ function scaffold(dir, given) {
|
|
|
10162
10714
|
null,
|
|
10163
10715
|
2
|
|
10164
10716
|
)}
|
|
10165
|
-
|
|
10717
|
+
`,
|
|
10718
|
+
alreadyExists
|
|
10166
10719
|
);
|
|
10167
|
-
created
|
|
10168
|
-
|
|
10169
|
-
writeFileSync5(
|
|
10170
|
-
join4(dir, "README.md"),
|
|
10171
|
-
`# ${titleOf(slug)}
|
|
10720
|
+
const created = ["reminix.json"];
|
|
10721
|
+
const readme = `# ${titleOf(slug)}
|
|
10172
10722
|
|
|
10173
10723
|
What it does, when to use it, and what its inputs mean.
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
created.push("README.md");
|
|
10177
|
-
}
|
|
10724
|
+
`;
|
|
10725
|
+
if (writeNew(join4(dir, "README.md"), readme)) created.push("README.md");
|
|
10178
10726
|
return created;
|
|
10179
10727
|
}
|
|
10728
|
+
function writeNew(path2, content, onExists) {
|
|
10729
|
+
const fd = createNew(path2);
|
|
10730
|
+
if (fd === null) {
|
|
10731
|
+
if (onExists) throw onExists();
|
|
10732
|
+
return false;
|
|
10733
|
+
}
|
|
10734
|
+
try {
|
|
10735
|
+
writeFileSync5(fd, content);
|
|
10736
|
+
} finally {
|
|
10737
|
+
closeSync2(fd);
|
|
10738
|
+
}
|
|
10739
|
+
return true;
|
|
10740
|
+
}
|
|
10180
10741
|
var initCommand = (program3, ctx) => {
|
|
10181
10742
|
program3.command("init [command]").description("Make the script in this folder a Reminix script").addHelpText(
|
|
10182
10743
|
"after",
|
|
@@ -10195,7 +10756,10 @@ var secretCommands = (program3, ctx) => {
|
|
|
10195
10756
|
group.command("set <name>").description("Save a secret's value, read from stdin").requiredOption(
|
|
10196
10757
|
"--hosts <hosts>",
|
|
10197
10758
|
"the hosts it may be sent to, comma-separated (e.g. api.stripe.com)"
|
|
10198
|
-
).option(
|
|
10759
|
+
).option(
|
|
10760
|
+
"--allow-env-var",
|
|
10761
|
+
"let scripts read the value as an environment variable (off by default)"
|
|
10762
|
+
).option("--workspace <slug>", "act in this workspace for one call").option("--json", "machine-readable output").action(
|
|
10199
10763
|
async (name, options) => {
|
|
10200
10764
|
const value = (await ctx.io.stdin()).replace(/\r?\n$/, "");
|
|
10201
10765
|
if (!value) {
|
|
@@ -10209,7 +10773,7 @@ var secretCommands = (program3, ctx) => {
|
|
|
10209
10773
|
body: {
|
|
10210
10774
|
value,
|
|
10211
10775
|
hosts: options.hosts.split(",").map((h) => h.trim()).filter(Boolean),
|
|
10212
|
-
|
|
10776
|
+
allowEnvVar: options.allowEnvVar ?? false
|
|
10213
10777
|
},
|
|
10214
10778
|
workspace: options.workspace
|
|
10215
10779
|
});
|
|
@@ -10240,7 +10804,7 @@ function tokenEnvVar() {
|
|
|
10240
10804
|
function build(io) {
|
|
10241
10805
|
let actedIn = null;
|
|
10242
10806
|
let sending;
|
|
10243
|
-
const program3 = new Command().name(brand.name).description(
|
|
10807
|
+
const program3 = new Command().name(brand.name).description(`The ${brand.productName} CLI`).version("1.0.0-rc.9").addHelpText(
|
|
10244
10808
|
"after",
|
|
10245
10809
|
`
|
|
10246
10810
|
Token: \`${brand.name} login\` stores it in ~/.config/${brand.name}/; ${tokenEnvVar()} overrides.
|
|
@@ -10264,7 +10828,7 @@ Environment: --environment, else ${environmentEnvVar()}, else \`${brand.name} en
|
|
|
10264
10828
|
const settings = ctx.settings();
|
|
10265
10829
|
if (!settings.token) {
|
|
10266
10830
|
throw new Error(
|
|
10267
|
-
`not logged in
|
|
10831
|
+
`not logged in. Run \`${brand.name} login\` or set ${tokenEnvVar()}.`
|
|
10268
10832
|
);
|
|
10269
10833
|
}
|
|
10270
10834
|
if (!settings.token.startsWith("pat_")) {
|
|
@@ -10283,7 +10847,7 @@ Environment: --environment, else ${environmentEnvVar()}, else \`${brand.name} en
|
|
|
10283
10847
|
const workspace2 = options.workspace === false ? void 0 : options.workspace ?? settings.workspace;
|
|
10284
10848
|
if (options.workspace !== false && !workspace2) {
|
|
10285
10849
|
throw new Error(
|
|
10286
|
-
`no workspace selected
|
|
10850
|
+
`no workspace selected. Run \`${brand.name} workspace use <slug>\` or pass --workspace <slug>.`
|
|
10287
10851
|
);
|
|
10288
10852
|
}
|
|
10289
10853
|
return {
|