langstage-cli 0.5.2__tar.gz → 0.5.4__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.2/langstage_cli.egg-info → langstage_cli-0.5.4}/PKG-INFO +1 -1
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/langstage_cli/__init__.py +8 -1
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/langstage_cli/cli.py +12 -10
- {langstage_cli-0.5.2 → langstage_cli-0.5.4/langstage_cli.egg-info}/PKG-INFO +1 -1
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/langstage_cli.egg-info/SOURCES.txt +1 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/pyproject.toml +1 -1
- langstage_cli-0.5.4/tests/test_cli_help.py +27 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/tests/test_rename_shim.py +4 -1
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/LICENSE +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/README.md +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/deepagent_code/__init__.py +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/langstage_cli/config.py +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/langstage_cli.egg-info/dependency_links.txt +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/langstage_cli.egg-info/entry_points.txt +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/langstage_cli.egg-info/requires.txt +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/langstage_cli.egg-info/top_level.txt +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/setup.cfg +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/tests/test_cli.py +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/tests/test_codeconfig.py +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/tests/test_config.py +0 -0
- {langstage_cli-0.5.2 → langstage_cli-0.5.4}/tests/test_show_config.py +0 -0
|
@@ -8,6 +8,8 @@ tool-call serialization, content extraction) are available from
|
|
|
8
8
|
``langgraph_stream_parser.extractors`` if needed directly.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
12
|
+
|
|
11
13
|
from langgraph_stream_parser import (
|
|
12
14
|
prepare_agent_input,
|
|
13
15
|
stream_graph_updates,
|
|
@@ -16,7 +18,12 @@ from langgraph_stream_parser import (
|
|
|
16
18
|
aresume_graph_from_interrupt,
|
|
17
19
|
)
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
# Single source of truth is the installed distribution metadata, so this can
|
|
22
|
+
# never drift from pyproject's version (it was stuck at a stale "0.4.0").
|
|
23
|
+
try:
|
|
24
|
+
__version__ = version("langstage-cli")
|
|
25
|
+
except PackageNotFoundError: # pragma: no cover - editable/source checkout
|
|
26
|
+
__version__ = "0.0.0+local"
|
|
20
27
|
|
|
21
28
|
__all__ = [
|
|
22
29
|
"prepare_agent_input",
|
|
@@ -998,7 +998,7 @@ def cmd_config(args: str, context: Dict[str, Any]) -> Optional[str]:
|
|
|
998
998
|
context["verbose"] = value.lower() in ("true", "1", "on", "yes")
|
|
999
999
|
print(f"{GREEN}✓ Set verbose = {context['verbose']}{RESET}")
|
|
1000
1000
|
else:
|
|
1001
|
-
print(f"{YELLOW}Cannot modify {key} at runtime (edit
|
|
1001
|
+
print(f"{YELLOW}Cannot modify {key} at runtime (edit langstage.toml){RESET}")
|
|
1002
1002
|
return None
|
|
1003
1003
|
|
|
1004
1004
|
|
|
@@ -1302,6 +1302,7 @@ def run_conversation_loop(
|
|
|
1302
1302
|
|
|
1303
1303
|
|
|
1304
1304
|
@click.command()
|
|
1305
|
+
@click.version_option(__version__, "--version", prog_name="langstage-cli")
|
|
1305
1306
|
@click.argument("message", required=False)
|
|
1306
1307
|
@click.option(
|
|
1307
1308
|
"--agent",
|
|
@@ -1354,7 +1355,7 @@ def run_conversation_loop(
|
|
|
1354
1355
|
"show_config",
|
|
1355
1356
|
is_flag=True,
|
|
1356
1357
|
default=False,
|
|
1357
|
-
help="Print the resolved configuration (defaults <
|
|
1358
|
+
help="Print the resolved configuration (defaults < langstage.toml < env < CLI) and exit",
|
|
1358
1359
|
)
|
|
1359
1360
|
def main(
|
|
1360
1361
|
message: Optional[str],
|
|
@@ -1380,17 +1381,18 @@ def main(
|
|
|
1380
1381
|
- package.module (Python module path)
|
|
1381
1382
|
- package.module:agent (module with graph variable name)
|
|
1382
1383
|
|
|
1383
|
-
Supports environment variables for configuration
|
|
1384
|
+
Supports environment variables for configuration (legacy DEEPAGENT_*
|
|
1385
|
+
names still work as deprecated aliases):
|
|
1384
1386
|
|
|
1385
1387
|
\b
|
|
1386
|
-
-
|
|
1387
|
-
|
|
1388
|
-
-
|
|
1389
|
-
- DEEPAGENT_STREAM_MODE: Stream mode for LangGraph (updates or values)
|
|
1388
|
+
- LANGSTAGE_AGENT_SPEC: Agent location (same formats as above).
|
|
1389
|
+
- LANGSTAGE_WORKSPACE_ROOT: Working directory for the agent
|
|
1390
|
+
- LANGSTAGE_STREAM_MODE: Stream mode for LangGraph (updates or values)
|
|
1390
1391
|
|
|
1391
|
-
Reads ~/.
|
|
1392
|
+
Reads ~/.langstage/config.toml (global) and langstage.toml (project,
|
|
1392
1393
|
walks up from cwd). Precedence: CLI args > env vars > project TOML >
|
|
1393
|
-
global TOML > built-in defaults.
|
|
1394
|
+
global TOML > built-in defaults. (The legacy ~/.deepagents/config.toml and
|
|
1395
|
+
deepagents.toml are still read as deprecated fallbacks.)
|
|
1394
1396
|
|
|
1395
1397
|
\b
|
|
1396
1398
|
Examples:
|
|
@@ -1482,7 +1484,7 @@ def main(
|
|
|
1482
1484
|
print(f"\n{DIM}Usage:{RESET}")
|
|
1483
1485
|
print(" langstage-cli path/to/agent.py:graph")
|
|
1484
1486
|
print(" langstage-cli mypackage.module:agent")
|
|
1485
|
-
print(f"\n{DIM}Or set
|
|
1487
|
+
print(f"\n{DIM}Or set the LANGSTAGE_AGENT_SPEC environment variable{RESET}")
|
|
1486
1488
|
sys.exit(1)
|
|
1487
1489
|
|
|
1488
1490
|
# Change to workspace root if specified
|
|
@@ -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.4"
|
|
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,27 @@
|
|
|
1
|
+
"""Regression tests for #22: user-facing strings use the canonical LANGSTAGE_*
|
|
2
|
+
names, and a `--version` flag exists.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from click.testing import CliRunner
|
|
6
|
+
|
|
7
|
+
from langstage_cli.cli import main
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_version_flag_exists():
|
|
11
|
+
r = CliRunner().invoke(main, ["--version"])
|
|
12
|
+
assert r.exit_code == 0, r.output
|
|
13
|
+
assert "langstage-cli" in r.output
|
|
14
|
+
assert "0.0.0" not in r.output # reports the real version, not the fallback
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def test_help_leads_with_canonical_names():
|
|
18
|
+
r = CliRunner().invoke(main, ["--help"])
|
|
19
|
+
assert r.exit_code == 0, r.output
|
|
20
|
+
out = r.output
|
|
21
|
+
# canonical LANGSTAGE_* / langstage.toml are present...
|
|
22
|
+
assert "LANGSTAGE_AGENT_SPEC" in out
|
|
23
|
+
assert "LANGSTAGE_WORKSPACE_ROOT" in out
|
|
24
|
+
assert "LANGSTAGE_STREAM_MODE" in out
|
|
25
|
+
assert "langstage.toml" in out
|
|
26
|
+
# ...and the legacy names are no longer presented as the only config vocab
|
|
27
|
+
assert "DEEPAGENT_AGENT_SPEC" not in out
|
|
@@ -27,6 +27,9 @@ def test_legacy_submodules_alias_the_new_ones():
|
|
|
27
27
|
|
|
28
28
|
def test_legacy_package_reexports_public_api():
|
|
29
29
|
import deepagent_code
|
|
30
|
+
import langstage_cli
|
|
30
31
|
|
|
31
32
|
assert callable(deepagent_code.prepare_agent_input)
|
|
32
|
-
|
|
33
|
+
# The shim mirrors the new package's version (now derived from metadata),
|
|
34
|
+
# so assert equality rather than a hard-coded literal that would drift.
|
|
35
|
+
assert deepagent_code.__version__ == langstage_cli.__version__
|
|
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
|