@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.
Files changed (141) hide show
  1. package/dist/accounts-projection.d.ts +4 -2
  2. package/dist/accounts-projection.d.ts.map +1 -1
  3. package/dist/accounts-projection.js +49 -2
  4. package/dist/accounts-projection.js.map +1 -1
  5. package/dist/accounts-services.d.ts +7 -1
  6. package/dist/accounts-services.d.ts.map +1 -1
  7. package/dist/accounts-services.js +7 -2
  8. package/dist/accounts-services.js.map +1 -1
  9. package/dist/agy-quota-source.d.ts +2 -0
  10. package/dist/agy-quota-source.d.ts.map +1 -1
  11. package/dist/agy-quota-source.js +83 -108
  12. package/dist/agy-quota-source.js.map +1 -1
  13. package/dist/capabilities.d.ts.map +1 -1
  14. package/dist/capabilities.js +6 -1
  15. package/dist/capabilities.js.map +1 -1
  16. package/dist/claudexord-entry.d.ts +7 -2
  17. package/dist/claudexord-entry.d.ts.map +1 -1
  18. package/dist/claudexord-entry.js +33 -11
  19. package/dist/claudexord-entry.js.map +1 -1
  20. package/dist/claudexord.d.ts.map +1 -1
  21. package/dist/claudexord.js +9 -12
  22. package/dist/claudexord.js.map +1 -1
  23. package/dist/cli-io.d.ts +1 -0
  24. package/dist/cli-io.d.ts.map +1 -1
  25. package/dist/cli-io.js +14 -0
  26. package/dist/cli-io.js.map +1 -1
  27. package/dist/cli.js +12 -18
  28. package/dist/cli.js.map +1 -1
  29. package/dist/command-flags.d.ts.map +1 -1
  30. package/dist/command-flags.js +3 -2
  31. package/dist/command-flags.js.map +1 -1
  32. package/dist/control-services.d.ts +824 -806
  33. package/dist/control-services.d.ts.map +1 -1
  34. package/dist/control-services.js +4 -16
  35. package/dist/control-services.js.map +1 -1
  36. package/dist/credential-commands.d.ts +17 -0
  37. package/dist/credential-commands.d.ts.map +1 -1
  38. package/dist/credential-commands.js +62 -14
  39. package/dist/credential-commands.js.map +1 -1
  40. package/dist/credential-profile-mutations.d.ts +9 -0
  41. package/dist/credential-profile-mutations.d.ts.map +1 -1
  42. package/dist/credential-profile-mutations.js +63 -31
  43. package/dist/credential-profile-mutations.js.map +1 -1
  44. package/dist/credential-status-invalidation.d.ts +2 -0
  45. package/dist/credential-status-invalidation.d.ts.map +1 -1
  46. package/dist/credential-status-invalidation.js +10 -0
  47. package/dist/credential-status-invalidation.js.map +1 -1
  48. package/dist/delegation-belt-descriptor.d.ts +2 -1
  49. package/dist/delegation-belt-descriptor.d.ts.map +1 -1
  50. package/dist/delegation-belt-descriptor.js +2 -1
  51. package/dist/delegation-belt-descriptor.js.map +1 -1
  52. package/dist/harness-command-specs.d.ts.map +1 -1
  53. package/dist/harness-command-specs.js +4 -4
  54. package/dist/harness-command-specs.js.map +1 -1
  55. package/dist/harness-command.d.ts +5 -3
  56. package/dist/harness-command.d.ts.map +1 -1
  57. package/dist/harness-command.js +5 -3
  58. package/dist/harness-command.js.map +1 -1
  59. package/dist/harness-install-lease.d.ts +11 -0
  60. package/dist/harness-install-lease.d.ts.map +1 -0
  61. package/dist/harness-install-lease.js +98 -0
  62. package/dist/harness-install-lease.js.map +1 -0
  63. package/dist/harness-install-proof.d.ts +36 -0
  64. package/dist/harness-install-proof.d.ts.map +1 -0
  65. package/dist/harness-install-proof.js +148 -0
  66. package/dist/harness-install-proof.js.map +1 -0
  67. package/dist/harness-install-recipes.d.ts +80 -0
  68. package/dist/harness-install-recipes.d.ts.map +1 -0
  69. package/dist/harness-install-recipes.js +130 -0
  70. package/dist/harness-install-recipes.js.map +1 -0
  71. package/dist/harness-installer.d.ts +45 -46
  72. package/dist/harness-installer.d.ts.map +1 -1
  73. package/dist/harness-installer.js +248 -156
  74. package/dist/harness-installer.js.map +1 -1
  75. package/dist/mcp-run-projections.d.ts +1 -1
  76. package/dist/native-login.d.ts +7 -0
  77. package/dist/native-login.d.ts.map +1 -1
  78. package/dist/native-login.js +29 -13
  79. package/dist/native-login.js.map +1 -1
  80. package/dist/profile-registration.d.ts +2 -0
  81. package/dist/profile-registration.d.ts.map +1 -1
  82. package/dist/profile-registration.js +49 -6
  83. package/dist/profile-registration.js.map +1 -1
  84. package/dist/quota-services.d.ts +2 -2
  85. package/dist/remote-command.d.ts +0 -2
  86. package/dist/remote-command.d.ts.map +1 -1
  87. package/dist/remote-command.js +3 -74
  88. package/dist/remote-command.js.map +1 -1
  89. package/dist/request-preflight.d.ts +1 -1
  90. package/dist/request-preflight.d.ts.map +1 -1
  91. package/dist/request-preflight.js +35 -11
  92. package/dist/request-preflight.js.map +1 -1
  93. package/dist/retry-command.d.ts.map +1 -1
  94. package/dist/retry-command.js +4 -0
  95. package/dist/retry-command.js.map +1 -1
  96. package/dist/setup-attach-command.d.ts +30 -0
  97. package/dist/setup-attach-command.d.ts.map +1 -0
  98. package/dist/setup-attach-command.js +118 -0
  99. package/dist/setup-attach-command.js.map +1 -0
  100. package/dist/setup-job-control-services.d.ts +2064 -0
  101. package/dist/setup-job-control-services.d.ts.map +1 -0
  102. package/dist/setup-job-control-services.js +33 -0
  103. package/dist/setup-job-control-services.js.map +1 -0
  104. package/dist/setup-job-store.d.ts +2 -2
  105. package/dist/setup-job-support.d.ts +23 -13
  106. package/dist/setup-job-support.d.ts.map +1 -1
  107. package/dist/setup-job-support.js +55 -13
  108. package/dist/setup-job-support.js.map +1 -1
  109. package/dist/setup-jobs.d.ts +4 -4
  110. package/dist/setup-jobs.d.ts.map +1 -1
  111. package/dist/setup-jobs.js +50 -47
  112. package/dist/setup-jobs.js.map +1 -1
  113. package/dist/setup-login-capability.d.ts +37 -0
  114. package/dist/setup-login-capability.d.ts.map +1 -0
  115. package/dist/setup-login-capability.js +96 -0
  116. package/dist/setup-login-capability.js.map +1 -0
  117. package/dist/setup-login-io.d.ts +4 -1
  118. package/dist/setup-login-io.d.ts.map +1 -1
  119. package/dist/setup-login-io.js +22 -3
  120. package/dist/setup-login-io.js.map +1 -1
  121. package/dist/setup-login-pty.d.ts +64 -22
  122. package/dist/setup-login-pty.d.ts.map +1 -1
  123. package/dist/setup-login-pty.js +289 -48
  124. package/dist/setup-login-pty.js.map +1 -1
  125. package/dist/setup-login-runner-support.d.ts +12 -0
  126. package/dist/setup-login-runner-support.d.ts.map +1 -0
  127. package/dist/setup-login-runner-support.js +65 -0
  128. package/dist/setup-login-runner-support.js.map +1 -0
  129. package/dist/setup-login-runner.d.ts +3 -0
  130. package/dist/setup-login-runner.d.ts.map +1 -1
  131. package/dist/setup-login-runner.js +133 -116
  132. package/dist/setup-login-runner.js.map +1 -1
  133. package/dist/setup-runner-outcome.d.ts +10 -0
  134. package/dist/setup-runner-outcome.d.ts.map +1 -0
  135. package/dist/setup-runner-outcome.js +49 -0
  136. package/dist/setup-runner-outcome.js.map +1 -0
  137. package/dist/thread-execution-workspace.d.ts +11 -6
  138. package/dist/thread-execution-workspace.d.ts.map +1 -1
  139. package/dist/thread-execution-workspace.js +52 -6
  140. package/dist/thread-execution-workspace.js.map +1 -1
  141. package/package.json +24 -24
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness-install-recipes.d.ts","sourceRoot":"","sources":["../src/harness-install-recipes.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAE/E;AAED;;yDAEyD;AACzD,eAAO,MAAM,uBAAuB,YAAI,OAAO,EAAE,QAAQ,CAAU,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,oBAAoB,CAEnF;AAED,uE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AAO,EAAE,kBAAkB,CAAC;IAC5B,yEAAyE;IACzE,MAAM,EAAE,oBAAoB,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB;;gBAEY;IACZ,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;+EAE2E;IAC3E,YAAY,EAAE,0BAA0B,CAAC;CAC1C;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,kBAAkB,EAC3B,MAAM,GAAE,oBAA+B,GACtC,0BAA0B,CAqC5B"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * The vendor RECIPES `claudexor harness install` executes, and the disclosure
3
+ * it prints before executing anything. Split from harness-installer.ts so the
4
+ * WHAT (which artifact, from where, into which prefix, with what evidence)
5
+ * stays readable next to itself, while the installer file owns the HOW
6
+ * (lease, spawn, proof, CLI surface). A new vendor is a row in one of the two
7
+ * tables here, never a new branch there.
8
+ */
9
+ import { join } from "node:path";
10
+ import { CLAUDE_VENDOR_CLI_VERSION } from "@claudexor/harness-claude";
11
+ import { CODEX_VENDOR_CLI_VERSION } from "@claudexor/harness-codex";
12
+ import { OPENCODE_VENDOR_CLI_VERSION } from "@claudexor/harness-opencode";
13
+ import { managedNodeRoot } from "@claudexor/core";
14
+ import { INSTALLABLE_HARNESSES } from "./harness-command-specs.js";
15
+ export function isInstallableHarness(value) {
16
+ return INSTALLABLE_HARNESSES.includes(value);
17
+ }
18
+ /** Install destinations. `remote` is the historical issue-#89 SSH-host prefix;
19
+ * `local` is the managed toolchain root this host's harness resolution already
20
+ * reads, so an install there is immediately runnable. */
21
+ export const HARNESS_INSTALL_TARGETS = ["local", "remote"];
22
+ export function isHarnessInstallTarget(value) {
23
+ return HARNESS_INSTALL_TARGETS.includes(value);
24
+ }
25
+ /** ONE table owns each target's npm prefix and how it is disclosed. */
26
+ export const TARGET_LAYOUTS = {
27
+ local: { displayRoot: "~/.claudexor/node", root: managedNodeRoot },
28
+ remote: {
29
+ displayRoot: "~/.claudexor/remote/vendor",
30
+ root: (home) => join(home, ".claudexor", "remote", "vendor"),
31
+ },
32
+ };
33
+ export const NPM_PINS = {
34
+ claude: {
35
+ npmPackage: "@anthropic-ai/claude-code",
36
+ binaryNames: ["claude"],
37
+ version: CLAUDE_VENDOR_CLI_VERSION,
38
+ verification: "release_verified",
39
+ },
40
+ codex: {
41
+ npmPackage: "@openai/codex",
42
+ binaryNames: ["codex"],
43
+ version: CODEX_VENDOR_CLI_VERSION,
44
+ verification: "release_verified",
45
+ },
46
+ opencode: {
47
+ npmPackage: "opencode-ai",
48
+ binaryNames: ["opencode"],
49
+ version: OPENCODE_VENDOR_CLI_VERSION,
50
+ verification: "deterministic_only",
51
+ },
52
+ };
53
+ export const CURSOR_INSTALL_URL = "https://cursor.com/install";
54
+ /**
55
+ * Google's official Antigravity CLI installer, as published on
56
+ * antigravity.google/docs/cli/install (`curl -fsSL <this url> | bash`, which
57
+ * Claudexor deliberately does NOT do — see the header). Verified end to end on
58
+ * 2026-08-16: the script fetched from this URL installed agy 1.1.13 to
59
+ * `~/.local/bin/agy`, which is the destination disclosed below. The vendor
60
+ * ships one signed Go binary and no npm package, so it takes the same
61
+ * human-observed path as cursor.
62
+ */
63
+ export const AGY_INSTALL_URL = "https://antigravity.google/cli/install.sh";
64
+ /** The vendor's Windows installer, from the same documentation page. */
65
+ export const AGY_INSTALL_URL_WINDOWS = "https://antigravity.google/cli/install.ps1";
66
+ /** Vendors distributed as a shell installer instead of a pinnable npm
67
+ * artifact. ONE branch serves both entries; the per-harness text below is the
68
+ * only thing that differs, so a third such vendor is a row, not a fork. */
69
+ const SCRIPT_INSTALLERS = {
70
+ agy: {
71
+ binaryName: "agy",
72
+ url: AGY_INSTALL_URL,
73
+ // The one vendor here that publishes a Windows installer of its own; the
74
+ // POSIX row would otherwise be all Claudexor could honestly offer.
75
+ windowsUrl: AGY_INSTALL_URL_WINDOWS,
76
+ installLocation: "~/.local/bin (as selected by Google's Antigravity installer)",
77
+ 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",
78
+ },
79
+ cursor: {
80
+ // The legacy alias every Cursor login/run surface already consumes.
81
+ binaryName: "cursor-agent",
82
+ url: CURSOR_INSTALL_URL,
83
+ installLocation: "~/.local/bin (or ~/.cursor/bin, as selected by Cursor's installer)",
84
+ 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",
85
+ },
86
+ };
87
+ /** Membership is asked of the TABLE, never re-typed: a third script vendor is
88
+ * one row, and cannot be added to the table yet fall through here. */
89
+ export function scriptInstaller(harness) {
90
+ return Object.hasOwn(SCRIPT_INSTALLERS, harness)
91
+ ? SCRIPT_INSTALLERS[harness]
92
+ : null;
93
+ }
94
+ export function harnessInstallerDisclosure(harness, target = "remote") {
95
+ const layout = TARGET_LAYOUTS[target];
96
+ const pin = NPM_PINS[harness];
97
+ if (pin) {
98
+ return {
99
+ harness,
100
+ target,
101
+ command: `npm install --global --prefix ${layout.displayRoot} ${pin.npmPackage}@${pin.version}`,
102
+ installLocation: `${layout.displayRoot}/bin`,
103
+ pinnedVersion: pin.version,
104
+ verification: pin.verification,
105
+ };
106
+ }
107
+ const script = scriptInstaller(harness);
108
+ /* c8 ignore next -- every non-npm harness has a script row; this is the
109
+ unreachable guard that keeps the two tables honest. */
110
+ if (!script)
111
+ throw new Error(`harness ${harness} has neither an npm pin nor a script installer`);
112
+ const windows = process.platform === "win32";
113
+ const url = windows ? (script.windowsUrl ?? script.url) : script.url;
114
+ const file = windows && script.windowsUrl ? "install.ps1" : "install.sh";
115
+ const runner = windows && script.windowsUrl ? "powershell -ExecutionPolicy Bypass -File" : "/bin/sh";
116
+ return {
117
+ harness,
118
+ target,
119
+ command: `curl --fail --silent --show-error --location ${url} ` +
120
+ `--output <private-tmpdir>/${file} && ${runner} <private-tmpdir>/${file}`,
121
+ // The vendor script picks its own destination, so the local target cannot
122
+ // move it; only the WITNESS differs between the two targets.
123
+ installLocation: windows && script.windowsUrl
124
+ ? "%LOCALAPPDATA%\\agy\\bin (as selected by Google's Antigravity installer)"
125
+ : script.installLocation,
126
+ pinnedVersion: null,
127
+ verification: target === "local" ? "unattended_unpinned" : "human_observed",
128
+ };
129
+ }
130
+ //# sourceMappingURL=harness-install-recipes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness-install-recipes.js","sourceRoot":"","sources":["../src/harness-install-recipes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAInE,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,qBAAqB,CAAC,QAAQ,CAAC,KAA2B,CAAC,CAAC;AACrE,CAAC;AAED;;yDAEyD;AACzD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAU,CAAC;AAGpE,MAAM,UAAU,sBAAsB,CAAC,KAAa;IAClD,OAAO,uBAAuB,CAAC,QAAQ,CAAC,KAA6B,CAAC,CAAC;AACzE,CAAC;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,cAAc,GAGvB;IACF,KAAK,EAAE,EAAE,WAAW,EAAE,mBAAmB,EAAE,IAAI,EAAE,eAAe,EAAE;IAClE,MAAM,EAAE;QACN,WAAW,EAAE,4BAA4B;QACzC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ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AC1E,6DAA6D;QAC7D,eAAe,EACb,OAAO,IAAI,MAAM,CAAC,UAAU;YAC1B,CAAC,CAAC,0EAA0E;YAC5E,CAAC,CAAC,MAAM,CAAC,eAAe;QAC5B,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,gBAAgB;KAC5E,CAAC;AACJ,CAAC"}
@@ -1,7 +1,9 @@
1
1
  /**
2
- * `claudexor harness install` — the disclosed, pinned remote vendor installer
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 disclosure: the exact command and install
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
- * - failures are typed and loud; a failed download or non-zero installer exit
24
- * never reads as success, and the temp download dir is removed on every
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
@@ -31,56 +46,40 @@
31
46
  import { spawnSync } from "node:child_process";
32
47
  import { existsSync, mkdirSync } from "node:fs";
33
48
  import { type ParsedArgs } from "./args.js";
34
- import { INSTALLABLE_HARNESSES } from "./harness-command-specs.js";
35
- export type InstallableHarness = (typeof INSTALLABLE_HARNESSES)[number];
36
- export declare function isInstallableHarness(value: string): value is InstallableHarness;
37
- /** Exact npm pins. Each version ALIASES the harness package's vendor-version
38
- * SSOT (vendor-cli-version.ts there). For claude/codex that is the version
39
- * this release's freshness gates verified; the opencode pin is a
40
- * deterministic install target only — no recorded verification fixture
41
- * vouches for it (its vendor-cli-version.ts discloses this). Cursor and agy
42
- * are absent deliberately: they ship no npm artifact (see SCRIPT_INSTALLERS
43
- * below). */
44
- export type HarnessInstallVerification = "release_verified" | "deterministic_only" | "human_observed";
45
- export declare const CURSOR_INSTALL_URL = "https://cursor.com/install";
46
- /**
47
- * Google's official Antigravity CLI installer, as published on
48
- * antigravity.google/docs/cli/install (`curl -fsSL <this url> | bash`, which
49
- * Claudexor deliberately does NOT do — see the header). Verified end to end on
50
- * 2026-08-16: the script fetched from this URL installed agy 1.1.13 to
51
- * `~/.local/bin/agy`, which is the destination disclosed below. The vendor
52
- * ships one signed Go binary and no npm package, so it takes the same
53
- * human-observed path as cursor.
54
- */
55
- export declare const AGY_INSTALL_URL = "https://antigravity.google/cli/install.sh";
56
- /** The vendor's Windows installer, from the same documentation page. */
57
- export declare const AGY_INSTALL_URL_WINDOWS = "https://antigravity.google/cli/install.ps1";
58
- export interface HarnessInstallerDisclosure {
59
- harness: InstallableHarness;
60
- command: string;
61
- installLocation: string;
62
- /** Exact vendor version the command installs; null exactly for the script
63
- * vendors (cursor, agy), which have no pinnable artifact — disclosed, never
64
- * faked. */
65
- pinnedVersion: string | null;
66
- /** Evidence behind the install target. Package-registry integrity verifies
67
- * downloaded bytes for every npm pin, but only release_verified means the
68
- * exact vendor version was exercised by this release's freshness gates. */
69
- verification: HarnessInstallVerification;
70
- }
71
- export declare function harnessInstallerDisclosure(harness: InstallableHarness): HarnessInstallerDisclosure;
49
+ import { type HarnessInstallTarget, type InstallableHarness } from "./harness-install-recipes.js";
50
+ export { AGY_INSTALL_URL, AGY_INSTALL_URL_WINDOWS, CURSOR_INSTALL_URL, HARNESS_INSTALL_TARGETS, harnessInstallerDisclosure, isHarnessInstallTarget, isInstallableHarness, type HarnessInstallTarget, type InstallableHarness, } from "./harness-install-recipes.js";
72
51
  export interface HarnessInstallRunResult {
73
52
  exitCode: number;
74
53
  /** Set when the installer refused loudly WITHOUT running the vendor
75
54
  * payload (failed/unreadable download); never a silent partial install. */
76
55
  refusal?: string;
56
+ /** Stable machine reason when the payload did not run or did not verify. */
57
+ code?: string;
58
+ /** Evidence for the exact unpinned vendor-script bytes that ran. */
59
+ installerSha256?: string;
60
+ installerByteLength?: number;
61
+ /** Present on every SUCCESS: the absolute launcher the proof executed. */
62
+ installedBinary?: string;
63
+ /** Present on every SUCCESS: the exact npm pin, or the script vendor's own
64
+ * trimmed `--version` line. */
65
+ installedVersion?: string;
77
66
  }
