@assemblyline-agents/orgo 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 +21 -0
- package/README.md +44 -0
- package/dist/client.d.ts +12 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +81 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/input.d.ts +13 -0
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +54 -0
- package/dist/input.js.map +1 -0
- package/dist/mcp-server.d.ts +2 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +164 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/tools.d.ts +3 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +212 -0
- package/dist/tools.js.map +1 -0
- package/package.json +50 -0
- package/skills/orgo/SKILL.md +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenEve contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# @assemblyline-agents/orgo
|
|
2
|
+
|
|
3
|
+
Official Assembly Line connection plugin for isolated Orgo cloud desktops. It wraps
|
|
4
|
+
Orgo's documented REST API in a packaged stdio MCP bridge so the agent receives
|
|
5
|
+
screenshots as image content and never receives the API's VNC password fields.
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
Create an Orgo API key, add it to the Assembly Line runtime host, then add the plugin:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
export ORGO_API_KEY=...
|
|
13
|
+
assembly-line add orgo agent
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The generated connection starts read-only:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { defineOrgoConnection } from "@assemblyline-agents/orgo";
|
|
20
|
+
|
|
21
|
+
export default defineOrgoConnection({
|
|
22
|
+
access: { read: true, write: false }
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Read authority covers workspace/computer listing, computer status, and
|
|
27
|
+
screenshots. Provisioning, deletion, lifecycle actions, mouse/keyboard input,
|
|
28
|
+
waits, Bash, and Python require an explicit write policy:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
access: {
|
|
32
|
+
read: true,
|
|
33
|
+
write: { approval: "always" }
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Orgo computers are persistent cloud resources and may continue billing until
|
|
38
|
+
stopped or deleted. Use dedicated workspaces, configure auto-stop where
|
|
39
|
+
appropriate, and reserve `approval: "never"` for reviewed unattended
|
|
40
|
+
workloads.
|
|
41
|
+
|
|
42
|
+
Set `ORGO_API_BASE_URL` or pass `apiBaseUrl` only for a developer-controlled
|
|
43
|
+
Orgo-compatible endpoint. The API key remains in the host environment and is
|
|
44
|
+
forwarded only to the packaged bridge process.
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class OrgoApiClient {
|
|
2
|
+
private readonly apiKey;
|
|
3
|
+
private readonly baseUrl;
|
|
4
|
+
constructor(apiKey: string | undefined, configuredBaseUrl: string);
|
|
5
|
+
get(path: string): Promise<unknown>;
|
|
6
|
+
post(path: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
7
|
+
delete(path: string): Promise<unknown>;
|
|
8
|
+
private request;
|
|
9
|
+
}
|
|
10
|
+
export declare function sanitizeComputerResponse(value: unknown): unknown;
|
|
11
|
+
export declare function screenshotData(value: unknown): string;
|
|
12
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAEA,qBAAa,aAAa;IAItB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAGd,MAAM,EAAE,MAAM,GAAG,SAAS,EAC3C,iBAAiB,EAAE,MAAM;IAYrB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAInC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAIpE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;YAI9B,OAAO;CA2BtB;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAShE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAKrD"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
const SENSITIVE_COMPUTER_FIELDS = new Set(["password", "vnc_password"]);
|
|
2
|
+
export class OrgoApiClient {
|
|
3
|
+
apiKey;
|
|
4
|
+
baseUrl;
|
|
5
|
+
constructor(apiKey, configuredBaseUrl) {
|
|
6
|
+
this.apiKey = apiKey;
|
|
7
|
+
const parsed = new URL(configuredBaseUrl);
|
|
8
|
+
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {
|
|
9
|
+
throw new Error("Orgo API base URL must use HTTP or HTTPS.");
|
|
10
|
+
}
|
|
11
|
+
if (parsed.username || parsed.password || parsed.search || parsed.hash) {
|
|
12
|
+
throw new Error("Orgo API base URL cannot contain credentials, a query, or a fragment.");
|
|
13
|
+
}
|
|
14
|
+
this.baseUrl = parsed.toString().replace(/\/$/u, "");
|
|
15
|
+
}
|
|
16
|
+
async get(path) {
|
|
17
|
+
return this.request(path, "GET");
|
|
18
|
+
}
|
|
19
|
+
async post(path, body) {
|
|
20
|
+
return this.request(path, "POST", body);
|
|
21
|
+
}
|
|
22
|
+
async delete(path) {
|
|
23
|
+
return this.request(path, "DELETE");
|
|
24
|
+
}
|
|
25
|
+
async request(path, method, body) {
|
|
26
|
+
const apiKey = this.apiKey?.trim();
|
|
27
|
+
if (!apiKey)
|
|
28
|
+
throw new Error("Missing ORGO_API_KEY on the OpenEve runtime host.");
|
|
29
|
+
const headers = {
|
|
30
|
+
accept: "application/json",
|
|
31
|
+
authorization: `Bearer ${apiKey}`
|
|
32
|
+
};
|
|
33
|
+
if (body)
|
|
34
|
+
headers["content-type"] = "application/json";
|
|
35
|
+
const response = await fetch(`${this.baseUrl}${path}`, {
|
|
36
|
+
method,
|
|
37
|
+
headers,
|
|
38
|
+
...(body ? { body: JSON.stringify(body) } : {})
|
|
39
|
+
});
|
|
40
|
+
const text = await response.text();
|
|
41
|
+
const parsed = text ? parseJson(text) : null;
|
|
42
|
+
if (!response.ok) {
|
|
43
|
+
const providerMessage = isRecord(parsed) && typeof parsed.error === "string"
|
|
44
|
+
? `: ${parsed.error}`
|
|
45
|
+
: "";
|
|
46
|
+
throw new Error(`Orgo API ${method} ${path} failed with HTTP ${response.status}${providerMessage}`);
|
|
47
|
+
}
|
|
48
|
+
return parsed;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export function sanitizeComputerResponse(value) {
|
|
52
|
+
if (Array.isArray(value))
|
|
53
|
+
return value.map(sanitizeComputerResponse);
|
|
54
|
+
if (!isRecord(value))
|
|
55
|
+
return value;
|
|
56
|
+
const sanitized = {};
|
|
57
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
58
|
+
if (SENSITIVE_COMPUTER_FIELDS.has(key.toLowerCase()))
|
|
59
|
+
continue;
|
|
60
|
+
sanitized[key] = sanitizeComputerResponse(entry);
|
|
61
|
+
}
|
|
62
|
+
return sanitized;
|
|
63
|
+
}
|
|
64
|
+
export function screenshotData(value) {
|
|
65
|
+
if (!isRecord(value) || typeof value.image !== "string" || !value.image.trim()) {
|
|
66
|
+
throw new Error("Orgo screenshot response did not include a base64 PNG image.");
|
|
67
|
+
}
|
|
68
|
+
return value.image.replace(/^data:image\/png;base64,/u, "");
|
|
69
|
+
}
|
|
70
|
+
function parseJson(value) {
|
|
71
|
+
try {
|
|
72
|
+
return JSON.parse(value);
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function isRecord(value) {
|
|
79
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"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CAAC;QAAE,OAAO,KAAK,CAAC;IACnC,MAAM,SAAS,GAA4B,EAAE,CAAC;IAC9C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,yBAAyB,CAAC,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;YAAE,SAAS;QAC/D,SAAS,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAC/E,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,SAAS,CAAC,KAAa;IAC9B,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAY,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type StdioMcpPluginConnectionOptions } from "@assemblyline-agents/core";
|
|
2
|
+
export interface OrgoConnectionOptions extends StdioMcpPluginConnectionOptions {
|
|
3
|
+
/** Trusted Orgo REST API base selected by the deployment owner. */
|
|
4
|
+
apiBaseUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function defineOrgoConnection(options: OrgoConnectionOptions): import("@assemblyline-agents/core").McpStdioClientConnectionDefinition;
|
|
7
|
+
export declare const openevePlugin: import("@assemblyline-agents/core").PluginModule;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,+BAA+B,EACrC,MAAM,2BAA2B,CAAC;AAMnC,MAAM,WAAW,qBAAsB,SAAQ,+BAA+B;IAC5E,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,0EAgBlE;AAED,eAAO,MAAM,aAAa,kDAA0C,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
import { connectionPluginMetadata, definePlugin, defineStdioMcpPluginConnection } from "@assemblyline-agents/core";
|
|
3
|
+
const PLUGIN = connectionPluginMetadata("orgo");
|
|
4
|
+
const MCP_SERVER_PATH = fileURLToPath(new URL("./mcp-server.js", import.meta.url));
|
|
5
|
+
const DEFAULT_API_BASE_URL = "https://www.orgo.ai/api";
|
|
6
|
+
export function defineOrgoConnection(options) {
|
|
7
|
+
const { apiBaseUrl = process.env.ORGO_API_BASE_URL?.trim() || DEFAULT_API_BASE_URL, ...connection } = options;
|
|
8
|
+
const apiKey = process.env.ORGO_API_KEY?.trim();
|
|
9
|
+
const serverArgs = [MCP_SERVER_PATH, "--base-url", apiBaseUrl];
|
|
10
|
+
return defineStdioMcpPluginConnection(PLUGIN, {
|
|
11
|
+
...connection,
|
|
12
|
+
command: connection.command ?? process.execPath,
|
|
13
|
+
args: connection.args ?? serverArgs,
|
|
14
|
+
env: {
|
|
15
|
+
...(apiKey ? { ORGO_API_KEY: apiKey } : {}),
|
|
16
|
+
...(connection.env ?? {})
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export const openevePlugin = definePlugin({ connections: [PLUGIN] });
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,8BAA8B,EAE/B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,GAAG,wBAAwB,CAAC,MAAM,CAAE,CAAC;AACjD,MAAM,eAAe,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACnF,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAOvD,MAAM,UAAU,oBAAoB,CAAC,OAA8B;IACjE,MAAM,EACJ,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,IAAI,EAAE,IAAI,oBAAoB,EAC1E,GAAG,UAAU,EACd,GAAG,OAAO,CAAC;IACZ,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC;IAChD,MAAM,UAAU,GAAG,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IAC/D,OAAO,8BAA8B,CAAC,MAAM,EAAE;QAC5C,GAAG,UAAU;QACb,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ;QAC/C,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,UAAU;QACnC,GAAG,EAAE;YACH,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3C,GAAG,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,CAAC;SAC1B;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
|
package/dist/input.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function recordValue(value: unknown): Record<string, unknown>;
|
|
2
|
+
export declare function stringValue(value: unknown, name: string, options?: {
|
|
3
|
+
trim?: boolean;
|
|
4
|
+
}): string;
|
|
5
|
+
export declare function optionalString(value: unknown, name: string): string | undefined;
|
|
6
|
+
export declare function integerValue(value: unknown, name: string, minimum: number, maximum: number): number;
|
|
7
|
+
export declare function optionalInteger(value: unknown, name: string, minimum: number, maximum: number): number | undefined;
|
|
8
|
+
export declare function numberValue(value: unknown, name: string, minimum: number, maximum: number): number;
|
|
9
|
+
export declare function optionalNumber(value: unknown, name: string, minimum: number, maximum: number): number | undefined;
|
|
10
|
+
export declare function optionalBoolean(value: unknown, name: string): boolean | undefined;
|
|
11
|
+
export declare function optionalEnum<T extends string | number>(value: unknown, allowed: readonly T[], name: string): T | undefined;
|
|
12
|
+
export declare function compactRecord(values: Record<string, unknown>): Record<string, unknown>;
|
|
13
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAInE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAOlG;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE/E;AAED,wBAAgB,YAAY,CAC1B,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,MAAM,CAKR;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAKlG;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAIjF;AAED,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EACpD,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,SAAS,CAAC,EAAE,EACrB,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,SAAS,CAMf;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEtF"}
|
package/dist/input.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export function recordValue(value) {
|
|
2
|
+
return value && typeof value === "object" && !Array.isArray(value)
|
|
3
|
+
? value
|
|
4
|
+
: {};
|
|
5
|
+
}
|
|
6
|
+
export function stringValue(value, name, options = {}) {
|
|
7
|
+
if (typeof value !== "string" || value.length === 0) {
|
|
8
|
+
throw new Error(`${name} must be a non-empty string.`);
|
|
9
|
+
}
|
|
10
|
+
const normalized = options.trim === false ? value : value.trim();
|
|
11
|
+
if (!normalized)
|
|
12
|
+
throw new Error(`${name} must be a non-empty string.`);
|
|
13
|
+
return normalized;
|
|
14
|
+
}
|
|
15
|
+
export function optionalString(value, name) {
|
|
16
|
+
return value === undefined ? undefined : stringValue(value, name);
|
|
17
|
+
}
|
|
18
|
+
export function integerValue(value, name, minimum, maximum) {
|
|
19
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value < minimum || value > maximum) {
|
|
20
|
+
throw new Error(`${name} must be an integer from ${minimum} to ${maximum}.`);
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
export function optionalInteger(value, name, minimum, maximum) {
|
|
25
|
+
return value === undefined ? undefined : integerValue(value, name, minimum, maximum);
|
|
26
|
+
}
|
|
27
|
+
export function numberValue(value, name, minimum, maximum) {
|
|
28
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < minimum || value > maximum) {
|
|
29
|
+
throw new Error(`${name} must be a number from ${minimum} to ${maximum}.`);
|
|
30
|
+
}
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
export function optionalNumber(value, name, minimum, maximum) {
|
|
34
|
+
return value === undefined ? undefined : numberValue(value, name, minimum, maximum);
|
|
35
|
+
}
|
|
36
|
+
export function optionalBoolean(value, name) {
|
|
37
|
+
if (value === undefined)
|
|
38
|
+
return undefined;
|
|
39
|
+
if (typeof value !== "boolean")
|
|
40
|
+
throw new Error(`${name} must be a boolean.`);
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
export function optionalEnum(value, allowed, name) {
|
|
44
|
+
if (value === undefined)
|
|
45
|
+
return undefined;
|
|
46
|
+
if ((typeof value !== "string" && typeof value !== "number") || !allowed.includes(value)) {
|
|
47
|
+
throw new Error(`${name} must be one of: ${allowed.join(", ")}.`);
|
|
48
|
+
}
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
export function compactRecord(values) {
|
|
52
|
+
return Object.fromEntries(Object.entries(values).filter(([, value]) => value !== undefined));
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAChE,CAAC,CAAC,KAAgC;QAClC,CAAC,CAAC,EAAE,CAAC;AACT,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAc,EAAE,IAAY,EAAE,UAA8B,EAAE;IACxF,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,8BAA8B,CAAC,CAAC;IACzD,CAAC;IACD,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACjE,IAAI,CAAC,UAAU;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,8BAA8B,CAAC,CAAC;IACxE,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,IAAY;IACzD,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAAc,EACd,IAAY,EACZ,OAAe,EACf,OAAe;IAEf,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,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AAC;AAED,MAAM,UAAU,YAAY,CAC1B,KAAc,EACd,OAAqB,EACrB,IAAY;IAEZ,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAU,CAAC,EAAE,CAAC;QAC9F,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,oBAAoB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,KAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAA+B;IAC3D,OAAO,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC;AAC/F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
2
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
4
|
+
import { OrgoApiClient, sanitizeComputerResponse, screenshotData } from "./client.js";
|
|
5
|
+
import { compactRecord, integerValue, numberValue, optionalBoolean, optionalEnum, optionalInteger, optionalNumber, optionalString, recordValue, stringValue } from "./input.js";
|
|
6
|
+
import { ORGO_TOOLS } from "./tools.js";
|
|
7
|
+
const api = new OrgoApiClient(process.env.ORGO_API_KEY, parseBaseUrl(process.argv.slice(2)));
|
|
8
|
+
const server = new Server({ name: "openeve-orgo", version: "0.1.0" }, {
|
|
9
|
+
capabilities: { tools: {} },
|
|
10
|
+
instructions: "Control Orgo cloud desktops through typed REST operations. VNC credentials are always stripped from tool results."
|
|
11
|
+
});
|
|
12
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: ORGO_TOOLS }));
|
|
13
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
14
|
+
try {
|
|
15
|
+
return await callTool(request.params.name, recordValue(request.params.arguments));
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
return toolResult({ error: error instanceof Error ? error.message : String(error) }, true);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
await server.connect(new StdioServerTransport());
|
|
22
|
+
async function callTool(name, input) {
|
|
23
|
+
if (name === "list_workspaces") {
|
|
24
|
+
return toolResult(sanitizeComputerResponse(await api.get("/workspaces")));
|
|
25
|
+
}
|
|
26
|
+
if (name === "create_workspace") {
|
|
27
|
+
return toolResult(await api.post("/workspaces", {
|
|
28
|
+
name: stringValue(input.name, "name")
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
if (name === "list_computers") {
|
|
32
|
+
return toolResult(sanitizeComputerResponse(await api.get("/computers")));
|
|
33
|
+
}
|
|
34
|
+
if (name === "get_computer") {
|
|
35
|
+
return computerResult(await api.get(computerPath(input)));
|
|
36
|
+
}
|
|
37
|
+
if (name === "create_computer") {
|
|
38
|
+
const body = compactRecord({
|
|
39
|
+
workspace_id: stringValue(input.workspace_id, "workspace_id"),
|
|
40
|
+
name: stringValue(input.name, "name"),
|
|
41
|
+
os: optionalEnum(input.os, ["linux"], "os"),
|
|
42
|
+
ram: optionalEnum(input.ram, [4, 8, 16, 32, 64], "ram"),
|
|
43
|
+
cpu: optionalEnum(input.cpu, [1, 2, 4, 8, 16], "cpu"),
|
|
44
|
+
disk_size_gb: optionalInteger(input.disk_size_gb, "disk_size_gb", 8, 10_000),
|
|
45
|
+
resolution: optionalString(input.resolution, "resolution"),
|
|
46
|
+
auto_stop_minutes: optionalInteger(input.auto_stop_minutes, "auto_stop_minutes", 0, 525_600),
|
|
47
|
+
template_ref: optionalString(input.template_ref, "template_ref")
|
|
48
|
+
});
|
|
49
|
+
return computerResult(await api.post("/computers", body));
|
|
50
|
+
}
|
|
51
|
+
if (name === "delete_computer") {
|
|
52
|
+
return computerResult(await api.delete(computerPath(input)));
|
|
53
|
+
}
|
|
54
|
+
if (name === "start_computer" || name === "stop_computer" || name === "restart_computer") {
|
|
55
|
+
const action = name.replace("_computer", "");
|
|
56
|
+
return computerResult(await api.post(`${computerPath(input)}/${action}`));
|
|
57
|
+
}
|
|
58
|
+
if (name === "screenshot") {
|
|
59
|
+
const computerId = computerIdValue(input);
|
|
60
|
+
const image = screenshotData(await api.get(`/computers/${encodeURIComponent(computerId)}/screenshot`));
|
|
61
|
+
return {
|
|
62
|
+
content: [
|
|
63
|
+
{ type: "image", data: image, mimeType: "image/png" },
|
|
64
|
+
{ type: "text", text: JSON.stringify({ computer_id: computerId, format: "image/png" }) }
|
|
65
|
+
]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (name === "click") {
|
|
69
|
+
return toolResult(await api.post(`${computerPath(input)}/click`, compactRecord({
|
|
70
|
+
x: integerValue(input.x, "x", 0, 100_000),
|
|
71
|
+
y: integerValue(input.y, "y", 0, 100_000),
|
|
72
|
+
button: optionalEnum(input.button, ["left", "right"], "button"),
|
|
73
|
+
double: optionalBoolean(input.double, "double")
|
|
74
|
+
})));
|
|
75
|
+
}
|
|
76
|
+
if (name === "drag") {
|
|
77
|
+
return toolResult(await api.post(`${computerPath(input)}/drag`, compactRecord({
|
|
78
|
+
start_x: integerValue(input.start_x, "start_x", 0, 100_000),
|
|
79
|
+
start_y: integerValue(input.start_y, "start_y", 0, 100_000),
|
|
80
|
+
end_x: integerValue(input.end_x, "end_x", 0, 100_000),
|
|
81
|
+
end_y: integerValue(input.end_y, "end_y", 0, 100_000),
|
|
82
|
+
button: optionalEnum(input.button, ["left", "right"], "button"),
|
|
83
|
+
duration: optionalNumber(input.duration, "duration", 0, 60)
|
|
84
|
+
})));
|
|
85
|
+
}
|
|
86
|
+
if (name === "type_text") {
|
|
87
|
+
return toolResult(await api.post(`${computerPath(input)}/type`, {
|
|
88
|
+
text: stringValue(input.text, "text", { trim: false })
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
if (name === "press_key") {
|
|
92
|
+
return toolResult(await api.post(`${computerPath(input)}/key`, {
|
|
93
|
+
key: stringValue(input.key, "key")
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
if (name === "scroll") {
|
|
97
|
+
return toolResult(await api.post(`${computerPath(input)}/scroll`, compactRecord({
|
|
98
|
+
direction: requiredEnum(input.direction, ["up", "down"], "direction"),
|
|
99
|
+
amount: integerValue(input.amount, "amount", 1, 100),
|
|
100
|
+
x: optionalInteger(input.x, "x", 0, 100_000),
|
|
101
|
+
y: optionalInteger(input.y, "y", 0, 100_000)
|
|
102
|
+
})));
|
|
103
|
+
}
|
|
104
|
+
if (name === "wait") {
|
|
105
|
+
return toolResult(await api.post(`${computerPath(input)}/wait`, {
|
|
106
|
+
seconds: numberValue(input.seconds, "seconds", 0, 60)
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
if (name === "execute_bash") {
|
|
110
|
+
return toolResult(await api.post(`${computerPath(input)}/bash`, {
|
|
111
|
+
command: boundedString(input.command, "command", 20_000)
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
if (name === "execute_python") {
|
|
115
|
+
return toolResult(await api.post(`${computerPath(input)}/exec`, compactRecord({
|
|
116
|
+
code: boundedString(input.code, "code", 50_000),
|
|
117
|
+
timeout: optionalInteger(input.timeout, "timeout", 1, 300)
|
|
118
|
+
})));
|
|
119
|
+
}
|
|
120
|
+
throw new Error(`Unknown Orgo tool: ${name}`);
|
|
121
|
+
}
|
|
122
|
+
function parseBaseUrl(args) {
|
|
123
|
+
let baseUrl = process.env.ORGO_API_BASE_URL?.trim() || "https://www.orgo.ai/api";
|
|
124
|
+
for (let index = 0; index < args.length; index += 2) {
|
|
125
|
+
const flag = args[index];
|
|
126
|
+
const value = args[index + 1];
|
|
127
|
+
if (!flag || value === undefined)
|
|
128
|
+
throw new Error(`Missing value for ${flag ?? "server option"}.`);
|
|
129
|
+
if (flag === "--base-url")
|
|
130
|
+
baseUrl = value;
|
|
131
|
+
else
|
|
132
|
+
throw new Error(`Unknown Orgo MCP server option: ${flag}`);
|
|
133
|
+
}
|
|
134
|
+
return baseUrl;
|
|
135
|
+
}
|
|
136
|
+
function computerPath(input) {
|
|
137
|
+
return `/computers/${encodeURIComponent(computerIdValue(input))}`;
|
|
138
|
+
}
|
|
139
|
+
function computerIdValue(input) {
|
|
140
|
+
return stringValue(input.computer_id, "computer_id");
|
|
141
|
+
}
|
|
142
|
+
function computerResult(value) {
|
|
143
|
+
return toolResult(sanitizeComputerResponse(value));
|
|
144
|
+
}
|
|
145
|
+
function requiredEnum(value, allowed, name) {
|
|
146
|
+
const selected = optionalEnum(value, allowed, name);
|
|
147
|
+
if (!selected)
|
|
148
|
+
throw new Error(`${name} is required.`);
|
|
149
|
+
return selected;
|
|
150
|
+
}
|
|
151
|
+
function boundedString(value, name, maximumLength) {
|
|
152
|
+
const selected = stringValue(value, name, { trim: false });
|
|
153
|
+
if (selected.length > maximumLength) {
|
|
154
|
+
throw new Error(`${name} must contain at most ${maximumLength} characters.`);
|
|
155
|
+
}
|
|
156
|
+
return selected;
|
|
157
|
+
}
|
|
158
|
+
function toolResult(value, isError = false) {
|
|
159
|
+
return {
|
|
160
|
+
content: [{ type: "text", text: JSON.stringify(value, null, 2) }],
|
|
161
|
+
...(isError ? { isError: true } : {})
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=mcp-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts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AC,CAAC;IACpD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,eAAe,CAAC,CAAC;IACvD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,aAAa,CAAC,KAAc,EAAE,IAAY,EAAE,aAAqB;IACxE,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3D,IAAI,QAAQ,CAAC,MAAM,GAAG,aAAa,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,yBAAyB,aAAa,cAAc,CAAC,CAAC;IAC/E,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,UAAU,CAAC,KAAc,EAAE,OAAO,GAAG,KAAK;IACjD,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QACjE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtC,CAAC;AACJ,CAAC"}
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAe/D,eAAO,MAAM,UAAU,EAAE,IAAI,EAuM5B,CAAC"}
|
package/dist/tools.js
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
const COMPUTER_ID = {
|
|
2
|
+
type: "string",
|
|
3
|
+
minLength: 1,
|
|
4
|
+
description: "Orgo computer UUID returned by list_computers or create_computer."
|
|
5
|
+
};
|
|
6
|
+
const COMPUTER_ID_INPUT = {
|
|
7
|
+
type: "object",
|
|
8
|
+
required: ["computer_id"],
|
|
9
|
+
properties: { computer_id: COMPUTER_ID },
|
|
10
|
+
additionalProperties: false
|
|
11
|
+
};
|
|
12
|
+
export const ORGO_TOOLS = [
|
|
13
|
+
{
|
|
14
|
+
name: "list_workspaces",
|
|
15
|
+
description: "List Orgo workspaces available to the configured API key.",
|
|
16
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "create_workspace",
|
|
20
|
+
description: "Create an Orgo workspace for cloud computers.",
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: "object",
|
|
23
|
+
required: ["name"],
|
|
24
|
+
properties: { name: { type: "string", minLength: 1 } },
|
|
25
|
+
additionalProperties: false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "list_computers",
|
|
30
|
+
description: "List Orgo cloud computers and their current lifecycle status.",
|
|
31
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false }
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "get_computer",
|
|
35
|
+
description: "Get one Orgo computer's status and non-secret connection metadata.",
|
|
36
|
+
inputSchema: COMPUTER_ID_INPUT
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "create_computer",
|
|
40
|
+
description: "Provision a persistent Orgo Linux desktop. It may continue billing until stopped or deleted.",
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: "object",
|
|
43
|
+
required: ["workspace_id", "name"],
|
|
44
|
+
properties: {
|
|
45
|
+
workspace_id: { type: "string", minLength: 1 },
|
|
46
|
+
name: { type: "string", minLength: 1 },
|
|
47
|
+
os: { type: "string", enum: ["linux"] },
|
|
48
|
+
ram: { type: "integer", enum: [4, 8, 16, 32, 64] },
|
|
49
|
+
cpu: { type: "integer", enum: [1, 2, 4, 8, 16] },
|
|
50
|
+
disk_size_gb: { type: "integer", minimum: 8 },
|
|
51
|
+
resolution: {
|
|
52
|
+
type: "string",
|
|
53
|
+
pattern: "^[0-9]+x[0-9]+x[0-9]+$",
|
|
54
|
+
description: "Desktop resolution such as 1280x720x24."
|
|
55
|
+
},
|
|
56
|
+
auto_stop_minutes: { type: "integer", minimum: 0 },
|
|
57
|
+
template_ref: { type: "string", minLength: 1 }
|
|
58
|
+
},
|
|
59
|
+
additionalProperties: false
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "delete_computer",
|
|
64
|
+
description: "Permanently delete an Orgo computer and its disk.",
|
|
65
|
+
inputSchema: COMPUTER_ID_INPUT
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "start_computer",
|
|
69
|
+
description: "Start a stopped Orgo computer.",
|
|
70
|
+
inputSchema: COMPUTER_ID_INPUT
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "stop_computer",
|
|
74
|
+
description: "Stop a running Orgo computer while preserving its disk.",
|
|
75
|
+
inputSchema: COMPUTER_ID_INPUT
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "restart_computer",
|
|
79
|
+
description: "Restart an Orgo computer while preserving its disk.",
|
|
80
|
+
inputSchema: COMPUTER_ID_INPUT
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "screenshot",
|
|
84
|
+
description: "Capture the current Orgo desktop as a PNG image.",
|
|
85
|
+
inputSchema: COMPUTER_ID_INPUT
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "click",
|
|
89
|
+
description: "Click screen coordinates on a running Orgo computer.",
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: "object",
|
|
92
|
+
required: ["computer_id", "x", "y"],
|
|
93
|
+
properties: {
|
|
94
|
+
computer_id: COMPUTER_ID,
|
|
95
|
+
x: { type: "integer", minimum: 0 },
|
|
96
|
+
y: { type: "integer", minimum: 0 },
|
|
97
|
+
button: { type: "string", enum: ["left", "right"] },
|
|
98
|
+
double: { type: "boolean" }
|
|
99
|
+
},
|
|
100
|
+
additionalProperties: false
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "drag",
|
|
105
|
+
description: "Drag between two screen coordinates on a running Orgo computer.",
|
|
106
|
+
inputSchema: {
|
|
107
|
+
type: "object",
|
|
108
|
+
required: ["computer_id", "start_x", "start_y", "end_x", "end_y"],
|
|
109
|
+
properties: {
|
|
110
|
+
computer_id: COMPUTER_ID,
|
|
111
|
+
start_x: { type: "integer", minimum: 0 },
|
|
112
|
+
start_y: { type: "integer", minimum: 0 },
|
|
113
|
+
end_x: { type: "integer", minimum: 0 },
|
|
114
|
+
end_y: { type: "integer", minimum: 0 },
|
|
115
|
+
button: { type: "string", enum: ["left", "right"] },
|
|
116
|
+
duration: { type: "number", minimum: 0, maximum: 60 }
|
|
117
|
+
},
|
|
118
|
+
additionalProperties: false
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "type_text",
|
|
123
|
+
description: "Type text into the focused application on a running Orgo computer.",
|
|
124
|
+
inputSchema: {
|
|
125
|
+
type: "object",
|
|
126
|
+
required: ["computer_id", "text"],
|
|
127
|
+
properties: {
|
|
128
|
+
computer_id: COMPUTER_ID,
|
|
129
|
+
text: { type: "string", minLength: 1 }
|
|
130
|
+
},
|
|
131
|
+
additionalProperties: false
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "press_key",
|
|
136
|
+
description: "Press a key or chord such as Enter, Tab, ctrl+c, or ctrl+shift+t.",
|
|
137
|
+
inputSchema: {
|
|
138
|
+
type: "object",
|
|
139
|
+
required: ["computer_id", "key"],
|
|
140
|
+
properties: {
|
|
141
|
+
computer_id: COMPUTER_ID,
|
|
142
|
+
key: { type: "string", minLength: 1 }
|
|
143
|
+
},
|
|
144
|
+
additionalProperties: false
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "scroll",
|
|
149
|
+
description: "Scroll the desktop in one direction by a bounded amount.",
|
|
150
|
+
inputSchema: {
|
|
151
|
+
type: "object",
|
|
152
|
+
required: ["computer_id", "direction", "amount"],
|
|
153
|
+
properties: {
|
|
154
|
+
computer_id: COMPUTER_ID,
|
|
155
|
+
direction: { type: "string", enum: ["up", "down"] },
|
|
156
|
+
amount: { type: "integer", minimum: 1, maximum: 100 },
|
|
157
|
+
x: {
|
|
158
|
+
type: "integer",
|
|
159
|
+
minimum: 0,
|
|
160
|
+
description: "Optional cursor X coordinate before scrolling."
|
|
161
|
+
},
|
|
162
|
+
y: {
|
|
163
|
+
type: "integer",
|
|
164
|
+
minimum: 0,
|
|
165
|
+
description: "Optional cursor Y coordinate before scrolling."
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
additionalProperties: false
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "wait",
|
|
173
|
+
description: "Wait up to 60 seconds for the Orgo desktop to settle.",
|
|
174
|
+
inputSchema: {
|
|
175
|
+
type: "object",
|
|
176
|
+
required: ["computer_id", "seconds"],
|
|
177
|
+
properties: {
|
|
178
|
+
computer_id: COMPUTER_ID,
|
|
179
|
+
seconds: { type: "number", minimum: 0, maximum: 60 }
|
|
180
|
+
},
|
|
181
|
+
additionalProperties: false
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "execute_bash",
|
|
186
|
+
description: "Execute a shell command inside an Orgo computer. This has full machine authority.",
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: "object",
|
|
189
|
+
required: ["computer_id", "command"],
|
|
190
|
+
properties: {
|
|
191
|
+
computer_id: COMPUTER_ID,
|
|
192
|
+
command: { type: "string", minLength: 1, maxLength: 20000 }
|
|
193
|
+
},
|
|
194
|
+
additionalProperties: false
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "execute_python",
|
|
199
|
+
description: "Execute Python code inside an Orgo computer with a bounded timeout.",
|
|
200
|
+
inputSchema: {
|
|
201
|
+
type: "object",
|
|
202
|
+
required: ["computer_id", "code"],
|
|
203
|
+
properties: {
|
|
204
|
+
computer_id: COMPUTER_ID,
|
|
205
|
+
code: { type: "string", minLength: 1, maxLength: 50000 },
|
|
206
|
+
timeout: { type: "integer", minimum: 1, maximum: 300 }
|
|
207
|
+
},
|
|
208
|
+
additionalProperties: false
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
];
|
|
212
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAW;IAC1B,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,mEAAmE;CACjF,CAAC;AAEF,MAAM,iBAAiB,GAAwB;IAC7C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,aAAa,CAAC;IACzB,UAAU,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE;IACxC,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAW;IAChC;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,2DAA2D;QACxE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE;KAC7E;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,+CAA+C;QAC5D,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,MAAM,CAAC;YAClB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE;YACtD,oBAAoB,EAAE,KAAK;SAC5B;KACF;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,WA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AE,gBAAgB;QACtB,WAAW,EAAE,qEAAqE;QAClF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC;YACjC,UAAU,EAAE;gBACV,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE;gBACxD,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE;aACvD;YACD,oBAAoB,EAAE,KAAK;SAC5B;KACF;CACF,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@assemblyline-agents/orgo",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"default": "./dist/index.js"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
13
|
+
"@assemblyline-agents/core": "0.1.0"
|
|
14
|
+
},
|
|
15
|
+
"description": "Official OpenEve Orgo cloud computer-use connection plugin.",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"skills"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=22.19.0"
|
|
22
|
+
},
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/jasonbadeaux/openeve.git",
|
|
27
|
+
"directory": "packages/orgo"
|
|
28
|
+
},
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/jasonbadeaux/openeve/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/jasonbadeaux/openeve#readme",
|
|
33
|
+
"author": "OpenEve contributors",
|
|
34
|
+
"keywords": [
|
|
35
|
+
"openeve",
|
|
36
|
+
"ai",
|
|
37
|
+
"agents",
|
|
38
|
+
"orgo",
|
|
39
|
+
"computer-use",
|
|
40
|
+
"cloud",
|
|
41
|
+
"plugin"
|
|
42
|
+
],
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc -p tsconfig.json",
|
|
48
|
+
"check": "tsc -p tsconfig.json --noEmit"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orgo
|
|
3
|
+
description: Provision, inspect, and control isolated Orgo cloud desktops through a developer-configured API key.
|
|
4
|
+
---
|
|
5
|
+
# Orgo cloud computer use
|
|
6
|
+
|
|
7
|
+
Use Orgo when a task needs a persistent full Linux desktop rather than only a
|
|
8
|
+
browser tab or the user's own Mac. The deployment owner supplies
|
|
9
|
+
`ORGO_API_KEY`; never place it, VNC credentials, cookies, or login secrets in
|
|
10
|
+
tool arguments or prompts.
|
|
11
|
+
|
|
12
|
+
Start with `list_workspaces` and `list_computers`. Reuse a purpose-built
|
|
13
|
+
computer when possible. Creating a computer consumes account capacity and may
|
|
14
|
+
continue billing until it is stopped or deleted, so use the smallest suitable
|
|
15
|
+
configuration and set `auto_stop_minutes` for unattended work.
|
|
16
|
+
|
|
17
|
+
For visual interaction, call `screenshot`, reason from the returned image, take
|
|
18
|
+
one narrow action, and capture another screenshot after navigation or any
|
|
19
|
+
state-changing input. Keep coordinates within the displayed resolution. Use
|
|
20
|
+
`execute_bash` or `execute_python` only when direct machine execution is
|
|
21
|
+
actually appropriate; both have full authority inside the cloud computer.
|
|
22
|
+
|
|
23
|
+
Use dedicated workspaces and computers for untrusted sites or files. Do not
|
|
24
|
+
sign into sensitive accounts without explicit user authorization and an
|
|
25
|
+
approved credential workflow. Prefer stopping a reusable computer after work.
|
|
26
|
+
Delete it only when the user or operating policy clearly requires permanent
|
|
27
|
+
disk removal.
|
|
28
|
+
|
|
29
|
+
The scaffold is read-only: it can list workspaces/computers, inspect computer
|
|
30
|
+
status, and take screenshots. Provisioning, lifecycle changes, mouse/keyboard
|
|
31
|
+
input, waits, and code execution require:
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
write: { approval: "always" }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Use `write: { approval: "never" }` only for a dedicated Orgo account and
|
|
38
|
+
autonomous workload whose cost, login, data, and deletion boundaries have been
|
|
39
|
+
reviewed.
|