← Về thư mục
openai4s/host_dispatch.py
- _HeadlessArtifactWriterCoordinator · class · L69-L105 — class _HeadlessArtifactWriterCoordinator
- init · method · L72-L75 — def init(self) -> None
- background · method · L78-L89 — def background(self) -> Iterator[None]
- foreground_mutation · method · L92-L105 — def foreground_mutation(self, *, execution_bound: bool) -> Iterator[None]
- _short · function · L119-L129 — def _short(v: Any, limit: int = 600) -> Any
- _full_json_text · function · L132-L144 — def _full_json_text(v: Any) -> str
- _domain · function · L147-L148 — def _domain(url: str) -> str
- _configured_bash_allowed_roots · function · L151-L162 — def _configured_bash_allowed_roots() -> list[str]
- _step_begin · function · L165-L452 — def _step_begin(method: str, args: list) -> tuple[str, str, dict] | None
- _gate_target · function · L508-L556 — def _gate_target(method: str, args: list) -> str
- _guardian_file_review · function · L577-L623 — def _guardian_file_review( method: str, args: list, files: WorkspaceFileService, config: Config, approvals_reviewer: str | None = None, ) -> tuple[str | None, bool]
- _secret_pre_gate_path · function · L626-L637 — def _secret_pre_gate_path( target: str, files: WorkspaceFileService, ) -> str
- _plural · function · L640-L641 — def _plural(n: int, word: str) -> str
- _declared_failure_reason · function · L644-L671 — def _declared_failure_reason(result: Any) -> str | None
- _delegate_result_status · function · L686-L706 — def _delegate_result_status(result: Any) -> str
- _delegate_result_word · function · L709-L722 — def _delegate_result_word(result: Any) -> str
- _delegate_summary_text · function · L725-L738 — def _delegate_summary_text(result: dict) -> str
- _delegate_child_view · function · L741-L773 — def _delegate_child_view(result: dict) -> dict
- _delegate_step_projection · function · L776-L817 — def _delegate_step_projection(result: Any, ok: bool) -> tuple[dict, str, str]
- _step_end · function · L820-L1006 — def _step_end(method: str, kind: str, result: Any, ok: bool) -> tuple[dict, str]
- HostDispatcher · class · L1009-L3103 — class HostDispatcher
- init · method · L1014-L1234 — def init( self, cfg: Config | None = None, delegate_fn: Callable[[dict], Any] | None = None, frame_id: str | None = None, workspace: str | Path | None = None, )
- compute · method · L1237-L1256 — def compute(self) -> Any
- last_output · method · L1259-L1261 — def last_output(self) -> dict | None
- last_output · method · L1264-L1268 — def last_output(self, value: dict | None) -> None
- skill_loader · method · L1271-L1274 — def skill_loader(self) -> Any
- skill_disclosure · method · L1277-L1285 — def skill_disclosure(self) -> Any
- bash_generation_id · method · L1288-L1291 — def bash_generation_id(self) -> str | int | None
- bash_generation_id · method · L1294-L1295 — def bash_generation_id(self, value: str | int | None) -> None
- _current_bash_generation · method · L1297-L1302 — def _current_bash_generation(self) -> str | int | None
- bind_bash_generation · method · L1305-L1320 — def bind_bash_generation(self, generation: str | int) -> Iterator[None]
- bind_action_context · method · L1323-L1338 — def bind_action_context(self, context: dict[str, Any] | None) -> Iterator[None]
- _current_action_context · method · L1340-L1342 — def _current_action_context(self) -> dict[str, Any]
- bind_sandbox_status · method · L1345-L1362 — def bind_sandbox_status(self, status: Mapping[str, Any] | None) -> Iterator[None]
- _current_sandbox_status · method · L1364-L1366 — def _current_sandbox_status(self) -> dict[str, Any] | None
- bind_native_artifact_committer · method · L1369-L1387 — def bind_native_artifact_committer( self, commit: Callable[[tuple[dict[str, Any], ...]], list[dict[str, Any]]], ) -> Iterator[None]
- bind_artifact_receipt_scope · method · L1390-L1406 — def bind_artifact_receipt_scope(self) -> Iterator[list[dict[str, Any]]]
- _artifact_capture_bound · method · L1408-L1411 — def _artifact_capture_bound(self) -> bool
- _artifact_scope_required · method · L1413-L1422 — def _artifact_scope_required(self, method: str) -> bool
- _commit_or_queue_artifact_receipt · method · L1424-L1449 — def _commit_or_queue_artifact_receipt(self, result: Any) -> Any
- _canonical_mcp_server · method · L1451-L1485 — def _canonical_mcp_server(self, method: str, args: list) -> list
- set_workspace · method · L1487-L1489 — def set_workspace(self, path: str | Path) -> None
- set_task_mode · method · L1491-L1509 — def set_task_mode(self, mode: str | None) -> None
- binding_task_mode · method · L1512-L1519 — def binding_task_mode(self) -> str | None
- set_task_evidence_scope · method · L1521-L1529 — def set_task_evidence_scope( self, *, turn_id: str | None, branch_id: str | None = None ) -> None
- _audit_bash_result · method · L1531-L1537 — def _audit_bash_result(self, **fields: Any) -> None
- verify_code_evidence · method · L1539-L1547 — def verify_code_evidence(self, payload: Mapping[str, Any]) -> str | None
- revalidate_pending_completion · method · L1549-L1552 — def revalidate_pending_completion(self) -> str | None
- set_session_domain · method · L1554-L1557 — def set_session_domain(self, domain: Any | None) -> None
- set_artifact_restorer · method · L1559-L1576 — def set_artifact_restorer( self, restore: Callable[[str, str], dict] | None, *, mutation_lease: Callable[[bool], Any] | None = None, materialise: Callable[..., dict] | None = None, writer: Callable[[], Any] | None = None, ) -> None
- _restore_artifact_from_foreground · method · L1578-L1590 — def _restore_artifact_from_foreground( self, artifact_id: str, version_id: str ) -> dict
- set_child_execution_policy · method · L1592-L1609 — def set_child_execution_policy(self, policy: ChildExecutionPolicy | None) -> None
- tool_catalog · method · L1611-L1651 — def tool_catalog(self) -> SessionToolCatalog
- control_tool_execution_metadata · method · L1653-L1663 — def control_tool_execution_metadata(self, name: str) -> dict[str, Any]
- control_tool_policy · method · L1665-L1676 — def control_tool_policy(self, name: str, arguments: Any) -> tuple[str, list[str]]
- set_capability_scope · method · L1678-L1700 — def set_capability_scope(self, frame_id: str | None = None) -> None
- _current_capability_scope · method · L1702-L1707 — def _current_capability_scope(self) -> dict[str, str | None]
- _specialist_enabled · method · L1709-L1714 — def _specialist_enabled(self, name: str) -> bool
- _invoke_control_behavior · method · L1716-L1720 — def _invoke_control_behavior(self, method: str, *arguments: Any) -> Any
- _search_web · method · L1722-L1743 — def _search_web( self, query: Any, *, num_results: int = 8, timeout: float = 20.0, ) -> dict[str, Any]
- call · method · L1746-L2055 — def call(self, method: str, args: list) -> Any
- control_handler · function · L1764-L1771 — def control_handler(spec: dict | None = None) -> Any
- _screen_tool_result · method · L2066-L2187 — def _screen_tool_result( self, method: str, result: Any, control_tool: Any | None = None ) -> Any
- _one_llm · method · L2190-L2191 — def _one_llm(self, spec: dict) -> str
- _m_llm · method · L2193-L2194 — def _m_llm(self, spec: dict) -> Any
- _m_current_model · method · L2196-L2197 — def _m_current_model(self) -> str
- _m_list_models · method · L2199-L2200 — def _m_list_models(self) -> list
- _remote_gpu_status_payload · method · L2203-L2204 — def _remote_gpu_status_payload(self) -> dict
- _accelerator_status_payload · method · L2206-L2207 — def _accelerator_status_payload(self) -> dict
- _m_accelerator_status · method · L2209-L2210 — def _m_accelerator_status(self, _spec: dict | None = None) -> dict
- _m_remote_gpu_status · method · L2212-L2214 — def _m_remote_gpu_status(self, _spec: dict | None = None) -> dict
- _m_register_remote_capability · method · L2216-L2217 — def _m_register_remote_capability(self, spec: dict) -> dict
- _m_search_capabilities · method · L2219-L2224 — def _m_search_capabilities(self, spec: dict) -> dict
- _m_session_status · method · L2227-L2228 — def _m_session_status(self, spec: dict | None = None) -> dict
- _m_session_create_checkpoint · method · L2230-L2231 — def _m_session_create_checkpoint(self, spec: dict) -> dict
- _m_session_fork · method · L2233-L2234 — def _m_session_fork(self, spec: dict) -> dict
- _m_session_revert_preview · method · L2236-L2237 — def _m_session_revert_preview(self, spec: dict) -> dict
- _m_session_pending_permissions · method · L2239-L2240 — def _m_session_pending_permissions(self, spec: dict | None = None) -> dict
- _m_dynamic_tool_define · method · L2243-L2244 — def _m_dynamic_tool_define(self, spec: dict) -> dict
- _m_dynamic_tool_list · method · L2246-L2248 — def _m_dynamic_tool_list(self, *_a: Any) -> dict
- _m_dynamic_tool_promote · method · L2250-L2257 — def _m_dynamic_tool_promote(self, spec: dict) -> dict: # Reaching this method means the class-based lifecycle Tool has already # passed HostDispatcher's permission/approval envelope.
- _m_dynamic_tool_versions · method · L2259-L2264 — def _m_dynamic_tool_versions(self, spec: dict | None = None) -> dict
- _m_dynamic_tool_activate · method · L2266-L2274 — def _m_dynamic_tool_activate(self, spec: dict) -> dict: # The concrete class owns schema/policy; reaching this adapter means the # Host permission envelope approved the exact scope/name/version target.
- _m_dynamic_tool_rollback · method · L2276-L2281 — def _m_dynamic_tool_rollback(self, spec: dict) -> dict
- _m_get_user_email · method · L2283-L2290 — def _m_get_user_email(self) -> str
- _r_kernel_available · method · L2292-L2299 — def _r_kernel_available(self) -> bool
- _m_capabilities · method · L2301-L2361 — def _m_capabilities(self) -> dict
- _workspace · method · L2368-L2369 — def _workspace(self) -> Path
- _rel · method · L2371-L2372 — def _rel(self, path: Path) -> str | None
- _resolve · method · L2374-L2375 — def _resolve(self, rel: str, *, must_exist: bool = False) -> Path
- _execute_control_tool · method · L2377-L2382 — def _execute_control_tool(self, host_method: str, spec: dict) -> Any
- _m_authorize_bash · method · L2389-L2392 — def _m_authorize_bash(self, spec: dict) -> dict
- _m_consume_bash_authorization · method · L2394-L2397 — def _m_consume_bash_authorization(self, spec: dict) -> dict
- _m_record_bash_result · method · L2399-L2402 — def _m_record_bash_result(self, spec: dict) -> dict
- _m_egress_check · method · L2404-L2420 — def _m_egress_check(self, spec: dict) -> dict
- _m_read_file · method · L2422-L2423 — def _m_read_file(self, spec: dict) -> dict
- _m_write_file · method · L2425-L2426 — def _m_write_file(self, spec: dict) -> dict
- _m_edit_file · method · L2428-L2429 — def _m_edit_file(self, spec: dict) -> dict
- _m_glob · method · L2431-L2432 — def _m_glob(self, spec: dict) -> dict
- _m_grep · method · L2434-L2435 — def _m_grep(self, spec: dict) -> dict
- _m_list_dir · method · L2437-L2438 — def _m_list_dir(self, spec: dict) -> dict
- _m_web_fetch · method · L2440-L2441 — def _m_web_fetch(self, spec: dict) -> dict
- _m_web_download · method · L2443-L2444 — def _m_web_download(self, spec: dict) -> dict
- _m_web_search · method · L2446-L2447 — def _m_web_search(self, spec: dict) -> dict
- _record_remote_prov · method · L2450-L2464 — def _record_remote_prov( self, service: str, host: str, engine: str | None, remote_dir: str, prov_json_str: str | None, ) -> None
- pop_remote_provenance · method · L2466-L2467 — def pop_remote_provenance(self) -> list
- _m_fold · method · L2469-L2470 — def _m_fold(self, spec: dict) -> dict
- _m_score_mutations · method · L2472-L2473 — def _m_score_mutations(self, spec: dict) -> dict
- _m_request_network_access · method · L2475-L2499 — def _m_request_network_access(self, spec: dict) -> dict
- _m_todo_write · method · L2501-L2502 — def _m_todo_write(self, spec: dict) -> dict
- _m_todo_read · method · L2504-L2505 — def _m_todo_read(self, *_a: Any) -> dict
- _m_plan_update · method · L2510-L2511 — def _m_plan_update(self, spec: dict) -> dict
- _m_plan_read · method · L2513-L2514 — def _m_plan_read(self, *_a: Any) -> dict
- _m_review_status · method · L2516-L2517 — def _m_review_status(self, *_a: Any) -> dict
- _current_env_name · method · L2520-L2524 — def _current_env_name(self) -> str
- _m_env_list · method · L2526-L2527 — def _m_env_list(self, spec: dict | None = None) -> dict
- _m_env_use · method · L2529-L2530 — def _m_env_use(self, spec: dict) -> dict
- _m_env_setup · method · L2532-L2533 — def _m_env_setup(self, spec: dict) -> dict
- _m_load_skill · method · L2535-L2550 — def _m_load_skill(self, name: str) -> dict
- _bind_loaded_skill · method · L2552-L2629 — def _bind_loaded_skill( self, loaded: Mapping[str, Any], *, source: str ) -> str | None
- _m_remember · method · L2631-L2652 — def _m_remember(self, spec: dict) -> dict
- _compute_available · method · L2654-L2660 — def _compute_available(self) -> bool
- _m_compute_submit · method · L2663-L2664 — def _m_compute_submit(self, kw: dict) -> Any
- _submit_to_known_host · method · L2666-L2715 — def _submit_to_known_host(self, kw: dict) -> Any
- _m_compute_result · method · L2717-L2729 — def _m_compute_result(self, kw: dict) -> Any
- _m_compute_cancel · method · L2731-L2732 — def _m_compute_cancel(self, kw: dict) -> Any
- _m_compute_close · method · L2734-L2735 — def _m_compute_close(self, kw: dict) -> Any
- _m_compute_reconcile · method · L2737-L2738 — def _m_compute_reconcile(self, kw: dict) -> Any
- _m_compute_job_history · method · L2740-L2741 — def _m_compute_job_history(self, kw: dict) -> Any
- _m_compute_ssh · method · L2743-L2744 — def _m_compute_ssh(self, kw: dict) -> Any
- _m_compute_scp · method · L2746-L2747 — def _m_compute_scp(self, kw: dict) -> Any
- _m_compute_set_concurrency · method · L2749-L2750 — def _m_compute_set_concurrency(self, kw: dict) -> Any
- _m_compute_status · method · L2752-L2753 — def _m_compute_status(self, kw: dict) -> Any
- _compute_guard · method · L2756-L2777 — def _compute_guard(fn: Callable[[], Any]) -> Any
- _m_query · method · L2780-L2781 — def _m_query(self, spec: dict) -> Any
- _m_query_schema · method · L2783-L2784 — def _m_query_schema(self) -> dict
- _m_artifacts · method · L2787-L2788 — def _m_artifacts(self, filters: dict | None = None) -> dict
- _m_artifact_path · method · L2790-L2791 — def _m_artifact_path(self, version_id: str) -> str
- _m_save_artifact · method · L2793-L2794 — def _m_save_artifact(self, spec: dict) -> dict
- _m_get_artifact_metadata · method · L2796-L2797 — def _m_get_artifact_metadata(self, spec: dict) -> dict
- _m_list_artifact_versions · method · L2799-L2800 — def _m_list_artifact_versions(self, spec: dict) -> dict
- _m_restore_artifact_version · method · L2802-L2803 — def _m_restore_artifact_version(self, spec: dict) -> dict
- _m_materialise_artifact · method · L2805-L2806 — def _m_materialise_artifact(self, spec: dict) -> dict
- _m_view_image · method · L2808-L2809 — def _m_view_image(self, spec: dict) -> dict
- _m_artifact_marker · method · L2811-L2812 — def _m_artifact_marker(self, version_id: str) -> str
- _m_frames · method · L2814-L2815 — def _m_frames(self, spec: dict | None = None) -> Any
- _m_lineage_get · method · L2818-L2819 — def _m_lineage_get(self, version_id: str) -> dict
- _m_lineage_graph · method · L2821-L2822 — def _m_lineage_graph(self, spec: dict) -> dict
- _m_prov_resolve_path · method · L2825-L2826 — def _m_prov_resolve_path(self, path: str) -> Any
- _m_prov_record · method · L2828-L2829 — def _m_prov_record(self, spec: dict) -> dict
- _m_delegate · method · L2832-L2833 — def _m_delegate(self, spec: dict) -> Any
- _m_children · method · L2835-L2836 — def _m_children(self, *_a: Any) -> Any
- _m_collect · method · L2838-L2839 — def _m_collect(self, spec: dict) -> Any
- _m_stop_child · method · L2841-L2842 — def _m_stop_child(self, child_id: str) -> Any
- _m_send_message · method · L2844-L2845 — def _m_send_message(self, spec: dict) -> Any
- _m_delegation_stats · method · L2847-L2848 — def _m_delegation_stats(self, *_a: Any) -> Any
- _m_submit_output · method · L2851-L2852 — def _m_submit_output(self, spec: dict) -> dict
- _m_endpoints_free_port · method · L2855-L2856 — def _m_endpoints_free_port(self, *_a: Any) -> int
- _m_endpoints_list · method · L2858-L2859 — def _m_endpoints_list(self, *_a: Any) -> list
- _m_endpoints_register · method · L2861-L2862 — def _m_endpoints_register(self, spec: dict) -> dict
- _m_endpoints_status · method · L2864-L2865 — def _m_endpoints_status(self, name: str) -> dict
- _m_endpoints_probe · method · L2867-L2868 — def _m_endpoints_probe(self, name: str) -> dict
- _credential_binding · method · L2871-L2884 — def _credential_binding(self) -> str
- _m_credentials_set · method · L2886-L2887 — def _m_credentials_set(self, spec: dict) -> dict
- _m_credentials_get · method · L2889-L2890 — def _m_credentials_get(self, name: str) -> dict
- _m_credentials_issue · method · L2892-L2898 — def _m_credentials_issue(self, spec: dict) -> dict
- _m_credentials_redeem · method · L2900-L2904 — def _m_credentials_redeem(self, token: str) -> dict
- _m_credentials_list · method · L2906-L2907 — def _m_credentials_list(self, *_a: Any) -> list
- _connector · method · L2910-L2911 — def _connector(self, server: str) -> dict | None
- _m_mcp_list · method · L2913-L2914 — def _m_mcp_list(self, *_a: Any) -> list
- _m_mcp_tools · method · L2916-L2917 — def _m_mcp_tools(self, server: str) -> Any
- _m_mcp_resources · method · L2919-L2920 — def _m_mcp_resources(self, spec: dict) -> Any
- _m_mcp_resource_read · method · L2922-L2923 — def _m_mcp_resource_read(self, spec: dict) -> Any
- _m_mcp_prompts · method · L2925-L2926 — def _m_mcp_prompts(self, spec: dict) -> Any
- _m_mcp_prompt_get · method · L2928-L2929 — def _m_mcp_prompt_get(self, spec: dict) -> Any
- _m_mcp_call · method · L2931-L2932 — def _m_mcp_call(self, spec: dict) -> Any
- _new_background_kernel · method · L2935-L2958 — def _new_background_kernel(self) -> Any
- _bg · method · L2960-L2979 — def _bg(self) -> Any
- _m_exec_background · method · L2981-L3000 — def _m_exec_background(self, spec: dict) -> dict: # A third Code-as-Action sink. Foreground Cells and host.bash are # admitted; this one spawns its own worker and used to run whatever # it was given, so a Skill the version blocks stayed reachable by # sending the same code here instead. Only the unconditional half # applies -- a declared raw_required manifest is refused whatever the # sandbox reports, which needs no measured posture.
- _m_exec_peek · method · L3002-L3003 — def _m_exec_peek(self, exec_id: str) -> dict
- _m_exec_interrupt · method · L3005-L3006 — def _m_exec_interrupt(self, exec_id: str) -> dict
- _m_exec_list · method · L3008-L3009 — def _m_exec_list(self, *_a: Any) -> list
- _m_app_render · method · L3022-L3051 — def _m_app_render(self, spec: dict) -> dict
- _m_app_tiles · method · L3053-L3054 — def _m_app_tiles(self, *_a: Any) -> list
- _m_search_skills · method · L3057-L3058 — def _m_search_skills(self, spec: dict) -> list
- _m_list_skills · method · L3060-L3062 — def _m_list_skills(self) -> list
- _m_skills_list · method · L3064-L3065 — def _m_skills_list(self) -> list
- _m_skills_get · method · L3067-L3068 — def _m_skills_get(self, name: str) -> dict
- _m_skills_read · method · L3070-L3085 — def _m_skills_read(self, spec: dict) -> str | dict
- _m_skills_edit · method · L3087-L3088 — def _m_skills_edit(self, spec: dict) -> dict
- _m_skills_publish · method · L3090-L3091 — def _m_skills_publish(self, name: str) -> dict
- _m_skills_delete · method · L3093-L3094 — def _m_skills_delete(self, name: str) -> dict
- _m_skills_status · method · L3096-L3097 — def _m_skills_status(self, spec: dict) -> dict
- _m_skills_history · method · L3099-L3100 — def _m_skills_history(self, spec: dict) -> dict
- _m_skills_rollback · method · L3102-L3103 — def _m_skills_rollback(self, spec: dict) -> dict
- build_dispatcher · function · L3106-L3117 — def build_dispatcher( cfg: Config | None = None, delegate_fn: Callable[[dict], Any] | None = None, frame_id: str | None = None, workspace: str | Path | None = None, ) -> HostDispatcher