langstage-cli 0.5.7__tar.gz → 0.5.8__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.
Files changed (24) hide show
  1. {langstage_cli-0.5.7/langstage_cli.egg-info → langstage_cli-0.5.8}/PKG-INFO +1 -1
  2. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/langstage_cli/cli.py +4 -1
  3. {langstage_cli-0.5.7 → langstage_cli-0.5.8/langstage_cli.egg-info}/PKG-INFO +1 -1
  4. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/langstage_cli.egg-info/SOURCES.txt +1 -0
  5. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/pyproject.toml +1 -1
  6. langstage_cli-0.5.8/tests/test_help_render.py +35 -0
  7. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/LICENSE +0 -0
  8. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/README.md +0 -0
  9. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/deepagent_code/__init__.py +0 -0
  10. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/langstage_cli/__init__.py +0 -0
  11. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/langstage_cli/config.py +0 -0
  12. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/langstage_cli.egg-info/dependency_links.txt +0 -0
  13. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/langstage_cli.egg-info/entry_points.txt +0 -0
  14. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/langstage_cli.egg-info/requires.txt +0 -0
  15. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/langstage_cli.egg-info/top_level.txt +0 -0
  16. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/setup.cfg +0 -0
  17. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/tests/test_cli.py +0 -0
  18. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/tests/test_cli_help.py +0 -0
  19. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/tests/test_codeconfig.py +0 -0
  20. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/tests/test_config.py +0 -0
  21. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/tests/test_rename_shim.py +0 -0
  22. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/tests/test_show_config.py +0 -0
  23. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/tests/test_stream_mode.py +0 -0
  24. {langstage_cli-0.5.7 → langstage_cli-0.5.8}/tests/test_unicode_console.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langstage-cli
3
- Version: 0.5.7
3
+ Version: 0.5.8
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
@@ -847,7 +847,10 @@ def print_help():
847
847
  for cmd in sorted(commands, key=lambda c: c.name):
848
848
  aliases_str = ""
849
849
  if cmd.aliases:
850
- aliases_str = f", {CYAN}/{RESET}, {CYAN}/".join([""] + cmd.aliases)[4:]
850
+ # Each alias as its own cyan "/x" token. The old
851
+ # `…join([""] + aliases)[4:]` sliced into the leading ANSI escape,
852
+ # leaking a literal "36m" and bleeding color (gh #-dogfood).
853
+ aliases_str = "".join(f", {CYAN}/{alias}{RESET}" for alias in cmd.aliases)
851
854
  print(f" {CYAN}/{cmd.name}{RESET}{aliases_str}")
852
855
  print(f" {DIM}{cmd.description}{RESET}")
853
856
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langstage-cli
3
- Version: 0.5.7
3
+ Version: 0.5.8
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
@@ -15,6 +15,7 @@ tests/test_cli.py
15
15
  tests/test_cli_help.py
16
16
  tests/test_codeconfig.py
17
17
  tests/test_config.py
18
+ tests/test_help_render.py
18
19
  tests/test_rename_shim.py
19
20
  tests/test_show_config.py
20
21
  tests/test_stream_mode.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "langstage-cli"
7
- version = "0.5.7"
7
+ version = "0.5.8"
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,35 @@
1
+ """`/help` must not leak ANSI fragments (gh #-dogfood).
2
+
3
+ The Commands block built alias strings with `…join([""] + aliases)[4:]`, whose
4
+ slice cut into the leading `\x1b[36m` escape — leaking a literal "36m" and bleeding
5
+ color. Each alias is now its own cyan token.
6
+ """
7
+
8
+ import io
9
+ import re
10
+ from contextlib import redirect_stdout
11
+
12
+ from langstage_cli.cli import print_help
13
+
14
+ _ANSI = re.compile(r"\x1b\[[0-9;]*m")
15
+
16
+
17
+ def _rendered_help() -> str:
18
+ buf = io.StringIO()
19
+ with redirect_stdout(buf):
20
+ print_help()
21
+ return buf.getvalue()
22
+
23
+
24
+ def test_help_has_no_leaked_ansi_fragment():
25
+ plain = _ANSI.sub("", _rendered_help())
26
+ # No bare color-code residue once real escapes are stripped.
27
+ assert "36m" not in plain
28
+ assert "[0m" not in plain and "[36" not in plain
29
+
30
+
31
+ def test_help_renders_aliases_cleanly():
32
+ plain = _ANSI.sub("", _rendered_help())
33
+ # A multi-alias command renders as comma-separated /tokens.
34
+ assert "/quit" in plain
35
+ assert re.search(r"/quit(, /\w+)+", plain), plain
File without changes
File without changes
File without changes