EAPI=8 inherit cmake DESCRIPTION="Workbench: projects, conversations and agent runs through AIRouter (C++)" HOMEPAGE="https://trunkmasters.com/workbench" # The shared memory export compiles AIRouter's legacy-memory component from AIRouter's # own source archive (the same version as the AIRouter package it pairs with). AIROUTER_PV="1.0.0_pre20261022" SRC_URI="https://www.hedronfire.com/distfiles/${P}.tar.gz https://www.hedronfire.com/distfiles/airouter-${AIROUTER_PV}.tar.gz" # The application carries no grant of an open-source license. LICENSE="all-rights-reserved" SLOT="0" KEYWORDS="~amd64" RESTRICT="mirror bindist" DEPEND=" =dev-libs/boost-1.91.0* =dev-libs/openssl-3.6.5* =dev-db/postgresql-18.6* =dev-cpp/nlohmann_json-3.12.0* =dev-cpp/tomlplusplus-3.4.0* =dev-cpp/jsoncons-1.6.0* " # Runtime: the AIRouter API for turns, Citadel sign-in, the Codegraph engine (Node) # in bubblewrap, ffmpeg and the local whisper-server for voice input, sudo for the # admin tools and the root release executor, curl/runuser/prlimit for the verifiers. RDEPEND=" ${DEPEND} acct-user/workbench acct-group/workbench app-admin/sudo >=net-misc/airouter-${AIROUTER_PV} sys-auth/citadel dev-util/codegraph net-libs/nodejs media-video/ffmpeg app-accessibility/whisper-cpp dev-vcs/git net-misc/curl sys-apps/acl sys-apps/bubblewrap sys-apps/util-linux " BDEPEND=" =dev-cpp/catch-3.15.3* >=dev-lang/python-3.11 " src_configure() { # The project refuses in-source builds and requires an absolute build root. export WORKBENCH_CPP_BUILD_ROOT="${WORKDIR}/build" local mycmakeargs=( -DWB_SANITIZER=none -DWB_AIROUTER_MEMORY_SOURCE="${WORKDIR}/airouter-${AIROUTER_PV}" ) cmake_src_configure } src_test() { # The end-to-end tests need PostgreSQL and sockets; they run outside the sandbox. cmake_src_test -R '^unit$' } src_install() { cmake_src_install newinitd "${ED}"/usr/share/workbench/openrc/workbenchd.initd workbenchd newconfd "${ED}"/usr/share/workbench/openrc/workbenchd.confd workbenchd # /var/lib/workbench (the workspaces, with their ACLs) is not the package's to set. } pkg_postinst() { elog "workbenchd serves /run/workbench/http.socket (symlinked from /run/workbench.sock)" elog "for Apache, AIRouter's wb-mcp and task gateways. It needs WB_SESSION_SECRET in" elog "/etc/workbench/secrets.env and the workbench database. Then: rc-service workbenchd start." }