traderclaw-cli 1.0.114 → 1.0.115
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/bin/installer-step-engine.mjs +10 -6
- package/bin/openclaw-trader.mjs +18 -8
- package/package.json +2 -2
|
@@ -1840,14 +1840,18 @@ export function spawnOpenClawCodexAuthLoginChild() {
|
|
|
1840
1840
|
return spawn("unbuffer", ["openclaw", ...argv], { stdio: ["pipe", "pipe", "pipe"], shell: false });
|
|
1841
1841
|
}
|
|
1842
1842
|
if (commandExists("script")) {
|
|
1843
|
-
|
|
1844
|
-
//
|
|
1845
|
-
//
|
|
1846
|
-
//
|
|
1847
|
-
//
|
|
1848
|
-
//
|
|
1843
|
+
// stty cols 32767: set an extremely wide PTY column so OpenClaw/Clack never
|
|
1844
|
+
// wraps the OAuth URL across lines (default PTY width when spawned via pipe is 80).
|
|
1845
|
+
// A wrapped URL causes the wizard's regex to only capture the first segment.
|
|
1846
|
+
// --return propagates openclaw's exit code (util-linux 2.38+).
|
|
1847
|
+
// -f/--flush: force immediate forwarding of each PTY write to the pipe so the
|
|
1848
|
+
// wizard sees the URL as soon as OpenClaw prints it (default is block-buffered).
|
|
1849
|
+
const cmdline = "stty cols 32767 rows 50 2>/dev/null; openclaw models auth login --provider openai-codex";
|
|
1849
1850
|
return spawn("script", ["--return", "-f", "-q", "-c", cmdline, "/dev/null"], {
|
|
1850
1851
|
stdio: ["pipe", "pipe", "pipe"],
|
|
1852
|
+
// COLUMNS/LINES: belt-and-suspenders env fallback for programs that read env
|
|
1853
|
+
// instead of ioctl(TIOCGWINSZ) to determine terminal dimensions.
|
|
1854
|
+
env: { ...process.env, COLUMNS: "32767", LINES: "50" },
|
|
1851
1855
|
shell: false,
|
|
1852
1856
|
});
|
|
1853
1857
|
}
|
package/bin/openclaw-trader.mjs
CHANGED
|
@@ -3873,15 +3873,25 @@ async function cmdInstall(args) {
|
|
|
3873
3873
|
|
|
3874
3874
|
const trySendUrl = () => {
|
|
3875
3875
|
if (responded) return;
|
|
3876
|
-
//
|
|
3877
|
-
//
|
|
3878
|
-
//
|
|
3879
|
-
//
|
|
3880
|
-
|
|
3881
|
-
const
|
|
3876
|
+
// Layer 1: strip ANSI codes and carriage returns, then join any URL continuation
|
|
3877
|
+
// lines caused by PTY column-wrapping (e.g. at 80-col default). When the URL is
|
|
3878
|
+
// split across lines the [^\s] tail of the regex stops at the newline and only the
|
|
3879
|
+
// first fragment is captured. Removing newlines that are sandwiched between URL-safe
|
|
3880
|
+
// characters reconnects all fragments before matching.
|
|
3881
|
+
const cleanedForUrl = stripAnsi(combined)
|
|
3882
|
+
.replace(/\r/g, "")
|
|
3883
|
+
.replace(/([A-Za-z0-9%&=+?#:/@._~!$'()*,;-])\n([A-Za-z0-9%&=+?#:/@._~!$'()*,;-])/g, "$1$2");
|
|
3884
|
+
let m = cleanedForUrl.match(OPENAI_OAUTH_AUTHORIZE_RE);
|
|
3885
|
+
// Layer 2: try the raw combined buffer in case stripAnsi dropped a character that
|
|
3886
|
+
// broke the URL detection (raw ANSI seqs don't include space so regex still works).
|
|
3887
|
+
if (!m || !m[0]) {
|
|
3888
|
+
const rawCleaned = combined.replace(/\r/g, "")
|
|
3889
|
+
.replace(/([A-Za-z0-9%&=+?#:/@._~!$'()*,;-])\n([A-Za-z0-9%&=+?#:/@._~!$'()*,;-])/g, "$1$2");
|
|
3890
|
+
m = rawCleaned.match(OPENAI_OAUTH_AUTHORIZE_RE);
|
|
3891
|
+
}
|
|
3882
3892
|
if (!m || !m[0]) return;
|
|
3883
|
-
// Strip any trailing ANSI remnants
|
|
3884
|
-
const authUrl = m[0].replace(/\
|
|
3893
|
+
// Strip any trailing ANSI remnants (e.g. \x1b[0m appended by colour reset)
|
|
3894
|
+
const authUrl = stripAnsi(m[0]).replace(/\r/g, "").trim();
|
|
3885
3895
|
if (!authUrl.startsWith("https://")) return;
|
|
3886
3896
|
clearTimeout(urlTimeout);
|
|
3887
3897
|
responded = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "traderclaw-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.115",
|
|
4
4
|
"description": "Global TraderClaw CLI (install --wizard, setup, precheck). Installs solana-traderclaw as a dependency for OpenClaw plugin files.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"node": ">=22"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"solana-traderclaw": "^1.0.
|
|
20
|
+
"solana-traderclaw": "^1.0.115"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"traderclaw",
|