@hasna/computer 0.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/LICENSE +189 -0
- package/README.md +151 -0
- package/dist/agent/loop.d.ts +7 -0
- package/dist/agent/loop.d.ts.map +1 -0
- package/dist/agent/safety.d.ts +15 -0
- package/dist/agent/safety.d.ts.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +12221 -0
- package/dist/db/index.d.ts +46 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/drivers/mac/index.d.ts +14 -0
- package/dist/drivers/mac/index.d.ts.map +1 -0
- package/dist/drivers/mac/input.d.ts +6 -0
- package/dist/drivers/mac/input.d.ts.map +1 -0
- package/dist/drivers/mac/screenshot.d.ts +15 -0
- package/dist/drivers/mac/screenshot.d.ts.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10012 -0
- package/dist/lib/config.d.ts +33 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/diff.d.ts +22 -0
- package/dist/lib/diff.d.ts.map +1 -0
- package/dist/lib/pricing.d.ts +18 -0
- package/dist/lib/pricing.d.ts.map +1 -0
- package/dist/lib/scale.d.ts +26 -0
- package/dist/lib/scale.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +14063 -0
- package/dist/providers/anthropic.d.ts +25 -0
- package/dist/providers/anthropic.d.ts.map +1 -0
- package/dist/providers/index.d.ts +9 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/openai.d.ts +29 -0
- package/dist/providers/openai.d.ts.map +1 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +9921 -0
- package/dist/types/index.d.ts +175 -0
- package/dist/types/index.d.ts.map +1 -0
- package/helpers/scroll +0 -0
- package/helpers/scroll.swift +35 -0
- package/package.json +79 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/** Supported AI providers for computer use */
|
|
2
|
+
export type Provider = "anthropic" | "openai";
|
|
3
|
+
/** Mouse button types */
|
|
4
|
+
export type MouseButton = "left" | "right" | "middle";
|
|
5
|
+
/** A screen coordinate */
|
|
6
|
+
export interface Point {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}
|
|
10
|
+
/** Screen dimensions */
|
|
11
|
+
export interface ScreenSize {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
}
|
|
15
|
+
/** A captured screenshot */
|
|
16
|
+
export interface Screenshot {
|
|
17
|
+
/** Base64-encoded PNG image data */
|
|
18
|
+
base64: string;
|
|
19
|
+
/** Screen dimensions at time of capture */
|
|
20
|
+
size: ScreenSize;
|
|
21
|
+
/** Timestamp of capture */
|
|
22
|
+
timestamp: number;
|
|
23
|
+
}
|
|
24
|
+
/** Actions the driver can execute on the OS */
|
|
25
|
+
export type DriverAction = {
|
|
26
|
+
type: "screenshot";
|
|
27
|
+
} | {
|
|
28
|
+
type: "click";
|
|
29
|
+
point: Point;
|
|
30
|
+
button?: MouseButton;
|
|
31
|
+
count?: number;
|
|
32
|
+
} | {
|
|
33
|
+
type: "type";
|
|
34
|
+
text: string;
|
|
35
|
+
} | {
|
|
36
|
+
type: "key";
|
|
37
|
+
keys: string;
|
|
38
|
+
} | {
|
|
39
|
+
type: "scroll";
|
|
40
|
+
point: Point;
|
|
41
|
+
deltaX: number;
|
|
42
|
+
deltaY: number;
|
|
43
|
+
} | {
|
|
44
|
+
type: "mouse_move";
|
|
45
|
+
point: Point;
|
|
46
|
+
} | {
|
|
47
|
+
type: "drag";
|
|
48
|
+
from: Point;
|
|
49
|
+
to: Point;
|
|
50
|
+
} | {
|
|
51
|
+
type: "wait";
|
|
52
|
+
ms: number;
|
|
53
|
+
} | {
|
|
54
|
+
type: "open_url";
|
|
55
|
+
url: string;
|
|
56
|
+
} | {
|
|
57
|
+
type: "open_app";
|
|
58
|
+
name: string;
|
|
59
|
+
};
|
|
60
|
+
/** Result of executing a driver action */
|
|
61
|
+
export interface ActionResult {
|
|
62
|
+
success: boolean;
|
|
63
|
+
screenshot?: Screenshot;
|
|
64
|
+
error?: string;
|
|
65
|
+
duration_ms: number;
|
|
66
|
+
}
|
|
67
|
+
/** The computer driver interface — OS-level screen + input control */
|
|
68
|
+
export interface ComputerDriver {
|
|
69
|
+
/** Get current screen size */
|
|
70
|
+
getScreenSize(): Promise<ScreenSize>;
|
|
71
|
+
/** Capture a screenshot */
|
|
72
|
+
screenshot(): Promise<Screenshot>;
|
|
73
|
+
/** Execute an action */
|
|
74
|
+
execute(action: DriverAction): Promise<ActionResult>;
|
|
75
|
+
/** Clean up resources */
|
|
76
|
+
dispose(): Promise<void>;
|
|
77
|
+
}
|
|
78
|
+
/** What the AI model returns after analyzing a screenshot */
|
|
79
|
+
export interface ModelResponse {
|
|
80
|
+
/** The action to execute, or null if task is complete */
|
|
81
|
+
action: DriverAction | null;
|
|
82
|
+
/** The model's reasoning about what it sees */
|
|
83
|
+
reasoning: string;
|
|
84
|
+
/** Whether the model considers the task complete */
|
|
85
|
+
done: boolean;
|
|
86
|
+
/** Token usage for this step */
|
|
87
|
+
usage?: {
|
|
88
|
+
input: number;
|
|
89
|
+
output: number;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/** AI provider interface — sends screenshots, gets actions back */
|
|
93
|
+
export interface ComputerProvider {
|
|
94
|
+
readonly name: Provider;
|
|
95
|
+
/** Analyze a screenshot and task, return next action */
|
|
96
|
+
analyze(params: {
|
|
97
|
+
task: string;
|
|
98
|
+
screenshot: Screenshot;
|
|
99
|
+
history: ModelResponse[];
|
|
100
|
+
systemPrompt?: string;
|
|
101
|
+
}): Promise<ModelResponse>;
|
|
102
|
+
}
|
|
103
|
+
/** Session state */
|
|
104
|
+
export type SessionStatus = "running" | "paused" | "completed" | "failed" | "cancelled";
|
|
105
|
+
/** A logged action within a session */
|
|
106
|
+
export interface ActionLog {
|
|
107
|
+
id: number;
|
|
108
|
+
session_id: string;
|
|
109
|
+
step: number;
|
|
110
|
+
action: DriverAction;
|
|
111
|
+
reasoning: string;
|
|
112
|
+
screenshot_path?: string;
|
|
113
|
+
success: boolean;
|
|
114
|
+
error?: string;
|
|
115
|
+
duration_ms: number;
|
|
116
|
+
tokens_in?: number;
|
|
117
|
+
tokens_out?: number;
|
|
118
|
+
created_at: string;
|
|
119
|
+
}
|
|
120
|
+
/** A computer use session */
|
|
121
|
+
export interface Session {
|
|
122
|
+
id: string;
|
|
123
|
+
task: string;
|
|
124
|
+
provider: Provider;
|
|
125
|
+
model: string;
|
|
126
|
+
status: SessionStatus;
|
|
127
|
+
steps: number;
|
|
128
|
+
total_tokens_in: number;
|
|
129
|
+
total_tokens_out: number;
|
|
130
|
+
total_duration_ms: number;
|
|
131
|
+
error?: string;
|
|
132
|
+
created_at: string;
|
|
133
|
+
completed_at?: string;
|
|
134
|
+
}
|
|
135
|
+
/** Options for running a task */
|
|
136
|
+
export interface RunOptions {
|
|
137
|
+
/** The natural language task to accomplish */
|
|
138
|
+
task: string;
|
|
139
|
+
/** AI provider to use */
|
|
140
|
+
provider?: Provider;
|
|
141
|
+
/** Specific model to use (defaults to provider's best) */
|
|
142
|
+
model?: string;
|
|
143
|
+
/** Maximum number of steps before stopping */
|
|
144
|
+
maxSteps?: number;
|
|
145
|
+
/** Save screenshots to disk */
|
|
146
|
+
saveScreenshots?: boolean;
|
|
147
|
+
/** Screenshots directory */
|
|
148
|
+
screenshotsDir?: string;
|
|
149
|
+
/** Custom system prompt */
|
|
150
|
+
systemPrompt?: string;
|
|
151
|
+
/** Max screenshot width before sending to AI model (default: 1280 WXGA) */
|
|
152
|
+
screenshotMaxWidth?: number;
|
|
153
|
+
/** Dry-run mode — model plans actions but they are not executed */
|
|
154
|
+
dryRun?: boolean;
|
|
155
|
+
/** Callback for each step */
|
|
156
|
+
onStep?: (step: number, response: ModelResponse, result: ActionResult) => void;
|
|
157
|
+
/** Callback when done */
|
|
158
|
+
onDone?: (session: Session) => void;
|
|
159
|
+
/** Whether to run headless */
|
|
160
|
+
headless?: boolean;
|
|
161
|
+
}
|
|
162
|
+
/** Safety configuration */
|
|
163
|
+
export interface SafetyConfig {
|
|
164
|
+
/** Apps that should never be interacted with */
|
|
165
|
+
blockedApps?: string[];
|
|
166
|
+
/** URLs/domains that should never be visited */
|
|
167
|
+
blockedDomains?: string[];
|
|
168
|
+
/** Whether to require confirmation before clicks */
|
|
169
|
+
confirmClicks?: boolean;
|
|
170
|
+
/** Maximum actions per minute */
|
|
171
|
+
maxActionsPerMinute?: number;
|
|
172
|
+
/** Whether to allow typing passwords */
|
|
173
|
+
allowPasswordTyping?: boolean;
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE9C,yBAAyB;AACzB,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEtD,0BAA0B;AAC1B,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,wBAAwB;AACxB,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4BAA4B;AAC5B,MAAM,WAAW,UAAU;IACzB,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,IAAI,EAAE,UAAU,CAAC;IACjB,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,+CAA+C;AAC/C,MAAM,MAAM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AO,CAAC;CACpB;AAED,2BAA2B;AAC3B,MAAM,WAAW,YAAY;IAC3B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,oDAAoD;IACpD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iCAAiC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wCAAwC;IACxC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B"}
|
package/helpers/scroll
ADDED
|
Binary file
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env swift
|
|
2
|
+
// scroll.swift — Native macOS scroll wheel events via CGEvent
|
|
3
|
+
// Usage: scroll <x> <y> <deltaY> [deltaX]
|
|
4
|
+
// Example: scroll 500 300 -3 (scroll up 3 clicks at position 500,300)
|
|
5
|
+
|
|
6
|
+
import CoreGraphics
|
|
7
|
+
import Foundation
|
|
8
|
+
|
|
9
|
+
guard CommandLine.arguments.count >= 4 else {
|
|
10
|
+
fputs("Usage: scroll <x> <y> <deltaY> [deltaX]\n", stderr)
|
|
11
|
+
exit(1)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let x = Double(CommandLine.arguments[1]) ?? 0
|
|
15
|
+
let y = Double(CommandLine.arguments[2]) ?? 0
|
|
16
|
+
let deltaY = Int32(CommandLine.arguments[3]) ?? 0
|
|
17
|
+
let deltaX = CommandLine.arguments.count > 4 ? Int32(CommandLine.arguments[4]) ?? 0 : 0
|
|
18
|
+
|
|
19
|
+
// Move mouse to position first
|
|
20
|
+
if let moveEvent = CGEvent(mouseEventSource: nil, mouseType: .mouseMoved,
|
|
21
|
+
mouseCursorPosition: CGPoint(x: x, y: y),
|
|
22
|
+
mouseButton: .left) {
|
|
23
|
+
moveEvent.post(tap: .cgSessionEventTap)
|
|
24
|
+
usleep(50_000) // 50ms delay for the move to register
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Create scroll wheel event
|
|
28
|
+
if let scrollEvent = CGEvent(scrollWheelEvent2Source: nil,
|
|
29
|
+
units: .line,
|
|
30
|
+
wheelCount: 2,
|
|
31
|
+
wheel1: deltaY,
|
|
32
|
+
wheel2: deltaX,
|
|
33
|
+
wheel3: 0) {
|
|
34
|
+
scrollEvent.post(tap: .cgSessionEventTap)
|
|
35
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hasna/computer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Open-source computer use for AI agents — control your Mac with Anthropic or OpenAI. CLI + MCP server + REST API + Dashboard.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"computer": "dist/cli/index.js",
|
|
10
|
+
"computer-mcp": "dist/mcp/index.js",
|
|
11
|
+
"computer-serve": "dist/server/index.js"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"helpers/scroll",
|
|
22
|
+
"helpers/scroll.swift",
|
|
23
|
+
"dashboard/dist",
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"README.md"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "bun build src/cli/index.ts --outdir dist/cli --target bun --external @modelcontextprotocol/sdk --external ink --external react --external chalk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external @modelcontextprotocol/sdk && bun build src/server/index.ts --outdir dist/server --target bun && bun build src/index.ts --outdir dist --target bun && tsc --emitDeclarationOnly --outDir dist",
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"test": "bun test",
|
|
31
|
+
"dev:cli": "bun run src/cli/index.ts",
|
|
32
|
+
"dev:mcp": "bun run src/mcp/index.ts",
|
|
33
|
+
"dev:serve": "bun run src/server/index.ts",
|
|
34
|
+
"prepublishOnly": "bun run build",
|
|
35
|
+
"postinstall": "mkdir -p $HOME/.hasna/computer 2>/dev/null || true"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"computer-use",
|
|
39
|
+
"ai-agent",
|
|
40
|
+
"desktop-automation",
|
|
41
|
+
"macos",
|
|
42
|
+
"anthropic",
|
|
43
|
+
"openai",
|
|
44
|
+
"mcp",
|
|
45
|
+
"cli",
|
|
46
|
+
"screenshot",
|
|
47
|
+
"mouse-control"
|
|
48
|
+
],
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"registry": "https://registry.npmjs.org",
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "https://github.com/hasna/open-computer.git"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/hasna/open-computer",
|
|
58
|
+
"bugs": {
|
|
59
|
+
"url": "https://github.com/hasna/open-computer/issues"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"bun": ">=1.0.0"
|
|
63
|
+
},
|
|
64
|
+
"author": "Andrei Hasna <andrei@hasna.com>",
|
|
65
|
+
"license": "Apache-2.0",
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@anthropic-ai/sdk": "^0.39.0",
|
|
68
|
+
"@hasna/cloud": "0.1.6",
|
|
69
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
70
|
+
"chalk": "^5.4.1",
|
|
71
|
+
"commander": "^13.1.0",
|
|
72
|
+
"openai": "^4.85.0",
|
|
73
|
+
"zod": "^3.24.2"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@types/bun": "^1.2.4",
|
|
77
|
+
"typescript": "^5.7.3"
|
|
78
|
+
}
|
|
79
|
+
}
|