feat(devices): add simulator and emulator support #10677
Mergedjuliusmarmingemerged 31 commits into
main fromrefs/pull/10677/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XXL
juliusmarminge changed the title
- apps/server/src/device/DeviceHubProxy.ts line 140OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +120,21 @@120+ }).pipe(Effect.provide(NodeSocket.layerWebSocketConstructor));121+ yield* Effect.scoped(122+ Effect.gen(function* () {123+ const writeToClient = yield* client.writer;124+ const writeToUpstream = yield* upstream.writer;125+ const downstream = upstream.runRaw((data) => writeToClient(data));126+ const upstreamPump = client.runRaw((data) => writeToUpstream(data));127+ // Whichever side closes first ends the other via scope teardown.128+ yield* Effect.raceFirst(downstream, upstreamPump);129+ }),130+ ).pipe(Effect.catchCause(() => Effect.void));131+ return HttpServerResponse.empty();132+});133+134+const proxyHttp = Effect.fn("DeviceHubProxy.proxyHttp")(function* (135+ request: HttpServerRequest.HttpServerRequest,136+ upstreamUrl: string,137+ hubOrigin: string,138+) {139+ const httpClient = yield* HttpClient.HttpClient;140+ const scope = yield* Scope.make();@@ -0,0 +422,21 @@422+ const host = yield* resolveHost(input.hostId);423+ yield* shutdownDevice(host.id, input.deviceId, input.platform);424+ // Sessions on a powered-off device are stale in every thread.425+ yield* publish((current) => ({426+ ...current,427+ sessions: current.sessions.filter(428+ (session) => !(session.hostId === host.id && session.deviceId === input.deviceId),429+ ),430+ }));431+ },432+ );433+434+ const screenshot: DeviceService["Service"]["screenshot"] = Effect.fn("DeviceService.screenshot")(435+ function* (input) {436+ const host = yield* resolveHost(input.hostId);437+ const ready = yield* readiness(host.id);438+ const { state } = yield* SynchronizedRef.get(stateRef);439+ const device = findDevice(state, host.id, input.deviceId);440+ if (!device) {441+ return yield* new DeviceNotFoundError({ hostId: host.id, deviceId: input.deviceId });442+ }apps/server/src/device/LocalDeviceHost.ts lines 265 to 275Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +166,21 @@166+ * command line's entry path, so a recycled pid belonging to something else167+ * is never touched.168+ */169+ const reapStaleHub = Effect.gen(function* () {170+ const previous = yield* fs171+ .readFileString(hubStatePath())172+ .pipe(Effect.flatMap(decodeHubStateFile), Effect.option);173+ if (previous._tag === "None") return;174+ const alive = yield* isProcessAlive(previous.value.pid);175+ if (alive) {176+ const commandLine = yield* runner177+ .run({178+ command: "ps",179+ args: ["-o", "command=", "-p", String(previous.value.pid)],180+ timeout: Duration.seconds(5),181+ timeoutBehavior: "timedOutResult",182+ })183+ .pipe(184+ Effect.map((result) => result.stdout),185+ Effect.orElseSucceed(() => ""),186+ );@@ -0,0 +357,21 @@357+ AGENT_DEVICE_DAEMON_SERVER_MODE: "http",358+ // The daemon idles out after five minutes by default; the server owns359+ // its lifetime here and stops it explicitly.360+ AGENT_DEVICE_DAEMON_IDLE_TIMEOUT_MS: "0",361+ AGENT_DEVICE_NO_UPDATE_NOTIFIER: "1",362+ FORCE_COLOR: "0",363+ NO_COLOR: "1",364+ };365+ const toEndpoint = (file: typeof AgentDeviceDaemonFile.Type): AgentDeviceEndpoint => ({366+ baseUrl: `http://127.0.0.1:${file.httpPort}`,367+ token: file.token,368+ entryPath: tools.agentDevice.entryPath,369+ });370+ if (existing._tag === "Some") {371+ const alive = yield* httpClient372+ .get(`http://127.0.0.1:${existing.value.httpPort}/health`)373+ .pipe(374+ Effect.timeout(Duration.seconds(2)),375+ Effect.map((response) => response.status === 200),376+ Effect.orElseSucceed(() => false),377+ );apps/server/src/mcp/toolkits/device/tools.ts lines 40 to 43Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +23,21 @@23+ * releases. Wrapping its commands here would only lag behind it.24+ */25+export const DeviceListTool = Tool.make("device_list", {26+ description:27+ "List iOS Simulators and Android Emulators on this environment's device hosts, which platforms each host can run, and which devices are already open in this thread's Device panel. Call this before device_open when you do not know a device id.",28+ // An empty struct serializes as `anyOf [object, array]`, which some29+ // providers reject and then drop every tool on the server with it.30+ parameters: Schema.Struct({31+ hostId: Schema.optional(32+ Schema.String.annotate({ description: "Limit to one device host. Defaults to all hosts." }),33+ ),34+ }),35+ success: DeviceToolListResult,36+ failure: DeviceToolError,37+ dependencies,38+})39+ .annotate(Tool.Title, "List devices")40+ .annotate(Tool.Readonly, true)41+ .annotate(Tool.Destructive, false)42+ .annotate(Tool.Idempotent, true)43+ .annotate(Tool.OpenWorld, false);@@ -0,0 +54,21 @@54+const SEMU_MAGIC = 0x53454d55;55+const SEMU_HEADER_BYTES = 16;56+const SEMU_FLAG_KEY = 1;57+const SOFT_DECODE_QUEUE = 8;58+59+// serve-sim binary WS message tags (browser -> helper).60+const IOS_MSG_TOUCH = 0x03;61+const IOS_MSG_BUTTON = 0x04;62+const IOS_MSG_KEY = 0x06;63+const IOS_MSG_ORIENTATION = 0x07;64+const IOS_MSG_HARDWARE_KEYBOARD = 0x0d;65+// helper -> browser.66+const IOS_TAG_SCREEN_CONFIG = 0x82;67+68+const encoder = new TextEncoder();69+const decoder = new TextDecoder();70+71+export const isWebCodecsSupported = (): boolean =>72+ typeof globalThis !== "undefined" &&73+ "VideoDecoder" in globalThis &&74+ "EncodedVideoChunk" in globalThis;apps/web/src/components/device/DeviceStreamView.tsx lines 56 to 59Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +29,21 @@29+ readonly deviceId: string;30+ readonly visible: boolean;31+ readonly onHandle?: (handle: DeviceStreamHandle | null) => void;32+ readonly onScreen?: (screen: DeviceScreenSize | null) => void;33+}) {34+ const access = useDeviceHubAccess(props.environmentId);35+ const canvasRef = useRef<HTMLCanvasElement | null>(null);36+ const clientRef = useRef<DeviceStreamClient | null>(null);37+ const [status, setStatus] = useState<DeviceStreamStatus>("connecting");38+ const [detail, setDetail] = useState<string | undefined>(undefined);39+ const [screen, setScreen] = useState<DeviceScreenSize | null>(null);40+ const [mjpegUrl, setMjpegUrl] = useState<string | null>(null);41+ const [mjpegGeneration, setMjpegGeneration] = useState(0);42+ const { onHandle, onScreen } = props;43+44+ useEffect(() => {45+ const canvas = canvasRef.current;46+ if (!access || !canvas || !props.visible) {47+ setStatus("connecting");48+ onHandle?.(null);49+ return;packages/client-runtime/src/state/deviceHubAccess.ts line 43Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +23,21 @@23+24+const TICKET_TIMEOUT_MS = 8_000;25+26+export interface DeviceHubAccess {27+ /** Absolute origin-relative base, e.g. `https://env.example/api/device-hub`. */28+ readonly httpBase: string;29+ /** Same base with the `ws(s)` scheme. */30+ readonly wsBase: string;31+ /** Query parameters to append to every hub request; empty for cookie sessions. */32+ readonly query: Readonly<Record<string, string>>;33+ /** Whether requests must include cookies (same-origin session). */34+ readonly credentials: boolean;35+}36+37+export const resolveDeviceHubAccess = Effect.fn("clientRuntime.state.resolveDeviceHubAccess")(38+ function* (input: {39+ readonly prepared: PreparedConnection;40+ readonly hubBasePath: string;41+ }): Effect.fn.Return<DeviceHubAccess, RemoteEnvironmentRequestError, HttpClient.HttpClient> {42+ const httpBase = environmentEndpointUrl(input.prepared.httpBaseUrl, input.hubBasePath);43+ const wsBase = httpBase.replace(/^http/, "ws");packages/client-runtime/src/state/deviceHubAccess.ts line 61Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +41,21 @@41+ }): Effect.fn.Return<DeviceHubAccess, RemoteEnvironmentRequestError, HttpClient.HttpClient> {42+ const httpBase = environmentEndpointUrl(input.prepared.httpBaseUrl, input.hubBasePath);43+ const wsBase = httpBase.replace(/^http/, "ws");44+ if (input.prepared.httpAuthorization === null) {45+ return { httpBase, wsBase, query: {}, credentials: true };46+ }47+ const signer = yield* Effect.serviceOption(ManagedRelayDpopSigner);48+ const remoteAuthorization = yield* Effect.serviceOption(RemoteEnvironmentAuthorization);49+ const ticket = yield* executeAuthenticatedEnvironmentHttpRequest({50+ prepared: input.prepared,51+ signer,52+ remoteAuthorization,53+ method: "POST",54+ url: (httpBaseUrl) => environmentEndpointUrl(httpBaseUrl, "/api/auth/websocket-ticket"),55+ timeoutMs: TICKET_TIMEOUT_MS,56+ request: ({ client, headers }) => client.auth.webSocketTicket({ headers }),57+ });58+ return {59+ httpBase,60+ wsBase,61+ query: { wsTicket: ticket.ticket },
- apps/web/src/components/device/deviceStream.ts line 492Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +457,21 @@457+ } catch (cause) {458+ if (stopped) return;459+ setStatus("connecting", (cause as Error).message);460+ }461+ if (!stopped) scheduleRetry(() => void readIosVideo());462+ };463+464+ /**465+ * serve-sim's helper only accepts HID and pushes its screen config once466+ * screen capture is running, and the AVCC stream does not reliably start467+ * it. Touching the MJPEG endpoint does; one aborted request is enough.468+ */469+ const primeIosHelper = async () => {470+ const controller = new AbortController();471+ try {472+ const response = await fetch(httpUrl(`/helper/${device}/stream.mjpeg`), {473+ signal: controller.signal,474+ credentials: access.credentials ? "include" : "same-origin",475+ });476+ if (response.status === 401 || response.status === 403) return handleUnauthorized();477+ await response.body?.getReader().read();
- apps/server/src/device/DeviceService.ts lines 693 to 704Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +460,21 @@460+ new DeviceOperationError({461+ operation: "screenshot",462+ detail: cause instanceof Error ? cause.message : String(cause),463+ }),464+ ),465+ );466+ return { device, png };467+ },468+ );469+470+ const resolveDevice = Effect.fn("DeviceService.resolveDevice")(function* (471+ hostId: DeviceHostId | undefined,472+ deviceId: DeviceId,473+ ) {474+ const host = yield* resolveHost(hostId);475+ const ready = yield* readiness(host.id);476+ const { state } = yield* SynchronizedRef.get(stateRef);477+ const device = findDevice(state, host.id, deviceId);478+ if (!device) return yield* new DeviceNotFoundError({ hostId: host.id, deviceId });479+ return { ready, device };480+ });apps/web/src/components/device/deviceHubApi.ts lines 187 to 192OutdatedResolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -0,0 +172,21 @@172+ }173+ });174+ return () => source.close();175+};176+177+/** iOS only: the frontmost app, pushed by serve-sim whenever it changes. */178+export function subscribeDeviceForeground(179+ target: Target,180+ onChange: (app: DeviceForegroundInfo | null) => void,181+): () => void {182+ if (target.platform !== "ios") return () => {};183+ return openEventSource(184+ target,185+ hubUrl(target, "/appstate", { device: target.deviceId }),186+ (data) => {187+ if (!isRecord(data) || typeof data.bundleId !== "string") return;188+ onChange({189+ id: data.bundleId,190+ ...(typeof data.pid === "number" ? { pid: data.pid } : {}),191+ ...(typeof data.isReactNative === "boolean" ? { isReactNative: data.isReactNative } : {}),192+ });
juliusmarminge changed the title
- apps/server/src/device/DeviceService.ts lines 117 to 119Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +99,21 @@99+ readonly configure: (100+ input: DeviceConfigureInput,101+ ) => Effect.Effect<DeviceServiceState, DeviceError>;102+ /** Refreshes devices only after device support has been enabled. */103+ readonly list: Effect.Effect<DeviceServiceState, DeviceError>;104+ readonly open: (input: DeviceOpenInput) => Effect.Effect<DeviceSession, DeviceError>;105+ readonly close: (input: DeviceCloseInput) => Effect.Effect<void, DeviceError>;106+ readonly shutdown: (input: DeviceShutdownInput) => Effect.Effect<void, DeviceError>;107+ /** Current settings and foreground app for one device. */108+ readonly detail: (input: DeviceDetailInput) => Effect.Effect<DeviceDetail, DeviceError>;109+ /** Runs one action, then returns the refreshed detail. */110+ readonly action: (input: DeviceActionInput) => Effect.Effect<DeviceDetail, DeviceError>;111+ readonly screenshot: (input: {112+ readonly hostId?: DeviceHostId | undefined;113+ readonly deviceId: DeviceId;114+ }) => Effect.Effect<DeviceScreenshot, DeviceError>;115+ /** Host endpoints for the proxy and the provider environment. */116+ readonly readiness: (hostId?: DeviceHostId) => Effect.Effect<DeviceReadiness, DeviceError>;117+ /**118+ * `readiness` only when the host can run at least one platform; a machine119+ * with no simulator toolchain never installs or starts anything.apps/server/src/device/DeviceHost.ts lines 21 to 25OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +5,21 @@5+ * MCP tools.6+ *7+ * Every ready host presents a loopback origin where expo-device-hub answers.8+ * Hosts add an agent-device daemon endpoint only after agent access is granted.9+ * For the local host both run on this machine; a remote host would forward10+ * them here.11+ */12+import type {13+ DeviceHostId,14+ DeviceHostSummary,15+ DevicePlatform,16+ DevicePlatformAvailability,17+} from "@t3tools/contracts";18+import * as Effect from "effect/Effect";19+import * as Schema from "effect/Schema";20+21+export class DeviceHostError extends Schema.TaggedError<DeviceHostError>()("DeviceHostError", {22+ hostId: Schema.String,23+ step: Schema.String,24+ detail: Schema.String,25+ cause: Schema.optional(Schema.Defect()),apps/server/src/device/DeviceToolchain.ts lines 54 to 56Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +37,21 @@37+ /** Absolute path of the tool's entry script, run with the server's Node. */38+ readonly entryPath: string;39+ readonly sentinelPath: string;40+}41+42+export interface DeviceToolchainPaths {43+ readonly hub: DeviceToolPaths;44+ readonly agentDevice: DeviceToolPaths;45+}46+47+export class DeviceToolchainInstallError extends Schema.TaggedError<DeviceToolchainInstallError>()(48+ "DeviceToolchainInstallError",49+ {50+ tool: Schema.String,51+ step: Schema.String,52+ exitCode: Schema.optional(Schema.Number),53+ stderrTail: Schema.optional(Schema.String),54+ cause: Schema.optional(Schema.Defect()),55+ },56+) {57+ override get message(): string {
- apps/server/src/device/DeviceHubProxy.ts lines 93 to 101OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +81,21 @@81+/**82+ * `<img>` and WebSocket cannot set headers, so every proxied request83+ * authenticates the way the `/ws` upgrade does: a cookie for browser84+ * sessions, or a short-lived `wsTicket` minted over authenticated HTTP for85+ * bearer and DPoP clients. The upgrade authenticator already implements that86+ * fallback order, so it is used for plain requests as well.87+ */88+const authenticate = (requiredScope: AuthEnvironmentScope) =>89+ Effect.gen(function* () {90+ const request = yield* HttpServerRequest.HttpServerRequest;91+ const serverAuth = yield* EnvironmentAuth.EnvironmentAuth;92+ const session = yield* serverAuth.authenticateWebSocketUpgrade(request).pipe(93+ Effect.catchIf(EnvironmentAuth.isServerAuthCredentialError, (error) =>94+ failEnvironmentAuthInvalid(95+ EnvironmentAuth.serverAuthCredentialReason(error),96+ EnvironmentAuth.serverAuthDpopFailureReason(error),97+ ),98+ ),99+ Effect.catchIf(EnvironmentAuth.isServerAuthInternalError, (error) =>100+ failEnvironmentInternal("internal_error", error),101+ ),packages/contracts/src/device.ts lines 356 to 364OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +344,21 @@344+}345+346+export class DeviceBootError extends Schema.TaggedError<DeviceBootError>()("DeviceBootError", {347+ hostId: DeviceHostId,348+ deviceId: DeviceId,349+ detail: Schema.String,350+}) {351+ override get message(): string {352+ return `Device ${this.deviceId} failed to boot: ${this.detail}`;353+ }354+}355+356+export class DeviceOperationError extends Schema.TaggedError<DeviceOperationError>()(357+ "DeviceOperationError",358+ {359+ operation: Schema.String,360+ detail: Schema.String,361+ },362+) {363+ override get message(): string {364+ return `Device ${this.operation} failed: ${this.detail}`;packages/contracts/src/device.ts lines 346 to 352OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +332,21 @@332+}333+334+export class DeviceNotFoundError extends Schema.TaggedError<DeviceNotFoundError>()(335+ "DeviceNotFoundError",336+ {337+ hostId: DeviceHostId,338+ deviceId: DeviceId,339+ },340+) {341+ override get message(): string {342+ return `Device ${this.deviceId} was not found on host ${this.hostId}.`;343+ }344+}345+346+export class DeviceBootError extends Schema.TaggedError<DeviceBootError>()("DeviceBootError", {347+ hostId: DeviceHostId,348+ deviceId: DeviceId,349+ detail: Schema.String,350+}) {351+ override get message(): string {352+ return `Device ${this.deviceId} failed to boot: ${this.detail}`;apps/server/src/device/AgentDeviceShim.ts lines 17 to 18OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +1,18 @@1+/**2+ * A directory holding an `agent-device` launcher that runs the pinned install3+ * with the server's Node. Prepended to provider subprocess PATHs so the agent4+ * types `agent-device …` and gets the version the injected instructions were5+ * written for, regardless of what is or is not globally installed.6+ */7+import { HostProcessPlatform } from "@t3tools/shared/hostProcess";8+import * as Effect from "effect/Effect";9+import * as FileSystem from "effect/FileSystem";10+import * as Path from "effect/Path";11+12+const SHIM_DIR = "device/bin";13+14+export const ensureAgentDeviceShim = Effect.fn("AgentDeviceShim.ensure")(function* (input: {15+ readonly entryPath: string;16+ readonly stateDir: string;17+ readonly fs: FileSystem.FileSystem;18+ readonly path: Path.Path;apps/server/src/device/DeviceHubProxy.ts lines 37 to 35OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +15,21 @@15+ AuthOrchestrationReadScope,16+ AuthOrchestrationOperateScope,17+ type AuthEnvironmentScope,18+} from "@t3tools/contracts";19+import * as Effect from "effect/Effect";20+import * as Option from "effect/Option";21+import {22+ HttpClient,23+ HttpClientRequest,24+ HttpRouter,25+ HttpServerRequest,26+ HttpServerResponse,27+} from "effect/unstable/http";28+import * as Socket from "effect/unstable/socket/Socket";29+import * as NodeSocket from "@effect/platform-node/NodeSocket";30+31+import * as EnvironmentAuth from "../auth/EnvironmentAuth.ts";32+import {33+ failEnvironmentAuthInvalid,34+ failEnvironmentInternal,35+ failEnvironmentScopeRequired,
- apps/server/src/device/DeviceService.ts lines 48 to 48Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +28,21 @@28+ DevicePlatformUnavailableError,29+ type DeviceServiceState,30+ type DeviceSession,31+ type DeviceShutdownInput,32+ type DeviceSummary,33+ LOCAL_DEVICE_HOST_ID,34+ type ThreadId,35+} from "@t3tools/contracts";36+import * as Context from "effect/Context";37+import * as DateTime from "effect/DateTime";38+import * as Duration from "effect/Duration";39+import * as Effect from "effect/Effect";40+import * as Layer from "effect/Layer";41+import * as PubSub from "effect/PubSub";42+import * as Schema from "effect/Schema";43+import * as Scope from "effect/Scope";44+import * as Semaphore from "effect/Semaphore";45+import * as Stream from "effect/Stream";46+import * as SynchronizedRef from "effect/SynchronizedRef";47+import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http";48+
- apps/web/src/components/device/DeviceStreamView.tsx line 188OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +168,21 @@168+ default:169+ return 0;170+ }171+ }, [props.platform, screen]);172+173+ // A sideways rotation draws the raw portrait frame into a landscape box:174+ // the media element takes the transposed size and is rotated about the175+ // box's center.176+ const sideways = rotation === 90 || rotation === -90;177+ const mediaStyle: React.CSSProperties = sideways178+ ? {179+ width: frame.height,180+ height: frame.width,181+ left: (frame.width - frame.height) / 2,182+ top: (frame.height - frame.width) / 2,183+ transform: `rotate(${rotation}deg)`,184+ }185+ : {186+ width: frame.width,187+ height: frame.height,188+ left: 0,
- apps/server/src/device/DeviceService.ts lines 752 to 753OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +733,21 @@733+ return DeviceService.of({734+ state: SynchronizedRef.get(stateRef).pipe(Effect.map(({ state }) => state)),735+ subscribe: PubSub.subscribe(statePubSub),736+ configure,737+ list,738+ open,739+ close,740+ shutdown,741+ detail,742+ action,743+ screenshot,744+ readiness,745+ readinessIfSupported,746+ agentReadinessIfSupported,747+ currentReadiness,748+ sessionsForThread,749+ });750+});751+752+export const layer = Layer.effect(DeviceService, make).pipe(753+ Layer.provide(Layer.effect(DeviceHost.DeviceHost, LocalDeviceHost.make())),
juliusmarminge merged thisdca7b59
juliusmarminge closed this
Sign in to join this conversation.







Macroscope skipped reviewing this pull request. Per-review cost limit exceeded (workspace setting).
This review would cost an estimated $14.81, which exceeds your per-review limit of $8.00.
The top 3 files driving up this estimate:
apps/server/src/device/DeviceService.tsapps/server/src/device/LocalDeviceHost.tsapps/web/src/components/device/DeviceToolsPanel.tsxTip
To get this pull request reviewed, you can:
@macroscope-appon this PR to request a manual review (monthly spend limits still apply)..macroscope/ignore.md— note that creating this file replaces Macroscope's built-in default ignores rather than extending them.