langstage-cli 0.6.26__tar.gz → 0.6.28__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 (48) hide show
  1. {langstage_cli-0.6.26/langstage_cli.egg-info → langstage_cli-0.6.28}/PKG-INFO +52 -1
  2. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/README.md +50 -0
  3. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/langstage_cli/cli.py +573 -76
  4. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/langstage_cli/config.py +63 -2
  5. langstage_cli-0.6.28/langstage_cli/sessions.py +174 -0
  6. {langstage_cli-0.6.26 → langstage_cli-0.6.28/langstage_cli.egg-info}/PKG-INFO +52 -1
  7. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/langstage_cli.egg-info/SOURCES.txt +6 -0
  8. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/langstage_cli.egg-info/requires.txt +1 -0
  9. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/pyproject.toml +6 -1
  10. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_async_mode.py +3 -1
  11. langstage_cli-0.6.28/tests/test_history_persist.py +72 -0
  12. langstage_cli-0.6.28/tests/test_hitl_resume_warning.py +108 -0
  13. langstage_cli-0.6.28/tests/test_init.py +43 -0
  14. langstage_cli-0.6.28/tests/test_load_error.py +38 -0
  15. langstage_cli-0.6.28/tests/test_sessions.py +166 -0
  16. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_show_config.py +76 -0
  17. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_stream_mode.py +3 -1
  18. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/LICENSE +0 -0
  19. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/deepagent_code/__init__.py +0 -0
  20. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/langstage_cli/__init__.py +0 -0
  21. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/langstage_cli/agui_stream.py +0 -0
  22. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/langstage_cli.egg-info/dependency_links.txt +0 -0
  23. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/langstage_cli.egg-info/entry_points.txt +0 -0
  24. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/langstage_cli.egg-info/top_level.txt +0 -0
  25. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/setup.cfg +0 -0
  26. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_agui_stream.py +0 -0
  27. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_checkpointer.py +0 -0
  28. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_cli.py +0 -0
  29. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_cli_help.py +0 -0
  30. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_codeconfig.py +0 -0
  31. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_config.py +0 -0
  32. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_config_command.py +0 -0
  33. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_configurable.py +0 -0
  34. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_generic_interrupt.py +0 -0
  35. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_help_render.py +0 -0
  36. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_interrupt_non_tty.py +0 -0
  37. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_no_interactive_approve.py +0 -0
  38. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_quiet_output.py +0 -0
  39. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_rename_shim.py +0 -0
  40. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_spec_resolution.py +0 -0
  41. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_spinner_reply_survives.py +0 -0
  42. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_streaming_marker.py +0 -0
  43. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_terminal_width.py +0 -0
  44. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_turn_exit_and_render.py +0 -0
  45. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_unicode_console.py +0 -0
  46. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_verbose_command.py +0 -0
  47. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_verify_flag.py +0 -0
  48. {langstage_cli-0.6.26 → langstage_cli-0.6.28}/tests/test_workspace.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langstage-cli
3
- Version: 0.6.26
3
+ Version: 0.6.28
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
@@ -22,6 +22,7 @@ Requires-Dist: langgraph>=0.2.0
22
22
  Requires-Dist: langstage-core[agui]>=1.0.28
23
23
  Requires-Dist: click>=8.0.0
24
24
  Requires-Dist: python-dotenv
25
+ Requires-Dist: langgraph-checkpoint-sqlite>=2.0.0
25
26
  Provides-Extra: dev
26
27
  Requires-Dist: pytest>=7.0.0; extra == "dev"
27
28
  Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
@@ -101,6 +102,9 @@ This launches an interactive conversation loop with your agent.
101
102
  # Keyless demo agent — no API key, no agent of your own
102
103
  langstage-cli --demo "Hello"
103
104
 
105
+ # Scaffold a runnable starter agent + langstage.toml (then just run it)
106
+ langstage-cli init
107
+
104
108
  # Send a message directly to your agent
