types.py python
53 lines 991 B
Raw
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1 docs: MuseHub-first before ISR #74 — staging solidify NEXT Human 9 hours ago
1 """Typed results for the VCS adapter interface (§4)."""
2
3 from __future__ import annotations
4
5 from dataclasses import dataclass, field
6 from typing import Literal
7
8 RegimeName = Literal["muse+git-mirror", "muse-only", "git-only"]
9 ShaKind = Literal["git", "muse"]
10
11
12 @dataclass(frozen=True)
13 class StatusResult:
14 regime: str
15 dirty: bool
16 branch: str
17 notes: list[str] = field(default_factory=list)
18 muse_dirty: bool | None = None
19 git_dirty: bool | None = None
20
21
22 @dataclass(frozen=True)
23 class HeadResult:
24 sha: str
25 kind: ShaKind
26
27
28 @dataclass(frozen=True)
29 class AnchorResult:
30 anchor_sha: str
31 source: str
32
33
34 @dataclass(frozen=True)
35 class RealignResult:
36 would_import: int
37 applied: bool
38 from_ref: str | None
39 to_ref: str | None
40 reason: str | None = None
41
42
43 @dataclass(frozen=True)
44 class CommitResult:
45 committed: bool
46 sha: str
47
48
49 @dataclass(frozen=True)
50 class MirrorResult:
51 diff_summary: str
52 pushed: bool
53 reason: str | None = None
File History 2 commits
sha256:a78e7e5a8740e03315f325d19edeb3aa1b306b3337d04abbaa9a9e0f3bbeb7a1 docs: MuseHub-first before ISR #74 — staging solidify NEXT Human 9 hours ago
sha256:4671b7f787ddbe63ced31c895b688c77ab495653b65a730b423329f26b3c1439 feat: K1-P1 complete — agent provenance, build-verification… Sonnet 4.6 patch 52 days ago