← Về thư mục
openai4s/kernel/manager.py
- _sandbox_mode · function · L37-L39 — def _sandbox_mode() -> str
- _kernel_runtime_read_roots · function · L46-L80 — def _kernel_runtime_read_roots( python: str, argv: list[str] | None, env_root: str | None, ) -> tuple[Path, ...]
- _StderrTail · class · L99-L150 — class _StderrTail
- init · method · L114-L118 — def init(self, budget: int) -> None
- feed · method · L120-L128 — def feed(self, data: bytes) -> None
- retained_bytes · method · L131-L132 — def retained_bytes(self) -> int
- truncated · method · L135-L136 — def truncated(self) -> bool
- text · method · L138-L142 — def text(self) -> str: # A budget cut lands wherever the byte count ran out, which is # mid-character often enough to matter;
replace keeps the tail # readable rather than raising on the boundary.
- iter · method · L146-L147 — def iter(self)
- bool · method · L149-L150 — def bool(self) -> bool
- InterruptDelivery · class · L162-L181 — class InterruptDelivery
- bool · method · L180-L181 — def bool(self) -> bool
- _signal_worker_main_thread · function · L190-L235 — def _signal_worker_main_thread(pid: int, signum: int) -> bool
- Kernel · class · L238-L1070 — class Kernel
- init · method · L239-L329 — def init( self, dispatcher: Dispatcher | None = None, cwd: str | None = None, mode: str = "repl", python: str | None = None, env_root: str | None = None, env_name: str | None = None, argv: list[str] | None = None, sandbox: KernelSandbox | None = None, read_isolation: KernelReadIsolation | None = None, capture_sinks: bool = False, transport_factory: Callable[[], KernelTransport] | None = None, )
- _spawn · method · L331-L401 — def _spawn(self) -> "subprocess.Popen | None"
- _initialize_skill_sidecar_attestation · method · L403-L489 — def _initialize_skill_sidecar_attestation(self) -> None
- _expire_initialization · function · L425-L437 — def _expire_initialization() -> None
- _child_env · method · L491-L506 — def _child_env(self) -> dict: # Build from a strict runtime allowlist: daemon LLM/provider keys, # cloud credentials and loader-injection variables must never enter a # Python/R worker or any subprocess launched from a cell.
- _send · method · L508-L509 — def _send(self, obj: dict) -> None
- _readline · method · L511-L518 — def _readline(self) -> dict | None
- execute · method · L520-L689 — def execute( self, code: str, origin: str = "agent", on_chunk: Callable[[str], None] | None = None, *, cell_id: str | None = None, action_context: dict[str, Any] | None = None, ) -> dict
- bind_action_context · method · L692-L707 — def bind_action_context(self, context: dict[str, Any] | None)
- inspect_variables · method · L709-L759 — def inspect_variables(self, *, limit: int = 200) -> dict[str, Any]
- pid · method · L762-L769 — def pid(self) -> int | None
- sandbox_status · method · L772-L803 — def sandbox_status(self) -> dict[str, Any]
- adopt_authorization_generation · method · L805-L828 — def adopt_authorization_generation(self, generation: str) -> None
- interrupt · method · L830-L891 — def interrupt(self) -> "InterruptDelivery"
- kill_worker · method · L893-L926 — def kill_worker(self) -> None
- _service_host_call · method · L928-L987 — def _service_host_call(self, frame: dict) -> None
- restart · method · L989-L1051 — def restart(self) -> None
- is_alive · method · L1053-L1054 — def is_alive(self) -> bool
- shutdown · method · L1056-L1064 — def shutdown(self) -> None
- enter · method · L1066-L1067 — def enter(self) -> "Kernel"
- exit · method · L1069-L1070 — def exit(self, *exc: object) -> None