105
109
  langstage-cli -a my_agent.py:graph "Hello, agent!"
106
110
 
@@ -125,8 +129,47 @@ langstage-cli --demo
125
129
  # Print the resolved configuration: each value, its source, and the
126
130
  # env var / langstage.toml key that sets it
127
131
  langstage-cli --show-config
132
+
133
+ # Resume a previous conversation across separate invocations
134
+ langstage-cli "remember: my name is Kedar" # a fresh, PERSISTED session
135
+ langstage-cli -c "what's my name?" # continue the most recent session
136
+ langstage-cli --list-sessions # list resumable sessions
137
+ langstage-cli --resume <id> # resume a specific one
138
+ ```
139
+
140
+ ## Getting started with your own agent
141
+
142
+ ```bash
143
+ langstage-cli --demo "hi" # see the CLI work, keyless
144
+ langstage-cli init # scaffold my_agent.py + langstage.toml (your own graph)
145
+ langstage-cli "hi" # runs MY agent — no -a, no hand-editing
128
146
  ```
129
147
 
148
+ `init` writes a minimal, immediately-runnable starter agent (the stdlib `StateGraph`
149
+ example below — needs only `langgraph`, a base dependency) plus a `langstage.toml`
150
+ pointing at it, so the next `langstage-cli "..."` runs *your* graph. It refuses to
151
+ overwrite an existing `my_agent.py` / `langstage.toml` unless you pass `--force`.
152
+
153
+ ## Resuming a session
154
+
155
+ Every invocation persists its conversation to a durable, per-workspace store so a later
156
+ run can pick it up — the terminal-agent continuity of Claude Code / Codex / Aider,
157
+ without you baking a checkpointer into your own graph:
158
+
159
+ - `--continue` / `-c` — resume the **most recent** session for this workspace and keep
160
+ going. If there's no prior session, it just starts a fresh one.
161
+ - `--resume <id>` — resume a **specific** session (ids come from `--list-sessions`; a
162
+ bare `--resume` also lists them). A short prefix works if it's unambiguous.
163
+ - A plain run with no flag starts a **new** session that is still persisted, so it can be
164
+ continued later.
165
+
166
+ State lives in `~/.langstage/sessions/<workspace-hash>.sqlite` (honoring
167
+ `LANGSTAGE_CONFIG_HOME`; override the whole location with `LANGSTAGE_CLI_SESSIONS_DIR`).
168
+ Persistence is on by default — disable it with `--no-persist`, `LANGSTAGE_PERSIST=0`, or
169
+ `[session] persist = false` in `langstage.toml`. A graph that compiles in its **own**
170
+ checkpointer keeps it (yours always wins); the CLI only supplies a durable one when your
171
+ graph has none. A pinned `[configurable] thread_id` now genuinely persists across runs.
172
+
130
173
  ## Commands
131
174
 
132
175
  In the interactive loop:
@@ -202,7 +245,15 @@ Options:
202
245
  --show-config Print the resolved configuration and exit
203
246
  -q, --quiet Scriptable single-shot output: only the reply
204
247
  --verify Preflight the agent (one real turn); exit 0/1
248
+ -c, --continue Resume the most recent session for this workspace
249
+ --resume [ID] Resume a specific session (bare: list them)
250
+ --list-sessions List resumable sessions for this workspace
251
+ --persist/--no-persist Persist this session so it can be continued (default: on)
252
+ --force For `init`: overwrite existing files
205
253
  --version Show the version and exit
254
+
255
+ Subcommand:
256
+ init Scaffold my_agent.py + langstage.toml in the current dir
206
257
  ```
207
258
 
208
259
  ### Verifying an agent (CI gate)
@@ -64,6 +64,9 @@ This launches an interactive conversation loop with your agent.
64
64
  # Keyless demo agent — no API key, no agent of your own
