@reminix/cli 1.0.0-rc.15 → 1.0.0-rc.16
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 +4 -0
- package/dist/reminix.mjs +24 -23
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/reminix.mjs
CHANGED
|
@@ -877,19 +877,21 @@ async function uploadFile(client, file, options = {}) {
|
|
|
877
877
|
const body = file.data instanceof Blob ? file.data : new Blob([file.data], {
|
|
878
878
|
type: file.mediaType ?? "application/octet-stream"
|
|
879
879
|
});
|
|
880
|
-
return
|
|
881
|
-
|
|
882
|
-
body,
|
|
883
|
-
bodySerializer: (value) => value,
|
|
884
|
-
signal: options.signal,
|
|
880
|
+
return await client.files.upload(body, { name: file.name }, {
|
|
881
|
+
...options,
|
|
885
882
|
headers: {
|
|
886
|
-
"content-type": file.mediaType
|
|
887
|
-
...options.
|
|
883
|
+
...file.mediaType ? { "content-type": file.mediaType } : {},
|
|
884
|
+
...options.headers
|
|
888
885
|
}
|
|
889
|
-
})
|
|
886
|
+
});
|
|
890
887
|
}
|
|
891
888
|
|
|
892
889
|
// node_modules/@reminix/sdk/dist/product/run.js
|
|
890
|
+
var perRequest = ({ signal, headers, timeout }) => ({
|
|
891
|
+
...signal ? { signal } : {},
|
|
892
|
+
...headers ? { headers } : {},
|
|
893
|
+
...timeout === void 0 ? {} : { timeout }
|
|
894
|
+
});
|
|
893
895
|
var RunError = class extends SdkError {
|
|
894
896
|
run;
|
|
895
897
|
constructor(run3) {
|
|
@@ -899,7 +901,7 @@ var RunError = class extends SdkError {
|
|
|
899
901
|
};
|
|
900
902
|
var ENDED = /* @__PURE__ */ new Set(["succeeded", "failed", "cancelled"]);
|
|
901
903
|
var isUpload = (value) => typeof Blob !== "undefined" && value instanceof Blob || typeof value === "object" && value !== null && "name" in value && "data" in value;
|
|
902
|
-
async function withFileIds(client, inputs, idempotencyKey,
|
|
904
|
+
async function withFileIds(client, inputs, idempotencyKey, options) {
|
|
903
905
|
let uploaded = 0;
|
|
904
906
|
const upload = async (value) => (await uploadFile(client, value instanceof Blob ? {
|
|
905
907
|
name: "name" in value ? String(value.name) : "upload",
|
|
@@ -907,7 +909,7 @@ async function withFileIds(client, inputs, idempotencyKey, signal) {
|
|
|
907
909
|
data: value
|
|
908
910
|
} : value, {
|
|
909
911
|
...idempotencyKey ? { idempotencyKey: `${idempotencyKey}:file-${++uploaded}` } : {},
|
|
910
|
-
|
|
912
|
+
...perRequest(options)
|
|
911
913
|
})).id;
|
|
912
914
|
const out = {};
|
|
913
915
|
for (const [name, value] of Object.entries(inputs)) {
|
|
@@ -934,24 +936,23 @@ var pause = (ms, signal) => new Promise((resolve4, reject) => {
|
|
|
934
936
|
}, { once: true });
|
|
935
937
|
});
|
|
936
938
|
async function waitForRun(client, run3, options = {}) {
|
|
937
|
-
const
|
|
938
|
-
let current = typeof run3 === "string" ? await client.runs.get(run3,
|
|
939
|
+
const each = perRequest(options);
|
|
940
|
+
let current = typeof run3 === "string" ? await client.runs.get(run3, each) : run3;
|
|
939
941
|
while (!ENDED.has(current.status)) {
|
|
940
|
-
await pause(options.pollInterval ?? 2e3, signal);
|
|
941
|
-
current = await client.runs.get(current.id,
|
|
942
|
+
await pause(options.pollInterval ?? 2e3, options.signal);
|
|
943
|
+
current = await client.runs.get(current.id, each);
|
|
942
944
|
}
|
|
943
945
|
if (current.status !== "succeeded")
|
|
944
946
|
throw new RunError(current);
|
|
945
947
|
return current;
|
|
946
948
|
}
|
|
947
949
|
async function run(client, slug, inputs = {}, options = {}) {
|
|
948
|
-
const { signal } = options;
|
|
949
950
|
const body = {
|
|
950
|
-
inputs: await withFileIds(client, inputs, options.idempotencyKey,
|
|
951
|
+
inputs: await withFileIds(client, inputs, options.idempotencyKey, options)
|
|
951
952
|
};
|
|
952
953
|
const keyed = {
|
|
953
954
|
...options.idempotencyKey ? { idempotencyKey: options.idempotencyKey } : {},
|
|
954
|
-
|
|
955
|
+
...perRequest(options)
|
|
955
956
|
};
|
|
956
957
|
const started = options.version === void 0 ? await client.runs.create(slug, body, keyed) : await client.scriptVersions.testRun(slug, options.version, body, keyed);
|
|
957
958
|
if (started.status === "awaiting_approval") {
|
|
@@ -1543,7 +1544,7 @@ function keysFrom(base) {
|
|
|
1543
1544
|
}
|
|
1544
1545
|
|
|
1545
1546
|
// node_modules/@reminix/sdk/dist/version.js
|
|
1546
|
-
var VERSION = "1.0.0-rc.
|
|
1547
|
+
var VERSION = "1.0.0-rc.14";
|
|
1547
1548
|
|
|
1548
1549
|
// node_modules/@reminix/sdk/dist/webhooks.js
|
|
1549
1550
|
var WebhookVerificationError = class extends SdkError {
|
|
@@ -5678,7 +5679,7 @@ var OPERATIONS = [
|
|
|
5678
5679
|
"exposed": false,
|
|
5679
5680
|
"reason": "Environments hold secret values and rules. A person sets them up, and an agent asks a person to."
|
|
5680
5681
|
},
|
|
5681
|
-
"description": "Adds an environment with no secret values yet. To save its values, call
|
|
5682
|
+
"description": "Adds an environment with no secret values yet. To save its values, call secretValues.set with the new environment in the path. Workspace owners, admins and API keys can add an environment.",
|
|
5682
5683
|
"fields": [
|
|
5683
5684
|
{
|
|
5684
5685
|
"name": "name",
|
|
@@ -7177,7 +7178,7 @@ var OPERATIONS = [
|
|
|
7177
7178
|
"idempotentHint": false
|
|
7178
7179
|
}
|
|
7179
7180
|
},
|
|
7180
|
-
"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`. A name, description or tags that the script's reminix.json sets (listed in `setInFile`) can't change here, and the request returns
|
|
7181
|
+
"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`. A name, description or tags that the script's reminix.json sets (listed in `setInFile`) can't change here, and the request returns 409.",
|
|
7181
7182
|
"fields": [
|
|
7182
7183
|
{
|
|
7183
7184
|
"name": "slug",
|
|
@@ -8309,7 +8310,7 @@ var OPERATIONS = [
|
|
|
8309
8310
|
},
|
|
8310
8311
|
"mcp": {
|
|
8311
8312
|
"exposed": false,
|
|
8312
|
-
"reason": "Schedules and triggers run as the person who created them. Only a person can create one. An agent can ask for a webhook trigger: POST /v1/workspace/approval-requests with action trigger.webhook.create, which a workspace owner approves."
|
|
8313
|
+
"reason": "Schedules and triggers run as the person who created them. Only a person can create one. An agent can ask for a webhook trigger: POST /v1/workspace/approval-requests with action trigger.webhook.create, which a workspace owner or admin approves."
|
|
8313
8314
|
},
|
|
8314
8315
|
"description": "Creates a trigger that starts a run of the script, as you. With the type `event`, a run starts when an event of `event` 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, and a chain of triggered runs stops after 3. With the type `webhook`, a run starts when someone calls the trigger's URL with its secret. The response carries the URL and the secret once. Only the script's owner, or a workspace owner or admin, can create a webhook trigger, and its runs wait for approval where an agent's would. For an event trigger, if every run of the script or of the environment needs approval, only workspace owners and admins can create it.",
|
|
8315
8316
|
"fields": [
|
|
@@ -8678,7 +8679,7 @@ var OPERATIONS = [
|
|
|
8678
8679
|
},
|
|
8679
8680
|
"mcp": {
|
|
8680
8681
|
"exposed": false,
|
|
8681
|
-
"reason": "
|
|
8682
|
+
"reason": "An agent can't rotate a webhook trigger's secret itself. It can ask: POST /v1/workspace/approval-requests with action trigger.webhook.rotateSecret, which a workspace owner or admin approves."
|
|
8682
8683
|
},
|
|
8683
8684
|
"description": "Gives a webhook trigger a new secret and returns its new URL, this once. The old URL stops working at once. If Reminix disabled the trigger, such as after repeated refused calls, rotating enables it again. The script's owner, a workspace owner or admin, or a workspace API key can rotate it.",
|
|
8684
8685
|
"fields": [
|
|
@@ -12138,7 +12139,7 @@ var commands = [
|
|
|
12138
12139
|
function tokenEnvVar() {
|
|
12139
12140
|
return `${brand.identifier.toUpperCase()}_TOKEN`;
|
|
12140
12141
|
}
|
|
12141
|
-
var VERSION2 = "1.0.0-rc.
|
|
12142
|
+
var VERSION2 = "1.0.0-rc.16";
|
|
12142
12143
|
function build(io) {
|
|
12143
12144
|
let actedIn = null;
|
|
12144
12145
|
let sending;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reminix/cli",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.16",
|
|
4
4
|
"description": "Reminix command line",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"scripts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typecheck": "tsc --noEmit"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@reminix/sdk": "1.0.0-rc.
|
|
29
|
+
"@reminix/sdk": "1.0.0-rc.14",
|
|
30
30
|
"@types/node": "26.6.6",
|
|
31
31
|
"commander": "15.1.0",
|
|
32
32
|
"smol-toml": "1.9.1",
|