hermes-agent/package.json
Zak B. Elep 1c0437dfc5 fix(install): scope npm installs/audits to avoid pulling in apps/desktop
Root package.json uses apps/* workspaces glob which unconditionally
includes apps/desktop (Electron + node-pty@1.1.0, ~200MB, requires
make/g++ to build) in every unscoped npm command run from the repo root.

This commit addresses the core problem by adding explicit workspace
scoping to all internal npm calls:

hermes_cli/main.py (_build_web_ui):
  - Add --workspace web to the npm install call so only the web
    workspace deps are resolved, never apps/desktop.

hermes_cli/tools_config.py:
  - Add --workspaces=false to agent-browser and Camofox root installs
    so only root-level deps (agent-browser, @streamdown/math) are
    installed, bypassing the workspace graph entirely.

hermes_cli/doctor.py (run_doctor npm audit):
  - Replace the single unscoped 'npm audit --json' at PROJECT_ROOT with
    three scoped invocations:
      * --workspaces=false for root deps (Browser tools)
      * --workspace web for the web workspace
      * --workspace ui-tui for the TUI workspace
  - Update remediation hints to use matching scoped 'npm audit fix'
    commands so users don't accidentally trigger a desktop rebuild.

package.json:
  - Add convenience scripts for scoped operations:
      npm run install:root  / install:web / install:tui / install:desktop
      npm run audit:root    / audit:web   / audit:tui
      npm run audit:fix:root / audit:fix:web / audit:fix:tui
    These give developers and CI a safe, explicit interface for the
    most common per-workspace tasks without accidentally pulling desktop.

Fixes #38772
2026-06-06 18:22:20 -07:00

44 lines
1.4 KiB
JSON

{
"name": "hermes-agent",
"version": "1.0.0",
"description": "An AI agent with advanced tool-calling capabilities, featuring a flexible toolsets system for organizing and managing tools.",
"private": true,
"workspaces": [
"apps/*",
"ui-tui",
"ui-tui/packages/*",
"web"
],
"scripts": {
"postinstall": "echo '✅ Browser tools ready. Run: python run_agent.py --help'",
"install:root": "npm install --workspaces=false",
"install:web": "npm install --workspace web",
"install:tui": "npm install --workspace ui-tui",
"install:desktop": "npm install --workspace apps/desktop",
"audit:root": "npm audit --workspaces=false",
"audit:web": "npm audit --workspace web",
"audit:tui": "npm audit --workspace ui-tui",
"audit:fix:root": "npm audit fix --workspaces=false",
"audit:fix:web": "npm audit fix --workspace web",
"audit:fix:tui": "npm audit fix --workspace ui-tui"
},
"repository": {
"type": "git",
"url": "git+https://github.com/NousResearch/Hermes-Agent.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/NousResearch/Hermes-Agent/issues"
},
"homepage": "https://github.com/NousResearch/Hermes-Agent#readme",
"dependencies": {
"@streamdown/math": "^1.0.2",
"agent-browser": "^0.26.0"
},
"overrides": {
"lodash": "4.18.1"
},
"engines": {
"node": ">=20.0.0"
}
}