@claudexor/cli 3.6.0 → 3.8.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.
- package/dist/accounts-projection.d.ts +4 -2
- package/dist/accounts-projection.d.ts.map +1 -1
- package/dist/accounts-projection.js +49 -2
- package/dist/accounts-projection.js.map +1 -1
- package/dist/accounts-services.d.ts +7 -1
- package/dist/accounts-services.d.ts.map +1 -1
- package/dist/accounts-services.js +7 -2
- package/dist/accounts-services.js.map +1 -1
- package/dist/agy-quota-source.d.ts +2 -0
- package/dist/agy-quota-source.d.ts.map +1 -1
- package/dist/agy-quota-source.js +83 -108
- package/dist/agy-quota-source.js.map +1 -1
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +6 -1
- package/dist/capabilities.js.map +1 -1
- package/dist/claudexord-entry.d.ts +7 -2
- package/dist/claudexord-entry.d.ts.map +1 -1
- package/dist/claudexord-entry.js +33 -11
- package/dist/claudexord-entry.js.map +1 -1
- package/dist/claudexord.d.ts.map +1 -1
- package/dist/claudexord.js +9 -12
- package/dist/claudexord.js.map +1 -1
- package/dist/cli-io.d.ts +1 -0
- package/dist/cli-io.d.ts.map +1 -1
- package/dist/cli-io.js +14 -0
- package/dist/cli-io.js.map +1 -1
- package/dist/cli.js +12 -18
- package/dist/cli.js.map +1 -1
- package/dist/command-flags.d.ts.map +1 -1
- package/dist/command-flags.js +3 -2
- package/dist/command-flags.js.map +1 -1
- package/dist/control-services.d.ts +824 -806
- package/dist/control-services.d.ts.map +1 -1
- package/dist/control-services.js +4 -16
- package/dist/control-services.js.map +1 -1
- package/dist/credential-commands.d.ts +17 -0
- package/dist/credential-commands.d.ts.map +1 -1
- package/dist/credential-commands.js +62 -14
- package/dist/credential-commands.js.map +1 -1
- package/dist/credential-profile-mutations.d.ts +9 -0
- package/dist/credential-profile-mutations.d.ts.map +1 -1
- package/dist/credential-profile-mutations.js +63 -31
- package/dist/credential-profile-mutations.js.map +1 -1
- package/dist/credential-status-invalidation.d.ts +2 -0
- package/dist/credential-status-invalidation.d.ts.map +1 -1
- package/dist/credential-status-invalidation.js +10 -0
- package/dist/credential-status-invalidation.js.map +1 -1
- package/dist/delegation-belt-descriptor.d.ts +2 -1
- package/dist/delegation-belt-descriptor.d.ts.map +1 -1
- package/dist/delegation-belt-descriptor.js +2 -1
- package/dist/delegation-belt-descriptor.js.map +1 -1
- package/dist/harness-command-specs.d.ts.map +1 -1
- package/dist/harness-command-specs.js +4 -4
- package/dist/harness-command-specs.js.map +1 -1
- package/dist/harness-command.d.ts +5 -3
- package/dist/harness-command.d.ts.map +1 -1
- package/dist/harness-command.js +5 -3
- package/dist/harness-command.js.map +1 -1
- package/dist/harness-install-lease.d.ts +11 -0
- package/dist/harness-install-lease.d.ts.map +1 -0
- package/dist/harness-install-lease.js +98 -0
- package/dist/harness-install-lease.js.map +1 -0
- package/dist/harness-install-proof.d.ts +36 -0
- package/dist/harness-install-proof.d.ts.map +1 -0
- package/dist/harness-install-proof.js +148 -0
- package/dist/harness-install-proof.js.map +1 -0
- package/dist/harness-install-recipes.d.ts +80 -0
- package/dist/harness-install-recipes.d.ts.map +1 -0
- package/dist/harness-install-recipes.js +130 -0
- package/dist/harness-install-recipes.js.map +1 -0
- package/dist/harness-installer.d.ts +45 -46
- package/dist/harness-installer.d.ts.map +1 -1
- package/dist/harness-installer.js +248 -156
- package/dist/harness-installer.js.map +1 -1
- package/dist/mcp-run-projections.d.ts +1 -1
- package/dist/native-login.d.ts +7 -0
- package/dist/native-login.d.ts.map +1 -1
- package/dist/native-login.js +29 -13
- package/dist/native-login.js.map +1 -1
- package/dist/profile-registration.d.ts +2 -0
- package/dist/profile-registration.d.ts.map +1 -1
- package/dist/profile-registration.js +49 -6
- package/dist/profile-registration.js.map +1 -1
- package/dist/quota-services.d.ts +2 -2
- package/dist/remote-command.d.ts +0 -2
- package/dist/remote-command.d.ts.map +1 -1
- package/dist/remote-command.js +3 -74
- package/dist/remote-command.js.map +1 -1
- package/dist/request-preflight.d.ts +1 -1
- package/dist/request-preflight.d.ts.map +1 -1
- package/dist/request-preflight.js +35 -11
- package/dist/request-preflight.js.map +1 -1
- package/dist/retry-command.d.ts.map +1 -1
- package/dist/retry-command.js +4 -0
- package/dist/retry-command.js.map +1 -1
- package/dist/setup-attach-command.d.ts +30 -0
- package/dist/setup-attach-command.d.ts.map +1 -0
- package/dist/setup-attach-command.js +118 -0
- package/dist/setup-attach-command.js.map +1 -0
- package/dist/setup-job-control-services.d.ts +2064 -0
- package/dist/setup-job-control-services.d.ts.map +1 -0
- package/dist/setup-job-control-services.js +33 -0
- package/dist/setup-job-control-services.js.map +1 -0
- package/dist/setup-job-store.d.ts +2 -2
- package/dist/setup-job-support.d.ts +23 -13
- package/dist/setup-job-support.d.ts.map +1 -1
- package/dist/setup-job-support.js +55 -13
- package/dist/setup-job-support.js.map +1 -1
- package/dist/setup-jobs.d.ts +4 -4
- package/dist/setup-jobs.d.ts.map +1 -1
- package/dist/setup-jobs.js +50 -47
- package/dist/setup-jobs.js.map +1 -1
- package/dist/setup-login-capability.d.ts +37 -0
- package/dist/setup-login-capability.d.ts.map +1 -0
- package/dist/setup-login-capability.js +96 -0
- package/dist/setup-login-capability.js.map +1 -0
- package/dist/setup-login-io.d.ts +4 -1
- package/dist/setup-login-io.d.ts.map +1 -1
- package/dist/setup-login-io.js +22 -3
- package/dist/setup-login-io.js.map +1 -1
- package/dist/setup-login-pty.d.ts +64 -22
- package/dist/setup-login-pty.d.ts.map +1 -1
- package/dist/setup-login-pty.js +289 -48
- package/dist/setup-login-pty.js.map +1 -1
- package/dist/setup-login-runner-support.d.ts +12 -0
- package/dist/setup-login-runner-support.d.ts.map +1 -0
- package/dist/setup-login-runner-support.js +65 -0
- package/dist/setup-login-runner-support.js.map +1 -0
- package/dist/setup-login-runner.d.ts +3 -0
- package/dist/setup-login-runner.d.ts.map +1 -1
- package/dist/setup-login-runner.js +133 -116
- package/dist/setup-login-runner.js.map +1 -1
- package/dist/setup-runner-outcome.d.ts +10 -0
- package/dist/setup-runner-outcome.d.ts.map +1 -0
- package/dist/setup-runner-outcome.js +49 -0
- package/dist/setup-runner-outcome.js.map +1 -0
- package/dist/thread-execution-workspace.d.ts +11 -6
- package/dist/thread-execution-workspace.d.ts.map +1 -1
- package/dist/thread-execution-workspace.js +52 -6
- package/dist/thread-execution-workspace.js.map +1 -1
- package/package.json +24 -24
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `claudexor harness install` — the disclosed, pinned
|
|
2
|
+
* `claudexor harness install` — the disclosed, pinned vendor installer
|
|
3
3
|
* (issue #89; restored from the PR #82 cut with the security objections
|
|
4
|
-
* fixed).
|
|
4
|
+
* fixed). The historical/default `remote` target remains the SSH-host flow;
|
|
5
|
+
* an explicit `local` target installs into the managed toolchain root that
|
|
6
|
+
* local harness resolution already owns.
|
|
5
7
|
*
|
|
6
8
|
* Contract:
|
|
7
9
|
* - npm-distributed harnesses (claude/codex/opencode) install ONE exact
|
|
@@ -16,13 +18,26 @@
|
|
|
16
18
|
* downloaded first (never piped to a shell), its size and sha256 are
|
|
17
19
|
* printed, and it runs in the visible PTY the operator is watching — the
|
|
18
20
|
* same principle as interactive SSH auth.
|
|
19
|
-
* - NOTHING executes without
|
|
21
|
+
* - NOTHING executes without authorization: the exact command and install
|
|
20
22
|
* destination print first, and execution needs a TTY confirmation or an
|
|
21
23
|
* explicit `--yes` (the macOS flow confirms against this module's own
|
|
22
|
-
* `--dry-run --json` disclosure before passing `--yes`).
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* path
|
|
24
|
+
* `--dry-run --json` disclosure before passing `--yes`). For a host
|
|
25
|
+
* integration, `--target local --yes` IS that authorization, granted by the
|
|
26
|
+
* owner action that invoked it; there is no second confirmation hidden
|
|
27
|
+
* inside the producer, and the unattended script path never claims the
|
|
28
|
+
* human-observed verification the watched remote path earns.
|
|
29
|
+
* - concurrent installs into one prefix are serialized by a cross-process
|
|
30
|
+
* lease. A lease whose owner died is NOT reclaimed automatically: it fails
|
|
31
|
+
* closed with a typed `install_lock_stale` and the exact cleanup path.
|
|
32
|
+
* - failures are typed and loud; a failed download, a non-zero installer exit,
|
|
33
|
+
* or a failed post-install binary/version proof never reads as success, and
|
|
34
|
+
* the temp download dir is removed on every path.
|
|
35
|
+
* - the post-install PROOF is what the local target has instead of a witness.
|
|
36
|
+
* A watched remote install keeps the historical exit-code contract, because
|
|
37
|
+
* the operator is looking at the terminal; an unattended local install must
|
|
38
|
+
* earn its `ok:true`, so exit zero without a resolvable launcher and a
|
|
39
|
+
* matching `--version` is a typed failure, and `installedBinary` /
|
|
40
|
+
* `installedVersion` are present on every local success.
|
|
26
41
|
* - `--json` keeps stdout pure: exactly ONE JSON object. In json mode every
|
|
27
42
|
* human progress line goes to stderr and child processes (npm/curl/the
|
|
28
43
|
* vendor script) run with their stdout routed onto stderr, so vendor
|
|
@@ -33,106 +48,61 @@ import { createHash } from "node:crypto";
|
|
|
33
48
|
import { existsSync, mkdirSync, mkdtempSync, readFileSync, readSync, rmSync } from "node:fs";
|
|
34
49
|
import { homedir, tmpdir } from "node:os";
|
|
35
50
|
import { dirname, join, resolve } from "node:path";
|
|
36
|
-
import { CLAUDE_VENDOR_CLI_VERSION } from "@claudexor/harness-claude";
|
|
37
|
-
import { CODEX_VENDOR_CLI_VERSION } from "@claudexor/harness-codex";
|
|
38
|
-
import { OPENCODE_VENDOR_CLI_VERSION } from "@claudexor/harness-opencode";
|
|
39
51
|
import { composeBaseEnv } from "@claudexor/core";
|
|
40
|
-
import { flagBool } from "./args.js";
|
|
52
|
+
import { flagBool, flagStr } from "./args.js";
|
|
53
|
+
import { CliError, renderCliFailure } from "./cli-error.js";
|
|
41
54
|
import { print, printJson, printUsageError } from "./cli-io.js";
|
|
42
55
|
import { INSTALLABLE_HARNESSES } from "./harness-command-specs.js";
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
opencode: {
|
|
58
|
-
npmPackage: "opencode-ai",
|
|
59
|
-
version: OPENCODE_VENDOR_CLI_VERSION,
|
|
60
|
-
verification: "deterministic_only",
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
export const CURSOR_INSTALL_URL = "https://cursor.com/install";
|
|
64
|
-
/**
|
|
65
|
-
* Google's official Antigravity CLI installer, as published on
|
|
66
|
-
* antigravity.google/docs/cli/install (`curl -fsSL <this url> | bash`, which
|
|
67
|
-
* Claudexor deliberately does NOT do — see the header). Verified end to end on
|
|
68
|
-
* 2026-08-16: the script fetched from this URL installed agy 1.1.13 to
|
|
69
|
-
* `~/.local/bin/agy`, which is the destination disclosed below. The vendor
|
|
70
|
-
* ships one signed Go binary and no npm package, so it takes the same
|
|
71
|
-
* human-observed path as cursor.
|
|
72
|
-
*/
|
|
73
|
-
export const AGY_INSTALL_URL = "https://antigravity.google/cli/install.sh";
|
|
74
|
-
/** The vendor's Windows installer, from the same documentation page. */
|
|
75
|
-
export const AGY_INSTALL_URL_WINDOWS = "https://antigravity.google/cli/install.ps1";
|
|
76
|
-
/** Vendors distributed as a shell installer instead of a pinnable npm
|
|
77
|
-
* artifact. ONE branch serves both entries; the per-harness text below is the
|
|
78
|
-
* only thing that differs, so a third such vendor is a row, not a fork. */
|
|
79
|
-
const SCRIPT_INSTALLERS = {
|
|
80
|
-
agy: {
|
|
81
|
-
url: AGY_INSTALL_URL,
|
|
82
|
-
// The one vendor here that publishes a Windows installer of its own; the
|
|
83
|
-
// POSIX row would otherwise be all Claudexor could honestly offer.
|
|
84
|
-
windowsUrl: AGY_INSTALL_URL_WINDOWS,
|
|
85
|
-
installLocation: "~/.local/bin (as selected by Google's Antigravity installer)",
|
|
86
|
-
pinNote: "none — Antigravity ships no pinnable npm artifact; the vendor script is downloaded in full, its size and sha256 print, and it runs in this terminal where you watch it",
|
|
87
|
-
},
|
|
88
|
-
cursor: {
|
|
89
|
-
url: CURSOR_INSTALL_URL,
|
|
90
|
-
installLocation: "~/.local/bin (or ~/.cursor/bin, as selected by Cursor's installer)",
|
|
91
|
-
pinNote: "none — Cursor ships no pinnable npm artifact; the vendor script is downloaded in full, its size and sha256 print, and it runs in this terminal where you watch it",
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
/** Membership is asked of the TABLE, never re-typed: a third script vendor is
|
|
95
|
-
* one row, and cannot be added to the table yet fall through here. */
|
|
96
|
-
function scriptInstaller(harness) {
|
|
97
|
-
return Object.hasOwn(SCRIPT_INSTALLERS, harness)
|
|
98
|
-
? SCRIPT_INSTALLERS[harness]
|
|
99
|
-
: null;
|
|
56
|
+
import { acquireHarnessInstallLease, HARNESS_INSTALL_LOCK_TIMEOUT_MS, } from "./harness-install-lease.js";
|
|
57
|
+
import { proveInstalledNpm, proveInstalledScriptVendor, } from "./harness-install-proof.js";
|
|
58
|
+
import { harnessInstallerDisclosure, isHarnessInstallTarget, isInstallableHarness, NPM_PINS, scriptInstaller, TARGET_LAYOUTS, } from "./harness-install-recipes.js";
|
|
59
|
+
// The recipe surface is re-exported from its historical home: callers and
|
|
60
|
+
// tests import `harness-installer.js`, and the split is an internal one.
|
|
61
|
+
export { AGY_INSTALL_URL, AGY_INSTALL_URL_WINDOWS, CURSOR_INSTALL_URL, HARNESS_INSTALL_TARGETS, harnessInstallerDisclosure, isHarnessInstallTarget, isInstallableHarness, } from "./harness-install-recipes.js";
|
|
62
|
+
function verificationFailure(harness, reason, evidence = {}) {
|
|
63
|
+
return {
|
|
64
|
+
exitCode: 1,
|
|
65
|
+
code: "install_verification_failed",
|
|
66
|
+
refusal: `${harness} installer exited successfully, but installation verification failed: ${reason}`,
|
|
67
|
+
...evidence,
|
|
68
|
+
};
|
|
100
69
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
installLocation: "~/.claudexor/remote/vendor/bin",
|
|
108
|
-
pinnedVersion: pin.version,
|
|
109
|
-
verification: pin.verification,
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
const script = scriptInstaller(harness);
|
|
113
|
-
/* c8 ignore next -- every non-npm harness has a script row; this is the
|
|
114
|
-
unreachable guard that keeps the two tables honest. */
|
|
115
|
-
if (!script)
|
|
116
|
-
throw new Error(`harness ${harness} has neither an npm pin nor a script installer`);
|
|
117
|
-
const windows = process.platform === "win32";
|
|
118
|
-
const url = windows ? (script.windowsUrl ?? script.url) : script.url;
|
|
119
|
-
const file = windows && script.windowsUrl ? "install.ps1" : "install.sh";
|
|
120
|
-
const runner = windows && script.windowsUrl ? "powershell -ExecutionPolicy Bypass -File" : "/bin/sh";
|
|
70
|
+
/** The managed toolchain root and its npm/PATH contract are POSIX-only in this
|
|
71
|
+
* release, so the local target refuses on Windows instead of installing into a
|
|
72
|
+
* prefix nothing would then resolve. The remote target is unaffected. */
|
|
73
|
+
function localPlatformRefusal(platform) {
|
|
74
|
+
if (platform !== "win32")
|
|
75
|
+
return null;
|
|
121
76
|
return {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
installLocation: windows && script.windowsUrl
|
|
126
|
-
? "%LOCALAPPDATA%\\agy\\bin (as selected by Google's Antigravity installer)"
|
|
127
|
-
: script.installLocation,
|
|
128
|
-
pinnedVersion: null,
|
|
129
|
-
verification: "human_observed",
|
|
77
|
+
exitCode: 1,
|
|
78
|
+
code: "unsupported_platform",
|
|
79
|
+
refusal: "--target local is not supported on Windows by this release; nothing was executed",
|
|
130
80
|
};
|
|
131
81
|
}
|
|
82
|
+
/** An unexpected throw is still ONE typed JSON object, never a stack trace on
|
|
83
|
+
* a machine caller's stdout. */
|
|
84
|
+
function harnessInstallException(error) {
|
|
85
|
+
const causeCode = error && typeof error === "object" && typeof error.code === "string"
|
|
86
|
+
? String(error.code)
|
|
87
|
+
: null;
|
|
88
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
89
|
+
return new CliError("operational", `harness installer failed without a verified result: ${detail}`, {
|
|
90
|
+
code: "harness_install_failed",
|
|
91
|
+
...(causeCode ? { details: { causeCode } } : {}),
|
|
92
|
+
});
|
|
93
|
+
}
|
|
132
94
|
export function runHarnessInstaller(harness, options = {}) {
|
|
133
95
|
const home = resolve(options.home ?? homedir());
|
|
96
|
+
const target = options.target ?? "remote";
|
|
97
|
+
const platform = options.platform ?? process.platform;
|
|
98
|
+
if (target === "local") {
|
|
99
|
+
const unsupported = localPlatformRefusal(platform);
|
|
100
|
+
if (unsupported)
|
|
101
|
+
return unsupported;
|
|
102
|
+
}
|
|
134
103
|
const spawn = options.spawn ?? spawnSync;
|
|
135
104
|
const json = options.json === true;
|
|
105
|
+
const runnerNodePath = resolve(options.nodePath ?? process.execPath);
|
|
136
106
|
// stdin inherited; child stdout -> OUR stderr (fd 2) in json mode so
|
|
137
107
|
// vendor/npm output stays visible but never pollutes the JSON envelope.
|
|
138
108
|
const childStdio = json ? [0, 2, 2] : "inherit";
|
|
@@ -144,80 +114,180 @@ export function runHarnessInstaller(harness, options = {}) {
|
|
|
144
114
|
};
|
|
145
115
|
// Vendor-controlled npm/curl/shell children receive the shared minimal
|
|
146
116
|
// runtime env, never the parent process's provider credentials.
|
|
147
|
-
const
|
|
117
|
+
const resolutionSource = {
|
|
118
|
+
...(options.sourceEnv ?? process.env),
|
|
119
|
+
HOME: home,
|
|
120
|
+
// Local resolution must not read the SSH-runtime vendor prefix; the remote
|
|
121
|
+
// flow keeps whatever its own runtime already exported.
|
|
122
|
+
...(target === "local" ? { CLAUDEXOR_REMOTE_RUNTIME: "0" } : {}),
|
|
123
|
+
};
|
|
124
|
+
const environment = {
|
|
125
|
+
...composeBaseEnv("clean", resolutionSource, runnerNodePath, platform),
|
|
126
|
+
HOME: home,
|
|
127
|
+
};
|
|
148
128
|
const pin = NPM_PINS[harness];
|
|
129
|
+
const script = scriptInstaller(harness);
|
|
130
|
+
let npmCLI;
|
|
149
131
|
if (pin) {
|
|
150
|
-
|
|
151
|
-
(options.mkdir ?? mkdirSync)(vendorRoot, { recursive: true, mode: 0o700 });
|
|
152
|
-
const nodePath = resolve(options.nodePath ?? process.execPath);
|
|
153
|
-
const npmCLI = resolve(dirname(nodePath), "..", "lib", "node_modules", "npm", "bin", "npm-cli.js");
|
|
132
|
+
npmCLI = resolve(dirname(runnerNodePath), "..", "lib", "node_modules", "npm", "bin", "npm-cli.js");
|
|
154
133
|
if (!(options.exists ?? existsSync)(npmCLI)) {
|
|
155
134
|
return {
|
|
156
135
|
exitCode: 1,
|
|
136
|
+
code: "embedded_npm_missing",
|
|
157
137
|
refusal: `the bundled npm entrypoint is missing at ${npmCLI} ` +
|
|
158
138
|
"(expected inside the pinned Node runtime next to this CLI); nothing was executed",
|
|
159
139
|
};
|
|
160
140
|
}
|
|
161
|
-
const result = spawn(nodePath, [npmCLI, "install", "--global", "--prefix", vendorRoot, `${pin.npmPackage}@${pin.version}`], { stdio: childStdio, env: environment });
|
|
162
|
-
return { exitCode: result.status ?? 1 };
|
|
163
|
-
}
|
|
164
|
-
// Script vendors (cursor, agy): download the COMPLETE vendor script before
|
|
165
|
-
// execution (`--fail` rejects HTTP error bodies), read it back and print its
|
|
166
|
-
// size + sha256 so the watching human sees exactly which bytes are about to
|
|
167
|
-
// run, and remove the private temp dir on every success/failure path.
|
|
168
|
-
const script = scriptInstaller(harness);
|
|
169
|
-
/* c8 ignore next */
|
|
170
|
-
if (!script)
|
|
171
|
-
return { exitCode: 1, refusal: `no installer is defined for ${harness}` };
|
|
172
|
-
const windows = process.platform === "win32";
|
|
173
|
-
const useWindowsScript = windows && script.windowsUrl !== undefined;
|
|
174
|
-
const url = useWindowsScript ? script.windowsUrl : script.url;
|
|
175
|
-
if (windows && !useWindowsScript) {
|
|
176
|
-
return {
|
|
177
|
-
exitCode: 1,
|
|
178
|
-
refusal: `${harness} publishes no Windows installer; install it yourself and re-run \`claudexor doctor\``,
|
|
179
|
-
};
|
|
180
141
|
}
|
|
181
|
-
const
|
|
182
|
-
|
|
142
|
+
const proofRuntime = { runnerNodePath, platform, resolutionSource, environment, spawn };
|
|
143
|
+
// The remote target runs in a PTY the operator is watching and keeps the
|
|
144
|
+
// historical exit-code contract. Only the unattended local target has to
|
|
145
|
+
// prove what it installed.
|
|
146
|
+
const proofRequired = target === "local";
|
|
147
|
+
const proveInstalled = () => pin
|
|
148
|
+
? proveInstalledNpm({
|
|
149
|
+
vendorRoot: TARGET_LAYOUTS[target].root(home),
|
|
150
|
+
npmPackage: pin.npmPackage,
|
|
151
|
+
binaryNames: pin.binaryNames,
|
|
152
|
+
expectedVersion: pin.version,
|
|
153
|
+
}, proofRuntime)
|
|
154
|
+
: /* c8 ignore next -- every non-npm harness has a script row */
|
|
155
|
+
proveInstalledScriptVendor(script?.binaryName ?? harness, proofRuntime);
|
|
156
|
+
let lease;
|
|
183
157
|
try {
|
|
184
|
-
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
|
|
189
|
-
|
|
158
|
+
// Serialization belongs to the same contract as the proof: a machine caller
|
|
159
|
+
// can race itself, while the remote flow is one operator watching one
|
|
160
|
+
// terminal. Taking the lease there would add a 120s block and a manual
|
|
161
|
+
// cleanup step to a path this release promises to leave alone.
|
|
162
|
+
if (proofRequired && options.lock !== false) {
|
|
163
|
+
try {
|
|
164
|
+
lease = acquireHarnessInstallLease(home, options.lockTimeoutMs ?? HARNESS_INSTALL_LOCK_TIMEOUT_MS);
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
const code = typeof error.code === "string"
|
|
168
|
+
? String(error.code)
|
|
169
|
+
: "install_lock_failed";
|
|
170
|
+
return {
|
|
171
|
+
exitCode: 1,
|
|
172
|
+
code,
|
|
173
|
+
refusal: `${error instanceof Error ? error.message : String(error)}; nothing was executed`,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (pin && npmCLI) {
|
|
178
|
+
const vendorRoot = TARGET_LAYOUTS[target].root(home);
|
|
179
|
+
const alreadyInstalled = proofRequired ? proveInstalled() : null;
|
|
180
|
+
if (alreadyInstalled?.ok) {
|
|
181
|
+
note(`${harness} ${pin.version} is already installed at ${vendorRoot}; nothing to change`);
|
|
182
|
+
return { exitCode: 0, ...alreadyInstalled.proof };
|
|
183
|
+
}
|
|
184
|
+
(options.mkdir ?? mkdirSync)(vendorRoot, { recursive: true, mode: 0o700 });
|
|
185
|
+
const result = spawn(runnerNodePath, [npmCLI, "install", "--global", "--prefix", vendorRoot, `${pin.npmPackage}@${pin.version}`], { stdio: childStdio, env: environment });
|
|
186
|
+
if (result.status !== 0)
|
|
187
|
+
return { exitCode: result.status ?? 1 };
|
|
188
|
+
if (!proofRequired)
|
|
189
|
+
return { exitCode: 0 };
|
|
190
|
+
const installed = proveInstalled();
|
|
191
|
+
return installed.ok
|
|
192
|
+
? { exitCode: 0, ...installed.proof }
|
|
193
|
+
: verificationFailure(harness, installed.reason);
|
|
194
|
+
}
|
|
195
|
+
// Script vendors (cursor, agy): download the COMPLETE vendor script before
|
|
196
|
+
// execution (`--fail` rejects HTTP error bodies), read it back and record
|
|
197
|
+
// its size + sha256 so the receipt names exactly which bytes ran. Remote
|
|
198
|
+
// execution stays human-observed; local `--yes` is explicitly authorized
|
|
199
|
+
// unattended execution. The private temp dir is removed on every path.
|
|
200
|
+
/* c8 ignore next */
|
|
201
|
+
if (!script)
|
|
190
202
|
return {
|
|
191
|
-
exitCode:
|
|
192
|
-
|
|
203
|
+
exitCode: 1,
|
|
204
|
+
code: "no_installer",
|
|
205
|
+
refusal: `no installer is defined for ${harness}`,
|
|
193
206
|
};
|
|
207
|
+
const alreadyInstalled = proofRequired ? proveInstalled() : null;
|
|
208
|
+
if (alreadyInstalled?.ok) {
|
|
209
|
+
note(`${harness} is already installed at ${alreadyInstalled.proof.installedBinary}; nothing to change`);
|
|
210
|
+
return { exitCode: 0, ...alreadyInstalled.proof };
|
|
194
211
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
catch {
|
|
212
|
+
const windows = platform === "win32";
|
|
213
|
+
const useWindowsScript = windows && script.windowsUrl !== undefined;
|
|
214
|
+
const url = useWindowsScript ? script.windowsUrl : script.url;
|
|
215
|
+
if (windows && !useWindowsScript) {
|
|
200
216
|
return {
|
|
201
217
|
exitCode: 1,
|
|
202
|
-
|
|
218
|
+
code: "unsupported_platform",
|
|
219
|
+
refusal: `${harness} publishes no Windows installer; install it yourself and re-run \`claudexor doctor\``,
|
|
203
220
|
};
|
|
204
221
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
222
|
+
const temporaryDirectory = mkdtempSync(join(tmpdir(), `claudexor-${harness}-install-`));
|
|
223
|
+
const installerPath = join(temporaryDirectory, useWindowsScript ? "install.ps1" : "install.sh");
|
|
224
|
+
try {
|
|
225
|
+
const downloaded = spawn("curl",
|
|
226
|
+
// `url`, never `script.url`: on Windows the disclosure names the
|
|
227
|
+
// vendor's PowerShell installer, and the bytes fetched MUST be the bytes
|
|
228
|
+
// disclosed — both reviewers of the sprint triad caught the divergence.
|
|
229
|
+
["--fail", "--silent", "--show-error", "--location", url, "--output", installerPath], { stdio: childStdio, env: environment });
|
|
230
|
+
if (downloaded.status !== 0) {
|
|
231
|
+
return {
|
|
232
|
+
exitCode: downloaded.status ?? 1,
|
|
233
|
+
code: "installer_download_failed",
|
|
234
|
+
refusal: `the download of ${url} failed (curl exit ${downloaded.status ?? "unknown"}); nothing was executed`,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
let payload;
|
|
238
|
+
try {
|
|
239
|
+
payload = readFileSync(installerPath);
|
|
240
|
+
}
|
|
241
|
+
catch {
|
|
242
|
+
return {
|
|
243
|
+
exitCode: 1,
|
|
244
|
+
code: "installer_read_failed",
|
|
245
|
+
refusal: "the downloaded installer script could not be read back; nothing was executed",
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
// Local only: an unattended install must not "run" an empty body and
|
|
249
|
+
// report success. The watched remote flow keeps upstream's behaviour —
|
|
250
|
+
// the human sees "0 bytes" printed and the vendor script exit honestly.
|
|
251
|
+
if (proofRequired && payload.length === 0) {
|
|
252
|
+
return {
|
|
253
|
+
exitCode: 1,
|
|
254
|
+
code: "installer_empty",
|
|
255
|
+
refusal: "the downloaded installer script is empty; nothing was executed",
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
const installerSha256 = createHash("sha256").update(payload).digest("hex");
|
|
259
|
+
const installerByteLength = payload.length;
|
|
260
|
+
note(`${harness} installer downloaded: ${installerByteLength} bytes, sha256 ${installerSha256}`);
|
|
261
|
+
const runner = useWindowsScript
|
|
262
|
+
? ["powershell", ["-ExecutionPolicy", "Bypass", "-File", installerPath]]
|
|
263
|
+
: ["/bin/sh", [installerPath]];
|
|
264
|
+
note(`running: ${runner[0]} ${runner[1].join(" ")}`);
|
|
265
|
+
const executed = spawn(runner[0], runner[1], { stdio: childStdio, env: environment });
|
|
266
|
+
if (executed.status !== 0) {
|
|
267
|
+
return { exitCode: executed.status ?? 1, installerSha256, installerByteLength };
|
|
268
|
+
}
|
|
269
|
+
if (!proofRequired)
|
|
270
|
+
return { exitCode: 0 };
|
|
271
|
+
const installed = proveInstalled();
|
|
272
|
+
return installed.ok
|
|
273
|
+
? { exitCode: 0, installerSha256, installerByteLength, ...installed.proof }
|
|
274
|
+
: verificationFailure(harness, installed.reason, { installerSha256, installerByteLength });
|
|
275
|
+
}
|
|
276
|
+
finally {
|
|
277
|
+
rmSync(temporaryDirectory, { recursive: true, force: true });
|
|
278
|
+
}
|
|
213
279
|
}
|
|
214
280
|
finally {
|
|
215
|
-
|
|
281
|
+
lease?.release();
|
|
216
282
|
}
|
|
217
283
|
}
|
|
218
|
-
const INSTALL_USAGE = `usage: claudexor harness install <${INSTALLABLE_HARNESSES.join("|")}> [--dry-run] [--yes]`;
|
|
284
|
+
const INSTALL_USAGE = `usage: claudexor harness install <${INSTALLABLE_HARNESSES.join("|")}> [--target <local|remote>] [--dry-run] [--yes]`;
|
|
219
285
|
function pinDisclosureLine(disclosure) {
|
|
220
286
|
if (disclosure.pinnedVersion === null) {
|
|
287
|
+
if (disclosure.verification === "unattended_unpinned") {
|
|
288
|
+
return ("Version pin: none — this vendor ships no pinnable artifact; this authorized " +
|
|
289
|
+
"unattended install records the downloaded script's size and sha256 instead of a human's attention");
|
|
290
|
+
}
|
|
221
291
|
return `Version pin: ${scriptInstaller(disclosure.harness)?.pinNote ?? "none"}`;
|
|
222
292
|
}
|
|
223
293
|
if (disclosure.verification === "deterministic_only") {
|
|
@@ -258,7 +328,25 @@ runnerOptions = {}) {
|
|
|
258
328
|
if (!isInstallableHarness(harness) || args._.length !== 3) {
|
|
259
329
|
return printUsageError(json, INSTALL_USAGE);
|
|
260
330
|
}
|
|
261
|
-
const
|
|
331
|
+
const targetValue = flagStr(args, "target");
|
|
332
|
+
if ((Object.prototype.hasOwnProperty.call(args.flags, "target") && targetValue === undefined) ||
|
|
333
|
+
(targetValue !== undefined && !isHarnessInstallTarget(targetValue))) {
|
|
334
|
+
return printUsageError(json, `${INSTALL_USAGE}\nclaudexor: --target must be local or remote`);
|
|
335
|
+
}
|
|
336
|
+
const target = targetValue ?? "remote";
|
|
337
|
+
const disclosure = harnessInstallerDisclosure(harness, target);
|
|
338
|
+
// Refuse the unsupported layout BEFORE the dry run, so a machine caller's
|
|
339
|
+
// disclosure never advertises an install this host cannot perform.
|
|
340
|
+
if (target === "local") {
|
|
341
|
+
const unsupported = localPlatformRefusal(runnerOptions.platform ?? process.platform);
|
|
342
|
+
if (unsupported) {
|
|
343
|
+
if (json)
|
|
344
|
+
printJson({ ok: false, dryRun: flagBool(args, "dry-run"), ...unsupported, ...disclosure });
|
|
345
|
+
else
|
|
346
|
+
print(`Install refused: ${unsupported.refusal}`);
|
|
347
|
+
return 1;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
262
350
|
if (flagBool(args, "dry-run")) {
|
|
263
351
|
if (json)
|
|
264
352
|
printJson({ ok: true, dryRun: true, ...disclosure });
|
|
@@ -267,7 +355,8 @@ runnerOptions = {}) {
|
|
|
267
355
|
return 0;
|
|
268
356
|
}
|
|
269
357
|
// Disclosure precedes EVERY execution path; --json without --yes refuses
|
|
270
|
-
// (machine callers must have shown the dry-run disclosure themselves
|
|
358
|
+
// (machine callers must have shown the dry-run disclosure themselves, and a
|
|
359
|
+
// local `--yes` IS the authorization their owning Connect action granted).
|
|
271
360
|
if (!json)
|
|
272
361
|
printHumanDisclosure(disclosure);
|
|
273
362
|
if (!flagBool(args, "yes")) {
|
|
@@ -291,16 +380,19 @@ runnerOptions = {}) {
|
|
|
291
380
|
return 1;
|
|
292
381
|
}
|
|
293
382
|
}
|
|
294
|
-
|
|
383
|
+
let result;
|
|
384
|
+
try {
|
|
385
|
+
result = runHarnessInstaller(harness, { ...runnerOptions, json, target });
|
|
386
|
+
}
|
|
387
|
+
catch (error) {
|
|
388
|
+
return renderCliFailure(json, harnessInstallException(error), {
|
|
389
|
+
messagePrefix: "claudexor harness install:",
|
|
390
|
+
extras: { dryRun: false, ...disclosure },
|
|
391
|
+
});
|
|
392
|
+
}
|
|
295
393
|
const ok = result.exitCode === 0 && result.refusal === undefined;
|
|
296
394
|
if (json) {
|
|
297
|
-
printJson({
|
|
298
|
-
ok,
|
|
299
|
-
dryRun: false,
|
|
300
|
-
exitCode: result.exitCode,
|
|
301
|
-
...(result.refusal === undefined ? {} : { refusal: result.refusal }),
|
|
302
|
-
...disclosure,
|
|
303
|
-
});
|
|
395
|
+
printJson({ ok, dryRun: false, ...result, ...disclosure });
|
|
304
396
|
}
|
|
305
397
|
else if (result.refusal !== undefined) {
|
|
306
398
|
print(`Install refused: ${result.refusal}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":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D,aAAa,EAAE,4BAA4B;YAC3C,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE;SACzC,CAAC,CAAC;IACL,CAAC;IACD,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC;IACjE,IAAI,IAAI,EAAE,CAAC;QACT,SAAS,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC;IAC7D,CAAC;SAAM,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACxC,KAAK,CAAC,oBAAoB,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9C,CAAC;SAAM,IAAI,CAAC,EAAE,EAAE,CAAC;QACf,KAAK,CAAC,8BAA8B,MAAM,CAAC,QAAQ,KAAK,OAAO,6BAA6B,CAAC,CAAC;IAChG,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,0DAA0D,OAAO,GAAG,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC9D,CAAC"}
|
|
@@ -99,7 +99,7 @@ export declare function projectImmediateRunDetail(detail: Record<string, unknown
|
|
|
99
99
|
failure: {
|
|
100
100
|
phase: string;
|
|
101
101
|
category: "auth" | "budget" | "cancelled" | "config_error" | "harness_error" | "harness_unavailable" | "internal" | "policy" | "project" | "unknown" | "validation";
|
|
102
|
-
code: "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
102
|
+
code: "access_profile_incompatible" | "budget_overshoot" | "cost_unverifiable" | "credential_pool_exhausted" | "delegated_confinement_unavailable" | "delegated_evidence_incomplete" | "delegated_home_unavailable" | "delegation_child_drain_timeout" | "estimate_headroom" | "finite_zero" | "hard_cap" | "retired_access_profile" | "subscription_window_exhausted" | "unknown_paid_in_flight" | null;
|
|
103
103
|
harnessId: string | null;
|
|
104
104
|
attemptId: string | null;
|
|
105
105
|
safeMessage: string;
|
package/dist/native-login.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ManagedLogin } from "@claudexor/schema";
|
|
1
2
|
export interface NativeLoginSpec {
|
|
2
3
|
binary: string;
|
|
3
4
|
args: string[];
|
|
@@ -24,6 +25,12 @@ export interface NativeLoginSpec {
|
|
|
24
25
|
export type CodexLoginFlow = "device_auth" | "browser_callback" | "browser_redirect";
|
|
25
26
|
/** The vendor's own paste window for agy: 60 seconds, no flag to extend. */
|
|
26
27
|
export declare const AGY_LOGIN_WINDOW_MS = 60000;
|
|
28
|
+
/**
|
|
29
|
+
* One-to-one bridge from setup command ownership to the manifest-owned input
|
|
30
|
+
* declaration. Command argv/flow/window stay above; stdin class never has a
|
|
31
|
+
* second hand-written owner in this registry.
|
|
32
|
+
*/
|
|
33
|
+
export declare const NATIVE_LOGIN_INPUTS: Record<string, ManagedLogin>;
|
|
27
34
|
/**
|
|
28
35
|
* Structured native-login command shared by CLI and setup surfaces. The
|
|
29
36
|
* resolver hook uses the same normalized harness PATH as discovery and makes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-login.d.ts","sourceRoot":"","sources":["../src/native-login.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"native-login.d.ts","sourceRoot":"","sources":["../src/native-login.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,MAAM,WAAW,eAAe;IAC9B,MA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