comate-cli 0.5.1__tar.gz → 0.5.3__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 (139) hide show
  1. {comate_cli-0.5.1 → comate_cli-0.5.3}/PKG-INFO +2 -1
  2. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/mcp_cli.py +31 -9
  3. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/animations.py +7 -5
  4. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/app.py +1 -1
  5. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/event_renderer.py +448 -60
  6. comate_cli-0.5.3/comate_cli/terminal_agent/figures.py +124 -0
  7. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/history_printer.py +93 -12
  8. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/logging_adapter.py +91 -8
  9. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/markdown_render.py +3 -1
  10. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/message_style.py +13 -5
  11. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/path_context_hint.py +9 -8
  12. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/components/plugin_list.py +9 -3
  13. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/tabs/discover_tab.py +15 -6
  14. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/tabs/errors_tab.py +3 -1
  15. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/tabs/installed_tab.py +9 -3
  16. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/preflight.py +11 -10
  17. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/question_view.py +24 -12
  18. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/rewind_store.py +3 -1
  19. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/selection_menu.py +12 -4
  20. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/session_view.py +3 -2
  21. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/startup.py +8 -3
  22. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/text_effects.py +4 -4
  23. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tool_view.py +65 -30
  24. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui.py +43 -15
  25. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui_parts/commands.py +52 -15
  26. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui_parts/history_sync.py +22 -5
  27. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui_parts/mcp_connecting_view.py +15 -9
  28. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui_parts/render_panels.py +45 -24
  29. comate_cli-0.5.3/memory_system_tengu_moth_copse_report.md +2366 -0
  30. {comate_cli-0.5.1 → comate_cli-0.5.3}/pyproject.toml +6 -1
  31. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_event_renderer.py +43 -12
  32. comate_cli-0.5.3/tests/test_event_renderer_boundary.py +156 -0
  33. comate_cli-0.5.3/tests/test_event_renderer_e2e.py +177 -0
  34. comate_cli-0.5.3/tests/test_event_renderer_streaming.py +759 -0
  35. comate_cli-0.5.3/tests/test_history_printer.py +384 -0
  36. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_history_sync.py +107 -0
  37. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_input_history.py +46 -5
  38. comate_cli-0.5.3/tests/test_logging_adapter.py +356 -0
  39. comate_cli-0.5.3/tests/test_markdown_render.py +53 -0
  40. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_mcp_slash_command.py +111 -0
  41. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_rewind_store.py +125 -11
  42. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_tool_view.py +6 -5
  43. {comate_cli-0.5.1 → comate_cli-0.5.3}/uv.lock +1476 -1412
  44. comate_cli-0.5.3//346/267/261/345/272/246Agent/345/217/257/350/247/206/345/214/226UI/350/256/276/350/256/241/346/200/235/350/267/257.md +3173 -0
  45. comate_cli-0.5.1/tests/test_history_printer.py +0 -103
  46. comate_cli-0.5.1/tests/test_logging_adapter.py +0 -166
  47. {comate_cli-0.5.1 → comate_cli-0.5.3}/.gitignore +0 -0
  48. {comate_cli-0.5.1 → comate_cli-0.5.3}/README.md +0 -0
  49. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/__init__.py +0 -0
  50. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/__main__.py +0 -0
  51. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/main.py +0 -0
  52. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/__init__.py +0 -0
  53. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/assistant_render.py +0 -0
  54. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/codenames.py +0 -0
  55. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/custom_slash_commands.py +0 -0
  56. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/env_utils.py +0 -0
  57. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/error_display.py +0 -0
  58. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/fragment_utils.py +0 -0
  59. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/input_geometry.py +0 -0
  60. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/layout_coordinator.py +0 -0
  61. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/logo.py +0 -0
  62. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/mention_completer.py +0 -0
  63. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/models.py +0 -0
  64. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/__init__.py +0 -0
  65. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/components/__init__.py +0 -0
  66. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/components/detail_view.py +0 -0
  67. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/components/search_box.py +0 -0
  68. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/components/tab_bar.py +0 -0
  69. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/marketplace_install_view.py +0 -0
  70. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/plugin_picker.py +0 -0
  71. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/tabs/__init__.py +0 -0
  72. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/plugins/tabs/marketplaces_tab.py +0 -0
  73. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/resume_selector.py +0 -0
  74. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/rpc_protocol.py +0 -0
  75. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/rpc_stdio.py +0 -0
  76. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/slash_commands.py +0 -0
  77. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/status_bar.py +0 -0
  78. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tips.py +0 -0
  79. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui_parts/__init__.py +0 -0
  80. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui_parts/input_behavior.py +0 -0
  81. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui_parts/key_bindings.py +0 -0
  82. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui_parts/slash_command_registry.py +0 -0
  83. {comate_cli-0.5.1 → comate_cli-0.5.3}/comate_cli/terminal_agent/tui_parts/ui_mode.py +0 -0
  84. {comate_cli-0.5.1 → comate_cli-0.5.3}/docs/superpowers/plans/2026-04-03-phrase-shuffle.md +0 -0
  85. {comate_cli-0.5.1 → comate_cli-0.5.3}/docs/superpowers/specs/2026-04-01-conditional-diff-subtitle-design.md +0 -0
  86. {comate_cli-0.5.1 → comate_cli-0.5.3}/docs/superpowers/specs/2026-04-03-phrase-shuffle-design.md +0 -0
  87. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/conftest.py +0 -0
  88. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_animator_shuffle.py +0 -0
  89. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_app_mcp_preload.py +0 -0
  90. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_app_preflight_gate.py +0 -0
  91. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_app_print_mode.py +0 -0
  92. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_app_shutdown.py +0 -0
  93. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_app_usage_line.py +0 -0
  94. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_cli_project_root.py +0 -0
  95. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_compact_command_semantics.py +0 -0
  96. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_completion_context_activation.py +0 -0
  97. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_completion_status_panel.py +0 -0
  98. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_context_command.py +0 -0
  99. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_custom_slash_commands.py +0 -0
  100. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_discover_tab.py +0 -0
  101. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_errors_tab.py +0 -0
  102. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_format_error.py +0 -0
  103. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_handle_error.py +0 -0
  104. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_input_behavior.py +0 -0
  105. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_installed_tab.py +0 -0
  106. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_interrupt_exit_semantics.py +0 -0
  107. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_layout_coordinator.py +0 -0
  108. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_logo.py +0 -0
  109. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_main_args.py +0 -0
  110. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_marketplaces_tab.py +0 -0
  111. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_mcp_cli.py +0 -0
  112. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_mention_completer.py +0 -0
  113. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_path_context_hint.py +0 -0
  114. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_plugin_slash_commands.py +0 -0
  115. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_plugin_tui_components.py +0 -0
  116. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_preflight.py +0 -0
  117. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_preflight_copilot.py +0 -0
  118. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_question_key_bindings.py +0 -0
  119. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_question_view.py +0 -0
  120. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_resume_selector.py +0 -0
  121. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_rewind_command_semantics.py +0 -0
  122. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_rpc_protocol.py +0 -0
  123. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_rpc_stdio_bridge.py +0 -0
  124. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_selection_menu.py +0 -0
  125. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_skills_slash_command.py +0 -0
  126. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_slash_argument_hint.py +0 -0
  127. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_slash_completer.py +0 -0
  128. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_slash_registry.py +0 -0
  129. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_status_bar.py +0 -0
  130. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_status_bar_transient.py +0 -0
  131. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_task_panel_format.py +0 -0
  132. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_task_panel_key_bindings.py +0 -0
  133. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_task_panel_rendering.py +0 -0
  134. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_task_poll.py +0 -0
  135. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_tui_elapsed_status.py +0 -0
  136. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_tui_mcp_init_gate.py +0 -0
  137. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_tui_paste_placeholder.py +0 -0
  138. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_tui_split_invariance.py +0 -0
  139. {comate_cli-0.5.1 → comate_cli-0.5.3}/tests/test_update_check.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comate-cli
