# Copyright 2026 BaldEagleOS Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 RUST_MIN_VER="1.88.0" inherit cargo # Cargo.lock has over 300 crates; the bundled registry preserves lock checksums. ECARGO_VENDOR="${WORKDIR}/${P}-crates" DESCRIPTION="Agent Smith terminal assistant with local tools and central AIRouter sessions" HOMEPAGE="https://trunkmasters.com" SRC_URI=" https://distfiles.baldeagleos.com/${P}.tar.xz https://distfiles.baldeagleos.com/${P}-crates.tar.xz " # Includes the statically linked Rust dependencies. LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CDLA-Permissive-2.0 ISC MIT MIT-0 Unicode-3.0 ZLIB" SLOT="0" KEYWORDS="~amd64" IUSE="sandbox test" RESTRICT="!test? ( test )" # Integration fixtures bind loopback sockets; they do not contact live services. PROPERTIES="test? ( test_network )" DEPEND=" dev-db/sqlite:3 dev-libs/openssl:0= " RDEPEND=" ${DEPEND} net-misc/openssh sandbox? ( sys-apps/bubblewrap ) " BDEPEND=" virtual/pkgconfig test? ( app-shells/bash sys-apps/coreutils ) " src_configure() { cargo_src_configure --frozen } src_compile() { cargo_src_compile --bin smith } src_test() { # The isolated sshd fixture needs root; bubblewrap namespace fixtures # cannot run reliably inside Portage's own sandbox. Run these separately # when qualifying upstream, along with the opt-in live rotation test. local CARGO_SKIP_TESTS=( openssh_bootstrap_and_installed_shape_cli mtls_local_tools_and_central_resume_use_real_agent_state_machine workspace_escape_conflicts_and_uncertain_operations_are_rejected ) cargo_src_test --bin smith --test end_to_end } src_install() { dobin "$(cargo_target_dir)/smith" dodoc README.md DESIGN.md PRODUCT.md dodoc config/smith.example.toml } pkg_postinst() { elog "Run smith to start a conversation in the current directory." elog "Up/Down recall prompts; Alt+Enter inserts a newline; /help lists controls." elog "It uses your existing SSH access to alpha.trunkmasters.com." elog "It follows your existing SSH identity, port and host-key settings." elog "Optional settings: ~/.config/smith/smith.toml (example in /usr/share/doc/${PF})." }