[package]
name = "heddle-ingest"
version.workspace = true
edition.workspace = true
authors.workspace = true
description = "Import git history (commits, refs, reflogs) into a native Heddle repository with agent attribution and reasoning annotations."
license.workspace = true
repository.workspace = true

[lib]
path = "src/lib.rs"

name = "ingest"

[dependencies]
objects = { path = "../objects", package = "heddle-objects", version = "0.8", features = ["memory-backend"] }
refs = { path = "../refs", package = "heddle-refs", version = "0.8" }
oplog = { path = "../oplog", package = "heddle-oplog", version = "0.8" }
# `default-features = false` here breaks repo's automatic zstd
# cascade so this crate's own `zstd` feature controls the chain end-
# to-end. Re-enabled via the forwarded feature below by default.
repo = { path = "../repo", package = "heddle-repo", version = "0.8", default-features = false, features = ["git-overlay"] }
semantic = { path = "../semantic", package = "heddle-semantic", version = "0.8" }

anyhow.workspace = true
chrono.workspace = true
# `bundled` vendors the SQLite C source so ingest doesn't depend on a
# system libsqlite3 version. OpenCode's SQLite is read-only to us.
rusqlite.workspace = true
# Drives the now-`async` ref/oplog backend reads to completion on the
# import path. The local `RefManager`/`OpLog` futures are always
# immediately-ready, and `pollster` is not a Tokio runtime, so blocking
# on them is safe even when `import_git_into` is called from inside the
# CLI's Tokio runtime (a nested `tokio::Runtime::block_on` would panic).
pollster = "0.4"
rmp-serde.workspace = true
rustls.workspace = true
serde = { workspace = true }
serde_json.workspace = true
sley.workspace = true
thiserror.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true

[features]
# Forward zstd compression so the import path actually compresses
# pack entries. Without this `CompressionConfig::default().enabled =
# false` and every object takes the raw fallback branch (correct,
# just bigger packs). On by default; turn off with
# `--no-default-features` for a slimmer build.
default = ["zstd"]
zstd = ["objects/zstd", "repo/zstd"]

[dev-dependencies]
tempfile.workspace = true
