refactor(server): device hosts own their device operations #21835
Mergedjuliusmarmingemerged 1 commit into
main fromrefs/pull/21835/headmerged by juliusmarminge View on GitHubjuliusmarminge changed the title
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XL
- apps/server/src/device/DeviceHubOperations.ts line 50Resolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -0,0 +30,21 @@30+ ),31+});32+const HubActionResult = Schema.Struct({33+ ok: Schema.Boolean,34+ id: Schema.optional(Schema.String),35+ serial: Schema.optional(Schema.String),36+ error: Schema.optional(Schema.String),37+ errors: Schema.optional(38+ Schema.Array(Schema.Struct({ message: Schema.String, error: Schema.optional(Schema.String) })),39+ ),40+});41+42+const vendorPrefix = (platform: DevicePlatform) =>43+ platform === "ios" ? "/vendor/serve-sim" : "/vendor/serve-emu";44+45+/** Device operations for a host that runs expo-device-hub at `origin`. */46+export const makeDeviceHubOperations = (options: {47+ readonly hostId: DeviceHostId;48+ readonly origin: string;49+ readonly http: HttpClient.HttpClient;50+ readonly run: DeviceHostReady["run"];
juliusmarminge merged this83e0f7a
juliusmarminge closed this
Sign in to join this conversation.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline:
9482773· PR result:dc960a8· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.