@indigoai-us/hq-cli 5.345.215-beta.0 → 5.345.217

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 (241) hide show
  1. package/CHANGELOG.md +206 -1
  2. package/README.md +45 -0
  3. package/assets/scaffold/core/scripts/hq-delegate-verify.sh +5 -2
  4. package/assets/scaffold/core/scripts/lib/epochrealtime.sh +30 -0
  5. package/assets/scaffold/core/scripts/lib/work-mesh-enqueue.sh +12 -5
  6. package/dist/command-catalog.generated.d.ts +105 -10
  7. package/dist/command-catalog.generated.js +127 -10
  8. package/dist/command-help.js +3 -1
  9. package/dist/command-registration-plan.d.ts +6 -0
  10. package/dist/command-registration-plan.js +1 -0
  11. package/dist/commands/auth.d.ts +1 -1
  12. package/dist/commands/auth.js +11 -52
  13. package/dist/commands/bot.js +75 -10
  14. package/dist/commands/capacity.d.ts +4 -1
  15. package/dist/commands/capacity.js +46 -10
  16. package/dist/commands/cloud-demote.d.ts +19 -4
  17. package/dist/commands/cloud-demote.js +85 -12
  18. package/dist/commands/cloud-provision.d.ts +5 -1
  19. package/dist/commands/cloud-provision.js +6 -2
  20. package/dist/commands/cloud.d.ts +36 -0
  21. package/dist/commands/cloud.js +110 -27
  22. package/dist/commands/core-delegate-w1b.js +15 -1
  23. package/dist/commands/core-policy.js +67 -8
  24. package/dist/commands/core.js +1 -0
  25. package/dist/commands/daemon.js +9 -1
  26. package/dist/commands/dm.js +7 -0
  27. package/dist/commands/doctor-usage.d.ts +8 -0
  28. package/dist/commands/doctor-usage.js +20 -0
  29. package/dist/commands/doctor.js +7 -1
  30. package/dist/commands/env.d.ts +18 -0
  31. package/dist/commands/env.js +82 -0
  32. package/dist/commands/files-browse.d.ts +11 -4
  33. package/dist/commands/files-browse.js +21 -4
  34. package/dist/commands/files.d.ts +1 -1
  35. package/dist/commands/files.js +25 -11
  36. package/dist/commands/install-global.js +2 -2
  37. package/dist/commands/integrations-auth-rules.d.ts +27 -0
  38. package/dist/commands/integrations-auth-rules.js +79 -0
  39. package/dist/commands/integrations-import.js +124 -12
  40. package/dist/commands/lanes.js +102 -26
  41. package/dist/commands/logout.d.ts +7 -0
  42. package/dist/commands/logout.js +41 -34
  43. package/dist/commands/mesh.d.ts +2 -0
  44. package/dist/commands/mesh.js +60 -35
  45. package/dist/commands/sources.d.ts +8 -2
  46. package/dist/commands/sources.js +65 -9
  47. package/dist/commands/sync-held.js +5 -2
  48. package/dist/commands/whoami.js +26 -1
  49. package/dist/data/command-states.json +15 -0
  50. package/dist/index.js +52 -4
  51. package/dist/lazy-commands.js +5 -6
  52. package/dist/lib/anywhere-person-setting.d.ts +2 -0
  53. package/dist/lib/anywhere-person-setting.js +6 -3
  54. package/dist/lib/billing/usage-card.d.ts +25 -4
  55. package/dist/lib/billing/usage-card.js +76 -9
  56. package/dist/lib/billing/usage-cost.d.ts +3 -3
  57. package/dist/lib/billing/usage-cost.js +35 -13
  58. package/dist/lib/billing/usage-only.js +4 -2
  59. package/dist/lib/billing/usage-rate-card.d.ts +2 -2
  60. package/dist/lib/billing/usage-rate-card.js +3 -0
  61. package/dist/lib/bot/fleet-cron.d.ts +8 -0
  62. package/dist/lib/bot/fleet-cron.js +126 -7
  63. package/dist/lib/bot/fleet-daemon.d.ts +46 -0
  64. package/dist/lib/bot/fleet-daemon.js +99 -1
  65. package/dist/lib/bot/inflight.d.ts +9 -0
  66. package/dist/lib/bot/inflight.js +10 -0
  67. package/dist/lib/bot/jobs/hot-signal-sync.js +12 -1
  68. package/dist/lib/bot/probe.js +7 -1
  69. package/dist/lib/bot/run.js +20 -1
  70. package/dist/lib/bot/runtime/codex.js +1 -1
  71. package/dist/lib/bot/runtime/grok-acp.d.ts +6 -1
  72. package/dist/lib/bot/runtime/grok-acp.js +32 -14
  73. package/dist/lib/bot/runtime/grok.js +1 -1
  74. package/dist/lib/bot/runtime/index.js +19 -9
  75. package/dist/lib/bot/runtime/messages-stream.js +2 -2
  76. package/dist/lib/bot/runtime/types.d.ts +15 -0
  77. package/dist/lib/bot/runtime/types.js +9 -0
  78. package/dist/lib/bot/runtime-failure.d.ts +23 -0
  79. package/dist/lib/bot/runtime-failure.js +43 -1
  80. package/dist/lib/capacity/accounts.d.ts +8 -0
  81. package/dist/lib/capacity/accounts.js +19 -0
  82. package/dist/lib/capacity/available.d.ts +154 -0
  83. package/dist/lib/capacity/available.js +905 -0
  84. package/dist/lib/capacity/codex-availability.d.ts +14 -1
  85. package/dist/lib/capacity/codex-availability.js +26 -1
  86. package/dist/lib/capacity/collectors/claude-oauth.d.ts +29 -2
  87. package/dist/lib/capacity/collectors/claude-oauth.js +104 -7
  88. package/dist/lib/capacity/collectors/codex.js +10 -7
  89. package/dist/lib/capacity/ledger.d.ts +37 -1
  90. package/dist/lib/capacity/ledger.js +207 -30
  91. package/dist/lib/capacity/project.d.ts +26 -0
  92. package/dist/lib/capacity/project.js +137 -8
  93. package/dist/lib/capacity/refusal-rows.d.ts +31 -0
  94. package/dist/lib/capacity/refusal-rows.js +61 -0
  95. package/dist/lib/capacity/refusal.d.ts +53 -2
  96. package/dist/lib/capacity/refusal.js +284 -65
  97. package/dist/lib/capacity/route.js +46 -11
  98. package/dist/lib/capacity/widget.d.ts +12 -1
  99. package/dist/lib/capacity/widget.js +91 -3
  100. package/dist/lib/daemon/flag-monitor.d.ts +8 -0
  101. package/dist/lib/daemon/flag-monitor.js +17 -6
  102. package/dist/lib/daemon/flag.d.ts +65 -1
  103. package/dist/lib/daemon/flag.js +190 -40
  104. package/dist/lib/daemon/ops/policy.js +62 -5
  105. package/dist/lib/daemon/paths.d.ts +72 -2
  106. package/dist/lib/daemon/paths.js +154 -3
  107. package/dist/lib/daemon/resolver.d.ts +2 -0
  108. package/dist/lib/daemon/resolver.js +3 -0
  109. package/dist/lib/daemon/run.d.ts +9 -0
  110. package/dist/lib/daemon/run.js +79 -21
  111. package/dist/lib/daemon/selfcheck.d.ts +22 -0
  112. package/dist/lib/daemon/selfcheck.js +40 -1
  113. package/dist/lib/daemon/server.d.ts +5 -1
  114. package/dist/lib/daemon/server.js +17 -23
  115. package/dist/lib/daemon/state-file-switch.d.ts +57 -0
  116. package/dist/lib/daemon/state-file-switch.js +88 -0
  117. package/dist/lib/daemon/state-file.d.ts +198 -0
  118. package/dist/lib/daemon/state-file.js +419 -0
  119. package/dist/lib/daemon/tcc-eperm.d.ts +153 -0
  120. package/dist/lib/daemon/tcc-eperm.js +310 -0
  121. package/dist/lib/daemon/timed-flag-monitors.d.ts +47 -0
  122. package/dist/lib/daemon/timed-flag-monitors.js +75 -0
  123. package/dist/lib/delivery/admission.d.ts +86 -0
  124. package/dist/lib/delivery/admission.js +148 -0
  125. package/dist/lib/delivery/artifacts.d.ts +7 -1
  126. package/dist/lib/delivery/artifacts.js +29 -10
  127. package/dist/lib/delivery/attempt-id.d.ts +13 -0
  128. package/dist/lib/delivery/attempt-id.js +16 -0
  129. package/dist/lib/delivery/disposable-target.d.ts +42 -0
  130. package/dist/lib/delivery/disposable-target.js +111 -0
  131. package/dist/lib/delivery/effects.d.ts +136 -0
  132. package/dist/lib/delivery/effects.js +541 -0
  133. package/dist/lib/delivery/enrollment.d.ts +21 -17
  134. package/dist/lib/delivery/enrollment.js +83 -5
  135. package/dist/lib/delivery/escalations.d.ts +51 -0
  136. package/dist/lib/delivery/escalations.js +60 -0
  137. package/dist/lib/delivery/lease.d.ts +80 -0
  138. package/dist/lib/delivery/lease.js +134 -0
  139. package/dist/lib/delivery/migrations.d.ts +120 -4
  140. package/dist/lib/delivery/migrations.js +215 -15
  141. package/dist/lib/delivery/mqtt.d.ts +2 -0
  142. package/dist/lib/delivery/mqtt.js +7 -0
  143. package/dist/lib/delivery/reconciler.d.ts +65 -1
  144. package/dist/lib/delivery/reconciler.js +224 -13
  145. package/dist/lib/delivery/rpc/client.d.ts +22 -0
  146. package/dist/lib/delivery/rpc/client.js +159 -0
  147. package/dist/lib/delivery/rpc/port.d.ts +40 -0
  148. package/dist/lib/delivery/rpc/port.js +16 -0
  149. package/dist/lib/delivery/rpc/server.d.ts +30 -0
  150. package/dist/lib/delivery/rpc/server.js +205 -0
  151. package/dist/lib/delivery/rpc/wire.d.ts +85 -0
  152. package/dist/lib/delivery/rpc/wire.js +143 -0
  153. package/dist/lib/delivery/store.d.ts +2 -0
  154. package/dist/lib/delivery/store.js +4 -0
  155. package/dist/lib/delivery/windows-service-install.d.ts +262 -0
  156. package/dist/lib/delivery/windows-service-install.js +892 -0
  157. package/dist/lib/delivery/workers/macos.d.ts +16 -1
  158. package/dist/lib/delivery/workers/macos.js +54 -12
  159. package/dist/lib/delivery/workers/windows-service-live.d.ts +121 -0
  160. package/dist/lib/delivery/workers/windows-service-live.js +711 -0
  161. package/dist/lib/delivery/workers/windows-service-runner.d.ts +33 -0
  162. package/dist/lib/delivery/workers/windows-service-runner.js +82 -0
  163. package/dist/lib/delivery/workers/windows-service.d.ts +140 -0
  164. package/dist/lib/delivery/workers/windows-service.js +584 -0
  165. package/dist/lib/delivery/workers/windows.d.ts +32 -22
  166. package/dist/lib/delivery/workers/windows.js +50 -64
  167. package/dist/lib/doctor/checks/host-core.d.ts +50 -0
  168. package/dist/lib/doctor/checks/host-core.js +269 -0
  169. package/dist/lib/doctor/checks/replay-recorder.d.ts +39 -0
  170. package/dist/lib/doctor/checks/replay-recorder.js +261 -0
  171. package/dist/lib/doctor/registry.js +4 -0
  172. package/dist/lib/environment/profile.d.ts +239 -0
  173. package/dist/lib/environment/profile.js +251 -0
  174. package/dist/lib/hook-engine/reconcile.js +39 -13
  175. package/dist/lib/hook-engine/registration.d.ts +9 -0
  176. package/dist/lib/hook-engine/registration.js +19 -0
  177. package/dist/lib/hot-channels/adapters/meetings.d.ts +15 -0
  178. package/dist/lib/hot-channels/adapters/meetings.js +36 -3
  179. package/dist/lib/hot-channels/adapters/slack.d.ts +21 -5
  180. package/dist/lib/hot-channels/adapters/slack.js +64 -21
  181. package/dist/lib/hot-channels/alert.d.ts +2 -0
  182. package/dist/lib/hot-channels/alert.js +8 -1
  183. package/dist/lib/hot-channels/contract.d.ts +12 -0
  184. package/dist/lib/hot-channels/contract.js +7 -0
  185. package/dist/lib/hot-channels/loop.js +1 -0
  186. package/dist/lib/hot-channels/run.d.ts +6 -0
  187. package/dist/lib/hot-channels/run.js +4 -0
  188. package/dist/lib/hot-channels/signals-pass.d.ts +74 -1
  189. package/dist/lib/hot-channels/signals-pass.js +82 -41
  190. package/dist/lib/hot-channels/signals-redo.js +10 -2
  191. package/dist/lib/install/claude-targets.d.ts +12 -1
  192. package/dist/lib/install/claude-targets.js +57 -5
  193. package/dist/lib/install/codex-targets.d.ts +2 -2
  194. package/dist/lib/install/codex-targets.js +36 -6
  195. package/dist/lib/install/hook-target.d.ts +3 -0
  196. package/dist/lib/install/hook-target.js +11 -0
  197. package/dist/lib/lanes/canonical-host.d.ts +35 -0
  198. package/dist/lib/lanes/canonical-host.js +65 -0
  199. package/dist/lib/lanes/host-capacity.d.ts +30 -0
  200. package/dist/lib/lanes/host-capacity.js +29 -3
  201. package/dist/lib/lanes/watcher.js +35 -0
  202. package/dist/lib/mesh/live/daemon/run.d.ts +2 -0
  203. package/dist/lib/mesh/live/daemon/run.js +5 -2
  204. package/dist/lib/mesh/live/flush.d.ts +5 -1
  205. package/dist/lib/mesh/live/flush.js +12 -6
  206. package/dist/lib/mesh/live/reporting-privacy.d.ts +32 -0
  207. package/dist/lib/mesh/live/reporting-privacy.js +56 -1
  208. package/dist/lib/mesh/live/spool.d.ts +7 -0
  209. package/dist/lib/mesh/live/spool.js +25 -0
  210. package/dist/lib/person-setting-cache.d.ts +38 -0
  211. package/dist/lib/person-setting-cache.js +98 -0
  212. package/dist/lib/safe-store.d.ts +245 -0
  213. package/dist/lib/safe-store.js +777 -0
  214. package/dist/lib/signals/engine.d.ts +29 -2
  215. package/dist/lib/signals/engine.js +103 -4
  216. package/dist/lib/signals/reply.js +73 -18
  217. package/dist/lib/signals/steps/adapters.js +7 -2
  218. package/dist/lib/signals/steps/extract.d.ts +13 -0
  219. package/dist/lib/signals/steps/extract.js +122 -6
  220. package/dist/main.js +46 -3
  221. package/dist/schemas/hq-available-ai.v1.schema.json +76 -0
  222. package/dist/schemas/hq-environment-profile.v1.schema.json +438 -0
  223. package/dist/utils/auth-expiry.d.ts +8 -0
  224. package/dist/utils/auth-expiry.js +53 -0
  225. package/dist/utils/catalog-runtime-paths.d.ts +34 -0
  226. package/dist/utils/catalog-runtime-paths.js +53 -0
  227. package/dist/utils/cli-telemetry.d.ts +21 -0
  228. package/dist/utils/cli-telemetry.js +34 -0
  229. package/dist/utils/command-usage.d.ts +275 -0
  230. package/dist/utils/command-usage.js +797 -0
  231. package/dist/utils/files-browse-acl.js +1 -1
  232. package/dist/utils/hook-trust.d.ts +7 -0
  233. package/dist/utils/hook-trust.js +31 -4
  234. package/dist/utils/host-registration.d.ts +126 -0
  235. package/dist/utils/host-registration.js +378 -0
  236. package/dist/utils/resident-package-preload.js +2 -0
  237. package/package.json +10 -8
  238. package/scripts/bench-core.mjs +1096 -0
  239. package/scripts/check-function-manifest.mjs +702 -0
  240. package/dist/lib/delivery/workers/windows-boundary.d.ts +0 -453
  241. package/dist/lib/delivery/workers/windows-boundary.js +0 -693
