← Về thư mục
openai4s/tools/contexts.py
- WorkspaceToolContext · class · L14-L35 — class WorkspaceToolContext(Protocol)
- workspace · method · L17-L17 — def workspace(self) -> Path
- relative · method · L19-L19 — def relative(self, path: Path) -> str | None
- resolve · method · L21-L21 — def resolve(self, relative: str, *, must_exist: bool = False) -> Path
- is_secret_path · method · L23-L23 — def is_secret_path(self, path: str) -> bool
- resolved_secret_checker · method · L25-L25 — def resolved_secret_checker(self) -> Callable[[Path], bool]
- verified_read_opener · method · L27-L27 — def verified_read_opener(self) -> Callable[[str | Path], Any]
- open_verified_read · method · L29-L29 — def open_verified_read(self, relative: str | Path) -> Any
- open_verified_directory · method · L31-L31 — def open_verified_directory(self, relative: str | Path) -> Any
- secure_parent · method · L33-L35 — def secure_parent( self, relative: str | Path, *, create_parents: bool = False ) -> Any
- EnvironmentToolContext · class · L38-L43 — class EnvironmentToolContext(Protocol)
- ScienceArtifactToolContext · class · L46-L49 — class ScienceArtifactToolContext(Protocol)
- record_science_artifact · method · L49-L49 — def record_science_artifact(self, result: dict[str, Any]) -> dict[str, Any]
- ControlToolContext · class · L52-L172 — class ControlToolContext
- init · method · L61-L80 — def init( self, workspace: WorkspaceToolContext, *, get_active_env_bin: Callable[[], str | None], get_active_r_env: Callable[[], str | None], set_active_r_env: Callable[[str | None], None], get_on_env_switch: Callable[[], Callable[[str], None] | None], get_stage10_enabled: Callable[[], bool] | None = None, invoke_control: Callable[..., Any] | None = None, search_web: Callable[..., dict[str, Any]] | None = None, ) -> None
- workspace · method · L82-L83 — def workspace(self) -> Path
- relative · method · L85-L86 — def relative(self, path: Path) -> str | None
- resolve · method · L88-L89 — def resolve(self, relative: str, *, must_exist: bool = False) -> Path
- is_secret_path · method · L91-L92 — def is_secret_path(self, path: str) -> bool
- resolved_secret_checker · method · L94-L95 — def resolved_secret_checker(self) -> Callable[[Path], bool]
- verified_read_opener · method · L97-L98 — def verified_read_opener(self) -> Callable[[str | Path], Any]
- open_verified_read · method · L100-L101 — def open_verified_read(self, relative: str | Path) -> Any
- open_verified_directory · method · L103-L104 — def open_verified_directory(self, relative: str | Path) -> Any
- secure_parent · method · L106-L109 — def secure_parent( self, relative: str | Path, *, create_parents: bool = False ) -> Any
- active_env_bin · method · L112-L113 — def active_env_bin(self) -> str | None
- active_r_env · method · L116-L117 — def active_r_env(self) -> str | None
- active_r_env · method · L120-L121 — def active_r_env(self, value: str | None) -> None
- on_env_switch · method · L124-L125 — def on_env_switch(self) -> Callable[[str], None] | None
- invoke · method · L127-L137 — def invoke(self, method: str, *arguments: Any) -> Any
- search_web · method · L139-L160 — def search_web( self, query: Any, *, num_results: int = 8, timeout: float = 20.0, ) -> dict[str, Any]
- record_science_artifact · method · L162-L167 — def record_science_artifact(self, result: dict[str, Any]) -> dict[str, Any]
- stage10_enabled · method · L169-L172 — def stage10_enabled(self) -> bool