78
67
  export declare function runHarnessInstaller(harness: InstallableHarness, options?: {
79
68
  home?: string;
80
69
  nodePath?: string;
70
+ /** Explicit install layout. Omitted preserves the historical remote target. */
71
+ target?: HarnessInstallTarget;
81
72
  spawn?: typeof spawnSync;
82
73
  mkdir?: typeof mkdirSync;
83
74
  exists?: typeof existsSync;
75
+ /** Production installs serialize cross-process. Tests may disable only this
76
+ * wrapper while preserving the install recipe under test. */
77
+ lock?: boolean;
78
+ lockTimeoutMs?: number;
79
+ platform?: NodeJS.Platform;
80
+ /** Test/integration source before the clean allowlist and target-aware PATH
81
+ * normalization are applied. Provider credentials are still scrubbed. */
82
+ sourceEnv?: NodeJS.ProcessEnv;
84
83
  /** `--json` stdout purity: route human progress lines AND child stdout
85
84
  * to stderr, so stdout carries exactly one JSON object (the caller's
86
85
  * final envelope). Human mode keeps everything on stdout as before. */
@@ -88,5 +87,5 @@ export declare function runHarnessInstaller(harness: InstallableHarness, options
88
87
  }): HarnessInstallRunResult;
89
88
  export declare function harnessInstallCommand(args: ParsedArgs, json: boolean,
90
89
  /** Test seam: forwarded to `runHarnessInstaller` (spawn/home/... fakes). */
91
- runnerOptions?: Omit<NonNullable<Parameters<typeof runHarnessInstaller>[1]>, "json">): number;
90
+ runnerOptions?: Omit<NonNullable<Parameters<typeof runHarnessInstaller>[1]>, "json" | "target">): number;
92
91
  //# sourceMappingURL=harness-installer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"harness-installer.d.ts","sourceRoot":"","sources":["../src/harness-installer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,SAAS,EAA+C,MAAM,SAAS,CAAC;AAQ7F,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,kBAAkB,CAE/E;AAED;;;;;;aAMa;AACb,MAAM,MAAM,0BAA0B,GACpC,kBAAkB,GAAG,oBAAo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