@@ -0,0 +1,262 @@
1
+ import { type ServiceManifest } from "./workers/windows-service-runner.js";
2
+ export interface UnsignedAcceptance {
3
+ /** The one file this acceptance covers. It has no effect on a pin with any other sha256. */
4
+ sha256: string;
5
+ /** The only service name and root it may be installed under. */
6
+ service: string;
7
+ root: string;
8
+ /** The decision, recorded in the manifest and printed by the dry run. */
9
+ decision: string;
10
+ }
11
+ export interface WrapperPin {
12
+ file?: string;
13
+ sha256: string;
14
+ /** Authenticode signer subject. Empty refuses install unless unsignedAccepted covers this exact file. */
15
+ signer: string;
16
+ unsignedAccepted?: UnsignedAcceptance;
17
+ }
18
+ /**
19
+ * The approved service wrapper, pinned in the repo (review 040).
20
+ *
21
+ * sha256: WinSW-x64.exe v2.12.0, 18,243,033 bytes.
22
+ *
23
+ * signer: empty. The file has no Authenticode signature (its PE security
24
+ * directory is empty; Get-AuthenticodeSignature on Beaker reports NotSigned),
25
+ * so there is no subject to pin.
26
+ *
27
+ * unsignedAccepted: owner decision 2026-11-10, "Hash-only, Beaker test only".
28
+ * This one sha256 may be installed unsigned, for the pilot service and root
29
+ * only, and only when the operator passes --pilot-unsigned-wrapper. The hash
30
+ * check stays. It is not approved for any customer or production machine and
31
+ * must not be copied to another pin.
32
+ */
33
+ export declare const WRAPPER_PIN: WrapperPin;
34
+ export declare const PILOT_UNSIGNED_FLAG = "--pilot-unsigned-wrapper";
35
+ export interface PinUse {
36
+ service: string;
37
+ root: string;
38
+ /** The operator passed --pilot-unsigned-wrapper. */
39
+ pilotUnsignedWrapper?: boolean;
40
+ }
41
+ /**
42
+ * Why a pin cannot be used, or null. The sha256 is always required. The
43
+ * signer subject is required too, except for the one file marked accepted
44
+ * unsigned, and then only for the pilot names with the explicit flag.
45
+ */
46
+ export declare function pinProblem(pin: WrapperPin, use?: PinUse): string | null;
47
+ /**
48
+ * sha256 of the runner.mjs built next to this installer. The build script
49
+ * (scripts/windows/build-us006-service.mjs) builds runner.mjs first and
50
+ * compiles its hash in here. Run from source it is empty, and install refuses.
51
+ */
52
+ export declare const BUNDLED_RUNNER_SHA256: string;
53
+ /**
54
+ * sha256 of the reviewed job helper source. The .NET Framework csc.exe does
55
+ * not build deterministically, so the source, not the exe, is pinned; the
56
+ * built exe's hash is recorded in the manifest and checked on every launch.
57
+ */
58
+ export declare const HELPER_SOURCE_SHA256 = "b61e7ab7148b90e172086621cb5271099788fdb774b89dce06d89edbb92e0038";
59
+ export type Step = {
60
+ kind: "check";
61
+ label: string;
62
+ file: string;
63
+ args: string[];
64
+ expect: "exit0" | "absent-service" | "absent-key";
65
+ } | {
66
+ kind: "exec";
67
+ label: string;
68
+ file: string;
69
+ args: string[];
70
+ okExitCodes?: number[];
71
+ } | {
72
+ kind: "mkdir";
73
+ label: string;
74
+ path: string;
75
+ } | {
76
+ kind: "copy";
77
+ label: string;
78
+ from: string;
79
+ to: string;
80
+ } | {
81
+ kind: "write";
82
+ label: string;
83
+ path: string;
84
+ content: string;
85
+ } | {
86
+ kind: "remove";
87
+ label: string;
88
+ path: string;
89
+ } | {
90
+ kind: "manifest";
91
+ label: string;
92
+ path: string;
93
+ files: string[];
94
+ wrapper: NonNullable<ServiceManifest["wrapper"]>;
95
+ expect: Record<string, string>;
96
+ } | {
97
+ kind: "refuse-if-absent";
98
+ label: string;
99
+ path: string;
100
+ } | {
101
+ kind: "refuse-if-present";
102
+ label: string;
103
+ path: string;
104
+ } | {
105
+ kind: "refuse-if-sha256";
106
+ label: string;
107
+ path: string;
108
+ sha256: string;
109
+ } | {
110
+ kind: "refuse-if-reparse";
111
+ label: string;
112
+ path: string;
113
+ } | {
114
+ kind: "refuse-if-account-processes";
115
+ label: string;
116
+ account: string;
117
+ } | {
118
+ kind: "wait-stopped";
119
+ label: string;
120
+ service: string;
121
+ } | {
122
+ kind: "refuse-if-helper-source-changed";
123
+ label: string;
124
+ } | {
125
+ kind: "verify-new-root";
126
+ label: string;
127
+ path: string;
128
+ }
129
+ /** Review C4: no ServiceProfiles\<service> (any type) and no ProfileList\<SID> key may exist before install. */
130
+ | {
131
+ kind: "refuse-if-service-profile";
132
+ label: string;
133
+ path: string;
134
+ key: string;
135
+ reg: string;
136
+ } | {
137
+ kind: "rmtree";
138
+ label: string;
139
+ path: string;
140
+ }
141
+ /** C:\Windows\ServiceProfiles\<service>, created by Windows on the virtual account's first start. */
142
+ | {
143
+ kind: "remove-service-profile-folder";
144
+ label: string;
145
+ path: string;
146
+ profilesDir: string;
147
+ service: string;
148
+ sid: string;
149
+ key: string;
150
+ reg: string;
151
+ systemRoot: string;
152
+ }
153
+ /** HKU\<SID>_Classes and HKU\<SID>, the virtual account's hives, which stay loaded after the service stops. */
154
+ | {
155
+ kind: "unload-service-hives";
156
+ label: string;
157
+ sid: string;
158
+ hives: string[];
159
+ reg: string;
160
+ }
161
+ /** ProfileList\<service SID>, removed only when its ProfileImagePath is that same folder. */
162
+ | {
163
+ kind: "remove-profile-key";
164
+ label: string;
165
+ key: string;
166
+ sid: string;
167
+ imagePath: string;
168
+ systemRoot: string;
169
+ reg: string;
170
+ };
171
+ export interface PilotNames {
172
+ service: string;
173
+ root: string;
174
+ }
175
+ export declare function validateNames(n: PilotNames): string | null;
176
+ export declare function systemTools(systemRoot?: string): {
177
+ sc: string;
178
+ icacls: string;
179
+ reg: string;
180
+ tasklist: string;
181
+ csc: string;
182
+ powershell: string;
183
+ };
184
+ /** The WinSW service definition. Manual start, no recovery actions, logs under logs. */
185
+ export declare function wrapperXml(n: PilotNames): string;
186
+ export interface InstallInput extends PilotNames {
187
+ /** Directory holding winsw.exe, runner.mjs and node.exe as staged by the operator. */
188
+ stage: string;
189
+ /** The pinned wrapper. Defaults to WRAPPER_PIN; tests pass a synthetic pin. */
190
+ wrapper?: WrapperPin;
191
+ /** The operator passed --pilot-unsigned-wrapper. Only matters for a pin marked accepted unsigned. */
192
+ pilotUnsignedWrapper?: boolean;
193
+ /** sha256 the installed runner.mjs must have. Defaults to the value built into the installer. */
194
+ runnerSha256?: string;
195
+ systemRoot?: string;
196
+ }
197
+ export declare function installPlan(input: InstallInput): Step[];
198
+ export declare function rollbackPlan(n: PilotNames, systemRoot?: string): Step[];
199
+ export declare function describeStep(s: Step): string;
200
+ export interface Host {
201
+ run(file: string, args: string[]): {
202
+ status: number | null;
203
+ stdout: string;
204
+ stderr: string;
205
+ };
206
+ sleep(ms: number): void;
207
+ /** Open a file for read and write and close it again; null when that worked, else the error code. Defaults to node:fs. */
208
+ tryOpen?(path: string): string | null;
209
+ }
210
+ export declare const realHost: Host;
211
+ /** A link at the path or at an ancestor below C:\\ProgramData, or null. */
212
+ export declare function linkInChain(path: string): string | null;
213
+ /** detail goes to the apply log and the first-start marker; checks names every check that passed, for the dry-run probe. */
214
+ type FolderVerdict = {
215
+ state: "absent";
216
+ } | {
217
+ state: "ok";
218
+ detail: string;
219
+ checks: string;
220
+ } | {
221
+ state: "refuse";
222
+ reason: string;
223
+ present: boolean;
224
+ };
225
+ /**
226
+ * Whether C:\Windows\ServiceProfiles\<service> is this service's own profile, every check required:
227
+ * 1. exact path from the validated name, and neither it nor ServiceProfiles is a link;
228
+ * 2a. the DACL is protected and grants write-type rights only to SYSTEM, Administrators or the service SID;
229
+ * 2. owner SID is SYSTEM, Administrators or the service SID (Windows created Beaker's as Administrators; only
230
+ * SYSTEM and Administrators can create entries under ServiceProfiles, so the owner alone binds nothing);
231
+ * 3. the DACL has an explicit allow ACE for the service SID;
232
+ * 4. if the ProfileList key for the SID exists, its ProfileImagePath (only a leading %SystemRoot% expanded) is this folder.
233
+ * Shared by --apply and the dry-run probe.
234
+ */
235
+ export declare function profileFolderCheck(host: Host, s: Extract<Step, {
236
+ kind: "remove-service-profile-folder";
237
+ }>): FolderVerdict;
238
+ /** Every symlink or junction below root, without following any. */
239
+ export declare function findReparse(root: string): string[];
240
+ export interface ApplyResult {
241
+ ok: boolean;
242
+ log: string[];
243
+ /** Set only by the hive-unload step when Windows still holds the hives after an unload attempt: the hives left. */
244
+ pendingReboot?: string[];
245
+ }
246
+ /** Run steps in order and stop at the first failure. */
247
+ export declare function applySteps(steps: Step[], host: Host, ctx: PilotNames): ApplyResult;
248
+ /**
249
+ * Read-only probes for the rollback dry run (Beaker run 3): what each rollback
250
+ * target looks like now and what --apply would do to it. Runs only sc query,
251
+ * tasklist, reg query and Get-Acl owner reads, plus local lstat and readdir.
252
+ * Never stops, deletes, or changes an ACL, and never runs anything from the
253
+ * stage folder. The checks mirror the ones --apply makes before each delete.
254
+ */
255
+ export declare function probeRollback(steps: Step[], host: Host): string[];
256
+ export declare function main(argv: string[], host?: Host, platform?: NodeJS.Platform, out?: (s: string) => void,
257
+ /** The wrapper pin. Only tests pass one; the command line cannot. */
258
+ pin?: WrapperPin,
259
+ /** The runner pin. Only tests pass one; the build compiles the real one in. */
260
+ runnerSha256?: string): number;
261
+ export {};
262
+ //# sourceMappingURL=windows-service-install.d.ts.map