diff --git a/bun.lock b/bun.lock index c109ea1..796759b 100644 --- a/bun.lock +++ b/bun.lock @@ -76,6 +76,10 @@ "bin": { "tps": "./tps", }, + "dependencies": { + "require-addon": "^1.2.0", + "sodium-native": "^5.0.10", + }, }, "packages/cli-darwin-x64": { "name": "@tpsdev-ai/cli-darwin-x64", @@ -83,6 +87,10 @@ "bin": { "tps": "./tps", }, + "dependencies": { + "require-addon": "^1.2.0", + "sodium-native": "^5.0.10", + }, }, "packages/cli-linux-arm64": { "name": "@tpsdev-ai/cli-linux-arm64", @@ -90,6 +98,10 @@ "bin": { "tps": "./tps", }, + "dependencies": { + "require-addon": "^1.2.0", + "sodium-native": "^5.0.10", + }, }, "packages/cli-linux-x64": { "name": "@tpsdev-ai/cli-linux-x64", @@ -97,6 +109,10 @@ "bin": { "tps": "./tps", }, + "dependencies": { + "require-addon": "^1.2.0", + "sodium-native": "^5.0.10", + }, }, "packages/pi-tps-mail": { "name": "@tpsdev-ai/pi-tps-mail", diff --git a/docs/branch-office.md b/docs/branch-office.md index 438c391..59d3478 100644 --- a/docs/branch-office.md +++ b/docs/branch-office.md @@ -52,19 +52,6 @@ curl -fsSL https://bun.sh/install | bash sudo npm install -g @tpsdev-ai/cli ``` -> **Known issue on Linux**: the `@tpsdev-ai/cli-linux-x64` standalone binary (bundled as an optional dep) currently ships without a working `sodium-native` prebuild and crashes any command that touches branch crypto. Until that's fixed upstream, run `tps` from source: -> ```sh -> mkdir -p ~/src && cd ~/src -> git clone --depth 1 https://github.com/tpsdev-ai/cli.git -> cd cli && bun install -> mkdir -p ~/bin && cat > ~/bin/tps <<'EOF' -> #!/bin/sh -> exec ~/.bun/bin/bun run ~/src/cli/packages/cli/bin/tps.ts "$@" -> EOF -> chmod +x ~/bin/tps -> # Add ~/bin to PATH ahead of /usr/bin -> ``` - ### 2. Initialize the branch Pick a free port (the example uses `33744`) and assign the agent identity: @@ -243,12 +230,6 @@ tps branch stop && tps branch start ``` Then `mv ~/.tps/mail//cur/* ~/.tps/mail//cur/` to consolidate any stranded messages. -### Linux `tps` errors with `Cannot find addon '.' imported from … sodium-native/binding.js` - -**Cause:** The `@tpsdev-ai/cli-linux-x64` standalone binary is missing its sodium-native prebuild ([tracked upstream](https://github.com/tpsdev-ai/cli/issues)). The Bun `--compile` step doesn't bundle the .node addon alongside. - -**Action:** Run `tps` from cloned source via a shim, per the prereqs in [Provisioning](#1-vm-side-prereqs). - ### `tps office join` says "Connecting to localhost:…" then times out **Cause:** The SSH tunnel isn't up, or the branch isn't listening yet. diff --git a/packages/cli-darwin-arm64/package.json b/packages/cli-darwin-arm64/package.json index 182d504..5ba0895 100644 --- a/packages/cli-darwin-arm64/package.json +++ b/packages/cli-darwin-arm64/package.json @@ -15,6 +15,10 @@ "tps", "README.md" ], + "dependencies": { + "sodium-native": "^5.0.10", + "require-addon": "^1.2.0" + }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/packages/cli-darwin-x64/package.json b/packages/cli-darwin-x64/package.json index 17e8a72..3ff63c5 100644 --- a/packages/cli-darwin-x64/package.json +++ b/packages/cli-darwin-x64/package.json @@ -15,6 +15,10 @@ "tps", "README.md" ], + "dependencies": { + "sodium-native": "^5.0.10", + "require-addon": "^1.2.0" + }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/packages/cli-linux-arm64/package.json b/packages/cli-linux-arm64/package.json index fffa16a..bfb238b 100644 --- a/packages/cli-linux-arm64/package.json +++ b/packages/cli-linux-arm64/package.json @@ -15,6 +15,10 @@ "tps", "README.md" ], + "dependencies": { + "sodium-native": "^5.0.10", + "require-addon": "^1.2.0" + }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/packages/cli-linux-x64/package.json b/packages/cli-linux-x64/package.json index 5898863..2f1db8f 100644 --- a/packages/cli-linux-x64/package.json +++ b/packages/cli-linux-x64/package.json @@ -15,6 +15,10 @@ "tps", "README.md" ], + "dependencies": { + "sodium-native": "^5.0.10", + "require-addon": "^1.2.0" + }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/packages/cli/package.json b/packages/cli/package.json index 6dc1bec..7253a76 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -15,10 +15,10 @@ "scripts": { "build": "tsc", "build:binary": "bun run build:binary:darwin-arm64 && bun run build:binary:darwin-x64 && bun run build:binary:linux-arm64 && bun run build:binary:linux-x64", - "build:binary:darwin-arm64": "bun build --compile bin/tps.ts --target=bun-darwin-arm64 --define \"INJECTED_VERSION=\\\"$npm_package_version\\\"\" --outfile=dist/tps-darwin-arm64", - "build:binary:darwin-x64": "bun build --compile bin/tps.ts --target=bun-darwin-x64 --define \"INJECTED_VERSION=\\\"$npm_package_version\\\"\" --outfile=dist/tps-darwin-x64", - "build:binary:linux-arm64": "bun build --compile bin/tps.ts --target=bun-linux-arm64 --define \"INJECTED_VERSION=\\\"$npm_package_version\\\"\" --outfile=dist/tps-linux-arm64", - "build:binary:linux-x64": "bun build --compile bin/tps.ts --target=bun-linux-x64 --define \"INJECTED_VERSION=\\\"$npm_package_version\\\"\" --outfile=dist/tps-linux-x64", + "build:binary:darwin-arm64": "bun build --compile bin/tps.ts --target=bun-darwin-arm64 --define \"INJECTED_VERSION=\\\"$npm_package_version\\\"\" -e sodium-native -e require-addon --outfile=dist/tps-darwin-arm64", + "build:binary:darwin-x64": "bun build --compile bin/tps.ts --target=bun-darwin-x64 --define \"INJECTED_VERSION=\\\"$npm_package_version\\\"\" -e sodium-native -e require-addon --outfile=dist/tps-darwin-x64", + "build:binary:linux-arm64": "bun build --compile bin/tps.ts --target=bun-linux-arm64 --define \"INJECTED_VERSION=\\\"$npm_package_version\\\"\" -e sodium-native -e require-addon --outfile=dist/tps-linux-arm64", + "build:binary:linux-x64": "bun build --compile bin/tps.ts --target=bun-linux-x64 --define \"INJECTED_VERSION=\\\"$npm_package_version\\\"\" -e sodium-native -e require-addon --outfile=dist/tps-linux-x64", "dev": "tsc --watch", "start": "node dist/bin/tps.js", "tps": "node dist/bin/tps.js",