← Về thư mục
openai4s/server/cell_run.py
- _bounded_live_output · function · L39-L45 — def _bounded_live_output(value: Any) -> str
- _runtime_files_read · function · L48-L64 — def _runtime_files_read(result: dict[str, Any]) -> list[str]
- _take_artifact_receipts · function · L67-L78 — def _take_artifact_receipts(result: dict[str, Any]) -> list[dict[str, Any]]
- _no_attempt_allocate · function · L81-L88 — def _no_attempt_allocate( session: "CellSession", request: CellRequest, cell_id: str, action_group_id: str | None, ) -> None
- _allow_cell · function · L91-L92 — def _allow_cell(session: "CellSession", request: CellRequest) -> None
- _no_capture_lease · function · L95-L97 — def _no_capture_lease(session: "CellSession", request: CellRequest) -> Any
- _no_attempt_milestone · function · L100-L101 — def _no_attempt_milestone(attempt_id: str) -> None
- _no_attempt_generation · function · L104-L107 — def _no_attempt_generation( attempt_id: str, session: "CellSession", language: str ) -> None
- _never_cancelled · function · L110-L111 — def _never_cancelled(session: "CellSession") -> bool
- _no_attempt_finish · function · L114-L115 — def _no_attempt_finish(attempt_id: str, terminal_state: str, error: Any = None) -> None
- CellSession · class · L118-L123 — class CellSession(Protocol)
- CellExecutionPorts · class · L127-L185 — class CellExecutionPorts
- _worker_failure_text · function · L234-L263 — def _worker_failure_text(exc: BaseException, public: dict) -> str
- CellExecutionService · class · L266-L972 — class CellExecutionService
- init · method · L267-L276 — def init( self, ports: CellExecutionPorts, *, id_factory: Callable[[], str] | None = None, title_factory: Callable[[str, int], str] | None = None, ) -> None
- execute · method · L278-L305 — def execute( self, session: CellSession, request: CellRequest, emit: EventSink, *, action_group_id: str | None = None, ) -> CellExecutionResult: # Acquire before readiness or identity allocation. A background race # must refuse the Cell without inventing a Cell id/attempt, touching a # runtime, or allowing any workspace side effect.
- _execute_admitted · method · L307-L630 — def _execute_admitted( self, session: CellSession, request: CellRequest, emit: EventSink, *, action_group_id: str | None = None, ) -> CellExecutionResult
- _start_stream · method · L632-L722 — def _start_stream( self, session: CellSession, request: CellRequest, emit: EventSink, index: int, cell_id: str, kernel_id: str, title: str, generation_id: str | None, ) -> ChunkSink | None
- on_chunk · function · L690-L720 — def on_chunk(text: str) -> None
- _soft_error · method · L724-L808 — def _soft_error( self, session: CellSession, request: CellRequest, emit: EventSink, index: int, cell_id: str, kernel_id: str, message: str, attempt_id: str | None, terminal_state: str, generation_id: str | None, *, interrupted: bool = False, ) -> CellExecutionResult
- _finish_attempt · method · L810-L862 — def _finish_attempt( self, attempt_id: str | None, terminal_state: str, error: Any = None, ) -> None
- _emit_finished · method · L865-L908 — def _emit_finished( session: CellSession, request: CellRequest, emit: EventSink, index: int, cell_id: str, kernel_id: str, result: dict[str, Any], capture: CaptureResult, generation_id: str | None, ) -> None
- _record · method · L910-L940 — def _record( self, session: CellSession, request: CellRequest, index: int, kernel_id: str, result: dict[str, Any], capture: CaptureResult, ) -> None
- _generation_id · method · L943-L950 — def _generation_id(session: CellSession, language: str) -> str | None
- _emit_error · method · L953-L972 — def _emit_error( emit: EventSink, frame_id: str, message: str, *, producing_cell_id: str | None = None, ) -> None
- activity_title · function · L975-L985 — def activity_title(code: str, index: int) -> str
- _session_sandbox_status · function · L988-L1006 — def _session_sandbox_status( session: CellSession, language: str ) -> dict[str, Any] | None
- _error_result · function · L1009-L1019 — def _error_result(cell_id: str, message: str) -> dict[str, Any]