Skip to main content

Crate ryu_workspace

Crate ryu_workspace 

Source
Expand description

Git-native workspace primitive for Ryu.

The git/worktree engine extracted from apps/core/src/server/{git,worktree}.rs. It shells git/gh against a caller-supplied cwd and owns:

  • worktree — per-run worktrees (create_worktree_in → an isolated ryu/run-<id> branch under .ryu-worktrees/, Drop-on-completion cleanup), the aggregate run diff (worktree::worktree_diff), and whole-tree apply (worktree::apply_worktree: commit → merge-into-base OR commit → push → gh pr create).
  • git — read-only status/branches plus checkout/create-branch/ commit-push helpers.

In-process by default: every entry point is a plain function call, never IPC. ZERO dependency on apps/core — the only kernel coupling is the Windows console-suppression [win_process::NoWindow] util, vendored verbatim. The axum HTTP handlers that call these functions, the live WorktreeDiffStore run-state, and the ChatStreamRequest→cwd threading all stay in Core.

Modules§

git
The git engine: read-only status/branches plus checkout/create-branch/ commit-push, all shelling git against a caller-supplied cwd. This is the “reads/runs what-is, no policy” half of the workspace primitive; the axum HTTP handlers that call these functions stay in Core (server wiring), as do the pure-filesystem /api/workspace/{new-folder,list} handlers (they shell no git — node-fs, kernel-owned).
worktree