65
65
  langstage-cli --demo "Hello"
66
66
 
67
+ # Scaffold a runnable starter agent + langstage.toml (then just run it)
68
+ langstage-cli init
69
+
67
70
  # Send a message directly to your agent
68
71
  langstage-cli -a my_agent.py:graph "Hello, agent!"
69
72
 
@@ -88,8 +91,47 @@ langstage-cli --demo
88
91
  # Print the resolved configuration: each value, its source, and the
89
92
  # env var / langstage.toml key that sets it
90
93
  langstage-cli --show-config
94
+
95
+ # Resume a previous conversation across separate invocations
96
+ langstage-cli "remember: my name is Kedar" # a fresh, PERSISTED session
97
+ langstage-cli -c "what's my name?" # continue the most recent session
98
+ langstage-cli --list-sessions # list resumable sessions
99
+ langstage-cli --resume <id> # resume a specific one
100
+ ```
101
+
102
+ ## Getting started with your own agent
103
+
104
+ ```bash
105
+ langstage-cli --demo "hi" # see the CLI work, keyless
106
+ langstage-cli init # scaffold my_agent.py + langstage.toml (your own graph)
107
+ langstage-cli "hi" # runs MY agent — no -a, no hand-editing
91
108
  ```
92
109
 
110
+ `init` writes a minimal, immediately-runnable starter agent (the stdlib `StateGraph`
111
+ example below — needs only `langgraph`, a base dependency) plus a `langstage.toml`
112
+ pointing at it, so the next `langstage-cli "..."` runs *your* graph. It refuses to
113
+ overwrite an existing `my_agent.py` / `langstage.toml` unless you pass `--force`.
114
+
115
+ ## Resuming a session
116
+
117
+ Every invocation persists its conversation to a durable, per-workspace store so a later
118
+ run can pick it up — the terminal-agent continuity of Claude Code / Codex / Aider,
119
+ without you baking a checkpointer into your own graph:
120
+
121
+ - `--continue` / `-c` — resume the **most recent** session for this workspace and keep
122
+ going. If there's no prior session, it just starts a fresh one.
123
+ - `--resume <id>` — resume a **specific** session (ids come from `--list-sessions`; a
124
+ bare `--resume` also lists them). A short prefix works if it's unambiguous.
125
+ - A plain run with no flag starts a **new** session that is still persisted, so it can be
126
+ continued later.
127
+
128
+ State lives in `~/.langstage/sessions/<workspace-hash>.sqlite` (honoring
129
+ `LANGSTAGE_CONFIG_HOME`; override the whole location with `LANGSTAGE_CLI_SESSIONS_DIR`).
130
+ Persistence is on by default — disable it with `--no-persist`, `LANGSTAGE_PERSIST=0`, or
131
+ `[session] persist = false` in `langstage.toml`. A graph that compiles in its **own**
132
+ checkpointer keeps it (yours always wins); the CLI only supplies a durable one when your
133
+ graph has none. A pinned `[configurable] thread_id` now genuinely persists across runs.
134
+
93
135
  ## Commands
94
136
 
95
137
  In the interactive loop:
@@ -165,7 +207,15 @@ Options:
165
207
  --show-config Print the resolved configuration and exit
166
208
  -q, --quiet Scriptable single-shot output: only the reply
167
209
  --verify Preflight the agent (one real turn); exit 0/1
210
+ -c, --continue Resume the most recent session for this workspace
211
+ --resume [ID] Resume a specific session (bare: list them)
212
+ --list-sessions List resumable sessions for this workspace
213
+ --persist/--no-persist Persist this session so it can be continued (default: on)
214
+ --force For `init`: overwrite existing files
168
215
  --version Show the version and exit
216
+
217
+ Subcommand:
218
+ init Scaffold my_agent.py + langstage.toml in the current dir
169
219
  ```
170
220
 
171
221
  ### Verifying an agent (CI gate)