@reminix/cli 1.0.0-rc.10 → 1.0.0-rc.11

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,32 @@
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.11 (2026-11-13)
6
+
7
+ ### Changed
8
+
9
+ - Publishing (`reminix publish`, `POST /v1/scripts/{slug}/versions`) now
10
+ refuses a command that puts an input inside code given to an interpreter
11
+ on the command line, such as `sh -c 'echo {name}'` or
12
+ `python -c 'print({name})'`, because the interpreter would run the value
13
+ as code. The error shows the safe form, with the input as its own
14
+ argument: `sh -c 'echo "$1"' _ {name}`. Versions published before keep
15
+ running.
16
+ - Triggers have a type. `POST /v1/scripts/{slug}/triggers` takes
17
+ `type: "event"` or `type: "webhook"`. An event trigger's `eventType` is
18
+ now `event`, and a trigger's `filter` is null for a webhook trigger. A
19
+ webhook trigger starts a run when its URL is called with its secret; it
20
+ can take inputs from the call (`inputMode`), lock saved inputs
21
+ (`lockedInputs`) and check a Stripe or GitHub signature (`signature`,
22
+ `signingSecret`). Creating one returns its `url` and `secret`, once.
23
+ `POST /v1/scripts/{slug}/triggers/{triggerId}/rotate-secret` gives a new
24
+ one, and `GET /v1/scripts/{slug}/triggers/{triggerId}/calls` lists its
25
+ recent calls. A run's `via` can now be `webhook`, and a run has
26
+ `automationName`, the name of the schedule or trigger that started it. An AI agent can't
27
+ create a webhook trigger or rotate its secret. It asks with the approval
28
+ actions `trigger.webhook.create` and `trigger.webhook.rotateSecret`, and
29
+ a workspace owner approves.
30
+
5
31
  ## 1.0.0-rc.10 (2026-11-12)
6
32
 
7
33
  ### Added
package/dist/reminix.mjs CHANGED
@@ -6948,7 +6948,7 @@ var OPERATIONS = [
6948
6948
  "idempotentHint": false
6949
6949
  }
6950
6950
  },
