@elizaos/plugin-computeruse 2.0.0-beta.1 → 2.0.3-beta.2

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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +80 -0
  3. package/package.json +36 -10
  4. package/dist/actions/desktop-handlers.d.ts +0 -20
  5. package/dist/actions/desktop-handlers.d.ts.map +0 -1
  6. package/dist/actions/desktop.d.ts +0 -11
  7. package/dist/actions/desktop.d.ts.map +0 -1
  8. package/dist/actions/helpers.d.ts +0 -33
  9. package/dist/actions/helpers.d.ts.map +0 -1
  10. package/dist/actions/use-computer.d.ts +0 -3
  11. package/dist/actions/use-computer.d.ts.map +0 -1
  12. package/dist/approval-manager.d.ts +0 -29
  13. package/dist/approval-manager.d.ts.map +0 -1
  14. package/dist/index.d.ts +0 -33
  15. package/dist/index.d.ts.map +0 -1
  16. package/dist/index.js +0 -7132
  17. package/dist/index.js.map +0 -34
  18. package/dist/osworld/action-converter.d.ts +0 -35
  19. package/dist/osworld/action-converter.d.ts.map +0 -1
  20. package/dist/osworld/adapter.d.ts +0 -78
  21. package/dist/osworld/adapter.d.ts.map +0 -1
  22. package/dist/osworld/types.d.ts +0 -69
  23. package/dist/osworld/types.d.ts.map +0 -1
  24. package/dist/platform/a11y.d.ts +0 -36
  25. package/dist/platform/a11y.d.ts.map +0 -1
  26. package/dist/platform/browser.d.ts +0 -61
  27. package/dist/platform/browser.d.ts.map +0 -1
  28. package/dist/platform/capabilities.d.ts +0 -10
  29. package/dist/platform/capabilities.d.ts.map +0 -1
  30. package/dist/platform/desktop.d.ts +0 -33
  31. package/dist/platform/desktop.d.ts.map +0 -1
  32. package/dist/platform/driver.d.ts +0 -27
  33. package/dist/platform/driver.d.ts.map +0 -1
  34. package/dist/platform/file-ops.d.ts +0 -10
  35. package/dist/platform/file-ops.d.ts.map +0 -1
  36. package/dist/platform/helpers.d.ts +0 -61
  37. package/dist/platform/helpers.d.ts.map +0 -1
  38. package/dist/platform/nut-driver.d.ts +0 -19
  39. package/dist/platform/nut-driver.d.ts.map +0 -1
  40. package/dist/platform/permissions.d.ts +0 -21
  41. package/dist/platform/permissions.d.ts.map +0 -1
  42. package/dist/platform/screenshot.d.ts +0 -16
  43. package/dist/platform/screenshot.d.ts.map +0 -1
  44. package/dist/platform/security.d.ts +0 -12
  45. package/dist/platform/security.d.ts.map +0 -1
  46. package/dist/platform/terminal.d.ts +0 -38
  47. package/dist/platform/terminal.d.ts.map +0 -1
  48. package/dist/platform/windows-list.d.ts +0 -36
  49. package/dist/platform/windows-list.d.ts.map +0 -1
  50. package/dist/providers/computer-state.d.ts +0 -9
  51. package/dist/providers/computer-state.d.ts.map +0 -1
  52. package/dist/register-routes.d.ts +0 -2
  53. package/dist/register-routes.d.ts.map +0 -1
  54. package/dist/register-routes.js +0 -7111
  55. package/dist/register-routes.js.map +0 -34
  56. package/dist/routes/computer-use-compat-routes.d.ts +0 -29
  57. package/dist/routes/computer-use-compat-routes.d.ts.map +0 -1
  58. package/dist/routes/computer-use-routes.d.ts +0 -3
  59. package/dist/routes/computer-use-routes.d.ts.map +0 -1
  60. package/dist/routes/sandbox-routes.d.ts +0 -53
  61. package/dist/routes/sandbox-routes.d.ts.map +0 -1
  62. package/dist/services/computer-use-service.d.ts +0 -66
  63. package/dist/services/computer-use-service.d.ts.map +0 -1
  64. package/dist/services/desktop-control.d.ts +0 -35
  65. package/dist/services/desktop-control.d.ts.map +0 -1
  66. package/dist/types.d.ts +0 -275
  67. package/dist/types.d.ts.map +0 -1
