mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
Handle queued-title ValueError cleanup during session init, harden Discord message source building for test stubs, and fix the Dockerfile contract test syntax error. Also refresh the TUI lockfile and Nix build flags so nix ubuntu-latest no longer fails on npm lock/peer resolution drift.
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
# nix/tui.nix — Hermes TUI (Ink/React) compiled with tsc and bundled
|
|
{ pkgs, hermesNpmLib, ... }:
|
|
let
|
|
src = ../ui-tui;
|
|
npmDeps = pkgs.fetchNpmDeps {
|
|
inherit src;
|
|
hash = "sha256-Chz+NW9NXqboXHOa6PKwf5bhAkkcFtKNhvKWwg2XSPc=";
|
|
};
|
|
|
|
npm = hermesNpmLib.mkNpmPassthru { folder = "ui-tui"; attr = "tui"; pname = "hermes-tui"; };
|
|
|
|
packageJson = builtins.fromJSON (builtins.readFile (src + "/package.json"));
|
|
version = packageJson.version;
|
|
in
|
|
pkgs.buildNpmPackage (npm // {
|
|
pname = "hermes-tui";
|
|
inherit src npmDeps version;
|
|
|
|
doCheck = false;
|
|
npmFlags = [ "--legacy-peer-deps" ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/lib/hermes-tui
|
|
|
|
cp -r dist $out/lib/hermes-tui/dist
|
|
|
|
# runtime node_modules
|
|
cp -r node_modules $out/lib/hermes-tui/node_modules
|
|
|
|
# @hermes/ink is a file: dependency, we need to copy it in fr
|
|
rm -f $out/lib/hermes-tui/node_modules/@hermes/ink
|
|
cp -r packages/hermes-ink $out/lib/hermes-tui/node_modules/@hermes/ink
|
|
|
|
# package.json needed for "type": "module" resolution
|
|
cp package.json $out/lib/hermes-tui/
|
|
|
|
runHook postInstall
|
|
'';
|
|
})
|