@neta-art/cohub-cli 10.20.0 → 10.21.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.
@@ -3,6 +3,7 @@ import { setTimeout as delay } from "node:timers/promises";
3
3
  import { isDeepStrictEqual } from "node:util";
4
4
  import { RUNTIME_MAX_FRAME_BYTES, RUNTIME_PROTOCOL_VERSION, runtimeCapabilitiesSchema, runtimeCommandSchema, runtimeHelloCapabilities, runtimeReadySchema, runtimeNativeStopSchema, runtimeApprovalDecisionSchema, } from "@neta-art/cohub";
5
5
  import { describeError } from "../network-error.js";
6
+ import { CLI_VERSION } from "../version.js";
6
7
  import { executeTurn } from "./native/execution.js";
7
8
  import { ContextRequiredError } from "./native/results.js";
8
9
  import { SizeLimitError } from "./native/transcript.js";
@@ -413,6 +414,7 @@ async function connect(options) {
413
414
  spaceId: options.spaceId,
414
415
  token: currentToken,
415
416
  capabilities: registered,
417
+ client: { name: "cli", version: CLI_VERSION },
416
418
  });
417
419
  }
418
420
  catch (error) {
@@ -13,6 +13,7 @@ export type RuntimeSummary = {
13
13
  root: string;
14
14
  harnesses: string[];
15
15
  pid: number;
16
+ version?: string;
16
17
  state: "starting" | "ready" | "reconnecting" | "attention" | "stopping";
17
18
  harnessConnected: boolean;
18
19
  workspaceConnected: boolean;
@@ -69,6 +69,7 @@ export function printRuntimeSummary(summary, json = false, reused = false) {
69
69
  ["URL", value.url],
70
70
  ["Directory", summary.root],
71
71
  ["Harness", summary.harnesses.join(" · ") || "Cohub"],
72
+ ...(summary.version ? [["CLI", summary.version]] : []),
72
73
  ["Mode", summary.background ? "Background" : "Foreground"],
73
74
  ...(summary.display ? [["Screen", summary.display === "auto" ? "This computer" : summary.display]] : []),
74
75
  ...(summary.direct ? [["Direct", "Files and screens on this machine skip the network"]] : []),
@@ -8,6 +8,7 @@ import { resolveWebsocketUrl } from "@neta-art/cohub";
8
8
  import { AuthRequiredError, resolveAccessToken } from "../auth.js";
9
9
  import { createClient } from "../client.js";
10
10
  import { currentIdentityKey } from "../space.js";
11
+ import { CLI_VERSION } from "../version.js";
11
12
  import { ensureSandboxdBinary } from "../commands/sandboxd-binary.js";
12
13
  import { serveRuntime } from "./connection.js";
13
14
  import { discoverHarnesses, refreshHarnesses } from "./harnesses/index.js";
@@ -72,7 +73,7 @@ export async function runRuntime(config, onState, externalSignal, onDiagnostic)
72
73
  });
73
74
  let status = {
74
75
  spaceId: config.spaceId, root: config.root, runtimeId: diagnostics.runtimeId,
75
- pid: process.pid, harnesses: config.harnesses, background: config.background,
76
+ pid: process.pid, version: CLI_VERSION, harnesses: config.harnesses, background: config.background,
76
77
  ...(config.display ? { display: config.display } : {}),
77
78
  state: "starting", harnessConnected: false, workspaceConnected: false,
78
79
  diagnosticsPath: diagnostics.directory,
@@ -0,0 +1,2 @@
1
+ export declare const CLI_VERSION: string;
2
+ export declare function cliCommit(): string | null;
@@ -0,0 +1,17 @@
1
+ import { readFileSync } from "node:fs";
2
+ export const CLI_VERSION = (() => {
3
+ try {
4
+ return JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
5
+ }
6
+ catch {
7
+ return "0.0.0";
8
+ }
9
+ })();
10
+ export function cliCommit() {
11
+ try {
12
+ return JSON.parse(readFileSync(new URL("./build.json", import.meta.url), "utf8")).commit ?? null;
13
+ }
14
+ catch {
15
+ return null;
16
+ }
17
+ }
package/package.json CHANGED
@@ -1,12 +1,18 @@
1
1
  {
2
2
  "name": "@neta-art/cohub-cli",
3
- "version": "10.20.0",
3
+ "version": "10.21.0",
4
4
  "description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=24"
8
8
  },
9
9
  "license": "Apache-2.0",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/netaart/cohub.git",
13
+ "directory": "packages/cli"
14
+ },
15
+ "homepage": "https://github.com/netaart/cohub",
10
16
  "bin": {
11
17
  "cohub": "./bin/cohub.js"
12
18
  },
@@ -18,7 +24,7 @@
18
24
  "NOTICE"
19
25
  ],
20
26
  "dependencies": {
21
- "@neta-art/cohub": "13.11.0",
27
+ "@neta-art/cohub": "13.12.0",
22
28
  "@neta-art/generation": "0.2.15",
23
29
  "commander": "^15.0.0",
24
30
  "sharp": "^0.35.4",
@@ -41,7 +47,7 @@
41
47
  "@napi-rs/canvas": "^1.0.13"
42
48
  },
43
49
  "scripts": {
44
- "build": "tsc -p tsconfig.build.json && tsdown",
50
+ "build": "tsc -p tsconfig.build.json && tsdown && node scripts/stamp-build.mjs",
45
51
  "verify:sandboxd": "node --import tsx scripts/verify-sandboxd-release.ts",
46
52
  "verify:rtc": "node --import tsx scripts/verify-rtc-release.ts",
47
53
  "verify:board-kernel": "node --import tsx scripts/verify-board-kernel.ts",