@cmdop/sdk 3.4.0 → 3.5.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.
@@ -6,6 +6,7 @@
6
6
  */
7
7
  import { CarrierError } from "./carrier.js";
8
8
  import { readNdjson } from "./ndjson.js";
9
+ import { VERSION } from "../version.js";
9
10
  function isAnswer(v) {
10
11
  return typeof v === "object" && v !== null && !Array.isArray(v) && ("ok" in v || "error" in v || "sealed" in v);
11
12
  }
@@ -21,6 +22,8 @@ export function httpCarrier(opts) {
21
22
  "content-type": "application/json",
22
23
  // The server takes writes under /api only with this header (a browser form cannot send it).
23
24
  "x-cmdop": "1",
25
+ // Which SDK and version made the call: the server keeps `node` and a semver only, never this text.
26
+ "x-cmdop-client": `node/${VERSION}`,
24
27
  };
25
28
  const fail = (m) => new CarrierError("http", m);
26
29
  async function request(method, path, body, o) {
@@ -1,4 +1,4 @@
1
- // Generated from cmdop/crates/tools/tools.schema.json (sha256 6e1a72817fe1ae37, cmdop 0.1.13) by exports/sdk/gen/gen.ts. Do not edit.
1
+ // Generated from cmdop/crates/tools/tools.schema.json (sha256 6e1a72817fe1ae37, cmdop 0.1.15) 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. */
@@ -1,4 +1,4 @@
1
- // Generated from cmdop/crates/tools/tools.schema.json (sha256 6e1a72817fe1ae37, cmdop 0.1.13) by exports/sdk/gen/gen.ts. Do not edit.
1
+ // Generated from cmdop/crates/tools/tools.schema.json (sha256 6e1a72817fe1ae37, cmdop 0.1.15) 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." },
@@ -1,4 +1,4 @@
1
- // Generated from cmdop/crates/tools/tools.schema.json (sha256 6e1a72817fe1ae37, cmdop 0.1.13) by exports/sdk/gen/gen.ts. Do not edit.
1
+ // Generated from cmdop/crates/tools/tools.schema.json (sha256 6e1a72817fe1ae37, cmdop 0.1.15) 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" },
@@ -1,4 +1,4 @@
1
- // Generated from cmdop/crates/tools/tools.schema.json (sha256 6e1a72817fe1ae37, cmdop 0.1.13) by exports/sdk/gen/gen.ts. Do not edit.
1
+ // Generated from cmdop/crates/tools/tools.schema.json (sha256 6e1a72817fe1ae37, cmdop 0.1.15) 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." },
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This package's version. The SDK names itself to the server as `x-cmdop-client: node/<version>`, and the call
3
+ * record shows which SDK made a call. The release tool rewrites it together with `package.json`; a test keeps the two
4
+ * equal.
5
+ */
6
+ export declare const VERSION = "3.4.0";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This package's version. The SDK names itself to the server as `x-cmdop-client: node/<version>`, and the call
3
+ * record shows which SDK made a call. The release tool rewrites it together with `package.json`; a test keeps the two
4
+ * equal.
5
+ */
6
+ export const VERSION = "3.4.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmdop/sdk",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Your machines' tools from a program: the same tools agents use through MCP, typed from Rust.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://cmdop.ai",