@dubusoft/toodo 1.3.3-dev.70 → 1.3.3-dev.74

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
@@ -34,14 +34,14 @@ It installs the newest version of the channel with npm (`latest` for releases, `
34
34
  - `toodo start`: start the server.
35
35
  - `toodo stop`: stop the server.
36
36
  - `toodo status`: show whether the server is running and where its files are.
37
- - `toodo service install`: install the server as a systemd user service.
37
+ - `toodo service install`: install the server as a user service (systemd on Linux, a launchd agent on macOS).
38
38
  - `toodo update`: update to the newest version and restart the server.
39
39
 
40
40
  `toodo COMMAND --help` shows the options of each. `--listen HOST:PORT` on `init` or `service install` changes the address; an address other than loopback lets other machines reach the server, so prefer a tunnel to it.
41
41
 
42
42
  ## Requirements
43
43
 
44
- - Linux x64 or arm64 (glibc) and Node.js 18 or later. Install with optional dependencies enabled (the default), because the binaries ship in the `@dubusoft/toodo-linux-<arch>` packages.
44
+ - Linux x64 or arm64 (glibc or musl) or macOS x64 or arm64, with Node.js 18 or later. Install with optional dependencies enabled (the default), because the binaries ship in the platform packages `@dubusoft/toodo-linux-<arch>`, `@dubusoft/toodo-linux-<arch>-musl`, and `@dubusoft/toodo-darwin-<arch>`.
45
45
  - `git` and OpenSSH (`ssh`) on `PATH`.
46
46
  - For GitHub workspaces: the GitHub CLI `gh`, logged in with `gh auth login`.
47
47
  - Optional: [herdr](https://herdr.dev) for workspaces with runner `herdr` and remote SSH workspaces; runner `plain` needs `claude` or `codex` on `PATH`, and `tmux` runs need `tmux`.
package/bin/toodo.js CHANGED
@@ -2,11 +2,38 @@
2
2
  'use strict';
3
3
 
4
4
  const { spawnSync } = require('child_process');
5
+ const fs = require('fs');
5
6
  const path = require('path');
6
7
 
7
- const SUPPORTED = 'Linux x64 and Linux arm64';
8
+ const SUPPORTED = 'macOS x64 and arm64, and Linux x64 and arm64 (glibc or musl)';
8
9
 
9
- if (process.platform !== 'linux' || (process.arch !== 'x64' && process.arch !== 'arm64')) {
10
+ // Whether this Linux runs on musl (Alpine and others) rather than glibc.
11
+ function isMusl() {
12
+ try {
13
+ if (process.report) {
14
+ process.report.excludeNetwork = true;
15
+ const header = process.report.getReport().header;
16
+ if (header) return !header.glibcVersionRuntime;
17
+ }
18
+ } catch {
19
+ // Fall through to the next check.
20
+ }
21
+ try {
22
+ return fs.readFileSync('/usr/bin/ldd', 'utf8').includes('musl');
23
+ } catch {
24
+ return false;
25
+ }
26
+ }
27
+
28
+ function platformSuffix() {
29
+ if (process.arch !== 'x64' && process.arch !== 'arm64') return null;
30
+ if (process.platform === 'darwin') return `darwin-${process.arch}`;
31
+ if (process.platform === 'linux') return `linux-${process.arch}${isMusl() ? '-musl' : ''}`;
32
+ return null;
33
+ }
34
+
35
+ const suffix = platformSuffix();
36
+ if (!suffix) {
10
37
  console.error(
11
38
  `toodo: ${process.platform}/${process.arch} is not supported; only ${SUPPORTED} are. ` +
12
39
  'Build toodo-server from source instead, following docs/server.md in https://github.com/dev-bokdong/toodo.'
@@ -14,7 +41,7 @@ if (process.platform !== 'linux' || (process.arch !== 'x64' && process.arch !==
14
41
  process.exit(1);
15
42
  }
16
43
 
17
- const pkg = `@dubusoft/toodo-linux-${process.arch}`;
44
+ const pkg = `@dubusoft/toodo-${suffix}`;
18
45
  let pkgDir;
19
46
  try {
20
47
  pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
@@ -22,7 +49,8 @@ try {
22
49
  console.error(
23
50
  `toodo: the platform package ${pkg} is not installed. ` +
24
51
  'Reinstall with optional dependencies enabled: npm install -g @dubusoft/toodo --include=optional ' +
25
- '(--no-optional or --omit=optional skips it).'
52
+ '(--no-optional or --omit=optional skips it). If it is still missing, this version was published ' +
53
+ `without ${pkg}; install the newest one with: npm install -g @dubusoft/toodo@latest --include=optional`
26
54
  );
27
55
  process.exit(1);
28
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dubusoft/toodo",
3
- "version": "1.3.3-dev.70",
3
+ "version": "1.3.3-dev.74",
4
4
  "description": "Toodo command line: task planning that turns a plan into reviewed code",
5
5
  "license": "AGPL-3.0-only",
6
6
  "homepage": "https://github.com/dev-bokdong/toodo",
@@ -18,7 +18,7 @@
18
18
  "node": ">=18"
19
19
  },
20
20
  "optionalDependencies": {
21
- "@dubusoft/toodo-linux-x64": "1.3.3-dev.70",
22
- "@dubusoft/toodo-linux-arm64": "1.3.3-dev.70"
21
+ "@dubusoft/toodo-linux-x64": "1.3.3-dev.74",
22
+ "@dubusoft/toodo-linux-arm64": "1.3.3-dev.74"
23
23
  }
24
24
  }