@cmdop/sdk 3.7.5 → 3.9.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/dist/generated/call.gen.js +1 -1
- package/dist/generated/server.gen.d.ts +92 -1
- package/dist/generated/server.gen.js +4 -2
- package/dist/generated/surface.gen.js +1 -1
- package/dist/generated/tools.gen.d.ts +17 -1
- package/dist/generated/tools.gen.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from cmdop/crates/tools/tools.schema.json (sha256
|
|
1
|
+
// Generated from cmdop/crates/tools/tools.schema.json (sha256 ea2c4cf0e8fbfef6, cmdop 0.1.31) by exports/sdk/gen/gen.ts. Do not edit.
|
|
2
2
|
/** Every error code, in the order Rust declares them. */
|
|
3
3
|
export const ERROR_CODES = ["other", "denied", "unknown_tool", "bad_args", "not_found", "busy", "permission_missing", "screen_locked", "stale_capture", "element_gone", "app_not_allowed", "lease_paused", "paused", "offline", "rate_limited", "quota_exceeded", "not_dispatched", "display_gone", "timed_out", "cancelled", "too_large", "hash_required", "failed", "needs_presence", "unauthorized", "tool_refused", "sandbox_unavailable"];
|
|
4
4
|
/** The size limits every carrier keeps. */
|
|
@@ -45,6 +45,25 @@ export type HistorySearchOut = {
|
|
|
45
45
|
export type MachinesListArgs = Record<string, never>;
|
|
46
46
|
/** What `machines_list` returns. */
|
|
47
47
|
export type MachinesListOut = MachineRow[];
|
|
48
|
+
/** Arguments of `preview_open`. `preview_open`'s argument. */
|
|
49
|
+
export type PreviewOpenArgs = {
|
|
50
|
+
/** The preview's name, as `previews_list` shows it. */
|
|
51
|
+
name: string;
|
|
52
|
+
};
|
|
53
|
+
/** What `preview_open` returns. */
|
|
54
|
+
export type PreviewOpenOut = {
|
|
55
|
+
/** When the link stops opening (unix seconds); absent for a public preview's own address. */
|
|
56
|
+
expires?: number | null;
|
|
57
|
+
/**
|
|
58
|
+
* Open it in your own browser. A private preview's link is one-time: it signs that browser
|
|
59
|
+
* in to this preview as you, works up to 3 times within 10 minutes, and is a secret.
|
|
60
|
+
*/
|
|
61
|
+
url: string;
|
|
62
|
+
};
|
|
63
|
+
/** Arguments of `previews_list`. No arguments. */
|
|
64
|
+
export type PreviewsListArgs = Record<string, never>;
|
|
65
|
+
/** What `previews_list` returns. */
|
|
66
|
+
export type PreviewsListOut = PreviewRow[];
|
|
48
67
|
/** Arguments of `showtime_guide`. */
|
|
49
68
|
export type ShowtimeGuideArgs = {
|
|
50
69
|
/** The language to speak to the user in, e.g. "Russian" or "de". Default: the user's. */
|
|
@@ -128,6 +147,11 @@ export type MachineRow = {
|
|
|
128
147
|
dirty: boolean;
|
|
129
148
|
epoch: number;
|
|
130
149
|
id: string;
|
|
150
|
+
/**
|
|
151
|
+
* What kind of computer it is (`container`, `vm`, `laptop`, `desktop`, `server`), as it said
|
|
152
|
+
* on its last link. Left out when it did not say: an older program, or it could not tell.
|
|
153
|
+
*/
|
|
154
|
+
kind?: MachineKind | null;
|
|
131
155
|
/** The name its owner gave it on the page; null when none, and `name` is `own_name`. */
|
|
132
156
|
label?: string | null;
|
|
133
157
|
/** Unix seconds of the last message from the machine. */
|
|
@@ -180,6 +204,29 @@ export type Picture = {
|
|
|
180
204
|
others: number;
|
|
181
205
|
procs: ProcView[];
|
|
182
206
|
};
|
|
207
|
+
/**
|
|
208
|
+
* One preview with its share links, as the server tool `previews_list` gives it to an agent
|
|
209
|
+
* (http-gate G5g): a link's note, expiry, state and browsers, never its address or code.
|
|
210
|
+
*/
|
|
211
|
+
export type PreviewRow = {
|
|
212
|
+
/** Close works now: its machine is online with a program that closes on the owner's word. */
|
|
213
|
+
closable: boolean;
|
|
214
|
+
id: number;
|
|
215
|
+
machine: PreviewMachine;
|
|
216
|
+
name: string;
|
|
217
|
+
/** Unix seconds. */
|
|
218
|
+
opened_at: number;
|
|
219
|
+
port: number;
|
|
220
|
+
/** Its share links, newest first: the live ones and those that ended within a week. */
|
|
221
|
+
shares: ShareView[];
|
|
222
|
+
/** Browsers signed in now (the owner's, guests' through links, agents'). */
|
|
223
|
+
signed_in: number;
|
|
224
|
+
/** Of `signed_in`, the browsers signed in as an agent (http-gate G5j). */
|
|
225
|
+
signed_in_agents: number;
|
|
226
|
+
/** `https://<name>-<address>.<gate zone>`. */
|
|
227
|
+
url: string;
|
|
228
|
+
visibility: Visibility;
|
|
229
|
+
};
|
|
183
230
|
/** A kept vendor session file, or a run of the agent dock (`dock` set), as history shows it. */
|
|
184
231
|
export type SessionView = {
|
|
185
232
|
author: string;
|
|
@@ -241,6 +288,8 @@ export type DockRunView = {
|
|
|
241
288
|
/** Unix milliseconds. */
|
|
242
289
|
started: number;
|
|
243
290
|
};
|
|
291
|
+
/** The kind of computer a machine runs on. */
|
|
292
|
+
export type MachineKind = ("laptop" | "desktop") | "container" | "vm" | "server";
|
|
244
293
|
/**
|
|
245
294
|
* Whether a machine can take a call now, the one answer the page, the app, MCP, the SDK and the
|
|
246
295
|
* refusals give (machine-presence V1). It is derived from the time of the machine's last
|
|
@@ -248,6 +297,12 @@ export type DockRunView = {
|
|
|
248
297
|
* machine looking alive.
|
|
249
298
|
*/
|
|
250
299
|
export type Presence = "online" | "stale" | "offline" | "paused";
|
|
300
|
+
/** A preview's machine. */
|
|
301
|
+
export type PreviewMachine = {
|
|
302
|
+
id: string;
|
|
303
|
+
name: string;
|
|
304
|
+
online: boolean;
|
|
305
|
+
};
|
|
251
306
|
/** A process cmdop did not start, with who did. */
|
|
252
307
|
export type ProcView = {
|
|
253
308
|
argv: string[];
|
|
@@ -258,8 +313,24 @@ export type ProcView = {
|
|
|
258
313
|
pid: number;
|
|
259
314
|
started: number;
|
|
260
315
|
};
|
|
316
|
+
/** One share link, as listed: never its address, which was shown once. */
|
|
317
|
+
export type ShareView = {
|
|
318
|
+
/** Browsers signed in through it now. */
|
|
319
|
+
browsers: number;
|
|
320
|
+
created_at: number;
|
|
321
|
+
expires_at: number;
|
|
322
|
+
id: number;
|
|
323
|
+
last_used_at?: number | null;
|
|
324
|
+
note: string;
|
|
325
|
+
revoked_at?: number | null;
|
|
326
|
+
state: ShareState;
|
|
327
|
+
};
|
|
261
328
|
/** Where a task is in its life. The store keeps it as text (`cmdop-store` writes only these five). */
|
|
262
329
|
export type TaskState = "running" | "starting" | "ended" | "failed" | "lost";
|
|
330
|
+
/** Who may open a preview. */
|
|
331
|
+
export type Visibility = "private" | "public";
|
|
332
|
+
/** Where a share link stands. */
|
|
333
|
+
export type ShareState = "live" | "expired" | "revoked";
|
|
263
334
|
/** Every tool the server answers itself: its arguments and its result. */
|
|
264
335
|
export interface ServerToolMap {
|
|
265
336
|
docs_read: {
|
|
@@ -274,6 +345,14 @@ export interface ServerToolMap {
|
|
|
274
345
|
args: MachinesListArgs;
|
|
275
346
|
out: MachinesListOut;
|
|
276
347
|
};
|
|
348
|
+
preview_open: {
|
|
349
|
+
args: PreviewOpenArgs;
|
|
350
|
+
out: PreviewOpenOut;
|
|
351
|
+
};
|
|
352
|
+
previews_list: {
|
|
353
|
+
args: PreviewsListArgs;
|
|
354
|
+
out: PreviewsListOut;
|
|
355
|
+
};
|
|
277
356
|
showtime_guide: {
|
|
278
357
|
args: ShowtimeGuideArgs;
|
|
279
358
|
out: ShowtimeGuideOut;
|
|
@@ -298,6 +377,14 @@ export declare const SERVER_TOOLS: {
|
|
|
298
377
|
readonly title: "List machines";
|
|
299
378
|
readonly description: "The owner's machines: name, id, `state` (online; stale = not answering; paused; offline), `last_seen`, `activity`, `tools` (screen and control are here), build, `behind`. Only online ones take calls.";
|
|
300
379
|
};
|
|
380
|
+
readonly preview_open: {
|
|
381
|
+
readonly title: "Open a preview in your browser";
|
|
382
|
+
readonly description: "Needs http. A secret 10-minute link to see a preview in your own browser.";
|
|
383
|
+
};
|
|
384
|
+
readonly previews_list: {
|
|
385
|
+
readonly title: "List previews";
|
|
386
|
+
readonly description: "Needs http. Previews: address, port, visibility, share links (never the link).";
|
|
387
|
+
};
|
|
301
388
|
readonly showtime_guide: {
|
|
302
389
|
readonly title: "Showtime guide";
|
|
303
390
|
readonly description: "Call when the user asks to see what CMDOP can do (a demo or a show), or offer it to a user new to CMDOP: returns a guide for a short live demonstration on their machines.";
|
|
@@ -307,7 +394,7 @@ export declare const SERVER_TOOLS: {
|
|
|
307
394
|
readonly description: "Everything running now, by author. `tasks`: started through cmdop. `outside`: other processes per machine, by agent:claude-code, agent:codex or user. Ended ones: history_search.";
|
|
308
395
|
};
|
|
309
396
|
};
|
|
310
|
-
export declare const SERVER_TOOL_NAMES: readonly ["docs_read", "history_search", "machines_list", "showtime_guide", "tasks_list"];
|
|
397
|
+
export declare const SERVER_TOOL_NAMES: readonly ["docs_read", "history_search", "machines_list", "preview_open", "previews_list", "showtime_guide", "tasks_list"];
|
|
311
398
|
/** The server tools as client methods (`cmdop.showtime_guide()`): no machine, never sealed. */
|
|
312
399
|
export interface ServerMethods<O> {
|
|
313
400
|
/** Call before answering how CMDOP works, is set up or is priced: no `path` lists every page of docs.cmdop.ai (path and title); a `path` returns that page as Markdown. */
|
|
@@ -316,6 +403,10 @@ export interface ServerMethods<O> {
|
|
|
316
403
|
history_search(args?: HistorySearchArgs, opts?: O): Promise<HistorySearchOut>;
|
|
317
404
|
/** The owner's machines: name, id, `state` (online; stale = not answering; paused; offline), `last_seen`, `activity`, `tools` (screen and control are here), build, `behind`. Only online ones take calls. */
|
|
318
405
|
machines_list(args?: MachinesListArgs, opts?: O): Promise<MachinesListOut>;
|
|
406
|
+
/** Needs http. A secret 10-minute link to see a preview in your own browser. */
|
|
407
|
+
preview_open(args: PreviewOpenArgs, opts?: O): Promise<PreviewOpenOut>;
|
|
408
|
+
/** Needs http. Previews: address, port, visibility, share links (never the link). */
|
|
409
|
+
previews_list(args?: PreviewsListArgs, opts?: O): Promise<PreviewsListOut>;
|
|
319
410
|
/** Call when the user asks to see what CMDOP can do (a demo or a show), or offer it to a user new to CMDOP: returns a guide for a short live demonstration on their machines. */
|
|
320
411
|
showtime_guide(args?: ShowtimeGuideArgs, opts?: O): Promise<ShowtimeGuideOut>;
|
|
321
412
|
/** Everything running now, by author. `tasks`: started through cmdop. `outside`: other processes per machine, by agent:claude-code, agent:codex or user. Ended ones: history_search. */
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
// Generated from cmdop/crates/tools/tools.schema.json (sha256
|
|
1
|
+
// Generated from cmdop/crates/tools/tools.schema.json (sha256 ea2c4cf0e8fbfef6, cmdop 0.1.31) by exports/sdk/gen/gen.ts. Do not edit.
|
|
2
2
|
/** Title and description of every server tool, as the server lists them. */
|
|
3
3
|
export const SERVER_TOOLS = {
|
|
4
4
|
docs_read: { title: "Read the docs", description: "Call before answering how CMDOP works, is set up or is priced: no `path` lists every page of docs.cmdop.ai (path and title); a `path` returns that page as Markdown." },
|
|
5
5
|
history_search: { title: "Search history", description: "Past tasks, tool calls and agent sessions by machine, author, task, time and text, newest first. Calls carry no arguments; journal_search on the machine has them." },
|
|
6
6
|
machines_list: { title: "List machines", description: "The owner's machines: name, id, `state` (online; stale = not answering; paused; offline), `last_seen`, `activity`, `tools` (screen and control are here), build, `behind`. Only online ones take calls." },
|
|
7
|
+
preview_open: { title: "Open a preview in your browser", description: "Needs http. A secret 10-minute link to see a preview in your own browser." },
|
|
8
|
+
previews_list: { title: "List previews", description: "Needs http. Previews: address, port, visibility, share links (never the link)." },
|
|
7
9
|
showtime_guide: { title: "Showtime guide", description: "Call when the user asks to see what CMDOP can do (a demo or a show), or offer it to a user new to CMDOP: returns a guide for a short live demonstration on their machines." },
|
|
8
10
|
tasks_list: { title: "List running work", description: "Everything running now, by author. `tasks`: started through cmdop. `outside`: other processes per machine, by agent:claude-code, agent:codex or user. Ended ones: history_search." },
|
|
9
11
|
};
|
|
10
|
-
export const SERVER_TOOL_NAMES = ["docs_read", "history_search", "machines_list", "showtime_guide", "tasks_list"];
|
|
12
|
+
export const SERVER_TOOL_NAMES = ["docs_read", "history_search", "machines_list", "preview_open", "previews_list", "showtime_guide", "tasks_list"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from cmdop/crates/tools/tools.schema.json (sha256
|
|
1
|
+
// Generated from cmdop/crates/tools/tools.schema.json (sha256 ea2c4cf0e8fbfef6, cmdop 0.1.31) by exports/sdk/gen/gen.ts. Do not edit.
|
|
2
2
|
/** Group, then method, then the tool it calls. */
|
|
3
3
|
export const GROUPS = {
|
|
4
4
|
agent: { cancel: "agent_cancel", list: "agent_list", prompt: "agent_prompt", sessions: "agent_sessions" },
|
|
@@ -161,6 +161,11 @@ export type ExecRunArgs = {
|
|
|
161
161
|
* 600). Long work goes to `task_start`.
|
|
162
162
|
*/
|
|
163
163
|
timeout_secs?: number | null;
|
|
164
|
+
/**
|
|
165
|
+
* Answer after this many seconds even if the command still runs: it then goes on as a task
|
|
166
|
+
* (`running`, `task`), still bounded by `timeout_secs`. Default: wait for its end.
|
|
167
|
+
*/
|
|
168
|
+
wait_secs?: number | null;
|
|
164
169
|
};
|
|
165
170
|
/** What `exec_run` returns. */
|
|
166
171
|
export type ExecRunOut = {
|
|
@@ -169,6 +174,11 @@ export type ExecRunOut = {
|
|
|
169
174
|
duration_ms: number;
|
|
170
175
|
/** Exit code; absent when the command was ended by a signal. */
|
|
171
176
|
exit_code?: number | null;
|
|
177
|
+
/**
|
|
178
|
+
* Still running after `wait_secs`: it goes on as `task`; `task_output` reads the rest and,
|
|
179
|
+
* once it has ended, its exit code. Absent when the command has ended.
|
|
180
|
+
*/
|
|
181
|
+
running?: boolean;
|
|
172
182
|
/** The signal that ended it (Unix). */
|
|
173
183
|
signal?: number | null;
|
|
174
184
|
/** The end of standard error, at most 64 KiB. */
|
|
@@ -185,6 +195,8 @@ export type ExecRunOut = {
|
|
|
185
195
|
* readable with `fs_read`.
|
|
186
196
|
*/
|
|
187
197
|
stdout_file?: string | null;
|
|
198
|
+
/** The task it goes on as, when `running`. */
|
|
199
|
+
task?: number | null;
|
|
188
200
|
/** Stopped because it ran longer than `timeout_secs`. */
|
|
189
201
|
timed_out: boolean;
|
|
190
202
|
/** Output was longer than what is returned; the whole of it is in the files below. */
|
|
@@ -848,8 +860,12 @@ export type TaskOutputArgs = {
|
|
|
848
860
|
};
|
|
849
861
|
/** What `task_output` returns. */
|
|
850
862
|
export type TaskOutputOut = {
|
|
863
|
+
/** Once the task has ended: its exit code, absent when a signal ended it. */
|
|
864
|
+
exit_code?: number | null;
|
|
851
865
|
/** False once the task has ended. */
|
|
852
866
|
running: boolean;
|
|
867
|
+
/** Once the task has ended: the signal that ended it (Unix). */
|
|
868
|
+
signal?: number | null;
|
|
853
869
|
task: number;
|
|
854
870
|
/** The terminal's screen and recent scrollback as text, terminal codes applied. */
|
|
855
871
|
text: string;
|
|
@@ -1432,7 +1448,7 @@ export declare const TOOLS: {
|
|
|
1432
1448
|
readonly risk: "exec";
|
|
1433
1449
|
readonly added: "0.0.1";
|
|
1434
1450
|
readonly timeoutSecs: 620;
|
|
1435
|
-
readonly description: "Run one command and wait for its exit code, stdout and stderr
|
|
1451
|
+
readonly description: "Run one command and wait for its exit code, stdout and stderr (non-zero is a result, not an error). At most 600 s; past wait_secs it goes on as a task (task_output). Keeps 64 KiB of output.";
|
|
1436
1452
|
};
|
|
1437
1453
|
readonly fs_delete: {
|
|
1438
1454
|
readonly risk: "destructive";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated from cmdop/crates/tools/tools.schema.json (sha256
|
|
1
|
+
// Generated from cmdop/crates/tools/tools.schema.json (sha256 ea2c4cf0e8fbfef6, cmdop 0.1.31) by exports/sdk/gen/gen.ts. Do not edit.
|
|
2
2
|
/** Risk class, version and description of every tool, as the server lists them. */
|
|
3
3
|
export const TOOLS = {
|
|
4
4
|
agent_cancel: { risk: "agent", added: "0.1.13", timeoutSecs: 15, description: "Stops a running agent_prompt by its task. What the agent did until then stays done." },
|
|
@@ -9,7 +9,7 @@ export const TOOLS = {
|
|
|
9
9
|
control_release: { risk: "control", added: "0.0.2", timeoutSecs: 10, description: "Give control back: release held keys and buttons and end the lease, so the owner can use the machine at once. The lease also ends after 60 s without an input call." },
|
|
10
10
|
disk_clean: { risk: "destructive", added: "0.1.13", timeoutSecs: 120, description: "Frees what disk_usage counts as cleanable: old caches deleted, old sessions moved to the Trash. Settings and credentials stay. dry_run lists first." },
|
|
11
11
|
disk_usage: { risk: "read", added: "0.1.13", timeoutSecs: 90, description: "How much disk the AI agents and developer caches use, per folder, and how much a clean would free. Reads sizes and times only; changes nothing." },
|
|
12
|
-
exec_run: { risk: "exec", added: "0.0.1", timeoutSecs: 620, description: "Run one command and wait for its exit code, stdout and stderr
|
|
12
|
+
exec_run: { risk: "exec", added: "0.0.1", timeoutSecs: 620, description: "Run one command and wait for its exit code, stdout and stderr (non-zero is a result, not an error). At most 600 s; past wait_secs it goes on as a task (task_output). Keeps 64 KiB of output." },
|
|
13
13
|
fs_delete: { risk: "destructive", added: "0.0.1", timeoutSecs: 120, description: "Move a file or folder to the user's trash, where the owner can restore it; a non-empty one needs recursive=true. permanent=true cannot be undone. Home, the roots and credential paths are refused." },
|
|
14
14
|
fs_edit: { risk: "write", added: "0.0.1", timeoutSecs: 60, description: "Replace exact text in a text file (up to 4 MiB), atomically: `old` must occur once, or set replace_all. Otherwise nothing changes and the error says how many times it occurs." },
|
|
15
15
|
fs_list: { risk: "read", added: "0.0.1", timeoutSecs: 15, description: "List a folder: name, kind, size and change time of each entry, sorted by name. Hidden names only with hidden=true. Paths holding keys and credentials (~/.ssh, ~/.aws and the like) are refused." },
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED