langstage-cli 0.5.4__tar.gz → 0.5.5__tar.gz
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.
- {langstage_cli-0.5.4/langstage_cli.egg-info → langstage_cli-0.5.5}/PKG-INFO +4 -2
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/README.md +3 -1
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/langstage_cli/cli.py +20 -6
- {langstage_cli-0.5.4 → langstage_cli-0.5.5/langstage_cli.egg-info}/PKG-INFO +4 -2
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/langstage_cli.egg-info/SOURCES.txt +2 -1
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/pyproject.toml +1 -1
- langstage_cli-0.5.5/tests/test_unicode_console.py +31 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/LICENSE +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/deepagent_code/__init__.py +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/langstage_cli/__init__.py +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/langstage_cli/config.py +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/langstage_cli.egg-info/dependency_links.txt +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/langstage_cli.egg-info/entry_points.txt +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/langstage_cli.egg-info/requires.txt +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/langstage_cli.egg-info/top_level.txt +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/setup.cfg +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/tests/test_cli.py +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/tests/test_cli_help.py +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/tests/test_codeconfig.py +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/tests/test_config.py +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/tests/test_rename_shim.py +0 -0
- {langstage_cli-0.5.4 → langstage_cli-0.5.5}/tests/test_show_config.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langstage-cli
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.5
|
|
4
4
|
Summary: The terminal stage for your LangGraph agent — Claude Code-style CLI for any CompiledGraph
|
|
5
5
|
Author-email: Kedar Dabhadkar <kdabhadk@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -169,7 +169,9 @@ Example `langstage.toml`:
|
|
|
169
169
|
```toml
|
|
170
170
|
[agent]
|
|
171
171
|
spec = "my_agent.py:graph"
|
|
172
|
-
|
|
172
|
+
|
|
173
|
+
[workspace]
|
|
174
|
+
root = "."
|
|
173
175
|
|
|
174
176
|
[ui]
|
|
175
177
|
verbose = true
|
|
@@ -190,11 +190,15 @@ class Spinner:
|
|
|
190
190
|
frame = SPINNER_FRAMES[self.frame_idx % len(SPINNER_FRAMES)]
|
|
191
191
|
elapsed = time.time() - self.start_time
|
|
192
192
|
elapsed_str = f"{int(elapsed)}s"
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
193
|
+
# Never let a stdout hiccup in this daemon thread crash the run.
|
|
194
|
+
try:
|
|
195
|
+
print(
|
|
196
|
+
f"\r{CYAN}{frame}{RESET} {DIM}{self.message}... {elapsed_str}{RESET}",
|
|
197
|
+
end="",
|
|
198
|
+
flush=True,
|
|
199
|
+
)
|
|
200
|
+
except (UnicodeEncodeError, ValueError):
|
|
201
|
+
pass
|
|
198
202
|
self.frame_idx += 1
|
|
199
203
|
time.sleep(0.08)
|
|
200
204
|
|
|
@@ -1348,7 +1352,7 @@ def run_conversation_loop(
|
|
|
1348
1352
|
"--demo",
|
|
1349
1353
|
is_flag=True,
|
|
1350
1354
|
default=False,
|
|
1351
|
-
help="Run with the built-in keyless demo agent
|
|
1355
|
+
help="Run with the built-in keyless demo agent (no API key needed)",
|
|
1352
1356
|
)
|
|
1353
1357
|
@click.option(
|
|
1354
1358
|
"--show-config",
|
|
@@ -1403,6 +1407,16 @@ def main(
|
|
|
1403
1407
|
langstage-cli --demo "try it with no API key"
|
|
1404
1408
|
langstage-cli --show-config
|
|
1405
1409
|
"""
|
|
1410
|
+
# Windows consoles default to cp1252, where the spinner (Braille frames) and
|
|
1411
|
+
# status glyphs (✓ ⏺ —) raise UnicodeEncodeError — the documented
|
|
1412
|
+
# `langstage-cli --demo "hello"` one-liner crashed before any output. Force
|
|
1413
|
+
# UTF-8 with errors="replace" so a glyph can never crash the process.
|
|
1414
|
+
for _stream in (sys.stdout, sys.stderr):
|
|
1415
|
+
try:
|
|
1416
|
+
_stream.reconfigure(encoding="utf-8", errors="replace")
|
|
1417
|
+
except (AttributeError, ValueError): # non-reconfigurable stream
|
|
1418
|
+
pass
|
|
1419
|
+
|
|
1406
1420
|
if demo:
|
|
1407
1421
|
if agent_spec:
|
|
1408
1422
|
print(f"{RED}⏺ Error: --demo and -a/--agent are mutually exclusive{RESET}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langstage-cli
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.5
|
|
4
4
|
Summary: The terminal stage for your LangGraph agent — Claude Code-style CLI for any CompiledGraph
|
|
5
5
|
Author-email: Kedar Dabhadkar <kdabhadk@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -169,7 +169,9 @@ Example `langstage.toml`:
|
|
|
169
169
|
```toml
|
|
170
170
|
[agent]
|
|
171
171
|
spec = "my_agent.py:graph"
|
|
172
|
-
|
|
172
|
+
|
|
173
|
+
[workspace]
|
|
174
|
+
root = "."
|
|
173
175
|
|
|
174
176
|
[ui]
|
|
175
177
|
verbose = true
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "langstage-cli"
|
|
7
|
-
version = "0.5.
|
|
7
|
+
version = "0.5.5"
|
|
8
8
|
description = "The terminal stage for your LangGraph agent — Claude Code-style CLI for any CompiledGraph"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Regression: the headline `langstage-cli --demo` must not crash on a non-UTF-8
|
|
2
|
+
console (Windows cp1252).
|
|
3
|
+
|
|
4
|
+
The spinner (Braille frames) and status glyphs (✓ ⏺) raised UnicodeEncodeError on
|
|
5
|
+
a default Windows console, so the documented one-liner crashed before output.
|
|
6
|
+
`main()` now reconfigures stdio to UTF-8 (errors="replace"). We force `cp1252`
|
|
7
|
+
via PYTHONIOENCODING so this reproduces on any platform — without the fix this
|
|
8
|
+
test exits non-zero with a UnicodeEncodeError traceback.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import os
|
|
12
|
+
import subprocess
|
|
13
|
+
import sys
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def test_demo_runs_on_cp1252_console():
|
|
17
|
+
env = dict(os.environ)
|
|
18
|
+
env["PYTHONIOENCODING"] = "cp1252"
|
|
19
|
+
env.pop("PYTHONUTF8", None)
|
|
20
|
+
proc = subprocess.run(
|
|
21
|
+
[sys.executable, "-c", "from langstage_cli.cli import main; main()", "--demo", "hello"],
|
|
22
|
+
capture_output=True,
|
|
23
|
+
text=True,
|
|
24
|
+
encoding="utf-8",
|
|
25
|
+
errors="replace",
|
|
26
|
+
env=env,
|
|
27
|
+
)
|
|
28
|
+
assert proc.returncode == 0, f"stdout={proc.stdout!r}\nstderr={proc.stderr!r}"
|
|
29
|
+
assert "UnicodeEncodeError" not in proc.stderr, proc.stderr
|
|
30
|
+
# The demo stub echoes the input back.
|
|
31
|
+
assert "demo agent" in proc.stdout.lower() or "hello" in proc.stdout.lower(), proc.stdout
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|