@deleted-ai/deleted 0.1.347 → 0.1.351

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
@@ -16,10 +16,43 @@ npx @deleted-ai/deleted init my-box
16
16
  ```
17
17
 
18
18
  `--starter` runs a pre-signed bundle from `share/starter/` (`chat-tools` or
19
- `chat-echo`). Sources for the same assembly ship in
20
- `share/samples/chat-tools/` next to pre-built `prebuilt/*.wasm`; rebuilding them
21
- with `deleted pack build` (Rust + `wasm-tools` 1.235.x) reproduces the shipped
22
- binaries byte for byte.
19
+ `chat-echo`).
20
+
21
+ ## Type `deleted` instead of `npx @deleted-ai/deleted`
22
+
23
+ `npx` runs the CLI without installing it, but leaves nothing on your `PATH`.
24
+ Install once to get the short command used throughout the docs:
25
+
26
+ ```bash
27
+ npm install -g @deleted-ai/deleted
28
+ deleted --version
29
+ ```
30
+
31
+ Either form works everywhere below. The CLI prints next-step commands in
32
+ whichever form you used, so you can always paste what it shows you.
33
+
34
+ ## Your own harness, still without Rust
35
+
36
+ `deleted sample` copies a shipped sample into a directory with its pre-built
37
+ guests already staged, so you can write and sign your own lock immediately:
38
+
39
+ ```bash
40
+ deleted sample # list what ships
41
+ deleted sample echo
42
+ cd echo
43
+ deleted lock create chat-echo.recipe.yaml -o bundle
44
+ deleted lock sign --dev-operator bundle
45
+ deleted run --dev-operator bundle --entry /boxes/chat-cli -- "hello"
46
+ # → completed: echo:hello
47
+ ```
48
+
49
+ `deleted sample deepseek` is the same flow against a real model: export your own
50
+ `DEEPSEEK_API_KEY`, point the recipe's `credential_id` at it, and sign. Signing
51
+ is the operator approving that recipe's egress pin.
52
+
53
+ Each sample also ships its guest sources. Rebuilding them with `deleted pack
54
+ build` (Rust + `wasm-tools` 1.235.x) reproduces the staged binaries byte for
55
+ byte — `deleted doctor` lists what that needs.
23
56
 
24
57
  On install (or first run), the package extracts the bundled release binary for
25
58
  your host — it ships one tarball per support-floor target and picks the match (or downloads from GitHub Releases when authenticated). No kernel source
package/bin/deleted.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from 'node:child_process';
3
3
  import path from 'node:path';
4
+ import fs from 'node:fs';
4
5
  import { ensureInstalled } from '../lib/install.js';
5
6
  import { nativeBinaryPath } from '../lib/paths.js';
6
7
 
@@ -12,10 +13,34 @@ try {
12
13
  process.exit(1);
13
14
  }
14
15
 
16
+ // Next-step hints the binary prints must be commands this user can actually
17
+ // run. A global install puts `deleted` on PATH; `npx` and a local dependency
18
+ // install do not, so ask PATH rather than guessing from how we were launched.
19
+ function shortCommandAvailable() {
20
+ const entries = (process.env.PATH ?? '')
21
+ .split(path.delimiter)
22
+ .filter(Boolean)
23
+ // npx and npm scripts prepend node_modules/.bin for the child process only.
24
+ // That shim is not on the user's own PATH, so it must not count here.
25
+ .filter((dir) => !dir.split(path.sep).includes('node_modules'));
26
+ return entries.some((dir) => {
27
+ try {
28
+ fs.accessSync(path.join(dir, 'deleted'), fs.constants.X_OK);
29
+ return true;
30
+ } catch {
31
+ return false;
32
+ }
33
+ });
34
+ }
35
+
15
36
  const binary = nativeBinaryPath(cacheDir);
16
37
  const result = spawnSync(binary, process.argv.slice(2), {
17
38
  stdio: 'inherit',
18
- env: process.env,
39
+ env: {
40
+ ...process.env,
41
+ // A selector, not display text: the binary owns the wording it prints.
42
+ DELETED_LAUNCHER: shortCommandAvailable() ? 'path' : 'npx',
43
+ },
19
44
  });
20
45
 
21
46
  if (result.error) {
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deleted-ai/deleted",
3
- "version": "0.1.347",
3
+ "version": "0.1.351",
4
4
  "description": "Deleted AI CLI wrapper — installs the native binary for this Linux host (arm64 or x64)",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "_comment": "Placeholder in git; scripts/publish-deleted-npm.sh stamps version, gitSha, and a tarballSha256 per target at publish. Install fails closed while a target's tarballSha256 is the zero sentinel.",
3
- "version": "0.1.347",
4
- "gitSha": "6dd6600",
3
+ "version": "0.1.351",
4
+ "gitSha": "2410222",
5
5
  "repo": "cdlconsultants/deleted-ai",
6
6
  "releaseTagPrefix": "npm-v",
7
7
  "targets": {
8
8
  "linux-arm64": {
9
- "tarballSha256": "82de96f010da1d84447d4e32a95d7ecd61f5d30d97ad3850a7090def5a111e28"
9
+ "tarballSha256": "0daf8e39ab3e1e6d4ee7557972d01bb18cd91e6c5efd6bc77f8cb0f13755197f"
10
10
  },
11
11
  "linux-x64": {
12
- "tarballSha256": "b8aa1dfb260ef3ed3cd958f1969f90739eca9c0bbd5a911c834c6aa82006bf6c"
12
+ "tarballSha256": "18c32067939b134019a4ffb0edd8903885b2546244023c3b99c03ce66b9935a0"
13
13
  }
14
14
  }
15
15
  }