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.
- syncmill/__init__.py +11 -0
- syncmill/agents.py +2064 -0
- syncmill/artifact_io.py +201 -0
- syncmill/artifacts.py +1946 -0
- syncmill/board.py +2060 -0
- syncmill/breaker.py +327 -0
- syncmill/cli.py +4986 -0
- syncmill/command_errors.py +32 -0
- syncmill/config.py +1118 -0
- syncmill/dashboard.py +935 -0
- syncmill/gates.py +179 -0
- syncmill/gateway.py +234 -0
- syncmill/git_env.py +99 -0
- syncmill/isolated_session.py +431 -0
- syncmill/matcher.py +127 -0
- syncmill/memory.py +1067 -0
- syncmill/memory_backend.py +1907 -0
- syncmill/memory_migration.py +962 -0
- syncmill/model_routing.py +482 -0
- syncmill/models.py +244 -0
- syncmill/monitor.py +775 -0
- syncmill/phoenix_exporter.py +339 -0
- syncmill/planning.py +512 -0
- syncmill/platform_support.py +14 -0
- syncmill/preflight.py +1129 -0
- syncmill/project.py +1067 -0
- syncmill/report.py +502 -0
- syncmill/review_candidates.py +107 -0
- syncmill/room_compare.py +2380 -0
- syncmill/room_raw.py +484 -0
- syncmill/room_viewer.py +604 -0
- syncmill/rooms.py +4044 -0
- syncmill/session.py +444 -0
- syncmill/strategies/__init__.py +82 -0
- syncmill/strategies/base.py +910 -0
- syncmill/strategies/compete.py +233 -0
- syncmill/strategies/council.py +429 -0
- syncmill/strategies/decompose.py +570 -0
- syncmill/strategies/pipeline.py +221 -0
- syncmill/strategies/route.py +130 -0
- syncmill/supervisor.py +1423 -0
- syncmill/teamfile.py +571 -0
- syncmill/telemetry_hook.py +231 -0
- syncmill/terminal.py +245 -0
- syncmill/tracer.py +548 -0
- syncmill/tui.py +3537 -0
- syncmill/tui_collaboration.py +499 -0
- syncmill/tui_jobs.py +1407 -0
- syncmill/tui_render.py +156 -0
- syncmill/workflow.py +3746 -0
- syncmill/worktree.py +1045 -0
- syncmill-0.2.0.dist-info/METADATA +853 -0
- syncmill-0.2.0.dist-info/RECORD +56 -0
- syncmill-0.2.0.dist-info/WHEEL +4 -0
- syncmill-0.2.0.dist-info/entry_points.txt +2 -0
- 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
|