6951
- "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.",
6951
+ "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. When an agent connected through MCP publishes, it 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.",
6952
6952
  "fields": [
6953
6953
  {
6954
6954
  "name": "slug",
@@ -7552,11 +7552,65 @@ var OPERATIONS = [
7552
7552
  "acceptsApiKey": true,
7553
7553
  "scope": "secrets:write"
7554
7554
  },
7555
+ {
7556
+ "operationId": "triggers.calls",
7557
+ "method": "get",
7558
+ "path": "/scripts/{slug}/triggers/{triggerId}/calls",
7559
+ "summary": "List a webhook trigger's calls",
7560
+ "cli": {
7561
+ "command": "triggers calls",
7562
+ "args": [
7563
+ "slug",
7564
+ "triggerId"
7565
+ ],
7566
+ "confirm": false
7567
+ },
7568
+ "mcp": {
7569
+ "exposed": true,
7570
+ "name": "triggers_calls",
7571
+ "hints": {
7572
+ "readOnlyHint": true,
7573
+ "destructiveHint": false,
7574
+ "idempotentHint": true
7575
+ }
7576
+ },
7577
+ "description": "Returns a webhook trigger's last 20 calls, newest first: when each came, whether it started a run or repeated an earlier call, why Reminix refused it, and the run. Reminix keeps calls for 30 days.",
7578
+ "fields": [
7579
+ {
7580
+ "name": "slug",
7581
+ "in": "path",
7582
+ "type": "string",
7583
+ "required": true,
7584
+ "description": "The slug's ID.",
7585
+ "example": "alert-on-failure",
7586
+ "schema": {
7587
+ "type": "string",
7588
+ "description": "The slug's ID."
7589
+ }
7590
+ },
7591
+ {
7592
+ "name": "triggerId",
7593
+ "in": "path",
7594
+ "type": "string",
7595
+ "required": true,
7596
+ "description": "The trigger's ID.",
7597
+ "example": "trg_6e4a\u2026",
7598
+ "schema": {
7599
+ "type": "string",
7600
+ "description": "The trigger's ID."
7601
+ }
7602
+ }
7603
+ ],
7604
+ "hasBody": false,
7605
+ "workspace": true,
7606
+ "acceptsApiKey": true,
7607
+ "scope": "scripts:read"
7608
+ },
7555
7609
  {
7556
7610
  "operationId": "triggers.create",
7557
7611
  "method": "post",
7558
7612
  "path": "/scripts/{slug}/triggers",
7559
- "summary": "Run a script on an event",
7613
+ "summary": "Run a script when something happens",
7560
7614
  "cli": {
7561
7615
  "command": "triggers create",
7562
7616
  "args": [
@@ -7566,9 +7620,9 @@ var OPERATIONS = [
7566
7620
  },
7567
7621
  "mcp": {
7568
7622
  "exposed": false,
7569
- "reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
7623
+ "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."
7570
7624
  },
7571
- "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.",
7625
+ "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.",
7572
7626
  "fields": [
7573
7627
  {
7574
7628
  "name": "slug",
@@ -7582,6 +7636,22 @@ var OPERATIONS = [
7582
7636
  "description": "The slug's ID."
7583
7637
  }
7584
7638
  },
7639
+ {
7640
+ "name": "type",
7641
+ "in": "body",
7642
+ "type": "string",
7643
+ "required": true,
7644
+ "description": "A workspace event starts the runs. (enum property replaced by openapi-typescript)",
7645
+ "example": "event",
7646
+ "schema": {
7647
+ "type": "string",
7648
+ "enum": [
7649
+ "event",
7650
+ "webhook"
7651
+ ],
7652
+ "description": "A workspace event starts the runs. (enum property replaced by openapi-typescript)"
7653
+ }
7654
+ },
7585
7655
  {
7586
7656
  "name": "name",
7587
7657
  "in": "body",
@@ -7597,10 +7667,10 @@ var OPERATIONS = [
7597
7667
  }
7598
7668
  },
7599
7669
  {
7600
- "name": "eventType",
7670
+ "name": "event",
7601
7671
  "in": "body",
7602
7672
  "type": "string",
7603
- "required": true,
7673
+ "required": false,
7604
7674
  "description": "The event that starts a run. It can be any webhook event type, such as `run.failed`.",
7605
7675
  "example": "run.failed",
7606
7676
  "schema": {
@@ -7650,12 +7720,88 @@ var OPERATIONS = [
7650
7720
  "type": "string",
7651
7721
  "description": "The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment."
7652
7722
  }
7723
+ },
7724
+ {
7725
+ "name": "inputMode",
7726
+ "in": "body",
7727
+ "type": "string",
7728
+ "required": false,
7729
+ "description": "Where each run's inputs come from. `fixed`, the default, uses the saved `inputs` and ignores the body. `call` takes the body's fields that match the script's inputs. `request` gives the script the whole request as its `request` input.",
7730
+ "example": "request",
7731
+ "schema": {
7732
+ "type": "string",
7733
+ "enum": [
7734
+ "fixed",
7735
+ "call",
7736
+ "request"
7737
+ ],
7738
+ "description": "Where each run's inputs come from. `fixed`, the default, uses the saved `inputs` and ignores the body. `call` takes the body's fields that match the script's inputs. `request` gives the script the whole request as its `request` input."
7739
+ }
7740
+ },
7741
+ {
7742
+ "name": "lockedInputs",
7743
+ "in": "body",
7744
+ "type": "json",
7745
+ "required": false,
7746
+ "description": "Saved inputs that a call can't change.",
7747
+ "example": [
7748
+ "account"
7749
+ ],
7750
+ "schema": {
7751
+ "type": "array",
7752
+ "items": {
7753
+ "type": "string"
7754
+ },
7755
+ "description": "Saved inputs that a call can't change."
7756
+ }
7757
+ },
7758
+ {
7759
+ "name": "signature",
7760
+ "in": "body",
7761
+ "type": "string",
7762
+ "required": false,
7763
+ "description": "Check each call's signature: `stripe` (Stripe-Signature) or `github` (X-Hub-Signature-256). The default is `none`.",
7764
+ "example": "stripe",
7765
+ "schema": {
7766
+ "type": "string",
7767
+ "enum": [
7768
+ "none",
7769
+ "stripe",
7770
+ "github"
7771
+ ],
7772
+ "description": "Check each call's signature: `stripe` (Stripe-Signature) or `github` (X-Hub-Signature-256). The default is `none`."
7773
+ }
7774
+ },
7775
+ {
7776
+ "name": "signingSecret",
7777
+ "in": "body",
7778
+ "type": "string",
7779
+ "required": false,
7780
+ "description": "The provider's signing secret, with `signature` `stripe` or `github`. Reminix stores it encrypted and never returns it.",
7781
+ "example": "whsec_\u2026",
7782
+ "schema": {
7783
+ "type": "string",
7784
+ "minLength": 1,
7785
+ "description": "The provider's signing secret, with `signature` `stripe` or `github`. Reminix stores it encrypted and never returns it."
7786
+ }
7653
7787
  }
7654
7788
  ],
7655
7789
  "hasBody": true,
7656
7790
  "workspace": true,
7657
7791
  "acceptsApiKey": false,
7658
- "scope": "scripts:write"
7792
+ "scope": "scripts:write",
7793
+ "variants": {
7794
+ "field": "type",
7795
+ "required": {
7796
+ "event": [
7797
+ "name",
7798
+ "event"
7799
+ ],
7800
+ "webhook": [
7801
+ "name"
7802
+ ]
7803
+ }
7804
+ }
7659
7805
  },
7660
7806
  {
7661
7807
  "operationId": "triggers.delete",
@@ -7674,7 +7820,7 @@ var OPERATIONS = [
7674
7820
  "exposed": false,
7675
7821
  "reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
7676
7822
  },
7677
- "description": "Deletes a trigger. The trigger's creator, a workspace owner or admin, or a workspace API key can delete it.",
7823
+ "description": "Deletes a trigger. The creator of an event trigger, a webhook trigger's script owner, a workspace owner or admin, or a workspace API key can delete it.",
7678
7824
  "fields": [
7679
7825
  {
7680
7826
  "name": "slug",
@@ -7747,6 +7893,55 @@ var OPERATIONS = [
7747
7893
  "acceptsApiKey": true,
7748
7894
  "scope": "scripts:read"
7749
7895
  },
7896
+ {
7897
+ "operationId": "triggers.rotateSecret",
7898
+ "method": "post",
7899
+ "path": "/scripts/{slug}/triggers/{triggerId}/rotate-secret",
7900
+ "summary": "Rotate a webhook trigger's secret",
7901
+ "cli": {
7902
+ "command": "triggers rotate-secret",
7903
+ "args": [
7904
+ "slug",
7905
+ "triggerId"
7906
+ ],
7907
+ "confirm": true
7908
+ },
7909
+ "mcp": {
7910
+ "exposed": false,
7911
+ "reason": "Only a person can rotate a webhook trigger's secret. An agent can ask: POST /v1/workspace/approval-requests with action trigger.webhook.rotateSecret, which a workspace owner approves."
7912
+ },
7913
+ "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.",
7914
+ "fields": [
7915
+ {
7916
+ "name": "slug",
7917
+ "in": "path",
7918
+ "type": "string",
7919
+ "required": true,
7920
+ "description": "The slug's ID.",
7921
+ "example": "alert-on-failure",
7922
+ "schema": {
7923
+ "type": "string",
7924
+ "description": "The slug's ID."
7925
+ }
7926
+ },
7927
+ {
7928
+ "name": "triggerId",
7929
+ "in": "path",
7930
+ "type": "string",
7931
+ "required": true,
7932
+ "description": "The trigger's ID.",
7933
+ "example": "trg_6e4a\u2026",
7934
+ "schema": {
7935
+ "type": "string",
7936
+ "description": "The trigger's ID."
7937
+ }
7938
+ }
7939
+ ],
7940
+ "hasBody": false,
7941
+ "workspace": true,
7942
+ "acceptsApiKey": true,
7943
+ "scope": "scripts:write"
7944
+ },
7750
7945
  {
7751
7946
  "operationId": "triggers.update",
7752
7947
  "method": "patch",
@@ -7764,7 +7959,7 @@ var OPERATIONS = [
7764
7959
  "exposed": false,
7765
7960
  "reason": "Schedules and triggers run as the person who created them. Only a person can create or change them."
7766
7961
  },
7767
- "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.",
7962
+ "description": "Changes a trigger's name, inputs or environment, or whether it's enabled. It also changes an event trigger's filter, or a webhook trigger's input mode, locked inputs and signature check. Changing the signature check needs its signing secret again. The creator of an event trigger, a webhook trigger's script owner, a workspace owner or admin, or a workspace API key can change it.",
7768
7963
  "fields": [
7769
7964
  {
7770
7965
  "name": "slug",
@@ -7855,6 +8050,64 @@ var OPERATIONS = [
7855
8050
  "type": "string",
7856
8051
  "description": "Another environment for the trigger's runs to use."
7857
8052
  }
8053
+ },
8054
+ {
8055
+ "name": "inputMode",
8056
+ "in": "body",
8057
+ "type": "string",
8058
+ "required": false,
8059
+ "description": "A webhook trigger's input mode.",
8060
+ "schema": {
8061
+ "type": "string",
8062
+ "enum": [
8063
+ "fixed",
8064
+ "call",
8065
+ "request"
8066
+ ],
8067
+ "description": "A webhook trigger's input mode."
8068
+ }
8069
+ },
8070
+ {
8071
+ "name": "lockedInputs",
8072
+ "in": "body",
8073
+ "type": "json",
8074
+ "required": false,
8075
+ "description": "A webhook trigger's saved inputs that a call can't change.",
8076
+ "schema": {
8077
+ "type": "array",
8078
+ "items": {
8079
+ "type": "string"
8080
+ },
8081
+ "description": "A webhook trigger's saved inputs that a call can't change."
8082
+ }
8083
+ },
8084
+ {
8085
+ "name": "signature",
8086
+ "in": "body",
8087
+ "type": "string",
8088
+ "required": false,
8089
+ "description": "A webhook trigger's signature check.",
8090
+ "schema": {
8091
+ "type": "string",
8092
+ "enum": [
8093
+ "none",
8094
+ "stripe",
8095
+ "github"
8096
+ ],
8097
+ "description": "A webhook trigger's signature check."
8098
+ }
8099
+ },
8100
+ {
8101
+ "name": "signingSecret",
8102
+ "in": "body",
8103
+ "type": "string",
8104
+ "required": false,
8105
+ "description": "A new signing secret, with `signature` `stripe` or `github`.",
8106
+ "schema": {
8107
+ "type": "string",
8108
+ "minLength": 1,
8109
+ "description": "A new signing secret, with `signature` `stripe` or `github`."
8110
+ }
7858
8111
  }
7859
8112
  ],
7860
8113
  "hasBody": true,
@@ -9043,6 +9296,8 @@ async function call2(ctx, op, args, options, flags) {
9043
9296
  `missing ${missing.map((f) => `--${flag(f.name)}`).join(", ")}`
9044
9297
  );
9045
9298
  }
9299
+ const problem = variantProblem(op, input, whole);
9300
+ if (problem) throw new Error(problem);
9046
9301
  const request = operationRequest(op, input, whole);
9047
9302
  const headers = {
9048
9303
  authorization: `Bearer ${token}`
@@ -9114,6 +9369,19 @@ function print(ctx, data, asJson) {
9114
9369
  }
9115
9370
  ctx.io.stdout(String(data));
9116
9371
  }
9372
+ function variantProblem(op, input, whole) {
9373
+ if (!op.variants) return void 0;
9374
+ const key = op.variants.field;
9375
+ const chosen = String(input[key] ?? whole[key]);
9376
+ const needs = op.variants.required[chosen];
9377
+ if (!needs) {
9378
+ return `--${flag(key)} must be one of ${Object.keys(op.variants.required).join(", ")}`;
9379
+ }
9380
+ const absent = needs.filter(
9381
+ (name) => input[name] === void 0 && whole[name] === void 0
9382
+ );
9383
+ return absent.length > 0 ? `missing ${absent.map((name) => `--${flag(name)}`).join(", ")} (needed with --${flag(key)} ${chosen})` : void 0;
9384
+ }
9117
9385
 
9118
9386
  // src/product/files.ts
9119
9387
  import { mkdirSync as mkdirSync2, readFileSync as readFileSync4, writeFileSync as writeFileSync4 } from "node:fs";
@@ -10830,7 +11098,7 @@ function tokenEnvVar() {
10830
11098
  function build(io) {
10831
11099
  let actedIn = null;
10832
11100
  let sending;
10833
- const program3 = new Command().name(brand.name).description(`The ${brand.productName} CLI`).version("1.0.0-rc.10").addHelpText(
11101
+ const program3 = new Command().name(brand.name).description(`The ${brand.productName} CLI`).version("1.0.0-rc.11").addHelpText(
10834
11102
  "after",
10835
11103
  `
10836
11104
  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.10",
3
+ "version": "1.0.0-rc.11",
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.8",
29
+ "@reminix/sdk": "1.0.0-rc.9",
30
30
  "@types/node": "26.6.6",
31
31
  "commander": "15.1.0",
32
32
  "smol-toml": "1.9.1",