@stim-cli/core 1.20.1 → 1.20.2

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 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 };
1
+ import { $ as projectRootDirectories, $a as SettingType, $c as readAgentDeviceUsageCache, $i as parseHostedPlatformDevice, $n as MacosAppState, $o as maintenanceDir, $r as DevServerStopRecord, $s as isJsonObject, $t as BuildPlacement, A as DeviceHostMachineCredential, Aa as parseHostedAppOffer, Ac as DeviceRecord, Ai as HostedDevice, An as PlannedPhase, Ao as agentSessionsCacheFile, Ar as HostedIosStatus, As as buildCriteria, At as ACTIVITY_RECENCY_BASES, B as RunHistory, Ba as ANDROID_EMULATOR_APPS, Bc as MachineCapacity, Bi as HostedNativeOffer, Bn as TUTORIAL_VERSION, Bo as deviceHostMachinesFile, Br as hostedAndroidRecords, Bs as readLogRecords, Bt as AppPresence, C as pinnedEndpoint, Ca as HostedAppFile, Cc as withConfigLock, Ci as readWorkspaceAgent, Cn as MemorySource, Co as footageDrops, Cr as MaintenanceState, Cs as workspaceStateFile, Ct as readBuildDetail, D as HostedMetroRequest, Da as hostedAppAttempt, Dc as validateAutomaticPool, Di as DeviceHostLimits, Dn as PHYSICAL_DEVICE_CONNECTIONS, Do as recordedBytes, Dr as readMaintenanceAttempt, Ds as QueryCriteria, Dt as readPullRequestCache, E as HostedMetroGateway, Ea as hostedAppArea, Ec as requireAutomaticMachine, Ei as DEVICE_HOST_LIMITS, En as NativeBuildStep, Eo as openSegmentName, Er as parseMaintenanceState, Es as NATIVE_CRASH_LOG_PREFIX, Et as readEndedAgentSessions, F as HISTORY_LIMIT, Fa as validHostedAppBlob, Fc as SettingsObject, Fi as HostedDeviceRequest, Fn as StatsPlatform, Fo as buildMachinesLock, Fr as unreadableHostedIos, Fs as logFiles, Ft as ActivityRecencyBasis, G as StatsCapacityWait, Ga as REMOTE_DEVICE_BACKENDS, Gc as tryAcquireBuildSlotClaim, Gi as hostedDeviceId, Gn as WebBrowserState, Go as easMachineStateRoot, Gr as hostedNativeRecords, Gs as countErrorEntries, Gt as BuildCause, H as STATS_VERSION, Ha as IOS_SIMULATOR_APPS, Hc as buildSlotsDir, Hi as deviceHostArea, Hn as WORKSPACE_PHASES, Ho as deviceViewersDir, Hr as parseHostedAndroidPlacement, Hs as recordMatches, Ht as BUILD_RESULTS, I as OffloadSummary, Ia as SETTINGS_SCHEMA_FILE, Ic as StimConfig, Ii as HostedDeviceSelectors, In as StatusCapacity, Io as configLockPath, Ir as HostedAndroidPlacement, Is as markerWindow, It as AgentSession, J as StatsReport, Ja as SETTING_GROUPS, Jc as swiftpmCacheUsageFile, Ji as parseHostedChoice, Jn as WorkspaceStage, Jo as emulatorLogFile, Jr as BUILD_HISTORY_KEY, Js as EasSessionClaim, Jt as BuildHistoryEntry, K as StatsPlacement, Ka as RemoteDeviceBackend, Kc as SwiftpmCacheUsage, Ki as hostedWorkerSettleMs, Kn as WebPageState, Ko as easSessionLedgerFile, Kr as parseHostedNativePlacement, Ks as CreatedDevicePlatform, Kt as BuildDetail, L as PLACEMENT_DECISIONS, La as SETTINGS_SCHEMA_URL, Lc as SupervisorRecord, Li as HostedDeviceSession, Ln as StatusIssue, Lo as createdDevicesFile, Lr as HostedAndroidStatus, Ls as parseSince, Lt as AgentTool, M as BuildMachineTotals, Ma as readHostedAppMetadata, Mc as PlatformRecords, Mi as HostedDeviceOfferRequest, Mn as RunOutcomeKind, Mo as archiveLock, Mr as hostedIosRecords, Ms as compileGrep, Mt as APP_PROCESS_STATES, N as CAPACITY_REFUSAL_LIMIT, Na as rememberHostedAppBlobRename, Nc as ProjectRecord, Ni as HostedDevicePhase, Nn as STATUS_ISSUE_CODES, No as archiveRoot, Nr as hostedIosStatus, Ns as fileSizes, Nt as ActiveBuildState, O as hostedMetroGateways, Oa as hostedAppBlobs, Oc as ConcurrencyLimits, Oi as HostedAndroidChoice, On as PhysicalDeviceConnection, Oo as recordingDeviceName, Or as readMaintenanceState, Os as advanceTail, Ot as withDerivedFacts, P as CAPACITY_REFUSAL_MAX_AGE_MS, Pa as validHostedAppArguments, Pc as RepoRecord, Pi as HostedDevicePlatform, Pn as SimulatorState, Po as buildMachinesFile, Pr as parseHostedIosPlacement, Ps as followLogs, Pt as ActivityDriver, Q as offloadSummary, Qa as SettingScope, Qc as readAgentDeviceUsage, Qi as parseHostedOfferRequest, Qn as MacosAppRecord, Qo as maintenanceChildLogFile, Qr as DEV_SERVER_STOP_REQUEST_KEY, Qs as validEasSessionClaim, Qt as BuildPhase, R as ReadStatsResult, Ra as settingsJsonSchema, Rc as BuildMachineCredential, Ri as HostedIosChoice, Rn as StatusIssueCode, Ro as createdDevicesLock, Rr as hostedAndroidDeviceName, Rs as queryJsonLogs, Rt as AndroidDeviceState, S as parseMachine, Sa as HostedAppDelivery, Sc as loadConfig, Si as readWarmRecord, Sn as MacosBuildPlanPayload, So as closedSegmentName, Sr as MaintenanceSize, Ss as workspaceRecordingsDir, St as readAgentSessionsCache, T as HOSTED_METRO_REQUESTS_KEY, Ta as HostedAppRecord, Tc as automaticMachineEnabled, Ti as workspaceLastUsed, Tn as NATIVE_BUILD_STEPS, To as listSegments, Tr as MemoryCulprit, Ts as ERROR_SOURCES, Tt as readDiskUsageFailure, U as StatsBucket, Ua as OFFLOAD_MODES, Uc as machineCapacity, Ui as deviceHostRoot, Un as WORKSPACE_STAGE_KINDS, Uo as diskUsageCacheDir, Ur as unreadableHostedAndroid, Us as sortByTs, Ut as BuildActivity, V as RunSample, Va as ANDROID_PCH_CHOICES, Vc as buildSlotPath, Vi as assertHostedDeviceLedger, Vn as WEB_PAGE_STATES, Vo as deviceHostMachinesLock, Vr as hostedAndroidStatus, Vs as readLogTimeline, Vt as BUILD_PHASES, W as StatsCapacityRefusal, Wa as OffloadMode, Wc as saturation, Wi as hostedConsolePort, Wn as WarmStep, Wo as diskUsageWalkClaims, Wr as HostedNativePlacement, Ws as tailRead, Wt as BuildCacheHit, X as decodeStats, Xa as SettingDefinition, Xc as AgentDeviceUsageRoots, Xi as parseHostedLocalDeviceCount, Xn as WorktreeGit, Xo as gitMergeCacheDir, Xr as DEVICE_IDLE_SHUTDOWN_KEY, Xs as readCreatedDevices, Xt as BuildMissChange, Y as StatsScope, Ya as SETTING_SCOPES, Yc as AgentDeviceUsage, Yi as parseHostedDevice, Yn as WorktreeFacts, Yo as getConfigPath, Yr as BUILD_HISTORY_LIMIT, Ys as EasSessionLedgerRead, Yt as BuildMissCategory, Z as findProjectRoot, Za as SettingEntry, Zc as agentDeviceUsageFile, Zi as parseHostedNativeOffer, Zn as WorktreePullRequest, Zo as maintenanceAttemptFile, Zr as DEVICE_RECLAIM_REASON, Zs as readEasSessionLedger, Zt as BuildMissReason, _ as Endpoint, _a as parseHostedAgentGrant, _c as getProject, _i as readDevServerStopRequest, _n as MACHINE_OWNER_KINDS, _o as RECORDING_PLATFORMS, _r as MaintenanceCheck, _s as workspaceEndedAgentsLock, _t as diskUsageCacheFile, a as parseSetupJournal, aa as HOSTED_MACOS_APP_SLOTS, ac as DebugLog, ai as MAINTENANCE_LOG_NAME, al as SOURCES, an as ChecksState, ao as acceptsShape, ar as readMacosRecord, as as setupJournalFile, at as trimCapacityWaits, b as endpoint, ba as parseHostedMacosPlacement, bc as getRepoSettings, bi as readIdleStop, bn as MachineOwnerKind, bo as RecordingPlatform, br as MaintenancePressure, bs as workspaceLogsDir, bt as listStatusCacheEntries, c as HOSTED_LOGS_FIRST_BYTES, ca as HostedAgentGrant, cc as debugLoggingEnabled, ci as WARM_KEY, cl as parseNdjsonText, cn as DeviceLeaseState, co as isLayeredSetting, cr as ArchivedWorkspace, cs as sharedGradle, ct as DeviceViewersRecord, d as HostedLogsPage, da as HostedMacosChoice, dc as buildWorkerRoot, di as WorkspaceState, dn as EndedAgentSession, do as settingValueError, dr as linkReplacedArchives, ds as supervisorLogFile, dt as stimBuildDigest, ea as parseHostedRequest, ec as readJsonFile, ei as DevServerStopRequest, el as AgentActionReaderOptions, en as BuildPlanPayload, eo as SettingsPayload, er as MacosBuild, es as maintenanceNdjsonFile, et as readRunEstimates, f as hostedMacosLogsDir, fa as HostedMacosDevice, fc as configCorruptRepair, fi as buildDiagnostics, fn as EnvironmentDisk, fo as RUN_ID_ENV, fr as readArchive, fs as supervisorPidFile, ft as AgentSessionsCache, g as readLogsSince, ga as parseHostedAgentAccess, gc as getParkedMax, gi as readDevServerStop, gn as LastBuildReport, go as RECORDING_FOOTAGE_MS, gr as MaintenanceActionKind, gs as workspaceEndedAgentsFile, gt as agentSessionOf, h as readHostedNativeLogsCheckpoint, ha as hostedMacosBundleId, hc as getConcurrencyLimits, hi as readBuildHistory, hn as GitChipPart, ho as RECORDING_CAP_BYTES, hr as MaintenanceAction, hs as workspaceDerivedData, ht as StatusCacheEntry, i as isSetupJournalPrunable, ia as HOSTED_AGENT_DRIVERS, ic as DEBUG_ENV, ii as LAST_BUILD_KEYS, il as NdjsonRecord, in as BuildWaitingFor, io as WebViewport, ir as readHostedMacosApp, is as serverSetupDir, it as trimCapacityRefusals, j as readDeviceHostMachines, ja as readHostedApp, jc as DoctorRunRecord, ji as HostedDeviceOffer, jn as RemoteDeviceState, jo as archiveDir, jr as hostedIosPlacements, js as bundleMarkerPlatform, jt as AGENT_TOOLS, k as hostedMetroRequests, ka as parseHostedAppManifest, kc as Config, ki as HostedAndroidDevice, kn as PhysicalDeviceState, ko as recordingEnabled, kr as HostedIosPlacement, ks as attachExpoErrorContext, kt as withGitChip, l as HOSTED_LOGS_PAGE_BYTES, la as HostedAgentLease, lc as ParkedMax, li as WORKSPACE_AGENT_KEY, ll as readNdjsonGenerations, ln as DevicePlacement, lo as isSensitiveReference, lr as archiveEnabled, ls as sharedPods, lt as ViewedDevice, m as parseHostedLogsCursor, ma as hostedMacosAppSlot, mc as findProjectByMetroPort, mi as parseMissReason, mn as GitChip, mo as validRunId, mr as readArchives, ms as workspaceBuildDetailFile, mt as PullRequestCacheEntry, n as SetupJournal, na as readHostedDeviceLedger, nc as readStateFile, ni as IDLE_STOP_KEY, nl as createAgentActionReader, nn as BuildReport, no as TunnelMode, nr as macosAppState, ns as maintenanceStateFile, nt as readStatsReport, o as readSetupJournal, oa as HostedAgentAccess, oc as createDebugLog, oi as MetroLastStop, ol as levelRank, on as DeviceActivity, oo as coerceSettingText, or as ArchivedBytes, os as sharedCcache, ot as trimSamples, p as hostedNativeLogsDir, pa as HostedMacosPlacement, pc as findEnclosingWorktreeRoot, pi as lastUseFrom, pn as EnvironmentState, po as runId, pr as readArchiveState, ps as workspaceAgentDeviceDir, pt as ENDED_AGENT_RETENTION_MS, q as StatsRecord, qa as SETTINGS, qc as readSwiftpmCacheUsage, qi as parseHostedAndroidDevice, qn as WorkspacePhase, qo as easSessionLedgerLock, qr as unreadableHostedNative, qs as CreatedDevices, qt as BuildDiagnostic, r as isJournalExpired, ra as readHostedSessions, rc as withStateReadCache, ri as IdleStopRecord, rl as LEVELS, rn as BuildResult, ro as WEB_VIEWPORTS, rr as parseMacosRecord, rs as pullRequestCacheDir, rt as statsProjectKey, s as agentDeviceStateDirs, sa as HostedAgentDriverName, sc as debugLogDir, si as READY_PHASE_MS, sl as parseNdjsonLine, sn as DeviceAppProcess, so as expectedShape, sr as ArchivedUsage, ss as sharedCompilationCache, st as wholePhases, t as SetupCapability, ta as readHostedDevice, tc as readJsonObject, ti as DeviceIdleShutdownRecord, tl as AgentTarget, tn as BuildPlatform, to as TUNNEL_MODES, tr as MacosProcess, ts as maintenanceRunClaims, tt as readStats, u as HostedLogsCursor, ua as HostedAppLaunch, uc as allMetroPorts, ui as WarmRecord, un as DiskMeasure, uo as settingDefinition, ur as archivedUsage, us as statsFile, ut as readViewedDevices, v as TAILNET_MACHINE_PATTERN, va as parseHostedMacosChoice, vc as getProjectSetting, vi as readDeviceIdleShutdowns, vn as MEMORY_SOURCES, vo as RecordedDevice, vr as MaintenanceMode, vs as workspaceGradleBuild, vt as diskUsageFailureFile, w as HOSTED_METRO_GATEWAYS_KEY, wa as HostedAppOffer, wc as AutomaticPoolRole, wi as readWorkspaceState, wn as MetroBundleState, wo as listRecordedDevices, wr as MaintenanceStatus, ws as workspaceStateLock, wt as readDiskUsage, x as findPeer, xa as HOSTED_APP_CHUNK_BYTES, xc as isPathPrefix, xi as readLastBuilds, xn as MachineUsageState, xo as capDrops, xr as MaintenanceRecord, xs as workspaceMetadataFile, xt as pullRequestCacheFile, y as TailnetPeer, ya as parseHostedMacosDevice, yc as getProjectSettings, yi as readDevicePlacement, yn as MachineOwner, yo as RecordedSegment, yr as MaintenancePass, ys as workspaceLogErrorIndex, yt as endedAgentSessionOf, z as RunEstimates, za as ANDROID_COMPILER_CACHE_CHOICES, zc as readBuildMachines, zi as HostedIosDevice, zn as StatusPayload, zo as deviceHostMachinesClaims, zr as hostedAndroidPlacements, zs as queryLogs, zt as AndroidRuntimeFacts } from "./index-VDWBflH3.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_HOST_LIMITS, DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, DEV_SERVER_STOP_REQUEST_KEY, DebugLog, DevServerStopRecord, DevServerStopRequest, DeviceActivity, DeviceAppProcess, DeviceHostLimits, 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, hostedWorkerSettleMs, 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,6 +1,7 @@
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 { 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";
3
+ import { C as workspaceName, F as readJsonObject, I as readStateFile, L as withStateReadCache, N as isJsonObject, P as readJsonFile, R as withDirLock, T as workspaceStateDir, _ as rotatedLogPath, d as ensurePrivateDir, g as rotateLog, t as LOG_ROTATE_BYTES, u as configDir } from "./core-BkgfKqJ8.mjs";
4
+ import { n as withGitChip, t as withDerivedFacts } from "./status-derived-C13g6eQt.mjs";
4
5
  import { appendFileSync, closeSync, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, realpathSync, statSync } from "node:fs";
5
6
  import { availableParallelism, homedir, loadavg } from "node:os";
6
7
  import { basename, dirname, isAbsolute, join, posix, relative, resolve, sep } from "node:path";
@@ -1372,6 +1373,13 @@ const SETTINGS = [
1372
1373
  env: "STIM_ARCHIVE_AGENT_ACTIONS_MAX_AGE_DAYS",
1373
1374
  description: "Days to keep archived agent-device sessions; 0 keeps none"
1374
1375
  },
1376
+ {
1377
+ key: "workspace.hidden",
1378
+ type: BOOLEAN,
1379
+ scopes: ["workspace"],
1380
+ default: false,
1381
+ description: "Hide this workspace in Stim Desktop and the phone app; the next command that uses it unhides it"
1382
+ },
1375
1383
  {
1376
1384
  key: "worktree.exclude",
1377
1385
  type: { kind: "strings" },
@@ -3249,154 +3257,6 @@ const MACHINE_OWNER_KINDS = [
3249
3257
  "shared"
3250
3258
  ];
3251
3259
  //#endregion
3252
- //#region state/status-derived.ts
3253
- const PLATFORMS$1 = ["ios", "android"];
3254
- function isRunning(platform, device) {
3255
- if (platform === "ios") return device.state === "Booted";
3256
- return device.state === "detected" && !device.physical;
3257
- }
3258
- function appPresence(env, platform, device) {
3259
- if (!isRunning(platform, device) || device.app?.state === "running") return null;
3260
- const everBuilt = env.builds?.[platform]?.some((entry) => entry.result === "succeeded") ?? true;
3261
- if (env.lastBuilds?.[platform]?.status === "failed" && !everBuilt) return "none";
3262
- return device.app?.state === "stopped" ? "closed" : null;
3263
- }
3264
- function deviceSlots(env) {
3265
- return [{
3266
- slot: "default",
3267
- ios: env.ios,
3268
- android: env.android
3269
- }, ...env.slots ?? []];
3270
- }
3271
- function latestBuild(env) {
3272
- let latest = null;
3273
- for (const platform of PLATFORMS$1) {
3274
- const build = env.lastBuilds?.[platform];
3275
- if (build && (latest === null || Date.parse(build.startedAt) > Date.parse(latest.startedAt))) latest = build;
3276
- }
3277
- return latest;
3278
- }
3279
- function stage(kind, since, platform = null) {
3280
- return {
3281
- kind,
3282
- since: since ?? null,
3283
- platform,
3284
- closedApps: []
3285
- };
3286
- }
3287
- function workspaceStage(env) {
3288
- if (env.macos?.build.state === "running") return stage("building", env.macos.build.startedAt, "macos");
3289
- if (env.macos?.build.state === "failed") return stage("build-failed", env.macos.build.finishedAt ?? env.macos.build.startedAt, "macos");
3290
- if (env.build?.state === "running") return stage("building", env.build.startedAt, env.build.platform);
3291
- if (!env.live && env.phase === "warming") return stage("warming", env.phaseSince);
3292
- if (!env.live && env.phase === "ready") return stage("ready", env.phaseSince);
3293
- const latest = latestBuild(env);
3294
- if (latest?.status === "failed") return stage("build-failed", latest.finishedAt ?? latest.startedAt, latest.platform);
3295
- if (env.live || (env.remoteDevices?.length ?? 0) > 0) {
3296
- const closedApps = deviceSlots(env).flatMap(({ slot, ...devices }) => PLATFORMS$1.flatMap((platform) => {
3297
- const device = devices[platform];
3298
- return device && appPresence(env, platform, device) === "closed" ? [{
3299
- platform,
3300
- slot
3301
- }] : [];
3302
- }));
3303
- return {
3304
- ...stage("running", env.supervisor?.startedAt),
3305
- closedApps
3306
- };
3307
- }
3308
- const lastStop = env.metro?.lastStop;
3309
- return stage("stopped", lastStop && "at" in lastStop ? lastStop.at : null);
3310
- }
3311
- function checksState(checks) {
3312
- if (!checks) return null;
3313
- if (checks.failing > 0) return "failing";
3314
- if (checks.pending > 0) return "pending";
3315
- return checks.passing > 0 ? "passing" : null;
3316
- }
3317
- function gitChip(worktree) {
3318
- const git = worktree.git;
3319
- if (!git) return null;
3320
- const pull = worktree.pullRequest;
3321
- const parts = [];
3322
- const ahead = git.ahead ?? 0;
3323
- const behind = git.behind ?? 0;
3324
- if (ahead || behind) parts.push({
3325
- kind: "arrows",
3326
- ahead,
3327
- behind
3328
- });
3329
- const uncommitted = git.changed + git.untracked;
3330
- if (uncommitted) parts.push({
3331
- kind: "changed",
3332
- count: uncommitted
3333
- });
3334
- if (git.mergedInto !== null) {
3335
- if (pull?.state !== "merged") parts.push({
3336
- kind: "merged",
3337
- into: git.mergedInto
3338
- });
3339
- } else if (git.upstream === null) parts.push({ kind: "no-upstream" });
3340
- return {
3341
- parts,
3342
- ci: pull ? checksState(pull.checks) : null
3343
- };
3344
- }
3345
- function buildCause(build) {
3346
- if (("result" in build ? build.result : build.status) !== "failed") return null;
3347
- const at = build.diagnostics?.find((d) => d.file && d.line !== null && d.line !== void 0);
3348
- if (at) return {
3349
- key: `${at.file}:${at.line}`,
3350
- file: at.file,
3351
- line: at.line
3352
- };
3353
- return {
3354
- key: build.errorCode ?? "failed",
3355
- file: null,
3356
- line: null
3357
- };
3358
- }
3359
- function withCauses(builds) {
3360
- if (!builds) return builds;
3361
- return Object.fromEntries(Object.entries(builds).map(([platform, list]) => [platform, list?.map((build) => withCause(build))]));
3362
- }
3363
- function withCause(build) {
3364
- const cause = buildCause(build);
3365
- return cause ? {
3366
- ...build,
3367
- cause
3368
- } : build;
3369
- }
3370
- function withGitChip(worktree) {
3371
- const chip = gitChip(worktree);
3372
- return chip ? {
3373
- ...worktree,
3374
- gitChip: chip
3375
- } : worktree;
3376
- }
3377
- /** The environment with the conclusions clients draw from it: `stage`, `appPresence`, `gitChip` and `cause`. */
3378
- function withDerivedFacts(env) {
3379
- const device = (platform, record) => record ? {
3380
- ...record,
3381
- appPresence: appPresence(env, platform, record)
3382
- } : record;
3383
- const derived = {
3384
- ...env,
3385
- stage: workspaceStage(env)
3386
- };
3387
- if (env.ios) derived.ios = device("ios", env.ios);
3388
- if (env.android) derived.android = device("android", env.android);
3389
- if (env.slots) derived.slots = env.slots.map((slot) => ({
3390
- ...slot,
3391
- ios: device("ios", slot.ios),
3392
- android: device("android", slot.android)
3393
- }));
3394
- if (env.worktree) derived.worktree = withGitChip(env.worktree);
3395
- if (env.lastBuilds) derived.lastBuilds = Object.fromEntries(Object.entries(env.lastBuilds).map(([platform, build]) => [platform, withCause(build)]));
3396
- if (env.builds) derived.builds = withCauses(env.builds);
3397
- return derived;
3398
- }
3399
- //#endregion
3400
3260
  //#region state/status-measures.ts
3401
3261
  function cacheName(path) {
3402
3262
  return `${createHash("sha256").update(path).digest("hex").slice(0, 32)}.json`;
@@ -4320,6 +4180,17 @@ function findProjectRoot(startDir) {
4320
4180
  }
4321
4181
  //#endregion
4322
4182
  //#region state/device-host.ts
4183
+ const DEVICE_HOST_LIMITS = {
4184
+ prepareMs: 3e5,
4185
+ offerMs: 3e4,
4186
+ stopMs: 9e4,
4187
+ logsMs: 15e3,
4188
+ killGraceMs: 5e3
4189
+ };
4190
+ /** How long a cancelled hosted worker run can take to settle: SIGTERM, SIGKILL after the grace, then it is abandoned. */
4191
+ function hostedWorkerSettleMs(limits = DEVICE_HOST_LIMITS) {
4192
+ return limits.killGraceMs * 2;
4193
+ }
4323
4194
  function deviceHostRoot() {
4324
4195
  return join(configDir(), "server", "device-host-sessions");
4325
4196
  }
@@ -5186,4 +5057,4 @@ function isSetupJournalPrunable(journal, now) {
5186
5057
  return Date.parse(journal.expiresAt) + 36e5 < now;
5187
5058
  }
5188
5059
  //#endregion
5189
- export { ACTIVITY_RECENCY_BASES, AGENT_TOOLS, ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, APP_PROCESS_STATES, BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, BUILD_RESULTS, CAPACITY_REFUSAL_LIMIT, CAPACITY_REFUSAL_MAX_AGE_MS, DEBUG_ENV, DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, DEV_SERVER_STOP_REQUEST_KEY, ENDED_AGENT_RETENTION_MS, ERROR_SOURCES, 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, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, LAST_BUILD_KEYS, LEVELS, MACHINE_OWNER_KINDS, MAINTENANCE_LOG_NAME, MEMORY_SOURCES, NATIVE_BUILD_STEPS, NATIVE_CRASH_LOG_PREFIX, OFFLOAD_MODES, PHYSICAL_DEVICE_CONNECTIONS, PLACEMENT_DECISIONS, READY_PHASE_MS, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, REMOTE_DEVICE_BACKENDS, RUN_ID_ENV, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATS_VERSION, STATUS_ISSUE_CODES, TAILNET_MACHINE_PATTERN, TUNNEL_MODES, TUTORIAL_VERSION, WARM_KEY, WEB_PAGE_STATES, WEB_VIEWPORTS, WORKSPACE_AGENT_KEY, WORKSPACE_PHASES, WORKSPACE_STAGE_KINDS, 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 };
5060
+ export { ACTIVITY_RECENCY_BASES, AGENT_TOOLS, ANDROID_COMPILER_CACHE_CHOICES, ANDROID_EMULATOR_APPS, ANDROID_PCH_CHOICES, APP_PROCESS_STATES, BUILD_HISTORY_KEY, BUILD_HISTORY_LIMIT, BUILD_PHASES, BUILD_RESULTS, CAPACITY_REFUSAL_LIMIT, CAPACITY_REFUSAL_MAX_AGE_MS, DEBUG_ENV, DEVICE_HOST_LIMITS, DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, DEV_SERVER_STOP_REQUEST_KEY, ENDED_AGENT_RETENTION_MS, ERROR_SOURCES, 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, IDLE_STOP_KEY, IOS_SIMULATOR_APPS, LAST_BUILD_KEYS, LEVELS, MACHINE_OWNER_KINDS, MAINTENANCE_LOG_NAME, MEMORY_SOURCES, NATIVE_BUILD_STEPS, NATIVE_CRASH_LOG_PREFIX, OFFLOAD_MODES, PHYSICAL_DEVICE_CONNECTIONS, PLACEMENT_DECISIONS, READY_PHASE_MS, RECORDING_CAP_BYTES, RECORDING_FOOTAGE_MS, RECORDING_PLATFORMS, REMOTE_DEVICE_BACKENDS, RUN_ID_ENV, SETTINGS, SETTINGS_SCHEMA_FILE, SETTINGS_SCHEMA_URL, SETTING_GROUPS, SETTING_SCOPES, SOURCES, STATS_VERSION, STATUS_ISSUE_CODES, TAILNET_MACHINE_PATTERN, TUNNEL_MODES, TUTORIAL_VERSION, WARM_KEY, WEB_PAGE_STATES, WEB_VIEWPORTS, WORKSPACE_AGENT_KEY, WORKSPACE_PHASES, WORKSPACE_STAGE_KINDS, 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, hostedWorkerSettleMs, 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 };
@@ -0,0 +1,151 @@
1
+ //#region state/status-derived.ts
2
+ const PLATFORMS = ["ios", "android"];
3
+ function isRunning(platform, device) {
4
+ if (platform === "ios") return device.state === "Booted";
5
+ return device.state === "detected" && !device.physical;
6
+ }
7
+ function appPresence(env, platform, device) {
8
+ if (!isRunning(platform, device) || device.app?.state === "running") return null;
9
+ const everBuilt = env.builds?.[platform]?.some((entry) => entry.result === "succeeded") ?? true;
10
+ if (env.lastBuilds?.[platform]?.status === "failed" && !everBuilt) return "none";
11
+ return device.app?.state === "stopped" ? "closed" : null;
12
+ }
13
+ function deviceSlots(env) {
14
+ return [{
15
+ slot: "default",
16
+ ios: env.ios,
17
+ android: env.android
18
+ }, ...env.slots ?? []];
19
+ }
20
+ function latestBuild(env) {
21
+ let latest = null;
22
+ for (const platform of PLATFORMS) {
23
+ const build = env.lastBuilds?.[platform];
24
+ if (build && (latest === null || Date.parse(build.startedAt) > Date.parse(latest.startedAt))) latest = build;
25
+ }
26
+ return latest;
27
+ }
28
+ function stage(kind, since, platform = null) {
29
+ return {
30
+ kind,
31
+ since: since ?? null,
32
+ platform,
33
+ closedApps: []
34
+ };
35
+ }
36
+ function workspaceStage(env) {
37
+ if (env.macos?.build.state === "running") return stage("building", env.macos.build.startedAt, "macos");
38
+ if (env.macos?.build.state === "failed") return stage("build-failed", env.macos.build.finishedAt ?? env.macos.build.startedAt, "macos");
39
+ if (env.build?.state === "running") return stage("building", env.build.startedAt, env.build.platform);
40
+ const macosApp = env.macos?.state === "running" || env.macos?.state === "orphaned" ? env.macos : null;
41
+ const live = env.live || macosApp !== null;
42
+ if (!live && env.phase === "warming") return stage("warming", env.phaseSince);
43
+ if (!live && env.phase === "ready") return stage("ready", env.phaseSince);
44
+ const latest = latestBuild(env);
45
+ if (latest?.status === "failed") return stage("build-failed", latest.finishedAt ?? latest.startedAt, latest.platform);
46
+ if (live || (env.remoteDevices?.length ?? 0) > 0) {
47
+ const closedApps = deviceSlots(env).flatMap(({ slot, ...devices }) => PLATFORMS.flatMap((platform) => {
48
+ const device = devices[platform];
49
+ return device && appPresence(env, platform, device) === "closed" ? [{
50
+ platform,
51
+ slot
52
+ }] : [];
53
+ }));
54
+ return {
55
+ ...stage("running", env.supervisor?.startedAt ?? macosApp?.build.finishedAt ?? macosApp?.build.startedAt),
56
+ closedApps
57
+ };
58
+ }
59
+ const lastStop = env.metro?.lastStop;
60
+ return stage("stopped", lastStop && "at" in lastStop ? lastStop.at : null);
61
+ }
62
+ function checksState(checks) {
63
+ if (!checks) return null;
64
+ if (checks.failing > 0) return "failing";
65
+ if (checks.pending > 0) return "pending";
66
+ return checks.passing > 0 ? "passing" : null;
67
+ }
68
+ function gitChip(worktree) {
69
+ const git = worktree.git;
70
+ if (!git) return null;
71
+ const pull = worktree.pullRequest;
72
+ const parts = [];
73
+ const ahead = git.ahead ?? 0;
74
+ const behind = git.behind ?? 0;
75
+ if (ahead || behind) parts.push({
76
+ kind: "arrows",
77
+ ahead,
78
+ behind
79
+ });
80
+ const uncommitted = git.changed + git.untracked;
81
+ if (uncommitted) parts.push({
82
+ kind: "changed",
83
+ count: uncommitted
84
+ });
85
+ if (git.mergedInto !== null) {
86
+ if (pull?.state !== "merged") parts.push({
87
+ kind: "merged",
88
+ into: git.mergedInto
89
+ });
90
+ } else if (git.upstream === null) parts.push({ kind: "no-upstream" });
91
+ return {
92
+ parts,
93
+ ci: pull ? checksState(pull.checks) : null
94
+ };
95
+ }
96
+ function buildCause(build) {
97
+ if (("result" in build ? build.result : build.status) !== "failed") return null;
98
+ const at = build.diagnostics?.find((d) => d.file && d.line !== null && d.line !== void 0);
99
+ if (at) return {
100
+ key: `${at.file}:${at.line}`,
101
+ file: at.file,
102
+ line: at.line
103
+ };
104
+ return {
105
+ key: build.errorCode ?? "failed",
106
+ file: null,
107
+ line: null
108
+ };
109
+ }
110
+ function withCauses(builds) {
111
+ if (!builds) return builds;
112
+ return Object.fromEntries(Object.entries(builds).map(([platform, list]) => [platform, list?.map((build) => withCause(build))]));
113
+ }
114
+ function withCause(build) {
115
+ const cause = buildCause(build);
116
+ return cause ? {
117
+ ...build,
118
+ cause
119
+ } : build;
120
+ }
121
+ function withGitChip(worktree) {
122
+ const chip = gitChip(worktree);
123
+ return chip ? {
124
+ ...worktree,
125
+ gitChip: chip
126
+ } : worktree;
127
+ }
128
+ /** The environment with the conclusions clients draw from it: `stage`, `appPresence`, `gitChip` and `cause`. */
129
+ function withDerivedFacts(env) {
130
+ const device = (platform, record) => record ? {
131
+ ...record,
132
+ appPresence: appPresence(env, platform, record)
133
+ } : record;
134
+ const derived = {
135
+ ...env,
136
+ stage: workspaceStage(env)
137
+ };
138
+ if (env.ios) derived.ios = device("ios", env.ios);
139
+ if (env.android) derived.android = device("android", env.android);
140
+ if (env.slots) derived.slots = env.slots.map((slot) => ({
141
+ ...slot,
142
+ ios: device("ios", slot.ios),
143
+ android: device("android", slot.android)
144
+ }));
145
+ if (env.worktree) derived.worktree = withGitChip(env.worktree);
146
+ if (env.lastBuilds) derived.lastBuilds = Object.fromEntries(Object.entries(env.lastBuilds).map(([platform, build]) => [platform, withCause(build)]));
147
+ if (env.builds) derived.builds = withCauses(env.builds);
148
+ return derived;
149
+ }
150
+ //#endregion
151
+ export { withGitChip as n, withDerivedFacts as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stim-cli/core",
3
- "version": "1.20.1",
3
+ "version": "1.20.2",
4
4
  "description": "Shared internal cache and runtime primitives for Stim packages.",
5
5
  "license": "MIT",
6
6
  "repository": {