24 Commits

Author SHA1 Message Date
ethernet
a6ae6ace51 Merge remote-tracking branch 'origin/main' into ethie/pm-clean
# Conflicts:
#	.github/workflows/js-tests.yml
#	agent/model_metadata.py
#	apps/desktop/electron/main.ts
#	apps/desktop/scripts/bundle-electron-main.mjs
#	apps/desktop/src/app/settings/about-settings.tsx
#	apps/desktop/src/app/settings/gateway-settings.test.tsx
#	apps/desktop/src/app/settings/gateway-settings.tsx
#	apps/desktop/src/app/updates-overlay.tsx
#	gateway/shutdown_flush.py
#	hermes_bootstrap.py
#	hermes_cli/local_runtime/binaries.py
#	hermes_cli/main.py
#	hermes_cli/managed_uv.py
#	hermes_cli/update_cmd.py
#	hermes_cli/update_cmd_deps.py
#	hermes_cli/update_cmd_fleet.py
#	hermes_cli/update_cmd_maint.py
#	hermes_cli/update_receipt.py
#	hermes_cli/update_serve_obligations.py
#	hermes_constants.py
#	tests/hermes_cli/test_doctor.py
#	tests/hermes_cli/test_managed_uv.py
#	tests/hermes_cli/test_pending_supervisor_recovery.py
#	tests/hermes_cli/test_startup_fast_guards.py
#	tests/hermes_cli/test_update_desktop_stale_warning.py
#	tests/hermes_cli/test_update_fleet_restart_pending.py
#	tests/hermes_state/test_hermes_state.py
#	tests/tools/test_tirith_security.py
#	tools/bot_relay.py
#	tools/checkpoint_manager.py
#	tools/write_approval.py
#	website/docs/getting-started/updating.md
#	website/docs/reference/environment-variables.md
2026-09-18 17:26:10 -04:00
kshitijk4poor
e4739c6d2d fix(cli): doctor and terminal setup resolve the container runtime too
`hermes doctor` and `hermes setup terminal` only ever looked for a `docker` binary
(`_safe_which("docker")` / `shutil.which("docker")`) and probed `docker version` by
literal name, so a podman-only machine was told Docker was missing while the docker
terminal backend was already running containers through Podman — the same mis-report
the dashboard probe had.

Both now resolve the CLI through `find_docker()` (HERMES_DOCKER_BINARY → docker →
podman → macOS Docker Desktop paths) and name the runtime they actually found, via
`docker_runtime_name()` and `docker_runtime_start_hint()` next to `find_docker()` —
shared with the dashboard probe instead of a per-module copy. The probe's version call
goes through the backend's `run_capture()`, and a Podman row no longer advises starting
a daemon: Podman is daemonless, so it points at `podman machine start`.

Tests that pinned the old resolution (`_safe_which` / the global `shutil.which`) now pin
`find_docker()`, so they no longer depend on whether the host has Docker Desktop at a
known macOS path.
2026-09-18 21:47:13 +05:30
ethernet
b4a294fff9 Merge origin/main; keep PM as plugin dependency owner
Reconcile plugin declarations and validation through PM's atomic generation publication; preserve external runtimes, target markers, and conflict refusal. Keep one source-update completion owner and port upstream lifecycle changes to the PM desktop/runtime paths.
2026-09-17 13:52:05 -04:00
beardthelion
c347e50936 fix(setup): let SSH wizard reset a saved port back to 22
The port prompt deliberately skips saving the default, but skipping the
save never removed a previously stored TERMINAL_SSH_PORT, so answering
"22" silently left the stale port in .env while the wizard's own
connection test used the entered value. Remove the env value when the
user enters the default so the runtime default applies.
2026-09-16 17:57:48 -07:00
ethernet
9aac9f9fe8 refactor(cli): delegate Python setup and sync to PM 2026-09-11 18:12:12 -04:00
ethernet
8b7eae99ef fix(pm): own interpreter selection and dependency recovery
Pin uv and uvx to the PM interpreter instead of ambient Python discovery.
A matching dependency stamp cannot prove that installed files still exist.
Repair now rebuilds the recorded workspace and lock in a fresh generation,
checks startup imports, and publishes the selection only after success.

Run startup recovery before dependency activation. Keep manual PM repair
reachable when the selected environment is damaged. Preserve plugin
selection, retry ownership, and the previous generation on failure.
Remove the separate pip, ensurepip, per-extra, and install-time quarantine
ladders. Keep orphan launcher restoration.

