codeam-cli 2.12.11 → 2.12.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 +15 -0
- package/dist/index.js +114 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@ 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.12.12] — 2026-05-14
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Codex-specific renderer with DECSTBM scroll-region support — captures full multi-paragraph replies
|
|
12
|
+
- **cli:** Inject Markdown ``` fences for Codex-emitted code blocks
|
|
13
|
+
|
|
14
|
+
## [2.12.11] — 2026-05-14
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **cli:** Codex-specific renderer with DECSTBM scroll-region support — captures full multi-paragraph replies
|
|
19
|
+
|
|
20
|
+
## [2.12.10] — 2026-05-14
|
|
21
|
+
|
|
7
22
|
## [2.12.9] — 2026-05-14
|
|
8
23
|
|
|
9
24
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -1682,7 +1682,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
|
|
|
1682
1682
|
// package.json
|
|
1683
1683
|
var package_default = {
|
|
1684
1684
|
name: "codeam-cli",
|
|
1685
|
-
version: "2.12.
|
|
1685
|
+
version: "2.12.13",
|
|
1686
1686
|
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.",
|
|
1687
1687
|
type: "commonjs",
|
|
1688
1688
|
main: "dist/index.js",
|
|
@@ -5834,6 +5834,7 @@ function filterCodexChrome(lines) {
|
|
|
5834
5834
|
}
|
|
5835
5835
|
out.push(t2);
|
|
5836
5836
|
}
|
|
5837
|
+
const wrapped = wrapCodexCodeBlocks(out);
|
|
5837
5838
|
const hasRealInput = lines.some((l) => /\w/.test(l));
|
|
5838
5839
|
if (out.length > 0 || hasRealInput) {
|
|
5839
5840
|
const sampleIn = lines.slice(-50).map((l, i) => ` in[${i}] ${JSON.stringify(l)}`).join("\n");
|
|
@@ -5845,7 +5846,116 @@ ${sampleOut}`);
|
|
|
5845
5846
|
} else {
|
|
5846
5847
|
log.trace("codex-parse", `filterCodexChrome in=${lines.length} out=${out.length}`);
|
|
5847
5848
|
}
|
|
5848
|
-
return
|
|
5849
|
+
return wrapped;
|
|
5850
|
+
}
|
|
5851
|
+
var CODE_CHAR_RE = /[;{}]|=>|^\s*(?:import|public|private|static|class|function|interface|type|const|let|var|def|return|if|else|for|while)\b/;
|
|
5852
|
+
var DIFF_HUNK_RE = /^@@\s+-\d+(?:,\d+)?\s+\+\d+(?:,\d+)?\s+@@/;
|
|
5853
|
+
var DIFF_GIT_RE = /^diff\s+--git\s+/;
|
|
5854
|
+
var DIFF_OLD_RE = /^---\s+(?:a\/)?\S/;
|
|
5855
|
+
var DIFF_NEW_RE = /^\+\+\+\s+(?:b\/)?\S/;
|
|
5856
|
+
var COMMIT_HEAD_RE = /^\[[\w./@-]+\s+[0-9a-f]{7,40}\]\s+/;
|
|
5857
|
+
var COMMIT_STATS_RE = /\d+\s+files?\s+changed/;
|
|
5858
|
+
var PUSH_TO_RE = /^To\s+(?:https?:\/\/|git@)/;
|
|
5859
|
+
var PUSH_NEW_RE = /\[new branch\]\s+\S+\s*->\s*\S+/;
|
|
5860
|
+
var PUSH_UPDATE_RE = /^\s*[0-9a-f]{7,40}\.\.[0-9a-f]{7,40}\s+\S+\s*->\s*\S+/;
|
|
5861
|
+
var MERGE_UPD_RE = /^Updating\s+[0-9a-f]{7,40}\.\.[0-9a-f]{7,40}/;
|
|
5862
|
+
var MERGE_FF_RE = /^Fast-forward\s*$/;
|
|
5863
|
+
var PR_TITLE_RE = /^title:\s+\S/;
|
|
5864
|
+
var PR_STATE_RE = /^state:\s+(?:OPEN|CLOSED|MERGED|DRAFT)/i;
|
|
5865
|
+
var PR_URL_RE = /https?:\/\/github\.com\/[\w.-]+\/[\w.-]+\/pull\/\d+/;
|
|
5866
|
+
var PR_BANNER_RE = /^\s*[✓✔]?\s*Pull request created\s*$/i;
|
|
5867
|
+
function isStructuredBlock(block) {
|
|
5868
|
+
if (block.some((l) => DIFF_HUNK_RE.test(l))) return true;
|
|
5869
|
+
if (block.some((l) => DIFF_GIT_RE.test(l))) return true;
|
|
5870
|
+
if (block.some((l) => DIFF_OLD_RE.test(l)) && block.some((l) => DIFF_NEW_RE.test(l))) return true;
|
|
5871
|
+
if (block.some((l) => COMMIT_HEAD_RE.test(l))) return true;
|
|
5872
|
+
if (block.some((l) => COMMIT_STATS_RE.test(l))) return true;
|
|
5873
|
+
if (block.some((l) => PUSH_TO_RE.test(l))) return true;
|
|
5874
|
+
if (block.some((l) => PUSH_NEW_RE.test(l))) return true;
|
|
5875
|
+
if (block.some((l) => PUSH_UPDATE_RE.test(l))) return true;
|
|
5876
|
+
if (block.some((l) => MERGE_UPD_RE.test(l))) return true;
|
|
5877
|
+
if (block.some((l) => MERGE_FF_RE.test(l))) return true;
|
|
5878
|
+
if (block.some((l) => PR_TITLE_RE.test(l)) && block.some((l) => PR_STATE_RE.test(l))) return true;
|
|
5879
|
+
if (block.some((l) => PR_URL_RE.test(l))) return true;
|
|
5880
|
+
if (block.some((l) => PR_BANNER_RE.test(l))) return true;
|
|
5881
|
+
return false;
|
|
5882
|
+
}
|
|
5883
|
+
function inferLanguage(block) {
|
|
5884
|
+
const head = block.slice(0, 10).join("\n");
|
|
5885
|
+
if (/\bpublic\s+(?:static\s+)?(?:class|void|int|String)\b|System\.out\.println|\bjava\.util/.test(head)) return "java";
|
|
5886
|
+
if (/\b(?:interface|type)\s+\w+\s*=?\s*[{<]|\bas\s+(?:string|number|boolean)\b|\b(?:string|number|boolean)\s*[;,)\]]/.test(head)) return "typescript";
|
|
5887
|
+
if (/\bimport\s+\w+\s+from\s+['"]|=>\s*[{(]|\bconst\s+\w+\s*=\s*(?:async\s+)?\(/.test(head)) return "javascript";
|
|
5888
|
+
if (/^\s*def\s+\w+\(|^\s*from\s+\w+\s+import|print\(/m.test(head)) return "python";
|
|
5889
|
+
if (/^\s*package\s+\w+|^\s*func\s+\w+\(|\binterface\s*{/m.test(head)) return "go";
|
|
5890
|
+
if (/^\s*fn\s+\w+\(|^\s*use\s+\w+::|^\s*impl\s+/m.test(head)) return "rust";
|
|
5891
|
+
if (/#include\s*<|int\s+main\s*\(/.test(head)) return "cpp";
|
|
5892
|
+
return "";
|
|
5893
|
+
}
|
|
5894
|
+
function wrapCodexCodeBlocks(lines) {
|
|
5895
|
+
if (isStructuredBlock(lines)) {
|
|
5896
|
+
return lines;
|
|
5897
|
+
}
|
|
5898
|
+
const result = [];
|
|
5899
|
+
let i = 0;
|
|
5900
|
+
while (i < lines.length) {
|
|
5901
|
+
const line = lines[i];
|
|
5902
|
+
if (!CODE_CHAR_RE.test(line)) {
|
|
5903
|
+
result.push(line);
|
|
5904
|
+
i++;
|
|
5905
|
+
continue;
|
|
5906
|
+
}
|
|
5907
|
+
const start2 = i;
|
|
5908
|
+
let end = i;
|
|
5909
|
+
let j2 = i + 1;
|
|
5910
|
+
while (j2 < lines.length) {
|
|
5911
|
+
const l = lines[j2];
|
|
5912
|
+
if (CODE_CHAR_RE.test(l)) {
|
|
5913
|
+
end = j2;
|
|
5914
|
+
j2++;
|
|
5915
|
+
continue;
|
|
5916
|
+
}
|
|
5917
|
+
if (l.trim() === "") {
|
|
5918
|
+
let k2 = j2 + 1;
|
|
5919
|
+
while (k2 < lines.length && lines[k2].trim() === "") k2++;
|
|
5920
|
+
if (k2 < lines.length && CODE_CHAR_RE.test(lines[k2])) {
|
|
5921
|
+
end = k2;
|
|
5922
|
+
j2 = k2 + 1;
|
|
5923
|
+
continue;
|
|
5924
|
+
}
|
|
5925
|
+
break;
|
|
5926
|
+
}
|
|
5927
|
+
if (/^\s{2,}\S/.test(l)) {
|
|
5928
|
+
end = j2;
|
|
5929
|
+
j2++;
|
|
5930
|
+
continue;
|
|
5931
|
+
}
|
|
5932
|
+
break;
|
|
5933
|
+
}
|
|
5934
|
+
const runLen = end - start2 + 1;
|
|
5935
|
+
const body = lines.slice(start2, end + 1);
|
|
5936
|
+
if (isStructuredBlock(body)) {
|
|
5937
|
+
for (const l of body) result.push(l);
|
|
5938
|
+
i = end + 1;
|
|
5939
|
+
continue;
|
|
5940
|
+
}
|
|
5941
|
+
const codeShapedCount = body.filter((l) => CODE_CHAR_RE.test(l)).length;
|
|
5942
|
+
if (codeShapedCount >= 3) {
|
|
5943
|
+
const lang = inferLanguage(body);
|
|
5944
|
+
result.push("```" + lang);
|
|
5945
|
+
for (const l of body) result.push(l);
|
|
5946
|
+
while (result.length > 0 && result[result.length - 1].trim() === "") {
|
|
5947
|
+
result.pop();
|
|
5948
|
+
}
|
|
5949
|
+
result.push("```");
|
|
5950
|
+
i = end + 1;
|
|
5951
|
+
} else {
|
|
5952
|
+
for (let k2 = start2; k2 <= end && k2 < lines.length; k2++) result.push(lines[k2]);
|
|
5953
|
+
i = end + 1;
|
|
5954
|
+
if (i === start2) i++;
|
|
5955
|
+
}
|
|
5956
|
+
void runLen;
|
|
5957
|
+
}
|
|
5958
|
+
return result;
|
|
5849
5959
|
}
|
|
5850
5960
|
function parseCodexChrome(_line) {
|
|
5851
5961
|
return null;
|
|
@@ -10314,7 +10424,7 @@ async function stopWorkspaceFromLocal(target) {
|
|
|
10314
10424
|
// src/commands/version.ts
|
|
10315
10425
|
var import_picocolors11 = __toESM(require("picocolors"));
|
|
10316
10426
|
function version() {
|
|
10317
|
-
const v = true ? "2.12.
|
|
10427
|
+
const v = true ? "2.12.13" : "unknown";
|
|
10318
10428
|
console.log(`${import_picocolors11.default.bold("codeam-cli")} ${import_picocolors11.default.cyan(v)}`);
|
|
10319
10429
|
}
|
|
10320
10430
|
|
|
@@ -10449,7 +10559,7 @@ function checkForUpdates() {
|
|
|
10449
10559
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
10450
10560
|
if (process.env.CI) return;
|
|
10451
10561
|
if (!process.stdout.isTTY) return;
|
|
10452
|
-
const current = true ? "2.12.
|
|
10562
|
+
const current = true ? "2.12.13" : null;
|
|
10453
10563
|
if (!current) return;
|
|
10454
10564
|
const cache = readCache();
|
|
10455
10565
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.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
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|