@stim-cli/core 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/{core-BwaxUjLX.mjs → core-DWOUn9xp.mjs} +58 -12
- package/dist/{index-DgLuTAvh.d.mts → index-DPp8a4-9.d.mts} +681 -166
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -1
- package/dist/phone-protocol.d.mts +45 -6
- package/dist/{protocol-BjnE921M.d.mts → protocol-CfT6YiG_.d.mts} +85 -13
- package/dist/protocol.d.mts +2 -2
- package/dist/protocol.mjs +17 -2
- package/dist/receive-protocol.mjs +11436 -7753
- package/dist/state.d.mts +2 -2
- package/dist/state.mjs +1294 -94
- package/package.json +1 -1
|
@@ -1,4 +1,134 @@
|
|
|
1
1
|
import { o as ClaimHandle } from "./ownership-claim-Xxxr9MPp.mjs";
|
|
2
|
+
//#region state/ndjson.d.ts
|
|
3
|
+
interface NdjsonRecord {
|
|
4
|
+
ts?: number;
|
|
5
|
+
src?: string;
|
|
6
|
+
level?: string;
|
|
7
|
+
msg?: string;
|
|
8
|
+
/** With `logs --errors --json`: the code frame and stack lines Expo printed after this error. */
|
|
9
|
+
context?: string[];
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
}
|
|
12
|
+
declare const LEVELS: string[];
|
|
13
|
+
declare const SOURCES: string[];
|
|
14
|
+
declare function levelRank(level?: string): number;
|
|
15
|
+
declare function parseNdjsonLine(line: unknown): NdjsonRecord | null;
|
|
16
|
+
declare function parseNdjsonText(text: unknown): NdjsonRecord[];
|
|
17
|
+
declare function readNdjsonGenerations(file: string): NdjsonRecord[];
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region state/agent-actions.d.ts
|
|
20
|
+
interface DeviceTarget {
|
|
21
|
+
platform: "ios" | "android";
|
|
22
|
+
id: string;
|
|
23
|
+
slot: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
}
|
|
26
|
+
type AgentTarget = DeviceTarget | {
|
|
27
|
+
platform: "macos";
|
|
28
|
+
id: string;
|
|
29
|
+
slot: string;
|
|
30
|
+
bundleId: string;
|
|
31
|
+
launchedAt: number;
|
|
32
|
+
};
|
|
33
|
+
interface AgentActionReaderOptions {
|
|
34
|
+
sessionsDirs: readonly string[] | (() => readonly string[]);
|
|
35
|
+
/** Re-resolved on every read, so a follower picks up a native launch that starts or restarts later. */
|
|
36
|
+
targets?: AgentTarget[] | (() => AgentTarget[]);
|
|
37
|
+
sinceTs?: number;
|
|
38
|
+
now?: () => number;
|
|
39
|
+
claimedDevice?: (session: string, sessionsDir: string) => string | null;
|
|
40
|
+
}
|
|
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[];
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region state/agent-device-usage.d.ts
|
|
49
|
+
interface AgentDeviceUsage {
|
|
50
|
+
version: 1;
|
|
51
|
+
measuredAt: string;
|
|
52
|
+
bytes: number;
|
|
53
|
+
complete: boolean;
|
|
54
|
+
stateDir: {
|
|
55
|
+
dir: string;
|
|
56
|
+
present: boolean;
|
|
57
|
+
bytes: number | null;
|
|
58
|
+
sessions: {
|
|
59
|
+
dir: string;
|
|
60
|
+
bytes: number | null;
|
|
61
|
+
count: number;
|
|
62
|
+
};
|
|
63
|
+
logs: {
|
|
64
|
+
dir: string;
|
|
65
|
+
bytes: number | null;
|
|
66
|
+
};
|
|
67
|
+
other: {
|
|
68
|
+
bytes: number | null;
|
|
69
|
+
largest: {
|
|
70
|
+
name: string;
|
|
71
|
+
bytes: number | null;
|
|
72
|
+
}[];
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
runnerBuilds: {
|
|
76
|
+
dir: string;
|
|
77
|
+
present: boolean;
|
|
78
|
+
bytes: number | null;
|
|
79
|
+
sharedBytes: number | null;
|
|
80
|
+
platforms: {
|
|
81
|
+
platform: string;
|
|
82
|
+
dir: string;
|
|
83
|
+
bytes: number | null;
|
|
84
|
+
entries: {
|
|
85
|
+
name: string;
|
|
86
|
+
dir: string;
|
|
87
|
+
bytes: number | null;
|
|
88
|
+
lastUsedAt: string | null;
|
|
89
|
+
packageVersion: string | null;
|
|
90
|
+
xcodeBuildVersion: string | null;
|
|
91
|
+
inUse: boolean;
|
|
92
|
+
inUseReason: "lease" | "lock" | "unreadable" | null;
|
|
93
|
+
}[];
|
|
94
|
+
}[];
|
|
95
|
+
};
|
|
96
|
+
workspaces: {
|
|
97
|
+
dir: string;
|
|
98
|
+
projectRoot: string | null;
|
|
99
|
+
bytes: number | null;
|
|
100
|
+
}[];
|
|
101
|
+
hosted: {
|
|
102
|
+
dir: string;
|
|
103
|
+
bytes: number | null;
|
|
104
|
+
sessions: number;
|
|
105
|
+
} | null;
|
|
106
|
+
}
|
|
107
|
+
interface AgentDeviceUsageRoots {
|
|
108
|
+
stateDir: string;
|
|
109
|
+
runnerRoot: string;
|
|
110
|
+
hostedDir: string;
|
|
111
|
+
workspaceDirs: string[];
|
|
112
|
+
}
|
|
113
|
+
declare function agentDeviceUsageFile(): string;
|
|
114
|
+
declare function readAgentDeviceUsageCache(): {
|
|
115
|
+
usage: AgentDeviceUsage;
|
|
116
|
+
roots: AgentDeviceUsageRoots;
|
|
117
|
+
} | null;
|
|
118
|
+
declare function readAgentDeviceUsage(): AgentDeviceUsage | null;
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region state/swiftpm-cache-usage.d.ts
|
|
121
|
+
interface SwiftpmCacheUsage {
|
|
122
|
+
version: 1;
|
|
123
|
+
measuredAt: string;
|
|
124
|
+
dir: string;
|
|
125
|
+
present: boolean;
|
|
126
|
+
bytes: number | null;
|
|
127
|
+
complete: boolean;
|
|
128
|
+
}
|
|
129
|
+
declare function swiftpmCacheUsageFile(): string;
|
|
130
|
+
declare function readSwiftpmCacheUsage(): SwiftpmCacheUsage | null;
|
|
131
|
+
//#endregion
|
|
2
132
|
//#region state/build-capacity.d.ts
|
|
3
133
|
declare function buildSlotsDir(): string;
|
|
4
134
|
declare function buildSlotPath(index: number): string;
|
|
@@ -44,6 +174,7 @@ interface BuildMachineCredential {
|
|
|
44
174
|
deviceToken: string;
|
|
45
175
|
state: "pending" | "approved";
|
|
46
176
|
requestedAt: string;
|
|
177
|
+
ticketHash?: string;
|
|
47
178
|
}
|
|
48
179
|
declare function readBuildMachines(): BuildMachineCredential[];
|
|
49
180
|
//#endregion
|
|
@@ -170,6 +301,14 @@ declare function getProject(projectPath: string): ProjectRecord | null;
|
|
|
170
301
|
declare function getConcurrencyLimits({ env }?: {
|
|
171
302
|
env?: NodeJS.ProcessEnv;
|
|
172
303
|
}): ConcurrencyLimits;
|
|
304
|
+
interface ParkedMax {
|
|
305
|
+
max: number;
|
|
306
|
+
error: string | null;
|
|
307
|
+
}
|
|
308
|
+
declare function getParkedMax(platform: "ios" | "android", { config, env }?: {
|
|
309
|
+
config?: Config | null;
|
|
310
|
+
env?: NodeJS.ProcessEnv;
|
|
311
|
+
}): ParkedMax;
|
|
173
312
|
declare function getProjectSettings(projectPath: string): Record<string, unknown>;
|
|
174
313
|
declare function getProjectSetting(projectPath: string, dottedKey: string): unknown;
|
|
175
314
|
declare function getRepoSettings(gitCommonDir: string): Record<string, unknown>;
|
|
@@ -216,23 +355,6 @@ interface EasSessionLedgerRead {
|
|
|
216
355
|
declare function validEasSessionClaim(id: string, value: unknown): EasSessionClaim | null;
|
|
217
356
|
declare function readEasSessionLedger(root?: string): EasSessionLedgerRead;
|
|
218
357
|
//#endregion
|
|
219
|
-
//#region state/ndjson.d.ts
|
|
220
|
-
interface NdjsonRecord {
|
|
221
|
-
ts?: number;
|
|
222
|
-
src?: string;
|
|
223
|
-
level?: string;
|
|
224
|
-
msg?: string;
|
|
225
|
-
/** With `logs --errors --json`: the code frame and stack lines Expo printed after this error. */
|
|
226
|
-
context?: string[];
|
|
227
|
-
[key: string]: unknown;
|
|
228
|
-
}
|
|
229
|
-
declare const LEVELS: string[];
|
|
230
|
-
declare const SOURCES: string[];
|
|
231
|
-
declare function levelRank(level?: string): number;
|
|
232
|
-
declare function parseNdjsonLine(line: unknown): NdjsonRecord | null;
|
|
233
|
-
declare function parseNdjsonText(text: unknown): NdjsonRecord[];
|
|
234
|
-
declare function readNdjsonGenerations(file: string): NdjsonRecord[];
|
|
235
|
-
//#endregion
|
|
236
358
|
//#region state/error-entries.d.ts
|
|
237
359
|
/**
|
|
238
360
|
* The number of rows a log list shows for `records`, an error query's result in log order. Stim Desktop's
|
|
@@ -295,6 +417,9 @@ declare function buildCriteria({ slot, sources, minLevel, since, grep, errorsOnl
|
|
|
295
417
|
declare function logFiles(dir: string): string[];
|
|
296
418
|
declare function fileSizes(dir: string): Record<string, number>;
|
|
297
419
|
declare function readLogRecords(dir: string, include?: (name: string) => boolean): NdjsonRecord[];
|
|
420
|
+
declare const NATIVE_CRASH_LOG_PREFIX = "native-crash-";
|
|
421
|
+
/** Reads the CLI timeline with retained native crash records after other records at the same timestamp. */
|
|
422
|
+
declare function readLogTimeline(dir: string, records?: NdjsonRecord[]): NdjsonRecord[];
|
|
298
423
|
type ExpoContextTarget = "msg" | "field";
|
|
299
424
|
/**
|
|
300
425
|
* Adds the code frame and stack lines Expo printed after each Expo error record, either joined into
|
|
@@ -314,6 +439,8 @@ declare function queryLogs({ slot, dir, records, sources, minLevel, since, grep,
|
|
|
314
439
|
errorContext?: boolean;
|
|
315
440
|
now?: number;
|
|
316
441
|
}): NdjsonRecord[];
|
|
442
|
+
/** Queries the JSON timeline, including Expo context fields on errors as `stim logs --json` does. */
|
|
443
|
+
declare function queryJsonLogs(options?: Parameters<typeof queryLogs>[0]): NdjsonRecord[];
|
|
317
444
|
declare function tailRead(prev: TailState | null | undefined, size: number): {
|
|
318
445
|
start: number;
|
|
319
446
|
prev: TailState;
|
|
@@ -337,6 +464,7 @@ declare function sortByTs(records: NdjsonRecord[]): NdjsonRecord[];
|
|
|
337
464
|
declare function getConfigPath(): string;
|
|
338
465
|
declare function configLockPath(): string;
|
|
339
466
|
declare function workspaceMetadataFile(projectRoot: string): string;
|
|
467
|
+
declare function workspaceAgentDeviceDir(projectRoot: string): string;
|
|
340
468
|
declare function workspaceLogsDir(projectRoot: string): string;
|
|
341
469
|
/** Device screen footage stim-server records for the workspace, one directory per platform and slot. */
|
|
342
470
|
declare function workspaceRecordingsDir(projectRoot: string): string;
|
|
@@ -376,6 +504,17 @@ declare function easSessionLedgerLock(root?: string): string;
|
|
|
376
504
|
/** Where stim-server records, one file per server process, the devices whose frames a client subscribes to. */
|
|
377
505
|
declare function deviceViewersDir(): string;
|
|
378
506
|
declare function statsFile(): string;
|
|
507
|
+
declare function maintenanceDir(): string;
|
|
508
|
+
declare function maintenanceStateFile(): string;
|
|
509
|
+
declare function maintenanceAttemptFile(): string;
|
|
510
|
+
declare function maintenanceNdjsonFile(): string;
|
|
511
|
+
declare function maintenanceChildLogFile(): string;
|
|
512
|
+
declare function maintenanceRunClaims(): string;
|
|
513
|
+
declare function archiveRoot(): string;
|
|
514
|
+
declare function archiveDir(id: string): string;
|
|
515
|
+
declare function archiveLock(): string;
|
|
516
|
+
declare function serverSetupDir(): string;
|
|
517
|
+
declare function setupJournalFile(hash: string): string | null;
|
|
379
518
|
//#endregion
|
|
380
519
|
//#region state/recordings.d.ts
|
|
381
520
|
/** The footage stim-server keeps per device: the last 15 minutes recorded, however long ago. */
|
|
@@ -407,10 +546,10 @@ declare function recordingDeviceName(platform: RecordingPlatform, slot: string):
|
|
|
407
546
|
/** Segment names hold whole milliseconds: the start rounded down and the end rounded up. */
|
|
408
547
|
declare function closedSegmentName(start: number, end: number): string;
|
|
409
548
|
declare function openSegmentName(start: number): string;
|
|
410
|
-
/** The segments in one device directory, oldest first. Files that are not segments are left out. */
|
|
411
|
-
declare function listSegments(dir: string): RecordedSegment[];
|
|
549
|
+
/** The segments in one device directory, oldest first. Files that are not segments are left out; `closedOnly` excludes files still being written. */
|
|
550
|
+
declare function listSegments(dir: string, closedOnly?: boolean): RecordedSegment[];
|
|
412
551
|
/** Every device slot recorded under a workspace's recordings directory. */
|
|
413
|
-
declare function listRecordedDevices(recordingsDir: string): RecordedDevice[];
|
|
552
|
+
declare function listRecordedDevices(recordingsDir: string, closedOnly?: boolean): RecordedDevice[];
|
|
414
553
|
declare function recordedBytes(devices: readonly RecordedDevice[]): number;
|
|
415
554
|
/**
|
|
416
555
|
* The oldest closed segments to delete so that one device keeps at most `footageMs` of footage. Time between
|
|
@@ -447,6 +586,7 @@ type SettingType = {
|
|
|
447
586
|
kind: "number";
|
|
448
587
|
integer?: boolean;
|
|
449
588
|
minimum?: number;
|
|
589
|
+
exclusiveMinimum?: number;
|
|
450
590
|
maximum?: number;
|
|
451
591
|
} | {
|
|
452
592
|
kind: "boolean";
|
|
@@ -464,6 +604,7 @@ type SettingType = {
|
|
|
464
604
|
* `.stim.json` instead of the app's. A `sensitive` value is never printed and is
|
|
465
605
|
* written to `.stim.json` only as an `env:` or `file:` reference. `scopedHomeValue`
|
|
466
606
|
* replaces every layer and the default while STIM_HOME is set and `env` is not.
|
|
607
|
+
* `ciValue` replaces every layer and the default while CI is set and `env` is not.
|
|
467
608
|
* `desktopDefault` replaces `default` on macOS while Stim Desktop is installed.
|
|
468
609
|
*/
|
|
469
610
|
interface SettingDefinition {
|
|
@@ -475,7 +616,8 @@ interface SettingDefinition {
|
|
|
475
616
|
env?: string;
|
|
476
617
|
sensitive?: boolean;
|
|
477
618
|
committedAt?: "repository";
|
|
478
|
-
scopedHomeValue?: number;
|
|
619
|
+
scopedHomeValue?: string | number | boolean;
|
|
620
|
+
ciValue?: string | number | boolean;
|
|
479
621
|
desktopDefault?: string;
|
|
480
622
|
}
|
|
481
623
|
interface SettingEntry {
|
|
@@ -568,6 +710,17 @@ interface HostedAppRecord extends HostedAppDelivery {
|
|
|
568
710
|
declare const HOSTED_APP_CHUNK_BYTES: number;
|
|
569
711
|
declare function hostedAppAttempt(value: unknown): value is string;
|
|
570
712
|
declare function hostedAppArea(session: string, attempt: string, workerHome?: string): string;
|
|
713
|
+
declare function hostedAppBlobs(session: string, workerHome?: string): string;
|
|
714
|
+
/** Transfers cached verification after a rename, only for the same inode, size, mtime and digest. */
|
|
715
|
+
declare function rememberHostedAppBlobRename(from: string, to: string, file: {
|
|
716
|
+
size: number;
|
|
717
|
+
sha256: string;
|
|
718
|
+
}): void;
|
|
719
|
+
/** Checks regular blob bytes, including their size, before content-addressed reuse. */
|
|
720
|
+
declare function validHostedAppBlob(path: string, file: {
|
|
721
|
+
size: number;
|
|
722
|
+
sha256: string;
|
|
723
|
+
}): boolean;
|
|
571
724
|
/** At most 32 plain arguments of 1024 characters (8192 in total), with no NUL, CR or LF. */
|
|
572
725
|
declare function validHostedAppArguments(value: unknown): value is string[];
|
|
573
726
|
declare function parseHostedAppOffer(value: unknown): HostedAppOffer | null;
|
|
@@ -592,20 +745,21 @@ interface HostedMacosDevice extends HostedMacosChoice {
|
|
|
592
745
|
appSlot: number;
|
|
593
746
|
}
|
|
594
747
|
/**
|
|
595
|
-
* The
|
|
596
|
-
* `
|
|
748
|
+
* The agent-device lease owner scope a client names on every request. `deviceKey` is `<bundleId>@<pid>`
|
|
749
|
+
* for a macOS app, or `ios:mobile:<udid>` with `backend: ios-instance` for a hosted simulator, or `android:mobile:<serial>` with `backend: android-instance` for a hosted emulator.
|
|
597
750
|
*/
|
|
598
751
|
interface HostedAgentLease {
|
|
599
752
|
tenant: string;
|
|
600
753
|
runId: string;
|
|
601
754
|
clientId: string;
|
|
602
755
|
deviceKey: string;
|
|
756
|
+
backend?: "ios-instance" | "android-instance";
|
|
603
757
|
}
|
|
604
758
|
/**
|
|
605
759
|
* Agent control the host grants a client for one installed hosted app, sent only over that client's approved
|
|
606
760
|
* device-host connection and never journaled. `none` means the host's `hosting.agentDriver` starts no driver.
|
|
607
761
|
* `path` is the session's base route on the host, `scope` the driver's handle that limits it to this one app,
|
|
608
|
-
* and `lease` the scope the driver's lease
|
|
762
|
+
* and `lease` the scope that pins the driver's lease allocation.
|
|
609
763
|
*/
|
|
610
764
|
type HostedAgentGrant = {
|
|
611
765
|
driver: "none";
|
|
@@ -649,48 +803,132 @@ declare function parseHostedMacosChoice(value: unknown): HostedMacosChoice | nul
|
|
|
649
803
|
declare function parseHostedMacosDevice(value: unknown): HostedMacosDevice | null;
|
|
650
804
|
/** A grant naming a driver this client does not know is not usable; it parses as null. */
|
|
651
805
|
declare function parseHostedAgentGrant(value: unknown): HostedAgentGrant | null;
|
|
806
|
+
declare function parseHostedAgentAccess(value: unknown): HostedAgentAccess | null;
|
|
652
807
|
declare function parseHostedMacosPlacement(value: unknown): HostedMacosPlacement | null;
|
|
653
808
|
//#endregion
|
|
654
|
-
//#region state/
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
809
|
+
//#region state/device-host.d.ts
|
|
810
|
+
type HostedDevicePlatform = "ios" | "android" | "macos";
|
|
811
|
+
interface HostedIosChoice {
|
|
812
|
+
deviceTypeId: string;
|
|
813
|
+
runtimeId: string;
|
|
814
|
+
deviceType: string;
|
|
815
|
+
runtime: string;
|
|
816
|
+
architecture: "arm64" | "x86_64";
|
|
659
817
|
}
|
|
660
|
-
interface
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
finishedAt?: string;
|
|
664
|
-
durationMs?: number;
|
|
665
|
-
error?: string;
|
|
666
|
-
errorCode?: string;
|
|
667
|
-
buildMachine?: string;
|
|
668
|
-
builtOn?: string;
|
|
669
|
-
offloadedTo?: string;
|
|
670
|
-
offloadFallback?: string;
|
|
818
|
+
interface HostedIosDevice extends HostedIosChoice {
|
|
819
|
+
udid: string;
|
|
820
|
+
name: string;
|
|
671
821
|
}
|
|
672
|
-
interface
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
bundle: string;
|
|
677
|
-
bundleId: string;
|
|
678
|
-
executable: string;
|
|
679
|
-
build: MacosBuild;
|
|
680
|
-
supervisor?: MacosProcess;
|
|
681
|
-
app?: MacosProcess;
|
|
682
|
-
/** Set when `stim macos --remote` reserved a session on another Mac; the app then has no local process. */
|
|
683
|
-
host?: HostedMacosPlacement;
|
|
684
|
-
/** Host launch evidence: true for a live app; status can override it in memory after probing the session. */
|
|
685
|
-
hostLaunched?: boolean | "unverified";
|
|
822
|
+
interface HostedAndroidChoice {
|
|
823
|
+
systemImage: string;
|
|
824
|
+
deviceProfile: string;
|
|
825
|
+
architecture: "arm64-v8a" | "x86_64";
|
|
686
826
|
}
|
|
687
|
-
interface
|
|
688
|
-
|
|
827
|
+
interface HostedAndroidDevice extends HostedAndroidChoice {
|
|
828
|
+
avdName: string;
|
|
829
|
+
serial: string;
|
|
830
|
+
consolePort: number;
|
|
689
831
|
}
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
832
|
+
type HostedDevice = HostedIosDevice | HostedAndroidDevice | HostedMacosDevice;
|
|
833
|
+
interface HostedDeviceSelectors {
|
|
834
|
+
deviceType?: string;
|
|
835
|
+
runtime?: string;
|
|
836
|
+
systemImage?: string;
|
|
837
|
+
deviceProfile?: string;
|
|
838
|
+
}
|
|
839
|
+
interface HostedDeviceOfferRequest extends HostedDeviceSelectors {
|
|
840
|
+
platform: HostedDevicePlatform;
|
|
841
|
+
}
|
|
842
|
+
type HostedNativeOffer = {
|
|
843
|
+
resources: {
|
|
844
|
+
cpus: number;
|
|
845
|
+
/** Five-minute system load divided by available CPU count. */
|
|
846
|
+
loadPerCore: number;
|
|
847
|
+
memoryFreeBytes: number;
|
|
848
|
+
memoryPressure: "normal" | "warning" | "critical" | null;
|
|
849
|
+
/** Available bytes on the Stim home volume, not necessarily the Android AVD volume. */
|
|
850
|
+
workerDiskFreeBytes: number | null;
|
|
851
|
+
localDevices?: number | {
|
|
852
|
+
unknown: string;
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
declined: string | null;
|
|
856
|
+
} & ({
|
|
857
|
+
platform: "ios";
|
|
858
|
+
choice: HostedIosChoice | null;
|
|
859
|
+
} | {
|
|
860
|
+
platform: "android";
|
|
861
|
+
choice: HostedAndroidChoice | null;
|
|
862
|
+
} | {
|
|
863
|
+
platform: "macos";
|
|
864
|
+
choice: HostedMacosChoice | null;
|
|
865
|
+
});
|
|
866
|
+
type HostedDeviceOffer = HostedNativeOffer & {
|
|
867
|
+
capacity: {
|
|
868
|
+
running: number;
|
|
869
|
+
max: number;
|
|
870
|
+
available: number | null;
|
|
871
|
+
local?: number | {
|
|
872
|
+
unknown: string;
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
interface HostedDeviceRequest extends HostedDeviceOfferRequest {
|
|
877
|
+
workspace: string;
|
|
878
|
+
slot: string;
|
|
879
|
+
attempt: string;
|
|
880
|
+
}
|
|
881
|
+
type HostedDevicePhase = "preparing" | "ready" | "stopping" | "stopped" | "unknown";
|
|
882
|
+
interface HostedDeviceSession extends HostedDeviceRequest {
|
|
883
|
+
id: string;
|
|
884
|
+
client: string;
|
|
885
|
+
state: HostedDevicePhase;
|
|
886
|
+
device: HostedDevice | null;
|
|
887
|
+
consolePort?: number;
|
|
888
|
+
appSlot?: number;
|
|
889
|
+
createdAt: string;
|
|
890
|
+
parked?: {
|
|
891
|
+
at: string;
|
|
892
|
+
};
|
|
893
|
+
notice?: string;
|
|
894
|
+
appAttempt?: string;
|
|
895
|
+
agent?: HostedAgentGrant;
|
|
896
|
+
metroPort?: number;
|
|
897
|
+
clientMetroPort?: number;
|
|
898
|
+
}
|
|
899
|
+
declare function deviceHostRoot(): string;
|
|
900
|
+
declare function deviceHostArea(id: string): string;
|
|
901
|
+
declare function parseHostedChoice(value: unknown): HostedIosChoice | null;
|
|
902
|
+
declare function parseHostedDevice(value: unknown): HostedIosDevice | null;
|
|
903
|
+
declare function parseHostedAndroidDevice(value: unknown): HostedAndroidDevice | null;
|
|
904
|
+
/** Android Emulator -help-port defines the supported even console ports as 5554 through 5584. */
|
|
905
|
+
declare function hostedConsolePort(value: unknown): value is number;
|
|
906
|
+
declare function parseHostedPlatformDevice(value: unknown, platform: HostedDevicePlatform): HostedDevice | null;
|
|
907
|
+
declare function hostedDeviceId(device: HostedDevice): string;
|
|
908
|
+
declare function parseHostedRequest(value: unknown): HostedDeviceRequest | null;
|
|
909
|
+
declare function parseHostedOfferRequest(value: unknown): HostedDeviceOfferRequest | null;
|
|
910
|
+
declare function parseHostedLocalDeviceCount(value: unknown): number | {
|
|
911
|
+
unknown: string;
|
|
912
|
+
} | null;
|
|
913
|
+
declare function parseHostedNativeOffer(value: unknown): HostedNativeOffer | null;
|
|
914
|
+
/** A missing established journal or malformed record is a refusal, never an empty reservation set. */
|
|
915
|
+
declare function readHostedSessions(): HostedDeviceSession[];
|
|
916
|
+
/** The private worker's exact device record; an absent record is unresolved after creation started. */
|
|
917
|
+
declare function readHostedDevice(home: string): HostedIosDevice;
|
|
918
|
+
declare function readHostedDevice(home: string, platform: "android"): HostedAndroidDevice;
|
|
919
|
+
declare function readHostedDevice(home: string, platform: "macos"): HostedMacosDevice;
|
|
920
|
+
declare function readHostedDevice(home: string, platform: HostedDevicePlatform): HostedDevice;
|
|
921
|
+
declare function readHostedDeviceLedger(home: string, options?: {
|
|
922
|
+
required?: boolean;
|
|
923
|
+
}): {
|
|
924
|
+
ios: string[];
|
|
925
|
+
android: string[];
|
|
926
|
+
web: string[];
|
|
927
|
+
} | null;
|
|
928
|
+
/** Hosted sessions use isolated homes: only one exact device of their platform may appear in this ledger. */
|
|
929
|
+
declare function assertHostedDeviceLedger(home: string, id: string, platform?: HostedDevicePlatform, options?: {
|
|
930
|
+
allowEmpty?: boolean;
|
|
931
|
+
}): "listed" | "empty";
|
|
694
932
|
//#endregion
|
|
695
933
|
//#region state/workspace-state.d.ts
|
|
696
934
|
interface WorkspaceState {
|
|
@@ -710,11 +948,13 @@ interface IdleStopRecord {
|
|
|
710
948
|
idleMinutes: number;
|
|
711
949
|
}
|
|
712
950
|
declare function readIdleStop(state: WorkspaceState | null | undefined): IdleStopRecord | null;
|
|
951
|
+
declare const DEVICE_RECLAIM_REASON = "reclaimed for a waiting run";
|
|
713
952
|
declare const DEVICE_IDLE_SHUTDOWN_KEY = "deviceIdleShutdowns";
|
|
714
|
-
/** An owned simulator or emulator
|
|
953
|
+
/** An owned simulator or emulator shut down after being idle. */
|
|
715
954
|
interface DeviceIdleShutdownRecord {
|
|
716
955
|
at: string;
|
|
717
956
|
idleMinutes: number;
|
|
957
|
+
reason?: string;
|
|
718
958
|
}
|
|
719
959
|
/** The recorded idle shutdowns by device slot key (`ios`, `android`, `ios:<slot>`). */
|
|
720
960
|
declare function readDeviceIdleShutdowns(state: WorkspaceState | null | undefined): Record<string, DeviceIdleShutdownRecord>;
|
|
@@ -768,6 +1008,7 @@ declare function parseMissReason(value: unknown): BuildMissReason | null;
|
|
|
768
1008
|
* ones with a source position first.
|
|
769
1009
|
*/
|
|
770
1010
|
declare function buildDiagnostics(value: unknown): BuildDiagnostic[];
|
|
1011
|
+
declare function readDevicePlacement(state: WorkspaceState | null, platform: StatsPlatform, slot?: string): DevicePlacement | null;
|
|
771
1012
|
declare function readLastBuilds(state: WorkspaceState | null | undefined): Partial<Record<StatsPlatform, LastBuildReport>>;
|
|
772
1013
|
/** Each platform's recorded runs, newest first, at most `BUILD_HISTORY_LIMIT` each. */
|
|
773
1014
|
declare function readBuildHistory(state: WorkspaceState | null | undefined): Partial<Record<StatsPlatform, BuildHistoryEntry[]>>;
|
|
@@ -801,6 +1042,254 @@ declare const WORKSPACE_AGENT_KEY = "agentSession";
|
|
|
801
1042
|
*/
|
|
802
1043
|
declare function readWorkspaceAgent(state: WorkspaceState | null | undefined): AgentSession | null;
|
|
803
1044
|
//#endregion
|
|
1045
|
+
//#region state/hosted-native.d.ts
|
|
1046
|
+
interface HostedNativePlacement<D> {
|
|
1047
|
+
machine: string;
|
|
1048
|
+
session: string;
|
|
1049
|
+
appAttempt: string;
|
|
1050
|
+
device: D | null;
|
|
1051
|
+
selected: string;
|
|
1052
|
+
reason?: string;
|
|
1053
|
+
agent: HostedAgentAccess;
|
|
1054
|
+
}
|
|
1055
|
+
declare function parseHostedNativePlacement(value: unknown, platform: "ios"): HostedNativePlacement<HostedIosDevice> | null;
|
|
1056
|
+
declare function parseHostedNativePlacement(value: unknown, platform: "android"): HostedNativePlacement<HostedAndroidDevice> | null;
|
|
1057
|
+
declare function parseHostedNativePlacement(value: unknown, platform: "ios" | "android"): HostedNativePlacement<HostedIosDevice | HostedAndroidDevice> | null;
|
|
1058
|
+
declare function hostedNativeRecords(state: WorkspaceState | null, platform: "ios" | "android"): Record<string, unknown>;
|
|
1059
|
+
declare function unreadableHostedNative(slot: string, platform: "ios" | "android"): string;
|
|
1060
|
+
//#endregion
|
|
1061
|
+
//#region state/hosted-android.d.ts
|
|
1062
|
+
/** A workspace slot's placement; null device means its reservation has not reached ready yet. */
|
|
1063
|
+
interface HostedAndroidPlacement extends HostedNativePlacement<HostedAndroidDevice> {}
|
|
1064
|
+
/** Public hosting facts; the host's serial, AVD name and private Metro gateway are excluded. */
|
|
1065
|
+
type HostedAndroidStatus = Pick<HostedAndroidPlacement, "machine" | "session" | "selected" | "reason" | "agent"> & {
|
|
1066
|
+
device: {
|
|
1067
|
+
name: string;
|
|
1068
|
+
systemImage: string;
|
|
1069
|
+
api: number;
|
|
1070
|
+
} | null;
|
|
1071
|
+
/** The latest session probe in status, independent of a conflicting local emulator's state. */
|
|
1072
|
+
state?: string;
|
|
1073
|
+
};
|
|
1074
|
+
declare function parseHostedAndroidPlacement(value: unknown): HostedAndroidPlacement | null;
|
|
1075
|
+
declare function hostedAndroidStatus(placement: HostedAndroidPlacement): HostedAndroidStatus;
|
|
1076
|
+
declare function hostedAndroidRecords(state: WorkspaceState | null): Record<string, unknown>;
|
|
1077
|
+
declare function unreadableHostedAndroid(slot: string): string;
|
|
1078
|
+
declare function hostedAndroidPlacements(state: WorkspaceState | null): Record<string, HostedAndroidPlacement>;
|
|
1079
|
+
declare function hostedAndroidDeviceName(device: HostedAndroidDevice): string;
|
|
1080
|
+
//#endregion
|
|
1081
|
+
//#region state/hosted-ios.d.ts
|
|
1082
|
+
/** A workspace slot's placement; null device means its reservation has not reached ready yet. */
|
|
1083
|
+
interface HostedIosPlacement extends HostedNativePlacement<HostedIosDevice> {}
|
|
1084
|
+
/** Public hosting facts; the host's UDID and private Metro gateway are excluded. */
|
|
1085
|
+
type HostedIosStatus = Pick<HostedIosPlacement, "machine" | "session" | "selected" | "reason" | "agent"> & {
|
|
1086
|
+
device: {
|
|
1087
|
+
name: string;
|
|
1088
|
+
runtime: string;
|
|
1089
|
+
} | null;
|
|
1090
|
+
/** The latest session probe in status, independent of a conflicting local simulator's state. */
|
|
1091
|
+
state?: string;
|
|
1092
|
+
};
|
|
1093
|
+
declare function parseHostedIosPlacement(value: unknown): HostedIosPlacement | null;
|
|
1094
|
+
declare function hostedIosStatus(placement: HostedIosPlacement): HostedIosStatus;
|
|
1095
|
+
declare function hostedIosRecords(state: WorkspaceState | null): Record<string, unknown>;
|
|
1096
|
+
declare function unreadableHostedIos(slot: string): string;
|
|
1097
|
+
declare function hostedIosPlacements(state: WorkspaceState | null): Record<string, HostedIosPlacement>;
|
|
1098
|
+
//#endregion
|
|
1099
|
+
//#region state/maintenance.d.ts
|
|
1100
|
+
type MaintenanceMode = "off" | "report";
|
|
1101
|
+
type MaintenanceCheck = "pressure" | "size";
|
|
1102
|
+
type MaintenanceActionKind = "would-clear-outputs" | "would-trim-cache" | "would-empty-cache" | "would-shutdown-device" | "would-stop-workspace";
|
|
1103
|
+
interface MaintenanceAction {
|
|
1104
|
+
kind: MaintenanceActionKind;
|
|
1105
|
+
target: string;
|
|
1106
|
+
bytes: number;
|
|
1107
|
+
reason: string;
|
|
1108
|
+
workspace?: string;
|
|
1109
|
+
}
|
|
1110
|
+
interface MaintenanceSize {
|
|
1111
|
+
name: string;
|
|
1112
|
+
dir: string;
|
|
1113
|
+
bytes: number;
|
|
1114
|
+
measuredAt: number;
|
|
1115
|
+
category: "workspace-outputs" | "build-cache" | "metro-cache" | "compilation-cache" | "ccache" | "other";
|
|
1116
|
+
workspace?: string;
|
|
1117
|
+
idleDays?: number | null;
|
|
1118
|
+
blocked?: string;
|
|
1119
|
+
}
|
|
1120
|
+
interface MaintenancePressure {
|
|
1121
|
+
disk: {
|
|
1122
|
+
volume: string;
|
|
1123
|
+
freeMb: number;
|
|
1124
|
+
}[];
|
|
1125
|
+
memory: {
|
|
1126
|
+
level: "normal" | "warning" | "critical" | null;
|
|
1127
|
+
availableBytes: number | null;
|
|
1128
|
+
pressured: boolean;
|
|
1129
|
+
};
|
|
1130
|
+
warningSince: number | null;
|
|
1131
|
+
}
|
|
1132
|
+
interface MaintenancePass {
|
|
1133
|
+
startedAt: number;
|
|
1134
|
+
durationMs: number;
|
|
1135
|
+
trigger: string;
|
|
1136
|
+
mode: "report";
|
|
1137
|
+
freedBytes: 0;
|
|
1138
|
+
actions: number;
|
|
1139
|
+
stopped: 0;
|
|
1140
|
+
blocked: string[];
|
|
1141
|
+
}
|
|
1142
|
+
interface MaintenanceRecord extends NdjsonRecord {
|
|
1143
|
+
ts: number;
|
|
1144
|
+
src: "maintenance";
|
|
1145
|
+
level: "debug" | "info" | "warn" | "error";
|
|
1146
|
+
msg: string;
|
|
1147
|
+
event: "maintenance_pass" | "maintenance_action" | "maintenance_skip" | "maintenance_failure" | "maintenance_check";
|
|
1148
|
+
pass: string;
|
|
1149
|
+
trigger: string;
|
|
1150
|
+
mode: "report";
|
|
1151
|
+
}
|
|
1152
|
+
/** Version 1 contains report-only observations; every action is a plan and no resource was reclaimed. */
|
|
1153
|
+
interface MaintenanceState {
|
|
1154
|
+
version: 1;
|
|
1155
|
+
lastAt: Partial<Record<MaintenanceCheck, number>>;
|
|
1156
|
+
deferredAt?: Partial<Record<MaintenanceCheck, number>>;
|
|
1157
|
+
pressure: MaintenancePressure | null;
|
|
1158
|
+
sizes: MaintenanceSize[];
|
|
1159
|
+
lastPass: MaintenancePass | null;
|
|
1160
|
+
recent: MaintenanceRecord[];
|
|
1161
|
+
plan: MaintenanceAction[];
|
|
1162
|
+
skipKeys?: string[];
|
|
1163
|
+
}
|
|
1164
|
+
interface MaintenanceStatus {
|
|
1165
|
+
mode: MaintenanceMode;
|
|
1166
|
+
invalid?: string;
|
|
1167
|
+
claim?: {
|
|
1168
|
+
unresolved: string;
|
|
1169
|
+
removeCommand: string;
|
|
1170
|
+
};
|
|
1171
|
+
lastChecks: {
|
|
1172
|
+
pressure: number | null;
|
|
1173
|
+
size: number | null;
|
|
1174
|
+
};
|
|
1175
|
+
pressure: MaintenancePressure | null;
|
|
1176
|
+
sizes: MaintenanceSize[];
|
|
1177
|
+
lastPass: MaintenancePass | null;
|
|
1178
|
+
running: {
|
|
1179
|
+
startedAt: string;
|
|
1180
|
+
trigger: string;
|
|
1181
|
+
} | null;
|
|
1182
|
+
recent: MaintenanceRecord[];
|
|
1183
|
+
plan: MaintenanceAction[];
|
|
1184
|
+
}
|
|
1185
|
+
/** Rejects missing, corrupt or unsupported payloads without throwing. */
|
|
1186
|
+
declare function parseMaintenanceState(value: unknown): MaintenanceState | null;
|
|
1187
|
+
declare function readMaintenanceState(): MaintenanceState | null;
|
|
1188
|
+
declare function readMaintenanceAttempt(): number | undefined;
|
|
1189
|
+
//#endregion
|
|
1190
|
+
//#region state/archive.d.ts
|
|
1191
|
+
interface ArchivedBytes {
|
|
1192
|
+
logs: number;
|
|
1193
|
+
recordings: number;
|
|
1194
|
+
agentActions: number;
|
|
1195
|
+
record: number;
|
|
1196
|
+
total: number;
|
|
1197
|
+
}
|
|
1198
|
+
interface ArchivedWorkspace {
|
|
1199
|
+
id: string;
|
|
1200
|
+
projectRoot: string;
|
|
1201
|
+
project: string;
|
|
1202
|
+
workspace: string;
|
|
1203
|
+
worktree: {
|
|
1204
|
+
repository: string | null;
|
|
1205
|
+
branch: string | null;
|
|
1206
|
+
head: string | null;
|
|
1207
|
+
subject: string | null;
|
|
1208
|
+
merged: boolean | null;
|
|
1209
|
+
pullRequest: {
|
|
1210
|
+
number: number;
|
|
1211
|
+
state: string;
|
|
1212
|
+
title: string;
|
|
1213
|
+
url: string;
|
|
1214
|
+
} | null;
|
|
1215
|
+
};
|
|
1216
|
+
removedAt: string;
|
|
1217
|
+
removedBy: string;
|
|
1218
|
+
lastUsedAt: string | null;
|
|
1219
|
+
builds: {
|
|
1220
|
+
count: number;
|
|
1221
|
+
last: LastBuildReport | null;
|
|
1222
|
+
lastErrorCount: number;
|
|
1223
|
+
};
|
|
1224
|
+
agents: EndedAgentSession[];
|
|
1225
|
+
bytes: ArchivedBytes;
|
|
1226
|
+
expires: {
|
|
1227
|
+
logs: string | null;
|
|
1228
|
+
recordings: string | null;
|
|
1229
|
+
agentActions: string | null;
|
|
1230
|
+
record: string | null;
|
|
1231
|
+
};
|
|
1232
|
+
version: number;
|
|
1233
|
+
replacedBy?: string;
|
|
1234
|
+
}
|
|
1235
|
+
interface ArchivedUsage {
|
|
1236
|
+
count: number;
|
|
1237
|
+
bytes: number;
|
|
1238
|
+
byKind: {
|
|
1239
|
+
logs: number;
|
|
1240
|
+
recordings: number;
|
|
1241
|
+
agentActions: number;
|
|
1242
|
+
record: number;
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
|
+
declare function readArchives(): ArchivedWorkspace[];
|
|
1246
|
+
declare function readArchive(id: string): ArchivedWorkspace | null;
|
|
1247
|
+
declare function readArchiveState(id: string): WorkspaceState | null;
|
|
1248
|
+
declare function archivedUsage(archives: readonly ArchivedWorkspace[]): ArchivedUsage;
|
|
1249
|
+
declare function linkReplacedArchives(archives: readonly ArchivedWorkspace[], paths: readonly string[]): ArchivedWorkspace[];
|
|
1250
|
+
declare function archiveEnabled(env: NodeJS.ProcessEnv, layers: readonly unknown[]): boolean;
|
|
1251
|
+
//#endregion
|
|
1252
|
+
//#region state/macos.d.ts
|
|
1253
|
+
interface MacosProcess {
|
|
1254
|
+
pid: number;
|
|
1255
|
+
processToken: string;
|
|
1256
|
+
startedAtMicros: number;
|
|
1257
|
+
}
|
|
1258
|
+
interface MacosBuild {
|
|
1259
|
+
state: "running" | "ok" | "failed";
|
|
1260
|
+
startedAt: string;
|
|
1261
|
+
finishedAt?: string;
|
|
1262
|
+
durationMs?: number;
|
|
1263
|
+
error?: string;
|
|
1264
|
+
errorCode?: string;
|
|
1265
|
+
buildMachine?: string;
|
|
1266
|
+
builtOn?: string;
|
|
1267
|
+
offloadedTo?: string;
|
|
1268
|
+
offloadFallback?: string;
|
|
1269
|
+
}
|
|
1270
|
+
interface MacosAppRecord {
|
|
1271
|
+
launchId: string;
|
|
1272
|
+
arguments: string[];
|
|
1273
|
+
product: string;
|
|
1274
|
+
bundle: string;
|
|
1275
|
+
bundleId: string;
|
|
1276
|
+
executable: string;
|
|
1277
|
+
build: MacosBuild;
|
|
1278
|
+
supervisor?: MacosProcess;
|
|
1279
|
+
app?: MacosProcess;
|
|
1280
|
+
/** Set when `stim macos --remote` reserved a session on another Mac; the app then has no local process. */
|
|
1281
|
+
host?: HostedMacosPlacement;
|
|
1282
|
+
/** Host launch evidence: true for a live app; status can override it in memory after probing the session. */
|
|
1283
|
+
hostLaunched?: boolean | "unverified";
|
|
1284
|
+
}
|
|
1285
|
+
interface MacosAppState extends MacosAppRecord {
|
|
1286
|
+
state: "running" | "orphaned" | "stopped" | "unverified";
|
|
1287
|
+
}
|
|
1288
|
+
declare function parseMacosRecord(value: unknown): MacosAppRecord | null;
|
|
1289
|
+
declare function readMacosRecord(root: string): MacosAppRecord | null;
|
|
1290
|
+
declare function readHostedMacosApp(home: string): MacosAppRecord | null;
|
|
1291
|
+
declare function macosAppState(record: MacosAppRecord | null): MacosAppState | null;
|
|
1292
|
+
//#endregion
|
|
804
1293
|
//#region state/status.d.ts
|
|
805
1294
|
type StatsPlatform = "ios" | "android";
|
|
806
1295
|
type RunOutcomeKind = "hit" | "cold";
|
|
@@ -817,6 +1306,12 @@ type BuildPlacement = "local" | {
|
|
|
817
1306
|
startedAt: string;
|
|
818
1307
|
phaseStartedAt: string;
|
|
819
1308
|
};
|
|
1309
|
+
interface BuildWaitingFor {
|
|
1310
|
+
kind: "build-slot" | "device-slot";
|
|
1311
|
+
inUse: number;
|
|
1312
|
+
max: number;
|
|
1313
|
+
since: string;
|
|
1314
|
+
}
|
|
820
1315
|
interface BuildReport {
|
|
821
1316
|
platform: StatsPlatform;
|
|
822
1317
|
slot: string;
|
|
@@ -831,6 +1326,8 @@ interface BuildReport {
|
|
|
831
1326
|
cacheLookupOutcome?: "hit" | "miss";
|
|
832
1327
|
expectedMs: number | null;
|
|
833
1328
|
expectedPhaseMs: number | null;
|
|
1329
|
+
/** Milliseconds spent in phases already left; sums repeat visits, excludes the current visit, and is omitted before any phase completes and by older Stim. */
|
|
1330
|
+
completedPhaseMs?: Partial<Record<BuildPhase, number>>;
|
|
834
1331
|
basis: number;
|
|
835
1332
|
/**
|
|
836
1333
|
* The phases a run like this one goes through, in order, with each one's median in milliseconds, from the same
|
|
@@ -851,6 +1348,7 @@ interface BuildReport {
|
|
|
851
1348
|
waitingOn?: {
|
|
852
1349
|
path: string;
|
|
853
1350
|
};
|
|
1351
|
+
waitingFor?: BuildWaitingFor;
|
|
854
1352
|
}
|
|
855
1353
|
/** One phase a running build is expected to go through, and its median duration in comparable runs. */
|
|
856
1354
|
interface PlannedPhase {
|
|
@@ -878,7 +1376,13 @@ interface BuildDetail {
|
|
|
878
1376
|
/** Where a build's app came from: a cache tier, or `false` when it compiled or failed before one was found. */
|
|
879
1377
|
type BuildCacheHit = "local" | "remote" | false;
|
|
880
1378
|
/** A platform's most recent `ios` or `android` run in one workspace. */
|
|
1379
|
+
interface DevicePlacement {
|
|
1380
|
+
decision: "local" | "hosted" | "waited-locally";
|
|
1381
|
+
reason: string;
|
|
1382
|
+
machine?: string;
|
|
1383
|
+
}
|
|
881
1384
|
interface LastBuildReport {
|
|
1385
|
+
devicePlacement?: DevicePlacement;
|
|
882
1386
|
platform: StatsPlatform;
|
|
883
1387
|
status: "ok" | "failed";
|
|
884
1388
|
cacheHit: BuildCacheHit;
|
|
@@ -1274,6 +1778,8 @@ interface MetroBundleState {
|
|
|
1274
1778
|
};
|
|
1275
1779
|
}
|
|
1276
1780
|
interface SimulatorState {
|
|
1781
|
+
devicePlacement?: DevicePlacement;
|
|
1782
|
+
host?: HostedIosStatus;
|
|
1277
1783
|
name: string | null;
|
|
1278
1784
|
udid: string;
|
|
1279
1785
|
owned: boolean;
|
|
@@ -1283,24 +1789,28 @@ interface SimulatorState {
|
|
|
1283
1789
|
appPresence?: AppPresence;
|
|
1284
1790
|
/** The simulator's data folder, for an owned simulator once measured. */
|
|
1285
1791
|
disk?: DiskMeasure;
|
|
1286
|
-
/** Present while the device is not booted after
|
|
1792
|
+
/** Present while the device is not booted after idle shutdown or queue reclaim. */
|
|
1287
1793
|
idleShutdown?: DeviceIdleShutdownRecord;
|
|
1288
1794
|
}
|
|
1289
1795
|
interface AndroidDeviceState {
|
|
1796
|
+
devicePlacement?: DevicePlacement;
|
|
1797
|
+
host?: HostedAndroidStatus;
|
|
1290
1798
|
name: string | undefined;
|
|
1291
1799
|
owned: boolean;
|
|
1292
1800
|
physical: boolean;
|
|
1293
1801
|
serial?: string | null;
|
|
1294
|
-
state?: AndroidRuntimeFacts["state"];
|
|
1802
|
+
state?: AndroidRuntimeFacts["state"] | "ready" | "stopped" | "unverified";
|
|
1295
1803
|
deviceProfile?: string | null;
|
|
1296
1804
|
activity?: DeviceActivity;
|
|
1297
1805
|
app?: DeviceAppProcess;
|
|
1298
1806
|
appPresence?: AppPresence;
|
|
1299
1807
|
/** The AVD's folder, for an owned emulator once measured. */
|
|
1300
1808
|
disk?: DiskMeasure;
|
|
1301
|
-
/** Present while the emulator is not running after
|
|
1809
|
+
/** Present while the emulator is not running after idle shutdown or queue reclaim. */
|
|
1302
1810
|
idleShutdown?: DeviceIdleShutdownRecord;
|
|
1303
1811
|
}
|
|
1812
|
+
/** The tutorial format version the installed Stim writes into the tutorial app. */
|
|
1813
|
+
declare const TUTORIAL_VERSION = 1;
|
|
1304
1814
|
interface EnvironmentState {
|
|
1305
1815
|
slots?: {
|
|
1306
1816
|
slot: string;
|
|
@@ -1308,6 +1818,12 @@ interface EnvironmentState {
|
|
|
1308
1818
|
android: AndroidDeviceState | null | undefined;
|
|
1309
1819
|
}[];
|
|
1310
1820
|
path: string;
|
|
1821
|
+
/** Statically detected app platforms; always set by status, empty when none are detected. */
|
|
1822
|
+
platforms?: string[];
|
|
1823
|
+
/** Present when the app's app.json sets expo.extra.stimTutorial to a positive integer: that version. */
|
|
1824
|
+
tutorial?: {
|
|
1825
|
+
version: number;
|
|
1826
|
+
};
|
|
1311
1827
|
live: boolean;
|
|
1312
1828
|
phase?: WorkspacePhase;
|
|
1313
1829
|
/** When the warm started (`warming`) or finished (`ready`); null for `live` and `idle`. */
|
|
@@ -1362,6 +1878,9 @@ interface EnvironmentState {
|
|
|
1362
1878
|
dir: string;
|
|
1363
1879
|
errorsSinceMarker: number;
|
|
1364
1880
|
} | null;
|
|
1881
|
+
agentDevice?: {
|
|
1882
|
+
stateDir: string;
|
|
1883
|
+
};
|
|
1365
1884
|
worktree?: WorktreeFacts | null;
|
|
1366
1885
|
remoteDevices?: RemoteDeviceState[];
|
|
1367
1886
|
/** The physical devices this workspace leases, in every slot; absent when it leases none. */
|
|
@@ -1438,6 +1957,9 @@ interface MachineUsageState {
|
|
|
1438
1957
|
}
|
|
1439
1958
|
/** The payload `stim status --json` prints, and `status --watch --json` prints on each change. */
|
|
1440
1959
|
interface StatusPayload {
|
|
1960
|
+
maintenance?: MaintenanceStatus;
|
|
1961
|
+
archived?: ArchivedWorkspace[];
|
|
1962
|
+
archivedUsage?: ArchivedUsage;
|
|
1441
1963
|
environments: (EnvironmentState & {
|
|
1442
1964
|
labelOnly?: true;
|
|
1443
1965
|
})[];
|
|
@@ -1564,10 +2086,34 @@ interface StatsPlacement {
|
|
|
1564
2086
|
reason: string;
|
|
1565
2087
|
machine?: string;
|
|
1566
2088
|
buildMs?: number;
|
|
2089
|
+
slotWaitMs?: number;
|
|
2090
|
+
deviceSlotWaitMs?: number;
|
|
1567
2091
|
/** The project's last cold build here before this run. */
|
|
1568
2092
|
localEstimateMs?: number;
|
|
1569
2093
|
failed?: true;
|
|
1570
2094
|
}
|
|
2095
|
+
declare const CAPACITY_REFUSAL_LIMIT = 50;
|
|
2096
|
+
declare const CAPACITY_REFUSAL_MAX_AGE_MS: number;
|
|
2097
|
+
interface StatsCapacityRefusal {
|
|
2098
|
+
at: string;
|
|
2099
|
+
kind: "device";
|
|
2100
|
+
platform: StatsPlatform;
|
|
2101
|
+
max: number;
|
|
2102
|
+
workspace: string;
|
|
2103
|
+
}
|
|
2104
|
+
interface StatsCapacityWait {
|
|
2105
|
+
at: string;
|
|
2106
|
+
kind: "device-wait";
|
|
2107
|
+
reclaimed?: number;
|
|
2108
|
+
platform: StatsPlatform;
|
|
2109
|
+
ms: number;
|
|
2110
|
+
max: number;
|
|
2111
|
+
workspace: string;
|
|
2112
|
+
}
|
|
2113
|
+
declare function trimCapacityRefusals<T extends {
|
|
2114
|
+
at: string;
|
|
2115
|
+
}>(events: T[], now: number): T[];
|
|
2116
|
+
declare const trimCapacityWaits: (events: StatsCapacityWait[], now: number) => StatsCapacityWait[];
|
|
1571
2117
|
interface BuildMachineTotals {
|
|
1572
2118
|
offloaded: number;
|
|
1573
2119
|
offloadedMs: number;
|
|
@@ -1583,6 +2129,8 @@ interface StatsRecord {
|
|
|
1583
2129
|
projects: Record<string, StatsScope>;
|
|
1584
2130
|
history?: Record<string, RunHistory>;
|
|
1585
2131
|
placements?: StatsPlacement[];
|
|
2132
|
+
capacityRefusals?: StatsCapacityRefusal[];
|
|
2133
|
+
capacityWaits?: StatsCapacityWait[];
|
|
1586
2134
|
buildMachines?: Record<string, BuildMachineTotals>;
|
|
1587
2135
|
}
|
|
1588
2136
|
/**
|
|
@@ -1646,6 +2194,10 @@ interface StatsReport {
|
|
|
1646
2194
|
android: StatsBucket | null;
|
|
1647
2195
|
};
|
|
1648
2196
|
offload: OffloadSummary;
|
|
2197
|
+
capacityRefusals?: StatsCapacityRefusal[];
|
|
2198
|
+
capacityWaits?: StatsCapacityWait[];
|
|
2199
|
+
agentDevice: AgentDeviceUsage | null;
|
|
2200
|
+
swiftpmCache: SwiftpmCacheUsage | null;
|
|
1649
2201
|
}
|
|
1650
2202
|
declare function readStatsReport(key: string | null, now: number): {
|
|
1651
2203
|
report: StatsReport;
|
|
@@ -1653,107 +2205,6 @@ declare function readStatsReport(key: string | null, now: number): {
|
|
|
1653
2205
|
};
|
|
1654
2206
|
declare function findProjectRoot(startDir: string): string | null;
|
|
1655
2207
|
//#endregion
|
|
1656
|
-
//#region state/device-host.d.ts
|
|
1657
|
-
type HostedDevicePlatform = "ios" | "android" | "macos";
|
|
1658
|
-
interface HostedIosChoice {
|
|
1659
|
-
deviceTypeId: string;
|
|
1660
|
-
runtimeId: string;
|
|
1661
|
-
deviceType: string;
|
|
1662
|
-
runtime: string;
|
|
1663
|
-
architecture: "arm64" | "x86_64";
|
|
1664
|
-
}
|
|
1665
|
-
interface HostedIosDevice extends HostedIosChoice {
|
|
1666
|
-
udid: string;
|
|
1667
|
-
name: string;
|
|
1668
|
-
}
|
|
1669
|
-
interface HostedAndroidChoice {
|
|
1670
|
-
systemImage: string;
|
|
1671
|
-
deviceProfile: string;
|
|
1672
|
-
architecture: "arm64-v8a" | "x86_64";
|
|
1673
|
-
}
|
|
1674
|
-
interface HostedAndroidDevice extends HostedAndroidChoice {
|
|
1675
|
-
avdName: string;
|
|
1676
|
-
serial: string;
|
|
1677
|
-
consolePort: number;
|
|
1678
|
-
}
|
|
1679
|
-
type HostedDevice = HostedIosDevice | HostedAndroidDevice | HostedMacosDevice;
|
|
1680
|
-
interface HostedDeviceSelectors {
|
|
1681
|
-
deviceType?: string;
|
|
1682
|
-
runtime?: string;
|
|
1683
|
-
systemImage?: string;
|
|
1684
|
-
deviceProfile?: string;
|
|
1685
|
-
}
|
|
1686
|
-
interface HostedDeviceOfferRequest extends HostedDeviceSelectors {
|
|
1687
|
-
platform: HostedDevicePlatform;
|
|
1688
|
-
}
|
|
1689
|
-
type HostedNativeOffer = {
|
|
1690
|
-
resources: {
|
|
1691
|
-
cpus: number;
|
|
1692
|
-
/** Five-minute system load divided by available CPU count. */
|
|
1693
|
-
loadPerCore: number;
|
|
1694
|
-
memoryFreeBytes: number;
|
|
1695
|
-
memoryPressure: "normal" | "warning" | "critical" | null;
|
|
1696
|
-
/** Available bytes on the Stim home volume, not necessarily the Android AVD volume. */
|
|
1697
|
-
workerDiskFreeBytes: number | null;
|
|
1698
|
-
};
|
|
1699
|
-
declined: string | null;
|
|
1700
|
-
} & ({
|
|
1701
|
-
platform: "ios";
|
|
1702
|
-
choice: HostedIosChoice | null;
|
|
1703
|
-
} | {
|
|
1704
|
-
platform: "android";
|
|
1705
|
-
choice: HostedAndroidChoice | null;
|
|
1706
|
-
} | {
|
|
1707
|
-
platform: "macos";
|
|
1708
|
-
choice: HostedMacosChoice | null;
|
|
1709
|
-
});
|
|
1710
|
-
type HostedDeviceOffer = HostedNativeOffer & {
|
|
1711
|
-
capacity: {
|
|
1712
|
-
running: number;
|
|
1713
|
-
max: number;
|
|
1714
|
-
available: number | null;
|
|
1715
|
-
};
|
|
1716
|
-
};
|
|
1717
|
-
interface HostedDeviceRequest extends HostedDeviceOfferRequest {
|
|
1718
|
-
workspace: string;
|
|
1719
|
-
slot: string;
|
|
1720
|
-
attempt: string;
|
|
1721
|
-
}
|
|
1722
|
-
type HostedDevicePhase = "preparing" | "ready" | "stopping" | "stopped" | "unknown";
|
|
1723
|
-
interface HostedDeviceSession extends HostedDeviceRequest {
|
|
1724
|
-
id: string;
|
|
1725
|
-
client: string;
|
|
1726
|
-
state: HostedDevicePhase;
|
|
1727
|
-
device: HostedDevice | null;
|
|
1728
|
-
consolePort?: number;
|
|
1729
|
-
appSlot?: number;
|
|
1730
|
-
createdAt: string;
|
|
1731
|
-
notice?: string;
|
|
1732
|
-
appAttempt?: string;
|
|
1733
|
-
metroPort?: number;
|
|
1734
|
-
}
|
|
1735
|
-
declare function deviceHostRoot(): string;
|
|
1736
|
-
declare function deviceHostArea(id: string): string;
|
|
1737
|
-
declare function parseHostedChoice(value: unknown): HostedIosChoice | null;
|
|
1738
|
-
declare function parseHostedDevice(value: unknown): HostedIosDevice | null;
|
|
1739
|
-
declare function parseHostedAndroidDevice(value: unknown): HostedAndroidDevice | null;
|
|
1740
|
-
/** Android Emulator -help-port defines the supported even console ports as 5554 through 5584. */
|
|
1741
|
-
declare function hostedConsolePort(value: unknown): value is number;
|
|
1742
|
-
declare function parseHostedPlatformDevice(value: unknown, platform: HostedDevicePlatform): HostedDevice | null;
|
|
1743
|
-
declare function hostedDeviceId(device: HostedDevice): string;
|
|
1744
|
-
declare function parseHostedRequest(value: unknown): HostedDeviceRequest | null;
|
|
1745
|
-
declare function parseHostedOfferRequest(value: unknown): HostedDeviceOfferRequest | null;
|
|
1746
|
-
declare function parseHostedNativeOffer(value: unknown): HostedNativeOffer | null;
|
|
1747
|
-
/** A missing established journal or malformed record is a refusal, never an empty reservation set. */
|
|
1748
|
-
declare function readHostedSessions(): HostedDeviceSession[];
|
|
1749
|
-
/** The private worker's exact device record; an absent record is unresolved after creation started. */
|
|
1750
|
-
declare function readHostedDevice(home: string): HostedIosDevice;
|
|
1751
|
-
declare function readHostedDevice(home: string, platform: "android"): HostedAndroidDevice;
|
|
1752
|
-
declare function readHostedDevice(home: string, platform: "macos"): HostedMacosDevice;
|
|
1753
|
-
declare function readHostedDevice(home: string, platform: HostedDevicePlatform): HostedDevice;
|
|
1754
|
-
/** Hosted sessions use isolated homes: only one exact device of their platform may appear in this ledger. */
|
|
1755
|
-
declare function assertHostedDeviceLedger(home: string, id: string, platform?: HostedDevicePlatform): void;
|
|
1756
|
-
//#endregion
|
|
1757
2208
|
//#region state/device-host-machines.d.ts
|
|
1758
2209
|
/** A separately approved hosting machine, pinned before sending its device token. */
|
|
1759
2210
|
interface DeviceHostMachineCredential {
|
|
@@ -1764,11 +2215,33 @@ interface DeviceHostMachineCredential {
|
|
|
1764
2215
|
deviceToken: string;
|
|
1765
2216
|
state: "pending" | "approved";
|
|
1766
2217
|
requestedAt: string;
|
|
2218
|
+
ticketHash?: string;
|
|
1767
2219
|
}
|
|
1768
2220
|
/** An absent store is empty; unreadable or malformed credentials refuse access without discarding pins. */
|
|
1769
2221
|
declare function readDeviceHostMachines(): DeviceHostMachineCredential[];
|
|
1770
2222
|
//#endregion
|
|
2223
|
+
//#region state/hosted-metro.d.ts
|
|
2224
|
+
declare const HOSTED_METRO_REQUESTS_KEY = "hostedMetroRequests";
|
|
2225
|
+
declare const HOSTED_METRO_GATEWAYS_KEY = "hostedMetroGateways";
|
|
2226
|
+
/** Private supervisor request, keyed by hosted session; never part of a public payload. */
|
|
2227
|
+
interface HostedMetroRequest {
|
|
2228
|
+
id: string;
|
|
2229
|
+
machine: string;
|
|
2230
|
+
address: string;
|
|
2231
|
+
peer: string;
|
|
2232
|
+
secret: string;
|
|
2233
|
+
}
|
|
2234
|
+
interface HostedMetroGateway {
|
|
2235
|
+
id: string;
|
|
2236
|
+
processToken: string;
|
|
2237
|
+
port?: number;
|
|
2238
|
+
error?: string;
|
|
2239
|
+
}
|
|
2240
|
+
declare function hostedMetroRequests(state: WorkspaceState | null): Record<string, HostedMetroRequest>;
|
|
2241
|
+
declare function hostedMetroGateways(state: WorkspaceState | null): Record<string, HostedMetroGateway>;
|
|
2242
|
+
//#endregion
|
|
1771
2243
|
//#region state/tailnet.d.ts
|
|
2244
|
+
declare const TAILNET_MACHINE_PATTERN: string;
|
|
1772
2245
|
interface TailnetPeer {
|
|
1773
2246
|
nodeId: string;
|
|
1774
2247
|
dnsName: string;
|
|
@@ -1809,6 +2282,8 @@ type HostedLogsCursor = Record<string, number>;
|
|
|
1809
2282
|
interface HostedLogsPage {
|
|
1810
2283
|
records: NdjsonRecord[];
|
|
1811
2284
|
cursor: HostedLogsCursor;
|
|
2285
|
+
/** Last completed native collection window, for detecting catch-up progress independently of file offsets. */
|
|
2286
|
+
checkpoint?: number;
|
|
1812
2287
|
/** True when the budget ended this page before the end of the logs; ask again with `cursor`. */
|
|
1813
2288
|
more: boolean;
|
|
1814
2289
|
}
|
|
@@ -1816,6 +2291,15 @@ declare const HOSTED_LOGS_PAGE_BYTES: number;
|
|
|
1816
2291
|
declare const HOSTED_LOGS_FIRST_BYTES: number;
|
|
1817
2292
|
declare function parseHostedLogsCursor(value: unknown): HostedLogsCursor | null;
|
|
1818
2293
|
declare function hostedMacosLogsDir(home: string): string | null;
|
|
2294
|
+
declare const hostedNativeLogsDir: (home: string, platform: "ios" | "android") => string;
|
|
2295
|
+
/** The completed query window and overlap digests, or null for a missing, malformed or unreadable checkpoint. */
|
|
2296
|
+
declare function readHostedNativeLogsCheckpoint(home: string, platform?: "ios" | "android"): {
|
|
2297
|
+
until: number;
|
|
2298
|
+
boundary: string[];
|
|
2299
|
+
windowMs?: number;
|
|
2300
|
+
appAttempt?: string;
|
|
2301
|
+
pid?: number;
|
|
2302
|
+
} | null;
|
|
1819
2303
|
/**
|
|
1820
2304
|
* The records in `dir` after `cursor`, in file order. A file without a cursor entry starts at most
|
|
1821
2305
|
* {@link HOSTED_LOGS_FIRST_BYTES} before its end. A file that shrank since the cursor was taken was rotated: the end of
|
|
@@ -1823,4 +2307,35 @@ declare function hostedMacosLogsDir(home: string): string | null;
|
|
|
1823
2307
|
*/
|
|
1824
2308
|
declare function readLogsSince(dir: string, cursor: HostedLogsCursor): HostedLogsPage;
|
|
1825
2309
|
//#endregion
|
|
1826
|
-
|
|
2310
|
+
//#region state/agent-device.d.ts
|
|
2311
|
+
declare function agentDeviceStateDirs(home?: string): string[];
|
|
2312
|
+
//#endregion
|
|
2313
|
+
//#region state/setup-journal.d.ts
|
|
2314
|
+
type SetupCapability = "build" | "device-host";
|
|
2315
|
+
interface SetupJournal {
|
|
2316
|
+
v: 1;
|
|
2317
|
+
client: {
|
|
2318
|
+
nodeId: string;
|
|
2319
|
+
};
|
|
2320
|
+
expiresAt: string;
|
|
2321
|
+
capabilities: SetupCapability[];
|
|
2322
|
+
steps: {
|
|
2323
|
+
id: string;
|
|
2324
|
+
state: "pending" | "running" | "ok" | "skipped" | "failed";
|
|
2325
|
+
title: string;
|
|
2326
|
+
detail?: string;
|
|
2327
|
+
fix?: string;
|
|
2328
|
+
}[];
|
|
2329
|
+
granted: {
|
|
2330
|
+
capability: SetupCapability;
|
|
2331
|
+
id: string;
|
|
2332
|
+
}[];
|
|
2333
|
+
done: boolean;
|
|
2334
|
+
exit?: number;
|
|
2335
|
+
}
|
|
2336
|
+
declare function parseSetupJournal(value: unknown): SetupJournal | null;
|
|
2337
|
+
declare function readSetupJournal(hash: string): SetupJournal | null;
|
|
2338
|
+
declare function isJournalExpired(journal: SetupJournal, now?: number): boolean;
|
|
2339
|
+
declare function isSetupJournalPrunable(journal: SetupJournal, now: number): boolean;
|
|
2340
|
+
//#endregion
|
|
2341
|
+
export { readRunEstimates as $, settingDefinition as $a, HostedAppLaunch as $i, readMacosRecord as $n, workspaceBuildDetailFile as $o, READY_PHASE_MS as $r, getProjectSettings as $s, BuildWaitingFor as $t, DeviceHostMachineCredential as A, ANDROID_PCH_CHOICES as Aa, AgentActionReaderOptions as Ac, HostedNativeOffer as Ai, StatusCapacity as An, easMachineStateRoot as Ao, HostedAndroidStatus as Ar, countErrorEntries as As, ActiveBuildState as At, RunHistory as B, SettingEntry as Ba, parseHostedNativeOffer as Bi, WebPageState as Bn, maintenanceRunClaims as Bo, unreadableHostedNative as Br, readJsonObject as Bs, BuildCacheHit as Bt, pinnedEndpoint as C, validHostedAppArguments as Ca, readSwiftpmCacheUsage as Cc, HostedDevicePhase as Ci, PhysicalDeviceState as Cn, createdDevicesFile as Co, HostedIosStatus as Cr, queryJsonLogs as Cs, readEndedAgentSessions as Ct, HostedMetroRequest as D, settingsJsonSchema as Da, agentDeviceUsageFile as Dc, HostedDeviceSession as Di, STATUS_ISSUE_CODES as Dn, deviceHostMachinesLock as Do, parseHostedIosPlacement as Dr, recordMatches as Ds, ACTIVITY_RECENCY_BASES as Dt, HostedMetroGateway as E, SETTINGS_SCHEMA_URL as Ea, AgentDeviceUsageRoots as Ec, HostedDeviceSelectors as Ei, RunOutcomeKind as En, deviceHostMachinesFile as Eo, hostedIosStatus as Er, readLogTimeline as Es, withGitChip as Et, HISTORY_LIMIT as F, RemoteDeviceBackend as Fa, SOURCES as Fc, hostedDeviceId as Fi, WEB_PAGE_STATES as Fn, gitMergeCacheDir as Fo, parseHostedAndroidPlacement as Fr, readCreatedDevices as Fs, AndroidDeviceState as Ft, StatsCapacityWait as G, TunnelMode as Ga, readHostedDeviceLedger as Gi, WorktreePullRequest as Gn, sharedCcache as Go, DEV_SERVER_STOP_REQUEST_KEY as Gr, buildWorkerRoot as Gs, BuildMissCategory as Gt, STATS_VERSION as H, SettingType as Ha, parseHostedPlatformDevice as Hi, WorkspaceStage as Hn, pullRequestCacheDir as Ho, BUILD_HISTORY_LIMIT as Hr, withStateReadCache as Hs, BuildDetail as Ht, OffloadSummary as I, SETTINGS as Ia, levelRank as Ic, parseHostedAndroidDevice as Ii, WORKSPACE_PHASES as In, maintenanceAttemptFile as Io, unreadableHostedAndroid as Ir, readEasSessionLedger as Is, AndroidRuntimeFacts as It, StatsReport as J, acceptsShape as Ja, HOSTED_MACOS_APP_SLOTS as Ji, MacosBuild as Jn, sharedPods as Jo, DeviceIdleShutdownRecord as Jr, findProjectByMetroPort as Js, BuildPhase as Jt, StatsPlacement as K, WEB_VIEWPORTS as Ka, readHostedSessions as Ki, MacosAppRecord as Kn, sharedCompilationCache as Ko, DevServerStopRecord as Kr, configCorruptRepair as Ks, BuildMissChange as Kt, PLACEMENT_DECISIONS as L, SETTING_GROUPS as La, parseNdjsonLine as Lc, parseHostedChoice as Li, WORKSPACE_STAGE_KINDS as Ln, maintenanceChildLogFile as Lo, HostedNativePlacement as Lr, validEasSessionClaim as Ls, AppPresence as Lt, BuildMachineTotals as M, OFFLOAD_MODES as Ma, createAgentActionReader as Mc, deviceHostArea as Mi, StatusIssueCode as Mn, easSessionLedgerLock as Mo, hostedAndroidPlacements as Mr, CreatedDevices as Ms, ActivityRecencyBasis as Mt, CAPACITY_REFUSAL_LIMIT as N, OffloadMode as Na, LEVELS as Nc, deviceHostRoot as Ni, StatusPayload as Nn, emulatorLogFile as No, hostedAndroidRecords as Nr, EasSessionClaim as Ns, AgentSession as Nt, hostedMetroGateways as O, ANDROID_COMPILER_CACHE_CHOICES as Oa, readAgentDeviceUsage as Oc, HostedIosChoice as Oi, SimulatorState as On, deviceViewersDir as Oo, unreadableHostedIos as Or, sortByTs as Os, AGENT_TOOLS as Ot, CAPACITY_REFUSAL_MAX_AGE_MS as P, REMOTE_DEVICE_BACKENDS as Pa, NdjsonRecord as Pc, hostedConsolePort as Pi, TUTORIAL_VERSION as Pn, getConfigPath as Po, hostedAndroidStatus as Pr, EasSessionLedgerRead as Ps, AgentTool as Pt, offloadSummary as Q, isSensitiveReference as Qa, HostedAgentLease as Qi, readHostedMacosApp as Qn, workspaceAgentDeviceDir as Qo, MetroLastStop as Qr, getProjectSetting as Qs, BuildResult as Qt, ReadStatsResult as R, SETTING_SCOPES as Ra, parseNdjsonText as Rc, parseHostedDevice as Ri, WarmStep as Rn, maintenanceDir as Ro, hostedNativeRecords as Rr, isJsonObject as Rs, BUILD_PHASES as Rt, parseMachine as S, rememberHostedAppBlobRename as Sa, SwiftpmCacheUsage as Sc, HostedDeviceOfferRequest as Si, PhysicalDeviceConnection as Sn, configLockPath as So, HostedIosPlacement as Sr, parseSince as Ss, readDiskUsage as St, HOSTED_METRO_REQUESTS_KEY as T, SETTINGS_SCHEMA_FILE as Ta, AgentDeviceUsage as Tc, HostedDeviceRequest as Ti, RemoteDeviceState as Tn, deviceHostMachinesClaims as To, hostedIosRecords as Tr, readLogRecords as Ts, withDerivedFacts as Tt, StatsBucket as U, SettingsPayload as Ua, parseHostedRequest as Ui, WorktreeFacts as Un, serverSetupDir as Uo, DEVICE_IDLE_SHUTDOWN_KEY as Ur, ParkedMax as Us, BuildDiagnostic as Ut, RunSample as V, SettingScope as Va, parseHostedOfferRequest as Vi, WorkspacePhase as Vn, maintenanceStateFile as Vo, BUILD_HISTORY_KEY as Vr, readStateFile as Vs, BuildCause as Vt, StatsCapacityRefusal as W, TUNNEL_MODES as Wa, readHostedDevice as Wi, WorktreeGit as Wn, setupJournalFile as Wo, DEVICE_RECLAIM_REASON as Wr, allMetroPorts as Ws, BuildHistoryEntry as Wt, decodeStats as X, expectedShape as Xa, HostedAgentDriverName as Xi, macosAppState as Xn, supervisorLogFile as Xo, IdleStopRecord as Xr, getParkedMax as Xs, BuildPlanPayload as Xt, StatsScope as Y, coerceSettingText as Ya, HostedAgentAccess as Yi, MacosProcess as Yn, statsFile as Yo, IDLE_STOP_KEY as Yr, getConcurrencyLimits as Ys, BuildPlacement as Yt, findProjectRoot as Z, isLayeredSetting as Za, HostedAgentGrant as Zi, parseMacosRecord as Zn, supervisorPidFile as Zo, LAST_BUILD_KEYS as Zr, getProject as Zs, BuildReport as Zt, Endpoint as _, hostedAppBlobs as _a, buildSlotPath as _c, workspaceLastUsed as _i, MemorySource as _n, archiveDir as _o, MaintenanceState as _r, compileGrep as _s, endedAgentSessionOf as _t, parseSetupJournal as a, parseHostedAgentAccess as aa, Config as ac, lastUseFrom as ai, DiskMeasure as an, RecordedSegment as ao, linkReplacedArchives as ar, workspaceLogsDir as as, trimSamples as at, endpoint as b, readHostedApp as ba, saturation as bc, HostedDevice as bi, NativeBuildStep as bn, buildMachinesFile as bo, readMaintenanceAttempt as br, logFiles as bs, readAgentSessionsCache as bt, HOSTED_LOGS_FIRST_BYTES as c, parseHostedMacosDevice as ca, PlatformRecords as cc, readDevServerStop as ci, EnvironmentState as cn, closedSegmentName as co, readArchives as cr, workspaceStateFile as cs, ViewedDevice as ct, HostedLogsPage as d, HostedAppDelivery as da, SettingsObject as dc, readDevicePlacement as di, LastBuildReport as dn, listSegments as do, MaintenanceCheck as dr, NATIVE_CRASH_LOG_PREFIX as ds, AgentSessionsCache as dt, HostedMacosChoice as ea, getRepoSettings as ec, WARM_KEY as ei, ChecksState as en, settingValueError as eo, ArchivedBytes as er, workspaceDerivedData as es, readStats as et, hostedMacosLogsDir as f, HostedAppFile as fa, StimConfig as fc, readIdleStop as fi, MACHINE_OWNER_KINDS as fn, openSegmentName as fo, MaintenanceMode as fr, QueryCriteria as fs, ENDED_AGENT_RETENTION_MS as ft, readLogsSince as g, hostedAppAttempt as ga, MachineCapacity as gc, readWorkspaceState as gi, MachineUsageState as gn, agentSessionsCacheFile as go, MaintenanceSize as gr, bundleMarkerPlatform as gs, diskUsageCacheFile as gt, readHostedNativeLogsCheckpoint as h, hostedAppArea as ha, readBuildMachines as hc, readWorkspaceAgent as hi, MachineOwnerKind as hn, recordingEnabled as ho, MaintenanceRecord as hr, buildCriteria as hs, agentSessionOf as ht, isSetupJournalPrunable as i, hostedMacosBundleId as ia, ConcurrencyLimits as ic, buildDiagnostics as ii, DevicePlacement as in, RecordedDevice as io, archivedUsage as ir, workspaceLogErrorIndex as is, trimCapacityWaits as it, readDeviceHostMachines as j, IOS_SIMULATOR_APPS as ja, AgentTarget as jc, assertHostedDeviceLedger as ji, StatusIssue as jn, easSessionLedgerFile as jo, hostedAndroidDeviceName as jr, CreatedDevicePlatform as js, ActivityDriver as jt, hostedMetroRequests as k, ANDROID_EMULATOR_APPS as ka, readAgentDeviceUsageCache as kc, HostedIosDevice as ki, StatsPlatform as kn, diskUsageCacheDir as ko, HostedAndroidPlacement as kr, tailRead as ks, APP_PROCESS_STATES as kt, HOSTED_LOGS_PAGE_BYTES as l, parseHostedMacosPlacement as la, ProjectRecord as lc, readDevServerStopRequest as li, GitChip as ln, footageDrops as lo, MaintenanceAction as lr, workspaceStateLock as ls, readViewedDevices as lt, parseHostedLogsCursor as m, HostedAppRecord as ma, BuildMachineCredential as mc, readWarmRecord as mi, MachineOwner as mn, recordingDeviceName as mo, MaintenancePressure as mr, attachExpoErrorContext as ms, StatusCacheEntry as mt, SetupJournal as n, HostedMacosPlacement as na, loadConfig as nc, WarmRecord as ni, DeviceAppProcess as nn, RECORDING_FOOTAGE_MS as no, ArchivedWorkspace as nr, workspaceEndedAgentsLock as ns, statsProjectKey as nt, readSetupJournal as o, parseHostedAgentGrant as oa, DeviceRecord as oc, parseMissReason as oi, EndedAgentSession as on, RecordingPlatform as oo, readArchive as or, workspaceMetadataFile as os, wholePhases as ot, hostedNativeLogsDir as p, HostedAppOffer as pa, SupervisorRecord as pc, readLastBuilds as pi, MEMORY_SOURCES as pn, recordedBytes as po, MaintenancePass as pr, advanceTail as ps, PullRequestCacheEntry as pt, StatsRecord as q, WebViewport as qa, HOSTED_AGENT_DRIVERS as qi, MacosAppState as qn, sharedGradle as qo, DevServerStopRequest as qr, findEnclosingWorktreeRoot as qs, BuildMissReason as qt, isJournalExpired as r, hostedMacosAppSlot as ra, withConfigLock as rc, WorkspaceState as ri, DeviceLeaseState as rn, RECORDING_PLATFORMS as ro, archiveEnabled as rr, workspaceGradleBuild as rs, trimCapacityRefusals as rt, agentDeviceStateDirs as s, parseHostedMacosChoice as sa, DoctorRunRecord as sc, readBuildHistory as si, EnvironmentDisk as sn, capDrops as so, readArchiveState as sr, workspaceRecordingsDir as ss, DeviceViewersRecord as st, SetupCapability as t, HostedMacosDevice as ta, isPathPrefix as tc, WORKSPACE_AGENT_KEY as ti, DeviceActivity as tn, RECORDING_CAP_BYTES as to, ArchivedUsage as tr, workspaceEndedAgentsFile as ts, readStatsReport as tt, HostedLogsCursor as u, HOSTED_APP_CHUNK_BYTES as ua, RepoRecord as uc, readDeviceIdleShutdowns as ui, GitChipPart as un, listRecordedDevices as uo, MaintenanceActionKind as ur, ERROR_SOURCES as us, stimBuildDigest as ut, TAILNET_MACHINE_PATTERN as v, parseHostedAppManifest as va, buildSlotsDir as vc, HostedAndroidChoice as vi, MetroBundleState as vn, archiveLock as vo, MaintenanceStatus as vr, fileSizes as vs, listStatusCacheEntries as vt, HOSTED_METRO_GATEWAYS_KEY as w, validHostedAppBlob as wa, swiftpmCacheUsageFile as wc, HostedDevicePlatform as wi, PlannedPhase as wn, createdDevicesLock as wo, hostedIosPlacements as wr, queryLogs as ws, readPullRequestCache as wt, findPeer as x, readHostedAppMetadata as xa, tryAcquireBuildSlotClaim as xc, HostedDeviceOffer as xi, PHYSICAL_DEVICE_CONNECTIONS as xn, buildMachinesLock as xo, readMaintenanceState as xr, markerWindow as xs, readBuildDetail as xt, TailnetPeer as y, parseHostedAppOffer as ya, machineCapacity as yc, HostedAndroidDevice as yi, NATIVE_BUILD_STEPS as yn, archiveRoot as yo, parseMaintenanceState as yr, followLogs as ys, pullRequestCacheFile as yt, RunEstimates as z, SettingDefinition as za, readNdjsonGenerations as zc, parseHostedLocalDeviceCount as zi, WebBrowserState as zn, maintenanceNdjsonFile as zo, parseHostedNativePlacement as zr, readJsonFile as zs, BUILD_RESULTS as zt };
|