Skip to content

fix(build): Include apps/shared in nix npm package - #67082

Open
ankhers wants to merge 1 commit into
NousResearch:mainfrom
ankhers:fix_nix_tui_build
Open

fix(build): Include apps/shared in nix npm package#67082
ankhers wants to merge 1 commit into
NousResearch:mainfrom
ankhers:fix_nix_tui_build

Conversation

@ankhers

@ankhers ankhers commented Jul 18, 2026

Copy link
Copy Markdown

What does this PR do?

Includes apps/shared in the TUI build for nix.

Related Issue

Fixes #67079

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

Included apps/shared in nix/tui.nix

How to Test

  1. nix build .#tui

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/tui Terminal UI (ui-tui/ + tui_gateway/) area/nix Nix flake, NixOS module, container packaging labels Jul 18, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Nix packaging fix. Current main still has nix/tui.nix:4 passing only ui-tui to mkNpmPassthru, while ui-tui/package.json:22 declares @hermes/shared as file:../apps/shared and ui-tui/src/app/slash/commands/topup.ts:1 imports its charge-settlement subpath. nix/lib.nix:174-185 builds the filtered source only from the supplied directories, so adding apps/shared directly addresses the reported resolution failure. This matches the established web and desktop pattern in nix/web.nix:4-10 and nix/desktop.nix:20-26.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 19, 2026
@ak2k

ak2k commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

This is identical to #67090 (both add apps/shared to nix/tui.nix's dirs) — worth consolidating so only one carries the fix.

For context on urgency: .#tui has been red on main since #51639 landed the /topup command. ui-tui/src/app/slash/commands/topup.ts imports @hermes/shared/charge-settlement, but nix/tui.nix's source scope was dirs = [ "ui-tui" ] while web.nix and desktop.nix already list apps/shared for the same file: dep. So esbuild can't resolve it in the sandbox:

ui-tui/src/app/slash/commands/topup.ts:1:62: ERROR: Could not resolve "@hermes/shared/charge-settlement"

Merging either PR unblocks the .#tui/.#desktop flake outputs for downstream consumers. (Separately, it'd be nice to stop this class of drift recurring — the dirs list has to be hand-mirrored to each package's file: deps — but that's a follow-up, not a blocker here.)

@cedhuf

cedhuf commented Jul 20, 2026

Copy link
Copy Markdown

Hi,
Still reproducing on current main, this blocks every Nix build of hermes-agent, so NixOS deployments are fully stuck.

nix/tui.nix still filters the source down to ui-tui only:

npm = hermesNpmLib.mkNpmPassthru { dirs = [ "ui-tui" ]; };

But ui-tui/src/app/slash/commands/topup.ts imports from the apps/shared workspace:

import { driveChargeSettlement, type SettlementOutcome } from '@hermes/shared/charge-settlement'

so apps/shared is absent from the build sandbox and esbuild fails:

ui-tui/src/app/slash/commands/topup.ts:1:62: ERROR: Could not resolve "@hermes/shared/charge-settlement"

Failure chain: hermes-tui-0.0.1.drvhermes-agent-0.18.2.drvnixos-system-*.drv, so the whole system closure fails to build (not just the TUI).

This PR's one-line fix (adding apps/shared to dirs) looks correct to me. Any chance of a review? It's been open ~2 days and it's a hard blocker for anyone consuming the flake on NixOS.

Thanks.
Br,

@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown

This was generated by AI during triage.

Summary

Six PRs address or reference this issue complex. #67082, #67090, #67098, #67475, and #67885 add apps/shared to the Nix TUI source filter for the missing @hermes/shared/charge-settlement source, while #67104 combines that same Nix change with the only Honcho response-model workaround for #67013.

Related pull requests

Duplicates

#67098, #67475, and #67885 are functional duplicates of #67082; #67090 targets the same change but its displayed diff contains conflict markers. The Nix portion of #67104 also duplicates #67082, although #67104 is not a full duplicate because it contains the separate Honcho workaround.

Suggested consolidation

Keep #67082 open with a salvage path: its focused diff directly restores the missing apps/shared workspace source and agrees with its automated keep-open verdict and recorded best-fix selections for #67056/#67079; #67090, #67098, #67475, and #67885 can remain closed as duplicates of #67082. Author action for #67104: rebase or split out the independently reviewable Honcho workaround, remove the duplicate Nix change, and add the PeerResponse regression coverage requested by its contributor keep-open review.

Complex graph

flowchart TD
    classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
    classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
    classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
    classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
    classDef best stroke-width:3px,stroke:#b45309
    classDef target stroke-width:3px,stroke:#4338ca
    I67056(["issue #67056 (open)"])
    I67079(["issue #67079 (open)"])
    subgraph Dup67082 ["PRs duplicating each other"]
        P67082["PR #67082 (open)"]
        P67090["PR #67090 (closed)"]
        P67098["PR #67098 (closed)"]
        P67104["PR #67104 (open)"]
        P67475["PR #67475 (closed)"]
        P67885["PR #67885 (closed)"]
    end
    P67082 -->|best fix| I67056
    P67082 -->|best fix| I67079
    class I67056 open
    class I67079 open
    class P67082 open
    class P67090 closed
    class P67098 closed
    class P67104 open
    class P67475 closed
    class P67885 closed
    class P67082 best
    class P67082 best
    class P67104 best
    class P67082 target
    click I67056 "https://github.com/NousResearch/hermes-agent/issues/67056"
    click I67079 "https://github.com/NousResearch/hermes-agent/issues/67079"
    click P67082 "https://github.com/NousResearch/hermes-agent/pull/67082"
    click P67090 "https://github.com/NousResearch/hermes-agent/pull/67090"
    click P67098 "https://github.com/NousResearch/hermes-agent/pull/67098"
    click P67104 "https://github.com/NousResearch/hermes-agent/pull/67104"
    click P67475 "https://github.com/NousResearch/hermes-agent/pull/67475"
    click P67885 "https://github.com/NousResearch/hermes-agent/pull/67885"
Loading

Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label).

Cross-PR triage: Reviewed 6 pull requests and 3 issues in this complex. Each diff was read against this issue; Assessment working set: 4 kB of PR diffs, 15 kB of issue/PR text, 6 kB of discussion (13 comments), 16 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/nix Nix flake, NixOS module, container packaging comp/tui Terminal UI (ui-tui/ + tui_gateway/) P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: TUI fails to build in nix environment

6 participants