@stim-cli/core 1.19.0 → 1.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/state.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as projectRootDirectories, $a as WebViewport, $c as NdjsonRecord, $i as HOSTED_AGENT_DRIVERS, $n as MacosBuild, $o as serverSetupDir, $r as DeviceIdleShutdownRecord, $s as DEBUG_ENV, $t as BuildPlanPayload, A as DeviceHostMachineCredential, Aa as validHostedAppBlob, Ac as SettingsObject, Ai as HostedDevicePlatform, An as RemoteDeviceState, Ao as buildMachinesLock, Ar as hostedIosRecords, As as logFiles, At as ACTIVITY_RECENCY_BASES, B as RunHistory, Ba as REMOTE_DEVICE_BACKENDS, Bc as tryAcquireBuildSlotClaim, Bi as hostedConsolePort, Bn as WEB_PAGE_STATES, Bo as easMachineStateRoot, Br as parseHostedAndroidPlacement, Bs as countErrorEntries, Bt as AppPresence, C as pinnedEndpoint, Ca as hostedAppBlobs, Cc as ConcurrencyLimits, Ci as workspaceLastUsed, Cn as MetroBundleState, Co as recordingDeviceName, Cr as MaintenanceStatus, Cs as advanceTail, Ct as readBuildDetail, D as HostedMetroRequest, Da as readHostedAppMetadata, Dc as PlatformRecords, Di as HostedDeviceOffer, Dn as PhysicalDeviceConnection, Do as archiveLock, Dr as HostedIosPlacement, Ds as compileGrep, Dt as readPullRequestCache, E as HostedMetroGateway, Ea as readHostedApp, Ec as DoctorRunRecord, Ei as HostedDevice, En as PHYSICAL_DEVICE_CONNECTIONS, Eo as archiveDir, Er as readMaintenanceState, Es as bundleMarkerPlatform, Et as readEndedAgentSessions, F as HISTORY_LIMIT, Fa as ANDROID_EMULATOR_APPS, Fc as MachineCapacity, Fi as HostedIosDevice, Fn as StatusCapacity, Fo as deviceHostMachinesFile, Fr as HostedAndroidStatus, Fs as readLogRecords, Ft as ActivityRecencyBasis, G as StatsCapacityWait, Ga as SettingDefinition, Gc as AgentDeviceUsageRoots, Gi as parseHostedLocalDeviceCount, Gn as WebPageState, Go as gitMergeCacheDir, Gr as unreadableHostedNative, Gs as readCreatedDevices, Gt as BuildDetail, H as STATS_VERSION, Ha as SETTINGS, Hc as readSwiftpmCacheUsage, Hi as parseHostedAndroidDevice, Hn as WORKSPACE_STAGE_KINDS, Ho as easSessionLedgerLock, Hr as HostedNativePlacement, Hs as CreatedDevices, Ht as BUILD_RESULTS, I as OffloadSummary, Ia as ANDROID_PCH_CHOICES, Ic as buildSlotPath, Ii as HostedNativeOffer, In as StatusIssue, Io as deviceHostMachinesLock, Ir as hostedAndroidDeviceName, Is as readLogTimeline, It as AgentSession, J as StatsReport, Ja as SettingType, Jc as readAgentDeviceUsageCache, Ji as parseHostedPlatformDevice, Jn as WorktreeFacts, Jo as maintenanceDir, Jr as DEVICE_IDLE_SHUTDOWN_KEY, Js as isJsonObject, Jt as BuildMissCategory, K as StatsPlacement, Ka as SettingEntry, Kc as agentDeviceUsageFile, Ki as parseHostedNativeOffer, Kn as WorkspacePhase, Ko as maintenanceAttemptFile, Kr as BUILD_HISTORY_KEY, Ks as readEasSessionLedger, Kt as BuildDiagnostic, L as PLACEMENT_DECISIONS, La as IOS_SIMULATOR_APPS, Lc as buildSlotsDir, Li as assertHostedDeviceLedger, Ln as StatusIssueCode, Lo as deviceViewersDir, Lr as hostedAndroidPlacements, Ls as recordMatches, Lt as AgentTool, M as BuildMachineTotals, Ma as SETTINGS_SCHEMA_URL, Mc as SupervisorRecord, Mi as HostedDeviceSelectors, Mn as STATUS_ISSUE_CODES, Mo as createdDevicesFile, Mr as parseHostedIosPlacement, Ms as parseSince, Mt as APP_PROCESS_STATES, N as CAPACITY_REFUSAL_LIMIT, Na as settingsJsonSchema, Nc as BuildMachineCredential, Ni as HostedDeviceSession, Nn as SimulatorState, No as createdDevicesLock, Nr as unreadableHostedIos, Ns as queryJsonLogs, Nt as ActiveBuildState, O as hostedMetroGateways, Oa as rememberHostedAppBlobRename, Oc as ProjectRecord, Oi as HostedDeviceOfferRequest, On as PhysicalDeviceState, Oo as archiveRoot, Or as HostedIosStatus, Os as fileSizes, Ot as withDerivedFacts, P as CAPACITY_REFUSAL_MAX_AGE_MS, Pa as ANDROID_COMPILER_CACHE_CHOICES, Pc as readBuildMachines, Pi as HostedIosChoice, Pn as StatsPlatform, Po as deviceHostMachinesClaims, Pr as HostedAndroidPlacement, Ps as queryLogs, Pt as ActivityDriver, Q as offloadSummary, Qa as WEB_VIEWPORTS, Qc as LEVELS, Qi as readHostedSessions, Qn as MacosAppState, Qo as pullRequestCacheDir, Qr as DevServerStopRequest, Qs as withStateReadCache, Qt as BuildPlacement, R as ReadStatsResult, Ra as OFFLOAD_MODES, Rc as machineCapacity, Ri as deviceHostArea, Rn as StatusPayload, Ro as diskUsageCacheDir, Rr as hostedAndroidRecords, Rs as sortByTs, Rt as AndroidDeviceState, S as parseMachine, Sa as hostedAppAttempt, Sc as validateAutomaticPool, Si as readWorkspaceState, Sn as MemorySource, So as recordedBytes, Sr as MaintenanceState, Ss as QueryCriteria, St as readAgentSessionsCache, T as HOSTED_METRO_REQUESTS_KEY, Ta as parseHostedAppOffer, Tc as DeviceRecord, Ti as HostedAndroidDevice, Tn as NativeBuildStep, To as agentSessionsCacheFile, Tr as readMaintenanceAttempt, Ts as buildCriteria, Tt as readDiskUsageFailure, U as StatsBucket, Ua as SETTING_GROUPS, Uc as swiftpmCacheUsageFile, Ui as parseHostedChoice, Un as WarmStep, Uo as emulatorLogFile, Ur as hostedNativeRecords, Us as EasSessionClaim, Ut as BuildCacheHit, V as RunSample, Va as RemoteDeviceBackend, Vc as SwiftpmCacheUsage, Vi as hostedDeviceId, Vn as WORKSPACE_PHASES, Vo as easSessionLedgerFile, Vr as unreadableHostedAndroid, Vs as CreatedDevicePlatform, Vt as BUILD_PHASES, W as StatsCapacityRefusal, Wa as SETTING_SCOPES, Wc as AgentDeviceUsage, Wi as parseHostedDevice, Wn as WebBrowserState, Wo as getConfigPath, Wr as parseHostedNativePlacement, Ws as EasSessionLedgerRead, Wt as BuildCause, X as decodeStats, Xa as TUNNEL_MODES, Xc as AgentTarget, Xi as readHostedDevice, Xn as WorktreePullRequest, Xo as maintenanceRunClaims, Xr as DEV_SERVER_STOP_REQUEST_KEY, Xs as readJsonObject, Xt as BuildMissReason, Y as StatsScope, Ya as SettingsPayload, Yc as AgentActionReaderOptions, Yi as parseHostedRequest, Yn as WorktreeGit, Yo as maintenanceNdjsonFile, Yr as DEVICE_RECLAIM_REASON, Ys as readJsonFile, Yt as BuildMissChange, Z as findProjectRoot, Za as TunnelMode, Zc as createAgentActionReader, Zi as readHostedDeviceLedger, Zn as MacosAppRecord, Zo as maintenanceStateFile, Zr as DevServerStopRecord, Zs as readStateFile, Zt as BuildPhase, _ as Endpoint, _a as HostedAppDelivery, _c as loadConfig, _i as readDevicePlacement, _n as MEMORY_SOURCES, _o as closedSegmentName, _r as MaintenanceMode, _s as workspaceRecordingsDir, _t as diskUsageCacheFile, a as parseSetupJournal, aa as HostedAppLaunch, ac as allMetroPorts, ai as READY_PHASE_MS, an as DeviceActivity, ao as settingDefinition, ar as ArchivedBytes, as as statsFile, at as trimCapacityWaits, b as endpoint, ba as HostedAppRecord, bc as automaticMachineEnabled, bi as readWarmRecord, bn as MachineUsageState, bo as listSegments, br as MaintenanceRecord, bs as ERROR_SOURCES, bt as listStatusCacheEntries, c as HOSTED_LOGS_FIRST_BYTES, ca as HostedMacosPlacement, cc as findEnclosingWorktreeRoot, ci as WarmRecord, cn as DevicePlacement, co as runId, cr as archiveEnabled, cs as workspaceAgentDeviceDir, ct as DeviceViewersRecord, d as HostedLogsPage, da as parseHostedAgentAccess, dc as getParkedMax, di as lastUseFrom, dn as EnvironmentDisk, do as RECORDING_FOOTAGE_MS, dr as readArchive, ds as workspaceEndedAgentsFile, dt as stimBuildDigest, ea as HOSTED_MACOS_APP_SLOTS, ec as DebugLog, ei as IDLE_STOP_KEY, el as SOURCES, en as BuildPlatform, eo as acceptsShape, er as MacosProcess, es as setupJournalFile, et as readRunEstimates, f as hostedMacosLogsDir, fa as parseHostedAgentGrant, fc as getProject, fi as parseMissReason, fn as EnvironmentState, fo as RECORDING_PLATFORMS, fr as readArchiveState, fs as workspaceEndedAgentsLock, ft as AgentSessionsCache, g as readLogsSince, ga as HOSTED_APP_CHUNK_BYTES, gc as isPathPrefix, gi as readDeviceIdleShutdowns, gn as MACHINE_OWNER_KINDS, go as capDrops, gr as MaintenanceCheck, gs as workspaceMetadataFile, gt as agentSessionOf, h as readHostedNativeLogsCheckpoint, ha as parseHostedMacosPlacement, hc as getRepoSettings, hi as readDevServerStopRequest, hn as LastBuildReport, ho as RecordingPlatform, hr as MaintenanceActionKind, hs as workspaceLogsDir, ht as StatusCacheEntry, i as isSetupJournalPrunable, ia as HostedAgentLease, ic as ParkedMax, ii as MetroLastStop, il as readNdjsonGenerations, in as ChecksState, io as isSensitiveReference, ir as readMacosRecord, is as sharedPods, it as trimCapacityRefusals, j as readDeviceHostMachines, ja as SETTINGS_SCHEMA_FILE, jc as StimConfig, ji as HostedDeviceRequest, jn as RunOutcomeKind, jo as configLockPath, jr as hostedIosStatus, js as markerWindow, jt as AGENT_TOOLS, k as hostedMetroRequests, ka as validHostedAppArguments, kc as RepoRecord, ki as HostedDevicePhase, kn as PlannedPhase, ko as buildMachinesFile, kr as hostedIosPlacements, ks as followLogs, kt as withGitChip, l as HOSTED_LOGS_PAGE_BYTES, la as hostedMacosAppSlot, lc as findProjectByMetroPort, li as WorkspaceState, ln as DiskMeasure, lo as validRunId, lr as archivedUsage, ls as workspaceBuildDetailFile, lt as ViewedDevice, m as parseHostedLogsCursor, ma as parseHostedMacosDevice, mc as getProjectSettings, mi as readDevServerStop, mn as GitChipPart, mo as RecordedSegment, mr as MaintenanceAction, ms as workspaceLogErrorIndex, mt as PullRequestCacheEntry, n as SetupJournal, na as HostedAgentDriverName, nc as debugLogDir, ni as LAST_BUILD_KEYS, nl as parseNdjsonLine, nn as BuildResult, no as expectedShape, nr as parseMacosRecord, ns as sharedCompilationCache, nt as readStatsReport, o as readSetupJournal, oa as HostedMacosChoice, oc as buildWorkerRoot, oi as WARM_KEY, on as DeviceAppProcess, oo as settingValueError, or as ArchivedUsage, os as supervisorLogFile, ot as trimSamples, p as hostedNativeLogsDir, pa as parseHostedMacosChoice, pc as getProjectSetting, pi as readBuildHistory, pn as GitChip, po as RecordedDevice, pr as readArchives, ps as workspaceGradleBuild, pt as ENDED_AGENT_RETENTION_MS, q as StatsRecord, qa as SettingScope, qc as readAgentDeviceUsage, qi as parseHostedOfferRequest, qn as WorkspaceStage, qo as maintenanceChildLogFile, qr as BUILD_HISTORY_LIMIT, qs as validEasSessionClaim, qt as BuildHistoryEntry, r as isJournalExpired, ra as HostedAgentGrant, rc as debugLoggingEnabled, ri as MAINTENANCE_LOG_NAME, rl as parseNdjsonText, rn as BuildWaitingFor, ro as isLayeredSetting, rr as readHostedMacosApp, rs as sharedGradle, rt as statsProjectKey, s as agentDeviceStateDirs, sa as HostedMacosDevice, sc as configCorruptRepair, si as WORKSPACE_AGENT_KEY, sn as DeviceLeaseState, so as RUN_ID_ENV, sr as ArchivedWorkspace, ss as supervisorPidFile, st as wholePhases, t as SetupCapability, ta as HostedAgentAccess, tc as createDebugLog, ti as IdleStopRecord, tl as levelRank, tn as BuildReport, to as coerceSettingText, tr as macosAppState, ts as sharedCcache, tt as readStats, u as HostedLogsCursor, ua as hostedMacosBundleId, uc as getConcurrencyLimits, ui as buildDiagnostics, un as EndedAgentSession, uo as RECORDING_CAP_BYTES, ur as linkReplacedArchives, us as workspaceDerivedData, ut as readViewedDevices, v as TAILNET_MACHINE_PATTERN, va as HostedAppFile, vc as withConfigLock, vi as readIdleStop, vn as MachineOwner, vo as footageDrops, vr as MaintenancePass, vs as workspaceStateFile, vt as diskUsageFailureFile, w as HOSTED_METRO_GATEWAYS_KEY, wa as parseHostedAppManifest, wc as Config, wi as HostedAndroidChoice, wn as NATIVE_BUILD_STEPS, wo as recordingEnabled, wr as parseMaintenanceState, ws as attachExpoErrorContext, wt as readDiskUsage, x as findPeer, xa as hostedAppArea, xc as requireAutomaticMachine, xi as readWorkspaceAgent, xn as MacosBuildPlanPayload, xo as openSegmentName, xr as MaintenanceSize, xs as NATIVE_CRASH_LOG_PREFIX, xt as pullRequestCacheFile, y as TailnetPeer, ya as HostedAppOffer, yc as AutomaticPoolRole, yi as readLastBuilds, yn as MachineOwnerKind, yo as listRecordedDevices, yr as MaintenancePressure, ys as workspaceStateLock, yt as endedAgentSessionOf, z as RunEstimates, za as OffloadMode, zc as saturation, zi as deviceHostRoot, zn as TUTORIAL_VERSION, zo as diskUsageWalkClaims, zr as hostedAndroidStatus, zs as tailRead, zt as AndroidRuntimeFacts } from "./index-BITArGWH.mjs";
2
- export { ACTIVITY_RECENCY_BASES, AGENT_TOOLS, ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, APP_PROCESS_STATES, ActiveBuildState, ActivityDriver, ActivityRecencyBasis, AgentActionReaderOptions, AgentDeviceUsage, AgentDeviceUsageRoots, AgentSession, AgentSessionsCache, AgentTarget, AgentTool, AndroidDeviceState, AndroidRuntimeFacts, AppPresence, ArchivedBytes, ArchivedUsage, ArchivedWorkspace, AutomaticPoolRole, BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, BUILD_RESULTS, BuildCacheHit, BuildCause, BuildDetail, BuildDiagnostic, BuildHistoryEntry, BuildMachineCredential, BuildMachineTotals, BuildMissCategory, BuildMissChange, BuildMissReason, BuildPhase, BuildPlacement, BuildPlanPayload, BuildPlatform, BuildReport, BuildResult, BuildWaitingFor, CAPACITY_REFUSAL_LIMIT, CAPACITY_REFUSAL_MAX_AGE_MS, ChecksState, ConcurrencyLimits, Config, CreatedDevicePlatform, CreatedDevices, DEBUG_ENV, DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, DEV_SERVER_STOP_REQUEST_KEY, DebugLog, DevServerStopRecord, DevServerStopRequest, DeviceActivity, DeviceAppProcess, DeviceHostMachineCredential, DeviceIdleShutdownRecord, DeviceLeaseState, DevicePlacement, DeviceRecord, DeviceViewersRecord, DiskMeasure, DoctorRunRecord, ENDED_AGENT_RETENTION_MS, ERROR_SOURCES, EasSessionClaim, EasSessionLedgerRead, EndedAgentSession, Endpoint, EnvironmentDisk, EnvironmentState, GitChip, GitChipPart, HISTORY_LIMIT, HOSTED_AGENT_DRIVERS, HOSTED_APP_CHUNK_BYTES, HOSTED_LOGS_FIRST_BYTES, HOSTED_LOGS_PAGE_BYTES, HOSTED_MACOS_APP_SLOTS, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, HostedAgentAccess, HostedAgentDriverName, HostedAgentGrant, HostedAgentLease, HostedAndroidChoice, HostedAndroidDevice, HostedAndroidPlacement, HostedAndroidStatus, HostedAppDelivery, HostedAppFile, HostedAppLaunch, HostedAppOffer, HostedAppRecord, HostedDevice, HostedDeviceOffer, HostedDeviceOfferRequest, HostedDevicePhase, HostedDevicePlatform, HostedDeviceRequest, HostedDeviceSelectors, HostedDeviceSession, HostedIosChoice, HostedIosDevice, HostedIosPlacement, HostedIosStatus, HostedLogsCursor, HostedLogsPage, HostedMacosChoice, HostedMacosDevice, HostedMacosPlacement, HostedMetroGateway, HostedMetroRequest, HostedNativeOffer, HostedNativePlacement, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, IdleStopRecord, LAST_BUILD_KEYS, LEVELS, LastBuildReport, MACHINE_OWNER_KINDS, MAINTENANCE_LOG_NAME, MEMORY_SOURCES, MachineCapacity, MachineOwner, MachineOwnerKind, MachineUsageState, MacosAppRecord, MacosAppState, MacosBuild, MacosBuildPlanPayload, MacosProcess, MaintenanceAction, MaintenanceActionKind, MaintenanceCheck, MaintenanceMode, MaintenancePass, MaintenancePressure, MaintenanceRecord, MaintenanceSize, MaintenanceState, MaintenanceStatus, MemorySource, MetroBundleState, MetroLastStop, NATIVE_BUILD_STEPS, NATIVE_CRASH_LOG_PREFIX, NativeBuildStep, NdjsonRecord, OFFLOAD_MODES, OffloadMode, OffloadSummary, PHYSICAL_DEVICE_CONNECTIONS, PLACEMENT_DECISIONS, ParkedMax, PhysicalDeviceConnection, PhysicalDeviceState, PlannedPhase, PlatformRecords, ProjectRecord, PullRequestCacheEntry, QueryCriteria, READY_PHASE_MS, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, REMOTE_DEVICE_BACKENDS, RUN_ID_ENV, ReadStatsResult, RecordedDevice, RecordedSegment, RecordingPlatform, RemoteDeviceBackend, RemoteDeviceState, RepoRecord, RunEstimates, RunHistory, RunOutcomeKind, RunSample, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATS_VERSION, STATUS_ISSUE_CODES, SettingDefinition, SettingEntry, SettingScope, SettingType, SettingsObject, SettingsPayload, SetupCapability, SetupJournal, SimulatorState, StatsBucket, StatsCapacityRefusal, StatsCapacityWait, StatsPlacement, StatsPlatform, StatsRecord, StatsReport, StatsScope, StatusCacheEntry, StatusCapacity, StatusIssue, StatusIssueCode, StatusPayload, StimConfig, SupervisorRecord, SwiftpmCacheUsage, TAILNET_MACHINE_PATTERN, TUNNEL_MODES, TUTORIAL_VERSION, TailnetPeer, TunnelMode, ViewedDevice, WARM_KEY, WEB_PAGE_STATES, WEB_VIEWPORTS, WORKSPACE_AGENT_KEY, WORKSPACE_PHASES, WORKSPACE_STAGE_KINDS, WarmRecord, WarmStep, WebBrowserState, WebPageState, WebViewport, WorkspacePhase, WorkspaceStage, WorkspaceState, WorktreeFacts, WorktreeGit, WorktreePullRequest, acceptsShape, advanceTail, agentDeviceStateDirs, agentDeviceUsageFile, agentSessionOf, agentSessionsCacheFile, allMetroPorts, archiveDir, archiveEnabled, archiveLock, archiveRoot, archivedUsage, assertHostedDeviceLedger, attachExpoErrorContext, automaticMachineEnabled, buildCriteria, buildDiagnostics, buildMachinesFile, buildMachinesLock, buildSlotPath, buildSlotsDir, buildWorkerRoot, bundleMarkerPlatform, capDrops, closedSegmentName, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, countErrorEntries, createAgentActionReader, createDebugLog, createdDevicesFile, createdDevicesLock, debugLogDir, debugLoggingEnabled, decodeStats, deviceHostArea, deviceHostMachinesClaims, deviceHostMachinesFile, deviceHostMachinesLock, deviceHostRoot, deviceViewersDir, diskUsageCacheDir, diskUsageCacheFile, diskUsageFailureFile, diskUsageWalkClaims, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, endedAgentSessionOf, endpoint, expectedShape, fileSizes, findEnclosingWorktreeRoot, findPeer, findProjectByMetroPort, findProjectRoot, followLogs, footageDrops, getConcurrencyLimits, getConfigPath, getParkedMax, getProject, getProjectSetting, getProjectSettings, getRepoSettings, gitMergeCacheDir, hostedAndroidDeviceName, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedDeviceId, hostedIosPlacements, hostedIosRecords, hostedIosStatus, hostedMacosAppSlot, hostedMacosBundleId, hostedMacosLogsDir, hostedMetroGateways, hostedMetroRequests, hostedNativeLogsDir, hostedNativeRecords, isJournalExpired, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, isSetupJournalPrunable, lastUseFrom, levelRank, linkReplacedArchives, listRecordedDevices, listSegments, listStatusCacheEntries, loadConfig, logFiles, machineCapacity, macosAppState, maintenanceAttemptFile, maintenanceChildLogFile, maintenanceDir, maintenanceNdjsonFile, maintenanceRunClaims, maintenanceStateFile, markerWindow, offloadSummary, openSegmentName, parseHostedAgentAccess, parseHostedAgentGrant, parseHostedAndroidDevice, parseHostedAndroidPlacement, parseHostedAppManifest, parseHostedAppOffer, parseHostedChoice, parseHostedDevice, parseHostedIosPlacement, parseHostedLocalDeviceCount, parseHostedLogsCursor, parseHostedMacosChoice, parseHostedMacosDevice, parseHostedMacosPlacement, parseHostedNativeOffer, parseHostedNativePlacement, parseHostedOfferRequest, parseHostedPlatformDevice, parseHostedRequest, parseMachine, parseMacosRecord, parseMaintenanceState, parseMissReason, parseNdjsonLine, parseNdjsonText, parseSetupJournal, parseSince, pinnedEndpoint, projectRootDirectories, pullRequestCacheDir, pullRequestCacheFile, queryJsonLogs, queryLogs, readAgentDeviceUsage, readAgentDeviceUsageCache, readAgentSessionsCache, readArchive, readArchiveState, readArchives, readBuildDetail, readBuildHistory, readBuildMachines, readCreatedDevices, readDevServerStop, readDevServerStopRequest, readDeviceHostMachines, readDeviceIdleShutdowns, readDevicePlacement, readDiskUsage, readDiskUsageFailure, readEasSessionLedger, readEndedAgentSessions, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedDeviceLedger, readHostedMacosApp, readHostedNativeLogsCheckpoint, readHostedSessions, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readLogTimeline, readLogsSince, readMacosRecord, readMaintenanceAttempt, readMaintenanceState, readNdjsonGenerations, readPullRequestCache, readRunEstimates, readSetupJournal, readStateFile, readStats, readStatsReport, readSwiftpmCacheUsage, readViewedDevices, readWarmRecord, readWorkspaceAgent, readWorkspaceState, recordMatches, recordedBytes, recordingDeviceName, recordingEnabled, rememberHostedAppBlobRename, requireAutomaticMachine, runId, saturation, serverSetupDir, settingDefinition, settingValueError, settingsJsonSchema, setupJournalFile, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, statsFile, statsProjectKey, stimBuildDigest, supervisorLogFile, supervisorPidFile, swiftpmCacheUsageFile, tailRead, trimCapacityRefusals, trimCapacityWaits, trimSamples, tryAcquireBuildSlotClaim, unreadableHostedAndroid, unreadableHostedIos, unreadableHostedNative, validEasSessionClaim, validHostedAppArguments, validHostedAppBlob, validRunId, validateAutomaticPool, wholePhases, withConfigLock, withDerivedFacts, withGitChip, withStateReadCache, workspaceAgentDeviceDir, workspaceBuildDetailFile, workspaceDerivedData, workspaceEndedAgentsFile, workspaceEndedAgentsLock, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceRecordingsDir, workspaceStateFile, workspaceStateLock };
1
+ import { $ as projectRootDirectories, $a as TunnelMode, $c as createAgentActionReader, $i as readHostedDeviceLedger, $n as MacosAppState, $o as maintenanceStateFile, $r as DevServerStopRecord, $s as readStateFile, $t as BuildPlacement, A as DeviceHostMachineCredential, Aa as rememberHostedAppBlobRename, Ac as ProjectRecord, Ai as HostedDeviceOfferRequest, An as PlannedPhase, Ao as archiveRoot, Ar as HostedIosStatus, As as fileSizes, At as ACTIVITY_RECENCY_BASES, B as RunHistory, Ba as OFFLOAD_MODES, Bc as machineCapacity, Bi as deviceHostArea, Bn as TUTORIAL_VERSION, Bo as diskUsageCacheDir, Br as hostedAndroidRecords, Bs as sortByTs, Bt as AppPresence, C as pinnedEndpoint, Ca as hostedAppArea, Cc as requireAutomaticMachine, Ci as readWorkspaceAgent, Cn as MemorySource, Co as openSegmentName, Cr as MaintenanceState, Cs as NATIVE_CRASH_LOG_PREFIX, Ct as readBuildDetail, D as HostedMetroRequest, Da as parseHostedAppOffer, Dc as DeviceRecord, Di as HostedAndroidDevice, Dn as PHYSICAL_DEVICE_CONNECTIONS, Do as agentSessionsCacheFile, Dr as readMaintenanceAttempt, Ds as buildCriteria, Dt as readPullRequestCache, E as HostedMetroGateway, Ea as parseHostedAppManifest, Ec as Config, Ei as HostedAndroidChoice, En as NativeBuildStep, Eo as recordingEnabled, Er as parseMaintenanceState, Es as attachExpoErrorContext, Et as readEndedAgentSessions, F as HISTORY_LIMIT, Fa as settingsJsonSchema, Fc as BuildMachineCredential, Fi as HostedDeviceSession, Fn as StatsPlatform, Fo as createdDevicesLock, Fr as unreadableHostedIos, Fs as queryJsonLogs, Ft as ActivityRecencyBasis, G as StatsCapacityWait, Ga as SETTING_GROUPS, Gc as swiftpmCacheUsageFile, Gi as parseHostedChoice, Gn as WebBrowserState, Go as emulatorLogFile, Gr as hostedNativeRecords, Gs as EasSessionClaim, Gt as BuildCause, H as STATS_VERSION, Ha as REMOTE_DEVICE_BACKENDS, Hc as tryAcquireBuildSlotClaim, Hi as hostedConsolePort, Hn as WORKSPACE_PHASES, Ho as easMachineStateRoot, Hr as parseHostedAndroidPlacement, Hs as countErrorEntries, Ht as BUILD_RESULTS, I as OffloadSummary, Ia as ANDROID_COMPILER_CACHE_CHOICES, Ic as readBuildMachines, Ii as HostedIosChoice, In as StatusCapacity, Io as deviceHostMachinesClaims, Ir as HostedAndroidPlacement, Is as queryLogs, It as AgentSession, J as StatsReport, Ja as SettingEntry, Jc as agentDeviceUsageFile, Ji as parseHostedNativeOffer, Jn as WorkspaceStage, Jo as maintenanceAttemptFile, Jr as BUILD_HISTORY_KEY, Js as readEasSessionLedger, Jt as BuildHistoryEntry, K as StatsPlacement, Ka as SETTING_SCOPES, Kc as AgentDeviceUsage, Ki as parseHostedDevice, Kn as WebPageState, Ko as getConfigPath, Kr as parseHostedNativePlacement, Ks as EasSessionLedgerRead, Kt as BuildDetail, L as PLACEMENT_DECISIONS, La as ANDROID_EMULATOR_APPS, Lc as MachineCapacity, Li as HostedIosDevice, Ln as StatusIssue, Lo as deviceHostMachinesFile, Lr as HostedAndroidStatus, Ls as readLogRecords, Lt as AgentTool, M as BuildMachineTotals, Ma as validHostedAppBlob, Mc as SettingsObject, Mi as HostedDevicePlatform, Mn as RunOutcomeKind, Mo as buildMachinesLock, Mr as hostedIosRecords, Ms as logFiles, Mt as APP_PROCESS_STATES, N as CAPACITY_REFUSAL_LIMIT, Na as SETTINGS_SCHEMA_FILE, Nc as StimConfig, Ni as HostedDeviceRequest, Nn as STATUS_ISSUE_CODES, No as configLockPath, Nr as hostedIosStatus, Ns as markerWindow, Nt as ActiveBuildState, O as hostedMetroGateways, Oa as readHostedApp, Oc as DoctorRunRecord, Oi as HostedDevice, On as PhysicalDeviceConnection, Oo as archiveDir, Or as readMaintenanceState, Os as bundleMarkerPlatform, Ot as withDerivedFacts, P as CAPACITY_REFUSAL_MAX_AGE_MS, Pa as SETTINGS_SCHEMA_URL, Pc as SupervisorRecord, Pi as HostedDeviceSelectors, Pn as SimulatorState, Po as createdDevicesFile, Pr as parseHostedIosPlacement, Ps as parseSince, Pt as ActivityDriver, Q as offloadSummary, Qa as TUNNEL_MODES, Qc as AgentTarget, Qi as readHostedDevice, Qn as MacosAppRecord, Qo as maintenanceRunClaims, Qr as DEV_SERVER_STOP_REQUEST_KEY, Qs as readJsonObject, Qt as BuildPhase, R as ReadStatsResult, Ra as ANDROID_PCH_CHOICES, Rc as buildSlotPath, Ri as HostedNativeOffer, Rn as StatusIssueCode, Ro as deviceHostMachinesLock, Rr as hostedAndroidDeviceName, Rs as readLogTimeline, Rt as AndroidDeviceState, S as parseMachine, Sa as HostedAppRecord, Sc as automaticMachineEnabled, Si as readWarmRecord, Sn as MacosBuildPlanPayload, So as listSegments, Sr as MaintenanceSize, Ss as ERROR_SOURCES, St as readAgentSessionsCache, T as HOSTED_METRO_REQUESTS_KEY, Ta as hostedAppBlobs, Tc as ConcurrencyLimits, Ti as workspaceLastUsed, Tn as NATIVE_BUILD_STEPS, To as recordingDeviceName, Tr as MemoryCulprit, Ts as advanceTail, Tt as readDiskUsageFailure, U as StatsBucket, Ua as RemoteDeviceBackend, Uc as SwiftpmCacheUsage, Ui as hostedDeviceId, Un as WORKSPACE_STAGE_KINDS, Uo as easSessionLedgerFile, Ur as unreadableHostedAndroid, Us as CreatedDevicePlatform, Ut as BuildActivity, V as RunSample, Va as OffloadMode, Vc as saturation, Vi as deviceHostRoot, Vn as WEB_PAGE_STATES, Vo as diskUsageWalkClaims, Vr as hostedAndroidStatus, Vs as tailRead, Vt as BUILD_PHASES, W as StatsCapacityRefusal, Wa as SETTINGS, Wc as readSwiftpmCacheUsage, Wi as parseHostedAndroidDevice, Wn as WarmStep, Wo as easSessionLedgerLock, Wr as HostedNativePlacement, Ws as CreatedDevices, Wt as BuildCacheHit, X as decodeStats, Xa as SettingType, Xc as readAgentDeviceUsageCache, Xi as parseHostedPlatformDevice, Xn as WorktreeGit, Xo as maintenanceDir, Xr as DEVICE_IDLE_SHUTDOWN_KEY, Xs as isJsonObject, Xt as BuildMissChange, Y as StatsScope, Ya as SettingScope, Yc as readAgentDeviceUsage, Yi as parseHostedOfferRequest, Yn as WorktreeFacts, Yo as maintenanceChildLogFile, Yr as BUILD_HISTORY_LIMIT, Ys as validEasSessionClaim, Yt as BuildMissCategory, Z as findProjectRoot, Za as SettingsPayload, Zc as AgentActionReaderOptions, Zi as parseHostedRequest, Zn as WorktreePullRequest, Zo as maintenanceNdjsonFile, Zr as DEVICE_RECLAIM_REASON, Zs as readJsonFile, Zt as BuildMissReason, _ as Endpoint, _a as parseHostedMacosPlacement, _c as getRepoSettings, _i as readDevServerStopRequest, _n as MACHINE_OWNER_KINDS, _o as RecordingPlatform, _r as MaintenanceCheck, _s as workspaceLogsDir, _t as diskUsageCacheFile, a as parseSetupJournal, aa as HostedAgentGrant, ac as debugLoggingEnabled, ai as MAINTENANCE_LOG_NAME, al as parseNdjsonText, an as ChecksState, ao as isLayeredSetting, ar as readMacosRecord, as as sharedGradle, at as trimCapacityWaits, b as endpoint, ba as HostedAppFile, bc as withConfigLock, bi as readIdleStop, bn as MachineOwnerKind, bo as footageDrops, br as MaintenancePressure, bs as workspaceStateFile, bt as listStatusCacheEntries, c as HOSTED_LOGS_FIRST_BYTES, ca as HostedMacosChoice, cc as buildWorkerRoot, ci as WARM_KEY, cn as DeviceLeaseState, co as settingValueError, cr as ArchivedWorkspace, cs as supervisorLogFile, ct as DeviceViewersRecord, d as HostedLogsPage, da as hostedMacosAppSlot, dc as findProjectByMetroPort, di as WorkspaceState, dn as EndedAgentSession, do as validRunId, dr as linkReplacedArchives, ds as workspaceBuildDetailFile, dt as stimBuildDigest, ea as readHostedSessions, ec as withStateReadCache, ei as DevServerStopRequest, el as LEVELS, en as BuildPlanPayload, eo as WEB_VIEWPORTS, er as MacosBuild, es as pullRequestCacheDir, et as readRunEstimates, f as hostedMacosLogsDir, fa as hostedMacosBundleId, fc as getConcurrencyLimits, fi as buildDiagnostics, fn as EnvironmentDisk, fo as RECORDING_CAP_BYTES, fr as readArchive, fs as workspaceDerivedData, ft as AgentSessionsCache, g as readLogsSince, ga as parseHostedMacosDevice, gc as getProjectSettings, gi as readDevServerStop, gn as LastBuildReport, go as RecordedSegment, gr as MaintenanceActionKind, gs as workspaceLogErrorIndex, gt as agentSessionOf, h as readHostedNativeLogsCheckpoint, ha as parseHostedMacosChoice, hc as getProjectSetting, hi as readBuildHistory, hn as GitChipPart, ho as RecordedDevice, hr as MaintenanceAction, hs as workspaceGradleBuild, ht as StatusCacheEntry, i as isSetupJournalPrunable, ia as HostedAgentDriverName, ic as debugLogDir, ii as LAST_BUILD_KEYS, il as parseNdjsonLine, in as BuildWaitingFor, io as expectedShape, ir as readHostedMacosApp, is as sharedCompilationCache, it as trimCapacityRefusals, j as readDeviceHostMachines, ja as validHostedAppArguments, jc as RepoRecord, ji as HostedDevicePhase, jn as RemoteDeviceState, jo as buildMachinesFile, jr as hostedIosPlacements, js as followLogs, jt as AGENT_TOOLS, k as hostedMetroRequests, ka as readHostedAppMetadata, kc as PlatformRecords, ki as HostedDeviceOffer, kn as PhysicalDeviceState, ko as archiveLock, kr as HostedIosPlacement, ks as compileGrep, kt as withGitChip, l as HOSTED_LOGS_PAGE_BYTES, la as HostedMacosDevice, lc as configCorruptRepair, li as WORKSPACE_AGENT_KEY, ln as DevicePlacement, lo as RUN_ID_ENV, lr as archiveEnabled, ls as supervisorPidFile, lt as ViewedDevice, m as parseHostedLogsCursor, ma as parseHostedAgentGrant, mc as getProject, mi as parseMissReason, mn as GitChip, mo as RECORDING_PLATFORMS, mr as readArchives, ms as workspaceEndedAgentsLock, mt as PullRequestCacheEntry, n as SetupJournal, na as HOSTED_MACOS_APP_SLOTS, nc as DebugLog, ni as IDLE_STOP_KEY, nl as SOURCES, nn as BuildReport, no as acceptsShape, nr as macosAppState, ns as setupJournalFile, nt as readStatsReport, o as readSetupJournal, oa as HostedAgentLease, oc as ParkedMax, oi as MetroLastStop, ol as readNdjsonGenerations, on as DeviceActivity, oo as isSensitiveReference, or as ArchivedBytes, os as sharedPods, ot as trimSamples, p as hostedNativeLogsDir, pa as parseHostedAgentAccess, pc as getParkedMax, pi as lastUseFrom, pn as EnvironmentState, po as RECORDING_FOOTAGE_MS, pr as readArchiveState, ps as workspaceEndedAgentsFile, pt as ENDED_AGENT_RETENTION_MS, q as StatsRecord, qa as SettingDefinition, qc as AgentDeviceUsageRoots, qi as parseHostedLocalDeviceCount, qn as WorkspacePhase, qo as gitMergeCacheDir, qr as unreadableHostedNative, qs as readCreatedDevices, qt as BuildDiagnostic, r as isJournalExpired, ra as HostedAgentAccess, rc as createDebugLog, ri as IdleStopRecord, rl as levelRank, rn as BuildResult, ro as coerceSettingText, rr as parseMacosRecord, rs as sharedCcache, rt as statsProjectKey, s as agentDeviceStateDirs, sa as HostedAppLaunch, sc as allMetroPorts, si as READY_PHASE_MS, sn as DeviceAppProcess, so as settingDefinition, sr as ArchivedUsage, ss as statsFile, st as wholePhases, t as SetupCapability, ta as HOSTED_AGENT_DRIVERS, tc as DEBUG_ENV, ti as DeviceIdleShutdownRecord, tl as NdjsonRecord, tn as BuildPlatform, to as WebViewport, tr as MacosProcess, ts as serverSetupDir, tt as readStats, u as HostedLogsCursor, ua as HostedMacosPlacement, uc as findEnclosingWorktreeRoot, ui as WarmRecord, un as DiskMeasure, uo as runId, ur as archivedUsage, us as workspaceAgentDeviceDir, ut as readViewedDevices, v as TAILNET_MACHINE_PATTERN, va as HOSTED_APP_CHUNK_BYTES, vc as isPathPrefix, vi as readDeviceIdleShutdowns, vn as MEMORY_SOURCES, vo as capDrops, vr as MaintenanceMode, vs as workspaceMetadataFile, vt as diskUsageFailureFile, w as HOSTED_METRO_GATEWAYS_KEY, wa as hostedAppAttempt, wc as validateAutomaticPool, wi as readWorkspaceState, wn as MetroBundleState, wo as recordedBytes, wr as MaintenanceStatus, ws as QueryCriteria, wt as readDiskUsage, x as findPeer, xa as HostedAppOffer, xc as AutomaticPoolRole, xi as readLastBuilds, xn as MachineUsageState, xo as listRecordedDevices, xr as MaintenanceRecord, xs as workspaceStateLock, xt as pullRequestCacheFile, y as TailnetPeer, ya as HostedAppDelivery, yc as loadConfig, yi as readDevicePlacement, yn as MachineOwner, yo as closedSegmentName, yr as MaintenancePass, ys as workspaceRecordingsDir, yt as endedAgentSessionOf, z as RunEstimates, za as IOS_SIMULATOR_APPS, zc as buildSlotsDir, zi as assertHostedDeviceLedger, zn as StatusPayload, zo as deviceViewersDir, zr as hostedAndroidPlacements, zs as recordMatches, zt as AndroidRuntimeFacts } from "./index-DNBFsz-Q.mjs";
2
+ export { ACTIVITY_RECENCY_BASES, AGENT_TOOLS, ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, APP_PROCESS_STATES, ActiveBuildState, ActivityDriver, ActivityRecencyBasis, AgentActionReaderOptions, AgentDeviceUsage, AgentDeviceUsageRoots, AgentSession, AgentSessionsCache, AgentTarget, AgentTool, AndroidDeviceState, AndroidRuntimeFacts, AppPresence, ArchivedBytes, ArchivedUsage, ArchivedWorkspace, AutomaticPoolRole, BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, BUILD_RESULTS, BuildActivity, BuildCacheHit, BuildCause, BuildDetail, BuildDiagnostic, BuildHistoryEntry, BuildMachineCredential, BuildMachineTotals, BuildMissCategory, BuildMissChange, BuildMissReason, BuildPhase, BuildPlacement, BuildPlanPayload, BuildPlatform, BuildReport, BuildResult, BuildWaitingFor, CAPACITY_REFUSAL_LIMIT, CAPACITY_REFUSAL_MAX_AGE_MS, ChecksState, ConcurrencyLimits, Config, CreatedDevicePlatform, CreatedDevices, DEBUG_ENV, DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, DEV_SERVER_STOP_REQUEST_KEY, DebugLog, DevServerStopRecord, DevServerStopRequest, DeviceActivity, DeviceAppProcess, DeviceHostMachineCredential, DeviceIdleShutdownRecord, DeviceLeaseState, DevicePlacement, DeviceRecord, DeviceViewersRecord, DiskMeasure, DoctorRunRecord, ENDED_AGENT_RETENTION_MS, ERROR_SOURCES, EasSessionClaim, EasSessionLedgerRead, EndedAgentSession, Endpoint, EnvironmentDisk, EnvironmentState, GitChip, GitChipPart, HISTORY_LIMIT, HOSTED_AGENT_DRIVERS, HOSTED_APP_CHUNK_BYTES, HOSTED_LOGS_FIRST_BYTES, HOSTED_LOGS_PAGE_BYTES, HOSTED_MACOS_APP_SLOTS, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, HostedAgentAccess, HostedAgentDriverName, HostedAgentGrant, HostedAgentLease, HostedAndroidChoice, HostedAndroidDevice, HostedAndroidPlacement, HostedAndroidStatus, HostedAppDelivery, HostedAppFile, HostedAppLaunch, HostedAppOffer, HostedAppRecord, HostedDevice, HostedDeviceOffer, HostedDeviceOfferRequest, HostedDevicePhase, HostedDevicePlatform, HostedDeviceRequest, HostedDeviceSelectors, HostedDeviceSession, HostedIosChoice, HostedIosDevice, HostedIosPlacement, HostedIosStatus, HostedLogsCursor, HostedLogsPage, HostedMacosChoice, HostedMacosDevice, HostedMacosPlacement, HostedMetroGateway, HostedMetroRequest, HostedNativeOffer, HostedNativePlacement, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, IdleStopRecord, LAST_BUILD_KEYS, LEVELS, LastBuildReport, MACHINE_OWNER_KINDS, MAINTENANCE_LOG_NAME, MEMORY_SOURCES, MachineCapacity, MachineOwner, MachineOwnerKind, MachineUsageState, MacosAppRecord, MacosAppState, MacosBuild, MacosBuildPlanPayload, MacosProcess, MaintenanceAction, MaintenanceActionKind, MaintenanceCheck, MaintenanceMode, MaintenancePass, MaintenancePressure, MaintenanceRecord, MaintenanceSize, MaintenanceState, MaintenanceStatus, MemoryCulprit, MemorySource, MetroBundleState, MetroLastStop, NATIVE_BUILD_STEPS, NATIVE_CRASH_LOG_PREFIX, NativeBuildStep, NdjsonRecord, OFFLOAD_MODES, OffloadMode, OffloadSummary, PHYSICAL_DEVICE_CONNECTIONS, PLACEMENT_DECISIONS, ParkedMax, PhysicalDeviceConnection, PhysicalDeviceState, PlannedPhase, PlatformRecords, ProjectRecord, PullRequestCacheEntry, QueryCriteria, READY_PHASE_MS, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, REMOTE_DEVICE_BACKENDS, RUN_ID_ENV, ReadStatsResult, RecordedDevice, RecordedSegment, RecordingPlatform, RemoteDeviceBackend, RemoteDeviceState, RepoRecord, RunEstimates, RunHistory, RunOutcomeKind, RunSample, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATS_VERSION, STATUS_ISSUE_CODES, SettingDefinition, SettingEntry, SettingScope, SettingType, SettingsObject, SettingsPayload, SetupCapability, SetupJournal, SimulatorState, StatsBucket, StatsCapacityRefusal, StatsCapacityWait, StatsPlacement, StatsPlatform, StatsRecord, StatsReport, StatsScope, StatusCacheEntry, StatusCapacity, StatusIssue, StatusIssueCode, StatusPayload, StimConfig, SupervisorRecord, SwiftpmCacheUsage, TAILNET_MACHINE_PATTERN, TUNNEL_MODES, TUTORIAL_VERSION, TailnetPeer, TunnelMode, ViewedDevice, WARM_KEY, WEB_PAGE_STATES, WEB_VIEWPORTS, WORKSPACE_AGENT_KEY, WORKSPACE_PHASES, WORKSPACE_STAGE_KINDS, WarmRecord, WarmStep, WebBrowserState, WebPageState, WebViewport, WorkspacePhase, WorkspaceStage, WorkspaceState, WorktreeFacts, WorktreeGit, WorktreePullRequest, acceptsShape, advanceTail, agentDeviceStateDirs, agentDeviceUsageFile, agentSessionOf, agentSessionsCacheFile, allMetroPorts, archiveDir, archiveEnabled, archiveLock, archiveRoot, archivedUsage, assertHostedDeviceLedger, attachExpoErrorContext, automaticMachineEnabled, buildCriteria, buildDiagnostics, buildMachinesFile, buildMachinesLock, buildSlotPath, buildSlotsDir, buildWorkerRoot, bundleMarkerPlatform, capDrops, closedSegmentName, coerceSettingText, compileGrep, configCorruptRepair, configLockPath, countErrorEntries, createAgentActionReader, createDebugLog, createdDevicesFile, createdDevicesLock, debugLogDir, debugLoggingEnabled, decodeStats, deviceHostArea, deviceHostMachinesClaims, deviceHostMachinesFile, deviceHostMachinesLock, deviceHostRoot, deviceViewersDir, diskUsageCacheDir, diskUsageCacheFile, diskUsageFailureFile, diskUsageWalkClaims, easMachineStateRoot, easSessionLedgerFile, easSessionLedgerLock, emulatorLogFile, endedAgentSessionOf, endpoint, expectedShape, fileSizes, findEnclosingWorktreeRoot, findPeer, findProjectByMetroPort, findProjectRoot, followLogs, footageDrops, getConcurrencyLimits, getConfigPath, getParkedMax, getProject, getProjectSetting, getProjectSettings, getRepoSettings, gitMergeCacheDir, hostedAndroidDeviceName, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedAppArea, hostedAppAttempt, hostedAppBlobs, hostedConsolePort, hostedDeviceId, hostedIosPlacements, hostedIosRecords, hostedIosStatus, hostedMacosAppSlot, hostedMacosBundleId, hostedMacosLogsDir, hostedMetroGateways, hostedMetroRequests, hostedNativeLogsDir, hostedNativeRecords, isJournalExpired, isJsonObject, isLayeredSetting, isPathPrefix, isSensitiveReference, isSetupJournalPrunable, lastUseFrom, levelRank, linkReplacedArchives, listRecordedDevices, listSegments, listStatusCacheEntries, loadConfig, logFiles, machineCapacity, macosAppState, maintenanceAttemptFile, maintenanceChildLogFile, maintenanceDir, maintenanceNdjsonFile, maintenanceRunClaims, maintenanceStateFile, markerWindow, offloadSummary, openSegmentName, parseHostedAgentAccess, parseHostedAgentGrant, parseHostedAndroidDevice, parseHostedAndroidPlacement, parseHostedAppManifest, parseHostedAppOffer, parseHostedChoice, parseHostedDevice, parseHostedIosPlacement, parseHostedLocalDeviceCount, parseHostedLogsCursor, parseHostedMacosChoice, parseHostedMacosDevice, parseHostedMacosPlacement, parseHostedNativeOffer, parseHostedNativePlacement, parseHostedOfferRequest, parseHostedPlatformDevice, parseHostedRequest, parseMachine, parseMacosRecord, parseMaintenanceState, parseMissReason, parseNdjsonLine, parseNdjsonText, parseSetupJournal, parseSince, pinnedEndpoint, projectRootDirectories, pullRequestCacheDir, pullRequestCacheFile, queryJsonLogs, queryLogs, readAgentDeviceUsage, readAgentDeviceUsageCache, readAgentSessionsCache, readArchive, readArchiveState, readArchives, readBuildDetail, readBuildHistory, readBuildMachines, readCreatedDevices, readDevServerStop, readDevServerStopRequest, readDeviceHostMachines, readDeviceIdleShutdowns, readDevicePlacement, readDiskUsage, readDiskUsageFailure, readEasSessionLedger, readEndedAgentSessions, readHostedApp, readHostedAppMetadata, readHostedDevice, readHostedDeviceLedger, readHostedMacosApp, readHostedNativeLogsCheckpoint, readHostedSessions, readIdleStop, readJsonFile, readJsonObject, readLastBuilds, readLogRecords, readLogTimeline, readLogsSince, readMacosRecord, readMaintenanceAttempt, readMaintenanceState, readNdjsonGenerations, readPullRequestCache, readRunEstimates, readSetupJournal, readStateFile, readStats, readStatsReport, readSwiftpmCacheUsage, readViewedDevices, readWarmRecord, readWorkspaceAgent, readWorkspaceState, recordMatches, recordedBytes, recordingDeviceName, recordingEnabled, rememberHostedAppBlobRename, requireAutomaticMachine, runId, saturation, serverSetupDir, settingDefinition, settingValueError, settingsJsonSchema, setupJournalFile, sharedCcache, sharedCompilationCache, sharedGradle, sharedPods, sortByTs, statsFile, statsProjectKey, stimBuildDigest, supervisorLogFile, supervisorPidFile, swiftpmCacheUsageFile, tailRead, trimCapacityRefusals, trimCapacityWaits, trimSamples, tryAcquireBuildSlotClaim, unreadableHostedAndroid, unreadableHostedIos, unreadableHostedNative, validEasSessionClaim, validHostedAppArguments, validHostedAppBlob, validRunId, validateAutomaticPool, wholePhases, withConfigLock, withDerivedFacts, withGitChip, withStateReadCache, workspaceAgentDeviceDir, workspaceBuildDetailFile, workspaceDerivedData, workspaceEndedAgentsFile, workspaceEndedAgentsLock, workspaceGradleBuild, workspaceLastUsed, workspaceLogErrorIndex, workspaceLogsDir, workspaceMetadataFile, workspaceRecordingsDir, workspaceStateFile, workspaceStateLock };
package/dist/state.mjs CHANGED
@@ -1,12 +1,11 @@
1
1
  import { _ as releaseClaim, f as isClaimRefusal, g as readClaimSet, x as tryAcquireClaim } from "./ownership-claim-O31Y5iIb.mjs";
