Skip to main content

Module home

Module home 

Source
Expand description

Home directory utilities.

All orch state lives under ~/.orch/. This is completely separate from the legacy bash orchestrator’s ~/.orchestrator/ directory — both tools can run side by side without conflicts.

Functions§

config_path
Get the path to the global config file (~/.orch/config.yml).
contexts_dir
Get the path to the contexts directory (~/.orch/contexts/).
db_path
Get the path to the tasks database file (~/.orch/orch.db).
find_orch_serve_pids
Find all PIDs of running orch serve processes.
init_dirs
Pre-create all standard orch directories using async I/O.
kill_other_orch_serve_processes
Send SIGTERM to other running orch serve processes, then SIGKILL stragglers.
orch_home
Get the orch home directory path (~/.orch/).
pid_is_orch_serve
Returns true if the given PID is alive and is an orch serve process.
projects_dir
Get the path to the projects directory (~/.orch/projects/).
repo_state_dir
Get the per-repo state directory: ~/.orch/state/{owner}/{repo}/.
service_version_path
Get the path to the service version file (~/.orch/state/service.version).
skills_dir
Get the path to the skills directory (~/.orch/skills/).
state_dir
Get the orch state directory path (~/.orch/state/).
state_file
Resolve a file inside the state directory, falling back to the legacy location when the file doesn’t exist at the new path yet.
task_attempt_dir
Get the per-task attempt directory: ~/.orch/state/{owner}/{repo}/tasks/{id}/attempts/{n}/.
task_attempt_dir_async
Async version of task_attempt_dir — uses tokio::fs::create_dir_all to avoid blocking the Tokio executor when creating a new directory.
task_dir
Get the per-task directory: ~/.orch/state/{owner}/{repo}/tasks/{id}/.
task_dir_async
Async version of task_dir — uses tokio::fs::create_dir_all to avoid blocking the Tokio executor when creating a new directory.
worktrees_dir
Get the path to the worktrees directory (~/.orch/worktrees/).