Synced from monorepo Changes: - Temporarily disable session share link creation in the TUI - Do not approve plan on empty Enter from the revise prompt - Expose chat product Skills via ACP available_commands_update - Return immediately from a blocking wait on an already-completed ACP task - Split headless pager module for clearer structure - Stop git worktree prune from removing user registrations on resume - Use compaction sampler tokenizer for item token counts - Opt-in extra root CAs via GROK_EXTRA_CA_BUNDLE - Cancel all session subagents when the user stops - Let the session persistence actor exit when its session ends - Make fullscreen terminal resize much cheaper on long sessions - Report honestly from kill_task when an ACP task does not exist - Hide /usage for external-auth deployments - Forward the history-load trailer’s computer_reason to the client - Remove ineffective no-op tool reminder - Declare slash-command screen-mode support in one place - Keep settings enum picker on the committed value until Enter - Reap a PTY’s full process tree - Stream tool calls from headless mode over ACP - Bridge gateway task lifecycle to ACP for chat session background tasks - Don’t warn about truncated history on a suppressed replay - Fit full-replace summarizer input and recover on context-length errors - Stop dropping agents over an unrecognized frontmatter color - Add /undo as a slash alias for /rewind - Harden sleep/wake token-refresh paths against forced re-login - Add session/list ACP method - Give each sampling backend its own conversion module - Treat an unenrolled child process as a lint error - Suppress the cancelled marker on send-now wake turns - Stop tearing down Roslyn on every edit, and read C# diagnostics Source-Revision: 2a28b4a86cfc4a4c133c35b7fc2a6a9964387c39
305 lines
9.9 KiB
TOML
305 lines
9.9 KiB
TOML
[package]
|
|
name = "xai-grok-pager"
|
|
version = "0.2.116"
|
|
edition.workspace = true
|
|
license = "Apache-2.0"
|
|
authors = ["xAI"]
|
|
|
|
[dependencies]
|
|
# TTY safety — detach subprocesses from the controlling terminal
|
|
dunce = { workspace = true }
|
|
xai-tty-utils = { workspace = true }
|
|
xai-grok-version = { workspace = true }
|
|
|
|
# Shared prompt-queue wire types
|
|
xai-prompt-queue = { workspace = true }
|
|
|
|
# Presentation-primitives layer (extracted)
|
|
xai-grok-pager-render = { path = "../xai-grok-pager-render" }
|
|
|
|
# Rendering
|
|
ratatui = { workspace = true, features = ["crossterm", "unstable-widget-ref"] }
|
|
xai-grok-announcements = { workspace = true }
|
|
crossterm = { workspace = true, features = ["event-stream", "bracketed-paste"] }
|
|
textwrap = { workspace = true }
|
|
regex = { workspace = true }
|
|
unicode-width = { workspace = true }
|
|
unicode-segmentation = { workspace = true }
|
|
strip-ansi-escapes = { workspace = true }
|
|
enum_delegate = { workspace = true }
|
|
|
|
# Markdown / syntax highlighting
|
|
xai-grok-markdown = { workspace = true }
|
|
# Inline Mermaid rendering engine. Always compiled (no feature gate): the
|
|
# dagre-based vendored engine renders detected ```mermaid fences out of process,
|
|
# gated only at runtime by the `appearance.render_mermaid` setting.
|
|
xai-grok-mermaid = { workspace = true }
|
|
syntect = { workspace = true }
|
|
|
|
# Data
|
|
similar = { workspace = true }
|
|
indexmap = { workspace = true }
|
|
blake3 = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
toml = { workspace = true }
|
|
toml_edit = { workspace = true, features = ["serde"] }
|
|
|
|
# ANSI parsing (tracing pane)
|
|
ansi-to-tui = { workspace = true }
|
|
|
|
# PTY for ssh wrapper, e2e tests, and benchmarking.
|
|
portable-pty = "0.9"
|
|
|
|
# Utilities
|
|
derive_more = { workspace = true, features = ["deref", "deref_mut"] }
|
|
anyhow = { workspace = true }
|
|
shlex = { workspace = true }
|
|
clap = { workspace = true, features = ["derive"] }
|
|
clap_complete = { workspace = true }
|
|
rand = { workspace = true }
|
|
tokio = { workspace = true, features = [
|
|
"sync",
|
|
"rt",
|
|
"macros",
|
|
"rt-multi-thread",
|
|
"signal",
|
|
"io-util",
|
|
"io-std",
|
|
] }
|
|
tokio-util = { workspace = true, features = ["compat"] }
|
|
tracing = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
|
|
# Binary hardening: compile-time string obfuscation.
|
|
# (cryptify / rustls / semver / tikv-jemallocator moved to the composition-root
|
|
# binary `xai-grok-pager-bin` with `main.rs`; this lib no longer references them.)
|
|
obfstr = { workspace = true }
|
|
|
|
# Fuzzy matching (history search daemon)
|
|
nucleo = { workspace = true }
|
|
|
|
# Prompt text input
|
|
xai-ratatui-textarea = { workspace = true }
|
|
xai-ratatui-inline = { workspace = true }
|
|
|
|
# Update
|
|
xai-grok-update = { path = "../xai-grok-update" }
|
|
|
|
# ACP
|
|
agent-client-protocol = { workspace = true }
|
|
xai-acp-lib = { workspace = true }
|
|
xai-file-utils = { path = "../xai-file-utils" }
|
|
xai-grok-config = { workspace = true }
|
|
# Voice dictation. `audio` (mic capture) is enabled on every target. On
|
|
# macOS/Windows it links cpal; on Linux it compiles a subprocess-recorder
|
|
# backend instead, so cpal -> alsa-sys never reaches the static musl binary
|
|
# (cpal is target-gated to non-Linux inside xai-grok-voice).
|
|
xai-grok-voice = { path = "../xai-grok-voice", default-features = false, features = ["audio"] }
|
|
xai-grok-shell = { workspace = true }
|
|
xai-grok-workspace = { workspace = true }
|
|
xai-token-estimation = { workspace = true }
|
|
xai-grok-telemetry = { workspace = true }
|
|
xai-fast-worktree = { path = "../xai-fast-worktree", features = ["metadata"] }
|
|
backon = { workspace = true }
|
|
chrono = { workspace = true }
|
|
flate2 = { workspace = true }
|
|
tar = { workspace = true }
|
|
xai-grok-tools = { workspace = true }
|
|
xai-grok-agent = { workspace = true }
|
|
xai-grok-plugin-marketplace = { path = "../xai-grok-plugin-marketplace" }
|
|
xai-hooks-plugins-types = { path = "../xai-hooks-plugins-types" }
|
|
wait-timeout = { workspace = true }
|
|
xai-grok-sandbox = { path = "../xai-grok-sandbox", default-features = false }
|
|
|
|
# Base64 encoding for image data
|
|
base64 = { workspace = true }
|
|
|
|
# Image decoding/resizing for clipboard image validation before send
|
|
image = { workspace = true, features = ["png", "jpeg", "tiff", "gif", "webp"] }
|
|
|
|
# ID generation
|
|
uuid = { workspace = true, features = ["v4"] }
|
|
|
|
# Path computation (plan file, etc.)
|
|
dirs = { workspace = true }
|
|
shellexpand = "3.1"
|
|
|
|
# libgit2 for the startup git-info populator (no fork/exec, runs once on launch
|
|
# in spawn_blocking; the render path never touches git directly).
|
|
git2 = { version = "0.20", default-features = false, features = [
|
|
"vendored-libgit2",
|
|
] }
|
|
urlencoding = { workspace = true }
|
|
|
|
# Parsing (web_search)
|
|
url = { workspace = true }
|
|
|
|
# Crash diagnostics
|
|
xai-crash-handler = { path = "../xai-crash-handler" }
|
|
|
|
# Non-poisoning mutex for signal handler (active-sessions crash recovery).
|
|
parking_lot.workspace = true
|
|
|
|
# nix: signal handling in notifications/.
|
|
# signal-hook: SIGWINCH handler for the `grok wrap` PTY wrapper (pty_wrap.rs).
|
|
# libc: poll/read for non-blocking terminal reads in theme/osc11.rs.
|
|
[target.'cfg(unix)'.dependencies]
|
|
nix = { workspace = true, features = ["signal"] }
|
|
signal-hook = { workspace = true }
|
|
libc = { workspace = true }
|
|
|
|
# core-foundation: IOKit power assertions for sleep prevention (SleepInhibitor).
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
core-foundation = { workspace = true }
|
|
|
|
# SetConsoleCtrlHandler for the exec-emulating screen-mode relaunch
|
|
# (`/minimal` / `/fullscreen`): the waiting parent must ignore console Ctrl
|
|
# events so only the relaunched child handles them. Version matches the other
|
|
# in-repo consumers (xai-crash-handler, xai-system-power).
|
|
[target.'cfg(windows)'.dependencies]
|
|
windows-sys = { version = "0.59", features = ["Win32_System_Console"] }
|
|
|
|
[dev-dependencies]
|
|
xai-grok-pager-render = { path = "../xai-grok-pager-render", features = ["test-support"] }
|
|
xai-grok-shell = { workspace = true, features = ["test-support"] }
|
|
pretty_assertions = { workspace = true }
|
|
insta = { workspace = true }
|
|
criterion = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
serial_test = { workspace = true }
|
|
xai-grok-agent = { workspace = true }
|
|
xai-grok-pager-pty-harness = { path = "../xai-grok-pager-pty-harness" }
|
|
# In-process leader-cluster harness (mock inference server; no cycle:
|
|
# xai-grok-test-support depends on neither the pager nor the shell).
|
|
xai-grok-test-support = { workspace = true, features = [] }
|
|
# Ring CryptoProvider install for the in-process leader-cluster tests. Explicit
|
|
# spec mirroring the shell's, NOT `workspace = true`: the workspace pin enables
|
|
# aws-lc-rs, under which `rustls::crypto::ring` does not exist. Dev-only — the
|
|
# production lib deliberately dropped rustls (moved to xai-grok-pager-bin).
|
|
rustls = { version = "0.23", default-features = false, features = [
|
|
"ring",
|
|
"logging",
|
|
"std",
|
|
"tls12",
|
|
] }
|
|
|
|
[[bench]]
|
|
name = "render"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "search"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "edit_highlight"
|
|
harness = false
|
|
|
|
[[bench]]
|
|
name = "resize"
|
|
harness = false
|
|
|
|
# PTY integration tests are split into coherent scheduling families. The test
|
|
# modules remain under tests/pty_e2e/; these roots only define which cases share
|
|
# one Cargo/Bazel process. All cases stay #[ignore]d for ordinary Cargo runs.
|
|
# Selected Cargo runs must provide PAGER_BINARY; Bazel wires the sibling binary.
|
|
[[test]]
|
|
name = "doctor_early_dispatch"
|
|
path = "tests/doctor_early_dispatch.rs"
|
|
|
|
[[test]]
|
|
name = "pty_e2e_smoke"
|
|
path = "tests/pty_e2e_smoke.rs"
|
|
|
|
[[test]]
|
|
name = "pty_e2e_queue"
|
|
path = "tests/pty_e2e_queue.rs"
|
|
|
|
[[test]]
|
|
name = "pty_e2e_scroll_selection"
|
|
path = "tests/pty_e2e_scroll_selection.rs"
|
|
|
|
[[test]]
|
|
name = "pty_e2e_minimal"
|
|
path = "tests/pty_e2e_minimal.rs"
|
|
|
|
[[test]]
|
|
name = "pty_e2e_config_ui"
|
|
path = "tests/pty_e2e_config_ui.rs"
|
|
|
|
[[test]]
|
|
name = "pty_e2e_shell_tools"
|
|
path = "tests/pty_e2e_shell_tools.rs"
|
|
|
|
[[test]]
|
|
name = "pty_e2e_persistence"
|
|
path = "tests/pty_e2e_persistence.rs"
|
|
|
|
[[test]]
|
|
name = "pty_e2e_clipboard"
|
|
path = "tests/pty_e2e_clipboard.rs"
|
|
|
|
# Leader-mode PTY e2e — split from ordinary PTY families so multi-process
|
|
# cluster bring-up never contends with their bounded pools.
|
|
[[test]]
|
|
name = "leader_pty_e2e"
|
|
path = "tests/leader_pty_e2e/mod.rs"
|
|
|
|
# Settings modal regression tests — keyboard/mouse dispatch + registry
|
|
# contracts. Not gated by `--ignored`; runs on every `cargo test`.
|
|
[[test]]
|
|
name = "settings_e2e"
|
|
path = "tests/settings_e2e.rs"
|
|
|
|
# Declarative scripted TUI scenarios — opt-in because they spawn the real pager.
|
|
[[test]]
|
|
name = "scripted_scenarios"
|
|
path = "tests/scripted_scenarios.rs"
|
|
|
|
# Permission Auto mode PTY e2e (Shift+Tab → Auto banner via PtyHarness).
|
|
[[test]]
|
|
name = "pty_auto_mode"
|
|
path = "tests/pty_auto_mode.rs"
|
|
|
|
[[bin]]
|
|
name = "mouse-events-playground"
|
|
path = "src/bin/mouse_events_playground.rs"
|
|
|
|
[[bin]]
|
|
name = "scrollback-selection-playground"
|
|
path = "src/bin/scrollback_selection_playground.rs"
|
|
|
|
[[bin]]
|
|
name = "question-view-playground"
|
|
path = "src/bin/question_view_playground.rs"
|
|
|
|
[[bin]]
|
|
name = "todo-pane-playground"
|
|
path = "src/bin/todo_pane_playground.rs"
|
|
|
|
# Opt into [workspace.lints.clippy] (too_many_arguments etc.). Without this,
|
|
# `cargo clippy --workspace -- -D warnings` on this package is stricter than
|
|
# the workspace-default clippy allows used in CI.
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = ["jemalloc", "sandbox-enforce"]
|
|
default-bazel = [
|
|
"jemalloc",
|
|
"sandbox-enforce",
|
|
"test-support",
|
|
]
|
|
# No-op on this crate: the actual `#[global_allocator]` (and the
|
|
# `tikv-jemallocator` dep) live on the composition-root binary
|
|
# `xai-grok-pager-bin`, which owns `main.rs`. Kept as an empty feature so the
|
|
# workspace-uniform `[jemalloc, sandbox-enforce]` default set resolves
|
|
# here too and the generated `crate_features` stay valid.
|
|
jemalloc = []
|
|
sandbox-enforce = ["xai-grok-sandbox/enforce"]
|
|
release-dist = []
|
|
# Exposes test-only view-model constructors/setters (e.g. `test_agent_view`,
|
|
# `AgentSession::set_yolo_mode_for_test`) to sibling crates' test builds — used
|
|
# by `xai-grok-pager-minimal`'s unit tests. Never enabled in production builds.
|
|
test-support = ["xai-grok-pager-render/test-support"]
|