mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 07:03:15 +08:00
1.2 KiB
1.2 KiB
Local Public Tools
This project exposes local atomic capabilities as shared public tools for all agents.
Included P0 tools
run_commandread_filewrite_fileedit_file
Included P1/P2/P3 tools
list_directorymove_filedelete_filemkdirsearch_filesget_cwdcdget_envset_envlist_processeskill_processbailian_webparser(DashScope WebParser compatibility tool)
Loading path
- Files live under
runtime/tools/public/. - They are auto-discovered by
runtime/tools/public_registry.py(*_toolfactory naming). - Final exposure is controlled in
runtime/tools/catalog.py.
Risk gating
read_fileisrisk_level=lowand visible by default.run_command,write_file,edit_filearerisk_level=high.- High-risk public tools are hidden unless
AIA_PUBLIC_TOOLS_ALLOW_HIGH=1.
Local backend adapter
- Adapter path:
runtime/tools/local_sdk/adapter.py. - Uses a self-implemented local backend (cross-platform) with a stable tool contract.
Path behavior defaults
run_command: whencwdis omitted, it runs in workspace root.write_file: absolute path is used directly; relative path is written underdata/workspace.