codeam-cli 2.4.10 → 2.4.12
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 +68 -5
- 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.10] — 2026-05-03
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Ship ~/.claude.json so codespace skips onboarding (v2.4.10)
|
|
12
|
+
|
|
13
|
+
## [2.4.9] — 2026-05-03
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- **cli:** Ask before bridging local Claude credentials (v2.4.9)
|
|
18
|
+
|
|
19
|
+
## [2.4.8] — 2026-05-03
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **cli:** Never let Claude show first-launch login on a codeam deploy (v2.4.8)
|
|
24
|
+
|
|
7
25
|
## [2.4.7] — 2026-05-03
|
|
8
26
|
|
|
9
27
|
### Fixed
|
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.12",
|
|
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: {
|
|
@@ -5885,17 +5885,80 @@ async function deploy() {
|
|
|
5885
5885
|
workspace.webUrl ? `Web: ${import_picocolors8.default.cyan(workspace.webUrl)}` : "",
|
|
5886
5886
|
"",
|
|
5887
5887
|
"Starting `codeam pair` on the workspace.",
|
|
5888
|
-
"Scan the QR code below with the CodeAgent Mobile app to finish pairing."
|
|
5888
|
+
"Scan the QR code below with the CodeAgent Mobile app to finish pairing.",
|
|
5889
|
+
import_picocolors8.default.dim("(Once paired, this terminal disconnects automatically; the session stays alive on the codespace.)")
|
|
5889
5890
|
].filter(Boolean).join("\n"),
|
|
5890
5891
|
"Almost there"
|
|
5891
5892
|
);
|
|
5892
|
-
const
|
|
5893
|
+
const wrapperLines = [
|
|
5894
|
+
"mkdir -p ~/.codeam-deploy",
|
|
5895
|
+
"LOG=~/.codeam-deploy/session.log",
|
|
5896
|
+
"PIDFILE=~/.codeam-deploy/session.pid",
|
|
5897
|
+
// Stop any prior detached session for this codespace.
|
|
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
|
+
': > "$LOG"',
|
|
5900
|
+
// Detach codeam pair from this shell so SSH hangup and Ctrl+C
|
|
5901
|
+
// can never reach it.
|
|
5902
|
+
'nohup codeam pair > "$LOG" 2>&1 < /dev/null &',
|
|
5903
|
+
"PID=$!",
|
|
5904
|
+
"disown",
|
|
5905
|
+
'echo "$PID" > "$PIDFILE"',
|
|
5906
|
+
// Stream the log to the local terminal.
|
|
5907
|
+
'tail -n +1 -F "$LOG" 2>/dev/null &',
|
|
5908
|
+
"TAIL=$!",
|
|
5909
|
+
// Local Ctrl+C: kill ONLY the tail and exit — relay stays alive.
|
|
5910
|
+
"trap 'kill $TAIL 2>/dev/null; exit 130' INT TERM",
|
|
5911
|
+
// Phase 1 — wait for the QR scan to complete.
|
|
5912
|
+
"SUCCESS=0",
|
|
5913
|
+
"while true; do",
|
|
5914
|
+
' if grep -q "Paired with" "$LOG" 2>/dev/null; then SUCCESS=1; break; fi',
|
|
5915
|
+
' if ! kill -0 "$PID" 2>/dev/null; then SUCCESS=0; break; fi',
|
|
5916
|
+
" sleep 1",
|
|
5917
|
+
"done",
|
|
5918
|
+
'if [ "$SUCCESS" = "1" ]; then',
|
|
5919
|
+
" echo",
|
|
5920
|
+
' echo "\u2713 Phone paired."',
|
|
5921
|
+
' echo " Claude may ask first-time prompts ("trust this folder", model picker, etc.) \u2014 answer those on your phone."',
|
|
5922
|
+
' echo " This terminal will disconnect once Claude is fully ready, or press Ctrl+C now to disconnect immediately."',
|
|
5923
|
+
" echo",
|
|
5924
|
+
// Phase 2 — wait until Claude is fully initialised. The
|
|
5925
|
+
// "? for shortcuts" line (from Claude\'s status bar) is the most
|
|
5926
|
+
// reliable "ready" marker — it only renders AFTER any trust /
|
|
5927
|
+
// onboarding prompts have been resolved. Cap at 3 minutes so we
|
|
5928
|
+
// never hang the local terminal forever if the user doesn\'t
|
|
5929
|
+
// resolve a prompt on their phone.
|
|
5930
|
+
" WAIT_START=$(date +%s)",
|
|
5931
|
+
" while true; do",
|
|
5932
|
+
' if grep -q "for shortcuts" "$LOG" 2>/dev/null; then break; fi',
|
|
5933
|
+
' if ! kill -0 "$PID" 2>/dev/null; then break; fi',
|
|
5934
|
+
" if [ $(($(date +%s) - WAIT_START)) -gt 180 ]; then break; fi",
|
|
5935
|
+
" sleep 1",
|
|
5936
|
+
" done",
|
|
5937
|
+
"fi",
|
|
5938
|
+
"trap - INT TERM",
|
|
5939
|
+
"kill $TAIL 2>/dev/null",
|
|
5940
|
+
"echo",
|
|
5941
|
+
'if [ "$SUCCESS" = "1" ]; then',
|
|
5942
|
+
' echo "\u2713 Session running on codespace (PID $PID). Closing local connection \u2014 your phone stays paired."',
|
|
5943
|
+
" exit 0",
|
|
5944
|
+
"else",
|
|
5945
|
+
' echo "\u2717 Pairing did not complete (codeam pair exited)."',
|
|
5946
|
+
" exit 1",
|
|
5947
|
+
"fi"
|
|
5948
|
+
];
|
|
5949
|
+
const wrapper = wrapperLines.join("\n");
|
|
5950
|
+
const code = (await provider.streamCommand(workspace.id, `bash -lc ${shellQuoteSingle(wrapper)}`)).code;
|
|
5893
5951
|
if (code === 0) {
|
|
5894
|
-
gt(import_picocolors8.default.green(
|
|
5952
|
+
gt(import_picocolors8.default.green("\u2713 Workspace deployed and paired. Drive from your phone, anywhere."));
|
|
5953
|
+
} else if (code === 130) {
|
|
5954
|
+
gt(import_picocolors8.default.yellow("Disconnected from local terminal. Mobile session keeps running on the codespace."));
|
|
5895
5955
|
} else {
|
|
5896
|
-
gt(import_picocolors8.default.yellow(`Pairing
|
|
5956
|
+
gt(import_picocolors8.default.yellow(`Pairing did not complete. Run "codeam pair" inside the codespace if needed.`));
|
|
5897
5957
|
}
|
|
5898
5958
|
}
|
|
5959
|
+
function shellQuoteSingle(s) {
|
|
5960
|
+
return `'${s.replace(/'/g, `'\\''`)}'`;
|
|
5961
|
+
}
|
|
5899
5962
|
async function runRemoteClaudeLogin(provider, workspaceId) {
|
|
5900
5963
|
wt(
|
|
5901
5964
|
[
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.12",
|
|
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": {
|