soothe-cli 1.2.10__tar.gz → 1.3.1__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.
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/PKG-INFO +1 -1
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/commands/binding.py +0 -1
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/spinner_labels.py +0 -7
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_messages_mixin.py +4 -4
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/textual_adapter.py +52 -83
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/cognition_goal_tree.py +135 -58
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/cognition_step.py +17 -26
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/cognition_step_activity.py +1 -5
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/plan_quick_view_overlay.py +14 -27
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/.gitignore +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/README.md +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/pyproject.toml +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/_cli_context.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/_env_vars.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/_version.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/card_wire.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/commands/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/commands/config_cmd.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/commands/cron_cmd.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/commands/loop_cmd.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/commands/run_cmd.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/commands/status_cmd.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/execution/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/execution/daemon.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/execution/daemon_errors.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/execution/headless.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/execution/headless_renderer.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/execution/launcher.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/main.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/cli/soothecli.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/commands/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/commands/command_registry.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/commands/command_router.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/commands/slash_commands.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/commands/subagent_routing.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/config/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/config/cli_config.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/config/loader.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/config/logging_setup.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/card.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/card_binder.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/markdown_theme.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/media_utils.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/mermaid_render.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/path_utils.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/preview_limits.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/shell_color.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/text_extract.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/theme.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/tips.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/tool_display.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/display/unicode_security.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/loops/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/loops/sessions.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/model_config.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/project_utils.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/headless/processor.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/headless/processor_state.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/parse/tool_call_resolution.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/policy/tui_trace_log.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/presentation/duration_format.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/presentation/engine.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/presentation/id_format.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/presentation/renderer_base.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/presentation/renderer_protocol.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/presentation/step_id_format.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/presentation/subagent_task_display.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/state/file_tracker.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/state/session_stats.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/state/step_router.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/state/stream_accumulator.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/token_events_debug.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/token_usage.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/transport/session.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/turn/prepare.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/wire/chunk_filter.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/wire/message_text.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/runtime/wire/messages.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/settings/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/settings/_console_impl.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/settings/bootstrap.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/settings/core.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/settings/glyphs.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/settings/provider.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/settings/shell_allow.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/settings/skills_dirs.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/settings/stream_config.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_app.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_clarification.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_entrypoints.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_execution.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_history.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_model.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_model_params.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_startup.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_terminal.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_theme_prefs.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_types.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/_ui.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/app/app.tcss +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/composer_mode.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/file_change_notify.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/file_change_renderers.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/input.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/skills/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/skills/invocation.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/skills/load.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/_links.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/autocomplete.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/chat_input.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/clipboard.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/context_data.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/context_viewer.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/diff.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/editor.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/file_change_preview.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/help_screen.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/history.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/loading.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/loop_selector.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/mcp_viewer.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/message_store.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/_helpers.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/app.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/assistant.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/cognition_reason.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/diff_message.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/error.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/skill.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/structured_ask_user.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/messages/user.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/model_selector.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/notification_settings.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/pinned_goal_bar.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/queued_goals_bar.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/router_profile_selector.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/status.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/theme_selector.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/tui/widgets/welcome.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/update_check.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/ux/__init__.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/ux/subagent_progress.py +0 -0
- {soothe_cli-1.2.10 → soothe_cli-1.3.1}/src/soothe_cli/ux/subagent_wire_display.py +0 -0
|
@@ -56,13 +56,6 @@ def map_plan_phase_spinner_label(label: str) -> str:
|
|
|
56
56
|
return SPINNER_LABEL_THINKING
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
def retry_spinner_hint(*, attempt: int, max_attempts: int) -> str | None:
|
|
60
|
-
"""Hint suffix for LLM retries, e.g. `2/3`."""
|
|
61
|
-
if attempt > 0 and max_attempts > 0:
|
|
62
|
-
return f"{attempt}/{max_attempts}"
|
|
63
|
-
return None
|
|
64
|
-
|
|
65
|
-
|
|
66
59
|
def daemon_connect_hint_extra(*, attempt: int, max_attempts: int) -> str | None:
|
|
67
60
|
"""Hint suffix for daemon connect retries, e.g. `attempt 2/3`."""
|
|
68
61
|
if max_attempts <= 1 or attempt <= 1:
|
|
@@ -875,15 +875,15 @@ class _MessagesMixin:
|
|
|
875
875
|
)
|
|
876
876
|
)
|
|
877
877
|
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
async def _tear_down_interrupt_ui(self, message: str | None = None) -> None:
|
|
878
|
+
async def _tear_down_interrupt_ui(self) -> None:
|
|
881
879
|
"""Immediately stop in-flight step/goal UI when the user interrupts a turn.
|
|
882
880
|
|
|
883
881
|
Daemon cancel and worker teardown can take several seconds; without an
|
|
884
882
|
eager UI pass the thinking spinner stays live after interrupt.
|
|
885
883
|
"""
|
|
886
|
-
|
|
884
|
+
from soothe_cli.tui.textual_adapter import STREAM_CANCELLED_MESSAGE
|
|
885
|
+
|
|
886
|
+
label = STREAM_CANCELLED_MESSAGE
|
|
887
887
|
adapter = getattr(self, "_ui_adapter", None)
|
|
888
888
|
if adapter is not None:
|
|
889
889
|
if adapter._tool_to_step or adapter._tool_display_by_call_id:
|
|
@@ -44,7 +44,6 @@ if TYPE_CHECKING:
|
|
|
44
44
|
from langchain_core.messages import AIMessage, HumanMessage
|
|
45
45
|
from soothe_client.appkit.turn import run_turn_pipeline
|
|
46
46
|
from soothe_client.core.events import (
|
|
47
|
-
INTENT_CLASSIFIED,
|
|
48
47
|
LOOP_CLARIFICATION_ANSWERED,
|
|
49
48
|
LOOP_CLARIFICATION_DEFERRED,
|
|
50
49
|
LOOP_CLARIFICATION_REQUESTED,
|
|
@@ -95,14 +94,12 @@ from soothe_cli.display.spinner_labels import (
|
|
|
95
94
|
SPINNER_LABEL_EXECUTING,
|
|
96
95
|
SPINNER_LABEL_INPUT,
|
|
97
96
|
SPINNER_LABEL_OFFLOADING,
|
|
98
|
-
SPINNER_LABEL_RETRYING,
|
|
99
97
|
SPINNER_LABEL_SUBMITTING,
|
|
100
98
|
SPINNER_LABEL_SYNTHESIZING,
|
|
101
99
|
SPINNER_LABEL_THINKING,
|
|
102
100
|
SPINNER_LABEL_TOOLS,
|
|
103
101
|
SPINNER_LABEL_WRITING,
|
|
104
102
|
map_plan_phase_spinner_label,
|
|
105
|
-
retry_spinner_hint,
|
|
106
103
|
)
|
|
107
104
|
from soothe_cli.runtime.parse.tool_call_resolution import (
|
|
108
105
|
build_streaming_args_overlay,
|
|
@@ -168,7 +165,10 @@ from soothe_cli.tui.widgets.messages import (
|
|
|
168
165
|
flush_deferred_tools_refreshes,
|
|
169
166
|
reset_turn_tool_refresh_state,
|
|
170
167
|
)
|
|
171
|
-
from soothe_cli.tui.widgets.messages.cognition_goal_tree import
|
|
168
|
+
from soothe_cli.tui.widgets.messages.cognition_goal_tree import (
|
|
169
|
+
_normalize_step_dependencies,
|
|
170
|
+
collect_running_step_stats,
|
|
171
|
+
)
|
|
172
172
|
from soothe_cli.ux.subagent_wire_display import (
|
|
173
173
|
SubagentWireRenderKind,
|
|
174
174
|
classify_subagent_wire_render,
|
|
@@ -177,8 +177,10 @@ from soothe_cli.ux.subagent_wire_display import (
|
|
|
177
177
|
|
|
178
178
|
logger = logging.getLogger(__name__)
|
|
179
179
|
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
STREAM_CANCELLED_MESSAGE = "Stream cancelled"
|
|
181
|
+
|
|
182
|
+
# LLM call boundary — separates reasoning from different LLM calls
|
|
183
|
+
LLM_CALL_BOUNDARY = "soothe.cognition.llm.call.boundary"
|
|
182
184
|
# Plan-phase cognition card (not yet in soothe_client.core.events exports used by CLI).
|
|
183
185
|
STRANGE_LOOP_REASONED = "soothe.cognition.strange_loop.reasoned"
|
|
184
186
|
|
|
@@ -370,7 +372,7 @@ class TextualUIAdapter:
|
|
|
370
372
|
"""Execution mode from the latest ``plan_decision`` (``dependency`` / ``parallel``).
|
|
371
373
|
|
|
372
374
|
Used for step-card lifecycle (stuck predecessor finalization); the plan
|
|
373
|
-
panel header shows ``
|
|
375
|
+
panel header shows ``task_complexity`` instead.
|
|
374
376
|
"""
|
|
375
377
|
|
|
376
378
|
self._plan_step_order: list[str] = []
|
|
@@ -385,6 +387,16 @@ class TextualUIAdapter:
|
|
|
385
387
|
self._goal_tree_message: CognitionGoalTreeMessage | None = None
|
|
386
388
|
"""In-memory goal→steps state for the Ctrl+t plan quick view (not mounted in #messages)."""
|
|
387
389
|
|
|
390
|
+
def _sync_goal_tree_live_stats(self) -> None:
|
|
391
|
+
"""Snapshot live step counters before a terminal footer freezes the plan."""
|
|
392
|
+
tree = self._goal_tree_message
|
|
393
|
+
if tree is None:
|
|
394
|
+
return
|
|
395
|
+
try:
|
|
396
|
+
tree.sync_running_live_stats(collect_running_step_stats(self._current_step_messages))
|
|
397
|
+
except Exception: # noqa: BLE001
|
|
398
|
+
logger.debug("failed to snapshot live goal tree stats", exc_info=True)
|
|
399
|
+
|
|
388
400
|
def finalize_pending_tools_with_error(
|
|
389
401
|
self,
|
|
390
402
|
error: str,
|
|
@@ -402,6 +414,8 @@ class TextualUIAdapter:
|
|
|
402
414
|
overwriting a terminal plan-panel footer (stream-end after a
|
|
403
415
|
successful goal completion).
|
|
404
416
|
"""
|
|
417
|
+
tree = self._goal_tree_message
|
|
418
|
+
self._sync_goal_tree_live_stats()
|
|
405
419
|
for tcid, step_w in list(self._tool_to_step.items()):
|
|
406
420
|
step_w.set_tool_error(tcid, error, duration_ms=0)
|
|
407
421
|
_clear_adapter_step_tool_registry(self, clear_step_messages=False)
|
|
@@ -412,8 +426,8 @@ class TextualUIAdapter:
|
|
|
412
426
|
self._file_change_previews_shown.clear()
|
|
413
427
|
self._file_change_widgets.clear()
|
|
414
428
|
self._file_preview_assistant_id = None
|
|
415
|
-
if interrupt_goal_tree and
|
|
416
|
-
|
|
429
|
+
if interrupt_goal_tree and tree is not None:
|
|
430
|
+
tree.set_interrupted(error)
|
|
417
431
|
|
|
418
432
|
# Clear active streaming message to avoid stale "active" state in the store.
|
|
419
433
|
if self._set_active_message:
|
|
@@ -435,6 +449,13 @@ class TextualUIAdapter:
|
|
|
435
449
|
interrupt_goal_tree: When False, skip plan-panel `set_interrupted`
|
|
436
450
|
(preserves a success footer after goal completion).
|
|
437
451
|
"""
|
|
452
|
+
tree = self._goal_tree_message
|
|
453
|
+
self._sync_goal_tree_live_stats()
|
|
454
|
+
display_message = (
|
|
455
|
+
tree.interrupted_status_label(message)
|
|
456
|
+
if tree is not None and interrupt_goal_tree
|
|
457
|
+
else message
|
|
458
|
+
)
|
|
438
459
|
targets = {
|
|
439
460
|
sid: step_msg
|
|
440
461
|
for sid, step_msg in self._current_step_messages.items()
|
|
@@ -449,7 +470,7 @@ class TextualUIAdapter:
|
|
|
449
470
|
if targets or not only_in_flight:
|
|
450
471
|
_finalize_orphan_subagent_cards(self, success=False, summary=message)
|
|
451
472
|
for step_msg in targets.values():
|
|
452
|
-
step_msg.set_interrupted(
|
|
473
|
+
step_msg.set_interrupted(display_message)
|
|
453
474
|
_clear_adapter_step_tool_registry(self)
|
|
454
475
|
self._orphan_cards_by_invocation.clear()
|
|
455
476
|
self._last_completed_main_step_execute_prose = ""
|
|
@@ -518,10 +539,10 @@ def _stream_end_pending_error_message(
|
|
|
518
539
|
)
|
|
519
540
|
|
|
520
541
|
if bool(getattr(daemon_session, "last_turn_cancellation_seen", False)):
|
|
521
|
-
return
|
|
542
|
+
return STREAM_CANCELLED_MESSAGE
|
|
522
543
|
end_state = getattr(daemon_session, "last_turn_end_state", None)
|
|
523
544
|
if end_state == "stopped":
|
|
524
|
-
return
|
|
545
|
+
return STREAM_CANCELLED_MESSAGE
|
|
525
546
|
if end_state == "connection_lost":
|
|
526
547
|
return "Connection lost during stream"
|
|
527
548
|
err_msg = getattr(daemon_session, "last_turn_error_message", None) or ""
|
|
@@ -1698,20 +1719,16 @@ async def _ensure_goal_tree_message(
|
|
|
1698
1719
|
adapter: TextualUIAdapter,
|
|
1699
1720
|
*,
|
|
1700
1721
|
goal: str = "",
|
|
1701
|
-
max_iterations: int = 0,
|
|
1702
1722
|
) -> CognitionGoalTreeMessage:
|
|
1703
1723
|
"""Create or refresh in-memory goal tree state for the plan quick view."""
|
|
1704
1724
|
tree = adapter._goal_tree_message
|
|
1705
1725
|
if tree is not None:
|
|
1706
1726
|
if goal.strip():
|
|
1707
1727
|
tree._goal_text = goal.strip()
|
|
1708
|
-
if max_iterations > 0:
|
|
1709
|
-
tree._max_iterations = max_iterations
|
|
1710
1728
|
tree.mark_loop_started()
|
|
1711
1729
|
return tree
|
|
1712
1730
|
widget = CognitionGoalTreeMessage(
|
|
1713
1731
|
goal=goal.strip() or "Goal",
|
|
1714
|
-
max_iterations=max_iterations,
|
|
1715
1732
|
id=f"goal-tree-{uuid.uuid4().hex[:8]}",
|
|
1716
1733
|
)
|
|
1717
1734
|
widget.mark_loop_started()
|
|
@@ -2701,11 +2718,15 @@ async def _handle_interrupt_cleanup(
|
|
|
2701
2718
|
# Mark tools as rejected AFTER saving state
|
|
2702
2719
|
_reject_step_tool_rows(adapter)
|
|
2703
2720
|
|
|
2721
|
+
tree = adapter._goal_tree_message
|
|
2722
|
+
interrupt_label = STREAM_CANCELLED_MESSAGE
|
|
2723
|
+
adapter._sync_goal_tree_live_stats()
|
|
2724
|
+
if tree is not None:
|
|
2725
|
+
tree.set_interrupted(interrupt_label)
|
|
2726
|
+
interrupt_label = tree.interrupted_status_label(interrupt_label)
|
|
2704
2727
|
for step_msg in list(adapter._current_step_messages.values()):
|
|
2705
|
-
step_msg.set_interrupted(
|
|
2728
|
+
step_msg.set_interrupted(interrupt_label)
|
|
2706
2729
|
_clear_adapter_step_tool_registry(adapter)
|
|
2707
|
-
if adapter._goal_tree_message is not None:
|
|
2708
|
-
adapter._goal_tree_message.set_interrupted("Stream cancelled")
|
|
2709
2730
|
|
|
2710
2731
|
adapter._last_completed_main_step_execute_prose = ""
|
|
2711
2732
|
adapter._last_main_flushed_assistant_prose = ""
|
|
@@ -4205,12 +4226,7 @@ async def execute_task_textual(
|
|
|
4205
4226
|
adapter._last_completed_main_step_execute_prose = ""
|
|
4206
4227
|
adapter._last_main_flushed_assistant_prose = ""
|
|
4207
4228
|
goal = str(data.get("goal", "")).strip()
|
|
4208
|
-
|
|
4209
|
-
await _ensure_goal_tree_message(
|
|
4210
|
-
adapter,
|
|
4211
|
-
goal=goal,
|
|
4212
|
-
max_iterations=max_iter,
|
|
4213
|
-
)
|
|
4229
|
+
await _ensure_goal_tree_message(adapter, goal=goal)
|
|
4214
4230
|
pending_text = pending_text_by_namespace.get(ns_key, "")
|
|
4215
4231
|
if pending_text:
|
|
4216
4232
|
await _flush_assistant_text_ns(
|
|
@@ -4401,11 +4417,7 @@ async def execute_task_textual(
|
|
|
4401
4417
|
if isinstance(raw_steps, list):
|
|
4402
4418
|
execution_mode = str(data.get("execution_mode", "")).strip()
|
|
4403
4419
|
adapter._last_plan_execution_mode = execution_mode or None
|
|
4404
|
-
|
|
4405
|
-
data.get("task_complexity")
|
|
4406
|
-
or data.get("intake_label")
|
|
4407
|
-
or ""
|
|
4408
|
-
).strip()
|
|
4420
|
+
task_complexity = str(data.get("task_complexity") or "").strip()
|
|
4409
4421
|
_record_plan_step_dag(adapter, raw_steps)
|
|
4410
4422
|
adapter._execute_wave_total = len(raw_steps)
|
|
4411
4423
|
done_steps = int(data.get("done_steps", 0) or 0)
|
|
@@ -4422,8 +4434,8 @@ async def execute_task_textual(
|
|
|
4422
4434
|
tree = adapter._goal_tree_message
|
|
4423
4435
|
if tree is not None:
|
|
4424
4436
|
tree.sync_plan_steps(raw_steps)
|
|
4425
|
-
if
|
|
4426
|
-
tree.
|
|
4437
|
+
if task_complexity:
|
|
4438
|
+
tree.set_task_complexity(task_complexity)
|
|
4427
4439
|
if execution_mode == "parallel":
|
|
4428
4440
|
ui_coalesce.execute_wave_active = True
|
|
4429
4441
|
continue
|
|
@@ -4646,32 +4658,22 @@ async def execute_task_textual(
|
|
|
4646
4658
|
)
|
|
4647
4659
|
continue
|
|
4648
4660
|
|
|
4649
|
-
#
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
max_attempts = int(data.get("max_attempts", 0))
|
|
4654
|
-
error_type = str(data.get("error_type", "timeout"))
|
|
4655
|
-
# Try to find a running step card via namespace or active steps
|
|
4661
|
+
# LLM call boundary — signal the step card to start
|
|
4662
|
+
# a new reasoning line so reasoning from different
|
|
4663
|
+
# LLM calls within a step doesn't merge into one row.
|
|
4664
|
+
if event_type == LLM_CALL_BOUNDARY:
|
|
4656
4665
|
widget = None
|
|
4657
4666
|
if ns_key:
|
|
4658
4667
|
widget = adapter._step_by_namespace.get(ns_key)
|
|
4659
4668
|
if widget is None:
|
|
4660
|
-
# Fallback: find any running step in current step messages
|
|
4661
4669
|
for step_widget in adapter._current_step_messages.values():
|
|
4662
4670
|
if step_widget._status == "running": # noqa: SLF001
|
|
4663
4671
|
widget = step_widget
|
|
4664
4672
|
break
|
|
4665
|
-
if widget is not None
|
|
4666
|
-
widget
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
SPINNER_LABEL_RETRYING,
|
|
4670
|
-
hint_extra=retry_spinner_hint(
|
|
4671
|
-
attempt=attempt,
|
|
4672
|
-
max_attempts=max_attempts,
|
|
4673
|
-
),
|
|
4674
|
-
)
|
|
4673
|
+
if widget is not None and hasattr(
|
|
4674
|
+
widget, "start_new_reasoning_line"
|
|
4675
|
+
):
|
|
4676
|
+
widget.start_new_reasoning_line()
|
|
4675
4677
|
continue
|
|
4676
4678
|
|
|
4677
4679
|
if event_type == STRANGE_LOOP_PLAN_PHASE:
|
|
@@ -4729,39 +4731,6 @@ async def execute_task_textual(
|
|
|
4729
4731
|
await adapter._set_spinner(None)
|
|
4730
4732
|
continue
|
|
4731
4733
|
|
|
4732
|
-
if event_type == INTENT_CLASSIFIED:
|
|
4733
|
-
intake_label = str(
|
|
4734
|
-
data.get("task_complexity") or data.get("intake_label") or ""
|
|
4735
|
-
).strip()
|
|
4736
|
-
if intake_label:
|
|
4737
|
-
if adapter._goal_tree_message is None:
|
|
4738
|
-
await _ensure_goal_tree_message(adapter)
|
|
4739
|
-
tree = adapter._goal_tree_message
|
|
4740
|
-
if tree is not None:
|
|
4741
|
-
tree.set_intake_label(intake_label)
|
|
4742
|
-
reasoning = str(data.get("reasoning", "")).strip()
|
|
4743
|
-
if not reasoning:
|
|
4744
|
-
continue
|
|
4745
|
-
pending_text = pending_text_by_namespace.get(ns_key, "")
|
|
4746
|
-
if pending_text:
|
|
4747
|
-
await _flush_assistant_text_ns(
|
|
4748
|
-
adapter,
|
|
4749
|
-
pending_text,
|
|
4750
|
-
ns_key,
|
|
4751
|
-
assistant_message_by_namespace,
|
|
4752
|
-
router=router,
|
|
4753
|
-
)
|
|
4754
|
-
pending_text_by_namespace[ns_key] = ""
|
|
4755
|
-
assistant_message_by_namespace.pop(ns_key, None)
|
|
4756
|
-
intent_widget = CognitionReasonMessage(
|
|
4757
|
-
status="",
|
|
4758
|
-
iteration=0,
|
|
4759
|
-
plan_reasoning=reasoning,
|
|
4760
|
-
id=f"intent-{uuid.uuid4().hex[:8]}",
|
|
4761
|
-
)
|
|
4762
|
-
await adapter._mount_message(intent_widget)
|
|
4763
|
-
continue
|
|
4764
|
-
|
|
4765
4734
|
if event_type == STRANGE_LOOP_REASONED:
|
|
4766
4735
|
assessment_reasoning = str(
|
|
4767
4736
|
data.get("assessment_reasoning", "")
|