refactor(contracts): one unavailableFact constructor for runtime refusals

Merged
TH
2mo ago
+383-490

Summary

Six local platform runtimes (Android, Apple, HarmonyOS, Web, Vega, Linux) spelled every refused operation as a four-line frozen { available: false, reason, hint } literal; Vega and Linux each also carried a private constructor for the same shape. @agent-device/contracts/platform-runtime now exports unavailableFact(reason, hint?) and every owner lists its refusals as calls. No fact value changes: the result is the same frozen object with the same keys. 7 files, net โˆ’111 lines.

The provider runtimes (WebDriver, limrun) follow in a stacked PR so each stays inside the diff budget.

Validation

Tested at 6c60bac2f: pnpm check:affected --run passed (format, lint, typecheck, related unit tests including every touched runtime.test.ts, gate manifest). No behavior change, so no device run applies.

๐Ÿค– Generated with Claude Code