2
2
  import { inspectProcessIdentity } from "./process-identity.mjs";
3
- import { C as workspaceStateDir, h as rotatedLogPath, j as withDirLock, l as configDir, m as rotateLog, t as LOG_ROTATE_BYTES, x as workspaceName } from "./core-DWOUn9xp.mjs";
3
+ import { F as readStateFile, I as withStateReadCache, L as withDirLock, M as isJsonObject, N as readJsonFile, P as readJsonObject, S as workspaceName, g as rotatedLogPath, h as rotateLog, l as configDir, t as LOG_ROTATE_BYTES, u as ensurePrivateDir, w as workspaceStateDir } from "./core-CzCQ9yWY.mjs";
4
4
  import { appendFileSync, closeSync, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, statSync } from "node:fs";
5
5
  import { availableParallelism, homedir, loadavg } from "node:os";
6
6
  import { basename, dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
7
7
  import { createHash, randomBytes } from "node:crypto";
8
8
  import { isIP } from "node:net";
9
- import { AsyncLocalStorage } from "node:async_hooks";
10
9
  import { StringDecoder } from "node:string_decoder";
11
10
  //#region state/agent-actions.ts
12
11
  const EVENTS_VERSION = 1;
@@ -307,48 +306,6 @@ function createAgentActionReader({ sessionsDirs, targets: resolveTargets, sinceT
307
306
  };
308
307
  }
309
308
  //#endregion
310
- //#region state/json-file.ts
311
- const readScope = new AsyncLocalStorage();
312
- /**
313
- * Runs `fn` with each state file read from disk at most once: inside it, including after an `await`, `readStateFile`
314
- * returns the text of the first read of that path, and a path found missing stays missing. Callers still parse every time, so no two
315
- * share a mutable object. Only for computations that write none of the files they read.
316
- */
317
- function withStateReadCache(fn) {
318
- return readScope.run(/* @__PURE__ */ new Map(), fn);
319
- }
320
- function readStateFile(path) {
321
- const cache = readScope.getStore();
322
- if (!cache) return readFileSync(path, "utf-8");
323
- const cached = cache.get(path);
324
- if (cached) {
325
- if ("missing" in cached) throw cached.missing;
326
- return cached.text;
327
- }
328
- try {
329
- const text = readFileSync(path, "utf-8");
330
- cache.set(path, { text });
331
- return text;
332
- } catch (error) {
333
- if (error.code === "ENOENT") cache.set(path, { missing: error });
334
- throw error;
335
- }
336
- }
337
- function readJsonFile(path) {
338
- return JSON.parse(readStateFile(path));
339
- }
340
- function isJsonObject(value) {
341
- return typeof value === "object" && value !== null && !Array.isArray(value);
342
- }
343
- function readJsonObject(path) {
344
- try {
345
- const value = readJsonFile(path);
346
- return isJsonObject(value) ? value : null;
347
- } catch {
348
- return null;
349
- }
350
- }
351
- //#endregion
352
309
  //#region state/agent-device-usage.ts
353
310
  function agentDeviceUsageFile() {
354
311
  return join(configDir(), "agent-device-usage.json");
@@ -403,8 +360,17 @@ function swiftpmCacheUsageFile() {
403
360
  }
404
361
  function readSwiftpmCacheUsage() {
405
362
  const value = readJsonObject(swiftpmCacheUsageFile());
406
- if (!value || value.version !== 1 || typeof value.measuredAt !== "string" || !Number.isFinite(Date.parse(value.measuredAt)) || typeof value.dir !== "string" || typeof value.present !== "boolean" || typeof value.complete !== "boolean" || !(value.bytes === null || typeof value.bytes === "number" && Number.isFinite(value.bytes) && value.bytes >= 0)) return null;
407
- return value;
363
+ if (!value) return null;
364
+ const { version, measuredAt, dir, present, bytes, complete } = value;
365
+ if (version !== 1 || typeof measuredAt !== "string" || !Number.isFinite(Date.parse(measuredAt)) || typeof dir !== "string" || typeof present !== "boolean" || typeof complete !== "boolean" || !(bytes === null || typeof bytes === "number" && Number.isFinite(bytes) && bytes >= 0)) return null;
366
+ return {
367
+ version,
368
+ measuredAt,
369
+ dir,
370
+ present,
371
+ bytes,
372
+ complete
373
+ };
408
374
  }
409
375
  //#endregion
410
376
  //#region state/paths.ts
@@ -565,10 +531,7 @@ function setupJournalFile(hash) {
565
531
  //#endregion
566
532
  //#region state/config.ts
567
533
  function withConfigLock(fn) {
568
- return withDirLock(configLockPath(), fn, { ensureParent: () => {
569
- const dir = configDir();
570
- if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
571
- } });
534
+ return withDirLock(configLockPath(), fn, { ensureParent: () => ensurePrivateDir(configDir()) });
572
535
  }
573
536
  function configCorruptRepair(path = getConfigPath()) {
574
537
  return `Repair the file, or move it aside to start over: mv "${path}" "${path}.broken"`;
@@ -616,6 +579,7 @@ function registryFromJson(config, key, path) {
616
579
  if (!isJsonObject(value)) throw configCorrupt(`has a ${key} that is not an object: ${JSON.stringify(value)}`, path);
617
580
  const registry = {};
618
581
  for (const [name, entry] of Object.entries(value)) {
582
+ if (name === "__proto__") continue;
619
583
  if (!isJsonObject(entry)) throw configCorrupt(`has a ${key} entry ${JSON.stringify(name)} that is not an object: ${JSON.stringify(entry)}`, path);
620
584
  registry[name] = entry;
621
585
  }
@@ -804,23 +768,47 @@ function parseHostedMacosChoice(value) {
804
768
  };
805
769
  }
806
770
  function parseHostedMacosDevice(value) {
807
- if (!isJsonObject(value) || !parseHostedMacosChoice(value) || !hostedMacosAppSlot(value.appSlot) || Object.keys(value).some((key) => ![
771
+ if (!isJsonObject(value) || !hostedMacosAppSlot(value.appSlot) || Object.keys(value).some((key) => ![
808
772
  "architecture",
809
773
  "macosVersion",
810
774
  "appSlot"
811
775
  ].includes(key))) return null;
812
- return value;
776
+ const choice = parseHostedMacosChoice(value);
777
+ return choice && {
778
+ ...choice,
779
+ appSlot: value.appSlot
780
+ };
813
781
  }
814
782
  const AGENT_PATH = /^\/device-host\/agent\/[a-f0-9-]{36}\/$/;
815
783
  const LEASE_NAME = /^[A-Za-z0-9._-]{1,128}$/;
816
784
  const LEASE_DEVICE_KEY = /^[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)+@[1-9][0-9]{0,9}$/;
785
+ function leaseName(value) {
786
+ return typeof value === "string" && LEASE_NAME.test(value);
787
+ }
817
788
  function parseHostedAgentLease(value) {
818
- if (!isJsonObject(value) || Object.keys(value).length !== (value.backend === "ios-instance" || value.backend === "android-instance" ? 5 : 4) || ![
819
- value.tenant,
820
- value.runId,
821
- value.clientId
822
- ].every((name) => typeof name === "string" && LEASE_NAME.test(name)) || typeof value.deviceKey !== "string" || !(value.backend === "ios-instance" ? /^ios:mobile:[a-fA-F0-9-]{36}$/.test(value.deviceKey) : value.backend === "android-instance" ? /^android:mobile:emulator-[0-9]+$/.test(value.deviceKey) : value.backend === void 0 && LEASE_DEVICE_KEY.test(value.deviceKey))) return null;
823
- return value;
789
+ if (!isJsonObject(value)) return null;
790
+ const { tenant, runId, clientId, deviceKey, backend } = value;
791
+ if (Object.keys(value).length !== (backend === "ios-instance" || backend === "android-instance" ? 5 : 4) || !leaseName(tenant) || !leaseName(runId) || !leaseName(clientId) || typeof deviceKey !== "string") return null;
792
+ if (backend === "ios-instance") return /^ios:mobile:[a-fA-F0-9-]{36}$/.test(deviceKey) ? {
793
+ tenant,
794
+ runId,
795
+ clientId,
796
+ deviceKey,
797
+ backend
798
+ } : null;
799
+ if (backend === "android-instance") return /^android:mobile:emulator-[0-9]+$/.test(deviceKey) ? {
800
+ tenant,
801
+ runId,
802
+ clientId,
803
+ deviceKey,
804
+ backend
805
+ } : null;
806
+ return backend === void 0 && LEASE_DEVICE_KEY.test(deviceKey) ? {
807
+ tenant,
808
+ runId,
809
+ clientId,
810
+ deviceKey
811
+ } : null;
824
812
  }
825
813
  /** A grant naming a driver this client does not know is not usable; it parses as null. */
826
814
  function parseHostedAgentGrant(value) {
@@ -1008,6 +996,12 @@ const SETTINGS = [
1008
996
  default: "Debug",
1009
997
  description: "Xcode configuration to build, such as Debug or Release"
1010
998
  },
999
+ {
1000
+ key: "ios.scheme",
1001
+ type: STRING,
1002
+ scopes: ["workspace", "committed"],
1003
+ description: "Shared Xcode scheme to build when the workspace has several; the --scheme flag overrides it"
1004
+ },
1011
1005
  {
1012
1006
  key: "ios.remote",
1013
1007
  type: {
@@ -1018,6 +1012,13 @@ const SETTINGS = [
1018
1012
  scopes: EVERY,
1019
1013
  description: "Default iOS remote target: eas, proxy, or an approved Mac in remote.machines; auto places on an approved Mac when this Mac is full or busy; local runs here, overriding a lower layer"
1020
1014
  },
1015
+ {
1016
+ key: "ios.projectPath",
1017
+ type: RELATIVE_PATH,
1018
+ scopes: ["workspace", "committed"],
1019
+ default: "ios",
1020
+ description: "Directory under the app that holds a bare React Native app's Xcode project and Podfile"
1021
+ },
1021
1022
  {
1022
1023
  key: "ios.simslimProfile",
1023
1024
  type: RELATIVE_PATH,
@@ -1058,7 +1059,11 @@ const SETTINGS = [
1058
1059
  },
1059
1060
  {
1060
1061
  key: "android.deviceProfile",
1061
- type: STRING,
1062
+ type: {
1063
+ kind: "string",
1064
+ pattern: "^[A-Za-z0-9 ._()-]*$",
1065
+ patternHelp: "an avdmanager device id such as pixel_6 or Nexus 5X (`avdmanager list device -c`)"
1066
+ },
1062
1067
  scopes: EVERY,
1063
1068
  default: "pixel_6",
1064
1069
  description: "avdmanager hardware profile id for new owned AVDs"
@@ -1087,12 +1092,36 @@ const SETTINGS = [
1087
1092
  scopes: PROJECT,
1088
1093
  description: "Validated AVD config values"
1089
1094
  },
1095
+ {
1096
+ key: "android.gradleRoot",
1097
+ type: RELATIVE_PATH,
1098
+ scopes: ["workspace", "committed"],
1099
+ default: "android",
1100
+ description: "Directory relative to the app holding gradlew and settings.gradle; may be outside the app but not the repository"
1101
+ },
1102
+ {
1103
+ key: "android.module",
1104
+ type: {
1105
+ kind: "string",
1106
+ pattern: "^(:(?!\\.\\.?(?::|$))[A-Za-z0-9._-]+)+$",
1107
+ patternHelp: "a Gradle project path such as :app"
1108
+ },
1109
+ scopes: ["workspace", "committed"],
1110
+ default: ":app",
1111
+ description: "The app's Gradle project path, such as :app"
1112
+ },
1090
1113
  {
1091
1114
  key: "android.variant",
1092
1115
  type: STRING,
1093
1116
  scopes: PROJECT,
1094
1117
  description: "Gradle build variant"
1095
1118
  },
1119
+ {
1120
+ key: "android.offloadInputs",
1121
+ type: OBJECT,
1122
+ scopes: PROJECT,
1123
+ description: "Native Gradle source sufficiency, exact ignored inputs and generated output directories for build workers"
1124
+ },
1096
1125
  {
1097
1126
  key: "android.keystore",
1098
1127
  type: PATH,
@@ -1126,6 +1155,12 @@ const SETTINGS = [
1126
1155
  default: "auto",
1127
1156
  description: "How a remote device reaches Metro; tailscale is tailnet-only and requires explicit selection"
1128
1157
  },
1158
+ {
1159
+ key: "metro.command",
1160
+ type: { kind: "strings" },
1161
+ scopes: ["workspace", "committed"],
1162
+ description: "Command that starts this project's dev server, as an argv array run from the app directory; {port} is replaced with the reserved Metro port"
1163
+ },
1129
1164
  {
1130
1165
  key: "metro.ngrokUrl",
1131
1166
  type: STRING,
@@ -2017,16 +2052,19 @@ function liveNativeBuilds() {
2017
2052
  for (const name of names) {
2018
2053
  let active;
2019
2054
  try {
2020
- active = JSON.parse(readFileSync(join(dir, name, "state.json"), "utf8")).activeBuild;
2055
+ const state = JSON.parse(readFileSync(join(dir, name, "state.json"), "utf8"));
2056
+ active = isJsonObject(state) ? state.activeBuild : void 0;
2021
2057
  } catch {
2022
2058
  continue;
2023
2059
  }
2024
- if (!active || typeof active !== "object") continue;
2060
+ if (!isJsonObject(active)) continue;
2025
2061
  const { phase, claim, placement } = active;
2026
2062
  if (typeof phase !== "string" || !NATIVE_PHASES.has(phase) || placement) continue;
2027
- if (typeof claim?.root !== "string" || typeof claim.claimId !== "string") continue;
2063
+ if (!isJsonObject(claim)) continue;
2064
+ const { root, claimId } = claim;
2065
+ if (typeof root !== "string" || typeof claimId !== "string") continue;
2028
2066
  try {
2029
- if (readClaimSet(claim.root).live.some((holder) => holder.claimId === claim.claimId)) count += 1;
2067
+ if (readClaimSet(root).live.some((holder) => holder.claimId === claimId)) count += 1;
2030
2068
  } catch {}
2031
2069
  }
2032
2070
  return count;
@@ -2219,10 +2257,15 @@ function ids(value) {
2219
2257
  function readCreatedDevices() {
2220
2258
  try {
2221
2259
  const parsed = JSON.parse(readStateFile(createdDevicesFile()));
2260
+ if (!isJsonObject(parsed)) return {
2261
+ ios: /* @__PURE__ */ new Set(),
2262
+ android: /* @__PURE__ */ new Set(),
2263
+ web: /* @__PURE__ */ new Set()
2264
+ };
2222
2265
  return {
2223
- ios: new Set(ids(parsed?.ios)),
2224
- android: new Set(ids(parsed?.android)),
2225
- web: new Set(ids(parsed?.web))
2266
+ ios: new Set(ids(parsed.ios)),
2267
+ android: new Set(ids(parsed.android)),
2268
+ web: new Set(ids(parsed.web))
2226
2269
  };
2227
2270
  } catch {
2228
2271
  return {
@@ -2309,7 +2352,7 @@ function isError(record) {
2309
2352
  return record.level === "error" || record.level === "fatal";
2310
2353
  }
2311
2354
  function isExpoLine(record) {
2312
- return record.src === "metro" && record.raw === true && record.event === "expo_stdout";
2355
+ return record.src === "metro" && record.raw === true && (record.event === "expo_stdout" || record.event === "command_stdout");
2313
2356
  }
2314
2357
  /**
2315
2358
  * The number of rows a log list shows for `records`, an error query's result in log order. Stim Desktop's
@@ -3414,7 +3457,7 @@ const REVIEW_DECISIONS = /* @__PURE__ */ new Set([
3414
3457
  ]);
3415
3458
  function pullRequestOf(value) {
3416
3459
  if (value === null) return null;
3417
- if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
3460
+ if (!isJsonObject(value)) return void 0;
3418
3461
  const pr = value;
3419
3462
  if (!Number.isInteger(pr.number) || typeof pr.url !== "string" || typeof pr.title !== "string") return void 0;
3420
3463
  if (!PR_STATES.has(pr.state) || typeof pr.checkedAt !== "string") return void 0;
@@ -3479,7 +3522,7 @@ function readBuildDetail(root, claimId) {
3479
3522
  const file = readJsonObject(workspaceBuildDetailFile(root));
3480
3523
  if (!file || file.claimId !== claimId) return null;
3481
3524
  const detail = file.detail;
3482
- if (!detail || typeof detail !== "object" || Array.isArray(detail)) return null;
3525
+ if (!isJsonObject(detail)) return null;
3483
3526
  const raw = detail;
3484
3527
  if (typeof raw.updatedAt !== "string") return null;
3485
3528
  return {
@@ -3496,7 +3539,7 @@ function optionalString(value) {
3496
3539
  }
3497
3540
  /** An agent session as Stim wrote it to its cache or workspace state, or null when it is not one. */
3498
3541
  function agentSessionOf(value) {
3499
- if (!value || typeof value !== "object" || Array.isArray(value)) return null;
3542
+ if (!isJsonObject(value)) return null;
3500
3543
  const raw = value;
3501
3544
  if (!AGENT_TOOLS.includes(raw.tool)) return null;
3502
3545
  if (typeof raw.sessionId !== "string" || !raw.sessionId || typeof raw.cwd !== "string" || !raw.cwd) return null;
@@ -3513,7 +3556,7 @@ function agentSessionOf(value) {
3513
3556
  if (title) session.title = title;
3514
3557
  if (startedAt) session.startedAt = startedAt;
3515
3558
  if (lastActiveAt) session.lastActiveAt = lastActiveAt;
3516
- if (Number.isInteger(raw.pid) && raw.pid > 0) session.pid = raw.pid;
3559
+ if (typeof raw.pid === "number" && Number.isInteger(raw.pid) && raw.pid > 0) session.pid = raw.pid;
3517
3560
  if (openUrl) session.openUrl = openUrl;
3518
3561
  if (webUrl) session.webUrl = webUrl;
3519
3562
  return session;
@@ -3673,7 +3716,7 @@ function missChange(value) {
3673
3716
  }
3674
3717
  /** A recorded miss reason in the shape status reports, without `baseline.cacheKey`; null when malformed. */
3675
3718
  function parseMissReason(value) {
3676
- if (!value || typeof value !== "object" || Array.isArray(value)) return null;
3719
+ if (!isJsonObject(value)) return null;
3677
3720
  const record = value;
3678
3721
  if (typeof record.kind !== "string" || !MISS_KINDS.has(record.kind) || typeof record.summary !== "string") return null;
3679
3722
  const changes = (Array.isArray(record.changes) ? record.changes : []).map(missChange).filter((change) => change !== null).slice(0, MISS_CHANGE_CAP);
@@ -3682,7 +3725,7 @@ function parseMissReason(value) {
3682
3725
  kind: record.kind,
3683
3726
  summary: record.summary,
3684
3727
  changes,
3685
- changeCount: Number.isInteger(record.changeCount) && record.changeCount >= changes.length ? record.changeCount : changes.length,
3728
+ changeCount: typeof record.changeCount === "number" && Number.isInteger(record.changeCount) && record.changeCount >= changes.length ? record.changeCount : changes.length,
3686
3729
  baseline: baseline && typeof baseline.fingerprint === "string" && (baseline.from === "workspace" || baseline.from === "project") ? {
3687
3730
  fingerprint: baseline.fingerprint,
3688
3731
  from: baseline.from
@@ -3710,7 +3753,7 @@ function buildDiagnostics(value) {
3710
3753
  }).toSorted((a, b) => Number(b.file !== null) - Number(a.file !== null)).slice(0, DIAGNOSTIC_CAP);
3711
3754
  }
3712
3755
  function devicePlacement(value) {
3713
- if (!value || typeof value !== "object" || Array.isArray(value)) return null;
3756
+ if (!isJsonObject(value)) return null;
3714
3757
  const record = value;
3715
3758
  if (record.decision !== "local" && record.decision !== "hosted" && record.decision !== "waited-locally" && record.decision !== "eas" || typeof record.reason !== "string") return null;
3716
3759
  return {
@@ -3726,7 +3769,7 @@ function readDevicePlacement(state, platform, slot = "default") {
3726
3769
  return devicePlacement(isJsonObject(device) ? device.devicePlacement : void 0);
3727
3770
  }
3728
3771
  function lastBuildReport(platform, value) {
3729
- if (!value || typeof value !== "object" || Array.isArray(value)) return null;
3772
+ if (!isJsonObject(value)) return null;
3730
3773
  const record = value;
3731
3774
  if (record.platform !== platform || record.status !== "ok" && record.status !== "failed") return null;
3732
3775
  if (typeof record.startedAt !== "string") return null;
@@ -4286,24 +4329,39 @@ function deviceHostArea(id) {
4286
4329
  }
4287
4330
  function parseHostedChoice(value) {
4288
4331
  if (!isJsonObject(value)) return null;
4289
- if (![
4290
- "deviceTypeId",
4291
- "runtimeId",
4292
- "deviceType",
4293
- "runtime"
4294
- ].every((key) => typeof value[key] === "string" && value[key])) return null;
4295
- if (value.architecture !== "arm64" && value.architecture !== "x86_64") return null;
4296
- return value;
4332
+ const { deviceTypeId, runtimeId, deviceType, runtime, architecture } = value;
4333
+ if (typeof deviceTypeId !== "string" || !deviceTypeId || typeof runtimeId !== "string" || !runtimeId || typeof deviceType !== "string" || !deviceType || typeof runtime !== "string" || !runtime || architecture !== "arm64" && architecture !== "x86_64") return null;
4334
+ return {
4335
+ deviceTypeId,
4336
+ runtimeId,
4337
+ deviceType,
4338
+ runtime,
4339
+ architecture
4340
+ };
4297
4341
  }
4298
4342
  function parseHostedDevice(value) {
4299
- if (!isJsonObject(value) || value.avdName !== void 0 || !parseHostedChoice(value)) return null;
4300
- if (typeof value.udid !== "string" || !/^[a-fA-F0-9-]{36}$/.test(value.udid) || typeof value.name !== "string") return null;
4301
- return value;
4343
+ if (!isJsonObject(value) || value.avdName !== void 0) return null;
4344
+ const choice = parseHostedChoice(value);
4345
+ const { udid, name } = value;
4346
+ if (!choice || typeof udid !== "string" || !/^[a-fA-F0-9-]{36}$/.test(udid) || typeof name !== "string") return null;
4347
+ return {
4348
+ ...choice,
4349
+ udid,
4350
+ name
4351
+ };
4302
4352
  }
4303
4353
  function parseHostedAndroidDevice(value) {
4304
4354
  if (!isJsonObject(value)) return null;
4305
- if (value.udid !== void 0 || typeof value.avdName !== "string" || !/^stim-[A-Za-z0-9._-]+$/.test(value.avdName) || !hostedConsolePort(value.consolePort) || value.serial !== `emulator-${value.consolePort}` || typeof value.systemImage !== "string" || !/^system-images;android-\d+;[^;\s]+;(arm64-v8a|x86_64)$/.test(value.systemImage) || typeof value.deviceProfile !== "string" || !value.deviceProfile || value.architecture !== "arm64-v8a" && value.architecture !== "x86_64" || !value.systemImage.endsWith(`;${value.architecture}`)) return null;
4306
- return value;
4355
+ const { avdName, consolePort, systemImage, deviceProfile, architecture } = value;
4356
+ if (value.udid !== void 0 || typeof avdName !== "string" || !/^stim-[A-Za-z0-9._-]+$/.test(avdName) || !hostedConsolePort(consolePort) || value.serial !== `emulator-${consolePort}` || typeof systemImage !== "string" || !/^system-images;android-\d+;[^;\s]+;(arm64-v8a|x86_64)$/.test(systemImage) || typeof deviceProfile !== "string" || !deviceProfile || architecture !== "arm64-v8a" && architecture !== "x86_64" || !systemImage.endsWith(`;${architecture}`)) return null;
4357
+ return {
4358
+ avdName,
4359
+ serial: `emulator-${consolePort}`,
4360
+ consolePort,
4361
+ systemImage,
4362
+ deviceProfile,
4363
+ architecture
4364
+ };
4307
4365
  }
4308
4366
  /** Android Emulator -help-port defines the supported even console ports as 5554 through 5584. */
4309
4367
  function hostedConsolePort(value) {
@@ -4517,7 +4575,7 @@ function validHostedAppArguments(value) {
4517
4575
  return Array.isArray(value) && value.length <= 32 && value.every((argument) => typeof argument === "string" && argument.length <= 1024 && !/[\0\r\n]/.test(argument)) && value.reduce((total, argument) => total + argument.length, 0) <= 8192;
4518
4576
  }
4519
4577
  function parseHostedAppOffer(value) {
4520
- if (!isJsonObject(value) || typeof value.session !== "string" || !/^[a-f0-9-]{36}$/.test(value.session) || !hostedAppAttempt(value.attempt) || typeof value.bundleId !== "string" || !/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}$/.test(value.bundleId) || value.mode !== "development" && value.mode !== "release" || value.devClientScheme !== void 0 && (value.mode !== "development" || typeof value.devClientScheme !== "string" || !/^[a-zA-Z][a-zA-Z0-9+.-]{0,127}$/.test(value.devClientScheme)) || !isJsonObject(value.manifest) || typeof value.manifest.sha256 !== "string" || !/^[0-9a-f]{64}$/.test(value.manifest.sha256) || typeof value.manifest.size !== "number" || !Number.isSafeInteger(value.manifest.size) || value.manifest.size < 1 || value.manifest.size > 8 * 1024 ** 2) return null;
4578
+ if (!isJsonObject(value) || typeof value.session !== "string" || !/^[a-f0-9-]{36}$/.test(value.session) || !hostedAppAttempt(value.attempt) || typeof value.bundleId !== "string" || !/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,254}$/.test(value.bundleId) || value.mode !== "development" && value.mode !== "release" && value.mode !== "process" || value.devClientScheme !== void 0 && (value.mode !== "development" || typeof value.devClientScheme !== "string" || !/^[a-zA-Z][a-zA-Z0-9+.-]{0,127}$/.test(value.devClientScheme)) || !isJsonObject(value.manifest) || typeof value.manifest.sha256 !== "string" || !/^[0-9a-f]{64}$/.test(value.manifest.sha256) || typeof value.manifest.size !== "number" || !Number.isSafeInteger(value.manifest.size) || value.manifest.size < 1 || value.manifest.size > 8 * 1024 ** 2) return null;
4521
4579
  if (value.arguments !== void 0 && !validHostedAppArguments(value.arguments)) return null;
4522
4580
  return {
4523
4581
  session: value.session,
@@ -4600,8 +4658,8 @@ function readHostedApp(session, attempt, workerHome) {
4600
4658
  function processRecord(value) {
4601
4659
  if (!value || typeof value !== "object") return void 0;
4602
4660
  const { pid, processToken, startedAtMicros } = value;
4603
- if (!Number.isSafeInteger(pid) || pid <= 0 || typeof processToken !== "string") return void 0;
4604
- if (!Number.isSafeInteger(startedAtMicros) || startedAtMicros <= 0) return void 0;
4661
+ if (typeof pid !== "number" || !Number.isSafeInteger(pid) || pid <= 0 || typeof processToken !== "string") return void 0;
4662
+ if (typeof startedAtMicros !== "number" || !Number.isSafeInteger(startedAtMicros) || startedAtMicros <= 0) return void 0;
4605
4663
  return {
4606
4664
  pid,
4607
4665
  processToken,
@@ -4821,11 +4879,11 @@ const hostedNativeLogsDir = (home, platform) => join(home, `${platform}-logs`);
4821
4879
  function readHostedNativeLogsCheckpoint(home, platform = "ios") {
4822
4880
  try {
4823
4881
  const value = JSON.parse(readFileSync(join(hostedNativeLogsDir(home, platform), "checkpoint.json"), "utf8"));
4824
- if (!isJsonObject(value) || !Number.isSafeInteger(value.until) || value.until < 0 || value.windowMs !== void 0 && (!Number.isSafeInteger(value.windowMs) || value.windowMs < 1e3) || !Array.isArray(value.boundary) || !value.boundary.every((each) => typeof each === "string" && /^[a-f0-9]{64}$/.test(each))) return null;
4882
+ if (!isJsonObject(value) || !Number.isSafeInteger(value.until) || value.until < 0 || value.windowMs !== void 0 && (typeof value.windowMs !== "number" || !Number.isSafeInteger(value.windowMs) || value.windowMs < 1e3) || !Array.isArray(value.boundary) || !value.boundary.every((each) => typeof each === "string" && /^[a-f0-9]{64}$/.test(each))) return null;
4825
4883
  return {
4826
4884
  until: value.until,
4827
4885
  boundary: value.boundary,
4828
- ...typeof value.appAttempt === "string" && Number.isSafeInteger(value.pid) && value.pid > 0 ? {
4886
+ ...typeof value.appAttempt === "string" && typeof value.pid === "number" && Number.isSafeInteger(value.pid) && value.pid > 0 ? {
4829
4887
  appAttempt: value.appAttempt,
4830
4888
  pid: value.pid
4831
4889
  } : {},
@@ -5114,7 +5172,7 @@ function parseSetupJournal(value) {
5114
5172
  "ok",
5115
5173
  "skipped",
5116
5174
  "failed"
5117
- ].includes(step.state) && text(step.title) && (step.detail === void 0 || typeof step.detail === "string") && (step.fix === void 0 || typeof step.fix === "string")) || !Array.isArray(value.granted) || !value.granted.every((grant) => isJsonObject(grant) && knownKeys(grant, ["capability", "id"]) && capability(grant.capability) && text(grant.id)) || typeof value.done !== "boolean" || value.exit !== void 0 && (!Number.isInteger(value.exit) || value.exit < 0)) return null;
5175
+ ].includes(step.state) && text(step.title) && (step.detail === void 0 || typeof step.detail === "string") && (step.fix === void 0 || typeof step.fix === "string")) || !Array.isArray(value.granted) || !value.granted.every((grant) => isJsonObject(grant) && knownKeys(grant, ["capability", "id"]) && capability(grant.capability) && text(grant.id)) || typeof value.done !== "boolean" || value.exit !== void 0 && (typeof value.exit !== "number" || !Number.isInteger(value.exit) || value.exit < 0)) return null;
5118
5176
  return value;
5119
5177
  }
5120
5178
  function readSetupJournal(hash) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stim-cli/core",
3
- "version": "1.19.0",
3
+ "version": "1.20.1",
4
4
  "description": "Shared internal cache and runtime primitives for Stim packages.",
5
5
  "license": "MIT",
6
6
  "repository": {