@deleted-ai/deleted 0.1.272 → 0.1.279

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/README.md CHANGED
@@ -11,13 +11,17 @@ On install (or first run), the package extracts the bundled linux-arm64 release
11
11
  binary (or downloads from GitHub Releases when authenticated). No kernel source
12
12
  ships in this package.
13
13
 
14
+ Author docs ship with the binary under `share/docs/` (for example
15
+ `build-a-box.md`, `harness-runtime.md`, `install-deleted.md`). `deleted init`
16
+ prints the local path — no private GitHub login required.
17
+
14
18
  ## Requirements
15
19
 
16
20
  - Node.js `^22.19 || >=24`
17
21
  - Linux arm64
18
22
 
19
23
  Other platforms print a clear error and defer to the tarball install path
20
- ([`docs/install-deleted.md`](../../docs/install-deleted.md)).
24
+ (`share/docs/install-deleted.md` in a linux-arm64 release).
21
25
 
22
26
  ## Monorepo / CI
23
27
 
Binary file
package/lib/install.js CHANGED
@@ -7,9 +7,11 @@ import { assertSupportedPlatform } from './platform.js';
7
7
  import { readManifest, releaseDownloadUrl, tarballFileName } from './manifest.js';
8
8
  import {
9
9
  cacheRoot,
10
+ cacheMatchesManifest,
10
11
  isInstalled,
11
12
  nativeBinaryPath,
12
13
  packageRoot,
14
+ writeInstallStamp,
13
15
  } from './paths.js';
14
16
 
15
17
  const ZERO_SHA256 =
@@ -185,9 +187,12 @@ export function ensureInstalled() {
185
187
  assertSupportedPlatform();
186
188
  const manifest = readManifest();
187
189
  const destDir = cacheRoot(manifest.version);
188
- if (isInstalled(destDir)) {
190
+ if (isInstalled(destDir) && cacheMatchesManifest(destDir, manifest)) {
189
191
  return destDir;
190
192
  }
193
+ if (fs.existsSync(destDir)) {
194
+ fs.rmSync(destDir, { recursive: true, force: true });
195
+ }
191
196
  fs.mkdirSync(path.dirname(destDir), { recursive: true });
192
197
  installFromRelease(manifest, destDir);
193
198
  if (!isInstalled(destDir)) {
@@ -195,5 +200,6 @@ export function ensureInstalled() {
195
200
  `install incomplete: expected ${nativeBinaryPath(destDir)} and starter harness`,
196
201
  );
197
202
  }
203
+ writeInstallStamp(destDir, manifest);
198
204
  return destDir;
199
205
  }
package/lib/paths.js CHANGED
@@ -22,6 +22,43 @@ export function nativeBinaryPath(cacheDir) {
22
22
  return path.join(cacheDir, 'bin', 'deleted');
23
23
  }
24
24
 
25
+ /** @param {string} cacheDir */
26
+ export function installStampPath(cacheDir) {
27
+ return path.join(cacheDir, '.install-stamp.json');
28
+ }
29
+
30
+ /** @param {string} cacheDir */
31
+ export function readInstallStamp(cacheDir) {
32
+ try {
33
+ return JSON.parse(fs.readFileSync(installStampPath(cacheDir), 'utf8'));
34
+ } catch {
35
+ return null;
36
+ }
37
+ }
38
+
39
+ /** @param {string} cacheDir @param {object} manifest */
40
+ export function writeInstallStamp(cacheDir, manifest) {
41
+ const stamp = {
42
+ version: manifest.version,
43
+ gitSha: manifest.gitSha,
44
+ tarballSha256: manifest.tarballSha256,
45
+ };
46
+ fs.writeFileSync(installStampPath(cacheDir), `${JSON.stringify(stamp)}\n`);
47
+ }
48
+
49
+ /** @param {string} cacheDir @param {object} manifest */
50
+ export function cacheMatchesManifest(cacheDir, manifest) {
51
+ const stamp = readInstallStamp(cacheDir);
52
+ if (!stamp) {
53
+ return false;
54
+ }
55
+ return (
56
+ stamp.version === manifest.version &&
57
+ stamp.gitSha === manifest.gitSha &&
58
+ stamp.tarballSha256 === manifest.tarballSha256
59
+ );
60
+ }
61
+
25
62
  /** @param {string} cacheDir */
26
63
  export function isInstalled(cacheDir) {
27
64
  const binary = nativeBinaryPath(cacheDir);
package/lib/platform.js CHANGED
@@ -12,8 +12,9 @@ export function unsupportedPlatformMessage() {
12
12
  return [
13
13
  '@deleted-ai/deleted: Linux arm64 only (Deleted AI v0 support floor).',
14
14
  `Your platform: ${platform} ${arch}.`,
15
- 'Deferred platforms (macOS, Windows, linux-x64): use the tarball from',
16
- 'https://github.com/cdlconsultants/deleted-ai/blob/main/docs/install-deleted.md',
15
+ 'macOS, Windows, and linux-x64 are deferred this package will not run here.',
16
+ 'On a Linux arm64 host, install with npx @deleted-ai/deleted or the',
17
+ 'linux-arm64 release tarball; author docs are then at share/docs/.',
17
18
  ].join('\n');
18
19
  }
19
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deleted-ai/deleted",
3
- "version": "0.1.272",
3
+ "version": "0.1.279",
4
4
  "description": "Deleted AI CLI wrapper — downloads the linux-arm64 native binary on install",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "0.1.272",
3
- "gitSha": "1f657c0",
4
- "tarballSha256": "cd78c142b011ed4eb7332d9f5ba360b95a65f3698e66f8a4cc7e6d94cf2fc03b",
2
+ "version": "0.1.279",
3
+ "gitSha": "120571c",
4
+ "tarballSha256": "659080b2e182b0f2d6722fd62363ab8435db3a2b5a5f05ebe87d61dae505ad8f",
5
5
  "repo": "cdlconsultants/deleted-ai",
6
6
  "tarballPrefix": "deleted-linux-arm64",
7
7
  "releaseTagPrefix": "npm-v"