@jdg-keyforge/protocol 0.6.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.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -0
  3. package/dist/common.d.ts +171 -0
  4. package/dist/common.js +7 -0
  5. package/dist/envelope.d.ts +91 -0
  6. package/dist/envelope.js +7 -0
  7. package/dist/events/active_profile_changed.d.ts +16 -0
  8. package/dist/events/active_profile_changed.js +7 -0
  9. package/dist/events/input.d.ts +39 -0
  10. package/dist/events/input.js +7 -0
  11. package/dist/index.d.ts +17 -0
  12. package/dist/index.js +3 -0
  13. package/dist/methods/create_profile.d.ts +68 -0
  14. package/dist/methods/create_profile.js +7 -0
  15. package/dist/methods/delete_profile.d.ts +22 -0
  16. package/dist/methods/delete_profile.js +7 -0
  17. package/dist/methods/duplicate_profile.d.ts +72 -0
  18. package/dist/methods/duplicate_profile.js +7 -0
  19. package/dist/methods/get_auto_switch.d.ts +37 -0
  20. package/dist/methods/get_auto_switch.js +7 -0
  21. package/dist/methods/hello.d.ts +40 -0
  22. package/dist/methods/hello.js +7 -0
  23. package/dist/methods/list_actions.d.ts +69 -0
  24. package/dist/methods/list_actions.js +7 -0
  25. package/dist/methods/list_bindings.d.ts +52 -0
  26. package/dist/methods/list_bindings.js +7 -0
  27. package/dist/methods/list_devices.d.ts +76 -0
  28. package/dist/methods/list_devices.js +7 -0
  29. package/dist/methods/list_profiles.d.ts +73 -0
  30. package/dist/methods/list_profiles.js +7 -0
  31. package/dist/methods/rename_profile.d.ts +24 -0
  32. package/dist/methods/rename_profile.js +7 -0
  33. package/dist/methods/set_active_profile.d.ts +22 -0
  34. package/dist/methods/set_active_profile.js +7 -0
  35. package/dist/methods/set_auto_switch.d.ts +43 -0
  36. package/dist/methods/set_auto_switch.js +7 -0
  37. package/dist/methods/set_binding.d.ts +49 -0
  38. package/dist/methods/set_binding.js +7 -0
  39. package/package.json +48 -0
  40. package/src/common.ts +174 -0
  41. package/src/envelope.ts +94 -0
  42. package/src/events/active_profile_changed.ts +18 -0
  43. package/src/events/input.ts +42 -0
  44. package/src/index.ts +21 -0
  45. package/src/methods/create_profile.ts +71 -0
  46. package/src/methods/delete_profile.ts +24 -0
  47. package/src/methods/duplicate_profile.ts +75 -0
  48. package/src/methods/get_auto_switch.ts +39 -0
  49. package/src/methods/hello.ts +42 -0
  50. package/src/methods/list_actions.ts +71 -0
  51. package/src/methods/list_bindings.ts +55 -0
  52. package/src/methods/list_devices.ts +79 -0
  53. package/src/methods/list_profiles.ts +76 -0
  54. package/src/methods/rename_profile.ts +26 -0
  55. package/src/methods/set_active_profile.ts +24 -0
  56. package/src/methods/set_auto_switch.ts +45 -0
  57. package/src/methods/set_binding.ts +52 -0
