← Về thư mục
openai4s/sdk/host.py
- _to_camel · function · L44-L46 — def _to_camel(snake: str) -> str
- _to_snake · function · L49-L57 — def _to_snake(camel: str) -> str
- _wire · function · L60-L62 — def _wire(**kwargs: Any) -> dict
- encode_args · function · L65-L78 — def encode_args(args: list) -> list
- decode_args · function · L81-L93 — def decode_args(args: list) -> list
- _Skills · class · L115-L190 — class _Skills
- init · method · L123-L124 — def init(self, host_call: Callable[[str, list], Any])
- list · method · L126-L128 — def list(self) -> list[dict]
- get · method · L130-L132 — def get(self, name: str) -> dict
- read · method · L134-L136 — def read(self, name: str, path: str = "SKILL.md") -> str
- edit · method · L138-L156 — def edit( self, name: str, path: str, content: str, old_string: str | None = None ) -> dict
- publish · method · L158-L160 — def publish(self, name: str) -> dict
- delete · method · L162-L164 — def delete(self, name: str) -> dict
- status · method · L166-L169 — def status(self, name: str, scope: str = "personal") -> dict
- history · method · L171-L182 — def history( self, name: str, scope: str = "personal", limit: int = 50, ) -> dict
- rollback · method · L184-L190 — def rollback(self, name: str, version_id: str, scope: str = "personal") -> dict
- _Query · class · L193-L234 — class _Query
- init · method · L200-L201 — def init(self, host_call: Callable[[str, list], Any])
- call · method · L203-L230 — def call( self, sql: str, params: list | None = None, limit: int | None = None, df: bool = False, scope: str = "project", ) -> Any
- schema · method · L232-L234 — def schema(self) -> dict
- _LineageEntry · class · L237-L244 — class _LineageEntry(dict)
- getattr · method · L240-L244 — def getattr(self, item: str) -> Any
- _Lineage · class · L247-L273 — class _Lineage
- init · method · L250-L251 — def init(self, host_call: Callable[[str, list], Any])
- getitem · method · L253-L254 — def getitem(self, version_id: str) -> _LineageEntry
- graph · method · L256-L273 — def graph( self, version_id: str, direction: str = "up", max_depth: int | None = None, max_nodes: int | None = None, ) -> dict
- _Endpoints · class · L276-L298 — class _Endpoints
- init · method · L279-L280 — def init(self, host_call: Callable[[str, list], Any])
- list · method · L282-L283 — def list(self) -> list[dict]
- free_port · method · L285-L287 — def free_port(self) -> int
- register · method · L289-L291 — def register(self, name: str, **spec: Any) -> dict
- status · method · L293-L294 — def status(self, name: str) -> dict
- probe · method · L296-L298 — def probe(self, name: str) -> dict
- _Credentials · class · L301-L330 — class _Credentials
- init · method · L304-L305 — def init(self, host_call: Callable[[str, list], Any])
- set · method · L307-L308 — def set(self, name: str, value: str) -> dict
- get · method · L310-L312 — def get(self, name: str) -> str
- issue · method · L314-L324 — def issue( self, name: str, *, purpose: str = "host credential access", ttl_seconds: float = 30.0, ) -> dict
- redeem · method · L326-L327 — def redeem(self, token: str) -> dict
- list · method · L329-L330 — def list(self) -> list[str]
- _Mcp · class · L333-L384 — class _Mcp
- init · method · L336-L337 — def init(self, host_call: Callable[[str, list], Any])
- list · method · L339-L341 — def list(self) -> list[dict]
- tools · method · L343-L345 — def tools(self, server: str) -> Any
- resources · method · L347-L352 — def resources(self, server: str, *, cursor: str | None = None) -> dict
- read_resource · method · L354-L359 — def read_resource(self, server: str, uri: str) -> dict
- prompts · method · L361-L366 — def prompts(self, server: str, *, cursor: str | None = None) -> dict
- get_prompt · method · L368-L378 — def get_prompt( self, server: str, name: str, arguments: dict[str, str] | None = None, ) -> dict
- call · method · L380-L384 — def call(self, server: str, tool: str, args: dict | None = None) -> Any
- _Env · class · L387-L423 — class _Env
- init · method · L395-L396 — def init(self, host_call: Callable[[str, list], Any])
- list · method · L398-L403 — def list(self, packages: list[str] | None = None) -> dict
- use · method · L405-L409 — def use(self, name: str) -> dict
- list_dependencies · method · L411-L414 — def list_dependencies(self, packages: list[str] | None = None) -> dict
- create · method · L416-L423 — def create( self, name: str | None = None, packages: list[str] | None = None ) -> dict
- _App · class · L426-L436 — class _App
- init · method · L429-L430 — def init(self, host_call: Callable[[str, list], Any])
- render · method · L432-L433 — def render(self, kind: str, payload: Any) -> dict
- tiles · method · L435-L436 — def tiles(self) -> list[dict]
- _Science · class · L439-L474 — class _Science
- init · method · L446-L447 — def init(self, host_call: Callable[[str, list], Any])
- list_databases · method · L449-L450 — def list_databases(self, domain: str = "all") -> dict
- search · method · L452-L474 — def search( self, database: str, query: str, *, limit: int = 10, cursor: str | None = None, filters: dict[str, Any] | None = None, timeout: float = 30.0, ) -> dict
- _Host · class · L487-L1238 — class _Host
- init · method · L488-L531 — def init( self, host_call: Callable[[str, list], Any], denied: frozenset[str] = frozenset(), bash_authorizer: Callable[[str, list], Any] | None = None, generation: str | None = None, ): # Wrap the raw RPC so every SDK call encodes its args for the wire # (snake->camel + drop-None) exactly once, transparently to accessors.
- _encoded_call · function · L497-L498 — def _encoded_call(method: str, args: list) -> Any
- _encoded_bash_authorizer · function · L500-L502 — def _encoded_bash_authorizer(method: str, args: list) -> Any
- getattribute · method · L533-L545 — def getattribute(self, name: str) -> Any: # Enforce the splice gate: a denied control-plane symbol is absent, # exactly as if its SDK fragment had never been concatenated in. This # covers class-level methods (delegate/children/...) that can't simply # be left unset in init.
- llm · method · L548-L605 — def llm( self, request: str | dict | list, *, max_tokens: int = 1024, temperature: float = 0.7, max_concurrency: int | None = None, ) -> Any
- _norm · function · L566-L587 — def _norm(item: str | dict) -> dict
- artifacts · method · L608-L610 — def artifacts(self, **filters: Any) -> dict
- artifact_path · method · L612-L614 — def artifact_path(self, version_id: str) -> str
- save_artifact · method · L616-L653 — def save_artifact( self, path: str, filename: str | None = None, *, content_type: str | None = None, input_version_ids: list[str] | None = None, producing_cell_id: str | None = None, priority: int = 0, source: Any = None, ) -> dict
- view_image · method · L655-L659 — def view_image( self, version_id: str | None = None, *, path: str | None = None ) -> dict
- artifact_marker · method · L661-L669 — def artifact_marker(self, version_id: str) -> str
- frames · method · L671-L703 — def frames( self, *, frame_id: str | None = None, pattern: str | None = None, project_id: str = "default", status: str | None = None, roots_only: bool = True, page: int = 0, page_size: int = 50, limit: int = 50, ) -> Any
- current_model · method · L706-L708 — def current_model(self) -> str
- list_models · method · L710-L712 — def list_models(self) -> list[dict]
- capabilities · method · L714-L716 — def capabilities(self) -> dict
- get_user_email · method · L718-L720 — def get_user_email(self) -> str
- exec_background · method · L723-L725 — def exec_background(self, code: str, *, origin: str = "agent") -> dict
- exec_peek · method · L727-L729 — def exec_peek(self, exec_id: str) -> dict
- exec_interrupt · method · L731-L733 — def exec_interrupt(self, exec_id: str) -> dict
- exec_list · method · L735-L736 — def exec_list(self) -> list[dict]
- delegate · method · L739-L788 — def delegate( self, request: Any, *, task: str | None = None, name: str | None = None, context_summary: str | None = None, output_schema: dict | None = None, steps: int | None = None, max_steps: int | None = None, max_turns: int | None = None, permissions: dict[str, str] | None = None, capabilities: list[str] | None = None, unrestricted: bool | None = None, require_artifacts: list[str] | None = None, retries: int | None = None, wait: bool = True, ) -> Any
- children · method · L790-L792 — def children(self) -> list[dict]
- collect · method · L794-L806 — def collect( self, child_ids: list[str] | str | None = None, *, timeout: float | None = None ) -> Any
- stop_child · method · L808-L810 — def stop_child(self, child_id: str) -> dict
- send_message · method · L812-L814 — def send_message(self, child_id: str, message: str) -> dict
- delegation_stats · method · L816-L818 — def delegation_stats(self) -> dict
- submit_output · method · L821-L869 — def submit_output( self, output: Any, completion_bullets: list[str], *, output_schema: dict | None = None, task_status: str | None = None, source_files: list | None = None, entry_points: list | None = None, architecture_summary: str | None = None, test_evidence: list | None = None, ) -> dict
- search_skills · method · L872-L880 — def search_skills(self, query: str, *, limit: int = 5) -> list[dict]
- skill · method · L882-L884 — def skill(self, name: str) -> dict
- load_skill · method · L886-L890 — def load_skill(self, name: str) -> dict
- bash · method · L896-L907 — def bash( self, command: str, *, timeout: float = 120, workdir: str | None = None ) -> dict
- read_file · method · L909-L913 — def read_file(self, path: str, *, offset: int = 0, limit: int = 2000) -> dict
- write_file · method · L915-L917 — def write_file(self, path: str, content: str) -> dict
- edit_file · method · L919-L933 — def edit_file( self, path: str, old_string: str, new_string: str, *, replace_all: bool = False ) -> dict
- glob · method · L935-L937 — def glob(self, pattern: str, *, path: str | None = None) -> dict
- grep · method · L939-L945 — def grep( self, pattern: str, *, path: str | None = None, include: str | None = None ) -> dict
- list_dir · method · L947-L949 — def list_dir(self, path: str = ".") -> dict
- materialise_artifact · method · L951-L967 — def materialise_artifact( self, version_id: str, *, filename: str | None = None ) -> dict
- web_fetch · method · L969-L1000 — def web_fetch( self, url: str, *, format: str = "markdown", timeout: float = 30, max_chars: int = 20000, method: str = "GET", user_agent: str | None = None, ) -> dict
- web_download · method · L1002-L1024 — def web_download( self, url: str, path: str, *, max_bytes: int | None = None, timeout: float = 60, user_agent: str | None = None, ) -> dict
- web_search · method · L1026-L1036 — def web_search( self, query: str, *, num_results: int = 8, timeout: float = 20 ) -> dict
- remote_gpu_status · method · L1038-L1045 — def remote_gpu_status(self) -> dict
- accelerator_status · method · L1047-L1053 — def accelerator_status(self) -> dict
- stage_model_asset · method · L1055-L1072 — def stage_model_asset( self, source_path: str, *, asset_name: str | None = None, expected_sha256: str | None = None, ) -> dict
- register_remote_capability · method · L1074-L1117 — def register_remote_capability( self, alias: str, capability: str, *, script: str = "", engine: str = "", invoke: str = "", markers: dict | None = None, notes: str = "", probe: dict[str, str] | None = None, verify_command: str = "", ) -> dict
- fold · method · L1119-L1158 — def fold( self, sequence: str, *, name: str = "protein", gpu: int | str = 0, cycle: int | str = 10, step: int | str = 40, ) -> dict
- score_mutations · method · L1160-L1193 — def score_mutations( self, sequence: str, *, name: str = "protein", positions: list | tuple | str | None = None, gpu: int | str = 0, ) -> dict
- request_network_access · method · L1195-L1206 — def request_network_access(self, domain: str, *, reason: str | None = None) -> dict
- todo_write · method · L1208-L1211 — def todo_write(self, todos: list[dict]) -> dict
- todo_read · method · L1213-L1215 — def todo_read(self) -> dict
- plan_update · method · L1217-L1225 — def plan_update(self, step_id: str, status: str, note: str | None = None) -> dict
- plan_read · method · L1227-L1229 — def plan_read(self) -> dict
- review_status · method · L1231-L1233 — def review_status(self) -> dict
- remember · method · L1235-L1238 — def remember(self, content: str, *, block: str = "general") -> dict
- build_host · function · L1241-L1275 — def build_host( host_call: Callable[[str, list], Any], mode: str = "repl", *, bash_authorizer: Callable[[str, list], Any] | None = None, generation: str | None = None, ) -> _Host