Updates
Rolling release / release (push) Successful in 8m31s

This commit is contained in:
2026-09-13 15:08:05 -04:00
parent b56171da9b
commit c5ccaa490b
29 changed files with 933 additions and 146 deletions
+9 -9
View File
@@ -1,14 +1,14 @@
export function createComputerActTools({ actuator } = {}) {
const call = (method) => async (args) => { if (!actuator) throw new Error('computer-use actuator is unavailable'); return actuator[method](args); };
return [
['cu_act', 'Run a named AT-SPI action on a semantic ref.', { ref: { type: 'string' }, action: { type: 'string' } }, 'act'],
['cu_click', 'Click a semantic ref or coordinate.', { ref: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' }, button: { type: 'string' } }, 'click'],
['cu_double_click', 'Double-click a coordinate.', { x: { type: 'number' }, y: { type: 'number' } }, 'doubleClick'],
['cu_right_click', 'Right-click a coordinate.', { x: { type: 'number' }, y: { type: 'number' } }, 'rightClick'],
['cu_hover', 'Move the visible agent cursor.', { x: { type: 'number' }, y: { type: 'number' } }, 'hover'],
['cu_scroll', 'Scroll at a target.', { ref: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' }, dy: { type: 'number' }, dx: { type: 'number' } }, 'scroll'],
['cu_act', 'Run a named AT-SPI action on a semantic ref. Desktop grant required; do not paste the result JSON to the user.', { ref: { type: 'string' }, action: { type: 'string' } }, 'act'],
['cu_click', 'Click a control. Prefer a tree ref from cu_observe or cu_find; coordinates are the fallback. Desktop grant required.', { ref: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' }, button: { type: 'string' } }, 'click'],
['cu_double_click', 'Double-click a control or coordinate.', { ref: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' } }, 'doubleClick'],
['cu_right_click', 'Right-click a control or coordinate.', { ref: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' } }, 'rightClick'],
['cu_hover', 'Move the pointer to a control or coordinate.', { ref: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' } }, 'hover'],
['cu_scroll', 'Scroll at a control or coordinate.', { ref: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' }, dy: { type: 'number' }, dx: { type: 'number' } }, 'scroll'],
['cu_drag', 'Drag between semantic refs or coordinates.', { from: { type: 'object', properties: { ref: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' } } }, to: { type: 'object', properties: { ref: { type: 'string' }, x: { type: 'number' }, y: { type: 'number' } } } }, 'drag'],
['cu_type', 'Type Unicode through the granted input backend.', { text: { type: 'string' }, ref: { type: 'string' }, submit: { type: 'boolean' } }, 'type'],
['cu_key', 'Send a keyboard combination through the granted input backend.', { combo: { type: 'string' } }, 'key'],
].map(([name, description, properties, method]) => ({ name, permission: 'computer-use', description, parameters: { type: 'object', properties }, execute: call(method) }));
['cu_type', 'Click the target if given, then type Unicode. Use a text, entry, or document ref from cu_find. Desktop grant required.', { text: { type: 'string' }, ref: { type: 'string' }, submit: { type: 'boolean' } }, 'type'],
['cu_key', 'Send a keyboard combination such as enter, ctrl+l, or alt+tab.', { combo: { type: 'string' } }, 'key'],
].map(([name, description, properties, method]) => ({ name, permission: 'read', description, parameters: { type: 'object', properties }, execute: call(method) }));
}