looply-cli 0.5.39 → 0.5.43

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 (98) hide show
  1. package/dist/account-standing.d.ts +23 -0
  2. package/dist/account-standing.d.ts.map +1 -0
  3. package/dist/account-standing.js +41 -0
  4. package/dist/account-standing.js.map +1 -0
  5. package/dist/bin.d.ts.map +1 -1
  6. package/dist/bin.js +1 -0
  7. package/dist/bin.js.map +1 -1
  8. package/dist/branch-delivery-wiring.d.ts +19 -0
  9. package/dist/branch-delivery-wiring.d.ts.map +1 -1
  10. package/dist/branch-delivery-wiring.js +49 -26
  11. package/dist/branch-delivery-wiring.js.map +1 -1
  12. package/dist/checkout-deps.d.ts +6 -0
  13. package/dist/checkout-deps.d.ts.map +1 -1
  14. package/dist/checkout-deps.js +11 -0
  15. package/dist/checkout-deps.js.map +1 -1
  16. package/dist/checkout-leftovers.d.ts.map +1 -1
  17. package/dist/checkout-leftovers.js +28 -21
  18. package/dist/checkout-leftovers.js.map +1 -1
  19. package/dist/daemon-cmd.d.ts.map +1 -1
  20. package/dist/daemon-cmd.js +51 -1
  21. package/dist/daemon-cmd.js.map +1 -1
  22. package/dist/feature-report.d.ts.map +1 -1
  23. package/dist/feature-report.js +27 -4
  24. package/dist/feature-report.js.map +1 -1
  25. package/dist/gate-health.d.ts +7 -0
  26. package/dist/gate-health.d.ts.map +1 -1
  27. package/dist/gate-health.js +11 -1
  28. package/dist/gate-health.js.map +1 -1
  29. package/dist/goal-compile.d.ts.map +1 -1
  30. package/dist/goal-compile.js +3 -0
  31. package/dist/goal-compile.js.map +1 -1
  32. package/dist/goal-gap.d.ts +22 -1
  33. package/dist/goal-gap.d.ts.map +1 -1
  34. package/dist/goal-gap.js +65 -6
  35. package/dist/goal-gap.js.map +1 -1
  36. package/dist/grant-waiting-wiring.d.ts +16 -1
  37. package/dist/grant-waiting-wiring.d.ts.map +1 -1
  38. package/dist/grant-waiting-wiring.js +27 -1
  39. package/dist/grant-waiting-wiring.js.map +1 -1
  40. package/dist/heroku-cli.d.ts +13 -1
  41. package/dist/heroku-cli.d.ts.map +1 -1
  42. package/dist/heroku-cli.js +15 -0
  43. package/dist/heroku-cli.js.map +1 -1
  44. package/dist/machine-settings.d.ts +7 -0
  45. package/dist/machine-settings.d.ts.map +1 -1
  46. package/dist/machine-settings.js +27 -0
  47. package/dist/machine-settings.js.map +1 -1
  48. package/dist/provider-accounts.d.ts +5 -1
  49. package/dist/provider-accounts.d.ts.map +1 -1
  50. package/dist/provider-accounts.js +1 -0
  51. package/dist/provider-accounts.js.map +1 -1
  52. package/dist/qa-feedback.d.ts +110 -0
  53. package/dist/qa-feedback.d.ts.map +1 -0
  54. package/dist/qa-feedback.js +353 -0
  55. package/dist/qa-feedback.js.map +1 -0
  56. package/dist/run-cmd.d.ts.map +1 -1
  57. package/dist/run-cmd.js +43 -6
  58. package/dist/run-cmd.js.map +1 -1
  59. package/dist/self-update.d.ts +440 -0
  60. package/dist/self-update.d.ts.map +1 -0
  61. package/dist/self-update.js +1006 -0
  62. package/dist/self-update.js.map +1 -0
  63. package/dist/serve-cmd.d.ts +32 -1
  64. package/dist/serve-cmd.d.ts.map +1 -1
  65. package/dist/serve-cmd.js +162 -7
  66. package/dist/serve-cmd.js.map +1 -1
  67. package/dist/serve.d.ts.map +1 -1
  68. package/dist/serve.js +3 -0
  69. package/dist/serve.js.map +1 -1
  70. package/dist/server-client.d.ts +6 -0
  71. package/dist/server-client.d.ts.map +1 -1
  72. package/dist/server-client.js +4 -0
  73. package/dist/server-client.js.map +1 -1
  74. package/dist/setup-check-wiring.d.ts +31 -0
  75. package/dist/setup-check-wiring.d.ts.map +1 -0
  76. package/dist/setup-check-wiring.js +195 -0
  77. package/dist/setup-check-wiring.js.map +1 -0
  78. package/dist/setup-check.d.ts +222 -0
  79. package/dist/setup-check.d.ts.map +1 -0
  80. package/dist/setup-check.js +620 -0
  81. package/dist/setup-check.js.map +1 -0
  82. package/dist/signals.d.ts +13 -0
  83. package/dist/signals.d.ts.map +1 -1
  84. package/dist/signals.js +26 -1
  85. package/dist/signals.js.map +1 -1
  86. package/dist/ticket-attachments.d.ts +31 -1
  87. package/dist/ticket-attachments.d.ts.map +1 -1
  88. package/dist/ticket-attachments.js +232 -9
  89. package/dist/ticket-attachments.js.map +1 -1
  90. package/dist/watchdog-wiring.d.ts +40 -0
  91. package/dist/watchdog-wiring.d.ts.map +1 -0
  92. package/dist/watchdog-wiring.js +108 -0
  93. package/dist/watchdog-wiring.js.map +1 -0
  94. package/dist/watchdog.d.ts +107 -0
  95. package/dist/watchdog.d.ts.map +1 -0
  96. package/dist/watchdog.js +424 -0
  97. package/dist/watchdog.js.map +1 -0
  98. package/package.json +4 -4
