← Về thư mục
openai4s/server/completion_gate.py
- terminal_for_review · function · L29-L52 — def terminal_for_review(result: Mapping[str, Any]) -> tuple[str, str]
- message_review_metadata · function · L55-L72 — def message_review_metadata(gate: Mapping[str, Any]) -> dict[str, Any]
- CompletionGateService · class · L75-L803 — class CompletionGateService
- init · method · L78-L93 — def init( self, *, store: Any, config: Any, scientific_review: Any, auto_mode: Any | None = None, auto_repair: Any | None = None, ) -> None
- feature_enabled · method · L96-L98 — def feature_enabled(self) -> bool
- active_mode · method · L100-L116 — def active_mode(self, root_frame_id: str) -> str
- _frozen_mode · method · L118-L122 — def _frozen_mode(self, root_frame_id: str, *, mode_override: str | None) -> str
- gates_turn · method · L124-L129 — def gates_turn( self, root_frame_id: str, *, mode_override: str | None = None ) -> bool
- load · method · L131-L139 — def load(self, root_frame_id: str) -> dict[str, Any] | None
- gate_after_turn · method · L141-L377 — def gate_after_turn( self, *, root_frame_id: str, project_id: str, branch_id: str, turn_id: str, execution_id: str, user_request: str, candidate_answer: str, structured_completion: Any = None, artifact_versions_before: Mapping[str, Any] | None = None, produced_artifacts: list[Mapping[str, Any]] | None = None, cell_count_before: int = 0, step_count_before: int = 0, agent_cfg: Any, reviewer_cfg: Any, emit: EventSink | None = None, checkpoint_id: str | None = None, cancel: Callable[[], bool] | None = None, mode_override: str | None = None, # Compatibility-only no-ops. This method never stamps a row, and a # changed repair is always returned for explicit promotion. stamp_message: bool | None = None, deliver_replacement: bool | None = None, ) -> dict[str, Any] | None
- finalize_after_delivery · method · L379-L704 — def finalize_after_delivery( self, root_frame_id: str, branch_id: str, result: Mapping[str, Any], delivered: bool, emit: EventSink | None = None, message_id: str | None = None, expected_message_content: str | None = None, message_metadata: Mapping[str, Any] | None = None, promoted_message_content: str | None = None, completion_delivery_id: str | None = None, ) -> dict[str, Any]
- _missing_proof · method · L707-L723 — def _missing_proof( root_frame_id: str, branch_id: str, turn_id: str, execution_id: str, error: Exception, ) -> dict[str, Any]
- _cancel_requested · method · L726-L732 — def _cancel_requested(cancel: Callable[[], bool] | None) -> bool
- _finalization_failure · method · L735-L767 — def _finalization_failure( result: Mapping[str, Any], *, reason: str ) -> dict[str, Any]
- _event_cursor · method · L769-L778 — def _event_cursor(self, root_frame_id: str, branch_id: str) -> int
- _publish_new_events · method · L780-L803 — def _publish_new_events( self, root_frame_id: str, branch_id: str, after_cursor: int, emit: EventSink | None, ) -> None