feat(contracts): device hosts as a tagged union with EAS hosts #21842
Mergedjuliusmarmingemerged 8 commits into
device/webrtc-stream fromrefs/pull/21842/headmerged by juliusmarminge View on GitHubjuliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/device/localSshDeviceHost.ts lines 63 to 71OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -59,12 +59,13 @@5959 );6060 });616162-export const remoteSshDeviceHosts = Effect.fn("remoteSshDeviceHosts")(function* (63- hosts: ReadonlyArray<SshDeviceHostConfig>,64-) {65- return yield* Effect.filter(62+/** Drops SSH hosts that resolve to this machine; other host kinds pass through. */63+export const remoteSshDeviceHosts = <Host extends DeviceHostConfig>(hosts: ReadonlyArray<Host>) =>64+ Effect.filter(6665 hosts,67- (host) => isLocalSshDeviceHost(host).pipe(Effect.map((local) => !local)),66+ (host) =>67+ host.kind === "ssh"68+ ? isLocalSshDeviceHost(host).pipe(Effect.map((local) => !local))69+ : Effect.succeed(true),6870 { concurrency: 4 },69- );70-});71+ ).pipe(Effect.withSpan("remoteSshDeviceHosts"));packages/contracts/src/device.ts line 1OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -1 +1 @@1-import { Schema } from "effect";1+import { Effect, Schema, SchemaTransformation } from "effect";
- packages/contracts/src/settings.ts line 1158Resolvedby coderabbitai[bot](GitHub profile, opens in a new tab)@@ -1155,3 +1155,4 @@11551155 enableDeviceSupport: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),11561156 deviceOnboardingCompleted: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),11571157 deviceHosts: SshDeviceHostConfigs.pipe(Schema.withDecodingDefault(Effect.succeed([]))),1158+ easDeviceHosts: EasDeviceHostConfigs.pipe(Schema.withDecodingDefault(Effect.succeed([]))),
juliusmarminge merged thisc273a8f
juliusmarminge closed this
Sign in to join this conversation.
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result:
d37a7fa· 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.