@devicerail/protocol 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +33 -0
- package/dist/generated/v1/action-call.d.ts +10 -0
- package/dist/generated/v1/action-definition.d.ts +12 -0
- package/dist/generated/v1/action-execution.d.ts +27 -0
- package/dist/generated/v1/action-outcome.d.ts +103 -0
- package/dist/generated/v1/action-protection.d.ts +5 -0
- package/dist/generated/v1/action-result.d.ts +77 -0
- package/dist/generated/v1/asset-ref.d.ts +11 -0
- package/dist/generated/v1/clear-element-arguments.d.ts +59 -0
- package/dist/generated/v1/clear-element-result.d.ts +26 -0
- package/dist/generated/v1/coordinate-fallback-reason.d.ts +5 -0
- package/dist/generated/v1/device-capabilities-request.d.ts +21 -0
- package/dist/generated/v1/device-capabilities-response.d.ts +37 -0
- package/dist/generated/v1/device-capabilities-result.d.ts +13 -0
- package/dist/generated/v1/device-connect-request.d.ts +21 -0
- package/dist/generated/v1/device-connect-response.d.ts +69 -0
- package/dist/generated/v1/device-connect-result.d.ts +44 -0
- package/dist/generated/v1/device-disconnect-request.d.ts +21 -0
- package/dist/generated/v1/device-disconnect-response.d.ts +35 -0
- package/dist/generated/v1/device-disconnect-result.d.ts +10 -0
- package/dist/generated/v1/device-execute-params.d.ts +23 -0
- package/dist/generated/v1/device-execute-request.d.ts +33 -0
- package/dist/generated/v1/device-execute-response.d.ts +102 -0
- package/dist/generated/v1/device-execute-result.d.ts +77 -0
- package/dist/generated/v1/device-id.d.ts +5 -0
- package/dist/generated/v1/device-info.d.ts +44 -0
- package/dist/generated/v1/device-observe-request.d.ts +21 -0
- package/dist/generated/v1/device-observe-response.d.ts +79 -0
- package/dist/generated/v1/device-observe-result.d.ts +54 -0
- package/dist/generated/v1/device-select-params.d.ts +10 -0
- package/dist/generated/v1/device-select-request.d.ts +19 -0
- package/dist/generated/v1/device-select-response.d.ts +75 -0
- package/dist/generated/v1/device-select-result.d.ts +50 -0
- package/dist/generated/v1/devices-list-request.d.ts +15 -0
- package/dist/generated/v1/devices-list-response.d.ts +76 -0
- package/dist/generated/v1/devices-list-result.d.ts +51 -0
- package/dist/generated/v1/element-selector.d.ts +31 -0
- package/dist/generated/v1/element-target.d.ts +56 -0
- package/dist/generated/v1/error-info.d.ts +10 -0
- package/dist/generated/v1/event-id.d.ts +5 -0
- package/dist/generated/v1/event-sequence.d.ts +11 -0
- package/dist/generated/v1/event-stream-cursor.d.ts +24 -0
- package/dist/generated/v1/event-stream-endpoint.d.ts +8 -0
- package/dist/generated/v1/event-stream-epoch.d.ts +9 -0
- package/dist/generated/v1/event-stream-origin-policy.d.ts +13 -0
- package/dist/generated/v1/event-subscription-id.d.ts +5 -0
- package/dist/generated/v1/events-clear-request.d.ts +19 -0
- package/dist/generated/v1/events-clear-response.d.ts +36 -0
- package/dist/generated/v1/events-clear-result.d.ts +11 -0
- package/dist/generated/v1/events-list-params.d.ts +19 -0
- package/dist/generated/v1/events-list-request.d.ts +28 -0
- package/dist/generated/v1/events-list-response.d.ts +209 -0
- package/dist/generated/v1/events-list-result.d.ts +192 -0
- package/dist/generated/v1/events-stream-event-notification.d.ts +216 -0
- package/dist/generated/v1/events-stream-event-params.d.ts +209 -0
- package/dist/generated/v1/events-stream-open-params.d.ts +17 -0
- package/dist/generated/v1/events-stream-open-request.d.ts +26 -0
- package/dist/generated/v1/events-stream-open-response.d.ts +43 -0
- package/dist/generated/v1/events-stream-open-result.d.ts +18 -0
- package/dist/generated/v1/events-stream-terminal-notification.d.ts +70 -0
- package/dist/generated/v1/events-stream-terminal-params.d.ts +63 -0
- package/dist/generated/v1/events-stream-termination.d.ts +37 -0
- package/dist/generated/v1/events-subscribe-params.d.ts +28 -0
- package/dist/generated/v1/events-subscribe-request.d.ts +37 -0
- package/dist/generated/v1/events-subscribe-response.d.ts +56 -0
- package/dist/generated/v1/events-subscribe-result.d.ts +31 -0
- package/dist/generated/v1/feature-offer.d.ts +8 -0
- package/dist/generated/v1/feature-selection.d.ts +7 -0
- package/dist/generated/v1/find-element-arguments.d.ts +34 -0
- package/dist/generated/v1/find-element-result.d.ts +26 -0
- package/dist/generated/v1/hello-params.d.ts +35 -0
- package/dist/generated/v1/hello-result.d.ts +29 -0
- package/dist/generated/v1/index.d.ts +179 -0
- package/dist/generated/v1/json-rpc-version.d.ts +5 -0
- package/dist/generated/v1/manual-action-arguments.d.ts +11 -0
- package/dist/generated/v1/manual-action-step.d.ts +25 -0
- package/dist/generated/v1/manual-recording.d.ts +43 -0
- package/dist/generated/v1/media-frame.d.ts +25 -0
- package/dist/generated/v1/media-stream-capture-params.d.ts +16 -0
- package/dist/generated/v1/media-stream-capture-request.d.ts +31 -0
- package/dist/generated/v1/media-stream-capture-response.d.ts +56 -0
- package/dist/generated/v1/media-stream-capture-result.d.ts +31 -0
- package/dist/generated/v1/media-stream-end-params.d.ts +10 -0
- package/dist/generated/v1/media-stream-end-request.d.ts +19 -0
- package/dist/generated/v1/media-stream-end-response.d.ts +36 -0
- package/dist/generated/v1/media-stream-end-result.d.ts +11 -0
- package/dist/generated/v1/media-stream-id.d.ts +5 -0
- package/dist/generated/v1/media-stream-info.d.ts +17 -0
- package/dist/generated/v1/media-stream-kind.d.ts +5 -0
- package/dist/generated/v1/media-stream-start-params.d.ts +17 -0
- package/dist/generated/v1/media-stream-start-request.d.ts +26 -0
- package/dist/generated/v1/media-stream-start-response.d.ts +48 -0
- package/dist/generated/v1/media-stream-start-result.d.ts +23 -0
- package/dist/generated/v1/method-map.d.ts +162 -0
- package/dist/generated/v1/observation.d.ts +54 -0
- package/dist/generated/v1/peer-info.d.ts +8 -0
- package/dist/generated/v1/platform.d.ts +36 -0
- package/dist/generated/v1/protocol-incompatibility-reason.d.ts +5 -0
- package/dist/generated/v1/protocol-offer.d.ts +22 -0
- package/dist/generated/v1/protocol-range.d.ts +12 -0
- package/dist/generated/v1/protocol-selection.d.ts +11 -0
- package/dist/generated/v1/protocol-version.d.ts +8 -0
- package/dist/generated/v1/recorded-action-call.d.ts +18 -0
- package/dist/generated/v1/request-cancel-params.d.ts +8 -0
- package/dist/generated/v1/request-cancel-request.d.ts +16 -0
- package/dist/generated/v1/request-cancel-response.d.ts +34 -0
- package/dist/generated/v1/request-cancel-result.d.ts +10 -0
- package/dist/generated/v1/request-cancel-status.d.ts +5 -0
- package/dist/generated/v1/request-timeout-ms.d.ts +9 -0
- package/dist/generated/v1/rpc-error.d.ts +15 -0
- package/dist/generated/v1/rpc-id.d.ts +5 -0
- package/dist/generated/v1/rpc-params.d.ts +7 -0
- package/dist/generated/v1/rpc-request.d.ts +21 -0
- package/dist/generated/v1/rpc-response.d.ts +29 -0
- package/dist/generated/v1/rpc-server-message.d.ts +274 -0
- package/dist/generated/v1/rpc-server-notification.d.ts +256 -0
- package/dist/generated/v1/screenshot-omission-reason.d.ts +5 -0
- package/dist/generated/v1/session-current-request.d.ts +15 -0
- package/dist/generated/v1/session-current-response.d.ts +35 -0
- package/dist/generated/v1/session-current-result.d.ts +10 -0
- package/dist/generated/v1/session-end-params.d.ts +12 -0
- package/dist/generated/v1/session-end-request.d.ts +21 -0
- package/dist/generated/v1/session-end-response.d.ts +45 -0
- package/dist/generated/v1/session-end-result.d.ts +20 -0
- package/dist/generated/v1/session-export-params.d.ts +23 -0
- package/dist/generated/v1/session-export-request.d.ts +32 -0
- package/dist/generated/v1/session-export-response.d.ts +229 -0
- package/dist/generated/v1/session-export-result.d.ts +211 -0
- package/dist/generated/v1/session-export.d.ts +204 -0
- package/dist/generated/v1/session-id.d.ts +5 -0
- package/dist/generated/v1/session-info.d.ts +20 -0
- package/dist/generated/v1/session-outcome.d.ts +5 -0
- package/dist/generated/v1/session-start-request.d.ts +15 -0
- package/dist/generated/v1/session-start-response.d.ts +45 -0
- package/dist/generated/v1/session-start-result.d.ts +20 -0
- package/dist/generated/v1/session-state.d.ts +5 -0
- package/dist/generated/v1/session-target-params.d.ts +10 -0
- package/dist/generated/v1/sessions-list-request.d.ts +15 -0
- package/dist/generated/v1/sessions-list-response.d.ts +45 -0
- package/dist/generated/v1/sessions-list-result.d.ts +21 -0
- package/dist/generated/v1/set-element-value-arguments.d.ts +60 -0
- package/dist/generated/v1/set-element-value-result.d.ts +26 -0
- package/dist/generated/v1/system-describe-request.d.ts +15 -0
- package/dist/generated/v1/system-describe-response.d.ts +63 -0
- package/dist/generated/v1/system-describe-result.d.ts +38 -0
- package/dist/generated/v1/system-hello-request.d.ts +44 -0
- package/dist/generated/v1/system-hello-response.d.ts +54 -0
- package/dist/generated/v1/tap-element-arguments.d.ts +59 -0
- package/dist/generated/v1/tap-element-result.d.ts +26 -0
- package/dist/generated/v1/test-event-payload.d.ts +181 -0
- package/dist/generated/v1/test-event.d.ts +191 -0
- package/dist/generated/v1/text-match-mode.d.ts +5 -0
- package/dist/generated/v1/text-match.d.ts +9 -0
- package/dist/generated/v1/transport-info.d.ts +8 -0
- package/dist/generated/v1/ui-context-kind.d.ts +5 -0
- package/dist/generated/v1/ui-context-ref.d.ts +15 -0
- package/dist/generated/v1/ui-context-selector.d.ts +12 -0
- package/dist/generated/v1/ui-node-ref.d.ts +23 -0
- package/dist/generated/v1/ui-node.d.ts +26 -0
- package/dist/generated/v1/ui-rect.d.ts +10 -0
- package/dist/generated/v1/ui-snapshot-get-params.d.ts +13 -0
- package/dist/generated/v1/ui-snapshot-get-request.d.ts +22 -0
- package/dist/generated/v1/ui-snapshot-get-response.d.ts +81 -0
- package/dist/generated/v1/ui-snapshot-get-result.d.ts +56 -0
- package/dist/generated/v1/ui-snapshot-omission-reason.d.ts +5 -0
- package/dist/generated/v1/ui-snapshot-ref.d.ts +32 -0
- package/dist/generated/v1/ui-snapshot.d.ts +56 -0
- package/dist/generated/v1/verdict-record-params.d.ts +29 -0
- package/dist/generated/v1/verdict-record-request.d.ts +38 -0
- package/dist/generated/v1/verdict-record-response.d.ts +215 -0
- package/dist/generated/v1/verdict-record-result.d.ts +197 -0
- package/dist/generated/v1/verdict-status.d.ts +5 -0
- package/dist/generated/v1/verdict.d.ts +20 -0
- package/dist/generated/v1/viewport.d.ts +10 -0
- package/dist/generated/v1/wait-for-element-arguments.d.ts +35 -0
- package/dist/generated/v1/wait-for-element-condition.d.ts +5 -0
- package/dist/generated/v1/wait-for-element-result.d.ts +29 -0
- package/dist/index.d.ts +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type DeviceConnectResponse = DeviceConnectSuccessSchema | SystemHelloFailureSchema;
|
|
6
|
+
export type RpcIdSchema = string | number;
|
|
7
|
+
export type JsonRpcVersion = "2.0";
|
|
8
|
+
export type Platform = {
|
|
9
|
+
kind: "web";
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "android";
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
} | {
|
|
15
|
+
kind: "ios";
|
|
16
|
+
[k: string]: unknown;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "harmonyOs";
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "macOs";
|
|
22
|
+
[k: string]: unknown;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "windows";
|
|
25
|
+
[k: string]: unknown;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "linux";
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "rdp";
|
|
31
|
+
[k: string]: unknown;
|
|
32
|
+
} | {
|
|
33
|
+
kind: "mock";
|
|
34
|
+
[k: string]: unknown;
|
|
35
|
+
} | {
|
|
36
|
+
kind: "other";
|
|
37
|
+
value: string;
|
|
38
|
+
[k: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
export type NullableRpcIdSchema = RpcIdSchema | null;
|
|
41
|
+
export interface DeviceConnectSuccessSchema {
|
|
42
|
+
id: RpcIdSchema;
|
|
43
|
+
jsonrpc: JsonRpcVersion;
|
|
44
|
+
result: DeviceInfo;
|
|
45
|
+
}
|
|
46
|
+
export interface DeviceInfo {
|
|
47
|
+
connected: boolean;
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
osVersion?: string | null;
|
|
51
|
+
platform: Platform;
|
|
52
|
+
[k: string]: unknown;
|
|
53
|
+
}
|
|
54
|
+
export interface SystemHelloFailureSchema {
|
|
55
|
+
error: RpcError;
|
|
56
|
+
id: NullableRpcIdSchema;
|
|
57
|
+
jsonrpc: JsonRpcVersion;
|
|
58
|
+
}
|
|
59
|
+
export interface RpcError {
|
|
60
|
+
code: number;
|
|
61
|
+
data: ErrorInfo;
|
|
62
|
+
message: string;
|
|
63
|
+
}
|
|
64
|
+
export interface ErrorInfo {
|
|
65
|
+
code: string;
|
|
66
|
+
details?: unknown;
|
|
67
|
+
message: string;
|
|
68
|
+
retryable: boolean;
|
|
69
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type Platform = {
|
|
6
|
+
kind: "web";
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
} | {
|
|
9
|
+
kind: "android";
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "ios";
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
} | {
|
|
15
|
+
kind: "harmonyOs";
|
|
16
|
+
[k: string]: unknown;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "macOs";
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "windows";
|
|
22
|
+
[k: string]: unknown;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "linux";
|
|
25
|
+
[k: string]: unknown;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "rdp";
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "mock";
|
|
31
|
+
[k: string]: unknown;
|
|
32
|
+
} | {
|
|
33
|
+
kind: "other";
|
|
34
|
+
value: string;
|
|
35
|
+
[k: string]: unknown;
|
|
36
|
+
};
|
|
37
|
+
export interface DeviceConnectResult {
|
|
38
|
+
connected: boolean;
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
osVersion?: string | null;
|
|
42
|
+
platform: Platform;
|
|
43
|
+
[k: string]: unknown;
|
|
44
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type RpcIdSchema = string | number;
|
|
6
|
+
export type JsonRpcVersion = "2.0";
|
|
7
|
+
export type DeviceDisconnectMethodSchema = "device.disconnect";
|
|
8
|
+
export type NoParamsSchema = EmptyParamsObjectSchema | [];
|
|
9
|
+
/**
|
|
10
|
+
* A positive timeout in milliseconds that is safe to represent as a JSON
|
|
11
|
+
* number in every supported client language.
|
|
12
|
+
*/
|
|
13
|
+
export type RequestTimeoutMs = number;
|
|
14
|
+
export interface DeviceDisconnectRequest {
|
|
15
|
+
id: RpcIdSchema;
|
|
16
|
+
jsonrpc: JsonRpcVersion;
|
|
17
|
+
method: DeviceDisconnectMethodSchema;
|
|
18
|
+
params?: NoParamsSchema;
|
|
19
|
+
timeoutMs?: RequestTimeoutMs;
|
|
20
|
+
}
|
|
21
|
+
export type EmptyParamsObjectSchema = Record<string, never>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type DeviceDisconnectResponse = DeviceDisconnectSuccessSchema | SystemHelloFailureSchema;
|
|
6
|
+
export type RpcIdSchema = string | number;
|
|
7
|
+
export type JsonRpcVersion = "2.0";
|
|
8
|
+
export type NullableRpcIdSchema = RpcIdSchema | null;
|
|
9
|
+
export interface DeviceDisconnectSuccessSchema {
|
|
10
|
+
id: RpcIdSchema;
|
|
11
|
+
jsonrpc: JsonRpcVersion;
|
|
12
|
+
result: DeviceDisconnectResult;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Result returned by `device.disconnect`.
|
|
16
|
+
*/
|
|
17
|
+
export interface DeviceDisconnectResult {
|
|
18
|
+
disconnected: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface SystemHelloFailureSchema {
|
|
21
|
+
error: RpcError;
|
|
22
|
+
id: NullableRpcIdSchema;
|
|
23
|
+
jsonrpc: JsonRpcVersion;
|
|
24
|
+
}
|
|
25
|
+
export interface RpcError {
|
|
26
|
+
code: number;
|
|
27
|
+
data: ErrorInfo;
|
|
28
|
+
message: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ErrorInfo {
|
|
31
|
+
code: string;
|
|
32
|
+
details?: unknown;
|
|
33
|
+
message: string;
|
|
34
|
+
retryable: boolean;
|
|
35
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Result returned by `device.disconnect`.
|
|
7
|
+
*/
|
|
8
|
+
export interface DeviceDisconnectResult {
|
|
9
|
+
disconnected: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* A positive timeout in milliseconds that is safe to represent as a JSON
|
|
7
|
+
* number in every supported client language.
|
|
8
|
+
*/
|
|
9
|
+
export type RequestTimeoutMs = number;
|
|
10
|
+
/**
|
|
11
|
+
* Parameters for `device.execute`.
|
|
12
|
+
*
|
|
13
|
+
* The action fields intentionally remain flat on the wire. The optional
|
|
14
|
+
* timeout controls only the Driver action, while the request envelope timeout
|
|
15
|
+
* controls the request-scoped device-operation budget. Durable terminal event
|
|
16
|
+
* finalization is shielded so cancellation cannot leave a half-open Action.
|
|
17
|
+
*/
|
|
18
|
+
export interface DeviceExecuteParams {
|
|
19
|
+
actionTimeoutMs?: RequestTimeoutMs;
|
|
20
|
+
arguments?: unknown;
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type RpcIdSchema = string | number;
|
|
6
|
+
export type JsonRpcVersion = "2.0";
|
|
7
|
+
export type DeviceExecuteMethodSchema = "device.execute";
|
|
8
|
+
/**
|
|
9
|
+
* A positive timeout in milliseconds that is safe to represent as a JSON
|
|
10
|
+
* number in every supported client language.
|
|
11
|
+
*/
|
|
12
|
+
export type RequestTimeoutMs = number;
|
|
13
|
+
export interface DeviceExecuteRequest {
|
|
14
|
+
id: RpcIdSchema;
|
|
15
|
+
jsonrpc: JsonRpcVersion;
|
|
16
|
+
method: DeviceExecuteMethodSchema;
|
|
17
|
+
params: DeviceExecuteParams;
|
|
18
|
+
timeoutMs?: RequestTimeoutMs;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Parameters for `device.execute`.
|
|
22
|
+
*
|
|
23
|
+
* The action fields intentionally remain flat on the wire. The optional
|
|
24
|
+
* timeout controls only the Driver action, while the request envelope timeout
|
|
25
|
+
* controls the request-scoped device-operation budget. Durable terminal event
|
|
26
|
+
* finalization is shielded so cancellation cannot leave a half-open Action.
|
|
27
|
+
*/
|
|
28
|
+
export interface DeviceExecuteParams {
|
|
29
|
+
actionTimeoutMs?: RequestTimeoutMs;
|
|
30
|
+
arguments?: unknown;
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type DeviceExecuteResponse = DeviceExecuteSuccessSchema | SystemHelloFailureSchema;
|
|
6
|
+
export type RpcIdSchema = string | number;
|
|
7
|
+
export type JsonRpcVersion = "2.0";
|
|
8
|
+
export type ScreenshotOmissionReason = "policy" | "protectedAction";
|
|
9
|
+
export type UiContextKind = "native" | "web";
|
|
10
|
+
export type UiSnapshotOmissionReason = "driverUnsupported" | "policy" | "protectedAction";
|
|
11
|
+
export type ActionExecution = {
|
|
12
|
+
context: UiContextRef;
|
|
13
|
+
mode: "nativeSemantic";
|
|
14
|
+
} | {
|
|
15
|
+
context: UiContextRef;
|
|
16
|
+
mode: "webSemantic";
|
|
17
|
+
} | {
|
|
18
|
+
context: UiContextRef;
|
|
19
|
+
fallbackReason: CoordinateFallbackReason;
|
|
20
|
+
mode: "coordinateFallback";
|
|
21
|
+
};
|
|
22
|
+
export type CoordinateFallbackReason = "semanticInteractionUnavailable" | "platformLimitation";
|
|
23
|
+
export type NullableRpcIdSchema = RpcIdSchema | null;
|
|
24
|
+
export interface DeviceExecuteSuccessSchema {
|
|
25
|
+
id: RpcIdSchema;
|
|
26
|
+
jsonrpc: JsonRpcVersion;
|
|
27
|
+
result: ActionResult;
|
|
28
|
+
}
|
|
29
|
+
export interface ActionResult {
|
|
30
|
+
after?: Observation | null;
|
|
31
|
+
before?: Observation | null;
|
|
32
|
+
callId: string;
|
|
33
|
+
evidence?: AssetRef[];
|
|
34
|
+
execution?: ActionExecution | null;
|
|
35
|
+
finishedAtMs: number;
|
|
36
|
+
output: unknown;
|
|
37
|
+
startedAtMs: number;
|
|
38
|
+
[k: string]: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface Observation {
|
|
41
|
+
capturedAtMs: number;
|
|
42
|
+
deviceId: string;
|
|
43
|
+
id: string;
|
|
44
|
+
metadata?: {
|
|
45
|
+
[k: string]: unknown;
|
|
46
|
+
};
|
|
47
|
+
screenshot?: AssetRef | null;
|
|
48
|
+
screenshotOmission?: ScreenshotOmissionReason | null;
|
|
49
|
+
uiSnapshot?: UiSnapshotRef | null;
|
|
50
|
+
uiSnapshotOmission?: UiSnapshotOmissionReason | null;
|
|
51
|
+
viewport: Viewport;
|
|
52
|
+
[k: string]: unknown;
|
|
53
|
+
}
|
|
54
|
+
export interface AssetRef {
|
|
55
|
+
id: string;
|
|
56
|
+
mediaType: string;
|
|
57
|
+
sha256?: string | null;
|
|
58
|
+
uri: string;
|
|
59
|
+
[k: string]: unknown;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Small Observation-side reference to a UI Tree Evidence object.
|
|
63
|
+
*/
|
|
64
|
+
export interface UiSnapshotRef {
|
|
65
|
+
byteLength: number;
|
|
66
|
+
context: UiContextRef;
|
|
67
|
+
evidence: AssetRef;
|
|
68
|
+
formatVersion: number;
|
|
69
|
+
nodeCount: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Full identity of one native accessibility or web-document context.
|
|
73
|
+
* `documentEpoch` is required for both channels and changes after reconnect,
|
|
74
|
+
* navigation, or any replacement that invalidates prior node references.
|
|
75
|
+
*/
|
|
76
|
+
export interface UiContextRef {
|
|
77
|
+
contextId: string;
|
|
78
|
+
contextKind: UiContextKind;
|
|
79
|
+
documentEpoch: string;
|
|
80
|
+
}
|
|
81
|
+
export interface Viewport {
|
|
82
|
+
height: number;
|
|
83
|
+
scaleFactor: number;
|
|
84
|
+
width: number;
|
|
85
|
+
[k: string]: unknown;
|
|
86
|
+
}
|
|
87
|
+
export interface SystemHelloFailureSchema {
|
|
88
|
+
error: RpcError;
|
|
89
|
+
id: NullableRpcIdSchema;
|
|
90
|
+
jsonrpc: JsonRpcVersion;
|
|
91
|
+
}
|
|
92
|
+
export interface RpcError {
|
|
93
|
+
code: number;
|
|
94
|
+
data: ErrorInfo;
|
|
95
|
+
message: string;
|
|
96
|
+
}
|
|
97
|
+
export interface ErrorInfo {
|
|
98
|
+
code: string;
|
|
99
|
+
details?: unknown;
|
|
100
|
+
message: string;
|
|
101
|
+
retryable: boolean;
|
|
102
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type ScreenshotOmissionReason = "policy" | "protectedAction";
|
|
6
|
+
export type UiContextKind = "native" | "web";
|
|
7
|
+
export type UiSnapshotOmissionReason = "driverUnsupported" | "policy" | "protectedAction";
|
|
8
|
+
export type ActionExecution = {
|
|
9
|
+
context: UiContextRef;
|
|
10
|
+
mode: "nativeSemantic";
|
|
11
|
+
} | {
|
|
12
|
+
context: UiContextRef;
|
|
13
|
+
mode: "webSemantic";
|
|
14
|
+
} | {
|
|
15
|
+
context: UiContextRef;
|
|
16
|
+
fallbackReason: CoordinateFallbackReason;
|
|
17
|
+
mode: "coordinateFallback";
|
|
18
|
+
};
|
|
19
|
+
export type CoordinateFallbackReason = "semanticInteractionUnavailable" | "platformLimitation";
|
|
20
|
+
export interface DeviceExecuteResult {
|
|
21
|
+
after?: Observation | null;
|
|
22
|
+
before?: Observation | null;
|
|
23
|
+
callId: string;
|
|
24
|
+
evidence?: AssetRef[];
|
|
25
|
+
execution?: ActionExecution | null;
|
|
26
|
+
finishedAtMs: number;
|
|
27
|
+
output: unknown;
|
|
28
|
+
startedAtMs: number;
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
export interface Observation {
|
|
32
|
+
capturedAtMs: number;
|
|
33
|
+
deviceId: string;
|
|
34
|
+
id: string;
|
|
35
|
+
metadata?: {
|
|
36
|
+
[k: string]: unknown;
|
|
37
|
+
};
|
|
38
|
+
screenshot?: AssetRef | null;
|
|
39
|
+
screenshotOmission?: ScreenshotOmissionReason | null;
|
|
40
|
+
uiSnapshot?: UiSnapshotRef | null;
|
|
41
|
+
uiSnapshotOmission?: UiSnapshotOmissionReason | null;
|
|
42
|
+
viewport: Viewport;
|
|
43
|
+
[k: string]: unknown;
|
|
44
|
+
}
|
|
45
|
+
export interface AssetRef {
|
|
46
|
+
id: string;
|
|
47
|
+
mediaType: string;
|
|
48
|
+
sha256?: string | null;
|
|
49
|
+
uri: string;
|
|
50
|
+
[k: string]: unknown;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Small Observation-side reference to a UI Tree Evidence object.
|
|
54
|
+
*/
|
|
55
|
+
export interface UiSnapshotRef {
|
|
56
|
+
byteLength: number;
|
|
57
|
+
context: UiContextRef;
|
|
58
|
+
evidence: AssetRef;
|
|
59
|
+
formatVersion: number;
|
|
60
|
+
nodeCount: number;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Full identity of one native accessibility or web-document context.
|
|
64
|
+
* `documentEpoch` is required for both channels and changes after reconnect,
|
|
65
|
+
* navigation, or any replacement that invalidates prior node references.
|
|
66
|
+
*/
|
|
67
|
+
export interface UiContextRef {
|
|
68
|
+
contextId: string;
|
|
69
|
+
contextKind: UiContextKind;
|
|
70
|
+
documentEpoch: string;
|
|
71
|
+
}
|
|
72
|
+
export interface Viewport {
|
|
73
|
+
height: number;
|
|
74
|
+
scaleFactor: number;
|
|
75
|
+
width: number;
|
|
76
|
+
[k: string]: unknown;
|
|
77
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type Platform = {
|
|
6
|
+
kind: "web";
|
|
7
|
+
[k: string]: unknown;
|
|
8
|
+
} | {
|
|
9
|
+
kind: "android";
|
|
10
|
+
[k: string]: unknown;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "ios";
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
} | {
|
|
15
|
+
kind: "harmonyOs";
|
|
16
|
+
[k: string]: unknown;
|
|
17
|
+
} | {
|
|
18
|
+
kind: "macOs";
|
|
19
|
+
[k: string]: unknown;
|
|
20
|
+
} | {
|
|
21
|
+
kind: "windows";
|
|
22
|
+
[k: string]: unknown;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "linux";
|
|
25
|
+
[k: string]: unknown;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "rdp";
|
|
28
|
+
[k: string]: unknown;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "mock";
|
|
31
|
+
[k: string]: unknown;
|
|
32
|
+
} | {
|
|
33
|
+
kind: "other";
|
|
34
|
+
value: string;
|
|
35
|
+
[k: string]: unknown;
|
|
36
|
+
};
|
|
37
|
+
export interface DeviceInfo {
|
|
38
|
+
connected: boolean;
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
osVersion?: string | null;
|
|
42
|
+
platform: Platform;
|
|
43
|
+
[k: string]: unknown;
|
|
44
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type RpcIdSchema = string | number;
|
|
6
|
+
export type JsonRpcVersion = "2.0";
|
|
7
|
+
export type DeviceObserveMethodSchema = "device.observe";
|
|
8
|
+
export type NoParamsSchema = EmptyParamsObjectSchema | [];
|
|
9
|
+
/**
|
|
10
|
+
* A positive timeout in milliseconds that is safe to represent as a JSON
|
|
11
|
+
* number in every supported client language.
|
|
12
|
+
*/
|
|
13
|
+
export type RequestTimeoutMs = number;
|
|
14
|
+
export interface DeviceObserveRequest {
|
|
15
|
+
id: RpcIdSchema;
|
|
16
|
+
jsonrpc: JsonRpcVersion;
|
|
17
|
+
method: DeviceObserveMethodSchema;
|
|
18
|
+
params?: NoParamsSchema;
|
|
19
|
+
timeoutMs?: RequestTimeoutMs;
|
|
20
|
+
}
|
|
21
|
+
export type EmptyParamsObjectSchema = Record<string, never>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type DeviceObserveResponse = DeviceObserveSuccessSchema | SystemHelloFailureSchema;
|
|
6
|
+
export type RpcIdSchema = string | number;
|
|
7
|
+
export type JsonRpcVersion = "2.0";
|
|
8
|
+
export type ScreenshotOmissionReason = "policy" | "protectedAction";
|
|
9
|
+
export type UiContextKind = "native" | "web";
|
|
10
|
+
export type UiSnapshotOmissionReason = "driverUnsupported" | "policy" | "protectedAction";
|
|
11
|
+
export type NullableRpcIdSchema = RpcIdSchema | null;
|
|
12
|
+
export interface DeviceObserveSuccessSchema {
|
|
13
|
+
id: RpcIdSchema;
|
|
14
|
+
jsonrpc: JsonRpcVersion;
|
|
15
|
+
result: Observation;
|
|
16
|
+
}
|
|
17
|
+
export interface Observation {
|
|
18
|
+
capturedAtMs: number;
|
|
19
|
+
deviceId: string;
|
|
20
|
+
id: string;
|
|
21
|
+
metadata?: {
|
|
22
|
+
[k: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
screenshot?: AssetRef | null;
|
|
25
|
+
screenshotOmission?: ScreenshotOmissionReason | null;
|
|
26
|
+
uiSnapshot?: UiSnapshotRef | null;
|
|
27
|
+
uiSnapshotOmission?: UiSnapshotOmissionReason | null;
|
|
28
|
+
viewport: Viewport;
|
|
29
|
+
[k: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
export interface AssetRef {
|
|
32
|
+
id: string;
|
|
33
|
+
mediaType: string;
|
|
34
|
+
sha256?: string | null;
|
|
35
|
+
uri: string;
|
|
36
|
+
[k: string]: unknown;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Small Observation-side reference to a UI Tree Evidence object.
|
|
40
|
+
*/
|
|
41
|
+
export interface UiSnapshotRef {
|
|
42
|
+
byteLength: number;
|
|
43
|
+
context: UiContextRef;
|
|
44
|
+
evidence: AssetRef;
|
|
45
|
+
formatVersion: number;
|
|
46
|
+
nodeCount: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Full identity of one native accessibility or web-document context.
|
|
50
|
+
* `documentEpoch` is required for both channels and changes after reconnect,
|
|
51
|
+
* navigation, or any replacement that invalidates prior node references.
|
|
52
|
+
*/
|
|
53
|
+
export interface UiContextRef {
|
|
54
|
+
contextId: string;
|
|
55
|
+
contextKind: UiContextKind;
|
|
56
|
+
documentEpoch: string;
|
|
57
|
+
}
|
|
58
|
+
export interface Viewport {
|
|
59
|
+
height: number;
|
|
60
|
+
scaleFactor: number;
|
|
61
|
+
width: number;
|
|
62
|
+
[k: string]: unknown;
|
|
63
|
+
}
|
|
64
|
+
export interface SystemHelloFailureSchema {
|
|
65
|
+
error: RpcError;
|
|
66
|
+
id: NullableRpcIdSchema;
|
|
67
|
+
jsonrpc: JsonRpcVersion;
|
|
68
|
+
}
|
|
69
|
+
export interface RpcError {
|
|
70
|
+
code: number;
|
|
71
|
+
data: ErrorInfo;
|
|
72
|
+
message: string;
|
|
73
|
+
}
|
|
74
|
+
export interface ErrorInfo {
|
|
75
|
+
code: string;
|
|
76
|
+
details?: unknown;
|
|
77
|
+
message: string;
|
|
78
|
+
retryable: boolean;
|
|
79
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type ScreenshotOmissionReason = "policy" | "protectedAction";
|
|
6
|
+
export type UiContextKind = "native" | "web";
|
|
7
|
+
export type UiSnapshotOmissionReason = "driverUnsupported" | "policy" | "protectedAction";
|
|
8
|
+
export interface DeviceObserveResult {
|
|
9
|
+
capturedAtMs: number;
|
|
10
|
+
deviceId: string;
|
|
11
|
+
id: string;
|
|
12
|
+
metadata?: {
|
|
13
|
+
[k: string]: unknown;
|
|
14
|
+
};
|
|
15
|
+
screenshot?: AssetRef | null;
|
|
16
|
+
screenshotOmission?: ScreenshotOmissionReason | null;
|
|
17
|
+
uiSnapshot?: UiSnapshotRef | null;
|
|
18
|
+
uiSnapshotOmission?: UiSnapshotOmissionReason | null;
|
|
19
|
+
viewport: Viewport;
|
|
20
|
+
[k: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
export interface AssetRef {
|
|
23
|
+
id: string;
|
|
24
|
+
mediaType: string;
|
|
25
|
+
sha256?: string | null;
|
|
26
|
+
uri: string;
|
|
27
|
+
[k: string]: unknown;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Small Observation-side reference to a UI Tree Evidence object.
|
|
31
|
+
*/
|
|
32
|
+
export interface UiSnapshotRef {
|
|
33
|
+
byteLength: number;
|
|
34
|
+
context: UiContextRef;
|
|
35
|
+
evidence: AssetRef;
|
|
36
|
+
formatVersion: number;
|
|
37
|
+
nodeCount: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Full identity of one native accessibility or web-document context.
|
|
41
|
+
* `documentEpoch` is required for both channels and changes after reconnect,
|
|
42
|
+
* navigation, or any replacement that invalidates prior node references.
|
|
43
|
+
*/
|
|
44
|
+
export interface UiContextRef {
|
|
45
|
+
contextId: string;
|
|
46
|
+
contextKind: UiContextKind;
|
|
47
|
+
documentEpoch: string;
|
|
48
|
+
}
|
|
49
|
+
export interface Viewport {
|
|
50
|
+
height: number;
|
|
51
|
+
scaleFactor: number;
|
|
52
|
+
width: number;
|
|
53
|
+
[k: string]: unknown;
|
|
54
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Parameters accepted by `device.select`.
|
|
7
|
+
*/
|
|
8
|
+
export interface DeviceSelectParams {
|
|
9
|
+
deviceId: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated from the checked-in DeviceRail JSON Schema. DO NOT EDIT.
|
|
3
|
+
* Run `pnpm protocol:types:generate` from the repository root.
|
|
4
|
+
*/
|
|
5
|
+
export type RpcIdSchema = string | number;
|
|
6
|
+
export type JsonRpcVersion = "2.0";
|
|
7
|
+
export type DeviceSelectMethodSchema = "device.select";
|
|
8
|
+
export interface DeviceSelectRequest {
|
|
9
|
+
id: RpcIdSchema;
|
|
10
|
+
jsonrpc: JsonRpcVersion;
|
|
11
|
+
method: DeviceSelectMethodSchema;
|
|
12
|
+
params: DeviceSelectParams;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Parameters accepted by `device.select`.
|
|
16
|
+
*/
|
|
17
|
+
export interface DeviceSelectParams {
|
|
18
|
+
deviceId: string;
|
|
19
|
+
}
|