Expand description
ai6-safehouse-git: the git safe-house provider. Each Mission gets a worktree of the
Operation’s checkout on a new branch; the work is read back as commits. A spec with
clone_to gets a clone of a repository instead, saved to a branch it shares. The Git logic
is plain Rust in worktree.rs and clone.rs; this file is the thin layer that implements
the kind.
§ai6-safehouse-git
The git safe-house provider for AI6: each Mission
works in its own Git worktree on its own branch, cut from the Operation’s checkout. An
untouched worktree and its branch are removed when the Mission ends; one that holds
commits or edits is kept and reported. See the
API header.
§Features
- A worktree per Mission under AI6’s state directory, never inside the checkout.
- Branch names from a template (
{id},{slug},{operation}), made safe for Git refs. - Commits since the base, with author, committer and message, for cover checks.
- Re-attaches to a kept worktree after the daemon restarts, and can work in place.
- Clones a repository (URL or local, created bare on request) on one branch and saves to that shared branch by fast-forward, replaying once and falling back to a branch of its own; Moneypenny’s personal and shared repositories use it.
§Installation
Part of the AI6 workspace; built with it. It needs git on the PATH of the Station
that loads it, and nothing else does.
cargo build -p ai6 --features cli -p ai6-safehouse-git§Quick start
cargo run -p ai6 --features cli -- serve --plugin-path target/debugand in operations.toml:
[operation.G]
path = "~/work/project"
workspace = { provider = "git", settings = { base = "main", branch = "ai6/{id}-{slug}" } }§Development
cargo test -p ai6-safehouse-git
cargo clippy -p ai6-safehouse-git --all-targets -- -D warnings§License
MPL-2.0. See LICENSE.
Structs§
- Git
- Makes a Mission’s workspace with Git: a worktree, or a clone.
- GitConfig
gitprovider configuration; every field has a default. The fields in theoperationsection are an Operation’s to set (workspace.settings); the Station’s placement reads them to build each Mission’sSafeHouseSpecand its checkpoints. The others are the Station’s.
Statics§
- guatiao_
declares - What this library declares, read by a scanner as data.
Functions§
- guatiao_
library_ ⚠entry - The symbol a
guatiaohost loads this library by.