lithe-cli 0.3.1__tar.gz → 0.3.2__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 (50) hide show
  1. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/PKG-INFO +1 -1
  2. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/__init__.py +1 -1
  3. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/commands.py +1 -1
  4. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/main.py +3 -3
  5. lithe_cli-0.3.2/lithe_cli/ttui/__init__.py +44 -0
  6. lithe_cli-0.3.1/lithe_cli/ttui.py → lithe_cli-0.3.2/lithe_cli/ttui/app.py +32 -596
  7. lithe_cli-0.3.2/lithe_cli/ttui/copy.py +102 -0
  8. lithe_cli-0.3.2/lithe_cli/ttui/pickers.py +466 -0
  9. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/ttui_render.py +2 -2
  10. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/ttui_widgets.py +45 -0
  11. lithe_cli-0.3.2/lithe_cli/workbench/__init__.py +33 -0
  12. lithe_cli-0.3.2/lithe_cli/workbench/core.py +212 -0
  13. lithe_cli-0.3.2/lithe_cli/workbench/dispatch.py +212 -0
  14. lithe_cli-0.3.2/lithe_cli/workbench/endpoints.py +406 -0
  15. lithe_cli-0.3.2/lithe_cli/workbench/settings.py +150 -0
  16. lithe_cli-0.3.2/lithe_cli/workbench/turns.py +168 -0
  17. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/PKG-INFO +1 -1
  18. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/SOURCES.txt +12 -4
  19. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli.py +24 -16
  20. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_budget_steer.py +1 -1
  21. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_subagents.py +3 -3
  22. lithe_cli-0.3.1/tests/test_tui_v2.py → lithe_cli-0.3.2/tests/test_present.py +2 -2
  23. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_ttui.py +43 -3
  24. lithe_cli-0.3.1/lithe_cli/workbench.py +0 -1118
  25. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/LICENSE +0 -0
  26. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/README.md +0 -0
  27. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/__main__.py +0 -0
  28. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/agent.py +0 -0
  29. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/cli_parser.py +0 -0
  30. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/clipboard.py +0 -0
  31. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/config.py +0 -0
  32. /lithe_cli-0.3.1/lithe_cli/tui.py → /lithe_cli-0.3.2/lithe_cli/present.py +0 -0
  33. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/profiles.py +0 -0
  34. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/prompts.py +0 -0
  35. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/py.typed +0 -0
  36. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/sessions.py +0 -0
  37. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/setup.py +0 -0
  38. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli/ui.py +0 -0
  39. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/dependency_links.txt +0 -0
  40. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/entry_points.txt +0 -0
  41. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/requires.txt +0 -0
  42. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/lithe_cli.egg-info/top_level.txt +0 -0
  43. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/pyproject.toml +0 -0
  44. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/setup.cfg +0 -0
  45. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_clipboard.py +0 -0
  46. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_guard.py +0 -0
  47. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_cli_sessions.py +0 -0
  48. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_profiles.py +0 -0
  49. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_setup.py +0 -0
  50. {lithe_cli-0.3.1 → lithe_cli-0.3.2}/tests/test_workbench.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lithe-cli
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Command-line interface for the lithe agent kernel: chat, one-shot runs, undo, and run inspection.
5
5
  License: MIT License
6
6
 
@@ -1,3 +1,3 @@
1
1
  """lithe-cli: the command-line interface for the lithe agent kernel."""
2
2
 
3
- __version__ = "0.3.1"
3
+ __version__ = "0.3.2"
@@ -15,7 +15,7 @@ from collections.abc import Callable
15
15
 
16
16
  # The /copy scope vocabulary lives with the feed it extracts from, so the
17
17
  # completion hint, the help line and the parser can never drift apart.
18
- from .tui import COPY_SCOPE_HELP
18
+ from .present import COPY_SCOPE_HELP
19
19
 
20
20
  # name → (args hint, one-line description); order is the help order.
