@cmdop/sdk 2.0.0 → 3.0.1
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 +17 -119
- package/dist/carriers/carrier.d.ts +40 -0
- package/dist/carriers/carrier.js +16 -0
- package/dist/carriers/http.d.ts +15 -0
- package/dist/carriers/http.js +114 -0
- package/dist/carriers/memory.d.ts +11 -0
- package/dist/carriers/memory.js +35 -0
- package/dist/carriers/ndjson.d.ts +16 -0
- package/dist/carriers/ndjson.js +31 -0
- package/dist/client.d.ts +113 -0
- package/dist/client.js +220 -0
- package/dist/generated/call.gen.d.ts +78 -0
- package/dist/generated/call.gen.js +5 -0
- package/dist/generated/tools.gen.d.ts +1046 -0
- package/dist/generated/tools.gen.js +34 -0
- package/dist/index.d.ts +8 -959
- package/dist/index.js +8 -626
- package/dist/screen.d.ts +19 -0
- package/dist/screen.js +16 -0
- package/dist/vendor.d.ts +52 -0
- package/dist/vendor.js +291 -0
- package/package.json +12 -36
- package/bin/cmdop-core-darwin-arm64 +0 -0
- package/bin/cmdop-core-darwin-x64 +0 -0
- package/bin/cmdop-core-linux-arm64 +0 -0
- package/bin/cmdop-core-linux-x64 +0 -0
- package/bin/cmdop-core-win32-x64.exe +0 -0
- package/dist/index.cjs +0 -647
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -959
- package/dist/index.js.map +0 -1
package/dist/vendor.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vendor computer-use actions as cmdop tool calls (@dev/completed/computer-use/10_computer_use.md, D13). The machine publishes one convention;
|
|
3
|
+
* the formats of the vendors are converted here, in pure functions: an action in, a list of steps out.
|
|
4
|
+
*
|
|
5
|
+
* Supported: Anthropic `computer_20250124` / `computer_20251124` actions (`screenshot`, `left_click`, `right_click`,
|
|
6
|
+
* `middle_click`, `double_click`, `triple_click`, `mouse_move`, `left_click_drag`, `type`, `key`, `hold_key`, `scroll`,
|
|
7
|
+
* `wait`, `cursor_position`, `zoom`) and OpenAI computer-use actions (`screenshot`, `click`, `double_click`, `scroll`,
|
|
8
|
+
* `type`, `keypress`, `move`, `drag`, `wait`).
|
|
9
|
+
*
|
|
10
|
+
* Not supported yet: models that point on a 0-999 grid (UI-TARS style) or in relative coordinates. Their numbers are not
|
|
11
|
+
* pixels of our screenshot and converting them needs the screen size; such an action is not guessed at. Also refused:
|
|
12
|
+
* `left_mouse_down` / `left_mouse_up` (no half-clicks: a button is never left held), and OpenAI `wheel`, `back` and
|
|
13
|
+
* `forward` buttons.
|
|
14
|
+
*
|
|
15
|
+
* Coordinates are taken as pixels of the image the latest `screen_capture` returned, which is what both vendors expect
|
|
16
|
+
* when the screenshot they were shown is the one we sent. Input steps ask for `observe: "image"` by default because a
|
|
17
|
+
* vendor loop wants a screenshot after every action; pass `observe: "none"` to send them without.
|
|
18
|
+
*/
|
|
19
|
+
import type { Machine } from "./client.ts";
|
|
20
|
+
import type { Observe, ToolMap, ToolName } from "./generated/tools.gen.ts";
|
|
21
|
+
/** One thing to do: a tool call, or a pause the caller makes itself (the machine never sleeps on its own). */
|
|
22
|
+
export type Step = {
|
|
23
|
+
[N in ToolName]: {
|
|
24
|
+
tool: N;
|
|
25
|
+
args: ToolMap[N]["args"];
|
|
26
|
+
};
|
|
27
|
+
}[ToolName] | {
|
|
28
|
+
sleep_ms: number;
|
|
29
|
+
};
|
|
30
|
+
export interface VendorOptions {
|
|
31
|
+
/** What input steps return afterwards. Default `"image"`. */
|
|
32
|
+
observe?: Observe;
|
|
33
|
+
}
|
|
34
|
+
/** An action this adapter does not convert. The message says why; nothing was sent. */
|
|
35
|
+
export declare class UnsupportedAction extends Error {
|
|
36
|
+
constructor(message: string);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Anthropic computer-use tool actions. `action` is the tool input as the model wrote it (`{ action: "left_click",
|
|
40
|
+
* coordinate: [640, 400] }`). Returns the steps to run in order.
|
|
41
|
+
*/
|
|
42
|
+
export declare function anthropicToCalls(action: unknown, opts?: VendorOptions): Step[];
|
|
43
|
+
/**
|
|
44
|
+
* OpenAI computer-use actions (`{ type: "click", x, y, button }`, the `action` of a `computer_call`). Returns the
|
|
45
|
+
* steps to run in order.
|
|
46
|
+
*/
|
|
47
|
+
export declare function openaiToCalls(action: unknown, opts?: VendorOptions): Step[];
|
|
48
|
+
/**
|
|
49
|
+
* Runs steps on one machine in order and returns the answer of the last tool call. A `sleep_ms` step waits here, on the
|
|
50
|
+
* caller's side. The first failing call throws its `CmdopError`; later steps are not run.
|
|
51
|
+
*/
|
|
52
|
+
export declare function performCalls(machine: Machine, steps: Step[], sleep?: (ms: number) => Promise<void>): Promise<unknown>;
|
package/dist/vendor.js
ADDED
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vendor computer-use actions as cmdop tool calls (@dev/completed/computer-use/10_computer_use.md, D13). The machine publishes one convention;
|
|
3
|
+
* the formats of the vendors are converted here, in pure functions: an action in, a list of steps out.
|
|
4
|
+
*
|
|
5
|
+
* Supported: Anthropic `computer_20250124` / `computer_20251124` actions (`screenshot`, `left_click`, `right_click`,
|
|
6
|
+
* `middle_click`, `double_click`, `triple_click`, `mouse_move`, `left_click_drag`, `type`, `key`, `hold_key`, `scroll`,
|
|
7
|
+
* `wait`, `cursor_position`, `zoom`) and OpenAI computer-use actions (`screenshot`, `click`, `double_click`, `scroll`,
|
|
8
|
+
* `type`, `keypress`, `move`, `drag`, `wait`).
|
|
9
|
+
*
|
|
10
|
+
* Not supported yet: models that point on a 0-999 grid (UI-TARS style) or in relative coordinates. Their numbers are not
|
|
11
|
+
* pixels of our screenshot and converting them needs the screen size; such an action is not guessed at. Also refused:
|
|
12
|
+
* `left_mouse_down` / `left_mouse_up` (no half-clicks: a button is never left held), and OpenAI `wheel`, `back` and
|
|
13
|
+
* `forward` buttons.
|
|
14
|
+
*
|
|
15
|
+
* Coordinates are taken as pixels of the image the latest `screen_capture` returned, which is what both vendors expect
|
|
16
|
+
* when the screenshot they were shown is the one we sent. Input steps ask for `observe: "image"` by default because a
|
|
17
|
+
* vendor loop wants a screenshot after every action; pass `observe: "none"` to send them without.
|
|
18
|
+
*/
|
|
19
|
+
/** An action this adapter does not convert. The message says why; nothing was sent. */
|
|
20
|
+
export class UnsupportedAction extends Error {
|
|
21
|
+
constructor(message) {
|
|
22
|
+
super(message);
|
|
23
|
+
this.name = "UnsupportedAction";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const MAX_LINES = 10;
|
|
27
|
+
const clampLines = (n) => Math.max(-MAX_LINES, Math.min(MAX_LINES, Math.round(n)));
|
|
28
|
+
function num(v, what) {
|
|
29
|
+
if (typeof v !== "number" || !Number.isFinite(v))
|
|
30
|
+
throw new UnsupportedAction(`${what} must be a number`);
|
|
31
|
+
return Math.round(v);
|
|
32
|
+
}
|
|
33
|
+
/** Seconds as milliseconds, without rounding the seconds first. */
|
|
34
|
+
function millis(v, what) {
|
|
35
|
+
if (typeof v !== "number" || !Number.isFinite(v) || v < 0)
|
|
36
|
+
throw new UnsupportedAction(`${what} must be a number of seconds`);
|
|
37
|
+
return Math.round(v * 1000);
|
|
38
|
+
}
|
|
39
|
+
function pair(v, what) {
|
|
40
|
+
if (!Array.isArray(v) || v.length !== 2)
|
|
41
|
+
throw new UnsupportedAction(`${what} must be [x, y]`);
|
|
42
|
+
return { x: num(v[0], `${what}[0]`), y: num(v[1], `${what}[1]`) };
|
|
43
|
+
}
|
|
44
|
+
function text(v, what) {
|
|
45
|
+
if (typeof v !== "string")
|
|
46
|
+
throw new UnsupportedAction(`${what} must be a string`);
|
|
47
|
+
return v;
|
|
48
|
+
}
|
|
49
|
+
const MODIFIERS = {
|
|
50
|
+
shift: "shift",
|
|
51
|
+
ctrl: "ctrl",
|
|
52
|
+
control: "ctrl",
|
|
53
|
+
alt: "alt",
|
|
54
|
+
option: "alt",
|
|
55
|
+
opt: "alt",
|
|
56
|
+
meta: "meta",
|
|
57
|
+
cmd: "meta",
|
|
58
|
+
command: "meta",
|
|
59
|
+
super: "meta",
|
|
60
|
+
win: "meta",
|
|
61
|
+
windows: "meta",
|
|
62
|
+
};
|
|
63
|
+
/** Key names the vendors use (xdotool, DOM, OpenAI) to ours (`crates/tools` `key_press`). Anything else passes through. */
|
|
64
|
+
const KEYS = {
|
|
65
|
+
return: "Enter",
|
|
66
|
+
enter: "Enter",
|
|
67
|
+
kp_enter: "Enter",
|
|
68
|
+
tab: "Tab",
|
|
69
|
+
escape: "Escape",
|
|
70
|
+
esc: "Escape",
|
|
71
|
+
space: "Space",
|
|
72
|
+
backspace: "Backspace",
|
|
73
|
+
delete: "Delete",
|
|
74
|
+
home: "Home",
|
|
75
|
+
end: "End",
|
|
76
|
+
page_up: "PageUp",
|
|
77
|
+
pageup: "PageUp",
|
|
78
|
+
prior: "PageUp",
|
|
79
|
+
page_down: "PageDown",
|
|
80
|
+
pagedown: "PageDown",
|
|
81
|
+
next: "PageDown",
|
|
82
|
+
up: "ArrowUp",
|
|
83
|
+
down: "ArrowDown",
|
|
84
|
+
left: "ArrowLeft",
|
|
85
|
+
right: "ArrowRight",
|
|
86
|
+
arrowup: "ArrowUp",
|
|
87
|
+
arrowdown: "ArrowDown",
|
|
88
|
+
arrowleft: "ArrowLeft",
|
|
89
|
+
arrowright: "ArrowRight",
|
|
90
|
+
};
|
|
91
|
+
const MODIFIER_KEYS = { shift: "Shift", ctrl: "Control", alt: "Alt", meta: "Meta" };
|
|
92
|
+
function keyName(raw) {
|
|
93
|
+
const k = raw.trim();
|
|
94
|
+
if (k === "" && raw.length > 0)
|
|
95
|
+
return "Space";
|
|
96
|
+
const mapped = KEYS[k.toLowerCase()];
|
|
97
|
+
if (mapped)
|
|
98
|
+
return mapped;
|
|
99
|
+
// A single letter is lower case: the shift is a modifier, never implied by the case.
|
|
100
|
+
if (k.length === 1)
|
|
101
|
+
return k.toLowerCase();
|
|
102
|
+
// `F5`, `f5` → `F5`.
|
|
103
|
+
if (/^f\d{1,2}$/i.test(k))
|
|
104
|
+
return k.toUpperCase();
|
|
105
|
+
return k;
|
|
106
|
+
}
|
|
107
|
+
/** `["CTRL", "A"]` or `"ctrl+shift+a"` → modifiers and the one key. */
|
|
108
|
+
function chord(parts) {
|
|
109
|
+
const modifiers = [];
|
|
110
|
+
const keys = [];
|
|
111
|
+
for (const p of parts) {
|
|
112
|
+
const m = MODIFIERS[p.trim().toLowerCase()];
|
|
113
|
+
if (m) {
|
|
114
|
+
if (!modifiers.includes(m))
|
|
115
|
+
modifiers.push(m);
|
|
116
|
+
}
|
|
117
|
+
else
|
|
118
|
+
keys.push(p);
|
|
119
|
+
}
|
|
120
|
+
// A modifier pressed alone (`hold_key Shift`) is the key itself, named as the DOM does.
|
|
121
|
+
if (keys.length === 0 && modifiers.length > 0)
|
|
122
|
+
return { key: MODIFIER_KEYS[modifiers[modifiers.length - 1]], modifiers: modifiers.slice(0, -1) };
|
|
123
|
+
if (keys.length !== 1)
|
|
124
|
+
throw new UnsupportedAction(`a key press needs exactly one key besides modifiers, got ${JSON.stringify(parts)}`);
|
|
125
|
+
return { key: keyName(keys[0]), modifiers };
|
|
126
|
+
}
|
|
127
|
+
/** `"ctrl+s"`, `"alt+Tab"`, `"Return"`, a lone `"+"`. */
|
|
128
|
+
function splitChord(s) {
|
|
129
|
+
if (s === "+")
|
|
130
|
+
return ["+"];
|
|
131
|
+
return s.split("+").map((p) => (p === "" ? "+" : p));
|
|
132
|
+
}
|
|
133
|
+
/** The modifiers of an Anthropic click's `text` (`"ctrl"`, `"ctrl+shift"`). */
|
|
134
|
+
function modifiersOf(v) {
|
|
135
|
+
if (v === undefined || v === null || v === "")
|
|
136
|
+
return [];
|
|
137
|
+
return chord([...splitChord(text(v, "text")), "x"]).modifiers;
|
|
138
|
+
}
|
|
139
|
+
const withMods = (modifiers) => (modifiers.length ? { modifiers } : {});
|
|
140
|
+
/**
|
|
141
|
+
* Anthropic computer-use tool actions. `action` is the tool input as the model wrote it (`{ action: "left_click",
|
|
142
|
+
* coordinate: [640, 400] }`). Returns the steps to run in order.
|
|
143
|
+
*/
|
|
144
|
+
export function anthropicToCalls(action, opts = {}) {
|
|
145
|
+
if (typeof action !== "object" || action === null)
|
|
146
|
+
throw new UnsupportedAction("an action must be an object");
|
|
147
|
+
const a = action;
|
|
148
|
+
const observe = opts.observe ?? "image";
|
|
149
|
+
const at = () => pair(a.coordinate, "coordinate");
|
|
150
|
+
const click = (button, count) => [
|
|
151
|
+
{ tool: "pointer_click", args: { ...at(), button, count, ...withMods(modifiersOf(a.text)), observe } },
|
|
152
|
+
];
|
|
153
|
+
switch (a.action) {
|
|
154
|
+
case "screenshot":
|
|
155
|
+
return [{ tool: "screen_capture", args: {} }];
|
|
156
|
+
case "left_click":
|
|
157
|
+
return click("left", 1);
|
|
158
|
+
case "right_click":
|
|
159
|
+
return click("right", 1);
|
|
160
|
+
case "middle_click":
|
|
161
|
+
return click("middle", 1);
|
|
162
|
+
case "double_click":
|
|
163
|
+
return click("left", 2);
|
|
164
|
+
case "triple_click":
|
|
165
|
+
return click("left", 3);
|
|
166
|
+
case "mouse_move":
|
|
167
|
+
return [{ tool: "pointer_move", args: { ...at(), observe } }];
|
|
168
|
+
case "left_click_drag": {
|
|
169
|
+
const path = [pair(a.start_coordinate, "start_coordinate"), pair(a.coordinate, "coordinate")];
|
|
170
|
+
return [{ tool: "pointer_drag", args: { path, ...withMods(modifiersOf(a.text)), observe } }];
|
|
171
|
+
}
|
|
172
|
+
case "type":
|
|
173
|
+
return [{ tool: "text_type", args: { text: text(a.text, "text"), observe } }];
|
|
174
|
+
case "key": {
|
|
175
|
+
const { key, modifiers } = chord(splitChord(text(a.text, "text")));
|
|
176
|
+
return [{ tool: "key_press", args: { key, ...withMods(modifiers), observe } }];
|
|
177
|
+
}
|
|
178
|
+
case "hold_key": {
|
|
179
|
+
const { key, modifiers } = chord(splitChord(text(a.text, "text")));
|
|
180
|
+
const hold_ms = millis(a.duration, "duration");
|
|
181
|
+
return [{ tool: "key_press", args: { key, hold_ms, ...withMods(modifiers), observe } }];
|
|
182
|
+
}
|
|
183
|
+
case "scroll": {
|
|
184
|
+
const n = num(a.scroll_amount ?? 1, "scroll_amount");
|
|
185
|
+
let dx = 0;
|
|
186
|
+
let dy = 0;
|
|
187
|
+
if (a.scroll_direction === "up")
|
|
188
|
+
dy = -n;
|
|
189
|
+
else if (a.scroll_direction === "down")
|
|
190
|
+
dy = n;
|
|
191
|
+
else if (a.scroll_direction === "left")
|
|
192
|
+
dx = -n;
|
|
193
|
+
else if (a.scroll_direction === "right")
|
|
194
|
+
dx = n;
|
|
195
|
+
else
|
|
196
|
+
throw new UnsupportedAction("scroll_direction must be up, down, left or right");
|
|
197
|
+
return [{ tool: "pointer_scroll", args: { ...at(), dx: clampLines(dx), dy: clampLines(dy), observe } }];
|
|
198
|
+
}
|
|
199
|
+
case "wait":
|
|
200
|
+
return [{ sleep_ms: millis(a.duration, "duration") }, { tool: "screen_capture", args: {} }];
|
|
201
|
+
case "cursor_position":
|
|
202
|
+
return [{ tool: "screen_info", args: {} }];
|
|
203
|
+
case "zoom": {
|
|
204
|
+
const r = a.region;
|
|
205
|
+
if (!Array.isArray(r) || r.length !== 4)
|
|
206
|
+
throw new UnsupportedAction("region must be [x0, y0, x1, y1]");
|
|
207
|
+
const [x0, y0, x1, y1] = r.map((v, i) => num(v, `region[${i}]`));
|
|
208
|
+
return [{ tool: "screen_capture", args: { region: { x: x0, y: y0, w: x1 - x0, h: y1 - y0 } } }];
|
|
209
|
+
}
|
|
210
|
+
case "left_mouse_down":
|
|
211
|
+
case "left_mouse_up":
|
|
212
|
+
throw new UnsupportedAction(`${String(a.action)}: half-clicks are not offered (a button is never left held); use left_click_drag`);
|
|
213
|
+
default:
|
|
214
|
+
throw new UnsupportedAction(`unknown Anthropic action ${JSON.stringify(a.action)}`);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/** Pixels of an OpenAI wheel delta to lines: about a notch per 100 px, at least one line for any movement. */
|
|
218
|
+
function pixelsToLines(px) {
|
|
219
|
+
if (px === 0)
|
|
220
|
+
return 0;
|
|
221
|
+
return clampLines(Math.sign(px) * Math.max(1, Math.round(Math.abs(px) / 100)));
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* OpenAI computer-use actions (`{ type: "click", x, y, button }`, the `action` of a `computer_call`). Returns the
|
|
225
|
+
* steps to run in order.
|
|
226
|
+
*/
|
|
227
|
+
export function openaiToCalls(action, opts = {}) {
|
|
228
|
+
if (typeof action !== "object" || action === null)
|
|
229
|
+
throw new UnsupportedAction("an action must be an object");
|
|
230
|
+
const a = action;
|
|
231
|
+
const observe = opts.observe ?? "image";
|
|
232
|
+
const at = () => ({ x: num(a.x, "x"), y: num(a.y, "y") });
|
|
233
|
+
switch (a.type) {
|
|
234
|
+
case "screenshot":
|
|
235
|
+
return [{ tool: "screen_capture", args: {} }];
|
|
236
|
+
case "click": {
|
|
237
|
+
const button = a.button ?? "left";
|
|
238
|
+
if (button !== "left" && button !== "right" && button !== "middle") {
|
|
239
|
+
throw new UnsupportedAction(`click button ${JSON.stringify(button)} is not offered (left, right and middle are)`);
|
|
240
|
+
}
|
|
241
|
+
return [{ tool: "pointer_click", args: { ...at(), button, count: 1, observe } }];
|
|
242
|
+
}
|
|
243
|
+
case "double_click":
|
|
244
|
+
return [{ tool: "pointer_click", args: { ...at(), button: "left", count: 2, observe } }];
|
|
245
|
+
case "move":
|
|
246
|
+
return [{ tool: "pointer_move", args: { ...at(), observe } }];
|
|
247
|
+
case "scroll":
|
|
248
|
+
return [
|
|
249
|
+
{
|
|
250
|
+
tool: "pointer_scroll",
|
|
251
|
+
args: { ...at(), dx: pixelsToLines(num(a.scroll_x ?? 0, "scroll_x")), dy: pixelsToLines(num(a.scroll_y ?? 0, "scroll_y")), observe },
|
|
252
|
+
},
|
|
253
|
+
];
|
|
254
|
+
case "type":
|
|
255
|
+
return [{ tool: "text_type", args: { text: text(a.text, "text"), observe } }];
|
|
256
|
+
case "keypress": {
|
|
257
|
+
if (!Array.isArray(a.keys) || a.keys.length === 0)
|
|
258
|
+
throw new UnsupportedAction("keys must be a non-empty array");
|
|
259
|
+
const { key, modifiers } = chord(a.keys.map((k) => text(k, "keys[]")));
|
|
260
|
+
return [{ tool: "key_press", args: { key, ...withMods(modifiers), observe } }];
|
|
261
|
+
}
|
|
262
|
+
case "drag": {
|
|
263
|
+
if (!Array.isArray(a.path) || a.path.length < 2)
|
|
264
|
+
throw new UnsupportedAction("path must hold at least two points");
|
|
265
|
+
const path = a.path.map((p, i) => {
|
|
266
|
+
const o = (p ?? {});
|
|
267
|
+
return { x: num(o.x, `path[${i}].x`), y: num(o.y, `path[${i}].y`) };
|
|
268
|
+
});
|
|
269
|
+
return [{ tool: "pointer_drag", args: { path, observe } }];
|
|
270
|
+
}
|
|
271
|
+
case "wait":
|
|
272
|
+
// OpenAI's wait has no length; its examples wait about two seconds.
|
|
273
|
+
return [{ sleep_ms: 2000 }, { tool: "screen_capture", args: {} }];
|
|
274
|
+
default:
|
|
275
|
+
throw new UnsupportedAction(`unknown OpenAI action ${JSON.stringify(a.type)}`);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Runs steps on one machine in order and returns the answer of the last tool call. A `sleep_ms` step waits here, on the
|
|
280
|
+
* caller's side. The first failing call throws its `CmdopError`; later steps are not run.
|
|
281
|
+
*/
|
|
282
|
+
export async function performCalls(machine, steps, sleep = (ms) => new Promise((r) => setTimeout(r, ms))) {
|
|
283
|
+
let last;
|
|
284
|
+
for (const s of steps) {
|
|
285
|
+
if ("sleep_ms" in s)
|
|
286
|
+
await sleep(s.sleep_ms);
|
|
287
|
+
else
|
|
288
|
+
last = await machine[s.tool](s.args);
|
|
289
|
+
}
|
|
290
|
+
return last;
|
|
291
|
+
}
|
package/package.json
CHANGED
|
@@ -1,58 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmdop/sdk",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
|
+
"description": "Your machines' tools from a program: the same tools agents use through MCP, typed from Rust.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"homepage": "https://cmdop.
|
|
6
|
+
"homepage": "https://cmdop.ai",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/commandoperator/cmdop-sdk.git",
|
|
10
|
-
"directory": "
|
|
10
|
+
"directory": "typescript"
|
|
11
11
|
},
|
|
12
12
|
"bugs": {
|
|
13
13
|
"url": "https://github.com/commandoperator/cmdop-sdk/issues"
|
|
14
14
|
},
|
|
15
15
|
"type": "module",
|
|
16
|
-
"main": "./dist/index.
|
|
17
|
-
"module": "./dist/index.js",
|
|
16
|
+
"main": "./dist/index.js",
|
|
18
17
|
"types": "./dist/index.d.ts",
|
|
19
18
|
"exports": {
|
|
20
19
|
".": {
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
"require": {
|
|
26
|
-
"types": "./dist/index.d.cts",
|
|
27
|
-
"default": "./dist/index.cjs"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"./package.json": "./package.json"
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
}
|
|
31
23
|
},
|
|
32
24
|
"files": [
|
|
33
25
|
"dist",
|
|
34
|
-
"
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
35
28
|
],
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=18"
|
|
38
|
-
},
|
|
39
29
|
"sideEffects": false,
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"dev": "tsup --watch",
|
|
43
|
-
"check-types": "tsc --noEmit",
|
|
44
|
-
"test": "vitest run",
|
|
45
|
-
"clean": "rm -rf dist *.tsbuildinfo"
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"@bufbuild/protobuf": "^2.12.0"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@types/node": "^20.14.0",
|
|
52
|
-
"tsup": "^8.3.0",
|
|
53
|
-
"tsx": "^4.23.1",
|
|
54
|
-
"typescript": "^5.6.0",
|
|
55
|
-
"vitest": "^2.1.0"
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=20"
|
|
56
32
|
},
|
|
57
33
|
"publishConfig": {
|
|
58
34
|
"access": "public"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/cmdop-core-linux-x64
DELETED
|
Binary file
|
|
Binary file
|