@intentic/gate 1.176.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Artur Kurowski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # @intentic/gate
2
+
3
+ The one-line CI step for a release gate — POSTs what the pipeline knows to a gated workflow's webhook, waits for the run, and exits on the verdict.
4
+
5
+ ## Responsibilities
6
+
7
+ A gated workflow (see `_sandbox/sandbox`, gate.routes.ts) already answers a bare `curl`: POST the request, hold
8
+ the connection, read `{outcome, reason, runId}` back. What every team then writes around that curl is the same
9
+ six lines of shell — map `pass`/`fail`/`blocked` to exit codes, print the reason where the log will show it,
10
+ keep the client's timeout longer than the server's hold. This package is those six lines, written once:
11
+
12
+ ```sh
13
+ npx @intentic/gate "commit $SHA on $BRANCH — preview at $URL"
14
+ ```
15
+
16
+ - `pass` exits 0, `fail` exits 1.
17
+ - `blocked` — the gate could not judge — exits 0 by default, because "the check broke" must not read as "the
18
+ product broke". `--blocked <code>` points it at a real neutral where the CI system has one.
19
+ - Exit 2 is never a verdict: it means the exchange itself failed (wrong token, no such gate, the daily run
20
+ ceiling, network), which needs the pipeline's owner rather than the product's.
21
+
22
+ The URL (token and all) comes from `--url` or the `INTENTIC_GATE_URL` environment variable — the shape every
23
+ CI secret store hands things over in. The request is the arguments joined, or stdin when none are given. The
24
+ `--wait` deadline (default 1800 s) rides to the server, and the HTTP client waits a minute longer, so the
25
+ deadline that fires is the server's — which stops the run instead of abandoning it mid-spend.
26
+
27
+ ## Pipeline templates
28
+
29
+ GitHub Actions has a step of its own — the Marketplace action (`_sandbox/gate-action`), which wraps this
30
+ package's exchange and composes the request from the workflow's context:
31
+
32
+ ```yaml
33
+ - name: Release gate
34
+ uses: intentic/gate-action@v1
35
+ with:
36
+ url: ${{ secrets.INTENTIC_GATE_URL }}
37
+ ```
38
+
39
+ GitLab CI — `allow_failure: exit_codes` is a real neutral, so `blocked` can have its own colour:
40
+
41
+ ```yaml
42
+ release-gate:
43
+ image: node:24-alpine
44
+ script:
45
+ - npx --yes @intentic/gate --blocked 3 "commit $CI_COMMIT_SHA on $CI_COMMIT_REF_NAME"
46
+ allow_failure:
47
+ exit_codes: [3]
48
+ ```
49
+
50
+ ## How it fits
51
+
52
+ The gate route is the daemon's door for a caller with no identity; the designer's gate panel (the workflows
53
+ extension) is where a gate is declared and its URL copied. This package is the third leg: the caller's side of
54
+ the exchange, distributed on npm so a pipeline runs it cold with `npx`. On GitHub specifically the same
55
+ exchange wears Marketplace clothes — `@intentic/gate-action` bundles this package's pure functions into the
56
+ `intentic/gate-action` action — and every other CI system runs this CLI. It deliberately depends on nothing —
57
+ every dependency would be install time on every pipeline of every team — and its hand-rolled verdict reader is
58
+ held against `@intentic/sandbox-contract`'s schema by a test instead of by an import.
59
+
60
+ ## Key files
61
+
62
+ - [src/gate.ts](src/gate.ts) — everything the CLI decides, as pure functions: argument parsing, the dialled URL, the verdict reader, the exit mapping.
63
+ - [src/cli.ts](src/cli.ts) — the process around them: stdin, one fetch, stdout, an exit code.
64
+ - [src/gate.test.ts](src/gate.test.ts) — the behaviour a pipeline relies on, including the reader-versus-contract agreement test.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+ import { clientTimeoutMs, exitOf, parseArgs, readVerdict, targetOf, USAGE } from "./gate.js";
3
+ const readStdin = async () => {
4
+ const chunks = [];
5
+ for await (const chunk of process.stdin) {
6
+ chunks.push(chunk);
7
+ }
8
+ return Buffer.concat(chunks).toString("utf8");
9
+ };
10
+ const parsed = parseArgs(process.argv.slice(2), process.env["INTENTIC_GATE_URL"]);
11
+ if (parsed.kind === "help") {
12
+ console.log(USAGE);
13
+ process.exit(0);
14
+ }
15
+ if (parsed.kind === "error") {
16
+ console.error(parsed.message);
17
+ console.error(`\n${USAGE}`);
18
+ process.exit(2);
19
+ }
20
+ const { call } = parsed;
21
+ const request = call.request !== "" ? call.request : process.stdin.isTTY ? "" : (await readStdin()).trim();
22
+ let response;
23
+ try {
24
+ response = await fetch(targetOf(call.url, call.waitS), {
25
+ method: "POST",
26
+ body: request,
27
+ signal: AbortSignal.timeout(clientTimeoutMs(call.waitS)),
28
+ });
29
+ }
30
+ catch (error) {
31
+ console.error(`the gate could not be reached: ${error instanceof Error ? error.message : String(error)}`);
32
+ process.exit(2);
33
+ }
34
+ const text = await response.text();
35
+ if (!response.ok) {
36
+ let detail = text;
37
+ try {
38
+ const body = JSON.parse(text);
39
+ detail = typeof body.error === "string" ? body.error : text;
40
+ }
41
+ catch {
42
+ }
43
+ console.error(`the gate answered ${response.status}: ${detail}`);
44
+ process.exit(2);
45
+ }
46
+ let body;
47
+ try {
48
+ body = JSON.parse(text);
49
+ }
50
+ catch {
51
+ body = undefined;
52
+ }
53
+ const verdict = readVerdict(body);
54
+ if (verdict === undefined) {
55
+ console.error(`the gate's answer was not a verdict: ${text.slice(0, 200)}`);
56
+ process.exit(2);
57
+ }
58
+ console.log(`${verdict.outcome}: ${verdict.reason}`);
59
+ console.log(`run ${verdict.runId}`);
60
+ process.exit(exitOf(verdict, call.blockedExit));
61
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAW7F,MAAM,SAAS,GAAG,KAAK,IAAqB,EAAE;IAC1C,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QACtC,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC;AAClF,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IACzB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AACD,IAAI,MAAM,CAA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AAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAwB,CAAC;QACrD,MAAM,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAChE,CAAC;IAAC,MAAM,CAAC;IAET,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,qBAAqB,QAAQ,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC,CAAC;IACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAED,IAAI,IAAa,CAAC;AAClB,IAAI,CAAC;IACD,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAAC,MAAM,CAAC;IACL,IAAI,GAAG,SAAS,CAAC;AACrB,CAAC;AACD,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;AAClC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;IACxB,OAAO,CAAC,KAAK,CAAC,wCAAwC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAID,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AACrD,OAAO,CAAC,GAAG,CAAC,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;AACpC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC"}
package/dist/gate.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ export interface GateVerdict {
2
+ readonly outcome: "pass" | "fail" | "blocked";
3
+ readonly reason: string;
4
+ readonly runId: string;
5
+ readonly value?: string;
6
+ }
7
+ export interface GateCall {
8
+ readonly url: string;
9
+ readonly waitS: number;
10
+ readonly blockedExit: number;
11
+ readonly request: string;
12
+ }
13
+ export type Parsed = {
14
+ kind: "call";
15
+ call: GateCall;
16
+ } | {
17
+ kind: "help";
18
+ } | {
19
+ kind: "error";
20
+ message: string;
21
+ };
22
+ export declare const WAIT_DEFAULT_S = 1800;
23
+ export declare const USAGE = "intentic-gate \u2014 run an intentic release gate and exit on its verdict\n\nusage: intentic-gate [options] [request...]\n\nThe request \u2014 what this pipeline knows: commit, branch, preview URL \u2014 is the arguments joined,\nor stdin when none are given (so `git log -1 | intentic-gate` works).\n\noptions:\n --url <url> the gate's webhook URL, token and all (or env INTENTIC_GATE_URL)\n --wait <seconds> how long the gate holds the connection (default 1800; the server caps at 3h)\n --blocked <code> exit code for a blocked verdict (default 0 \u2014 \"could not judge\" is not a failed build)\n -h, --help this text\n\nexit codes: 0 pass (and blocked, unless --blocked says otherwise) \u00B7 1 fail \u00B7 2 the exchange itself\nfailed \u2014 wrong token, no such gate, daily ceiling reached, network. 2 is never a verdict: it means\nthe pipeline's wiring needs a person, not that the product does.";
24
+ export declare const parseArgs: (argv: readonly string[], envUrl: string | undefined) => Parsed;
25
+ export declare const targetOf: (url: string, waitS: number) => string;
26
+ export declare const clientTimeoutMs: (waitS: number) => number;
27
+ export declare const readVerdict: (body: unknown) => GateVerdict | undefined;
28
+ export declare const exitOf: (verdict: GateVerdict, blockedExit: number) => number;
29
+ //# sourceMappingURL=gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,WAAW;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,QAAQ;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAIvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAG7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,MAAM,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9G,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,eAAO,MAAM,KAAK,i6BAe+C,CAAC;AAElE,eAAO,MAAM,SAAS,SAAU,SAAS,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS,KAAG,MAwC/E,CAAC;AAIF,eAAO,MAAM,QAAQ,QAAS,MAAM,SAAS,MAAM,KAAG,MAIrD,CAAC;AAIF,eAAO,MAAM,eAAe,UAAW,MAAM,KAAG,MAA8B,CAAC;AAM/E,eAAO,MAAM,WAAW,SAAU,OAAO,KAAG,WAAW,GAAG,SAczD,CAAC;AAEF,eAAO,MAAM,MAAM,YAAa,WAAW,eAAe,MAAM,KAAG,MAKlE,CAAC"}
package/dist/gate.js ADDED
@@ -0,0 +1,88 @@
1
+ export const WAIT_DEFAULT_S = 1800;
2
+ export const USAGE = `intentic-gate — run an intentic release gate and exit on its verdict
3
+
4
+ usage: intentic-gate [options] [request...]
5
+
6
+ The request — what this pipeline knows: commit, branch, preview URL — is the arguments joined,
7
+ or stdin when none are given (so \`git log -1 | intentic-gate\` works).
8
+
9
+ options:
10
+ --url <url> the gate's webhook URL, token and all (or env INTENTIC_GATE_URL)
11
+ --wait <seconds> how long the gate holds the connection (default ${WAIT_DEFAULT_S}; the server caps at 3h)
12
+ --blocked <code> exit code for a blocked verdict (default 0 — "could not judge" is not a failed build)
13
+ -h, --help this text
14
+
15
+ exit codes: 0 pass (and blocked, unless --blocked says otherwise) · 1 fail · 2 the exchange itself
16
+ failed — wrong token, no such gate, daily ceiling reached, network. 2 is never a verdict: it means
17
+ the pipeline's wiring needs a person, not that the product does.`;
18
+ export const parseArgs = (argv, envUrl) => {
19
+ let url = envUrl;
20
+ let waitS = WAIT_DEFAULT_S;
21
+ let blockedExit = 0;
22
+ const words = [];
23
+ for (let at = 0; at < argv.length; at += 1) {
24
+ const arg = argv[at];
25
+ if (arg === "-h" || arg === "--help") {
26
+ return { kind: "help" };
27
+ }
28
+ if (arg === "--url" || arg === "--wait" || arg === "--blocked") {
29
+ const value = argv[at + 1];
30
+ if (value === undefined) {
31
+ return { kind: "error", message: `${arg} needs a value` };
32
+ }
33
+ at += 1;
34
+ if (arg === "--url") {
35
+ url = value;
36
+ continue;
37
+ }
38
+ const numeric = Number(value);
39
+ if (!Number.isInteger(numeric) || numeric < 0) {
40
+ return { kind: "error", message: `${arg} needs a whole number, not "${value}"` };
41
+ }
42
+ if (arg === "--wait") {
43
+ waitS = numeric;
44
+ }
45
+ else {
46
+ blockedExit = numeric;
47
+ }
48
+ continue;
49
+ }
50
+ if (arg.startsWith("--")) {
51
+ return { kind: "error", message: `unknown option ${arg}` };
52
+ }
53
+ words.push(arg);
54
+ }
55
+ if (url === undefined || url === "") {
56
+ return { kind: "error", message: "no gate URL: pass --url or set INTENTIC_GATE_URL" };
57
+ }
58
+ return { kind: "call", call: { url, waitS, blockedExit, request: words.join(" ") } };
59
+ };
60
+ export const targetOf = (url, waitS) => {
61
+ const target = new URL(url);
62
+ target.searchParams.set("wait", String(waitS));
63
+ return target.toString();
64
+ };
65
+ export const clientTimeoutMs = (waitS) => (waitS + 60) * 1_000;
66
+ const OUTCOMES = new Set(["pass", "fail", "blocked"]);
67
+ export const readVerdict = (body) => {
68
+ if (typeof body !== "object" || body === null) {
69
+ return undefined;
70
+ }
71
+ const { outcome, reason, runId, value } = body;
72
+ if (typeof outcome !== "string" || !OUTCOMES.has(outcome) || typeof reason !== "string" || typeof runId !== "string") {
73
+ return undefined;
74
+ }
75
+ return {
76
+ outcome: outcome,
77
+ reason,
78
+ runId,
79
+ ...(typeof value === "string" ? { value } : {}),
80
+ };
81
+ };
82
+ export const exitOf = (verdict, blockedExit) => {
83
+ if (verdict.outcome === "pass") {
84
+ return 0;
85
+ }
86
+ return verdict.outcome === "fail" ? 1 : blockedExit;
87
+ };
88
+ //# sourceMappingURL=gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.js","sourceRoot":"","sources":["../src/gate.ts"],"names":[],"mappings":"AAgCA,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC;AAEnC,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;sEASiD,cAAc;;;;;;iEAMnB,CAAC;AAElE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAuB,EAAE,MAA0B,EAAU,EAAE;IACrF,IAAI,GAAG,GAAG,MAAM,CAAC;IACjB,IAAI,KAAK,GAAG,cAAc,CAAC;IAC3B,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,GAAG,GAAG,IAAI,CAAC,EAAE,CAAW,CAAC;QAC/B,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;YACnC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAC5B,CAAC;QACD,IAAI,GAAG,KAAK,OAAO,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,WAAW,EAAE,CAAC;YAC7D,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;YAC3B,IAAI,KAAK,KAAK,SAAS,EAAE,CA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K,MAAM,EAAE,CAAC;QAC7B,OAAO,CAAC,CAAC;IACb,CAAC;IACD,OAAO,OAAO,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;AACxD,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@intentic/gate",
3
+ "version": "1.176.3",
4
+ "description": "Run an intentic release gate from a CI pipeline — POST what the pipeline knows, wait for the run, exit on the verdict",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/intentic/intentic.git",
10
+ "directory": "_sandbox/gate"
11
+ },
12
+ "types": "./dist/gate.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/gate.d.ts",
16
+ "import": {
17
+ "@intentic/src": "./src/gate.ts",
18
+ "default": "./dist/gate.js"
19
+ }
20
+ }
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public",
27
+ "registry": "https://registry.npmjs.org/"
28
+ },
29
+ "bin": {
30
+ "intentic-gate": "./dist/cli.js"
31
+ },
32
+ "dependencies": {
33
+ "tslib": "2.8.1"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "24.13.2",
37
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
38
+ "vitest": "4.1.10",
39
+ "@intentic/sandbox-contract": "1.176.3",
40
+ "@intentic/testing": "0.0.0",
41
+ "@intentic/tsconfig": "0.0.0"
42
+ },
43
+ "scripts": {
44
+ "build": "tsgo",
45
+ "typecheck": "tsgo --noEmit -p tsconfig.test.json",
46
+ "watch": "tsgo --build --watch",
47
+ "test": "vitest run",
48
+ "test:watch": "vitest"
49
+ }
50
+ }