tacticremote 1.7.0 → 1.8.2
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/LICENSE +28 -0
- package/README.md +32 -41
- package/bin/tacticremote.js +51 -99
- package/package.json +29 -42
- package/bin/tactic-remote-server.js +0 -636
- package/lib/authChallengeManager.js +0 -1
- package/lib/bonjourPublisher.js +0 -68
- package/lib/claudeSessionManager.js +0 -1
- package/lib/claudeTransport.js +0 -1
- package/lib/errorCodes.js +0 -1
- package/lib/execSafe.js +0 -1
- package/lib/fileService.js +0 -1
- package/lib/hookInstaller.js +0 -253
- package/lib/outputParser.js +0 -1
- package/lib/pushClient.js +0 -1
- package/lib/rateLimiter.js +0 -1
- package/lib/serverIdentity.js +0 -1
- package/lib/streamJsonParser.js +0 -1
- package/lib/tmuxManager.js +0 -1
- package/lib/uploadService.js +0 -1
- package/lib/validators.js +0 -1
- package/middleware/authMiddleware.js +0 -152
- package/routes/httpHandler.js +0 -111
- package/routes/wsHandler.js +0 -1094
- package/server.js +0 -236
- package/shared/server-core/authChallengeManager.js +0 -108
- package/shared/server-core/claudeSessionManager.js +0 -222
- package/shared/server-core/claudeTransport.js +0 -176
- package/shared/server-core/errorCodes.js +0 -91
- package/shared/server-core/execSafe.js +0 -185
- package/shared/server-core/fileService.js +0 -155
- package/shared/server-core/outputParser.js +0 -174
- package/shared/server-core/protocol-manifest.json +0 -59
- package/shared/server-core/protocol-manifest.schema.json +0 -90
- package/shared/server-core/protocolManifest.js +0 -42
- package/shared/server-core/pushClient.js +0 -198
- package/shared/server-core/rateLimiter.js +0 -98
- package/shared/server-core/serverConnectionLifecycle.js +0 -118
- package/shared/server-core/serverHandshake.js +0 -72
- package/shared/server-core/serverIdentity.js +0 -102
- package/shared/server-core/streamJsonParser.js +0 -321
- package/shared/server-core/tmuxManager.js +0 -596
- package/shared/server-core/unixProcessLifecycle.js +0 -96
- package/shared/server-core/unixServerHooks.js +0 -148
- package/shared/server-core/unixWsRuntime.js +0 -412
- package/shared/server-core/uploadService.js +0 -321
- package/shared/server-core/validators.js +0 -274
- package/shared/server-core/windowsServerHooks.js +0 -174
- 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
|
-
#
|
|
1
|
+
# TacticRemote
|
|
2
2
|
|
|
3
|
-
|
|
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,45 @@ Server component for [Tactic Remote](https://tacticremote.com) — control Claud
|
|
|
8
10
|
npx tacticremote
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
**Alternative install via Homebrew:**
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
brew install TacticSpaceTech/tap/tacticremote
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
[](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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
41
|
+
## Supported Platforms
|
|
56
42
|
|
|
57
|
-
|
|
43
|
+
- macOS — Apple Silicon (arm64) and Intel (x64)
|
|
44
|
+
- Linux — arm64 and x64
|
|
58
45
|
|
|
59
|
-
|
|
46
|
+
On macOS and Linux, `npm` automatically downloads the binary matching your platform; no extra setup required. **Windows is not supported via npm** — download the [Windows installer](https://tacticremote.com) instead.
|
|
60
47
|
|
|
61
48
|
## License
|
|
62
49
|
|
|
63
|
-
|
|
50
|
+
TacticRemote is **proprietary software**. See [LICENSE](./LICENSE) for the full terms.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
© 2026 Shanghai TacticSpace Technology Co., Ltd. All rights reserved.
|
package/bin/tacticremote.js
CHANGED
|
@@ -1,124 +1,76 @@
|
|
|
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
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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()}`;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function getBinaryPath() {
|
|
38
|
-
return path.join(CACHE_DIR, `${getBinaryName()}-${VERSION}`);
|
|
7
|
+
const SUPPORTED = new Set([
|
|
8
|
+
'darwin-arm64',
|
|
9
|
+
'darwin-x64',
|
|
10
|
+
'linux-arm64',
|
|
11
|
+
'linux-x64',
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
function platformPackageName() {
|
|
15
|
+
const key = `${process.platform}-${process.arch}`;
|
|
16
|
+
if (!SUPPORTED.has(key)) return null;
|
|
17
|
+
return `@tacticremote/server-${key}`;
|
|
39
18
|
}
|
|
40
19
|
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
});
|
|
20
|
+
function resolveBinary(pkg) {
|
|
21
|
+
const pkgJsonPath = require.resolve(`${pkg}/package.json`);
|
|
22
|
+
const pkgDir = path.dirname(pkgJsonPath);
|
|
23
|
+
// win32 is excluded from SUPPORTED above, so this is only ever reached for
|
|
24
|
+
// darwin/linux; there is no .exe variant to resolve.
|
|
25
|
+
const exe = 'tacticremote-server';
|
|
26
|
+
return path.join(pkgDir, 'bin', exe);
|
|
59
27
|
}
|
|
60
28
|
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
29
|
+
function main() {
|
|
30
|
+
const pkg = platformPackageName();
|
|
31
|
+
if (!pkg) {
|
|
32
|
+
console.error(`tacticremote: unsupported platform ${process.platform}-${process.arch}`);
|
|
33
|
+
console.error('Supported: darwin/linux × arm64/x64 (Windows: use the NSIS installer — https://tacticremote.com)');
|
|
34
|
+
console.error('See https://tacticremote.com for installation help.');
|
|
35
|
+
process.exit(1);
|
|
66
36
|
}
|
|
67
37
|
|
|
68
|
-
|
|
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
|
-
|
|
38
|
+
let binPath;
|
|
76
39
|
try {
|
|
77
|
-
|
|
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;
|
|
40
|
+
binPath = resolveBinary(pkg);
|
|
87
41
|
} catch (err) {
|
|
88
|
-
console.error(`
|
|
89
|
-
console.error('');
|
|
90
|
-
console.error('
|
|
91
|
-
console.error(` https://github.com/${REPO}/releases`);
|
|
42
|
+
console.error(`tacticremote: failed to locate platform package "${pkg}".`);
|
|
43
|
+
console.error('This usually means npm skipped the optional dependency. Try reinstalling:');
|
|
44
|
+
console.error(' npm install -g tacticremote');
|
|
92
45
|
console.error('');
|
|
46
|
+
console.error('If the issue persists, please report it at:');
|
|
47
|
+
console.error(' https://github.com/TacticSpaceTech/TacticRemote/issues');
|
|
93
48
|
process.exit(1);
|
|
94
49
|
}
|
|
95
|
-
}
|
|
96
|
-
|
|
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
50
|
|
|
105
|
-
const
|
|
51
|
+
const child = spawn(binPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
106
52
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
53
|
+
// Forward termination signals to the spawned server so it is not orphaned
|
|
54
|
+
// when a process manager signals the wrapper PID directly (not the group).
|
|
55
|
+
const forwardSignal = (sig) => {
|
|
56
|
+
if (!child.killed) {
|
|
57
|
+
try { child.kill(sig); } catch (_e) { /* child already gone */ }
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
process.on('SIGTERM', () => forwardSignal('SIGTERM'));
|
|
61
|
+
process.on('SIGINT', () => forwardSignal('SIGINT'));
|
|
111
62
|
|
|
112
|
-
child.on('exit', (code) => process.exit(code || 0));
|
|
113
63
|
child.on('error', (err) => {
|
|
114
|
-
console.error(`
|
|
64
|
+
console.error(`tacticremote: failed to launch server binary: ${err.message}`);
|
|
115
65
|
process.exit(1);
|
|
116
66
|
});
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
67
|
+
child.on('exit', (code, signal) => {
|
|
68
|
+
if (signal) {
|
|
69
|
+
process.kill(process.pid, signal);
|
|
70
|
+
} else {
|
|
71
|
+
process.exit(code ?? 0);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
122
74
|
}
|
|
123
75
|
|
|
124
76
|
main();
|
package/package.json
CHANGED
|
@@ -1,20 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tacticremote",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Control
|
|
3
|
+
"version": "1.8.2",
|
|
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/
|
|
7
|
+
"tacticremote": "./bin/tacticremote.js"
|
|
7
8
|
},
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
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.2",
|
|
19
|
+
"@tacticremote/server-darwin-x64": "1.8.2",
|
|
20
|
+
"@tacticremote/server-linux-arm64": "1.8.2",
|
|
21
|
+
"@tacticremote/server-linux-x64": "1.8.2"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/TacticSpaceTech/TacticRemote"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://tacticremote.com",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/TacticSpaceTech/TacticRemote/issues"
|
|
14
30
|
},
|
|
15
31
|
"keywords": [
|
|
16
32
|
"claude-code",
|
|
17
33
|
"claude",
|
|
34
|
+
"codex",
|
|
35
|
+
"amp",
|
|
36
|
+
"ai-coding",
|
|
18
37
|
"remote",
|
|
19
38
|
"terminal",
|
|
20
39
|
"tmux",
|
|
@@ -23,37 +42,5 @@
|
|
|
23
42
|
"websocket",
|
|
24
43
|
"mobile"
|
|
25
44
|
],
|
|
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
|
-
]
|
|
45
|
+
"author": "TacticSpace Tech <support@tacticremote.com>"
|
|
59
46
|
}
|