@stim-cli/core 1.17.2 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-lRdEfJSb.d.mts → index-DcA9D2PQ.d.mts} +53 -8
- package/dist/oversight.d.mts +6 -0
- package/dist/oversight.mjs +39 -7
- package/dist/phone-protocol.d.mts +11 -4
- package/dist/{protocol-DcI3hDw9.d.mts → protocol-DXP_JLAv.d.mts} +15 -5
- package/dist/protocol.d.mts +2 -2
- package/dist/protocol.mjs +5 -2
- package/dist/receive-protocol.d.mts +14 -1
- package/dist/receive-protocol.mjs +888 -691
- package/dist/state.d.mts +2 -2
- package/dist/state.mjs +205 -14
- package/package.json +1 -1
|
@@ -276,6 +276,9 @@ interface StimConfig {
|
|
|
276
276
|
hosting?: {
|
|
277
277
|
agentDriver?: unknown;
|
|
278
278
|
};
|
|
279
|
+
debug?: {
|
|
280
|
+
logs?: unknown;
|
|
281
|
+
};
|
|
279
282
|
server?: {
|
|
280
283
|
acceptClientBuilds?: unknown;
|
|
281
284
|
maxLoadPerCore?: unknown;
|
|
@@ -317,6 +320,27 @@ declare function findEnclosingWorktreeRoot(projectPath: string): string | null;
|
|
|
317
320
|
declare function allMetroPorts(): number[];
|
|
318
321
|
declare function findProjectByMetroPort(port: number): string | null;
|
|
319
322
|
//#endregion
|
|
323
|
+
//#region state/debug-log.d.ts
|
|
324
|
+
declare const DEBUG_ENV = "STIM_DEBUG";
|
|
325
|
+
declare function debugLogDir(): string;
|
|
326
|
+
/** The `STIM_DEBUG` override (1/true on, 0/false off, anything else off), else the machine setting `debug.logs`. Never throws. */
|
|
327
|
+
declare function debugLoggingEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
328
|
+
interface DebugLog {
|
|
329
|
+
/** Whether debug logging is on right now; re-read every few seconds so a long-running process follows the setting. */
|
|
330
|
+
enabled(): boolean;
|
|
331
|
+
/** Appends one record to `$STIM_HOME/logs/debug/<component>.ndjson` when enabled. Never throws; keys that look like secrets are redacted. */
|
|
332
|
+
log(event: string, fields?: Record<string, unknown>): void;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Debug-level records for one component (`cli` or `server`). Off by default; `STIM_DEBUG=1` or `debug.logs` turns it
|
|
336
|
+
* on. Callers pass names, durations and codes, never arguments, environment values, tokens or tickets.
|
|
337
|
+
*/
|
|
338
|
+
declare function createDebugLog(component: "cli" | "server", { env, now, base }?: {
|
|
339
|
+
env?: NodeJS.ProcessEnv;
|
|
340
|
+
now?: () => number;
|
|
341
|
+
base?: () => Record<string, unknown>;
|
|
342
|
+
}): DebugLog;
|
|
343
|
+
//#endregion
|
|
320
344
|
//#region state/json-file.d.ts
|
|
321
345
|
/**
|
|
322
346
|
* Runs `fn` with each state file read from disk at most once: inside it, including after an `await`, `readStateFile`
|
|
@@ -564,6 +588,16 @@ declare function capDrops(devices: readonly RecordedDevice[], capBytes: number):
|
|
|
564
588
|
*/
|
|
565
589
|
declare function recordingEnabled(env: NodeJS.ProcessEnv, layers: readonly unknown[]): boolean;
|
|
566
590
|
//#endregion
|
|
591
|
+
//#region state/run-id.d.ts
|
|
592
|
+
declare const RUN_ID_ENV = "STIM_RUN_ID";
|
|
593
|
+
/** A run id as the CLI and stim-server accept it: letters, digits, `.`, `_` and `-`, at most 64. Null otherwise. */
|
|
594
|
+
declare function validRunId(value: unknown): string | null;
|
|
595
|
+
/**
|
|
596
|
+
* The id of this CLI invocation: `STIM_RUN_ID` when it holds a valid id (Stim Desktop passes one), else a random one.
|
|
597
|
+
* The CLI entry exports it back to `STIM_RUN_ID` so processes the run starts inherit it; this function does not.
|
|
598
|
+
*/
|
|
599
|
+
declare function runId(env?: NodeJS.ProcessEnv): string;
|
|
600
|
+
//#endregion
|
|
567
601
|
//#region state/settings-registry.d.ts
|
|
568
602
|
declare const ANDROID_COMPILER_CACHE_CHOICES: readonly ["auto", "ccache", "cas", "none"];
|
|
569
603
|
declare const ANDROID_PCH_CHOICES: readonly ["auto", "on", "off"];
|
|
@@ -1014,6 +1048,7 @@ declare function readLastBuilds(state: WorkspaceState | null | undefined): Parti
|
|
|
1014
1048
|
declare function readBuildHistory(state: WorkspaceState | null | undefined): Partial<Record<BuildPlatform, BuildHistoryEntry[]>>;
|
|
1015
1049
|
declare function readWorkspaceState(root: string): WorkspaceState | null;
|
|
1016
1050
|
declare function lastUseFrom(state: WorkspaceState | null, logMtimes: readonly number[]): number;
|
|
1051
|
+
declare const MAINTENANCE_LOG_NAME = "maintenance.ndjson";
|
|
1017
1052
|
declare function workspaceLastUsed(root: string): number;
|
|
1018
1053
|
declare const WARM_KEY = "warm";
|
|
1019
1054
|
/** How long a successful warm keeps a workspace `ready` when nothing runs in it. */
|
|
@@ -1107,15 +1142,18 @@ declare function unreadableHostedIos(slot: string): string;
|
|
|
1107
1142
|
declare function hostedIosPlacements(state: WorkspaceState | null): Record<string, HostedIosPlacement>;
|
|
1108
1143
|
//#endregion
|
|
1109
1144
|
//#region state/maintenance.d.ts
|
|
1110
|
-
type MaintenanceMode = "off" | "report";
|
|
1111
|
-
type MaintenanceCheck = "pressure" | "size";
|
|
1112
|
-
type MaintenanceActionKind = "would-clear-outputs" | "would-trim-cache" | "would-empty-cache" | "would-shutdown-device" | "would-stop-workspace";
|
|
1145
|
+
type MaintenanceMode = "off" | "report" | "on";
|
|
1146
|
+
type MaintenanceCheck = "pressure" | "size" | "worktree" | "sweep";
|
|
1147
|
+
type MaintenanceActionKind = "would-clear-outputs" | "would-trim-cache" | "would-empty-cache" | "would-shutdown-device" | "would-stop-workspace" | "would-remove-worktree" | "would-remove-orphan" | "would-unregister-cache";
|
|
1113
1148
|
interface MaintenanceAction {
|
|
1114
1149
|
kind: MaintenanceActionKind;
|
|
1115
1150
|
target: string;
|
|
1116
1151
|
bytes: number;
|
|
1117
1152
|
reason: string;
|
|
1118
1153
|
workspace?: string;
|
|
1154
|
+
dir?: string;
|
|
1155
|
+
olderThanDays?: number;
|
|
1156
|
+
check?: "worktree" | "sweep" | "disk";
|
|
1119
1157
|
}
|
|
1120
1158
|
interface MaintenanceSize {
|
|
1121
1159
|
name: string;
|
|
@@ -1143,8 +1181,8 @@ interface MaintenancePass {
|
|
|
1143
1181
|
startedAt: number;
|
|
1144
1182
|
durationMs: number;
|
|
1145
1183
|
trigger: string;
|
|
1146
|
-
mode: "report";
|
|
1147
|
-
freedBytes:
|
|
1184
|
+
mode: "report" | "on";
|
|
1185
|
+
freedBytes: number;
|
|
1148
1186
|
actions: number;
|
|
1149
1187
|
stopped: 0;
|
|
1150
1188
|
blocked: string[];
|
|
@@ -1157,9 +1195,8 @@ interface MaintenanceRecord extends NdjsonRecord {
|
|
|
1157
1195
|
event: "maintenance_pass" | "maintenance_action" | "maintenance_skip" | "maintenance_failure" | "maintenance_check";
|
|
1158
1196
|
pass: string;
|
|
1159
1197
|
trigger: string;
|
|
1160
|
-
mode: "report";
|
|
1198
|
+
mode: "report" | "on";
|
|
1161
1199
|
}
|
|
1162
|
-
/** Version 1 contains report-only observations; every action is a plan and no resource was reclaimed. */
|
|
1163
1200
|
interface MaintenanceState {
|
|
1164
1201
|
version: 1;
|
|
1165
1202
|
lastAt: Partial<Record<MaintenanceCheck, number>>;
|
|
@@ -1181,6 +1218,8 @@ interface MaintenanceStatus {
|
|
|
1181
1218
|
lastChecks: {
|
|
1182
1219
|
pressure: number | null;
|
|
1183
1220
|
size: number | null;
|
|
1221
|
+
worktree: number | null;
|
|
1222
|
+
sweep: number | null;
|
|
1184
1223
|
};
|
|
1185
1224
|
pressure: MaintenancePressure | null;
|
|
1186
1225
|
sizes: MaintenanceSize[];
|
|
@@ -1281,6 +1320,8 @@ interface MacosAppRecord {
|
|
|
1281
1320
|
launchId: string;
|
|
1282
1321
|
arguments: string[];
|
|
1283
1322
|
product: string;
|
|
1323
|
+
/** The app's visible name: the product and the workspace label. Absent in older records. */
|
|
1324
|
+
displayName?: string;
|
|
1284
1325
|
bundle: string;
|
|
1285
1326
|
bundleId: string;
|
|
1286
1327
|
executable: string;
|
|
@@ -1443,6 +1484,8 @@ interface BuildHistoryEntry extends LastBuildReport {
|
|
|
1443
1484
|
configuration: string | null;
|
|
1444
1485
|
cacheKey: string | null;
|
|
1445
1486
|
phases: Partial<Record<BuildPhase, number>>;
|
|
1487
|
+
/** A `stim macos` run's SwiftPM step total; absent for other runs and when the build reported none. */
|
|
1488
|
+
compileSteps?: number;
|
|
1446
1489
|
}
|
|
1447
1490
|
/** One compiler error from a failed build: where it is, when the tool said, and its message. */
|
|
1448
1491
|
interface BuildDiagnostic {
|
|
@@ -1497,6 +1540,8 @@ interface BuildPlanPayload {
|
|
|
1497
1540
|
message: string;
|
|
1498
1541
|
remedy: string;
|
|
1499
1542
|
};
|
|
1543
|
+
/** With ios.remote or android.remote set to auto or a Mac, where the plan assumes the device runs, such as `this Mac; auto may use janics-mac-mini`. */
|
|
1544
|
+
placement?: string;
|
|
1500
1545
|
}
|
|
1501
1546
|
type ActivityState = "driven" | "active" | "idle" | "unknown";
|
|
1502
1547
|
interface ActivityDriver {
|
|
@@ -2352,4 +2397,4 @@ declare function readSetupJournal(hash: string): SetupJournal | null;
|
|
|
2352
2397
|
declare function isJournalExpired(journal: SetupJournal, now?: number): boolean;
|
|
2353
2398
|
declare function isSetupJournalPrunable(journal: SetupJournal, now: number): boolean;
|
|
2354
2399
|
//#endregion
|
|
2355
|
-
export { readRunEstimates as $, isSensitiveReference as $a, HostedAgentLease as $i, readHostedMacosApp as $n, workspaceAgentDeviceDir as $o, MetroLastStop as $r, getProjectSetting as $s, BuildResult as $t, DeviceHostMachineCredential as A, ANDROID_EMULATOR_APPS as Aa, readAgentDeviceUsageCache as Ac, HostedIosDevice as Ai, StatsPlatform as An, diskUsageCacheDir as Ao, HostedAndroidPlacement as Ar, tailRead as As, ActiveBuildState as At, RunHistory as B, SettingDefinition as Ba, readNdjsonGenerations as Bc, parseHostedLocalDeviceCount as Bi, WebBrowserState as Bn, maintenanceNdjsonFile as Bo, parseHostedNativePlacement as Br, readJsonFile as Bs, BuildCacheHit as Bt, pinnedEndpoint as C, rememberHostedAppBlobRename as Ca, SwiftpmCacheUsage as Cc, HostedDeviceOfferRequest as Ci, PhysicalDeviceConnection as Cn, configLockPath as Co, HostedIosPlacement as Cr, parseSince as Cs, readEndedAgentSessions as Ct, HostedMetroRequest as D, SETTINGS_SCHEMA_URL as Da, AgentDeviceUsageRoots as Dc, HostedDeviceSelectors as Di, RunOutcomeKind as Dn, deviceHostMachinesFile as Do, hostedIosStatus as Dr, readLogTimeline as Ds, ACTIVITY_RECENCY_BASES as Dt, HostedMetroGateway as E, SETTINGS_SCHEMA_FILE as Ea, AgentDeviceUsage as Ec, HostedDeviceRequest as Ei, RemoteDeviceState as En, deviceHostMachinesClaims as Eo, hostedIosRecords as Er, readLogRecords as Es, withGitChip as Et, HISTORY_LIMIT as F, REMOTE_DEVICE_BACKENDS as Fa, NdjsonRecord as Fc, hostedConsolePort as Fi, TUTORIAL_VERSION as Fn, getConfigPath as Fo, hostedAndroidStatus as Fr, EasSessionLedgerRead as Fs, AndroidDeviceState as Ft, StatsCapacityWait as G, TUNNEL_MODES as Ga, readHostedDevice as Gi, WorktreeGit as Gn, setupJournalFile as Go, DEVICE_RECLAIM_REASON as Gr, allMetroPorts as Gs, BuildMissCategory as Gt, STATS_VERSION as H, SettingScope as Ha, parseHostedOfferRequest as Hi, WorkspacePhase as Hn, maintenanceStateFile as Ho, BUILD_HISTORY_KEY as Hr, readStateFile as Hs, BuildDetail as Ht, OffloadSummary as I, RemoteDeviceBackend as Ia, SOURCES as Ic, hostedDeviceId as Ii, WEB_PAGE_STATES as In, gitMergeCacheDir as Io, parseHostedAndroidPlacement as Ir, readCreatedDevices as Is, AndroidRuntimeFacts as It, StatsReport as J, WebViewport as Ja, HOSTED_AGENT_DRIVERS as Ji, MacosAppState as Jn, sharedGradle as Jo, DevServerStopRequest as Jr, findEnclosingWorktreeRoot as Js, BuildPhase as Jt, StatsPlacement as K, TunnelMode as Ka, readHostedDeviceLedger as Ki, WorktreePullRequest as Kn, sharedCcache as Ko, DEV_SERVER_STOP_REQUEST_KEY as Kr, buildWorkerRoot as Ks, BuildMissChange as Kt, PLACEMENT_DECISIONS as L, SETTINGS as La, levelRank as Lc, parseHostedAndroidDevice as Li, WORKSPACE_PHASES as Ln, maintenanceAttemptFile as Lo, unreadableHostedAndroid as Lr, readEasSessionLedger as Ls, AppPresence as Lt, BuildMachineTotals as M, IOS_SIMULATOR_APPS as Ma, AgentTarget as Mc, assertHostedDeviceLedger as Mi, StatusIssue as Mn, easSessionLedgerFile as Mo, hostedAndroidDeviceName as Mr, CreatedDevicePlatform as Ms, ActivityRecencyBasis as Mt, CAPACITY_REFUSAL_LIMIT as N, OFFLOAD_MODES as Na, createAgentActionReader as Nc, deviceHostArea as Ni, StatusIssueCode as Nn, easSessionLedgerLock as No, hostedAndroidPlacements as Nr, CreatedDevices as Ns, AgentSession as Nt, hostedMetroGateways as O, settingsJsonSchema as Oa, agentDeviceUsageFile as Oc, HostedDeviceSession as Oi, STATUS_ISSUE_CODES as On, deviceHostMachinesLock as Oo, parseHostedIosPlacement as Or, recordMatches as Os, AGENT_TOOLS as Ot, CAPACITY_REFUSAL_MAX_AGE_MS as P, OffloadMode as Pa, LEVELS as Pc, deviceHostRoot as Pi, StatusPayload as Pn, emulatorLogFile as Po, hostedAndroidRecords as Pr, EasSessionClaim as Ps, AgentTool as Pt, offloadSummary as Q, isLayeredSetting as Qa, HostedAgentGrant as Qi, parseMacosRecord as Qn, supervisorPidFile as Qo, LAST_BUILD_KEYS as Qr, getProject as Qs, BuildReport as Qt, ReadStatsResult as R, SETTING_GROUPS as Ra, parseNdjsonLine as Rc, parseHostedChoice as Ri, WORKSPACE_STAGE_KINDS as Rn, maintenanceChildLogFile as Ro, HostedNativePlacement as Rr, validEasSessionClaim as Rs, BUILD_PHASES as Rt, parseMachine as S, readHostedAppMetadata as Sa, tryAcquireBuildSlotClaim as Sc, HostedDeviceOffer as Si, PHYSICAL_DEVICE_CONNECTIONS as Sn, buildMachinesLock as So, readMaintenanceState as Sr, markerWindow as Ss, readDiskUsage as St, HOSTED_METRO_REQUESTS_KEY as T, validHostedAppBlob as Ta, swiftpmCacheUsageFile as Tc, HostedDevicePlatform as Ti, PlannedPhase as Tn, createdDevicesLock as To, hostedIosPlacements as Tr, queryLogs as Ts, withDerivedFacts as Tt, StatsBucket as U, SettingType as Ua, parseHostedPlatformDevice as Ui, WorkspaceStage as Un, pullRequestCacheDir as Uo, BUILD_HISTORY_LIMIT as Ur, withStateReadCache as Us, BuildDiagnostic as Ut, RunSample as V, SettingEntry as Va, parseHostedNativeOffer as Vi, WebPageState as Vn, maintenanceRunClaims as Vo, unreadableHostedNative as Vr, readJsonObject as Vs, BuildCause as Vt, StatsCapacityRefusal as W, SettingsPayload as Wa, parseHostedRequest as Wi, WorktreeFacts as Wn, serverSetupDir as Wo, DEVICE_IDLE_SHUTDOWN_KEY as Wr, ParkedMax as Ws, BuildHistoryEntry as Wt, decodeStats as X, coerceSettingText as Xa, HostedAgentAccess as Xi, MacosProcess as Xn, statsFile as Xo, IDLE_STOP_KEY as Xr, getConcurrencyLimits as Xs, BuildPlanPayload as Xt, StatsScope as Y, acceptsShape as Ya, HOSTED_MACOS_APP_SLOTS as Yi, MacosBuild as Yn, sharedPods as Yo, DeviceIdleShutdownRecord as Yr, findProjectByMetroPort as Ys, BuildPlacement as Yt, findProjectRoot as Z, expectedShape as Za, HostedAgentDriverName as Zi, macosAppState as Zn, supervisorLogFile as Zo, IdleStopRecord as Zr, getParkedMax as Zs, BuildPlatform as Zt, Endpoint as _, hostedAppAttempt as _a, MachineCapacity as _c, readWorkspaceState as _i, MachineUsageState as _n, agentSessionsCacheFile as _o, MaintenanceSize as _r, bundleMarkerPlatform as _s, endedAgentSessionOf as _t, parseSetupJournal as a, hostedMacosBundleId as aa, ConcurrencyLimits as ac, buildDiagnostics as ai, DevicePlacement as an, RecordedDevice as ao, archivedUsage as ar, workspaceLogErrorIndex as as, trimSamples as at, endpoint as b, parseHostedAppOffer as ba, machineCapacity as bc, HostedAndroidDevice as bi, NATIVE_BUILD_STEPS as bn, archiveRoot as bo, parseMaintenanceState as br, followLogs as bs, readAgentSessionsCache as bt, HOSTED_LOGS_FIRST_BYTES as c, parseHostedMacosChoice as ca, DoctorRunRecord as cc, readBuildHistory as ci, EnvironmentDisk as cn, capDrops as co, readArchiveState as cr, workspaceRecordingsDir as cs, ViewedDevice as ct, HostedLogsPage as d, HOSTED_APP_CHUNK_BYTES as da, RepoRecord as dc, readDeviceIdleShutdowns as di, GitChipPart as dn, listRecordedDevices as do, MaintenanceActionKind as dr, ERROR_SOURCES as ds, AgentSessionsCache as dt, HostedAppLaunch as ea, getProjectSettings as ec, READY_PHASE_MS as ei, BuildWaitingFor as en, settingDefinition as eo, readMacosRecord as er, workspaceBuildDetailFile as es, readStats as et, hostedMacosLogsDir as f, HostedAppDelivery as fa, SettingsObject as fc, readDevicePlacement as fi, LastBuildReport as fn, listSegments as fo, MaintenanceCheck as fr, NATIVE_CRASH_LOG_PREFIX as fs, ENDED_AGENT_RETENTION_MS as ft, readLogsSince as g, hostedAppArea as ga, readBuildMachines as gc, readWorkspaceAgent as gi, MachineOwnerKind as gn, recordingEnabled as go, MaintenanceRecord as gr, buildCriteria as gs, diskUsageCacheFile as gt, readHostedNativeLogsCheckpoint as h, HostedAppRecord as ha, BuildMachineCredential as hc, readWarmRecord as hi, MachineOwner as hn, recordingDeviceName as ho, MaintenancePressure as hr, attachExpoErrorContext as hs, agentSessionOf as ht, isSetupJournalPrunable as i, hostedMacosAppSlot as ia, withConfigLock as ic, WorkspaceState as ii, DeviceLeaseState as in, RECORDING_PLATFORMS as io, archiveEnabled as ir, workspaceGradleBuild as is, trimCapacityWaits as it, readDeviceHostMachines as j, ANDROID_PCH_CHOICES as ja, AgentActionReaderOptions as jc, HostedNativeOffer as ji, StatusCapacity as jn, easMachineStateRoot as jo, HostedAndroidStatus as jr, countErrorEntries as js, ActivityDriver as jt, hostedMetroRequests as k, ANDROID_COMPILER_CACHE_CHOICES as ka, readAgentDeviceUsage as kc, HostedIosChoice as ki, SimulatorState as kn, deviceViewersDir as ko, unreadableHostedIos as kr, sortByTs as ks, APP_PROCESS_STATES as kt, HOSTED_LOGS_PAGE_BYTES as l, parseHostedMacosDevice as la, PlatformRecords as lc, readDevServerStop as li, EnvironmentState as ln, closedSegmentName as lo, readArchives as lr, workspaceStateFile as ls, readViewedDevices as lt, parseHostedLogsCursor as m, HostedAppOffer as ma, SupervisorRecord as mc, readLastBuilds as mi, MEMORY_SOURCES as mn, recordedBytes as mo, MaintenancePass as mr, advanceTail as ms, StatusCacheEntry as mt, SetupJournal as n, HostedMacosDevice as na, isPathPrefix as nc, WORKSPACE_AGENT_KEY as ni, DeviceActivity as nn, RECORDING_CAP_BYTES as no, ArchivedUsage as nr, workspaceEndedAgentsFile as ns, statsProjectKey as nt, readSetupJournal as o, parseHostedAgentAccess as oa, Config as oc, lastUseFrom as oi, DiskMeasure as on, RecordedSegment as oo, linkReplacedArchives as or, workspaceLogsDir as os, wholePhases as ot, hostedNativeLogsDir as p, HostedAppFile as pa, StimConfig as pc, readIdleStop as pi, MACHINE_OWNER_KINDS as pn, openSegmentName as po, MaintenanceMode as pr, QueryCriteria as ps, PullRequestCacheEntry as pt, StatsRecord as q, WEB_VIEWPORTS as qa, readHostedSessions as qi, MacosAppRecord as qn, sharedCompilationCache as qo, DevServerStopRecord as qr, configCorruptRepair as qs, BuildMissReason as qt, isJournalExpired as r, HostedMacosPlacement as ra, loadConfig as rc, WarmRecord as ri, DeviceAppProcess as rn, RECORDING_FOOTAGE_MS as ro, ArchivedWorkspace as rr, workspaceEndedAgentsLock as rs, trimCapacityRefusals as rt, agentDeviceStateDirs as s, parseHostedAgentGrant as sa, DeviceRecord as sc, parseMissReason as si, EndedAgentSession as sn, RecordingPlatform as so, readArchive as sr, workspaceMetadataFile as ss, DeviceViewersRecord as st, SetupCapability as t, HostedMacosChoice as ta, getRepoSettings as tc, WARM_KEY as ti, ChecksState as tn, settingValueError as to, ArchivedBytes as tr, workspaceDerivedData as ts, readStatsReport as tt, HostedLogsCursor as u, parseHostedMacosPlacement as ua, ProjectRecord as uc, readDevServerStopRequest as ui, GitChip as un, footageDrops as uo, MaintenanceAction as ur, workspaceStateLock as us, stimBuildDigest as ut, TAILNET_MACHINE_PATTERN as v, hostedAppBlobs as va, buildSlotPath as vc, workspaceLastUsed as vi, MemorySource as vn, archiveDir as vo, MaintenanceState as vr, compileGrep as vs, listStatusCacheEntries as vt, HOSTED_METRO_GATEWAYS_KEY as w, validHostedAppArguments as wa, readSwiftpmCacheUsage as wc, HostedDevicePhase as wi, PhysicalDeviceState as wn, createdDevicesFile as wo, HostedIosStatus as wr, queryJsonLogs as ws, readPullRequestCache as wt, findPeer as x, readHostedApp as xa, saturation as xc, HostedDevice as xi, NativeBuildStep as xn, buildMachinesFile as xo, readMaintenanceAttempt as xr, logFiles as xs, readBuildDetail as xt, TailnetPeer as y, parseHostedAppManifest as ya, buildSlotsDir as yc, HostedAndroidChoice as yi, MetroBundleState as yn, archiveLock as yo, MaintenanceStatus as yr, fileSizes as ys, pullRequestCacheFile as yt, RunEstimates as z, SETTING_SCOPES as za, parseNdjsonText as zc, parseHostedDevice as zi, WarmStep as zn, maintenanceDir as zo, hostedNativeRecords as zr, isJsonObject as zs, BUILD_RESULTS as zt };
|
|
2400
|
+
export { readRunEstimates as $, isLayeredSetting as $a, HostedAgentGrant as $i, readHostedMacosApp as $n, sharedPods as $o, MAINTENANCE_LOG_NAME as $r, ParkedMax as $s, BuildResult as $t, DeviceHostMachineCredential as A, ANDROID_COMPILER_CACHE_CHOICES as Aa, saturation as Ac, HostedIosChoice as Ai, StatsPlatform as An, deviceHostMachinesClaims as Ao, HostedAndroidPlacement as Ar, readLogRecords as As, ActiveBuildState as At, RunHistory as B, SETTING_SCOPES as Ba, AgentActionReaderOptions as Bc, parseHostedDevice as Bi, WebBrowserState as Bn, gitMergeCacheDir as Bo, parseHostedNativePlacement as Br, readCreatedDevices as Bs, BuildCacheHit as Bt, pinnedEndpoint as C, readHostedAppMetadata as Ca, SupervisorRecord as Cc, HostedDeviceOffer as Ci, PhysicalDeviceConnection as Cn, archiveLock as Co, HostedIosPlacement as Cr, fileSizes as Cs, readEndedAgentSessions as Ct, HostedMetroRequest as D, SETTINGS_SCHEMA_FILE as Da, buildSlotPath as Dc, HostedDeviceRequest as Di, RunOutcomeKind as Dn, configLockPath as Do, hostedIosStatus as Dr, parseSince as Ds, ACTIVITY_RECENCY_BASES as Dt, HostedMetroGateway as E, validHostedAppBlob as Ea, MachineCapacity as Ec, HostedDevicePlatform as Ei, RemoteDeviceState as En, buildMachinesLock as Eo, hostedIosRecords as Er, markerWindow as Es, withGitChip as Et, HISTORY_LIMIT as F, OffloadMode as Fa, AgentDeviceUsage as Fc, deviceHostRoot as Fi, TUTORIAL_VERSION as Fn, easMachineStateRoot as Fo, hostedAndroidStatus as Fr, countErrorEntries as Fs, AndroidDeviceState as Ft, StatsCapacityWait as G, SettingsPayload as Ga, SOURCES as Gc, parseHostedRequest as Gi, WorktreeGit as Gn, maintenanceRunClaims as Go, DEVICE_RECLAIM_REASON as Gr, readJsonObject as Gs, BuildMissCategory as Gt, STATS_VERSION as H, SettingEntry as Ha, createAgentActionReader as Hc, parseHostedNativeOffer as Hi, WorkspacePhase as Hn, maintenanceChildLogFile as Ho, BUILD_HISTORY_KEY as Hr, validEasSessionClaim as Hs, BuildDetail as Ht, OffloadSummary as I, REMOTE_DEVICE_BACKENDS as Ia, AgentDeviceUsageRoots as Ic, hostedConsolePort as Ii, WEB_PAGE_STATES as In, easSessionLedgerFile as Io, parseHostedAndroidPlacement as Ir, CreatedDevicePlatform as Is, AndroidRuntimeFacts as It, StatsReport as J, WEB_VIEWPORTS as Ja, parseNdjsonText as Jc, readHostedSessions as Ji, MacosAppState as Jn, serverSetupDir as Jo, DevServerStopRequest as Jr, DEBUG_ENV as Js, BuildPhase as Jt, StatsPlacement as K, TUNNEL_MODES as Ka, levelRank as Kc, readHostedDevice as Ki, WorktreePullRequest as Kn, maintenanceStateFile as Ko, DEV_SERVER_STOP_REQUEST_KEY as Kr, readStateFile as Ks, BuildMissChange as Kt, PLACEMENT_DECISIONS as L, RemoteDeviceBackend as La, agentDeviceUsageFile as Lc, hostedDeviceId as Li, WORKSPACE_PHASES as Ln, easSessionLedgerLock as Lo, unreadableHostedAndroid as Lr, CreatedDevices as Ls, AppPresence as Lt, BuildMachineTotals as M, ANDROID_PCH_CHOICES as Ma, SwiftpmCacheUsage as Mc, HostedNativeOffer as Mi, StatusIssue as Mn, deviceHostMachinesLock as Mo, hostedAndroidDeviceName as Mr, recordMatches as Ms, ActivityRecencyBasis as Mt, CAPACITY_REFUSAL_LIMIT as N, IOS_SIMULATOR_APPS as Na, readSwiftpmCacheUsage as Nc, assertHostedDeviceLedger as Ni, StatusIssueCode as Nn, deviceViewersDir as No, hostedAndroidPlacements as Nr, sortByTs as Ns, AgentSession as Nt, hostedMetroGateways as O, SETTINGS_SCHEMA_URL as Oa, buildSlotsDir as Oc, HostedDeviceSelectors as Oi, STATUS_ISSUE_CODES as On, createdDevicesFile as Oo, parseHostedIosPlacement as Or, queryJsonLogs as Os, AGENT_TOOLS as Ot, CAPACITY_REFUSAL_MAX_AGE_MS as P, OFFLOAD_MODES as Pa, swiftpmCacheUsageFile as Pc, deviceHostArea as Pi, StatusPayload as Pn, diskUsageCacheDir as Po, hostedAndroidRecords as Pr, tailRead as Ps, AgentTool as Pt, offloadSummary as Q, expectedShape as Qa, HostedAgentDriverName as Qi, parseMacosRecord as Qn, sharedGradle as Qo, LAST_BUILD_KEYS as Qr, debugLoggingEnabled as Qs, BuildReport as Qt, ReadStatsResult as R, SETTINGS as Ra, readAgentDeviceUsage as Rc, parseHostedAndroidDevice as Ri, WORKSPACE_STAGE_KINDS as Rn, emulatorLogFile as Ro, HostedNativePlacement as Rr, EasSessionClaim as Rs, BUILD_PHASES as Rt, parseMachine as S, readHostedApp as Sa, StimConfig as Sc, HostedDevice as Si, PHYSICAL_DEVICE_CONNECTIONS as Sn, archiveDir as So, readMaintenanceState as Sr, compileGrep as Ss, readDiskUsage as St, HOSTED_METRO_REQUESTS_KEY as T, validHostedAppArguments as Ta, readBuildMachines as Tc, HostedDevicePhase as Ti, PlannedPhase as Tn, buildMachinesFile as To, hostedIosPlacements as Tr, logFiles as Ts, withDerivedFacts as Tt, StatsBucket as U, SettingScope as Ua, LEVELS as Uc, parseHostedOfferRequest as Ui, WorkspaceStage as Un, maintenanceDir as Uo, BUILD_HISTORY_LIMIT as Ur, isJsonObject as Us, BuildDiagnostic as Ut, RunSample as V, SettingDefinition as Va, AgentTarget as Vc, parseHostedLocalDeviceCount as Vi, WebPageState as Vn, maintenanceAttemptFile as Vo, unreadableHostedNative as Vr, readEasSessionLedger as Vs, BuildCause as Vt, StatsCapacityRefusal as W, SettingType as Wa, NdjsonRecord as Wc, parseHostedPlatformDevice as Wi, WorktreeFacts as Wn, maintenanceNdjsonFile as Wo, DEVICE_IDLE_SHUTDOWN_KEY as Wr, readJsonFile as Ws, BuildHistoryEntry as Wt, decodeStats as X, acceptsShape as Xa, HOSTED_MACOS_APP_SLOTS as Xi, MacosProcess as Xn, sharedCcache as Xo, IDLE_STOP_KEY as Xr, createDebugLog as Xs, BuildPlanPayload as Xt, StatsScope as Y, WebViewport as Ya, readNdjsonGenerations as Yc, HOSTED_AGENT_DRIVERS as Yi, MacosBuild as Yn, setupJournalFile as Yo, DeviceIdleShutdownRecord as Yr, DebugLog as Ys, BuildPlacement as Yt, findProjectRoot as Z, coerceSettingText as Za, HostedAgentAccess as Zi, macosAppState as Zn, sharedCompilationCache as Zo, IdleStopRecord as Zr, debugLogDir as Zs, BuildPlatform as Zt, Endpoint as _, hostedAppArea as _a, DoctorRunRecord as _c, readWorkspaceAgent as _i, MachineUsageState as _n, openSegmentName as _o, MaintenanceSize as _r, QueryCriteria as _s, endedAgentSessionOf as _t, parseSetupJournal as a, hostedMacosAppSlot as aa, getConcurrencyLimits as ac, WorkspaceState as ai, DevicePlacement as an, validRunId as ao, archivedUsage as ar, workspaceDerivedData as as, trimSamples as at, endpoint as b, parseHostedAppManifest as ba, RepoRecord as bc, HostedAndroidChoice as bi, NATIVE_BUILD_STEPS as bn, recordingEnabled as bo, parseMaintenanceState as br, buildCriteria as bs, readAgentSessionsCache as bt, HOSTED_LOGS_FIRST_BYTES as c, parseHostedAgentGrant as ca, getProjectSetting as cc, parseMissReason as ci, EnvironmentDisk as cn, RECORDING_PLATFORMS as co, readArchiveState as cr, workspaceGradleBuild as cs, ViewedDevice as ct, HostedLogsPage as d, parseHostedMacosPlacement as da, isPathPrefix as dc, readDevServerStopRequest as di, GitChipPart as dn, RecordingPlatform as do, MaintenanceActionKind as dr, workspaceMetadataFile as ds, AgentSessionsCache as dt, HostedAgentLease as ea, allMetroPorts as ec, MetroLastStop as ei, BuildWaitingFor as en, isSensitiveReference as eo, readMacosRecord as er, statsFile as es, readStats as et, hostedMacosLogsDir as f, HOSTED_APP_CHUNK_BYTES as fa, loadConfig as fc, readDeviceIdleShutdowns as fi, LastBuildReport as fn, capDrops as fo, MaintenanceCheck as fr, workspaceRecordingsDir as fs, ENDED_AGENT_RETENTION_MS as ft, readLogsSince as g, HostedAppRecord as ga, DeviceRecord as gc, readWarmRecord as gi, MachineOwnerKind as gn, listSegments as go, MaintenanceRecord as gr, NATIVE_CRASH_LOG_PREFIX as gs, diskUsageCacheFile as gt, readHostedNativeLogsCheckpoint as h, HostedAppOffer as ha, Config as hc, readLastBuilds as hi, MachineOwner as hn, listRecordedDevices as ho, MaintenancePressure as hr, ERROR_SOURCES as hs, agentSessionOf as ht, isSetupJournalPrunable as i, HostedMacosPlacement as ia, findProjectByMetroPort as ic, WarmRecord as ii, DeviceLeaseState as in, runId as io, archiveEnabled as ir, workspaceBuildDetailFile as is, trimCapacityWaits as it, readDeviceHostMachines as j, ANDROID_EMULATOR_APPS as ja, tryAcquireBuildSlotClaim as jc, HostedIosDevice as ji, StatusCapacity as jn, deviceHostMachinesFile as jo, HostedAndroidStatus as jr, readLogTimeline as js, ActivityDriver as jt, hostedMetroRequests as k, settingsJsonSchema as ka, machineCapacity as kc, HostedDeviceSession as ki, SimulatorState as kn, createdDevicesLock as ko, unreadableHostedIos as kr, queryLogs as ks, APP_PROCESS_STATES as kt, HOSTED_LOGS_PAGE_BYTES as l, parseHostedMacosChoice as la, getProjectSettings as lc, readBuildHistory as li, EnvironmentState as ln, RecordedDevice as lo, readArchives as lr, workspaceLogErrorIndex as ls, readViewedDevices as lt, parseHostedLogsCursor as m, HostedAppFile as ma, ConcurrencyLimits as mc, readIdleStop as mi, MEMORY_SOURCES as mn, footageDrops as mo, MaintenancePass as mr, workspaceStateLock as ms, StatusCacheEntry as mt, SetupJournal as n, HostedMacosChoice as na, configCorruptRepair as nc, WARM_KEY as ni, DeviceActivity as nn, settingValueError as no, ArchivedUsage as nr, supervisorPidFile as ns, statsProjectKey as nt, readSetupJournal as o, hostedMacosBundleId as oa, getParkedMax as oc, buildDiagnostics as oi, DiskMeasure as on, RECORDING_CAP_BYTES as oo, linkReplacedArchives as or, workspaceEndedAgentsFile as os, wholePhases as ot, hostedNativeLogsDir as p, HostedAppDelivery as pa, withConfigLock as pc, readDevicePlacement as pi, MACHINE_OWNER_KINDS as pn, closedSegmentName as po, MaintenanceMode as pr, workspaceStateFile as ps, PullRequestCacheEntry as pt, StatsRecord as q, TunnelMode as qa, parseNdjsonLine as qc, readHostedDeviceLedger as qi, MacosAppRecord as qn, pullRequestCacheDir as qo, DevServerStopRecord as qr, withStateReadCache as qs, BuildMissReason as qt, isJournalExpired as r, HostedMacosDevice as ra, findEnclosingWorktreeRoot as rc, WORKSPACE_AGENT_KEY as ri, DeviceAppProcess as rn, RUN_ID_ENV as ro, ArchivedWorkspace as rr, workspaceAgentDeviceDir as rs, trimCapacityRefusals as rt, agentDeviceStateDirs as s, parseHostedAgentAccess as sa, getProject as sc, lastUseFrom as si, EndedAgentSession as sn, RECORDING_FOOTAGE_MS as so, readArchive as sr, workspaceEndedAgentsLock as ss, DeviceViewersRecord as st, SetupCapability as t, HostedAppLaunch as ta, buildWorkerRoot as tc, READY_PHASE_MS as ti, ChecksState as tn, settingDefinition as to, ArchivedBytes as tr, supervisorLogFile as ts, readStatsReport as tt, HostedLogsCursor as u, parseHostedMacosDevice as ua, getRepoSettings as uc, readDevServerStop as ui, GitChip as un, RecordedSegment as uo, MaintenanceAction as ur, workspaceLogsDir as us, stimBuildDigest as ut, TAILNET_MACHINE_PATTERN as v, hostedAppAttempt as va, PlatformRecords as vc, readWorkspaceState as vi, MemorySource as vn, recordedBytes as vo, MaintenanceState as vr, advanceTail as vs, listStatusCacheEntries as vt, HOSTED_METRO_GATEWAYS_KEY as w, rememberHostedAppBlobRename as wa, BuildMachineCredential as wc, HostedDeviceOfferRequest as wi, PhysicalDeviceState as wn, archiveRoot as wo, HostedIosStatus as wr, followLogs as ws, readPullRequestCache as wt, findPeer as x, parseHostedAppOffer as xa, SettingsObject as xc, HostedAndroidDevice as xi, NativeBuildStep as xn, agentSessionsCacheFile as xo, readMaintenanceAttempt as xr, bundleMarkerPlatform as xs, readBuildDetail as xt, TailnetPeer as y, hostedAppBlobs as ya, ProjectRecord as yc, workspaceLastUsed as yi, MetroBundleState as yn, recordingDeviceName as yo, MaintenanceStatus as yr, attachExpoErrorContext as ys, pullRequestCacheFile as yt, RunEstimates as z, SETTING_GROUPS as za, readAgentDeviceUsageCache as zc, parseHostedChoice as zi, WarmStep as zn, getConfigPath as zo, hostedNativeRecords as zr, EasSessionLedgerRead as zs, BUILD_RESULTS as zt };
|
package/dist/oversight.d.mts
CHANGED
|
@@ -172,8 +172,14 @@ interface WorkspaceEntry {
|
|
|
172
172
|
errorsAt: number | null;
|
|
173
173
|
stuckAt: number | null;
|
|
174
174
|
finished: boolean;
|
|
175
|
+
/** Whether this run already notified that the agent stopped; the workspace going idle ends the run. */
|
|
176
|
+
finishedInRun: boolean;
|
|
177
|
+
/** Whether the workspace was not idle at the last look, so the look that starts a new run is seen. */
|
|
178
|
+
running: boolean;
|
|
175
179
|
/** Ids of the `attention` items already notified, so each notifies once per episode. */
|
|
176
180
|
attention: string[];
|
|
181
|
+
/** Whether this run already raised an `attention` notification; it starts over when the workspace stops being idle or has no item left. */
|
|
182
|
+
attentionRaised: boolean;
|
|
177
183
|
loops: {
|
|
178
184
|
ios?: Loop;
|
|
179
185
|
android?: Loop;
|
package/dist/oversight.mjs
CHANGED
|
@@ -283,10 +283,14 @@ function overseeStart(run, { env, entry, notify, driven }) {
|
|
|
283
283
|
entry.driveNotified = true;
|
|
284
284
|
event(run, notify("started", `${first.activity?.driver?.tool ?? "An agent"} started driving ${first.model} on ${run.input.machine}`, deviceTarget(env, first)));
|
|
285
285
|
}
|
|
286
|
+
/** Whether the workspace has no live session and is not warming: the end of a run, and the start of the next when it stops being idle. */
|
|
287
|
+
function isIdle(env) {
|
|
288
|
+
return !env.live && (env.phase === void 0 || env.phase === "idle");
|
|
289
|
+
}
|
|
286
290
|
/** Work finishes when the agent stops after a green build; it looks stuck when nothing happens for too long. */
|
|
287
291
|
function overseeProgress(run, { env, entry, notify, devices, driven }) {
|
|
288
292
|
const { now } = run;
|
|
289
|
-
const idle =
|
|
293
|
+
const idle = isIdle(env);
|
|
290
294
|
const building = env.build?.state === "running";
|
|
291
295
|
const newest = newestBuild(env);
|
|
292
296
|
const green = newest?.status === "ok";
|
|
@@ -298,10 +302,13 @@ function overseeProgress(run, { env, entry, notify, devices, driven }) {
|
|
|
298
302
|
if (!idle && now < due) wake(run, due);
|
|
299
303
|
else {
|
|
300
304
|
entry.finished = true;
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
+
if (!entry.finishedInRun) {
|
|
306
|
+
entry.finishedInRun = true;
|
|
307
|
+
event(run, notify("finished", `Agent stopped after a green ${platformName(newest.platform)} build`, {
|
|
308
|
+
kind: "workspace",
|
|
309
|
+
path: env.path
|
|
310
|
+
}));
|
|
311
|
+
}
|
|
305
312
|
}
|
|
306
313
|
}
|
|
307
314
|
if (idle || entry.finished) {
|
|
@@ -311,6 +318,7 @@ function overseeProgress(run, { env, entry, notify, devices, driven }) {
|
|
|
311
318
|
if (idle) {
|
|
312
319
|
entry.warmed = false;
|
|
313
320
|
entry.finished = false;
|
|
321
|
+
entry.finishedInRun = false;
|
|
314
322
|
}
|
|
315
323
|
const device = driven[0] ?? devices.find((d) => d.running);
|
|
316
324
|
if (!entry.drove || !device?.running || building || quietSince === null || releasedGreen) return;
|
|
@@ -376,7 +384,10 @@ function overseeMerge(run, { env, entry, notify }, prev) {
|
|
|
376
384
|
}));
|
|
377
385
|
}
|
|
378
386
|
}
|
|
379
|
-
/**
|
|
387
|
+
/**
|
|
388
|
+
* What only a person can fix, notified once per episode and at most once per workspace per run; what an agent
|
|
389
|
+
* handles is left out. The allowance returns when the workspace stops being idle or has no item left.
|
|
390
|
+
*/
|
|
380
391
|
function overseeAttention(run, { env, entry, notify }, prev) {
|
|
381
392
|
const items = workspaceItems(env, {
|
|
382
393
|
now: run.now,
|
|
@@ -384,6 +395,7 @@ function overseeAttention(run, { env, entry, notify }, prev) {
|
|
|
384
395
|
easSessionMinutes: EAS_SESSION_MINUTES,
|
|
385
396
|
ownLeases: run.input.ownLeases
|
|
386
397
|
});
|
|
398
|
+
const pending = [];
|
|
387
399
|
for (const item of items) {
|
|
388
400
|
if (item.category !== "attention") continue;
|
|
389
401
|
let target = {
|
|
@@ -399,12 +411,29 @@ function overseeAttention(run, { env, entry, notify }, prev) {
|
|
|
399
411
|
platform
|
|
400
412
|
};
|
|
401
413
|
}
|
|
414
|
+
pending.push({
|
|
415
|
+
item,
|
|
416
|
+
target
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
let raised = entry.attentionRaised;
|
|
420
|
+
if (pending.length === 0 || !isIdle(env) && !prev?.running) raised = false;
|
|
421
|
+
for (const { item, target } of pending) {
|
|
422
|
+
if (prev?.attention?.includes(item.id) || raised) {
|
|
423
|
+
entry.attention.push(item.id);
|
|
424
|
+
continue;
|
|
425
|
+
}
|
|
402
426
|
const notification = {
|
|
403
427
|
...notify("attention", item.body, target),
|
|
404
428
|
id: item.id
|
|
405
429
|
};
|
|
406
|
-
|
|
430
|
+
const sent = run.notifications.length;
|
|
431
|
+
if (lasting(run, notification)) {
|
|
432
|
+
entry.attention.push(item.id);
|
|
433
|
+
if (run.notifications.length > sent) raised = true;
|
|
434
|
+
}
|
|
407
435
|
}
|
|
436
|
+
entry.attentionRaised = raised;
|
|
408
437
|
}
|
|
409
438
|
function overseeWorkspace(run, env, status, prev) {
|
|
410
439
|
const errors = env.logs?.errorsSinceMarker ?? 0;
|
|
@@ -419,7 +448,10 @@ function overseeWorkspace(run, env, status, prev) {
|
|
|
419
448
|
errorsAt: prev && prev.errors !== errors ? run.now : prev?.errorsAt ?? null,
|
|
420
449
|
stuckAt: prev?.stuckAt ?? null,
|
|
421
450
|
finished: prev?.finished ?? false,
|
|
451
|
+
finishedInRun: prev?.finishedInRun ?? false,
|
|
452
|
+
running: !isIdle(env),
|
|
422
453
|
attention: [],
|
|
454
|
+
attentionRaised: prev?.attentionRaised ?? false,
|
|
423
455
|
loops: {},
|
|
424
456
|
pr: prev?.pr,
|
|
425
457
|
mergedInto: git ? git.mergedInto : prev?.mergedInto ?? null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bn as WebBrowserState, En as RemoteDeviceState, Ft as AndroidDeviceState, Gn as WorktreeGit, Ht as BuildDetail, Kn as WorktreePullRequest, Kt as BuildMissChange, Mn as StatusIssue, Nt as AgentSession, Pn as StatusPayload, Qt as BuildReport, Un as WorkspaceStage, Ut as BuildDiagnostic, Wn as WorktreeFacts, Wt as BuildHistoryEntry, Xt as BuildPlanPayload, Yn as MacosBuild, Yt as BuildPlacement, _n as MachineUsageState, cn as EnvironmentDisk, en as BuildWaitingFor, fn as LastBuildReport, hn as MachineOwner, hr as MaintenancePressure, in as DeviceLeaseState, kn as SimulatorState, ln as EnvironmentState, mr as MaintenancePass, nn as DeviceActivity, on as DiskMeasure, qn as MacosAppRecord, qt as BuildMissReason,
|
|
2
|
-
import {
|
|
1
|
+
import { Bn as WebBrowserState, En as RemoteDeviceState, Ft as AndroidDeviceState, Gn as WorktreeGit, Ht as BuildDetail, Kn as WorktreePullRequest, Kt as BuildMissChange, Mn as StatusIssue, Nt as AgentSession, Pn as StatusPayload, Qt as BuildReport, Un as WorkspaceStage, Ut as BuildDiagnostic, Wn as WorktreeFacts, Wt as BuildHistoryEntry, Xt as BuildPlanPayload, Yn as MacosBuild, Yt as BuildPlacement, _n as MachineUsageState, cn as EnvironmentDisk, en as BuildWaitingFor, fn as LastBuildReport, hn as MachineOwner, hr as MaintenancePressure, ia as HostedMacosPlacement, in as DeviceLeaseState, kn as SimulatorState, ln as EnvironmentState, mr as MaintenancePass, nn as DeviceActivity, on as DiskMeasure, qn as MacosAppRecord, qt as BuildMissReason, rn as DeviceAppProcess, rr as ArchivedWorkspace, un as GitChip, ur as MaintenanceAction, wn as PhysicalDeviceState, yn as MetroBundleState, yr as MaintenanceStatus } from "./index-DcA9D2PQ.mjs";
|
|
2
|
+
import { An as ReplayRange, B as DEVICE_HOST_METHODS, Dn as ReplayKeyframe, En as ReplayEndedEvent, Et as KeyModifier, F as ControlBeginParams, Fn as SERVER_UPDATE_METHODS, Ft as LogSource, H as DeviceAuth, Ht as MachineDetails, I as ControlBeginResult, It as LogsEndedEvent, K as DevicePosture, Kn as SimulatorCommand, Kt as MachineUsage, Ln as ServerEvent, Lt as LogsEvent, Mn as ReplayTarget, Mt as LogFilter, Nt as LogLevel, On as ReplayKeyframeParams, Pn as RotateDirection, Pt as LogRecord, Qn as TouchPhase, Qt as Methods, R as ControlEndedEvent, Rt as LogsQueryResult, S as BuildPlanParams, T as BuildProgressEvent, U as DeviceFrameArtwork, Ut as MachineHistory, W as DeviceFrameEvent, Yn as StatusEvent, Yt as MacosWindowsEvent, Z as ErrorEvent, _n as PushRegisterParams, a as ArchiveDetailParams, ct as FramesSubscribeResult, dr as WorkspaceDiff, er as UsageHistory, fr as WorkspaceFile, gn as PushEvent, gt as InputKey, hn as ProtocolError, hr as WorkspacePatch, i as ActionResult, in as NotificationSuppression, it as FrameTarget, jn as ReplaySpan, kn as ReplayMarker, lt as HelloParams, m as BuildClientSummary, mn as Platform, mt as InputButton, n as ActionName, nn as NotificationEvent, nt as FrameDelayedEvent, pn as PairingAuth, pr as WorkspaceFiles, q as DeviceUsageSeries, qn as SimulatorOptions, qt as MachineVolume, r as ActionParams, rn as NotificationLevel, rt as FrameEvent, s as BUILD_METHODS, sn as NotificationsListResult, t as ACTIONS, tn as NotificationEntry, tr as UsageSample, un as PROTOCOL_VERSION, ut as HelloResult, xt as InputSimulatorParams, y as BuildMachineReport } from "./protocol-DXP_JLAv.mjs";
|
|
3
3
|
//#region phone-protocol.d.ts
|
|
4
4
|
type PhonePlatform = BuildPlanParams["platform"];
|
|
5
5
|
type PhoneDevicePlatform = Platform;
|
|
@@ -213,15 +213,22 @@ type PhoneLastBuild = Omit<LastBuildReport, "platform" | "status" | "cacheHit" |
|
|
|
213
213
|
};
|
|
214
214
|
type PhoneBuildDiagnostic = BuildDiagnostic;
|
|
215
215
|
type PhoneDeviceLeaseState = DeviceLeaseState;
|
|
216
|
-
type PhoneMaintenanceStatus = Omit<MaintenanceStatus, "mode" | "lastPass" | "plan" | "pressure" | "sizes" | "recent"> & {
|
|
216
|
+
type PhoneMaintenanceStatus = Omit<MaintenanceStatus, "mode" | "lastPass" | "plan" | "pressure" | "sizes" | "recent" | "lastChecks"> & {
|
|
217
217
|
mode: string;
|
|
218
|
+
lastChecks: {
|
|
219
|
+
pressure: number | null;
|
|
220
|
+
size: number | null;
|
|
221
|
+
worktree?: number | null;
|
|
222
|
+
sweep?: number | null;
|
|
223
|
+
};
|
|
218
224
|
lastPass: (Omit<MaintenancePass, "mode" | "freedBytes" | "stopped"> & {
|
|
219
225
|
mode: string;
|
|
220
226
|
freedBytes: number;
|
|
221
227
|
stopped: number;
|
|
222
228
|
}) | null;
|
|
223
|
-
plan: (Omit<MaintenanceAction, "kind"> & {
|
|
229
|
+
plan: (Omit<MaintenanceAction, "kind" | "check"> & {
|
|
224
230
|
kind: string;
|
|
231
|
+
check?: string;
|
|
225
232
|
})[];
|
|
226
233
|
pressure: (Omit<MaintenancePressure, "memory"> & {
|
|
227
234
|
memory: Omit<MaintenancePressure["memory"], "level"> & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ci as
|
|
1
|
+
import { Ci as HostedDeviceOffer, Di as HostedDeviceRequest, Ei as HostedDevicePlatform, Pn as StatusPayload, Ti as HostedDevicePhase, Wc as NdjsonRecord, Wt as BuildHistoryEntry, Xt as BuildPlanPayload, d as HostedLogsPage, ha as HostedAppOffer, ki as HostedDeviceSession, pa as HostedAppDelivery, ta as HostedAppLaunch, u as HostedLogsCursor, wi as HostedDeviceOfferRequest } from "./index-DcA9D2PQ.mjs";
|
|
2
2
|
//#region protocol.d.ts
|
|
3
3
|
declare const PROTOCOL_VERSION = 1;
|
|
4
4
|
declare const PROTOCOL_SCHEMA_FILE = "protocol.schema.json";
|
|
@@ -76,9 +76,11 @@ interface DeviceHostRequestAuth {
|
|
|
76
76
|
}
|
|
77
77
|
interface HelloParams {
|
|
78
78
|
protocol: number;
|
|
79
|
+
/** `runId` is the CLI invocation's id: letters, digits, `.`, `_`, `-`, at most 64. The server puts it on its log lines for the connection. */
|
|
79
80
|
client: {
|
|
80
81
|
name: string;
|
|
81
82
|
version: string;
|
|
83
|
+
runId?: string;
|
|
82
84
|
};
|
|
83
85
|
auth: PairingAuth | DeviceAuth | BuildRequestAuth | DeviceHostRequestAuth;
|
|
84
86
|
}
|
|
@@ -123,7 +125,7 @@ interface SubscribeResult {
|
|
|
123
125
|
interface UnsubscribeParams {
|
|
124
126
|
subscription: string;
|
|
125
127
|
}
|
|
126
|
-
declare const LOG_SOURCES: readonly ["metro", "client", "device", "build", "agent", "maintenance"];
|
|
128
|
+
declare const LOG_SOURCES: readonly ["metro", "client", "device", "build", "agent", "maintenance", "placement"];
|
|
127
129
|
type LogSource = (typeof LOG_SOURCES)[number];
|
|
128
130
|
declare const LOG_LEVELS: readonly ["debug", "info", "warn", "error", "fatal"];
|
|
129
131
|
type LogLevel = (typeof LOG_LEVELS)[number];
|
|
@@ -495,11 +497,15 @@ interface BuildPlanParams {
|
|
|
495
497
|
type BuildPlanResult = BuildPlanPayload;
|
|
496
498
|
/** A client's repository on a remote Mac: letters, digits, `.`, `_` and `-`, at most 80. */
|
|
497
499
|
declare const BUILD_REPO_PATTERN = "^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$";
|
|
500
|
+
/** A version-manager Ruby installation name, without path separators. */
|
|
501
|
+
declare const BUILD_RUBY_VERSION_PATTERN = "^(?!\\.{1,2}$)[^/\\\\\\u0000\\r\\n]+$";
|
|
498
502
|
/** Asks a remote Mac what it can build, how busy it is, and how warm its copy of `repo` is. */
|
|
499
503
|
interface BuildOfferParams {
|
|
500
504
|
repo: string;
|
|
501
505
|
/** sha256 of the repository's lockfile, compared with the one the machine last installed from. */
|
|
502
506
|
lockfile?: string;
|
|
507
|
+
/** The project's normalized .ruby-version; absent uses the worker's default Ruby. */
|
|
508
|
+
rubyVersion?: string;
|
|
503
509
|
}
|
|
504
510
|
/** The toolchain a build must match exactly on both Macs. */
|
|
505
511
|
interface BuildToolchain {
|
|
@@ -523,8 +529,8 @@ interface BuildToolchain {
|
|
|
523
529
|
/**
|
|
524
530
|
* How busy the remote Mac is. `running` counts offloaded builds and `max` is how many it runs at once.
|
|
525
531
|
* `cpus`, `loadPerCore` (5-minute load average per CPU), `builds` (its own Stim native builds plus the offloaded
|
|
526
|
-
* ones), `maxBuilds` (its `concurrency.maxBuilds`, 0 when unlimited)
|
|
527
|
-
* stim-server older than them. `declined` is why it would refuse a build now, null when it would take one.
|
|
532
|
+
* ones), `maxBuilds` (its `concurrency.maxBuilds`, 0 when unlimited), `maxLoadPerCore`, `memoryUsedBytes`
|
|
533
|
+
* (Activity Monitor's Memory Used) and `memoryTotalBytes` are absent from a stim-server older than them. `declined` is why it would refuse a build now, null when it would take one.
|
|
528
534
|
*/
|
|
529
535
|
interface BuildCapacity {
|
|
530
536
|
running: number;
|
|
@@ -536,6 +542,8 @@ interface BuildCapacity {
|
|
|
536
542
|
builds?: number;
|
|
537
543
|
maxBuilds?: number;
|
|
538
544
|
maxLoadPerCore?: number;
|
|
545
|
+
memoryUsedBytes?: number;
|
|
546
|
+
memoryTotalBytes?: number;
|
|
539
547
|
declined?: string | null;
|
|
540
548
|
}
|
|
541
549
|
interface BuildOfferResult {
|
|
@@ -755,6 +763,8 @@ interface BuildMachineCapacity {
|
|
|
755
763
|
builds?: number;
|
|
756
764
|
maxBuilds?: number;
|
|
757
765
|
maxLoadPerCore?: number;
|
|
766
|
+
memoryUsedBytes?: number;
|
|
767
|
+
memoryTotalBytes?: number;
|
|
758
768
|
declined?: string | null;
|
|
759
769
|
}
|
|
760
770
|
/**
|
|
@@ -1511,4 +1521,4 @@ type ServeRoute = {
|
|
|
1511
1521
|
port: number;
|
|
1512
1522
|
};
|
|
1513
1523
|
//#endregion
|
|
1514
|
-
export {
|
|
1524
|
+
export { FRAME_EDGE as $, UnsubscribeParams as $n, NOTIFICATION_LEVELS as $t, BuildToolchain as A, ReplayRange as An, LOG_SOURCES as At, DEVICE_HOST_METHODS as B, ServerUpdateOutcome as Bn, MAX_LOG_TAIL as Bt, BuildPlanResult as C, RecordingSetParams as Cn, InputTouchParams as Ct, BuildStartParams as D, ReplayKeyframe as Dn, KeyframeParams as Dt, BuildRequestAuth as E, ReplayEndedEvent as En, KeyModifier as Et, ControlBeginParams as F, SERVER_UPDATE_METHODS as Fn, LogSource as Ft, DeviceHostRequestAuth as G, SettingsResult as Gn, MachineUpdateStatus as Gt, DeviceAuth as H, ServerUpdateProgress as Hn, MachineDetails as Ht, ControlBeginResult as I, ServeRoute as In, LogsEndedEvent as It, DuoFramePose as J, StatsResult as Jn, MacosWindow as Jt, DevicePosture as K, SimulatorCommand as Kn, MachineUsage as Kt, ControlEndParams as L, ServerEvent as Ln, LogsEvent as Lt, CONTROL_END_REASONS as M, ReplayTarget as Mn, LogFilter as Mt, Capability as N, RequestId as Nn, LogLevel as Nt, BuildSyncParams as O, ReplayKeyframeParams as On, LEGACY_PUSH_EVENTS as Ot, ClientRequest as P, RotateDirection as Pn, LogRecord as Pt, FEATURES as Q, TouchPhase as Qn, Methods as Qt, ControlEndedEvent as R, ServerMessage as Rn, LogsQueryResult as Rt, BuildPlanParams as S, ROTATE_DIRECTIONS as Sn, InputTextParams as St, BuildProgressEvent as T, ReloadPlatform as Tn, KEY_MODIFIERS as Tt, DeviceFrameArtwork as U, ServerUpdateStartParams as Un, MachineHistory as Ut, DEVICE_POSTURES as V, ServerUpdatePackage as Vn, METHODS as Vt, DeviceFrameEvent as W, ServerUpdateStatus as Wn, MachineHistoryParams as Wt, ErrorCode as X, SubscribeResult as Xn, MemoryPressure as Xt, ERROR_CODES as Y, StatusEvent as Yn, MacosWindowsEvent as Yt, ErrorEvent as Z, TOUCH_PHASES as Zn, Method as Zt, BuildJobParams as _, PushRegisterParams as _n, InputKeyParams as _t, ArchiveDetailParams as a, NotificationTarget as an, VIDEO_FOLDED as ar, FramesLiveParams as at, BuildOfferParams as b, REPLAY_MARKER_KINDS as bn, InputScrollParams as bt, BUILD_REPO_PATTERN as c, PLATFORMS as cn, VIDEO_UNFOLDED as cr, FramesSubscribeResult as ct, BuildArtifactResult as d, PUSH_EVENTS as dn, WorkspaceDiff as dr, HostedSessionRow as dt, NOTIFICATION_SUPPRESSIONS as en, UsageHistory as er, FRAME_FPS as et, BuildAttachResult as f, PUSH_TOKEN_PATTERN as fn, WorkspaceFile as fr, INPUT_BUTTONS as ft, BuildJobOutcome as g, PushEvent as gn, InputKey as gt, BuildFile as h, ProtocolError as hn, WorkspacePatch as hr, InputButtonParams as ht, ActionResult as i, NotificationSuppression as in, VIDEO_CODECS as ir, FrameTarget as it, CAPABILITIES as j, ReplaySpan as jn, LegacyPushEvent as jt, BuildSyncResult as k, ReplayMarker as kn, LOG_LEVELS as kt, BUILD_RUBY_VERSION_PATTERN as l, PROTOCOL_SCHEMA_FILE as ln, VideoCodec as lr, HelloParams as lt, BuildClientSummary as m, Platform as mn, WorkspaceParams as mr, InputButton as mt, ActionName as n, NotificationEvent as nn, UsageSeries as nr, FrameDelayedEvent as nt, ArchiveDetailResult as o, NotificationsListParams as on, VIDEO_HEADER_VERSION as or, FramesSeekParams as ot, BuildCapacity as p, PairingAuth as pn, WorkspaceFiles as pr, INPUT_KEYS as pt, DeviceUsageSeries as q, SimulatorOptions as qn, MachineVolume as qt, ActionParams as r, NotificationLevel as rn, VIDEO_ARTWORK as rr, FrameEvent as rt, BUILD_METHODS as s, NotificationsListResult as sn, VIDEO_KEYFRAME as sr, FramesSeekResult as st, ACTIONS as t, NotificationEntry as tn, UsageSample as tr, Feature as tt, BuildAndroidOptions as u, PROTOCOL_VERSION as un, VideoPacket as ur, HelloResult as ut, BuildMachineCapacity as v, QuietHours as vn, InputPostureParams as vt, BuildPlatform as w, RecordingSetResult as wn, InputWindowParams as wt, BuildOfferResult as x, REPLAY_RATES as xn, InputSimulatorParams as xt, BuildMachineReport as y, RELOAD_PLATFORMS as yn, InputRotateParams as yt, ControlPlatform as z, ServerResponse as zn, MAX_INPUT_TEXT as zt };
|
package/dist/protocol.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { ACTIONS, ActionName, ActionParams, ActionResult, ArchiveDetailParams, ArchiveDetailResult, BUILD_METHODS, BUILD_REPO_PATTERN, BuildAndroidOptions, BuildArtifactResult, BuildAttachResult, BuildCapacity, BuildClientSummary, BuildFile, BuildJobOutcome, BuildJobParams, BuildMachineCapacity, BuildMachineReport, BuildOfferParams, BuildOfferResult, BuildPlanParams, BuildPlanResult, BuildPlatform, BuildProgressEvent, BuildRequestAuth, BuildStartParams, BuildSyncParams, BuildSyncResult, BuildToolchain, CAPABILITIES, CONTROL_END_REASONS, Capability, ClientRequest, ControlBeginParams, ControlBeginResult, ControlEndParams, ControlEndedEvent, ControlPlatform, DEVICE_HOST_METHODS, DEVICE_POSTURES, DeviceAuth, DeviceFrameArtwork, DeviceFrameEvent, DeviceHostRequestAuth, DevicePosture, DeviceUsageSeries, DuoFramePose, ERROR_CODES, ErrorCode, ErrorEvent, FEATURES, FRAME_EDGE, FRAME_FPS, Feature, FrameDelayedEvent, FrameEvent, FrameTarget, FramesLiveParams, FramesSeekParams, FramesSeekResult, FramesSubscribeResult, HelloParams, HelloResult, HostedSessionRow, INPUT_BUTTONS, INPUT_KEYS, InputButton, InputButtonParams, InputKey, InputKeyParams, InputPostureParams, InputRotateParams, InputScrollParams, InputSimulatorParams, InputTextParams, InputTouchParams, InputWindowParams, KEY_MODIFIERS, KeyModifier, KeyframeParams, LEGACY_PUSH_EVENTS, LOG_LEVELS, LOG_SOURCES, LegacyPushEvent, LogFilter, LogLevel, LogRecord, LogSource, LogsEndedEvent, LogsEvent, LogsQueryResult, MAX_INPUT_TEXT, MAX_LOG_TAIL, METHODS, MachineDetails, MachineHistory, MachineHistoryParams, MachineUpdateStatus, MachineUsage, MachineVolume, MacosWindow, MacosWindowsEvent, MemoryPressure, Method, Methods, NOTIFICATION_LEVELS, NOTIFICATION_SUPPRESSIONS, NotificationEntry, NotificationEvent, NotificationLevel, NotificationSuppression, NotificationTarget, NotificationsListParams, NotificationsListResult, PLATFORMS, PROTOCOL_SCHEMA_FILE, PROTOCOL_VERSION, PUSH_EVENTS, PUSH_TOKEN_PATTERN, PairingAuth, Platform, ProtocolError, PushEvent, PushRegisterParams, QuietHours, RELOAD_PLATFORMS, REPLAY_MARKER_KINDS, REPLAY_RATES, ROTATE_DIRECTIONS, RecordingSetParams, RecordingSetResult, ReloadPlatform, ReplayEndedEvent, ReplayKeyframe, ReplayKeyframeParams, ReplayMarker, ReplayRange, ReplaySpan, ReplayTarget, RequestId, RotateDirection, SERVER_UPDATE_METHODS, ServeRoute, ServerEvent, ServerMessage, ServerResponse, ServerUpdateOutcome, ServerUpdatePackage, ServerUpdateProgress, ServerUpdateStartParams, ServerUpdateStatus, SettingsResult, SimulatorCommand, SimulatorOptions, StatsResult, StatusEvent, SubscribeResult, TOUCH_PHASES, TouchPhase, UnsubscribeParams, UsageHistory, UsageSample, UsageSeries, VIDEO_ARTWORK, VIDEO_CODECS, VIDEO_FOLDED, VIDEO_HEADER_VERSION, VIDEO_KEYFRAME, VIDEO_UNFOLDED, VideoCodec, VideoPacket, WorkspaceDiff, WorkspaceFile, WorkspaceFiles, WorkspaceParams, WorkspacePatch };
|
|
1
|
+
import { $ as FRAME_EDGE, $n as UnsubscribeParams, $t as NOTIFICATION_LEVELS, A as BuildToolchain, An as ReplayRange, At as LOG_SOURCES, B as DEVICE_HOST_METHODS, Bn as ServerUpdateOutcome, Bt as MAX_LOG_TAIL, C as BuildPlanResult, Cn as RecordingSetParams, Ct as InputTouchParams, D as BuildStartParams, Dn as ReplayKeyframe, Dt as KeyframeParams, E as BuildRequestAuth, En as ReplayEndedEvent, Et as KeyModifier, F as ControlBeginParams, Fn as SERVER_UPDATE_METHODS, Ft as LogSource, G as DeviceHostRequestAuth, Gn as SettingsResult, Gt as MachineUpdateStatus, H as DeviceAuth, Hn as ServerUpdateProgress, Ht as MachineDetails, I as ControlBeginResult, In as ServeRoute, It as LogsEndedEvent, J as DuoFramePose, Jn as StatsResult, Jt as MacosWindow, K as DevicePosture, Kn as SimulatorCommand, Kt as MachineUsage, L as ControlEndParams, Ln as ServerEvent, Lt as LogsEvent, M as CONTROL_END_REASONS, Mn as ReplayTarget, Mt as LogFilter, N as Capability, Nn as RequestId, Nt as LogLevel, O as BuildSyncParams, On as ReplayKeyframeParams, Ot as LEGACY_PUSH_EVENTS, P as ClientRequest, Pn as RotateDirection, Pt as LogRecord, Q as FEATURES, Qn as TouchPhase, Qt as Methods, R as ControlEndedEvent, Rn as ServerMessage, Rt as LogsQueryResult, S as BuildPlanParams, Sn as ROTATE_DIRECTIONS, St as InputTextParams, T as BuildProgressEvent, Tn as ReloadPlatform, Tt as KEY_MODIFIERS, U as DeviceFrameArtwork, Un as ServerUpdateStartParams, Ut as MachineHistory, V as DEVICE_POSTURES, Vn as ServerUpdatePackage, Vt as METHODS, W as DeviceFrameEvent, Wn as ServerUpdateStatus, Wt as MachineHistoryParams, X as ErrorCode, Xn as SubscribeResult, Xt as MemoryPressure, Y as ERROR_CODES, Yn as StatusEvent, Yt as MacosWindowsEvent, Z as ErrorEvent, Zn as TOUCH_PHASES, Zt as Method, _ as BuildJobParams, _n as PushRegisterParams, _t as InputKeyParams, a as ArchiveDetailParams, an as NotificationTarget, ar as VIDEO_FOLDED, at as FramesLiveParams, b as BuildOfferParams, bn as REPLAY_MARKER_KINDS, bt as InputScrollParams, c as BUILD_REPO_PATTERN, cn as PLATFORMS, cr as VIDEO_UNFOLDED, ct as FramesSubscribeResult, d as BuildArtifactResult, dn as PUSH_EVENTS, dr as WorkspaceDiff, dt as HostedSessionRow, en as NOTIFICATION_SUPPRESSIONS, er as UsageHistory, et as FRAME_FPS, f as BuildAttachResult, fn as PUSH_TOKEN_PATTERN, fr as WorkspaceFile, ft as INPUT_BUTTONS, g as BuildJobOutcome, gn as PushEvent, gt as InputKey, h as BuildFile, hn as ProtocolError, hr as WorkspacePatch, ht as InputButtonParams, i as ActionResult, in as NotificationSuppression, ir as VIDEO_CODECS, it as FrameTarget, j as CAPABILITIES, jn as ReplaySpan, jt as LegacyPushEvent, k as BuildSyncResult, kn as ReplayMarker, kt as LOG_LEVELS, l as BUILD_RUBY_VERSION_PATTERN, ln as PROTOCOL_SCHEMA_FILE, lr as VideoCodec, lt as HelloParams, m as BuildClientSummary, mn as Platform, mr as WorkspaceParams, mt as InputButton, n as ActionName, nn as NotificationEvent, nr as UsageSeries, nt as FrameDelayedEvent, o as ArchiveDetailResult, on as NotificationsListParams, or as VIDEO_HEADER_VERSION, ot as FramesSeekParams, p as BuildCapacity, pn as PairingAuth, pr as WorkspaceFiles, pt as INPUT_KEYS, q as DeviceUsageSeries, qn as SimulatorOptions, qt as MachineVolume, r as ActionParams, rn as NotificationLevel, rr as VIDEO_ARTWORK, rt as FrameEvent, s as BUILD_METHODS, sn as NotificationsListResult, sr as VIDEO_KEYFRAME, st as FramesSeekResult, t as ACTIONS, tn as NotificationEntry, tr as UsageSample, tt as Feature, u as BuildAndroidOptions, un as PROTOCOL_VERSION, ur as VideoPacket, ut as HelloResult, v as BuildMachineCapacity, vn as QuietHours, vt as InputPostureParams, w as BuildPlatform, wn as RecordingSetResult, wt as InputWindowParams, x as BuildOfferResult, xn as REPLAY_RATES, xt as InputSimulatorParams, y as BuildMachineReport, yn as RELOAD_PLATFORMS, yt as InputRotateParams, z as ControlPlatform, zn as ServerResponse, zt as MAX_INPUT_TEXT } from "./protocol-DXP_JLAv.mjs";
|
|
2
|
+
export { ACTIONS, ActionName, ActionParams, ActionResult, ArchiveDetailParams, ArchiveDetailResult, BUILD_METHODS, BUILD_REPO_PATTERN, BUILD_RUBY_VERSION_PATTERN, BuildAndroidOptions, BuildArtifactResult, BuildAttachResult, BuildCapacity, BuildClientSummary, BuildFile, BuildJobOutcome, BuildJobParams, BuildMachineCapacity, BuildMachineReport, BuildOfferParams, BuildOfferResult, BuildPlanParams, BuildPlanResult, BuildPlatform, BuildProgressEvent, BuildRequestAuth, BuildStartParams, BuildSyncParams, BuildSyncResult, BuildToolchain, CAPABILITIES, CONTROL_END_REASONS, Capability, ClientRequest, ControlBeginParams, ControlBeginResult, ControlEndParams, ControlEndedEvent, ControlPlatform, DEVICE_HOST_METHODS, DEVICE_POSTURES, DeviceAuth, DeviceFrameArtwork, DeviceFrameEvent, DeviceHostRequestAuth, DevicePosture, DeviceUsageSeries, DuoFramePose, ERROR_CODES, ErrorCode, ErrorEvent, FEATURES, FRAME_EDGE, FRAME_FPS, Feature, FrameDelayedEvent, FrameEvent, FrameTarget, FramesLiveParams, FramesSeekParams, FramesSeekResult, FramesSubscribeResult, HelloParams, HelloResult, HostedSessionRow, INPUT_BUTTONS, INPUT_KEYS, InputButton, InputButtonParams, InputKey, InputKeyParams, InputPostureParams, InputRotateParams, InputScrollParams, InputSimulatorParams, InputTextParams, InputTouchParams, InputWindowParams, KEY_MODIFIERS, KeyModifier, KeyframeParams, LEGACY_PUSH_EVENTS, LOG_LEVELS, LOG_SOURCES, LegacyPushEvent, LogFilter, LogLevel, LogRecord, LogSource, LogsEndedEvent, LogsEvent, LogsQueryResult, MAX_INPUT_TEXT, MAX_LOG_TAIL, METHODS, MachineDetails, MachineHistory, MachineHistoryParams, MachineUpdateStatus, MachineUsage, MachineVolume, MacosWindow, MacosWindowsEvent, MemoryPressure, Method, Methods, NOTIFICATION_LEVELS, NOTIFICATION_SUPPRESSIONS, NotificationEntry, NotificationEvent, NotificationLevel, NotificationSuppression, NotificationTarget, NotificationsListParams, NotificationsListResult, PLATFORMS, PROTOCOL_SCHEMA_FILE, PROTOCOL_VERSION, PUSH_EVENTS, PUSH_TOKEN_PATTERN, PairingAuth, Platform, ProtocolError, PushEvent, PushRegisterParams, QuietHours, RELOAD_PLATFORMS, REPLAY_MARKER_KINDS, REPLAY_RATES, ROTATE_DIRECTIONS, RecordingSetParams, RecordingSetResult, ReloadPlatform, ReplayEndedEvent, ReplayKeyframe, ReplayKeyframeParams, ReplayMarker, ReplayRange, ReplaySpan, ReplayTarget, RequestId, RotateDirection, SERVER_UPDATE_METHODS, ServeRoute, ServerEvent, ServerMessage, ServerResponse, ServerUpdateOutcome, ServerUpdatePackage, ServerUpdateProgress, ServerUpdateStartParams, ServerUpdateStatus, SettingsResult, SimulatorCommand, SimulatorOptions, StatsResult, StatusEvent, SubscribeResult, TOUCH_PHASES, TouchPhase, UnsubscribeParams, UsageHistory, UsageSample, UsageSeries, VIDEO_ARTWORK, VIDEO_CODECS, VIDEO_FOLDED, VIDEO_HEADER_VERSION, VIDEO_KEYFRAME, VIDEO_UNFOLDED, VideoCodec, VideoPacket, WorkspaceDiff, WorkspaceFile, WorkspaceFiles, WorkspaceParams, WorkspacePatch };
|
package/dist/protocol.mjs
CHANGED
|
@@ -217,7 +217,8 @@ const LOG_SOURCES = [
|
|
|
217
217
|
"device",
|
|
218
218
|
"build",
|
|
219
219
|
"agent",
|
|
220
|
-
"maintenance"
|
|
220
|
+
"maintenance",
|
|
221
|
+
"placement"
|
|
221
222
|
];
|
|
222
223
|
const LOG_LEVELS = [
|
|
223
224
|
"debug",
|
|
@@ -346,6 +347,8 @@ const DEVICE_POSTURES = [
|
|
|
346
347
|
];
|
|
347
348
|
/** A client's repository on a remote Mac: letters, digits, `.`, `_` and `-`, at most 80. */
|
|
348
349
|
const BUILD_REPO_PATTERN = "^[A-Za-z0-9][A-Za-z0-9._-]{0,79}$";
|
|
350
|
+
/** A version-manager Ruby installation name, without path separators. */
|
|
351
|
+
const BUILD_RUBY_VERSION_PATTERN = "^(?!\\.{1,2}$)[^/\\\\\\u0000\\r\\n]+$";
|
|
349
352
|
/**
|
|
350
353
|
* What stim-server can push, named like the phone's notification settings: work `started` (a workspace began
|
|
351
354
|
* warming or an agent first drove its device), an agent that looks `stuck`, one that is `looping` on the same
|
|
@@ -384,4 +387,4 @@ const CONTROL_END_REASONS = [
|
|
|
384
387
|
"failed"
|
|
385
388
|
];
|
|
386
389
|
//#endregion
|
|
387
|
-
export { ACTIONS, BUILD_METHODS, BUILD_REPO_PATTERN, CAPABILITIES, CONTROL_END_REASONS, DEVICE_HOST_METHODS, DEVICE_POSTURES, ERROR_CODES, FEATURES, FRAME_EDGE, FRAME_FPS, INPUT_BUTTONS, INPUT_KEYS, KEY_MODIFIERS, LEGACY_PUSH_EVENTS, LOG_LEVELS, LOG_SOURCES, MAX_INPUT_TEXT, MAX_LOG_TAIL, METHODS, NOTIFICATION_LEVELS, NOTIFICATION_SUPPRESSIONS, PLATFORMS, PROTOCOL_SCHEMA_FILE, PROTOCOL_VERSION, PUSH_EVENTS, PUSH_TOKEN_PATTERN, RELOAD_PLATFORMS, REPLAY_MARKER_KINDS, REPLAY_RATES, ROTATE_DIRECTIONS, SERVER_UPDATE_METHODS, TOUCH_PHASES, VIDEO_ARTWORK, VIDEO_CODECS, VIDEO_FOLDED, VIDEO_HEADER_VERSION, VIDEO_KEYFRAME, VIDEO_UNFOLDED };
|
|
390
|
+
export { ACTIONS, BUILD_METHODS, BUILD_REPO_PATTERN, BUILD_RUBY_VERSION_PATTERN, CAPABILITIES, CONTROL_END_REASONS, DEVICE_HOST_METHODS, DEVICE_POSTURES, ERROR_CODES, FEATURES, FRAME_EDGE, FRAME_FPS, INPUT_BUTTONS, INPUT_KEYS, KEY_MODIFIERS, LEGACY_PUSH_EVENTS, LOG_LEVELS, LOG_SOURCES, MAX_INPUT_TEXT, MAX_LOG_TAIL, METHODS, NOTIFICATION_LEVELS, NOTIFICATION_SUPPRESSIONS, PLATFORMS, PROTOCOL_SCHEMA_FILE, PROTOCOL_VERSION, PUSH_EVENTS, PUSH_TOKEN_PATTERN, RELOAD_PLATFORMS, REPLAY_MARKER_KINDS, REPLAY_RATES, ROTATE_DIRECTIONS, SERVER_UPDATE_METHODS, TOUCH_PHASES, VIDEO_ARTWORK, VIDEO_CODECS, VIDEO_FOLDED, VIDEO_HEADER_VERSION, VIDEO_KEYFRAME, VIDEO_UNFOLDED };
|
|
@@ -8,5 +8,18 @@ declare function isRpcEvent(value: unknown): value is PhoneServerEvent;
|
|
|
8
8
|
declare function isRpcError(value: unknown): value is PhoneProtocolError;
|
|
9
9
|
/** Unknown future events can be ignored without reconnecting to a newer server. */
|
|
10
10
|
declare function isRpcEventName(value: string): boolean;
|
|
11
|
+
/** Why a validator rejected a value, described by the schema alone: no instance path and no value. */
|
|
12
|
+
interface RpcIssue {
|
|
13
|
+
keyword: string;
|
|
14
|
+
schemaPath: string;
|
|
15
|
+
missingProperty?: string;
|
|
16
|
+
expectedType?: string;
|
|
17
|
+
}
|
|
18
|
+
/** The first schema violation of a result for `method`, or null when it is valid. */
|
|
19
|
+
declare function rpcResultIssue<M extends PhoneMethod>(method: M, value: unknown): RpcIssue | null;
|
|
20
|
+
/** The first schema violation of a phone event, or null when it is valid. */
|
|
21
|
+
declare function rpcEventIssue(value: unknown): RpcIssue | null;
|
|
22
|
+
/** The first schema violation of an RPC error object, or null when it is valid. */
|
|
23
|
+
declare function rpcErrorIssue(value: unknown): RpcIssue | null;
|
|
11
24
|
//#endregion
|
|
12
|
-
export { isRpcError, isRpcEvent, isRpcEventName, isRpcResult };
|
|
25
|
+
export { RpcIssue, isRpcError, isRpcEvent, isRpcEventName, isRpcResult, rpcErrorIssue, rpcEventIssue, rpcResultIssue };
|