soothe-cli 1.2.4__tar.gz → 1.2.6__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 (151) hide show
  1. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/PKG-INFO +1 -1
  2. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/_env_vars.py +16 -0
  3. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/commands/run_cmd.py +5 -1
  4. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/execution/daemon.py +5 -1
  5. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/config/cli_config.py +7 -0
  6. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/config/logging_setup.py +19 -4
  7. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/preview_limits.py +15 -3
  8. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/textual_adapter.py +83 -0
  9. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/cognition_step_activity.py +434 -167
  10. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/.gitignore +0 -0
  11. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/README.md +0 -0
  12. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/pyproject.toml +0 -0
  13. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/__init__.py +0 -0
  14. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/_cli_context.py +0 -0
  15. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/_version.py +0 -0
  16. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/card_wire.py +0 -0
  17. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/__init__.py +0 -0
  18. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/commands/__init__.py +0 -0
  19. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/commands/config_cmd.py +0 -0
  20. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/commands/cron_cmd.py +0 -0
  21. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/commands/loop_cmd.py +0 -0
  22. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/commands/status_cmd.py +0 -0
  23. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/execution/__init__.py +0 -0
  24. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/execution/daemon_errors.py +0 -0
  25. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/execution/headless.py +0 -0
  26. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/execution/headless_renderer.py +0 -0
  27. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/execution/launcher.py +0 -0
  28. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/main.py +0 -0
  29. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/cli/soothecli.py +0 -0
  30. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/commands/__init__.py +0 -0
  31. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/commands/binding.py +0 -0
  32. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/commands/command_registry.py +0 -0
  33. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/commands/command_router.py +0 -0
  34. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/commands/slash_commands.py +0 -0
  35. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/commands/subagent_routing.py +0 -0
  36. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/config/__init__.py +0 -0
  37. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/config/loader.py +0 -0
  38. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/__init__.py +0 -0
  39. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/card.py +0 -0
  40. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/card_binder.py +0 -0
  41. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/markdown_theme.py +0 -0
  42. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/media_utils.py +0 -0
  43. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/mermaid_render.py +0 -0
  44. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/path_utils.py +0 -0
  45. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/shell_color.py +0 -0
  46. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/spinner_labels.py +0 -0
  47. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/text_extract.py +0 -0
  48. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/theme.py +0 -0
  49. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/tips.py +0 -0
  50. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/tool_display.py +0 -0
  51. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/display/unicode_security.py +0 -0
  52. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/loops/__init__.py +0 -0
  53. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/loops/sessions.py +0 -0
  54. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/model_config.py +0 -0
  55. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/project_utils.py +0 -0
  56. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/__init__.py +0 -0
  57. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/headless/processor.py +0 -0
  58. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/headless/processor_state.py +0 -0
  59. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/parse/tool_call_resolution.py +0 -0
  60. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/policy/tui_trace_log.py +0 -0
  61. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/presentation/duration_format.py +0 -0
  62. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/presentation/engine.py +0 -0
  63. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/presentation/id_format.py +0 -0
  64. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/presentation/renderer_base.py +0 -0
  65. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/presentation/renderer_protocol.py +0 -0
  66. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/presentation/step_id_format.py +0 -0
  67. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/presentation/subagent_task_display.py +0 -0
  68. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/state/file_tracker.py +0 -0
  69. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/state/session_stats.py +0 -0
  70. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/state/step_router.py +0 -0
  71. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/state/stream_accumulator.py +0 -0
  72. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/token_events_debug.py +0 -0
  73. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/token_usage.py +0 -0
  74. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/transport/session.py +0 -0
  75. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/turn/prepare.py +0 -0
  76. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/wire/chunk_filter.py +0 -0
  77. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/wire/message_text.py +0 -0
  78. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/runtime/wire/messages.py +0 -0
  79. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/settings/__init__.py +0 -0
  80. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/settings/_console_impl.py +0 -0
  81. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/settings/bootstrap.py +0 -0
  82. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/settings/core.py +0 -0
  83. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/settings/glyphs.py +0 -0
  84. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/settings/provider.py +0 -0
  85. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/settings/shell_allow.py +0 -0
  86. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/settings/skills_dirs.py +0 -0
  87. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/settings/stream_config.py +0 -0
  88. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/__init__.py +0 -0
  89. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/__init__.py +0 -0
  90. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_app.py +0 -0
  91. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_clarification.py +0 -0
  92. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_entrypoints.py +0 -0
  93. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_execution.py +0 -0
  94. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_history.py +0 -0
  95. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_messages_mixin.py +0 -0
  96. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_model.py +0 -0
  97. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_model_params.py +0 -0
  98. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_startup.py +0 -0
  99. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_terminal.py +0 -0
  100. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_theme_prefs.py +0 -0
  101. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_types.py +0 -0
  102. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/_ui.py +0 -0
  103. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/app/app.tcss +0 -0
  104. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/composer_mode.py +0 -0
  105. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/file_change_notify.py +0 -0
  106. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/file_change_renderers.py +0 -0
  107. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/input.py +0 -0
  108. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/skills/__init__.py +0 -0
  109. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/skills/invocation.py +0 -0
  110. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/skills/load.py +0 -0
  111. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/__init__.py +0 -0
  112. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/_links.py +0 -0
  113. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/autocomplete.py +0 -0
  114. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/chat_input.py +0 -0
  115. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/clipboard.py +0 -0
  116. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/context_data.py +0 -0
  117. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/context_viewer.py +0 -0
  118. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/diff.py +0 -0
  119. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/editor.py +0 -0
  120. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/file_change_preview.py +0 -0
  121. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/help_screen.py +0 -0
  122. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/history.py +0 -0
  123. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/loading.py +0 -0
  124. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/loop_selector.py +0 -0
  125. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/mcp_viewer.py +0 -0
  126. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/message_store.py +0 -0
  127. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/__init__.py +0 -0
  128. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/_helpers.py +0 -0
  129. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/app.py +0 -0
  130. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/assistant.py +0 -0
  131. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/cognition_goal_tree.py +0 -0
  132. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/cognition_reason.py +0 -0
  133. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/cognition_step.py +0 -0
  134. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/diff_message.py +0 -0
  135. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/error.py +0 -0
  136. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/skill.py +0 -0
  137. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/structured_ask_user.py +0 -0
  138. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/messages/user.py +0 -0
  139. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/model_selector.py +0 -0
  140. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/notification_settings.py +0 -0
  141. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/pinned_goal_bar.py +0 -0
  142. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/plan_quick_view_overlay.py +0 -0
  143. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/queued_goals_bar.py +0 -0
  144. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/router_profile_selector.py +0 -0
  145. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/status.py +0 -0
  146. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/theme_selector.py +0 -0
  147. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/tui/widgets/welcome.py +0 -0
  148. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/update_check.py +0 -0
  149. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/ux/__init__.py +0 -0
  150. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/ux/subagent_progress.py +0 -0
  151. {soothe_cli-1.2.4 → soothe_cli-1.2.6}/src/soothe_cli/ux/subagent_wire_display.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: soothe-cli
