Repository navigation
Expand file tree
/
Copy pathdevice.ts
More file actions
55 lines (53 loc) · 2 KB
/
Copy pathdevice.ts
File metadata and controls
55 lines (53 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import type {
AppleOS,
DeviceKind,
DeviceTarget,
PublicPlatform,
} from '@agent-device/kernel/device';
import type { TargetShutdownResult } from './target-shutdown-contract.ts';
/**
* Closed result of the `boot` command. Mirrors the daemon handler's only
* success return EXACTLY (src/daemon/handlers/session-appstate.ts) — the fixed
* object literal `{ platform, target, device, id, kind, booted }` plus the
* additive `appleOs` discriminant, emitted only for Apple devices.
*/
export type BootCommandResult = {
platform: PublicPlatform;
target: DeviceTarget;
/** Human-readable device name (`device.name`). */
device: string;
/** Stable device id (`device.id`). */
id: string;
kind: DeviceKind;
/** Always `true` on the success path. */
booted: true;
/**
* Additive Apple-OS discriminant (`device.appleOs`): iPhone/iPad/tvOS/visionOS/macOS.
* Present only for Apple devices; absent for non-Apple platforms. `platform` stays the
* leaf (`ios`/`macos`) — this is an extra field, not a replacement.
*/
appleOs?: AppleOS;
};
/**
* Closed result of the `shutdown` command. Mirrors the daemon handler's success
* return EXACTLY (src/daemon/handlers/session-appstate.ts) — the fixed object
* literal `{ platform, target, device, id, kind, shutdown }` plus the additive
* `appleOs` discriminant (Apple devices only). The `shutdown` field is the raw
* {@link TargetShutdownResult} returned by the bound `shutdownTarget` operation.
*/
export type ShutdownCommandResult = {
platform: PublicPlatform;
target: DeviceTarget;
/** Human-readable device name (`device.name`). */
device: string;
/** Stable device id (`device.id`). */
id: string;
kind: DeviceKind;
shutdown: TargetShutdownResult;
/**
* Additive Apple-OS discriminant (`device.appleOs`): iPhone/iPad/tvOS/visionOS/macOS.
* Present only for Apple devices; absent for non-Apple platforms. `platform` stays the
* leaf (`ios`/`macos`) — this is an extra field, not a replacement.
*/
appleOs?: AppleOS;
};