← Về thư mục
openai4s/kernel/env_generations.py
- _is_within · function · L70-L77 — def _is_within(path: str | os.PathLike[str], parent: Path) -> bool
- EnvironmentError_ · class · L101-L102 — class EnvironmentError_(RuntimeError)
- ConcurrentApply · class · L105-L106 — class ConcurrentApply(EnvironmentError_)
- ImmutableGeneration · class · L109-L110 — class ImmutableGeneration(EnvironmentError_)
- _now_ms · function · L113-L114 — def _now_ms() -> int
- _run_probe · function · L122-L153 — def _run_probe(argv: Sequence[str], *, label: str) -> None
- probe_interpreter · function · L156-L208 — def probe_interpreter(prefix: Path) -> tuple[str, list[str]]
- verify_standard_environment · function · L211-L255 — def verify_standard_environment(prefix: Path, name: str) -> tuple[str, list[str]]
- _default_runner · function · L258-L261 — def _default_runner(argv: Sequence[str], cwd: Path)
- Generation · class · L265-L291 — class Generation
- public · method · L279-L291 — def public(self) -> dict[str, Any]
- Plan · class · L295-L324 — class Plan
- changes · method · L312-L313 — def changes(self) -> bool
- public · method · L315-L324 — def public(self) -> dict[str, Any]
- ApplyResult · class · L328-L346 — class ApplyResult
- public · method · L338-L346 — def public(self) -> dict[str, Any]
- EnvironmentStore · class · L349-L1102 — class EnvironmentStore
- init · method · L352-L354 — def init(self, root: str | os.PathLike[str], *, runner: Runner | None = None)
- _env_dir · method · L357-L361 — def _env_dir(self, name: str) -> Path
- _generations_dir · method · L363-L364 — def _generations_dir(self, name: str) -> Path
- _pointer · method · L366-L367 — def _pointer(self, name: str) -> Path
- layout_is_safe · method · L369-L400 — def layout_is_safe(self, name: str) -> bool
- _assert_safe_layout · method · L402-L407 — def _assert_safe_layout(self, name: str) -> None
- _valid_generation_id · method · L410-L427 — def _valid_generation_id(generation_id: Any) -> str | None
- _generation_dir · method · L429-L450 — def _generation_dir(self, name: str, generation_id: str) -> Path | None
- current_id · method · L453-L467 — def current_id(self, name: str) -> str | None
- _current_pointer_fingerprint · method · L469-L491 — def _current_pointer_fingerprint(self, name: str) -> str
- current · method · L493-L495 — def current(self, name: str) -> Generation | None
- get · method · L497-L529 — def get(self, name: str, generation_id: str) -> Generation | None
- list · method · L531-L539 — def list(self, name: str) -> list[Generation]
- environments · method · L541-L548 — def environments(self) -> list[str]
- history · method · L550-L562 — def history(self, name: str, limit: int = 200) -> list[dict[str, Any]]
- plan · method · L565-L637 — def plan( self, name: str, spec: str | os.PathLike[str], *, tool: str, force_replace: bool = False, ) -> Plan
- apply · method · L640-L844 — def apply( self, plan: Plan, spec: str | os.PathLike[str], *, tool: str, build: Callable[[Path], Sequence[str]], verify: Callable[[Path], tuple[str, list[str]]] | None = None, ) -> ApplyResult
- _fail · method · L846-L867 — def _fail( self, name: str, gen_dir: Path, record: dict, detail: str, stderr: str ) -> ApplyResult
- rollback · method · L870-L929 — def rollback(self, name: str, generation_id: str) -> ApplyResult
- assert_mutable · method · L932-L939 — def assert_mutable(self, name: str, generation_id: str) -> None
- recover · method · L942-L1017 — def recover(self, name: str) -> dict[str, Any]
- _record_abandoned · function · L960-L973 — def _record_abandoned(child: Path) -> None
- discard · method · L1019-L1045 — def discard(self, name: str, path: str) -> bool
- _point_at · method · L1048-L1076 — def _point_at(self, name: str, generation_id: str) -> None
- _mark_superseded · method · L1078-L1093 — def _mark_superseded(self, name: str, generation_id: str) -> None
- _log · method · L1095-L1102 — def _log(self, name: str, kind: str, payload: dict[str, Any]) -> None
- _tail · function · L1108-L1114 — def _tail(data: Any, limit: int = 4000) -> str
- _sha256_file · function · L1117-L1124 — def _sha256_file(path: Path) -> str
- _write_json · function · L1127-L1133 — def _write_json(path: Path, payload: dict[str, Any]) -> None
- _apply_in_progress · function · L1147-L1171 — def _apply_in_progress(env_dir: Path) -> bool
- _apply_lock · class · L1174-L1245 — class _apply_lock
- init · method · L1199-L1201 — def init(self, env_dir: Path)
- enter · method · L1203-L1235 — def enter(self)
- exit · method · L1237-L1245 — def exit(self, *_exc)