3
- Version: 1.2.4
3
+ Version: 1.2.6
4
4
  Summary: Soothe CLI client - communicates with daemon via WebSocket
5
5
  Project-URL: Homepage, https://github.com/mirasoth/soothe
6
6
  Project-URL: Documentation, https://soothe.readthedocs.io
@@ -34,6 +34,15 @@ SHELL_ALLOW_LIST = "SOOTHE_CLI_SHELL_ALLOW_LIST"
34
34
  USER_ID = "SOOTHE_CLI_USER_ID"
35
35
  """Attach a user identifier to stream metadata (when set)."""
36
36
 
37
+ TUI_DEBUG = "SOOTHE_TUI_DEBUG"
38
+ """Emit structured TUI trace logs on logger `soothe.ux.tui.trace`.
39
+
40
+ Truthy values: '1', 'true', 'yes', 'on'. Mirrors `SootheConfig.tui_debug`
41
+ (see `docs/wiki/configuration-guide/environment-variables.md`); the env var
42
+ wins so tracing can be switched on for a single headless run without editing
43
+ config.
44
+ """
45
+
37
46
  TUI_REFRESH_INTERVAL_MS = "SOOTHE_CLI_TUI_REFRESH_INTERVAL_MS"
38
47
  """Minimum interval between TUI widget refreshes in milliseconds (default: 800).
39
48
 
@@ -48,6 +57,13 @@ OMIT_WORKSPACE = "SOOTHE_CLI_OMIT_WORKSPACE"
48
57
  """Optional: when ``1``/``true``/``yes``, omit ``workspace`` on ``loop_new`` (default: send cwd)."""
49
58
 
50
59
 
60
+ def env_flag_enabled(name: str) -> bool:
61
+ """Return True when `name` holds a truthy value ('1', 'true', 'yes', 'on')."""
62
+ import os
63
+
64
+ return os.environ.get(name, "").strip().lower() in ("1", "true", "yes", "on")
65
+
66
+
51
67
  def resolve_cli_loop_workspace() -> str | None:
52
68
  """Return the workspace path to send on `loop_new`, or `None` to omit it.
