Skip to main content

ryu_workspace/
lib.rs

1//! Git-native workspace primitive for Ryu.
2//!
3//! The git/worktree engine extracted from `apps/core/src/server/{git,worktree}.rs`.
4//! It shells `git`/`gh` against a caller-supplied cwd and owns:
5//!
6//! - **[`worktree`]** — per-run worktrees (`create_worktree_in` → an isolated
7//!   `ryu/run-<id>` branch under `.ryu-worktrees/`, `Drop`-on-completion cleanup),
8//!   the aggregate run diff ([`worktree::worktree_diff`]), and whole-tree apply
9//!   ([`worktree::apply_worktree`]: commit → merge-into-base OR commit → push →
10//!   `gh pr create`).
11//! - **[`git`]** — read-only status/branches plus checkout/create-branch/
12//!   commit-push helpers.
13//!
14//! In-process by default: every entry point is a plain function call, never IPC.
15//! ZERO dependency on `apps/core` — the only kernel coupling is the Windows
16//! console-suppression [`win_process::NoWindow`] util, vendored verbatim. The
17//! axum HTTP handlers that call these functions, the live `WorktreeDiffStore`
18//! run-state, and the ChatStreamRequest→cwd threading all stay in Core.
19
20mod win_process;
21
22pub mod git;
23pub mod worktree;