@stim-cli/core 1.20.2 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{core-BkgfKqJ8.mjs → core-DisO3hs1.mjs} +235 -59
- package/dist/{index-VDWBflH3.d.mts → index-_wkluvP_.d.mts} +324 -87
- package/dist/index.d.mts +69 -5
- package/dist/index.mjs +3 -3
- package/dist/keyed-delta-BBoOeR2J.mjs +289 -0
- package/dist/noise-DYIbymAJ.d.mts +100 -0
- package/dist/noise-session.d.mts +164 -0
- package/dist/noise-session.mjs +402 -0
- package/dist/noise.d.mts +2 -0
- package/dist/noise.mjs +393 -0
- package/dist/{ownership-claim-Xxxr9MPp.d.mts → ownership-claim-Bf8Lq6AY.d.mts} +2 -1
- package/dist/{ownership-claim-O31Y5iIb.mjs → ownership-claim-DHUs_Dir.mjs} +1 -1
- package/dist/ownership-claim.d.mts +2 -2
- package/dist/ownership-claim.mjs +2 -2
- package/dist/phone-protocol.d.mts +85 -16
- package/dist/phone-protocol.mjs +2 -2
- package/dist/{protocol-pH632kA3.d.mts → protocol-D8R_3dkO.d.mts} +307 -65
- package/dist/protocol.d.mts +2 -2
- package/dist/protocol.mjs +50 -10
- package/dist/receive-protocol.d.mts +1 -1
- package/dist/receive-protocol.mjs +19832 -14545
- package/dist/state.d.mts +2 -2
- package/dist/state.mjs +1122 -187
- package/dist/toolchain.d.mts +64 -0
- package/dist/toolchain.mjs +326 -0
- package/dist/workspace-link.d.mts +16 -0
- package/dist/workspace-link.mjs +50 -0
- package/package.json +21 -1
- package/dist/status-derived-C13g6eQt.mjs +0 -151
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as NoiseKeyPair } from "./noise-DYIbymAJ.mjs";
|
|
2
|
+
import { o as ClaimHandle } from "./ownership-claim-Bf8Lq6AY.mjs";
|
|
2
3
|
//#region state/ndjson.d.ts
|
|
3
4
|
interface NdjsonRecord {
|
|
4
5
|
ts?: number;
|
|
@@ -38,12 +39,14 @@ interface AgentActionReaderOptions {
|
|
|
38
39
|
now?: () => number;
|
|
39
40
|
claimedDevice?: (session: string, sessionsDir: string) => string | null;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
*/
|
|
46
|
-
declare function createAgentActionReader(
|
|
42
|
+
interface AgentRecordSelection {
|
|
43
|
+
tail?: number;
|
|
44
|
+
matches: (record: NdjsonRecord) => boolean;
|
|
45
|
+
}
|
|
46
|
+
/** Reads new agent-device actions synchronously, retaining attribution cursors between reads. */
|
|
47
|
+
declare function createAgentActionReader(options: AgentActionReaderOptions): () => NdjsonRecord[];
|
|
48
|
+
/** Reads new agent-device actions asynchronously; selection applies only to matching output from this call. */
|
|
49
|
+
declare function createAsyncAgentActionReader(options: AgentActionReaderOptions, signal?: AbortSignal): (selection?: AgentRecordSelection) => Promise<NdjsonRecord[]>;
|
|
47
50
|
//#endregion
|
|
48
51
|
//#region state/agent-device-usage.d.ts
|
|
49
52
|
interface AgentDeviceUsage {
|
|
@@ -129,6 +132,33 @@ interface SwiftpmCacheUsage {
|
|
|
129
132
|
declare function swiftpmCacheUsageFile(): string;
|
|
130
133
|
declare function readSwiftpmCacheUsage(): SwiftpmCacheUsage | null;
|
|
131
134
|
//#endregion
|
|
135
|
+
//#region state/machine-cache-usage.d.ts
|
|
136
|
+
interface SimRuntimeUsage {
|
|
137
|
+
identifier: string;
|
|
138
|
+
runtimeIdentifier: string;
|
|
139
|
+
version: string | null;
|
|
140
|
+
build: string | null;
|
|
141
|
+
bytes: number | null;
|
|
142
|
+
deletable: boolean;
|
|
143
|
+
lastUsedAt: string | null;
|
|
144
|
+
devices: number;
|
|
145
|
+
}
|
|
146
|
+
/** The cached measurement of other tools' machine-wide caches that gc reports and never deletes. */
|
|
147
|
+
interface MachineCacheUsage {
|
|
148
|
+
version: 1;
|
|
149
|
+
measuredAt: string;
|
|
150
|
+
roots: string[];
|
|
151
|
+
sizes: {
|
|
152
|
+
dir: string;
|
|
153
|
+
bytes: number | null;
|
|
154
|
+
}[];
|
|
155
|
+
runtimes: SimRuntimeUsage[] | null;
|
|
156
|
+
agentDeviceVersion: string | null;
|
|
157
|
+
xcodeBuildVersion: string | null;
|
|
158
|
+
}
|
|
159
|
+
declare function machineCacheUsageFile(): string;
|
|
160
|
+
declare function readMachineCacheUsage(): MachineCacheUsage | null;
|
|
161
|
+
//#endregion
|
|
132
162
|
//#region state/build-capacity.d.ts
|
|
133
163
|
declare function buildSlotsDir(): string;
|
|
134
164
|
declare function buildSlotPath(index: number): string;
|
|
@@ -145,9 +175,9 @@ declare function tryAcquireBuildSlotClaim({ max, details }: {
|
|
|
145
175
|
path: string;
|
|
146
176
|
} | null;
|
|
147
177
|
/**
|
|
148
|
-
* How busy this
|
|
178
|
+
* How busy this machine is for native builds. `loadPerCore` is the 5-minute load average divided by the CPU count,
|
|
149
179
|
* rounded to one decimal. `builds` counts this Stim home's runs that hold a live native-run claim and are in
|
|
150
|
-
* prebuild, pods or compile here, not on a remote
|
|
180
|
+
* prebuild, pods or compile here, not on a remote machine, plus the build slots this machine holds for other machines'
|
|
151
181
|
* offloaded builds. `maxBuilds` is `concurrency.maxBuilds`, 0 when unlimited.
|
|
152
182
|
*/
|
|
153
183
|
interface MachineCapacity {
|
|
@@ -158,27 +188,37 @@ interface MachineCapacity {
|
|
|
158
188
|
maxLoadPerCore: number;
|
|
159
189
|
}
|
|
160
190
|
declare function machineCapacity(): MachineCapacity;
|
|
161
|
-
/** Why a
|
|
191
|
+
/** Why a machine with this capacity should not take another native build; null when it can. */
|
|
162
192
|
declare function saturation(capacity: MachineCapacity): string | null;
|
|
163
193
|
//#endregion
|
|
164
194
|
//#region state/build-machines.d.ts
|
|
165
195
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
196
|
+
* What this machine keeps about a remote machine it asked for access. `machine` is the `remote.machines` entry and
|
|
197
|
+
* `address` the name it resolved to. Once approved, `serverKey` is the worker's pinned stim-server key: every later
|
|
198
|
+
* connection must prove it holds that key. While pending, `ticket` is the setup ticket this machine generated or was
|
|
199
|
+
* given, and `expiresAt` its expiry when known. Records of protocol 1, which pinned a tailnet node, are not read.
|
|
168
200
|
*/
|
|
169
|
-
interface
|
|
201
|
+
interface MachineCredential {
|
|
170
202
|
machine: string;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
deviceId: string;
|
|
174
|
-
deviceToken: string;
|
|
203
|
+
transport: "tailscale";
|
|
204
|
+
address: string;
|
|
175
205
|
state: "pending" | "approved";
|
|
176
206
|
requestedAt: string;
|
|
207
|
+
serverKey?: string;
|
|
208
|
+
deviceId?: string;
|
|
209
|
+
ticket?: string;
|
|
177
210
|
expiresAt?: string;
|
|
178
|
-
ticketHash?: string;
|
|
179
211
|
}
|
|
212
|
+
type BuildMachineCredential = MachineCredential;
|
|
213
|
+
declare const MACHINE_CREDENTIALS_VERSION = 2;
|
|
214
|
+
/** A stored credential, or null when it is malformed or from an older version. */
|
|
215
|
+
declare function parseMachineCredential(value: unknown): MachineCredential | null;
|
|
180
216
|
declare function readBuildMachines(): BuildMachineCredential[];
|
|
181
217
|
//#endregion
|
|
218
|
+
//#region state/client-identity.d.ts
|
|
219
|
+
/** This machine's long-term X25519 key as a client of other machines, in `$STIM_HOME/client-identity.key`. */
|
|
220
|
+
declare function clientIdentity(): NoiseKeyPair;
|
|
221
|
+
//#endregion
|
|
182
222
|
//#region state/config-types.d.ts
|
|
183
223
|
type SettingsObject = Record<string, unknown>;
|
|
184
224
|
interface SupervisorRecord {
|
|
@@ -251,6 +291,7 @@ interface ConcurrencyLimits {
|
|
|
251
291
|
}
|
|
252
292
|
interface StimConfig {
|
|
253
293
|
version?: number;
|
|
294
|
+
homeId?: string;
|
|
254
295
|
projects: Record<string, ProjectRecord>;
|
|
255
296
|
repos: Record<string, RepoRecord>;
|
|
256
297
|
tempDir?: unknown;
|
|
@@ -280,6 +321,8 @@ interface StimConfig {
|
|
|
280
321
|
logs?: unknown;
|
|
281
322
|
};
|
|
282
323
|
server?: {
|
|
324
|
+
buildsPaused?: unknown;
|
|
325
|
+
devicesPaused?: unknown;
|
|
283
326
|
acceptClientBuilds?: unknown;
|
|
284
327
|
maxLoadPerCore?: unknown;
|
|
285
328
|
workerRoot?: unknown;
|
|
@@ -300,13 +343,28 @@ type Config = StimConfig;
|
|
|
300
343
|
type AutomaticPoolRole = "build" | "device";
|
|
301
344
|
declare function automaticMachineEnabled(role: AutomaticPoolRole, machine: string, config?: StimConfig | null): boolean;
|
|
302
345
|
declare function requireAutomaticMachine(role: AutomaticPoolRole, machine: string): void;
|
|
303
|
-
|
|
346
|
+
/**
|
|
347
|
+
* Refuses a pool with no enabled member: local, or a configured remote approved for the role. `canHost` excludes
|
|
348
|
+
* device-pool remotes that can never host, such as a Linux machine.
|
|
349
|
+
*/
|
|
350
|
+
declare function validateAutomaticPool(role: AutomaticPoolRole, config: StimConfig, canHost?: (machine: string) => boolean): void;
|
|
304
351
|
//#endregion
|
|
305
352
|
//#region state/config.d.ts
|
|
306
353
|
declare function withConfigLock<T>(fn: () => T): T;
|
|
354
|
+
/** Waits for the config lock without blocking the event loop. The signal cancels acquisition; `fn` runs synchronously. */
|
|
355
|
+
declare function withConfigLockAsync<T>(fn: () => T, signal?: AbortSignal): Promise<T>;
|
|
307
356
|
declare function configCorruptRepair(path?: string): string;
|
|
308
357
|
/** The build worker root: `server.workerRoot` when it is absolute, else `$STIM_HOME/build-worker`. */
|
|
309
358
|
declare function buildWorkerRoot(config?: Config | null): string;
|
|
359
|
+
/**
|
|
360
|
+
* A short directory at the drive root that stands in for the build worker directory `path` on Windows. The NDK's
|
|
361
|
+
* ninja is not long-path aware (STIM_PATH_TOO_LONG), and it opens paths under the checkout and under the Gradle user
|
|
362
|
+
* home's transforms cache, both of which are too long under the worker root. A subst drive does not help: Node's
|
|
363
|
+
* native realpath, which expo-modules-autolinking uses, resolves it back to the long path.
|
|
364
|
+
*/
|
|
365
|
+
declare function windowsShortDir(path: string, systemDrive?: string): string;
|
|
366
|
+
/** The ASCII key a Windows build worker records beside a `windowsShortDir` to tell which `kind` and `path` it serves. */
|
|
367
|
+
declare function windowsShortDirKey(kind: "checkout" | "gradle", path: string): string;
|
|
310
368
|
declare function loadConfig(): Config | null;
|
|
311
369
|
declare function getProject(projectPath: string): ProjectRecord | null;
|
|
312
370
|
declare function getConcurrencyLimits({ env }?: {
|
|
@@ -321,12 +379,10 @@ declare function getParkedMax(platform: "ios" | "android", { config, env }?: {
|
|
|
321
379
|
env?: NodeJS.ProcessEnv;
|
|
322
380
|
}): ParkedMax;
|
|
323
381
|
declare function getProjectSettings(projectPath: string): Record<string, unknown>;
|
|
324
|
-
declare function getProjectSetting(projectPath: string, dottedKey: string): unknown;
|
|
325
382
|
declare function getRepoSettings(gitCommonDir: string): Record<string, unknown>;
|
|
326
383
|
declare function isPathPrefix(prefix: string, path: string): boolean;
|
|
327
384
|
declare function findEnclosingWorktreeRoot(projectPath: string): string | null;
|
|
328
385
|
declare function allMetroPorts(): number[];
|
|
329
|
-
declare function findProjectByMetroPort(port: number): string | null;
|
|
330
386
|
//#endregion
|
|
331
387
|
//#region state/debug-log.d.ts
|
|
332
388
|
declare const DEBUG_ENV = "STIM_DEBUG";
|
|
@@ -349,6 +405,10 @@ declare function createDebugLog(component: "cli" | "server", { env, now, base }?
|
|
|
349
405
|
base?: () => Record<string, unknown>;
|
|
350
406
|
}): DebugLog;
|
|
351
407
|
//#endregion
|
|
408
|
+
//#region state/home-identity.d.ts
|
|
409
|
+
/** The persistent, nonsecret identity of this Stim home; null until the CLI initializes it. */
|
|
410
|
+
declare function readHomeIdentity(config?: Config | null): string | null;
|
|
411
|
+
//#endregion
|
|
352
412
|
//#region state/json-file.d.ts
|
|
353
413
|
/**
|
|
354
414
|
* Runs `fn` with each state file read from disk at most once: inside it, including after an `await`, `readStateFile`
|
|
@@ -452,24 +512,42 @@ declare function readLogRecords(dir: string, include?: (name: string) => boolean
|
|
|
452
512
|
declare const NATIVE_CRASH_LOG_PREFIX = "native-crash-";
|
|
453
513
|
/** Reads the CLI timeline with retained native crash records after other records at the same timestamp. */
|
|
454
514
|
declare function readLogTimeline(dir: string, records?: NdjsonRecord[]): NdjsonRecord[];
|
|
515
|
+
declare function isExpoErrorContext(record: NdjsonRecord, event: unknown): boolean;
|
|
455
516
|
type ExpoContextTarget = "msg" | "field";
|
|
456
517
|
/**
|
|
457
518
|
* Adds the code frame and stack lines Expo printed after each Expo error record, either joined into
|
|
458
519
|
* `msg` or as a `context` string array.
|
|
459
520
|
*/
|
|
460
521
|
declare function attachExpoErrorContext(all: NdjsonRecord[], matched: NdjsonRecord[], into?: ExpoContextTarget): NdjsonRecord[];
|
|
461
|
-
|
|
522
|
+
interface LogQueryOptions {
|
|
462
523
|
slot?: string;
|
|
463
|
-
dir?: string;
|
|
464
|
-
records?: NdjsonRecord[];
|
|
465
524
|
sources?: string[];
|
|
466
525
|
minLevel?: string;
|
|
467
526
|
since?: string;
|
|
468
527
|
grep?: string | RegExp;
|
|
469
|
-
tail?: number;
|
|
470
528
|
errorsOnly?: boolean;
|
|
471
|
-
errorContext?: boolean;
|
|
472
529
|
now?: number;
|
|
530
|
+
}
|
|
531
|
+
interface LogQueryPlan {
|
|
532
|
+
/** Whether a record belongs to the queried slot's timeline, before any other filter. */
|
|
533
|
+
inTimeline: (record: NdjsonRecord) => boolean;
|
|
534
|
+
matches: (record: NdjsonRecord) => boolean;
|
|
535
|
+
launchTs: number | null;
|
|
536
|
+
sinceTs: number | undefined;
|
|
537
|
+
/**
|
|
538
|
+
* Whether no record with a timestamp at most `maxTs`, or without one when `maxTs` is Infinity, can match.
|
|
539
|
+
* `slots` lists every `slot ?? 'default'` value the records can carry; without it, a query that depends on
|
|
540
|
+
* per-slot launch markers cannot rule out any timestamp.
|
|
541
|
+
*/
|
|
542
|
+
excludesUpTo: (maxTs: number, slots?: ReadonlySet<unknown>) => boolean;
|
|
543
|
+
}
|
|
544
|
+
/** Decides which records a query matches from the timeline's marker records alone. */
|
|
545
|
+
declare function planLogQuery(markers: readonly NdjsonRecord[], { slot, sources, minLevel, since, grep, errorsOnly, now }?: LogQueryOptions): LogQueryPlan;
|
|
546
|
+
declare function queryLogs({ slot, dir, records, sources, minLevel, since, grep, tail, errorsOnly, errorContext, now }?: LogQueryOptions & {
|
|
547
|
+
dir?: string;
|
|
548
|
+
records?: NdjsonRecord[];
|
|
549
|
+
tail?: number;
|
|
550
|
+
errorContext?: boolean;
|
|
473
551
|
}): NdjsonRecord[];
|
|
474
552
|
/** Queries the JSON timeline, including Expo context fields on errors as `stim logs --json` does. */
|
|
475
553
|
declare function queryJsonLogs(options?: Parameters<typeof queryLogs>[0]): NdjsonRecord[];
|
|
@@ -485,13 +563,49 @@ declare function followLogs({ dir, onRecord, criteria, intervalMs, offsets, erro
|
|
|
485
563
|
dir: string;
|
|
486
564
|
onRecord: (record: NdjsonRecord) => void;
|
|
487
565
|
criteria?: QueryCriteria;
|
|
566
|
+
/** An explicit polling interval. Omit for filesystem hints with a ten-second repair scan. */
|
|
488
567
|
intervalMs?: number;
|
|
489
568
|
offsets?: Record<string, number> | null;
|
|
490
|
-
/** Holds each Expo error until
|
|
569
|
+
/** Holds each Expo error until its code frame and stack stop growing, then attaches them. */
|
|
491
570
|
errorContext?: ExpoContextTarget;
|
|
492
571
|
}): () => void;
|
|
493
572
|
declare function sortByTs(records: NdjsonRecord[]): NdjsonRecord[];
|
|
494
573
|
//#endregion
|
|
574
|
+
//#region state/log-reader.d.ts
|
|
575
|
+
interface LogDirQuery extends LogQueryOptions {
|
|
576
|
+
tail?: number;
|
|
577
|
+
/** Records from outside the directory, such as agent-device actions; they follow its records at equal timestamps. */
|
|
578
|
+
extra?: readonly NdjsonRecord[];
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* An indexed view of a workspace log directory, read in timestamp order without loading whole files. Each file
|
|
582
|
+
* generation is indexed once per process (block timestamp bounds, markers, slots and launch attempts) and later
|
|
583
|
+
* views read only what was appended since. Close it to release the open files.
|
|
584
|
+
*/
|
|
585
|
+
interface LogDir {
|
|
586
|
+
/** Bytes read from each current `.ndjson` file, through its last complete line. */
|
|
587
|
+
readonly sizes: Record<string, number>;
|
|
588
|
+
/** The oldest timestamp in the directory. */
|
|
589
|
+
readonly firstTs: number | undefined;
|
|
590
|
+
/** Launch attempt records outside native crash files, in timeline order. */
|
|
591
|
+
launchAttempts(): NdjsonRecord[];
|
|
592
|
+
/** The records `queryJsonLogs` returns for this directory's timeline followed by `extra`. */
|
|
593
|
+
query(query?: LogDirQuery): Promise<NdjsonRecord[]>;
|
|
594
|
+
/** Every matching record in timestamp order, in batches of at most 500, with the same filters and context as query. */
|
|
595
|
+
batches(query?: Omit<LogDirQuery, "tail">): AsyncIterable<NdjsonRecord[]>;
|
|
596
|
+
/** Prepares the directory marker predicate for records without markers, such as attributed agent actions. */
|
|
597
|
+
filter(query?: LogQueryOptions): (record: NdjsonRecord) => boolean;
|
|
598
|
+
close(): Promise<void>;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Opens `dir` for reading. With `order: 'timeline'`, native crash files follow every other file at equal
|
|
602
|
+
* timestamps, as `readLogTimeline` orders them; with `'name'`, every file is ranked by name, as `readLogRecords`.
|
|
603
|
+
*/
|
|
604
|
+
declare function openLogDir(dir: string, { order, signal }?: {
|
|
605
|
+
order?: "timeline" | "name";
|
|
606
|
+
signal?: AbortSignal;
|
|
607
|
+
}): Promise<LogDir>;
|
|
608
|
+
//#endregion
|
|
495
609
|
//#region state/paths.d.ts
|
|
496
610
|
declare function getConfigPath(): string;
|
|
497
611
|
declare function configLockPath(): string;
|
|
@@ -523,10 +637,10 @@ declare function agentSessionsCacheFile(): string;
|
|
|
523
637
|
declare function diskUsageCacheDir(): string;
|
|
524
638
|
/** The ownership claim root that admits one disk-usage walk at a time on this machine. */
|
|
525
639
|
declare function diskUsageWalkClaims(): string;
|
|
526
|
-
/** The remote
|
|
640
|
+
/** The remote machines this machine asked for build access, each with its pinned stim-server key once approved. */
|
|
527
641
|
declare function buildMachinesFile(): string;
|
|
528
642
|
declare function buildMachinesLock(): string;
|
|
529
|
-
/** The remote
|
|
643
|
+
/** The remote machines this machine asked for access, separate from build credentials. */
|
|
530
644
|
declare function deviceHostMachinesFile(): string;
|
|
531
645
|
declare function deviceHostMachinesLock(): string;
|
|
532
646
|
declare function deviceHostMachinesClaims(): string;
|
|
@@ -547,6 +661,10 @@ declare function maintenanceRunClaims(): string;
|
|
|
547
661
|
declare function archiveRoot(): string;
|
|
548
662
|
declare function archiveDir(id: string): string;
|
|
549
663
|
declare function archiveLock(): string;
|
|
664
|
+
/** This machine's own long-term X25519 key as a client of other machines' stim-servers. */
|
|
665
|
+
declare function clientIdentityKeyFile(): string;
|
|
666
|
+
/** The Unix socket stim-server serves this machine's own user on, without Noise or pairing. */
|
|
667
|
+
declare function serverLocalSocket(): string;
|
|
550
668
|
declare function serverSetupDir(): string;
|
|
551
669
|
declare function setupJournalFile(hash: string): string | null;
|
|
552
670
|
//#endregion
|
|
@@ -603,8 +721,9 @@ declare const RUN_ID_ENV = "STIM_RUN_ID";
|
|
|
603
721
|
/** A run id as the CLI and stim-server accept it: letters, digits, `.`, `_` and `-`, at most 64. Null otherwise. */
|
|
604
722
|
declare function validRunId(value: unknown): string | null;
|
|
605
723
|
/**
|
|
606
|
-
* The id of this CLI invocation: `STIM_RUN_ID` when it holds a valid id
|
|
607
|
-
* The CLI entry exports it back to `STIM_RUN_ID` so processes the run
|
|
724
|
+
* The run id of the ambient operation context, else of this CLI invocation: `STIM_RUN_ID` when it holds a valid id
|
|
725
|
+
* (Stim Desktop passes one), else a random one. The CLI entry exports it back to `STIM_RUN_ID` so processes the run
|
|
726
|
+
* starts inherit it; this function does not.
|
|
608
727
|
*/
|
|
609
728
|
declare function runId(env?: NodeJS.ProcessEnv): string;
|
|
610
729
|
//#endregion
|
|
@@ -677,7 +796,7 @@ interface SettingEntry {
|
|
|
677
796
|
defaultReason?: string;
|
|
678
797
|
}
|
|
679
798
|
/** The payload `stim settings --json` prints. */
|
|
680
|
-
|
|
799
|
+
type SettingsPayload = {
|
|
681
800
|
project: string | null;
|
|
682
801
|
files: Partial<Record<SettingScope, string>>;
|
|
683
802
|
settings: SettingEntry[];
|
|
@@ -687,6 +806,15 @@ interface SettingsPayload {
|
|
|
687
806
|
file: string;
|
|
688
807
|
value: unknown;
|
|
689
808
|
}>;
|
|
809
|
+
};
|
|
810
|
+
/** The masked JSON result of a settings set or unset. */
|
|
811
|
+
interface SettingWriteResult {
|
|
812
|
+
key: string;
|
|
813
|
+
scope: SettingScope;
|
|
814
|
+
file: string;
|
|
815
|
+
changed: boolean;
|
|
816
|
+
setting: SettingEntry;
|
|
817
|
+
recordingsDeleted?: string[];
|
|
690
818
|
}
|
|
691
819
|
declare const REMOTE_DEVICE_BACKENDS: readonly RemoteDeviceBackend[];
|
|
692
820
|
declare const IOS_SIMULATOR_APPS: readonly ["xcode", "siniulator", "stim-desktop"];
|
|
@@ -777,8 +905,11 @@ declare function readHostedApp(session: string, attempt: string, workerHome?: st
|
|
|
777
905
|
//#region state/hosted-macos.d.ts
|
|
778
906
|
/** App slots one host offers; a slot names the host-assigned bundle id `<bundleId>.hosted<slot>`. */
|
|
779
907
|
declare const HOSTED_MACOS_APP_SLOTS = 64;
|
|
908
|
+
/** The drivers `hosting.agentDriver` can name: `none` and the first-party driver packages stim-server ships. */
|
|
780
909
|
declare const HOSTED_AGENT_DRIVERS: readonly ["none", "agent-device"];
|
|
781
910
|
type HostedAgentDriverName = (typeof HOSTED_AGENT_DRIVERS)[number];
|
|
911
|
+
/** A driver name a grant or access record can carry; a client resolves only the drivers it knows. */
|
|
912
|
+
declare function hostedAgentDriverName(value: unknown): value is string;
|
|
782
913
|
/** What a host reports in a macOS offer: no simulator is created, so the choice is the host itself. */
|
|
783
914
|
interface HostedMacosChoice {
|
|
784
915
|
architecture: "arm64" | "x86_64";
|
|
@@ -799,21 +930,25 @@ interface HostedAgentLease {
|
|
|
799
930
|
deviceKey: string;
|
|
800
931
|
backend?: "ios-instance" | "android-instance";
|
|
801
932
|
}
|
|
933
|
+
/**
|
|
934
|
+
* Agent control a driver issues for one installed hosted app. `path` is the session's base route on the host,
|
|
935
|
+
* `scope` the driver's handle that limits it to this one app, and `lease`, for a driver that allocates leases,
|
|
936
|
+
* the scope that pins the allocation.
|
|
937
|
+
*/
|
|
938
|
+
interface HostedAgentIssuedGrant {
|
|
939
|
+
driver: string;
|
|
940
|
+
path: string;
|
|
941
|
+
token: string;
|
|
942
|
+
scope: string;
|
|
943
|
+
lease?: HostedAgentLease;
|
|
944
|
+
}
|
|
802
945
|
/**
|
|
803
946
|
* Agent control the host grants a client for one installed hosted app, sent only over that client's approved
|
|
804
947
|
* device-host connection and never journaled. `none` means the host's `hosting.agentDriver` starts no driver.
|
|
805
|
-
* `path` is the session's base route on the host, `scope` the driver's handle that limits it to this one app,
|
|
806
|
-
* and `lease` the scope that pins the driver's lease allocation.
|
|
807
948
|
*/
|
|
808
949
|
type HostedAgentGrant = {
|
|
809
950
|
driver: "none";
|
|
810
|
-
} |
|
|
811
|
-
driver: Exclude<HostedAgentDriverName, "none">;
|
|
812
|
-
path: string;
|
|
813
|
-
token: string;
|
|
814
|
-
scope: string;
|
|
815
|
-
lease: HostedAgentLease;
|
|
816
|
-
};
|
|
951
|
+
} | HostedAgentIssuedGrant;
|
|
817
952
|
/** `app.launch` and `app.attach` results; a host includes `agent` once the app is installed. */
|
|
818
953
|
type HostedAppLaunch = HostedAppDelivery & {
|
|
819
954
|
agent?: HostedAgentGrant;
|
|
@@ -827,7 +962,7 @@ type HostedAgentAccess = {
|
|
|
827
962
|
driver: "none";
|
|
828
963
|
setting: "hosting.agentDriver";
|
|
829
964
|
} | {
|
|
830
|
-
driver:
|
|
965
|
+
driver: string;
|
|
831
966
|
remoteConfig: string;
|
|
832
967
|
command: string;
|
|
833
968
|
};
|
|
@@ -861,6 +996,8 @@ interface DeviceHostLimits {
|
|
|
861
996
|
killGraceMs: number;
|
|
862
997
|
}
|
|
863
998
|
declare const DEVICE_HOST_LIMITS: Readonly<DeviceHostLimits>;
|
|
999
|
+
/** How many parked sessions one reserve inspects, and possibly retires, before it creates a device. */
|
|
1000
|
+
declare const HOSTED_PARKED_CANDIDATES: number;
|
|
864
1001
|
/** How long a cancelled hosted worker run can take to settle: SIGTERM, SIGKILL after the grace, then it is abandoned. */
|
|
865
1002
|
declare function hostedWorkerSettleMs(limits?: Pick<DeviceHostLimits, "killGraceMs">): number;
|
|
866
1003
|
interface HostedIosChoice {
|
|
@@ -1070,6 +1207,11 @@ declare function readBuildHistory(state: WorkspaceState | null | undefined): Par
|
|
|
1070
1207
|
declare function readWorkspaceState(root: string): WorkspaceState | null;
|
|
1071
1208
|
declare function lastUseFrom(state: WorkspaceState | null, logMtimes: readonly number[]): number;
|
|
1072
1209
|
declare const MAINTENANCE_LOG_NAME = "maintenance.ndjson";
|
|
1210
|
+
/**
|
|
1211
|
+
* When the workspace was last used, in epoch milliseconds. A workspace that recorded no use falls back to the mtime
|
|
1212
|
+
* of its workspace.json, which is written once when the workspace is created, so it is a lower bound on the last
|
|
1213
|
+
* use. NaN when its state.json exists but does not parse, or when workspace.json cannot be read either.
|
|
1214
|
+
*/
|
|
1073
1215
|
declare function workspaceLastUsed(root: string): number;
|
|
1074
1216
|
declare const WARM_KEY = "warm";
|
|
1075
1217
|
/** How long a successful warm keeps a workspace `ready` when nothing runs in it. */
|
|
@@ -1165,7 +1307,9 @@ declare function hostedIosPlacements(state: WorkspaceState | null): Record<strin
|
|
|
1165
1307
|
//#region state/maintenance.d.ts
|
|
1166
1308
|
type MaintenanceMode = "off" | "report" | "on";
|
|
1167
1309
|
type MaintenanceCheck = "pressure" | "size" | "worktree" | "sweep";
|
|
1168
|
-
type MaintenanceActionKind = "would-clear-outputs" | "would-trim-cache" | "would-empty-cache" | "would-shutdown-device" | "would-stop-workspace" | "would-remove-worktree" | "would-remove-orphan" | "would-unregister-cache";
|
|
1310
|
+
type MaintenanceActionKind = "would-clear-outputs" | "would-trim-cache" | "would-empty-cache" | "would-shutdown-device" | "would-stop-workspace" | "would-remove-worktree" | "would-remove-orphan" | "would-unregister-cache" | "would-delete-parked-device" | "would-delete-devices" | "would-clear-build-dirs" | "would-delete-dependencies" | "would-stop-gradle-daemons" | "would-delete-gradle-version" | "would-delete-temp-leftovers";
|
|
1311
|
+
/** Disk pressure: 0 above every threshold, 1 under the budget floor, 2 under the urgent threshold, 3 under the critical threshold or the hard floor. */
|
|
1312
|
+
type DiskPressureLevel = 0 | 1 | 2 | 3;
|
|
1169
1313
|
interface MaintenanceAction {
|
|
1170
1314
|
kind: MaintenanceActionKind;
|
|
1171
1315
|
target: string;
|
|
@@ -1175,13 +1319,15 @@ interface MaintenanceAction {
|
|
|
1175
1319
|
dir?: string;
|
|
1176
1320
|
olderThanDays?: number;
|
|
1177
1321
|
check?: "worktree" | "sweep" | "disk";
|
|
1322
|
+
/** The disk pressure level that planned the action; it runs only while free disk stays under that level's floor. */
|
|
1323
|
+
level?: 2 | 3;
|
|
1178
1324
|
}
|
|
1179
1325
|
interface MaintenanceSize {
|
|
1180
1326
|
name: string;
|
|
1181
1327
|
dir: string;
|
|
1182
1328
|
bytes: number;
|
|
1183
1329
|
measuredAt: number;
|
|
1184
|
-
category: "workspace-outputs" | "build-cache" | "metro-cache" | "compilation-cache" | "ccache" | "other";
|
|
1330
|
+
category: "workspace-outputs" | "build-cache" | "metro-cache" | "compilation-cache" | "ccache" | "owned-devices" | "other";
|
|
1185
1331
|
workspace?: string;
|
|
1186
1332
|
idleDays?: number | null;
|
|
1187
1333
|
blocked?: string;
|
|
@@ -1210,6 +1356,7 @@ interface MaintenancePressure {
|
|
|
1210
1356
|
culprits?: MemoryCulprit[];
|
|
1211
1357
|
};
|
|
1212
1358
|
warningSince: number | null;
|
|
1359
|
+
diskLevel?: DiskPressureLevel;
|
|
1213
1360
|
}
|
|
1214
1361
|
interface MaintenancePass {
|
|
1215
1362
|
startedAt: number;
|
|
@@ -1384,7 +1531,7 @@ declare const BUILD_PHASES: readonly ["prepare", "cache-lookup", "wait", "prebui
|
|
|
1384
1531
|
type BuildPhase = (typeof BUILD_PHASES)[number];
|
|
1385
1532
|
type ActiveBuildState = "running" | "stale" | "unknown";
|
|
1386
1533
|
/**
|
|
1387
|
-
* Where a running build compiles: `local`, or the remote
|
|
1534
|
+
* Where a running build compiles: `local`, or the remote machine it was offloaded to, with the phase it is in there
|
|
1388
1535
|
* (`sync`, `deps`, `prebuild`, `pods`, `build` or `fetch`) and when the offload and that phase started.
|
|
1389
1536
|
*/
|
|
1390
1537
|
type BuildPlacement = "local" | {
|
|
@@ -1499,7 +1646,7 @@ interface LastBuildReport {
|
|
|
1499
1646
|
buildMachine?: string;
|
|
1500
1647
|
/** Where compilation ran: here or a machine name; absent when no build ran. */
|
|
1501
1648
|
builtOn?: string;
|
|
1502
|
-
/** The remote
|
|
1649
|
+
/** The remote machine that compiled the app when the build was offloaded. */
|
|
1503
1650
|
offloadedTo?: string;
|
|
1504
1651
|
/** Why the run built here after it considered offloading; absent when it offloaded or never considered it. */
|
|
1505
1652
|
offloadFallback?: string;
|
|
@@ -1588,7 +1735,7 @@ interface BuildPlanPayload {
|
|
|
1588
1735
|
message: string;
|
|
1589
1736
|
remedy: string;
|
|
1590
1737
|
};
|
|
1591
|
-
/** With ios.remote or android.remote set to auto or a Mac, where the plan assumes the device runs, such as `this
|
|
1738
|
+
/** With ios.remote or android.remote set to auto or a Mac, where the plan assumes the device runs, such as `this machine; auto may use janics-mac-mini`. */
|
|
1592
1739
|
placement?: string;
|
|
1593
1740
|
}
|
|
1594
1741
|
/** The read-only `stim macos --plan --json` payload; SwiftPM work and worker availability remain unknown. */
|
|
@@ -1685,7 +1832,7 @@ type AgentTool = (typeof AGENT_TOOLS)[number];
|
|
|
1685
1832
|
* A coding-agent session working in an environment: one whose working directory `cwd` is the environment's path,
|
|
1686
1833
|
* inside it, or its git worktree root, or one that ran a Stim command in it. `title` is the short name the tool keeps
|
|
1687
1834
|
* for the session, never its conversation. `lastActiveAt` is the tool's own last update, or the Stim command's time
|
|
1688
|
-
* when that is newer. `openUrl` opens the session in the tool's desktop app when that app is installed on this
|
|
1835
|
+
* when that is newer. `openUrl` opens the session in the tool's desktop app when that app is installed on this machine.
|
|
1689
1836
|
* `webUrl` opens a Claude Code session with Remote Control connected on claude.ai/code or in the Claude mobile app.
|
|
1690
1837
|
*/
|
|
1691
1838
|
interface AgentSession {
|
|
@@ -1940,6 +2087,8 @@ interface EnvironmentState {
|
|
|
1940
2087
|
android: AndroidDeviceState | null | undefined;
|
|
1941
2088
|
}[];
|
|
1942
2089
|
path: string;
|
|
2090
|
+
/** The 16-hex identity of the registered canonical project path, used by shared workspace links. */
|
|
2091
|
+
workspaceId?: string;
|
|
1943
2092
|
/** Statically detected app platforms; always set by status, empty when none are detected. */
|
|
1944
2093
|
platforms?: string[];
|
|
1945
2094
|
/** Present when the app's app.json sets expo.extra.stimTutorial to a positive integer: that version. */
|
|
@@ -2057,7 +2206,7 @@ type MemorySource = (typeof MEMORY_SOURCES)[number];
|
|
|
2057
2206
|
declare const MACHINE_OWNER_KINDS: readonly ["simulator", "emulator", "metro", "build", "browser", "macos", "server", "shared"];
|
|
2058
2207
|
type MachineOwnerKind = (typeof MACHINE_OWNER_KINDS)[number];
|
|
2059
2208
|
/**
|
|
2060
|
-
* One thing using this
|
|
2209
|
+
* One thing using this machine's CPU and memory now. Each process is counted in exactly one owner: the one whose root
|
|
2061
2210
|
* process is its nearest ancestor. `workspace` and `slot` (absent for the default slot) name the workspace a
|
|
2062
2211
|
* simulator, emulator, Metro, build or Chrome belongs to; a device no workspace records has a null workspace, and
|
|
2063
2212
|
* machine-wide processes are `shared`. `id` is the simulator's UDID, the emulator's AVD name, Metro's port as text,
|
|
@@ -2123,13 +2272,20 @@ interface StatusCacheEntry {
|
|
|
2123
2272
|
}
|
|
2124
2273
|
/** Every finished file in the disk-usage and pull-request caches; a file being written is not listed. */
|
|
2125
2274
|
declare function listStatusCacheEntries(): StatusCacheEntry[];
|
|
2126
|
-
/**
|
|
2275
|
+
/**
|
|
2276
|
+
* A worktree's cached pull request lookup: the branch and HEAD it was looked up for, and when. `containsHead` and
|
|
2277
|
+
* `endedAt` (epoch milliseconds) carry the lookup's pull request facts; entries written before them leave them out.
|
|
2278
|
+
* `partial` marks a lookup made without the title, checks and review decision.
|
|
2279
|
+
*/
|
|
2127
2280
|
interface PullRequestCacheEntry {
|
|
2128
2281
|
path: string;
|
|
2129
2282
|
branch: string;
|
|
2130
2283
|
head: string;
|
|
2131
2284
|
checkedAt: string;
|
|
2132
2285
|
pullRequest: WorktreePullRequest | null;
|
|
2286
|
+
containsHead?: boolean;
|
|
2287
|
+
endedAt?: number | null;
|
|
2288
|
+
partial?: true;
|
|
2133
2289
|
}
|
|
2134
2290
|
/** The cached pull request lookup of the worktree at `path`, or null before one succeeded. */
|
|
2135
2291
|
declare function readPullRequestCache(path: string): PullRequestCacheEntry | null;
|
|
@@ -2139,7 +2295,7 @@ declare function readDiskUsage(path: string): DiskMeasure | null;
|
|
|
2139
2295
|
declare function readDiskUsageFailure(path: string): string | null;
|
|
2140
2296
|
/** The running build's tool detail its process last wrote, when the file belongs to the build with `claimId`. */
|
|
2141
2297
|
declare function readBuildDetail(root: string, claimId: string): BuildDetail | null;
|
|
2142
|
-
/** The coding-agent sessions `status --watch` last found running on this
|
|
2298
|
+
/** The coding-agent sessions `status --watch` last found running on this machine, and when it looked. */
|
|
2143
2299
|
interface AgentSessionsCache {
|
|
2144
2300
|
discoveredAt: string;
|
|
2145
2301
|
sessions: AgentSession[];
|
|
@@ -2158,7 +2314,7 @@ declare function readAgentSessionsCache(): AgentSessionsCache | null;
|
|
|
2158
2314
|
//#region state/stim-build.d.ts
|
|
2159
2315
|
/**
|
|
2160
2316
|
* A digest of Stim's built code: the first 16 hex characters of the sha256 over the sorted `*.mjs` names and
|
|
2161
|
-
* bytes of a `stim` `dist` directory. A client and a remote
|
|
2317
|
+
* bytes of a `stim` `dist` directory. A client and a remote machine offload only when both compute the same one.
|
|
2162
2318
|
*/
|
|
2163
2319
|
declare function stimBuildDigest(dir: string): string | null;
|
|
2164
2320
|
//#endregion
|
|
@@ -2209,7 +2365,7 @@ interface RunSample {
|
|
|
2209
2365
|
deviceSetup?: boolean;
|
|
2210
2366
|
}
|
|
2211
2367
|
type RunHistory = Partial<Record<StatsPlatform, Partial<Record<RunOutcomeKind, RunSample[]>>>>;
|
|
2212
|
-
/** Where a compiling build ran: here, on a remote
|
|
2368
|
+
/** Where a compiling build ran: here, on a remote machine, or here after offloading it failed. */
|
|
2213
2369
|
declare const PLACEMENT_DECISIONS: readonly ["here", "offloaded", "fell-back"];
|
|
2214
2370
|
type PlacementDecision = (typeof PLACEMENT_DECISIONS)[number];
|
|
2215
2371
|
interface StatsPlacement {
|
|
@@ -2318,21 +2474,22 @@ declare function decodeStats(text: string): {
|
|
|
2318
2474
|
record: StatsRecord | null;
|
|
2319
2475
|
newerVersion: number | null;
|
|
2320
2476
|
};
|
|
2321
|
-
|
|
2477
|
+
type StatsBuckets = {
|
|
2478
|
+
ios: StatsBucket | null;
|
|
2479
|
+
android: StatsBucket | null;
|
|
2480
|
+
};
|
|
2481
|
+
type StatsReport = {
|
|
2322
2482
|
version: number;
|
|
2323
2483
|
project: ({
|
|
2324
2484
|
key: string;
|
|
2325
|
-
} &
|
|
2326
|
-
machine:
|
|
2327
|
-
ios: StatsBucket | null;
|
|
2328
|
-
android: StatsBucket | null;
|
|
2329
|
-
};
|
|
2485
|
+
} & StatsBuckets) | null;
|
|
2486
|
+
machine: StatsBuckets;
|
|
2330
2487
|
offload: OffloadSummary;
|
|
2331
2488
|
capacityRefusals?: StatsCapacityRefusal[];
|
|
2332
2489
|
capacityWaits?: StatsCapacityWait[];
|
|
2333
2490
|
agentDevice: AgentDeviceUsage | null;
|
|
2334
2491
|
swiftpmCache: SwiftpmCacheUsage | null;
|
|
2335
|
-
}
|
|
2492
|
+
};
|
|
2336
2493
|
declare function readStatsReport(key: string | null, now: number): {
|
|
2337
2494
|
report: StatsReport;
|
|
2338
2495
|
note: string | null;
|
|
@@ -2341,19 +2498,12 @@ declare function projectRootDirectories(startDir: string): Generator<string>;
|
|
|
2341
2498
|
declare function findProjectRoot(startDir: string): string | null;
|
|
2342
2499
|
//#endregion
|
|
2343
2500
|
//#region state/device-host-machines.d.ts
|
|
2344
|
-
/** A
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
deviceToken: string;
|
|
2351
|
-
state: "pending" | "approved";
|
|
2352
|
-
requestedAt: string;
|
|
2353
|
-
expiresAt?: string;
|
|
2354
|
-
ticketHash?: string;
|
|
2355
|
-
}
|
|
2356
|
-
/** An absent store is empty; unreadable or malformed credentials refuse access without discarding pins. */
|
|
2501
|
+
/** A remote machine this machine asked for device-host access, separate from build credentials. */
|
|
2502
|
+
type DeviceHostMachineCredential = MachineCredential;
|
|
2503
|
+
/**
|
|
2504
|
+
* An absent store, or one from protocol 1, is empty; an unreadable or malformed one refuses access without discarding
|
|
2505
|
+
* pinned keys.
|
|
2506
|
+
*/
|
|
2357
2507
|
declare function readDeviceHostMachines(): DeviceHostMachineCredential[];
|
|
2358
2508
|
//#endregion
|
|
2359
2509
|
//#region state/hosted-metro.d.ts
|
|
@@ -2383,6 +2533,8 @@ interface TailnetPeer {
|
|
|
2383
2533
|
dnsName: string;
|
|
2384
2534
|
/** A tailnet address of the node; WireGuard delivers packets to it only from that node. */
|
|
2385
2535
|
address: string;
|
|
2536
|
+
/** Tailscale's `OS` for the node, such as `macOS` or `linux`; absent when the status does not report it. */
|
|
2537
|
+
os?: string;
|
|
2386
2538
|
}
|
|
2387
2539
|
declare function parseMachine(entry: string): {
|
|
2388
2540
|
name: string;
|
|
@@ -2393,25 +2545,27 @@ declare function parseMachine(entry: string): {
|
|
|
2393
2545
|
* the node's StableID, the same value `tailscale whois` reports as `Node.StableID`.
|
|
2394
2546
|
*/
|
|
2395
2547
|
declare function findPeer(status: unknown, name: string): TailnetPeer | "missing" | "ambiguous";
|
|
2548
|
+
/**
|
|
2549
|
+
* Whether `tailscale status` reports the peer a `remote.machines` entry names as running an OS other than macOS.
|
|
2550
|
+
* Such a machine can build but never host simulators or emulators; an unknown OS counts as able to host.
|
|
2551
|
+
*/
|
|
2552
|
+
declare function cannotHost(status: unknown, entry: string): boolean;
|
|
2396
2553
|
interface Endpoint {
|
|
2397
2554
|
url: string;
|
|
2398
2555
|
servername: string;
|
|
2399
2556
|
host: string;
|
|
2400
2557
|
}
|
|
2401
2558
|
/**
|
|
2402
|
-
* Connects to the
|
|
2403
|
-
*
|
|
2404
|
-
* and for its Host routing.
|
|
2559
|
+
* Connects to the node's own tailnet address from `tailscale status`. `tailscale serve` still needs the MagicDNS name
|
|
2560
|
+
* for TLS (SNI and certificate) and for its Host routing.
|
|
2405
2561
|
*/
|
|
2406
2562
|
declare function endpoint(peer: TailnetPeer, port: number): Endpoint;
|
|
2407
2563
|
/**
|
|
2408
|
-
*
|
|
2409
|
-
*
|
|
2564
|
+
* Where to reach a `remote.machines` entry now, or why Stim cannot. The tailnet only carries the bytes: the Noise
|
|
2565
|
+
* handshake, pinned to the worker's server key, decides whether the machine answering is the one this machine paired
|
|
2566
|
+
* with.
|
|
2410
2567
|
*/
|
|
2411
|
-
declare function
|
|
2412
|
-
machine: string;
|
|
2413
|
-
nodeId: string;
|
|
2414
|
-
}, current: unknown): Endpoint | string;
|
|
2568
|
+
declare function machineEndpoint(machine: string, current: unknown): Endpoint | string;
|
|
2415
2569
|
//#endregion
|
|
2416
2570
|
//#region state/hosted-logs.d.ts
|
|
2417
2571
|
type HostedLogsCursor = Record<string, number>;
|
|
@@ -2444,15 +2598,17 @@ declare function readHostedNativeLogsCheckpoint(home: string, platform?: "ios" |
|
|
|
2444
2598
|
declare function readLogsSince(dir: string, cursor: HostedLogsCursor): HostedLogsPage;
|
|
2445
2599
|
//#endregion
|
|
2446
2600
|
//#region state/agent-device.d.ts
|
|
2447
|
-
declare function agentDeviceStateDirs(home?: string): string[];
|
|
2601
|
+
declare function agentDeviceStateDirs(home?: string, env?: NodeJS.ProcessEnv): string[];
|
|
2602
|
+
declare function agentDeviceStateDirsAsync(home?: string, env?: NodeJS.ProcessEnv): Promise<string[]>;
|
|
2448
2603
|
//#endregion
|
|
2449
2604
|
//#region state/setup-journal.d.ts
|
|
2450
2605
|
type SetupCapability = "build" | "device-host";
|
|
2606
|
+
/**
|
|
2607
|
+
* A `stim-server setup` run's progress, named by the `journal` value derived from its ticket. It holds no secret, so it
|
|
2608
|
+
* is served to whoever names it.
|
|
2609
|
+
*/
|
|
2451
2610
|
interface SetupJournal {
|
|
2452
2611
|
v: 1;
|
|
2453
|
-
client: {
|
|
2454
|
-
nodeId: string;
|
|
2455
|
-
};
|
|
2456
2612
|
expiresAt: string;
|
|
2457
2613
|
capabilities: SetupCapability[];
|
|
2458
2614
|
steps: {
|
|
@@ -2474,4 +2630,85 @@ declare function readSetupJournal(hash: string): SetupJournal | null;
|
|
|
2474
2630
|
declare function isJournalExpired(journal: SetupJournal, now?: number): boolean;
|
|
2475
2631
|
declare function isSetupJournalPrunable(journal: SetupJournal, now: number): boolean;
|
|
2476
2632
|
//#endregion
|
|
2477
|
-
export { projectRootDirectories as $, SettingType as $a, readAgentDeviceUsageCache as $c, parseHostedPlatformDevice as $i, MacosAppState as $n, maintenanceDir as $o, DevServerStopRecord as $r, isJsonObject as $s, BuildPlacement as $t, DeviceHostMachineCredential as A, parseHostedAppOffer as Aa, DeviceRecord as Ac, HostedDevice as Ai, PlannedPhase as An, agentSessionsCacheFile as Ao, HostedIosStatus as Ar, buildCriteria as As, ACTIVITY_RECENCY_BASES as At, RunHistory as B, ANDROID_EMULATOR_APPS as Ba, MachineCapacity as Bc, HostedNativeOffer as Bi, TUTORIAL_VERSION as Bn, deviceHostMachinesFile as Bo, hostedAndroidRecords as Br, readLogRecords as Bs, AppPresence as Bt, pinnedEndpoint as C, HostedAppFile as Ca, withConfigLock as Cc, readWorkspaceAgent as Ci, MemorySource as Cn, footageDrops as Co, MaintenanceState as Cr, workspaceStateFile as Cs, readBuildDetail as Ct, HostedMetroRequest as D, hostedAppAttempt as Da, validateAutomaticPool as Dc, DeviceHostLimits as Di, PHYSICAL_DEVICE_CONNECTIONS as Dn, recordedBytes as Do, readMaintenanceAttempt as Dr, QueryCriteria as Ds, readPullRequestCache as Dt, HostedMetroGateway as E, hostedAppArea as Ea, requireAutomaticMachine as Ec, DEVICE_HOST_LIMITS as Ei, NativeBuildStep as En, openSegmentName as Eo, parseMaintenanceState as Er, NATIVE_CRASH_LOG_PREFIX as Es, readEndedAgentSessions as Et, HISTORY_LIMIT as F, validHostedAppBlob as Fa, SettingsObject as Fc, HostedDeviceRequest as Fi, StatsPlatform as Fn, buildMachinesLock as Fo, unreadableHostedIos as Fr, logFiles as Fs, ActivityRecencyBasis as Ft, StatsCapacityWait as G, REMOTE_DEVICE_BACKENDS as Ga, tryAcquireBuildSlotClaim as Gc, hostedDeviceId as Gi, WebBrowserState as Gn, easMachineStateRoot as Go, hostedNativeRecords as Gr, countErrorEntries as Gs, BuildCause as Gt, STATS_VERSION as H, IOS_SIMULATOR_APPS as Ha, buildSlotsDir as Hc, deviceHostArea as Hi, WORKSPACE_PHASES as Hn, deviceViewersDir as Ho, parseHostedAndroidPlacement as Hr, recordMatches as Hs, BUILD_RESULTS as Ht, OffloadSummary as I, SETTINGS_SCHEMA_FILE as Ia, StimConfig as Ic, HostedDeviceSelectors as Ii, StatusCapacity as In, configLockPath as Io, HostedAndroidPlacement as Ir, markerWindow as Is, AgentSession as It, StatsReport as J, SETTING_GROUPS as Ja, swiftpmCacheUsageFile as Jc, parseHostedChoice as Ji, WorkspaceStage as Jn, emulatorLogFile as Jo, BUILD_HISTORY_KEY as Jr, EasSessionClaim as Js, BuildHistoryEntry as Jt, StatsPlacement as K, RemoteDeviceBackend as Ka, SwiftpmCacheUsage as Kc, hostedWorkerSettleMs as Ki, WebPageState as Kn, easSessionLedgerFile as Ko, parseHostedNativePlacement as Kr, CreatedDevicePlatform as Ks, BuildDetail as Kt, PLACEMENT_DECISIONS as L, SETTINGS_SCHEMA_URL as La, SupervisorRecord as Lc, HostedDeviceSession as Li, StatusIssue as Ln, createdDevicesFile as Lo, HostedAndroidStatus as Lr, parseSince as Ls, AgentTool as Lt, BuildMachineTotals as M, readHostedAppMetadata as Ma, PlatformRecords as Mc, HostedDeviceOfferRequest as Mi, RunOutcomeKind as Mn, archiveLock as Mo, hostedIosRecords as Mr, compileGrep as Ms, APP_PROCESS_STATES as Mt, CAPACITY_REFUSAL_LIMIT as N, rememberHostedAppBlobRename as Na, ProjectRecord as Nc, HostedDevicePhase as Ni, STATUS_ISSUE_CODES as Nn, archiveRoot as No, hostedIosStatus as Nr, fileSizes as Ns, ActiveBuildState as Nt, hostedMetroGateways as O, hostedAppBlobs as Oa, ConcurrencyLimits as Oc, HostedAndroidChoice as Oi, PhysicalDeviceConnection as On, recordingDeviceName as Oo, readMaintenanceState as Or, advanceTail as Os, withDerivedFacts as Ot, CAPACITY_REFUSAL_MAX_AGE_MS as P, validHostedAppArguments as Pa, RepoRecord as Pc, HostedDevicePlatform as Pi, SimulatorState as Pn, buildMachinesFile as Po, parseHostedIosPlacement as Pr, followLogs as Ps, ActivityDriver as Pt, offloadSummary as Q, SettingScope as Qa, readAgentDeviceUsage as Qc, parseHostedOfferRequest as Qi, MacosAppRecord as Qn, maintenanceChildLogFile as Qo, DEV_SERVER_STOP_REQUEST_KEY as Qr, validEasSessionClaim as Qs, BuildPhase as Qt, ReadStatsResult as R, settingsJsonSchema as Ra, BuildMachineCredential as Rc, HostedIosChoice as Ri, StatusIssueCode as Rn, createdDevicesLock as Ro, hostedAndroidDeviceName as Rr, queryJsonLogs as Rs, AndroidDeviceState as Rt, parseMachine as S, HostedAppDelivery as Sa, loadConfig as Sc, readWarmRecord as Si, MacosBuildPlanPayload as Sn, closedSegmentName as So, MaintenanceSize as Sr, workspaceRecordingsDir as Ss, readAgentSessionsCache as St, HOSTED_METRO_REQUESTS_KEY as T, HostedAppRecord as Ta, automaticMachineEnabled as Tc, workspaceLastUsed as Ti, NATIVE_BUILD_STEPS as Tn, listSegments as To, MemoryCulprit as Tr, ERROR_SOURCES as Ts, readDiskUsageFailure as Tt, StatsBucket as U, OFFLOAD_MODES as Ua, machineCapacity as Uc, deviceHostRoot as Ui, WORKSPACE_STAGE_KINDS as Un, diskUsageCacheDir as Uo, unreadableHostedAndroid as Ur, sortByTs as Us, BuildActivity as Ut, RunSample as V, ANDROID_PCH_CHOICES as Va, buildSlotPath as Vc, assertHostedDeviceLedger as Vi, WEB_PAGE_STATES as Vn, deviceHostMachinesLock as Vo, hostedAndroidStatus as Vr, readLogTimeline as Vs, BUILD_PHASES as Vt, StatsCapacityRefusal as W, OffloadMode as Wa, saturation as Wc, hostedConsolePort as Wi, WarmStep as Wn, diskUsageWalkClaims as Wo, HostedNativePlacement as Wr, tailRead as Ws, BuildCacheHit as Wt, decodeStats as X, SettingDefinition as Xa, AgentDeviceUsageRoots as Xc, parseHostedLocalDeviceCount as Xi, WorktreeGit as Xn, gitMergeCacheDir as Xo, DEVICE_IDLE_SHUTDOWN_KEY as Xr, readCreatedDevices as Xs, BuildMissChange as Xt, StatsScope as Y, SETTING_SCOPES as Ya, AgentDeviceUsage as Yc, parseHostedDevice as Yi, WorktreeFacts as Yn, getConfigPath as Yo, BUILD_HISTORY_LIMIT as Yr, EasSessionLedgerRead as Ys, BuildMissCategory as Yt, findProjectRoot as Z, SettingEntry as Za, agentDeviceUsageFile as Zc, parseHostedNativeOffer as Zi, WorktreePullRequest as Zn, maintenanceAttemptFile as Zo, DEVICE_RECLAIM_REASON as Zr, readEasSessionLedger as Zs, BuildMissReason as Zt, Endpoint as _, parseHostedAgentGrant as _a, getProject as _c, readDevServerStopRequest as _i, MACHINE_OWNER_KINDS as _n, RECORDING_PLATFORMS as _o, MaintenanceCheck as _r, workspaceEndedAgentsLock as _s, diskUsageCacheFile as _t, parseSetupJournal as a, HOSTED_MACOS_APP_SLOTS as aa, DebugLog as ac, MAINTENANCE_LOG_NAME as ai, SOURCES as al, ChecksState as an, acceptsShape as ao, readMacosRecord as ar, setupJournalFile as as, trimCapacityWaits as at, endpoint as b, parseHostedMacosPlacement as ba, getRepoSettings as bc, readIdleStop as bi, MachineOwnerKind as bn, RecordingPlatform as bo, MaintenancePressure as br, workspaceLogsDir as bs, listStatusCacheEntries as bt, HOSTED_LOGS_FIRST_BYTES as c, HostedAgentGrant as ca, debugLoggingEnabled as cc, WARM_KEY as ci, parseNdjsonText as cl, DeviceLeaseState as cn, isLayeredSetting as co, ArchivedWorkspace as cr, sharedGradle as cs, DeviceViewersRecord as ct, HostedLogsPage as d, HostedMacosChoice as da, buildWorkerRoot as dc, WorkspaceState as di, EndedAgentSession as dn, settingValueError as do, linkReplacedArchives as dr, supervisorLogFile as ds, stimBuildDigest as dt, parseHostedRequest as ea, readJsonFile as ec, DevServerStopRequest as ei, AgentActionReaderOptions as el, BuildPlanPayload as en, SettingsPayload as eo, MacosBuild as er, maintenanceNdjsonFile as es, readRunEstimates as et, hostedMacosLogsDir as f, HostedMacosDevice as fa, configCorruptRepair as fc, buildDiagnostics as fi, EnvironmentDisk as fn, RUN_ID_ENV as fo, readArchive as fr, supervisorPidFile as fs, AgentSessionsCache as ft, readLogsSince as g, parseHostedAgentAccess as ga, getParkedMax as gc, readDevServerStop as gi, LastBuildReport as gn, RECORDING_FOOTAGE_MS as go, MaintenanceActionKind as gr, workspaceEndedAgentsFile as gs, agentSessionOf as gt, readHostedNativeLogsCheckpoint as h, hostedMacosBundleId as ha, getConcurrencyLimits as hc, readBuildHistory as hi, GitChipPart as hn, RECORDING_CAP_BYTES as ho, MaintenanceAction as hr, workspaceDerivedData as hs, StatusCacheEntry as ht, isSetupJournalPrunable as i, HOSTED_AGENT_DRIVERS as ia, DEBUG_ENV as ic, LAST_BUILD_KEYS as ii, NdjsonRecord as il, BuildWaitingFor as in, WebViewport as io, readHostedMacosApp as ir, serverSetupDir as is, trimCapacityRefusals as it, readDeviceHostMachines as j, readHostedApp as ja, DoctorRunRecord as jc, HostedDeviceOffer as ji, RemoteDeviceState as jn, archiveDir as jo, hostedIosPlacements as jr, bundleMarkerPlatform as js, AGENT_TOOLS as jt, hostedMetroRequests as k, parseHostedAppManifest as ka, Config as kc, HostedAndroidDevice as ki, PhysicalDeviceState as kn, recordingEnabled as ko, HostedIosPlacement as kr, attachExpoErrorContext as ks, withGitChip as kt, HOSTED_LOGS_PAGE_BYTES as l, HostedAgentLease as la, ParkedMax as lc, WORKSPACE_AGENT_KEY as li, readNdjsonGenerations as ll, DevicePlacement as ln, isSensitiveReference as lo, archiveEnabled as lr, sharedPods as ls, ViewedDevice as lt, parseHostedLogsCursor as m, hostedMacosAppSlot as ma, findProjectByMetroPort as mc, parseMissReason as mi, GitChip as mn, validRunId as mo, readArchives as mr, workspaceBuildDetailFile as ms, PullRequestCacheEntry as mt, SetupJournal as n, readHostedDeviceLedger as na, readStateFile as nc, IDLE_STOP_KEY as ni, createAgentActionReader as nl, BuildReport as nn, TunnelMode as no, macosAppState as nr, maintenanceStateFile as ns, readStatsReport as nt, readSetupJournal as o, HostedAgentAccess as oa, createDebugLog as oc, MetroLastStop as oi, levelRank as ol, DeviceActivity as on, coerceSettingText as oo, ArchivedBytes as or, sharedCcache as os, trimSamples as ot, hostedNativeLogsDir as p, HostedMacosPlacement as pa, findEnclosingWorktreeRoot as pc, lastUseFrom as pi, EnvironmentState as pn, runId as po, readArchiveState as pr, workspaceAgentDeviceDir as ps, ENDED_AGENT_RETENTION_MS as pt, StatsRecord as q, SETTINGS as qa, readSwiftpmCacheUsage as qc, parseHostedAndroidDevice as qi, WorkspacePhase as qn, easSessionLedgerLock as qo, unreadableHostedNative as qr, CreatedDevices as qs, BuildDiagnostic as qt, isJournalExpired as r, readHostedSessions as ra, withStateReadCache as rc, IdleStopRecord as ri, LEVELS as rl, BuildResult as rn, WEB_VIEWPORTS as ro, parseMacosRecord as rr, pullRequestCacheDir as rs, statsProjectKey as rt, agentDeviceStateDirs as s, HostedAgentDriverName as sa, debugLogDir as sc, READY_PHASE_MS as si, parseNdjsonLine as sl, DeviceAppProcess as sn, expectedShape as so, ArchivedUsage as sr, sharedCompilationCache as ss, wholePhases as st, SetupCapability as t, readHostedDevice as ta, readJsonObject as tc, DeviceIdleShutdownRecord as ti, AgentTarget as tl, BuildPlatform as tn, TUNNEL_MODES as to, MacosProcess as tr, maintenanceRunClaims as ts, readStats as tt, HostedLogsCursor as u, HostedAppLaunch as ua, allMetroPorts as uc, WarmRecord as ui, DiskMeasure as un, settingDefinition as uo, archivedUsage as ur, statsFile as us, readViewedDevices as ut, TAILNET_MACHINE_PATTERN as v, parseHostedMacosChoice as va, getProjectSetting as vc, readDeviceIdleShutdowns as vi, MEMORY_SOURCES as vn, RecordedDevice as vo, MaintenanceMode as vr, workspaceGradleBuild as vs, diskUsageFailureFile as vt, HOSTED_METRO_GATEWAYS_KEY as w, HostedAppOffer as wa, AutomaticPoolRole as wc, readWorkspaceState as wi, MetroBundleState as wn, listRecordedDevices as wo, MaintenanceStatus as wr, workspaceStateLock as ws, readDiskUsage as wt, findPeer as x, HOSTED_APP_CHUNK_BYTES as xa, isPathPrefix as xc, readLastBuilds as xi, MachineUsageState as xn, capDrops as xo, MaintenanceRecord as xr, workspaceMetadataFile as xs, pullRequestCacheFile as xt, TailnetPeer as y, parseHostedMacosDevice as ya, getProjectSettings as yc, readDevicePlacement as yi, MachineOwner as yn, RecordedSegment as yo, MaintenancePass as yr, workspaceLogErrorIndex as ys, endedAgentSessionOf as yt, RunEstimates as z, ANDROID_COMPILER_CACHE_CHOICES as za, readBuildMachines as zc, HostedIosDevice as zi, StatusPayload as zn, deviceHostMachinesClaims as zo, hostedAndroidPlacements as zr, queryLogs as zs, AndroidRuntimeFacts as zt };
|
|
2633
|
+
//#region state/status-views.d.ts
|
|
2634
|
+
/** How many of the newest archives the workspace list names. */
|
|
2635
|
+
declare const SUMMARY_ARCHIVES = 10;
|
|
2636
|
+
/** A build as a workspace summary carries it: everything but its fingerprint, miss reason and later diagnostics. */
|
|
2637
|
+
type SummaryBuild = Omit<LastBuildReport, "fingerprint" | "missReason">;
|
|
2638
|
+
type SummaryHistoryEntry = SummaryBuild & Pick<BuildHistoryEntry, "result" | "slot" | "phases">;
|
|
2639
|
+
type SummaryPlatforms<K extends "lastBuilds" | "builds", V> = Partial<Record<keyof NonNullable<EnvironmentState[K]>, V>>;
|
|
2640
|
+
/**
|
|
2641
|
+
* A workspace as the list of every workspace shows it: the environment `stim status --json` prints, without what only a
|
|
2642
|
+
* shown workspace reads. A build drops its fingerprint, miss reason and every diagnostic but the first one with a file
|
|
2643
|
+
* and a line. Each platform's history keeps its newest build and, while that one failed, every failure right before
|
|
2644
|
+
* it, which is what a failure streak counts. `logs` keeps only its error count, a pull request drops its review
|
|
2645
|
+
* decision and lookup time, a macOS app its launch arguments, and `agentDevice` stays only on a tutorial workspace.
|
|
2646
|
+
*/
|
|
2647
|
+
type WorkspaceSummary = Omit<EnvironmentState, "logs" | "builds" | "lastBuilds" | "macos" | "agentDevice" | "worktree"> & {
|
|
2648
|
+
logs?: {
|
|
2649
|
+
errorsSinceMarker: number;
|
|
2650
|
+
} | null;
|
|
2651
|
+
lastBuilds?: SummaryPlatforms<"lastBuilds", SummaryBuild>;
|
|
2652
|
+
builds?: SummaryPlatforms<"builds", SummaryHistoryEntry[]>;
|
|
2653
|
+
macos?: Omit<NonNullable<EnvironmentState["macos"]>, "arguments"> | null;
|
|
2654
|
+
agentDevice?: EnvironmentState["agentDevice"];
|
|
2655
|
+
worktree?: (Omit<WorktreeFacts, "pullRequest"> & {
|
|
2656
|
+
pullRequest?: Omit<NonNullable<WorktreeFacts["pullRequest"]>, "reviewDecision" | "checkedAt"> | null;
|
|
2657
|
+
}) | null;
|
|
2658
|
+
labelOnly?: true;
|
|
2659
|
+
};
|
|
2660
|
+
/** An unprovisioned worktree as the workspace list shows it. */
|
|
2661
|
+
type WorktreeRow = Pick<WorktreeFacts, "path" | "branch" | "repository" | "git" | "gitChip"> & {
|
|
2662
|
+
pullRequest?: Omit<NonNullable<WorktreeFacts["pullRequest"]>, "reviewDecision" | "checkedAt"> | null;
|
|
2663
|
+
};
|
|
2664
|
+
/** The archives, counted, with the newest named; the rest are read a page at a time. */
|
|
2665
|
+
interface ArchivedSummary {
|
|
2666
|
+
count: number;
|
|
2667
|
+
bytes: number;
|
|
2668
|
+
newest: Pick<ArchivedWorkspace, "id" | "projectRoot" | "project" | "workspace" | "removedAt">[];
|
|
2669
|
+
}
|
|
2670
|
+
/** The machine, as the always-visible capacity, memory and maintenance indicators show it. */
|
|
2671
|
+
interface MachineView {
|
|
2672
|
+
capacity: StatusPayload["capacity"];
|
|
2673
|
+
machine: StatusPayload["machine"];
|
|
2674
|
+
deviceLeases: StatusPayload["deviceLeases"];
|
|
2675
|
+
simctlAvailable: boolean;
|
|
2676
|
+
maintenance: Omit<MaintenanceStatus, "recent" | "sizes"> | null;
|
|
2677
|
+
}
|
|
2678
|
+
interface StatusViews {
|
|
2679
|
+
workspaces: WorkspaceSummary[];
|
|
2680
|
+
worktrees: WorktreeRow[];
|
|
2681
|
+
archived: ArchivedSummary;
|
|
2682
|
+
machine: MachineView;
|
|
2683
|
+
/** The full environment of each workspace by path, as `stim status --json` prints it. */
|
|
2684
|
+
details: Map<string, StatusPayload["environments"][number]>;
|
|
2685
|
+
}
|
|
2686
|
+
/** The summary of one environment of a status payload. */
|
|
2687
|
+
declare function workspaceSummary(environment: StatusPayload["environments"][number]): WorkspaceSummary;
|
|
2688
|
+
/** The live views of a status payload as `stim status --json` prints it. */
|
|
2689
|
+
declare function statusViews(payload: StatusPayload): StatusViews;
|
|
2690
|
+
//#endregion
|
|
2691
|
+
//#region state/keyed-delta.d.ts
|
|
2692
|
+
/** The entities that changed since the last emit: whole entities to insert or replace, and keys to drop. */
|
|
2693
|
+
interface KeyedDelta<T> {
|
|
2694
|
+
upsert: T[];
|
|
2695
|
+
remove: string[];
|
|
2696
|
+
}
|
|
2697
|
+
/**
|
|
2698
|
+
* Tracks the JSON of the entities last sent on one subscription, so the next emit carries only what changed. An
|
|
2699
|
+
* entity counts as changed when its JSON differs, so the order of its fields matters and producers build entities
|
|
2700
|
+
* with a stable field order.
|
|
2701
|
+
*/
|
|
2702
|
+
declare class KeyedEntities<T> {
|
|
2703
|
+
private sent;
|
|
2704
|
+
private readonly key;
|
|
2705
|
+
constructor(key: (entity: T) => string);
|
|
2706
|
+
/** Records `entities` as sent in full, for a snapshot. */
|
|
2707
|
+
reset(entities: readonly T[]): void;
|
|
2708
|
+
/** The delta from what was last sent to `entities`, recorded as sent; null when nothing changed. */
|
|
2709
|
+
next(entities: readonly T[]): KeyedDelta<T> | null;
|
|
2710
|
+
}
|
|
2711
|
+
/** Applies `delta` to `entities` keyed by `key`, keeping the order of `entities` and appending new keys. */
|
|
2712
|
+
declare function applyKeyedDelta<T>(entities: readonly T[], delta: KeyedDelta<T>, key: (entity: T) => string): T[];
|
|
2713
|
+
//#endregion
|
|
2714
|
+
export { ReadStatsResult as $, validHostedAppArguments as $a, withConfigLock as $c, HostedDeviceSelectors as $i, StatusIssueCode as $n, archiveRoot as $o, HostedAndroidStatus as $r, NATIVE_CRASH_LOG_PREFIX as $s, AndroidDeviceState as $t, readLogsSince as A, HostedMacosDevice as Aa, readJsonObject as Ac, parseMissReason as Ai, readMachineCacheUsage as Al, GitChipPart as An, settingDefinition as Ao, DiskPressureLevel as Ar, sharedGradle as As, StatusCacheEntry as At, HOSTED_METRO_REQUESTS_KEY as B, HOSTED_APP_CHUNK_BYTES as Ba, allMetroPorts as Bc, readWorkspaceState as Bi, AgentRecordSelection as Bl, NATIVE_BUILD_STEPS as Bn, RecordingPlatform as Bo, MaintenanceStatus as Br, workspaceGradleBuild as Bs, readDiskUsageFailure as Bt, HOSTED_LOGS_PAGE_BYTES as C, HostedAgentAccess as Ca, EasSessionClaim as Cc, READY_PHASE_MS as Ci, buildSlotsDir as Cl, DeviceLeaseState as Cn, WEB_VIEWPORTS as Co, ArchivedWorkspace as Cr, maintenanceStateFile as Cs, DeviceViewersRecord as Ct, hostedNativeLogsDir as D, HostedAgentLease as Da, validEasSessionClaim as Dc, WorkspaceState as Di, MachineCacheUsage as Dl, EnvironmentDisk as Dn, expectedShape as Do, readArchive as Dr, setupJournalFile as Ds, AgentSessionsCache as Dt, hostedMacosLogsDir as E, HostedAgentIssuedGrant as Ea, readEasSessionLedger as Ec, WarmRecord as Ei, tryAcquireBuildSlotClaim as El, EndedAgentSession as En, coerceSettingText as Eo, linkReplacedArchives as Er, serverSetupDir as Es, stimBuildDigest as Et, endpoint as F, parseHostedAgentAccess as Fa, DebugLog as Fc, readDevicePlacement as Fi, AgentDeviceUsageRoots as Fl, MachineOwnerKind as Fn, RECORDING_CAP_BYTES as Fo, MaintenancePass as Fr, workspaceAgentDeviceDir as Fs, listStatusCacheEntries as Ft, DeviceHostMachineCredential as G, hostedAppArea as Ga, getParkedMax as Gc, HostedAndroidChoice as Gi, NdjsonRecord as Gl, PlannedPhase as Gn, listSegments as Go, HostedIosPlacement as Gr, workspaceStateFile as Gs, ACTIVITY_RECENCY_BASES as Gt, HostedMetroRequest as H, HostedAppFile as Ha, configCorruptRepair as Hc, DEVICE_HOST_LIMITS as Hi, createAgentActionReader as Hl, PHYSICAL_DEVICE_CONNECTIONS as Hn, closedSegmentName as Ho, parseMaintenanceState as Hr, workspaceLogsDir as Hs, readPullRequestCache as Ht, findPeer as I, parseHostedAgentGrant as Ia, createDebugLog as Ic, readIdleStop as Ii, agentDeviceUsageFile as Il, MachineUsageState as In, RECORDING_FOOTAGE_MS as Io, MaintenancePressure as Ir, workspaceBuildDetailFile as Is, pullRequestCacheFile as It, CAPACITY_REFUSAL_LIMIT as J, parseHostedAppManifest as Ja, getRepoSettings as Jc, HostedDeviceOffer as Ji, parseNdjsonLine as Jl, STATUS_ISSUE_CODES as Jn, recordingDeviceName as Jo, hostedIosRecords as Jr, LogDirQuery as Js, ActiveBuildState as Jt, readDeviceHostMachines as K, hostedAppAttempt as Ka, getProject as Kc, HostedAndroidDevice as Ki, SOURCES as Kl, RemoteDeviceState as Kn, openSegmentName as Ko, HostedIosStatus as Kr, workspaceStateLock as Ks, AGENT_TOOLS as Kt, machineEndpoint as L, parseHostedMacosChoice as La, debugLogDir as Lc, readLastBuilds as Li, readAgentDeviceUsage as Ll, MacosBuildPlanPayload as Ln, RECORDING_PLATFORMS as Lo, MaintenanceRecord as Lr, workspaceDerivedData as Ls, readAgentSessionsCache as Lt, TAILNET_MACHINE_PATTERN as M, hostedAgentDriverName as Ma, withStateReadCache as Mc, readDevServerStop as Mi, readSwiftpmCacheUsage as Ml, MACHINE_OWNER_KINDS as Mn, RUN_ID_ENV as Mo, MaintenanceActionKind as Mr, statsFile as Ms, diskUsageCacheFile as Mt, TailnetPeer as N, hostedMacosAppSlot as Na, readHomeIdentity as Nc, readDevServerStopRequest as Ni, swiftpmCacheUsageFile as Nl, MEMORY_SOURCES as Nn, runId as No, MaintenanceCheck as Nr, supervisorLogFile as Ns, diskUsageFailureFile as Nt, parseHostedLogsCursor as O, HostedAppLaunch as Oa, isJsonObject as Oc, buildDiagnostics as Oi, SimRuntimeUsage as Ol, EnvironmentState as On, isLayeredSetting as Oo, readArchiveState as Or, sharedCcache as Os, ENDED_AGENT_RETENTION_MS as Ot, cannotHost as P, hostedMacosBundleId as Pa, DEBUG_ENV as Pc, readDeviceIdleShutdowns as Pi, AgentDeviceUsage as Pl, MachineOwner as Pn, validRunId as Po, MaintenanceMode as Pr, supervisorPidFile as Ps, endedAgentSessionOf as Pt, PLACEMENT_DECISIONS as Q, rememberHostedAppBlobRename as Qa, windowsShortDirKey as Qc, HostedDeviceRequest as Qi, StatusIssue as Qn, archiveLock as Qo, HostedAndroidPlacement as Qr, LogQueryPlan as Qs, AgentTool as Qt, parseMachine as R, parseHostedMacosDevice as Ra, debugLoggingEnabled as Rc, readWarmRecord as Ri, readAgentDeviceUsageCache as Rl, MemorySource as Rn, RecordedDevice as Ro, MaintenanceSize as Rr, workspaceEndedAgentsFile as Rs, readBuildDetail as Rt, HOSTED_LOGS_FIRST_BYTES as S, HOSTED_MACOS_APP_SLOTS as Sa, CreatedDevices as Sc, MetroLastStop as Si, buildSlotPath as Sl, DeviceAppProcess as Sn, TunnelMode as So, ArchivedUsage as Sr, maintenanceRunClaims as Ss, wholePhases as St, HostedLogsPage as T, HostedAgentGrant as Ta, readCreatedDevices as Tc, WORKSPACE_AGENT_KEY as Ti, saturation as Tl, DiskMeasure as Tn, acceptsShape as To, archivedUsage as Tr, serverLocalSocket as Ts, readViewedDevices as Tt, hostedMetroGateways as U, HostedAppOffer as Ua, findEnclosingWorktreeRoot as Uc, DeviceHostLimits as Ui, createAsyncAgentActionReader as Ul, PhysicalDeviceConnection as Un, footageDrops as Uo, readMaintenanceAttempt as Ur, workspaceMetadataFile as Us, withDerivedFacts as Ut, HostedMetroGateway as V, HostedAppDelivery as Va, buildWorkerRoot as Vc, workspaceLastUsed as Vi, AgentTarget as Vl, NativeBuildStep as Vn, capDrops as Vo, MemoryCulprit as Vr, workspaceLogErrorIndex as Vs, readEndedAgentSessions as Vt, hostedMetroRequests as W, HostedAppRecord as Wa, getConcurrencyLimits as Wc, HOSTED_PARKED_CANDIDATES as Wi, LEVELS as Wl, PhysicalDeviceState as Wn, listRecordedDevices as Wo, readMaintenanceState as Wr, workspaceRecordingsDir as Ws, withGitChip as Wt, HISTORY_LIMIT as X, readHostedApp as Xa, loadConfig as Xc, HostedDevicePhase as Xi, readNdjsonGenerations as Xl, StatsPlatform as Xn, agentSessionsCacheFile as Xo, parseHostedIosPlacement as Xr, ERROR_SOURCES as Xs, ActivityRecencyBasis as Xt, CAPACITY_REFUSAL_MAX_AGE_MS as Y, parseHostedAppOffer as Ya, isPathPrefix as Yc, HostedDeviceOfferRequest as Yi, parseNdjsonText as Yl, SimulatorState as Yn, recordingEnabled as Yo, hostedIosStatus as Yr, openLogDir as Ys, ActivityDriver as Yt, OffloadSummary as Z, readHostedAppMetadata as Za, windowsShortDir as Zc, HostedDevicePlatform as Zi, StatusCapacity as Zn, archiveDir as Zo, unreadableHostedIos as Zr, LogQueryOptions as Zs, AgentSession as Zt, isSetupJournalPrunable as _, parseHostedRequest as _a, recordMatches as _c, DeviceIdleShutdownRecord as _i, MACHINE_CREDENTIALS_VERSION as _l, BuildReport as _n, SettingScope as _o, macosAppState as _r, gitMergeCacheDir as _s, readStatsReport as _t, MachineView as a, deviceHostArea as aa, compileGrep as ac, unreadableHostedAndroid as ai, ConcurrencyLimits as al, BuildCacheHit as an, ANDROID_EMULATOR_APPS as ao, WarmStep as ar, createdDevicesLock as as, StatsCapacityRefusal as at, agentDeviceStateDirs as b, readHostedSessions as ba, countErrorEntries as bc, LAST_BUILD_KEYS as bi, readBuildMachines as bl, ChecksState as bn, SettingsPayload as bo, readMacosRecord as br, maintenanceDir as bs, trimCapacityWaits as bt, SummaryBuild as c, hostedDeviceId as ca, isExpoErrorContext as cc, parseHostedNativePlacement as ci, DoctorRunRecord as cl, BuildDiagnostic as cn, OFFLOAD_MODES as co, WorkspacePhase as cr, deviceHostMachinesLock as cs, StatsRecord as ct, WorktreeRow as d, parseHostedChoice as da, parseSince as dc, BUILD_HISTORY_LIMIT as di, RepoRecord as dl, BuildMissChange as dn, RemoteDeviceBackend as do, WorktreeGit as dr, diskUsageWalkClaims as ds, decodeStats as dt, HostedDeviceSession as ea, QueryCriteria as ec, hostedAndroidDeviceName as ei, withConfigLockAsync as el, AndroidRuntimeFacts as en, validHostedAppBlob as eo, StatusPayload as er, buildMachinesFile as es, RunEstimates as et, statusViews as f, parseHostedDevice as fa, planLogQuery as fc, DEVICE_IDLE_SHUTDOWN_KEY as fi, SettingsObject as fl, BuildMissReason as fn, SETTINGS as fo, WorktreePullRequest as fr, easMachineStateRoot as fs, findProjectRoot as ft, isJournalExpired as g, parseHostedPlatformDevice as ga, readLogTimeline as gc, DevServerStopRequest as gi, BuildMachineCredential as gl, BuildPlatform as gn, SettingEntry as go, MacosProcess as gr, getConfigPath as gs, readStats as gt, SetupJournal as h, parseHostedOfferRequest as ha, readLogRecords as hc, DevServerStopRecord as hi, clientIdentity as hl, BuildPlanPayload as hn, SettingDefinition as ho, MacosBuild as hr, emulatorLogFile as hs, readRunEstimates as ht, ArchivedSummary as i, assertHostedDeviceLedger as ia, bundleMarkerPlatform as ic, parseHostedAndroidPlacement as ii, validateAutomaticPool as il, BuildActivity as in, ANDROID_COMPILER_CACHE_CHOICES as io, WORKSPACE_STAGE_KINDS as ir, createdDevicesFile as is, StatsBucket as it, Endpoint as j, HostedMacosPlacement as ja, readStateFile as jc, readBuildHistory as ji, SwiftpmCacheUsage as jl, LastBuildReport as jn, settingValueError as jo, MaintenanceAction as jr, sharedPods as js, agentSessionOf as jt, readHostedNativeLogsCheckpoint as k, HostedMacosChoice as ka, readJsonFile as kc, lastUseFrom as ki, machineCacheUsageFile as kl, GitChip as kn, isSensitiveReference as ko, readArchives as kr, sharedCompilationCache as ks, PullRequestCacheEntry as kt, SummaryHistoryEntry as l, hostedWorkerSettleMs as la, logFiles as lc, unreadableHostedNative as li, PlatformRecords as ll, BuildHistoryEntry as ln, OffloadMode as lo, WorkspaceStage as lr, deviceViewersDir as ls, StatsReport as lt, SetupCapability as m, parseHostedNativeOffer as ma, queryLogs as mc, DEV_SERVER_STOP_REQUEST_KEY as mi, SupervisorRecord as ml, BuildPlacement as mn, SETTING_SCOPES as mo, MacosAppState as mr, easSessionLedgerLock as ms, projectRootDirectories as mt, KeyedEntities as n, HostedIosDevice as na, attachExpoErrorContext as nc, hostedAndroidRecords as ni, automaticMachineEnabled as nl, BUILD_PHASES as nn, SETTINGS_SCHEMA_URL as no, WEB_PAGE_STATES as nr, clientIdentityKeyFile as ns, RunSample as nt, SUMMARY_ARCHIVES as o, deviceHostRoot as oa, fileSizes as oc, HostedNativePlacement as oi, Config as ol, BuildCause as on, ANDROID_PCH_CHOICES as oo, WebBrowserState as or, deviceHostMachinesClaims as os, StatsCapacityWait as ot, workspaceSummary as p, parseHostedLocalDeviceCount as pa, queryJsonLogs as pc, DEVICE_RECLAIM_REASON as pi, StimConfig as pl, BuildPhase as pn, SETTING_GROUPS as po, MacosAppRecord as pr, easSessionLedgerFile as ps, offloadSummary as pt, BuildMachineTotals as q, hostedAppBlobs as qa, getProjectSettings as qc, HostedDevice as qi, levelRank as ql, RunOutcomeKind as qn, recordedBytes as qo, hostedIosPlacements as qr, LogDir as qs, APP_PROCESS_STATES as qt, applyKeyedDelta as r, HostedNativeOffer as ra, buildCriteria as rc, hostedAndroidStatus as ri, requireAutomaticMachine as rl, BUILD_RESULTS as rn, settingsJsonSchema as ro, WORKSPACE_PHASES as rr, configLockPath as rs, STATS_VERSION as rt, StatusViews as s, hostedConsolePort as sa, followLogs as sc, hostedNativeRecords as si, DeviceRecord as sl, BuildDetail as sn, IOS_SIMULATOR_APPS as so, WebPageState as sr, deviceHostMachinesFile as ss, StatsPlacement as st, KeyedDelta as t, HostedIosChoice as ta, advanceTail as tc, hostedAndroidPlacements as ti, AutomaticPoolRole as tl, AppPresence as tn, SETTINGS_SCHEMA_FILE as to, TUTORIAL_VERSION as tr, buildMachinesLock as ts, RunHistory as tt, WorkspaceSummary as u, parseHostedAndroidDevice as ua, markerWindow as uc, BUILD_HISTORY_KEY as ui, ProjectRecord as ul, BuildMissCategory as un, REMOTE_DEVICE_BACKENDS as uo, WorktreeFacts as ur, diskUsageCacheDir as us, StatsScope as ut, parseSetupJournal as v, readHostedDevice as va, sortByTs as vc, IDLE_STOP_KEY as vi, MachineCredential as vl, BuildResult as vn, SettingType as vo, parseMacosRecord as vr, maintenanceAttemptFile as vs, statsProjectKey as vt, HostedLogsCursor as w, HostedAgentDriverName as wa, EasSessionLedgerRead as wc, WARM_KEY as wi, machineCapacity as wl, DevicePlacement as wn, WebViewport as wo, archiveEnabled as wr, pullRequestCacheDir as ws, ViewedDevice as wt, agentDeviceStateDirsAsync as x, HOSTED_AGENT_DRIVERS as xa, CreatedDevicePlatform as xc, MAINTENANCE_LOG_NAME as xi, MachineCapacity as xl, DeviceActivity as xn, TUNNEL_MODES as xo, ArchivedBytes as xr, maintenanceNdjsonFile as xs, trimSamples as xt, readSetupJournal as y, readHostedDeviceLedger as ya, tailRead as yc, IdleStopRecord as yi, parseMachineCredential as yl, BuildWaitingFor as yn, SettingWriteResult as yo, readHostedMacosApp as yr, maintenanceChildLogFile as ys, trimCapacityRefusals as yt, HOSTED_METRO_GATEWAYS_KEY as z, parseHostedMacosPlacement as za, ParkedMax as zc, readWorkspaceAgent as zi, AgentActionReaderOptions as zl, MetroBundleState as zn, RecordedSegment as zo, MaintenanceState as zr, workspaceEndedAgentsLock as zs, readDiskUsage as zt };
|