@qerexa/cli 0.1.0 → 0.1.1

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.
Files changed (3) hide show
  1. package/README.md +15 -8
  2. package/index.mjs +7 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,13 +1,20 @@
1
1
  # Qerexa CLI (preview)
2
2
 
3
- CLI for Qerexa execution gates and secret workflows.
4
-
5
- This is a preview, not a regulated execution adapter. `gate` exits 0 only for
6
- a direct, unexpired allow (HTTP 200, `decision: "allowed"`, `allowed: true`, a
7
- `decision_id`, and a future `expires_at`). Review approval exits nonzero because
8
- a separate action-bound execution authorization is required; do not treat
9
- review status alone as permission for a CI job to deploy or transfer value.
10
- `--no-wait` exits 2 when review is required.
3
+ Put a Qerexa check in front of your CI jobs, and manage short-lived secrets
4
+ from the terminal.
5
+
6
+ `qerexa-cli gate` exits 0 only when Qerexa gives a clear, current yes: an
7
+ `allowed` decision with its own ID and an expiry still in the future. Every
8
+ other outcome exits non-zero, so the pipeline step that depends on it simply
9
+ doesn't run. When a human review is needed, `--no-wait` exits with code 2 right
10
+ away instead of polling.
11
+
12
+ An approved review still exits non-zero. Approving a review isn't permission
13
+ to deploy or move money, so feed that decision into your own action-bound
14
+ execution step rather than treating it as a green light.
15
+
16
+ This is a preview, not a certified execution control. Redirects are never
17
+ followed, so your API key stays with the API host you configure.
11
18
 
12
19
  ## Install
13
20
 
package/index.mjs CHANGED
@@ -86,7 +86,13 @@ async function resilientFetch(url, init, attempts = 3) {
86
86
  let lastError;
87
87
  for (let attempt = 0; attempt < attempts; attempt++) {
88
88
  try {
89
- const response = await fetch(url, { ...init, signal: AbortSignal.timeout(10_000) });
89
+ // The API never redirects. Following one would send X-API-Key to another
90
+ // host (fetch drops only Authorization), and a 3xx is never an allow.
91
+ const response = await fetch(url, {
92
+ ...init,
93
+ redirect: "manual",
94
+ signal: AbortSignal.timeout(10_000),
95
+ });
90
96
  if (response.status !== 429 && response.status < 500) return response;
91
97
  if (attempt === attempts - 1) return response;
92
98
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qerexa/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Preview CLI for Qerexa execution gates and secret workflows.",
5
5
  "type": "module",
6
6
  "bin": {