← Về thư mục
openai4s/cli/main.py
- _statefile_payload · function · L42-L53 — def _statefile_payload(cfg) -> str
- _acquire_singleton · function · L56-L104 — def _acquire_singleton(cfg) -> bool
- _clear_state · function · L107-L125 — def _clear_state(cfg, *, only_if_owned_by: int | None = None) -> None
- _read_pid · function · L128-L132 — def _read_pid(cfg) -> int | None
- _pid_alive · function · L135-L151 — def _pid_alive(pid: int) -> bool
- _is_zombie · function · L165-L178 — def _is_zombie(pid: int) -> bool
- _darwin_process_stat · function · L181-L184 — def _darwin_process_stat(pid: int) -> int | None
- _darwin_process_start · function · L187-L202 — def _darwin_process_start(pid: int) -> str | None
- _darwin_kinfo_proc · function · L205-L231 — def _darwin_kinfo_proc(pid: int) -> bytes | None
- _proc_stat_fields · function · L234-L248 — def _proc_stat_fields(pid: int) -> list[bytes] | None
- _process_start_token · function · L251-L283 — def _process_start_token(pid: int) -> str | None
- _recorded_state · function · L286-L297 — def _recorded_state(cfg) -> dict[str, object] | None
- _recorded_identity · function · L300-L310 — def _recorded_identity(cfg) -> tuple[int | None, str | None]
- _valid_recorded_host · function · L313-L357 — def _valid_recorded_host(value: object) -> bool
- _recorded_endpoint · function · L360-L395 — def _recorded_endpoint(cfg, expected_pid: int) -> tuple[str, int] | None
- _daemon_alive · function · L398-L421 — def _daemon_alive(cfg, pid: int) -> bool
- _live_endpoint · function · L424-L439 — def _live_endpoint(cfg) -> tuple[str, int] | None
- _reachable_host · function · L442-L459 — def _reachable_host(host: str) -> str
- _url · function · L462-L492 — def _url( cfg, *, with_token: bool = True, endpoint: tuple[str, int] | None = None, ) -> str
- _sigterm_to_keyboard_interrupt · function · L495-L505 — def _sigterm_to_keyboard_interrupt(signum, frame)
- _foreground_cell_interrupt · function · L508-L556 — def _foreground_cell_interrupt(agent)
- _installed · function · L529-L554 — def _installed()
- _handler · function · L534-L541 — def _handler(signum, frame): # noqa: ANN001, ARG001
- _bind_failure_message · function · L559-L585 — def _bind_failure_message(exc: OSError, cfg) -> str | None
- _apply_serve_overrides · function · L588-L604 — def _apply_serve_overrides(args, cfg) -> None
- _tcp_port · function · L607-L614 — def _tcp_port(value: str) -> int
- _open_daemon · function · L617-L627 — def _open_daemon(request, *, timeout: float)
- _health_ready · function · L630-L646 — def _health_ready(cfg) -> bool
- _cleanup_failed_detached_child · function · L649-L673 — def _cleanup_failed_detached_child(process) -> None
- _cmd_serve_detached · function · L676-L792 — def _cmd_serve_detached(args, cfg) -> int
- _detached_startup_refusal · function · L795-L838 — def _detached_startup_refusal( startup: str, cfg, log_path: Path ) -> tuple[str, int] | None
- cmd_serve · function · L841-L952 — def cmd_serve(args) -> int
- _open · function · L934-L941 — def _open()
- _doctor_config · function · L955-L971 — def _doctor_config()
- cmd_doctor · function · L974-L991 — def cmd_doctor(args) -> int
- cmd_verify_package · function · L994-L1015 — def cmd_verify_package(args) -> int
- cmd_diagnostics · function · L1018-L1035 — def cmd_diagnostics(args) -> int
- cmd_status · function · L1038-L1097 — def cmd_status(args) -> int
- _wait_pid_exit · function · L1100-L1121 — def _wait_pid_exit( pid: int, *, attempts: int | None = None, interval: float = 0.1 ) -> bool
- _positive_seconds · function · L1134-L1141 — def _positive_seconds(value: str) -> float
- _poll_attempts · function · L1144-L1145 — def _poll_attempts(seconds: float) -> int
- cmd_stop · function · L1148-L1204 — def cmd_stop(args) -> int
- cmd_url · function · L1207-L1209 — def cmd_url(args) -> int
- _run_refusal · function · L1247-L1254 — def _run_refusal(args, payload: dict) -> int
- cmd_run · function · L1257-L1390 — def cmd_run(args) -> int
- _onboarding_service · function · L1398-L1406 — def _onboarding_service()
- _prompt_value · function · L1409-L1411 — def _prompt_value(label: str, default: str) -> str
- cmd_init · function · L1414-L1468 — def cmd_init(args) -> int
- cmd_jupyter_describe · function · L1476-L1492 — def cmd_jupyter_describe(args) -> int
- _print_kernelspec_writes · function · L1495-L1497 — def _print_kernelspec_writes(written: list[dict], action: str) -> None
- cmd_jupyter_export · function · L1500-L1514 — def cmd_jupyter_export(args) -> int
- cmd_jupyter_install · function · L1517-L1531 — def cmd_jupyter_install(args) -> int
- _envs_dir · function · L1552-L1554 — def _envs_dir() -> Path
- _find_conda_tool · function · L1557-L1562 — def _find_conda_tool() -> str | None
- _existing_envs · function · L1565-L1606 — def _existing_envs() -> dict[str, Path]
- _create_cmd · function · L1609-L1614 — def _create_cmd(tool: str, name: str, yml: Path) -> list[str]
- _update_cmd · function · L1617-L1630 — def _update_cmd(tool: str, prefix: Path, yml: Path) -> list[str]
- cmd_setup · function · L1633-L1716 — def cmd_setup(args) -> int
- _env_store · function · L1724-L1727 — def _env_store(cfg, runner=None)
- _env_spec · function · L1730-L1731 — def _env_spec(name: str) -> Path
- _env_verify · function · L1734-L1752 — def _env_verify(prefix: Path, *, name: str | None = None) -> tuple[str, list[str]]
- cmd_env_plan · function · L1755-L1773 — def cmd_env_plan(args) -> int
- cmd_env_apply · function · L1776-L1844 — def cmd_env_apply(args) -> int
- build · function · L1805-L1818 — def build(prefix: Path, staged_spec: Path, _tool=tool): # The staged spec, never the live one: the manifest records the # hash taken under the apply lock, and building from a file that # can still be edited would make that hash describe something else.
- cmd_env_list · function · L1847-L1869 — def cmd_env_list(args) -> int
- cmd_env_rollback · function · L1872-L1882 — def cmd_env_rollback(args) -> int
- cmd_env_recover · function · L1885-L1898 — def cmd_env_recover(args) -> int
- cmd_benchmark · function · L1901-L1970 — def cmd_benchmark(args) -> int
- _daemon_token · function · L1973-L1990 — def _daemon_token(cfg) -> str | None
- _daemon_credential_hint · function · L1993-L2007 — def _daemon_credential_hint(cfg) -> str
- _daemon_request · function · L2010-L2062 — def _daemon_request(cfg, method: str, path: str, body: dict | None = None)
- _require_daemon · function · L2065-L2073 — def _require_daemon(cfg) -> bool
- _parse_duration · function · L2076-L2089 — def _parse_duration(text: str) -> int
- cmd_share · function · L2092-L2174 — def cmd_share(args) -> int
- cmd_relay_serve · function · L2177-L2219 — def cmd_relay_serve(args) -> int
- cmd_relay_gen_token · function · L2222-L2226 — def cmd_relay_gen_token(args) -> int
- cmd_cluster · function · L2229-L2298 — def cmd_cluster(args) -> int
- _team_store · function · L2301-L2308 — def _team_store()
- _read_new_password · function · L2311-L2330 — def _read_new_password(args) -> tuple[str, str | None]
- cmd_user · function · L2333-L2416 — def cmd_user(args) -> int
- build_parser · function · L2419-L2793 — def build_parser() -> argparse.ArgumentParser
- _share_sub · function · L2690-L2694 — def _share_sub(name: str, help_text: str)
- main · function · L2796-L2821 — def main(argv: list[str] | None = None) -> int