@verax-ai/body 0.3.0 → 0.4.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/README.md +7 -2
- package/dist/approve-cli.d.ts +22 -1
- package/dist/approve-cli.js +209 -22
- package/dist/auth.d.ts +9 -1
- package/dist/auth.js +12 -2
- package/dist/body-log.d.ts +14 -0
- package/dist/body-log.js +61 -0
- package/dist/cli.d.ts +23 -1
- package/dist/cli.js +227 -94
- package/dist/config.d.ts +26 -0
- package/dist/config.js +47 -0
- package/dist/demo.d.ts +2 -0
- package/dist/demo.js +8 -2
- package/dist/desktop-parent.d.ts +19 -0
- package/dist/desktop-parent.js +44 -0
- package/dist/desktop.d.ts +140 -11
- package/dist/desktop.js +931 -103
- package/dist/doctor.d.ts +2 -0
- package/dist/doctor.js +94 -11
- package/dist/health-extras.d.ts +4 -0
- package/dist/health-extras.js +14 -0
- package/dist/init-local.d.ts +25 -1
- package/dist/init-local.js +151 -54
- package/dist/install.d.ts +745 -0
- package/dist/install.js +5738 -0
- package/dist/keys.d.ts +6 -0
- package/dist/keys.js +43 -20
- package/dist/main.js +11 -1
- package/dist/no-bypass-scan.js +3 -2
- package/dist/reconcile-cli.js +3 -1
- package/dist/server.d.ts +14 -1
- package/dist/server.js +125 -3
- package/dist/tools/audit.d.ts +5 -2
- package/dist/tools/audit.js +12 -2
- package/dist/tools/memory.js +41 -6
- package/dist/tools/message.js +38 -9
- package/dist/unlock.d.ts +5 -2
- package/dist/unlock.js +6 -1
- package/dist/verify-cli.js +135 -15
- package/dist/wiring.js +1 -1
- package/dist/witness.js +154 -24
- package/package.json +7 -3
|
@@ -0,0 +1,745 @@
|
|
|
1
|
+
import { type SpawnSyncReturns } from "node:child_process";
|
|
2
|
+
export declare const EX_ELEVATION = 77;
|
|
3
|
+
export declare const ELEVATION_LINE = "verax install needs an elevated shell (Administrator / root)";
|
|
4
|
+
/** The tarball Node under `/opt/verax-node`, plus the distribution `/usr/bin/node`. Neither is `env node`. */
|
|
5
|
+
export declare function posixRootOwnedCommand(platform: "linux" | "darwin", command: string): string;
|
|
6
|
+
/** Names the administrator-owned copy. A same-user elevated shell is not that copy. */
|
|
7
|
+
export declare function unreadableSentence(dir: string, command?: string): string;
|
|
8
|
+
export declare class SystemToolError extends Error {
|
|
9
|
+
readonly code = 78;
|
|
10
|
+
constructor(message: string);
|
|
11
|
+
}
|
|
12
|
+
/** Basename of a planned or resolved tool, without a Windows `.exe`. */
|
|
13
|
+
export declare function systemToolName(argv0: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Windows directory for system tools. An env value is accepted only when it is
|
|
16
|
+
* `X:\\Windows` and contains no `..`. A value that points elsewhere is refused
|
|
17
|
+
* before any process is started. `exec`, when passed, then applies the same
|
|
18
|
+
* administrator-only DACL check used for node.exe to System32 and each tool,
|
|
19
|
+
* ancestors included.
|
|
20
|
+
*/
|
|
21
|
+
export declare function windowsSystemRoot(env?: NodeJS.ProcessEnv, exec?: ToolExec): string;
|
|
22
|
+
/** One install root, normalised. `..` is refused. The machine comparison is separate. */
|
|
23
|
+
export declare function windowsInstallRoot(raw: string | undefined, fallback: string, label: string): string;
|
|
24
|
+
/** ProgramData and Program Files as the machine records them, not as the shell sets them. */
|
|
25
|
+
export type WindowsMachineRoots = {
|
|
26
|
+
programData: string;
|
|
27
|
+
programFiles: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const WINDOWS_CANONICAL_ROOTS: WindowsMachineRoots;
|
|
30
|
+
/**
|
|
31
|
+
* Use the machine roots. A shell value that differs is named and refused.
|
|
32
|
+
* An unset shell variable is not a redirect. The root and each ancestor must
|
|
33
|
+
* be a real directory, and the path on disk must be the path as given.
|
|
34
|
+
*/
|
|
35
|
+
export declare function adoptWindowsInstallRoots(env: NodeJS.ProcessEnv, machine?: WindowsMachineRoots): WindowsMachineRoots;
|
|
36
|
+
/** HKLM ProgramFilesDir and ProfileList ProgramData, read without expansion. The drive is the drive of SystemRoot. */
|
|
37
|
+
export declare function readWindowsMachineRoots(exec?: ToolExec): WindowsMachineRoots;
|
|
38
|
+
/**
|
|
39
|
+
* Absolute path for a system tool. Windows uses System32 under SystemRoot.
|
|
40
|
+
* Linux walks fixed directories and never consults PATH.
|
|
41
|
+
* macOS uses the fixed table (dscl, launchctl, chown, chmod, id, stat, plutil, lsof).
|
|
42
|
+
* A missing Linux binary falls back to the first candidate so a plan can name
|
|
43
|
+
* the path; spawning still refuses when that file is absent.
|
|
44
|
+
*/
|
|
45
|
+
export declare function systemToolPath(tool: string, platform?: NodeJS.Platform): string;
|
|
46
|
+
/** Absolute paths for every system tool on `platform`. */
|
|
47
|
+
export declare function systemToolTable(platform?: NodeJS.Platform): Record<string, string>;
|
|
48
|
+
export declare function requireSystemTool(tool: string, platform?: NodeJS.Platform): string;
|
|
49
|
+
/** Stderr lines from a generated PowerShell script. A line with this prefix is a failed step even when the process exits 0. */
|
|
50
|
+
export declare const PS_ERROR_MARK = "verax-ps-error:";
|
|
51
|
+
/**
|
|
52
|
+
* Env for system-tool spawns. The caller's PATH is not copied.
|
|
53
|
+
* TEMP/TMP are set only to `tempDir`. The caller's TEMP is a user-writable
|
|
54
|
+
* AppData directory and must not receive install files.
|
|
55
|
+
* On Windows, PSModulePath is only the System32 Windows PowerShell 5.1 module
|
|
56
|
+
* directory. Without it, PowerShell 5.1 puts Documents\WindowsPowerShell\Modules
|
|
57
|
+
* first, and -NoProfile does not change that list.
|
|
58
|
+
*/
|
|
59
|
+
export declare function systemToolEnv(platform?: NodeJS.Platform, tempDir?: string): NodeJS.ProcessEnv;
|
|
60
|
+
export declare function toolArgv(tool: string, args: readonly string[], platform?: NodeJS.Platform): string[];
|
|
61
|
+
type ToolSpawn = (file: string, args: readonly string[], opts: {
|
|
62
|
+
encoding: "utf8";
|
|
63
|
+
windowsHide: true;
|
|
64
|
+
shell: false;
|
|
65
|
+
env: NodeJS.ProcessEnv;
|
|
66
|
+
}) => Pick<SpawnSyncReturns<string>, "status" | "stdout" | "stderr">;
|
|
67
|
+
export declare function nodeTrustMessage(nodePath: string): string;
|
|
68
|
+
/** Account name printed when elevated code is writable by the invoking user. */
|
|
69
|
+
export declare function codeTrustAccount(platform: NodeJS.Platform, env: NodeJS.ProcessEnv): string;
|
|
70
|
+
export declare function elevatedCodeMessage(dir: string, account: string, platform: InstallPlatform, detail?: string): string;
|
|
71
|
+
/** Package directory of the running CLI, each `@verax-ai/*` it loads, and their `node_modules`. */
|
|
72
|
+
export declare function veraxCodeDirectories(entryUrl?: string): string[];
|
|
73
|
+
/**
|
|
74
|
+
* `probe` returns true when that directory can be changed by the invoking user.
|
|
75
|
+
* Without a probe the caller supplies `userWritable` from the same ACL or mode
|
|
76
|
+
* check used for node.exe, ancestors included.
|
|
77
|
+
*/
|
|
78
|
+
export declare function elevatedCodeRefusal(platform: InstallPlatform, dirs: readonly string[], opts: {
|
|
79
|
+
account: string;
|
|
80
|
+
probe?: (dir: string) => boolean;
|
|
81
|
+
userWritable?: (dir: string) => boolean | string;
|
|
82
|
+
}): string | null;
|
|
83
|
+
export type UserTokenSpawn = {
|
|
84
|
+
uid: number;
|
|
85
|
+
gid: number;
|
|
86
|
+
tokenDir: string;
|
|
87
|
+
tokenPath: string;
|
|
88
|
+
token: string;
|
|
89
|
+
};
|
|
90
|
+
/** Same checks as the uid child. Tests call this in place of spawn. */
|
|
91
|
+
export declare function writeAgentTokenFile(tokenDir: string, tokenPath: string, token: string): {
|
|
92
|
+
ok: true;
|
|
93
|
+
} | {
|
|
94
|
+
ok: false;
|
|
95
|
+
error: string;
|
|
96
|
+
};
|
|
97
|
+
export type InstallPlatform = "win32" | "linux" | "darwin";
|
|
98
|
+
export type PlanOpts = {
|
|
99
|
+
port?: number;
|
|
100
|
+
days?: number;
|
|
101
|
+
force?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Test-only. Prefixes the fixed POSIX install roots. Not read from CLI argv.
|
|
104
|
+
* Win32 ignores it.
|
|
105
|
+
*/
|
|
106
|
+
posixRoot?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Machine ProgramData and Program Files. When omitted, the canonical paths
|
|
109
|
+
* are the machine values. A shell value that differs is refused.
|
|
110
|
+
*/
|
|
111
|
+
windowsMachineRoots?: WindowsMachineRoots;
|
|
112
|
+
/** Trusted Node used to run npm and the service. It is not copied. */
|
|
113
|
+
execPath: string;
|
|
114
|
+
bodyVersion: string;
|
|
115
|
+
npmCli: string;
|
|
116
|
+
stateExists: boolean;
|
|
117
|
+
/** `%ProgramData%\\Verax` (or the Linux code/state parents) already exists. */
|
|
118
|
+
veraxRootExists?: boolean;
|
|
119
|
+
/** `install.json` written by a previous verax install. */
|
|
120
|
+
markerExists?: boolean;
|
|
121
|
+
/** Junction, symlink, or other reparse point. Named in the refusal. */
|
|
122
|
+
reparsePath?: string;
|
|
123
|
+
/** Injected `icacls` text for the Node tree. A user write ACE refuses. */
|
|
124
|
+
nodeIcacls?: string;
|
|
125
|
+
userSid?: string;
|
|
126
|
+
/** Linux: uid and mode of the Node file and each parent. Non-root or group/other-writable refuses. */
|
|
127
|
+
nodeModes?: {
|
|
128
|
+
uid: number;
|
|
129
|
+
mode: number;
|
|
130
|
+
}[];
|
|
131
|
+
/**
|
|
132
|
+
* uid and mode of each ancestor of the Linux and macOS install roots.
|
|
133
|
+
* When set, the plan does not lstat those directories. `null` means unreadable.
|
|
134
|
+
*/
|
|
135
|
+
ancestorStat?: (dir: string) => {
|
|
136
|
+
uid: number;
|
|
137
|
+
mode: number;
|
|
138
|
+
symlink?: boolean;
|
|
139
|
+
} | null;
|
|
140
|
+
/** Release-test install from `npm pack` tarballs. Skips the registry and signature audit. */
|
|
141
|
+
fromTarballs?: string;
|
|
142
|
+
tarballFiles?: string[];
|
|
143
|
+
/** Injected icacls text for the tarball directory. A user write ACE refuses. */
|
|
144
|
+
tarballIcacls?: string;
|
|
145
|
+
/**
|
|
146
|
+
* One SDDL per path. A newline-joined blob is not one descriptor.
|
|
147
|
+
* `ancestor` is true only for the tarball directory.
|
|
148
|
+
*/
|
|
149
|
+
tarballSddl?: {
|
|
150
|
+
path: string;
|
|
151
|
+
sddl: string;
|
|
152
|
+
ancestor: boolean;
|
|
153
|
+
}[];
|
|
154
|
+
/** Linux uid/mode of the tarball directory and each tarball. */
|
|
155
|
+
tarballModes?: {
|
|
156
|
+
uid: number;
|
|
157
|
+
mode: number;
|
|
158
|
+
}[];
|
|
159
|
+
/** sha256 of each tarball at trust-check time. npm installs the private-temp copies. */
|
|
160
|
+
tarballDigests?: {
|
|
161
|
+
file: string;
|
|
162
|
+
sha256: string;
|
|
163
|
+
}[];
|
|
164
|
+
linuxState?: {
|
|
165
|
+
exists: boolean;
|
|
166
|
+
symlink: boolean;
|
|
167
|
+
owner: string;
|
|
168
|
+
};
|
|
169
|
+
linuxCode?: {
|
|
170
|
+
exists: boolean;
|
|
171
|
+
symlink: boolean;
|
|
172
|
+
owner: string;
|
|
173
|
+
};
|
|
174
|
+
/** Windows `verax-svc`. Absent means the account is not there yet. */
|
|
175
|
+
winAccount?: {
|
|
176
|
+
exists: boolean;
|
|
177
|
+
createdByUs: boolean;
|
|
178
|
+
};
|
|
179
|
+
/** Linux login `verax`. Absent means the account is not there yet. `createdGroup` is the marker's claim that this install's useradd made the group. */
|
|
180
|
+
linuxAccount?: {
|
|
181
|
+
exists: boolean;
|
|
182
|
+
createdByUs: boolean;
|
|
183
|
+
createdGroup?: boolean;
|
|
184
|
+
};
|
|
185
|
+
/** Owner name of an existing `%ProgramData%\\Verax`. */
|
|
186
|
+
winRootOwner?: string;
|
|
187
|
+
/** icacls text of an existing `%ProgramData%\\Verax`. */
|
|
188
|
+
winRootAcl?: string;
|
|
189
|
+
/** `ProfileImagePath` for the invoking SID. A different `USERPROFILE` is refused. */
|
|
190
|
+
profileImagePath?: string;
|
|
191
|
+
/** Home from `getent` or `dscl`. `VERAX_INVOKING_HOME` must match it. */
|
|
192
|
+
invokingHome?: string;
|
|
193
|
+
/** macOS `_verax` uid/gid chosen from the free 200–400 range. */
|
|
194
|
+
darwinAccount?: {
|
|
195
|
+
uid: number;
|
|
196
|
+
gid: number;
|
|
197
|
+
createUser: boolean;
|
|
198
|
+
createGroup: boolean;
|
|
199
|
+
recordUser: boolean;
|
|
200
|
+
recordGroup: boolean;
|
|
201
|
+
};
|
|
202
|
+
darwinState?: {
|
|
203
|
+
exists: boolean;
|
|
204
|
+
symlink: boolean;
|
|
205
|
+
};
|
|
206
|
+
/** `/Library/Verax` before this install. */
|
|
207
|
+
darwinRoot?: {
|
|
208
|
+
exists: boolean;
|
|
209
|
+
symlink: boolean;
|
|
210
|
+
};
|
|
211
|
+
/** uid and gid of SUDO_USER, already checked against `id` and SUDO_UID/SUDO_GID. */
|
|
212
|
+
invokingIds?: {
|
|
213
|
+
uid: number;
|
|
214
|
+
gid: number;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
export type PlanOp = {
|
|
218
|
+
op: "manifest";
|
|
219
|
+
dir: string;
|
|
220
|
+
} | {
|
|
221
|
+
op: "mkdir";
|
|
222
|
+
path: string;
|
|
223
|
+
mode?: number;
|
|
224
|
+
} | {
|
|
225
|
+
op: "argv";
|
|
226
|
+
argv: string[];
|
|
227
|
+
optional?: boolean;
|
|
228
|
+
rollbackDir?: string;
|
|
229
|
+
stdin?: string;
|
|
230
|
+
env?: NodeJS.ProcessEnv;
|
|
231
|
+
cwd?: string;
|
|
232
|
+
} | {
|
|
233
|
+
op: "write";
|
|
234
|
+
path: string;
|
|
235
|
+
contents: string;
|
|
236
|
+
mode?: number;
|
|
237
|
+
exclusive?: boolean;
|
|
238
|
+
} | {
|
|
239
|
+
op: "lock-root";
|
|
240
|
+
path: string;
|
|
241
|
+
create: boolean;
|
|
242
|
+
} | {
|
|
243
|
+
op: "init";
|
|
244
|
+
stateDir: string;
|
|
245
|
+
port: number;
|
|
246
|
+
days: number;
|
|
247
|
+
force: boolean;
|
|
248
|
+
noOwnerGrant: boolean;
|
|
249
|
+
} | {
|
|
250
|
+
op: "user-token";
|
|
251
|
+
tokenDir: string;
|
|
252
|
+
tokenPath: string;
|
|
253
|
+
uid: number;
|
|
254
|
+
gid: number;
|
|
255
|
+
} | {
|
|
256
|
+
op: "place-token";
|
|
257
|
+
path: string;
|
|
258
|
+
} | {
|
|
259
|
+
op: "remove";
|
|
260
|
+
path: string;
|
|
261
|
+
} | {
|
|
262
|
+
op: "wait-healthz";
|
|
263
|
+
port: number;
|
|
264
|
+
timeoutMs: number;
|
|
265
|
+
nonce: string;
|
|
266
|
+
} | {
|
|
267
|
+
op: "print";
|
|
268
|
+
text: string;
|
|
269
|
+
} | {
|
|
270
|
+
op: "stage-tarballs";
|
|
271
|
+
files: {
|
|
272
|
+
source: string;
|
|
273
|
+
sha256: string;
|
|
274
|
+
dest: string;
|
|
275
|
+
}[];
|
|
276
|
+
} | {
|
|
277
|
+
op: "private-temp";
|
|
278
|
+
path: string;
|
|
279
|
+
/** Win32 DACL after inheritance is removed. POSIX omits this. */
|
|
280
|
+
acl?: readonly string[];
|
|
281
|
+
inheritance?: "removed";
|
|
282
|
+
/** Win32 owner SID, starred for icacls (`*S-1-5-32-544`). */
|
|
283
|
+
owner?: string;
|
|
284
|
+
/** POSIX directory mode. Root creates it. */
|
|
285
|
+
mode?: number;
|
|
286
|
+
};
|
|
287
|
+
export type InstallPlan = {
|
|
288
|
+
ok: false;
|
|
289
|
+
code: number;
|
|
290
|
+
message: string;
|
|
291
|
+
} | {
|
|
292
|
+
ok: true;
|
|
293
|
+
ops: PlanOp[];
|
|
294
|
+
codeDir: string;
|
|
295
|
+
stateDir: string;
|
|
296
|
+
tokenPath: string;
|
|
297
|
+
};
|
|
298
|
+
export type ExecResult = {
|
|
299
|
+
status: number | null;
|
|
300
|
+
stdout?: string;
|
|
301
|
+
stderr?: string;
|
|
302
|
+
};
|
|
303
|
+
export type ToolExec = (argv: string[], stdin?: string, env?: NodeJS.ProcessEnv, cwd?: string) => ExecResult;
|
|
304
|
+
export type InstallIo = {
|
|
305
|
+
stdout: {
|
|
306
|
+
write(s: string): unknown;
|
|
307
|
+
};
|
|
308
|
+
stderr: {
|
|
309
|
+
write(s: string): unknown;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
export type InstallHooks = {
|
|
313
|
+
platform?: NodeJS.Platform;
|
|
314
|
+
env?: NodeJS.ProcessEnv;
|
|
315
|
+
elevated?: () => boolean;
|
|
316
|
+
exec?: ToolExec;
|
|
317
|
+
stateExists?: (dir: string) => boolean;
|
|
318
|
+
layout?: {
|
|
319
|
+
execPath: string;
|
|
320
|
+
bodyVersion: string;
|
|
321
|
+
npmCli: string;
|
|
322
|
+
};
|
|
323
|
+
io?: InstallIo;
|
|
324
|
+
/**
|
|
325
|
+
* Test-only. Relocates `/opt/verax`, `/var/lib/verax`, `/etc/systemd/system`,
|
|
326
|
+
* `/Library/Verax`, `/Library/Application Support/Verax`, and
|
|
327
|
+
* `/Library/LaunchDaemons` under this directory. CLI argv cannot set it.
|
|
328
|
+
*/
|
|
329
|
+
posixRoot?: string;
|
|
330
|
+
/** Test-only. Replaces `copyFileSync` while staging `--from-tarballs` copies. */
|
|
331
|
+
copyFile?: (source: string, dest: string) => void;
|
|
332
|
+
/** Test-only. Caps the post-start /healthz wait. CLI argv cannot set it. */
|
|
333
|
+
healthTimeoutMs?: number;
|
|
334
|
+
/**
|
|
335
|
+
* True when that code directory can be changed by the invoking user.
|
|
336
|
+
* Absent means the install reads the real ACL or mode.
|
|
337
|
+
*/
|
|
338
|
+
codeProbe?: (dir: string) => boolean;
|
|
339
|
+
/**
|
|
340
|
+
* True when that path (the running Node, or an ancestor) can be changed by the invoking user.
|
|
341
|
+
* Absent, together with `codeProbe`, means a test is stubbing the code check and the Node
|
|
342
|
+
* binary is not lstat'd. Absent with no `codeProbe` means the real ACL or mode check.
|
|
343
|
+
*/
|
|
344
|
+
execPathProbe?: (file: string) => boolean;
|
|
345
|
+
/** Defaults to `process.execArgv`. An elevated command refuses a preload flag here. */
|
|
346
|
+
execArgv?: readonly string[];
|
|
347
|
+
/**
|
|
348
|
+
* uid and mode for ancestors of the Linux and macOS install roots.
|
|
349
|
+
* When set, the plan does not lstat them. Absent means lstat.
|
|
350
|
+
*/
|
|
351
|
+
ancestorStat?: (dir: string) => {
|
|
352
|
+
uid: number;
|
|
353
|
+
mode: number;
|
|
354
|
+
symlink?: boolean;
|
|
355
|
+
} | null;
|
|
356
|
+
/** Test-only stand-in for the uid/gid child that writes the POSIX agent token. */
|
|
357
|
+
spawnUserToken?: (spec: UserTokenSpawn) => ExecResult;
|
|
358
|
+
/**
|
|
359
|
+
* Machine ProgramData and Program Files. When omitted, install and uninstall
|
|
360
|
+
* read them from HKLM. A shell value that differs is refused.
|
|
361
|
+
*/
|
|
362
|
+
windowsMachineRoots?: WindowsMachineRoots;
|
|
363
|
+
};
|
|
364
|
+
/** Prefix a fixed POSIX install path. Longest root wins. Unset root returns `fixed`. */
|
|
365
|
+
export declare function relocatePosixPath(fixed: string, posixRoot?: string): string;
|
|
366
|
+
export declare function stateDirFor(platform: NodeJS.Platform | InstallPlatform, env?: NodeJS.ProcessEnv, posixRoot?: string, machine?: WindowsMachineRoots): string;
|
|
367
|
+
export declare function codeDirFor(platform: NodeJS.Platform | InstallPlatform, env?: NodeJS.ProcessEnv, posixRoot?: string, machine?: WindowsMachineRoots): string;
|
|
368
|
+
export declare function windowsAgentTokenPath(env: NodeJS.ProcessEnv, userSid: string, machine?: WindowsMachineRoots): string;
|
|
369
|
+
export declare function npmCliPath(execPath: string, platform: InstallPlatform): string;
|
|
370
|
+
export declare function ancestry(file: string, platform: InstallPlatform): string[];
|
|
371
|
+
export type SddlAce = {
|
|
372
|
+
/** `A` includes object and callback allows (`OA`, `XA`, `ZA`). `D` includes `OD` and `XD`. */
|
|
373
|
+
type: "A" | "D";
|
|
374
|
+
flags: Set<string>;
|
|
375
|
+
rights: string;
|
|
376
|
+
sid: string;
|
|
377
|
+
inheritOnly: boolean;
|
|
378
|
+
};
|
|
379
|
+
/** `icacls` account names are language-specific. Security reads use this SDDL string. */
|
|
380
|
+
export declare function windowsSddlArgv(target: string): string[];
|
|
381
|
+
/**
|
|
382
|
+
* UTF-8 JSON array for the batch reader's stdin. The command line never carries it:
|
|
383
|
+
* a real install tree is far past CreateProcess's 32,767 characters.
|
|
384
|
+
*/
|
|
385
|
+
export declare function windowsSddlBatchStdin(paths: readonly string[]): string;
|
|
386
|
+
/**
|
|
387
|
+
* One PowerShell process reads every path. `paths` is not placed on this argv;
|
|
388
|
+
* the caller passes `windowsSddlBatchStdin(paths)` as stdin. Stdout is one JSON
|
|
389
|
+
* object: `{ "<path>": "<sddl>" | { "error": "<msg>" } }`.
|
|
390
|
+
* PowerShell 5.1 unwraps a one-element JSON array, so the script re-wraps with
|
|
391
|
+
* `| ForEach-Object { $_ }`.
|
|
392
|
+
*/
|
|
393
|
+
export declare function windowsSddlBatchArgv(paths: readonly string[]): string[];
|
|
394
|
+
export type SddlHit = {
|
|
395
|
+
status: number;
|
|
396
|
+
text: string;
|
|
397
|
+
};
|
|
398
|
+
/** One process for every path. A failed process fails every path closed, with the tool text kept for the refusal. */
|
|
399
|
+
export declare function readSddlBatch(exec: ToolExec, paths: readonly string[]): Map<string, SddlHit>;
|
|
400
|
+
export declare function canonicalSid(token: string): string | null;
|
|
401
|
+
/** Owner SID from an SDDL `O:` field. Null when the text is not SDDL. */
|
|
402
|
+
export declare function sddlOwner(text: string): string | null;
|
|
403
|
+
/**
|
|
404
|
+
* DACL ACEs. Inherit-only `(IO)` is flagged and does not apply to the object.
|
|
405
|
+
* `OA` / `XA` / `ZA` are stored as allow; `OD` / `XD` as deny. SACL types are dropped.
|
|
406
|
+
* Any other type fails closed (`null`); the refusal names it.
|
|
407
|
+
*/
|
|
408
|
+
export declare function parseSddlAces(text: string): SddlAce[] | null;
|
|
409
|
+
/**
|
|
410
|
+
* One ACE rights field as a 32-bit mask. Hex is taken as written.
|
|
411
|
+
* Letter rights are SDDL codes, two characters at a time (`DC` is FILE_WRITE_DATA, not icacls delete-child).
|
|
412
|
+
* An unknown code fails closed and is named.
|
|
413
|
+
*/
|
|
414
|
+
export declare function sddlRightsMask(rights: string): {
|
|
415
|
+
mask: number;
|
|
416
|
+
} | {
|
|
417
|
+
unknown: string;
|
|
418
|
+
};
|
|
419
|
+
/** First unknown SDDL right in a parsed DACL. Null when every rights field is known, the text is not SDDL, or an ACE type is unknown. */
|
|
420
|
+
export declare function sddlUnknownRight(text: string): string | null;
|
|
421
|
+
/**
|
|
422
|
+
* True when SDDL lets a principal other than Administrators, SYSTEM, or
|
|
423
|
+
* TrustedInstaller change this object. Text that is not SDDL is untrusted.
|
|
424
|
+
* `NO_ACCESS_CONTROL` is a NULL DACL and grants everyone full control.
|
|
425
|
+
* An empty DACL (`D:` or `D:P` with no ACEs) denies everyone.
|
|
426
|
+
* A DACL body that does not fully parse is untrusted.
|
|
427
|
+
* An ACE type outside allow, deny, and ignored SACL types is an untrusted ACL.
|
|
428
|
+
* The owner keeps implicit WRITE_DAC unless an OWNER RIGHTS ACE limits them.
|
|
429
|
+
* `ancestor: true` counts only replace / re-point rights. `(IO)` does not apply.
|
|
430
|
+
* `svcSid`, when set, is trusted the same way verifyServiceAcl trusts it.
|
|
431
|
+
*/
|
|
432
|
+
export declare function windowsUserCanWrite(text: string, opts?: {
|
|
433
|
+
path?: string;
|
|
434
|
+
userSid?: string;
|
|
435
|
+
ancestor?: boolean;
|
|
436
|
+
svcSid?: string;
|
|
437
|
+
}): boolean;
|
|
438
|
+
/** Symlink or junction resolved. A missing path stays as given so a later ACL or stat check can refuse it. */
|
|
439
|
+
export declare function resolveTrustPath(file: string, platform: InstallPlatform): string;
|
|
440
|
+
/**
|
|
441
|
+
* The target, then each parent. The target itself is judged as the object.
|
|
442
|
+
* When the target is a Windows executable (`node.exe`, a System32 tool, `process.execPath`),
|
|
443
|
+
* its immediate parent is also judged as the object: add-file and add-subdirectory count.
|
|
444
|
+
* Parents above that stay ancestors. A directory target is unchanged: only that
|
|
445
|
+
* directory is the object, and every parent stays an ancestor.
|
|
446
|
+
*/
|
|
447
|
+
export declare function trustTargets(file: string, platform: InstallPlatform): {
|
|
448
|
+
path: string;
|
|
449
|
+
ancestor: boolean;
|
|
450
|
+
}[];
|
|
451
|
+
/**
|
|
452
|
+
* Another user can rename or replace this entry.
|
|
453
|
+
* An ancestor with the sticky bit is kept: only its owner can rename a child (mode 1777, the way `/tmp` works).
|
|
454
|
+
* The entry itself stays refused when it is group- or other-writable, sticky bit or not.
|
|
455
|
+
* A symbolic link is refused either way.
|
|
456
|
+
*/
|
|
457
|
+
export declare function posixOthersCanReplace(st: {
|
|
458
|
+
uid: number;
|
|
459
|
+
mode: number;
|
|
460
|
+
symlink?: boolean;
|
|
461
|
+
}, ancestor: boolean): boolean;
|
|
462
|
+
/** POSIX half of the elevated code check. `read` supplies uid and mode so a test does not lstat the machine. */
|
|
463
|
+
export declare function posixCodeDirectoryDetail(dir: string, platform: InstallPlatform, read: (file: string) => {
|
|
464
|
+
uid: number;
|
|
465
|
+
mode: number;
|
|
466
|
+
symlink?: boolean;
|
|
467
|
+
} | null): string | false;
|
|
468
|
+
/**
|
|
469
|
+
* Directory grant only. `(OI)(CI)` on a directory propagates to children.
|
|
470
|
+
* Never combine this with `/T`: `/inheritance:r /T` strips every child, and `(OI)(CI)`
|
|
471
|
+
* does not apply to a file, so each file is left with an empty DACL.
|
|
472
|
+
* `principal` is `verax-svc` in the plan; execute rewrites it to `*S-1-...`.
|
|
473
|
+
*/
|
|
474
|
+
export declare function windowsDirGrantArgs(dir: string, principal: string, rights: "F" | "RX"): string[];
|
|
475
|
+
/** Children inherit the directory DACL. `/reset` carries no `(OI)` or `(CI)` grant. */
|
|
476
|
+
export declare function windowsResetInheritArgs(dir: string): string[];
|
|
477
|
+
/**
|
|
478
|
+
* One PowerShell snippet for the install script and the win32 test.
|
|
479
|
+
* Normalises holder tokens to sorted unique strings and compares with
|
|
480
|
+
* Compare-Object. Functions emit strings; they do not return collections,
|
|
481
|
+
* so a one-item result is not unrolled into a bare string.
|
|
482
|
+
* `$prev`, `$want`, and `$got` are the raw token lists. Sets `$prevSet`,
|
|
483
|
+
* `$wantSet`, and `$gotSet`. A mismatch prints previous/expected/after/added/missing
|
|
484
|
+
* and throws; added/missing are also printed when the sets match.
|
|
485
|
+
*/
|
|
486
|
+
export declare const LOGON_HOLDER_COMPARE: string;
|
|
487
|
+
/**
|
|
488
|
+
* Secedit holder list as a set of upper-case SIDs.
|
|
489
|
+
* Split on commas, trim, drop one leading `*`, map a name through `nameToSid`,
|
|
490
|
+
* keep an unmapped name upper-cased, de-duplicate. A token that already matches
|
|
491
|
+
* `S-1-` is a SID and is not looked up. The install script's
|
|
492
|
+
* `Normalize-LogonHolders` is this function with NTAccount.Translate as the map.
|
|
493
|
+
*/
|
|
494
|
+
export declare function normalizeLogonHolders(csv: string, nameToSid: Readonly<Record<string, string>>): string[];
|
|
495
|
+
/** Five stderr lines for a holder-set mismatch. `added` is after − expected. */
|
|
496
|
+
export declare function logonHolderMismatchLines(previous: readonly string[], expected: readonly string[], after: readonly string[]): string[];
|
|
497
|
+
/** Terminating errors exit 1. Native calls still need an explicit `$LASTEXITCODE` check. */
|
|
498
|
+
export declare function powerShellScript(body: string): string;
|
|
499
|
+
export declare function successText(platform: InstallPlatform, info: {
|
|
500
|
+
codeDir: string;
|
|
501
|
+
stateDir: string;
|
|
502
|
+
tokenPath: string;
|
|
503
|
+
port: number;
|
|
504
|
+
}): string;
|
|
505
|
+
export declare function planInstall(platform: InstallPlatform, env: NodeJS.ProcessEnv, opts: PlanOpts): InstallPlan;
|
|
506
|
+
/**
|
|
507
|
+
* Fresh env for npm. Nothing is copied from the caller: no HOME, no npm_config_*, no NPM_CONFIG_*.
|
|
508
|
+
* HOME and the Windows profile dirs are the private temp, so ~/.npmrc is never read.
|
|
509
|
+
*/
|
|
510
|
+
export declare function npmSpawnEnv(platform: InstallPlatform, execPath: string, tempDir: string): NodeJS.ProcessEnv;
|
|
511
|
+
/** `resolved` tarball URLs that are not the public npm registry. */
|
|
512
|
+
export declare function registryLockProblems(lockText: string): string[];
|
|
513
|
+
export declare function planUninstall(platform: InstallPlatform, env: NodeJS.ProcessEnv, opts: {
|
|
514
|
+
keepState: boolean;
|
|
515
|
+
removeWinAccount?: boolean;
|
|
516
|
+
removeDarwinUser?: boolean;
|
|
517
|
+
removeDarwinGroup?: boolean;
|
|
518
|
+
/** Linux `verax` login. Set only when the marker says `createdUser`. */
|
|
519
|
+
removeLinuxUser?: boolean;
|
|
520
|
+
/** Linux `verax` group. Set only when the marker says `createdGroup`. */
|
|
521
|
+
removeLinuxGroup?: boolean;
|
|
522
|
+
posixRoot?: string;
|
|
523
|
+
/** Invoking user SID. Windows removes `%ProgramData%\\Verax\\agent-token\\<sid>`. */
|
|
524
|
+
userSid?: string;
|
|
525
|
+
windowsMachineRoots?: WindowsMachineRoots;
|
|
526
|
+
}): InstallPlan;
|
|
527
|
+
export declare function foreignAclPrincipals(text: string, svcSid?: string): string[];
|
|
528
|
+
export type ParsedAce = {
|
|
529
|
+
principal: string;
|
|
530
|
+
rights: "F" | "RX" | "other";
|
|
531
|
+
inheritOnly: boolean;
|
|
532
|
+
};
|
|
533
|
+
/** One SDDL allow/deny ACE. `(IO)` does not apply to the object. */
|
|
534
|
+
export declare function parseIcaclsAce(line: string): ParsedAce | null;
|
|
535
|
+
export declare function parseIcaclsAces(text: string): ParsedAce[];
|
|
536
|
+
/**
|
|
537
|
+
* Code dir: service RX, Administrators F, SYSTEM F, nothing else.
|
|
538
|
+
* State dir: service F, Administrators F, SYSTEM F, nothing else.
|
|
539
|
+
*/
|
|
540
|
+
export declare function verifyServiceAcl(text: string, kind: "code" | "state", opts?: {
|
|
541
|
+
dir?: string;
|
|
542
|
+
svcSid?: string;
|
|
543
|
+
file?: string;
|
|
544
|
+
}): {
|
|
545
|
+
ok: true;
|
|
546
|
+
aces: ParsedAce[];
|
|
547
|
+
} | {
|
|
548
|
+
ok: false;
|
|
549
|
+
aces: ParsedAce[];
|
|
550
|
+
detail: string;
|
|
551
|
+
};
|
|
552
|
+
export declare function manifestMismatches(manifest: string, hashOf: (rel: string) => string | null): string[];
|
|
553
|
+
export type BoundaryCheck = {
|
|
554
|
+
id: string;
|
|
555
|
+
level: "ok" | "fail";
|
|
556
|
+
detail: string;
|
|
557
|
+
};
|
|
558
|
+
export declare function installedBoundaryChecks(input: {
|
|
559
|
+
codeDir: string;
|
|
560
|
+
stateDir: string;
|
|
561
|
+
manifest: string | null;
|
|
562
|
+
hashOf: (rel: string) => string | null;
|
|
563
|
+
aclText?: string;
|
|
564
|
+
/** Windows icacls of the code directory. Same verifier as the state ACL, with svc RX. */
|
|
565
|
+
codeAclText?: string;
|
|
566
|
+
/** icacls of files inside the state or code tree. Inherited ACEs count. An empty DACL fails, naming the file. */
|
|
567
|
+
fileAcls?: {
|
|
568
|
+
path: string;
|
|
569
|
+
text: string;
|
|
570
|
+
kind: "code" | "state";
|
|
571
|
+
}[];
|
|
572
|
+
/** Service SID, so a read-back ACE named `*S-1-...` matches verax-svc. */
|
|
573
|
+
svcSid?: string;
|
|
574
|
+
mode?: number;
|
|
575
|
+
owner?: string;
|
|
576
|
+
/** Group name of the state directory. macOS expects `_verax`. */
|
|
577
|
+
ownerGroup?: string;
|
|
578
|
+
codeOwner?: string;
|
|
579
|
+
codeMode?: number;
|
|
580
|
+
/** Windows owner names for the state and code directories. */
|
|
581
|
+
winOwners?: {
|
|
582
|
+
state?: string;
|
|
583
|
+
code?: string;
|
|
584
|
+
};
|
|
585
|
+
/** icacls of `%ProgramData%\\Verax`. A Users or CREATOR OWNER write ACE fails. */
|
|
586
|
+
rootAclText?: string;
|
|
587
|
+
rootDir?: string;
|
|
588
|
+
markerPresent?: boolean;
|
|
589
|
+
/** `install.json` `source`. `tarballs` is release testing, not the registry. */
|
|
590
|
+
installSource?: string;
|
|
591
|
+
autostart: boolean;
|
|
592
|
+
}): BoundaryCheck[];
|
|
593
|
+
export declare function directoryAccess(dir: string): "ok" | "missing" | "unreadable";
|
|
594
|
+
export declare function defaultElevated(platform?: NodeJS.Platform): boolean;
|
|
595
|
+
export declare function defaultExec(argv: string[], stdin?: string, env?: NodeJS.ProcessEnv, cwd?: string): ExecResult;
|
|
596
|
+
export declare function discoverLayout(execPath?: string, platform?: NodeJS.Platform): {
|
|
597
|
+
execPath: string;
|
|
598
|
+
bodyVersion: string;
|
|
599
|
+
npmCli: string;
|
|
600
|
+
} | {
|
|
601
|
+
error: string;
|
|
602
|
+
};
|
|
603
|
+
/**
|
|
604
|
+
* Ancestors created along the way are 0755. Only `target` receives `mode`.
|
|
605
|
+
* An existing real directory is kept and receives `mode`. A symlink or a file is EEXIST:
|
|
606
|
+
* this run must not follow a link into a directory it did not create.
|
|
607
|
+
*/
|
|
608
|
+
/**
|
|
609
|
+
* Create one directory. By default an existing target is EEXIST: the installer relies on that to
|
|
610
|
+
* refuse a directory someone planted between its check and this call. `existingOk` (init --force)
|
|
611
|
+
* keeps an existing real directory that this process's user owns.
|
|
612
|
+
*/
|
|
613
|
+
export declare function mkdirLeaf(target: string, mode: number, opts?: {
|
|
614
|
+
existingOk?: boolean;
|
|
615
|
+
}): void;
|
|
616
|
+
/** True when the body answered /healthz with this install's nonce. A bare 200 is not the service. */
|
|
617
|
+
export declare function healthzProvesService(body: string, nonce: string): boolean;
|
|
618
|
+
/** Bind and release. False when something is already listening. */
|
|
619
|
+
export declare function loopbackPortFree(port: number): Promise<boolean>;
|
|
620
|
+
export declare function serviceHealthIsNonce(port: number, nonce: string, timeoutMs?: number): Promise<boolean>;
|
|
621
|
+
/**
|
|
622
|
+
* Enforcing only, and only before install creates anything.
|
|
623
|
+
* Permissive and Disabled are not a check. A missing getenforce still reads the kernel flag.
|
|
624
|
+
* Returns the refusal line, or null when the Node label may start a service.
|
|
625
|
+
*/
|
|
626
|
+
export declare function linuxSelinuxNodeRefusal(exec: (argv: string[]) => ExecResult, nodePath: string): string | null;
|
|
627
|
+
/** Linux doctor line: the SELinux mode, and when enforcing the service domain. `init_t` is a warning. */
|
|
628
|
+
export declare function linuxSelinuxCheck(exec?: (argv: string[]) => ExecResult): {
|
|
629
|
+
id: string;
|
|
630
|
+
level: "ok" | "warn";
|
|
631
|
+
detail: string;
|
|
632
|
+
};
|
|
633
|
+
/**
|
|
634
|
+
* Linux doctor line for the Node binary this process runs.
|
|
635
|
+
* Enforcing prints the type and warns when it is not `bin_t` or `usr_t`.
|
|
636
|
+
* Any other mode is not a check.
|
|
637
|
+
*/
|
|
638
|
+
export declare function linuxNodeLabelCheck(exec?: (argv: string[]) => ExecResult, nodePath?: string): {
|
|
639
|
+
id: string;
|
|
640
|
+
level: "ok" | "warn";
|
|
641
|
+
detail: string;
|
|
642
|
+
} | null;
|
|
643
|
+
/** Check-time sha256. Sharing violations (antivirus) retry like the later copy. */
|
|
644
|
+
export declare function hashFileWithRetry(file: string, read: (file: string) => Buffer | string, io: {
|
|
645
|
+
stderr: {
|
|
646
|
+
write: (chunk: string) => void;
|
|
647
|
+
};
|
|
648
|
+
}, pauseMs?: number): {
|
|
649
|
+
ok: true;
|
|
650
|
+
sha256: string;
|
|
651
|
+
} | {
|
|
652
|
+
ok: false;
|
|
653
|
+
error: string;
|
|
654
|
+
};
|
|
655
|
+
/** Copy each trusted tarball into the private temp. Retry sharing violations. The copy's sha256 must match the trust-check hash. */
|
|
656
|
+
export declare function stageTarballCopies(files: readonly {
|
|
657
|
+
source: string;
|
|
658
|
+
sha256: string;
|
|
659
|
+
dest: string;
|
|
660
|
+
}[], copyFile: (source: string, dest: string) => void, io: {
|
|
661
|
+
stderr: {
|
|
662
|
+
write: (chunk: string) => void;
|
|
663
|
+
};
|
|
664
|
+
}, pauseMs?: number): {
|
|
665
|
+
ok: true;
|
|
666
|
+
} | {
|
|
667
|
+
ok: false;
|
|
668
|
+
error: string;
|
|
669
|
+
};
|
|
670
|
+
/** Files whose DACL must match the directory grant. Missing files are skipped by the caller. */
|
|
671
|
+
export declare function serviceAclFiles(root: string, kind: "code" | "state"): string[];
|
|
672
|
+
/** Existing token parent: real directory the agent cannot steal, or a refusal sentence. */
|
|
673
|
+
export declare function tokenParentRefusal(facts: {
|
|
674
|
+
dir: string;
|
|
675
|
+
symlink: boolean;
|
|
676
|
+
directory: boolean;
|
|
677
|
+
reparse: boolean;
|
|
678
|
+
platform: NodeJS.Platform;
|
|
679
|
+
uid: number;
|
|
680
|
+
invokingUid?: number;
|
|
681
|
+
ownerSid?: string;
|
|
682
|
+
invokingSid?: string;
|
|
683
|
+
}): string | null;
|
|
684
|
+
/**
|
|
685
|
+
* By-path chown and chmod. `ensureTokenParent` does not run these.
|
|
686
|
+
* It opens the directory and changes that descriptor.
|
|
687
|
+
*/
|
|
688
|
+
export declare function rootOwnedTokenParentArgv(dir: string, invokingUid: number, platform: NodeJS.Platform): string[][];
|
|
689
|
+
/** One invoking SID and one owner lookup per path for this install or init run. */
|
|
690
|
+
export declare function beginWinOwnerRun(): void;
|
|
691
|
+
export declare function endWinOwnerRun(): void;
|
|
692
|
+
/** Owner SID of an existing directory, and the SID of this process. */
|
|
693
|
+
export declare function windowsDirectorySids(dir: string, exec?: (argv: string[]) => ExecResult): {
|
|
694
|
+
ownerSid: string | undefined;
|
|
695
|
+
invokingSid: string | undefined;
|
|
696
|
+
};
|
|
697
|
+
/**
|
|
698
|
+
* Create a missing token parent with recursive mkdir.
|
|
699
|
+
* An existing directory must be a real directory, not a symlink or reparse point,
|
|
700
|
+
* owned by the invoking user, Administrators, SYSTEM, or root. A root-owned
|
|
701
|
+
* POSIX directory is given to the invoking uid and mode 0700 through the
|
|
702
|
+
* directory descriptor, after the dev/ino is checked against the lstat.
|
|
703
|
+
* `beforeChange` runs after that lstat and the owner check, before the descriptor
|
|
704
|
+
* is opened. Tests use it to swap the directory.
|
|
705
|
+
*/
|
|
706
|
+
export declare function ensureTokenParent(dir: string, env?: NodeJS.ProcessEnv, exec?: ToolExec, beforeChange?: () => void): void;
|
|
707
|
+
/** Owner + Administrators + SYSTEM. Throws when whoami or icacls fails. */
|
|
708
|
+
/**
|
|
709
|
+
* Owner, Administrators and SYSTEM only. A directory that already holds files needs `directory`:
|
|
710
|
+
* the grants then carry `(OI)(CI)`, so its children inherit them. Without it `/inheritance:r`
|
|
711
|
+
* leaves every existing child with an empty DACL.
|
|
712
|
+
*/
|
|
713
|
+
export declare function restrictToOwnerWin32(target: string, spawn?: ToolSpawn, directory?: boolean): void;
|
|
714
|
+
export declare function orderTarballs(files: readonly string[]): string[];
|
|
715
|
+
/** The SID `whoami /user` names for this process. */
|
|
716
|
+
export declare function windowsInvokingSid(exec?: (argv: string[]) => ExecResult): string | undefined;
|
|
717
|
+
/**
|
|
718
|
+
* Code which already ran can hide itself: a preload can clear `NODE_OPTIONS` and
|
|
719
|
+
* `execArgv` before this function reads them. This catches only what is still set.
|
|
720
|
+
*/
|
|
721
|
+
export declare function elevatedPreloadRefusal(env: NodeJS.ProcessEnv, execArgv: readonly string[]): string | null;
|
|
722
|
+
export type NodeTrustProbe = {
|
|
723
|
+
execPath?: string;
|
|
724
|
+
execPathProbe?: (file: string) => boolean;
|
|
725
|
+
execArgv?: readonly string[];
|
|
726
|
+
};
|
|
727
|
+
export declare function refuseWritableCode(platform: NodeJS.Platform, env: NodeJS.ProcessEnv, exec: ToolExec, probe?: (dir: string) => boolean, node?: NodeTrustProbe): string | null;
|
|
728
|
+
/** Elevated approve uses the process exec. Install and uninstall pass their own. */
|
|
729
|
+
export declare function elevatedCommandCodeRefusal(platform: NodeJS.Platform, env: NodeJS.ProcessEnv, probe?: (dir: string) => boolean, node?: NodeTrustProbe): string | null;
|
|
730
|
+
/** Elevated approve opens a state directory only when the invoking user cannot change it. */
|
|
731
|
+
export declare function elevatedStateDirRefusal(dir: string, platform: NodeJS.Platform, env: NodeJS.ProcessEnv, probe?: (dir: string) => boolean): string | null;
|
|
732
|
+
export declare function markCliCodeCheckPassed(): void;
|
|
733
|
+
export declare function clearCliCodeCheckPassed(): void;
|
|
734
|
+
export declare function cliCodeCheckPassedAlready(): boolean;
|
|
735
|
+
/**
|
|
736
|
+
* The ancestor rule the installer applies to ProgramData: a non-administrator
|
|
737
|
+
* who can replace or re-point an ancestor is a refusal. A path whose ACL
|
|
738
|
+
* cannot be read is a refusal too.
|
|
739
|
+
*/
|
|
740
|
+
export declare function windowsProgramDataRefusal(env: NodeJS.ProcessEnv, exec?: ToolExec, machine?: WindowsMachineRoots): string | null;
|
|
741
|
+
export declare function runInstall(argv: readonly string[], hooks?: InstallHooks): Promise<number>;
|
|
742
|
+
export declare function runUninstall(argv: readonly string[], hooks?: InstallHooks): Promise<number>;
|
|
743
|
+
export declare function liveInstalledChecks(platform?: NodeJS.Platform, env?: NodeJS.ProcessEnv, exec?: ToolExec): BoundaryCheck[];
|
|
744
|
+
export declare function doctorStateTarget(env: NodeJS.ProcessEnv, platform?: NodeJS.Platform): string | null;
|
|
745
|
+
export {};
|