@stim-cli/core 1.21.0 → 1.22.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 CHANGED
@@ -42,6 +42,8 @@ strict parser and reader.
42
42
  shared by stim-server and the phone. It imports no Node APIs; mobile consumers
43
43
  import this subpath without loading the Node-only root or state entry points.
44
44
  Build core before typechecking, testing or bundling the phone app.
45
+ Its `wakeAt` includes physical-device lease expiry and unattended EAS-session age;
46
+ callers retain their clock and quiet-hours reevaluation.
45
47
 
46
48
  The npm scope remains `@stim-cli` until the `@stim` scope is available.
47
49
 
@@ -1,7 +1,7 @@
1
1
  import { C as quotedPath, S as tryAcquireClaim, _ as releaseClaim, r as ClaimRefusedError, x as sleepSync } from "./ownership-claim-DHUs_Dir.mjs";
2
2
  import fs, { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, unlinkSync, utimesSync, writeFileSync } from "node:fs";
3
3
  import os from "node:os";
4
- import path, { basename, dirname, join } from "node:path";
4
+ import path, { basename, dirname, isAbsolute, join, relative, sep } from "node:path";
5
5
  import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
6
6
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
7
7
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -159,9 +159,16 @@ function withDirLock(lockPath, fn, { waitMs = DEFAULT_LOCK_WAIT_MS, pollMs = DEF
159
159
  * transaction and reentrant nesting behave exactly as with `withDirLock`.
160
160
  * An optional signal cancels acquisition; it cannot interrupt the synchronous transaction.
161
161
  */
162
- async function withDirLockAsync(lockPath, fn, { waitMs = DEFAULT_LOCK_WAIT_MS, pollMs = DEFAULT_LOCK_POLL_MS, ensureParent, signal } = {}) {
163
- signal?.throwIfAborted();
162
+ async function withDirLockAsync(lockPath, fn, options = {}) {
163
+ options.signal?.throwIfAborted();
164
164
  if ((lockDepths.get(lockPath) || 0) > 0) return nestedDirLock(lockPath, fn);
165
+ return acquireDirLockAsync(lockPath, options, (held) => holdDirLock(lockPath, held, () => {
166
+ options.signal?.throwIfAborted();
167
+ return fn();
168
+ }));
169
+ }
170
+ async function acquireDirLockAsync(lockPath, { waitMs = DEFAULT_LOCK_WAIT_MS, pollMs = DEFAULT_LOCK_POLL_MS, ensureParent, signal }, fn) {
171
+ signal?.throwIfAborted();
165
172
  prepareDirLock(lockPath, ensureParent);
166
173
  const deadline = Date.now() + waitMs;
167
174
  const pending = {};
@@ -177,9 +184,23 @@ async function withDirLockAsync(lockPath, fn, { waitMs = DEFAULT_LOCK_WAIT_MS, p
177
184
  releaseClaim(pending.claim);
178
185
  throw error;
179
186
  }
180
- return holdDirLock(lockPath, held, () => {
181
- signal?.throwIfAborted();
182
- return fn();
187
+ return fn(held);
188
+ }
189
+ /**
190
+ * Holds the directory lock and its ownership claim until the body settles. Transactions are exclusive even
191
+ * within one process and are not reentrant. Cancellation stops acquisition; the body owns cancellation after admission.
192
+ */
193
+ async function withDirLockTransaction(lockPath, fn, options = {}) {
194
+ return acquireDirLockAsync(lockPath, options, async ({ claim, marker }) => {
195
+ try {
196
+ options.signal?.throwIfAborted();
197
+ return await fn();
198
+ } finally {
199
+ try {
200
+ removeLockDirectory(lockPath, marker);
201
+ } catch {}
202
+ releaseClaim(claim);
203
+ }
183
204
  });
184
205
  }
185
206
  //#endregion
@@ -544,6 +565,43 @@ async function compiledHelper({ dir, name, inputs, version, compile, prune = tru
544
565
  return helper;
545
566
  }
546
567
  //#endregion
568
+ //#region dependency-install.ts
569
+ /** The existing worker install command and marker identity for a repository's selected lockfile. */
570
+ function dependencyInstall(root, packageName) {
571
+ const file = [
572
+ "pnpm-lock.yaml",
573
+ "yarn.lock",
574
+ "package-lock.json"
575
+ ].find((name) => existsSync(join(root, name)));
576
+ if (!file) return null;
577
+ const command = file === "pnpm-lock.yaml" ? "pnpm" : file === "yarn.lock" ? "yarn" : "npm";
578
+ const args = command === "pnpm" ? [
579
+ "install",
580
+ "--frozen-lockfile",
581
+ ...packageName ? ["--filter", `${packageName}...`] : []
582
+ ] : command === "yarn" ? ["install", "--frozen-lockfile"] : ["ci"];
583
+ const bytes = readFileSync(join(root, file));
584
+ return {
585
+ command,
586
+ args,
587
+ lockfile: createHash("sha256").update(bytes).digest("hex"),
588
+ digest: createHash("sha256").update(bytes).update(JSON.stringify(args)).digest("hex")
589
+ };
590
+ }
591
+ /** Whether the worker can reuse this project's dependency install without running the package manager. */
592
+ function reusableDependencies(area, project, packageName, lockfile) {
593
+ try {
594
+ const root = realpathSync(join(area, "src"));
595
+ const selected = realpathSync(join(root, project));
596
+ const path = relative(root, selected);
597
+ if (path === ".." || path.startsWith(`..${sep}`) || isAbsolute(path)) return false;
598
+ const install = dependencyInstall(root, packageName);
599
+ return install?.lockfile === lockfile && existsSync(join(selected, "node_modules")) && readFileSync(join(area, "dependencies"), "utf8") === install.digest;
600
+ } catch {
601
+ return false;
602
+ }
603
+ }
604
+ //#endregion
547
605
  //#region metro-bridge.ts
548
606
  function port(value) {
549
607
  if (!Number.isInteger(value) || value < 1 || value > 65535) throw new Error("Invalid Metro bridge port.");
@@ -635,6 +693,156 @@ function createMetroBridge({ gatewayPort, peer, secret }) {
635
693
  });
636
694
  }
637
695
  //#endregion
696
+ //#region react-native-artifact.ts
697
+ const text$1 = (value) => typeof value === "string" && value.length > 0 && value.length <= 256 && !/[\0\r\n]/.test(value);
698
+ const path$2 = (value) => text$1(value) && !/[\\:]/.test(value) && value.split("/").every((part) => part !== "" && part !== ".." && part !== ".git");
699
+ /** Validates and canonicalizes the choices used by completed React Native peer artifacts. */
700
+ function reactNativeArtifactQuery(value) {
701
+ if (!isJsonObject(value) || typeof value.project !== "string" || value.project !== "" && !path$2(value.project) || !text$1(value.fingerprint) || typeof value.isExpo !== "boolean" || Object.keys(value).some((key) => ![
702
+ "project",
703
+ "fingerprint",
704
+ "isExpo",
705
+ "platform",
706
+ "toolchain",
707
+ "ios",
708
+ "android"
709
+ ].includes(key))) return null;
710
+ const tools = value.toolchain;
711
+ if (!isJsonObject(tools) || !text$1(tools.stimBuild)) return null;
712
+ const common = {
713
+ project: value.project,
714
+ fingerprint: value.fingerprint,
715
+ isExpo: value.isExpo
716
+ };
717
+ if (value.platform === "ios" && value.android === void 0 && isJsonObject(value.ios)) {
718
+ const { runtime, configuration, scheme, projectPath, optimizations } = value.ios;
719
+ if (!text$1(tools.arch) || !text$1(tools.xcode) || !text$1(tools.simulatorSdk) || !text$1(tools.cocoapods) || !text$1(runtime) || !text$1(configuration) || /release/i.test(configuration) || scheme !== null && !text$1(scheme) || !path$2(projectPath) || !isJsonObject(optimizations) || typeof optimizations.compilationCache !== "boolean" || optimizations.swiftCompilationCache !== null && typeof optimizations.swiftCompilationCache !== "boolean" || typeof optimizations.prefixMapping !== "boolean" || Object.keys(value.ios).some((key) => ![
720
+ "runtime",
721
+ "configuration",
722
+ "scheme",
723
+ "projectPath",
724
+ "optimizations"
725
+ ].includes(key)) || Object.keys(optimizations).some((key) => ![
726
+ "compilationCache",
727
+ "swiftCompilationCache",
728
+ "prefixMapping"
729
+ ].includes(key))) return null;
730
+ return {
731
+ ...common,
732
+ platform: "ios",
733
+ toolchain: {
734
+ stimBuild: tools.stimBuild,
735
+ arch: tools.arch,
736
+ xcode: tools.xcode,
737
+ simulatorSdk: tools.simulatorSdk,
738
+ cocoapods: tools.cocoapods
739
+ },
740
+ ios: {
741
+ runtime,
742
+ configuration,
743
+ scheme,
744
+ projectPath,
745
+ optimizations: {
746
+ compilationCache: optimizations.compilationCache,
747
+ swiftCompilationCache: optimizations.swiftCompilationCache ?? false,
748
+ prefixMapping: optimizations.prefixMapping
749
+ }
750
+ }
751
+ };
752
+ }
753
+ if (value.platform === "android" && value.ios === void 0 && isJsonObject(value.android)) {
754
+ const { variant, abi, gradleBuildCache, pch, compilerCache, gradleRoot = null, module = null } = value.android;
755
+ if (!text$1(tools.jdk) || variant !== null && (!text$1(variant) || !/^[A-Za-z0-9_-]+$/.test(variant) || /release/i.test(variant)) || abi !== null && (!text$1(abi) || !/^[A-Za-z0-9_-]+$/.test(abi)) || typeof gradleBuildCache !== "boolean" || compilerCache !== "ccache" && compilerCache !== "none" || gradleRoot !== null && !path$2(gradleRoot) || module !== null && (!text$1(module) || !/^(:(?!\.\.?(?::|$))[A-Za-z0-9._-]+){1,20}$/.test(module)) || Object.keys(value.android).some((key) => ![
756
+ "variant",
757
+ "abi",
758
+ "gradleBuildCache",
759
+ "pch",
760
+ "compilerCache",
761
+ "gradleRoot",
762
+ "module"
763
+ ].includes(key))) return null;
764
+ if (pch !== "auto" && pch !== "on" && pch !== "off") return null;
765
+ return {
766
+ ...common,
767
+ platform: "android",
768
+ toolchain: {
769
+ stimBuild: tools.stimBuild,
770
+ jdk: tools.jdk
771
+ },
772
+ android: {
773
+ variant: variant ?? "debug",
774
+ abi: abi === "all" ? null : abi,
775
+ gradleBuildCache,
776
+ pch,
777
+ compilerCache,
778
+ gradleRoot: gradleRoot ?? "android",
779
+ module: module ?? ":app"
780
+ }
781
+ };
782
+ }
783
+ return null;
784
+ }
785
+ /** The identity of a canonical React Native query and the toolchain verified around its build. */
786
+ function reactNativeArtifactIdentity(receipt) {
787
+ const fingerprint = createHash("sha256").update(JSON.stringify(receipt)).digest("hex");
788
+ return {
789
+ fingerprint,
790
+ cacheKey: `react-native-${receipt.query.platform}-${fingerprint}`
791
+ };
792
+ }
793
+ //#endregion
794
+ //#region swiftpm-artifact.ts
795
+ const text = (value) => typeof value === "string" && value.length > 0 && value.length <= 4096 && !value.includes("\0");
796
+ const path$1 = (value) => text(value) && !/[\\:]/.test(value) && value.split("/").every((part) => part !== "" && part !== "." && part !== ".." && part.toLowerCase() !== ".git");
797
+ const strings = (value, valid) => Array.isArray(value) && value.length <= 1e3 && value.every(valid);
798
+ const normalized = (values) => [...new Set(values)].toSorted();
799
+ /** Validates and canonicalizes the source and build choices of a completed SwiftPM peer artifact. */
800
+ function swiftpmArtifactQuery(value) {
801
+ if (!isJsonObject(value) || Object.keys(value).some((key) => ![
802
+ "project",
803
+ "sourceDigest",
804
+ "stimBuild",
805
+ "inputs",
806
+ "build"
807
+ ].includes(key)) || typeof value.project !== "string" || value.project !== "" && !path$1(value.project) || typeof value.sourceDigest !== "string" || !/^[a-f0-9]{64}$/.test(value.sourceDigest) || !text(value.stimBuild) || value.stimBuild.length > 256) return null;
808
+ const { inputs, build } = value;
809
+ if (!isJsonObject(inputs) || inputs.complete !== true || Object.keys(inputs).some((key) => ![
810
+ "complete",
811
+ "ignored",
812
+ "outputs",
813
+ "localFiles",
814
+ "environment"
815
+ ].includes(key)) || !strings(inputs.ignored, path$1) || !strings(inputs.outputs, path$1) || !strings(inputs.localFiles, text) || !strings(inputs.environment, (name) => typeof name === "string" && /^[A-Za-z_][A-Za-z0-9_]*$/.test(name)) || !isJsonObject(build) || Object.keys(build).some((key) => ![
816
+ "product",
817
+ "infoPlist",
818
+ "resources",
819
+ "assetCatalog"
820
+ ].includes(key)) || typeof build.product !== "string" || !/^[A-Za-z0-9_.-]{1,100}$/.test(build.product) || !path$1(build.infoPlist) || !isJsonObject(build.resources) || Object.keys(build.resources).length > 256 || build.assetCatalog !== null && !path$1(build.assetCatalog)) return null;
821
+ const resourceEntries = [];
822
+ for (const [destination, source] of Object.entries(build.resources).toSorted(([a], [b]) => a.localeCompare(b))) {
823
+ if (!validMacosResourceDestination(destination) || !path$1(source)) return null;
824
+ resourceEntries.push([destination, source]);
825
+ }
826
+ return {
827
+ project: value.project,
828
+ sourceDigest: value.sourceDigest,
829
+ stimBuild: value.stimBuild,
830
+ inputs: {
831
+ complete: true,
832
+ ignored: normalized(inputs.ignored),
833
+ outputs: normalized(inputs.outputs),
834
+ localFiles: normalized(inputs.localFiles),
835
+ environment: normalized(inputs.environment)
836
+ },
837
+ build: {
838
+ product: build.product,
839
+ infoPlist: build.infoPlist,
840
+ resources: Object.fromEntries(resourceEntries),
841
+ assetCatalog: build.assetCatalog
842
+ }
843
+ };
844
+ }
845
+ //#endregion
638
846
  //#region index.ts
639
847
  const warnedRelative = /* @__PURE__ */ new Set();
640
848
  function absoluteEnvPath(name) {
@@ -854,4 +1062,4 @@ function matchesCache(cache, match) {
854
1062
  return match.layout === void 0 || cache.layout === match.layout;
855
1063
  }
856
1064
  //#endregion
857
- export { artifactIn as A, withAmbientContext as B, workspaceName as C, createMetroGateway as D, createMetroBridge as E, unitWords as F, withStateReadCache as G, readJsonFile as H, validMacosResourceDestination as I, withDirLock as K, ambientContext as L, storeArtifact as M, quoteUnitWord as N, compiledHelper as O, unitLines as P, ambientEnv as R, workspaceLogDir as S, workspaceStateDir as T, readJsonObject as U, isJsonObject as V, readStateFile as W, rotatedLogPath as _, buildCacheRoot as a, updateCacheManifest as b, cacheNameSegment as c, ensurePrivateDir as d, hostSimulatorArch as f, rotateLog as g, registerCache as h, buildCacheKey as i, resolveArtifact as j, storeArtifactAsync as k, cachePathSetting as l, readCacheManifest as m, METRO_NAMED_CACHE_LAYOUT as n, cacheDirRefusal as o, metroCacheRoot as p, withDirLockAsync as q, STORE_ROOT_TAG as r, cacheManifestLockPath as s, LOG_ROTATE_BYTES as t, configDir as u, sharedStoreRoot as v, workspaceSlug as w, workspaceId as x, tagSharedStore as y, ambientWrite as z };
1065
+ export { withDirLockTransaction as $, createMetroGateway as A, unitWords as B, workspaceName as C, reactNativeArtifactIdentity as D, swiftpmArtifactQuery as E, artifactIn as F, withAmbientContext as G, ambientContext as H, resolveArtifact as I, readJsonObject as J, isJsonObject as K, storeArtifact as L, reusableDependencies as M, compiledHelper as N, reactNativeArtifactQuery as O, storeArtifactAsync as P, withDirLockAsync as Q, quoteUnitWord as R, workspaceLogDir as S, workspaceStateDir as T, ambientEnv as U, validMacosResourceDestination as V, ambientWrite as W, withStateReadCache as X, readStateFile as Y, withDirLock as Z, rotatedLogPath as _, buildCacheRoot as a, updateCacheManifest as b, cacheNameSegment as c, ensurePrivateDir as d, hostSimulatorArch as f, rotateLog as g, registerCache as h, buildCacheKey as i, dependencyInstall as j, createMetroBridge as k, cachePathSetting as l, readCacheManifest as m, METRO_NAMED_CACHE_LAYOUT as n, cacheDirRefusal as o, metroCacheRoot as p, readJsonFile as q, STORE_ROOT_TAG as r, cacheManifestLockPath as s, LOG_ROTATE_BYTES as t, configDir as u, sharedStoreRoot as v, workspaceSlug as w, workspaceId as x, tagSharedStore as y, unitLines as z };
@@ -1,5 +1,5 @@
1
+ import { o as ClaimHandle } from "./ownership-claim-RY3fbm1D.mjs";
1
2
  import { l as NoiseKeyPair } from "./noise-DYIbymAJ.mjs";
2
- import { o as ClaimHandle } from "./ownership-claim-Bf8Lq6AY.mjs";
3
3
  //#region state/ndjson.d.ts
4
4
  interface NdjsonRecord {
5
5
  ts?: number;
@@ -700,8 +700,12 @@ declare function closedSegmentName(start: number, end: number): string;
700
700
  declare function openSegmentName(start: number): string;
701
701
  /** The segments in one device directory, oldest first. Files that are not segments are left out; `closedOnly` excludes files still being written. */
702
702
  declare function listSegments(dir: string, closedOnly?: boolean): RecordedSegment[];
703
+ /** Reads current segment files asynchronously, oldest first; cancellation propagates. */
704
+ declare function listSegmentsAsync(dir: string, closedOnly?: boolean, signal?: AbortSignal): Promise<RecordedSegment[]>;
703
705
  /** Every device slot recorded under a workspace's recordings directory. */
704
706
  declare function listRecordedDevices(recordingsDir: string, closedOnly?: boolean): RecordedDevice[];
707
+ /** Reads current device slots and their segment files asynchronously; cancellation propagates. */
708
+ declare function listRecordedDevicesAsync(recordingsDir: string, closedOnly?: boolean, signal?: AbortSignal): Promise<RecordedDevice[]>;
705
709
  declare function recordedBytes(devices: readonly RecordedDevice[]): number;
706
710
  /**
707
711
  * The oldest closed segments to delete so that one device keeps at most `footageMs` of footage. Time between
@@ -1473,7 +1477,11 @@ interface ArchivedUsage {
1473
1477
  };
1474
1478
  }
1475
1479
  declare function readArchives(): ArchivedWorkspace[];
1480
+ /** Reads current archive files asynchronously, outside the synchronous state-read cache; cancellation propagates. */
1481
+ declare function readArchivesAsync(signal?: AbortSignal): Promise<ArchivedWorkspace[]>;
1476
1482
  declare function readArchive(id: string): ArchivedWorkspace | null;
1483
+ /** Reads a current archive without the synchronous state-read cache; invalid or missing records return null. */
1484
+ declare function readArchiveAsync(id: string, signal?: AbortSignal): Promise<ArchivedWorkspace | null>;
1477
1485
  declare function readArchiveState(id: string): WorkspaceState | null;
1478
1486
  declare function archivedUsage(archives: readonly ArchivedWorkspace[]): ArchivedUsage;
1479
1487
  declare function linkReplacedArchives(archives: readonly ArchivedWorkspace[], paths: readonly string[]): ArchivedWorkspace[];
@@ -1490,6 +1498,10 @@ interface MacosBuild {
1490
1498
  startedAt: string;
1491
1499
  finishedAt?: string;
1492
1500
  durationMs?: number;
1501
+ fingerprint?: string;
1502
+ cacheKey?: string;
1503
+ cacheHit?: boolean;
1504
+ cacheSource?: "local" | "provider" | "peer";
1493
1505
  error?: string;
1494
1506
  errorCode?: string;
1495
1507
  buildMachine?: string;
@@ -1743,11 +1755,11 @@ interface MacosBuildPlanPayload {
1743
1755
  platform: "macos";
1744
1756
  product: string;
1745
1757
  buildMachine: string;
1746
- fingerprint: null;
1747
- cacheKey: null;
1748
- cacheHit: false;
1758
+ fingerprint: string | null;
1759
+ cacheKey: string | null;
1760
+ cacheHit: boolean;
1749
1761
  provider: null;
1750
- cacheSkipped: false;
1762
+ cacheSkipped: boolean;
1751
1763
  prebuild: null;
1752
1764
  outcome: null;
1753
1765
  expectedMs: null;
@@ -2711,4 +2723,4 @@ declare class KeyedEntities<T> {
2711
2723
  /** Applies `delta` to `entities` keyed by `key`, keeping the order of `entities` and appending new keys. */
2712
2724
  declare function applyKeyedDelta<T>(entities: readonly T[], delta: KeyedDelta<T>, key: (entity: T) => string): T[];
2713
2725
  //#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 };
2726
+ export { ReadStatsResult as $, readHostedAppMetadata as $a, isPathPrefix as $c, HostedDevicePlatform as $i, parseNdjsonText as $l, StatusIssueCode as $n, recordingEnabled as $o, unreadableHostedIos as $r, openLogDir as $s, AndroidDeviceState as $t, readLogsSince as A, HostedAppLaunch as Aa, readEasSessionLedger as Ac, buildDiagnostics as Ai, tryAcquireBuildSlotClaim as Al, GitChipPart as An, isLayeredSetting as Ao, readArchives as Ar, serverSetupDir as As, StatusCacheEntry as At, HOSTED_METRO_REQUESTS_KEY as B, parseHostedMacosDevice as Ba, createDebugLog as Bc, readWarmRecord as Bi, agentDeviceUsageFile as Bl, NATIVE_BUILD_STEPS as Bn, RecordedDevice as Bo, MaintenanceSize as Br, workspaceBuildDetailFile as Bs, readDiskUsageFailure as Bt, HOSTED_LOGS_PAGE_BYTES as C, HOSTED_AGENT_DRIVERS as Ca, tailRead as Cc, MAINTENANCE_LOG_NAME as Ci, parseMachineCredential as Cl, DeviceLeaseState as Cn, TUNNEL_MODES as Co, ArchivedWorkspace as Cr, maintenanceChildLogFile as Cs, DeviceViewersRecord as Ct, hostedNativeLogsDir as D, HostedAgentGrant as Da, EasSessionClaim as Dc, WORKSPACE_AGENT_KEY as Di, buildSlotsDir as Dl, EnvironmentDisk as Dn, acceptsShape as Do, readArchive as Dr, maintenanceStateFile as Ds, AgentSessionsCache as Dt, hostedMacosLogsDir as E, HostedAgentDriverName as Ea, CreatedDevices as Ec, WARM_KEY as Ei, buildSlotPath as El, EndedAgentSession as En, WebViewport as Eo, linkReplacedArchives as Er, maintenanceRunClaims as Es, stimBuildDigest as Et, endpoint as F, hostedMacosAppSlot as Fa, readStateFile as Fc, readDevServerStopRequest as Fi, SwiftpmCacheUsage as Fl, MachineOwnerKind as Fn, runId as Fo, MaintenanceCheck as Fr, sharedPods as Fs, listStatusCacheEntries as Ft, DeviceHostMachineCredential as G, HostedAppOffer as Ga, buildWorkerRoot as Gc, DeviceHostLimits as Gi, AgentTarget as Gl, PlannedPhase as Gn, footageDrops as Go, readMaintenanceAttempt as Gr, workspaceLogErrorIndex as Gs, ACTIVITY_RECENCY_BASES as Gt, HostedMetroRequest as H, HOSTED_APP_CHUNK_BYTES as Ha, debugLoggingEnabled as Hc, readWorkspaceState as Hi, readAgentDeviceUsageCache as Hl, PHYSICAL_DEVICE_CONNECTIONS as Hn, RecordingPlatform as Ho, MaintenanceStatus as Hr, workspaceEndedAgentsFile as Hs, readPullRequestCache as Ht, findPeer as I, hostedMacosBundleId as Ia, withStateReadCache as Ic, readDeviceIdleShutdowns as Ii, readSwiftpmCacheUsage as Il, MachineUsageState as In, validRunId as Io, MaintenanceMode as Ir, statsFile as Is, pullRequestCacheFile as It, CAPACITY_REFUSAL_LIMIT as J, hostedAppAttempt as Ja, getConcurrencyLimits as Jc, HostedAndroidDevice as Ji, LEVELS as Jl, STATUS_ISSUE_CODES as Jn, listSegments as Jo, HostedIosStatus as Jr, workspaceRecordingsDir as Js, ActiveBuildState as Jt, readDeviceHostMachines as K, HostedAppRecord as Ka, configCorruptRepair as Kc, HOSTED_PARKED_CANDIDATES as Ki, createAgentActionReader as Kl, RemoteDeviceState as Kn, listRecordedDevices as Ko, readMaintenanceState as Kr, workspaceLogsDir as Ks, AGENT_TOOLS as Kt, machineEndpoint as L, parseHostedAgentAccess as La, readHomeIdentity as Lc, readDevicePlacement as Li, swiftpmCacheUsageFile as Ll, MacosBuildPlanPayload as Ln, RECORDING_CAP_BYTES as Lo, MaintenancePass as Lr, supervisorLogFile as Ls, readAgentSessionsCache as Lt, TAILNET_MACHINE_PATTERN as M, HostedMacosDevice as Ma, isJsonObject as Mc, parseMissReason as Mi, SimRuntimeUsage as Ml, MACHINE_OWNER_KINDS as Mn, settingDefinition as Mo, DiskPressureLevel as Mr, sharedCcache as Ms, diskUsageCacheFile as Mt, TailnetPeer as N, HostedMacosPlacement as Na, readJsonFile as Nc, readBuildHistory as Ni, machineCacheUsageFile as Nl, MEMORY_SOURCES as Nn, settingValueError as No, MaintenanceAction as Nr, sharedCompilationCache as Ns, diskUsageFailureFile as Nt, parseHostedLogsCursor as O, HostedAgentIssuedGrant as Oa, EasSessionLedgerRead as Oc, WarmRecord as Oi, machineCapacity as Ol, EnvironmentState as On, coerceSettingText as Oo, readArchiveAsync as Or, pullRequestCacheDir as Os, ENDED_AGENT_RETENTION_MS as Ot, cannotHost as P, hostedAgentDriverName as Pa, readJsonObject as Pc, readDevServerStop as Pi, readMachineCacheUsage as Pl, MachineOwner as Pn, RUN_ID_ENV as Po, MaintenanceActionKind as Pr, sharedGradle as Ps, endedAgentSessionOf as Pt, PLACEMENT_DECISIONS as Q, readHostedApp as Qa, getRepoSettings as Qc, HostedDevicePhase as Qi, parseNdjsonLine as Ql, StatusIssue as Qn, recordingDeviceName as Qo, parseHostedIosPlacement as Qr, LogDirQuery as Qs, AgentTool as Qt, parseMachine as R, parseHostedAgentGrant as Ra, DEBUG_ENV as Rc, readIdleStop as Ri, AgentDeviceUsage as Rl, MemorySource as Rn, RECORDING_FOOTAGE_MS as Ro, MaintenancePressure as Rr, supervisorPidFile as Rs, readBuildDetail as Rt, HOSTED_LOGS_FIRST_BYTES as S, readHostedSessions as Sa, sortByTs as Sc, LAST_BUILD_KEYS as Si, MachineCredential as Sl, DeviceAppProcess as Sn, SettingsPayload as So, ArchivedUsage as Sr, maintenanceAttemptFile as Ss, wholePhases as St, HostedLogsPage as T, HostedAgentAccess as Ta, CreatedDevicePlatform as Tc, READY_PHASE_MS as Ti, MachineCapacity as Tl, DiskMeasure as Tn, WEB_VIEWPORTS as To, archivedUsage as Tr, maintenanceNdjsonFile as Ts, readViewedDevices as Tt, hostedMetroGateways as U, HostedAppDelivery as Ua, ParkedMax as Uc, workspaceLastUsed as Ui, AgentActionReaderOptions as Ul, PhysicalDeviceConnection as Un, capDrops as Uo, MemoryCulprit as Ur, workspaceEndedAgentsLock as Us, withDerivedFacts as Ut, HostedMetroGateway as V, parseHostedMacosPlacement as Va, debugLogDir as Vc, readWorkspaceAgent as Vi, readAgentDeviceUsage as Vl, NativeBuildStep as Vn, RecordedSegment as Vo, MaintenanceState as Vr, workspaceDerivedData as Vs, readEndedAgentSessions as Vt, hostedMetroRequests as W, HostedAppFile as Wa, allMetroPorts as Wc, DEVICE_HOST_LIMITS as Wi, AgentRecordSelection as Wl, PhysicalDeviceState as Wn, closedSegmentName as Wo, parseMaintenanceState as Wr, workspaceGradleBuild as Ws, withGitChip as Wt, HISTORY_LIMIT as X, parseHostedAppManifest as Xa, getProject as Xc, HostedDeviceOffer as Xi, SOURCES as Xl, StatsPlatform as Xn, openSegmentName as Xo, hostedIosRecords as Xr, workspaceStateLock as Xs, ActivityRecencyBasis as Xt, CAPACITY_REFUSAL_MAX_AGE_MS as Y, hostedAppBlobs as Ya, getParkedMax as Yc, HostedDevice as Yi, NdjsonRecord as Yl, SimulatorState as Yn, listSegmentsAsync as Yo, hostedIosPlacements as Yr, workspaceStateFile as Ys, ActivityDriver as Yt, OffloadSummary as Z, parseHostedAppOffer as Za, getProjectSettings as Zc, HostedDeviceOfferRequest as Zi, levelRank as Zl, StatusCapacity as Zn, recordedBytes as Zo, hostedIosStatus as Zr, LogDir as Zs, AgentSession as Zt, isSetupJournalPrunable as _, parseHostedOfferRequest as _a, queryJsonLogs as _c, DevServerStopRecord as _i, StimConfig as _l, BuildReport as _n, SettingDefinition as _o, macosAppState as _r, easSessionLedgerFile as _s, readStatsReport as _t, MachineView as a, HostedNativeOffer as aa, advanceTail as ac, hostedAndroidStatus as ai, AutomaticPoolRole as al, BuildCacheHit as an, settingsJsonSchema as ao, WarmStep as ar, buildMachinesLock as as, StatsCapacityRefusal as at, agentDeviceStateDirs as b, readHostedDevice as ba, readLogTimeline as bc, IDLE_STOP_KEY as bi, BuildMachineCredential as bl, ChecksState as bn, SettingType as bo, readMacosRecord as br, getConfigPath as bs, trimCapacityWaits as bt, SummaryBuild as c, deviceHostRoot as ca, bundleMarkerPlatform as cc, HostedNativePlacement as ci, validateAutomaticPool as cl, BuildDiagnostic as cn, ANDROID_PCH_CHOICES as co, WorkspacePhase as cr, createdDevicesFile as cs, StatsRecord as ct, WorktreeRow as d, hostedWorkerSettleMs as da, followLogs as dc, unreadableHostedNative as di, DeviceRecord as dl, BuildMissChange as dn, OffloadMode as do, WorktreeGit as dr, deviceHostMachinesFile as ds, decodeStats as dt, HostedDeviceRequest as ea, ERROR_SOURCES as ec, HostedAndroidPlacement as ei, loadConfig as el, AndroidRuntimeFacts as en, rememberHostedAppBlobRename as eo, StatusPayload as er, agentSessionsCacheFile as es, RunEstimates as et, readNdjsonGenerations as eu, statusViews as f, parseHostedAndroidDevice as fa, isExpoErrorContext as fc, BUILD_HISTORY_KEY as fi, DoctorRunRecord as fl, BuildMissReason as fn, REMOTE_DEVICE_BACKENDS as fo, WorktreePullRequest as fr, deviceHostMachinesLock as fs, findProjectRoot as ft, isJournalExpired as g, parseHostedNativeOffer as ga, planLogQuery as gc, DEV_SERVER_STOP_REQUEST_KEY as gi, SettingsObject as gl, BuildPlatform as gn, SETTING_SCOPES as go, MacosProcess as gr, easMachineStateRoot as gs, readStats as gt, SetupJournal as h, parseHostedLocalDeviceCount as ha, parseSince as hc, DEVICE_RECLAIM_REASON as hi, RepoRecord as hl, BuildPlanPayload as hn, SETTING_GROUPS as ho, MacosBuild as hr, diskUsageWalkClaims as hs, readRunEstimates as ht, ArchivedSummary as i, HostedIosDevice as ia, QueryCriteria as ic, hostedAndroidRecords as ii, withConfigLockAsync as il, BuildActivity as in, SETTINGS_SCHEMA_URL as io, WORKSPACE_STAGE_KINDS as ir, buildMachinesFile as is, StatsBucket as it, Endpoint as j, HostedMacosChoice as ja, validEasSessionClaim as jc, lastUseFrom as ji, MachineCacheUsage as jl, LastBuildReport as jn, isSensitiveReference as jo, readArchivesAsync as jr, setupJournalFile as js, agentSessionOf as jt, readHostedNativeLogsCheckpoint as k, HostedAgentLease as ka, readCreatedDevices as kc, WorkspaceState as ki, saturation as kl, GitChip as kn, expectedShape as ko, readArchiveState as kr, serverLocalSocket as ks, PullRequestCacheEntry as kt, SummaryHistoryEntry as l, hostedConsolePort as la, compileGrep as lc, hostedNativeRecords as li, ConcurrencyLimits as ll, BuildHistoryEntry as ln, IOS_SIMULATOR_APPS as lo, WorkspaceStage as lr, createdDevicesLock as ls, StatsReport as lt, SetupCapability as m, parseHostedDevice as ma, markerWindow as mc, DEVICE_IDLE_SHUTDOWN_KEY as mi, ProjectRecord as ml, BuildPlacement as mn, SETTINGS as mo, MacosAppState as mr, diskUsageCacheDir as ms, projectRootDirectories as mt, KeyedEntities as n, HostedDeviceSession as na, LogQueryPlan as nc, hostedAndroidDeviceName as ni, windowsShortDirKey as nl, BUILD_PHASES as nn, validHostedAppBlob as no, WEB_PAGE_STATES as nr, archiveLock as ns, RunSample as nt, SUMMARY_ARCHIVES as o, assertHostedDeviceLedger as oa, attachExpoErrorContext as oc, parseHostedAndroidPlacement as oi, automaticMachineEnabled as ol, BuildCause as on, ANDROID_COMPILER_CACHE_CHOICES as oo, WebBrowserState as or, clientIdentityKeyFile as os, StatsCapacityWait as ot, workspaceSummary as p, parseHostedChoice as pa, logFiles as pc, BUILD_HISTORY_LIMIT as pi, PlatformRecords as pl, BuildPhase as pn, RemoteDeviceBackend as po, MacosAppRecord as pr, deviceViewersDir as ps, offloadSummary as pt, BuildMachineTotals as q, hostedAppArea as qa, findEnclosingWorktreeRoot as qc, HostedAndroidChoice as qi, createAsyncAgentActionReader as ql, RunOutcomeKind as qn, listRecordedDevicesAsync as qo, HostedIosPlacement as qr, workspaceMetadataFile as qs, APP_PROCESS_STATES as qt, applyKeyedDelta as r, HostedIosChoice as ra, NATIVE_CRASH_LOG_PREFIX as rc, hostedAndroidPlacements as ri, withConfigLock as rl, BUILD_RESULTS as rn, SETTINGS_SCHEMA_FILE as ro, WORKSPACE_PHASES as rr, archiveRoot as rs, STATS_VERSION as rt, StatusViews as s, deviceHostArea as sa, buildCriteria as sc, unreadableHostedAndroid as si, requireAutomaticMachine as sl, BuildDetail as sn, ANDROID_EMULATOR_APPS as so, WebPageState as sr, configLockPath as ss, StatsPlacement as st, KeyedDelta as t, HostedDeviceSelectors as ta, LogQueryOptions as tc, HostedAndroidStatus as ti, windowsShortDir as tl, AppPresence as tn, validHostedAppArguments as to, TUTORIAL_VERSION as tr, archiveDir as ts, RunHistory as tt, WorkspaceSummary as u, hostedDeviceId as ua, fileSizes as uc, parseHostedNativePlacement as ui, Config as ul, BuildMissCategory as un, OFFLOAD_MODES as uo, WorktreeFacts as ur, deviceHostMachinesClaims as us, StatsScope as ut, parseSetupJournal as v, parseHostedPlatformDevice as va, queryLogs as vc, DevServerStopRequest as vi, SupervisorRecord as vl, BuildResult as vn, SettingEntry as vo, parseMacosRecord as vr, easSessionLedgerLock as vs, statsProjectKey as vt, HostedLogsCursor as w, HOSTED_MACOS_APP_SLOTS as wa, countErrorEntries as wc, MetroLastStop as wi, readBuildMachines as wl, DevicePlacement as wn, TunnelMode as wo, archiveEnabled as wr, maintenanceDir as ws, ViewedDevice as wt, agentDeviceStateDirsAsync as x, readHostedDeviceLedger as xa, recordMatches as xc, IdleStopRecord as xi, MACHINE_CREDENTIALS_VERSION as xl, DeviceActivity as xn, SettingWriteResult as xo, ArchivedBytes as xr, gitMergeCacheDir as xs, trimSamples as xt, readSetupJournal as y, parseHostedRequest as ya, readLogRecords as yc, DeviceIdleShutdownRecord as yi, clientIdentity as yl, BuildWaitingFor as yn, SettingScope as yo, readHostedMacosApp as yr, emulatorLogFile as ys, trimCapacityRefusals as yt, HOSTED_METRO_GATEWAYS_KEY as z, parseHostedMacosChoice as za, DebugLog as zc, readLastBuilds as zi, AgentDeviceUsageRoots as zl, MetroBundleState as zn, RECORDING_PLATFORMS as zo, MaintenanceRecord as zr, workspaceAgentDeviceDir as zs, readDiskUsage as zt };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,4 @@
1
+ import { N as BuildSwiftpmArtifactQuery, j as BuildReactNativeArtifactQuery, m as BuildArtifactIdentity } from "./protocol-BjJt4ghB.mjs";
1
2
  import { Server } from "node:net";
2
3
  //#region dir-lock.d.ts
3
4
  interface DirLockOptions {
@@ -12,7 +13,14 @@ declare function withDirLock<T>(lockPath: string, fn: () => T, { waitMs, pollMs,
12
13
  * transaction and reentrant nesting behave exactly as with `withDirLock`.
13
14
  * An optional signal cancels acquisition; it cannot interrupt the synchronous transaction.
14
15
  */
15
- declare function withDirLockAsync<T>(lockPath: string, fn: () => T, { waitMs, pollMs, ensureParent, signal }?: DirLockOptions & {
16
+ declare function withDirLockAsync<T>(lockPath: string, fn: () => T, options?: DirLockOptions & {
17
+ signal?: AbortSignal;
18
+ }): Promise<T>;
19
+ /**
20
+ * Holds the directory lock and its ownership claim until the body settles. Transactions are exclusive even
21
+ * within one process and are not reentrant. Cancellation stops acquisition; the body owns cancellation after admission.
22
+ */
23
+ declare function withDirLockTransaction<T>(lockPath: string, fn: () => T | Promise<T>, options?: DirLockOptions & {
16
24
  signal?: AbortSignal;
17
25
  }): Promise<T>;
18
26
  //#endregion
@@ -107,6 +115,17 @@ declare function compiledHelper({ dir, name, inputs, version, compile, prune }:
107
115
  prune?: boolean;
108
116
  }): Promise<string>;
109
117
  //#endregion
118
+ //#region dependency-install.d.ts
119
+ /** The existing worker install command and marker identity for a repository's selected lockfile. */
120
+ declare function dependencyInstall(root: string, packageName: string | null): {
121
+ command: "pnpm" | "yarn" | "npm";
122
+ args: string[];
123
+ lockfile: string;
124
+ digest: string;
125
+ } | null;
126
+ /** Whether the worker can reuse this project's dependency install without running the package manager. */
127
+ declare function reusableDependencies(area: string, project: string, packageName: string | null, lockfile: string): boolean;
128
+ //#endregion
110
129
  //#region metro-bridge.d.ts
111
130
  interface MetroBridge {
112
131
  server: Server;
@@ -125,6 +144,19 @@ declare function createMetroBridge({ gatewayPort, peer, secret }: {
125
144
  secret: string;
126
145
  }): MetroBridge;
127
146
  //#endregion
147
+ //#region react-native-artifact.d.ts
148
+ /** Validates and canonicalizes the choices used by completed React Native peer artifacts. */
149
+ declare function reactNativeArtifactQuery(value: unknown): BuildReactNativeArtifactQuery | null;
150
+ /** The identity of a canonical React Native query and the toolchain verified around its build. */
151
+ declare function reactNativeArtifactIdentity(receipt: {
152
+ query: BuildReactNativeArtifactQuery;
153
+ toolchain: object;
154
+ }): BuildArtifactIdentity;
155
+ //#endregion
156
+ //#region swiftpm-artifact.d.ts
157
+ /** Validates and canonicalizes the source and build choices of a completed SwiftPM peer artifact. */
158
+ declare function swiftpmArtifactQuery(value: unknown): BuildSwiftpmArtifactQuery | null;
159
+ //#endregion
128
160
  //#region index.d.ts
129
161
  declare function configDir(): string;
130
162
  /** Creates `dir` and its missing parents owner-only, and narrows an existing `dir` that grants group or other access when the filesystem and owner allow it. */
@@ -189,4 +221,4 @@ declare function updateCacheManifest(file: string, mutate: (caches: Array<Record
189
221
  declare function cacheDirRefusal(dir: string): string | null;
190
222
  declare function registerCache({ dir, name, prune, note, entriesDepth, layout, replaces }: RegisterOptions): void;
191
223
  //#endregion
192
- export { type AsyncStoreArtifactOptions, BuildRunOptions, CacheManifest, CacheRegistrationMatch, type DirLockOptions, LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, type MetroBridge, RegisterOptions, STORE_ROOT_TAG, type StimContext, type StimOutput, type StoreArtifactOptions, type UnitLine, ambientContext, ambientEnv, ambientWrite, artifactIn, buildCacheKey, buildCacheRoot, cacheDirRefusal, cacheManifestLockPath, cacheNameSegment, cachePathSetting, compiledHelper, configDir, createMetroBridge, createMetroGateway, ensurePrivateDir, hostSimulatorArch, metroCacheRoot, quoteUnitWord, quotedPath, readCacheManifest, registerCache, resolveArtifact, rotateLog, rotatedLogPath, sharedStoreRoot, storeArtifact, storeArtifactAsync, tagSharedStore, unitLines, unitWords, updateCacheManifest, validMacosResourceDestination, withAmbientContext, withDirLock, withDirLockAsync, workspaceId, workspaceLogDir, workspaceName, workspaceSlug, workspaceStateDir };
224
+ export { type AsyncStoreArtifactOptions, BuildRunOptions, CacheManifest, CacheRegistrationMatch, type DirLockOptions, LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, type MetroBridge, RegisterOptions, STORE_ROOT_TAG, type StimContext, type StimOutput, type StoreArtifactOptions, type UnitLine, ambientContext, ambientEnv, ambientWrite, artifactIn, buildCacheKey, buildCacheRoot, cacheDirRefusal, cacheManifestLockPath, cacheNameSegment, cachePathSetting, compiledHelper, configDir, createMetroBridge, createMetroGateway, dependencyInstall, ensurePrivateDir, hostSimulatorArch, metroCacheRoot, quoteUnitWord, quotedPath, reactNativeArtifactIdentity, reactNativeArtifactQuery, readCacheManifest, registerCache, resolveArtifact, reusableDependencies, rotateLog, rotatedLogPath, sharedStoreRoot, storeArtifact, storeArtifactAsync, swiftpmArtifactQuery, tagSharedStore, unitLines, unitWords, updateCacheManifest, validMacosResourceDestination, withAmbientContext, withDirLock, withDirLockAsync, withDirLockTransaction, workspaceId, workspaceLogDir, workspaceName, workspaceSlug, workspaceStateDir };
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { C as quotedPath } from "./ownership-claim-DHUs_Dir.mjs";
2
- import { A as artifactIn, B as withAmbientContext, C as workspaceName, D as createMetroGateway, E as createMetroBridge, F as unitWords, I as validMacosResourceDestination, K as withDirLock, L as ambientContext, M as storeArtifact, N as quoteUnitWord, O as compiledHelper, P as unitLines, R as ambientEnv, S as workspaceLogDir, T as workspaceStateDir, _ as rotatedLogPath, a as buildCacheRoot, b as updateCacheManifest, c as cacheNameSegment, d as ensurePrivateDir, f as hostSimulatorArch, g as rotateLog, h as registerCache, i as buildCacheKey, j as resolveArtifact, k as storeArtifactAsync, l as cachePathSetting, m as readCacheManifest, n as METRO_NAMED_CACHE_LAYOUT, o as cacheDirRefusal, p as metroCacheRoot, q as withDirLockAsync, r as STORE_ROOT_TAG, s as cacheManifestLockPath, t as LOG_ROTATE_BYTES, u as configDir, v as sharedStoreRoot, w as workspaceSlug, x as workspaceId, y as tagSharedStore, z as ambientWrite } from "./core-DisO3hs1.mjs";
3
- export { LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, STORE_ROOT_TAG, ambientContext, ambientEnv, ambientWrite, artifactIn, buildCacheKey, buildCacheRoot, cacheDirRefusal, cacheManifestLockPath, cacheNameSegment, cachePathSetting, compiledHelper, configDir, createMetroBridge, createMetroGateway, ensurePrivateDir, hostSimulatorArch, metroCacheRoot, quoteUnitWord, quotedPath, readCacheManifest, registerCache, resolveArtifact, rotateLog, rotatedLogPath, sharedStoreRoot, storeArtifact, storeArtifactAsync, tagSharedStore, unitLines, unitWords, updateCacheManifest, validMacosResourceDestination, withAmbientContext, withDirLock, withDirLockAsync, workspaceId, workspaceLogDir, workspaceName, workspaceSlug, workspaceStateDir };
2
+ import { $ as withDirLockTransaction, A as createMetroGateway, B as unitWords, C as workspaceName, D as reactNativeArtifactIdentity, E as swiftpmArtifactQuery, F as artifactIn, G as withAmbientContext, H as ambientContext, I as resolveArtifact, L as storeArtifact, M as reusableDependencies, N as compiledHelper, O as reactNativeArtifactQuery, P as storeArtifactAsync, Q as withDirLockAsync, R as quoteUnitWord, S as workspaceLogDir, T as workspaceStateDir, U as ambientEnv, V as validMacosResourceDestination, W as ambientWrite, Z as withDirLock, _ as rotatedLogPath, a as buildCacheRoot, b as updateCacheManifest, c as cacheNameSegment, d as ensurePrivateDir, f as hostSimulatorArch, g as rotateLog, h as registerCache, i as buildCacheKey, j as dependencyInstall, k as createMetroBridge, l as cachePathSetting, m as readCacheManifest, n as METRO_NAMED_CACHE_LAYOUT, o as cacheDirRefusal, p as metroCacheRoot, r as STORE_ROOT_TAG, s as cacheManifestLockPath, t as LOG_ROTATE_BYTES, u as configDir, v as sharedStoreRoot, w as workspaceSlug, x as workspaceId, y as tagSharedStore, z as unitLines } from "./core-BTsCO1nW.mjs";
3
+ export { LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, STORE_ROOT_TAG, ambientContext, ambientEnv, ambientWrite, artifactIn, buildCacheKey, buildCacheRoot, cacheDirRefusal, cacheManifestLockPath, cacheNameSegment, cachePathSetting, compiledHelper, configDir, createMetroBridge, createMetroGateway, dependencyInstall, ensurePrivateDir, hostSimulatorArch, metroCacheRoot, quoteUnitWord, quotedPath, reactNativeArtifactIdentity, reactNativeArtifactQuery, readCacheManifest, registerCache, resolveArtifact, reusableDependencies, rotateLog, rotatedLogPath, sharedStoreRoot, storeArtifact, storeArtifactAsync, swiftpmArtifactQuery, tagSharedStore, unitLines, unitWords, updateCacheManifest, validMacosResourceDestination, withAmbientContext, withDirLock, withDirLockAsync, withDirLockTransaction, workspaceId, workspaceLogDir, workspaceName, workspaceSlug, workspaceStateDir };
@@ -389,12 +389,13 @@ function overseeMerge(run, { env, entry, notify }, prev) {
389
389
  * handles is left out. The allowance returns when the workspace stops being idle or has no item left.
390
390
  */
391
391
  function overseeAttention(run, { env, entry, notify }, prev) {
392
- const items = workspaceItems(env, {
392
+ const { items, wakeAt } = workspaceAttention(env, {
393
393
  now: run.now,
394
394
  stuckMinutes: run.prefs.stuckMinutes,
395
395
  easSessionMinutes: EAS_SESSION_MINUTES,
396
396
  ownLeases: run.input.ownLeases
397
397
  });
398
+ if (wakeAt !== null) wake(run, wakeAt);
398
399
  const pending = [];
399
400
  for (const item of items) {
400
401
  if (item.category !== "attention") continue;
@@ -558,9 +559,10 @@ const SIGNING_CODES = [
558
559
  /** A failed run older than this on an idle workspace is history, not a problem. */
559
560
  const STALE_MS = 864e5;
560
561
  const recent = (env, at, now) => env.live || now - time(at) < 864e5;
561
- function workspaceItems(env, input, format = attentionBody) {
562
+ function workspaceAttention(env, input, format = attentionBody) {
562
563
  const { now } = input;
563
564
  const items = [];
565
+ let wakeAt = null;
564
566
  for (const issue of env.issues ?? []) {
565
567
  if (issue.severity === "info" || !PERSON_ISSUES.has(issue.code)) continue;
566
568
  items.push({
@@ -610,7 +612,9 @@ function workspaceItems(env, input, format = attentionBody) {
610
612
  });
611
613
  }
612
614
  for (const device of env.physicalDevices ?? []) {
613
- if (!(time(device.lease.expiresAt) <= now)) continue;
615
+ const expiresAt = time(device.lease.expiresAt);
616
+ if (expiresAt > now) wakeAt = Math.min(wakeAt ?? expiresAt, expiresAt);
617
+ if (!(expiresAt <= now)) continue;
614
618
  const slot = device.slot === "default" ? "" : ` --slot ${device.slot}`;
615
619
  items.push({
616
620
  id: `lease-${device.platform}-${device.slot}:${env.path}`,
@@ -628,7 +632,10 @@ function workspaceItems(env, input, format = attentionBody) {
628
632
  const driven = devices.find((d) => d.running && agentDriven(d, input.ownLeases ?? []));
629
633
  for (const session of env.remoteDevices ?? []) {
630
634
  const started = time(session.startedAt);
631
- if (driven || !(now - started >= input.easSessionMinutes * 6e4)) continue;
635
+ const due = started + input.easSessionMinutes * 6e4;
636
+ if (driven) continue;
637
+ if (due > now) wakeAt = Math.min(wakeAt ?? due, due);
638
+ if (!(due <= now)) continue;
632
639
  items.push({
633
640
  id: `eas-${session.sessionId}:${env.path}`,
634
641
  category: "attention",
@@ -659,7 +666,10 @@ function workspaceItems(env, input, format = attentionBody) {
659
666
  remedy: null
660
667
  });
661
668
  }
662
- return items;
669
+ return {
670
+ items,
671
+ wakeAt
672
+ };
663
673
  }
664
674
  const severityRank = (item) => item.severity === "error" ? 0 : 1;
665
675
  /**
@@ -683,7 +693,7 @@ function needsAttention(input, format = attentionBody) {
683
693
  remedy: null
684
694
  }
685
695
  });
686
- for (const env of input.environments) for (const item of workspaceItems(env, input, format)) ranked.push({
696
+ for (const env of input.environments) for (const item of workspaceAttention(env, input, format).items) ranked.push({
687
697
  item,
688
698
  scope: env.live ? 1 : 2
689
699
  });
@@ -1,4 +1,4 @@
1
- import { r as ProcessRecord } from "./process-identity-BTyww2Xj.mjs";
1
+ import { r as ProcessRecord } from "./process-identity-DVNGpF5c.mjs";
2
2
  //#region ownership-claim.d.ts
3
3
  type ClaimMode = "exclusive" | "shared";
4
4
  interface ClaimDetails {
@@ -1,2 +1,2 @@
1
- import { A as setClaimChild, C as inspectClaimSet, D as processGroupAlive, E as markClaimChildPending, M as sharedClaimDir, N as sleepSync, O as readClaimSet, P as tryAcquireClaim, S as exclusiveClaimDir, T as isClaimUnavailable, _ as claimFailure, a as ClaimFailure, b as clearClaimChild, c as ClaimMode, d as ClaimProblem, f as ClaimRefusedError, g as ClaimUnavailableError, h as ClaimSurvey, i as ClaimDetails, j as settleClaim, k as releaseClaim, l as ClaimOptions, m as ClaimSetState, n as CLAIM_UNAVAILABLE, o as ClaimHandle, p as ClaimSetClearance, r as ClaimAttempt, s as ClaimHolder, t as CLAIM_REFUSED, u as ClaimOwner, v as claimLiveness, w as isClaimRefusal, x as clearFreeClaimSet, y as claimRemoveCommand } from "./ownership-claim-Bf8Lq6AY.mjs";
1
+ import { A as setClaimChild, C as inspectClaimSet, D as processGroupAlive, E as markClaimChildPending, M as sharedClaimDir, N as sleepSync, O as readClaimSet, P as tryAcquireClaim, S as exclusiveClaimDir, T as isClaimUnavailable, _ as claimFailure, a as ClaimFailure, b as clearClaimChild, c as ClaimMode, d as ClaimProblem, f as ClaimRefusedError, g as ClaimUnavailableError, h as ClaimSurvey, i as ClaimDetails, j as settleClaim, k as releaseClaim, l as ClaimOptions, m as ClaimSetState, n as CLAIM_UNAVAILABLE, o as ClaimHandle, p as ClaimSetClearance, r as ClaimAttempt, s as ClaimHolder, t as CLAIM_REFUSED, u as ClaimOwner, v as claimLiveness, w as isClaimRefusal, x as clearFreeClaimSet, y as claimRemoveCommand } from "./ownership-claim-RY3fbm1D.mjs";
2
2
  export { CLAIM_REFUSED, CLAIM_UNAVAILABLE, ClaimAttempt, ClaimDetails, ClaimFailure, ClaimHandle, ClaimHolder, ClaimMode, ClaimOptions, ClaimOwner, ClaimProblem, ClaimRefusedError, ClaimSetClearance, ClaimSetState, ClaimSurvey, ClaimUnavailableError, claimFailure, claimLiveness, claimRemoveCommand, clearClaimChild, clearFreeClaimSet, exclusiveClaimDir, inspectClaimSet, isClaimRefusal, isClaimUnavailable, markClaimChildPending, processGroupAlive, readClaimSet, releaseClaim, setClaimChild, settleClaim, sharedClaimDir, sleepSync, tryAcquireClaim };
@@ -1,5 +1,5 @@
1
- import { $t as AndroidDeviceState, Br as MaintenanceStatus, Cn as DeviceLeaseState, Cr as ArchivedWorkspace, Dn as EnvironmentDisk, Fr as MaintenancePass, In as MachineUsageState, Ir as MaintenancePressure, Kn as RemoteDeviceState, On as EnvironmentState, Pn as MachineOwner, Qn as StatusIssue, Sn as DeviceAppProcess, Sr as ArchivedUsage, Tn as DiskMeasure, Ut as withDerivedFacts, Wn as PhysicalDeviceState, Yn as SimulatorState, Zt as AgentSession, _n as BuildReport, a as MachineView, cn as BuildDiagnostic, dn as BuildMissChange, dr as WorktreeGit, er as StatusPayload, f as statusViews, fn as BuildMissReason, fr as WorktreePullRequest, hn as BuildPlanPayload, hr as MacosBuild, i as ArchivedSummary, in as BuildActivity, ja as HostedMacosPlacement, jn as LastBuildReport, jr as MaintenanceAction, kn as GitChip, ln as BuildHistoryEntry, lr as WorkspaceStage, mn as BuildPlacement, or as WebBrowserState, pr as MacosAppRecord, r as applyKeyedDelta, sn as BuildDetail, ur as WorktreeFacts, xn as DeviceActivity, yn as BuildWaitingFor, zn as MetroBundleState } from "./index-_wkluvP_.mjs";
2
- import { $t as LogsQueryResult, An as ProtocolError, B as ControlBeginParams, C as BuildMachineReport, Cn as NotificationsListResult, Dr as WorkspaceEvent, E as BuildPlanParams, En as PROTOCOL_VERSION, Er as WorkspaceDiff, G as DEVICE_HOST_METHODS, Gn as ReplayRange, Hn as ReplayKeyframe, It as InputSimulatorParams, Jt as LogLevel, Kn as ReplaySpan, Mn as PushRegisterParams, Mr as WorkspaceRef, Nr as WorkspacesEvent, Or as WorkspaceFile, Qn as ServerEvent, Qt as LogsEvent, St as FramesSubscribeResult, Tt as HelloResult, U as ControlEndedEvent, Un as ReplayKeyframeParams, V as ControlBeginResult, Vn as ReplayEndedEvent, Vt as KeyModifier, Wn as ReplayMarker, X as DesktopReloadProgressEvent, Xn as SERVER_UPDATE_METHODS, Xt as LogSource, Y as DesktopReloadEndedEvent, Yn as RotateDirection, Yt as LogRecord, Z as DesktopReportEvent, Zt as LogsEndedEvent, _n as NotificationEntry, _t as FrameEvent, a as ActionResult, an as MachineHistory, at as DeviceFrameEvent, bn as NotificationSuppression, c as ArchivedListParams, cn as MachineUsage, cr as SimulatorOptions, dn as MacosWindowsEvent, dt as ErrorEvent, gr as UsageSample, gt as FrameDelayedEvent, hr as UsageHistory, i as ActionParams, in as MachineEvent, it as DeviceFrameArtwork, jn as PushEvent, jr as WorkspacePatch, jt as InputKey, k as BuildProgressEvent, kn as Platform, kr as WorkspaceFiles, kt as InputButton, ln as MachineVolume, mn as Methods, nt as DesktopStopEndedEvent, o as ArchiveDetailParams, ot as DevicePosture, pr as TouchPhase, qn as ReplayTarget, qt as LogFilter, r as ActionName, rn as MachineDetails, rt as DesktopStopProgressEvent, sr as SimulatorCommand, st as DeviceUsageSeries, t as ACTIONS, u as BUILD_METHODS, ur as StatusEvent, v as BuildClientSummary, vn as NotificationEvent, vt as FrameTarget, wt as HelloParams, yn as NotificationLevel } from "./protocol-D8R_3dkO.mjs";
1
+ import { $t as AndroidDeviceState, Cn as DeviceLeaseState, Cr as ArchivedWorkspace, Dn as EnvironmentDisk, Hr as MaintenanceStatus, In as MachineUsageState, Kn as RemoteDeviceState, Lr as MaintenancePass, Na as HostedMacosPlacement, Nr as MaintenanceAction, On as EnvironmentState, Pn as MachineOwner, Qn as StatusIssue, Rr as MaintenancePressure, Sn as DeviceAppProcess, Sr as ArchivedUsage, Tn as DiskMeasure, Ut as withDerivedFacts, Wn as PhysicalDeviceState, Yn as SimulatorState, Zt as AgentSession, _n as BuildReport, a as MachineView, cn as BuildDiagnostic, dn as BuildMissChange, dr as WorktreeGit, er as StatusPayload, f as statusViews, fn as BuildMissReason, fr as WorktreePullRequest, hn as BuildPlanPayload, hr as MacosBuild, i as ArchivedSummary, in as BuildActivity, jn as LastBuildReport, kn as GitChip, ln as BuildHistoryEntry, lr as WorkspaceStage, mn as BuildPlacement, or as WebBrowserState, pr as MacosAppRecord, r as applyKeyedDelta, sn as BuildDetail, ur as WorktreeFacts, xn as DeviceActivity, yn as BuildWaitingFor, zn as MetroBundleState } from "./index-DKq1j8dw.mjs";
2
+ import { $ as DesktopGcEndedEvent, $r as WorkspacesEvent, A as BuildProgressEvent, Ar as StatusEvent, Bt as FramesSubscribeResult, Cn as MachineHistory, Ct as DeviceFrameEvent, D as BuildPlanParams, Dn as MachineVolume, Dr as SimulatorCommand, En as MachineUsage, Fn as NotificationEntry, Fr as UsageHistory, Ft as FrameEvent, Ht as HelloParams, In as NotificationEvent, Ir as UsageSample, It as FrameTarget, J as DEVICE_HOST_METHODS, Jr as WorkspaceFile, K as ControlEndedEvent, Kr as WorkspaceDiff, Ln as NotificationLevel, Mn as Methods, Nr as TouchPhase, Or as SimulatorOptions, Pt as FrameDelayedEvent, Q as DesktopBuildProgressEvent, Qn as PushRegisterParams, Qr as WorkspaceRef, Rn as NotificationSuppression, Sn as MachineEvent, St as DeviceFrameArtwork, Tt as DeviceUsageSeries, U as ControlBeginParams, Ut as HelloResult, Vn as NotificationsListResult, W as ControlBeginResult, Wn as PROTOCOL_VERSION, Xn as ProtocolError, Yr as WorkspaceFiles, Yt as InputKey, Z as DesktopBuildEndedEvent, Zn as PushEvent, Zr as WorkspacePatch, _n as LogsQueryResult, _t as DesktopStopProgressEvent, a as ActionResult, an as KeyModifier, at as DesktopReloadEndedEvent, bt as DesktopWorktreeWarmEndedEvent, c as ArchivedListParams, cr as ReplayKeyframe, dn as LogFilter, dr as ReplayRange, dt as DesktopRunProgressEvent, en as InputSimulatorParams, et as DesktopGcProgressEvent, fn as LogLevel, fr as ReplaySpan, gn as LogsEvent, gr as SERVER_UPDATE_METHODS, gt as DesktopStopEndedEvent, hn as LogsEndedEvent, hr as RotateDirection, ht as DesktopStartProgressEvent, i as ActionParams, kn as MacosWindowsEvent, kt as ErrorEvent, lr as ReplayKeyframeParams, mn as LogSource, mt as DesktopStartEndedEvent, o as ArchiveDetailParams, ot as DesktopReloadProgressEvent, pn as LogRecord, pr as ReplayTarget, qn as Platform, qr as WorkspaceEvent, qt as InputButton, r as ActionName, sr as ReplayEndedEvent, st as DesktopReportEvent, t as ACTIONS, u as BUILD_METHODS, ur as ReplayMarker, ut as DesktopRunEndedEvent, v as BuildClientSummary, vr as ServerEvent, vt as DesktopWorktreeRemoveEndedEvent, w as BuildMachineReport, wt as DevicePosture, xn as MachineDetails, xt as DesktopWorktreeWarmProgressEvent, yt as DesktopWorktreeRemoveProgressEvent } from "./protocol-BjJt4ghB.mjs";
3
3
  //#region phone-protocol.d.ts
4
4
  type PhonePlatform = BuildPlanParams["platform"];
5
5
  type PhoneDevicePlatform = Platform;
@@ -439,7 +439,7 @@ type PhoneControlEndedEvent = Omit<ControlEndedEvent, "reason"> & {
439
439
  type PhoneNotificationEvent = Omit<NotificationEvent, "notification"> & {
440
440
  notification: PhoneNotificationEntry;
441
441
  };
442
- type PhoneServerEvent = Exclude<ServerEvent, BuildProgressEvent | StatusEvent | WorkspacesEvent | WorkspaceEvent | MachineEvent | LogsEvent | ErrorEvent | FrameEvent | ControlEndedEvent | NotificationEvent | MacosWindowsEvent | DesktopReportEvent | DesktopStopProgressEvent | DesktopStopEndedEvent | DesktopReloadProgressEvent | DesktopReloadEndedEvent> | PhoneMacosWindowsEvent | PhoneStatusEvent | PhoneWorkspacesEvent | PhoneWorkspaceEvent | PhoneMachineEvent | PhoneLogsEvent | PhoneErrorEvent | PhoneFrameEvent | PhoneControlEndedEvent | PhoneNotificationEvent;
442
+ type PhoneServerEvent = Exclude<ServerEvent, BuildProgressEvent | StatusEvent | WorkspacesEvent | WorkspaceEvent | MachineEvent | LogsEvent | ErrorEvent | FrameEvent | ControlEndedEvent | NotificationEvent | MacosWindowsEvent | DesktopReportEvent | DesktopStopProgressEvent | DesktopStopEndedEvent | DesktopReloadProgressEvent | DesktopReloadEndedEvent | DesktopStartProgressEvent | DesktopStartEndedEvent | DesktopRunProgressEvent | DesktopRunEndedEvent | DesktopBuildProgressEvent | DesktopBuildEndedEvent | DesktopGcProgressEvent | DesktopGcEndedEvent | DesktopWorktreeRemoveProgressEvent | DesktopWorktreeRemoveEndedEvent | DesktopWorktreeWarmProgressEvent | DesktopWorktreeWarmEndedEvent> | PhoneMacosWindowsEvent | PhoneStatusEvent | PhoneWorkspacesEvent | PhoneWorkspaceEvent | PhoneMachineEvent | PhoneLogsEvent | PhoneErrorEvent | PhoneFrameEvent | PhoneControlEndedEvent | PhoneNotificationEvent;
443
443
  /** Fields introduced after protocol v1's initial release remain optional on the receiving client. */
444
444
  type OptionalFields<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
445
445
  type PhoneHelloResult = OptionalFields<Omit<HelloResult, "server" | "features" | "capabilities" | "actions" | "approval">, "device"> & {
@@ -452,7 +452,7 @@ type PhoneHelloResult = OptionalFields<Omit<HelloResult, "server" | "features" |
452
452
  expiresAt: string;
453
453
  };
454
454
  };
455
- type PhoneMethods = Omit<Methods, (typeof BUILD_METHODS)[number] | (typeof DEVICE_HOST_METHODS)[number] | (typeof SERVER_UPDATE_METHODS)[number] | "desktop.authenticate" | "desktop.reports.get" | "desktop.reports.subscribe" | "desktop.reports.invalidate" | "desktop.settings.get" | "desktop.settings.write" | "desktop.logs.subscribe" | "desktop.doctor.run" | "desktop.stop.subscribe" | "desktop.reload.subscribe" | "machines.update.start" | "machines.update.status" | "device-host.sessions" | "device-host.sessions.stop" | "route.setup" | "hello" | "logs.query" | "machine.get" | "machine.details" | "machine.history" | "workspace.diff" | "frames.subscribe" | "replay.range" | "archive.detail" | "replay.keyframe" | "build.plan" | "action" | "control.begin" | "notifications.list" | "builds.history" | "archived.list" | "worktrees.list" | "maintenance.get"> & {
455
+ type PhoneMethods = Omit<Methods, (typeof BUILD_METHODS)[number] | (typeof DEVICE_HOST_METHODS)[number] | (typeof SERVER_UPDATE_METHODS)[number] | "desktop.authenticate" | "desktop.reports.get" | "desktop.reports.subscribe" | "desktop.reports.invalidate" | "desktop.settings.get" | "desktop.settings.write" | "desktop.logs.subscribe" | "desktop.doctor.run" | "desktop.stop.subscribe" | "desktop.reload.subscribe" | "desktop.start.subscribe" | "desktop.run.subscribe" | "desktop.build.subscribe" | "desktop.gc.subscribe" | "desktop.worktree.remove.subscribe" | "desktop.worktree.warm.subscribe" | "desktop.plan.get" | "desktop.plan.cancel" | "machines.update.start" | "machines.update.status" | "device-host.sessions" | "device-host.sessions.stop" | "route.setup" | "hello" | "logs.query" | "machine.get" | "machine.details" | "machine.history" | "workspace.diff" | "frames.subscribe" | "replay.range" | "archive.detail" | "replay.keyframe" | "build.plan" | "action" | "control.begin" | "notifications.list" | "builds.history" | "archived.list" | "worktrees.list" | "maintenance.get"> & {
456
456
  "builds.history": {
457
457
  params: WorkspaceRef;
458
458
  result: {
@@ -32,6 +32,6 @@ declare function processStartMicros(pid: number): {
32
32
  } | {
33
33
  status: "gone" | "unknown";
34
34
  };
35
- declare function waitForProcessExit(record: ProcessRecord, timeoutMs: number): Promise<boolean>;
35
+ declare function waitForProcessExit(record: ProcessRecord, timeoutMs: number, signal?: AbortSignal): Promise<boolean>;
36
36
  //#endregion
37
37
  export { captureProcessIdentity as a, inspectProcessStart as c, waitForProcessExit as d, ProcessStart as i, processStartMicros as l, ProcessIdentityStatus as n, captureProcessToken as o, ProcessRecord as r, inspectProcessIdentity as s, CapturedIdentity as t, sameProcessRecord as u };
@@ -1,2 +1,2 @@
1
- import { a as captureProcessIdentity, c as inspectProcessStart, d as waitForProcessExit, i as ProcessStart, l as processStartMicros, n as ProcessIdentityStatus, o as captureProcessToken, r as ProcessRecord, s as inspectProcessIdentity, t as CapturedIdentity, u as sameProcessRecord } from "./process-identity-BTyww2Xj.mjs";
1
+ import { a as captureProcessIdentity, c as inspectProcessStart, d as waitForProcessExit, i as ProcessStart, l as processStartMicros, n as ProcessIdentityStatus, o as captureProcessToken, r as ProcessRecord, s as inspectProcessIdentity, t as CapturedIdentity, u as sameProcessRecord } from "./process-identity-DVNGpF5c.mjs";
2
2
  export { CapturedIdentity, ProcessIdentityStatus, ProcessRecord, ProcessStart, captureProcessIdentity, captureProcessToken, inspectProcessIdentity, inspectProcessStart, processStartMicros, sameProcessRecord, waitForProcessExit };