@reminix/cli 1.0.0-rc.7 → 1.0.0-rc.8
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 +153 -0
- package/dist/reminix.mjs +1116 -668
- 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", "script", "origin", "q"], "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: {
|
|
@@ -849,9 +914,9 @@ function resources(client) {
|
|
|
849
914
|
/** List runs */
|
|
850
915
|
(input, options) => call(client, { "method": "get", "path": "/runs", "query": ["limit", "cursor", "script"], "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
|
)
|
|
@@ -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 `?q=` to match file names. Each file comes with a download link that works for an hour. Paginate with the opaque `nextCursor` token.",
|
|
5534
5643
|
"fields": [
|
|
5535
5644
|
{
|
|
5536
5645
|
"name": "limit",
|
|
@@ -5563,27 +5672,27 @@ var OPERATIONS = [
|
|
|
5563
5672
|
"in": "query",
|
|
5564
5673
|
"type": "string",
|
|
5565
5674
|
"required": false,
|
|
5566
|
-
"description": "Only files from this script's runs
|
|
5675
|
+
"description": "Only files from this script's runs, by its slug.",
|
|
5567
5676
|
"example": "monthly-report",
|
|
5568
5677
|
"schema": {
|
|
5569
5678
|
"type": "string",
|
|
5570
|
-
"description": "Only files from this script's runs
|
|
5679
|
+
"description": "Only files from this script's runs, by its slug."
|
|
5571
5680
|
}
|
|
5572
5681
|
},
|
|
5573
5682
|
{
|
|
5574
|
-
"name": "
|
|
5683
|
+
"name": "origin",
|
|
5575
5684
|
"in": "query",
|
|
5576
5685
|
"type": "string",
|
|
5577
5686
|
"required": false,
|
|
5578
|
-
"description": "`
|
|
5687
|
+
"description": "Which files to list: `saved` for files runs saved (the default), `input` for files runs took as inputs, or `all` for both.",
|
|
5579
5688
|
"schema": {
|
|
5580
5689
|
"type": "string",
|
|
5581
5690
|
"enum": [
|
|
5582
|
-
"
|
|
5583
|
-
"
|
|
5691
|
+
"input",
|
|
5692
|
+
"saved",
|
|
5584
5693
|
"all"
|
|
5585
5694
|
],
|
|
5586
|
-
"description": "`
|
|
5695
|
+
"description": "Which files to list: `saved` for files runs saved (the default), `input` for files runs took as inputs, or `all` for both."
|
|
5587
5696
|
}
|
|
5588
5697
|
},
|
|
5589
5698
|
{
|
|
@@ -5591,19 +5700,58 @@ var OPERATIONS = [
|
|
|
5591
5700
|
"in": "query",
|
|
5592
5701
|
"type": "string",
|
|
5593
5702
|
"required": false,
|
|
5594
|
-
"description": "Only files whose name contains this.",
|
|
5703
|
+
"description": "Only files whose name contains this text.",
|
|
5595
5704
|
"example": "revenue",
|
|
5596
5705
|
"schema": {
|
|
5597
5706
|
"type": "string",
|
|
5598
5707
|
"maxLength": 200,
|
|
5599
|
-
"description": "Only files whose name contains this."
|
|
5708
|
+
"description": "Only files whose name contains this text."
|
|
5600
5709
|
}
|
|
5601
5710
|
}
|
|
5602
5711
|
],
|
|
5603
5712
|
"hasBody": false,
|
|
5604
5713
|
"workspace": true,
|
|
5714
|
+
"acceptsApiKey": true,
|
|
5605
5715
|
"scope": "runs:read"
|
|
5606
5716
|
},
|
|
5717
|
+
{
|
|
5718
|
+
"operationId": "files.upload",
|
|
5719
|
+
"method": "post",
|
|
5720
|
+
"path": "/files",
|
|
5721
|
+
"summary": "Upload a file",
|
|
5722
|
+
"cli": {
|
|
5723
|
+
"command": "files upload",
|
|
5724
|
+
"args": [],
|
|
5725
|
+
"confirm": false,
|
|
5726
|
+
"sample": "reminix files upload ./adjustments.csv"
|
|
5727
|
+
},
|
|
5728
|
+
"mcp": {
|
|
5729
|
+
"exposed": false,
|
|
5730
|
+
"reason": "Takes raw bytes, which an agent's tool call can't carry; agents pass an https link as the file input instead."
|
|
5731
|
+
},
|
|
5732
|
+
"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.',
|
|
5733
|
+
"fields": [
|
|
5734
|
+
{
|
|
5735
|
+
"name": "name",
|
|
5736
|
+
"in": "query",
|
|
5737
|
+
"type": "string",
|
|
5738
|
+
"required": true,
|
|
5739
|
+
"description": "The file's name.",
|
|
5740
|
+
"example": "adjustments.csv",
|
|
5741
|
+
"schema": {
|
|
5742
|
+
"type": "string",
|
|
5743
|
+
"minLength": 1,
|
|
5744
|
+
"maxLength": 500,
|
|
5745
|
+
"description": "The file's name."
|
|
5746
|
+
}
|
|
5747
|
+
}
|
|
5748
|
+
],
|
|
5749
|
+
"hasBody": false,
|
|
5750
|
+
"rawBody": "application/octet-stream",
|
|
5751
|
+
"workspace": true,
|
|
5752
|
+
"acceptsApiKey": true,
|
|
5753
|
+
"scope": "runs:write"
|
|
5754
|
+
},
|
|
5607
5755
|
{
|
|
5608
5756
|
"operationId": "runs.cancel",
|
|
5609
5757
|
"method": "post",
|
|
@@ -5625,20 +5773,24 @@ var OPERATIONS = [
|
|
|
5625
5773
|
"idempotentHint": false
|
|
5626
5774
|
}
|
|
5627
5775
|
},
|
|
5628
|
-
"description": "
|
|
5776
|
+
"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
5777
|
"fields": [
|
|
5630
5778
|
{
|
|
5631
5779
|
"name": "runId",
|
|
5632
5780
|
"in": "path",
|
|
5633
5781
|
"type": "string",
|
|
5634
5782
|
"required": true,
|
|
5783
|
+
"description": "The run's ID.",
|
|
5784
|
+
"example": "run_7b1a\u2026",
|
|
5635
5785
|
"schema": {
|
|
5636
|
-
"type": "string"
|
|
5786
|
+
"type": "string",
|
|
5787
|
+
"description": "The run's ID."
|
|
5637
5788
|
}
|
|
5638
5789
|
}
|
|
5639
5790
|
],
|
|
5640
5791
|
"hasBody": false,
|
|
5641
5792
|
"workspace": true,
|
|
5793
|
+
"acceptsApiKey": true,
|
|
5642
5794
|
"scope": "runs:write"
|
|
5643
5795
|
},
|
|
5644
5796
|
{
|
|
@@ -5663,16 +5815,18 @@ var OPERATIONS = [
|
|
|
5663
5815
|
"idempotentHint": false
|
|
5664
5816
|
}
|
|
5665
5817
|
},
|
|
5666
|
-
"description": "Runs the script's
|
|
5818
|
+
"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
5819
|
"fields": [
|
|
5668
5820
|
{
|
|
5669
5821
|
"name": "slug",
|
|
5670
5822
|
"in": "path",
|
|
5671
5823
|
"type": "string",
|
|
5672
5824
|
"required": true,
|
|
5825
|
+
"description": "The slug's ID.",
|
|
5673
5826
|
"example": "unlock-account",
|
|
5674
5827
|
"schema": {
|
|
5675
|
-
"type": "string"
|
|
5828
|
+
"type": "string",
|
|
5829
|
+
"description": "The slug's ID."
|
|
5676
5830
|
}
|
|
5677
5831
|
},
|
|
5678
5832
|
{
|
|
@@ -5680,7 +5834,7 @@ var OPERATIONS = [
|
|
|
5680
5834
|
"in": "body",
|
|
5681
5835
|
"type": "json",
|
|
5682
5836
|
"required": false,
|
|
5683
|
-
"description": "The script's inputs, by name.
|
|
5837
|
+
"description": "The script's inputs, by name. The default is no inputs.",
|
|
5684
5838
|
"example": {
|
|
5685
5839
|
"email": "jane@example.com"
|
|
5686
5840
|
},
|
|
@@ -5688,7 +5842,7 @@ var OPERATIONS = [
|
|
|
5688
5842
|
"type": "object",
|
|
5689
5843
|
"additionalProperties": {},
|
|
5690
5844
|
"default": {},
|
|
5691
|
-
"description": "The script's inputs, by name.
|
|
5845
|
+
"description": "The script's inputs, by name. The default is no inputs."
|
|
5692
5846
|
}
|
|
5693
5847
|
},
|
|
5694
5848
|
{
|
|
@@ -5696,19 +5850,20 @@ var OPERATIONS = [
|
|
|
5696
5850
|
"in": "body",
|
|
5697
5851
|
"type": "string",
|
|
5698
5852
|
"required": false,
|
|
5699
|
-
"description": "
|
|
5853
|
+
"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
5854
|
"schema": {
|
|
5701
5855
|
"type": "string",
|
|
5702
5856
|
"enum": [
|
|
5703
5857
|
"api",
|
|
5704
5858
|
"cli"
|
|
5705
5859
|
],
|
|
5706
|
-
"description": "
|
|
5860
|
+
"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
5861
|
}
|
|
5708
5862
|
}
|
|
5709
5863
|
],
|
|
5710
5864
|
"hasBody": true,
|
|
5711
5865
|
"workspace": true,
|
|
5866
|
+
"acceptsApiKey": true,
|
|
5712
5867
|
"scope": "runs:write"
|
|
5713
5868
|
},
|
|
5714
5869
|
{
|
|
@@ -5732,20 +5887,24 @@ var OPERATIONS = [
|
|
|
5732
5887
|
"idempotentHint": true
|
|
5733
5888
|
}
|
|
5734
5889
|
},
|
|
5735
|
-
"description": "
|
|
5890
|
+
"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
5891
|
"fields": [
|
|
5737
5892
|
{
|
|
5738
5893
|
"name": "runId",
|
|
5739
5894
|
"in": "path",
|
|
5740
5895
|
"type": "string",
|
|
5741
5896
|
"required": true,
|
|
5897
|
+
"description": "The run's ID.",
|
|
5898
|
+
"example": "run_7b1a\u2026",
|
|
5742
5899
|
"schema": {
|
|
5743
|
-
"type": "string"
|
|
5900
|
+
"type": "string",
|
|
5901
|
+
"description": "The run's ID."
|
|
5744
5902
|
}
|
|
5745
5903
|
}
|
|
5746
5904
|
],
|
|
5747
5905
|
"hasBody": false,
|
|
5748
5906
|
"workspace": true,
|
|
5907
|
+
"acceptsApiKey": true,
|
|
5749
5908
|
"scope": "runs:read"
|
|
5750
5909
|
},
|
|
5751
5910
|
{
|
|
@@ -5767,7 +5926,7 @@ var OPERATIONS = [
|
|
|
5767
5926
|
"idempotentHint": true
|
|
5768
5927
|
}
|
|
5769
5928
|
},
|
|
5770
|
-
"description": "
|
|
5929
|
+
"description": "Lists the workspace's runs, newest first. Pass `?script=<slug>` for one script's runs. Paginate with the opaque `nextCursor` token.",
|
|
5771
5930
|
"fields": [
|
|
5772
5931
|
{
|
|
5773
5932
|
"name": "limit",
|
|
@@ -5800,25 +5959,26 @@ var OPERATIONS = [
|
|
|
5800
5959
|
"in": "query",
|
|
5801
5960
|
"type": "string",
|
|
5802
5961
|
"required": false,
|
|
5803
|
-
"description": "Only this script's runs
|
|
5962
|
+
"description": "Only this script's runs, by its slug.",
|
|
5804
5963
|
"example": "unlock-account",
|
|
5805
5964
|
"schema": {
|
|
5806
5965
|
"type": "string",
|
|
5807
|
-
"description": "Only this script's runs
|
|
5966
|
+
"description": "Only this script's runs, by its slug."
|
|
5808
5967
|
}
|
|
5809
5968
|
}
|
|
5810
5969
|
],
|
|
5811
5970
|
"hasBody": false,
|
|
5812
5971
|
"workspace": true,
|
|
5972
|
+
"acceptsApiKey": true,
|
|
5813
5973
|
"scope": "runs:read"
|
|
5814
5974
|
},
|
|
5815
5975
|
{
|
|
5816
|
-
"operationId": "runs.
|
|
5976
|
+
"operationId": "runs.log",
|
|
5817
5977
|
"method": "get",
|
|
5818
|
-
"path": "/runs/{runId}/
|
|
5978
|
+
"path": "/runs/{runId}/log",
|
|
5819
5979
|
"summary": "Get a run's log",
|
|
5820
5980
|
"cli": {
|
|
5821
|
-
"command": "runs
|
|
5981
|
+
"command": "runs log",
|
|
5822
5982
|
"args": [
|
|
5823
5983
|
"runId"
|
|
5824
5984
|
],
|
|
@@ -5826,27 +5986,31 @@ var OPERATIONS = [
|
|
|
5826
5986
|
},
|
|
5827
5987
|
"mcp": {
|
|
5828
5988
|
"exposed": true,
|
|
5829
|
-
"name": "
|
|
5989
|
+
"name": "runs_log",
|
|
5830
5990
|
"hints": {
|
|
5831
5991
|
"readOnlyHint": true,
|
|
5832
5992
|
"destructiveHint": false,
|
|
5833
5993
|
"idempotentHint": true
|
|
5834
5994
|
}
|
|
5835
5995
|
},
|
|
5836
|
-
"description": "
|
|
5996
|
+
"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
5997
|
"fields": [
|
|
5838
5998
|
{
|
|
5839
5999
|
"name": "runId",
|
|
5840
6000
|
"in": "path",
|
|
5841
6001
|
"type": "string",
|
|
5842
6002
|
"required": true,
|
|
6003
|
+
"description": "The run's ID.",
|
|
6004
|
+
"example": "run_7b1a\u2026",
|
|
5843
6005
|
"schema": {
|
|
5844
|
-
"type": "string"
|
|
6006
|
+
"type": "string",
|
|
6007
|
+
"description": "The run's ID."
|
|
5845
6008
|
}
|
|
5846
6009
|
}
|
|
5847
6010
|
],
|
|
5848
6011
|
"hasBody": false,
|
|
5849
6012
|
"workspace": true,
|
|
6013
|
+
"acceptsApiKey": true,
|
|
5850
6014
|
"scope": "runs:read"
|
|
5851
6015
|
},
|
|
5852
6016
|
{
|
|
@@ -5863,18 +6027,20 @@ var OPERATIONS = [
|
|
|
5863
6027
|
},
|
|
5864
6028
|
"mcp": {
|
|
5865
6029
|
"exposed": false,
|
|
5866
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
6030
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
5867
6031
|
},
|
|
5868
|
-
"description": "
|
|
6032
|
+
"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
6033
|
"fields": [
|
|
5870
6034
|
{
|
|
5871
6035
|
"name": "slug",
|
|
5872
6036
|
"in": "path",
|
|
5873
6037
|
"type": "string",
|
|
5874
6038
|
"required": true,
|
|
6039
|
+
"description": "The slug's ID.",
|
|
5875
6040
|
"example": "monthly-report",
|
|
5876
6041
|
"schema": {
|
|
5877
|
-
"type": "string"
|
|
6042
|
+
"type": "string",
|
|
6043
|
+
"description": "The slug's ID."
|
|
5878
6044
|
}
|
|
5879
6045
|
},
|
|
5880
6046
|
{
|
|
@@ -5910,11 +6076,11 @@ var OPERATIONS = [
|
|
|
5910
6076
|
"in": "body",
|
|
5911
6077
|
"type": "string",
|
|
5912
6078
|
"required": false,
|
|
5913
|
-
"description": "The timezone the cron is read in.
|
|
6079
|
+
"description": "The timezone the cron is read in. The default is UTC.",
|
|
5914
6080
|
"example": "Europe/Berlin",
|
|
5915
6081
|
"schema": {
|
|
5916
6082
|
"type": "string",
|
|
5917
|
-
"description": "The timezone the cron is read in.
|
|
6083
|
+
"description": "The timezone the cron is read in. The default is UTC."
|
|
5918
6084
|
}
|
|
5919
6085
|
},
|
|
5920
6086
|
{
|
|
@@ -5934,15 +6100,16 @@ var OPERATIONS = [
|
|
|
5934
6100
|
"in": "body",
|
|
5935
6101
|
"type": "string",
|
|
5936
6102
|
"required": false,
|
|
5937
|
-
"description": "The environment
|
|
6103
|
+
"description": "The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment.",
|
|
5938
6104
|
"schema": {
|
|
5939
6105
|
"type": "string",
|
|
5940
|
-
"description": "The environment
|
|
6106
|
+
"description": "The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment."
|
|
5941
6107
|
}
|
|
5942
6108
|
}
|
|
5943
6109
|
],
|
|
5944
6110
|
"hasBody": true,
|
|
5945
6111
|
"workspace": true,
|
|
6112
|
+
"acceptsApiKey": false,
|
|
5946
6113
|
"scope": "scripts:write"
|
|
5947
6114
|
},
|
|
5948
6115
|
{
|
|
@@ -5960,18 +6127,20 @@ var OPERATIONS = [
|
|
|
5960
6127
|
},
|
|
5961
6128
|
"mcp": {
|
|
5962
6129
|
"exposed": false,
|
|
5963
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
6130
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
5964
6131
|
},
|
|
5965
|
-
"description": "
|
|
6132
|
+
"description": "Deletes a schedule. The schedule's creator, a workspace owner or admin, or a workspace API key can delete it.",
|
|
5966
6133
|
"fields": [
|
|
5967
6134
|
{
|
|
5968
6135
|
"name": "slug",
|
|
5969
6136
|
"in": "path",
|
|
5970
6137
|
"type": "string",
|
|
5971
6138
|
"required": true,
|
|
6139
|
+
"description": "The slug's ID.",
|
|
5972
6140
|
"example": "monthly-report",
|
|
5973
6141
|
"schema": {
|
|
5974
|
-
"type": "string"
|
|
6142
|
+
"type": "string",
|
|
6143
|
+
"description": "The slug's ID."
|
|
5975
6144
|
}
|
|
5976
6145
|
},
|
|
5977
6146
|
{
|
|
@@ -5979,13 +6148,17 @@ var OPERATIONS = [
|
|
|
5979
6148
|
"in": "path",
|
|
5980
6149
|
"type": "string",
|
|
5981
6150
|
"required": true,
|
|
6151
|
+
"description": "The schedule's ID.",
|
|
6152
|
+
"example": "sch_2b9f\u2026",
|
|
5982
6153
|
"schema": {
|
|
5983
|
-
"type": "string"
|
|
6154
|
+
"type": "string",
|
|
6155
|
+
"description": "The schedule's ID."
|
|
5984
6156
|
}
|
|
5985
6157
|
}
|
|
5986
6158
|
],
|
|
5987
6159
|
"hasBody": false,
|
|
5988
6160
|
"workspace": true,
|
|
6161
|
+
"acceptsApiKey": true,
|
|
5989
6162
|
"scope": "scripts:write"
|
|
5990
6163
|
},
|
|
5991
6164
|
{
|
|
@@ -6009,21 +6182,24 @@ var OPERATIONS = [
|
|
|
6009
6182
|
"idempotentHint": true
|
|
6010
6183
|
}
|
|
6011
6184
|
},
|
|
6012
|
-
"description": "
|
|
6185
|
+
"description": "Lists a script's schedules, with when each one runs next.",
|
|
6013
6186
|
"fields": [
|
|
6014
6187
|
{
|
|
6015
6188
|
"name": "slug",
|
|
6016
6189
|
"in": "path",
|
|
6017
6190
|
"type": "string",
|
|
6018
6191
|
"required": true,
|
|
6192
|
+
"description": "The slug's ID.",
|
|
6019
6193
|
"example": "monthly-report",
|
|
6020
6194
|
"schema": {
|
|
6021
|
-
"type": "string"
|
|
6195
|
+
"type": "string",
|
|
6196
|
+
"description": "The slug's ID."
|
|
6022
6197
|
}
|
|
6023
6198
|
}
|
|
6024
6199
|
],
|
|
6025
6200
|
"hasBody": false,
|
|
6026
6201
|
"workspace": true,
|
|
6202
|
+
"acceptsApiKey": true,
|
|
6027
6203
|
"scope": "scripts:read"
|
|
6028
6204
|
},
|
|
6029
6205
|
{
|
|
@@ -6041,18 +6217,20 @@ var OPERATIONS = [
|
|
|
6041
6217
|
},
|
|
6042
6218
|
"mcp": {
|
|
6043
6219
|
"exposed": false,
|
|
6044
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
6220
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
6045
6221
|
},
|
|
6046
|
-
"description": "
|
|
6222
|
+
"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
6223
|
"fields": [
|
|
6048
6224
|
{
|
|
6049
6225
|
"name": "slug",
|
|
6050
6226
|
"in": "path",
|
|
6051
6227
|
"type": "string",
|
|
6052
6228
|
"required": true,
|
|
6229
|
+
"description": "The slug's ID.",
|
|
6053
6230
|
"example": "monthly-report",
|
|
6054
6231
|
"schema": {
|
|
6055
|
-
"type": "string"
|
|
6232
|
+
"type": "string",
|
|
6233
|
+
"description": "The slug's ID."
|
|
6056
6234
|
}
|
|
6057
6235
|
},
|
|
6058
6236
|
{
|
|
@@ -6060,8 +6238,11 @@ var OPERATIONS = [
|
|
|
6060
6238
|
"in": "path",
|
|
6061
6239
|
"type": "string",
|
|
6062
6240
|
"required": true,
|
|
6241
|
+
"description": "The schedule's ID.",
|
|
6242
|
+
"example": "sch_2b9f\u2026",
|
|
6063
6243
|
"schema": {
|
|
6064
|
-
"type": "string"
|
|
6244
|
+
"type": "string",
|
|
6245
|
+
"description": "The schedule's ID."
|
|
6065
6246
|
}
|
|
6066
6247
|
},
|
|
6067
6248
|
{
|
|
@@ -6096,11 +6277,11 @@ var OPERATIONS = [
|
|
|
6096
6277
|
"in": "body",
|
|
6097
6278
|
"type": "string",
|
|
6098
6279
|
"required": false,
|
|
6099
|
-
"description": "The timezone the cron is read in.
|
|
6280
|
+
"description": "The timezone the cron is read in. The default is UTC.",
|
|
6100
6281
|
"example": "Europe/Berlin",
|
|
6101
6282
|
"schema": {
|
|
6102
6283
|
"type": "string",
|
|
6103
|
-
"description": "The timezone the cron is read in.
|
|
6284
|
+
"description": "The timezone the cron is read in. The default is UTC."
|
|
6104
6285
|
}
|
|
6105
6286
|
},
|
|
6106
6287
|
{
|
|
@@ -6120,10 +6301,10 @@ var OPERATIONS = [
|
|
|
6120
6301
|
"in": "body",
|
|
6121
6302
|
"type": "boolean",
|
|
6122
6303
|
"required": false,
|
|
6123
|
-
"description": "Whether
|
|
6304
|
+
"description": "Whether the schedule runs. With `false`, it's disabled.",
|
|
6124
6305
|
"schema": {
|
|
6125
6306
|
"type": "boolean",
|
|
6126
|
-
"description": "Whether
|
|
6307
|
+
"description": "Whether the schedule runs. With `false`, it's disabled."
|
|
6127
6308
|
}
|
|
6128
6309
|
},
|
|
6129
6310
|
{
|
|
@@ -6131,15 +6312,16 @@ var OPERATIONS = [
|
|
|
6131
6312
|
"in": "body",
|
|
6132
6313
|
"type": "string",
|
|
6133
6314
|
"required": false,
|
|
6134
|
-
"description": "
|
|
6315
|
+
"description": "Another environment for the schedule's runs to use.",
|
|
6135
6316
|
"schema": {
|
|
6136
6317
|
"type": "string",
|
|
6137
|
-
"description": "
|
|
6318
|
+
"description": "Another environment for the schedule's runs to use."
|
|
6138
6319
|
}
|
|
6139
6320
|
}
|
|
6140
6321
|
],
|
|
6141
6322
|
"hasBody": true,
|
|
6142
6323
|
"workspace": true,
|
|
6324
|
+
"acceptsApiKey": true,
|
|
6143
6325
|
"scope": "scripts:write"
|
|
6144
6326
|
},
|
|
6145
6327
|
{
|
|
@@ -6156,23 +6338,26 @@ var OPERATIONS = [
|
|
|
6156
6338
|
},
|
|
6157
6339
|
"mcp": {
|
|
6158
6340
|
"exposed": false,
|
|
6159
|
-
"reason": "Stopping a script the team relies on is a person's decision
|
|
6341
|
+
"reason": "Stopping a script the team relies on is a person's decision. An agent asks a person to."
|
|
6160
6342
|
},
|
|
6161
|
-
"description": "
|
|
6343
|
+
"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
6344
|
"fields": [
|
|
6163
6345
|
{
|
|
6164
6346
|
"name": "slug",
|
|
6165
6347
|
"in": "path",
|
|
6166
6348
|
"type": "string",
|
|
6167
6349
|
"required": true,
|
|
6350
|
+
"description": "The slug's ID.",
|
|
6168
6351
|
"example": "unlock-account",
|
|
6169
6352
|
"schema": {
|
|
6170
|
-
"type": "string"
|
|
6353
|
+
"type": "string",
|
|
6354
|
+
"description": "The slug's ID."
|
|
6171
6355
|
}
|
|
6172
6356
|
}
|
|
6173
6357
|
],
|
|
6174
6358
|
"hasBody": false,
|
|
6175
6359
|
"workspace": true,
|
|
6360
|
+
"acceptsApiKey": true,
|
|
6176
6361
|
"scope": "scripts:write"
|
|
6177
6362
|
},
|
|
6178
6363
|
{
|
|
@@ -6194,18 +6379,18 @@ var OPERATIONS = [
|
|
|
6194
6379
|
"idempotentHint": false
|
|
6195
6380
|
}
|
|
6196
6381
|
},
|
|
6197
|
-
"description": "Creates an empty script
|
|
6382
|
+
"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
6383
|
"fields": [
|
|
6199
6384
|
{
|
|
6200
6385
|
"name": "slug",
|
|
6201
6386
|
"in": "body",
|
|
6202
6387
|
"type": "string",
|
|
6203
6388
|
"required": true,
|
|
6204
|
-
"description": "
|
|
6389
|
+
"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
6390
|
"example": "unlock-account",
|
|
6206
6391
|
"schema": {
|
|
6207
6392
|
"type": "string",
|
|
6208
|
-
"description": "
|
|
6393
|
+
"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
6394
|
}
|
|
6210
6395
|
},
|
|
6211
6396
|
{
|
|
@@ -6213,13 +6398,13 @@ var OPERATIONS = [
|
|
|
6213
6398
|
"in": "body",
|
|
6214
6399
|
"type": "string",
|
|
6215
6400
|
"required": true,
|
|
6216
|
-
"description": "
|
|
6401
|
+
"description": "The name people see in the app.",
|
|
6217
6402
|
"example": "Unlock an account",
|
|
6218
6403
|
"schema": {
|
|
6219
6404
|
"type": "string",
|
|
6220
6405
|
"minLength": 1,
|
|
6221
6406
|
"maxLength": 100,
|
|
6222
|
-
"description": "
|
|
6407
|
+
"description": "The name people see in the app."
|
|
6223
6408
|
}
|
|
6224
6409
|
},
|
|
6225
6410
|
{
|
|
@@ -6227,16 +6412,18 @@ var OPERATIONS = [
|
|
|
6227
6412
|
"in": "body",
|
|
6228
6413
|
"type": "string",
|
|
6229
6414
|
"required": false,
|
|
6230
|
-
"description": "What
|
|
6415
|
+
"description": "What the script does, in a sentence or two.",
|
|
6416
|
+
"example": "Unlocks a customer's account after too many failed sign-ins.",
|
|
6231
6417
|
"schema": {
|
|
6232
6418
|
"type": "string",
|
|
6233
6419
|
"maxLength": 1e3,
|
|
6234
|
-
"description": "What
|
|
6420
|
+
"description": "What the script does, in a sentence or two."
|
|
6235
6421
|
}
|
|
6236
6422
|
}
|
|
6237
6423
|
],
|
|
6238
6424
|
"hasBody": true,
|
|
6239
6425
|
"workspace": true,
|
|
6426
|
+
"acceptsApiKey": true,
|
|
6240
6427
|
"scope": "scripts:write"
|
|
6241
6428
|
},
|
|
6242
6429
|
{
|
|
@@ -6260,21 +6447,24 @@ var OPERATIONS = [
|
|
|
6260
6447
|
"idempotentHint": true
|
|
6261
6448
|
}
|
|
6262
6449
|
},
|
|
6263
|
-
"description": "
|
|
6450
|
+
"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
6451
|
"fields": [
|
|
6265
6452
|
{
|
|
6266
6453
|
"name": "slug",
|
|
6267
6454
|
"in": "path",
|
|
6268
6455
|
"type": "string",
|
|
6269
6456
|
"required": true,
|
|
6457
|
+
"description": "The slug's ID.",
|
|
6270
6458
|
"example": "unlock-account",
|
|
6271
6459
|
"schema": {
|
|
6272
|
-
"type": "string"
|
|
6460
|
+
"type": "string",
|
|
6461
|
+
"description": "The slug's ID."
|
|
6273
6462
|
}
|
|
6274
6463
|
}
|
|
6275
6464
|
],
|
|
6276
6465
|
"hasBody": false,
|
|
6277
6466
|
"workspace": true,
|
|
6467
|
+
"acceptsApiKey": true,
|
|
6278
6468
|
"scope": "scripts:read"
|
|
6279
6469
|
},
|
|
6280
6470
|
{
|
|
@@ -6296,7 +6486,7 @@ var OPERATIONS = [
|
|
|
6296
6486
|
"idempotentHint": true
|
|
6297
6487
|
}
|
|
6298
6488
|
},
|
|
6299
|
-
"description": "
|
|
6489
|
+
"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
6490
|
"fields": [
|
|
6301
6491
|
{
|
|
6302
6492
|
"name": "limit",
|
|
@@ -6329,11 +6519,11 @@ var OPERATIONS = [
|
|
|
6329
6519
|
"in": "query",
|
|
6330
6520
|
"type": "string",
|
|
6331
6521
|
"required": false,
|
|
6332
|
-
"description": "
|
|
6522
|
+
"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
6523
|
"schema": {
|
|
6334
6524
|
"type": "string",
|
|
6335
6525
|
"maxLength": 200,
|
|
6336
|
-
"description": "
|
|
6526
|
+
"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
6527
|
}
|
|
6338
6528
|
},
|
|
6339
6529
|
{
|
|
@@ -6353,10 +6543,10 @@ var OPERATIONS = [
|
|
|
6353
6543
|
"in": "query",
|
|
6354
6544
|
"type": "string",
|
|
6355
6545
|
"required": false,
|
|
6356
|
-
"description": "
|
|
6546
|
+
"description": "Only scripts this person owns, by their user id.",
|
|
6357
6547
|
"schema": {
|
|
6358
6548
|
"type": "string",
|
|
6359
|
-
"description": "
|
|
6549
|
+
"description": "Only scripts this person owns, by their user id."
|
|
6360
6550
|
}
|
|
6361
6551
|
},
|
|
6362
6552
|
{
|
|
@@ -6364,14 +6554,14 @@ var OPERATIONS = [
|
|
|
6364
6554
|
"in": "query",
|
|
6365
6555
|
"type": "string",
|
|
6366
6556
|
"required": false,
|
|
6367
|
-
"description": "`true
|
|
6557
|
+
"description": "With `true`, only scripts that have a published version.",
|
|
6368
6558
|
"schema": {
|
|
6369
6559
|
"type": "string",
|
|
6370
6560
|
"enum": [
|
|
6371
6561
|
"true",
|
|
6372
6562
|
"false"
|
|
6373
6563
|
],
|
|
6374
|
-
"description": "`true
|
|
6564
|
+
"description": "With `true`, only scripts that have a published version."
|
|
6375
6565
|
}
|
|
6376
6566
|
},
|
|
6377
6567
|
{
|
|
@@ -6379,19 +6569,20 @@ var OPERATIONS = [
|
|
|
6379
6569
|
"in": "query",
|
|
6380
6570
|
"type": "string",
|
|
6381
6571
|
"required": false,
|
|
6382
|
-
"description": "`true
|
|
6572
|
+
"description": "With `true`, only archived scripts. The list leaves them out otherwise.",
|
|
6383
6573
|
"schema": {
|
|
6384
6574
|
"type": "string",
|
|
6385
6575
|
"enum": [
|
|
6386
6576
|
"true",
|
|
6387
6577
|
"false"
|
|
6388
6578
|
],
|
|
6389
|
-
"description": "`true
|
|
6579
|
+
"description": "With `true`, only archived scripts. The list leaves them out otherwise."
|
|
6390
6580
|
}
|
|
6391
6581
|
}
|
|
6392
6582
|
],
|
|
6393
6583
|
"hasBody": false,
|
|
6394
6584
|
"workspace": true,
|
|
6585
|
+
"acceptsApiKey": true,
|
|
6395
6586
|
"scope": "scripts:read"
|
|
6396
6587
|
},
|
|
6397
6588
|
{
|
|
@@ -6408,23 +6599,26 @@ var OPERATIONS = [
|
|
|
6408
6599
|
},
|
|
6409
6600
|
"mcp": {
|
|
6410
6601
|
"exposed": false,
|
|
6411
|
-
"reason": "Stopping a script the team relies on is a person's decision
|
|
6602
|
+
"reason": "Stopping a script the team relies on is a person's decision. An agent asks a person to."
|
|
6412
6603
|
},
|
|
6413
|
-
"description": "
|
|
6604
|
+
"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
6605
|
"fields": [
|
|
6415
6606
|
{
|
|
6416
6607
|
"name": "slug",
|
|
6417
6608
|
"in": "path",
|
|
6418
6609
|
"type": "string",
|
|
6419
6610
|
"required": true,
|
|
6611
|
+
"description": "The slug's ID.",
|
|
6420
6612
|
"example": "unlock-account",
|
|
6421
6613
|
"schema": {
|
|
6422
|
-
"type": "string"
|
|
6614
|
+
"type": "string",
|
|
6615
|
+
"description": "The slug's ID."
|
|
6423
6616
|
}
|
|
6424
6617
|
}
|
|
6425
6618
|
],
|
|
6426
6619
|
"hasBody": false,
|
|
6427
6620
|
"workspace": true,
|
|
6621
|
+
"acceptsApiKey": true,
|
|
6428
6622
|
"scope": "scripts:write"
|
|
6429
6623
|
},
|
|
6430
6624
|
{
|
|
@@ -6448,16 +6642,18 @@ var OPERATIONS = [
|
|
|
6448
6642
|
"idempotentHint": false
|
|
6449
6643
|
}
|
|
6450
6644
|
},
|
|
6451
|
-
"description": "Changes
|
|
6645
|
+
"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
6646
|
"fields": [
|
|
6453
6647
|
{
|
|
6454
6648
|
"name": "slug",
|
|
6455
6649
|
"in": "path",
|
|
6456
6650
|
"type": "string",
|
|
6457
6651
|
"required": true,
|
|
6652
|
+
"description": "The slug's ID.",
|
|
6458
6653
|
"example": "unlock-account",
|
|
6459
6654
|
"schema": {
|
|
6460
|
-
"type": "string"
|
|
6655
|
+
"type": "string",
|
|
6656
|
+
"description": "The slug's ID."
|
|
6461
6657
|
}
|
|
6462
6658
|
},
|
|
6463
6659
|
{
|
|
@@ -6465,12 +6661,12 @@ var OPERATIONS = [
|
|
|
6465
6661
|
"in": "body",
|
|
6466
6662
|
"type": "string",
|
|
6467
6663
|
"required": false,
|
|
6468
|
-
"description": "
|
|
6664
|
+
"description": "The name people see in the app.",
|
|
6469
6665
|
"schema": {
|
|
6470
6666
|
"type": "string",
|
|
6471
6667
|
"minLength": 1,
|
|
6472
6668
|
"maxLength": 100,
|
|
6473
|
-
"description": "
|
|
6669
|
+
"description": "The name people see in the app."
|
|
6474
6670
|
}
|
|
6475
6671
|
},
|
|
6476
6672
|
{
|
|
@@ -6478,11 +6674,11 @@ var OPERATIONS = [
|
|
|
6478
6674
|
"in": "body",
|
|
6479
6675
|
"type": "string",
|
|
6480
6676
|
"required": false,
|
|
6481
|
-
"description": "What
|
|
6677
|
+
"description": "What the script does, in a sentence or two.",
|
|
6482
6678
|
"schema": {
|
|
6483
6679
|
"type": "string",
|
|
6484
6680
|
"maxLength": 1e3,
|
|
6485
|
-
"description": "What
|
|
6681
|
+
"description": "What the script does, in a sentence or two."
|
|
6486
6682
|
}
|
|
6487
6683
|
},
|
|
6488
6684
|
{
|
|
@@ -6490,14 +6686,14 @@ var OPERATIONS = [
|
|
|
6490
6686
|
"in": "body",
|
|
6491
6687
|
"type": "string",
|
|
6492
6688
|
"required": false,
|
|
6493
|
-
"description": "
|
|
6689
|
+
"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
6690
|
"schema": {
|
|
6495
6691
|
"type": "string",
|
|
6496
6692
|
"enum": [
|
|
6497
6693
|
"workspace",
|
|
6498
6694
|
"teams"
|
|
6499
6695
|
],
|
|
6500
|
-
"description": "
|
|
6696
|
+
"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
6697
|
}
|
|
6502
6698
|
},
|
|
6503
6699
|
{
|
|
@@ -6505,14 +6701,14 @@ var OPERATIONS = [
|
|
|
6505
6701
|
"in": "body",
|
|
6506
6702
|
"type": "json",
|
|
6507
6703
|
"required": false,
|
|
6508
|
-
"description": "With `access: teams
|
|
6704
|
+
"description": "With `access: teams`, the teams whose members can see and run the script.",
|
|
6509
6705
|
"schema": {
|
|
6510
6706
|
"type": "array",
|
|
6511
6707
|
"items": {
|
|
6512
6708
|
"type": "string"
|
|
6513
6709
|
},
|
|
6514
6710
|
"maxItems": 50,
|
|
6515
|
-
"description": "With `access: teams
|
|
6711
|
+
"description": "With `access: teams`, the teams whose members can see and run the script."
|
|
6516
6712
|
}
|
|
6517
6713
|
},
|
|
6518
6714
|
{
|
|
@@ -6520,7 +6716,7 @@ var OPERATIONS = [
|
|
|
6520
6716
|
"in": "body",
|
|
6521
6717
|
"type": "json",
|
|
6522
6718
|
"required": false,
|
|
6523
|
-
"description": "Up to 10
|
|
6719
|
+
"description": "Up to 10 tags, each 1 to 30 lowercase letters, digits and dashes.",
|
|
6524
6720
|
"example": [
|
|
6525
6721
|
"support",
|
|
6526
6722
|
"accounts"
|
|
@@ -6531,7 +6727,7 @@ var OPERATIONS = [
|
|
|
6531
6727
|
"type": "string"
|
|
6532
6728
|
},
|
|
6533
6729
|
"maxItems": 10,
|
|
6534
|
-
"description": "Up to 10
|
|
6730
|
+
"description": "Up to 10 tags, each 1 to 30 lowercase letters, digits and dashes."
|
|
6535
6731
|
}
|
|
6536
6732
|
},
|
|
6537
6733
|
{
|
|
@@ -6539,7 +6735,7 @@ var OPERATIONS = [
|
|
|
6539
6735
|
"in": "body",
|
|
6540
6736
|
"type": "string",
|
|
6541
6737
|
"required": false,
|
|
6542
|
-
"description": "Which runs wait for a person's approval: `none`, `agents`
|
|
6738
|
+
"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
6739
|
"schema": {
|
|
6544
6740
|
"type": "string",
|
|
6545
6741
|
"enum": [
|
|
@@ -6547,12 +6743,13 @@ var OPERATIONS = [
|
|
|
6547
6743
|
"agents",
|
|
6548
6744
|
"always"
|
|
6549
6745
|
],
|
|
6550
|
-
"description": "Which runs wait for a person's approval: `none`, `agents`
|
|
6746
|
+
"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
6747
|
}
|
|
6552
6748
|
}
|
|
6553
6749
|
],
|
|
6554
6750
|
"hasBody": true,
|
|
6555
6751
|
"workspace": true,
|
|
6752
|
+
"acceptsApiKey": true,
|
|
6556
6753
|
"scope": "scripts:write"
|
|
6557
6754
|
},
|
|
6558
6755
|
{
|
|
@@ -6574,10 +6771,11 @@ var OPERATIONS = [
|
|
|
6574
6771
|
"idempotentHint": true
|
|
6575
6772
|
}
|
|
6576
6773
|
},
|
|
6577
|
-
"description": "
|
|
6774
|
+
"description": "Returns how the workspace governs scripts, such as whether publishing needs a second person.",
|
|
6578
6775
|
"fields": [],
|
|
6579
6776
|
"hasBody": false,
|
|
6580
6777
|
"workspace": true,
|
|
6778
|
+
"acceptsApiKey": true,
|
|
6581
6779
|
"scope": "scripts:read"
|
|
6582
6780
|
},
|
|
6583
6781
|
{
|
|
@@ -6594,124 +6792,310 @@ var OPERATIONS = [
|
|
|
6594
6792
|
"exposed": false,
|
|
6595
6793
|
"reason": "Governance settings are a person's to change; an agent must not loosen them"
|
|
6596
6794
|
},
|
|
6597
|
-
"description": "Workspace owners and admins,
|
|
6795
|
+
"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
6796
|
"fields": [
|
|
6599
6797
|
{
|
|
6600
6798
|
"name": "publishNeedsSecondPerson",
|
|
6601
6799
|
"in": "body",
|
|
6602
6800
|
"type": "boolean",
|
|
6603
6801
|
"required": false,
|
|
6604
|
-
"description": "
|
|
6802
|
+
"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.",
|
|
6803
|
+
"example": false,
|
|
6605
6804
|
"schema": {
|
|
6606
6805
|
"type": "boolean",
|
|
6607
|
-
"description": "
|
|
6806
|
+
"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
6807
|
}
|
|
6609
6808
|
}
|
|
6610
6809
|
],
|
|
6611
6810
|
"hasBody": true,
|
|
6612
6811
|
"workspace": true,
|
|
6812
|
+
"acceptsApiKey": true,
|
|
6613
6813
|
"scope": "scripts:write"
|
|
6614
6814
|
},
|
|
6615
6815
|
{
|
|
6616
|
-
"operationId": "scriptVersions.
|
|
6617
|
-
"method": "
|
|
6816
|
+
"operationId": "scriptVersions.list",
|
|
6817
|
+
"method": "get",
|
|
6618
6818
|
"path": "/scripts/{slug}/versions",
|
|
6619
|
-
"summary": "
|
|
6819
|
+
"summary": "List a script's versions",
|
|
6620
6820
|
"cli": {
|
|
6621
|
-
"command": "script-versions
|
|
6821
|
+
"command": "script-versions list",
|
|
6622
6822
|
"args": [
|
|
6623
6823
|
"slug"
|
|
6624
6824
|
],
|
|
6625
|
-
"confirm": false
|
|
6626
|
-
"shortcut": "publish --draft [dir...]"
|
|
6825
|
+
"confirm": false
|
|
6627
6826
|
},
|
|
6628
6827
|
"mcp": {
|
|
6629
6828
|
"exposed": true,
|
|
6630
|
-
"name": "
|
|
6829
|
+
"name": "script_versions_list",
|
|
6631
6830
|
"hints": {
|
|
6632
|
-
"readOnlyHint":
|
|
6831
|
+
"readOnlyHint": true,
|
|
6633
6832
|
"destructiveHint": false,
|
|
6634
|
-
"idempotentHint":
|
|
6833
|
+
"idempotentHint": true
|
|
6635
6834
|
}
|
|
6636
6835
|
},
|
|
6637
|
-
"description": "
|
|
6836
|
+
"description": "Lists every version of a script, newest first, and marks the published one.",
|
|
6638
6837
|
"fields": [
|
|
6639
6838
|
{
|
|
6640
6839
|
"name": "slug",
|
|
6641
6840
|
"in": "path",
|
|
6642
6841
|
"type": "string",
|
|
6643
6842
|
"required": true,
|
|
6843
|
+
"description": "The slug's ID.",
|
|
6644
6844
|
"example": "unlock-account",
|
|
6645
6845
|
"schema": {
|
|
6646
|
-
"type": "string"
|
|
6846
|
+
"type": "string",
|
|
6847
|
+
"description": "The slug's ID."
|
|
6647
6848
|
}
|
|
6648
|
-
}
|
|
6849
|
+
}
|
|
6850
|
+
],
|
|
6851
|
+
"hasBody": false,
|
|
6852
|
+
"workspace": true,
|
|
6853
|
+
"acceptsApiKey": true,
|
|
6854
|
+
"scope": "scripts:read"
|
|
6855
|
+
},
|
|
6856
|
+
{
|
|
6857
|
+
"operationId": "scriptVersions.publish",
|
|
6858
|
+
"method": "post",
|
|
6859
|
+
"path": "/scripts/{slug}/versions/{version}/publish",
|
|
6860
|
+
"summary": "Publish a version",
|
|
6861
|
+
"cli": {
|
|
6862
|
+
"command": "script-versions publish",
|
|
6863
|
+
"args": [
|
|
6864
|
+
"slug",
|
|
6865
|
+
"version"
|
|
6866
|
+
],
|
|
6867
|
+
"confirm": false
|
|
6868
|
+
},
|
|
6869
|
+
"mcp": {
|
|
6870
|
+
"exposed": true,
|
|
6871
|
+
"name": "script_versions_publish",
|
|
6872
|
+
"hints": {
|
|
6873
|
+
"readOnlyHint": false,
|
|
6874
|
+
"destructiveHint": false,
|
|
6875
|
+
"idempotentHint": false
|
|
6876
|
+
}
|
|
6877
|
+
},
|
|
6878
|
+
"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.",
|
|
6879
|
+
"fields": [
|
|
6649
6880
|
{
|
|
6650
|
-
"name": "
|
|
6651
|
-
"in": "
|
|
6881
|
+
"name": "slug",
|
|
6882
|
+
"in": "path",
|
|
6652
6883
|
"type": "string",
|
|
6653
|
-
"required":
|
|
6654
|
-
"description": "
|
|
6655
|
-
"example": "
|
|
6884
|
+
"required": true,
|
|
6885
|
+
"description": "The slug's ID.",
|
|
6886
|
+
"example": "unlock-account",
|
|
6656
6887
|
"schema": {
|
|
6657
6888
|
"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."
|
|
6889
|
+
"description": "The slug's ID."
|
|
6661
6890
|
}
|
|
6662
6891
|
},
|
|
6663
6892
|
{
|
|
6664
|
-
"name": "
|
|
6665
|
-
"in": "
|
|
6893
|
+
"name": "version",
|
|
6894
|
+
"in": "path",
|
|
6895
|
+
"type": "number",
|
|
6896
|
+
"required": true,
|
|
6897
|
+
"description": "The version's ID.",
|
|
6898
|
+
"example": 3,
|
|
6899
|
+
"schema": {
|
|
6900
|
+
"type": "integer",
|
|
6901
|
+
"minimum": 1,
|
|
6902
|
+
"description": "The version's ID."
|
|
6903
|
+
}
|
|
6904
|
+
}
|
|
6905
|
+
],
|
|
6906
|
+
"hasBody": false,
|
|
6907
|
+
"workspace": true,
|
|
6908
|
+
"acceptsApiKey": false,
|
|
6909
|
+
"scope": "scripts:write"
|
|
6910
|
+
},
|
|
6911
|
+
{
|
|
6912
|
+
"operationId": "scriptVersions.testRun",
|
|
6913
|
+
"method": "post",
|
|
6914
|
+
"path": "/scripts/{slug}/versions/{version}/runs",
|
|
6915
|
+
"summary": "Test-run a version",
|
|
6916
|
+
"cli": {
|
|
6917
|
+
"command": "script-versions test-run",
|
|
6918
|
+
"args": [
|
|
6919
|
+
"slug",
|
|
6920
|
+
"version"
|
|
6921
|
+
],
|
|
6922
|
+
"confirm": false
|
|
6923
|
+
},
|
|
6924
|
+
"mcp": {
|
|
6925
|
+
"exposed": true,
|
|
6926
|
+
"name": "script_versions_test_run",
|
|
6927
|
+
"hints": {
|
|
6928
|
+
"readOnlyHint": false,
|
|
6929
|
+
"destructiveHint": false,
|
|
6930
|
+
"idempotentHint": false
|
|
6931
|
+
}
|
|
6932
|
+
},
|
|
6933
|
+
"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.",
|
|
6934
|
+
"fields": [
|
|
6935
|
+
{
|
|
6936
|
+
"name": "slug",
|
|
6937
|
+
"in": "path",
|
|
6666
6938
|
"type": "string",
|
|
6667
|
-
"required":
|
|
6668
|
-
"description": "
|
|
6669
|
-
"example": "
|
|
6939
|
+
"required": true,
|
|
6940
|
+
"description": "The slug's ID.",
|
|
6941
|
+
"example": "unlock-account",
|
|
6670
6942
|
"schema": {
|
|
6671
|
-
"type":
|
|
6672
|
-
|
|
6673
|
-
"null"
|
|
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."
|
|
6943
|
+
"type": "string",
|
|
6944
|
+
"description": "The slug's ID."
|
|
6677
6945
|
}
|
|
6678
6946
|
},
|
|
6679
6947
|
{
|
|
6680
|
-
"name": "
|
|
6681
|
-
"in": "
|
|
6682
|
-
"type": "
|
|
6683
|
-
"required":
|
|
6684
|
-
"description": "The
|
|
6948
|
+
"name": "version",
|
|
6949
|
+
"in": "path",
|
|
6950
|
+
"type": "number",
|
|
6951
|
+
"required": true,
|
|
6952
|
+
"description": "The version's ID.",
|
|
6953
|
+
"example": 3,
|
|
6685
6954
|
"schema": {
|
|
6686
|
-
"type": "
|
|
6687
|
-
"
|
|
6688
|
-
"description": "The
|
|
6955
|
+
"type": "integer",
|
|
6956
|
+
"minimum": 1,
|
|
6957
|
+
"description": "The version's ID."
|
|
6689
6958
|
}
|
|
6690
6959
|
},
|
|
6691
6960
|
{
|
|
6692
|
-
"name": "
|
|
6961
|
+
"name": "inputs",
|
|
6693
6962
|
"in": "body",
|
|
6694
6963
|
"type": "json",
|
|
6695
6964
|
"required": false,
|
|
6696
|
-
"description": "
|
|
6965
|
+
"description": "The script's inputs, by name. The default is no inputs.",
|
|
6966
|
+
"example": {
|
|
6967
|
+
"email": "jane@example.com"
|
|
6968
|
+
},
|
|
6697
6969
|
"schema": {
|
|
6698
|
-
"type":
|
|
6699
|
-
"object",
|
|
6700
|
-
"null"
|
|
6701
|
-
],
|
|
6970
|
+
"type": "object",
|
|
6702
6971
|
"additionalProperties": {},
|
|
6703
|
-
"
|
|
6972
|
+
"default": {},
|
|
6973
|
+
"description": "The script's inputs, by name. The default is no inputs."
|
|
6704
6974
|
}
|
|
6705
6975
|
},
|
|
6706
6976
|
{
|
|
6707
|
-
"name": "
|
|
6977
|
+
"name": "via",
|
|
6708
6978
|
"in": "body",
|
|
6709
6979
|
"type": "string",
|
|
6710
|
-
"required":
|
|
6711
|
-
"description": "
|
|
6980
|
+
"required": false,
|
|
6981
|
+
"description": "Where the run came from, for the history. The default is `api`. Reminix records an agent's runs as `agent` whatever this says.",
|
|
6712
6982
|
"schema": {
|
|
6713
6983
|
"type": "string",
|
|
6714
|
-
"
|
|
6984
|
+
"enum": [
|
|
6985
|
+
"api",
|
|
6986
|
+
"cli"
|
|
6987
|
+
],
|
|
6988
|
+
"description": "Where the run came from, for the history. The default is `api`. Reminix records an agent's runs as `agent` whatever this says."
|
|
6989
|
+
}
|
|
6990
|
+
}
|
|
6991
|
+
],
|
|
6992
|
+
"hasBody": true,
|
|
6993
|
+
"workspace": true,
|
|
6994
|
+
"acceptsApiKey": true,
|
|
6995
|
+
"scope": "runs:write"
|
|
6996
|
+
},
|
|
6997
|
+
{
|
|
6998
|
+
"operationId": "scriptVersions.upload",
|
|
6999
|
+
"method": "post",
|
|
7000
|
+
"path": "/scripts/{slug}/versions",
|
|
7001
|
+
"summary": "Upload a version",
|
|
7002
|
+
"cli": {
|
|
7003
|
+
"command": "script-versions upload",
|
|
7004
|
+
"args": [
|
|
7005
|
+
"slug"
|
|
7006
|
+
],
|
|
7007
|
+
"confirm": false,
|
|
7008
|
+
"shortcut": "upload [dir...]"
|
|
7009
|
+
},
|
|
7010
|
+
"mcp": {
|
|
7011
|
+
"exposed": true,
|
|
7012
|
+
"name": "script_versions_upload",
|
|
7013
|
+
"hints": {
|
|
7014
|
+
"readOnlyHint": false,
|
|
7015
|
+
"destructiveHint": false,
|
|
7016
|
+
"idempotentHint": false
|
|
7017
|
+
}
|
|
7018
|
+
},
|
|
7019
|
+
"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.",
|
|
7020
|
+
"fields": [
|
|
7021
|
+
{
|
|
7022
|
+
"name": "slug",
|
|
7023
|
+
"in": "path",
|
|
7024
|
+
"type": "string",
|
|
7025
|
+
"required": true,
|
|
7026
|
+
"description": "The slug's ID.",
|
|
7027
|
+
"example": "unlock-account",
|
|
7028
|
+
"schema": {
|
|
7029
|
+
"type": "string",
|
|
7030
|
+
"description": "The slug's ID."
|
|
7031
|
+
}
|
|
7032
|
+
},
|
|
7033
|
+
{
|
|
7034
|
+
"name": "command",
|
|
7035
|
+
"in": "body",
|
|
7036
|
+
"type": "string",
|
|
7037
|
+
"required": false,
|
|
7038
|
+
"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.",
|
|
7039
|
+
"example": "python unlock.py {email}",
|
|
7040
|
+
"schema": {
|
|
7041
|
+
"type": "string",
|
|
7042
|
+
"minLength": 1,
|
|
7043
|
+
"maxLength": 2e3,
|
|
7044
|
+
"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."
|
|
7045
|
+
}
|
|
7046
|
+
},
|
|
7047
|
+
{
|
|
7048
|
+
"name": "install",
|
|
7049
|
+
"in": "body",
|
|
7050
|
+
"type": "string",
|
|
7051
|
+
"required": false,
|
|
7052
|
+
"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.",
|
|
7053
|
+
"schema": {
|
|
7054
|
+
"type": [
|
|
7055
|
+
"string",
|
|
7056
|
+
"null"
|
|
7057
|
+
],
|
|
7058
|
+
"maxLength": 2e3,
|
|
7059
|
+
"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."
|
|
7060
|
+
}
|
|
7061
|
+
},
|
|
7062
|
+
{
|
|
7063
|
+
"name": "inputSchema",
|
|
7064
|
+
"in": "body",
|
|
7065
|
+
"type": "json",
|
|
7066
|
+
"required": false,
|
|
7067
|
+
"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 ]`.",
|
|
7068
|
+
"schema": {
|
|
7069
|
+
"type": "object",
|
|
7070
|
+
"additionalProperties": {},
|
|
7071
|
+
"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 ]`."
|
|
7072
|
+
}
|
|
7073
|
+
},
|
|
7074
|
+
{
|
|
7075
|
+
"name": "outputSchema",
|
|
7076
|
+
"in": "body",
|
|
7077
|
+
"type": "json",
|
|
7078
|
+
"required": false,
|
|
7079
|
+
"description": "What the script returns on standard output, as JSON Schema.",
|
|
7080
|
+
"schema": {
|
|
7081
|
+
"type": [
|
|
7082
|
+
"object",
|
|
7083
|
+
"null"
|
|
7084
|
+
],
|
|
7085
|
+
"additionalProperties": {},
|
|
7086
|
+
"description": "What the script returns on standard output, as JSON Schema."
|
|
7087
|
+
}
|
|
7088
|
+
},
|
|
7089
|
+
{
|
|
7090
|
+
"name": "source",
|
|
7091
|
+
"in": "body",
|
|
7092
|
+
"type": "string",
|
|
7093
|
+
"required": true,
|
|
7094
|
+
"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.",
|
|
7095
|
+
"example": "H4sIAAAAAAAAA\u2026",
|
|
7096
|
+
"schema": {
|
|
7097
|
+
"type": "string",
|
|
7098
|
+
"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
7099
|
}
|
|
6716
7100
|
},
|
|
6717
7101
|
{
|
|
@@ -6719,7 +7103,7 @@ var OPERATIONS = [
|
|
|
6719
7103
|
"in": "body",
|
|
6720
7104
|
"type": "json",
|
|
6721
7105
|
"required": false,
|
|
6722
|
-
"description": "The only hosts the script
|
|
7106
|
+
"description": "The only hosts the script can reach, over HTTPS. If you leave it out, the script has no network access.",
|
|
6723
7107
|
"example": [
|
|
6724
7108
|
"api.yourapp.com"
|
|
6725
7109
|
],
|
|
@@ -6728,7 +7112,7 @@ var OPERATIONS = [
|
|
|
6728
7112
|
"items": {
|
|
6729
7113
|
"type": "string"
|
|
6730
7114
|
},
|
|
6731
|
-
"description": "The only hosts the script
|
|
7115
|
+
"description": "The only hosts the script can reach, over HTTPS. If you leave it out, the script has no network access."
|
|
6732
7116
|
}
|
|
6733
7117
|
},
|
|
6734
7118
|
{
|
|
@@ -6736,7 +7120,14 @@ var OPERATIONS = [
|
|
|
6736
7120
|
"in": "body",
|
|
6737
7121
|
"type": "json",
|
|
6738
7122
|
"required": false,
|
|
6739
|
-
"description": "
|
|
7123
|
+
"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.",
|
|
7124
|
+
"example": {
|
|
7125
|
+
"ADMIN_KEY": {
|
|
7126
|
+
"host": "api.yourapp.com",
|
|
7127
|
+
"header": "Authorization",
|
|
7128
|
+
"format": "Bearer {secret}"
|
|
7129
|
+
}
|
|
7130
|
+
},
|
|
6740
7131
|
"schema": {
|
|
6741
7132
|
"type": "object",
|
|
6742
7133
|
"additionalProperties": {
|
|
@@ -6747,7 +7138,7 @@ var OPERATIONS = [
|
|
|
6747
7138
|
"items": {
|
|
6748
7139
|
"type": "string"
|
|
6749
7140
|
},
|
|
6750
|
-
"description": "
|
|
7141
|
+
"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
7142
|
},
|
|
6752
7143
|
"host": {
|
|
6753
7144
|
"type": "string",
|
|
@@ -6756,44 +7147,44 @@ var OPERATIONS = [
|
|
|
6756
7147
|
"header": {
|
|
6757
7148
|
"type": "string"
|
|
6758
7149
|
},
|
|
6759
|
-
"
|
|
7150
|
+
"format": {
|
|
6760
7151
|
"type": "string",
|
|
6761
|
-
"description": "The header's value
|
|
7152
|
+
"description": "The header's value, with `{secret}` where the secret goes. Default: `{secret}`."
|
|
6762
7153
|
}
|
|
6763
7154
|
},
|
|
6764
7155
|
"required": [
|
|
6765
7156
|
"header"
|
|
6766
7157
|
]
|
|
6767
7158
|
},
|
|
6768
|
-
"description": "
|
|
7159
|
+
"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
7160
|
}
|
|
6770
7161
|
},
|
|
6771
7162
|
{
|
|
6772
|
-
"name": "
|
|
7163
|
+
"name": "envVars",
|
|
6773
7164
|
"in": "body",
|
|
6774
7165
|
"type": "json",
|
|
6775
7166
|
"required": false,
|
|
6776
|
-
"description": "Secrets the script reads as environment variables
|
|
7167
|
+
"description": "Secrets the script reads as environment variables. Each secret must allow this with `allowEnvVar`.",
|
|
6777
7168
|
"schema": {
|
|
6778
7169
|
"type": "array",
|
|
6779
7170
|
"items": {
|
|
6780
7171
|
"type": "string"
|
|
6781
7172
|
},
|
|
6782
|
-
"description": "Secrets the script reads as environment variables
|
|
7173
|
+
"description": "Secrets the script reads as environment variables. Each secret must allow this with `allowEnvVar`."
|
|
6783
7174
|
}
|
|
6784
7175
|
},
|
|
6785
7176
|
{
|
|
6786
|
-
"name": "
|
|
7177
|
+
"name": "timeoutSeconds",
|
|
6787
7178
|
"in": "body",
|
|
6788
7179
|
"type": "number",
|
|
6789
7180
|
"required": false,
|
|
6790
|
-
"description": "
|
|
6791
|
-
"example":
|
|
7181
|
+
"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.",
|
|
7182
|
+
"example": 30,
|
|
6792
7183
|
"schema": {
|
|
6793
7184
|
"type": "integer",
|
|
6794
7185
|
"minimum": 1,
|
|
6795
7186
|
"maximum": 900,
|
|
6796
|
-
"description": "
|
|
7187
|
+
"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
7188
|
}
|
|
6798
7189
|
},
|
|
6799
7190
|
{
|
|
@@ -6801,14 +7192,14 @@ var OPERATIONS = [
|
|
|
6801
7192
|
"in": "body",
|
|
6802
7193
|
"type": "string",
|
|
6803
7194
|
"required": false,
|
|
6804
|
-
"description": "README
|
|
7195
|
+
"description": "The README, in Markdown. The script's page shows it while this version is the published one.",
|
|
6805
7196
|
"schema": {
|
|
6806
7197
|
"type": [
|
|
6807
7198
|
"string",
|
|
6808
7199
|
"null"
|
|
6809
7200
|
],
|
|
6810
7201
|
"maxLength": 1e5,
|
|
6811
|
-
"description": "README
|
|
7202
|
+
"description": "The README, in Markdown. The script's page shows it while this version is the published one."
|
|
6812
7203
|
}
|
|
6813
7204
|
},
|
|
6814
7205
|
{
|
|
@@ -6816,7 +7207,7 @@ var OPERATIONS = [
|
|
|
6816
7207
|
"in": "body",
|
|
6817
7208
|
"type": "json",
|
|
6818
7209
|
"required": false,
|
|
6819
|
-
"description": "
|
|
7210
|
+
"description": "If given, these become the script's tags.",
|
|
6820
7211
|
"example": [
|
|
6821
7212
|
"support",
|
|
6822
7213
|
"accounts"
|
|
@@ -6827,7 +7218,7 @@ var OPERATIONS = [
|
|
|
6827
7218
|
"type": "string"
|
|
6828
7219
|
},
|
|
6829
7220
|
"maxItems": 10,
|
|
6830
|
-
"description": "
|
|
7221
|
+
"description": "If given, these become the script's tags."
|
|
6831
7222
|
}
|
|
6832
7223
|
},
|
|
6833
7224
|
{
|
|
@@ -6835,7 +7226,7 @@ var OPERATIONS = [
|
|
|
6835
7226
|
"in": "body",
|
|
6836
7227
|
"type": "string",
|
|
6837
7228
|
"required": false,
|
|
6838
|
-
"description": "
|
|
7229
|
+
"description": "Where the upload came from, kept in the history. The default is `api`.",
|
|
6839
7230
|
"schema": {
|
|
6840
7231
|
"type": "string",
|
|
6841
7232
|
"enum": [
|
|
@@ -6843,7 +7234,7 @@ var OPERATIONS = [
|
|
|
6843
7234
|
"api",
|
|
6844
7235
|
"app"
|
|
6845
7236
|
],
|
|
6846
|
-
"description": "
|
|
7237
|
+
"description": "Where the upload came from, kept in the history. The default is `api`."
|
|
6847
7238
|
}
|
|
6848
7239
|
},
|
|
6849
7240
|
{
|
|
@@ -6851,10 +7242,10 @@ var OPERATIONS = [
|
|
|
6851
7242
|
"in": "body",
|
|
6852
7243
|
"type": "boolean",
|
|
6853
7244
|
"required": false,
|
|
6854
|
-
"description": "
|
|
7245
|
+
"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
7246
|
"schema": {
|
|
6856
7247
|
"type": "boolean",
|
|
6857
|
-
"description": "
|
|
7248
|
+
"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
7249
|
}
|
|
6859
7250
|
},
|
|
6860
7251
|
{
|
|
@@ -6862,13 +7253,13 @@ var OPERATIONS = [
|
|
|
6862
7253
|
"in": "body",
|
|
6863
7254
|
"type": "string",
|
|
6864
7255
|
"required": false,
|
|
6865
|
-
"description": "
|
|
6866
|
-
"example": "Unlock account",
|
|
7256
|
+
"description": "If given, this becomes the script's name. It applies to every upload that sends it.",
|
|
7257
|
+
"example": "Unlock an account",
|
|
6867
7258
|
"schema": {
|
|
6868
7259
|
"type": "string",
|
|
6869
7260
|
"minLength": 1,
|
|
6870
7261
|
"maxLength": 100,
|
|
6871
|
-
"description": "
|
|
7262
|
+
"description": "If given, this becomes the script's name. It applies to every upload that sends it."
|
|
6872
7263
|
}
|
|
6873
7264
|
},
|
|
6874
7265
|
{
|
|
@@ -6876,11 +7267,11 @@ var OPERATIONS = [
|
|
|
6876
7267
|
"in": "body",
|
|
6877
7268
|
"type": "string",
|
|
6878
7269
|
"required": false,
|
|
6879
|
-
"description": "
|
|
7270
|
+
"description": "If given, this becomes the script's description, in the same way as `name`.",
|
|
6880
7271
|
"schema": {
|
|
6881
7272
|
"type": "string",
|
|
6882
7273
|
"maxLength": 500,
|
|
6883
|
-
"description": "
|
|
7274
|
+
"description": "If given, this becomes the script's description, in the same way as `name`."
|
|
6884
7275
|
}
|
|
6885
7276
|
},
|
|
6886
7277
|
{
|
|
@@ -6888,186 +7279,18 @@ var OPERATIONS = [
|
|
|
6888
7279
|
"in": "body",
|
|
6889
7280
|
"type": "boolean",
|
|
6890
7281
|
"required": false,
|
|
6891
|
-
"description":
|
|
7282
|
+
"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
7283
|
"schema": {
|
|
6893
7284
|
"type": "boolean",
|
|
6894
|
-
"description":
|
|
7285
|
+
"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
7286
|
}
|
|
6896
7287
|
}
|
|
6897
7288
|
],
|
|
6898
7289
|
"hasBody": true,
|
|
6899
7290
|
"workspace": true,
|
|
7291
|
+
"acceptsApiKey": false,
|
|
6900
7292
|
"scope": "scripts:write"
|
|
6901
7293
|
},
|
|
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
7294
|
{
|
|
7072
7295
|
"operationId": "secrets.delete",
|
|
7073
7296
|
"method": "delete",
|
|
@@ -7084,21 +7307,24 @@ var OPERATIONS = [
|
|
|
7084
7307
|
"exposed": false,
|
|
7085
7308
|
"reason": "Secret values are a person's to handle; an agent asks the person to add the secret"
|
|
7086
7309
|
},
|
|
7087
|
-
"description": "Deletes
|
|
7310
|
+
"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
7311
|
"fields": [
|
|
7089
7312
|
{
|
|
7090
7313
|
"name": "name",
|
|
7091
7314
|
"in": "path",
|
|
7092
7315
|
"type": "string",
|
|
7093
7316
|
"required": true,
|
|
7317
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.",
|
|
7094
7318
|
"example": "ADMIN_KEY",
|
|
7095
7319
|
"schema": {
|
|
7096
|
-
"type": "string"
|
|
7320
|
+
"type": "string",
|
|
7321
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters."
|
|
7097
7322
|
}
|
|
7098
7323
|
}
|
|
7099
7324
|
],
|
|
7100
7325
|
"hasBody": false,
|
|
7101
7326
|
"workspace": true,
|
|
7327
|
+
"acceptsApiKey": true,
|
|
7102
7328
|
"scope": "secrets:write"
|
|
7103
7329
|
},
|
|
7104
7330
|
{
|
|
@@ -7120,10 +7346,11 @@ var OPERATIONS = [
|
|
|
7120
7346
|
"idempotentHint": true
|
|
7121
7347
|
}
|
|
7122
7348
|
},
|
|
7123
|
-
"description": "
|
|
7349
|
+
"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
7350
|
"fields": [],
|
|
7125
7351
|
"hasBody": false,
|
|
7126
7352
|
"workspace": true,
|
|
7353
|
+
"acceptsApiKey": true,
|
|
7127
7354
|
"scope": "secrets:read"
|
|
7128
7355
|
},
|
|
7129
7356
|
{
|
|
@@ -7136,22 +7363,25 @@ var OPERATIONS = [
|
|
|
7136
7363
|
"args": [
|
|
7137
7364
|
"name"
|
|
7138
7365
|
],
|
|
7139
|
-
"confirm": false
|
|
7366
|
+
"confirm": false,
|
|
7367
|
+
"sample": 'printf %s "$ADMIN_KEY" | \\\n reminix secrets set ADMIN_KEY \\\n --hosts api.yourapp.com'
|
|
7140
7368
|
},
|
|
7141
7369
|
"mcp": {
|
|
7142
7370
|
"exposed": false,
|
|
7143
7371
|
"reason": "Secret values are a person's to handle; an agent asks the person to add the secret"
|
|
7144
7372
|
},
|
|
7145
|
-
"description": "Saves
|
|
7373
|
+
"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
7374
|
"fields": [
|
|
7147
7375
|
{
|
|
7148
7376
|
"name": "name",
|
|
7149
7377
|
"in": "path",
|
|
7150
7378
|
"type": "string",
|
|
7151
7379
|
"required": true,
|
|
7380
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.",
|
|
7152
7381
|
"example": "ADMIN_KEY",
|
|
7153
7382
|
"schema": {
|
|
7154
|
-
"type": "string"
|
|
7383
|
+
"type": "string",
|
|
7384
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters."
|
|
7155
7385
|
}
|
|
7156
7386
|
},
|
|
7157
7387
|
{
|
|
@@ -7159,10 +7389,11 @@ var OPERATIONS = [
|
|
|
7159
7389
|
"in": "body",
|
|
7160
7390
|
"type": "string",
|
|
7161
7391
|
"required": true,
|
|
7162
|
-
"description": "The secret itself.",
|
|
7392
|
+
"description": "The secret itself, at most 16,384 bytes.",
|
|
7393
|
+
"example": "ak_live_\u2026",
|
|
7163
7394
|
"schema": {
|
|
7164
7395
|
"type": "string",
|
|
7165
|
-
"description": "The secret itself."
|
|
7396
|
+
"description": "The secret itself, at most 16,384 bytes."
|
|
7166
7397
|
}
|
|
7167
7398
|
},
|
|
7168
7399
|
{
|
|
@@ -7170,6 +7401,7 @@ var OPERATIONS = [
|
|
|
7170
7401
|
"in": "body",
|
|
7171
7402
|
"type": "json",
|
|
7172
7403
|
"required": true,
|
|
7404
|
+
"description": "The only hosts Reminix sends this value to, such as `api.stripe.com`.",
|
|
7173
7405
|
"example": [
|
|
7174
7406
|
"api.yourapp.com"
|
|
7175
7407
|
],
|
|
@@ -7177,32 +7409,34 @@ var OPERATIONS = [
|
|
|
7177
7409
|
"type": "array",
|
|
7178
7410
|
"items": {
|
|
7179
7411
|
"type": "string"
|
|
7180
|
-
}
|
|
7412
|
+
},
|
|
7413
|
+
"description": "The only hosts Reminix sends this value to, such as `api.stripe.com`."
|
|
7181
7414
|
}
|
|
7182
7415
|
},
|
|
7183
7416
|
{
|
|
7184
|
-
"name": "
|
|
7417
|
+
"name": "allowEnvVar",
|
|
7185
7418
|
"in": "body",
|
|
7186
7419
|
"type": "boolean",
|
|
7187
7420
|
"required": false,
|
|
7188
|
-
"description": "
|
|
7421
|
+
"description": "Whether scripts can read the secret as an environment variable. The default is false, so Reminix only attaches it to requests.",
|
|
7189
7422
|
"schema": {
|
|
7190
7423
|
"type": "boolean",
|
|
7191
|
-
"description": "
|
|
7424
|
+
"description": "Whether scripts can read the secret as an environment variable. The default is false, so Reminix only attaches it to requests."
|
|
7192
7425
|
}
|
|
7193
7426
|
}
|
|
7194
7427
|
],
|
|
7195
7428
|
"hasBody": true,
|
|
7196
7429
|
"workspace": true,
|
|
7430
|
+
"acceptsApiKey": true,
|
|
7197
7431
|
"scope": "secrets:write"
|
|
7198
7432
|
},
|
|
7199
7433
|
{
|
|
7200
|
-
"operationId": "
|
|
7434
|
+
"operationId": "secretValues.delete",
|
|
7201
7435
|
"method": "delete",
|
|
7202
7436
|
"path": "/secrets/{name}/values/{environment}",
|
|
7203
7437
|
"summary": "Remove a secret's value from an environment",
|
|
7204
7438
|
"cli": {
|
|
7205
|
-
"command": "
|
|
7439
|
+
"command": "secret-values delete",
|
|
7206
7440
|
"args": [
|
|
7207
7441
|
"name",
|
|
7208
7442
|
"environment"
|
|
@@ -7213,16 +7447,18 @@ var OPERATIONS = [
|
|
|
7213
7447
|
"exposed": false,
|
|
7214
7448
|
"reason": "Secret values are a person's to handle; an agent asks the person to add the secret"
|
|
7215
7449
|
},
|
|
7216
|
-
"description": "Removes
|
|
7450
|
+
"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
7451
|
"fields": [
|
|
7218
7452
|
{
|
|
7219
7453
|
"name": "name",
|
|
7220
7454
|
"in": "path",
|
|
7221
7455
|
"type": "string",
|
|
7222
7456
|
"required": true,
|
|
7457
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.",
|
|
7223
7458
|
"example": "ADMIN_KEY",
|
|
7224
7459
|
"schema": {
|
|
7225
|
-
"type": "string"
|
|
7460
|
+
"type": "string",
|
|
7461
|
+
"description": "The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters."
|
|
7226
7462
|
}
|
|
7227
7463
|
},
|
|
7228
7464
|
{
|
|
@@ -7230,14 +7466,17 @@ var OPERATIONS = [
|
|
|
7230
7466
|
"in": "path",
|
|
7231
7467
|
"type": "string",
|
|
7232
7468
|
"required": true,
|
|
7469
|
+
"description": "The environment's ID.",
|
|
7233
7470
|
"example": "staging",
|
|
7234
7471
|
"schema": {
|
|
7235
|
-
"type": "string"
|
|
7472
|
+
"type": "string",
|
|
7473
|
+
"description": "The environment's ID."
|
|
7236
7474
|
}
|
|
7237
7475
|
}
|
|
7238
7476
|
],
|
|
7239
7477
|
"hasBody": false,
|
|
7240
7478
|
"workspace": true,
|
|
7479
|
+
"acceptsApiKey": true,
|
|
7241
7480
|
"scope": "secrets:write"
|
|
7242
7481
|
},
|
|
7243
7482
|
{
|
|
@@ -7254,18 +7493,20 @@ var OPERATIONS = [
|
|
|
7254
7493
|
},
|
|
7255
7494
|
"mcp": {
|
|
7256
7495
|
"exposed": false,
|
|
7257
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
7496
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
7258
7497
|
},
|
|
7259
|
-
"description": "Starts a run, as you, when an event of `eventType` happens in the workspace
|
|
7498
|
+
"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
7499
|
"fields": [
|
|
7261
7500
|
{
|
|
7262
7501
|
"name": "slug",
|
|
7263
7502
|
"in": "path",
|
|
7264
7503
|
"type": "string",
|
|
7265
7504
|
"required": true,
|
|
7505
|
+
"description": "The slug's ID.",
|
|
7266
7506
|
"example": "alert-on-failure",
|
|
7267
7507
|
"schema": {
|
|
7268
|
-
"type": "string"
|
|
7508
|
+
"type": "string",
|
|
7509
|
+
"description": "The slug's ID."
|
|
7269
7510
|
}
|
|
7270
7511
|
},
|
|
7271
7512
|
{
|
|
@@ -7287,12 +7528,12 @@ var OPERATIONS = [
|
|
|
7287
7528
|
"in": "body",
|
|
7288
7529
|
"type": "string",
|
|
7289
7530
|
"required": true,
|
|
7290
|
-
"description": "The event that starts a run
|
|
7531
|
+
"description": "The event that starts a run. It can be any webhook event type, such as `run.failed`.",
|
|
7291
7532
|
"example": "run.failed",
|
|
7292
7533
|
"schema": {
|
|
7293
7534
|
"type": "string",
|
|
7294
7535
|
"minLength": 1,
|
|
7295
|
-
"description": "The event that starts a run
|
|
7536
|
+
"description": "The event that starts a run. It can be any webhook event type, such as `run.failed`."
|
|
7296
7537
|
}
|
|
7297
7538
|
},
|
|
7298
7539
|
{
|
|
@@ -7300,14 +7541,14 @@ var OPERATIONS = [
|
|
|
7300
7541
|
"in": "body",
|
|
7301
7542
|
"type": "json",
|
|
7302
7543
|
"required": false,
|
|
7303
|
-
"description": "Event data fields
|
|
7544
|
+
"description": "Event data fields, as dotted paths, that must equal these values.",
|
|
7304
7545
|
"example": {
|
|
7305
7546
|
"script.slug": "nightly-sync"
|
|
7306
7547
|
},
|
|
7307
7548
|
"schema": {
|
|
7308
7549
|
"type": "object",
|
|
7309
7550
|
"additionalProperties": {},
|
|
7310
|
-
"description": "Event data fields
|
|
7551
|
+
"description": "Event data fields, as dotted paths, that must equal these values."
|
|
7311
7552
|
}
|
|
7312
7553
|
},
|
|
7313
7554
|
{
|
|
@@ -7315,7 +7556,7 @@ var OPERATIONS = [
|
|
|
7315
7556
|
"in": "body",
|
|
7316
7557
|
"type": "json",
|
|
7317
7558
|
"required": false,
|
|
7318
|
-
"description": `The script's inputs for each run, by name
|
|
7559
|
+
"description": `The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.`,
|
|
7319
7560
|
"example": {
|
|
7320
7561
|
"runId": "{{event.data.runId}}",
|
|
7321
7562
|
"error": "{{event.data.error}}"
|
|
@@ -7323,7 +7564,7 @@ var OPERATIONS = [
|
|
|
7323
7564
|
"schema": {
|
|
7324
7565
|
"type": "object",
|
|
7325
7566
|
"additionalProperties": {},
|
|
7326
|
-
"description": `The script's inputs for each run, by name
|
|
7567
|
+
"description": `The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.`
|
|
7327
7568
|
}
|
|
7328
7569
|
},
|
|
7329
7570
|
{
|
|
@@ -7331,15 +7572,16 @@ var OPERATIONS = [
|
|
|
7331
7572
|
"in": "body",
|
|
7332
7573
|
"type": "string",
|
|
7333
7574
|
"required": false,
|
|
7334
|
-
"description": "The environment
|
|
7575
|
+
"description": "The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment.",
|
|
7335
7576
|
"schema": {
|
|
7336
7577
|
"type": "string",
|
|
7337
|
-
"description": "The environment
|
|
7578
|
+
"description": "The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment."
|
|
7338
7579
|
}
|
|
7339
7580
|
}
|
|
7340
7581
|
],
|
|
7341
7582
|
"hasBody": true,
|
|
7342
7583
|
"workspace": true,
|
|
7584
|
+
"acceptsApiKey": false,
|
|
7343
7585
|
"scope": "scripts:write"
|
|
7344
7586
|
},
|
|
7345
7587
|
{
|
|
@@ -7357,18 +7599,20 @@ var OPERATIONS = [
|
|
|
7357
7599
|
},
|
|
7358
7600
|
"mcp": {
|
|
7359
7601
|
"exposed": false,
|
|
7360
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
7602
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
7361
7603
|
},
|
|
7362
|
-
"description": "
|
|
7604
|
+
"description": "Deletes a trigger. The trigger's creator, a workspace owner or admin, or a workspace API key can delete it.",
|
|
7363
7605
|
"fields": [
|
|
7364
7606
|
{
|
|
7365
7607
|
"name": "slug",
|
|
7366
7608
|
"in": "path",
|
|
7367
7609
|
"type": "string",
|
|
7368
7610
|
"required": true,
|
|
7611
|
+
"description": "The slug's ID.",
|
|
7369
7612
|
"example": "alert-on-failure",
|
|
7370
7613
|
"schema": {
|
|
7371
|
-
"type": "string"
|
|
7614
|
+
"type": "string",
|
|
7615
|
+
"description": "The slug's ID."
|
|
7372
7616
|
}
|
|
7373
7617
|
},
|
|
7374
7618
|
{
|
|
@@ -7376,13 +7620,17 @@ var OPERATIONS = [
|
|
|
7376
7620
|
"in": "path",
|
|
7377
7621
|
"type": "string",
|
|
7378
7622
|
"required": true,
|
|
7623
|
+
"description": "The trigger's ID.",
|
|
7624
|
+
"example": "trg_6e4a\u2026",
|
|
7379
7625
|
"schema": {
|
|
7380
|
-
"type": "string"
|
|
7626
|
+
"type": "string",
|
|
7627
|
+
"description": "The trigger's ID."
|
|
7381
7628
|
}
|
|
7382
7629
|
}
|
|
7383
7630
|
],
|
|
7384
7631
|
"hasBody": false,
|
|
7385
7632
|
"workspace": true,
|
|
7633
|
+
"acceptsApiKey": true,
|
|
7386
7634
|
"scope": "scripts:write"
|
|
7387
7635
|
},
|
|
7388
7636
|
{
|
|
@@ -7406,21 +7654,24 @@ var OPERATIONS = [
|
|
|
7406
7654
|
"idempotentHint": true
|
|
7407
7655
|
}
|
|
7408
7656
|
},
|
|
7409
|
-
"description": "
|
|
7657
|
+
"description": "Lists a script's triggers, which are the events that start it.",
|
|
7410
7658
|
"fields": [
|
|
7411
7659
|
{
|
|
7412
7660
|
"name": "slug",
|
|
7413
7661
|
"in": "path",
|
|
7414
7662
|
"type": "string",
|
|
7415
7663
|
"required": true,
|
|
7664
|
+
"description": "The slug's ID.",
|
|
7416
7665
|
"example": "alert-on-failure",
|
|
7417
7666
|
"schema": {
|
|
7418
|
-
"type": "string"
|
|
7667
|
+
"type": "string",
|
|
7668
|
+
"description": "The slug's ID."
|
|
7419
7669
|
}
|
|
7420
7670
|
}
|
|
7421
7671
|
],
|
|
7422
7672
|
"hasBody": false,
|
|
7423
7673
|
"workspace": true,
|
|
7674
|
+
"acceptsApiKey": true,
|
|
7424
7675
|
"scope": "scripts:read"
|
|
7425
7676
|
},
|
|
7426
7677
|
{
|
|
@@ -7438,18 +7689,20 @@ var OPERATIONS = [
|
|
|
7438
7689
|
},
|
|
7439
7690
|
"mcp": {
|
|
7440
7691
|
"exposed": false,
|
|
7441
|
-
"reason": "Schedules and triggers run as the person who created them
|
|
7692
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
|
|
7442
7693
|
},
|
|
7443
|
-
"description": "
|
|
7694
|
+
"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
7695
|
"fields": [
|
|
7445
7696
|
{
|
|
7446
7697
|
"name": "slug",
|
|
7447
7698
|
"in": "path",
|
|
7448
7699
|
"type": "string",
|
|
7449
7700
|
"required": true,
|
|
7701
|
+
"description": "The slug's ID.",
|
|
7450
7702
|
"example": "alert-on-failure",
|
|
7451
7703
|
"schema": {
|
|
7452
|
-
"type": "string"
|
|
7704
|
+
"type": "string",
|
|
7705
|
+
"description": "The slug's ID."
|
|
7453
7706
|
}
|
|
7454
7707
|
},
|
|
7455
7708
|
{
|
|
@@ -7457,8 +7710,11 @@ var OPERATIONS = [
|
|
|
7457
7710
|
"in": "path",
|
|
7458
7711
|
"type": "string",
|
|
7459
7712
|
"required": true,
|
|
7713
|
+
"description": "The trigger's ID.",
|
|
7714
|
+
"example": "trg_6e4a\u2026",
|
|
7460
7715
|
"schema": {
|
|
7461
|
-
"type": "string"
|
|
7716
|
+
"type": "string",
|
|
7717
|
+
"description": "The trigger's ID."
|
|
7462
7718
|
}
|
|
7463
7719
|
},
|
|
7464
7720
|
{
|
|
@@ -7479,14 +7735,14 @@ var OPERATIONS = [
|
|
|
7479
7735
|
"in": "body",
|
|
7480
7736
|
"type": "json",
|
|
7481
7737
|
"required": false,
|
|
7482
|
-
"description": "Event data fields
|
|
7738
|
+
"description": "Event data fields, as dotted paths, that must equal these values.",
|
|
7483
7739
|
"example": {
|
|
7484
7740
|
"script.slug": "nightly-sync"
|
|
7485
7741
|
},
|
|
7486
7742
|
"schema": {
|
|
7487
7743
|
"type": "object",
|
|
7488
7744
|
"additionalProperties": {},
|
|
7489
|
-
"description": "Event data fields
|
|
7745
|
+
"description": "Event data fields, as dotted paths, that must equal these values."
|
|
7490
7746
|
}
|
|
7491
7747
|
},
|
|
7492
7748
|
{
|
|
@@ -7494,7 +7750,7 @@ var OPERATIONS = [
|
|
|
7494
7750
|
"in": "body",
|
|
7495
7751
|
"type": "json",
|
|
7496
7752
|
"required": false,
|
|
7497
|
-
"description": `The script's inputs for each run, by name
|
|
7753
|
+
"description": `The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.`,
|
|
7498
7754
|
"example": {
|
|
7499
7755
|
"runId": "{{event.data.runId}}",
|
|
7500
7756
|
"error": "{{event.data.error}}"
|
|
@@ -7502,7 +7758,7 @@ var OPERATIONS = [
|
|
|
7502
7758
|
"schema": {
|
|
7503
7759
|
"type": "object",
|
|
7504
7760
|
"additionalProperties": {},
|
|
7505
|
-
"description": `The script's inputs for each run, by name
|
|
7761
|
+
"description": `The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.`
|
|
7506
7762
|
}
|
|
7507
7763
|
},
|
|
7508
7764
|
{
|
|
@@ -7510,10 +7766,10 @@ var OPERATIONS = [
|
|
|
7510
7766
|
"in": "body",
|
|
7511
7767
|
"type": "boolean",
|
|
7512
7768
|
"required": false,
|
|
7513
|
-
"description": "Whether
|
|
7769
|
+
"description": "Whether the trigger starts runs. With `false`, it's disabled.",
|
|
7514
7770
|
"schema": {
|
|
7515
7771
|
"type": "boolean",
|
|
7516
|
-
"description": "Whether
|
|
7772
|
+
"description": "Whether the trigger starts runs. With `false`, it's disabled."
|
|
7517
7773
|
}
|
|
7518
7774
|
},
|
|
7519
7775
|
{
|
|
@@ -7521,15 +7777,16 @@ var OPERATIONS = [
|
|
|
7521
7777
|
"in": "body",
|
|
7522
7778
|
"type": "string",
|
|
7523
7779
|
"required": false,
|
|
7524
|
-
"description": "
|
|
7780
|
+
"description": "Another environment for the trigger's runs to use.",
|
|
7525
7781
|
"schema": {
|
|
7526
7782
|
"type": "string",
|
|
7527
|
-
"description": "
|
|
7783
|
+
"description": "Another environment for the trigger's runs to use."
|
|
7528
7784
|
}
|
|
7529
7785
|
}
|
|
7530
7786
|
],
|
|
7531
7787
|
"hasBody": true,
|
|
7532
7788
|
"workspace": true,
|
|
7789
|
+
"acceptsApiKey": true,
|
|
7533
7790
|
"scope": "scripts:write"
|
|
7534
7791
|
},
|
|
7535
7792
|
{
|
|
@@ -7544,12 +7801,13 @@ var OPERATIONS = [
|
|
|
7544
7801
|
},
|
|
7545
7802
|
"mcp": {
|
|
7546
7803
|
"exposed": false,
|
|
7547
|
-
"reason": "
|
|
7804
|
+
"reason": "Only a personal access token can call this. An agent's connection acts in one workspace, which workspace_get returns."
|
|
7548
7805
|
},
|
|
7549
|
-
"description": 'Returns the user the personal access token belongs to,
|
|
7806
|
+
"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
7807
|
"fields": [],
|
|
7551
7808
|
"hasBody": false,
|
|
7552
|
-
"workspace": false
|
|
7809
|
+
"workspace": false,
|
|
7810
|
+
"acceptsApiKey": false
|
|
7553
7811
|
},
|
|
7554
7812
|
{
|
|
7555
7813
|
"operationId": "user.revokeToken",
|
|
@@ -7563,12 +7821,13 @@ var OPERATIONS = [
|
|
|
7563
7821
|
},
|
|
7564
7822
|
"mcp": {
|
|
7565
7823
|
"exposed": false,
|
|
7566
|
-
"reason": "Revokes a person's own credential
|
|
7824
|
+
"reason": "Revokes a person's own credential. Agents connect through OAuth and never use personal tokens."
|
|
7567
7825
|
},
|
|
7568
|
-
"description": "Revokes the personal access token
|
|
7826
|
+
"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
7827
|
"fields": [],
|
|
7570
7828
|
"hasBody": false,
|
|
7571
|
-
"workspace": false
|
|
7829
|
+
"workspace": false,
|
|
7830
|
+
"acceptsApiKey": false
|
|
7572
7831
|
},
|
|
7573
7832
|
{
|
|
7574
7833
|
"operationId": "workspace.approvalActions.list",
|
|
@@ -7589,10 +7848,11 @@ var OPERATIONS = [
|
|
|
7589
7848
|
"idempotentHint": true
|
|
7590
7849
|
}
|
|
7591
7850
|
},
|
|
7592
|
-
"description": "
|
|
7851
|
+
"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
7852
|
"fields": [],
|
|
7594
7853
|
"hasBody": false,
|
|
7595
7854
|
"workspace": true,
|
|
7855
|
+
"acceptsApiKey": true,
|
|
7596
7856
|
"scope": "workspace.approvals:read"
|
|
7597
7857
|
},
|
|
7598
7858
|
{
|
|
@@ -7614,7 +7874,7 @@ var OPERATIONS = [
|
|
|
7614
7874
|
"idempotentHint": false
|
|
7615
7875
|
}
|
|
7616
7876
|
},
|
|
7617
|
-
"description": "
|
|
7877
|
+
"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
7878
|
"fields": [
|
|
7619
7879
|
{
|
|
7620
7880
|
"name": "action",
|
|
@@ -7633,7 +7893,7 @@ var OPERATIONS = [
|
|
|
7633
7893
|
"in": "body",
|
|
7634
7894
|
"type": "json",
|
|
7635
7895
|
"required": true,
|
|
7636
|
-
"description": "The action's input
|
|
7896
|
+
"description": "The action's input. It must match the action's JSON Schema.",
|
|
7637
7897
|
"example": {
|
|
7638
7898
|
"name": "acme-web",
|
|
7639
7899
|
"scopes": [
|
|
@@ -7643,7 +7903,7 @@ var OPERATIONS = [
|
|
|
7643
7903
|
"schema": {
|
|
7644
7904
|
"type": "object",
|
|
7645
7905
|
"additionalProperties": {},
|
|
7646
|
-
"description": "The action's input
|
|
7906
|
+
"description": "The action's input. It must match the action's JSON Schema."
|
|
7647
7907
|
}
|
|
7648
7908
|
},
|
|
7649
7909
|
{
|
|
@@ -7651,17 +7911,19 @@ var OPERATIONS = [
|
|
|
7651
7911
|
"in": "body",
|
|
7652
7912
|
"type": "string",
|
|
7653
7913
|
"required": true,
|
|
7654
|
-
"description": "Why
|
|
7914
|
+
"description": "Why you need the action. The person reads it before deciding.",
|
|
7915
|
+
"example": "A key for the deploy pipeline.",
|
|
7655
7916
|
"schema": {
|
|
7656
7917
|
"type": "string",
|
|
7657
7918
|
"minLength": 1,
|
|
7658
7919
|
"maxLength": 500,
|
|
7659
|
-
"description": "Why
|
|
7920
|
+
"description": "Why you need the action. The person reads it before deciding."
|
|
7660
7921
|
}
|
|
7661
7922
|
}
|
|
7662
7923
|
],
|
|
7663
7924
|
"hasBody": true,
|
|
7664
7925
|
"workspace": true,
|
|
7926
|
+
"acceptsApiKey": false,
|
|
7665
7927
|
"scope": "workspace.approvals:write"
|
|
7666
7928
|
},
|
|
7667
7929
|
{
|
|
@@ -7685,7 +7947,7 @@ var OPERATIONS = [
|
|
|
7685
7947
|
"idempotentHint": true
|
|
7686
7948
|
}
|
|
7687
7949
|
},
|
|
7688
|
-
"description": "
|
|
7950
|
+
"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
7951
|
"fields": [
|
|
7690
7952
|
{
|
|
7691
7953
|
"name": "requestId",
|
|
@@ -7693,6 +7955,7 @@ var OPERATIONS = [
|
|
|
7693
7955
|
"type": "string",
|
|
7694
7956
|
"required": true,
|
|
7695
7957
|
"description": "The request's id.",
|
|
7958
|
+
"example": "apr_7c2e\u2026",
|
|
7696
7959
|
"schema": {
|
|
7697
7960
|
"type": "string",
|
|
7698
7961
|
"description": "The request's id."
|
|
@@ -7701,6 +7964,7 @@ var OPERATIONS = [
|
|
|
7701
7964
|
],
|
|
7702
7965
|
"hasBody": false,
|
|
7703
7966
|
"workspace": true,
|
|
7967
|
+
"acceptsApiKey": true,
|
|
7704
7968
|
"scope": "workspace.approvals:read"
|
|
7705
7969
|
},
|
|
7706
7970
|
{
|
|
@@ -7717,9 +7981,9 @@ var OPERATIONS = [
|
|
|
7717
7981
|
},
|
|
7718
7982
|
"mcp": {
|
|
7719
7983
|
"exposed": false,
|
|
7720
|
-
"reason": "Returns a secret
|
|
7984
|
+
"reason": "Returns a secret. Secrets never enter an agent's conversation. The CLI writes them to a file instead."
|
|
7721
7985
|
},
|
|
7722
|
-
"description": "Runs an approved
|
|
7986
|
+
"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
7987
|
"fields": [
|
|
7724
7988
|
{
|
|
7725
7989
|
"name": "requestId",
|
|
@@ -7727,6 +7991,7 @@ var OPERATIONS = [
|
|
|
7727
7991
|
"type": "string",
|
|
7728
7992
|
"required": true,
|
|
7729
7993
|
"description": "The request's id.",
|
|
7994
|
+
"example": "apr_7c2e\u2026",
|
|
7730
7995
|
"schema": {
|
|
7731
7996
|
"type": "string",
|
|
7732
7997
|
"description": "The request's id."
|
|
@@ -7735,6 +8000,7 @@ var OPERATIONS = [
|
|
|
7735
8000
|
],
|
|
7736
8001
|
"hasBody": false,
|
|
7737
8002
|
"workspace": true,
|
|
8003
|
+
"acceptsApiKey": false,
|
|
7738
8004
|
"scope": "workspace.approvals:write"
|
|
7739
8005
|
},
|
|
7740
8006
|
{
|
|
@@ -7756,7 +8022,7 @@ var OPERATIONS = [
|
|
|
7756
8022
|
"idempotentHint": true
|
|
7757
8023
|
}
|
|
7758
8024
|
},
|
|
7759
|
-
"description": "
|
|
8025
|
+
"description": "Lists the workspace's audit events, newest first. Paginate with the opaque `nextCursor` token. `limit` takes 1 to 100 and defaults to 25. 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
8026
|
"fields": [
|
|
7761
8027
|
{
|
|
7762
8028
|
"name": "limit",
|
|
@@ -7787,6 +8053,7 @@ var OPERATIONS = [
|
|
|
7787
8053
|
],
|
|
7788
8054
|
"hasBody": false,
|
|
7789
8055
|
"workspace": true,
|
|
8056
|
+
"acceptsApiKey": true,
|
|
7790
8057
|
"scope": "workspace.audit:read"
|
|
7791
8058
|
},
|
|
7792
8059
|
{
|
|
@@ -7808,10 +8075,11 @@ var OPERATIONS = [
|
|
|
7808
8075
|
"idempotentHint": true
|
|
7809
8076
|
}
|
|
7810
8077
|
},
|
|
7811
|
-
"description": "
|
|
8078
|
+
"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
8079
|
"fields": [],
|
|
7813
8080
|
"hasBody": false,
|
|
7814
8081
|
"workspace": true,
|
|
8082
|
+
"acceptsApiKey": true,
|
|
7815
8083
|
"scope": "workspace.webhooks:read"
|
|
7816
8084
|
},
|
|
7817
8085
|
{
|
|
@@ -7833,10 +8101,11 @@ var OPERATIONS = [
|
|
|
7833
8101
|
"idempotentHint": true
|
|
7834
8102
|
}
|
|
7835
8103
|
},
|
|
7836
|
-
"description":
|
|
8104
|
+
"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
8105
|
"fields": [],
|
|
7838
8106
|
"hasBody": false,
|
|
7839
8107
|
"workspace": true,
|
|
8108
|
+
"acceptsApiKey": true,
|
|
7840
8109
|
"scope": "workspace:read"
|
|
7841
8110
|
},
|
|
7842
8111
|
{
|
|
@@ -7858,7 +8127,7 @@ var OPERATIONS = [
|
|
|
7858
8127
|
"idempotentHint": true
|
|
7859
8128
|
}
|
|
7860
8129
|
},
|
|
7861
|
-
"description": "
|
|
8130
|
+
"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
8131
|
"fields": [
|
|
7863
8132
|
{
|
|
7864
8133
|
"name": "limit",
|
|
@@ -7889,6 +8158,7 @@ var OPERATIONS = [
|
|
|
7889
8158
|
],
|
|
7890
8159
|
"hasBody": false,
|
|
7891
8160
|
"workspace": true,
|
|
8161
|
+
"acceptsApiKey": true,
|
|
7892
8162
|
"scope": "workspace.members:read"
|
|
7893
8163
|
},
|
|
7894
8164
|
{
|
|
@@ -7910,7 +8180,7 @@ var OPERATIONS = [
|
|
|
7910
8180
|
"idempotentHint": true
|
|
7911
8181
|
}
|
|
7912
8182
|
},
|
|
7913
|
-
"description": "
|
|
8183
|
+
"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
8184
|
"fields": [
|
|
7915
8185
|
{
|
|
7916
8186
|
"name": "limit",
|
|
@@ -7941,6 +8211,7 @@ var OPERATIONS = [
|
|
|
7941
8211
|
],
|
|
7942
8212
|
"hasBody": false,
|
|
7943
8213
|
"workspace": true,
|
|
8214
|
+
"acceptsApiKey": true,
|
|
7944
8215
|
"scope": "workspace.members:read"
|
|
7945
8216
|
},
|
|
7946
8217
|
{
|
|
@@ -7962,7 +8233,7 @@ var OPERATIONS = [
|
|
|
7962
8233
|
"idempotentHint": true
|
|
7963
8234
|
}
|
|
7964
8235
|
},
|
|
7965
|
-
"description": "
|
|
8236
|
+
"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
8237
|
"fields": [
|
|
7967
8238
|
{
|
|
7968
8239
|
"name": "limit",
|
|
@@ -7993,6 +8264,7 @@ var OPERATIONS = [
|
|
|
7993
8264
|
],
|
|
7994
8265
|
"hasBody": false,
|
|
7995
8266
|
"workspace": true,
|
|
8267
|
+
"acceptsApiKey": true,
|
|
7996
8268
|
"scope": "workspace.teams:read"
|
|
7997
8269
|
},
|
|
7998
8270
|
{
|
|
@@ -8014,10 +8286,11 @@ var OPERATIONS = [
|
|
|
8014
8286
|
"idempotentHint": true
|
|
8015
8287
|
}
|
|
8016
8288
|
},
|
|
8017
|
-
"description": "
|
|
8289
|
+
"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
8290
|
"fields": [],
|
|
8019
8291
|
"hasBody": false,
|
|
8020
8292
|
"workspace": true,
|
|
8293
|
+
"acceptsApiKey": true,
|
|
8021
8294
|
"scope": "workspace:read"
|
|
8022
8295
|
},
|
|
8023
8296
|
{
|
|
@@ -8041,16 +8314,18 @@ var OPERATIONS = [
|
|
|
8041
8314
|
"idempotentHint": true
|
|
8042
8315
|
}
|
|
8043
8316
|
},
|
|
8044
|
-
"description": "
|
|
8317
|
+
"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`. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
|
|
8045
8318
|
"fields": [
|
|
8046
8319
|
{
|
|
8047
8320
|
"name": "endpointId",
|
|
8048
8321
|
"in": "path",
|
|
8049
8322
|
"type": "string",
|
|
8050
8323
|
"required": true,
|
|
8324
|
+
"description": "The endpoint's ID.",
|
|
8051
8325
|
"example": "we_3f0c\u2026",
|
|
8052
8326
|
"schema": {
|
|
8053
|
-
"type": "string"
|
|
8327
|
+
"type": "string",
|
|
8328
|
+
"description": "The endpoint's ID."
|
|
8054
8329
|
}
|
|
8055
8330
|
},
|
|
8056
8331
|
{
|
|
@@ -8082,6 +8357,7 @@ var OPERATIONS = [
|
|
|
8082
8357
|
],
|
|
8083
8358
|
"hasBody": false,
|
|
8084
8359
|
"workspace": true,
|
|
8360
|
+
"acceptsApiKey": true,
|
|
8085
8361
|
"scope": "workspace.webhooks:read"
|
|
8086
8362
|
},
|
|
8087
8363
|
{
|
|
@@ -8106,16 +8382,18 @@ var OPERATIONS = [
|
|
|
8106
8382
|
"idempotentHint": false
|
|
8107
8383
|
}
|
|
8108
8384
|
},
|
|
8109
|
-
"description": "Sends a recorded delivery's event again, as a new delivery
|
|
8385
|
+
"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
8386
|
"fields": [
|
|
8111
8387
|
{
|
|
8112
8388
|
"name": "endpointId",
|
|
8113
8389
|
"in": "path",
|
|
8114
8390
|
"type": "string",
|
|
8115
8391
|
"required": true,
|
|
8392
|
+
"description": "The endpoint's ID.",
|
|
8116
8393
|
"example": "we_3f0c\u2026",
|
|
8117
8394
|
"schema": {
|
|
8118
|
-
"type": "string"
|
|
8395
|
+
"type": "string",
|
|
8396
|
+
"description": "The endpoint's ID."
|
|
8119
8397
|
}
|
|
8120
8398
|
},
|
|
8121
8399
|
{
|
|
@@ -8123,14 +8401,17 @@ var OPERATIONS = [
|
|
|
8123
8401
|
"in": "path",
|
|
8124
8402
|
"type": "string",
|
|
8125
8403
|
"required": true,
|
|
8404
|
+
"description": "The delivery's ID.",
|
|
8126
8405
|
"example": "del_8a1b\u2026",
|
|
8127
8406
|
"schema": {
|
|
8128
|
-
"type": "string"
|
|
8407
|
+
"type": "string",
|
|
8408
|
+
"description": "The delivery's ID."
|
|
8129
8409
|
}
|
|
8130
8410
|
}
|
|
8131
8411
|
],
|
|
8132
8412
|
"hasBody": false,
|
|
8133
8413
|
"workspace": true,
|
|
8414
|
+
"acceptsApiKey": true,
|
|
8134
8415
|
"scope": "workspace.webhooks:write"
|
|
8135
8416
|
},
|
|
8136
8417
|
{
|
|
@@ -8145,22 +8426,22 @@ var OPERATIONS = [
|
|
|
8145
8426
|
},
|
|
8146
8427
|
"mcp": {
|
|
8147
8428
|
"exposed": false,
|
|
8148
|
-
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192
|
|
8429
|
+
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
|
|
8149
8430
|
},
|
|
8150
|
-
"description": "Registers an
|
|
8431
|
+
"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
8432
|
"fields": [
|
|
8152
8433
|
{
|
|
8153
8434
|
"name": "url",
|
|
8154
8435
|
"in": "body",
|
|
8155
8436
|
"type": "string",
|
|
8156
8437
|
"required": true,
|
|
8157
|
-
"description": "The
|
|
8438
|
+
"description": "The HTTPS URL that receives the events.",
|
|
8158
8439
|
"example": "https://example.com/hooks",
|
|
8159
8440
|
"schema": {
|
|
8160
8441
|
"type": "string",
|
|
8161
8442
|
"minLength": 1,
|
|
8162
8443
|
"maxLength": 2048,
|
|
8163
|
-
"description": "The
|
|
8444
|
+
"description": "The HTTPS URL that receives the events."
|
|
8164
8445
|
}
|
|
8165
8446
|
},
|
|
8166
8447
|
{
|
|
@@ -8180,7 +8461,7 @@ var OPERATIONS = [
|
|
|
8180
8461
|
"in": "body",
|
|
8181
8462
|
"type": "json",
|
|
8182
8463
|
"required": false,
|
|
8183
|
-
"description": "
|
|
8464
|
+
"description": "Send only these event types, from event-types. Leave it out for every event.",
|
|
8184
8465
|
"example": [
|
|
8185
8466
|
"workspace.member.joined"
|
|
8186
8467
|
],
|
|
@@ -8190,12 +8471,13 @@ var OPERATIONS = [
|
|
|
8190
8471
|
"type": "string"
|
|
8191
8472
|
},
|
|
8192
8473
|
"maxItems": 100,
|
|
8193
|
-
"description": "
|
|
8474
|
+
"description": "Send only these event types, from event-types. Leave it out for every event."
|
|
8194
8475
|
}
|
|
8195
8476
|
}
|
|
8196
8477
|
],
|
|
8197
8478
|
"hasBody": true,
|
|
8198
8479
|
"workspace": true,
|
|
8480
|
+
"acceptsApiKey": true,
|
|
8199
8481
|
"scope": "workspace.webhooks:write"
|
|
8200
8482
|
},
|
|
8201
8483
|
{
|
|
@@ -8212,23 +8494,26 @@ var OPERATIONS = [
|
|
|
8212
8494
|
},
|
|
8213
8495
|
"mcp": {
|
|
8214
8496
|
"exposed": false,
|
|
8215
|
-
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192
|
|
8497
|
+
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
|
|
8216
8498
|
},
|
|
8217
|
-
"description": "
|
|
8499
|
+
"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
8500
|
"fields": [
|
|
8219
8501
|
{
|
|
8220
8502
|
"name": "endpointId",
|
|
8221
8503
|
"in": "path",
|
|
8222
8504
|
"type": "string",
|
|
8223
8505
|
"required": true,
|
|
8506
|
+
"description": "The endpoint's ID.",
|
|
8224
8507
|
"example": "we_3f0c\u2026",
|
|
8225
8508
|
"schema": {
|
|
8226
|
-
"type": "string"
|
|
8509
|
+
"type": "string",
|
|
8510
|
+
"description": "The endpoint's ID."
|
|
8227
8511
|
}
|
|
8228
8512
|
}
|
|
8229
8513
|
],
|
|
8230
8514
|
"hasBody": false,
|
|
8231
8515
|
"workspace": true,
|
|
8516
|
+
"acceptsApiKey": true,
|
|
8232
8517
|
"scope": "workspace.webhooks:write"
|
|
8233
8518
|
},
|
|
8234
8519
|
{
|
|
@@ -8245,23 +8530,26 @@ var OPERATIONS = [
|
|
|
8245
8530
|
},
|
|
8246
8531
|
"mcp": {
|
|
8247
8532
|
"exposed": false,
|
|
8248
|
-
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192
|
|
8533
|
+
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
|
|
8249
8534
|
},
|
|
8250
|
-
"description": "Resumes deliveries to an endpoint that
|
|
8535
|
+
"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
8536
|
"fields": [
|
|
8252
8537
|
{
|
|
8253
8538
|
"name": "endpointId",
|
|
8254
8539
|
"in": "path",
|
|
8255
8540
|
"type": "string",
|
|
8256
8541
|
"required": true,
|
|
8542
|
+
"description": "The endpoint's ID.",
|
|
8257
8543
|
"example": "we_3f0c\u2026",
|
|
8258
8544
|
"schema": {
|
|
8259
|
-
"type": "string"
|
|
8545
|
+
"type": "string",
|
|
8546
|
+
"description": "The endpoint's ID."
|
|
8260
8547
|
}
|
|
8261
8548
|
}
|
|
8262
8549
|
],
|
|
8263
8550
|
"hasBody": false,
|
|
8264
8551
|
"workspace": true,
|
|
8552
|
+
"acceptsApiKey": true,
|
|
8265
8553
|
"scope": "workspace.webhooks:write"
|
|
8266
8554
|
},
|
|
8267
8555
|
{
|
|
@@ -8285,21 +8573,24 @@ var OPERATIONS = [
|
|
|
8285
8573
|
"idempotentHint": true
|
|
8286
8574
|
}
|
|
8287
8575
|
},
|
|
8288
|
-
"description": "
|
|
8576
|
+
"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
8577
|
"fields": [
|
|
8290
8578
|
{
|
|
8291
8579
|
"name": "endpointId",
|
|
8292
8580
|
"in": "path",
|
|
8293
8581
|
"type": "string",
|
|
8294
8582
|
"required": true,
|
|
8583
|
+
"description": "The endpoint's ID.",
|
|
8295
8584
|
"example": "we_3f0c\u2026",
|
|
8296
8585
|
"schema": {
|
|
8297
|
-
"type": "string"
|
|
8586
|
+
"type": "string",
|
|
8587
|
+
"description": "The endpoint's ID."
|
|
8298
8588
|
}
|
|
8299
8589
|
}
|
|
8300
8590
|
],
|
|
8301
8591
|
"hasBody": false,
|
|
8302
8592
|
"workspace": true,
|
|
8593
|
+
"acceptsApiKey": true,
|
|
8303
8594
|
"scope": "workspace.webhooks:read"
|
|
8304
8595
|
},
|
|
8305
8596
|
{
|
|
@@ -8321,10 +8612,11 @@ var OPERATIONS = [
|
|
|
8321
8612
|
"idempotentHint": true
|
|
8322
8613
|
}
|
|
8323
8614
|
},
|
|
8324
|
-
"description": "
|
|
8615
|
+
"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
8616
|
"fields": [],
|
|
8326
8617
|
"hasBody": false,
|
|
8327
8618
|
"workspace": true,
|
|
8619
|
+
"acceptsApiKey": true,
|
|
8328
8620
|
"scope": "workspace.webhooks:read"
|
|
8329
8621
|
},
|
|
8330
8622
|
{
|
|
@@ -8348,21 +8640,110 @@ var OPERATIONS = [
|
|
|
8348
8640
|
"idempotentHint": false
|
|
8349
8641
|
}
|
|
8350
8642
|
},
|
|
8351
|
-
"description": "Sends a `ping` event to the endpoint, signed like every delivery
|
|
8643
|
+
"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
8644
|
"fields": [
|
|
8353
8645
|
{
|
|
8354
8646
|
"name": "endpointId",
|
|
8355
8647
|
"in": "path",
|
|
8356
8648
|
"type": "string",
|
|
8357
8649
|
"required": true,
|
|
8650
|
+
"description": "The endpoint's ID.",
|
|
8358
8651
|
"example": "we_3f0c\u2026",
|
|
8359
8652
|
"schema": {
|
|
8360
|
-
"type": "string"
|
|
8653
|
+
"type": "string",
|
|
8654
|
+
"description": "The endpoint's ID."
|
|
8361
8655
|
}
|
|
8362
8656
|
}
|
|
8363
8657
|
],
|
|
8364
8658
|
"hasBody": false,
|
|
8365
8659
|
"workspace": true,
|
|
8660
|
+
"acceptsApiKey": true,
|
|
8661
|
+
"scope": "workspace.webhooks:write"
|
|
8662
|
+
},
|
|
8663
|
+
{
|
|
8664
|
+
"operationId": "workspace.webhookEndpoints.update",
|
|
8665
|
+
"method": "patch",
|
|
8666
|
+
"path": "/workspace/webhook-endpoints/{endpointId}",
|
|
8667
|
+
"summary": "Update a webhook endpoint",
|
|
8668
|
+
"cli": {
|
|
8669
|
+
"command": "workspace webhook-endpoints update",
|
|
8670
|
+
"args": [
|
|
8671
|
+
"endpointId"
|
|
8672
|
+
],
|
|
8673
|
+
"confirm": false
|
|
8674
|
+
},
|
|
8675
|
+
"mcp": {
|
|
8676
|
+
"exposed": false,
|
|
8677
|
+
"reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
|
|
8678
|
+
},
|
|
8679
|
+
"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.",
|
|
8680
|
+
"fields": [
|
|
8681
|
+
{
|
|
8682
|
+
"name": "endpointId",
|
|
8683
|
+
"in": "path",
|
|
8684
|
+
"type": "string",
|
|
8685
|
+
"required": true,
|
|
8686
|
+
"description": "The endpoint's ID.",
|
|
8687
|
+
"example": "we_3f0c\u2026",
|
|
8688
|
+
"schema": {
|
|
8689
|
+
"type": "string",
|
|
8690
|
+
"description": "The endpoint's ID."
|
|
8691
|
+
}
|
|
8692
|
+
},
|
|
8693
|
+
{
|
|
8694
|
+
"name": "url",
|
|
8695
|
+
"in": "body",
|
|
8696
|
+
"type": "string",
|
|
8697
|
+
"required": false,
|
|
8698
|
+
"description": "The HTTPS URL that receives the events.",
|
|
8699
|
+
"example": "https://example.com/hooks",
|
|
8700
|
+
"schema": {
|
|
8701
|
+
"type": "string",
|
|
8702
|
+
"minLength": 1,
|
|
8703
|
+
"maxLength": 2048,
|
|
8704
|
+
"description": "The HTTPS URL that receives the events."
|
|
8705
|
+
}
|
|
8706
|
+
},
|
|
8707
|
+
{
|
|
8708
|
+
"name": "description",
|
|
8709
|
+
"in": "body",
|
|
8710
|
+
"type": "string",
|
|
8711
|
+
"required": false,
|
|
8712
|
+
"description": "A note for people managing the endpoint. Null clears it.",
|
|
8713
|
+
"schema": {
|
|
8714
|
+
"type": [
|
|
8715
|
+
"string",
|
|
8716
|
+
"null"
|
|
8717
|
+
],
|
|
8718
|
+
"maxLength": 200,
|
|
8719
|
+
"description": "A note for people managing the endpoint. Null clears it."
|
|
8720
|
+
}
|
|
8721
|
+
},
|
|
8722
|
+
{
|
|
8723
|
+
"name": "eventTypes",
|
|
8724
|
+
"in": "body",
|
|
8725
|
+
"type": "json",
|
|
8726
|
+
"required": false,
|
|
8727
|
+
"description": "Send only these event types, from event-types. Null or an empty list means every event.",
|
|
8728
|
+
"example": [
|
|
8729
|
+
"workspace.member.joined"
|
|
8730
|
+
],
|
|
8731
|
+
"schema": {
|
|
8732
|
+
"type": [
|
|
8733
|
+
"array",
|
|
8734
|
+
"null"
|
|
8735
|
+
],
|
|
8736
|
+
"items": {
|
|
8737
|
+
"type": "string"
|
|
8738
|
+
},
|
|
8739
|
+
"maxItems": 100,
|
|
8740
|
+
"description": "Send only these event types, from event-types. Null or an empty list means every event."
|
|
8741
|
+
}
|
|
8742
|
+
}
|
|
8743
|
+
],
|
|
8744
|
+
"hasBody": true,
|
|
8745
|
+
"workspace": true,
|
|
8746
|
+
"acceptsApiKey": true,
|
|
8366
8747
|
"scope": "workspace.webhooks:write"
|
|
8367
8748
|
}
|
|
8368
8749
|
];
|
|
@@ -8452,14 +8833,15 @@ ${op.description}`);
|
|
|
8452
8833
|
if (op.workspace) {
|
|
8453
8834
|
command.option("--workspace <slug>", "act in this workspace for one call");
|
|
8454
8835
|
}
|
|
8455
|
-
if (op.cli.confirm)
|
|
8836
|
+
if (op.cli.confirm)
|
|
8837
|
+
command.option("--yes", "confirm an operation that cannot be undone");
|
|
8456
8838
|
command.option("--json", "machine-readable output");
|
|
8457
8839
|
command.action(async (...input) => {
|
|
8458
8840
|
const values = input.slice(0, op.cli.args.length);
|
|
8459
8841
|
const options = input[op.cli.args.length];
|
|
8460
8842
|
if (op.cli.confirm && !options.yes) {
|
|
8461
8843
|
throw new Error(
|
|
8462
|
-
`${op.summary} cannot be undone
|
|
8844
|
+
`${op.summary} cannot be undone. Run it again with --yes to confirm.`
|
|
8463
8845
|
);
|
|
8464
8846
|
}
|
|
8465
8847
|
const args = Object.fromEntries(
|
|
@@ -8610,7 +8992,7 @@ async function uploadPath(ctx, path2, workspace2) {
|
|
|
8610
8992
|
});
|
|
8611
8993
|
}
|
|
8612
8994
|
async function downloadBytes(ctx, id, workspace2) {
|
|
8613
|
-
const result = await ctx.client({ workspace: workspace2 }).GET("/files/{fileId}/
|
|
8995
|
+
const result = await ctx.client({ workspace: workspace2 }).GET("/files/{fileId}/download", {
|
|
8614
8996
|
params: { path: { fileId: id } },
|
|
8615
8997
|
parseAs: "arrayBuffer"
|
|
8616
8998
|
});
|
|
@@ -8622,7 +9004,7 @@ async function downloadBytes(ctx, id, workspace2) {
|
|
|
8622
9004
|
}
|
|
8623
9005
|
return new Uint8Array(result.data);
|
|
8624
9006
|
}
|
|
8625
|
-
function
|
|
9007
|
+
function localPath(dir, name) {
|
|
8626
9008
|
const root = resolve(dir);
|
|
8627
9009
|
const path2 = resolve(root, name);
|
|
8628
9010
|
if (path2 !== root && !path2.startsWith(root + sep)) {
|
|
@@ -8630,10 +9012,10 @@ function outputPath(dir, name) {
|
|
|
8630
9012
|
}
|
|
8631
9013
|
return path2;
|
|
8632
9014
|
}
|
|
8633
|
-
async function
|
|
9015
|
+
async function downloadSavedFiles(ctx, files, dir, workspace2) {
|
|
8634
9016
|
const saved = [];
|
|
8635
|
-
for (const file of files.filter((f) => f.
|
|
8636
|
-
const path2 =
|
|
9017
|
+
for (const file of files.filter((f) => f.origin === "saved")) {
|
|
9018
|
+
const path2 = localPath(dir, file.name);
|
|
8637
9019
|
mkdirSync2(dirname(path2), { recursive: true });
|
|
8638
9020
|
writeFileSync4(path2, await downloadBytes(ctx, file.id, workspace2));
|
|
8639
9021
|
saved.push(path2);
|
|
@@ -8648,7 +9030,7 @@ var fileCommands = (program3, ctx) => {
|
|
|
8648
9030
|
ctx.io.stdout(options.json ? json(file) : file.id);
|
|
8649
9031
|
}
|
|
8650
9032
|
);
|
|
8651
|
-
group.command("download <file-id>").description("
|
|
9033
|
+
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
9034
|
async (id, options) => {
|
|
8653
9035
|
const client = ctx.client({ workspace: options.workspace });
|
|
8654
9036
|
const meta = await client.GET("/files/{fileId}", {
|
|
@@ -8662,19 +9044,29 @@ var fileCommands = (program3, ctx) => {
|
|
|
8662
9044
|
const path2 = options.out ?? join2(".", basename(meta.data.name) || meta.data.id);
|
|
8663
9045
|
mkdirSync2(dirname(resolve(path2)), { recursive: true });
|
|
8664
9046
|
writeFileSync4(path2, await downloadBytes(ctx, id, options.workspace));
|
|
8665
|
-
ctx.io.stdout(
|
|
9047
|
+
ctx.io.stdout(
|
|
9048
|
+
options.json ? json({ ...meta.data, path: path2 }) : `Downloaded ${path2}`
|
|
9049
|
+
);
|
|
8666
9050
|
}
|
|
8667
9051
|
);
|
|
8668
9052
|
};
|
|
8669
|
-
function
|
|
8670
|
-
return files.filter((f) => f.
|
|
8671
|
-
(f) => `
|
|
9053
|
+
function describeSavedFiles(files) {
|
|
9054
|
+
return files.filter((f) => f.origin === "saved").map(
|
|
9055
|
+
(f) => `Saved ${f.name}: ${f.downloadUrl ?? `${brand.name} files download ${f.id}`}`
|
|
8672
9056
|
);
|
|
8673
9057
|
}
|
|
8674
9058
|
|
|
8675
9059
|
// src/product/scripts.ts
|
|
8676
9060
|
import { spawnSync } from "node:child_process";
|
|
8677
|
-
import {
|
|
9061
|
+
import {
|
|
9062
|
+
closeSync,
|
|
9063
|
+
existsSync as existsSync3,
|
|
9064
|
+
fstatSync,
|
|
9065
|
+
openSync,
|
|
9066
|
+
readdirSync,
|
|
9067
|
+
readFileSync as readFileSync5,
|
|
9068
|
+
statSync
|
|
9069
|
+
} from "node:fs";
|
|
8678
9070
|
import { basename as basename2, join as join3, relative, resolve as resolve2 } from "node:path";
|
|
8679
9071
|
|
|
8680
9072
|
// node_modules/smol-toml/dist/error.js
|
|
@@ -9649,8 +10041,8 @@ function withName(result, folder) {
|
|
|
9649
10041
|
}
|
|
9650
10042
|
function inputSchemaForCommand(command) {
|
|
9651
10043
|
const optional2 = new Set(
|
|
9652
|
-
|
|
9653
|
-
(group) => [...group
|
|
10044
|
+
optionalGroups(command).flatMap(
|
|
10045
|
+
(group) => [...group.matchAll(/\{([A-Za-z_][\w-]*)\}/g)].map((m) => m[1])
|
|
9654
10046
|
)
|
|
9655
10047
|
);
|
|
9656
10048
|
const names = [
|
|
@@ -9666,9 +10058,22 @@ function inputSchemaForCommand(command) {
|
|
|
9666
10058
|
)
|
|
9667
10059
|
};
|
|
9668
10060
|
}
|
|
10061
|
+
function optionalGroups(command) {
|
|
10062
|
+
const groups = [];
|
|
10063
|
+
let from = 0;
|
|
10064
|
+
for (; ; ) {
|
|
10065
|
+
const open = command.indexOf("[", from);
|
|
10066
|
+
if (open === -1) break;
|
|
10067
|
+
const close = command.indexOf("]", open + 1);
|
|
10068
|
+
if (close === -1) break;
|
|
10069
|
+
groups.push(command.slice(open, close + 1));
|
|
10070
|
+
from = close + 1;
|
|
10071
|
+
}
|
|
10072
|
+
return groups;
|
|
10073
|
+
}
|
|
9669
10074
|
|
|
9670
10075
|
// src/product/scripts.ts
|
|
9671
|
-
var
|
|
10076
|
+
var MAX_SOURCE_BYTES = 1e7;
|
|
9672
10077
|
function readReadme(dir) {
|
|
9673
10078
|
for (const name of ["README.md", "readme.md", "Readme.md"]) {
|
|
9674
10079
|
try {
|
|
@@ -9682,11 +10087,14 @@ function localFolder(dir, files) {
|
|
|
9682
10087
|
return {
|
|
9683
10088
|
files,
|
|
9684
10089
|
read: (path2) => {
|
|
10090
|
+
let fd;
|
|
9685
10091
|
try {
|
|
9686
|
-
|
|
9687
|
-
return
|
|
10092
|
+
fd = openSync(join3(dir, path2), "r");
|
|
10093
|
+
return fstatSync(fd).size <= 1e6 ? readFileSync5(fd, "utf8") : null;
|
|
9688
10094
|
} catch {
|
|
9689
10095
|
return null;
|
|
10096
|
+
} finally {
|
|
10097
|
+
if (fd !== void 0) closeSync(fd);
|
|
9690
10098
|
}
|
|
9691
10099
|
},
|
|
9692
10100
|
executable: (path2) => {
|
|
@@ -9733,7 +10141,7 @@ function loadScriptDir(dir, flags = {}) {
|
|
|
9733
10141
|
return {
|
|
9734
10142
|
manifest,
|
|
9735
10143
|
files,
|
|
9736
|
-
|
|
10144
|
+
source: pack(dir, files),
|
|
9737
10145
|
readme: readReadme(dir),
|
|
9738
10146
|
detected: command ? null : detected,
|
|
9739
10147
|
explicit: {
|
|
@@ -9772,15 +10180,15 @@ function walk(root, dir) {
|
|
|
9772
10180
|
}
|
|
9773
10181
|
function pack(dir, files) {
|
|
9774
10182
|
const size = files.reduce((sum, f) => sum + statSync(join3(dir, f)).size, 0);
|
|
9775
|
-
if (size >
|
|
10183
|
+
if (size > MAX_SOURCE_BYTES * 5) {
|
|
9776
10184
|
throw new Error(
|
|
9777
|
-
`The folder holds ${(size / 1e6).toFixed(1)} MB of files
|
|
10185
|
+
`The folder holds ${(size / 1e6).toFixed(1)} MB of files. Leave out data and installed dependencies, which Reminix installs at upload.`
|
|
9778
10186
|
);
|
|
9779
10187
|
}
|
|
9780
10188
|
const tar = spawnSync("tar", ["-czf", "-", "--null", "-T", "-"], {
|
|
9781
10189
|
cwd: dir,
|
|
9782
10190
|
input: files.join("\0"),
|
|
9783
|
-
maxBuffer:
|
|
10191
|
+
maxBuffer: MAX_SOURCE_BYTES * 2,
|
|
9784
10192
|
// macOS: no AppleDouble (._*) files in the archive.
|
|
9785
10193
|
env: { ...process.env, COPYFILE_DISABLE: "1" }
|
|
9786
10194
|
});
|
|
@@ -9789,9 +10197,9 @@ function pack(dir, files) {
|
|
|
9789
10197
|
`Could not pack the folder: ${tar.stderr?.toString().trim() || tar.error?.message}`
|
|
9790
10198
|
);
|
|
9791
10199
|
}
|
|
9792
|
-
if (tar.stdout.length >
|
|
10200
|
+
if (tar.stdout.length > MAX_SOURCE_BYTES) {
|
|
9793
10201
|
throw new Error(
|
|
9794
|
-
`The packed folder is ${(tar.stdout.length / 1e6).toFixed(1)} MB
|
|
10202
|
+
`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
10203
|
);
|
|
9796
10204
|
}
|
|
9797
10205
|
return tar.stdout;
|
|
@@ -9838,88 +10246,88 @@ function describeDetected(manifest, detected) {
|
|
|
9838
10246
|
if (command) lines.push(` command ${command}`);
|
|
9839
10247
|
return lines.join("\n");
|
|
9840
10248
|
}
|
|
9841
|
-
async function publishFolder(ctx, dir, options) {
|
|
9842
|
-
const { manifest,
|
|
9843
|
-
if (options.
|
|
10249
|
+
async function publishFolder(ctx, dir, options, mode) {
|
|
10250
|
+
const { manifest, source, explicit, detected } = loadScriptDir(dir, options);
|
|
10251
|
+
if (options.dryRun) {
|
|
9844
10252
|
return {
|
|
9845
10253
|
slug: manifest.slug,
|
|
9846
10254
|
version: null,
|
|
9847
10255
|
script: null,
|
|
9848
10256
|
line: `${describeDetected(manifest, detected)}
|
|
9849
|
-
Nothing was uploaded (--
|
|
10257
|
+
Nothing was uploaded (--dry-run).`
|
|
9850
10258
|
};
|
|
9851
10259
|
}
|
|
9852
10260
|
const call3 = (method, path2, body) => rawRequest(ctx, { method, path: path2, body, workspace: options.workspace });
|
|
9853
10261
|
const slug = encodeURIComponent(manifest.slug);
|
|
9854
10262
|
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
|
-
);
|
|
10263
|
+
const version2 = Number(options.number);
|
|
10264
|
+
if (!Number.isInteger(version2) || version2 < 1) {
|
|
10265
|
+
throw new Error("--number: a version's number, like --number 3");
|
|
9863
10266
|
}
|
|
9864
10267
|
const script2 = await call3(
|
|
9865
10268
|
"POST",
|
|
9866
|
-
`/v1/scripts/${slug}/versions/${
|
|
10269
|
+
`/v1/scripts/${slug}/versions/${version2}/publish`
|
|
9867
10270
|
);
|
|
9868
10271
|
const approveUrl2 = script2.approval?.approveUrl ?? null;
|
|
9869
10272
|
return {
|
|
9870
10273
|
slug: manifest.slug,
|
|
9871
|
-
version: {
|
|
10274
|
+
version: { version: version2 },
|
|
9872
10275
|
script: script2,
|
|
9873
|
-
line: approveUrl2 ? `Publishing ${manifest.slug} version ${
|
|
10276
|
+
line: approveUrl2 ? `Publishing ${manifest.slug} version ${version2} waits for a person's approval: ${approveUrl2}` : `Published ${manifest.slug} version ${version2}.`
|
|
9874
10277
|
};
|
|
9875
10278
|
}
|
|
9876
10279
|
const version = await call3("POST", `/v1/scripts/${slug}/versions`, {
|
|
9877
10280
|
command: manifest.command,
|
|
9878
|
-
|
|
10281
|
+
install: manifest.install ?? null,
|
|
9879
10282
|
inputSchema: manifest.inputSchema,
|
|
9880
10283
|
outputSchema: manifest.outputSchema ?? null,
|
|
9881
10284
|
hosts: manifest.hosts,
|
|
9882
10285
|
secrets: manifest.secrets,
|
|
9883
|
-
|
|
10286
|
+
envVars: manifest.envVars,
|
|
9884
10287
|
tags: manifest.tags,
|
|
9885
|
-
|
|
9886
|
-
|
|
10288
|
+
timeoutSeconds: manifest.timeoutSeconds,
|
|
10289
|
+
source: source.toString("base64"),
|
|
9887
10290
|
via: "cli",
|
|
9888
10291
|
create: true,
|
|
9889
10292
|
...explicit,
|
|
9890
|
-
publish:
|
|
10293
|
+
publish: mode === "publish"
|
|
9891
10294
|
});
|
|
9892
10295
|
const script = null;
|
|
9893
10296
|
const approveUrl = version.approval?.approveUrl ?? null;
|
|
9894
|
-
const line = approveUrl ? `Uploaded ${manifest.slug} version ${version.
|
|
10297
|
+
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
10298
|
const found = detected ? `${describeDetected(manifest, detected)}
|
|
9896
10299
|
` : "";
|
|
9897
10300
|
return { slug: manifest.slug, version, script, line: `${found}${line}` };
|
|
9898
10301
|
}
|
|
9899
|
-
var definePublish = (command, ctx) =>
|
|
9900
|
-
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
)
|
|
9908
|
-
"
|
|
9909
|
-
|
|
9910
|
-
|
|
10302
|
+
var definePublish = (mode) => (command, ctx) => defineFolderOptions(
|
|
10303
|
+
mode === "publish" ? covers(
|
|
10304
|
+
command,
|
|
10305
|
+
"scripts.create",
|
|
10306
|
+
"scriptVersions.upload",
|
|
10307
|
+
"scriptVersions.publish"
|
|
10308
|
+
).option(
|
|
10309
|
+
"--number <n>",
|
|
10310
|
+
"publish version n, already uploaded (the draft you tested), instead of uploading (--version is the CLI's own)"
|
|
10311
|
+
) : covers(command, "scripts.create", "scriptVersions.upload"),
|
|
10312
|
+
ctx,
|
|
10313
|
+
mode
|
|
10314
|
+
);
|
|
10315
|
+
var defineFolderOptions = (command, ctx, mode) => command.option(
|
|
9911
10316
|
"--command <line>",
|
|
9912
10317
|
`how it runs, when the folder doesn't say: "python report.py {month}"`
|
|
9913
10318
|
).option("--name <name>", "the name people see (default: from the folder)").option(
|
|
9914
10319
|
"--slug <slug>",
|
|
9915
10320
|
"its id in URLs and commands (default: from the folder)"
|
|
9916
|
-
).option(
|
|
10321
|
+
).option(
|
|
10322
|
+
"--dry-run",
|
|
10323
|
+
`show what would be ${mode === "publish" ? "published" : "uploaded"}, and upload nothing`
|
|
10324
|
+
).option("--workspace <slug>", "act in this workspace for one call").option("--json", "machine-readable output").addHelpText(
|
|
9917
10325
|
"after",
|
|
9918
10326
|
`
|
|
9919
|
-
Publishes the folder as it is: it says how it runs (pyproject.toml, package.json,
|
|
10327
|
+
${mode === "publish" ? "Publishes" : "Uploads"} the folder as it is: it says how it runs (pyproject.toml, package.json,
|
|
9920
10328
|
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}
|
|
10329
|
+
Several folders go one after another; a folder of scripts does each
|
|
10330
|
+
subfolder that is one: \`${brand.name} ${mode} scripts/\` does them all.`
|
|
9923
10331
|
).action(
|
|
9924
10332
|
async (dirs, options) => {
|
|
9925
10333
|
const { folders, missing, skipped: skipped2 } = scriptFolders(dirs);
|
|
@@ -9930,7 +10338,7 @@ subfolder that is one: \`${brand.name} publish scripts/\` publishes them all.`
|
|
|
9930
10338
|
throw new Error("--number publishes one script: name one folder");
|
|
9931
10339
|
}
|
|
9932
10340
|
if (folders.length === 1 && missing.length === 0) {
|
|
9933
|
-
const result = await publishFolder(ctx, folders[0], options);
|
|
10341
|
+
const result = await publishFolder(ctx, folders[0], options, mode);
|
|
9934
10342
|
ctx.io.stdout(
|
|
9935
10343
|
options.json ? json({ version: result.version, script: result.script }) : result.line
|
|
9936
10344
|
);
|
|
@@ -9948,7 +10356,7 @@ subfolder that is one: \`${brand.name} publish scripts/\` publishes them all.`
|
|
|
9948
10356
|
}
|
|
9949
10357
|
for (const dir of folders) {
|
|
9950
10358
|
try {
|
|
9951
|
-
const result = await publishFolder(ctx, dir, options);
|
|
10359
|
+
const result = await publishFolder(ctx, dir, options, mode);
|
|
9952
10360
|
results.push({
|
|
9953
10361
|
dir,
|
|
9954
10362
|
version: result.version,
|
|
@@ -9967,20 +10375,20 @@ subfolder that is one: \`${brand.name} publish scripts/\` publishes them all.`
|
|
|
9967
10375
|
}
|
|
9968
10376
|
}
|
|
9969
10377
|
);
|
|
9970
|
-
var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions.
|
|
10378
|
+
var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions.testRun").option("--input <json>", "the inputs, as a JSON object", "{}").option(
|
|
9971
10379
|
"--file <input=path>",
|
|
9972
10380
|
"upload a file as a file input (repeat it for several)",
|
|
9973
10381
|
(value, all) => [...all, value],
|
|
9974
10382
|
[]
|
|
9975
10383
|
).option(
|
|
9976
10384
|
"--out <dir>",
|
|
9977
|
-
"
|
|
10385
|
+
"download the files the run saves into this folder (else their links are printed)"
|
|
9978
10386
|
).option(
|
|
9979
10387
|
"--number <n>",
|
|
9980
|
-
"test-run version n (a draft) instead of the published one"
|
|
10388
|
+
"test-run version n (a draft) instead of the published one (--version is the CLI's own)"
|
|
9981
10389
|
).option("--log", "also print what the run logged (to stderr)").option(
|
|
9982
10390
|
"--no-wait",
|
|
9983
|
-
"answer at once with a run
|
|
10391
|
+
"answer at once with a run awaiting approval or still running, instead of following it"
|
|
9984
10392
|
).option("--workspace <slug>", "act in this workspace for one call").option("--json", "print the whole run, not just its output").action(
|
|
9985
10393
|
async (slug, options) => {
|
|
9986
10394
|
let inputs;
|
|
@@ -10024,7 +10432,7 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
|
|
|
10024
10432
|
}
|
|
10025
10433
|
}
|
|
10026
10434
|
if (options.number !== void 0 && !/^[1-9]\d*$/.test(options.number)) {
|
|
10027
|
-
throw new Error("--number: a version number, like --number 2");
|
|
10435
|
+
throw new Error("--number: a version's number, like --number 2");
|
|
10028
10436
|
}
|
|
10029
10437
|
let run3 = await call3(
|
|
10030
10438
|
"POST",
|
|
@@ -10048,7 +10456,7 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
|
|
|
10048
10456
|
if (!options.log || run3.status === "awaiting_approval") return;
|
|
10049
10457
|
const { lines } = await call3(
|
|
10050
10458
|
"GET",
|
|
10051
|
-
`/v1/runs/${encodeURIComponent(run3.id)}/
|
|
10459
|
+
`/v1/runs/${encodeURIComponent(run3.id)}/log`
|
|
10052
10460
|
);
|
|
10053
10461
|
for (const line of lines.slice(printed)) ctx.io.stderr(line);
|
|
10054
10462
|
printed = Math.max(printed, lines.length);
|
|
@@ -10064,16 +10472,16 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
|
|
|
10064
10472
|
await printLog();
|
|
10065
10473
|
const files = run3.files ?? [];
|
|
10066
10474
|
if (options.out) {
|
|
10067
|
-
for (const path2 of await
|
|
10475
|
+
for (const path2 of await downloadSavedFiles(
|
|
10068
10476
|
ctx,
|
|
10069
10477
|
files,
|
|
10070
10478
|
options.out,
|
|
10071
10479
|
options.workspace
|
|
10072
10480
|
)) {
|
|
10073
|
-
ctx.io.stderr(`
|
|
10481
|
+
ctx.io.stderr(`Downloaded ${path2}`);
|
|
10074
10482
|
}
|
|
10075
10483
|
} else {
|
|
10076
|
-
for (const line of
|
|
10484
|
+
for (const line of describeSavedFiles(files)) ctx.io.stderr(line);
|
|
10077
10485
|
}
|
|
10078
10486
|
if (options.json) {
|
|
10079
10487
|
ctx.io.stdout(json(run3));
|
|
@@ -10096,22 +10504,31 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
|
|
|
10096
10504
|
);
|
|
10097
10505
|
var scriptCommands = (program3, ctx) => {
|
|
10098
10506
|
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
|
|
10507
|
+
definePublish("publish")(group.command("publish [dir...]"), ctx).description(
|
|
10508
|
+
`Upload a folder's script and publish it, so runs use that version. Shortcut: ${brand.name} publish`
|
|
10101
10509
|
);
|
|
10102
|
-
definePublish(
|
|
10103
|
-
|
|
10510
|
+
definePublish("publish")(
|
|
10511
|
+
program3.command("publish [dir...]"),
|
|
10512
|
+
ctx
|
|
10513
|
+
).description(
|
|
10514
|
+
`Upload a folder's script and publish it. Short for ${brand.name} scripts publish`
|
|
10515
|
+
);
|
|
10516
|
+
definePublish("upload")(group.command("upload [dir...]"), ctx).description(
|
|
10517
|
+
`Upload a folder's script as a draft version, to test before publishing (shortcut: ${brand.name} upload)`
|
|
10518
|
+
);
|
|
10519
|
+
definePublish("upload")(program3.command("upload [dir...]"), ctx).description(
|
|
10520
|
+
`Upload a folder's script as a draft version. Short for ${brand.name} scripts upload`
|
|
10104
10521
|
);
|
|
10105
10522
|
defineRun(group.command("run <slug>"), ctx).description(
|
|
10106
|
-
`Run a script and print its output
|
|
10523
|
+
`Run a script and print its output. Use --number to test a draft. Shortcut: ${brand.name} run`
|
|
10107
10524
|
);
|
|
10108
10525
|
defineRun(program3.command("run <slug>"), ctx).description(
|
|
10109
|
-
`
|
|
10526
|
+
`Run a script and print its output. Use --number to test a draft. Short for ${brand.name} scripts run`
|
|
10110
10527
|
);
|
|
10111
10528
|
};
|
|
10112
10529
|
|
|
10113
10530
|
// src/product/init.ts
|
|
10114
|
-
import {
|
|
10531
|
+
import { closeSync as closeSync2, openSync as openSync2, unlinkSync, writeFileSync as writeFileSync5 } from "node:fs";
|
|
10115
10532
|
import { basename as basename3, join as join4, resolve as resolve3 } from "node:path";
|
|
10116
10533
|
var INIT_HELP = `Say which file and how it runs, like: ${brand.name} init "python report.py --month {month}"`;
|
|
10117
10534
|
function commandFor(dir, given) {
|
|
@@ -10138,16 +10555,35 @@ function inputSchemaFor(command) {
|
|
|
10138
10555
|
)
|
|
10139
10556
|
};
|
|
10140
10557
|
}
|
|
10558
|
+
function createNew(path2) {
|
|
10559
|
+
try {
|
|
10560
|
+
return openSync2(path2, "wx");
|
|
10561
|
+
} catch (error) {
|
|
10562
|
+
if (error.code === "EEXIST") return null;
|
|
10563
|
+
throw error;
|
|
10564
|
+
}
|
|
10565
|
+
}
|
|
10141
10566
|
function scaffold(dir, given) {
|
|
10142
10567
|
const manifest = join4(dir, "reminix.json");
|
|
10143
|
-
|
|
10144
|
-
|
|
10568
|
+
const alreadyExists = () => new Error(`${manifest} already exists`);
|
|
10569
|
+
let command;
|
|
10570
|
+
try {
|
|
10571
|
+
command = commandFor(dir, given);
|
|
10572
|
+
} catch (error) {
|
|
10573
|
+
let probe;
|
|
10574
|
+
try {
|
|
10575
|
+
probe = createNew(manifest);
|
|
10576
|
+
} catch {
|
|
10577
|
+
throw error;
|
|
10578
|
+
}
|
|
10579
|
+
if (probe === null) throw alreadyExists();
|
|
10580
|
+
closeSync2(probe);
|
|
10581
|
+
unlinkSync(manifest);
|
|
10582
|
+
throw error;
|
|
10145
10583
|
}
|
|
10146
|
-
const command = commandFor(dir, given);
|
|
10147
10584
|
const detected = detectScript(localFolder(dir, scriptFiles(dir)));
|
|
10148
10585
|
const slug = (detected.ok ? detected.value.slug : void 0) ?? slugOf(basename3(resolve3(dir))) ?? "my-script";
|
|
10149
|
-
|
|
10150
|
-
writeFileSync5(
|
|
10586
|
+
writeNew(
|
|
10151
10587
|
manifest,
|
|
10152
10588
|
`${JSON.stringify(
|
|
10153
10589
|
{
|
|
@@ -10162,21 +10598,30 @@ function scaffold(dir, given) {
|
|
|
10162
10598
|
null,
|
|
10163
10599
|
2
|
|
10164
10600
|
)}
|
|
10165
|
-
|
|
10601
|
+
`,
|
|
10602
|
+
alreadyExists
|
|
10166
10603
|
);
|
|
10167
|
-
created
|
|
10168
|
-
|
|
10169
|
-
writeFileSync5(
|
|
10170
|
-
join4(dir, "README.md"),
|
|
10171
|
-
`# ${titleOf(slug)}
|
|
10604
|
+
const created = ["reminix.json"];
|
|
10605
|
+
const readme = `# ${titleOf(slug)}
|
|
10172
10606
|
|
|
10173
10607
|
What it does, when to use it, and what its inputs mean.
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
created.push("README.md");
|
|
10177
|
-
}
|
|
10608
|
+
`;
|
|
10609
|
+
if (writeNew(join4(dir, "README.md"), readme)) created.push("README.md");
|
|
10178
10610
|
return created;
|
|
10179
10611
|
}
|
|
10612
|
+
function writeNew(path2, content, onExists) {
|
|
10613
|
+
const fd = createNew(path2);
|
|
10614
|
+
if (fd === null) {
|
|
10615
|
+
if (onExists) throw onExists();
|
|
10616
|
+
return false;
|
|
10617
|
+
}
|
|
10618
|
+
try {
|
|
10619
|
+
writeFileSync5(fd, content);
|
|
10620
|
+
} finally {
|
|
10621
|
+
closeSync2(fd);
|
|
10622
|
+
}
|
|
10623
|
+
return true;
|
|
10624
|
+
}
|
|
10180
10625
|
var initCommand = (program3, ctx) => {
|
|
10181
10626
|
program3.command("init [command]").description("Make the script in this folder a Reminix script").addHelpText(
|
|
10182
10627
|
"after",
|
|
@@ -10195,7 +10640,10 @@ var secretCommands = (program3, ctx) => {
|
|
|
10195
10640
|
group.command("set <name>").description("Save a secret's value, read from stdin").requiredOption(
|
|
10196
10641
|
"--hosts <hosts>",
|
|
10197
10642
|
"the hosts it may be sent to, comma-separated (e.g. api.stripe.com)"
|
|
10198
|
-
).option(
|
|
10643
|
+
).option(
|
|
10644
|
+
"--allow-env-var",
|
|
10645
|
+
"let scripts read the value as an environment variable (off by default)"
|
|
10646
|
+
).option("--workspace <slug>", "act in this workspace for one call").option("--json", "machine-readable output").action(
|
|
10199
10647
|
async (name, options) => {
|
|
10200
10648
|
const value = (await ctx.io.stdin()).replace(/\r?\n$/, "");
|
|
10201
10649
|
if (!value) {
|
|
@@ -10209,7 +10657,7 @@ var secretCommands = (program3, ctx) => {
|
|
|
10209
10657
|
body: {
|
|
10210
10658
|
value,
|
|
10211
10659
|
hosts: options.hosts.split(",").map((h) => h.trim()).filter(Boolean),
|
|
10212
|
-
|
|
10660
|
+
allowEnvVar: options.allowEnvVar ?? false
|
|
10213
10661
|
},
|
|
10214
10662
|
workspace: options.workspace
|
|
10215
10663
|
});
|
|
@@ -10240,7 +10688,7 @@ function tokenEnvVar() {
|
|
|
10240
10688
|
function build(io) {
|
|
10241
10689
|
let actedIn = null;
|
|
10242
10690
|
let sending;
|
|
10243
|
-
const program3 = new Command().name(brand.name).description(
|
|
10691
|
+
const program3 = new Command().name(brand.name).description(`The ${brand.productName} CLI`).version("1.0.0-rc.8").addHelpText(
|
|
10244
10692
|
"after",
|
|
10245
10693
|
`
|
|
10246
10694
|
Token: \`${brand.name} login\` stores it in ~/.config/${brand.name}/; ${tokenEnvVar()} overrides.
|
|
@@ -10264,7 +10712,7 @@ Environment: --environment, else ${environmentEnvVar()}, else \`${brand.name} en
|
|
|
10264
10712
|
const settings = ctx.settings();
|
|
10265
10713
|
if (!settings.token) {
|
|
10266
10714
|
throw new Error(
|
|
10267
|
-
`not logged in
|
|
10715
|
+
`not logged in. Run \`${brand.name} login\` or set ${tokenEnvVar()}.`
|
|
10268
10716
|
);
|
|
10269
10717
|
}
|
|
10270
10718
|
if (!settings.token.startsWith("pat_")) {
|
|
@@ -10283,7 +10731,7 @@ Environment: --environment, else ${environmentEnvVar()}, else \`${brand.name} en
|
|
|
10283
10731
|
const workspace2 = options.workspace === false ? void 0 : options.workspace ?? settings.workspace;
|
|
10284
10732
|
if (options.workspace !== false && !workspace2) {
|
|
10285
10733
|
throw new Error(
|
|
10286
|
-
`no workspace selected
|
|
10734
|
+
`no workspace selected. Run \`${brand.name} workspace use <slug>\` or pass --workspace <slug>.`
|
|
10287
10735
|
);
|
|
10288
10736
|
}
|
|
10289
10737
|
return {
|