Files
hermes-agent/tools/environments
ethernet 84e2250b10 fix(windows): packaged-npx install failures degrade to plain npx; payload venv must be real
Review follow-ups on the packaged-npx and payload-venv commits.

_packaged_npx_entry promised "None for a failed install" but only handled a
non-zero exit: a TimeoutExpired (10-minute hang) or an OSError (unwritable
prefix, AV lock, node not startable) escaped into the MCP connect loop and
burned the server's retry budget. Both now log and return None.

_validated_runtime_venv returned whatever the adjacent manifest.json declared,
unchecked, ahead of the VIRTUAL_ENV branch that requires a real pyvenv.cfg. A
stray manifest beside a checkout could hand back a phantom path that shadowed
the user's own venv, or raise from payload_venv per child spawn. The payload
venv now needs pyvenv.cfg (the shipped payload venv has one) and a manifest
that escapes its root reads as "not a payload".

The packaged-npx test stood in for node with an extensionless #!/bin/sh file,
which win32's PATHEXT lookup never finds, so the test was red on the platform
it targets. It now uses a real node(.exe) fixture and a fake install, and the
failure shapes and _outside_package have their own tests.

The packaged-npx cache now follows npx: only an exact version is reused as
installed; any other spec re-resolves on each start and keeps the previous
install when npm cannot run (offline). A git, URL or path spec returns None
before installing, because npm installs those under a name the spec does not
show, so the manifest lookup missed and every start reinstalled.
2026-10-13 22:51:07 -04:00
..
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
…
2026-10-09 17:34:38 +02:00