21
21
  COMMANDS: dict[str, tuple[str, str]] = {
@@ -38,7 +38,7 @@ from .cli_parser import build_parser
38
38
  from .agent import build_registry, execute, render_event, sandbox_backend, undo
39
39
  from .config import config_file, load_config, require_endpoint
40
40
  from .prompts import open_history
41
- from .tui import screen_supported
41
+ from .present import screen_supported
42
42
  from .ui import BOLD, CYAN, GREEN, RED, YELLOW, configure, truncate, ui
43
43
 
44
44
 
@@ -122,7 +122,7 @@ def _cmd_sessions(cfg: Any, args: Any) -> int:
122
122
  if args.export:
123
123
  # Plain text on stdout, so a copy-and-paste workflow works outside
124
124
  # the full-screen UI too: `lithe sessions --export 12 | pbcopy`.
125
- from .tui import feed_text, transcript_feed_lines
125
+ from .present import feed_text, transcript_feed_lines
126
126
 
127
127
  row, err = mgr.resolve_exact(args.export)
128
128
  if row is None:
@@ -431,7 +431,7 @@ def _copy_plain(wb: Any, scope: str) -> None:
431
431
  text through the same layered :mod:`lithe_cli.clipboard` channels.
432
432
  """
433
433
  from .clipboard import deliver_clipboard
434
- from .tui import COPY_SCOPE_LABELS, describe_copy, feed_text, \
434
+ from .present import COPY_SCOPE_LABELS, describe_copy, feed_text, \
435
435
  transcript_feed_lines
436
436
 
437
437
  label = COPY_SCOPE_LABELS.get(scope, scope)
@@ -0,0 +1,44 @@
1
+ """The full-screen front-end (Textual).
2
+
3
+ The only interactive UI: `lithe chat` / `lithe run` on an interactive
4
+ terminal always launch it; without a TTY `main` falls back to the plain
5
+ per-line REPL. Layout, modals, scrolling and repaint are Textual's.
6
+
7
+ What it builds on from :mod:`lithe_cli.present`: ``TuiState`` (kernel-event
8
+ folding, usage accounting), ``transcript_feed_lines`` (store → feed
9
+ rows). The conversation pane renders *from* the state's feed.
10
+
11
+ Input niceties: ``/``-commands complete inline (suggestions above the
12
+ prompt, Tab accepts the first), and ↑/↓ recall the persistent chat history
13
+ (shared with the plain REPL through prompt_toolkit's FileHistory store).
14
+
15
+ Copying: mouse reporting means the terminal's own drag-select and menu
16
+ never reach it, so the app brings its own — right-click opens a copy menu,
17
+ ``/copy`` takes the whole conversation (or the last answer, the user's
18
+ lines, the tool output), and ``Ctrl+C`` copies a Textual text selection
19
+ when there is one before it falls back to cancel/exit. Delivery is
20
+ layered (platform tool → OSC 52 → file) in :mod:`lithe_cli.clipboard`;
21
+ Shift+drag still works in terminals that keep native selection.
22
+ """
23
+ from __future__ import annotations
24
+
25
+ from .. import ttui_widgets as _widgets
26
+ from ..ttui_widgets import ( # noqa: F401 - re-exported surface
27
+ ConfirmModal, PickerModal, SubagentCard, selected_text,
28
+ )
29
+ from ..ttui_render import ( # noqa: F401 - legacy re-export kept
30
+ sidebar_markup as sidebar_markup,
31
+ )
32
+ from ..ui import fmt_duration as fmt_duration # noqa: F401 - legacy re-export
33
+ from .app import LitheApp, run_textual_screen
34
+
35
+ __all__ = ["LitheApp", "run_textual_screen"]
36
+
37
+
38
+ def __getattr__(name: str):
39
+ """Forward extracted widget names for existing `lithe_cli.ttui` users."""
40
+ try:
41
+ return getattr(_widgets, name)
42
+ except AttributeError:
43
+ raise AttributeError(
44
+ f"module {__name__!r} has no attribute {name!r}") from None