3
- Version: 0.5.1
3
+ Version: 0.5.3
4
4
  Summary: Comate terminal CLI built on comate-agent-sdk
5
5
  Project-URL: Homepage, https://github.com/AndyLee1024/agent-sdk
6
6
  Project-URL: Repository, https://github.com/AndyLee1024/agent-sdk
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.13
16
16
  Requires-Python: >=3.11
17
17
  Requires-Dist: charset-normalizer==3.4.7
18
18
  Requires-Dist: comate-agent-sdk<1.0.0,>=0.0.2
19
+ Requires-Dist: concurrent-log-handler>=0.9.25
19
20
  Requires-Dist: curl-cffi==0.13.0
20
21
  Requires-Dist: packaging>=21.0
21
22
  Requires-Dist: pillow==12.2.0
@@ -16,6 +16,12 @@ from comate_agent_sdk.mcp import (
16
16
  from comate_agent_sdk.mcp.types import McpServerConfig
17
17
  from comate_agent_sdk.utils.paths import PathInput
18
18
 
19
+ from comate_cli.terminal_agent.figures import (
20
+ CHECK_MARK,
21
+ CROSS_MARK,
22
+ ELLIPSIS,
23
+ )
24
+
19
25
 
20
26
  class McpCliError(ValueError):
21
27
  def __init__(self, message: str, *, exit_code: int = 2) -> None:
@@ -217,12 +223,20 @@ def _read_effective_server_with_source(
217
223
  return None
218
224
 
219
225
 
220
- def _render_health_status(connected: bool, reason: str | None) -> str:
221
- if connected:
222
- return "✓ Connected"
226
+ def _render_health_status(
227
+ *,
228
+ status: str | None,
229
+ connected: bool,
230
+ reason: str | None,
231
+ ) -> str:
232
+ normalized = str(status or "").strip().lower()
233
+ if normalized == "connected" or (normalized in {"", "idle"} and connected):
234
+ return f"{CHECK_MARK} Connected"
235
+ if normalized == "connecting":
236
+ return f"{ELLIPSIS} Connecting"
223
237
  if reason:
224
- return f" {reason}"
225
- return " Not connected"
238
+ return f"{CROSS_MARK} {reason}"
239
+ return f"{CROSS_MARK} Not connected"
226
240
 
227
241
 
228
242
  def _format_server_endpoint(cfg: McpServerConfig) -> str:
@@ -294,9 +308,13 @@ def _cmd_list(args: argparse.Namespace, *, project_root: PathInput | None) -> No
294
308
  endpoint = _format_server_endpoint(cfg)
295
309
  health = health_by_alias.get(alias)
296
310
  status = (
297
- _render_health_status(health.connected, health.reason)
311
+ _render_health_status(
312
+ status=getattr(health, "status", None),
313
+ connected=health.connected,
314
+ reason=health.reason,
315
+ )
298
316
  if health is not None
299
- else " Unknown"
317
+ else f"{CROSS_MARK} Unknown"
300
318
  )
301
319
  sys.stdout.write(f"{alias}: {endpoint} ({server_type}) - {status}\n")
302
320
 
@@ -327,10 +345,14 @@ def _cmd_get(args: argparse.Namespace, *, project_root: PathInput | None) -> Non
327
345
  scope_line = _scope_label(scope)
328
346
 
329
347
  health_rows = asyncio.run(collect_mcp_server_health(servers={name: cfg}))
330
- status = " Not connected"
348
+ status = f"{CROSS_MARK} Not connected"
331
349
  if health_rows:
332
350
  row = health_rows[0]
333
- status = _render_health_status(row.connected, row.reason)
351
+ status = _render_health_status(
352
+ status=getattr(row, "status", None),
353
+ connected=row.connected,
354
+ reason=row.reason,
355
+ )
334
356
 
335
357
  server_type = str(cfg.get("type", "stdio")).strip().lower() # type: ignore[attr-defined]
336
358
  lines = [
@@ -11,6 +11,11 @@ from rich.text import Text
11
11
 
12
12
  from comate_agent_sdk.agent.events import StopEvent, TextEvent, ToolCallEvent, ToolResultEvent, UserQuestionEvent
13
13
 
14
+ from comate_cli.terminal_agent.figures import (
15
+ BREATH_DOT_GLYPHS as _FIGURES_BREATH_DOT_GLYPHS,
16
+ ELLIPSIS,
17
+ )
18
+
14
19
  DEFAULT_STATUS_PHRASES: tuple[str, ...] = (
15
20
  "Embellishing",
16
21
  "Vibing",
@@ -231,10 +236,7 @@ BREATH_DOT_COLORS: tuple[str, ...] = (
231
236
  "#9CA3AF", # 回退
232
237
  "#6B7280", # 回退
233
238
  )
234
- BREATH_DOT_GLYPHS: tuple[str, ...] = (
235
- "○",
236
- "●",
237
- )
239
+ BREATH_DOT_GLYPHS: tuple[str, ...] = _FIGURES_BREATH_DOT_GLYPHS
238
240
 
239
241
 
240
242
  def breathing_dot_color(frame: int) -> str:
@@ -382,7 +384,7 @@ class SubmissionAnimator:
382
384
  if not self._is_active:
383
385
  return Text("")
384
386
 
385
- phrase = self._status_hint if self._status_hint else (self._shuffled[self._phrase_idx] + "…")
387
+ phrase = self._status_hint if self._status_hint else (self._shuffled[self._phrase_idx] + ELLIPSIS)
386
388
  dot_color = breathing_dot_color(self._frame)
387
389
  now_monotonic = time.monotonic()
388
390
  dot = Text(
@@ -370,7 +370,7 @@ async def run(
370
370
  # 而非 fallthrough 到 Python lastResort StreamHandler 以原始文本输出到 stderr。
371
371
  renderer = EventRenderer(project_root=project_root)
372
372
  from comate_cli.terminal_agent.logging_adapter import setup_tui_logging
373
- logging_session = setup_tui_logging(renderer)
373
+ logging_session = setup_tui_logging(renderer, project_root=project_root)
374
374
 
375
375
  session, mode = _resolve_session(agent, resume_session_id, cwd=project_root)
376
376