@hybridlabor-api/aos 4.0.2 → 4.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/.claude/agents/database-reviewer.md +109 -0
- package/.claude/agents/go-build-resolver.md +112 -0
- package/.claude/agents/opensource-forker.md +216 -0
- package/.claude/agents/opensource-sanitizer.md +206 -0
- package/.claude/agents/security-reviewer.md +126 -0
- package/.claude/agents/silent-failure-hunter.md +68 -0
- package/CLAUDE.md +15 -0
- package/README.md +0 -13
- package/THIRD_PARTY_NOTICES.md +133 -0
- package/package.json +4 -2
- package/skills/basic/bdbmediastorm/SKILL.md +7 -1
- package/skills/basic/startcycle/SKILL.md +2 -0
- package/skills/bdbrainstorm/SKILL.md +1 -0
- package/skills/global_config/plan-canvas/SKILL.md +233 -0
- package/skills/global_config/plan-canvas/scripts/lib/loopback-guard.js +59 -0
- package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/markdown.js +301 -0
- package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/sdk.js +239 -0
- package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/server.js +636 -0
- package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/sessions.js +271 -0
- package/skills/global_config/plan-canvas/scripts/lib/plan-canvas/ui.js +630 -0
- package/skills/global_config/plan-canvas/scripts/plan-canvas.js +419 -0
- package/.agents/skills/firecrawl/SKILL.md +0 -149
- package/.agents/skills/firecrawl/rules/install.md +0 -82
- package/.agents/skills/firecrawl/rules/security.md +0 -26
- package/.agents/skills/firecrawl-agent/SKILL.md +0 -58
- package/.agents/skills/firecrawl-build/SKILL.md +0 -39
- package/.agents/skills/firecrawl-build-interact/SKILL.md +0 -68
- package/.agents/skills/firecrawl-build-onboarding/SKILL.md +0 -103
- package/.agents/skills/firecrawl-build-onboarding/references/auth-flow.md +0 -39
- package/.agents/skills/firecrawl-build-onboarding/references/project-setup.md +0 -20
- package/.agents/skills/firecrawl-build-onboarding/references/sdk-installation.md +0 -17
- package/.agents/skills/firecrawl-build-scrape/SKILL.md +0 -69
- package/.agents/skills/firecrawl-build-search/SKILL.md +0 -69
- package/.agents/skills/firecrawl-crawl/SKILL.md +0 -59
- package/.agents/skills/firecrawl-download/SKILL.md +0 -70
- package/.agents/skills/firecrawl-interact/SKILL.md +0 -84
- package/.agents/skills/firecrawl-map/SKILL.md +0 -51
- package/.agents/skills/firecrawl-scrape/SKILL.md +0 -69
- package/.agents/skills/firecrawl-search/SKILL.md +0 -60
- package/docs/sessions/AUDIT-HANDOVER-2026-08-28.md +0 -169
- package/docs/sessions/BDB_REMOTEOS_MCP_HANDOVER.md +0 -130
- package/docs/sessions/SESSION-HANDOVER-v3.13.md +0 -249
- package/mcps/RhinoMCP/cc-plugin/.claude/settings.json +0 -10
- package/mcps/after-effects-mcp/build/index.js +0 -840
- package/mcps/after-effects-mcp/build/scripts/applyEffect.jsx +0 -153
- package/mcps/after-effects-mcp/build/scripts/applyEffectTemplate.jsx +0 -218
- package/mcps/after-effects-mcp/build/scripts/createComposition.jsx +0 -71
- package/mcps/after-effects-mcp/build/scripts/createShapeLayer.jsx +0 -147
- package/mcps/after-effects-mcp/build/scripts/createSolidLayer.jsx +0 -114
- package/mcps/after-effects-mcp/build/scripts/createTextLayer.jsx +0 -115
- package/mcps/after-effects-mcp/build/scripts/getLayerInfo.jsx +0 -192
- package/mcps/after-effects-mcp/build/scripts/getProjectInfo.jsx +0 -90
- package/mcps/after-effects-mcp/build/scripts/listCompositions.jsx +0 -50
- package/mcps/after-effects-mcp/build/scripts/mcp-bridge-auto.jsx +0 -1773
- package/mcps/after-effects-mcp/build/scripts/setLayerProperties.jsx +0 -160
- package/mcps/bdb-remoteos-mcp/queue.db +0 -0
- package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/__init__.cpython-312.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/incus_client.cpython-312.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/main.cpython-312.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/queue.cpython-312.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/schemas.cpython-312.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/server.cpython-312.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/webhook.cpython-312.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/tests/__pycache__/__init__.cpython-312.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/tests/__pycache__/mock_incus.cpython-312.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_mcp_server.cpython-312-pytest-9.1.1.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_security_redteam.cpython-312-pytest-9.1.1.pyc +0 -0
- package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_webhook.cpython-312-pytest-9.1.1.pyc +0 -0
- package/mcps/computer-use-mcp/dist/client.d.ts +0 -150
- package/mcps/computer-use-mcp/dist/client.js +0 -136
- package/mcps/computer-use-mcp/dist/entrypoint.d.ts +0 -16
- package/mcps/computer-use-mcp/dist/entrypoint.js +0 -26
- package/mcps/computer-use-mcp/dist/native.d.ts +0 -212
- package/mcps/computer-use-mcp/dist/native.js +0 -50
- package/mcps/computer-use-mcp/dist/server.d.ts +0 -32
- package/mcps/computer-use-mcp/dist/server.js +0 -342
- package/mcps/computer-use-mcp/dist/session.d.ts +0 -101
- package/mcps/computer-use-mcp/dist/session.js +0 -2372
- package/skills/bdbsaastraining/scripts/__pycache__/build_profile.cpython-314.pyc +0 -0
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
// setLayerProperties.jsx
|
|
2
|
-
// Sets properties of a specified layer in a composition
|
|
3
|
-
|
|
4
|
-
function setLayerProperties(args) {
|
|
5
|
-
try {
|
|
6
|
-
// Extract parameters from args
|
|
7
|
-
var compName = args.compName || "";
|
|
8
|
-
var layerName = args.layerName || "";
|
|
9
|
-
var layerIndex = args.layerIndex; // If provided, used instead of layerName
|
|
10
|
-
var position = args.position; // [x, y] or [x, y, z]
|
|
11
|
-
var scale = args.scale; // [x, y] or [x, y, z] in percent (100 = 100%)
|
|
12
|
-
var rotation = args.rotation; // Rotation in degrees
|
|
13
|
-
var opacity = args.opacity; // 0-100
|
|
14
|
-
var startTime = args.startTime; // New in-point time
|
|
15
|
-
var duration = args.duration; // New duration
|
|
16
|
-
|
|
17
|
-
// Find the composition by name
|
|
18
|
-
var comp = null;
|
|
19
|
-
for (var i = 1; i <= app.project.numItems; i++) {
|
|
20
|
-
var item = app.project.item(i);
|
|
21
|
-
if (item instanceof CompItem && item.name === compName) {
|
|
22
|
-
comp = item;
|
|
23
|
-
break;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// If no composition was found by name, use the active composition
|
|
28
|
-
if (!comp) {
|
|
29
|
-
if (app.project.activeItem instanceof CompItem) {
|
|
30
|
-
comp = app.project.activeItem;
|
|
31
|
-
} else {
|
|
32
|
-
throw new Error("No composition found with name '" + compName + "' and no active composition");
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Find the layer
|
|
37
|
-
var layer = null;
|
|
38
|
-
if (layerIndex !== undefined && layerIndex !== null) {
|
|
39
|
-
// Try to get layer by index
|
|
40
|
-
if (layerIndex > 0 && layerIndex <= comp.numLayers) {
|
|
41
|
-
layer = comp.layer(layerIndex);
|
|
42
|
-
} else {
|
|
43
|
-
throw new Error("Layer index out of bounds: " + layerIndex);
|
|
44
|
-
}
|
|
45
|
-
} else if (layerName) {
|
|
46
|
-
// Try to get layer by name
|
|
47
|
-
for (var j = 1; j <= comp.numLayers; j++) {
|
|
48
|
-
if (comp.layer(j).name === layerName) {
|
|
49
|
-
layer = comp.layer(j);
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (!layer) {
|
|
56
|
-
throw new Error("Layer not found: " + (layerName || "index " + layerIndex));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Set properties if provided
|
|
60
|
-
var changedProperties = [];
|
|
61
|
-
|
|
62
|
-
// Position
|
|
63
|
-
if (position !== undefined && position !== null) {
|
|
64
|
-
layer.property("Position").setValue(position);
|
|
65
|
-
changedProperties.push("position");
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Scale
|
|
69
|
-
if (scale !== undefined && scale !== null) {
|
|
70
|
-
layer.property("Scale").setValue(scale);
|
|
71
|
-
changedProperties.push("scale");
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Rotation
|
|
75
|
-
if (rotation !== undefined && rotation !== null) {
|
|
76
|
-
// Check if we're dealing with a 3D layer
|
|
77
|
-
if (layer.threeDLayer) {
|
|
78
|
-
// For 3D layers, we need to set rotations individually
|
|
79
|
-
layer.property("Rotation").setValue([0, 0, rotation]);
|
|
80
|
-
} else {
|
|
81
|
-
// For 2D layers, simple rotation
|
|
82
|
-
layer.property("Rotation").setValue(rotation);
|
|
83
|
-
}
|
|
84
|
-
changedProperties.push("rotation");
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Opacity
|
|
88
|
-
if (opacity !== undefined && opacity !== null) {
|
|
89
|
-
layer.property("Opacity").setValue(opacity);
|
|
90
|
-
changedProperties.push("opacity");
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Timing
|
|
94
|
-
var timingChanged = false;
|
|
95
|
-
if (startTime !== undefined && startTime !== null) {
|
|
96
|
-
layer.startTime = startTime;
|
|
97
|
-
timingChanged = true;
|
|
98
|
-
changedProperties.push("startTime");
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (duration !== undefined && duration !== null && duration > 0) {
|
|
102
|
-
// Set outPoint based on startTime and duration
|
|
103
|
-
var actualStartTime = (startTime !== undefined && startTime !== null) ? startTime : layer.startTime;
|
|
104
|
-
layer.outPoint = actualStartTime + duration;
|
|
105
|
-
timingChanged = true;
|
|
106
|
-
changedProperties.push("duration");
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Return success with updated layer details
|
|
110
|
-
return JSON.stringify({
|
|
111
|
-
status: "success",
|
|
112
|
-
message: "Layer properties updated successfully",
|
|
113
|
-
layer: {
|
|
114
|
-
name: layer.name,
|
|
115
|
-
index: layer.index,
|
|
116
|
-
position: layer.property("Position").value,
|
|
117
|
-
scale: layer.property("Scale").value,
|
|
118
|
-
rotation: layer.threeDLayer
|
|
119
|
-
? layer.property("Rotation").value
|
|
120
|
-
: layer.property("Rotation").value,
|
|
121
|
-
opacity: layer.property("Opacity").value,
|
|
122
|
-
inPoint: layer.inPoint,
|
|
123
|
-
outPoint: layer.outPoint,
|
|
124
|
-
changedProperties: changedProperties
|
|
125
|
-
}
|
|
126
|
-
}, null, 2);
|
|
127
|
-
} catch (error) {
|
|
128
|
-
// Return error message
|
|
129
|
-
return JSON.stringify({
|
|
130
|
-
status: "error",
|
|
131
|
-
message: error.toString()
|
|
132
|
-
}, null, 2);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Read arguments from the file (passed by the Node.js script)
|
|
137
|
-
var argsFile = new File($.fileName.replace(/[^\\\/]*$/, '') + "../temp/args.json");
|
|
138
|
-
var args = {};
|
|
139
|
-
if (argsFile.exists) {
|
|
140
|
-
argsFile.open("r");
|
|
141
|
-
var content = argsFile.read();
|
|
142
|
-
argsFile.close();
|
|
143
|
-
if (content) {
|
|
144
|
-
try {
|
|
145
|
-
args = JSON.parse(content);
|
|
146
|
-
} catch (e) {
|
|
147
|
-
// Handle parsing error
|
|
148
|
-
$.write(JSON.stringify({
|
|
149
|
-
status: "error",
|
|
150
|
-
message: "Failed to parse arguments: " + e.toString()
|
|
151
|
-
}, null, 2));
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// Run the function and write the result
|
|
157
|
-
var result = setLayerProperties(args);
|
|
158
|
-
|
|
159
|
-
// Write the result so it can be captured by the Node.js process
|
|
160
|
-
$.write(result);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_mcp_server.cpython-312-pytest-9.1.1.pyc
DELETED
|
Binary file
|
package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_security_redteam.cpython-312-pytest-9.1.1.pyc
DELETED
|
Binary file
|
|
Binary file
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Computer Use MCP Client — typed API over MCP protocol.
|
|
3
|
-
*/
|
|
4
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
-
export interface ToolResult {
|
|
6
|
-
content: Array<{
|
|
7
|
-
type: 'text';
|
|
8
|
-
text: string;
|
|
9
|
-
} | {
|
|
10
|
-
type: 'image';
|
|
11
|
-
data: string;
|
|
12
|
-
mimeType: string;
|
|
13
|
-
}>;
|
|
14
|
-
isError?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export type FocusStrategy = 'strict' | 'best_effort' | 'none';
|
|
17
|
-
/** Optional window-targeting and focus strategy options for input methods. */
|
|
18
|
-
export interface WindowTargetOpts {
|
|
19
|
-
targetWindowId?: number;
|
|
20
|
-
focusStrategy?: FocusStrategy;
|
|
21
|
-
}
|
|
22
|
-
/** Options for semantic mutating tools — window_id is already required positionally. */
|
|
23
|
-
export interface SemanticOpts {
|
|
24
|
-
focusStrategy?: FocusStrategy;
|
|
25
|
-
}
|
|
26
|
-
/** Criteria for find_element — at least one must be present. */
|
|
27
|
-
export interface FindElementCriteria {
|
|
28
|
-
role?: string;
|
|
29
|
-
label?: string;
|
|
30
|
-
value?: string;
|
|
31
|
-
maxResults?: number;
|
|
32
|
-
}
|
|
33
|
-
/** A single field for fill_form. */
|
|
34
|
-
export interface FillFormField {
|
|
35
|
-
role: string;
|
|
36
|
-
label: string;
|
|
37
|
-
value: string;
|
|
38
|
-
}
|
|
39
|
-
export interface ComputerUseClient {
|
|
40
|
-
listTools(): Promise<Array<{
|
|
41
|
-
name: string;
|
|
42
|
-
description?: string;
|
|
43
|
-
}>>;
|
|
44
|
-
callTool(name: string, args?: Record<string, unknown>): Promise<ToolResult>;
|
|
45
|
-
close(): Promise<void>;
|
|
46
|
-
screenshot(args?: {
|
|
47
|
-
width?: number;
|
|
48
|
-
quality?: number;
|
|
49
|
-
target_app?: string;
|
|
50
|
-
target_window_id?: number;
|
|
51
|
-
provider?: 'anthropic' | 'openai' | 'openai-low' | 'gemini' | 'llama' | 'grok' | 'mistral' | 'qwen' | 'nova' | 'deepseek-vl' | 'phi' | 'auto';
|
|
52
|
-
}): Promise<ToolResult>;
|
|
53
|
-
zoom(region: [number, number, number, number], quality?: number): Promise<ToolResult>;
|
|
54
|
-
click(x: number, y: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
55
|
-
doubleClick(x: number, y: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
56
|
-
tripleClick(x: number, y: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
57
|
-
rightClick(x: number, y: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
58
|
-
middleClick(x: number, y: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
59
|
-
moveMouse(x: number, y: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
60
|
-
drag(to: [number, number], from?: [number, number], targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
61
|
-
mouseDown(x: number, y: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
62
|
-
mouseUp(x: number, y: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
63
|
-
type(text: string, targetApp?: string, opts?: WindowTargetOpts & {
|
|
64
|
-
clear?: boolean;
|
|
65
|
-
pressEnter?: boolean;
|
|
66
|
-
caretPosition?: 'start' | 'end' | 'idle';
|
|
67
|
-
}): Promise<ToolResult>;
|
|
68
|
-
key(combo: string, targetApp?: string, opts?: WindowTargetOpts & {
|
|
69
|
-
repeat?: number;
|
|
70
|
-
}): Promise<ToolResult>;
|
|
71
|
-
holdKey(keys: string[], durationSecs: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
72
|
-
scroll(x: number, y: number, direction: 'up' | 'down' | 'left' | 'right', amount?: number, targetApp?: string, opts?: WindowTargetOpts): Promise<ToolResult>;
|
|
73
|
-
readClipboard(): Promise<ToolResult>;
|
|
74
|
-
writeClipboard(text: string): Promise<ToolResult>;
|
|
75
|
-
openApp(bundleId: string): Promise<ToolResult>;
|
|
76
|
-
getFrontmostApp(): Promise<ToolResult>;
|
|
77
|
-
listWindows(bundleId?: string): Promise<ToolResult>;
|
|
78
|
-
cursorPosition(): Promise<ToolResult>;
|
|
79
|
-
wait(seconds: number): Promise<ToolResult>;
|
|
80
|
-
listRunningApps(): Promise<ToolResult>;
|
|
81
|
-
hideApp(bundleId: string): Promise<ToolResult>;
|
|
82
|
-
unhideApp(bundleId: string): Promise<ToolResult>;
|
|
83
|
-
getDisplaySize(displayId?: number): Promise<ToolResult>;
|
|
84
|
-
listDisplays(): Promise<ToolResult>;
|
|
85
|
-
getWindow(windowId: number): Promise<ToolResult>;
|
|
86
|
-
getCursorWindow(): Promise<ToolResult>;
|
|
87
|
-
activateApp(bundleId: string, timeoutMs?: number): Promise<ToolResult>;
|
|
88
|
-
activateWindow(windowId: number, timeoutMs?: number): Promise<ToolResult>;
|
|
89
|
-
getUiTree(windowId: number, maxDepth?: number): Promise<ToolResult>;
|
|
90
|
-
getFocusedElement(): Promise<ToolResult>;
|
|
91
|
-
findElement(windowId: number, criteria: FindElementCriteria): Promise<ToolResult>;
|
|
92
|
-
clickElement(windowId: number, role: string, label: string, opts?: SemanticOpts): Promise<ToolResult>;
|
|
93
|
-
setValue(windowId: number, role: string, label: string, value: string, opts?: SemanticOpts): Promise<ToolResult>;
|
|
94
|
-
pressButton(windowId: number, label: string, opts?: SemanticOpts): Promise<ToolResult>;
|
|
95
|
-
selectMenuItem(bundleId: string, menu: string, item: string, submenu?: string): Promise<ToolResult>;
|
|
96
|
-
listMenuBar(bundleId: string): Promise<ToolResult>;
|
|
97
|
-
fillForm(windowId: number, fields: FillFormField[], opts?: SemanticOpts): Promise<ToolResult>;
|
|
98
|
-
runScript(language: 'applescript' | 'javascript' | 'powershell', script: string, timeoutMs?: number): Promise<ToolResult>;
|
|
99
|
-
getAppDictionary(bundleId: string, suite?: string): Promise<ToolResult>;
|
|
100
|
-
getToolGuide(taskDescription: string): Promise<ToolResult>;
|
|
101
|
-
getAppCapabilities(bundleId: string): Promise<ToolResult>;
|
|
102
|
-
listSpaces(): Promise<ToolResult>;
|
|
103
|
-
getActiveSpace(): Promise<ToolResult>;
|
|
104
|
-
createAgentSpace(): Promise<ToolResult>;
|
|
105
|
-
moveWindowToSpace(windowId: number, spaceId: number): Promise<ToolResult>;
|
|
106
|
-
removeWindowFromSpace(windowId: number, spaceId: number): Promise<ToolResult>;
|
|
107
|
-
destroySpace(spaceId: number): Promise<ToolResult>;
|
|
108
|
-
getToolMetadata(toolName: string): Promise<ToolResult>;
|
|
109
|
-
filesystem(mode: string, path: string, opts?: Record<string, unknown>): Promise<ToolResult>;
|
|
110
|
-
processKill(mode: 'list' | 'kill', opts?: {
|
|
111
|
-
name?: string;
|
|
112
|
-
pid?: number;
|
|
113
|
-
force?: boolean;
|
|
114
|
-
}): Promise<ToolResult>;
|
|
115
|
-
registry(mode: string, path: string, opts?: {
|
|
116
|
-
name?: string;
|
|
117
|
-
value?: string;
|
|
118
|
-
type?: string;
|
|
119
|
-
}): Promise<ToolResult>;
|
|
120
|
-
notification(title: string, message: string, appId?: string): Promise<ToolResult>;
|
|
121
|
-
multiSelect(locs?: [number, number][], opts?: {
|
|
122
|
-
labels?: string[];
|
|
123
|
-
pressCtrl?: boolean;
|
|
124
|
-
targetApp?: string;
|
|
125
|
-
}): Promise<ToolResult>;
|
|
126
|
-
multiEdit(locs?: [number, number, string][], opts?: {
|
|
127
|
-
labels?: [string, string][];
|
|
128
|
-
targetApp?: string;
|
|
129
|
-
}): Promise<ToolResult>;
|
|
130
|
-
scrape(url: string, opts?: {
|
|
131
|
-
query?: string;
|
|
132
|
-
useDom?: boolean;
|
|
133
|
-
}): Promise<ToolResult>;
|
|
134
|
-
resizeWindow(opts: {
|
|
135
|
-
windowName?: string;
|
|
136
|
-
windowId?: number;
|
|
137
|
-
windowSize?: [number, number];
|
|
138
|
-
windowLoc?: [number, number];
|
|
139
|
-
}): Promise<ToolResult>;
|
|
140
|
-
snapshot(opts?: {
|
|
141
|
-
useVision?: boolean;
|
|
142
|
-
useAnnotation?: boolean;
|
|
143
|
-
gridLines?: [number, number];
|
|
144
|
-
display?: number[];
|
|
145
|
-
width?: number;
|
|
146
|
-
targetApp?: string;
|
|
147
|
-
}): Promise<ToolResult>;
|
|
148
|
-
}
|
|
149
|
-
export declare function connectStdio(command: string, args: string[], cwd?: string): Promise<ComputerUseClient>;
|
|
150
|
-
export declare function connectInProcess(server: McpServer): Promise<ComputerUseClient>;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Computer Use MCP Client — typed API over MCP protocol.
|
|
3
|
-
*/
|
|
4
|
-
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
5
|
-
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
6
|
-
import { InMemoryTransport } from '@modelcontextprotocol/sdk/inMemory.js';
|
|
7
|
-
export async function connectStdio(command, args, cwd) {
|
|
8
|
-
const transport = new StdioClientTransport({ command, args, cwd });
|
|
9
|
-
const client = new Client({ name: 'computer-use-client', version: '2.0.0' });
|
|
10
|
-
await client.connect(transport);
|
|
11
|
-
return wrap(client, () => client.close());
|
|
12
|
-
}
|
|
13
|
-
export async function connectInProcess(server) {
|
|
14
|
-
const [ct, st] = InMemoryTransport.createLinkedPair();
|
|
15
|
-
const client = new Client({ name: 'computer-use-client', version: '2.0.0' });
|
|
16
|
-
await server.connect(st);
|
|
17
|
-
await client.connect(ct);
|
|
18
|
-
return wrap(client, async () => { await client.close(); await server.close(); });
|
|
19
|
-
}
|
|
20
|
-
function targetArgs(app, opts) {
|
|
21
|
-
return {
|
|
22
|
-
...(app ? { target_app: app } : {}),
|
|
23
|
-
...(opts?.targetWindowId !== undefined ? { target_window_id: opts.targetWindowId } : {}),
|
|
24
|
-
...(opts?.focusStrategy ? { focus_strategy: opts.focusStrategy } : {}),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function wrap(client, closeFn) {
|
|
28
|
-
const call = async (name, args = {}) => (await client.callTool({ name, arguments: args }));
|
|
29
|
-
return {
|
|
30
|
-
async listTools() { return (await client.listTools()).tools.map(t => ({ name: t.name, description: t.description })); },
|
|
31
|
-
callTool: call,
|
|
32
|
-
close: closeFn,
|
|
33
|
-
screenshot: (args) => call('screenshot', args ?? {}),
|
|
34
|
-
zoom: (region, quality) => call('zoom', { region, ...(quality !== undefined ? { quality } : {}) }),
|
|
35
|
-
click: (x, y, app, opts) => call('left_click', { coordinate: [x, y], ...targetArgs(app, opts) }),
|
|
36
|
-
doubleClick: (x, y, app, opts) => call('double_click', { coordinate: [x, y], ...targetArgs(app, opts) }),
|
|
37
|
-
tripleClick: (x, y, app, opts) => call('triple_click', { coordinate: [x, y], ...targetArgs(app, opts) }),
|
|
38
|
-
rightClick: (x, y, app, opts) => call('right_click', { coordinate: [x, y], ...targetArgs(app, opts) }),
|
|
39
|
-
middleClick: (x, y, app, opts) => call('middle_click', { coordinate: [x, y], ...targetArgs(app, opts) }),
|
|
40
|
-
moveMouse: (x, y, app, opts) => call('mouse_move', { coordinate: [x, y], ...targetArgs(app, opts) }),
|
|
41
|
-
drag: (to, from, app, opts) => call('left_click_drag', { coordinate: to, ...(from ? { start_coordinate: from } : {}), ...targetArgs(app, opts) }),
|
|
42
|
-
mouseDown: (x, y, app, opts) => call('left_mouse_down', { coordinate: [x, y], ...targetArgs(app, opts) }),
|
|
43
|
-
mouseUp: (x, y, app, opts) => call('left_mouse_up', { coordinate: [x, y], ...targetArgs(app, opts) }),
|
|
44
|
-
type: (text, app, opts) => call('type', { text, ...targetArgs(app, opts), ...(opts?.clear !== undefined ? { clear: opts.clear } : {}), ...(opts?.pressEnter !== undefined ? { press_enter: opts.pressEnter } : {}), ...(opts?.caretPosition ? { caret_position: opts.caretPosition } : {}) }),
|
|
45
|
-
key: (combo, app, opts) => call('key', { text: combo, ...targetArgs(app, opts), ...(opts?.repeat !== undefined ? { repeat: opts.repeat } : {}) }),
|
|
46
|
-
holdKey: (keys, durationSecs, app, opts) => call('hold_key', { keys, duration: durationSecs, ...targetArgs(app, opts) }),
|
|
47
|
-
scroll: (x, y, dir, amt = 3, app, opts) => call('scroll', { coordinate: [x, y], direction: dir, amount: amt, ...targetArgs(app, opts) }),
|
|
48
|
-
readClipboard: () => call('read_clipboard'),
|
|
49
|
-
writeClipboard: (text) => call('write_clipboard', { text }),
|
|
50
|
-
openApp: (id) => call('open_application', { bundle_id: id }),
|
|
51
|
-
getFrontmostApp: () => call('get_frontmost_app'),
|
|
52
|
-
listWindows: (bundleId) => call('list_windows', bundleId ? { bundle_id: bundleId } : {}),
|
|
53
|
-
cursorPosition: () => call('cursor_position'),
|
|
54
|
-
wait: (s) => call('wait', { duration: s }),
|
|
55
|
-
listRunningApps: () => call('list_running_apps'),
|
|
56
|
-
hideApp: (id) => call('hide_app', { bundle_id: id }),
|
|
57
|
-
unhideApp: (id) => call('unhide_app', { bundle_id: id }),
|
|
58
|
-
getDisplaySize: (id) => call('get_display_size', id !== undefined ? { display_id: id } : {}),
|
|
59
|
-
listDisplays: () => call('list_displays'),
|
|
60
|
-
// v4 methods
|
|
61
|
-
getWindow: (windowId) => call('get_window', { window_id: windowId }),
|
|
62
|
-
getCursorWindow: () => call('get_cursor_window'),
|
|
63
|
-
activateApp: (bundleId, timeoutMs) => call('activate_app', { bundle_id: bundleId, ...(timeoutMs !== undefined ? { timeout_ms: timeoutMs } : {}) }),
|
|
64
|
-
activateWindow: (windowId, timeoutMs) => call('activate_window', { window_id: windowId, ...(timeoutMs !== undefined ? { timeout_ms: timeoutMs } : {}) }),
|
|
65
|
-
// v5: Accessibility observation
|
|
66
|
-
getUiTree: (windowId, maxDepth) => call('get_ui_tree', {
|
|
67
|
-
window_id: windowId,
|
|
68
|
-
...(maxDepth !== undefined ? { max_depth: maxDepth } : {}),
|
|
69
|
-
}),
|
|
70
|
-
getFocusedElement: () => call('get_focused_element'),
|
|
71
|
-
findElement: (windowId, criteria) => call('find_element', {
|
|
72
|
-
window_id: windowId,
|
|
73
|
-
...(criteria.role !== undefined ? { role: criteria.role } : {}),
|
|
74
|
-
...(criteria.label !== undefined ? { label: criteria.label } : {}),
|
|
75
|
-
...(criteria.value !== undefined ? { value: criteria.value } : {}),
|
|
76
|
-
...(criteria.maxResults !== undefined ? { max_results: criteria.maxResults } : {}),
|
|
77
|
-
}),
|
|
78
|
-
// v5: Semantic actions
|
|
79
|
-
clickElement: (windowId, role, label, opts) => call('click_element', {
|
|
80
|
-
window_id: windowId, role, label,
|
|
81
|
-
...(opts?.focusStrategy ? { focus_strategy: opts.focusStrategy } : {}),
|
|
82
|
-
}),
|
|
83
|
-
setValue: (windowId, role, label, value, opts) => call('set_value', {
|
|
84
|
-
window_id: windowId, role, label, value,
|
|
85
|
-
...(opts?.focusStrategy ? { focus_strategy: opts.focusStrategy } : {}),
|
|
86
|
-
}),
|
|
87
|
-
pressButton: (windowId, label, opts) => call('press_button', {
|
|
88
|
-
window_id: windowId, label,
|
|
89
|
-
...(opts?.focusStrategy ? { focus_strategy: opts.focusStrategy } : {}),
|
|
90
|
-
}),
|
|
91
|
-
selectMenuItem: (bundleId, menu, item, submenu) => call('select_menu_item', {
|
|
92
|
-
bundle_id: bundleId, menu, item,
|
|
93
|
-
...(submenu !== undefined ? { submenu } : {}),
|
|
94
|
-
}),
|
|
95
|
-
listMenuBar: (bundleId) => call('list_menu_bar', { bundle_id: bundleId }),
|
|
96
|
-
fillForm: (windowId, fields, opts) => call('fill_form', {
|
|
97
|
-
window_id: windowId, fields,
|
|
98
|
-
...(opts?.focusStrategy ? { focus_strategy: opts.focusStrategy } : {}),
|
|
99
|
-
}),
|
|
100
|
-
// v5: Scripting bridge
|
|
101
|
-
runScript: (language, script, timeoutMs) => call('run_script', {
|
|
102
|
-
language, script,
|
|
103
|
-
...(timeoutMs !== undefined ? { timeout_ms: timeoutMs } : {}),
|
|
104
|
-
}),
|
|
105
|
-
getAppDictionary: (bundleId, suite) => call('get_app_dictionary', {
|
|
106
|
-
bundle_id: bundleId,
|
|
107
|
-
...(suite !== undefined ? { suite } : {}),
|
|
108
|
-
}),
|
|
109
|
-
// v5: Strategy advisor
|
|
110
|
-
getToolGuide: (taskDescription) => call('get_tool_guide', { task_description: taskDescription }),
|
|
111
|
-
getAppCapabilities: (bundleId) => call('get_app_capabilities', { bundle_id: bundleId }),
|
|
112
|
-
// v5: Spaces
|
|
113
|
-
listSpaces: () => call('list_spaces'),
|
|
114
|
-
getActiveSpace: () => call('get_active_space'),
|
|
115
|
-
createAgentSpace: () => call('create_agent_space'),
|
|
116
|
-
moveWindowToSpace: (windowId, spaceId) => call('move_window_to_space', {
|
|
117
|
-
window_id: windowId, space_id: spaceId,
|
|
118
|
-
}),
|
|
119
|
-
removeWindowFromSpace: (windowId, spaceId) => call('remove_window_from_space', {
|
|
120
|
-
window_id: windowId, space_id: spaceId,
|
|
121
|
-
}),
|
|
122
|
-
destroySpace: (spaceId) => call('destroy_space', { space_id: spaceId }),
|
|
123
|
-
// v5.2: Tool metadata
|
|
124
|
-
getToolMetadata: (toolName) => call('get_tool_metadata', { tool_name: toolName }),
|
|
125
|
-
// Windows-parity tools
|
|
126
|
-
filesystem: (mode, path, opts) => call('filesystem', { mode, path, ...opts }),
|
|
127
|
-
processKill: (mode, opts) => call('process_kill', { mode, ...opts }),
|
|
128
|
-
registry: (mode, path, opts) => call('registry', { mode, path, ...opts }),
|
|
129
|
-
notification: (title, message, appId) => call('notification', { title, message, ...(appId ? { app_id: appId } : {}) }),
|
|
130
|
-
multiSelect: (locs, opts) => call('multi_select', { ...(locs ? { locs } : {}), ...(opts?.labels ? { labels: opts.labels } : {}), ...(opts?.pressCtrl !== undefined ? { press_ctrl: opts.pressCtrl } : {}), ...(opts?.targetApp ? { target_app: opts.targetApp } : {}) }),
|
|
131
|
-
multiEdit: (locs, opts) => call('multi_edit', { ...(locs ? { locs } : {}), ...(opts?.labels ? { labels: opts.labels } : {}), ...(opts?.targetApp ? { target_app: opts.targetApp } : {}) }),
|
|
132
|
-
scrape: (url, opts) => call('scrape', { url, ...(opts?.query ? { query: opts.query } : {}), ...(opts?.useDom !== undefined ? { use_dom: opts.useDom } : {}) }),
|
|
133
|
-
resizeWindow: (opts) => call('resize_window', { ...(opts.windowName ? { window_name: opts.windowName } : {}), ...(opts.windowId !== undefined ? { window_id: opts.windowId } : {}), ...(opts.windowSize ? { window_size: opts.windowSize } : {}), ...(opts.windowLoc ? { window_loc: opts.windowLoc } : {}) }),
|
|
134
|
-
snapshot: (opts) => call('snapshot', { ...(opts?.useVision !== undefined ? { use_vision: opts.useVision } : {}), ...(opts?.useAnnotation !== undefined ? { use_annotation: opts.useAnnotation } : {}), ...(opts?.gridLines ? { grid_lines: opts.gridLines } : {}), ...(opts?.display ? { display: opts.display } : {}), ...(opts?.width ? { width: opts.width } : {}), ...(opts?.targetApp ? { target_app: opts.targetApp } : {}) }),
|
|
135
|
-
};
|
|
136
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standalone stdio entrypoint detection.
|
|
3
|
-
*
|
|
4
|
-
* Determines whether the current Node process was invoked as the
|
|
5
|
-
* computer-use-mcp stdio server (e.g. `node dist/server.js` or
|
|
6
|
-
* `npx @zavora-ai/computer-use-mcp`) vs imported as a library.
|
|
7
|
-
*
|
|
8
|
-
* Path-separator-agnostic: Node normalizes `process.argv[1]` to the platform
|
|
9
|
-
* separator, so a hard-coded `/` check rejects valid Windows invocations like
|
|
10
|
-
* `C:\path\to\server.js`. Without this, the server silently exits without
|
|
11
|
-
* starting StdioServerTransport on every Windows host.
|
|
12
|
-
*
|
|
13
|
-
* Kept in its own module (no native imports) so the helper is unit-testable
|
|
14
|
-
* without building the Rust NAPI binary.
|
|
15
|
-
*/
|
|
16
|
-
export declare function isStdioEntrypoint(argv1: string | undefined): boolean;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Standalone stdio entrypoint detection.
|
|
3
|
-
*
|
|
4
|
-
* Determines whether the current Node process was invoked as the
|
|
5
|
-
* computer-use-mcp stdio server (e.g. `node dist/server.js` or
|
|
6
|
-
* `npx @zavora-ai/computer-use-mcp`) vs imported as a library.
|
|
7
|
-
*
|
|
8
|
-
* Path-separator-agnostic: Node normalizes `process.argv[1]` to the platform
|
|
9
|
-
* separator, so a hard-coded `/` check rejects valid Windows invocations like
|
|
10
|
-
* `C:\path\to\server.js`. Without this, the server silently exits without
|
|
11
|
-
* starting StdioServerTransport on every Windows host.
|
|
12
|
-
*
|
|
13
|
-
* Kept in its own module (no native imports) so the helper is unit-testable
|
|
14
|
-
* without building the Rust NAPI binary.
|
|
15
|
-
*/
|
|
16
|
-
export function isStdioEntrypoint(argv1) {
|
|
17
|
-
if (!argv1)
|
|
18
|
-
return false;
|
|
19
|
-
// Normalize backslashes to forward slashes once, then match against the
|
|
20
|
-
// POSIX-style suffixes. Cheaper and clearer than checking both separators
|
|
21
|
-
// for every suffix.
|
|
22
|
-
const normalized = argv1.replace(/\\/g, '/');
|
|
23
|
-
return (normalized.endsWith('/server.ts') ||
|
|
24
|
-
normalized.endsWith('/server.js') ||
|
|
25
|
-
normalized.endsWith('/computer-use-mcp'));
|
|
26
|
-
}
|