@reminix/cli 1.0.0-rc.4 → 1.0.0-rc.6

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 CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  What changed in the Reminix CLI (`@reminix/cli`). Generated from the source on each release; newest first.
4
4
 
5
+ ## 1.0.0-rc.6 (2026-10-19)
6
+
7
+ ### Fixed
8
+
9
+ - `login` in the browser no longer shows Safari's "This is a non-secure
10
+ form" warning after **Allow**. The page now hands the new token back to
11
+ the waiting CLI encrypted to a key only that CLI holds, by a redirect
12
+ instead of a form. A CLI from before this change is asked to update.
13
+ - `reminix run <slug> --number <n>` test-runs version n (a draft).
14
+ `--version <n>` printed the CLI's own version instead of running, so it
15
+ is gone. A run whose output is text prints it as it is, without quotes.
16
+
17
+ ## 1.0.0-rc.5 (2026-10-16)
18
+
19
+ No user-facing changes.
20
+
5
21
  ## 1.0.0-rc.4 (2026-10-16)
6
22
 
7
23
  ### Added
package/README.md CHANGED
@@ -54,9 +54,12 @@ agents.
54
54
  - [Discord](https://reminix.com/discord)
55
55
  - [Report a security issue](https://reminix.com/security/)
56
56
 
57
- ## About this package
57
+ ## Contributing
58
58
 
59
59
  This repository is generated from Reminix's source on each
60
60
  release, so pull requests are ported there and credited (see
61
61
  [CONTRIBUTING.md](https://github.com/reminixhq/reminix-cli/blob/main/CONTRIBUTING.md)).
62
+
63
+ ## License
64
+
62
65
  Licensed under the Apache License 2.0.
package/dist/reminix.mjs CHANGED
@@ -13,11 +13,10 @@ var brand_default = {
13
13
  legalName: "Omsome L.L.C-FZ",
14
14
  releaseMirrors: true,
15
15
  mirrorProfile: {
16
- tagline: "run your team's scripts from a form, an API or an agent tool, with every run on record",
17
16
  topics: ["scripts", "automation", "ai-agents", "mcp", "api-client", "sdk"]
18
17
  },
19
18
  domain: "reminix.com",
20
- discordInvite: "https://discord.gg/PSw7v92rB",
19
+ discordInvite: "https://discord.gg/UU9NbEcNQj",
21
20
  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.",
22
21
  expectedAssets: [
23
22
  "logo.svg",
@@ -4650,12 +4649,35 @@ function useColor() {
4650
4649
  var program = new Command();
4651
4650
 
4652
4651
  // src/browser-login.ts
4653
- import { randomBytes } from "node:crypto";
4652
+ import {
4653
+ constants,
4654
+ generateKeyPairSync,
4655
+ privateDecrypt,
4656
+ randomBytes
4657
+ } from "node:crypto";
4654
4658
  import { createServer } from "node:http";
4655
4659
  var PAGE = (title, body) => `<!doctype html><html><head><meta charset="utf-8"><title>${title}</title><meta name="viewport" content="width=device-width, initial-scale=1"></head><body style="font-family:system-ui,sans-serif;max-width:32rem;margin:4rem auto;padding:0 1rem"><h1 style="font-size:1.25rem">${title}</h1><p>${body}</p></body></html>`;
4656
- var MAX_BODY = 16 * 1024;
4660
+ var MAX_URL = 16 * 1024;
4657
4661
  function browserLogin(options) {
4658
4662
  const state = randomBytes(24).toString("base64url");
4663
+ const { publicKey, privateKey } = generateKeyPairSync("rsa", {
4664
+ modulusLength: 2048
4665
+ });
4666
+ const key = publicKey.export({ type: "spki", format: "der" }).toString("base64url");
4667
+ const decrypt = (sealed) => {
4668
+ try {
4669
+ return privateDecrypt(
4670
+ {
4671
+ key: privateKey,
4672
+ padding: constants.RSA_PKCS1_OAEP_PADDING,
4673
+ oaepHash: "sha256"
4674
+ },
4675
+ Buffer.from(sealed, "base64url")
4676
+ ).toString("utf8");
4677
+ } catch {
4678
+ return null;
4679
+ }
4680
+ };
4659
4681
  return new Promise((resolve4, reject) => {
4660
4682
  let settled = false;
4661
4683
  const finish = (outcome) => {
@@ -4666,44 +4688,41 @@ function browserLogin(options) {
4666
4688
  outcome();
4667
4689
  };
4668
4690
  const server = createServer((req, res) => {
4669
- if (req.method !== "POST" || req.url !== "/callback") {
4691
+ const url = new URL(req.url ?? "/", "http://127.0.0.1");
4692
+ if (req.method !== "GET" || url.pathname !== "/callback" || (req.url ?? "").length > MAX_URL) {
4670
4693
  res.writeHead(404).end();
4671
4694
  return;
4672
4695
  }
4673
- let body = "";
4674
- req.setEncoding("utf8");
4675
- req.on("data", (chunk) => {
4676
- body += chunk;
4677
- if (body.length > MAX_BODY) req.destroy();
4678
- });
4679
- req.on("end", () => {
4680
- const fields = new URLSearchParams(body);
4681
- const send = (status, title, text) => res.writeHead(status, { "content-type": "text/html; charset=utf-8" }).end(PAGE(title, text));
4682
- if (fields.get("state") !== state) {
4683
- send(
4684
- 400,
4685
- "Not this login",
4686
- "This sign-in did not come from the terminal that is waiting. Run login again."
4687
- );
4688
- return;
4689
- }
4690
- if (fields.get("error")) {
4691
- send(200, "Sign-in cancelled", "You can close this tab.");
4692
- finish(() => reject(new Error("sign-in was denied in the browser")));
4693
- return;
4694
- }
4695
- const token = fields.get("token");
4696
- if (!token) {
4697
- send(400, "Something went wrong", "Run login again.");
4698
- return;
4699
- }
4696
+ const fields = url.searchParams;
4697
+ const send = (status, title, text) => res.writeHead(status, {
4698
+ "content-type": "text/html; charset=utf-8",
4699
+ "cache-control": "no-store",
4700
+ "referrer-policy": "no-referrer"
4701
+ }).end(PAGE(title, text));
4702
+ if (fields.get("state") !== state) {
4700
4703
  send(
4701
- 200,
4702
- "You are signed in",
4703
- "Return to your terminal \u2014 you can close this tab."
4704
+ 400,
4705
+ "Not this login",
4706
+ "This sign-in did not come from the terminal that is waiting. Run login again."
4704
4707
  );
4705
- finish(() => resolve4(token));
4706
- });
4708
+ return;
4709
+ }
4710
+ if (fields.get("error")) {
4711
+ send(200, "Sign-in cancelled", "You can close this tab.");
4712
+ finish(() => reject(new Error("sign-in was denied in the browser")));
4713
+ return;
4714
+ }
4715
+ const token = decrypt(fields.get("token") ?? "");
4716
+ if (!token) {
4717
+ send(400, "Something went wrong", "Run login again.");
4718
+ return;
4719
+ }
4720
+ send(
4721
+ 200,
4722
+ "You are signed in",
4723
+ "Return to your terminal \u2014 you can close this tab."
4724
+ );
4725
+ finish(() => resolve4(token));
4707
4726
  });
4708
4727
  const timer = setTimeout(
4709
4728
  () => finish(
@@ -4720,6 +4739,7 @@ function browserLogin(options) {
4720
4739
  const url = `${options.webOrigin}/cli/authorize?${new URLSearchParams({
4721
4740
  port: String(port),
4722
4741
  state,
4742
+ key,
4723
4743
  name: options.computer
4724
4744
  })}`;
4725
4745
  options.onUrl(url);
@@ -9917,8 +9937,8 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
9917
9937
  "--out <dir>",
9918
9938
  "save the files the run writes here (else their links are printed)"
9919
9939
  ).option(
9920
- "--version <n>",
9921
- "test-run this version (a draft) instead of the published one"
9940
+ "--number <n>",
9941
+ "test-run version n (a draft) instead of the published one"
9922
9942
  ).option("--log", "also print what the run logged (to stderr)").option("--workspace <slug>", "act in this workspace for one call").option("--json", "print the whole run, not just its output").action(
9923
9943
  async (slug, options) => {
9924
9944
  let inputs;
@@ -9966,12 +9986,12 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
9966
9986
  inputs[name] = properties[name]?.type === "array" || ids.length > 1 ? ids : ids[0];
9967
9987
  }
9968
9988
  }
9969
- if (options.version !== void 0 && !/^[1-9]\d*$/.test(options.version)) {
9970
- throw new Error("--version: a version number, e.g. 2");
9989
+ if (options.number !== void 0 && !/^[1-9]\d*$/.test(options.number)) {
9990
+ throw new Error("--number: a version number, like --number 2");
9971
9991
  }
9972
9992
  let run3 = await call3(
9973
9993
  "POST",
9974
- options.version === void 0 ? `/v1/scripts/${encodeURIComponent(slug)}/runs` : `/v1/scripts/${encodeURIComponent(slug)}/versions/${options.version}/runs`,
9994
+ options.number === void 0 ? `/v1/scripts/${encodeURIComponent(slug)}/runs` : `/v1/scripts/${encodeURIComponent(slug)}/versions/${options.number}/runs`,
9975
9995
  { inputs, via: "cli" }
9976
9996
  );
9977
9997
  if (run3.status === "awaiting_approval") {
@@ -10015,7 +10035,9 @@ var defineRun = (command, ctx) => covers(command, "runs.create", "scriptVersions
10015
10035
  if (options.json) {
10016
10036
  ctx.io.stdout(json(run3));
10017
10037
  } else if (run3.status === "succeeded") {
10018
- ctx.io.stdout(json(run3.output));
10038
+ ctx.io.stdout(
10039
+ typeof run3.output === "string" ? run3.output : json(run3.output)
10040
+ );
10019
10041
  }
10020
10042
  if (run3.status !== "succeeded") {
10021
10043
  throw new Error(`The run failed (${run3.id}): ${run3.error}`);
@@ -10031,10 +10053,10 @@ var scriptCommands = (program3, ctx) => {
10031
10053
  `Short for ${brand.name} scripts publish: upload a folder's script and publish it (--draft to test first)`
10032
10054
  );
10033
10055
  defineRun(group.command("run <slug>"), ctx).description(
10034
- `Run a script and print its output (--version to test a draft; shortcut: ${brand.name} run)`
10056
+ `Run a script and print its output (--number to test a draft; shortcut: ${brand.name} run)`
10035
10057
  );
10036
10058
  defineRun(program3.command("run <slug>"), ctx).description(
10037
- `Short for ${brand.name} scripts run: run a script and print its output (--version to test a draft)`
10059
+ `Short for ${brand.name} scripts run: run a script and print its output (--number to test a draft)`
10038
10060
  );
10039
10061
  };
10040
10062
 
@@ -10193,7 +10215,7 @@ function tokenEnvVar() {
10193
10215
  function build(io) {
10194
10216
  let actedIn = null;
10195
10217
  let sending;
10196
- const program3 = new Command().name(brand.name).description(`${brand.productName} command line`).version("1.0.0-rc.4").addHelpText(
10218
+ const program3 = new Command().name(brand.name).description(`${brand.productName} command line`).version("1.0.0-rc.6").addHelpText(
10197
10219
  "after",
10198
10220
  `
10199
10221
  Token: \`${brand.name} login\` stores it in ~/.config/${brand.name}/; ${tokenEnvVar()} overrides.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reminix/cli",
3
- "version": "1.0.0-rc.4",
3
+ "version": "1.0.0-rc.6",
4
4
  "description": "Reminix command line",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@
17
17
  "typecheck": "tsc --noEmit"
18
18
  },
19
19
  "devDependencies": {
20
- "@reminix/sdk": "1.0.0-rc.4",
20
+ "@reminix/sdk": "1.0.0-rc.5",
21
21
  "@types/node": "26.6.5",
22
22
  "commander": "15.0.0",
23
23
  "smol-toml": "1.9.1",