@pleri/olam-cli 0.1.12 → 0.1.14
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/dist/__tests__/image-presence.test.d.ts +2 -0
- package/dist/__tests__/image-presence.test.d.ts.map +1 -0
- package/dist/__tests__/image-presence.test.js +44 -0
- package/dist/__tests__/image-presence.test.js.map +1 -0
- package/dist/__tests__/protocol-version.test.d.ts +2 -0
- package/dist/__tests__/protocol-version.test.d.ts.map +1 -0
- package/dist/__tests__/protocol-version.test.js +170 -0
- package/dist/__tests__/protocol-version.test.js.map +1 -0
- package/dist/__tests__/registry-allowlist.test.d.ts +2 -0
- package/dist/__tests__/registry-allowlist.test.d.ts.map +1 -0
- package/dist/__tests__/registry-allowlist.test.js +129 -0
- package/dist/__tests__/registry-allowlist.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.all-three.test.d.ts +19 -0
- package/dist/commands/__tests__/upgrade.all-three.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.all-three.test.js +92 -0
- package/dist/commands/__tests__/upgrade.all-three.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.history.test.d.ts +15 -0
- package/dist/commands/__tests__/upgrade.history.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.history.test.js +199 -0
- package/dist/commands/__tests__/upgrade.history.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.lock.test.d.ts +15 -0
- package/dist/commands/__tests__/upgrade.lock.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.lock.test.js +253 -0
- package/dist/commands/__tests__/upgrade.lock.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.olam-tag.test.d.ts +21 -0
- package/dist/commands/__tests__/upgrade.olam-tag.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.olam-tag.test.js +127 -0
- package/dist/commands/__tests__/upgrade.olam-tag.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.poll.test.d.ts +14 -0
- package/dist/commands/__tests__/upgrade.poll.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.poll.test.js +136 -0
- package/dist/commands/__tests__/upgrade.poll.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.recreate.test.d.ts +17 -0
- package/dist/commands/__tests__/upgrade.recreate.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.recreate.test.js +95 -0
- package/dist/commands/__tests__/upgrade.recreate.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.rollback.test.d.ts +12 -0
- package/dist/commands/__tests__/upgrade.rollback.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.rollback.test.js +275 -0
- package/dist/commands/__tests__/upgrade.rollback.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.sha-capture.test.d.ts +12 -0
- package/dist/commands/__tests__/upgrade.sha-capture.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.sha-capture.test.js +63 -0
- package/dist/commands/__tests__/upgrade.sha-capture.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.smoke.test.d.ts +19 -0
- package/dist/commands/__tests__/upgrade.smoke.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.smoke.test.js +101 -0
- package/dist/commands/__tests__/upgrade.smoke.test.js.map +1 -0
- package/dist/commands/__tests__/upgrade.swap.test.d.ts +19 -0
- package/dist/commands/__tests__/upgrade.swap.test.d.ts.map +1 -0
- package/dist/commands/__tests__/upgrade.swap.test.js +333 -0
- package/dist/commands/__tests__/upgrade.swap.test.js.map +1 -0
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +31 -0
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/upgrade-history.d.ts +17 -0
- package/dist/commands/upgrade-history.d.ts.map +1 -0
- package/dist/commands/upgrade-history.js +40 -0
- package/dist/commands/upgrade-history.js.map +1 -0
- package/dist/commands/upgrade-lock.d.ts +102 -0
- package/dist/commands/upgrade-lock.d.ts.map +1 -0
- package/dist/commands/upgrade-lock.js +225 -0
- package/dist/commands/upgrade-lock.js.map +1 -0
- package/dist/commands/upgrade-log.d.ts +86 -0
- package/dist/commands/upgrade-log.d.ts.map +1 -0
- package/dist/commands/upgrade-log.js +146 -0
- package/dist/commands/upgrade-log.js.map +1 -0
- package/dist/commands/upgrade.d.ts +265 -0
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +849 -13
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/image-presence.d.ts +40 -0
- package/dist/image-presence.d.ts.map +1 -0
- package/dist/image-presence.js +39 -0
- package/dist/image-presence.js.map +1 -0
- package/dist/index.js +1043 -167
- package/dist/index.js.map +1 -1
- package/dist/protocol-version.d.ts +79 -0
- package/dist/protocol-version.d.ts.map +1 -0
- package/dist/protocol-version.js +133 -0
- package/dist/protocol-version.js.map +1 -0
- package/dist/registry-allowlist.d.ts +47 -0
- package/dist/registry-allowlist.d.ts.map +1 -0
- package/dist/registry-allowlist.js +67 -0
- package/dist/registry-allowlist.js.map +1 -0
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;A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O,CAAC,CAAC;AACzB,aAAa,CAAC,OAAO,CAAC,CAAC;AACvB,sEAAsE;AACtE,yEAAyE;AACzE,0EAA0E;AAC1E,wEAAwE;AACxE,mBAAmB,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAC/D,UAAU,CAAC,OAAO,CAAC,CAAC;AACpB,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAC3B,cAAc,CAAC,OAAO,CAAC,CAAC;AACxB,aAAa,CAAC,OAAO,CAAC,CAAC;AACvB,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC7B,eAAe,CAAC,OAAO,CAAC,CAAC;AACzB,YAAY,CAAC,OAAO,CAAC,CAAC;AACtB,UAAU,CAAC,OAAO,CAAC,CAAC;AACpB,YAAY,CAAC,OAAO,CAAC,CAAC;AACtB,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAC/B,eAAe,CAAC,OAAO,CAAC,CAAC;AAEzB,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Devbox image protocol-version handshake (Decision #14).
|
|
3
|
+
*
|
|
4
|
+
* Closes T13 — cross-namespace protocol skew between CLI and overridden
|
|
5
|
+
* devbox image (e.g. atlas devbox v0.5 + CLI 0.2 with new host-cp wire
|
|
6
|
+
* format). Without this handshake, a CLI/devbox version mismatch
|
|
7
|
+
* silently corrupts; with it, the CLI refuses to start the world and
|
|
8
|
+
* exits with a named code + actionable remedy.
|
|
9
|
+
*
|
|
10
|
+
* Contract: every devbox image declares `LABEL olam.protocol.versions=
|
|
11
|
+
* "<comma-separated-major-list>"` (see docs/architecture/devbox-contract.md
|
|
12
|
+
* §1). The CLI carries a compiled-in `OLAM_PROTOCOL_VERSIONS_SUPPORTED`
|
|
13
|
+
* list and demands non-empty intersection with the image's declaration
|
|
14
|
+
* post-pull, before any container is started.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Protocol versions this CLI release knows how to drive.
|
|
18
|
+
*
|
|
19
|
+
* **Bump procedure**:
|
|
20
|
+
* 1. When the CLI ↔ host-cp wire format gains a backward-incompatible
|
|
21
|
+
* change, append the new version to this list.
|
|
22
|
+
* 2. Update `packages/adapters/src/docker/devbox.Dockerfile` to set
|
|
23
|
+
* `LABEL olam.protocol.versions="<old>,<new>"` during the
|
|
24
|
+
* deprecation window (typically 2 minor releases).
|
|
25
|
+
* 3. Drop the old version from this list once the deprecation window
|
|
26
|
+
* closes.
|
|
27
|
+
*
|
|
28
|
+
* **Compatibility rule**: a CLI MAY support newer versions than its
|
|
29
|
+
* devbox declares — pick the highest mutually-supported version at
|
|
30
|
+
* handshake time. Empty intersection → refuse with EXIT_PROTOCOL_MISMATCH.
|
|
31
|
+
*/
|
|
32
|
+
export declare const OLAM_PROTOCOL_VERSIONS_SUPPORTED: readonly number[];
|
|
33
|
+
/**
|
|
34
|
+
* Parse the value of `olam.protocol.versions` LABEL into a sorted,
|
|
35
|
+
* deduplicated list of major-version integers. Tolerates whitespace,
|
|
36
|
+
* empty strings, and malformed entries (silently skipped — the CLI's
|
|
37
|
+
* empty-intersection check handles "image declares nothing valid").
|
|
38
|
+
*/
|
|
39
|
+
export declare function parseProtocolVersionsLabel(labelValue: string | undefined | null): number[];
|
|
40
|
+
export interface ProtocolHandshake {
|
|
41
|
+
readonly overlap: number[];
|
|
42
|
+
readonly imageVersions: number[];
|
|
43
|
+
readonly cliVersions: readonly number[];
|
|
44
|
+
readonly compatible: boolean;
|
|
45
|
+
readonly remedy: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Check whether the image's declared protocol versions overlap with the
|
|
49
|
+
* CLI's supported list. Returns the overlap (empty when incompatible)
|
|
50
|
+
* plus a named-remedy string for stderr emission on `compatible: false`.
|
|
51
|
+
*
|
|
52
|
+
* The remedy names BOTH version sets so the operator can see exactly
|
|
53
|
+
* why the handshake failed and which CLI version pins they should try.
|
|
54
|
+
*/
|
|
55
|
+
export declare function checkProtocolOverlap(imageVersions: readonly number[], cliVersions?: readonly number[]): ProtocolHandshake;
|
|
56
|
+
/**
|
|
57
|
+
* Read the `olam.protocol.versions` LABEL from a docker image via
|
|
58
|
+
* `docker inspect`. Returns the parsed version list (empty if the label
|
|
59
|
+
* is absent or malformed — the caller routes that into
|
|
60
|
+
* `checkProtocolOverlap` which produces the missing-LABEL remedy).
|
|
61
|
+
*
|
|
62
|
+
* Exposed as a separate function so tests can stub the docker call by
|
|
63
|
+
* passing a mock implementation through `dockerInspect` (see test file).
|
|
64
|
+
*/
|
|
65
|
+
export interface DockerInspectFn {
|
|
66
|
+
(imageRef: string): {
|
|
67
|
+
exitCode: number;
|
|
68
|
+
stdout: string;
|
|
69
|
+
stderr: string;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export interface InspectResult {
|
|
73
|
+
readonly imageRef: string;
|
|
74
|
+
readonly versions: number[];
|
|
75
|
+
readonly inspectFailed: boolean;
|
|
76
|
+
readonly inspectError: string | undefined;
|
|
77
|
+
}
|
|
78
|
+
export declare function inspectImageProtocolVersions(imageRef: string, dockerInspect?: DockerInspectFn): InspectResult;
|
|
79
|
+
//# sourceMappingURL=protocol-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol-version.d.ts","sourceRoot":"","sources":["../src/protocol-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gCAAgC,EAAE,SAAS,MAAM,EAAiB,CAAC;AAEhF;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,EAAE,CAW1F;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,WAAW,GAAE,SAAS,MAAM,EAAqC,GAChE,iBAAiB,CA8CnB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B,CAAC,QAAQ,EAAE,MAAM,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1E;AAeD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,EAChB,aAAa,GAAE,eAAmC,GACjD,aAAa,CAqBf"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Devbox image protocol-version handshake (Decision #14).
|
|
3
|
+
*
|
|
4
|
+
* Closes T13 — cross-namespace protocol skew between CLI and overridden
|
|
5
|
+
* devbox image (e.g. atlas devbox v0.5 + CLI 0.2 with new host-cp wire
|
|
6
|
+
* format). Without this handshake, a CLI/devbox version mismatch
|
|
7
|
+
* silently corrupts; with it, the CLI refuses to start the world and
|
|
8
|
+
* exits with a named code + actionable remedy.
|
|
9
|
+
*
|
|
10
|
+
* Contract: every devbox image declares `LABEL olam.protocol.versions=
|
|
11
|
+
* "<comma-separated-major-list>"` (see docs/architecture/devbox-contract.md
|
|
12
|
+
* §1). The CLI carries a compiled-in `OLAM_PROTOCOL_VERSIONS_SUPPORTED`
|
|
13
|
+
* list and demands non-empty intersection with the image's declaration
|
|
14
|
+
* post-pull, before any container is started.
|
|
15
|
+
*/
|
|
16
|
+
import { spawnSync } from 'node:child_process';
|
|
17
|
+
/**
|
|
18
|
+
* Protocol versions this CLI release knows how to drive.
|
|
19
|
+
*
|
|
20
|
+
* **Bump procedure**:
|
|
21
|
+
* 1. When the CLI ↔ host-cp wire format gains a backward-incompatible
|
|
22
|
+
* change, append the new version to this list.
|
|
23
|
+
* 2. Update `packages/adapters/src/docker/devbox.Dockerfile` to set
|
|
24
|
+
* `LABEL olam.protocol.versions="<old>,<new>"` during the
|
|
25
|
+
* deprecation window (typically 2 minor releases).
|
|
26
|
+
* 3. Drop the old version from this list once the deprecation window
|
|
27
|
+
* closes.
|
|
28
|
+
*
|
|
29
|
+
* **Compatibility rule**: a CLI MAY support newer versions than its
|
|
30
|
+
* devbox declares — pick the highest mutually-supported version at
|
|
31
|
+
* handshake time. Empty intersection → refuse with EXIT_PROTOCOL_MISMATCH.
|
|
32
|
+
*/
|
|
33
|
+
export const OLAM_PROTOCOL_VERSIONS_SUPPORTED = [1];
|
|
34
|
+
/**
|
|
35
|
+
* Parse the value of `olam.protocol.versions` LABEL into a sorted,
|
|
36
|
+
* deduplicated list of major-version integers. Tolerates whitespace,
|
|
37
|
+
* empty strings, and malformed entries (silently skipped — the CLI's
|
|
38
|
+
* empty-intersection check handles "image declares nothing valid").
|
|
39
|
+
*/
|
|
40
|
+
export function parseProtocolVersionsLabel(labelValue) {
|
|
41
|
+
if (!labelValue)
|
|
42
|
+
return [];
|
|
43
|
+
const parts = labelValue.split(',').map((s) => s.trim()).filter(Boolean);
|
|
44
|
+
const versions = new Set();
|
|
45
|
+
for (const part of parts) {
|
|
46
|
+
const n = Number.parseInt(part, 10);
|
|
47
|
+
if (Number.isFinite(n) && n > 0 && String(n) === part) {
|
|
48
|
+
versions.add(n);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return Array.from(versions).sort((a, b) => a - b);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Check whether the image's declared protocol versions overlap with the
|
|
55
|
+
* CLI's supported list. Returns the overlap (empty when incompatible)
|
|
56
|
+
* plus a named-remedy string for stderr emission on `compatible: false`.
|
|
57
|
+
*
|
|
58
|
+
* The remedy names BOTH version sets so the operator can see exactly
|
|
59
|
+
* why the handshake failed and which CLI version pins they should try.
|
|
60
|
+
*/
|
|
61
|
+
export function checkProtocolOverlap(imageVersions, cliVersions = OLAM_PROTOCOL_VERSIONS_SUPPORTED) {
|
|
62
|
+
const cliSet = new Set(cliVersions);
|
|
63
|
+
const overlap = imageVersions.filter((v) => cliSet.has(v));
|
|
64
|
+
if (imageVersions.length === 0) {
|
|
65
|
+
return {
|
|
66
|
+
overlap: [],
|
|
67
|
+
imageVersions: [],
|
|
68
|
+
cliVersions,
|
|
69
|
+
compatible: false,
|
|
70
|
+
remedy: 'Devbox image is missing the `olam.protocol.versions` LABEL. ' +
|
|
71
|
+
`This CLI requires versions [${cliVersions.join(', ')}]. ` +
|
|
72
|
+
'See docs/architecture/devbox-contract.md §1 for the contract; ' +
|
|
73
|
+
'rebuild the image with `LABEL olam.protocol.versions="1"`.',
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (overlap.length === 0) {
|
|
77
|
+
const imgLow = Math.min(...imageVersions);
|
|
78
|
+
const imgHigh = Math.max(...imageVersions);
|
|
79
|
+
const cliLow = Math.min(...cliVersions);
|
|
80
|
+
const cliHigh = Math.max(...cliVersions);
|
|
81
|
+
return {
|
|
82
|
+
overlap: [],
|
|
83
|
+
imageVersions: [...imageVersions],
|
|
84
|
+
cliVersions,
|
|
85
|
+
compatible: false,
|
|
86
|
+
remedy: `Devbox image protocol versions [${imageVersions.join(', ')}] ` +
|
|
87
|
+
`don't overlap CLI's [${cliVersions.join(', ')}]. ` +
|
|
88
|
+
(imgHigh < cliLow
|
|
89
|
+
? `The image is older than this CLI supports — rebuild against the contract version ${cliLow}+ at docs/architecture/devbox-contract.md.`
|
|
90
|
+
: imgLow > cliHigh
|
|
91
|
+
? `The image is newer than this CLI supports — pin a compatible CLI: \`npm install -g @pleri/olam-cli@<version-with-protocol-${imgLow}>\`.`
|
|
92
|
+
: `Pin a compatible CLI version that overlaps with the image's range.`),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
overlap,
|
|
97
|
+
imageVersions: [...imageVersions],
|
|
98
|
+
cliVersions,
|
|
99
|
+
compatible: true,
|
|
100
|
+
remedy: '',
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
const realDockerInspect = (imageRef) => {
|
|
104
|
+
const result = spawnSync('docker', ['inspect', imageRef, '--format', '{{ index .Config.Labels "olam.protocol.versions" }}'], { encoding: 'utf8', timeout: 10_000 });
|
|
105
|
+
return {
|
|
106
|
+
exitCode: result.status ?? -1,
|
|
107
|
+
stdout: result.stdout ?? '',
|
|
108
|
+
stderr: result.stderr ?? '',
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
export function inspectImageProtocolVersions(imageRef, dockerInspect = realDockerInspect) {
|
|
112
|
+
const { exitCode, stdout, stderr } = dockerInspect(imageRef);
|
|
113
|
+
if (exitCode !== 0) {
|
|
114
|
+
return {
|
|
115
|
+
imageRef,
|
|
116
|
+
versions: [],
|
|
117
|
+
inspectFailed: true,
|
|
118
|
+
inspectError: stderr.trim() || `docker inspect exited ${exitCode}`,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
// `docker inspect --format` for a missing LABEL returns the literal
|
|
122
|
+
// string "<no value>" or just an empty newline depending on engine
|
|
123
|
+
// version. Parse defensively.
|
|
124
|
+
const raw = stdout.trim();
|
|
125
|
+
const value = raw === '<no value>' ? '' : raw;
|
|
126
|
+
return {
|
|
127
|
+
imageRef,
|
|
128
|
+
versions: parseProtocolVersionsLabel(value),
|
|
129
|
+
inspectFailed: false,
|
|
130
|
+
inspectError: undefined,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=protocol-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol-version.js","sourceRoot":"","sources":["../src/protocol-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAsB,CAAC,CAAC,CAAU,CAAC;AAEhF;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,UAAqC;IAC9E,IAAI,CAAC,UAAU;QAAE,OAAO,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACzE,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACpC,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACtD,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,CAAC;AAUD;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,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QACR,QAAQ,EAAE,0BAA0B,CAAC,KAAK,CAAC;QAC3C,aAAa,EAAE,KAAK;QACpB,YAAY,EAAE,SAAS;KACxB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry allowlist for `OLAM_DEVBOX_IMAGE` overrides.
|
|
3
|
+
*
|
|
4
|
+
* Closes T9 — unconstrained env-var overrides redirecting docker pulls
|
|
5
|
+
* to attacker-controlled images. The default allowlist is `ghcr.io/pleri/*`
|
|
6
|
+
* (the namespace olam itself publishes to). Out-of-allowlist refs require
|
|
7
|
+
* the explicit `--allow-custom-registry` CLI flag.
|
|
8
|
+
*
|
|
9
|
+
* Decision #19 dropped the env-var bypass form (`OLAM_ALLOW_CUSTOM_REGISTRY=1`)
|
|
10
|
+
* to avoid ambient bypass via shell inheritance / CI-secret leakage. Flag-only.
|
|
11
|
+
*
|
|
12
|
+
* Atlas-parity (Decision #15) lives at `ghcr.io/pleri/olam-devbox-atlas:<v>`
|
|
13
|
+
* — same `pleri` namespace, so the allowlist accepts it without the flag.
|
|
14
|
+
* Other extenders publishing under their own org (e.g. `ghcr.io/atlas/atlas-devbox`)
|
|
15
|
+
* must pass `--allow-custom-registry` per invocation.
|
|
16
|
+
*/
|
|
17
|
+
export interface AllowlistDecision {
|
|
18
|
+
readonly imageRef: string;
|
|
19
|
+
readonly allowedByDefault: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* `true` when:
|
|
22
|
+
* - allowedByDefault, OR
|
|
23
|
+
* - the operator passed --allow-custom-registry.
|
|
24
|
+
*/
|
|
25
|
+
readonly accepted: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The stderr line to emit before pull (or rejection). Always populated:
|
|
28
|
+
* - allowedByDefault → empty string (no warning needed)
|
|
29
|
+
* - allowed-via-flag → warning line ("using custom devbox image …")
|
|
30
|
+
* - rejected (no flag) → error line ("custom registry blocked; use --allow-custom-registry to override")
|
|
31
|
+
*/
|
|
32
|
+
readonly stderrLine: string;
|
|
33
|
+
}
|
|
34
|
+
/** Sentinel to keep call sites readable and the API explicit. */
|
|
35
|
+
export interface AllowlistInput {
|
|
36
|
+
readonly imageRef: string;
|
|
37
|
+
readonly allowCustomRegistry: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare function decideAllowlist(input: AllowlistInput): AllowlistDecision;
|
|
40
|
+
/**
|
|
41
|
+
* Resolve the devbox-image reference from the operator's input, in
|
|
42
|
+
* order of precedence: explicit CLI flag > env var > default. Returns
|
|
43
|
+
* `undefined` when neither flag nor env var is set — caller falls back
|
|
44
|
+
* to the digest-pinned default from `image-digests.json` (Phase B).
|
|
45
|
+
*/
|
|
46
|
+
export declare function resolveDevboxImageOverride(flagValue: string | undefined, env?: NodeJS.ProcessEnv): string | undefined;
|
|
47
|
+
//# sourceMappingURL=registry-allowlist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-allowlist.d.ts","sourceRoot":"","sources":["../src/registry-allowlist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAOH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,iEAAiE;AACjE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;CACvC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,iBAAiB,CAkCxE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,GAAG,SAAS,CASpB"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry allowlist for `OLAM_DEVBOX_IMAGE` overrides.
|
|
3
|
+
*
|
|
4
|
+
* Closes T9 — unconstrained env-var overrides redirecting docker pulls
|
|
5
|
+
* to attacker-controlled images. The default allowlist is `ghcr.io/pleri/*`
|
|
6
|
+
* (the namespace olam itself publishes to). Out-of-allowlist refs require
|
|
7
|
+
* the explicit `--allow-custom-registry` CLI flag.
|
|
8
|
+
*
|
|
9
|
+
* Decision #19 dropped the env-var bypass form (`OLAM_ALLOW_CUSTOM_REGISTRY=1`)
|
|
10
|
+
* to avoid ambient bypass via shell inheritance / CI-secret leakage. Flag-only.
|
|
11
|
+
*
|
|
12
|
+
* Atlas-parity (Decision #15) lives at `ghcr.io/pleri/olam-devbox-atlas:<v>`
|
|
13
|
+
* — same `pleri` namespace, so the allowlist accepts it without the flag.
|
|
14
|
+
* Other extenders publishing under their own org (e.g. `ghcr.io/atlas/atlas-devbox`)
|
|
15
|
+
* must pass `--allow-custom-registry` per invocation.
|
|
16
|
+
*/
|
|
17
|
+
const DEFAULT_ALLOWLIST_PATTERNS = [
|
|
18
|
+
// ghcr.io/pleri/<anything>:<tag> or ghcr.io/pleri/<anything>@sha256:<digest>
|
|
19
|
+
/^ghcr\.io\/pleri\/[^/\s]+(?::[^\s]+|@sha256:[a-f0-9]+)?$/,
|
|
20
|
+
];
|
|
21
|
+
export function decideAllowlist(input) {
|
|
22
|
+
const { imageRef, allowCustomRegistry } = input;
|
|
23
|
+
const allowedByDefault = DEFAULT_ALLOWLIST_PATTERNS.some((re) => re.test(imageRef));
|
|
24
|
+
if (allowedByDefault) {
|
|
25
|
+
return {
|
|
26
|
+
imageRef,
|
|
27
|
+
allowedByDefault: true,
|
|
28
|
+
accepted: true,
|
|
29
|
+
stderrLine: '',
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
if (allowCustomRegistry) {
|
|
33
|
+
return {
|
|
34
|
+
imageRef,
|
|
35
|
+
allowedByDefault: false,
|
|
36
|
+
accepted: true,
|
|
37
|
+
stderrLine: `Warning: using custom devbox image '${imageRef}'. ` +
|
|
38
|
+
`(--allow-custom-registry was specified.) ` +
|
|
39
|
+
`Verify the source and digest before proceeding.`,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
imageRef,
|
|
44
|
+
allowedByDefault: false,
|
|
45
|
+
accepted: false,
|
|
46
|
+
stderrLine: `Error: image '${imageRef}' is outside allowed registries (ghcr.io/pleri/*).\n` +
|
|
47
|
+
` To override: re-run with --allow-custom-registry\n` +
|
|
48
|
+
` Verify the source and digest before doing so.`,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Resolve the devbox-image reference from the operator's input, in
|
|
53
|
+
* order of precedence: explicit CLI flag > env var > default. Returns
|
|
54
|
+
* `undefined` when neither flag nor env var is set — caller falls back
|
|
55
|
+
* to the digest-pinned default from `image-digests.json` (Phase B).
|
|
56
|
+
*/
|
|
57
|
+
export function resolveDevboxImageOverride(flagValue, env = process.env) {
|
|
58
|
+
if (flagValue && flagValue.trim().length > 0) {
|
|
59
|
+
return flagValue.trim();
|
|
60
|
+
}
|
|
61
|
+
const envValue = env.OLAM_DEVBOX_IMAGE;
|
|
62
|
+
if (envValue && envValue.trim().length > 0) {
|
|
63
|
+
return envValue.trim();
|
|
64
|
+
}
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=registry-allowlist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-allowlist.js","sourceRoot":"","sources":["../src/registry-allowlist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,0BAA0B,GAAsB;IACpD,6EAA6E;IAC7E,0DAA0D;CAClD,CAAC;AA0BX,MAAM,UAAU,eAAe,CAAC,KAAqB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