@kortix/agent-tunnel 0.13.53 → 0.13.54
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/README.md +74 -14
- package/dist/agent-cli.js +457 -246
- package/package.json +1 -1
- package/src/agent/access.test.ts +89 -0
- package/src/agent/access.ts +146 -4
- package/src/agent/agent.test.ts +136 -6
- package/src/agent/agent.ts +132 -12
- package/src/agent/capabilities/desktop/cua-driver.test.ts +43 -1
- package/src/agent/capabilities/desktop/cua-driver.ts +44 -4
- package/src/agent/capabilities/desktop.ts +41 -68
- package/src/agent/capabilities/enabled-registry.ts +2 -1
- package/src/agent/capabilities/security.test.ts +54 -16
- package/src/agent/cli-help.test.ts +53 -2
- package/src/agent/cli.ts +127 -19
- package/src/agent/self-restart.test.ts +24 -0
- package/src/agent/self-restart.ts +47 -0
- package/src/agent/service.test.ts +27 -1
- package/src/agent/service.ts +22 -1
- package/src/agent/state-file.test.ts +11 -1
- package/src/agent/state-file.ts +13 -1
- package/src/index.ts +1 -1
- package/src/shared/index.ts +1 -1
- package/src/shared/permissions.ts +26 -58
- package/src/shared/types.ts +8 -36
package/src/shared/types.ts
CHANGED
|
@@ -48,6 +48,10 @@ export const TunnelErrorCode = {
|
|
|
48
48
|
ACCESS_DENIED: -32011,
|
|
49
49
|
/** The owner turned computer access off on the machine. */
|
|
50
50
|
ACCESS_OFF: -32012,
|
|
51
|
+
/** macOS has not given the agent Accessibility or Screen Recording. */
|
|
52
|
+
DESKTOP_PERMISSION_MISSING: -32013,
|
|
53
|
+
/** A wider access asked for through Kortix that nobody confirmed on the machine. */
|
|
54
|
+
ACCESS_UNCONFIRMED: -32014,
|
|
51
55
|
} as const;
|
|
52
56
|
|
|
53
57
|
export type TunnelErrorCodeValue = (typeof TunnelErrorCode)[keyof typeof TunnelErrorCode];
|
|
@@ -68,47 +72,13 @@ export const TunnelMethods = {
|
|
|
68
72
|
'desktop.cua.list_tools': 'desktop',
|
|
69
73
|
'desktop.cua.describe': 'desktop',
|
|
70
74
|
'desktop.cua.call': 'desktop',
|
|
71
|
-
'desktop.cua.bring_to_front': 'desktop',
|
|
72
|
-
'desktop.cua.check_for_update': 'desktop',
|
|
73
|
-
'desktop.cua.check_permissions': 'desktop',
|
|
74
|
-
'desktop.cua.click': 'desktop',
|
|
75
|
-
'desktop.cua.double_click': 'desktop',
|
|
76
|
-
'desktop.cua.drag': 'desktop',
|
|
77
|
-
'desktop.cua.end_session': 'desktop',
|
|
78
|
-
'desktop.cua.get_accessibility_tree': 'desktop',
|
|
79
|
-
'desktop.cua.get_agent_cursor_state': 'desktop',
|
|
80
|
-
'desktop.cua.get_config': 'desktop',
|
|
81
|
-
'desktop.cua.get_cursor_position': 'desktop',
|
|
82
|
-
'desktop.cua.get_recording_state': 'desktop',
|
|
83
|
-
'desktop.cua.get_screen_size': 'desktop',
|
|
84
|
-
'desktop.cua.get_window_state': 'desktop',
|
|
85
|
-
'desktop.cua.hotkey': 'desktop',
|
|
86
|
-
'desktop.cua.kill_app': 'desktop',
|
|
87
|
-
'desktop.cua.launch_app': 'desktop',
|
|
88
|
-
'desktop.cua.list_apps': 'desktop',
|
|
89
|
-
'desktop.cua.list_windows': 'desktop',
|
|
90
|
-
'desktop.cua.move_cursor': 'desktop',
|
|
91
|
-
'desktop.cua.page': 'desktop',
|
|
92
|
-
'desktop.cua.press_key': 'desktop',
|
|
93
|
-
'desktop.cua.replay_trajectory': 'desktop',
|
|
94
|
-
'desktop.cua.right_click': 'desktop',
|
|
95
|
-
'desktop.cua.scroll': 'desktop',
|
|
96
|
-
'desktop.cua.set_agent_cursor_enabled': 'desktop',
|
|
97
|
-
'desktop.cua.set_agent_cursor_motion': 'desktop',
|
|
98
|
-
'desktop.cua.set_agent_cursor_style': 'desktop',
|
|
99
|
-
'desktop.cua.set_config': 'desktop',
|
|
100
|
-
'desktop.cua.set_value': 'desktop',
|
|
101
|
-
'desktop.cua.start_recording': 'desktop',
|
|
102
|
-
'desktop.cua.install_ffmpeg': 'desktop',
|
|
103
|
-
'desktop.cua.start_session': 'desktop',
|
|
104
|
-
'desktop.cua.stop_recording': 'desktop',
|
|
105
|
-
'desktop.cua.type_text': 'desktop',
|
|
106
|
-
'desktop.cua.zoom': 'desktop',
|
|
107
75
|
'tunnel.ping': null,
|
|
108
76
|
'tunnel.pong': null,
|
|
109
77
|
'tunnel.permission.revoked': null,
|
|
110
78
|
'tunnel.permissions.sync': null,
|
|
111
79
|
'tunnel.token.rotated': null,
|
|
80
|
+
/** The owner's access change, relayed by Kortix (owner-only route). Never a capability. */
|
|
81
|
+
'tunnel.access.set': null,
|
|
112
82
|
} as const;
|
|
113
83
|
|
|
114
84
|
export type TunnelMethod = keyof typeof TunnelMethods;
|
|
@@ -195,6 +165,8 @@ export interface TunnelAuthMessage {
|
|
|
195
165
|
* that enforces nothing connects with the same credential.
|
|
196
166
|
*/
|
|
197
167
|
reportsAccess?: boolean;
|
|
168
|
+
/** True from agents that serve `tunnel.access.set` (the owner's change, relayed). */
|
|
169
|
+
controlsAccess?: boolean;
|
|
198
170
|
}
|
|
199
171
|
|
|
200
172
|
/** Result returned by onAuthenticate hook on success. */
|