bootstrap_graph.py 803 B

123456789101112131415161718192021222324252627
  1. from __future__ import annotations
  2. from dataclasses import dataclass
  3. @dataclass(frozen=True)
  4. class BootstrapGraph:
  5. stages: tuple[str, ...]
  6. def as_markdown(self) -> str:
  7. lines = ['# Bootstrap Graph', '']
  8. lines.extend(f'- {stage}' for stage in self.stages)
  9. return '\n'.join(lines)
  10. def build_bootstrap_graph() -> BootstrapGraph:
  11. return BootstrapGraph(
  12. stages=(
  13. 'top-level prefetch side effects',
  14. 'warning handler and environment guards',
  15. 'CLI parser and pre-action trust gate',
  16. 'setup() + commands/agents parallel load',
  17. 'deferred init after trust',
  18. 'mode routing: local / remote / ssh / teleport / direct-connect / deep-link',
  19. 'query engine submit loop',
  20. )
  21. )