Skip to main content

khive_pack_git/
lib.rs

1//! `khive-pack-git` — the git-lifecycle pack (ADR-088, amended by ADR-088
2//! Amendment 1 and ADR-108).
3//!
4//! Contributes three note kinds (`commit`, `issue`, `pull_request`) that make
5//! repository provenance queryable through the KG graph, one read/ingest
6//! agent-facing verb, `git.digest(source, project?, max_items?, include?)`
7//! (`handlers`), that drives the batch, cursor-based ingester (`ingest`)
8//! against either a local path or a remote `https://` URL (cloned/fetched
9//! into a daemon-owned scratch cache, `cache`), and three write verbs
10//! (`write_handlers`, ADR-108) that shell to system git with hardened,
11//! allowlisted argv construction (`write_argv`). See
12//! `docs/adr/ADR-088-git-lifecycle-pack.md`,
13//! `docs/adr/ADR-088-amendment-1-git-digest.md`, and
14//! `docs/adr/ADR-108-git-write-surface.md`.
15//!
16//! | Verb | Args | What it does |
17//! | ---- | ---- | ------------ |
18//! | `git.digest` | `source`, `project?`, `max_items?`, `include?` | Ingest commit/issue/PR provenance from a local path or `https://` URL, bounded and cursor-resumable |
19//! | `git.commit` | `repo`, `message`, `paths?`, `author?` | Stage and commit against a local repo; returns the resulting SHA |
20//! | `git.branch` | `repo`, `name`, `from?` | Create a branch, optionally from a named ref/SHA |
21//! | `git.push` | `repo`, `branch`, `remote?` | Push a branch to a remote; force-push is always denied |
22//!
23//! `kkernel git-ingest` remains the unbounded, all-kinds admin CLI path over
24//! the same shared `ingest::run_ingest` core.
25
26pub mod cache;
27pub mod handlers;
28pub mod hook;
29pub mod ingest;
30mod pack;
31#[cfg(test)]
32mod recovery_tests;
33pub mod refs;
34pub mod source;
35pub(crate) mod vocab;
36pub mod write_argv;
37pub mod write_handlers;
38#[cfg(test)]
39mod write_handlers_tests;
40pub mod write_policy;
41
42pub use pack::GitPack;