Publish harness and TUI open-source

initial sync from the monorepo
This commit is contained in:
grokkybara[bot] 2026-07-16 06:46:02 +01:00
commit c68e39f604
2734 changed files with 1437016 additions and 0 deletions

View file

@ -0,0 +1,97 @@
[package]
name = "xai-grok-pager-bin"
version = "0.1.220-alpha.4"
edition.workspace = true
license = "Apache-2.0"
authors = ["xAI"]
default-run = "xai-grok-pager"
# Composition-root binary for the Grok Build TUI. The artifact is still named
# `xai-grok-pager`. This package exists so the binary can link both the pager
# library and the optional `xai-grok-pager-minimal` render mode: `minimal`
# depends on `xai-grok-pager`, so the pager library cannot depend back on it
# (cargo cycle). The binary installs the minimal-mode IoC hooks at startup.
[[bin]]
name = "xai-grok-pager"
path = "src/main.rs"
[dependencies]
# The pager library (all application logic + the public API main.rs drives).
xai-grok-pager = { path = "../xai-grok-pager" }
# Optional scrollback-native render mode, wired in via the fn-pointer seam.
xai-grok-pager-minimal = { path = "../xai-grok-pager-minimal" }
# Agent runtime + leader/stdio/headless entry points.
xai-grok-shell = { workspace = true }
xai-grok-update = { path = "../xai-grok-update" }
xai-grok-version = { workspace = true }
xai-grok-telemetry = { workspace = true }
xai-grok-workspace = { workspace = true }
xai-crash-handler = { path = "../xai-crash-handler" }
xai-acp-lib = { workspace = true }
# Async runtime + misc.
tokio = { workspace = true, features = [
"sync",
"rt",
"macros",
"rt-multi-thread",
"signal",
"io-util",
"io-std",
] }
tokio-util = { workspace = true, features = ["compat"] }
anyhow = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
serde_json = { workspace = true }
dunce = { workspace = true }
semver = { workspace = true }
xai-tty-utils = { workspace = true }
xai-grok-config = { workspace = true }
xai-grok-sandbox = { path = "../xai-grok-sandbox", default-features = false }
rustls = { version = "0.23", default-features = false, features = [
"ring",
"logging",
"std",
"tls12",
] }
# Binary hardening: compile-time string + control-flow obfuscation.
obfstr = { workspace = true }
cryptify = { workspace = true }
[target.'cfg(unix)'.dependencies]
libc = { workspace = true }
# Default allocator on Unix; gated by the `jemalloc` feature (see main.rs
# `#[global_allocator]`, cfg(all(feature = "jemalloc", unix))).
# `stats` is binary-scoped only (not workspace-wide) so this CLI jemalloc
# link gets --enable-stats for stats.allocated / stats.resident mallctl.
tikv-jemallocator = { workspace = true, optional = true, features = ["stats"] }
# Raw mallctl for the memory-cliff arena purge hook (see
# `purge_jemalloc_retained_pages` + the `install_release_hook` call in
# main.rs). Same version family as the
# allocator; adds no new build units beyond what tikv-jemallocator pulls in.
tikv-jemalloc-sys = { workspace = true, optional = true }
# Heap-profile / stats mallctl helpers (prof.active, prof.dump, epoch, stats.*).
tikv-jemalloc-ctl = { workspace = true, optional = true, features = ["stats", "use_std"] }
[dev-dependencies]
serial_test = { workspace = true }
# `PagerArgs::try_parse_from` in the CLI-parsing unit tests (needs the
# `clap::Parser` trait in scope).
clap = { workspace = true, features = ["derive"] }
[features]
default = [
"jemalloc",
"sandbox-enforce",
]
default-bazel = [
"jemalloc",
"sandbox-enforce",
]
jemalloc = ["dep:tikv-jemallocator", "dep:tikv-jemalloc-sys", "dep:tikv-jemalloc-ctl"]
# Forward the sandbox-enforcement feature to the library.
sandbox-enforce = ["xai-grok-pager/sandbox-enforce"]
release-dist = ["xai-grok-pager/release-dist"]

View file

@ -0,0 +1,24 @@
use std::process::Command;
fn main() {
println!("cargo:rerun-if-changed=.git/HEAD");
println!("cargo:rerun-if-env-changed=GROK_VERSION");
let commit = Command::new("git")
.args(["rev-parse", "--short", "HEAD"])
.output()
.ok()
.filter(|o| o.status.success())
.and_then(|o| String::from_utf8(o.stdout).ok())
.map(|s| s.trim().to_string())
.unwrap_or_else(|| "unknown".to_string());
let version = std::env::var("GROK_VERSION")
.or_else(|_| std::env::var("CARGO_PKG_VERSION"))
.unwrap_or_else(|_| "0.0.0".to_string());
println!(
"cargo:rustc-env=VERSION_WITH_COMMIT={} ({})",
version, commit
);
}

File diff suppressed because it is too large Load diff