getculpa 1.0.9 → 1.0.10
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/README.md +6 -2
- package/assets/culpa-compose.yml +4 -4
- package/bin/getculpa.js +9 -5
- package/lib/dispatch.mjs +7 -0
- package/lib/docker.mjs +290 -270
- package/lib/doctor.mjs +454 -420
- package/lib/preflight.mjs +322 -274
- package/lib/provision.mjs +47 -5
- package/lib/start.mjs +524 -487
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,11 @@ money went, across models, features and users, on your own machine.
|
|
|
5
5
|
|
|
6
6
|
**`npm i -g getculpa` provisions the full Culpa install — the same files,
|
|
7
7
|
shortcuts, and registration the Windows installer lays down — and starts
|
|
8
|
-
nothing.** `getculpa` is what wakes the stack up.
|
|
8
|
+
nothing.** `getculpa` is what wakes the stack up. On npm 12 or newer, npm
|
|
9
|
+
blocks install scripts by default: install with
|
|
10
|
+
`npm i -g --allow-scripts=getculpa getculpa` (or run
|
|
11
|
+
`npm config set allow-scripts=getculpa --location=user` once). If `getculpa`
|
|
12
|
+
says Culpa was never provisioned, that is why.
|
|
9
13
|
|
|
10
14
|
- `getculpa` / `getculpa start` — start (or resume) the Culpa stack
|
|
11
15
|
- `getculpa stop` — stop the running stack (`docker compose stop`; recorded data is kept)
|
|
@@ -14,7 +18,7 @@ nothing.** `getculpa` is what wakes the stack up.
|
|
|
14
18
|
- `getculpa doctor` — diagnose this install (version/platform, file integrity, Docker, container state, ports, health, license presence — never prints key material); exits 1 if a check fails
|
|
15
19
|
- `getculpa repair` — re-stage any missing/corrupt install files (never touches an existing `docker-compose.yml` or recorded data); idempotent
|
|
16
20
|
- `getculpa uninstall` — remove Culpa (recorded data is kept unless you confirm)
|
|
17
|
-
- `getculpa scan` —
|
|
21
|
+
- `getculpa scan` — refresh the Culpa ledger scan (needs the running stack); `getculpa scan --preview` reads local logs offline: no Docker, no network
|
|
18
22
|
- `getculpa connect` — print the topology-appropriate capture recipe (`--fly` also emits a ready-to-deploy Fly.io shape)
|
|
19
23
|
- `getculpa update` — manage CLI launcher updates
|
|
20
24
|
|
package/assets/culpa-compose.yml
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# name is used when present, which is how these pins were verified before
|
|
6
6
|
# publication.
|
|
7
7
|
#
|
|
8
|
-
# ── RELEASE STATE: v1.0.
|
|
8
|
+
# ── RELEASE STATE: v1.0.10 PUBLISHED AND SIGNED (2026-09-05) ────────
|
|
9
9
|
# The line above is REWRITTEN BY installers/publish.sh at real-publish time —
|
|
10
10
|
# this file has shipped a hand-edited, wrong publication claim twice, so the
|
|
11
11
|
# claim is now mechanical, never prose. While it reads NOT PUBLISHED, the pins
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
# cosign verify \
|
|
27
27
|
# --certificate-identity 'info@myaigi.ai' \
|
|
28
28
|
# --certificate-oidc-issuer 'https://github.com/login/oauth' \
|
|
29
|
-
# ghcr.io/myaigidev/culpa-server:v1.0.
|
|
29
|
+
# ghcr.io/myaigidev/culpa-server:v1.0.6
|
|
30
30
|
# Repeat for culpa-dashboard. Both must report VERIFIED.
|
|
31
31
|
#
|
|
32
32
|
# If a pull fails with an authentication or "denied" error rather than a
|
|
@@ -55,7 +55,7 @@ services:
|
|
|
55
55
|
restart: unless-stopped
|
|
56
56
|
|
|
57
57
|
server:
|
|
58
|
-
image: ghcr.io/myaigidev/culpa-server:v1.0.
|
|
58
|
+
image: ghcr.io/myaigidev/culpa-server:v1.0.10
|
|
59
59
|
container_name: culpa-server
|
|
60
60
|
environment:
|
|
61
61
|
DATABASE_URL: postgres://culpa:culpa@db:5432/culpa
|
|
@@ -129,7 +129,7 @@ services:
|
|
|
129
129
|
# (D-072: never rebuild a tag that already exists). The example this note
|
|
130
130
|
# used to give was CF14's v0.11.0/v0.11.1 pair, which no longer matches
|
|
131
131
|
# either pin in this file.
|
|
132
|
-
image: ghcr.io/myaigidev/culpa-dashboard:v1.0.
|
|
132
|
+
image: ghcr.io/myaigidev/culpa-dashboard:v1.0.10
|
|
133
133
|
container_name: culpa-dashboard
|
|
134
134
|
environment:
|
|
135
135
|
CULPA_API_BASE: http://server:4545
|
package/bin/getculpa.js
CHANGED
|
@@ -25,9 +25,11 @@ Usage:
|
|
|
25
25
|
getculpa doctor Diagnose this install
|
|
26
26
|
getculpa repair Re-stage missing/corrupt install files (no data touched)
|
|
27
27
|
getculpa uninstall Remove Culpa (data is kept unless you confirm)
|
|
28
|
-
getculpa scan
|
|
28
|
+
getculpa scan Refresh the Culpa ledger (needs the running stack);
|
|
29
|
+
--preview reads local logs offline: no Docker, no network
|
|
29
30
|
getculpa connect Print the topology-appropriate capture recipe
|
|
30
31
|
getculpa update Manage CLI launcher updates
|
|
32
|
+
getculpa <verb> --help scan / connect / update / config: the culpa CLI's own help, under this name
|
|
31
33
|
getculpa --help Show this help
|
|
32
34
|
getculpa --version Show the getculpa package version
|
|
33
35
|
`;
|
|
@@ -37,7 +39,7 @@ function printVersion() {
|
|
|
37
39
|
console.log(pkg.version);
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
function runLauncherPassthrough(args) {
|
|
42
|
+
function runLauncherPassthrough(args, env) {
|
|
41
43
|
const exe = process.platform === "win32" ? ".exe" : "";
|
|
42
44
|
const launcher = path.join(__dirname, "..", "vendor", `culpa-launcher${exe}`);
|
|
43
45
|
if (!fs.existsSync(launcher)) {
|
|
@@ -45,7 +47,9 @@ function runLauncherPassthrough(args) {
|
|
|
45
47
|
console.error("getculpa: run `npm rebuild getculpa` (or reinstall) to fetch it.");
|
|
46
48
|
process.exit(1);
|
|
47
49
|
}
|
|
48
|
-
|
|
50
|
+
// T-182.8 (ISS-MAC-11): the launcher and the CLI spell their usage in
|
|
51
|
+
// the invoked name — the environment carries it (lib/dispatch.mjs)
|
|
52
|
+
const result = spawnSync(launcher, args, { stdio: "inherit", env });
|
|
49
53
|
process.exit(result.status === null ? 1 : result.status);
|
|
50
54
|
}
|
|
51
55
|
|
|
@@ -130,7 +134,7 @@ async function main(argv) {
|
|
|
130
134
|
// uninstall-consent decisions now happen here, BEFORE anything is imported
|
|
131
135
|
// or spawned. Passthrough verbs fall through untouched (the launcher owns
|
|
132
136
|
// their help).
|
|
133
|
-
const { decideDispatch, verbHelp } = await import("../lib/dispatch.mjs");
|
|
137
|
+
const { decideDispatch, verbHelp, passthroughEnv } = await import("../lib/dispatch.mjs");
|
|
134
138
|
const decision = decideDispatch(argv, {
|
|
135
139
|
isTTY: process.stdin.isTTY === true && process.stdout.isTTY === true,
|
|
136
140
|
});
|
|
@@ -166,7 +170,7 @@ async function main(argv) {
|
|
|
166
170
|
// `uninstall` never reaches here — every argv shape is decided above.
|
|
167
171
|
// scan / connect / update / config / anything unrecognized: the launcher
|
|
168
172
|
// owns USAGE and exit-code semantics for its own surface, same as culpa.js.
|
|
169
|
-
return runLauncherPassthrough(argv);
|
|
173
|
+
return runLauncherPassthrough(argv, passthroughEnv(process.env));
|
|
170
174
|
}
|
|
171
175
|
|
|
172
176
|
main(process.argv.slice(2)).catch((e) => {
|
package/lib/dispatch.mjs
CHANGED
|
@@ -29,6 +29,13 @@ const VERB_HELP = {
|
|
|
29
29
|
"Stop and REMOVE Culpa's containers and network. Asks for confirmation first; pass --yes to consent from a script (a non-interactive run without --yes refuses). Recorded cost data is kept unless you separately confirm deleting it.",
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
/** T-182.8 (ISS-MAC-11): the environment for a passthrough spawn — the
|
|
33
|
+
* vendored launcher and the culpa CLI spell their usage in the invoked name
|
|
34
|
+
* when CULPA_ARGV0 says `getculpa` (an allowlist on their side). Pure. */
|
|
35
|
+
export function passthroughEnv(base) {
|
|
36
|
+
return { ...base, CULPA_ARGV0: "getculpa" };
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
/** One verb's help block, prefixed with its usage line. */
|
|
33
40
|
export function verbHelp(verb) {
|
|
34
41
|
const text = VERB_HELP[verb] ?? "No help recorded for this verb.";
|