@@ -0,0 +1,440 @@
1
+ import { type CliCompat } from '@looply/core';
2
+ import type { Platform } from './serve';
3
+ import type { SupervisorTask } from './serve-cmd';
4
+ /**
5
+ * EVERY PC MOVES ITSELF TO THE NEW looply-cli — `looply serve`'s self-update.
6
+ *
7
+ * Before this, a release reached a PC only when somebody ran a script on it
8
+ * that waited for a moment with no `looply run`, stopped serve and its daemons,
9
+ * ran `npm i -g looply-cli@X` and started serve again. Other people's PCs had
10
+ * no such script at all. This is that script, inside the product:
11
+ *
12
+ * 1. every 30 minutes the supervisor asks npm for looply-cli's `latest`, and
13
+ * the paired server whether that version is one it accepts
14
+ * (`GET /v1/cli-compat`: not newer than the server, not below its floor,
15
+ * not paused by the operator);
16
+ * 2. with an update decided, it looks every 15 seconds for a GAP — no run in
17
+ * flight anywhere on this machine (`runsInFlight`);
18
+ * 3. in the gap it asks its daemons to stop at their next idle point (so no
19
+ * new run can start), looks again, waits out any run that slipped in,
20
+ * ASKS THE WHOLE DECISION AGAIN, installs into the SAME global prefix it
21
+ * runs from, checks the installed binary's `--version`, and restarts serve
22
+ * — staying until the new serve has come up, and putting the previous
23
+ * version back if it does not.
24
+ *
25
+ * 🔴 A RUN IN FLIGHT IS NEVER INTERRUPTED. Nothing here stops a `looply run`.
26
+ * Daemons are stopped only in a gap, or — after six hours without one, and at
27
+ * most ONCE PER VERSION — to DRAIN: no new run starts, the ones in flight finish
28
+ * on their own (they are detached children with their own logs and survive
29
+ * their daemon), and only then is anything installed. A drain that has not
30
+ * emptied in three hours gives up and serve carries on as it was; that version
31
+ * then waits for a natural gap. A run going for over twelve hours is reported
32
+ * and not waited for: one hung run must not hold the PC hostage.
33
+ *
34
+ * ⚠️ OFF BY DEFAULT IN ITS FIRST RELEASE (`AUTO_UPDATE_DEFAULT_ON`). Per machine:
35
+ * `looply serve auto-update on|off` (`"autoUpdate"` in
36
+ * `~/.looply/machine-settings.json`), or `LOOPLY_AUTO_UPDATE=on|off` in serve's
37
+ * environment. The env var wins both ways.
38
+ *
39
+ * ⚠️ ONLY AN npm GLOBAL INSTALL IS UPDATED. A checkout's `dist/bin.js`, an npx
40
+ * cache or a project-local install is left alone, and the log says why.
41
+ *
42
+ * Every decision is one log line starting `[self-update]`, said when it
43
+ * changes rather than every half hour.
44
+ */
45
+ export declare const PACKAGE = "looply-cli";
46
+ export declare const SELF_UPDATE_TICK_MS = 15000;
47
+ export declare const CHECK_EVERY_MS: number;
48
+ /** With an update waiting this long and still no gap, daemons are stopped so the runs drain. */
49
+ export declare const DRAIN_AFTER_MS: number;
50
+ /** Once draining, how long the runs in flight get before serve gives up and restarts as it was. */
51
+ export declare const DRAIN_WAIT_MAX_MS: number;
52
+ /** A run alive longer than this is reported as stale and does not hold an update back. */
53
+ export declare const STALE_RUN_MS: number;
54
+ /** How long a daemon gets to reach an idle point and stop by itself before it is killed. */
55
+ export declare const DAEMON_STOP_GRACE_MS: number;
56
+ /** A version whose install failed is not tried again for this long. */
57
+ export declare const RETRY_FAILED_AFTER_MS: number;
58
+ export declare const STATE_FILE = "self-update.json";
59
+ /** `looply serve` under systemd/launchd exits with this after updating, so the manager starts the new one. */
60
+ export declare const EXIT_RESTART = 75;
61
+ /**
62
+ * 🔴 OFF BY DEFAULT IN ITS FIRST RELEASE. A PC updates itself only when its
63
+ * owner said so: `looply serve auto-update on` (`"autoUpdate": true` in
64
+ * `~/.looply/machine-settings.json`) or `LOOPLY_AUTO_UPDATE=on`. Once it has
65
+ * been proven end to end on one PC, the default turns on (docs/RELEASE.md).
66
+ */
67
+ export declare const AUTO_UPDATE_DEFAULT_ON = false;
68
+ /** Why automatic updates are off on this machine, or null when they are on. */
69
+ export declare function autoUpdateOff(env: NodeJS.ProcessEnv, local: () => {
70
+ autoUpdate?: boolean;
71
+ }): string | null;
72
+ export interface GlobalInstall {
73
+ /** What `npm install --global --prefix` takes. */
74
+ readonly prefix: string;
75
+ /** `<prefix>/…/node_modules/looply-cli`, whose package.json says what is installed. */
76
+ readonly packageDir: string;
77
+ }
78
+ /**
79
+ * The npm global install `bin` belongs to, or null when it is not one.
80
+ *
81
+ * Global layouts: Windows `<prefix>\node_modules\looply-cli` with the shim
82
+ * `<prefix>\looply.cmd`; elsewhere `<prefix>/lib/node_modules/looply-cli` with
83
+ * `<prefix>/bin/looply`. The shim is what tells a global install from a
84
+ * project's own `node_modules`, which has the same folder shape.
85
+ */
86
+ export declare function globalInstallOf(bin: string | null, platform: Platform, fileExists: (p: string) => boolean): GlobalInstall | null;
87
+ export type UpdateDecision = {
88
+ kind: 'update';
89
+ to: string;
90
+ } | {
91
+ kind: 'stay';
92
+ why: string;
93
+ };
94
+ export interface LastAttempt {
95
+ readonly version: string;
96
+ readonly at: string;
97
+ readonly ok: boolean;
98
+ readonly detail: string;
99
+ }
100
+ export interface DecideInput {
101
+ readonly current: string;
102
+ readonly off: string | null;
103
+ readonly install: GlobalInstall | null;
104
+ readonly latest: {
105
+ ok: true;
106
+ version: string;
107
+ } | {
108
+ ok: false;
109
+ error: string;
110
+ };
111
+ /** Absent when it was not asked (nothing newer was published). */
112
+ readonly compat?: {
113
+ ok: true;
114
+ value: CliCompat;
115
+ } | {
116
+ ok: false;
117
+ error: string;
118
+ };
119
+ readonly last: LastAttempt | null;
120
+ readonly now: number;
121
+ }
122
+ /** Whether the published version is newer than this one — the only reason to ask the server. */
123
+ export declare function isNewer(latest: string, current: string): boolean;
124
+ export declare function decideUpdate(i: DecideInput): UpdateDecision;
125
+ /**
126
+ * Whether one process's command line is a `looply run`: this CLI's `bin.js`
127
+ * (an installed looply-cli, or exactly `ownBin`) with `run` as its command.
128
+ * The daemon launches runs as `node <bin.js> run …` (`run-launcher.ts`).
129
+ */
130
+ export declare function isLooplyRunCommand(commandLine: string, ownBin: string | null): boolean;
131
+ /**
132
+ * The looply command a process runs (`run`, `serve`, `daemon`, `mcp`, …), or
133
+ * null when it is not this CLI at all.
134
+ */
135
+ export declare function looplyCommandOf(commandLine: string, ownBin: string | null): string | null;
136
+ /**
137
+ * How long a process has been running, from `ps -o etime` (`[[dd-]hh:]mm:ss`)
138
+ * or a plain number of seconds (the Windows listing below). Null when unreadable.
139
+ */
140
+ export declare function parseElapsedSeconds(text: string): number | null;
141
+ export interface RunCount {
142
+ /** Runs that hold an update back: running for less than `STALE_RUN_MS`, or about to launch. */
143
+ readonly fresh: number;
144
+ /** Runs alive for longer than any run should be: reported, never waited for. */
145
+ readonly stale: number;
146
+ /**
147
+ * Other long-lived looply processes on this install (`mcp`, a watch…), by
148
+ * command. Not runs, so they do not hold an update back — they could wait
149
+ * forever — but they are named before the package is replaced under them.
150
+ */
151
+ readonly others?: readonly string[];
152
+ }
153
+ /**
154
+ * Runs in a listing of `<elapsed> <command line>` lines. A run older than
155
+ * `staleMs` is counted apart: a hung run must not hold every update back.
156
+ * A line whose age cannot be read is counted as fresh — the direction that
157
+ * cannot install under a live run.
158
+ */
159
+ export declare function countLooplyRuns(listing: string, ownBin: string | null, staleMs?: number): RunCount;
160
+ /**
161
+ * Slots claimed for a launch that has not spawned its run yet (`machine-run-slots.ts`):
162
+ * a run about to exist, which no process listing can show.
163
+ */
164
+ export declare function pendingRunSlots(dir: string, now: number, fs?: {
165
+ list(d: string): string[];
166
+ read(p: string): string;
167
+ }): number;
168
+ /** What `self-update.json` remembers across serves. */
169
+ export interface SelfUpdateState {
170
+ readonly lastAttempt?: LastAttempt;
171
+ /** The version a drain was spent on. A drain happens at most once per version. */
172
+ readonly drained?: {
173
+ readonly version: string;
174
+ readonly at: string;
175
+ };
176
+ /**
177
+ * An update not yet proven: the new version, the one to go back to, and each
178
+ * time serve started on it. Cleared once serve has run on it for
179
+ * `HEALTHY_AFTER_MS`; a crash loop before that puts `previous` back
180
+ * (`startupGuard`). This is the health check a service manager's restart
181
+ * otherwise lacks.
182
+ */
183
+ readonly pendingVerify?: {
184
+ readonly version: string;
185
+ readonly previous: string;
186
+ readonly at: string;
187
+ readonly starts: readonly string[];
188
+ /** Rollbacks that could not be done (npm unavailable…), and when to try again. */
189
+ readonly rollbackTries?: number;
190
+ readonly rollbackRetryAt?: string;
191
+ };
192
+ }
193
+ /** Serve on a new version that has stayed up this long is that version proven. */
194
+ export declare const HEALTHY_AFTER_MS: number;
195
+ /** This many starts on an unproven version within `CRASH_WINDOW_MS` is a crash loop. */
196
+ export declare const CRASH_STARTS = 3;
197
+ export declare const CRASH_WINDOW_MS: number;
198
+ /** A run that slipped in while the daemons stopped, with the drain already spent, is waited for this long at most. */
199
+ export declare const SLIP_WAIT_MAX_MS: number;
200
+ /** A rollback that could not be done is tried again after this, doubling, up to `ROLLBACK_RETRY_MAX_MS`. */
201
+ export declare const ROLLBACK_RETRY_BASE_MS: number;
202
+ export declare const ROLLBACK_RETRY_MAX_MS: number;
203
+ export type StartupVerdict = {
204
+ readonly kind: 'nothing';
205
+ } | {
206
+ readonly kind: 'wait';
207
+ readonly why: string;
208
+ } | {
209
+ readonly kind: 'rollback';
210
+ readonly to: string;
211
+ readonly why: string;
212
+ };
213
+ /**
214
+ * Record that serve is starting on an unproven update — called as the FIRST
215
+ * thing serve does, before it reads anything or takes its lock, so a crash
216
+ * anywhere after this still counts. (A crash while loading the modules happens
217
+ * before any code runs; the `--version` check before the hand-over is what
218
+ * catches that one.) Null when there is nothing to record.
219
+ */
220
+ export declare function recordStart(state: SelfUpdateState, current: string, now: number): SelfUpdateState | null;
221
+ /**
222
+ * What a serve that has its lock does about an unproven update. Pure.
223
+ *
224
+ * `CRASH_STARTS` starts within `CRASH_WINDOW_MS` means serve keeps dying on it
225
+ * — under systemd or launchd nobody else would notice — so the previous version
226
+ * goes back. A rollback that could not be done waits out its backoff.
227
+ */
228
+ export declare function startupGuard(state: SelfUpdateState, current: string, now: number): StartupVerdict;
229
+ /**
230
+ * The state after a rollback attempt. Done: the update is over and recorded as
231
+ * failed, so the version waits `RETRY_FAILED_AFTER_MS`. Not done: the update is
232
+ * KEPT pending, with a backoff, so the next start tries again.
233
+ */
234
+ export declare function afterRollback(state: SelfUpdateState, current: string, now: number, done: boolean, why: string): SelfUpdateState;
235
+ /**
236
+ * A relaunched serve that never came up: that version failed, whatever the
237
+ * rollback managed. Recorded so it is not tried again for `RETRY_FAILED_AFTER_MS`
238
+ * — without this, `lastAttempt` still said OK and the next check reinstalled it.
239
+ */
240
+ export declare function relaunchFailed(state: SelfUpdateState, version: string, now: number, detail: string): SelfUpdateState;
241
+ /** What serve does after an update: start again, and what to fall back to if the new one does not come up. */
242
+ export interface RestartPlan {
243
+ /** The version the new serve should be running. */
244
+ readonly expect: string;
245
+ /** Reinstall this if the new serve does not start; absent when nothing was changed. */
246
+ readonly rollbackTo?: string;
247
+ }
248
+ export interface SelfUpdaterDeps {
249
+ readonly current: string;
250
+ readonly install: GlobalInstall | null;
251
+ now(): number;
252
+ log(line: string): void;
253
+ /** Re-read every tick, so switching it off while an update waits stops it. */
254
+ offReason(): string | null;
255
+ latest(): Promise<string>;
256
+ compat(): Promise<CliCompat>;
257
+ /** Runs alive on this machine right now, from every source that can see them. */
258
+ runsInFlight(): Promise<RunCount>;
259
+ /** Ask the daemons to stop at their next idle point, and wait until they have. */
260
+ stopDaemons(): Promise<void>;
261
+ installVersion(version: string): Promise<{
262
+ ok: boolean;
263
+ detail: string;
264
+ }>;
265
+ /** What the installed binary itself says (`looply --version`), or null when it does not run. */
266
+ installedVersion(): Promise<string | null>;
267
+ readState(): SelfUpdateState;
268
+ writeState(state: SelfUpdateState): void;
269
+ /** Hand over: serve exits and a new one starts on whatever is installed now. */
270
+ restart(plan: RestartPlan): void;
271
+ /** True once serve is stopping for another reason (Ctrl-C): nothing more is installed. */
272
+ cancelled?(): boolean;
273
+ sleep(ms: number): Promise<void>;
274
+ /** When this serve started, for proving an update once it has stayed up `HEALTHY_AFTER_MS`. */
275
+ readonly startedAt?: number;
276
+ readonly checkEveryMs?: number;
277
+ readonly drainAfterMs?: number;
278
+ readonly drainWaitMaxMs?: number;
279
+ readonly gapPollMs?: number;
280
+ }
281
+ export declare class SelfUpdater {
282
+ private readonly deps;
283
+ private target;
284
+ private since;
285
+ private lastCheck;
286
+ private lastWhy;
287
+ private waitingSaid;
288
+ private drainSpentSaid;
289
+ private staleSaid;
290
+ private finished;
291
+ constructor(deps: SelfUpdaterDeps);
292
+ /** The version an update is waiting for, if any. */
293
+ pending(): string | null;
294
+ tick(): Promise<void>;
295
+ /** Serve has stayed up on an unproven update long enough: it is proven, and no rollback will follow. */
296
+ private prove;
297
+ /** Runs now, with any stale ones reported (once per count that changed). */
298
+ private count;
299
+ /** The full decision, asked afresh: npm, the server, the opt-out and the last attempt. */
300
+ private ask;
301
+ private decide;
302
+ private record;
303
+ private apply;
304
+ /** Install, then ask the installed binary what it is: npm's exit code is not the proof. */
305
+ private installAndCheck;
306
+ }
307
+ export interface StartCheckDeps {
308
+ /** The pid in the serve lock, or null when there is none. */
309
+ lockPid(): number | null;
310
+ alive(pid: number): boolean;
311
+ now(): number;
312
+ sleep(ms: number): Promise<void>;
313
+ }
314
+ /**
315
+ * Whether the serve just spawned came up: it took the serve lock and is still
316
+ * alive `settleMs` later. A release that crashes at startup fails this, and the
317
+ * caller puts the previous version back instead of leaving the PC without a
318
+ * supervisor until the next login.
319
+ */
320
+ export declare function confirmServeStarted(pid: number, deps: StartCheckDeps, opts?: {
321
+ timeoutMs?: number;
322
+ settleMs?: number;
323
+ pollMs?: number;
324
+ }): Promise<boolean>;
325
+ /** The supervisor's handle on itself, given to the update task. */
326
+ export interface SelfUpdateControl {
327
+ /** Ask every daemon to stop at its next idle point (grace `DAEMON_STOP_GRACE_MS`), then wait for them. */
328
+ stopDaemons(): Promise<void>;
329
+ restart(plan: RestartPlan): void;
330
+ cancelled(): boolean;
331
+ }
332
+ export interface NodeSelfUpdateOptions {
333
+ readonly home: string;
334
+ readonly platform: Platform;
335
+ readonly env: NodeJS.ProcessEnv;
336
+ readonly bin: string | null;
337
+ readonly current: string;
338
+ log(line: string): void;
339
+ }
340
+ /**
341
+ * Whether serve runs under a service manager that restarts it.
342
+ *
343
+ * ⚠️ ONLY THE EXPLICIT FLAG. `INVOCATION_ID` and `XPC_SERVICE_NAME` are also set
344
+ * in GNOME terminals, VS Code and iTerm, where exiting 75 would leave nobody to
345
+ * start serve again. The service templates `looply serve install` prints set
346
+ * `LOOPLY_SERVE_MANAGED=1` (`serve.ts`).
347
+ */
348
+ export declare function managedServe(env: NodeJS.ProcessEnv): boolean;
349
+ export interface ServiceFacts {
350
+ /** `/proc/self/cgroup` on Linux; null elsewhere or unreadable. */
351
+ readonly cgroup: string | null;
352
+ }
353
+ /** The unit file name the systemd template `looply serve install` prints. */
354
+ export declare const SYSTEMD_UNIT = "looply-serve.service";
355
+ /** The launchd label the plist template uses. */
356
+ export declare const LAUNCHD_LABEL = "dev.looply.serve";
357
+ /**
358
+ * The systemd unit this process runs in, from `/proc/self/cgroup`: the unified
359
+ * `0::` line (cgroup v2, and the hybrid layout systemd also writes), else the
360
+ * `name=systemd` line of cgroup v1. Null when neither names a unit.
361
+ */
362
+ export declare function systemdUnitOf(cgroup: string): string | null;
363
+ export interface ServiceManager {
364
+ /** A service manager restarts this serve when it exits non-zero. */
365
+ readonly managed: boolean;
366
+ /** Managed, but by a unit written before the flag: what to tell the person. */
367
+ readonly hint: string | null;
368
+ }
369
+ export declare const REINSTALL_HINT = "serve runs under a service manager whose unit predates LOOPLY_SERVE_MANAGED=1 \u2014 print a fresh one with `looply serve install` and replace yours";
370
+ /**
371
+ * Whether a service manager runs this serve, flag or no flag. Decided ONCE, at
372
+ * process start (`nodeServeDeps`), never at restart time: by then a serve that
373
+ * relaunched itself detached, or one run under `nohup`, has been re-parented,
374
+ * and reading the process tree then would call it managed and leave it dead.
375
+ *
376
+ * 🔴 A UNIT FROM BEFORE THE FLAG MUST STILL BE SEEN. Under systemd with the
377
+ * default KillMode, a serve that thought itself unmanaged would spawn its
378
+ * replacement, exit 0, and have systemd kill the whole cgroup — the
379
+ * replacement with it. So, without the flag:
380
+ * systemd `INVOCATION_ID` AND this process's own unit is `looply-serve.service`
381
+ * (cgroup v2, v1 or hybrid). Any other unit — a terminal's `.scope`,
382
+ * `gnome-terminal-server.service`, a `systemd-run` transient — is not ours.
383
+ * launchd `XPC_SERVICE_NAME` is our own label `dev.looply.serve`; nothing else.
384
+ * Either way it is treated as managed, and the hint says to reinstall the unit.
385
+ */
386
+ export declare function serviceManagerOf(env: NodeJS.ProcessEnv, platform: Platform, facts: ServiceFacts): ServiceManager;
387
+ export declare function nodeServiceFacts(): ServiceFacts;
388
+ export declare function updateRegistry(env: NodeJS.ProcessEnv): string;
389
+ export declare function nodeSelfUpdateTask(o: NodeSelfUpdateOptions, ctl: SelfUpdateControl): SupervisorTask;
390
+ /** `node <bin> --version`, from a fresh process — the code now on disk, not the code this serve loaded. */
391
+ export declare function binaryVersion(bin: string | null): Promise<string | null>;
392
+ /**
393
+ * `npm install --global --prefix <the prefix serve runs from> looply-cli@<v>
394
+ * --registry <the registry latest was read from>`, through the npm that ships
395
+ * beside this node — no shell and no PATH lookup.
396
+ */
397
+ export declare function npmInstall(install: GlobalInstall, version: string, registry: string, platform: Platform, log: (line: string) => void): Promise<{
398
+ ok: boolean;
399
+ detail: string;
400
+ }>;
401
+ /** The first thing serve does: count this start if it is on an unproven update (`recordStart`). */
402
+ export declare function nodeRecordStart(o: NodeSelfUpdateOptions): void;
403
+ /**
404
+ * Serve holds its lock: is this an update that keeps crashing? On a crash loop
405
+ * it puts the previous version back and returns the plan to start serve on it.
406
+ * Null means carry on — including when the rollback could not be done, which is
407
+ * then tried again after a backoff (`afterRollback`).
408
+ */
409
+ export declare function nodeStartupCheck(o: NodeSelfUpdateOptions): Promise<{
410
+ said: string;
411
+ plan: RestartPlan;
412
+ } | null>;
413
+ export interface RelaunchOptions {
414
+ readonly node: string;
415
+ readonly bin: string | null;
416
+ readonly log: string;
417
+ readonly env: NodeJS.ProcessEnv;
418
+ readonly home: string;
419
+ readonly platform: Platform;
420
+ readonly plan: RestartPlan;
421
+ /** Decided once at process start (`serviceManagerOf`), never here. */
422
+ readonly manager: ServiceManager;
423
+ readonly lockPid: () => number | null;
424
+ readonly say: (line: string) => void;
425
+ }
426
+ /**
427
+ * Start the replacement supervisor once this one has let go of its lock, and
428
+ * stay until it has come up. If it does not, put `plan.rollbackTo` back and
429
+ * start that instead, so a release that crashes at startup does not leave the
430
+ * PC without a supervisor.
431
+ *
432
+ * Under a service manager (`LOOPLY_SERVE_MANAGED=1`) serve exits
433
+ * `EXIT_RESTART` and the manager starts the new one; the binary was already
434
+ * checked with `--version` before getting here.
435
+ */
436
+ export declare function relaunchServe(o: RelaunchOptions): Promise<{
437
+ exitCode: number;
438
+ said: string;
439
+ }>;
440
+ //# sourceMappingURL=self-update.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"self-update.d.ts","sourceRoot":"","sources":["../src/self-update.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,eAAO,MAAM,OAAO,eAAe,CAAC;AACpC,eAAO,MAAM,mBAAm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