Files
hermes-agent/package.json
Zak B. Elep 5f5f8d5b62 fix(cli): drop agent-browser/@streamdown-math from root npm deps
`hermes update` was pruning root-level Node dependencies (agent-browser)
because npm ci always wipes and reifies node_modules according to its
active filter -- no root-first/workspace-first ordering or flag
combination (--workspaces=false, --include-workspace-root, etc.) can
reliably keep a root-only package.json dependency from being pruned by
a subsequent workspace-scoped npm ci. Confirmed empirically and via
npm/cli source (isArboristCmd hardcodes includeWorkspaceRoot=false for
ci/install), so no amount of install-order juggling fixes this for good.

Instead of chasing install order, remove the root-only dependencies
that made the npm step fragile in the first place:

- agent-browser is no longer a root package.json dependency. It
  resolves lazily via `npx agent-browser` (tools/browser_tool.py
  already had this as a fallback; it's now the primary path).
  warm_agent_browser_npx_cache() is called fire-and-forget from both
  `hermes update` and `hermes doctor --fix` to keep npx's cache warm,
  preserving the "available before any session starts" property
  agent-browser had as an eager dependency without re-entangling it
  with the npm workspace graph.
- @streamdown/math moves to apps/desktop/package.json, where it's
  actually imported (markdown-text.tsx, katex-memo.ts) -- it was
  never used anywhere else and was subject to the same pruning risk.
- _update_node_dependencies() collapses to a single
  `npm ci --workspace ui-tui --workspace web` call now that root has
  no dependencies of its own to protect, and keeps its original spot
  ahead of `_build_web_ui()` at both call sites in update_cmd.py --
  with no root-only dependencies left to protect, there's no reason
  for the Node refresh and the web build to run in any particular
  order relative to each other.
- hermes_cli/tools_config.py's post-setup Chromium-install path and
  hermes_cli/doctor.py's agent-browser check both now resolve through
  the same PATH -> Homebrew/Hermes-managed-node -> npx cascade
  (_find_agent_browser / _resolve_npx_bin) instead of hand-rolling
  their own node_modules/.bin lookups, so they can't diverge from what
  browser tools actually invoke at runtime.
- tests-js/package-json-lazy-deps.test.ts gets a lockfile-level check
  mirroring the existing camofox one, so a future regression that
  reintroduces agent-browser into package-lock.json fails this test
  directly instead of relying on manual review to catch it.

Fixes #43564.
2026-08-13 02:38:28 -07:00

76 lines
2.2 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",
"tests-js"
],
"scripts": {
"postinstall": "echo '\u2705 Node dependencies installed. 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",
"check": "npm run --ws check",
"fix": "npm run --ws fix"
},
"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",
"devDependencies": {
"@eslint/js": "9.39.5",
"typescript-eslint": "8.64.0",
"eslint-plugin-perfectionist": "5.10.0",
"eslint-plugin-react-hooks": "7.1.1",
"eslint-plugin-unused-imports": "4.4.1",
"globals": "17.7.0"
},
"overrides": {
"lodash": "4.18.1",
"yauzl": "^3.3.1",
"protobufjs": "^8.7.1",
"brace-expansion": "5.0.9",
"mermaid": "11.16.1",
"dompurify": "3.4.13",
"ip-address": "10.3.1",
"nanoid@^3": "3.3.17",
"nanoid@^6": "6.0.0",
"js-yaml@^4": "4.3.1",
"undici@^6": "6.28.0",
"undici@^7": "7.29.0",
"postcss": "8.5.23",
"tar": "7.5.22"
},
"engines": {
"node": ">=22.22.0",
"npm": "<11.10.0 || >=11.17.0"
},
"allowScripts": {
"unicode-animations": false,
"esbuild@0.28.1": true,
"node-pty@1.1.0": true,
"electron-winstaller@5.4.0": true,
"electron@40.10.2": true,
"fsevents@2.3.2": true,
"fsevents@2.3.3": true,
"get-windows@9.3.0": true
}
}