@stim-cli/core 1.38.0 → 1.40.0-next.20261103050129.gd5fe899
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/{core-Hohf5Wnt.mjs → core-DdPq-c64.mjs} +8 -1
- package/dist/{index-UT7ghV30.d.mts → index-DYumFNYh.d.mts} +220 -17
- package/dist/index.d.mts +7 -2
- package/dist/index.mjs +2 -2
- package/dist/noise-session.d.mts +10 -2
- package/dist/noise-session.mjs +17 -3
- package/dist/phone-protocol.d.mts +5 -9
- package/dist/{protocol-CGriFVo2.d.mts → protocol-_p7V6XGi.d.mts} +124 -26
- package/dist/protocol.d.mts +2 -2
- package/dist/protocol.mjs +20 -8
- package/dist/receive-protocol.mjs +6837 -7768
- package/dist/state.d.mts +2 -2
- package/dist/state.mjs +230 -62
- package/package.json +1 -1
|
@@ -881,6 +881,13 @@ function absoluteEnvPath(name) {
|
|
|
881
881
|
function configDir() {
|
|
882
882
|
return ambientContext()?.home ?? (absoluteEnvPath("STIM_HOME") || path.join(os.homedir(), ".stim"));
|
|
883
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* Whether `STIM_HOME` scopes this Stim home, whatever path it names, `~/.stim` included. A scoped home owns only the
|
|
886
|
+
* devices its created-devices ledger lists and leaves machine-wide device and memory sweeps alone.
|
|
887
|
+
*/
|
|
888
|
+
function isScopedHome(env = ambientEnv()) {
|
|
889
|
+
return Boolean(env.STIM_HOME);
|
|
890
|
+
}
|
|
884
891
|
/** Creates `dir` and its missing parents owner-only, and narrows an existing `dir` that grants group or other access when the filesystem and owner allow it. */
|
|
885
892
|
function ensurePrivateDir(dir) {
|
|
886
893
|
fs.mkdirSync(dir, {
|
|
@@ -1085,4 +1092,4 @@ function matchesCache(cache, match) {
|
|
|
1085
1092
|
return match.layout === void 0 || cache.layout === match.layout;
|
|
1086
1093
|
}
|
|
1087
1094
|
//#endregion
|
|
1088
|
-
export {
|
|
1095
|
+
export { withDirLock as $, createMetroBridge as A, quoteUnitWord as B, workspaceLogDir as C, swiftpmArtifactQuery as D, workspaceStateDir as E, compiledHelper as F, ambientEnv as G, unitWords as H, storeArtifactAsync as I, isJsonObject as J, ambientWrite as K, artifactIn as L, dependencyInstall as M, dependencyLockfile as N, reactNativeArtifactIdentity as O, reusableDependencies as P, withStateReadCache as Q, resolveArtifact as R, workspaceId as S, workspaceSlug as T, validMacosResourceDestination as U, unitLines as V, ambientContext as W, readJsonObject as X, readJsonFile as Y, readStateFile as Z, rotateLog as _, buildCacheRoot as a, tagSharedStore as b, cacheNameSegment as c, ensurePrivateDir as d, withDirLockAsync as et, hostSimulatorArch as f, registerCache as g, readCacheManifest as h, buildCacheKey as i, createMetroLinks as j, reactNativeArtifactQuery as k, cachePathSetting as l, metroCacheRoot as m, METRO_NAMED_CACHE_LAYOUT as n, cacheDirRefusal as o, isScopedHome as p, withAmbientContext as q, STORE_ROOT_TAG as r, cacheManifestLockPath as s, LOG_ROTATE_BYTES as t, withDirLockTransaction as tt, configDir as u, rotatedLogPath as v, workspaceName as w, updateCacheManifest as x, sharedStoreRoot as y, storeArtifact as z };
|
|
@@ -476,14 +476,35 @@ interface WorkspaceState {
|
|
|
476
476
|
[key: string]: unknown;
|
|
477
477
|
}
|
|
478
478
|
declare const IDLE_STOP_KEY = "devServerStop";
|
|
479
|
-
/** Why the
|
|
479
|
+
/** Why the dev server last stopped for being idle: `idle.minutes` with no activity. `stim revive` resumes it. */
|
|
480
480
|
interface IdleStopRecord {
|
|
481
481
|
reason: "idle";
|
|
482
482
|
at: string;
|
|
483
483
|
idleMinutes: number;
|
|
484
484
|
}
|
|
485
485
|
declare function readIdleStop(state: WorkspaceState | null | undefined): IdleStopRecord | null;
|
|
486
|
+
declare const IDLE_STAGE_KEY = "idleStage";
|
|
487
|
+
/** The idle stage the daemon last moved the workspace into, and the bytes of build outputs it deleted. */
|
|
488
|
+
interface IdleStageRecord {
|
|
489
|
+
at: string;
|
|
490
|
+
idleMinutes: number;
|
|
491
|
+
freedBytes: number;
|
|
492
|
+
}
|
|
493
|
+
declare function readIdleStage(state: WorkspaceState | null | undefined): IdleStageRecord | null;
|
|
494
|
+
declare const DORMANT_STAGE_KEY = "dormantStage";
|
|
495
|
+
/** The dormant stage the daemon last moved the workspace into: the owned devices it deleted, and its archived logs. */
|
|
496
|
+
interface DormantStageRecord {
|
|
497
|
+
at: string;
|
|
498
|
+
dormantDays: number;
|
|
499
|
+
deletedDevices: string[];
|
|
500
|
+
archived: boolean;
|
|
501
|
+
}
|
|
502
|
+
declare function readDormantStage(state: WorkspaceState | null | undefined): DormantStageRecord | null;
|
|
503
|
+
declare const INTERACTIONS_KEY = "interactions";
|
|
504
|
+
/** When a person last used each device slot's focused Simulator or emulator window, by device slot key. */
|
|
505
|
+
declare function readInteractions(state: WorkspaceState | null | undefined): Record<string, string>;
|
|
486
506
|
declare const DEVICE_RECLAIM_REASON = "reclaimed for a waiting run";
|
|
507
|
+
declare const DEVICE_METRO_IDLE_STOP_REASON = "Metro's idle stop";
|
|
487
508
|
declare const DEVICE_IDLE_SHUTDOWN_KEY = "deviceIdleShutdowns";
|
|
488
509
|
/** An owned simulator or emulator shut down after being idle. */
|
|
489
510
|
interface DeviceIdleShutdownRecord {
|
|
@@ -494,13 +515,17 @@ interface DeviceIdleShutdownRecord {
|
|
|
494
515
|
/** The recorded idle shutdowns by device slot key (`ios`, `android`, `ios:<slot>`). */
|
|
495
516
|
declare function readDeviceIdleShutdowns(state: WorkspaceState | null | undefined): Record<string, DeviceIdleShutdownRecord>;
|
|
496
517
|
declare const DEV_SERVER_STOP_REQUEST_KEY = "devServerStopRequest";
|
|
497
|
-
/**
|
|
518
|
+
/**
|
|
519
|
+
* A Stim component's intent to stop the supervisor with `processToken`, written before it signals. `idleMinutes`
|
|
520
|
+
* marks the daemon's idle stop, which the supervisor records as an `IdleStopRecord`.
|
|
521
|
+
*/
|
|
498
522
|
interface DevServerStopRequest {
|
|
499
523
|
processToken: string;
|
|
500
524
|
by: string;
|
|
501
525
|
pid: number;
|
|
502
526
|
at: string;
|
|
503
527
|
workspace?: string;
|
|
528
|
+
idleMinutes?: number;
|
|
504
529
|
}
|
|
505
530
|
declare function readDevServerStopRequest(state: WorkspaceState | null | undefined): DevServerStopRequest | null;
|
|
506
531
|
/**
|
|
@@ -655,7 +680,7 @@ declare function hostedIosPlacements(state: WorkspaceState | null): Record<strin
|
|
|
655
680
|
//#region state/maintenance.d.ts
|
|
656
681
|
type MaintenanceMode = "off" | "report" | "on";
|
|
657
682
|
type MaintenanceCheck = "pressure" | "size" | "worktree" | "sweep" | "idle";
|
|
658
|
-
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" | "would-delete-parked-device" | "would-delete-devices" | "would-clear-build-dirs" | "would-delete-dependencies" | "would-stop-gradle-daemons" | "would-delete-gradle-version" | "would-delete-temp-leftovers";
|
|
683
|
+
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" | "would-delete-parked-device" | "would-delete-devices" | "would-clear-build-dirs" | "would-delete-dependencies" | "would-stop-gradle-daemons" | "would-delete-gradle-version" | "would-delete-temp-leftovers" | "would-delete-trash";
|
|
659
684
|
/** Disk pressure: 0 above every threshold, 1 under the budget floor, 2 under the urgent threshold, 3 under the critical threshold or the hard floor. */
|
|
660
685
|
type DiskPressureLevel = 0 | 1 | 2 | 3;
|
|
661
686
|
interface MaintenanceAction {
|
|
@@ -763,7 +788,126 @@ interface MaintenanceStatus {
|
|
|
763
788
|
/** Rejects missing, corrupt or unsupported payloads without throwing. */
|
|
764
789
|
declare function parseMaintenanceState(value: unknown): MaintenanceState | null;
|
|
765
790
|
declare function readMaintenanceState(): MaintenanceState | null;
|
|
766
|
-
|
|
791
|
+
//#endregion
|
|
792
|
+
//#region state/daemon.d.ts
|
|
793
|
+
type DaemonMode = "on" | "report" | "off";
|
|
794
|
+
/** One tick's measurement of the machine. A null field is one the tick could not read. */
|
|
795
|
+
interface DaemonMeasurement {
|
|
796
|
+
disk: {
|
|
797
|
+
volume: string;
|
|
798
|
+
freeMb: number;
|
|
799
|
+
}[];
|
|
800
|
+
memory: {
|
|
801
|
+
level: "normal" | "warning" | "critical" | null;
|
|
802
|
+
availableBytes: number | null;
|
|
803
|
+
totalBytes: number;
|
|
804
|
+
};
|
|
805
|
+
load1: number;
|
|
806
|
+
cores: number;
|
|
807
|
+
/** Booted simulators from the tick's one `simctl list`; null when it failed. */
|
|
808
|
+
bootedSimulators: number | null;
|
|
809
|
+
/** Running emulators from the tick's one `adb devices`; null when it failed or no workspace owns an emulator. */
|
|
810
|
+
runningEmulators: number | null;
|
|
811
|
+
/**
|
|
812
|
+
* The owned devices a person used in the focused Simulator, Device Hub or emulator window within the last two
|
|
813
|
+
* minutes, when there were some. Without a readable focused simulator, every booted owned simulator counts.
|
|
814
|
+
*/
|
|
815
|
+
interaction: {
|
|
816
|
+
platform: "ios" | "android";
|
|
817
|
+
ids: string[];
|
|
818
|
+
at: string;
|
|
819
|
+
} | null;
|
|
820
|
+
}
|
|
821
|
+
/** What one tick decided for a workspace that had something running. */
|
|
822
|
+
interface DaemonWorkspaceDecision {
|
|
823
|
+
path: string;
|
|
824
|
+
/** The newest activity signal, by its basis. */
|
|
825
|
+
lastActivity: {
|
|
826
|
+
basis: string;
|
|
827
|
+
at: string;
|
|
828
|
+
} | null;
|
|
829
|
+
/** `idle` when the tick moved it into the idle stage, or would have in report mode. */
|
|
830
|
+
outcome: "active" | "kept" | "idle" | "would-idle" | "failed";
|
|
831
|
+
detail: string;
|
|
832
|
+
/** The bytes of build outputs the idle stage deleted. */
|
|
833
|
+
freedBytes?: number;
|
|
834
|
+
}
|
|
835
|
+
type PressureLevel = "normal" | "high" | "critical";
|
|
836
|
+
/** The machine's pressure level for one tick: the higher of the disk and memory levels, and why. */
|
|
837
|
+
interface DaemonPressure {
|
|
838
|
+
level: PressureLevel;
|
|
839
|
+
disk: PressureLevel;
|
|
840
|
+
memory: PressureLevel;
|
|
841
|
+
/** One line per condition that raised the level; empty at normal. */
|
|
842
|
+
reasons: string[];
|
|
843
|
+
/** When macOS memory pressure turned warning, while it still is; the level counts it after 10 minutes. */
|
|
844
|
+
memoryWarningSince: string | null;
|
|
845
|
+
}
|
|
846
|
+
/** One action of the pressure ladder or the dormant stage, as the daemon logged it. */
|
|
847
|
+
interface DaemonLadderAction {
|
|
848
|
+
/**
|
|
849
|
+
* The ladder rung, 1 to 6; the dormant stage reached by `idle.dormantDays` is rung 4, and the admission reclaim of
|
|
850
|
+
* a device for a run waiting to boot is 0.
|
|
851
|
+
*/
|
|
852
|
+
rung: number;
|
|
853
|
+
kind: string;
|
|
854
|
+
target: string;
|
|
855
|
+
workspace?: string;
|
|
856
|
+
outcome: "done" | "kept" | "failed" | "would";
|
|
857
|
+
bytes: number;
|
|
858
|
+
detail: string;
|
|
859
|
+
/** The command that brings back what the action removed, when one does. */
|
|
860
|
+
restore?: string;
|
|
861
|
+
}
|
|
862
|
+
/** A run waiting for a build slot or a device boot, in arrival order per resource. */
|
|
863
|
+
interface DaemonWaiter {
|
|
864
|
+
resource: "build" | "boot";
|
|
865
|
+
/** 1 for the run that gets the next free slot of its resource. */
|
|
866
|
+
position: number;
|
|
867
|
+
workspace: string | null;
|
|
868
|
+
label: string;
|
|
869
|
+
platform?: string;
|
|
870
|
+
since: string;
|
|
871
|
+
}
|
|
872
|
+
/** `$STIM_HOME/daemon/snapshot.json`: the daemon's identity and its last tick. */
|
|
873
|
+
interface DaemonSnapshot {
|
|
874
|
+
version: 1;
|
|
875
|
+
pid: number;
|
|
876
|
+
startedAt: string;
|
|
877
|
+
mode: DaemonMode;
|
|
878
|
+
tickAt: string;
|
|
879
|
+
tickMs: number;
|
|
880
|
+
intervalMs: number;
|
|
881
|
+
measurement: DaemonMeasurement;
|
|
882
|
+
workspaces: DaemonWorkspaceDecision[];
|
|
883
|
+
/** Absent from snapshots written before the pressure ladder existed. */
|
|
884
|
+
pressure?: DaemonPressure;
|
|
885
|
+
/** The ladder and dormant actions this tick took, or would take in report mode. */
|
|
886
|
+
actions?: DaemonLadderAction[];
|
|
887
|
+
waiting?: DaemonWaiter[];
|
|
888
|
+
}
|
|
889
|
+
/** Whether the home daemon runs, and when it last ticked; `status` and `doctor` print it. */
|
|
890
|
+
interface DaemonStatus {
|
|
891
|
+
/** The running daemon's mode, else the mode `daemon.mode` resolves to here. */
|
|
892
|
+
mode: DaemonMode;
|
|
893
|
+
/** The mode `daemon.mode` resolves to here, when the running daemon started in another one. */
|
|
894
|
+
setting?: DaemonMode;
|
|
895
|
+
running: {
|
|
896
|
+
pid: number;
|
|
897
|
+
since: string;
|
|
898
|
+
} | null;
|
|
899
|
+
lastTickAt: string | null;
|
|
900
|
+
intervalMs: number | null;
|
|
901
|
+
claim?: {
|
|
902
|
+
unresolved: string;
|
|
903
|
+
removeCommand: string;
|
|
904
|
+
};
|
|
905
|
+
/** The last tick's pressure level; absent until a daemon with the pressure ladder ticked. */
|
|
906
|
+
pressure?: DaemonPressure;
|
|
907
|
+
/** Runs waiting for a build slot or a device boot now, read from the wait queues. */
|
|
908
|
+
waiting?: DaemonWaiter[];
|
|
909
|
+
}
|
|
910
|
+
declare function readDaemonSnapshot(file?: string): DaemonSnapshot | null;
|
|
767
911
|
//#endregion
|
|
768
912
|
//#region state/archive.d.ts
|
|
769
913
|
interface ArchivedBytes {
|
|
@@ -969,7 +1113,7 @@ interface SettingWriteResult {
|
|
|
969
1113
|
recordingsDeleted?: string[];
|
|
970
1114
|
}
|
|
971
1115
|
declare const REMOTE_DEVICE_BACKENDS: readonly RemoteDeviceBackend[];
|
|
972
|
-
declare const IOS_SIMULATOR_APPS: readonly ["xcode", "siniulator", "stim-desktop"];
|
|
1116
|
+
declare const IOS_SIMULATOR_APPS: readonly ["xcode", "siniulator", "stim-desktop", "none"];
|
|
973
1117
|
declare const ANDROID_EMULATOR_APPS: readonly ["emulator", "stim-desktop"];
|
|
974
1118
|
declare const REPLACED_SETTINGS: Readonly<Record<string, {
|
|
975
1119
|
key: string;
|
|
@@ -980,6 +1124,8 @@ declare function replacementAdvice(key: string, old: unknown): {
|
|
|
980
1124
|
key: string;
|
|
981
1125
|
command: string | null;
|
|
982
1126
|
} | null;
|
|
1127
|
+
declare const SHARE_DEFAULT_PORT = 7790;
|
|
1128
|
+
declare const SHARE_EXPOSURES: readonly ["auto", "tailscale", "proxy"];
|
|
983
1129
|
declare const WEB_VIEWPORTS: readonly ["desktop", "phone"];
|
|
984
1130
|
type WebViewport = (typeof WEB_VIEWPORTS)[number];
|
|
985
1131
|
declare const SETTINGS: readonly SettingDefinition[];
|
|
@@ -1003,7 +1149,7 @@ type StatsPlatform = "ios" | "android";
|
|
|
1003
1149
|
/** A platform whose build reports phases: the stats platforms and `macos`. */
|
|
1004
1150
|
type BuildPlatform = StatsPlatform | "macos";
|
|
1005
1151
|
type RunOutcomeKind = "hit" | "cold";
|
|
1006
|
-
declare const BUILD_PHASES: readonly ["prepare", "cache-lookup", "wait", "prebuild", "pods", "compile", "device", "install", "launch"];
|
|
1152
|
+
declare const BUILD_PHASES: readonly ["prepare", "cleanup", "cache-lookup", "wait", "prebuild", "pods", "compile", "device", "install", "launch"];
|
|
1007
1153
|
type BuildPhase = (typeof BUILD_PHASES)[number];
|
|
1008
1154
|
type ActiveBuildState = "running" | "stale" | "unknown";
|
|
1009
1155
|
/**
|
|
@@ -1021,6 +1167,10 @@ interface BuildWaitingFor {
|
|
|
1021
1167
|
inUse: number;
|
|
1022
1168
|
max: number;
|
|
1023
1169
|
since: string;
|
|
1170
|
+
/** The run's 1-based place in its admission queue; absent from records written before the queue existed. */
|
|
1171
|
+
position?: number;
|
|
1172
|
+
/** What holds it: `build slots`, `booted devices`, `boots in flight`, `memory`, or `its turn`. */
|
|
1173
|
+
resource?: string;
|
|
1024
1174
|
}
|
|
1025
1175
|
interface BuildReport {
|
|
1026
1176
|
platform: BuildPlatform;
|
|
@@ -1213,6 +1363,11 @@ interface BuildPlanPayload {
|
|
|
1213
1363
|
};
|
|
1214
1364
|
/** With ios.remote or android.remote set to auto or a Mac, where the plan assumes the device runs, such as `this machine; auto may use janics-mac-mini`. */
|
|
1215
1365
|
placement?: string;
|
|
1366
|
+
/** Resolved build preference; automatic worker availability and compatibility are checked at run time. */
|
|
1367
|
+
buildPlacement?: {
|
|
1368
|
+
preference: string;
|
|
1369
|
+
reason: string;
|
|
1370
|
+
};
|
|
1216
1371
|
}
|
|
1217
1372
|
/** The read-only `stim macos --plan --json` payload; SwiftPM work and worker availability remain unknown. */
|
|
1218
1373
|
interface MacosBuildPlanPayload {
|
|
@@ -1595,6 +1750,10 @@ interface EnvironmentState {
|
|
|
1595
1750
|
hidden?: true;
|
|
1596
1751
|
/** Where the workspace is, from `workspaceStage`; `stim status --json` always sets it. */
|
|
1597
1752
|
stage?: WorkspaceStage;
|
|
1753
|
+
/** Present while the workspace is in the idle stage: no activity since the daemon stopped it. */
|
|
1754
|
+
idleStage?: IdleStageRecord;
|
|
1755
|
+
/** Present while the workspace is dormant: no Stim command since the daemon deleted its owned devices. */
|
|
1756
|
+
dormantStage?: DormantStageRecord;
|
|
1598
1757
|
/** The step a `warming` workspace's warm is in; absent in every other phase. */
|
|
1599
1758
|
warmStep?: WarmStep;
|
|
1600
1759
|
/**
|
|
@@ -1644,6 +1803,8 @@ interface EnvironmentState {
|
|
|
1644
1803
|
stateDir: string;
|
|
1645
1804
|
installed?: boolean;
|
|
1646
1805
|
};
|
|
1806
|
+
/** The verified canonical Git checkout root, including primary checkouts; null outside Git or when unreadable. This does not imply removable worktree ownership. */
|
|
1807
|
+
checkout?: string | null;
|
|
1647
1808
|
worktree?: WorktreeFacts | null;
|
|
1648
1809
|
remoteDevices?: RemoteDeviceState[];
|
|
1649
1810
|
/** The physical devices this workspace leases, in every slot; absent when it leases none. */
|
|
@@ -1786,6 +1947,7 @@ interface MachineUsageState {
|
|
|
1786
1947
|
/** The payload `stim status --json` prints, and `status --watch --json` prints on each change. */
|
|
1787
1948
|
interface StatusPayload {
|
|
1788
1949
|
maintenance?: MaintenanceStatus;
|
|
1950
|
+
daemon?: DaemonStatus;
|
|
1789
1951
|
archived?: ArchivedWorkspace[];
|
|
1790
1952
|
archivedUsage?: ArchivedUsage;
|
|
1791
1953
|
environments: (EnvironmentState & {
|
|
@@ -1818,7 +1980,7 @@ declare function tryAcquireBuildSlotClaim({ max, details }: {
|
|
|
1818
1980
|
* How busy this machine is for native builds. `loadPerCore` is the 5-minute load average divided by the CPU count,
|
|
1819
1981
|
* rounded to one decimal. `builds` counts this Stim home's runs that hold a live native-run claim and are in
|
|
1820
1982
|
* prebuild, pods or compile here, not on a remote machine, plus the build slots this machine holds for other machines'
|
|
1821
|
-
* offloaded builds. `maxBuilds` is `concurrency.maxBuilds`,
|
|
1983
|
+
* offloaded builds. `maxBuilds` is `concurrency.maxBuilds`, or the derived cap when it is 0.
|
|
1822
1984
|
*/
|
|
1823
1985
|
interface MachineCapacity {
|
|
1824
1986
|
cpus: number;
|
|
@@ -1828,6 +1990,8 @@ interface MachineCapacity {
|
|
|
1828
1990
|
maxLoadPerCore: number;
|
|
1829
1991
|
}
|
|
1830
1992
|
declare function maxLoadPerCore(): number;
|
|
1993
|
+
/** `server.maxOffloadedBuilds`: how many builds from other machines run here at once, 0 when unlimited. */
|
|
1994
|
+
declare function maxOffloadedBuilds(): number;
|
|
1831
1995
|
/** The 5-minute load average per CPU, rounded to one decimal, and the CPU count it divides by. */
|
|
1832
1996
|
declare function loadPerCore(): {
|
|
1833
1997
|
cpus: number;
|
|
@@ -2077,14 +2241,22 @@ interface StimConfig {
|
|
|
2077
2241
|
debug?: {
|
|
2078
2242
|
logs?: unknown;
|
|
2079
2243
|
};
|
|
2244
|
+
daemon?: {
|
|
2245
|
+
mode?: unknown;
|
|
2246
|
+
};
|
|
2080
2247
|
server?: {
|
|
2081
2248
|
buildsPaused?: unknown;
|
|
2082
2249
|
devicesPaused?: unknown;
|
|
2083
2250
|
acceptClientBuilds?: unknown;
|
|
2084
2251
|
lanAddresses?: unknown;
|
|
2085
2252
|
maxLoadPerCore?: unknown;
|
|
2253
|
+
maxOffloadedBuilds?: unknown;
|
|
2086
2254
|
workerRoot?: unknown;
|
|
2087
|
-
|
|
2255
|
+
};
|
|
2256
|
+
share?: {
|
|
2257
|
+
exposure?: unknown;
|
|
2258
|
+
publicUrl?: unknown;
|
|
2259
|
+
port?: unknown;
|
|
2088
2260
|
};
|
|
2089
2261
|
remote?: {
|
|
2090
2262
|
machines?: unknown;
|
|
@@ -2128,6 +2300,24 @@ declare function getProject(projectPath: string): ProjectRecord | null;
|
|
|
2128
2300
|
declare function getConcurrencyLimits({ env }?: {
|
|
2129
2301
|
env?: NodeJS.ProcessEnv;
|
|
2130
2302
|
}): ConcurrencyLimits;
|
|
2303
|
+
/** The derived `concurrency.maxBuilds`: one native build per six cores, at least one. */
|
|
2304
|
+
declare function derivedBuildCap(cores?: number): number;
|
|
2305
|
+
/** The derived `concurrency.maxDevices`: one booted simulator or emulator per 1.5 GB of RAM above 4 GB, at least two. */
|
|
2306
|
+
declare function derivedDeviceCap(totalBytes?: number): number;
|
|
2307
|
+
/**
|
|
2308
|
+
* The build and device caps admission enforces: `concurrency.maxBuilds` and `concurrency.maxDevices` when set above 0,
|
|
2309
|
+
* else the derived caps. `derived` names the caps that were derived.
|
|
2310
|
+
*/
|
|
2311
|
+
declare function admissionLimits({ env, cores, totalBytes }?: {
|
|
2312
|
+
env?: NodeJS.ProcessEnv;
|
|
2313
|
+
cores?: number;
|
|
2314
|
+
totalBytes?: number;
|
|
2315
|
+
}): ConcurrencyLimits & {
|
|
2316
|
+
derived: {
|
|
2317
|
+
builds: boolean;
|
|
2318
|
+
devices: boolean;
|
|
2319
|
+
};
|
|
2320
|
+
};
|
|
2131
2321
|
declare function getPlatformDeviceLimits({ env }?: {
|
|
2132
2322
|
env?: NodeJS.ProcessEnv;
|
|
2133
2323
|
}): PlatformDeviceLimits;
|
|
@@ -2498,7 +2688,6 @@ declare function budgetSweepLock(): string;
|
|
|
2498
2688
|
declare function statsFile(): string;
|
|
2499
2689
|
declare function maintenanceDir(): string;
|
|
2500
2690
|
declare function maintenanceStateFile(): string;
|
|
2501
|
-
declare function maintenanceAttemptFile(): string;
|
|
2502
2691
|
declare function maintenanceNdjsonFile(): string;
|
|
2503
2692
|
declare function gcLogDir(): string;
|
|
2504
2693
|
declare function gcLogFile(): string;
|
|
@@ -2516,11 +2705,17 @@ declare function archiveLock(): string;
|
|
|
2516
2705
|
declare function worktreeArchiveRoot(): string;
|
|
2517
2706
|
/** This machine's own long-term X25519 key as a client of other machines' stim-servers. */
|
|
2518
2707
|
declare function clientIdentityKeyFile(): string;
|
|
2519
|
-
/**
|
|
2520
|
-
* The local Unix socket. sun_path permits 103 UTF-8 bytes on macOS and 107 on Linux. Longer paths use
|
|
2521
|
-
* /tmp/stim-sockets-<uid>/<SHA-256 of the normalized absolute socket path>.sock.
|
|
2522
|
-
*/
|
|
2708
|
+
/** stim-server's Unix socket for this machine's own user. */
|
|
2523
2709
|
declare function serverLocalSocket(): string;
|
|
2710
|
+
/** The home daemon's directory: its claim, log, snapshot and, when the path fits, its socket. */
|
|
2711
|
+
declare function daemonDir(): string;
|
|
2712
|
+
/** The ownership claim the running home daemon holds for its lifetime. */
|
|
2713
|
+
declare function daemonClaimRoot(): string;
|
|
2714
|
+
declare function daemonSocket(): string;
|
|
2715
|
+
/** The daemon's own log, rotated like workspace logs. */
|
|
2716
|
+
declare function daemonNdjsonFile(): string;
|
|
2717
|
+
/** What the daemon's last tick measured and decided, written atomically each tick. */
|
|
2718
|
+
declare function daemonSnapshotFile(): string;
|
|
2524
2719
|
declare function serverSetupDir(): string;
|
|
2525
2720
|
declare function setupJournalFile(hash: string): string | null;
|
|
2526
2721
|
//#endregion
|
|
@@ -2692,16 +2887,21 @@ interface ViewedDevice {
|
|
|
2692
2887
|
platform: "ios" | "android";
|
|
2693
2888
|
/** The simulator UDID or the emulator serial. */
|
|
2694
2889
|
id: string;
|
|
2890
|
+
/** When the server last forwarded input to the device; absent when it only streamed frames. */
|
|
2891
|
+
lastInputAt?: string;
|
|
2695
2892
|
}
|
|
2696
|
-
/**
|
|
2893
|
+
/**
|
|
2894
|
+
* A stim-server's viewer record: the devices it streams frames of or forwarded input to, and the server's process
|
|
2895
|
+
* identity.
|
|
2896
|
+
*/
|
|
2697
2897
|
interface DeviceViewersRecord {
|
|
2698
2898
|
pid: number;
|
|
2699
2899
|
processToken: string;
|
|
2700
2900
|
devices: ViewedDevice[];
|
|
2701
2901
|
}
|
|
2702
2902
|
/**
|
|
2703
|
-
* The devices a running stim-server streams frames of. A record whose server is not proven to
|
|
2704
|
-
* process counts for nothing.
|
|
2903
|
+
* The devices a running stim-server streams frames of or forwarded input to. A record whose server is not proven to
|
|
2904
|
+
* be the same live process counts for nothing.
|
|
2705
2905
|
*/
|
|
2706
2906
|
declare function readViewedDevices(dir?: string): ViewedDevice[];
|
|
2707
2907
|
//#endregion
|
|
@@ -2714,8 +2914,10 @@ interface StatsBucket {
|
|
|
2714
2914
|
misses: number;
|
|
2715
2915
|
coldRuns: number;
|
|
2716
2916
|
coldRunMs: number;
|
|
2917
|
+
coldCleanupMs?: number;
|
|
2717
2918
|
hitRuns: number;
|
|
2718
2919
|
hitRunMs: number;
|
|
2920
|
+
hitCleanupMs?: number;
|
|
2719
2921
|
timeSavedMs: number;
|
|
2720
2922
|
firstRunAt: string;
|
|
2721
2923
|
lastRunAt: string;
|
|
@@ -2723,6 +2925,7 @@ interface StatsBucket {
|
|
|
2723
2925
|
lastPodsMs?: number;
|
|
2724
2926
|
offloadedRuns?: number;
|
|
2725
2927
|
offloadedRunMs?: number;
|
|
2928
|
+
offloadedCleanupMs?: number;
|
|
2726
2929
|
lastOffloadHost?: string;
|
|
2727
2930
|
}
|
|
2728
2931
|
type StatsScope = Partial<Record<StatsPlatform, StatsBucket>>;
|
|
@@ -3149,4 +3352,4 @@ declare class KeyedEntities<T> {
|
|
|
3149
3352
|
/** Applies `delta` to `entities` keyed by `key`, keeping the order of `entities` and appending new keys. */
|
|
3150
3353
|
declare function applyKeyedDelta<T>(entities: readonly T[], delta: KeyedDelta<T>, key: (entity: T) => string): T[];
|
|
3151
3354
|
//#endregion
|
|
3152
|
-
export { hostedMetroLinks as $, machineCapacity as $a, parseHostedAndroidPlacement as $c, getPlatformDeviceLimits as $i, HostedLocalPlatformCounts as $l, easSessionLedgerFile as $n, NATIVE_BUILD_STEPS as $o, fileSizes as $r, coerceSettingText as $s, readPullRequestCache as $t, validHostedAppArguments as $u, BuildLedgerPlatform as A, DEFAULT_SERVER_PORT as Aa, MaintenancePass as Ac, readStateFile as Ai, readDeviceIdleShutdowns as Al, prefersRemote as An, BuildResult as Ao, workspaceLightenedFile as Ar, WorktreeGit as As, trimCapacityWaits as At, HostedMacosDevice as Au, HOSTED_LOGS_FIRST_BYTES as B, findPeer as Ba, HostedIosPlacement as Bc, trace as Bi, HOSTED_PARKED_CANDIDATES as Bl, buildMachinesFile as Bn, EnvironmentState as Bo, LogDirQuery as Br, SETTING_GROUPS as Bs, StatusCacheEntry as Bt, HOSTED_APP_CHUNK_BYTES as Bu, BuildLedgerBoot as C, SupervisorRecord as Ca, readArchives as Cc, parseNdjsonText as Cd, EasSessionLedgerRead as Ci, buildDiagnostics as Cl, recordingDeviceName as Cn, BuildMissChange as Co, trashRoot as Cr, WORKSPACE_STAGE_KINDS as Cs, offloadSummary as Ct, HostedAgentAccess as Cu, BuildLedgerFailure as D, MachineCredential as Da, MaintenanceActionKind as Dc, isJsonObject as Di, readBuildHistory as Dl, PlacementWord as Dn, BuildPlanPayload as Do, workspaceEndedAgentsFile as Dr, WorkspacePhase as Ds, readStatsReport as Dt, HostedAgentLease as Du, BuildLedgerDevice as E, MACHINE_CREDENTIALS_VERSION as Ea, MaintenanceAction as Ec, validEasSessionClaim as Ei, parseMissReason as El, PLACEMENT_WORDS as En, BuildPlacement as Eo, workspaceDerivedData as Er, WebPageState as Es, readStats as Et, HostedAgentIssuedGrant as Eu, GcLogRecord as F, TailnetPeer as Fa, MaintenanceStatus as Fc, Trace as Fi, readWorkspaceAgent as Fl, budgetSweepFile as Fn, DeviceLeaseState as Fo, workspaceStateFile as Fr, IOS_SIMULATOR_APPS as Fs, readViewedDevices as Ft, parseHostedAgentAccess as Fu, hostedNativeLogsDir as G, sameTailnet as Ga, parseHostedIosPlacement as Gc, debugLoggingEnabled as Gi, HostedDeviceOfferRequest as Gl, createdDevicesLock as Gn, MACHINE_OWNER_KINDS as Go, NATIVE_CRASH_LOG_PREFIX as Gr, SettingType as Gs, gitMergeCacheFile as Gt, hostedAppArea as Gu, HostedLogsCursor as H, machineEndpoint as Ha, hostedIosPlacements as Hc, DebugLog as Hi, HostedAndroidDevice as Hl, clientIdentityKeyFile as Hn, GitChipPart as Ho, ERROR_SOURCES as Hr, SettingDefinition as Hs, diskUsageCacheFile as Ht, HostedAppFile as Hu, GcLogStatus as I, WrongTailnet as Ia, MemoryCulprit as Ic, TraceArgs as Ii, readWorkspaceState as Il, budgetSweepLock as In, DevicePlacement as Io, workspaceStateLock as Ir, REMOTE_DEVICE_BACKENDS as Is, stimBuildDigest as It, parseHostedAgentGrant as Iu, readLogsSince as J, MachineCapacity as Ja, HostedAndroidStatus as Jc, buildWorkerRoot as Ji, HostedDeviceRequest as Jl, deviceHostMachinesLock as Jn, MachineOwnerKind as Jo, attachExpoErrorContext as Jr, TUNNEL_MODES as Js, readAgentSessionsCache as Jt, parseHostedAppManifest as Ju, parseHostedLogsCursor as K, tailscaleEnv as Ka, unreadableHostedIos as Kc, ParkedMax as Ki, HostedDevicePhase as Kl, deviceHostMachinesClaims as Kn, MEMORY_SOURCES as Ko, QueryCriteria as Kr, SettingWriteResult as Ks, listStatusCacheEntries as Kt, hostedAppAttempt as Ku, GcLogTrigger as L, cannotHost as La, parseMaintenanceState as Lc, TracePhases as Li, workspaceLastUsed as Ll, buildLedgerDir as Ln, DiskMeasure as Lo, worktreeArchiveRoot as Lr, REPLACED_SETTINGS as Ls, AgentSessionsCache as Lt, parseHostedMacosChoice as Lu, isBuildLedgerRecord as M, MachineTransport as Ma, MaintenanceRecord as Mc, readHomeIdentity as Mi, readIdleStop as Ml, archiveDir as Mn, ChecksState as Mo, workspaceLogsDir as Mr, ANDROID_COMPILER_CACHE_CHOICES as Ms, wholePhases as Mt, hostedAgentDriverName as Mu, readBuildLedger as N, TAILNET_MACHINE_PATTERN as Na, MaintenanceSize as Nc, EndSpan as Ni, readLastBuilds as Nl, archiveLock as Nn, DeviceActivity as No, workspaceMetadataFile as Nr, ANDROID_EMULATOR_APPS as Ns, DeviceViewersRecord as Nt, hostedMacosAppSlot as Nu, BuildLedgerOutcome as O, parseMachineCredential as Oa, MaintenanceCheck as Oc, readJsonFile as Oi, readDevServerStop as Ol, mayRunHere as On, BuildPlatform as Oo, workspaceEndedAgentsLock as Or, WorkspaceStage as Os, statsProjectKey as Ot, HostedAppLaunch as Ou, GcLogOptions as P, TailnetIdentity as Pa, MaintenanceState as Pc, TRACE_ENV as Pi, readWarmRecord as Pl, archiveRoot as Pn, DeviceAppProcess as Po, workspaceRecordingsDir as Pr, ANDROID_PCH_CHOICES as Ps, ViewedDevice as Pt, hostedMacosBundleId as Pu, HostedMetroRequest as Q, loadState as Qa, hostedAndroidStatus as Qc, getParkedMax as Qi, HostedIosDevice as Ql, easMachineStateRoot as Qn, MetroBundleState as Qo, fileIdentity as Qr, acceptsShape as Qs, readEndedAgentSessions as Qt, rememberHostedAppBlobRename as Qu, isGcLogRecord as R, currentTailnet as Ra, readMaintenanceAttempt as Rc, redactArgv as Ri, DEVICE_HOST_LIMITS as Rl, buildLedgerFile as Rn, EndedAgentSession as Ro, createNdjsonTail as Rr, RemoteDeviceBackend as Rs, ENDED_AGENT_RETENTION_MS as Rt, parseHostedMacosDevice as Ru, BUILD_LEDGER_CAP as S, StimConfig as Sa, readArchiveState as Sc, parseNdjsonLine as Sd, EasSessionClaim as Si, WorkspaceState as Sl, recordedBytes as Sn, BuildMissCategory as So, supervisorPidFile as Sr, WORKSPACE_PHASES as Ss, findProjectRoot as St, HOSTED_MACOS_APP_SLOTS as Su, BuildLedgerCacheResult as T, BuildMachineCredential as Ta, DiskPressureLevel as Tc, readEasSessionLedger as Ti, lastUseFrom as Tl, AutomaticPlacement as Tn, BuildPhase as To, workspaceBuildDetailFile as Tr, WebBrowserState as Ts, readRunEstimates as Tt, HostedAgentGrant as Tu, HostedLogsPage as U, parseMachine as Ua, hostedIosRecords as Uc, createDebugLog as Ui, HostedDevice as Ul, configLockPath as Un, LastBuildReport as Uo, LogQueryOptions as Ur, SettingEntry as Us, diskUsageFailureFile as Ut, HostedAppOffer as Uu, HOSTED_LOGS_PAGE_BYTES as V, localEndpoint as Va, HostedIosStatus as Vc, DEBUG_ENV as Vi, HostedAndroidChoice as Vl, buildMachinesLock as Vn, GitChip as Vo, openLogDir as Vr, SETTING_SCOPES as Vs, agentSessionOf as Vt, HostedAppDelivery as Vu, hostedMacosLogsDir as W, parseTailnetIdentity as Wa, hostedIosStatus as Wc, debugLogDir as Wi, HostedDeviceOffer as Wl, createdDevicesFile as Wn, LoadState as Wo, LogQueryPlan as Wr, SettingScope as Ws, endedAgentSessionOf as Wt, HostedAppRecord as Wu, HOSTED_METRO_REQUESTS_KEY as X, buildSlotsDir as Xa, hostedAndroidPlacements as Xc, findEnclosingWorktreeRoot as Xi, HostedDeviceSession as Xl, diskUsageCacheDir as Xn, MacosBuildPlanPayload as Xo, bundleMarkerPlatform as Xr, WEB_VIEWPORTS as Xs, readDiskUsage as Xt, readHostedApp as Xu, HOSTED_METRO_LINKS_KEY as Y, buildSlotPath as Ya, hostedAndroidDeviceName as Yc, configCorruptRepair as Yi, HostedDeviceSelectors as Yl, deviceViewersDir as Yn, MachineUsageState as Yo, buildCriteria as Yr, TunnelMode as Ys, readBuildDetail as Yt, parseHostedAppOffer as Yu, HostedMetroLinks as Z, loadPerCore as Za, hostedAndroidRecords as Zc, getConcurrencyLimits as Zi, HostedIosChoice as Zl, diskUsageWalkClaims as Zn, MemorySource as Zo, compileGrep as Zr, WebViewport as Zs, readDiskUsageFailure as Zt, readHostedAppMetadata as Zu, isSetupJournalPrunable as _, PlatformDeviceLimits as _a, archiveEnabled as _c, createAsyncAgentActionReader as _d, fingerprintMemoLock as _i, MetroLastStop as _l, listRecordedDevices as _n, BuildCacheHit as _o, sharedCompilationCache as _r, StatusIssueCode as _s, StatsPlacement as _t, parseHostedRequest as _u, MachineView as a, windowsShortDir as aa, settingValueError as ac, SwiftpmCacheUsage as ad, planLogQuery as ai, BUILD_HISTORY_KEY as al, RUN_ID_ENV as an, APP_PROCESS_STATES as ao, gitMergeCacheDir as ar, RemoteDeviceState as as, CAPACITY_REFUSAL_MAX_AGE_MS as at, hostedDeviceId as au, agentDeviceStateDirs as b, RepoRecord as ba, readArchive as bc, SOURCES as bd, CreatedDevicePlatform as bi, WORKSPACE_AGENT_KEY as bl, listSegmentsAsync as bn, BuildDiagnostic as bo, statsFile as br, TUTORIAL_VERSION as bs, StatsScope as bt, readHostedSessions as bu, SummaryBuild as c, withConfigLockAsync as ca, MacosBuild as cc, AgentDeviceUsage as cd, readLogRecords as ci, DEVICE_RECLAIM_REASON as cl, RECORDING_CAP_BYTES as cn, ActivityRecencyBasis as co, maintenanceDir as cr, SimulatorState as cs, PLACEMENT_DECISIONS as ct, hostedWorkerSettleMs as cu, WorktreeRow as d, requireAutomaticMachine as da, parseMacosRecord as dc, readAgentDeviceUsage as dd, sortByTs as di, DevServerStopRequest as dl, RecordedDevice as dn, AndroidDeviceState as do, maintenanceStateFile as dr, StatusBuildSlots as ds, RunHistory as dt, parseHostedDevice as du, getProject as ea, expectedShape as ec, validHostedAppBlob as ed, followLogs as ei, unreadableHostedAndroid as el, withDerivedFacts as en, maxLoadPerCore as eo, easSessionLedgerLock as er, NativeBuildStep as es, hostedMetroRequests as et, HostedNativeOffer as eu, statusViews as f, validateAutomaticPool as fa, readHostedMacosApp as fc, readAgentDeviceUsageCache as fd, tailRead as fi, DeviceIdleShutdownRecord as fl, RecordedSegment as fn, AndroidRuntimeFacts as fo, pullRequestCacheDir as fr, StatusCapacity as fs, RunSample as ft, parseHostedLocalDeviceCount as fu, isJournalExpired as g, DoctorRunRecord as ga, ArchivedWorkspace as gc, createAgentActionReader as gd, fingerprintMemoFile as gi, MAINTENANCE_LOG_NAME as gl, footageDrops as gn, BuildActivity as go, sharedCcache as gr, StatusIssue as gs, StatsCapacityWait as gt, parseHostedPlatformDevice as gu, SetupJournal as h, DeviceRecord as ha, ArchivedUsage as hc, AgentTarget as hd, fingerprintMemoDir as hi, LAST_BUILD_KEYS as hl, closedSegmentName as hn, BUILD_RESULTS as ho, setupJournalFile as hr, StatusDeviceSlots as hs, StatsCapacityRefusal as ht, parseHostedOfferRequest as hu, ArchivedSummary as i, loadConfig as ia, settingDefinition as ic, readMachineCacheUsage as id, parseSince as ii, unreadableHostedNative as il, settingsJsonSchema as in, AGENT_TOOLS as io, getConfigPath as ir, PlannedPhase as is, CAPACITY_REFUSAL_LIMIT as it, hostedConsolePort as iu, BuildLedgerRecord as j, Endpoint as ja, MaintenancePressure as jc, withStateReadCache as ji, readDevicePlacement as jl, agentSessionsCacheFile as jn, BuildWaitingFor as jo, workspaceLogErrorIndex as jr, WorktreePullRequest as js, trimSamples as jt, HostedMacosPlacement as ju, BuildLedgerPlacement as k, readBuildMachines as ka, MaintenanceMode as kc, readJsonObject as ki, readDevServerStopRequest as kl, placementWord as kn, BuildReport as ko, workspaceGradleBuild as kr, WorktreeFacts as ks, trimCapacityRefusals as kt, HostedMacosChoice as ku, SummaryHistoryEntry as l, AutomaticPoolRole as la, MacosProcess as lc, AgentDeviceUsageRoots as ld, readLogTimeline as li, DEV_SERVER_STOP_REQUEST_KEY as ll, RECORDING_FOOTAGE_MS as ln, AgentSession as lo, maintenanceNdjsonFile as lr, StatsPlatform as ls, ReadStatsResult as lt, parseHostedAndroidDevice as lu, SetupCapability as m, Config as ma, ArchivedBytes as mc, AgentRecordSelection as md, FingerprintMemoRecord as mi, IdleStopRecord as ml, capDrops as mn, BUILD_PHASES as mo, serverSetupDir as mr, StatusDeviceSlotHolder as ms, StatsBucket as mt, parseHostedNativeOffer as mu, KeyedEntities as n, getRepoSettings as na, isSensitiveReference as nc, SimRuntimeUsage as nd, logFiles as ni, hostedNativeRecords as nl, SETTINGS_SCHEMA_FILE as nn, tryAcquireBuildSlotClaim as no, gcLogDir as nr, PhysicalDeviceConnection as ns, readDeviceHostMachines as nt, deviceHostArea as nu, SUMMARY_ARCHIVES as o, windowsShortDirKey as oa, MacosAppRecord as oc, readSwiftpmCacheUsage as od, queryJsonLogs as oi, BUILD_HISTORY_LIMIT as ol, runId as on, ActiveBuildState as oo, maintenanceAttemptFile as or, RunOutcomeKind as os, HISTORY_LIMIT as ot, hostedIdleStopHours as ou, workspaceSummary as p, ConcurrencyLimits as pa, readMacosRecord as pc, AgentActionReaderOptions as pd, FINGERPRINT_MEMO_SCHEMA as pi, IDLE_STOP_KEY as pl, RecordingPlatform as pn, AppPresence as po, serverLocalSocket as pr, StatusCapacityLoad as ps, STATS_VERSION as pt, parseHostedLocalPlatformCounts as pu, readHostedNativeLogsCheckpoint as q, wrongTailnet as qa, HostedAndroidPlacement as qc, allMetroPorts as qi, HostedDevicePlatform as ql, deviceHostMachinesFile as qn, MachineOwner as qo, advanceTail as qr, SettingsPayload as qs, pullRequestCacheFile as qt, hostedAppBlobs as qu, applyKeyedDelta as r, isPathPrefix as ra, replacementAdvice as rc, machineCacheUsageFile as rd, markerWindow as ri, parseHostedNativePlacement as rl, SETTINGS_SCHEMA_URL as rn, ACTIVITY_RECENCY_BASES as ro, gcLogFile as rr, PhysicalDeviceState as rs, BuildMachineTotals as rt, deviceHostRoot as ru, StatusViews as s, withConfigLock as sa, MacosAppState as sc, swiftpmCacheUsageFile as sd, queryLogs as si, DEVICE_IDLE_SHUTDOWN_KEY as sl, validRunId as sn, ActivityDriver as so, maintenanceChildLogFile as sr, STATUS_ISSUE_CODES as ss, OffloadSummary as st, hostedMemoryRefusal as su, KeyedDelta as t, getProjectSettings as ta, isLayeredSetting as tc, MachineCacheUsage as td, isExpoErrorContext as ti, HostedNativePlacement as tl, withGitChip as tn, saturation as to, emulatorLogFile as tr, PHYSICAL_DEVICE_CONNECTIONS as ts, DeviceHostMachineCredential as tt, assertHostedDeviceLedger as tu, WorkspaceSummary as u, automaticMachineEnabled as ua, macosAppState as uc, agentDeviceUsageFile as ud, recordMatches as ui, DevServerStopRecord as ul, RECORDING_PLATFORMS as un, AgentTool as uo, maintenanceRunClaims as ur, StatusBuildSlotHolder as us, RunEstimates as ut, parseHostedChoice as uu, parseSetupJournal as v, PlatformRecords as va, archivedUsage as vc, LEVELS as vd, readFingerprintMemo as vi, READY_PHASE_MS as vl, listRecordedDevicesAsync as vn, BuildCause as vo, sharedGradle as vr, StatusPayload as vs, StatsRecord as vt, readHostedDevice as vu, BuildLedgerCache as w, clientIdentity as wa, readArchivesAsync as wc, readNdjsonGenerations as wd, readCreatedDevices as wi, lastNativeUseFrom as wl, recordingEnabled as wn, BuildMissReason as wo, workspaceAgentDeviceDir as wr, WarmStep as ws, projectRootDirectories as wt, HostedAgentDriverName as wu, agentDeviceStateDirsAsync as x, SettingsObject as xa, readArchiveAsync as xc, levelRank as xd, CreatedDevices as xi, WarmRecord as xl, openSegmentName as xn, BuildHistoryEntry as xo, supervisorLogFile as xr, WEB_PAGE_STATES as xs, decodeStats as xt, HOSTED_AGENT_DRIVERS as xu, readSetupJournal as y, ProjectRecord as ya, linkReplacedArchives as yc, NdjsonRecord as yd, countErrorEntries as yi, WARM_KEY as yl, listSegments as yn, BuildDetail as yo, sharedPods as yr, StatusPlatformDeviceSlots as ys, StatsReport as yt, readHostedDeviceLedger as yu, readGcLog as z, endpoint as za, readMaintenanceState as zc, redactCommandLine as zi, DeviceHostLimits as zl, buildLedgerLock as zn, EnvironmentDisk as zo, LogDir as zr, SETTINGS as zs, PullRequestCacheEntry as zt, parseHostedMacosPlacement as zu };
|
|
3355
|
+
export { hostedMetroLinks as $, tailscaleEnv as $a, MaintenanceSize as $c, buildWorkerRoot as $i, readDevServerStop as $l, deviceHostMachinesLock as $n, MACHINE_OWNER_KINDS as $o, buildCriteria as $r, SettingEntry as $s, readPullRequestCache as $t, HostedAgentGrant as $u, BuildLedgerPlatform as A, SupervisorRecord as Aa, readArchive as Ac, SimRuntimeUsage as Ad, validEasSessionClaim as Ai, DORMANT_STAGE_KEY as Al, prefersRemote as An, BuildMissCategory as Ao, workspaceDerivedData as Ar, WORKSPACE_PHASES as As, trimCapacityWaits as At, deviceHostArea as Au, HOSTED_LOGS_FIRST_BYTES as B, TAILNET_MACHINE_PATTERN as Ba, DaemonStatus as Bc, readAgentDeviceUsageCache as Bd, TraceArgs as Bi, LAST_BUILD_KEYS as Bl, buildMachinesFile as Bn, ChecksState as Bo, workspaceStateLock as Br, ANDROID_COMPILER_CACHE_CHOICES as Bs, StatusCacheEntry as Bt, parseHostedLocalDeviceCount as Bu, BuildLedgerBoot as C, DoctorRunRecord as Ca, readMacosRecord as Cc, parseHostedAppOffer as Cd, countErrorEntries as Ci, unreadableHostedNative as Cl, recordingDeviceName as Cn, BUILD_RESULTS as Co, sharedPods as Cr, StatusDeviceSlots as Cs, offloadSummary as Ct, HostedDeviceSelectors as Cu, BuildLedgerFailure as D, RepoRecord as Da, archiveEnabled as Dc, validHostedAppArguments as Dd, EasSessionLedgerRead as Di, DEVICE_METRO_IDLE_STOP_REASON as Dl, PlacementWord as Dn, BuildDetail as Do, trashRoot as Dr, StatusPlatformDeviceSlots as Ds, readStatsReport as Dt, HostedLocalPlatformCounts as Du, BuildLedgerDevice as E, ProjectRecord as Ea, ArchivedWorkspace as Ec, rememberHostedAppBlobRename as Ed, EasSessionClaim as Ei, DEVICE_IDLE_SHUTDOWN_KEY as El, PLACEMENT_WORDS as En, BuildCause as Eo, supervisorPidFile as Er, StatusPayload as Es, readStats as Et, HostedIosDevice as Eu, GcLogRecord as F, parseMachineCredential as Fa, DaemonLadderAction as Fc, swiftpmCacheUsageFile as Fd, withStateReadCache as Fi, IDLE_STAGE_KEY as Fl, budgetSweepFile as Fn, BuildPlanPayload as Fo, workspaceLogErrorIndex as Fr, WorkspacePhase as Fs, readViewedDevices as Ft, hostedMemoryRefusal as Fu, hostedNativeLogsDir as G, currentTailnet as Ga, DiskPressureLevel as Gc, createAsyncAgentActionReader as Gd, DEBUG_ENV as Gi, WORKSPACE_AGENT_KEY as Gl, createdDevicesLock as Gn, DiskMeasure as Go, openLogDir as Gr, REPLACED_SETTINGS as Gs, gitMergeCacheFile as Gt, parseHostedRequest as Gu, HostedLogsCursor as H, TailnetPeer as Ha, DaemonWorkspaceDecision as Hc, AgentRecordSelection as Hd, redactArgv as Hi, MetroLastStop as Hl, clientIdentityKeyFile as Hn, DeviceAppProcess as Ho, createNdjsonTail as Hr, ANDROID_PCH_CHOICES as Hs, diskUsageCacheFile as Ht, parseHostedNativeOffer as Hu, GcLogStatus as I, readBuildMachines as Ia, DaemonMeasurement as Ic, AgentDeviceUsage as Id, readHomeIdentity as Ii, IDLE_STOP_KEY as Il, budgetSweepLock as In, BuildPlatform as Io, workspaceLogsDir as Ir, WorkspaceStage as Is, stimBuildDigest as It, hostedWorkerSettleMs as Iu, readLogsSince as J, localEndpoint as Ja, MaintenanceCheck as Jc, SOURCES as Jd, debugLogDir as Ji, buildDiagnostics as Jl, daemonNdjsonFile as Jn, EnvironmentState as Jo, LogQueryPlan as Jr, SETTING_GROUPS as Js, readAgentSessionsCache as Jt, readHostedSessions as Ju, parseHostedLogsCursor as K, endpoint as Ka, MaintenanceAction as Kc, LEVELS as Kd, DebugLog as Ki, WarmRecord as Kl, daemonClaimRoot as Kn, EndedAgentSession as Ko, ERROR_SOURCES as Kr, RemoteDeviceBackend as Ks, listStatusCacheEntries as Kt, readHostedDevice as Ku, GcLogTrigger as L, DEFAULT_SERVER_PORT as La, DaemonMode as Lc, AgentDeviceUsageRoots as Ld, EndSpan as Li, INTERACTIONS_KEY as Ll, buildLedgerDir as Ln, BuildReport as Lo, workspaceMetadataFile as Lr, WorktreeFacts as Ls, AgentSessionsCache as Lt, parseHostedAndroidDevice as Lu, isBuildLedgerRecord as M, BuildMachineCredential as Ma, readArchiveState as Mc, readMachineCacheUsage as Md, readJsonFile as Mi, DevServerStopRequest as Ml, archiveDir as Mn, BuildMissReason as Mo, workspaceEndedAgentsLock as Mr, WarmStep as Ms, wholePhases as Mt, hostedConsolePort as Mu, readBuildLedger as N, MACHINE_CREDENTIALS_VERSION as Na, readArchives as Nc, SwiftpmCacheUsage as Nd, readJsonObject as Ni, DeviceIdleShutdownRecord as Nl, archiveLock as Nn, BuildPhase as No, workspaceGradleBuild as Nr, WebBrowserState as Ns, DeviceViewersRecord as Nt, hostedDeviceId as Nu, BuildLedgerOutcome as O, SettingsObject as Oa, archivedUsage as Oc, validHostedAppBlob as Od, readCreatedDevices as Oi, DEVICE_RECLAIM_REASON as Ol, mayRunHere as On, BuildDiagnostic as Oo, workspaceAgentDeviceDir as Or, TUTORIAL_VERSION as Os, statsProjectKey as Ot, HostedNativeOffer as Ou, GcLogOptions as P, MachineCredential as Pa, readArchivesAsync as Pc, readSwiftpmCacheUsage as Pd, readStateFile as Pi, DormantStageRecord as Pl, archiveRoot as Pn, BuildPlacement as Po, workspaceLightenedFile as Pr, WebPageState as Ps, ViewedDevice as Pt, hostedIdleStopHours as Pu, HostedMetroRequest as Q, sameTailnet as Qa, MaintenanceRecord as Qc, readNdjsonGenerations as Qd, allMetroPorts as Qi, readBuildHistory as Ql, deviceHostMachinesFile as Qn, LoadState as Qo, attachExpoErrorContext as Qr, SettingDefinition as Qs, readEndedAgentSessions as Qt, HostedAgentDriverName as Qu, isGcLogRecord as R, Endpoint as Ra, DaemonPressure as Rc, agentDeviceUsageFile as Rd, TRACE_ENV as Ri, IdleStageRecord as Rl, buildLedgerFile as Rn, BuildResult as Ro, workspaceRecordingsDir as Rr, WorktreeGit as Rs, ENDED_AGENT_RETENTION_MS as Rt, parseHostedChoice as Ru, BUILD_LEDGER_CAP as S, DeviceRecord as Sa, readHostedMacosApp as Sc, parseHostedAppManifest as Sd, readFingerprintMemo as Si, parseHostedNativePlacement as Sl, recordedBytes as Sn, BUILD_PHASES as So, sharedGradle as Sr, StatusDeviceSlotHolder as Ss, findProjectRoot as St, HostedDeviceRequest as Su, BuildLedgerCacheResult as T, PlatformRecords as Ta, ArchivedUsage as Tc, readHostedAppMetadata as Td, CreatedDevices as Ti, BUILD_HISTORY_LIMIT as Tl, AutomaticPlacement as Tn, BuildCacheHit as To, supervisorLogFile as Tr, StatusIssueCode as Ts, readRunEstimates as Tt, HostedIosChoice as Tu, HostedLogsPage as U, WrongTailnet as Ua, PressureLevel as Uc, AgentTarget as Ud, redactCommandLine as Ui, READY_PHASE_MS as Ul, configLockPath as Un, DeviceLeaseState as Uo, LogDir as Ur, IOS_SIMULATOR_APPS as Us, diskUsageFailureFile as Ut, parseHostedOfferRequest as Uu, HOSTED_LOGS_PAGE_BYTES as V, TailnetIdentity as Va, DaemonWaiter as Vc, AgentActionReaderOptions as Vd, TracePhases as Vi, MAINTENANCE_LOG_NAME as Vl, buildMachinesLock as Vn, DeviceActivity as Vo, worktreeArchiveRoot as Vr, ANDROID_EMULATOR_APPS as Vs, agentSessionOf as Vt, parseHostedLocalPlatformCounts as Vu, hostedMacosLogsDir as W, cannotHost as Wa, readDaemonSnapshot as Wc, createAgentActionReader as Wd, trace as Wi, WARM_KEY as Wl, createdDevicesFile as Wn, DevicePlacement as Wo, LogDirQuery as Wr, REMOTE_DEVICE_BACKENDS as Ws, endedAgentSessionOf as Wt, parseHostedPlatformDevice as Wu, HOSTED_METRO_REQUESTS_KEY as X, parseMachine as Xa, MaintenancePass as Xc, parseNdjsonLine as Xd, ParkedMax as Xi, lastUseFrom as Xl, daemonSocket as Xn, GitChipPart as Xo, QueryCriteria as Xr, SHARE_DEFAULT_PORT as Xs, readDiskUsage as Xt, HOSTED_MACOS_APP_SLOTS as Xu, HOSTED_METRO_LINKS_KEY as Y, machineEndpoint as Ya, MaintenanceMode as Yc, levelRank as Yd, debugLoggingEnabled as Yi, lastNativeUseFrom as Yl, daemonSnapshotFile as Yn, GitChip as Yo, NATIVE_CRASH_LOG_PREFIX as Yr, SETTING_SCOPES as Ys, readBuildDetail as Yt, HOSTED_AGENT_DRIVERS as Yu, HostedMetroLinks as Z, parseTailnetIdentity as Za, MaintenancePressure as Zc, parseNdjsonText as Zd, admissionLimits as Zi, parseMissReason as Zl, deviceHostMachinesClaims as Zn, LastBuildReport as Zo, advanceTail as Zr, SHARE_EXPOSURES as Zs, readDiskUsageFailure as Zt, HostedAgentAccess as Zu, isSetupJournalPrunable as _, automaticMachineEnabled as _a, MacosAppState as _c, HostedAppOffer as _d, FINGERPRINT_MEMO_SCHEMA as _i, hostedAndroidStatus as _l, listRecordedDevices as _n, AgentSession as _o, serverLocalSocket as _r, StatsPlatform as _s, StatsPlacement as _t, HostedDevice as _u, MachineView as a, getParkedMax as aa, TunnelMode as ac, HostedMacosPlacement as ad, isExpoErrorContext as ai, HostedIosPlacement as al, RUN_ID_ENV as an, loadState as ao, easSessionLedgerLock as ar, MemorySource as as, CAPACITY_REFUSAL_MAX_AGE_MS as at, readIdleStop as au, agentDeviceStateDirs as b, ConcurrencyLimits as ba, macosAppState as bc, hostedAppAttempt as bd, fingerprintMemoFile as bi, HostedNativePlacement as bl, listSegmentsAsync as bn, AndroidRuntimeFacts as bo, sharedCcache as br, StatusCapacity as bs, StatsScope as bt, HostedDevicePhase as bu, SummaryBuild as c, getProjectSettings as ca, acceptsShape as cc, hostedMacosBundleId as cd, parseSince as ci, hostedIosRecords as cl, RECORDING_CAP_BYTES as cn, maxOffloadedBuilds as co, gcLogFile as cr, NativeBuildStep as cs, PLACEMENT_DECISIONS as ct, readWarmRecord as cu, WorktreeRow as d, loadConfig as da, isLayeredSetting as dc, parseHostedMacosChoice as dd, queryLogs as di, unreadableHostedIos as dl, RecordedDevice as dn, ACTIVITY_RECENCY_BASES as do, maintenanceChildLogFile as dr, PhysicalDeviceState as ds, RunHistory as dt, workspaceLastUsed as du, configCorruptRepair as ea, SettingScope as ec, HostedAgentIssuedGrant as ed, bundleMarkerPlatform as ei, MaintenanceState as el, withDerivedFacts as en, wrongTailnet as eo, deviceViewersDir as er, MEMORY_SOURCES as es, hostedMetroRequests as et, readDevServerStopRequest as eu, statusViews as f, windowsShortDir as fa, isSensitiveReference as fc, parseHostedMacosDevice as fd, readLogRecords as fi, HostedAndroidPlacement as fl, RecordedSegment as fn, AGENT_TOOLS as fo, maintenanceDir as fr, PlannedPhase as fs, RunSample as ft, DEVICE_HOST_LIMITS as fu, isJournalExpired as g, AutomaticPoolRole as ga, MacosAppRecord as gc, HostedAppFile as gd, tailRead as gi, hostedAndroidRecords as gl, footageDrops as gn, ActivityRecencyBasis as go, pullRequestCacheDir as gr, SimulatorState as gs, StatsCapacityWait as gt, HostedAndroidDevice as gu, SetupJournal as h, withConfigLockAsync as ha, settingValueError as hc, HostedAppDelivery as hd, sortByTs as hi, hostedAndroidPlacements as hl, closedSegmentName as hn, ActivityDriver as ho, maintenanceStateFile as hr, STATUS_ISSUE_CODES as hs, StatsCapacityRefusal as ht, HostedAndroidChoice as hu, ArchivedSummary as i, getConcurrencyLimits as ia, TUNNEL_MODES as ic, HostedMacosDevice as id, followLogs as ii, readMaintenanceState as il, settingsJsonSchema as in, loadPerCore as io, easSessionLedgerFile as ir, MacosBuildPlanPayload as is, CAPACITY_REFUSAL_LIMIT as it, readIdleStage as iu, BuildLedgerRecord as j, clientIdentity as ja, readArchiveAsync as jc, machineCacheUsageFile as jd, isJsonObject as ji, DevServerStopRecord as jl, agentSessionsCacheFile as jn, BuildMissChange as jo, workspaceEndedAgentsFile as jr, WORKSPACE_STAGE_KINDS as js, trimSamples as jt, deviceHostRoot as ju, BuildLedgerPlacement as k, StimConfig as ka, linkReplacedArchives as kc, MachineCacheUsage as kd, readEasSessionLedger as ki, DEV_SERVER_STOP_REQUEST_KEY as kl, placementWord as kn, BuildHistoryEntry as ko, workspaceBuildDetailFile as kr, WEB_PAGE_STATES as ks, trimCapacityRefusals as kt, assertHostedDeviceLedger as ku, SummaryHistoryEntry as l, getRepoSettings as la, coerceSettingText as lc, parseHostedAgentAccess as ld, planLogQuery as li, hostedIosStatus as ll, RECORDING_FOOTAGE_MS as ln, saturation as lo, getConfigPath as lr, PHYSICAL_DEVICE_CONNECTIONS as ls, ReadStatsResult as lt, readWorkspaceAgent as lu, SetupCapability as m, withConfigLock as ma, settingDefinition as mc, HOSTED_APP_CHUNK_BYTES as md, recordMatches as mi, hostedAndroidDeviceName as ml, capDrops as mn, ActiveBuildState as mo, maintenanceRunClaims as mr, RunOutcomeKind as ms, StatsBucket as mt, HOSTED_PARKED_CANDIDATES as mu, KeyedEntities as n, derivedDeviceCap as na, SettingWriteResult as nc, HostedAppLaunch as nd, fileIdentity as ni, MemoryCulprit as nl, SETTINGS_SCHEMA_FILE as nn, buildSlotPath as no, diskUsageWalkClaims as nr, MachineOwnerKind as ns, readDeviceHostMachines as nt, readDevicePlacement as nu, SUMMARY_ARCHIVES as o, getPlatformDeviceLimits as oa, WEB_VIEWPORTS as oc, hostedAgentDriverName as od, logFiles as oi, HostedIosStatus as ol, runId as on, machineCapacity as oo, emulatorLogFile as or, MetroBundleState as os, HISTORY_LIMIT as ot, readInteractions as ou, workspaceSummary as p, windowsShortDirKey as pa, replacementAdvice as pc, parseHostedMacosPlacement as pd, readLogTimeline as pi, HostedAndroidStatus as pl, RecordingPlatform as pn, APP_PROCESS_STATES as po, maintenanceNdjsonFile as pr, RemoteDeviceState as ps, STATS_VERSION as pt, DeviceHostLimits as pu, readHostedNativeLogsCheckpoint as q, findPeer as qa, MaintenanceActionKind as qc, NdjsonRecord as qd, createDebugLog as qi, WorkspaceState as ql, daemonDir as qn, EnvironmentDisk as qo, LogQueryOptions as qr, SETTINGS as qs, pullRequestCacheFile as qt, readHostedDeviceLedger as qu, applyKeyedDelta as r, findEnclosingWorktreeRoot as ra, SettingsPayload as rc, HostedMacosChoice as rd, fileSizes as ri, parseMaintenanceState as rl, SETTINGS_SCHEMA_URL as rn, buildSlotsDir as ro, easMachineStateRoot as rr, MachineUsageState as rs, BuildMachineTotals as rt, readDormantStage as ru, StatusViews as s, getProject as sa, WebViewport as sc, hostedMacosAppSlot as sd, markerWindow as si, hostedIosPlacements as sl, validRunId as sn, maxLoadPerCore as so, gcLogDir as sr, NATIVE_BUILD_STEPS as ss, OffloadSummary as st, readLastBuilds as su, KeyedDelta as t, derivedBuildCap as ta, SettingType as tc, HostedAgentLease as td, compileGrep as ti, MaintenanceStatus as tl, withGitChip as tn, MachineCapacity as to, diskUsageCacheDir as tr, MachineOwner as ts, DeviceHostMachineCredential as tt, readDeviceIdleShutdowns as tu, WorkspaceSummary as u, isPathPrefix as ua, expectedShape as uc, parseHostedAgentGrant as ud, queryJsonLogs as ui, parseHostedIosPlacement as ul, RECORDING_PLATFORMS as un, tryAcquireBuildSlotClaim as uo, gitMergeCacheDir as ur, PhysicalDeviceConnection as us, RunEstimates as ut, readWorkspaceState as uu, parseSetupJournal as v, requireAutomaticMachine as va, MacosBuild as vc, HostedAppRecord as vd, FingerprintMemoRecord as vi, parseHostedAndroidPlacement as vl, listRecordedDevicesAsync as vn, AgentTool as vo, serverSetupDir as vr, StatusBuildSlotHolder as vs, StatsRecord as vt, HostedDeviceOffer as vu, BuildLedgerCache as w, PlatformDeviceLimits as wa, ArchivedBytes as wc, readHostedApp as wd, CreatedDevicePlatform as wi, BUILD_HISTORY_KEY as wl, recordingEnabled as wn, BuildActivity as wo, statsFile as wr, StatusIssue as ws, projectRootDirectories as wt, HostedDeviceSession as wu, agentDeviceStateDirsAsync as x, Config as xa, parseMacosRecord as xc, hostedAppBlobs as xd, fingerprintMemoLock as xi, hostedNativeRecords as xl, openSegmentName as xn, AppPresence as xo, sharedCompilationCache as xr, StatusCapacityLoad as xs, decodeStats as xt, HostedDevicePlatform as xu, readSetupJournal as y, validateAutomaticPool as ya, MacosProcess as yc, hostedAppArea as yd, fingerprintMemoDir as yi, unreadableHostedAndroid as yl, listSegments as yn, AndroidDeviceState as yo, setupJournalFile as yr, StatusBuildSlots as ys, StatsReport as yt, HostedDeviceOfferRequest as yu, readGcLog as z, MachineTransport as za, DaemonSnapshot as zc, readAgentDeviceUsage as zd, Trace as zi, IdleStopRecord as zl, buildLedgerLock as zn, BuildWaitingFor as zo, workspaceStateFile as zr, WorktreePullRequest as zs, PullRequestCacheEntry as zt, parseHostedDevice as zu };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as BuildSwiftpmArtifactQuery, M as BuildReactNativeArtifactQuery, m as BuildArtifactIdentity } from "./protocol-
|
|
1
|
+
import { F as BuildSwiftpmArtifactQuery, M as BuildReactNativeArtifactQuery, m as BuildArtifactIdentity } from "./protocol-_p7V6XGi.mjs";
|
|
2
2
|
import { Server, Socket } from "node:net";
|
|
3
3
|
//#region dir-lock.d.ts
|
|
4
4
|
interface DirLockOptions {
|
|
@@ -188,6 +188,11 @@ declare function swiftpmArtifactQuery(value: unknown): BuildSwiftpmArtifactQuery
|
|
|
188
188
|
//#endregion
|
|
189
189
|
//#region index.d.ts
|
|
190
190
|
declare function configDir(): string;
|
|
191
|
+
/**
|
|
192
|
+
* Whether `STIM_HOME` scopes this Stim home, whatever path it names, `~/.stim` included. A scoped home owns only the
|
|
193
|
+
* devices its created-devices ledger lists and leaves machine-wide device and memory sweeps alone.
|
|
194
|
+
*/
|
|
195
|
+
declare function isScopedHome(env?: NodeJS.ProcessEnv): boolean;
|
|
191
196
|
/** Creates `dir` and its missing parents owner-only, and narrows an existing `dir` that grants group or other access when the filesystem and owner allow it. */
|
|
192
197
|
declare function ensurePrivateDir(dir: string): void;
|
|
193
198
|
declare function workspaceSlug(projectRoot: string): string;
|
|
@@ -250,4 +255,4 @@ declare function updateCacheManifest(file: string, mutate: (caches: Array<Record
|
|
|
250
255
|
declare function cacheDirRefusal(dir: string): string | null;
|
|
251
256
|
declare function registerCache({ dir, name, prune, note, entriesDepth, layout, replaces }: RegisterOptions): void;
|
|
252
257
|
//#endregion
|
|
253
|
-
export { type AsyncStoreArtifactOptions, BuildRunOptions, CacheManifest, CacheRegistrationMatch, type DirLockOptions, LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, type MetroBridge, type MetroLink, type MetroLinks, RegisterOptions, STORE_ROOT_TAG, type StimContext, type StimOutput, type StoreArtifactOptions, type UnitLine, ambientContext, ambientEnv, ambientWrite, artifactIn, buildCacheKey, buildCacheRoot, cacheDirRefusal, cacheManifestLockPath, cacheNameSegment, cachePathSetting, compiledHelper, configDir, createMetroBridge, createMetroLinks, dependencyInstall, dependencyLockfile, ensurePrivateDir, hostSimulatorArch, metroCacheRoot, quoteUnitWord, quotedPath, reactNativeArtifactIdentity, reactNativeArtifactQuery, readCacheManifest, registerCache, resolveArtifact, reusableDependencies, rotateLog, rotatedLogPath, sharedStoreRoot, storeArtifact, storeArtifactAsync, swiftpmArtifactQuery, tagSharedStore, unitLines, unitWords, updateCacheManifest, validMacosResourceDestination, withAmbientContext, withDirLock, withDirLockAsync, withDirLockTransaction, workspaceId, workspaceLogDir, workspaceName, workspaceSlug, workspaceStateDir };
|
|
258
|
+
export { type AsyncStoreArtifactOptions, BuildRunOptions, CacheManifest, CacheRegistrationMatch, type DirLockOptions, LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, type MetroBridge, type MetroLink, type MetroLinks, RegisterOptions, STORE_ROOT_TAG, type StimContext, type StimOutput, type StoreArtifactOptions, type UnitLine, ambientContext, ambientEnv, ambientWrite, artifactIn, buildCacheKey, buildCacheRoot, cacheDirRefusal, cacheManifestLockPath, cacheNameSegment, cachePathSetting, compiledHelper, configDir, createMetroBridge, createMetroLinks, dependencyInstall, dependencyLockfile, ensurePrivateDir, hostSimulatorArch, isScopedHome, metroCacheRoot, quoteUnitWord, quotedPath, reactNativeArtifactIdentity, reactNativeArtifactQuery, readCacheManifest, registerCache, resolveArtifact, reusableDependencies, rotateLog, rotatedLogPath, sharedStoreRoot, storeArtifact, storeArtifactAsync, swiftpmArtifactQuery, tagSharedStore, unitLines, unitWords, updateCacheManifest, validMacosResourceDestination, withAmbientContext, withDirLock, withDirLockAsync, withDirLockTransaction, workspaceId, workspaceLogDir, workspaceName, workspaceSlug, workspaceStateDir };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { C as quotedPath } from "./ownership-claim-DG2GMIoo.mjs";
|
|
2
|
-
import { $ as
|
|
3
|
-
export { LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, STORE_ROOT_TAG, ambientContext, ambientEnv, ambientWrite, artifactIn, buildCacheKey, buildCacheRoot, cacheDirRefusal, cacheManifestLockPath, cacheNameSegment, cachePathSetting, compiledHelper, configDir, createMetroBridge, createMetroLinks, dependencyInstall, dependencyLockfile, ensurePrivateDir, hostSimulatorArch, metroCacheRoot, quoteUnitWord, quotedPath, reactNativeArtifactIdentity, reactNativeArtifactQuery, readCacheManifest, registerCache, resolveArtifact, reusableDependencies, rotateLog, rotatedLogPath, sharedStoreRoot, storeArtifact, storeArtifactAsync, swiftpmArtifactQuery, tagSharedStore, unitLines, unitWords, updateCacheManifest, validMacosResourceDestination, withAmbientContext, withDirLock, withDirLockAsync, withDirLockTransaction, workspaceId, workspaceLogDir, workspaceName, workspaceSlug, workspaceStateDir };
|
|
2
|
+
import { $ as withDirLock, A as createMetroBridge, B as quoteUnitWord, C as workspaceLogDir, D as swiftpmArtifactQuery, E as workspaceStateDir, F as compiledHelper, G as ambientEnv, H as unitWords, I as storeArtifactAsync, K as ambientWrite, L as artifactIn, M as dependencyInstall, N as dependencyLockfile, O as reactNativeArtifactIdentity, P as reusableDependencies, R as resolveArtifact, S as workspaceId, T as workspaceSlug, U as validMacosResourceDestination, V as unitLines, W as ambientContext, _ as rotateLog, a as buildCacheRoot, b as tagSharedStore, c as cacheNameSegment, d as ensurePrivateDir, et as withDirLockAsync, f as hostSimulatorArch, g as registerCache, h as readCacheManifest, i as buildCacheKey, j as createMetroLinks, k as reactNativeArtifactQuery, l as cachePathSetting, m as metroCacheRoot, n as METRO_NAMED_CACHE_LAYOUT, o as cacheDirRefusal, p as isScopedHome, q as withAmbientContext, r as STORE_ROOT_TAG, s as cacheManifestLockPath, t as LOG_ROTATE_BYTES, tt as withDirLockTransaction, u as configDir, v as rotatedLogPath, w as workspaceName, x as updateCacheManifest, y as sharedStoreRoot, z as storeArtifact } from "./core-DdPq-c64.mjs";
|
|
3
|
+
export { LOG_ROTATE_BYTES, METRO_NAMED_CACHE_LAYOUT, STORE_ROOT_TAG, ambientContext, ambientEnv, ambientWrite, artifactIn, buildCacheKey, buildCacheRoot, cacheDirRefusal, cacheManifestLockPath, cacheNameSegment, cachePathSetting, compiledHelper, configDir, createMetroBridge, createMetroLinks, dependencyInstall, dependencyLockfile, ensurePrivateDir, hostSimulatorArch, isScopedHome, metroCacheRoot, quoteUnitWord, quotedPath, reactNativeArtifactIdentity, reactNativeArtifactQuery, readCacheManifest, registerCache, resolveArtifact, reusableDependencies, rotateLog, rotatedLogPath, sharedStoreRoot, storeArtifact, storeArtifactAsync, swiftpmArtifactQuery, tagSharedStore, unitLines, unitWords, updateCacheManifest, validMacosResourceDestination, withAmbientContext, withDirLock, withDirLockAsync, withDirLockTransaction, workspaceId, workspaceLogDir, workspaceName, workspaceSlug, workspaceStateDir };
|
package/dist/noise-session.d.mts
CHANGED
|
@@ -87,6 +87,11 @@ declare class HandshakeRefusal extends Error {
|
|
|
87
87
|
readonly code: string;
|
|
88
88
|
constructor(code: string, message: string);
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Why a server that cannot read its Stim home refuses with `home-unavailable`: it can tell neither a paired client nor
|
|
92
|
+
* a secret, so it serves none until the Stim home answers again. Clients retry; it never means revoked.
|
|
93
|
+
*/
|
|
94
|
+
declare const HOME_UNAVAILABLE_MESSAGE: string;
|
|
90
95
|
/**
|
|
91
96
|
* One authenticated, encrypted connection over a WebSocket, with the subset of `ws`'s WebSocket API Stim uses.
|
|
92
97
|
* `send` takes a string for a text message and bytes for a binary one; `message` listeners get the plaintext as a
|
|
@@ -149,7 +154,10 @@ interface AcceptedHandshake {
|
|
|
149
154
|
}
|
|
150
155
|
interface AcceptOptions {
|
|
151
156
|
keyPair: NoiseKeyPair;
|
|
152
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* The PSK of the secret `lookup` (hex) names, or null when no valid secret matches. A {@link HandshakeRefusal} it
|
|
159
|
+
* throws refuses the client with that code.
|
|
160
|
+
*/
|
|
153
161
|
psk: (lookup: string) => Buffer | null;
|
|
154
162
|
timeoutMs: number;
|
|
155
163
|
/** X25519 in place of node:crypto's, as `HandshakeOptions.dh` takes it. */
|
|
@@ -166,4 +174,4 @@ declare const PROTOCOL_UNSUPPORTED_MESSAGE: string;
|
|
|
166
174
|
*/
|
|
167
175
|
declare function acceptNoise(raw: RawSocket, first: unknown, isBinary: boolean, options: AcceptOptions): Promise<AcceptedHandshake>;
|
|
168
176
|
//#endregion
|
|
169
|
-
export { AcceptOptions, AcceptedHandshake, CLOSE_BAD_REQUEST, CLOSE_REFUSED, HandshakeMode, HandshakeRefusal, InitiateOptions, LOOKUP_BYTES, MAX_CLIENT_MESSAGE_BYTES, MAX_FIRST_MESSAGE_BYTES, MAX_SERVER_MESSAGE_BYTES, MODE_FIRST_CONTACT, MODE_RETURNING, NoiseSocket, PROTOCOL_UNSUPPORTED_MESSAGE, ParsedFirstMessage, RawSocket, SECRET_BYTES, STIM_PROTOCOL_VERSION, SecretValues, TRANSPORT_OVERHEAD_BYTES, acceptNoise, decodeSecret, handshakePrefix, handshakePrologue, initiateNoise, keyFingerprint, newSecret, parseFirstMessage, readOrCreateKeyFile, secretValues };
|
|
177
|
+
export { AcceptOptions, AcceptedHandshake, CLOSE_BAD_REQUEST, CLOSE_REFUSED, HOME_UNAVAILABLE_MESSAGE, HandshakeMode, HandshakeRefusal, InitiateOptions, LOOKUP_BYTES, MAX_CLIENT_MESSAGE_BYTES, MAX_FIRST_MESSAGE_BYTES, MAX_SERVER_MESSAGE_BYTES, MODE_FIRST_CONTACT, MODE_RETURNING, NoiseSocket, PROTOCOL_UNSUPPORTED_MESSAGE, ParsedFirstMessage, RawSocket, SECRET_BYTES, STIM_PROTOCOL_VERSION, SecretValues, TRANSPORT_OVERHEAD_BYTES, acceptNoise, decodeSecret, handshakePrefix, handshakePrologue, initiateNoise, keyFingerprint, newSecret, parseFirstMessage, readOrCreateKeyFile, secretValues };
|
package/dist/noise-session.mjs
CHANGED
|
@@ -135,8 +135,14 @@ var HandshakeRefusal = class extends Error {
|
|
|
135
135
|
this.code = code;
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
|
+
/**
|
|
139
|
+
* Why a server that cannot read its Stim home refuses with `home-unavailable`: it can tell neither a paired client nor
|
|
140
|
+
* a secret, so it serves none until the Stim home answers again. Clients retry; it never means revoked.
|
|
141
|
+
*/
|
|
142
|
+
const HOME_UNAVAILABLE_MESSAGE = "The machine cannot read its Stim home, usually because the disk that holds it is disconnected or not responding. It serves clients again once the Stim home answers.";
|
|
138
143
|
const REFUSAL_MESSAGES = {
|
|
139
144
|
"unknown-secret": "The machine does not know this pairing token or setup ticket yet, or it expired.",
|
|
145
|
+
"home-unavailable": HOME_UNAVAILABLE_MESSAGE,
|
|
140
146
|
unauthorized: "The machine does not recognize this client. Pair again.",
|
|
141
147
|
"protocol-unsupported": "The machine speaks another stim-server protocol. Update it and this client, then pair again.",
|
|
142
148
|
"handshake-failed": "The authentication handshake failed.",
|
|
@@ -384,8 +390,16 @@ function acceptNoise(raw, first, isBinary, options) {
|
|
|
384
390
|
const message = parseFirstMessage(bytesOf(first));
|
|
385
391
|
if ("error" in message) return refuse(message.error, message.error === "protocol-unsupported" ? CLOSE_BAD_REQUEST : CLOSE_REFUSED);
|
|
386
392
|
parsed = message;
|
|
387
|
-
|
|
388
|
-
if (message.mode === 1
|
|
393
|
+
let psk = null;
|
|
394
|
+
if (message.mode === 1) {
|
|
395
|
+
try {
|
|
396
|
+
psk = options.psk(message.lookup.toString("hex"));
|
|
397
|
+
} catch (error) {
|
|
398
|
+
if (error instanceof HandshakeRefusal) return refuse(error.code);
|
|
399
|
+
throw error;
|
|
400
|
+
}
|
|
401
|
+
if (!psk) return refuse("unknown-secret");
|
|
402
|
+
}
|
|
389
403
|
try {
|
|
390
404
|
handshake = new HandshakeState({
|
|
391
405
|
protocol: psk ? NOISE_XX_PSK2 : NOISE_XX,
|
|
@@ -405,4 +419,4 @@ function acceptNoise(raw, first, isBinary, options) {
|
|
|
405
419
|
});
|
|
406
420
|
}
|
|
407
421
|
//#endregion
|
|
408
|
-
export { CLOSE_BAD_REQUEST, CLOSE_REFUSED, HandshakeRefusal, LOOKUP_BYTES, MAX_CLIENT_MESSAGE_BYTES, MAX_FIRST_MESSAGE_BYTES, MAX_SERVER_MESSAGE_BYTES, MODE_FIRST_CONTACT, MODE_RETURNING, NoiseSocket, PROTOCOL_UNSUPPORTED_MESSAGE, SECRET_BYTES, STIM_PROTOCOL_VERSION, TRANSPORT_OVERHEAD_BYTES, acceptNoise, decodeSecret, handshakePrefix, handshakePrologue, initiateNoise, keyFingerprint, newSecret, parseFirstMessage, readOrCreateKeyFile, secretValues };
|
|
422
|
+
export { CLOSE_BAD_REQUEST, CLOSE_REFUSED, HOME_UNAVAILABLE_MESSAGE, HandshakeRefusal, LOOKUP_BYTES, MAX_CLIENT_MESSAGE_BYTES, MAX_FIRST_MESSAGE_BYTES, MAX_SERVER_MESSAGE_BYTES, MODE_FIRST_CONTACT, MODE_RETURNING, NoiseSocket, PROTOCOL_UNSUPPORTED_MESSAGE, SECRET_BYTES, STIM_PROTOCOL_VERSION, TRANSPORT_OVERHEAD_BYTES, acceptNoise, decodeSecret, handshakePrefix, handshakePrologue, initiateNoise, keyFingerprint, newSecret, parseFirstMessage, readOrCreateKeyFile, secretValues };
|