53
69
 
@@ -50,7 +50,11 @@ def run_impl(
50
50
  )
51
51
  log_level = resolve_cli_log_level(logging_level=cfg.logging_level)
52
52
  log_file = Path(SOOTHE_HOME) / "logs" / "cli.log"
53
- setup_logging(log_level, log_file=log_file)
53
+ setup_logging(
54
+ log_level,
55
+ log_file=log_file,
56
+ tui_debug=bool(getattr(cfg, "tui_debug", False)),
57
+ )
54
58
 
55
59
  # PostgreSQL availability check (requires daemon-side config)
56
60
  if hasattr(cfg, "protocols") and hasattr(cfg.protocols, "durability"):
@@ -15,7 +15,7 @@ from soothe_client import (
15
15
  from soothe_client.appkit import DaemonSession
16
16
  from soothe_client.appkit.events import is_loop_scoped_event, unwrap_next
17
17
 
18
- from soothe_cli._env_vars import resolve_cli_loop_workspace
18
+ from soothe_cli._env_vars import TUI_DEBUG, env_flag_enabled, resolve_cli_loop_workspace
19
19
  from soothe_cli.cli.execution.daemon_errors import (
20
20
  friendly_daemon_execution_error,
21
21
  is_daemon_worker_subprocess_lost,
@@ -220,9 +220,13 @@ async def _run_headless_session_once(
220
220
 
221
221
  presentation = PresentationEngine()
222
222
  renderer = HeadlessCliRenderer()
223
+ # `SOOTHE_TUI_DEBUG` wins so tracing can be enabled for one run without
224
+ # touching config; the CLI flag feeds `cfg.tui_debug` when set.
225
+ tui_debug = bool(getattr(cfg, "tui_debug", False)) or env_flag_enabled(TUI_DEBUG)
223
226
  processor = EventProcessor(
224
227
  renderer,
225
228
  presentation_engine=presentation,
229
+ tui_debug=tui_debug,
226
230
  headless_output=True,
227
231
  streaming_mode="batch" if stream_delivery == "batch" else "streaming",
228
232
  )
@@ -32,6 +32,13 @@ class CLIConfig:
32
32
  markdown_theme: str = "match-app"
33
33
  """Markdown appearance preset (``match-app``, ``langchain``, ``standard``, …)."""
34
34
 
35
+ tui_debug: bool = False
36
+ """Emit structured TUI trace logs (logger `soothe.ux.tui.trace`).
37
+
38
+ `SOOTHE_TUI_DEBUG` env var overrides this (see
39
+ :func:`soothe_cli._env_vars.env_flag_enabled`).
40
+ """
41
+
35
42
  # Plan panel visibility preference
36
43
  plan_panel_default_visible: bool = False
37
44
  """When True, auto-show the in-flow plan panel while a goal is executing and
@@ -20,17 +20,32 @@ _QUIET_ALWAYS = (
20
20
  )
21
21
 
22
22
 
23
- def setup_logging(level: str, *, log_file: Path | None = None) -> None:
23
+ def setup_logging(
24
+ level: str,
25
+ *,
26
+ log_file: Path | None = None,
27
+ tui_debug: bool = False,
28
+ ) -> None:
24
29
  """Configure CLI logging (SDK file handler; stderr stays WARNING).
25
30
 
26
31
  At `INFO`, routing and optional TUI trace loggers are capped at `WARNING`
27
32
  so `cli.log` stays readable. The `websockets` library is always capped at
28
33
  `WARNING` so frame-level wire logs never appear even when
29
34
  `SOOTHE_LOG_LEVEL=DEBUG`. Set `SOOTHE_LOG_LEVEL=DEBUG` for full app traces.
35
+
36
+ `tui_debug` (or `SOOTHE_TUI_DEBUG`) un-quiets `soothe.ux.tui.trace` so the
37
+ structured TUI trace reaches `cli.log` at the default `INFO` level —
38
+ otherwise enabling the trace emits records that the cap immediately drops.
30
39
  """
40
+ from soothe_cli._env_vars import TUI_DEBUG, env_flag_enabled
41
+
31
42
  _setup_sdk_logging(level, log_file=log_file)
32
43
  for name in _QUIET_ALWAYS:
33
44
  logging.getLogger(name).setLevel(logging.WARNING)
34
- if level.upper() == "INFO":
35
- for name in _QUIET_AT_INFO:
36
- logging.getLogger(name).setLevel(logging.WARNING)
45
+ if level.upper() != "INFO":
46
+ return
47
+ trace_enabled = tui_debug or env_flag_enabled(TUI_DEBUG)
48
+ for name in _QUIET_AT_INFO:
49
+ if trace_enabled and name == "soothe.ux.tui.trace":
50
+ continue
51
+ logging.getLogger(name).setLevel(logging.WARNING)
@@ -14,15 +14,27 @@ STEP_CARD_TOOL_ACTIVITY_PREVIEW_COUNT: Final[int] = 5
14
14
  # are file-write tool rows for the step.
15
15
  STEP_CARD_FILE_EDIT_PREVIEW_COUNT: Final[int] = 5
16
16
 
17
- # Reasoning branch on step cards: max lines of captured thinking-token content
18
- # shown in the Reasoning section. Long reasoning is truncated to this many
19
- # lines with a "+N more lines" suffix.
17
+ # Reasoning branch on step cards: max lines shown in the Reasoning section.
18
+ # Reasoning accumulates while a step runs, so the section renders the *latest*
19
+ # this many lines and drops older ones (no "+N more lines" footer).
20
20
  STEP_CARD_REASONING_PREVIEW_LINES: Final[int] = 8
21
21
 
22
22
  # Reasoning branch: max characters per line before truncation (width-aware
23
23
  # truncation also applies at render time via max_cols).
24
24
  STEP_CARD_REASONING_LINE_MAX_CHARS: Final[int] = 120
25
25
 
26
+ # --- Step card activity panes (embedded windows, not a nested tree) ---
27
+ # Panes always stack vertically in one column (tools → todo → files →
28
+ # thinking) at every terminal width: a single column keeps the reading order
29
+ # stable and avoids re-flowing the card when the terminal is resized.
30
+
31
+ # Leading rule characters before a pane label (`──── tools ──── 22 · ⚠1`).
32
+ STEP_CARD_PANE_LEAD_RULE_CHARS: Final[int] = 4
33
+
34
+ # Todo rows kept inside the todo pane; overflow is summarized by an inline
35
+ # `· +N more` footnote row inside the pane.
36
+ STEP_CARD_PANE_ROWS_TODO: Final[int] = 4
37
+
26
38
  # TUI file-change preview cards (the standalone write/edit/delete diff cards
27
39
  # mounted in the chat transcript, NOT the step-card File-edit branch).
28
40
  # When False (default), the standalone file-change cards are suppressed so
@@ -993,6 +993,66 @@ def _register_execute_namespace_binding(
993
993
  adapter._step_by_namespace[ns_key] = step_w
994
994
 
995
995
 
996
+ _STEP_REASONING_EXCLUDED_PHASES: frozenset[str] = frozenset({"execute_step", "execute_wave"})
997
+ """Loop phases whose assistant text already has a dedicated display path."""
998
+
999
+
1000
+ def _is_step_reasoning_candidate(
1001
+ *,
1002
+ is_step_scope: bool,
1003
+ text: str,
1004
+ reasoning_text: str,
1005
+ message: Any,
1006
+ phase_loop: Any,
1007
+ ) -> bool:
1008
+ """True when assistant text belongs on the step card's Reasoning branch.
1009
+
1010
+ Covers the CoreAgent (deepagents) reply emitted after a tool call: it
1011
+ arrives without a loop ``phase``, so it matches no user-visible output
1012
+ phase and would otherwise be dropped. Excludes text already owned by
1013
+ another path — loop-tagged user output (``goal_completion``, ``chitchat``,
1014
+ intent hints, …) and captured thinking tokens (``reasoning_text``).
1015
+ """
1016
+ return (
1017
+ is_step_scope
1018
+ and bool(text.strip())
1019
+ and not reasoning_text
1020
+ and assistant_output_phase(message) is None
1021
+ and phase_loop not in _STEP_REASONING_EXCLUDED_PHASES
1022
+ )
1023
+
1024
+
1025
+ def _resolve_step_card_for_scoped_text(
1026
+ adapter: TextualUIAdapter,
1027
+ router: StepTaskRouter,
1028
+ ns_key: tuple[str, ...],
1029
+ message: Any = None,
1030
+ ) -> Any | None:
1031
+ """Resolve the step card that owns untagged assistant text (step reasoning).
1032
+
1033
+ Step-scoped assistant text — the CoreAgent (deepagents) reply emitted after
1034
+ a tool call — arrives without a loop ``phase``, so it cannot be attributed
1035
+ through the phase-based paths. Resolution mirrors token accounting: bound
1036
+ namespace first, then step id inferred from ``tool_calls``, then the single
1037
+ active step. When the fallback resolves a card the namespace is bound so
1038
+ later chunks of the same message hit the direct lookup.
1039
+
1040
+ Returns ``None`` when no unambiguous step card exists (intake chatter,
1041
+ parallel waves without a binding) so callers keep their current behavior.
1042
+ """
1043
+ if not is_step_card_tool_scope(ns_key=ns_key):
1044
+ return None
1045
+ step_w = adapter._step_by_namespace.get(ns_key)
1046
+ if step_w is None:
1047
+ step_w = _resolve_token_target_card(adapter, router, ns_key, message=message)
1048
+ if step_w is None and len(router.active_step_ids) == 1:
1049
+ only_sid = next(iter(router.active_step_ids))
1050
+ step_w = adapter._current_step_messages.get(only_sid)
1051
+ if step_w is not None and adapter._step_by_namespace.get(ns_key) is None:
1052
+ adapter._step_by_namespace[ns_key] = step_w
1053
+ return step_w
1054
+
1055
+
996
1056
  def _apply_backend_loop_tokens_event(
997
1057
  adapter: TextualUIAdapter,
998
1058
  data: dict[str, Any],
@@ -3682,6 +3742,29 @@ async def execute_task_textual(
3682
3742
  task_loop_assistant_by_tcid[tcid]
3683
3743
  )
3684
3744
  continue
3745
+ # Step reasoning: the CoreAgent (deepagents) reply
3746
+ # emitted after a tool call arrives untagged (no
3747
+ # ``phase``), so it matches no user-visible loop
3748
+ # output phase and would be dropped by the gates
3749
+ # below. Surface it on the step card's Reasoning
3750
+ # branch instead of letting it vanish. Checked
3751
+ # before subgraph suppression because step-scope
3752
+ # execute namespaces are also step-owned text.
3753
+ if _is_step_reasoning_candidate(
3754
+ is_step_scope=is_step_scope,
3755
+ text=text,
3756
+ reasoning_text=reasoning_text,
3757
+ message=message,
3758
+ phase_loop=phase_loop,
3759
+ ):
3760
+ step_w_reasoning = _resolve_step_card_for_scoped_text(
3761
+ adapter, router, ns_key, message
3762
+ )
3763
+ if step_w_reasoning is not None and hasattr(
3764
+ step_w_reasoning, "append_reasoning_delta"
3765
+ ):
3766
+ step_w_reasoning.append_reasoning_delta(text)
3767
+ continue
3685
3768
  if suppress_subgraph_assistant_text:
3686
3769
  continue
3687
3770
  if not text: