syncmill 0.2.0__py3-none-any.whl

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 (56) hide show
  1. syncmill/__init__.py +11 -0
  2. syncmill/agents.py +2064 -0
  3. syncmill/artifact_io.py +201 -0
  4. syncmill/artifacts.py +1946 -0
  5. syncmill/board.py +2060 -0
  6. syncmill/breaker.py +327 -0
  7. syncmill/cli.py +4986 -0
  8. syncmill/command_errors.py +32 -0
  9. syncmill/config.py +1118 -0
  10. syncmill/dashboard.py +935 -0
  11. syncmill/gates.py +179 -0
  12. syncmill/gateway.py +234 -0
  13. syncmill/git_env.py +99 -0
  14. syncmill/isolated_session.py +431 -0
  15. syncmill/matcher.py +127 -0
  16. syncmill/memory.py +1067 -0
  17. syncmill/memory_backend.py +1907 -0
  18. syncmill/memory_migration.py +962 -0
  19. syncmill/model_routing.py +482 -0
  20. syncmill/models.py +244 -0
  21. syncmill/monitor.py +775 -0
  22. syncmill/phoenix_exporter.py +339 -0
  23. syncmill/planning.py +512 -0
  24. syncmill/platform_support.py +14 -0
  25. syncmill/preflight.py +1129 -0
  26. syncmill/project.py +1067 -0
  27. syncmill/report.py +502 -0
  28. syncmill/review_candidates.py +107 -0
  29. syncmill/room_compare.py +2380 -0
  30. syncmill/room_raw.py +484 -0
  31. syncmill/room_viewer.py +604 -0
  32. syncmill/rooms.py +4044 -0
  33. syncmill/session.py +444 -0
  34. syncmill/strategies/__init__.py +82 -0
  35. syncmill/strategies/base.py +910 -0
  36. syncmill/strategies/compete.py +233 -0
  37. syncmill/strategies/council.py +429 -0
  38. syncmill/strategies/decompose.py +570 -0
  39. syncmill/strategies/pipeline.py +221 -0
  40. syncmill/strategies/route.py +130 -0
  41. syncmill/supervisor.py +1423 -0
  42. syncmill/teamfile.py +571 -0
  43. syncmill/telemetry_hook.py +231 -0
  44. syncmill/terminal.py +245 -0
  45. syncmill/tracer.py +548 -0
  46. syncmill/tui.py +3537 -0
  47. syncmill/tui_collaboration.py +499 -0
  48. syncmill/tui_jobs.py +1407 -0
  49. syncmill/tui_render.py +156 -0
  50. syncmill/workflow.py +3746 -0
  51. syncmill/worktree.py +1045 -0
  52. syncmill-0.2.0.dist-info/METADATA +853 -0
  53. syncmill-0.2.0.dist-info/RECORD +56 -0
  54. syncmill-0.2.0.dist-info/WHEEL +4 -0
  55. syncmill-0.2.0.dist-info/entry_points.txt +2 -0
  56. syncmill-0.2.0.dist-info/licenses/LICENSE +191 -0
@@ -0,0 +1,32 @@
1
+ """Errors that carry a subprocess's output (git, tmux, a verification command).
2
+
3
+ The CLI prints every error message on one line, so that an LF inside an id or
4
+ path cannot start a line of its own (#198). A command's output is the one body
5
+ that is meant to keep its lines; an error built here records it separately, and
6
+ the CLI shows it as a labelled block under the head, each line prefixed and
7
+ escaped on its own. Output of one line stays on the head's line, for the CLI
8
+ and for every other reader of ``str(error)`` (a TUI field, a stored reason).
9
+
10
+ This module imports nothing from syncmill, so every module that runs a command
11
+ can use it without an import cycle.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ from typing import TypeVar
17
+
18
+ E = TypeVar("E", bound=BaseException)
19
+
20
+
21
+ def command_error(error_type: type[E], head: str, output: str) -> E:
22
+ """``error_type("<head>:\\n<output>")``, kept as ``command_output``; for
23
+ output of one line ``error_type("<head>: <output>")``; ``error_type(head)``
24
+ when the output is blank."""
25
+ output = output.strip()
26
+ if not output:
27
+ return error_type(head)
28
+ if "\n" not in output:
29
+ return error_type(f"{head}: {output}")
30
+ error = error_type(f"{head}:\n{output}")
31
+ error.command_output = output # type: ignore[attr-defined]
32
+ return error