limbo-ai 1.9.0 → 1.9.1

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.
Files changed (2) hide show
  1. package/cli.js +10 -4
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -809,8 +809,12 @@ function applyOpenClawConfig(cfg) {
809
809
  ok(t(cfg.language, 'configFlowDone'));
810
810
  }
811
811
 
812
+ // Strip ANSI escape sequences so URL/text matching works on TTY output.
813
+ const stripAnsi = (str) => str.replace(/\x1b\[[0-9;]*[A-Za-z]/g, '').replace(/\r/g, '');
814
+
812
815
  // Spawn OpenClaw auth with filtered output: extract OAuth URLs, suppress branding.
813
- // Uses async spawn so URLs appear in real-time (spawnSync would buffer until exit).
816
+ // --tty is required so openclaw sees a TTY inside the container and runs the auth wizard.
817
+ // We pipe stdout/stderr to filter content while the container gets a proper PTY allocation.
814
818
  function streamFilteredAuth(dockerArgs) {
815
819
  return new Promise((resolve) => {
816
820
  const proc = spawn('docker', dockerArgs, {
@@ -829,7 +833,8 @@ function streamFilteredAuth(dockerArgs) {
829
833
  for (const line of lines) emitLine(line);
830
834
  };
831
835
 
832
- const emitLine = (line) => {
836
+ const emitLine = (rawLine) => {
837
+ const line = stripAnsi(rawLine);
833
838
  const urls = line.match(urlRe) || [];
834
839
  if (urls.length > 0) {
835
840
  for (const url of urls) {
@@ -870,8 +875,9 @@ async function runSubscriptionAuthFlow(cfg) {
870
875
 
871
876
  let exitCode;
872
877
  if (cfg.providerFamily === 'openai') {
873
- // Stream output and extract OAuth URL so the user never sees "openclaw"
874
- exitCode = await streamFilteredAuth(['compose', 'run', '--rm', '--entrypoint', 'openclaw', 'limbo', ...authArgs]);
878
+ // --tty allocates a PTY inside the container so openclaw's auth wizard runs correctly.
879
+ // We still pipe stdout/stderr to filter out branding and highlight the OAuth URL.
880
+ exitCode = await streamFilteredAuth(['compose', 'run', '--tty', '--rm', '--entrypoint', 'openclaw', 'limbo', ...authArgs]);
875
881
  } else {
876
882
  // Anthropic paste-token is interactive (user pastes a token); keep stdio inherited
877
883
  const authResult = runOpenClaw(authArgs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "limbo-ai",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Your personal AI memory agent — install and manage Limbo via npx",
5
5
  "type": "commonjs",
6
6
  "bin": {