tacticremote 1.7.0 → 1.8.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 (49) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +33 -41
  3. package/bin/tacticremote.js +41 -101
  4. package/package.json +30 -42
  5. package/bin/tactic-remote-server.js +0 -636
  6. package/lib/authChallengeManager.js +0 -1
  7. package/lib/bonjourPublisher.js +0 -68
  8. package/lib/claudeSessionManager.js +0 -1
  9. package/lib/claudeTransport.js +0 -1
  10. package/lib/errorCodes.js +0 -1
  11. package/lib/execSafe.js +0 -1
  12. package/lib/fileService.js +0 -1
  13. package/lib/hookInstaller.js +0 -253
  14. package/lib/outputParser.js +0 -1
  15. package/lib/pushClient.js +0 -1
  16. package/lib/rateLimiter.js +0 -1
  17. package/lib/serverIdentity.js +0 -1
  18. package/lib/streamJsonParser.js +0 -1
  19. package/lib/tmuxManager.js +0 -1
  20. package/lib/uploadService.js +0 -1
  21. package/lib/validators.js +0 -1
  22. package/middleware/authMiddleware.js +0 -152
  23. package/routes/httpHandler.js +0 -111
  24. package/routes/wsHandler.js +0 -1094
  25. package/server.js +0 -236
  26. package/shared/server-core/authChallengeManager.js +0 -108
  27. package/shared/server-core/claudeSessionManager.js +0 -222
  28. package/shared/server-core/claudeTransport.js +0 -176
  29. package/shared/server-core/errorCodes.js +0 -91
  30. package/shared/server-core/execSafe.js +0 -185
  31. package/shared/server-core/fileService.js +0 -155
  32. package/shared/server-core/outputParser.js +0 -174
  33. package/shared/server-core/protocol-manifest.json +0 -59
  34. package/shared/server-core/protocol-manifest.schema.json +0 -90
  35. package/shared/server-core/protocolManifest.js +0 -42
  36. package/shared/server-core/pushClient.js +0 -198
  37. package/shared/server-core/rateLimiter.js +0 -98
  38. package/shared/server-core/serverConnectionLifecycle.js +0 -118
  39. package/shared/server-core/serverHandshake.js +0 -72
  40. package/shared/server-core/serverIdentity.js +0 -102
  41. package/shared/server-core/streamJsonParser.js +0 -321
  42. package/shared/server-core/tmuxManager.js +0 -596
  43. package/shared/server-core/unixProcessLifecycle.js +0 -96
  44. package/shared/server-core/unixServerHooks.js +0 -148
  45. package/shared/server-core/unixWsRuntime.js +0 -412
  46. package/shared/server-core/uploadService.js +0 -321
  47. package/shared/server-core/validators.js +0 -274
  48. package/shared/server-core/windowsServerHooks.js +0 -174
  49. package/shared/server-core/windowsWsRuntime.js +0 -413
