Domain Types & Contracts¶
Core data structures and exceptions defining the Sovereign Dark Factory domain model.
dark_factory.domain.types
¶
Domain data contracts and types for Sovereign Dark Factory.
Classes¶
RunStatus
¶
Bases: StrEnum
Lifecycle status of a dark factory run.
Source code in dark_factory/domain/types.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
TaskSpec
dataclass
¶
Specification for an autonomous coding task.
Source code in dark_factory/domain/types.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
StepExecution
dataclass
¶
Outcome of a single verification step or command execution.
Source code in dark_factory/domain/types.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
VerificationStep
dataclass
¶
A single deterministic verification gate.
Source code in dark_factory/domain/types.py
37 38 39 40 41 42 43 44 45 | |
EvidenceManifest
dataclass
¶
Immutable audit record and evidence of a completed or paused run.
Source code in dark_factory/domain/types.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | |
ModelTelemetry
dataclass
¶
Telemetry captured from local inference engines (Ollama / Prism).
Source code in dark_factory/domain/types.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
dark_factory.domain.errors
¶
Domain error definitions for Sovereign Dark Factory.
Classes¶
DarkFactoryError
¶
Bases: Exception
Base exception for all Dark Factory errors.
Source code in dark_factory/domain/errors.py
4 5 | |
HarnessError
¶
Bases: DarkFactoryError
Raised when an agent harness fails to invoke or communicate with local models.
Source code in dark_factory/domain/errors.py
20 21 | |
LocalEngineOfflineError
¶
Bases: HarnessError
Raised when Ollama or Prism are unreachable.
Source code in dark_factory/domain/errors.py
28 29 | |
PromptTooLargeError
¶
Bases: HarnessError
Raised before any model call when the prompt plus output reserve exceeds max_num_ctx.
Source code in dark_factory/domain/errors.py
24 25 | |
RunNotFoundError
¶
Bases: DarkFactoryError
Raised when attempting to inspect or review a non-existent run ID.
Source code in dark_factory/domain/errors.py
50 51 | |
RunTimeoutError
¶
Bases: DarkFactoryError
Raised when a run exceeds its deadline; carries the partial results gathered so far.
Source code in dark_factory/domain/errors.py
36 37 38 39 40 41 42 43 | |
SandboxError
¶
Bases: DarkFactoryError
Raised when sandbox creation, command execution, or teardown fails.
Source code in dark_factory/domain/errors.py
8 9 | |
VerificationFailedError
¶
Bases: DarkFactoryError
Raised when deterministic verification gates fail and maximum healing retries are exceeded.
Source code in dark_factory/domain/errors.py
32 33 | |
WorkflowStateError
¶
Bases: DarkFactoryError
Raised on invalid workflow state transitions or journal corruption.
Source code in dark_factory/domain/errors.py
46 47 | |
WorktreeCleanupError
¶
Bases: SandboxError
Raised when git worktree destruction fails.
Source code in dark_factory/domain/errors.py
16 17 | |
WorktreeCreationError
¶
Bases: SandboxError
Raised when git worktree creation fails.
Source code in dark_factory/domain/errors.py
12 13 | |