@claudexor/cli 3.4.2 → 3.6.0
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 +18 -12
- package/dist/accounts-projection.d.ts.map +1 -1
- package/dist/accounts-projection.js +63 -58
- package/dist/accounts-projection.js.map +1 -1
- package/dist/accounts-services.d.ts +134 -127
- package/dist/accounts-services.d.ts.map +1 -1
- package/dist/accounts-services.js +15 -7
- package/dist/accounts-services.js.map +1 -1
- package/dist/accounts-unified-migration.d.ts +110 -0
- package/dist/accounts-unified-migration.d.ts.map +1 -0
- package/dist/accounts-unified-migration.js +422 -0
- package/dist/accounts-unified-migration.js.map +1 -0
- package/dist/agy-quota-source.d.ts +36 -0
- package/dist/agy-quota-source.d.ts.map +1 -0
- package/dist/agy-quota-source.js +334 -0
- package/dist/agy-quota-source.js.map +1 -0
- package/dist/auth-login-harnesses.d.ts +13 -0
- package/dist/auth-login-harnesses.d.ts.map +1 -0
- package/dist/auth-login-harnesses.js +18 -0
- package/dist/auth-login-harnesses.js.map +1 -0
- package/dist/claude-oauth-usage.d.ts.map +1 -1
- package/dist/claude-oauth-usage.js +9 -3
- package/dist/claude-oauth-usage.js.map +1 -1
- package/dist/claude-statusline.d.ts.map +1 -1
- package/dist/claude-statusline.js +14 -1
- package/dist/claude-statusline.js.map +1 -1
- package/dist/claudexord.d.ts.map +1 -1
- package/dist/claudexord.js +25 -37
- package/dist/claudexord.js.map +1 -1
- package/dist/codex-quota-source.d.ts.map +1 -1
- package/dist/codex-quota-source.js +8 -3
- package/dist/codex-quota-source.js.map +1 -1
- package/dist/command-registry.d.ts.map +1 -1
- package/dist/command-registry.js +2 -13
- package/dist/command-registry.js.map +1 -1
- package/dist/config-dir-login-harnesses.d.ts +7 -0
- package/dist/config-dir-login-harnesses.d.ts.map +1 -0
- package/dist/config-dir-login-harnesses.js +46 -0
- package/dist/config-dir-login-harnesses.js.map +1 -0
- package/dist/control-services.d.ts +203 -185
- package/dist/control-services.d.ts.map +1 -1
- package/dist/control-services.js +39 -118
- package/dist/control-services.js.map +1 -1
- package/dist/credential-commands.d.ts.map +1 -1
- package/dist/credential-commands.js +51 -34
- package/dist/credential-commands.js.map +1 -1
- package/dist/credential-profile-mutations.d.ts +63 -0
- package/dist/credential-profile-mutations.d.ts.map +1 -0
- package/dist/credential-profile-mutations.js +187 -0
- package/dist/credential-profile-mutations.js.map +1 -0
- package/dist/credential-status-invalidation.d.ts +11 -0
- package/dist/credential-status-invalidation.d.ts.map +1 -0
- package/dist/credential-status-invalidation.js +36 -0
- package/dist/credential-status-invalidation.js.map +1 -0
- package/dist/daemon-admission-runtime.d.ts +5 -0
- package/dist/daemon-admission-runtime.d.ts.map +1 -1
- package/dist/daemon-admission-runtime.js +1 -0
- package/dist/daemon-admission-runtime.js.map +1 -1
- package/dist/harness-command-specs.d.ts +17 -0
- package/dist/harness-command-specs.d.ts.map +1 -0
- package/dist/harness-command-specs.js +22 -0
- package/dist/harness-command-specs.js.map +1 -0
- package/dist/harness-command.d.ts +4 -4
- package/dist/harness-command.d.ts.map +1 -1
- package/dist/harness-command.js +6 -5
- package/dist/harness-command.js.map +1 -1
- package/dist/harness-installer.d.ts +23 -10
- package/dist/harness-installer.d.ts.map +1 -1
- package/dist/harness-installer.js +93 -33
- package/dist/harness-installer.js.map +1 -1
- package/dist/mcp-run-projections.d.ts +1 -1
- package/dist/native-login.d.ts +10 -1
- package/dist/native-login.d.ts.map +1 -1
- package/dist/native-login.js +61 -5
- package/dist/native-login.js.map +1 -1
- package/dist/ops-commands.d.ts +1 -2
- package/dist/ops-commands.d.ts.map +1 -1
- package/dist/ops-commands.js +6 -5
- package/dist/ops-commands.js.map +1 -1
- package/dist/profile-registration.d.ts +13 -1
- package/dist/profile-registration.d.ts.map +1 -1
- package/dist/profile-registration.js +79 -4
- package/dist/profile-registration.js.map +1 -1
- package/dist/quota-refreshers.d.ts +3 -0
- package/dist/quota-refreshers.d.ts.map +1 -1
- package/dist/quota-refreshers.js +2 -0
- package/dist/quota-refreshers.js.map +1 -1
- package/dist/quota-services.d.ts +4 -2
- package/dist/quota-services.d.ts.map +1 -1
- package/dist/quota-subject-universe.d.ts.map +1 -1
- package/dist/quota-subject-universe.js +11 -2
- package/dist/quota-subject-universe.js.map +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +3 -1
- package/dist/registry.js.map +1 -1
- package/dist/run-orchestrator.d.ts +28 -0
- package/dist/run-orchestrator.d.ts.map +1 -0
- package/dist/run-orchestrator.js +43 -0
- package/dist/run-orchestrator.js.map +1 -0
- package/dist/settings-service.d.ts +1 -1
- package/dist/settings-service.js +3 -3
- package/dist/settings-service.js.map +1 -1
- package/dist/setup-job-store.d.ts +4 -2
- package/dist/setup-job-store.d.ts.map +1 -1
- package/dist/setup-job-support.d.ts +50 -1
- package/dist/setup-job-support.d.ts.map +1 -1
- package/dist/setup-job-support.js +93 -11
- package/dist/setup-job-support.js.map +1 -1
- package/dist/setup-jobs.d.ts +8 -4
- package/dist/setup-jobs.d.ts.map +1 -1
- package/dist/setup-jobs.js +17 -18
- package/dist/setup-jobs.js.map +1 -1
- package/dist/setup-login-completion.d.ts.map +1 -1
- package/dist/setup-login-completion.js +16 -0
- package/dist/setup-login-completion.js.map +1 -1
- package/dist/setup-login-io.d.ts +7 -1
- package/dist/setup-login-io.d.ts.map +1 -1
- package/dist/setup-login-io.js +43 -3
- package/dist/setup-login-io.js.map +1 -1
- package/dist/setup-login-pty.d.ts +27 -0
- package/dist/setup-login-pty.d.ts.map +1 -0
- package/dist/setup-login-pty.js +58 -0
- package/dist/setup-login-pty.js.map +1 -0
- package/dist/setup-login-runner.d.ts +1 -9
- package/dist/setup-login-runner.d.ts.map +1 -1
- package/dist/setup-login-runner.js +17 -49
- package/dist/setup-login-runner.js.map +1 -1
- package/dist/setup-login-url.d.ts +10 -0
- package/dist/setup-login-url.d.ts.map +1 -0
- package/dist/setup-login-url.js +48 -0
- package/dist/setup-login-url.js.map +1 -0
- package/dist/thread-continuity-context.d.ts +24 -0
- package/dist/thread-continuity-context.d.ts.map +1 -1
- package/dist/thread-continuity-context.js +17 -0
- package/dist/thread-continuity-context.js.map +1 -1
- package/package.json +24 -23
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PATCH/DELETE credential-profile services (INV-135 unified account model),
|
|
3
|
+
* extracted from control-services.ts (INV-124). One mutation owner each:
|
|
4
|
+
* the Enabled toggle (with the deprecated `native_credentials_enabled`
|
|
5
|
+
* downgrade-window mirror for the migrated row) and the PROVABLE removal
|
|
6
|
+
* (D-U4: material cleanup BEFORE registry removal; a cleanup failure is a
|
|
7
|
+
* typed retryable error, never a removed-with-warning receipt).
|
|
8
|
+
*/
|
|
9
|
+
import { existsSync, rmSync } from "node:fs";
|
|
10
|
+
import { join, sep } from "node:path";
|
|
11
|
+
import { loadConfig, updateGlobalConfig } from "@claudexor/config";
|
|
12
|
+
import { canonicalIsolationLocator, normalizeThroughExistingAncestor } from "@claudexor/core";
|
|
13
|
+
import { claudexorOwnedRoot, noProjectRepoRoot } from "@claudexor/util";
|
|
14
|
+
import { purgeProfileLanes } from "@claudexor/workspace";
|
|
15
|
+
import { vendorVerifiedProfileStatus } from "@claudexor/orchestrator";
|
|
16
|
+
import { locatorIsDefaultNativeStore, readAccountsMigrationFile, removeAccountsMigrationRecord, } from "./accounts-unified-migration.js";
|
|
17
|
+
import { profileDoctorStatus } from "./accounts-projection.js";
|
|
18
|
+
import { canonicalProfileLoginDir, isConfigDirLoginHarness } from "./config-dir-login-harnesses.js";
|
|
19
|
+
import { assertCredentialProfileRegistered } from "./profile-compatibility.js";
|
|
20
|
+
import { removeProfileFromRegistry } from "./profile-registration.js";
|
|
21
|
+
const NO_PROJECT_ROOT = noProjectRepoRoot();
|
|
22
|
+
export function credentialProfileMutations(deps) {
|
|
23
|
+
return {
|
|
24
|
+
// PATCH /credential-profiles/:harness/:id — the Enabled toggle of the
|
|
25
|
+
// accounts symmetry (INV-135): one locked registry write, plus the
|
|
26
|
+
// deprecated `native_credentials_enabled` downgrade-window mirror when the
|
|
27
|
+
// row is the migrated one (a silent divergence would re-enable the
|
|
28
|
+
// account after a downgrade).
|
|
29
|
+
updateCredentialProfile: async (input) => {
|
|
30
|
+
const p = (input ?? {});
|
|
31
|
+
const harnessId = typeof p["harnessId"] === "string" ? p["harnessId"] : "";
|
|
32
|
+
const profileId = typeof p["profileId"] === "string" ? p["profileId"] : "";
|
|
33
|
+
const enabled = typeof p["enabled"] === "boolean" ? p["enabled"] : undefined;
|
|
34
|
+
if (!harnessId || !profileId || enabled === undefined) {
|
|
35
|
+
throw Object.assign(new Error("harnessId, profileId and enabled are required"), {
|
|
36
|
+
status: 400,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const registry = loadConfig(NO_PROJECT_ROOT).global.credential_profiles;
|
|
40
|
+
assertCredentialProfileRegistered(registry, harnessId, profileId);
|
|
41
|
+
// The downgrade-window mirror keys on the STRUCTURAL rule (the row's
|
|
42
|
+
// locator IS the harness default store), not on migration-record
|
|
43
|
+
// presence alone: a bootstrap row (ensureBootstrapProfile) sits at the
|
|
44
|
+
// native dir before any record exists, and a silent mirror divergence
|
|
45
|
+
// would re-enable that account after a downgrade — or let the legacy
|
|
46
|
+
// default-subject ladder route back into a disabled row's store.
|
|
47
|
+
const registryRow = registry.find((row) => row.harness_id === harnessId && row.profile_id === profileId);
|
|
48
|
+
const mirrorsNativeKey = readAccountsMigrationFile()[harnessId]?.row_id === profileId ||
|
|
49
|
+
locatorIsDefaultNativeStore(harnessId, registryRow?.isolation_locator ?? null);
|
|
50
|
+
let updated;
|
|
51
|
+
updateGlobalConfig((config) => ({
|
|
52
|
+
...config,
|
|
53
|
+
...(mirrorsNativeKey
|
|
54
|
+
? {
|
|
55
|
+
harnesses: {
|
|
56
|
+
...config.harnesses,
|
|
57
|
+
[harnessId]: {
|
|
58
|
+
...config.harnesses[harnessId],
|
|
59
|
+
native_credentials_enabled: enabled,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
: {}),
|
|
64
|
+
credential_profiles: config.credential_profiles.map((profile) => {
|
|
65
|
+
if (profile.harness_id !== harnessId || profile.profile_id !== profileId)
|
|
66
|
+
return profile;
|
|
67
|
+
updated = { ...profile, enabled };
|
|
68
|
+
return updated;
|
|
69
|
+
}),
|
|
70
|
+
}));
|
|
71
|
+
if (!updated) {
|
|
72
|
+
throw Object.assign(new Error("profile update did not persist"), { status: 500 });
|
|
73
|
+
}
|
|
74
|
+
deps.bustStatusCaches({ harnessId, profileId });
|
|
75
|
+
return {
|
|
76
|
+
profile: updated,
|
|
77
|
+
// Same vendor overlay the listing applies: a single-profile response
|
|
78
|
+
// must not re-declare a revoked credential `passed` (INV-135 honesty).
|
|
79
|
+
status: vendorVerifiedProfileStatus(await profileDoctorStatus(updated), deps.quotaRegistry().read()),
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
// DELETE /credential-profiles/:harness/:id — provable removal (D-U4).
|
|
83
|
+
deleteCredentialProfile: async (input) => {
|
|
84
|
+
const p = (input ?? {});
|
|
85
|
+
const harnessId = typeof p["harnessId"] === "string" ? p["harnessId"] : "";
|
|
86
|
+
const profileId = typeof p["profileId"] === "string" ? p["profileId"] : "";
|
|
87
|
+
if (!harnessId || !profileId) {
|
|
88
|
+
throw Object.assign(new Error("harnessId and profileId are required"), { status: 400 });
|
|
89
|
+
}
|
|
90
|
+
const activeLogin = deps.activeLoginJob(harnessId, profileId);
|
|
91
|
+
if (activeLogin) {
|
|
92
|
+
throw Object.assign(new Error(`a login for this account is in progress (${activeLogin.jobId}); cancel it before removing the account`), { status: 409 });
|
|
93
|
+
}
|
|
94
|
+
assertCredentialProfileRegistered(loadConfig(NO_PROJECT_ROOT).global.credential_profiles, harnessId, profileId);
|
|
95
|
+
deps.threads.invalidateCredentialProfile(harnessId, profileId);
|
|
96
|
+
// INV-034 lifecycle owner (b): the deleted account's durable per-lane
|
|
97
|
+
// read-only homes must not survive to be resumed. Sweep them across every
|
|
98
|
+
// project a live thread anchors to (plus the no-project partition).
|
|
99
|
+
const laneRoots = new Set([NO_PROJECT_ROOT]);
|
|
100
|
+
for (const thread of deps.threads.listThreads()) {
|
|
101
|
+
if (thread.repo?.root)
|
|
102
|
+
laneRoots.add(thread.repo.root);
|
|
103
|
+
}
|
|
104
|
+
for (const root of laneRoots)
|
|
105
|
+
purgeProfileLanes(root, harnessId, profileId);
|
|
106
|
+
deps.quotaRegistry().removeSubject(harnessId, profileId);
|
|
107
|
+
// Unified account model: deleting a MIGRATED row retires the canonical
|
|
108
|
+
// id PLUS its legacy aliases (the null engine-default subject and its
|
|
109
|
+
// `<harness>-default` lane homes) in the SAME lifecycle operation — a
|
|
110
|
+
// dangling alias could resume the deleted credential's session or keep
|
|
111
|
+
// charging its quota subject.
|
|
112
|
+
const migrationRecord = readAccountsMigrationFile()[harnessId];
|
|
113
|
+
const registryEntry = loadConfig(NO_PROJECT_ROOT).global.credential_profiles.find((row) => row.harness_id === harnessId && row.profile_id === profileId);
|
|
114
|
+
const migratedRow = migrationRecord?.row_id === profileId;
|
|
115
|
+
if (migrationRecord && migratedRow) {
|
|
116
|
+
// The record's OWN alias list drives the retirement — the schema's
|
|
117
|
+
// "deletion retires these aliases" claim stays true by construction
|
|
118
|
+
// (the null alias is the engine-default subject and its
|
|
119
|
+
// `<harness>-default` lane homes).
|
|
120
|
+
for (const alias of migrationRecord.legacy_aliases) {
|
|
121
|
+
deps.quotaRegistry().removeSubject(harnessId, alias);
|
|
122
|
+
for (const root of laneRoots)
|
|
123
|
+
purgeProfileLanes(root, harnessId, alias ?? "default");
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// D-U4 failure contract: `removed: true` ONLY when the row AND its
|
|
127
|
+
// credential material are provably gone. Material cleanup therefore runs
|
|
128
|
+
// BEFORE registry removal: a cleanup failure is a typed RETRYABLE error
|
|
129
|
+
// that leaves the row registered (a retry finishes the job) — never a
|
|
130
|
+
// `removed: true` with a warning, which the startup auto-registration
|
|
131
|
+
// would resurrect from the surviving material on the next start.
|
|
132
|
+
let credentialCleanup = "none";
|
|
133
|
+
try {
|
|
134
|
+
if (registryEntry?.credential_kind === "config_dir_login" &&
|
|
135
|
+
registryEntry.isolation_locator) {
|
|
136
|
+
// Each member resolves through its OWN canonicalizer (the ladder
|
|
137
|
+
// this used to hand-write let cursor and agy fall through to the
|
|
138
|
+
// generic one, so a member whose canonicalizer adds a rule would
|
|
139
|
+
// silently delete against a different path than its login wrote to).
|
|
140
|
+
const dir = isConfigDirLoginHarness(harnessId)
|
|
141
|
+
? canonicalProfileLoginDir(harnessId, registryEntry.isolation_locator)
|
|
142
|
+
: canonicalIsolationLocator(registryEntry.isolation_locator, "credential profile dir");
|
|
143
|
+
// Recursive deletion is fenced to a strict descendant of the
|
|
144
|
+
// profiles tree — PLUS exactly the harness's own default native
|
|
145
|
+
// store dir (an exact-path allowlist, never a general "anything
|
|
146
|
+
// under native/" deletion class — K.3). The structural rule covers
|
|
147
|
+
// both the migrated row (whose record holds that locator) and a
|
|
148
|
+
// bootstrap row registered at the native dir BEFORE any migration
|
|
149
|
+
// record exists (a cancelled login must stay removable — K.4).
|
|
150
|
+
const profilesRoot = normalizeThroughExistingAncestor(join(claudexorOwnedRoot(), "profiles"));
|
|
151
|
+
const legacyAllowlisted = (migratedRow &&
|
|
152
|
+
migrationRecord !== undefined &&
|
|
153
|
+
dir === normalizeThroughExistingAncestor(migrationRecord.locator)) ||
|
|
154
|
+
locatorIsDefaultNativeStore(harnessId, dir);
|
|
155
|
+
if (!dir.startsWith(profilesRoot + sep) && !legacyAllowlisted) {
|
|
156
|
+
throw new Error(`refusing to delete "${dir}": not inside the profiles tree ${profilesRoot} and not the migrated row's recorded legacy locator`);
|
|
157
|
+
}
|
|
158
|
+
if (existsSync(dir)) {
|
|
159
|
+
rmSync(dir, { recursive: true, force: true });
|
|
160
|
+
credentialCleanup = "config_dir_removed";
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else if (registryEntry?.secret_ref) {
|
|
164
|
+
deps.secretStore.delete(registryEntry.secret_ref);
|
|
165
|
+
credentialCleanup = "secret_deleted";
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
catch (err) {
|
|
169
|
+
deps.bustStatusCaches();
|
|
170
|
+
throw Object.assign(new Error(`credential cleanup failed; the account is still registered — retry the removal: ${err instanceof Error ? err.message : String(err)}`), { status: 503, code: "credential_cleanup_failed", retryable: true });
|
|
171
|
+
}
|
|
172
|
+
const entry = removeProfileFromRegistry(harnessId, profileId);
|
|
173
|
+
if (migratedRow) {
|
|
174
|
+
// The migration record dies with its row: the material is gone, so a
|
|
175
|
+
// later start detects no legacy login and fabricates nothing.
|
|
176
|
+
removeAccountsMigrationRecord(harnessId);
|
|
177
|
+
}
|
|
178
|
+
deps.bustStatusCaches({ harnessId, profileId });
|
|
179
|
+
return {
|
|
180
|
+
profile: entry,
|
|
181
|
+
removed: true,
|
|
182
|
+
credentialCleanup,
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=credential-profile-mutations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-profile-mutations.js","sourceRoot":"","sources":["../src/credential-profile-mutations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AAG9F,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAA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AAO;gBACL,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,IAAI;gBACb,iBAAiB;aAClB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { QuotaRegistry } from "@claudexor/daemon";
|
|
2
|
+
/** The credential a control-API mutation touched: one registered profile, or
|
|
3
|
+
* a secret name whose subjects are resolved through the registry. */
|
|
4
|
+
export type CredentialMutationSubject = {
|
|
5
|
+
harnessId: string;
|
|
6
|
+
profileId: string;
|
|
7
|
+
} | {
|
|
8
|
+
secretName: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function bustCredentialStatusCaches(quotaRegistry: () => QuotaRegistry, subject?: CredentialMutationSubject): void;
|
|
11
|
+
//# sourceMappingURL=credential-status-invalidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-status-invalidation.d.ts","sourceRoot":"","sources":["../src/credential-status-invalidation.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKvD;qEACqE;AACrE,MAAM,MAAM,yBAAyB,GACnC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,aAAa,EAClC,OAAO,CAAC,EAAE,yBAAyB,GAClC,IAAI,CAiBN"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ONE owner for what a control-API credential mutation invalidates: the
|
|
3
|
+
* doctor/status projections, the quota registry's absence pacing, and — per
|
|
4
|
+
* subject — the A7 unusable-credential ledger. The per-subject half of the
|
|
5
|
+
* ledger's clearing contract lives HERE (profile enable/disable/create/remove
|
|
6
|
+
* and secret set/delete each void exactly the verdicts about the credential
|
|
7
|
+
* they touched), while the whole-ledger clear stays with claudexord's
|
|
8
|
+
* login/logout lifecycle. Clearing is fail-open by contract: over-clearing
|
|
9
|
+
* costs at most one attempt rediscovering a refusal.
|
|
10
|
+
*/
|
|
11
|
+
import { loadConfig } from "@claudexor/config";
|
|
12
|
+
import { invalidateDoctorCache } from "@claudexor/core";
|
|
13
|
+
import { noProjectRepoRoot } from "@claudexor/util";
|
|
14
|
+
import { invalidateStatusProjections } from "./status-projection-cache.js";
|
|
15
|
+
import { credentialUnusableLedger } from "./run-orchestrator.js";
|
|
16
|
+
export function bustCredentialStatusCaches(quotaRegistry, subject) {
|
|
17
|
+
invalidateDoctorCache();
|
|
18
|
+
invalidateStatusProjections();
|
|
19
|
+
quotaRegistry().noteCredentialChange();
|
|
20
|
+
if (!subject)
|
|
21
|
+
return;
|
|
22
|
+
if ("harnessId" in subject) {
|
|
23
|
+
credentialUnusableLedger.clearSubject(subject.harnessId, subject.profileId);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
// A secret names its subjects indirectly: profiles whose secret_ref IS this
|
|
27
|
+
// name, and — for a bare managed name — the engine-default slot of whichever
|
|
28
|
+
// harness reads it (adapter knowledge the daemon does not duplicate).
|
|
29
|
+
for (const profile of loadConfig(noProjectRepoRoot()).global.credential_profiles) {
|
|
30
|
+
if (profile.secret_ref === subject.secretName)
|
|
31
|
+
credentialUnusableLedger.clearSubject(profile.harness_id, profile.profile_id);
|
|
32
|
+
}
|
|
33
|
+
if (!subject.secretName.includes(":"))
|
|
34
|
+
credentialUnusableLedger.clearDefaultSubjects();
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=credential-status-invalidation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-status-invalidation.js","sourceRoot":"","sources":["../src/credential-status-invalidation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAOjE,MAAM,UAAU,0BAA0B,CACxC,aAAkC,EAClC,OAAmC;IAEnC,qBAAqB,EAAE,CAAC;IACxB,2BAA2B,EAAE,CAAC;IAC9B,aAAa,EAAE,CAAC,oBAAoB,EAAE,CAAC;IACvC,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,IAAI,WAAW,IAAI,OAAO,EAAE,CAAC;QAC3B,wBAAwB,CAAC,YAAY,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QAC5E,OAAO;IACT,CAAC;IACD,4EAA4E;IAC5E,6EAA6E;IAC7E,sEAAsE;IACtE,KAAK,MAAM,OAAO,IAAI,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC;QACjF,IAAI,OAAO,CAAC,UAAU,KAAK,OAAO,CAAC,UAAU;YAC3C,wBAAwB,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAClF,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,wBAAwB,CAAC,oBAAoB,EAAE,CAAC;AACzF,CAAC"}
|
|
@@ -42,6 +42,11 @@ export interface NormalPlaneDuties {
|
|
|
42
42
|
requested(): boolean;
|
|
43
43
|
armQuotaPolling(): void;
|
|
44
44
|
beginPidSnapshots(): void;
|
|
45
|
+
/** Unified-accounts startup migration (INV-135): runs FIRST on the normal
|
|
46
|
+
* plane — before setup jobs, so a login job can never race the registry
|
|
47
|
+
* write — and is crash-recoverable via its own phase file (an incomplete
|
|
48
|
+
* harness refuses runs typed until the next start finishes it). */
|
|
49
|
+
migrateAccounts(): void;
|
|
45
50
|
startSetup(): Promise<void>;
|
|
46
51
|
quarantineGhosts(): void;
|
|
47
52
|
scheduleRetention(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-admission-runtime.d.ts","sourceRoot":"","sources":["../src/daemon-admission-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC7C,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAClD,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IACrD,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;oEAEoE;AACpE,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,wBAAwB,CAoC3B;AAED;;;uEAGuE;AACvE,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG;IAAE,GAAG,IAAI,IAAI,CAAC;IAAC,IAAI,IAAI,IAAI,CAAA;CAAE,CAcvF;AAED;;;yBAGyB;AACzB,MAAM,WAAW,iBAAiB;IAChC,SAAS,IAAI,OAAO,CAAC;IACrB,eAAe,IAAI,IAAI,CAAC;IACxB,iBAAiB,IAAI,IAAI,CAAC;IAC1B,UAAU,IAAI,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,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CACxD,CA6GA"}
|
|
@@ -96,6 +96,7 @@ export function createStartupAdmissionRuntime(input) {
|
|
|
96
96
|
for (const sweep of sweepRetiredConfigKeysAtStartup()) {
|
|
97
97
|
logLine(logPath(), `swept retired config keys from ${sweep.path}: ${sweep.removed.join(", ")}`);
|
|
98
98
|
}
|
|
99
|
+
input.normalPlane.migrateAccounts();
|
|
99
100
|
await input.normalPlane.startSetup();
|
|
100
101
|
input.normalPlane.quarantineGhosts();
|
|
101
102
|
input.normalPlane.scheduleRetention();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-admission-runtime.js","sourceRoot":"","sources":["../src/daemon-admission-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,SAAS,EACT,OAAO,GAKR,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAE1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,0CAA0C,EAC1C,sBAAsB,GAEvB,MAAM,0BAA0B,CAAC;AASlC;;oEAEoE;AACpE,MAAM,UAAU,sBAAsB,CAAC,QAItC;IACC,IAAI,WAAW,GAAoC,IAAI,CAAC;IACxD,IAAI,CAAC;QACH,WAAW,GAAG,0CAA0C,CAAC;YACvD,cAAc,EAAE,QAAQ,CAAC,OAAO;YAChC,QAAQ,EAAE,QAAQ,CAAC,GAAG;YACtB,SAAS,EAAE,QAAQ,CAAC,KAAK;YACzB,GAAG,EAAE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@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `harness` command's surface, kept beside its installable set so ONE
|
|
3
|
+
* array spells that set everywhere it is printed: the registry usage line,
|
|
4
|
+
* the dispatcher's usage error (harness-command.ts) and the installer's own
|
|
5
|
+
* refusal (harness-installer.ts). This module stays value-import-free on
|
|
6
|
+
* purpose — harness-installer.ts reaches command-registry.ts through args.ts,
|
|
7
|
+
* so owning the array there would close a runtime import cycle.
|
|
8
|
+
*/
|
|
9
|
+
import type { CliCommandSpec } from "./command-registry.js";
|
|
10
|
+
/** Vendor CLIs `claudexor harness install` can fetch. harness-installer.ts
|
|
11
|
+
* owns each one's install recipe and its test asserts this list is exhaustive. */
|
|
12
|
+
export declare const INSTALLABLE_HARNESSES: readonly ["agy", "claude", "codex", "cursor", "opencode"];
|
|
13
|
+
/** The `harness` argument shape: rendered by `claudexor help` and reprinted by
|
|
14
|
+
* the dispatcher when a verb is unknown. */
|
|
15
|
+
export declare const HARNESS_USAGE_ARGS: string;
|
|
16
|
+
export declare const HARNESS_COMMAND_SPECS: readonly CliCommandSpec[];
|
|
17
|
+
//# sourceMappingURL=harness-command-specs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness-command-specs.d.ts","sourceRoot":"","sources":["../src/harness-command-specs.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;kFACkF;AAClF,eAAO,MAAM,qBAAqB,YAAI,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AAE/F;4CAC4C;AAC5C,eAAO,MAAM,kBAAkB,QAAoF,CAAC;AAEpH,eAAO,MAAM,qBAAqB,EAAE,SAAS,cAAc,EAc1D,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Vendor CLIs `claudexor harness install` can fetch. harness-installer.ts
|
|
2
|
+
* owns each one's install recipe and its test asserts this list is exhaustive. */
|
|
3
|
+
export const INSTALLABLE_HARNESSES = ["agy", "claude", "codex", "cursor", "opencode"];
|
|
4
|
+
/** The `harness` argument shape: rendered by `claudexor help` and reprinted by
|
|
5
|
+
* the dispatcher when a verb is unknown. */
|
|
6
|
+
export const HARNESS_USAGE_ARGS = `list [--all] | install <${INSTALLABLE_HARNESSES.join("|")}> [--dry-run] [--yes]`;
|
|
7
|
+
export const HARNESS_COMMAND_SPECS = [
|
|
8
|
+
{
|
|
9
|
+
id: "harness",
|
|
10
|
+
positionalPatterns: [
|
|
11
|
+
{ prefix: ["list"], min: 1, max: 1 },
|
|
12
|
+
{ prefix: ["install"], min: 2, max: 2 },
|
|
13
|
+
],
|
|
14
|
+
usageArgs: HARNESS_USAGE_ARGS,
|
|
15
|
+
summary: "List harnesses, or install one vendor CLI after disclosure",
|
|
16
|
+
flags: ["all", "dry-run", "yes", "json"],
|
|
17
|
+
subcommandFlags: { list: ["all"], install: ["dry-run", "yes"] },
|
|
18
|
+
mutability: "ops",
|
|
19
|
+
stability: "stable",
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=harness-command-specs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness-command-specs.js","sourceRoot":"","sources":["../src/harness-command-specs.ts"],"names":[],"mappings":"AAUA;kFACkF;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AAE/F;4CAC4C;AAC5C,MAAM,CAAC,MAAM,kBAAkB,GAAG,2BAA2B,qBAAqB,CAAC,IAAI,CAAC,GAAG,CAAC,uBAAuB,CAAC;AAEpH,MAAM,CAAC,MAAM,qBAAqB,GAA8B;IAC9D;QACE,EAAE,EAAE,SAAS;QACb,kBAAkB,EAAE;YAClB,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;YACpC,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;SACxC;QACD,SAAS,EAAE,kBAAkB;QAC7B,OAAO,EAAE,4DAA4D;QACrE,KAAK,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;QACxC,eAAe,EAAE,EAAE,IAAI,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE;QAC/D,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC"}
|
|
@@ -2,10 +2,10 @@ import { type ParsedArgs } from "./args.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* `claudexor harness list [--all]` and `claudexor harness install <id>`.
|
|
4
4
|
* Fakes are test fixtures, not real harnesses; `--all` reveals them. The
|
|
5
|
-
* install verb is the disclosed
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* verb-owned (registry `subcommandFlags`): `harness list --yes` or
|
|
5
|
+
* install verb is the disclosed installer (harness-installer.ts, issue #89):
|
|
6
|
+
* exact npm pins for claude/codex/opencode, the human-verified PTY path for
|
|
7
|
+
* the script vendors (cursor, agy), and nothing executes without disclosure.
|
|
8
|
+
* Flags are verb-owned (registry `subcommandFlags`): `harness list --yes` or
|
|
9
9
|
* `harness install --all` is a loud exit-2 usage error, never a silently
|
|
10
10
|
* ignored flag (INV-021).
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness-command.d.ts","sourceRoot":"","sources":["../src/harness-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"harness-command.d.ts","sourceRoot":"","sources":["../src/harness-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAOtD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,CAetE"}
|
package/dist/harness-command.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { flagBool } from "./args.js";
|
|
2
2
|
import { print, printJson, printUsageError } from "./cli-io.js";
|
|
3
3
|
import { subcommandFlagScopeError } from "./command-scope.js";
|
|
4
|
+
import { HARNESS_USAGE_ARGS } from "./harness-command-specs.js";
|
|
4
5
|
import { harnessInstallCommand } from "./harness-installer.js";
|
|
5
6
|
import { buildRegistry } from "./registry.js";
|
|
6
7
|
/**
|
|
7
8
|
* `claudexor harness list [--all]` and `claudexor harness install <id>`.
|
|
8
9
|
* Fakes are test fixtures, not real harnesses; `--all` reveals them. The
|
|
9
|
-
* install verb is the disclosed
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* verb-owned (registry `subcommandFlags`): `harness list --yes` or
|
|
10
|
+
* install verb is the disclosed installer (harness-installer.ts, issue #89):
|
|
11
|
+
* exact npm pins for claude/codex/opencode, the human-verified PTY path for
|
|
12
|
+
* the script vendors (cursor, agy), and nothing executes without disclosure.
|
|
13
|
+
* Flags are verb-owned (registry `subcommandFlags`): `harness list --yes` or
|
|
13
14
|
* `harness install --all` is a loud exit-2 usage error, never a silently
|
|
14
15
|
* ignored flag (INV-021).
|
|
15
16
|
*/
|
|
@@ -30,6 +31,6 @@ export function harnessCommand(args, json) {
|
|
|
30
31
|
if (args._[1] === "install") {
|
|
31
32
|
return harnessInstallCommand(args, json);
|
|
32
33
|
}
|
|
33
|
-
return printUsageError(json,
|
|
34
|
+
return printUsageError(json, `usage: claudexor harness ${HARNESS_USAGE_ARGS}`);
|
|
34
35
|
}
|
|
35
36
|
//# sourceMappingURL=harness-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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;QACpC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,qBAAqB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,eAAe,CAAC,IAAI,EAAE,4BAA4B,kBAAkB,EAAE,CAAC,CAAC;AACjF,CAAC"}
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* model/effort freshness gates verified; the opencode pin is a
|
|
12
12
|
* deterministic install target, NOT a verification claim (no recorded
|
|
13
13
|
* fixture yet — see packages/harness-opencode vendor-cli-version.ts).
|
|
14
|
-
* - cursor
|
|
15
|
-
* the HUMAN is the verifier: the complete vendor script is
|
|
16
|
-
* (never piped to a shell), its size and sha256 are
|
|
17
|
-
* the visible PTY the operator is watching — the
|
|
18
|
-
* interactive SSH auth.
|
|
14
|
+
* - cursor and agy have no npm artifact and CANNOT be pinned. Instead of
|
|
15
|
+
* pretending, the HUMAN is the verifier: the complete vendor script is
|
|
16
|
+
* downloaded first (never piped to a shell), its size and sha256 are
|
|
17
|
+
* printed, and it runs in the visible PTY the operator is watching — the
|
|
18
|
+
* same principle as interactive SSH auth.
|
|
19
19
|
* - NOTHING executes without disclosure: the exact command and install
|
|
20
20
|
* destination print first, and execution needs a TTY confirmation or an
|
|
21
21
|
* explicit `--yes` (the macOS flow confirms against this module's own
|
|
@@ -31,24 +31,37 @@
|
|
|
31
31
|
import { spawnSync } from "node:child_process";
|
|
32
32
|
import { existsSync, mkdirSync } from "node:fs";
|
|
33
33
|
import { type ParsedArgs } from "./args.js";
|
|
34
|
-
|
|
34
|
+
import { INSTALLABLE_HARNESSES } from "./harness-command-specs.js";
|
|
35
35
|
export type InstallableHarness = (typeof INSTALLABLE_HARNESSES)[number];
|
|
36
36
|
export declare function isInstallableHarness(value: string): value is InstallableHarness;
|
|
37
37
|
/** Exact npm pins. Each version ALIASES the harness package's vendor-version
|
|
38
38
|
* SSOT (vendor-cli-version.ts there). For claude/codex that is the version
|
|
39
39
|
* this release's freshness gates verified; the opencode pin is a
|
|
40
40
|
* deterministic install target only — no recorded verification fixture
|
|
41
|
-
* vouches for it (its vendor-cli-version.ts discloses this). Cursor
|
|
42
|
-
* absent deliberately:
|
|
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
43
|
* below). */
|
|
44
44
|
export type HarnessInstallVerification = "release_verified" | "deterministic_only" | "human_observed";
|
|
45
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";
|
|
46
58
|
export interface HarnessInstallerDisclosure {
|
|
47
59
|
harness: InstallableHarness;
|
|
48
60
|
command: string;
|
|
49
61
|
installLocation: string;
|
|
50
|
-
/** Exact vendor version the command installs; null
|
|
51
|
-
*
|
|
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. */
|
|
52
65
|
pinnedVersion: string | null;
|
|
53
66
|
/** Evidence behind the install target. Package-registry integrity verifies
|
|
54
67
|
* downloaded bytes for every npm pin, but only release_verified means the
|
|
@@ -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;
|
|
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,oBAAoB,GAAG,gBAAgB,CAAC;AA6B/D,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAC/D;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,8CAA8C,CAAC;AAC3E,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,+CAA+C,CAAC;AAoCpF,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MA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