Verification: 717 targeted tests passed on native Windows ARM64, with
56 skipped. Ruff, diff checks, and the source-scoped compat check passed.
A disposable real Hermes install recovered deleted YAML and dotenv files,
then printed CLI help with exit 0. Its lock and stamp stayed unchanged.
The full suite and a release build were not run for this change.
2026-09-08 23:39:55 -04:00
ethernet
92686159d1 fix(pm): integrate audited runtime and lifecycle repairs
Prepare dependency generations before selecting them. Keep shipped tool
bytes separate from writable additions, and store facts beside their entries.
Validate proposed plugin sets before config publication. Restore the previous
config if the facts write fails.

Consolidate duplicate updater, backup, setup, and voice helpers. Repair
launcher selection, dependency consumers, download ownership, update feeds,
and native Windows process and file handling.

Verification: 206 changed/prior-failing Python files reported 4630 passed,
one failed, and 330 skipped. Fix the remaining Hindsight fixture boundary.
The final targeted rerun reported 234 passed and two skipped. The store
review regression batch reported 83 passed and one skipped. Desktop
TypeScript checks, 56 selected Electron tests, 24 release tests, and the
removed-import/compatibility guards passed.

This is an integration checkpoint, not full audit acceptance. The complete
Python suite has not run on this fixed tree. Crash-atomic plugin publication,
generation cleanup, receipt correlation, and packaged lifecycle acceptance
remain open in docs/pm-audit-status.md.
2026-09-05 22:36:48 -04:00
ethernet
25ce047f98 fix(footguns): utf-8-sig on all reads flagged by check-windows-footguns (164 sites)
The 4,272-commit upstream merge brought 164 new utf-8 read violations
across 96 files. Class-fixed: reads utf-8-sig, writes unchanged.
check-windows-footguns.py --all: 164 -> 0.
2026-09-04 14:46:24 -04:00
Teknium
1e6cfaa0d0 simplify(compat): setup/model_switch/nous_subscription — drop 34 re-exports, repoint 14 callers + 26 test files (~100 sites) 2026-09-03 13:33:10 -07:00
Teknium
98c140bc4b simplify(compat): code_execution_tool/environments.local — drop 36 re-exports, repoint 5 callers + 14 test files 2026-09-03 13:24:04 -07:00
Teknium
0c26446e15 refactor(hermes_cli): inline _try_poll, hoist datetime import, share _kv/_detail and _header/_lines 2026-09-03 00:11:01 -07:00
Teknium
f547fb64e5 refactor(hermes_cli): compact data tables, docstrings and body blanks in status/setup slice 2026-09-03 00:05:30 -07:00
Teknium
7f37919369 refactor(hermes_cli): setup_terminal/tts/summary/telegram share secret-prompt, xai-path, poll-tick helpers 2026-09-02 23:58:38 -07:00
Teknium
52d8f0792c refactor(hermes_cli): drop blank lines after in-body imports 2026-09-02 21:36:24 -07:00
Teknium
ba11226d72 refactor(hermes_cli): dict-dispatch Modal default index; drop redundant getattr guard on SessionDB 2026-09-02 21:20:53 -07:00
Teknium
beeccf716c refactor(hermes_cli): replace per-function lazy 'from hermes_cli.setup/status import' with one bottom module alias 2026-09-02 21:16:32 -07:00
Teknium
076ede8d97 refactor(hermes_cli): AST-neutral layout compaction across group D 2026-09-02 20:47:53 -07:00
Teknium
5f92f1ab5e refactor(hermes_cli): unify SDK-install/binary-report helpers in terminal backend wizard 2026-09-02 20:22:33 -07:00
Teknium
8dca2031d3 Merge branch 'simp/r2-cli-rest-setup' into simp/integration2
# Conflicts:
#	hermes_cli/setup.py
2026-09-02 17:27:09 -07:00
Teknium
324701cd84 refactor(cli/setup_*): table-drive bluebubbles/vercel prompts, flatten telegram allowlist branches, compact prose 2026-09-02 16:04:47 -07:00
Teknium
1ac48ebe5a refactor(cli/setup.py): first-time mode table, quick-setup env-var helper, agent-settings summary table 2026-09-02 16:01:34 -07:00
Teknium
3ab00ea93a refactor(cli/setup.py): shared _info() line printer; pack print_info runs across setup modules 2026-09-02 15:57:06 -07:00
Teknium
4e64c5d1a1 refactor(cli/setup.py): drop dead _DEFAULT_PROVIDER_MODELS table and _setup_qqbot shim; compact prose, imports and banners 2026-09-02 15:53:44 -07:00
Teknium
9128bb5610 refactor(cli/setup.py): split wizard into setup_{tts,terminal,platforms,summary,migration,quick} modules; table-drive summary/agent settings; shared banner helper 2026-09-02 15:46:06 -07:00