← Về thư mục
openai4s/server/agent_run.py
- _never_cancelled · function · L55-L56 — def _never_cancelled() -> bool
- _allow_cell · function · L59-L60 — def _allow_cell(_action: CodeCell) -> None
- _env_switch_notice · function · L63-L101 — def _env_switch_notice(exc: BaseException) -> str
- _is_action_fence · function · L104-L106 — def _is_action_fence(fence_char: str, info: str) -> bool
- _public_prose_before_action · function · L109-L125 — def _public_prose_before_action(text: str) -> str
- _first_code_draft · function · L128-L142 — def _first_code_draft(text: str) -> tuple[str, str, bool] | None
- CodeDraftStreamer · class · L145-L231 — class CodeDraftStreamer
- init · method · L162-L171 — def init(self, send: Callable[[dict], None], root_frame_id: str, turn: int)
- feed · method · L173-L184 — def feed(self, delta: str) -> None
- finalize · method · L186-L188 — def finalize(self, content: str) -> None
- clear · method · L190-L205 — def clear(self, reason: str) -> None
- _project · method · L207-L231 — def _project(self) -> None
- ProseStreamer · class · L234-L312 — class ProseStreamer
- init · method · L242-L257 — def init( self, send: Callable[[dict], None], root_frame_id: str, *, before_first_action: bool = False, )
- feed · method · L259-L289 — def feed(self, delta: str) -> None
- _emit_prose · method · L291-L303 — def _emit_prose(self, chunk: str) -> None
- finalize · method · L305-L312 — def finalize(self) -> None
- WebEventSink · class · L316-L441 — class WebEventSink
- emit · method · L333-L413 — def emit(self, event: AgentEvent) -> None: # Persist the canonical engine event before projecting it to transient # WebSocket/UI state. If persistence fails, execution must not advance # past an unrecorded action boundary.
- _ensure_streamer · method · L415-L422 — def _ensure_streamer(self) -> ProseStreamer
- _publish · method · L424-L441 — def _publish(self, prose: str, *, before_action: bool) -> None
- EventCancellation · class · L445-L449 — class EventCancellation
- cancelled · method · L448-L449 — def cancelled(self) -> bool
- WebActionExecutor · class · L453-L718 — class WebActionExecutor
- execute · method · L477-L580 — def execute( self, action: Action | None, reply: ModelReply, state: RunState ) -> ExecutionOutcome
- _counted_invoke · function · L531-L537 — def _counted_invoke(call)
- _capture_plan · method · L582-L597 — def _capture_plan( self, action: Action | None, reply: ModelReply ) -> ExecutionOutcome
- _refuse_native · method · L600-L627 — def _refuse_native( action: NativeToolBatch, reason: str, stop_reason: str ) -> ExecutionOutcome: # Cancellation and plan mode happen before execution. Close the # provider-native batch with one canonical result per declaration, but # do not run ordinary argument/schema validation: no tool was eligible # to execute, and a validation error would incorrectly hide the real # terminal reason (and make plan/cancel replay misleading).
- _invoke_native · method · L629-L643 — def _invoke_native(self, call, *, apply_pending: bool = True) -> tuple[str, bool]
- invoke · function · L638-L641 — def invoke() -> tuple[str, bool]
- _apply_trailing_pending · method · L645-L664 — def _apply_trailing_pending(self, outcome: ExecutionOutcome) -> ExecutionOutcome
- _legacy_or_nudge · method · L666-L708 — def _legacy_or_nudge(self, reply: ModelReply, state: RunState) -> ExecutionOutcome
- _user_observation · method · L711-L718 — def _user_observation( observation: str, *, completion: Any = None ) -> ExecutionOutcome