codeam-cli 2.4.11 → 2.4.13
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/CHANGELOG.md +18 -0
- package/dist/index.js +28 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ All notable changes to `codeam-cli` are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.4.12] — 2026-05-03
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Wait for Claude to be ready before closing local terminal (v2.4.12)
|
|
12
|
+
|
|
13
|
+
## [2.4.11] — 2026-05-03
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **cli:** Codeam deploy detaches local terminal after pairing (v2.4.11)
|
|
18
|
+
|
|
19
|
+
## [2.4.10] — 2026-05-03
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **cli:** Ship ~/.claude.json so codespace skips onboarding (v2.4.10)
|
|
24
|
+
|
|
7
25
|
## [2.4.9] — 2026-05-03
|
|
8
26
|
|
|
9
27
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -179,7 +179,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
|
|
|
179
179
|
// package.json
|
|
180
180
|
var package_default = {
|
|
181
181
|
name: "codeam-cli",
|
|
182
|
-
version: "2.4.
|
|
182
|
+
version: "2.4.13",
|
|
183
183
|
description: "Remote control Claude Code (and other AI coding agents) from your mobile phone. Pair your device, send prompts, stream responses in real-time, and approve commands \u2014 from anywhere.",
|
|
184
184
|
main: "dist/index.js",
|
|
185
185
|
bin: {
|
|
@@ -706,6 +706,7 @@ def onwinch(n,f):
|
|
|
706
706
|
except Exception:pass
|
|
707
707
|
signal.signal(signal.SIGCHLD,onchld)
|
|
708
708
|
signal.signal(signal.SIGWINCH,onwinch)
|
|
709
|
+
signal.signal(signal.SIGHUP,signal.SIG_IGN)
|
|
709
710
|
i=sys.stdin.fileno()
|
|
710
711
|
o=sys.stdout.fileno()
|
|
711
712
|
while not done[0]:
|
|
@@ -5890,31 +5891,43 @@ async function deploy() {
|
|
|
5890
5891
|
].filter(Boolean).join("\n"),
|
|
5891
5892
|
"Almost there"
|
|
5892
5893
|
);
|
|
5893
|
-
const
|
|
5894
|
+
const wrapper = [
|
|
5894
5895
|
"mkdir -p ~/.codeam-deploy",
|
|
5895
5896
|
"LOG=~/.codeam-deploy/session.log",
|
|
5896
5897
|
"PIDFILE=~/.codeam-deploy/session.pid",
|
|
5897
|
-
// Stop any prior detached session for this codespace.
|
|
5898
5898
|
'if [ -f "$PIDFILE" ]; then OLD=$(cat "$PIDFILE" 2>/dev/null); if [ -n "$OLD" ] && kill -0 "$OLD" 2>/dev/null; then kill "$OLD" 2>/dev/null; sleep 1; fi; fi',
|
|
5899
5899
|
': > "$LOG"',
|
|
5900
|
-
// Detach codeam pair from this shell so SSH hangup
|
|
5901
|
-
//
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
"
|
|
5900
|
+
// Detach codeam pair from this shell so SSH hangup never reaches
|
|
5901
|
+
// it. The combination is: setsid (new session, no controlling
|
|
5902
|
+
// terminal) + nohup (ignore SIGHUP) + < /dev/null (no stdin
|
|
5903
|
+
// attached) + redirect stdio to log file.
|
|
5904
|
+
'setsid nohup codeam pair > "$LOG" 2>&1 < /dev/null &',
|
|
5905
|
+
"sleep 1",
|
|
5906
|
+
'PID=$(pgrep -fn "codeam pair" | head -1)',
|
|
5905
5907
|
'echo "$PID" > "$PIDFILE"',
|
|
5906
|
-
// Stream the log to the local terminal.
|
|
5907
5908
|
'tail -n +1 -F "$LOG" 2>/dev/null &',
|
|
5908
5909
|
"TAIL=$!",
|
|
5909
|
-
// Local Ctrl+C: kill ONLY the tail and exit — relay stays alive.
|
|
5910
5910
|
"trap 'kill $TAIL 2>/dev/null; exit 130' INT TERM",
|
|
5911
|
-
// Wait for the paired-marker, or codeam dying / timing out.
|
|
5912
5911
|
"SUCCESS=0",
|
|
5913
5912
|
"while true; do",
|
|
5914
|
-
' if grep -q "Paired with" "$LOG" 2>/dev/null; then
|
|
5915
|
-
' if ! kill -0 "$PID" 2>/dev/null; then SUCCESS=0; break; fi',
|
|
5913
|
+
' if grep -q "Paired with" "$LOG" 2>/dev/null; then SUCCESS=1; break; fi',
|
|
5914
|
+
' if [ -z "$PID" ] || ! kill -0 "$PID" 2>/dev/null; then SUCCESS=0; break; fi',
|
|
5916
5915
|
" sleep 1",
|
|
5917
5916
|
"done",
|
|
5917
|
+
'if [ "$SUCCESS" = "1" ]; then',
|
|
5918
|
+
" echo",
|
|
5919
|
+
' echo "\u2713 Phone paired."',
|
|
5920
|
+
' echo " Answer any first-time prompts ("trust this folder", etc.) on your phone."',
|
|
5921
|
+
' echo " Local terminal will close once Claude is ready."',
|
|
5922
|
+
" echo",
|
|
5923
|
+
" WAIT_START=$(date +%s)",
|
|
5924
|
+
" while true; do",
|
|
5925
|
+
' if grep -q "for shortcuts" "$LOG" 2>/dev/null; then break; fi',
|
|
5926
|
+
' if [ -z "$PID" ] || ! kill -0 "$PID" 2>/dev/null; then break; fi',
|
|
5927
|
+
" if [ $(($(date +%s) - WAIT_START)) -gt 180 ]; then break; fi",
|
|
5928
|
+
" sleep 1",
|
|
5929
|
+
" done",
|
|
5930
|
+
"fi",
|
|
5918
5931
|
"trap - INT TERM",
|
|
5919
5932
|
"kill $TAIL 2>/dev/null",
|
|
5920
5933
|
"echo",
|
|
@@ -5925,15 +5938,14 @@ async function deploy() {
|
|
|
5925
5938
|
' echo "\u2717 Pairing did not complete (codeam pair exited)."',
|
|
5926
5939
|
" exit 1",
|
|
5927
5940
|
"fi"
|
|
5928
|
-
];
|
|
5929
|
-
const wrapper = wrapperLines.join("\n");
|
|
5941
|
+
].join("\n");
|
|
5930
5942
|
const code = (await provider.streamCommand(workspace.id, `bash -lc ${shellQuoteSingle(wrapper)}`)).code;
|
|
5931
5943
|
if (code === 0) {
|
|
5932
5944
|
gt(import_picocolors8.default.green("\u2713 Workspace deployed and paired. Drive from your phone, anywhere."));
|
|
5933
5945
|
} else if (code === 130) {
|
|
5934
5946
|
gt(import_picocolors8.default.yellow("Disconnected from local terminal. Mobile session keeps running on the codespace."));
|
|
5935
5947
|
} else {
|
|
5936
|
-
gt(import_picocolors8.default.yellow(
|
|
5948
|
+
gt(import_picocolors8.default.yellow('Pairing did not complete. Run "codeam pair" inside the codespace if needed.'));
|
|
5937
5949
|
}
|
|
5938
5950
|
}
|
|
5939
5951
|
function shellQuoteSingle(s) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.13",
|
|
4
4
|
"description": "Remote control Claude Code (and other AI coding agents) from your mobile phone. Pair your device, send prompts, stream responses in real-time, and approve commands — from anywhere.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|