package/src/common.ts ADDED
@@ -0,0 +1,174 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Stable identifier for a HID device. Format: VID_<hex>_PID_<hex>[_<serial>].
10
+ *
11
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
12
+ * via the `definition` "DeviceID".
13
+ */
14
+ export type DeviceID = string;
15
+ /**
16
+ * Kind of physical input.
17
+ *
18
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
19
+ * via the `definition` "InputKind".
20
+ */
21
+ export type InputKind = "key" | "encoder";
22
+ /**
23
+ * What happened on the input.
24
+ *
25
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
26
+ * via the `definition` "InputAction".
27
+ */
28
+ export type InputAction = "press" | "release" | "rotate_cw" | "rotate_ccw" | "click";
29
+
30
+ /**
31
+ * Shared type definitions referenced by message schemas.
32
+ */
33
+ export interface CommonTypes {
34
+ [k: string]: unknown;
35
+ }
36
+ /**
37
+ * A single hardware event coming from a HID device.
38
+ *
39
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
40
+ * via the `definition` "InputEvent".
41
+ */
42
+ export interface InputEvent {
43
+ device_id: DeviceID;
44
+ kind: InputKind;
45
+ /**
46
+ * Logical identifier of the input within the device (e.g. 'key_0x04', 'encoder_0'). Matches Device.inputs[].id.
47
+ */
48
+ input_id: string;
49
+ action: InputAction;
50
+ /**
51
+ * Unix epoch in milliseconds when the event was captured by the daemon.
52
+ */
53
+ timestamp_ms: number;
54
+ }
55
+ /**
56
+ * An executable action bound to an input.
57
+ *
58
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
59
+ * via the `definition` "Action".
60
+ */
61
+ export interface Action {
62
+ /**
63
+ * Action type. Built-ins are well-known; plugin actions use 'plugin.<plugin_id>.<action_id>'.
64
+ */
65
+ type: string;
66
+ /**
67
+ * Action-specific parameters. Schema depends on 'type'.
68
+ */
69
+ params?: {
70
+ [k: string]: unknown;
71
+ };
72
+ }
73
+ /**
74
+ * Maps an input on a specific device to an action.
75
+ *
76
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
77
+ * via the `definition` "Binding".
78
+ */
79
+ export interface Binding {
80
+ device_id: DeviceID;
81
+ input_id: string;
82
+ trigger: InputAction;
83
+ action: Action;
84
+ }
85
+ /**
86
+ * A named set of bindings. The daemon keeps exactly one profile active at a time; switching profiles swaps the active binding set.
87
+ *
88
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
89
+ * via the `definition` "Profile".
90
+ */
91
+ export interface Profile {
92
+ /**
93
+ * Stable server-generated identifier for the profile.
94
+ */
95
+ id: string;
96
+ /**
97
+ * Human-friendly profile name.
98
+ */
99
+ name: string;
100
+ /**
101
+ * Bindings that belong to this profile.
102
+ */
103
+ bindings: Binding[];
104
+ }
105
+ /**
106
+ * A single physical input exposed by a device (a key or an encoder).
107
+ *
108
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
109
+ * via the `definition` "Input".
110
+ */
111
+ export interface Input {
112
+ /**
113
+ * Logical identifier of the input within the device (e.g. 'key_0x04', 'encoder_0'). Matches InputEvent.input_id and Binding.input_id.
114
+ */
115
+ id: string;
116
+ kind: InputKind;
117
+ /**
118
+ * Human-friendly label for the input (e.g. 'Key 1', 'Encoder'). Optional; clients fall back to id.
119
+ */
120
+ label?: string;
121
+ }
122
+ /**
123
+ * A HID device known to the daemon. Returned by list_devices.
124
+ *
125
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
126
+ * via the `definition` "Device".
127
+ */
128
+ export interface Device {
129
+ id: DeviceID;
130
+ /**
131
+ * USB Vendor ID as a 4-digit hexadecimal string (lowercase or uppercase, no '0x' prefix).
132
+ */
133
+ vendor_id: string;
134
+ /**
135
+ * USB Product ID as a 4-digit hexadecimal string (lowercase or uppercase, no '0x' prefix).
136
+ */
137
+ product_id: string;
138
+ /**
139
+ * Manufacturer string from the HID descriptor. May be missing on cheap/clone devices.
140
+ */
141
+ manufacturer?: string;
142
+ /**
143
+ * Product name string from the HID descriptor.
144
+ */
145
+ product?: string;
146
+ /**
147
+ * Serial number string from the HID descriptor. Not all HID devices expose one.
148
+ */
149
+ serial_number?: string;
150
+ /**
151
+ * OS-opaque path used by the HID library to (re)open the device. Format varies per OS; clients should treat it as an opaque token.
152
+ */
153
+ path: string;
154
+ /**
155
+ * Inputs (keys/encoders) the daemon knows this device exposes. Empty for unrecognized devices the daemon can't map.
156
+ */
157
+ inputs: Input[];
158
+ }
159
+ /**
160
+ * Maps a foreground application to the profile that should become active while that app is frontmost. When the frontmost app matches no rule, the active profile is left unchanged (sticky behavior); there is no fallback profile.
161
+ *
162
+ * This interface was referenced by `CommonTypes`'s JSON-Schema
163
+ * via the `definition` "AutoSwitchRule".
164
+ */
165
+ export interface AutoSwitchRule {
166
+ /**
167
+ * OS-native application identifier: bundle id on macOS, executable name on Linux/Windows. Opaque string, not portable across OSes; the daemon matches it verbatim against the frontmost app.
168
+ */
169
+ app: string;
170
+ /**
171
+ * Identifier of the profile to activate when this app is frontmost.
172
+ */
173
+ profile_id: string;
174
+ }
@@ -0,0 +1,94 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Wire-level frame exchanged over the WebSocket transport. Every frame is one of three shapes discriminated by the 'type' field. Inner 'params'/'data'/'error' are intentionally generic here; method- and event-specific schemas refine them in a second validation pass.
10
+ */
11
+ export type Envelope = Request | Response | Event;
12
+ /**
13
+ * Server -> client. Discriminated by 'ok'.
14
+ */
15
+ export type Response = ResponseOk | ResponseErr;
16
+
17
+ /**
18
+ * Client -> server. Expects a correlated Response with the same id.
19
+ */
20
+ export interface Request {
21
+ type: "request";
22
+ /**
23
+ * Client-generated correlation id (UUID v4 or nanoid).
24
+ */
25
+ id: string;
26
+ /**
27
+ * Method name in snake_case.
28
+ */
29
+ method: string;
30
+ /**
31
+ * Method-specific arguments. Refined by the schema in schemas/methods/<method>.schema.json.
32
+ */
33
+ params: {
34
+ [k: string]: unknown;
35
+ };
36
+ }
37
+ export interface ResponseOk {
38
+ type: "response";
39
+ /**
40
+ * Echo of the original Request.id.
41
+ */
42
+ id: string;
43
+ ok: true;
44
+ /**
45
+ * Method-specific result. Refined by the schema in schemas/methods/<method>.schema.json.
46
+ */
47
+ data: {
48
+ [k: string]: unknown;
49
+ };
50
+ }
51
+ export interface ResponseErr {
52
+ type: "response";
53
+ /**
54
+ * Echo of the original Request.id.
55
+ */
56
+ id: string;
57
+ ok: false;
58
+ error: Error;
59
+ }
60
+ /**
61
+ * Failure payload returned in a Response with ok=false.
62
+ */
63
+ export interface Error {
64
+ /**
65
+ * Stable, machine-readable error code in SCREAMING_SNAKE_CASE.
66
+ */
67
+ code: string;
68
+ /**
69
+ * Human-readable error message. Free form, may be localized in future versions.
70
+ */
71
+ message: string;
72
+ /**
73
+ * Optional structured context for debugging.
74
+ */
75
+ details?: {
76
+ [k: string]: unknown;
77
+ };
78
+ }
79
+ /**
80
+ * Server -> client, no correlation. Stream of hardware events or daemon notifications.
81
+ */
82
+ export interface Event {
83
+ type: "event";
84
+ /**
85
+ * Event name in snake_case.
86
+ */
87
+ name: string;
88
+ /**
89
+ * Event-specific payload. Refined by the schema in schemas/events/<name>.schema.json.
90
+ */
91
+ data: {
92
+ [k: string]: unknown;
93
+ };
94
+ }
@@ -0,0 +1,18 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Pushed by the daemon whenever the active profile changes on the server's own initiative (today: auto-switch by foreground app). Lets clients stay in sync without polling. Not emitted in response to a client's set_active_profile request, which already returns the new id.
10
+ */
11
+ export interface EventActiveProfileChanged {
12
+ data: {
13
+ /**
14
+ * Identifier of the now-active profile.
15
+ */
16
+ active_profile_id: string;
17
+ };
18
+ }
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Stable identifier for a HID device. Format: VID_<hex>_PID_<hex>[_<serial>].
10
+ */
11
+ export type DeviceID = string;
12
+ /**
13
+ * Kind of physical input.
14
+ */
15
+ export type InputKind = "key" | "encoder";
16
+ /**
17
+ * What happened on the input.
18
+ */
19
+ export type InputAction = "press" | "release" | "rotate_cw" | "rotate_ccw" | "click";
20
+
21
+ /**
22
+ * Pushed by the daemon for every hardware event captured on a connected HID device. High-frequency: encoders may emit many per second.
23
+ */
24
+ export interface EventInput {
25
+ data: InputEvent;
26
+ }
27
+ /**
28
+ * A single hardware event coming from a HID device.
29
+ */
30
+ export interface InputEvent {
31
+ device_id: DeviceID;
32
+ kind: InputKind;
33
+ /**
34
+ * Logical identifier of the input within the device (e.g. 'key_0x04', 'encoder_0'). Matches Device.inputs[].id.
35
+ */
36
+ input_id: string;
37
+ action: InputAction;
38
+ /**
39
+ * Unix epoch in milliseconds when the event was captured by the daemon.
40
+ */
41
+ timestamp_ms: number;
42
+ }
package/src/index.ts ADDED
@@ -0,0 +1,21 @@
1
+ // AUTO-GENERATED by 'make generate-ts'. DO NOT EDIT BY HAND.
2
+
3
+ export * from './common.js';
4
+ export * from './envelope.js';
5
+
6
+ export type { MethodCreateProfile } from './methods/create_profile.js';
7
+ export type { MethodDeleteProfile } from './methods/delete_profile.js';
8
+ export type { MethodDuplicateProfile } from './methods/duplicate_profile.js';
9
+ export type { MethodGetAutoSwitch } from './methods/get_auto_switch.js';
10
+ export type { MethodHello } from './methods/hello.js';
11
+ export type { MethodListActions } from './methods/list_actions.js';
12
+ export type { MethodListBindings } from './methods/list_bindings.js';
13
+ export type { MethodListDevices } from './methods/list_devices.js';
14
+ export type { MethodListProfiles } from './methods/list_profiles.js';
15
+ export type { MethodRenameProfile } from './methods/rename_profile.js';
16
+ export type { MethodSetActiveProfile } from './methods/set_active_profile.js';
17
+ export type { MethodSetAutoSwitch } from './methods/set_auto_switch.js';
18
+ export type { MethodSetBinding } from './methods/set_binding.js';
19
+
20
+ export type { EventActiveProfileChanged } from './events/active_profile_changed.js';
21
+ export type { EventInput } from './events/input.js';
@@ -0,0 +1,71 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Stable identifier for a HID device. Format: VID_<hex>_PID_<hex>[_<serial>].
10
+ */
11
+ export type DeviceID = string;
12
+ /**
13
+ * What happened on the input.
14
+ */
15
+ export type InputAction = "press" | "release" | "rotate_cw" | "rotate_ccw" | "click";
16
+
17
+ /**
18
+ * Creates a new profile. The server generates the id and returns the profile with an empty bindings array.
19
+ */
20
+ export interface MethodCreateProfile {
21
+ params: {
22
+ /**
23
+ * Human-friendly name for the new profile.
24
+ */
25
+ name: string;
26
+ };
27
+ result: {
28
+ profile: Profile;
29
+ };
30
+ }
31
+ /**
32
+ * A named set of bindings. The daemon keeps exactly one profile active at a time; switching profiles swaps the active binding set.
33
+ */
34
+ export interface Profile {
35
+ /**
36
+ * Stable server-generated identifier for the profile.
37
+ */
38
+ id: string;
39
+ /**
40
+ * Human-friendly profile name.
41
+ */
42
+ name: string;
43
+ /**
44
+ * Bindings that belong to this profile.
45
+ */
46
+ bindings: Binding[];
47
+ }
48
+ /**
49
+ * Maps an input on a specific device to an action.
50
+ */
51
+ export interface Binding {
52
+ device_id: DeviceID;
53
+ input_id: string;
54
+ trigger: InputAction;
55
+ action: Action;
56
+ }
57
+ /**
58
+ * An executable action bound to an input.
59
+ */
60
+ export interface Action {
61
+ /**
62
+ * Action type. Built-ins are well-known; plugin actions use 'plugin.<plugin_id>.<action_id>'.
63
+ */
64
+ type: string;
65
+ /**
66
+ * Action-specific parameters. Schema depends on 'type'.
67
+ */
68
+ params?: {
69
+ [k: string]: unknown;
70
+ };
71
+ }
@@ -0,0 +1,24 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Deletes a profile. The daemon never deletes the last remaining profile. Deleting the active profile reassigns the active one, so the resulting active profile id is always returned.
10
+ */
11
+ export interface MethodDeleteProfile {
12
+ params: {
13
+ /**
14
+ * Identifier of the profile to delete.
15
+ */
16
+ id: string;
17
+ };
18
+ result: {
19
+ /**
20
+ * Identifier of the profile that is active after the deletion. Unchanged unless the deleted profile was the active one.
21
+ */
22
+ active_profile_id: string;
23
+ };
24
+ }
@@ -0,0 +1,75 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Stable identifier for a HID device. Format: VID_<hex>_PID_<hex>[_<serial>].
10
+ */
11
+ export type DeviceID = string;
12
+ /**
13
+ * What happened on the input.
14
+ */
15
+ export type InputAction = "press" | "release" | "rotate_cw" | "rotate_ccw" | "click";
16
+
17
+ /**
18
+ * Creates a copy of an existing profile under a new name. The server generates a new id and copies the source profile's bindings. Does not change the active profile.
19
+ */
20
+ export interface MethodDuplicateProfile {
21
+ params: {
22
+ /**
23
+ * Identifier of the source profile to copy bindings from.
24
+ */
25
+ id: string;
26
+ /**
27
+ * Human-friendly name for the new (duplicated) profile.
28
+ */
29
+ name: string;
30
+ };
31
+ result: {
32
+ profile: Profile;
33
+ };
34
+ }
35
+ /**
36
+ * A named set of bindings. The daemon keeps exactly one profile active at a time; switching profiles swaps the active binding set.
37
+ */
38
+ export interface Profile {
39
+ /**
40
+ * Stable server-generated identifier for the profile.
41
+ */
42
+ id: string;
43
+ /**
44
+ * Human-friendly profile name.
45
+ */
46
+ name: string;
47
+ /**
48
+ * Bindings that belong to this profile.
49
+ */
50
+ bindings: Binding[];
51
+ }
52
+ /**
53
+ * Maps an input on a specific device to an action.
54
+ */
55
+ export interface Binding {
56
+ device_id: DeviceID;
57
+ input_id: string;
58
+ trigger: InputAction;
59
+ action: Action;
60
+ }
61
+ /**
62
+ * An executable action bound to an input.
63
+ */
64
+ export interface Action {
65
+ /**
66
+ * Action type. Built-ins are well-known; plugin actions use 'plugin.<plugin_id>.<action_id>'.
67
+ */
68
+ type: string;
69
+ /**
70
+ * Action-specific parameters. Schema depends on 'type'.
71
+ */
72
+ params?: {
73
+ [k: string]: unknown;
74
+ };
75
+ }
@@ -0,0 +1,39 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Returns the current auto-switch configuration: the master toggle and the full set of app-to-profile rules. The daemon uses these to switch the active profile based on the foreground application.
10
+ */
11
+ export interface MethodGetAutoSwitch {
12
+ /**
13
+ * No parameters in v1.
14
+ */
15
+ params: {};
16
+ result: {
17
+ /**
18
+ * Master toggle. When false, the daemon ignores the rules and never auto-switches.
19
+ */
20
+ enabled: boolean;
21
+ /**
22
+ * App-to-profile rules currently configured.
23
+ */
24
+ rules: AutoSwitchRule[];
25
+ };
26
+ }
27
+ /**
28
+ * Maps a foreground application to the profile that should become active while that app is frontmost. When the frontmost app matches no rule, the active profile is left unchanged (sticky behavior); there is no fallback profile.
29
+ */
30
+ export interface AutoSwitchRule {
31
+ /**
32
+ * OS-native application identifier: bundle id on macOS, executable name on Linux/Windows. Opaque string, not portable across OSes; the daemon matches it verbatim against the frontmost app.
33
+ */
34
+ app: string;
35
+ /**
36
+ * Identifier of the profile to activate when this app is frontmost.
37
+ */
38
+ profile_id: string;
39
+ }
@@ -0,0 +1,42 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Mandatory first request after a WebSocket connection is established. The client declares the protocol_version it speaks. The server either accepts (Response.ok=true with its own identification) or closes the connection with an UNSUPPORTED_PROTOCOL_VERSION error. After a successful hello no further version negotiation happens; the contract is fixed for the session.
10
+ */
11
+ export interface MethodHello {
12
+ params: {
13
+ /**
14
+ * Major version of the protocol the client implements. Currently '1'.
15
+ */
16
+ protocol_version: "1";
17
+ client: PeerInfo;
18
+ };
19
+ result: {
20
+ /**
21
+ * Protocol version the server agrees to speak for this session.
22
+ */
23
+ protocol_version: "1";
24
+ server: PeerInfo;
25
+ };
26
+ }
27
+ /**
28
+ * Self-identification of a protocol peer (client or server).
29
+ *
30
+ * This interface was referenced by `MethodHello`'s JSON-Schema
31
+ * via the `definition` "PeerInfo".
32
+ */
33
+ export interface PeerInfo {
34
+ /**
35
+ * Stable identifier of the peer implementation.
36
+ */
37
+ name: string;
38
+ /**
39
+ * Semver version of the peer build.
40
+ */
41
+ version: string;
42
+ }
@@ -0,0 +1,71 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Returns the catalog of actions the daemon can bind to inputs, including the param shape each action needs so a client can render a config form. No params in v1.
10
+ */
11
+ export interface MethodListActions {
12
+ /**
13
+ * No parameters in v1.
14
+ */
15
+ params: {};
16
+ result: {
17
+ /**
18
+ * All actions available to bind. Built-ins plus any registered plugin actions.
19
+ */
20
+ actions: ActionDescriptor[];
21
+ };
22
+ }
23
+ /**
24
+ * Describes a bindable action type and the params it accepts.
25
+ *
26
+ * This interface was referenced by `MethodListActions`'s JSON-Schema
27
+ * via the `definition` "ActionDescriptor".
28
+ */
29
+ export interface ActionDescriptor {
30
+ /**
31
+ * Action type, as used in Action.type (e.g. 'launch_app').
32
+ */
33
+ type: string;
34
+ /**
35
+ * Human-friendly action name for the UI.
36
+ */
37
+ name: string;
38
+ /**
39
+ * Optional longer description of what the action does.
40
+ */
41
+ description?: string;
42
+ /**
43
+ * Params this action accepts, in display order.
44
+ */
45
+ params: ParamSpec[];
46
+ }
47
+ /**
48
+ * Describes one action parameter so a client can render an input for it.
49
+ *
50
+ * This interface was referenced by `MethodListActions`'s JSON-Schema
51
+ * via the `definition` "ParamSpec".
52
+ */
53
+ export interface ParamSpec {
54
+ /**
55
+ * Param key written into Action.params.
56
+ */
57
+ name: string;
58
+ /**
59
+ * Human-friendly field label.
60
+ */
61
+ label: string;
62
+ /**
63
+ * Param value type. Only 'string' in v1.
64
+ */
65
+ type: "string";
66
+ required: boolean;
67
+ /**
68
+ * Optional placeholder/example shown in the input.
69
+ */
70
+ placeholder?: string;
71
+ }