@neta-art/cohub-cli 7.1.1 → 7.1.2

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.
@@ -1,9 +1,9 @@
1
- export declare const SANDBOXD_VERSION = "v1.82.4";
1
+ export declare const SANDBOXD_VERSION = "v2.53.1";
2
2
  export declare class SandboxdDownloadError extends Error {
3
3
  name: string;
4
4
  }
5
- export declare function validSandboxdArchiveEntries(entries: string[], version?: string): boolean;
6
- export declare function validateSandboxdArchive(archivePath: string, version?: string): Promise<string[]>;
5
+ export declare function validSandboxdArchiveEntries(entries: string[]): boolean;
6
+ export declare function validateSandboxdArchive(archivePath: string): Promise<string[]>;
7
7
  export type EnsureSandboxdOptions = {
8
8
  version?: string;
9
9
  onStatus?: (message: string) => void;
@@ -14,7 +14,12 @@ import { Readable } from "node:stream";
14
14
  // published by .github/workflows/sandbox-binaries-build.yml. Only bump it AFTER
15
15
  // that tag's publish-cdn job has succeeded, otherwise `runtime up` 404s on the
16
16
  // default download.
17
- export const SANDBOXD_VERSION = "v1.82.4";
17
+ //
18
+ // v2.53.1 is the first published tag with the native FSEvents file-monitoring
19
+ // backends and the `runtimeId` control frame (earlier `v2.52.0` predates them,
20
+ // and the old sandbox-only `v1.x` line stopped at `v1.82.4`). Running anything
21
+ // older keeps exhausting file descriptors on macOS.
22
+ export const SANDBOXD_VERSION = "v2.53.1";
18
23
  const BINARY_NAME = "cohub-sandboxd";
19
24
  // Public CDN prefix hosting the release archives (the repo is private, so the
20
25
  // GitHub Release assets are not publicly downloadable). Overridable for staging
@@ -91,14 +96,11 @@ const fetchText = (url, accept) => withTimeout(`Download of ${url}`, async (sign
91
96
  throw new SandboxdDownloadError(`Download failed (${response.status}) for ${url}`);
92
97
  return (await response.text()).trim();
93
98
  });
94
- // v1.82.4 is already public as a binary-only archive. The native watcher
95
- // release adds the two notices; the old shape is accepted only for this pin.
96
- const CURRENT_BINARY_ONLY_VERSION = "v1.82.4";
97
- export function validSandboxdArchiveEntries(entries, version = SANDBOXD_VERSION) {
98
- const binaryOnly = version === CURRENT_BINARY_ONLY_VERSION && entries.length === 1 && entries[0] === BINARY_NAME;
99
- const expected = [BINARY_NAME, "LICENSE", "NOTICE"];
100
- const withNotices = entries.length === expected.length && expected.every((entry) => entries.includes(entry));
101
- return binaryOnly || withNotices;
99
+ // Every published release ships the binary alongside its LICENSE and NOTICE.
100
+ const EXPECTED_ARCHIVE_ENTRIES = [BINARY_NAME, "LICENSE", "NOTICE"];
101
+ export function validSandboxdArchiveEntries(entries) {
102
+ return (entries.length === EXPECTED_ARCHIVE_ENTRIES.length &&
103
+ EXPECTED_ARCHIVE_ENTRIES.every((entry) => entries.includes(entry)));
102
104
  }
103
105
  // Reject unexpected paths before extracting the checksum-verified release.
104
106
  const listTarGz = (archivePath, verbose = false) => new Promise((res, rej) => {
@@ -116,9 +118,9 @@ const listTarGz = (archivePath, verbose = false) => new Promise((res, rej) => {
116
118
  ? res(stdout.split("\n").map((line) => line.trim()).filter(Boolean))
117
119
  : rej(new SandboxdDownloadError(`tar listing failed: ${stderr.trim() || `exit ${code}`}`)));
118
120
  });
119
- export async function validateSandboxdArchive(archivePath, version = SANDBOXD_VERSION) {
121
+ export async function validateSandboxdArchive(archivePath) {
120
122
  const entries = await listTarGz(archivePath);
121
- if (!validSandboxdArchiveEntries(entries, version)) {
123
+ if (!validSandboxdArchiveEntries(entries)) {
122
124
  throw new SandboxdDownloadError(`Unexpected sandbox archive contents: ${entries.join(", ") || "(empty)"}`);
123
125
  }
124
126
  const details = await listTarGz(archivePath, true);
@@ -185,7 +187,7 @@ const downloadAndVerify = async (version, target) => {
185
187
  if (actual !== expected) {
186
188
  throw new SandboxdDownloadError(`Checksum mismatch for ${name} (expected ${expected}, got ${actual})`);
187
189
  }
188
- const entries = await validateSandboxdArchive(archivePath, version);
190
+ const entries = await validateSandboxdArchive(archivePath);
189
191
  await extractTarGz(archivePath, tempDir);
190
192
  for (const entry of entries) {
191
193
  if (!(await isSafeArchiveFile(join(tempDir, entry)))) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neta-art/cohub-cli",
3
- "version": "7.1.1",
3
+ "version": "7.1.2",
4
4
  "description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
5
5
  "type": "module",
6
6
  "engines": {