@stim-cli/core 1.20.1 → 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.
@@ -1,4 +1,5 @@
1
- import { o as ClaimHandle } from "./ownership-claim-Xxxr9MPp.mjs";
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
- * Reads agent-device session actions incrementally from the supplied sessions directories. With targets,
43
- * records are restricted to those devices; without targets, retained session metadata supplies attribution.
44
- * Missing directories and unreadable files yield no records.
45
- */
46
- declare function createAgentActionReader({ sessionsDirs, targets: resolveTargets, sinceTs, now, claimedDevice }: AgentActionReaderOptions): () => NdjsonRecord[];
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 Mac is for native builds. `loadPerCore` is the 5-minute load average divided by the CPU count,
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 Mac, plus the build slots this Mac holds for other Macs'
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 Mac with this capacity should not take another native build; null when it can. */
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
- * A remote Mac this Mac asked to build on. `machine` is the `remote.machines` entry; `nodeId` is the
167
- * worker's tailnet StableID pinned when the request was sent, which every later connection must match.
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 BuildMachineCredential {
201
+ interface MachineCredential {
170
202
  machine: string;
171
- nodeId: string;
172
- dnsName: string;
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
- declare function validateAutomaticPool(role: AutomaticPoolRole, config: StimConfig): void;
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
- declare function queryLogs({ slot, dir, records, sources, minLevel, since, grep, tail, errorsOnly, errorContext, now }?: {
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 a poll adds no more of its code frame or stack lines, then attaches them. */
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 Macs this Mac paired with, each with its pinned tailnet node and device token. */
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 Macs this Mac asked for access, separate from build credentials. */
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 (Stim Desktop passes one), else a random one.
607
- * The CLI entry exports it back to `STIM_RUN_ID` so processes the run starts inherit it; this function does not.
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
- interface SettingsPayload {
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: "agent-device";
965
+ driver: string;
831
966
  remoteConfig: string;
832
967
  command: string;
833
968
  };
@@ -852,6 +987,19 @@ declare function parseHostedMacosPlacement(value: unknown): HostedMacosPlacement
852
987
  //#endregion
853
988
  //#region state/device-host.d.ts
854
989
  type HostedDevicePlatform = "ios" | "android" | "macos";
990
+ /** Deadlines stim-server gives each hosted worker run. Clients derive their waits from these. */
991
+ interface DeviceHostLimits {
992
+ prepareMs: number;
993
+ offerMs: number;
994
+ stopMs: number;
995
+ logsMs: number;
996
+ killGraceMs: number;
997
+ }
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;
1001
+ /** How long a cancelled hosted worker run can take to settle: SIGTERM, SIGKILL after the grace, then it is abandoned. */
1002
+ declare function hostedWorkerSettleMs(limits?: Pick<DeviceHostLimits, "killGraceMs">): number;
855
1003
  interface HostedIosChoice {
856
1004
  deviceTypeId: string;
857
1005
  runtimeId: string;
@@ -1059,6 +1207,11 @@ declare function readBuildHistory(state: WorkspaceState | null | undefined): Par
1059
1207
  declare function readWorkspaceState(root: string): WorkspaceState | null;
1060
1208
  declare function lastUseFrom(state: WorkspaceState | null, logMtimes: readonly number[]): number;
1061
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
+ */
1062
1215
  declare function workspaceLastUsed(root: string): number;
1063
1216
  declare const WARM_KEY = "warm";
1064
1217
  /** How long a successful warm keeps a workspace `ready` when nothing runs in it. */
@@ -1154,7 +1307,9 @@ declare function hostedIosPlacements(state: WorkspaceState | null): Record<strin
1154
1307
  //#region state/maintenance.d.ts
1155
1308
  type MaintenanceMode = "off" | "report" | "on";
1156
1309
  type MaintenanceCheck = "pressure" | "size" | "worktree" | "sweep";
1157
- 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;
1158
1313
  interface MaintenanceAction {
1159
1314
  kind: MaintenanceActionKind;
1160
1315
  target: string;
@@ -1164,13 +1319,15 @@ interface MaintenanceAction {
1164
1319
  dir?: string;
1165
1320
  olderThanDays?: number;
1166
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;
1167
1324
  }
1168
1325
  interface MaintenanceSize {
1169
1326
  name: string;
1170
1327
  dir: string;
1171
1328
  bytes: number;
1172
1329
  measuredAt: number;
1173
- 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";
1174
1331
  workspace?: string;
1175
1332
  idleDays?: number | null;
1176
1333
  blocked?: string;
@@ -1199,6 +1356,7 @@ interface MaintenancePressure {
1199
1356
  culprits?: MemoryCulprit[];
1200
1357
  };
1201
1358
  warningSince: number | null;
1359
+ diskLevel?: DiskPressureLevel;
1202
1360
  }
1203
1361
  interface MaintenancePass {
1204
1362
  startedAt: number;
@@ -1373,7 +1531,7 @@ declare const BUILD_PHASES: readonly ["prepare", "cache-lookup", "wait", "prebui
1373
1531
  type BuildPhase = (typeof BUILD_PHASES)[number];
1374
1532
  type ActiveBuildState = "running" | "stale" | "unknown";
1375
1533
  /**
1376
- * Where a running build compiles: `local`, or the remote Mac it was offloaded to, with the phase it is in there
1534
+ * Where a running build compiles: `local`, or the remote machine it was offloaded to, with the phase it is in there
1377
1535
  * (`sync`, `deps`, `prebuild`, `pods`, `build` or `fetch`) and when the offload and that phase started.
1378
1536
  */
1379
1537
  type BuildPlacement = "local" | {
@@ -1488,7 +1646,7 @@ interface LastBuildReport {
1488
1646
  buildMachine?: string;
1489
1647
  /** Where compilation ran: here or a machine name; absent when no build ran. */
1490
1648
  builtOn?: string;
1491
- /** The remote Mac that compiled the app when the build was offloaded. */
1649
+ /** The remote machine that compiled the app when the build was offloaded. */
1492
1650
  offloadedTo?: string;
1493
1651
  /** Why the run built here after it considered offloading; absent when it offloaded or never considered it. */
1494
1652
  offloadFallback?: string;
@@ -1577,7 +1735,7 @@ interface BuildPlanPayload {
1577
1735
  message: string;
1578
1736
  remedy: string;
1579
1737
  };
1580
- /** With ios.remote or android.remote set to auto or a Mac, where the plan assumes the device runs, such as `this Mac; auto may use janics-mac-mini`. */
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`. */
1581
1739
  placement?: string;
1582
1740
  }
1583
1741
  /** The read-only `stim macos --plan --json` payload; SwiftPM work and worker availability remain unknown. */
@@ -1674,7 +1832,7 @@ type AgentTool = (typeof AGENT_TOOLS)[number];
1674
1832
  * A coding-agent session working in an environment: one whose working directory `cwd` is the environment's path,
1675
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
1676
1834
  * for the session, never its conversation. `lastActiveAt` is the tool's own last update, or the Stim command's time
1677
- * when that is newer. `openUrl` opens the session in the tool's desktop app when that app is installed on this Mac.
1835
+ * when that is newer. `openUrl` opens the session in the tool's desktop app when that app is installed on this machine.
1678
1836
  * `webUrl` opens a Claude Code session with Remote Control connected on claude.ai/code or in the Claude mobile app.
1679
1837
  */
1680
1838
  interface AgentSession {
@@ -1768,9 +1926,10 @@ type AppPresence = "none" | "closed" | null;
1768
1926
  declare const WORKSPACE_STAGE_KINDS: readonly ["building", "warming", "ready", "build-failed", "running", "stopped"];
1769
1927
  /**
1770
1928
  * Where a workspace is, first match wins: `building` while a build runs, `warming` and `ready` from `phase` when
1771
- * nothing is live, `build-failed` when the newest run of either platform failed, `running` when it is live or holds
1772
- * a remote device, else `stopped`. `since` is when that began: the build's start, the warm phase's time, the failed
1773
- * run's end (else start), the supervisor's start, or Metro's last stop. `platform` names the build for `building`
1929
+ * nothing is live, `build-failed` when the newest run of either platform failed, `running` when it is live, its
1930
+ * macOS app is running or orphaned, or it holds a remote device, else `stopped`. `since` is when that began: the
1931
+ * build's start, the warm phase's time, the failed run's end (else start), the supervisor's start (else the running
1932
+ * macOS app's build end, else its start), or Metro's last stop. `platform` names the build for `building`
1774
1933
  * and `build-failed`. `closedApps` lists, for `running`, the devices whose `appPresence` is `closed`.
1775
1934
  */
1776
1935
  interface WorkspaceStage {
@@ -1928,6 +2087,8 @@ interface EnvironmentState {
1928
2087
  android: AndroidDeviceState | null | undefined;
1929
2088
  }[];
1930
2089
  path: string;
2090
+ /** The 16-hex identity of the registered canonical project path, used by shared workspace links. */
2091
+ workspaceId?: string;
1931
2092
  /** Statically detected app platforms; always set by status, empty when none are detected. */
1932
2093
  platforms?: string[];
1933
2094
  /** Present when the app's app.json sets expo.extra.stimTutorial to a positive integer: that version. */
@@ -1946,6 +2107,8 @@ interface EnvironmentState {
1946
2107
  recording?: {
1947
2108
  enabled: boolean;
1948
2109
  };
2110
+ /** Present when `workspace.hidden` is true: clients list the workspace under Hidden. */
2111
+ hidden?: true;
1949
2112
  /** Where the workspace is, from `workspaceStage`; `stim status --json` always sets it. */
1950
2113
  stage?: WorkspaceStage;
1951
2114
  /** The step a `warming` workspace's warm is in; absent in every other phase. */
@@ -2043,7 +2206,7 @@ type MemorySource = (typeof MEMORY_SOURCES)[number];
2043
2206
  declare const MACHINE_OWNER_KINDS: readonly ["simulator", "emulator", "metro", "build", "browser", "macos", "server", "shared"];
2044
2207
  type MachineOwnerKind = (typeof MACHINE_OWNER_KINDS)[number];
2045
2208
  /**
2046
- * One thing using this Mac's CPU and memory now. Each process is counted in exactly one owner: the one whose root
2209
+ * One thing using this machine's CPU and memory now. Each process is counted in exactly one owner: the one whose root
2047
2210
  * process is its nearest ancestor. `workspace` and `slot` (absent for the default slot) name the workspace a
2048
2211
  * simulator, emulator, Metro, build or Chrome belongs to; a device no workspace records has a null workspace, and
2049
2212
  * machine-wide processes are `shared`. `id` is the simulator's UDID, the emulator's AVD name, Metro's port as text,
@@ -2109,13 +2272,20 @@ interface StatusCacheEntry {
2109
2272
  }
2110
2273
  /** Every finished file in the disk-usage and pull-request caches; a file being written is not listed. */
2111
2274
  declare function listStatusCacheEntries(): StatusCacheEntry[];
2112
- /** A worktree's cached pull request lookup: the branch and HEAD it was looked up for, and when. */
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
+ */
2113
2280
  interface PullRequestCacheEntry {
2114
2281
  path: string;
2115
2282
  branch: string;
2116
2283
  head: string;
2117
2284
  checkedAt: string;
2118
2285
  pullRequest: WorktreePullRequest | null;
2286
+ containsHead?: boolean;
2287
+ endedAt?: number | null;
2288
+ partial?: true;
2119
2289
  }
2120
2290
  /** The cached pull request lookup of the worktree at `path`, or null before one succeeded. */
2121
2291
  declare function readPullRequestCache(path: string): PullRequestCacheEntry | null;
@@ -2125,7 +2295,7 @@ declare function readDiskUsage(path: string): DiskMeasure | null;
2125
2295
  declare function readDiskUsageFailure(path: string): string | null;
2126
2296
  /** The running build's tool detail its process last wrote, when the file belongs to the build with `claimId`. */
2127
2297
  declare function readBuildDetail(root: string, claimId: string): BuildDetail | null;
2128
- /** The coding-agent sessions `status --watch` last found running on this Mac, and when it looked. */
2298
+ /** The coding-agent sessions `status --watch` last found running on this machine, and when it looked. */
2129
2299
  interface AgentSessionsCache {
2130
2300
  discoveredAt: string;
2131
2301
  sessions: AgentSession[];
@@ -2144,7 +2314,7 @@ declare function readAgentSessionsCache(): AgentSessionsCache | null;
2144
2314
  //#region state/stim-build.d.ts
2145
2315
  /**
2146
2316
  * A digest of Stim's built code: the first 16 hex characters of the sha256 over the sorted `*.mjs` names and
2147
- * bytes of a `stim` `dist` directory. A client and a remote Mac offload only when both compute the same one.
2317
+ * bytes of a `stim` `dist` directory. A client and a remote machine offload only when both compute the same one.
2148
2318
  */
2149
2319
  declare function stimBuildDigest(dir: string): string | null;
2150
2320
  //#endregion
@@ -2195,7 +2365,7 @@ interface RunSample {
2195
2365
  deviceSetup?: boolean;
2196
2366
  }
2197
2367
  type RunHistory = Partial<Record<StatsPlatform, Partial<Record<RunOutcomeKind, RunSample[]>>>>;
2198
- /** Where a compiling build ran: here, on a remote Mac, or here after offloading it failed. */
2368
+ /** Where a compiling build ran: here, on a remote machine, or here after offloading it failed. */
2199
2369
  declare const PLACEMENT_DECISIONS: readonly ["here", "offloaded", "fell-back"];
2200
2370
  type PlacementDecision = (typeof PLACEMENT_DECISIONS)[number];
2201
2371
  interface StatsPlacement {
@@ -2304,21 +2474,22 @@ declare function decodeStats(text: string): {
2304
2474
  record: StatsRecord | null;
2305
2475
  newerVersion: number | null;
2306
2476
  };
2307
- interface StatsReport {
2477
+ type StatsBuckets = {
2478
+ ios: StatsBucket | null;
2479
+ android: StatsBucket | null;
2480
+ };
2481
+ type StatsReport = {
2308
2482
  version: number;
2309
2483
  project: ({
2310
2484
  key: string;
2311
- } & StatsReport["machine"]) | null;
2312
- machine: {
2313
- ios: StatsBucket | null;
2314
- android: StatsBucket | null;
2315
- };
2485
+ } & StatsBuckets) | null;
2486
+ machine: StatsBuckets;
2316
2487
  offload: OffloadSummary;
2317
2488
  capacityRefusals?: StatsCapacityRefusal[];
2318
2489
  capacityWaits?: StatsCapacityWait[];
2319
2490
  agentDevice: AgentDeviceUsage | null;
2320
2491
  swiftpmCache: SwiftpmCacheUsage | null;
2321
- }
2492
+ };
2322
2493
  declare function readStatsReport(key: string | null, now: number): {
2323
2494
  report: StatsReport;
2324
2495
  note: string | null;
@@ -2327,19 +2498,12 @@ declare function projectRootDirectories(startDir: string): Generator<string>;
2327
2498
  declare function findProjectRoot(startDir: string): string | null;
2328
2499
  //#endregion
2329
2500
  //#region state/device-host-machines.d.ts
2330
- /** A separately approved remote Mac, pinned before sending its device token. */
2331
- interface DeviceHostMachineCredential {
2332
- machine: string;
2333
- nodeId: string;
2334
- dnsName: string;
2335
- deviceId: string;
2336
- deviceToken: string;
2337
- state: "pending" | "approved";
2338
- requestedAt: string;
2339
- expiresAt?: string;
2340
- ticketHash?: string;
2341
- }
2342
- /** 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
+ */
2343
2507
  declare function readDeviceHostMachines(): DeviceHostMachineCredential[];
2344
2508
  //#endregion
2345
2509
  //#region state/hosted-metro.d.ts
@@ -2369,6 +2533,8 @@ interface TailnetPeer {
2369
2533
  dnsName: string;
2370
2534
  /** A tailnet address of the node; WireGuard delivers packets to it only from that node. */
2371
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;
2372
2538
  }
2373
2539
  declare function parseMachine(entry: string): {
2374
2540
  name: string;
@@ -2379,25 +2545,27 @@ declare function parseMachine(entry: string): {
2379
2545
  * the node's StableID, the same value `tailscale whois` reports as `Node.StableID`.
2380
2546
  */
2381
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;
2382
2553
  interface Endpoint {
2383
2554
  url: string;
2384
2555
  servername: string;
2385
2556
  host: string;
2386
2557
  }
2387
2558
  /**
2388
- * Connects to the pinned node's own tailnet address rather than resolving its name, so the socket reaches the
2389
- * node whose ID was just checked. `tailscale serve` still needs the MagicDNS name for TLS (SNI and certificate)
2390
- * 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.
2391
2561
  */
2392
2562
  declare function endpoint(peer: TailnetPeer, port: number): Endpoint;
2393
2563
  /**
2394
- * The endpoint of a paired machine's pinned node, or why Stim does not connect to it. The name must still
2395
- * resolve to exactly the pinned node; the token is never sent anywhere else.
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.
2396
2567
  */
2397
- declare function pinnedEndpoint(credential: {
2398
- machine: string;
2399
- nodeId: string;
2400
- }, current: unknown): Endpoint | string;
2568
+ declare function machineEndpoint(machine: string, current: unknown): Endpoint | string;
2401
2569
  //#endregion
2402
2570
  //#region state/hosted-logs.d.ts
2403
2571
  type HostedLogsCursor = Record<string, number>;
@@ -2430,15 +2598,17 @@ declare function readHostedNativeLogsCheckpoint(home: string, platform?: "ios" |
2430
2598
  declare function readLogsSince(dir: string, cursor: HostedLogsCursor): HostedLogsPage;
2431
2599
  //#endregion
2432
2600
  //#region state/agent-device.d.ts
2433
- 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[]>;
2434
2603
  //#endregion
2435
2604
  //#region state/setup-journal.d.ts
2436
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
+ */
2437
2610
  interface SetupJournal {
2438
2611
  v: 1;
2439
- client: {
2440
- nodeId: string;
2441
- };
2442
2612
  expiresAt: string;
2443
2613
  capabilities: SetupCapability[];
2444
2614
  steps: {
@@ -2460,4 +2630,85 @@ declare function readSetupJournal(hash: string): SetupJournal | null;
2460
2630
  declare function isJournalExpired(journal: SetupJournal, now?: number): boolean;
2461
2631
  declare function isSetupJournalPrunable(journal: SetupJournal, now: number): boolean;
2462
2632
  //#endregion
2463
- export { projectRootDirectories as $, TunnelMode as $a, createAgentActionReader as $c, readHostedDeviceLedger as $i, MacosAppState as $n, maintenanceStateFile as $o, DevServerStopRecord as $r, readStateFile as $s, BuildPlacement as $t, DeviceHostMachineCredential as A, rememberHostedAppBlobRename as Aa, ProjectRecord as Ac, HostedDeviceOfferRequest as Ai, PlannedPhase as An, archiveRoot as Ao, HostedIosStatus as Ar, fileSizes as As, ACTIVITY_RECENCY_BASES as At, RunHistory as B, OFFLOAD_MODES as Ba, machineCapacity as Bc, deviceHostArea as Bi, TUTORIAL_VERSION as Bn, diskUsageCacheDir as Bo, hostedAndroidRecords as Br, sortByTs as Bs, AppPresence as Bt, pinnedEndpoint as C, hostedAppArea as Ca, requireAutomaticMachine as Cc, readWorkspaceAgent as Ci, MemorySource as Cn, openSegmentName as Co, MaintenanceState as Cr, NATIVE_CRASH_LOG_PREFIX as Cs, readBuildDetail as Ct, HostedMetroRequest as D, parseHostedAppOffer as Da, DeviceRecord as Dc, HostedAndroidDevice as Di, PHYSICAL_DEVICE_CONNECTIONS as Dn, agentSessionsCacheFile as Do, readMaintenanceAttempt as Dr, buildCriteria as Ds, readPullRequestCache as Dt, HostedMetroGateway as E, parseHostedAppManifest as Ea, Config as Ec, HostedAndroidChoice as Ei, NativeBuildStep as En, recordingEnabled as Eo, parseMaintenanceState as Er, attachExpoErrorContext as Es, readEndedAgentSessions as Et, HISTORY_LIMIT as F, settingsJsonSchema as Fa, BuildMachineCredential as Fc, HostedDeviceSession as Fi, StatsPlatform as Fn, createdDevicesLock as Fo, unreadableHostedIos as Fr, queryJsonLogs as Fs, ActivityRecencyBasis as Ft, StatsCapacityWait as G, SETTING_GROUPS as Ga, swiftpmCacheUsageFile as Gc, parseHostedChoice as Gi, WebBrowserState as Gn, emulatorLogFile as Go, hostedNativeRecords as Gr, EasSessionClaim as Gs, BuildCause as Gt, STATS_VERSION as H, REMOTE_DEVICE_BACKENDS as Ha, tryAcquireBuildSlotClaim as Hc, hostedConsolePort as Hi, WORKSPACE_PHASES as Hn, easMachineStateRoot as Ho, parseHostedAndroidPlacement as Hr, countErrorEntries as Hs, BUILD_RESULTS as Ht, OffloadSummary as I, ANDROID_COMPILER_CACHE_CHOICES as Ia, readBuildMachines as Ic, HostedIosChoice as Ii, StatusCapacity as In, deviceHostMachinesClaims as Io, HostedAndroidPlacement as Ir, queryLogs as Is, AgentSession as It, StatsReport as J, SettingEntry as Ja, agentDeviceUsageFile as Jc, parseHostedNativeOffer as Ji, WorkspaceStage as Jn, maintenanceAttemptFile as Jo, BUILD_HISTORY_KEY as Jr, readEasSessionLedger as Js, BuildHistoryEntry as Jt, StatsPlacement as K, SETTING_SCOPES as Ka, AgentDeviceUsage as Kc, parseHostedDevice as Ki, WebPageState as Kn, getConfigPath as Ko, parseHostedNativePlacement as Kr, EasSessionLedgerRead as Ks, BuildDetail as Kt, PLACEMENT_DECISIONS as L, ANDROID_EMULATOR_APPS as La, MachineCapacity as Lc, HostedIosDevice as Li, StatusIssue as Ln, deviceHostMachinesFile as Lo, HostedAndroidStatus as Lr, readLogRecords as Ls, AgentTool as Lt, BuildMachineTotals as M, validHostedAppBlob as Ma, SettingsObject as Mc, HostedDevicePlatform as Mi, RunOutcomeKind as Mn, buildMachinesLock as Mo, hostedIosRecords as Mr, logFiles as Ms, APP_PROCESS_STATES as Mt, CAPACITY_REFUSAL_LIMIT as N, SETTINGS_SCHEMA_FILE as Na, StimConfig as Nc, HostedDeviceRequest as Ni, STATUS_ISSUE_CODES as Nn, configLockPath as No, hostedIosStatus as Nr, markerWindow as Ns, ActiveBuildState as Nt, hostedMetroGateways as O, readHostedApp as Oa, DoctorRunRecord as Oc, HostedDevice as Oi, PhysicalDeviceConnection as On, archiveDir as Oo, readMaintenanceState as Or, bundleMarkerPlatform as Os, withDerivedFacts as Ot, CAPACITY_REFUSAL_MAX_AGE_MS as P, SETTINGS_SCHEMA_URL as Pa, SupervisorRecord as Pc, HostedDeviceSelectors as Pi, SimulatorState as Pn, createdDevicesFile as Po, parseHostedIosPlacement as Pr, parseSince as Ps, ActivityDriver as Pt, offloadSummary as Q, TUNNEL_MODES as Qa, AgentTarget as Qc, readHostedDevice as Qi, MacosAppRecord as Qn, maintenanceRunClaims as Qo, DEV_SERVER_STOP_REQUEST_KEY as Qr, readJsonObject as Qs, BuildPhase as Qt, ReadStatsResult as R, ANDROID_PCH_CHOICES as Ra, buildSlotPath as Rc, HostedNativeOffer as Ri, StatusIssueCode as Rn, deviceHostMachinesLock as Ro, hostedAndroidDeviceName as Rr, readLogTimeline as Rs, AndroidDeviceState as Rt, parseMachine as S, HostedAppRecord as Sa, automaticMachineEnabled as Sc, readWarmRecord as Si, MacosBuildPlanPayload as Sn, listSegments as So, MaintenanceSize as Sr, ERROR_SOURCES as Ss, readAgentSessionsCache as St, HOSTED_METRO_REQUESTS_KEY as T, hostedAppBlobs as Ta, ConcurrencyLimits as Tc, workspaceLastUsed as Ti, NATIVE_BUILD_STEPS as Tn, recordingDeviceName as To, MemoryCulprit as Tr, advanceTail as Ts, readDiskUsageFailure as Tt, StatsBucket as U, RemoteDeviceBackend as Ua, SwiftpmCacheUsage as Uc, hostedDeviceId as Ui, WORKSPACE_STAGE_KINDS as Un, easSessionLedgerFile as Uo, unreadableHostedAndroid as Ur, CreatedDevicePlatform as Us, BuildActivity as Ut, RunSample as V, OffloadMode as Va, saturation as Vc, deviceHostRoot as Vi, WEB_PAGE_STATES as Vn, diskUsageWalkClaims as Vo, hostedAndroidStatus as Vr, tailRead as Vs, BUILD_PHASES as Vt, StatsCapacityRefusal as W, SETTINGS as Wa, readSwiftpmCacheUsage as Wc, parseHostedAndroidDevice as Wi, WarmStep as Wn, easSessionLedgerLock as Wo, HostedNativePlacement as Wr, CreatedDevices as Ws, BuildCacheHit as Wt, decodeStats as X, SettingType as Xa, readAgentDeviceUsageCache as Xc, parseHostedPlatformDevice as Xi, WorktreeGit as Xn, maintenanceDir as Xo, DEVICE_IDLE_SHUTDOWN_KEY as Xr, isJsonObject as Xs, BuildMissChange as Xt, StatsScope as Y, SettingScope as Ya, readAgentDeviceUsage as Yc, parseHostedOfferRequest as Yi, WorktreeFacts as Yn, maintenanceChildLogFile as Yo, BUILD_HISTORY_LIMIT as Yr, validEasSessionClaim as Ys, BuildMissCategory as Yt, findProjectRoot as Z, SettingsPayload as Za, AgentActionReaderOptions as Zc, parseHostedRequest as Zi, WorktreePullRequest as Zn, maintenanceNdjsonFile as Zo, DEVICE_RECLAIM_REASON as Zr, readJsonFile as Zs, BuildMissReason as Zt, Endpoint as _, parseHostedMacosPlacement as _a, getRepoSettings as _c, readDevServerStopRequest as _i, MACHINE_OWNER_KINDS as _n, RecordingPlatform as _o, MaintenanceCheck as _r, workspaceLogsDir as _s, diskUsageCacheFile as _t, parseSetupJournal as a, HostedAgentGrant as aa, debugLoggingEnabled as ac, MAINTENANCE_LOG_NAME as ai, parseNdjsonText as al, ChecksState as an, isLayeredSetting as ao, readMacosRecord as ar, sharedGradle as as, trimCapacityWaits as at, endpoint as b, HostedAppFile as ba, withConfigLock as bc, readIdleStop as bi, MachineOwnerKind as bn, footageDrops as bo, MaintenancePressure as br, workspaceStateFile as bs, listStatusCacheEntries as bt, HOSTED_LOGS_FIRST_BYTES as c, HostedMacosChoice as ca, buildWorkerRoot as cc, WARM_KEY as ci, DeviceLeaseState as cn, settingValueError as co, ArchivedWorkspace as cr, supervisorLogFile as cs, DeviceViewersRecord as ct, HostedLogsPage as d, hostedMacosAppSlot as da, findProjectByMetroPort as dc, WorkspaceState as di, EndedAgentSession as dn, validRunId as do, linkReplacedArchives as dr, workspaceBuildDetailFile as ds, stimBuildDigest as dt, readHostedSessions as ea, withStateReadCache as ec, DevServerStopRequest as ei, LEVELS as el, BuildPlanPayload as en, WEB_VIEWPORTS as eo, MacosBuild as er, pullRequestCacheDir as es, readRunEstimates as et, hostedMacosLogsDir as f, hostedMacosBundleId as fa, getConcurrencyLimits as fc, buildDiagnostics as fi, EnvironmentDisk as fn, RECORDING_CAP_BYTES as fo, readArchive as fr, workspaceDerivedData as fs, AgentSessionsCache as ft, readLogsSince as g, parseHostedMacosDevice as ga, getProjectSettings as gc, readDevServerStop as gi, LastBuildReport as gn, RecordedSegment as go, MaintenanceActionKind as gr, workspaceLogErrorIndex as gs, agentSessionOf as gt, readHostedNativeLogsCheckpoint as h, parseHostedMacosChoice as ha, getProjectSetting as hc, readBuildHistory as hi, GitChipPart as hn, RecordedDevice as ho, MaintenanceAction as hr, workspaceGradleBuild as hs, StatusCacheEntry as ht, isSetupJournalPrunable as i, HostedAgentDriverName as ia, debugLogDir as ic, LAST_BUILD_KEYS as ii, parseNdjsonLine as il, BuildWaitingFor as in, expectedShape as io, readHostedMacosApp as ir, sharedCompilationCache as is, trimCapacityRefusals as it, readDeviceHostMachines as j, validHostedAppArguments as ja, RepoRecord as jc, HostedDevicePhase as ji, RemoteDeviceState as jn, buildMachinesFile as jo, hostedIosPlacements as jr, followLogs as js, AGENT_TOOLS as jt, hostedMetroRequests as k, readHostedAppMetadata as ka, PlatformRecords as kc, HostedDeviceOffer as ki, PhysicalDeviceState as kn, archiveLock as ko, HostedIosPlacement as kr, compileGrep as ks, withGitChip as kt, HOSTED_LOGS_PAGE_BYTES as l, HostedMacosDevice as la, configCorruptRepair as lc, WORKSPACE_AGENT_KEY as li, DevicePlacement as ln, RUN_ID_ENV as lo, archiveEnabled as lr, supervisorPidFile as ls, ViewedDevice as lt, parseHostedLogsCursor as m, parseHostedAgentGrant as ma, getProject as mc, parseMissReason as mi, GitChip as mn, RECORDING_PLATFORMS as mo, readArchives as mr, workspaceEndedAgentsLock as ms, PullRequestCacheEntry as mt, SetupJournal as n, HOSTED_MACOS_APP_SLOTS as na, DebugLog as nc, IDLE_STOP_KEY as ni, SOURCES as nl, BuildReport as nn, acceptsShape as no, macosAppState as nr, setupJournalFile as ns, readStatsReport as nt, readSetupJournal as o, HostedAgentLease as oa, ParkedMax as oc, MetroLastStop as oi, readNdjsonGenerations as ol, DeviceActivity as on, isSensitiveReference as oo, ArchivedBytes as or, sharedPods as os, trimSamples as ot, hostedNativeLogsDir as p, parseHostedAgentAccess as pa, getParkedMax as pc, lastUseFrom as pi, EnvironmentState as pn, RECORDING_FOOTAGE_MS as po, readArchiveState as pr, workspaceEndedAgentsFile as ps, ENDED_AGENT_RETENTION_MS as pt, StatsRecord as q, SettingDefinition as qa, AgentDeviceUsageRoots as qc, parseHostedLocalDeviceCount as qi, WorkspacePhase as qn, gitMergeCacheDir as qo, unreadableHostedNative as qr, readCreatedDevices as qs, BuildDiagnostic as qt, isJournalExpired as r, HostedAgentAccess as ra, createDebugLog as rc, IdleStopRecord as ri, levelRank as rl, BuildResult as rn, coerceSettingText as ro, parseMacosRecord as rr, sharedCcache as rs, statsProjectKey as rt, agentDeviceStateDirs as s, HostedAppLaunch as sa, allMetroPorts as sc, READY_PHASE_MS as si, DeviceAppProcess as sn, settingDefinition as so, ArchivedUsage as sr, statsFile as ss, wholePhases as st, SetupCapability as t, HOSTED_AGENT_DRIVERS as ta, DEBUG_ENV as tc, DeviceIdleShutdownRecord as ti, NdjsonRecord as tl, BuildPlatform as tn, WebViewport as to, MacosProcess as tr, serverSetupDir as ts, readStats as tt, HostedLogsCursor as u, HostedMacosPlacement as ua, findEnclosingWorktreeRoot as uc, WarmRecord as ui, DiskMeasure as un, runId as uo, archivedUsage as ur, workspaceAgentDeviceDir as us, readViewedDevices as ut, TAILNET_MACHINE_PATTERN as v, HOSTED_APP_CHUNK_BYTES as va, isPathPrefix as vc, readDeviceIdleShutdowns as vi, MEMORY_SOURCES as vn, capDrops as vo, MaintenanceMode as vr, workspaceMetadataFile as vs, diskUsageFailureFile as vt, HOSTED_METRO_GATEWAYS_KEY as w, hostedAppAttempt as wa, validateAutomaticPool as wc, readWorkspaceState as wi, MetroBundleState as wn, recordedBytes as wo, MaintenanceStatus as wr, QueryCriteria as ws, readDiskUsage as wt, findPeer as x, HostedAppOffer as xa, AutomaticPoolRole as xc, readLastBuilds as xi, MachineUsageState as xn, listRecordedDevices as xo, MaintenanceRecord as xr, workspaceStateLock as xs, pullRequestCacheFile as xt, TailnetPeer as y, HostedAppDelivery as ya, loadConfig as yc, readDevicePlacement as yi, MachineOwner as yn, closedSegmentName as yo, MaintenancePass as yr, workspaceRecordingsDir as ys, endedAgentSessionOf as yt, RunEstimates as z, IOS_SIMULATOR_APPS as za, buildSlotsDir as zc, assertHostedDeviceLedger as zi, StatusPayload as zn, deviceViewersDir as zo, hostedAndroidPlacements as zr, recordMatches 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 };