package/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ Proprietary Software License
2
+
3
+ Copyright (c) 2026 TacticSpace Tech (https://tacticspacetech.com/). All rights reserved.
4
+
5
+ This software and associated documentation files (the "Software") are proprietary
6
+ and confidential. Unauthorized copying, modification, distribution, or use of
7
+ this Software, via any medium, is strictly prohibited.
8
+
9
+ The Software is provided for personal, non-commercial use only. You may:
10
+ - Download and use the Software for personal purposes
11
+ - Report bugs and suggest improvements
12
+
13
+ You may NOT:
14
+ - Copy, modify, or distribute the source code
15
+ - Reverse engineer, decompile, or disassemble the Software
16
+ - Use the Software for commercial purposes without written permission
17
+ - Sublicense, sell, or transfer the Software to third parties
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ For licensing inquiries, visit https://tacticspacetech.com/ or contact
28
+ through the repository.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
- # tactic-remote-server
1
+ # TacticRemote
2
2
 
3
- Server component for [Tactic Remote](https://tacticremote.com) — control Claude Code from your iPhone or iPad.
3
+ Control Claude Code (and other AI coding agents) from your iPhone or iPad.
4
+
5
+ [Website](https://tacticremote.com) · [iOS App](https://apps.apple.com/app/id6748739057) · [Issues](https://github.com/TacticSpaceTech/TacticRemote/issues)
4
6
 
5
7
  ## Quick Start
6
8
 
@@ -8,56 +10,46 @@ Server component for [Tactic Remote](https://tacticremote.com) — control Claud
8
10
  npx tacticremote
9
11
  ```
10
12
 
11
- That's it. Scan the QR code with the Tactic Remote iOS app to connect.
12
-
13
- **Alternative install via Homebrew:**
14
-
15
- ```bash
16
- brew install TacticSpaceTech/tap/tacticremote
17
- ```
18
-
19
- [![Download on the App Store](https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg)](https://apps.apple.com/app/tactic-remote-ai-coding/id6758008464)
20
-
21
- ## Prerequisites
22
-
23
- - **Node.js** 16+
24
- - **tmux** — install with `brew install tmux` (macOS) or `sudo apt install tmux` (Linux)
25
- - **Claude Code CLI** — install from [claude.ai/code](https://claude.ai/code)
13
+ The server starts on port 8765 and advertises itself via mDNS. Open the TacticRemote app on your iPhone or iPad and tap **Pair** — it will find your Mac automatically on the same Wi-Fi network.
26
14
 
27
15
  ## Options
28
16
 
29
17
  ```
30
- npx tacticremote [options]
31
-
32
- -p, --port <n> Port to listen on (default: 8765)
33
- --path <dir> Allowed base directory (default: $HOME)
34
- --api-key <key> Require authentication key
35
- --no-bonjour Disable mDNS discovery
36
- --no-qr Don't show QR code
37
- -v, --version Show version
38
- -h, --help Show this help
18
+ -p, --port <n> Port to listen on [8765]
19
+ --path <dir> Allowed base directory [$HOME]
20
+ --api-key <key> Require authentication on connect
21
+ --tunnel Enable Cloudflare tunnel (public access)
22
+ --install-hooks Install Claude Code hooks (for notifications)
23
+ --no-hooks Skip hook installation
24
+ --remove-hooks Remove installed hooks and exit
25
+ --no-bonjour Disable mDNS discovery
26
+ --no-qr Don't show QR code at startup
27
+ --no-interactive Skip interactive prompts
28
+ --no-color Disable colored output
29
+ -v, --version Show version
30
+ -h, --help Show help
39
31
  ```
40
32
 
41
- ## Environment Variables
42
-
43
- | Variable | Description |
44
- |----------|-------------|
45
- | `PORT` | Server port (default: 8765) |
46
- | `CLAUDE_REMOTE_API_KEY` | Authentication key |
47
- | `CLAUDE_REMOTE_ALLOWED_PATH` | Base directory for file operations |
33
+ Examples:
48
34
 
49
- ## How It Works
50
-
51
- ```
52
- iPhone (Tactic Remote app) <-- WebSocket --> This server <-- tmux --> Claude Code CLI
35
+ ```bash
36
+ npx tacticremote # default
37
+ npx tacticremote --tunnel --api-key mysecret # public access via Cloudflare tunnel
38
+ npx tacticremote -p 9000 --path ~/projects # custom port + restricted path
53
39
  ```
54
40
 
55
- The server manages tmux sessions running Claude Code and bridges them to the iOS app over WebSocket. All data stays on your local network.
41
+ ## Supported Platforms
56
42
 
57
- ## iOS App
43
+ - macOS — Apple Silicon (arm64) and Intel (x64)
44
+ - Linux — arm64 and x64
45
+ - Windows — x64
58
46
 
59
- Download Tactic Remote from the [App Store](https://apps.apple.com/app/tactic-remote-ai-coding/id6758008464).
47
+ `npm` automatically downloads only the binary matching your platform; no extra setup required.
60
48
 
61
49
  ## License
62
50
 
63
- MIT
51
+ TacticRemote is **proprietary software**. See [LICENSE](./LICENSE) for the full terms.
52
+
53
+ ---
54
+
55
+ © 2026 Shanghai TacticSpace Technology Co., Ltd. All rights reserved.
@@ -1,124 +1,64 @@
1
1
  #!/usr/bin/env node
2
-
3
2
  'use strict';
4
3
 
5
- const os = require('os');
6
- const fs = require('fs');
7
- const path = require('path');
8
- const https = require('https');
9
- const http = require('http');
10
- const zlib = require('zlib');
11
4
  const { spawn } = require('child_process');
5
+ const path = require('path');
12
6
 
13
- const VERSION = require('../package.json').version;
14
- const REPO = 'TacticSpaceTech/TacticRemote';
15
- const CACHE_DIR = path.join(os.homedir(), '.tacticremote', 'bin');
16
-
17
- function getPlatformKey() {
18
- const platform = process.platform; // darwin, linux
19
- const arch = process.arch; // arm64, x64
20
- if (platform !== 'darwin' && platform !== 'linux') {
21
- console.error(` Unsupported platform: ${platform}`);
22
- console.error(' Supported: macOS (darwin), Linux');
23
- process.exit(1);
24
- }
25
- if (arch !== 'arm64' && arch !== 'x64') {
26
- console.error(` Unsupported architecture: ${arch}`);
27
- console.error(' Supported: arm64, x64');
28
- process.exit(1);
29
- }
30
- return `${platform}-${arch}`;
31
- }
32
-
33
- function getBinaryName() {
34
- return `tacticremote-${getPlatformKey()}`;
7
+ const SUPPORTED = new Set([
8
+ 'darwin-arm64',
9
+ 'darwin-x64',
10
+ 'linux-arm64',
11
+ 'linux-x64',
12
+ 'win32-x64',
13
+ ]);
14
+
15
+ function platformPackageName() {
16
+ const key = `${process.platform}-${process.arch}`;
17
+ if (!SUPPORTED.has(key)) return null;
18
+ return `@tacticremote/server-${key}`;
35
19
  }
36
20
 
37
- function getBinaryPath() {
38
- return path.join(CACHE_DIR, `${getBinaryName()}-${VERSION}`);
21
+ function resolveBinary(pkg) {
22
+ const pkgJsonPath = require.resolve(`${pkg}/package.json`);
23
+ const pkgDir = path.dirname(pkgJsonPath);
24
+ const exe = process.platform === 'win32' ? 'tacticremote-server.exe' : 'tacticremote-server';
25
+ return path.join(pkgDir, 'bin', exe);
39
26
  }
40
27
 
41
- function download(url) {
42
- return new Promise((resolve, reject) => {
43
- const client = url.startsWith('https') ? https : http;
44
- client.get(url, { headers: { 'User-Agent': `tacticremote/${VERSION}` } }, (res) => {
45
- if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
46
- download(res.headers.location).then(resolve).catch(reject);
47
- return;
48
- }
49
- if (res.statusCode !== 200) {
50
- reject(new Error(`Download failed: HTTP ${res.statusCode}`));
51
- return;
52
- }
53
- const chunks = [];
54
- res.on('data', (chunk) => chunks.push(chunk));
55
- res.on('end', () => resolve(Buffer.concat(chunks)));
56
- res.on('error', reject);
57
- }).on('error', reject);
58
- });
59
- }
60
-
61
- async function ensureBinary() {
62
- const binaryPath = getBinaryPath();
63
-
64
- if (fs.existsSync(binaryPath)) {
65
- return binaryPath;
28
+ function main() {
29
+ const pkg = platformPackageName();
30
+ if (!pkg) {
31
+ console.error(`tacticremote: unsupported platform ${process.platform}-${process.arch}`);
32
+ console.error('Supported: darwin/linux/win32 × arm64/x64');
33
+ console.error('See https://tacticremote.com for installation help.');
34
+ process.exit(1);
66
35
  }
67
36
 
68
- const binaryName = getBinaryName();
69
- const url = `https://github.com/${REPO}/releases/download/cli-v${VERSION}/${binaryName}.gz`;
70
-
71
- console.log('');
72
- console.log(` Downloading tacticremote v${VERSION} for ${getPlatformKey()}...`);
73
- console.log(` ${url}`);
74
- console.log('');
75
-
37
+ let binPath;
76
38
  try {
77
- const gzData = await download(url);
78
- const binary = zlib.gunzipSync(gzData);
79
-
80
- fs.mkdirSync(CACHE_DIR, { recursive: true });
81
- fs.writeFileSync(binaryPath, binary, { mode: 0o755 });
82
-
83
- console.log(` Cached at ${binaryPath}`);
84
- console.log('');
85
-
86
- return binaryPath;
39
+ binPath = resolveBinary(pkg);
87
40
  } catch (err) {
88
- console.error(` Failed to download binary: ${err.message}`);
89
- console.error('');
90
- console.error(' You can download manually from:');
91
- console.error(` https://github.com/${REPO}/releases`);
41
+ console.error(`tacticremote: failed to locate platform package "${pkg}".`);
42
+ console.error('This usually means npm skipped the optional dependency. Try reinstalling:');
43
+ console.error(' npm install -g tacticremote');
92
44
  console.error('');
45
+ console.error('If the issue persists, please report it at:');
46
+ console.error(' https://github.com/TacticSpaceTech/TacticRemote/issues');
93
47
  process.exit(1);
94
48
  }
95
- }
96
49
 
97
- async function main() {
98
- // Pass-through flags that don't need the binary
99
- const args = process.argv.slice(2);
100
- if (args.includes('--version') || args.includes('-v')) {
101
- console.log(VERSION);
102
- process.exit(0);
103
- }
104
-
105
- const binaryPath = await ensureBinary();
106
-
107
- const child = spawn(binaryPath, args, {
108
- stdio: 'inherit',
109
- env: process.env
110
- });
111
-
112
- child.on('exit', (code) => process.exit(code || 0));
50
+ const child = spawn(binPath, process.argv.slice(2), { stdio: 'inherit' });
113
51
  child.on('error', (err) => {
114
- console.error(` Failed to execute binary: ${err.message}`);
52
+ console.error(`tacticremote: failed to launch server binary: ${err.message}`);
115
53
  process.exit(1);
116
54
  });
117
-
118
- // Forward signals
119
- for (const sig of ['SIGINT', 'SIGTERM']) {
120
- process.on(sig, () => child.kill(sig));
121
- }
55
+ child.on('exit', (code, signal) => {
56
+ if (signal) {
57
+ process.kill(process.pid, signal);
58
+ } else {
59
+ process.exit(code ?? 0);
60
+ }
61
+ });
122
62
  }
123
63
 
124
64
  main();
package/package.json CHANGED
@@ -1,20 +1,40 @@
1
1
  {
2
2
  "name": "tacticremote",
3
- "version": "1.7.0",
4
- "description": "Control Claude Code from your iPhone/iPad — server for Tactic Remote",
3
+ "version": "1.8.1",
4
+ "description": "Control AI coding agents from your iPhone or iPad — Tactic Remote CLI",
5
+ "license": "SEE LICENSE IN LICENSE",
5
6
  "bin": {
6
- "tacticremote": "./bin/tactic-remote-server.js"
7
+ "tacticremote": "./bin/tacticremote.js"
7
8
  },
8
- "main": "server.js",
9
- "scripts": {
10
- "start": "node bin/tactic-remote-server.js",
11
- "test": "jest --no-cache",
12
- "lint": "eslint .",
13
- "format": "prettier --write ."
9
+ "files": [
10
+ "bin/tacticremote.js",
11
+ "LICENSE",
12
+ "README.md"
13
+ ],
14
+ "engines": {
15
+ "node": ">=16"
16
+ },
17
+ "optionalDependencies": {
18
+ "@tacticremote/server-darwin-arm64": "1.8.1",
19
+ "@tacticremote/server-darwin-x64": "1.8.1",
20
+ "@tacticremote/server-linux-arm64": "1.8.1",
21
+ "@tacticremote/server-linux-x64": "1.8.1",
22
+ "@tacticremote/server-win32-x64": "1.8.1"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/TacticSpaceTech/TacticRemote"
27
+ },
28
+ "homepage": "https://tacticremote.com",
29
+ "bugs": {
30
+ "url": "https://github.com/TacticSpaceTech/TacticRemote/issues"
14
31
  },
15
32
  "keywords": [
16
33
  "claude-code",
17
34
  "claude",
35
+ "codex",
36
+ "amp",
37
+ "ai-coding",
18
38
  "remote",
19
39
  "terminal",
20
40
  "tmux",
@@ -23,37 +43,5 @@
23
43
  "websocket",
24
44
  "mobile"
25
45
  ],
26
- "author": "TacticSpace Tech <support@tacticremote.com>",
27
- "license": "MIT",
28
- "repository": {
29
- "type": "git",
30
- "url": "https://github.com/TacticSpaceTech/TacticRemote"
31
- },
32
- "homepage": "https://tacticremote.com",
33
- "bugs": {
34
- "url": "https://github.com/TacticSpaceTech/TacticRemote/issues"
35
- },
36
- "engines": {
37
- "node": ">=16.0.0"
38
- },
39
- "dependencies": {
40
- "ws": "^8.14.2",
41
- "bonjour-service": "^1.2.1",
42
- "qrcode-terminal": "^0.12.0"
43
- },
44
- "devDependencies": {
45
- "eslint": "^8.57.0",
46
- "jest": "^30.2.0",
47
- "prettier": "^3.2.5"
48
- },
49
- "files": [
50
- "bin/",
51
- "lib/",
52
- "middleware/",
53
- "routes/",
54
- "shared/",
55
- "server.js",
56
- "README.md",
57
- "LICENSE"
58
- ]
46
+ "author": "TacticSpace Tech <support@tacticremote.com>"
59
47
  }