@@ -1,35 +0,0 @@
1
- /**
2
- * Converts between OSWorld action formats and plugin-computeruse actions.
3
- *
4
- * Supports two OSWorld action spaces:
5
- * 1. "computer_13" — structured action dicts
6
- * 2. "pyautogui" — Python code strings
7
- */
8
- import type { DesktopActionParams } from "../types.js";
9
- import type { OSWorldAction } from "./types.js";
10
- /**
11
- * Convert an OSWorld computer_13 action to a DesktopActionParams.
12
- * Returns null for WAIT/DONE/FAIL (control flow, not desktop actions).
13
- */
14
- export declare function fromOSWorldAction(action: OSWorldAction): DesktopActionParams | null;
15
- /**
16
- * Convert a DesktopActionParams to an OSWorld computer_13 action.
17
- */
18
- export declare function toOSWorldAction(params: DesktopActionParams): OSWorldAction;
19
- /**
20
- * Parse a pyautogui Python code string into a DesktopActionParams.
21
- * Handles common patterns:
22
- * pyautogui.click(100, 200)
23
- * pyautogui.typewrite('hello')
24
- * pyautogui.press('return')
25
- * pyautogui.hotkey('ctrl', 'c')
26
- * pyautogui.moveTo(100, 200)
27
- * pyautogui.scroll(3)
28
- * pyautogui.doubleClick(100, 200)
29
- * pyautogui.rightClick(100, 200)
30
- * pyautogui.drag(100, 50)
31
- *
32
- * Returns null for WAIT/DONE/FAIL strings.
33
- */
34
- export declare function fromPyAutoGUI(code: string): DesktopActionParams | null;
35
- //# sourceMappingURL=action-converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-converter.d.ts","sourceRoot":"","sources":["../../src/osworld/action-converter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,aAAa,GACpB,mBAAmB,GAAG,IAAI,CAgG5B;AAID;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,mBAAmB,GAAG,aAAa,CAwE1E;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAkHtE"}
@@ -1,78 +0,0 @@
1
- /**
2
- * OSWorld benchmark adapter.
3
- *
4
- * Bridges the xlang-ai/OSWorld evaluation framework with plugin-computeruse.
5
- * Provides the observation/action loop expected by OSWorld:
6
- *
7
- * 1. getObservation() — capture screenshot + optional a11y tree
8
- * 2. executeAction() — execute an OSWorld action (computer_13 or pyautogui)
9
- * 3. step() — combined execute + observe (gymnasium-style)
10
- *
11
- * Usage:
12
- * const adapter = new OSWorldAdapter(computerUseService);
13
- * const obs = await adapter.getObservation("Open the settings app");
14
- * const result = await adapter.executeAction({ action_type: "CLICK", x: 100, y: 200 });
15
- * // or with pyautogui:
16
- * const result2 = await adapter.executePyAutoGUI("pyautogui.click(100, 200)");
17
- */
18
- import type { ComputerUseService } from "../services/computer-use-service.js";
19
- import type { OSWorldAction, OSWorldAgentConfig, OSWorldObservation, OSWorldStepResult } from "./types.js";
20
- export declare class OSWorldAdapter {
21
- private service;
22
- private config;
23
- private stepCount;
24
- private trajectory;
25
- constructor(service: ComputerUseService, config?: Partial<OSWorldAgentConfig>);
26
- /**
27
- * Capture the current screen state as an OSWorld observation.
28
- */
29
- getObservation(instruction: string): Promise<OSWorldObservation>;
30
- /**
31
- * Execute an OSWorld computer_13 action.
32
- * Returns true if the action was executed, false for control flow (WAIT/DONE/FAIL).
33
- */
34
- executeAction(action: OSWorldAction): Promise<{
35
- executed: boolean;
36
- done: boolean;
37
- failed: boolean;
38
- }>;
39
- /**
40
- * Execute a pyautogui Python code string.
41
- */
42
- executePyAutoGUI(code: string): Promise<{
43
- executed: boolean;
44
- done: boolean;
45
- failed: boolean;
46
- }>;
47
- /**
48
- * Execute an action and return the next observation (gymnasium step).
49
- * Matches the signature: step(action) → (obs, reward, done, info)
50
- */
51
- step(action: OSWorldAction | string, instruction: string): Promise<OSWorldStepResult>;
52
- /**
53
- * Reset the adapter for a new task.
54
- */
55
- reset(): void;
56
- /**
57
- * Get the full trajectory of actions and observations.
58
- */
59
- getTrajectory(): {
60
- action: OSWorldAction | string;
61
- observation: OSWorldObservation;
62
- timestamp: number;
63
- }[];
64
- /**
65
- * Get current step count.
66
- */
67
- getStepCount(): number;
68
- /**
69
- * Check if a11y tree extraction is available.
70
- */
71
- isA11yAvailable(): boolean;
72
- /**
73
- * Get adapter config.
74
- */
75
- getConfig(): OSWorldAgentConfig;
76
- private sleep;
77
- }
78
- //# sourceMappingURL=adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/osworld/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAM9E,OAAO,KAAK,EAEV,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,UAAU,CAIV;gBAGN,OAAO,EAAE,kBAAkB,EAC3B,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;IActC;;OAEG;IACG,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA2BtE;;;OAGG;IACG,aAAa,CACjB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;IAyBjE;;OAEG;IACG,gBAAgB,CACpB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;IA2BjE;;;OAGG;IACG,IAAI,CACR,MAAM,EAAE,aAAa,GAAG,MAAM,EAC9B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,iBAAiB,CAAC;IAuC7B;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,aAAa;gBA3KH,aAAa,GAAG,MAAM;qBACjB,kBAAkB;mBACpB,MAAM;;IA6KnB;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B;;OAEG;IACH,SAAS,IAAI,kBAAkB;IAM/B,OAAO,CAAC,KAAK;CAGd"}
@@ -1,69 +0,0 @@
1
- /**
2
- * OSWorld benchmark type definitions.
3
- *
4
- * These types match the interface expected by the xlang-ai/OSWorld
5
- * evaluation framework. The benchmark uses two action spaces:
6
- *
7
- * 1. "pyautogui" — Python code strings (e.g. "pyautogui.click(100, 200)")
8
- * 2. "computer_13" — Structured action dicts with action_type field
9
- *
10
- * Our adapter supports both and converts them to plugin-computeruse actions.
11
- */
12
- export interface OSWorldObservation {
13
- /** Base64-encoded PNG screenshot */
14
- screenshot: string;
15
- /** Text accessibility tree of the focused window (optional) */
16
- accessibility_tree?: string | null;
17
- /** Terminal output if relevant (optional) */
18
- terminal?: string | null;
19
- /** Task instruction */
20
- instruction: string;
21
- }
22
- /**
23
- * OSWorld computer_13 action types (15 enumerated actions including WAIT/DONE/FAIL).
24
- */
25
- export type OSWorldActionType = "CLICK" | "MOVE_TO" | "DOUBLE_CLICK" | "RIGHT_CLICK" | "SCROLL" | "DRAG_TO" | "TYPING" | "PRESS" | "KEY_DOWN" | "KEY_UP" | "HOTKEY" | "MOUSE_DOWN" | "MOUSE_UP" | "WAIT" | "DONE" | "FAIL";
26
- /**
27
- * Structured action in the computer_13 action space.
28
- */
29
- export interface OSWorldAction {
30
- action_type: OSWorldActionType;
31
- x?: number;
32
- y?: number;
33
- text?: string;
34
- keys?: string[];
35
- key?: string;
36
- dx?: number;
37
- dy?: number;
38
- button?: "left" | "right" | "middle";
39
- direction?: "up" | "down" | "left" | "right";
40
- amount?: number;
41
- }
42
- export type OSWorldObservationType = "screenshot" | "a11y_tree" | "screenshot_a11y_tree" | "som";
43
- export interface OSWorldTaskConfig {
44
- id: string;
45
- instruction: string;
46
- config?: Record<string, unknown>;
47
- domain?: string;
48
- evaluator?: Record<string, unknown>;
49
- }
50
- export interface OSWorldStepResult {
51
- observation: OSWorldObservation;
52
- reward: number;
53
- done: boolean;
54
- info: Record<string, unknown>;
55
- }
56
- export interface OSWorldAgentConfig {
57
- /** Action space to use: "pyautogui" (code strings) or "computer_13" (structured actions) */
58
- actionSpace: "pyautogui" | "computer_13";
59
- /** Observation type */
60
- observationType: OSWorldObservationType;
61
- /** Maximum trajectory length before giving up */
62
- maxTrajectoryLength: number;
63
- /** Whether to include a11y tree in observations */
64
- includeA11yTree: boolean;
65
- /** Screenshot delay after actions (ms) */
66
- screenshotDelayMs: number;
67
- }
68
- export declare const DEFAULT_AGENT_CONFIG: OSWorldAgentConfig;
69
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/osworld/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,MAAM,WAAW,kBAAkB;IACjC,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,uBAAuB;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB;AAID;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,OAAO,GACP,SAAS,GACT,cAAc,GACd,aAAa,GACb,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,UAAU,GACV,MAAM,GACN,MAAM,GACN,MAAM,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,iBAAiB,CAAC;IAC/B,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAA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ibility tree as part of the
5
- * observation. This module extracts a simplified a11y tree from the desktop
6
- * using native platform tools.
7
- *
8
- * macOS — System Accessibility API via osascript / swift
9
- * Linux — AT-SPI via python3-atspi or qdbus
10
- * Windows — UIAutomation via PowerShell
11
- */
12
- export interface A11yNode {
13
- role: string;
14
- name: string;
15
- description?: string;
16
- value?: string;
17
- bounds?: {
18
- x: number;
19
- y: number;
20
- width: number;
21
- height: number;
22
- };
23
- children?: A11yNode[];
24
- }
25
- /**
26
- * Extract the accessibility tree of the focused window / screen.
27
- * Returns a simplified plain-text accessibility tree suitable for LLM consumption.
28
- *
29
- * Returns null if a11y data is unavailable on the current platform.
30
- */
31
- export declare function extractA11yTree(): string | null;
32
- /**
33
- * Check if a11y tree extraction is available on this platform.
34
- */
35
- export declare function isA11yAvailable(): boolean;
36
- //# sourceMappingURL=a11y.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../../src/platform/a11y.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAkB/C;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAezC"}
@@ -1,61 +0,0 @@
1
- /**
2
- * Browser automation via Puppeteer Core + Chrome DevTools Protocol.
3
- *
4
- * Ported from coasty-ai/open-computer-use browser-automation.ts (Apache 2.0).
5
- *
6
- * Uses puppeteer-core (not full puppeteer) to avoid bundling Chromium.
7
- * Auto-detects installed Chrome, Edge, or Brave at launch.
8
- * Each session uses a temp user data directory to prevent conflicts.
9
- */
10
- import type { BrowserInfo, BrowserState, BrowserTab, ClickableElement } from "../types.js";
11
- export declare function setBrowserRuntimeOptions(options: {
12
- headless?: boolean;
13
- }): void;
14
- /**
15
- * Check if a Chromium-based browser is available.
16
- */
17
- export declare function isBrowserAvailable(): boolean;
18
- export declare function openBrowser(url?: string): Promise<BrowserState>;
19
- export declare function closeBrowser(): Promise<void>;
20
- export declare function navigateBrowser(url: string): Promise<BrowserState>;
21
- export declare function clickBrowser(selector?: string, coordinate?: [number, number], text?: string): Promise<void>;
22
- export declare function typeBrowser(text: string, selector?: string): Promise<void>;
23
- export declare function scrollBrowser(direction: "up" | "down", amount?: number): Promise<void>;
24
- export declare function getBrowserState(): Promise<BrowserState>;
25
- export declare function getBrowserContext(): Promise<BrowserState>;
26
- export declare function getBrowserInfo(): Promise<BrowserInfo>;
27
- export declare function getBrowserDom(): Promise<string>;
28
- export declare function getBrowserClickables(): Promise<ClickableElement[]>;
29
- export declare function screenshotBrowser(): Promise<string>;
30
- export declare function executeBrowser(code: string): Promise<string>;
31
- export declare function waitBrowser(selector?: string, text?: string, timeout?: number): Promise<void>;
32
- export declare function browserWait(selector?: string, text?: string, timeout?: number): Promise<{
33
- success: boolean;
34
- message?: string;
35
- error?: string;
36
- }>;
37
- export declare function listBrowserTabs(): Promise<BrowserTab[]>;
38
- export declare function openBrowserTab(url?: string): Promise<BrowserTab>;
39
- export declare function closeBrowserTab(tabId: string): Promise<void>;
40
- export declare function switchBrowserTab(tabId: string): Promise<BrowserState>;
41
- export declare const browser_open: typeof openBrowser;
42
- export declare const browser_connect: typeof openBrowser;
43
- export declare const browser_navigate: typeof navigateBrowser;
44
- export declare const browser_click: typeof clickBrowser;
45
- export declare const browser_type: typeof typeBrowser;
46
- export declare const browser_scroll: typeof scrollBrowser;
47
- export declare const browser_close: typeof closeBrowser;
48
- export declare const browser_execute: typeof executeBrowser;
49
- export declare const browser_screenshot: typeof screenshotBrowser;
50
- export declare const browser_dom: typeof getBrowserDom;
51
- export declare const browser_get_dom: typeof getBrowserDom;
52
- export declare const browser_get_clickables: typeof getBrowserClickables;
53
- export declare const browser_state: typeof getBrowserState;
54
- export declare const browser_get_context: typeof getBrowserContext;
55
- export declare const browser_info: typeof getBrowserInfo;
56
- export declare const browser_wait: typeof browserWait;
57
- export declare const browser_list_tabs: typeof listBrowserTabs;
58
- export declare const browser_open_tab: typeof openBrowserTab;
59
- export declare const browser_close_tab: typeof closeBrowserTab;
60
- export declare const browser_switch_tab: typeof switchBrowserTab;
61
- //# sourceMappingURL=browser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/platform/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EACV,WAAW,EACX,YAAY,EACZ,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AA6BrB,wBAAgB,wBAAwB,CAAC,OAAO,EAAE;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,IAAI,CAIP;AAsFD;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAkBD,wBAAsB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAwErE;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAmBlD;AAID,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CASxE;AAID,wBAAsB,YAAY,CAChC,QAAQ,CAAC,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC,CAmCf;AA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CAAC,IAAI,CAAC,CAWlE;AAED,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAc3E;AAED,eAAO,MAAM,YAAY,oBAAc,CAAC;AACxC,eAAO,MAAM,eAAe,oBAAc,CAAC;AAC3C,eAAO,MAAM,gBAAgB,wBAAkB,CAAC;AAChD,eAAO,MAAM,aAAa,qBAAe,CAAC;AAC1C,eAAO,MAAM,YAAY,oBAAc,CAAC;AACxC,eAAO,MAAM,cAAc,sBAAgB,CAAC;AAC5C,eAAO,MAAM,aAAa,qBAAe,CAAC;AAC1C,eAAO,MAAM,eAAe,uBAAiB,CAAC;AAC9C,eAAO,MAAM,kBAAkB,0BAAoB,CAAC;AACpD,eAAO,MAAM,WAAW,sBAAgB,CAAC;AACzC,eAAO,MAAM,eAAe,sBAAgB,CAAC;AAC7C,eAAO,MAAM,sBAAsB,6BAAuB,CAAC;AAC3D,eAAO,MAAM,aAAa,wBAAkB,CAAC;AAC7C,eAAO,MAAM,mBAAmB,0BAAoB,CAAC;AACrD,eAAO,MAAM,YAAY,uBAAiB,CAAC;AAC3C,eAAO,MAAM,YAAY,oBAAc,CAAC;AACxC,eAAO,MAAM,iBAAiB,wBAAkB,CAAC;AACjD,eAAO,MAAM,gBAAgB,uBAAiB,CAAC;AAC/C,eAAO,MAAM,iBAAiB,wBAAkB,CAAC;AACjD,eAAO,MAAM,kBAAkB,yBAAmB,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { PlatformCapabilities } from "../types.js";
2
- import type { PlatformOS } from "./helpers.js";
3
- export interface CapabilityDetectionOptions {
4
- osName: PlatformOS;
5
- commandExists: (command: string) => boolean;
6
- isBrowserAvailable: () => boolean;
7
- shell?: string;
8
- }
9
- export declare function detectPlatformCapabilities(options: CapabilityDetectionOptions): PlatformCapabilities;
10
- //# sourceMappingURL=capabilities.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/platform/capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,UAAU,CAAC;IACnB,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5C,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,0BAA0B,GAClC,oBAAoB,CAoEtB"}
@@ -1,33 +0,0 @@
1
- /**
2
- * Cross-platform desktop automation — mouse, keyboard, scroll, drag.
3
- *
4
- * Ported from coasty-ai/open-computer-use desktop-automation.ts (Apache 2.0)
5
- * and eliza sandbox-routes.ts performClick/performType/performKeypress.
6
- *
7
- * Platform backends:
8
- * macOS — cliclick (preferred, brew install cliclick) or AppleScript fallback
9
- * Linux — xdotool (required: sudo apt install xdotool)
10
- * Windows — PowerShell with user32.dll P/Invoke
11
- *
12
- * All coordinate inputs are validated via validateInt() to prevent injection.
13
- */
14
- export declare function desktopClick(x: number, y: number): void;
15
- export declare function desktopClickWithModifiers(x: number, y: number, modifiers: string[]): void;
16
- export declare function desktopDoubleClick(x: number, y: number): void;
17
- export declare function desktopRightClick(x: number, y: number): void;
18
- export declare function desktopMouseMove(x: number, y: number): void;
19
- export declare function desktopDrag(x1: number, y1: number, x2: number, y2: number): void;
20
- export declare function desktopScroll(x: number, y: number, direction: "up" | "down" | "left" | "right", amount?: number): void;
21
- export declare function desktopType(text: string): void;
22
- /**
23
- * Press a single key by name (e.g. "Return", "Tab", "Escape", "F5").
24
- */
25
- export declare function desktopKeyPress(key: string): void;
26
- /**
27
- * Press a key combination like "ctrl+c", "cmd+shift+s", "alt+F4".
28
- * Modifier names: ctrl, shift, alt, cmd/meta/super.
29
- *
30
- * Ported from open-computer-use desktopKeyCombo().
31
- */
32
- export declare function desktopKeyCombo(combo: string): void;
33
- //# sourceMappingURL=desktop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"desktop.d.ts","sourceRoot":"","sources":["../../src/platform/desktop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA+JH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAwCvD;AAED,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,MAAM,EAAE,GAClB,IAAI,CAmHN;AAID,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAmD7D;AAID,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAuC5D;AAID,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CA6B3D;AAID,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,IAAI,CAgEN;AAID,wBAAgB,aAAa,CAC3B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,EAC3C,MAAM,SAAI,GACT,IAAI,CAwDN;AAID,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAqC9C;AAID;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAgFjD;AAID;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAuHnD"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Driver-selection seam for desktop input + screenshot capture.
3
- *
4
- * Default = `nutjs` (cross-platform native bindings via @nut-tree-fork/nut-js).
5
- * Set `ELIZA_COMPUTERUSE_DRIVER=legacy` to fall back to the per-OS shell
6
- * drivers (cliclick/xdotool/PowerShell). The legacy drivers also activate
7
- * automatically when the nutjs native module fails to load.
8
- *
9
- * Each exported function dispatches to the chosen backend. Callers (the
10
- * service, actions, tests) use these wrappers; the underlying `desktop.ts`
11
- * and `screenshot.ts` modules remain importable for the legacy code path.
12
- */
13
- import type { ScreenRegion } from "../types.js";
14
- export type DriverName = "nutjs" | "legacy";
15
- export declare function selectedDriver(): DriverName;
16
- export declare function driverClick(x: number, y: number): Promise<void>;
17
- export declare function driverClickWithModifiers(x: number, y: number, modifiers: string[]): Promise<void>;
18
- export declare function driverDoubleClick(x: number, y: number): Promise<void>;
19
- export declare function driverRightClick(x: number, y: number): Promise<void>;
20
- export declare function driverMouseMove(x: number, y: number): Promise<void>;
21
- export declare function driverDrag(x1: number, y1: number, x2: number, y2: number): Promise<void>;
22
- export declare function driverScroll(x: number, y: number, direction: "up" | "down" | "left" | "right", amount?: number): Promise<void>;
23
- export declare function driverType(text: string): Promise<void>;
24
- export declare function driverKeyPress(key: string): Promise<void>;
25
- export declare function driverKeyCombo(combo: string): Promise<void>;
26
- export declare function driverCaptureScreenshot(region?: ScreenRegion): Promise<Buffer>;
27
- //# sourceMappingURL=driver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../src/platform/driver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA8BhD,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAI5C,wBAAgB,cAAc,IAAI,UAAU,CA0B3C;AAID,wBAAsB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGrE;AAED,wBAAsB,wBAAwB,CAC5C,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,MAAM,EAAE,GAClB,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG3E;AAED,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1E;AAED,wBAAsB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGzE;AAED,wBAAsB,UAAU,CAC9B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC,CAGf;AAED,wBAAsB,YAAY,CAChC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,EAC3C,MAAM,SAAI,GACT,OAAO,CAAC,IAAI,CAAC,CAGf;AAID,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG5D;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG/D;AAED,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGjE;AAID,wBAAsB,uBAAuB,CAC3C,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,MAAM,CAAC,CASjB"}
@@ -1,10 +0,0 @@
1
- import type { FileActionResult } from "../types.js";
2
- export declare function readFile(targetPath: string, encoding?: BufferEncoding): Promise<FileActionResult>;
3
- export declare function writeFile(targetPath: string, content: string): Promise<FileActionResult>;
4
- export declare function editFile(targetPath: string, oldText: string, newText: string): Promise<FileActionResult>;
5
- export declare function appendFile(targetPath: string, content: string): Promise<FileActionResult>;
6
- export declare function deleteFile(targetPath: string): Promise<FileActionResult>;
7
- export declare function fileExists(targetPath: string): Promise<FileActionResult>;
8
- export declare function listDirectory(targetPath: string): Promise<FileActionResult>;
9
- export declare function deleteDirectory(targetPath: string): Promise<FileActionResult>;
10
- //# sourceMappingURL=file-ops.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-ops.d.ts","sourceRoot":"","sources":["../../src/platform/file-ops.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,aAAa,CAAC;AAG/D,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,MAAM,EAClB,QAAQ,GAAE,cAAuB,GAChC,OAAO,CAAC,gBAAgB,CAAC,CAmB3B;AAED,wBAAsB,SAAS,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAoB3B;AAED,wBAAsB,QAAQ,CAC5B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CA0B3B;AAED,wBAAsB,UAAU,CAC9B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAoB3B;AAED,wBAAsB,UAAU,CAC9B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,gBAAgB,CAAC,CAmB3B;AAED,wBAAsB,UAAU,CAC9B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,gBAAgB,CAAC,CA0B3B;AAED,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,gBAAgB,CAAC,CAyB3B;AAED,wBAAsB,eAAe,CACnC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,gBAAgB,CAAC,CAmB3B"}
@@ -1,61 +0,0 @@
1
- /**
2
- * Shared platform utilities for computer-use plugin.
3
- *
4
- * Ported from coasty-ai/open-computer-use desktop-automation.ts
5
- * and eliza sandbox-routes.ts (Apache 2.0 / MIT).
6
- */
7
- /**
8
- * Check if a CLI tool is available on the system.
9
- */
10
- export declare function commandExists(cmd: string): boolean;
11
- /**
12
- * Run a command via execFileSync (no shell) with timeout.
13
- * Throws on non-zero exit or timeout.
14
- */
15
- export declare function runCommand(command: string, args: string[], timeout: number): string;
16
- /**
17
- * Run a command via execFileSync, returning the raw Buffer stdout.
18
- */
19
- export declare function runCommandBuffer(command: string, args: string[], timeout: number): void;
20
- /**
21
- * Run a shell command string (uses shell). Use sparingly — prefer runCommand.
22
- */
23
- export declare function runShellCommand(cmd: string, timeout: number): string;
24
- /**
25
- * Coerce a value to a safe integer to prevent shell injection via coordinates.
26
- * Ported from open-computer-use desktop-automation.ts validateInt().
27
- */
28
- export declare function validateInt(val: unknown): number;
29
- /**
30
- * Validate and clamp coordinates within screen bounds.
31
- */
32
- export declare function validateCoordinate(x: number, y: number, maxX: number, maxY: number): [number, number];
33
- /**
34
- * Validate a window/process identifier before interpolating it into a
35
- * platform shell command (AppleScript / PowerShell). Rejects anything that
36
- * is not a decimal integer or `0x`-prefixed hex, preventing escape out of
37
- * the surrounding script literal.
38
- */
39
- export declare function validateWindowId(windowId: string): string;
40
- /**
41
- * Validate text input length to prevent abuse.
42
- */
43
- export declare function validateText(text: string, maxLength?: number): string;
44
- /**
45
- * Safely escape a string for use inside an AppleScript double-quoted literal.
46
- * Ported from open-computer-use desktop-automation.ts.
47
- */
48
- export declare function escapeAppleScript(value: string): string;
49
- /**
50
- * Validate a key name for xdotool. Must be a known key name or a single
51
- * printable ASCII character.
52
- */
53
- export declare function safeXdotoolKey(key: string): string;
54
- export declare function validateKeypress(keys: string, maxLength?: number): string;
55
- export declare function canonicalKeyName(key: string): string;
56
- export declare function toCliclickKeyName(key: string): string;
57
- export declare function toXdotoolKeyName(key: string): string;
58
- export declare function toWindowsSendKey(key: string): string;
59
- export type PlatformOS = "darwin" | "linux" | "win32";
60
- export declare function currentPlatform(): PlatformOS;
61
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/platform/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAQlD;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,MAAM,GACd,MAAM,CAOR;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,MAAM,GACd,IAAI,CAKN;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAMpE;AAID;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAYhD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,CAAC,MAAM,EAAE,MAAM,CAAC,CAIlB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAWzD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,SAAO,GAAG,MAAM,CAQnE;AAID;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AA8DD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAgBlD;AAOD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,SAAM,GAAG,MAAM,CAetE;AAoCD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMpD;AAmBD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGrD;AAmBD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMpD;AAmBD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMpD;AAID,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD,wBAAgB,eAAe,IAAI,UAAU,CAM5C"}
@@ -1,19 +0,0 @@
1
- import type { ScreenRegion } from "../types.js";
2
- export declare function isAvailable(): boolean;
3
- export declare function loadFailureReason(): string | null;
4
- export declare function nutClick(x: number, y: number): Promise<void>;
5
- export declare function nutClickWithModifiers(x: number, y: number, modifiers: string[]): Promise<void>;
6
- export declare function nutDoubleClick(x: number, y: number): Promise<void>;
7
- export declare function nutRightClick(x: number, y: number): Promise<void>;
8
- export declare function nutMouseMove(x: number, y: number): Promise<void>;
9
- export declare function nutDrag(x1: number, y1: number, x2: number, y2: number): Promise<void>;
10
- export declare function nutScroll(x: number, y: number, direction: "up" | "down" | "left" | "right", amount: number): Promise<void>;
11
- export declare function nutType(text: string): Promise<void>;
12
- export declare function nutKeyPress(key: string): Promise<void>;
13
- export declare function nutKeyCombo(combo: string): Promise<void>;
14
- export declare function nutCaptureScreenshot(region?: ScreenRegion): Promise<Buffer>;
15
- export declare function nutScreenSize(): Promise<{
16
- width: number;
17
- height: number;
18
- }>;
19
- //# sourceMappingURL=nut-driver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nut-driver.d.ts","sourceRoot":"","sources":["../../src/platform/nut-driver.ts"],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W,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9D;AAID,wBAAsB,oBAAoB,CACxC,MAAM,CAAC,EAAE,YAAY,GACpB,OAAO,CAAC,MAAM,CAAC,CAiCjB;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAIhF"}
@@ -1,21 +0,0 @@
1
- import type { PermissionType } from "../types.js";
2
- type PermissionErrorOptions = {
3
- permissionType: PermissionType;
4
- operation: string;
5
- message: string;
6
- details?: string;
7
- };
8
- export type PermissionDeniedError = Error & {
9
- permissionDenied: true;
10
- permissionType: PermissionType;
11
- operation: string;
12
- details?: string;
13
- };
14
- export declare function createPermissionDeniedError(options: PermissionErrorOptions): PermissionDeniedError;
15
- export declare function isPermissionDeniedError(value: unknown): value is PermissionDeniedError;
16
- export declare function classifyPermissionDeniedError(error: unknown, fallback: {
17
- permissionType: PermissionType;
18
- operation: string;
19
- }): PermissionDeniedError | null;
20
- export {};
21
- //# sourceMappingURL=permissions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/platform/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,KAAK,sBAAsB,GAAG;IAC5B,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG;IAC1C,gBAAgB,EAAE,IAAI,CAAC;IACvB,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AASF,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,sBAAsB,GAC9B,qBAAqB,CAUvB;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,qBAAqB,CAQhC;AAcD,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE;IACR,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB,GACA,qBAAqB,GAAG,IAAI,CAkC9B"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Cross-platform screenshot capture.
3
- *
4
- * Ported from:
5
- * - coasty-ai/open-computer-use screenshot.ts (Apache 2.0)
6
- * - eliza sandbox-routes.ts captureScreenshot()
7
- *
8
- * Uses native CLI tools — no Electron dependency.
9
- * Full logical resolution is preserved (critical for accurate coordinate mapping).
10
- */
11
- import type { ScreenRegion } from "../types.js";
12
- /**
13
- * Capture a screenshot of the entire screen (or a region) and return as a Buffer (PNG).
14
- */
15
- export declare function captureScreenshot(region?: ScreenRegion): Buffer;
16
- //# sourceMappingURL=screenshot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../src/platform/screenshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAWhD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAkD/D"}
@@ -1,12 +0,0 @@
1
- export interface PathValidationResult {
2
- allowed: boolean;
3
- reason?: string;
4
- }
5
- export interface CommandRiskResult {
6
- blocked: boolean;
7
- reason?: string;
8
- }
9
- export declare function validateFilePath(filePath: string, operation: "read" | "write" | "delete"): PathValidationResult;
10
- export declare function sanitizeChildEnv(): Record<string, string | undefined>;
11
- export declare function checkDangerousCommand(command: string): CommandRiskResult;
12
- //# sourceMappingURL=security.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/platform/security.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA4ID,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GACrC,oBAAoB,CAkFtB;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAerE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAkBxE"}
@@ -1,38 +0,0 @@
1
- import type { TerminalActionResult } from "../types.js";
2
- export type TerminalSession = {
3
- id: string;
4
- cwd: string;
5
- createdAt: string;
6
- lastOutput?: string;
7
- };
8
- export declare function connectTerminal(arg?: string | {
9
- cwd?: string;
10
- }): TerminalActionResult;
11
- export declare function executeTerminal(params: {
12
- command: string;
13
- timeoutSeconds?: number;
14
- sessionId?: string;
15
- cwd?: string;
16
- }): Promise<TerminalActionResult>;
17
- export declare function readTerminal(arg?: string | {
18
- session_id?: string;
19
- sessionId?: string;
20
- }): TerminalActionResult;
21
- export declare function typeTerminal(arg: string | {
22
- text: string;
23
- session_id?: string;
24
- sessionId?: string;
25
- }): TerminalActionResult;
26
- export declare function clearTerminal(arg?: string | {
27
- session_id?: string;
28
- sessionId?: string;
29
- }): TerminalActionResult;
30
- export declare function closeTerminal(arg?: string | {
31
- session_id?: string;
32
- sessionId?: string;
33
- }): TerminalActionResult;
34
- export declare function closeAllTerminalSessions(): void;
35
- export declare function listTerminalSessions(): TerminalSession[];
36
- /** Alias of executeTerminal — upstream calls it execute_command. */
37
- export declare const executeCommand: typeof executeTerminal;
38
- //# sourceMappingUR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