open-walnut 0.4.0 → 0.4.1

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.
Files changed (29) hide show
  1. package/README.md +13 -1
  2. package/bin/open-walnut.js +14 -0
  3. package/dist/cli.js +582 -102
  4. package/dist/daemon-binaries/acp-worker.js.version +1 -1
  5. package/dist/web/server.js +555 -102
  6. package/dist/web/static/assets/{OfficePreview-DUTDx4ef.js → OfficePreview-C8OMbtiq.js} +2 -2
  7. package/dist/web/static/assets/{docx-preview-Qj-aUywE.js → docx-preview-hDgtrOpv.js} +1 -1
  8. package/dist/web/static/assets/{index-D6haQ3tX.js → index-B2-N8jTH.js} +1 -1
  9. package/dist/web/static/assets/{index-sF1ObMS0.js → index-B35fidy6.js} +1 -1
  10. package/dist/web/static/assets/{index-BvxwKQUT.js → index-BAb6UVet.js} +1 -1
  11. package/dist/web/static/assets/{index-BmDSVLwR.js → index-C5-vT4kT.js} +1 -1
  12. package/dist/web/static/assets/{index-fk2aCKPB.js → index-CBHRNnCk.js} +1 -1
  13. package/dist/web/static/assets/{index-CEVKci-j.js → index-CPHXL-wy.js} +1 -1
  14. package/dist/web/static/assets/{index-xu9Gy-xP.js → index-CWIydpPr.js} +1 -1
  15. package/dist/web/static/assets/{index-CfC-vHYG.js → index-Caj09uf7.js} +1 -1
  16. package/dist/web/static/assets/{index-oIyzyrLY.js → index-D1uUk0AQ.js} +273 -273
  17. package/dist/web/static/assets/{index-CzP6rbk7.js → index-D81YKipC.js} +1 -1
  18. package/dist/web/static/assets/{index-Bke7ZOIJ.js → index-DtRt21Zi.js} +1 -1
  19. package/dist/web/static/assets/{index-CSssA5eI.js → index-EowLf_Xf.js} +1 -1
  20. package/dist/web/static/assets/{index-y7f5PVUr.js → index-KY36bfpA.js} +1 -1
  21. package/dist/web/static/assets/{index-CeR0xElr.js → index-VcSnwuHG.js} +1 -1
  22. package/dist/web/static/assets/{index-CCa56u0e.js → index-bfZj1PAc.js} +1 -1
  23. package/dist/web/static/assets/{index-DqY9Z9j5.js → index-gv-TJwHT.js} +1 -1
  24. package/dist/web/static/assets/{index-Dv42N8tm.js → index-nRBC-NJN.js} +1 -1
  25. package/dist/web/static/assets/{index-BV9e5-KR.js → index-ph8Hxff-.js} +1 -1
  26. package/dist/web/static/assets/{jszip.min-C3K7iJBk.js → jszip.min-DyrlNEg4.js} +1 -1
  27. package/dist/web/static/assets/{pptx-preview.es-UhsuLLNP.js → pptx-preview.es-DjND6y6O.js} +1 -1
  28. package/dist/web/static/index.html +1 -1
  29. package/package.json +5 -4
package/README.md CHANGED
@@ -41,7 +41,9 @@ local-first, self-hosted, and has no telemetry.
41
41
 
42
42
  ### Requirements
43
43
 
44
- - Node.js 22 or newer
44
+ - Node.js 22 or newer. If you don't have it: `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash` then `nvm install 22`.
45
+ - git, only for the checkout route below (macOS: `xcode-select --install`, Ubuntu: `sudo apt install git`)
46
+ - Linux: a C library from 2019 or later (glibc 2.29+: Ubuntu 20.04+, Debian 11+, AL2023, Fedora). Older distros compile one native module and need a newer Python and GCC first; `npm start` prints the exact commands, and [Getting Started](GETTING_STARTED.md#older-linux-glibc-before-229) has them too.
45
47
  - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) for coding sessions
46
48
  - An Anthropic API key, AWS Bedrock credentials, or another supported model provider
47
49
  for Walnut
@@ -51,6 +53,16 @@ Claude Code CLI login, while Walnut uses the model provider selected during setu
51
53
 
52
54
  ### Install
53
55
 
56
+ The published package is the quickest way in. Nothing to build, and it starts in a few
57
+ seconds:
58
+
59
+ ```bash
60
+ npm install -g open-walnut
61
+ open-walnut web
62
+ ```
63
+
64
+ To work on Walnut itself, run it from a checkout instead:
65
+
54
66
  ```bash
55
67
  git clone https://github.com/EvanZhang008/open-walnut.git
56
68
  cd open-walnut
@@ -15,6 +15,20 @@ import fs from 'node:fs';
15
15
  // a broken pipe means the reader got a TRUNCATED answer, and reporting that as
16
16
  // success is how a half-written JSON reply passes for a complete one. 141 is the
17
17
  // shell's SIGPIPE convention.
18
+ // Node version: npm only WARNS about an unmet `engines`, so an old Node installs the
19
+ // package happily and then dies inside the bundle with a syntax error that says nothing
20
+ // about versions. Answer the real question here, once, with the command that fixes it.
21
+ const nodeMajor = Number(process.versions.node.split('.')[0]);
22
+ if (Number.isFinite(nodeMajor) && nodeMajor < 22) {
23
+ process.stderr.write(
24
+ `Walnut needs Node.js 22 or newer, and this is Node ${process.versions.node}.\n\n` +
25
+ ` curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash\n` +
26
+ ` nvm install 22\n\n` +
27
+ `Then run the same command again.\n`,
28
+ () => process.exit(1),
29
+ );
30
+ }
31
+
18
32
  let wroteStdout = false;
19
33
  process.stdout.on('error', (e) => {
20
34
  if (e && e.code === 'EPIPE') process.exit(wroteStdout ? 141 : 0);