Commit graph

11648 commits

Author SHA1 Message Date
bd14ad1bec Merge pull request 'docs: convert negative patterns to positive actionable instructions' (#10) from docs/positive-language-rewrite into main
Some checks failed
Nix / nix (macos-latest) (push) Has been cancelled
Nix / nix (ubuntu-latest) (push) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (push) Has been cancelled
Typecheck / typecheck (apps/desktop) (push) Has been cancelled
Typecheck / typecheck (apps/shared) (push) Has been cancelled
Typecheck / typecheck (ui-tui) (push) Has been cancelled
Typecheck / typecheck (web) (push) Has been cancelled
Reviewed-on: #10
2026-06-21 14:19:16 +02:00
7e787c4c3b docs: define hermes-bsd role vs Colibri in Clawdie collective
Some checks failed
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
hermes-bsd = agent harness (what you talk to)
Colibri = control plane (what supervises)
Connected via glasspane + MCP bridge; no duplication.
2026-06-21 14:16:43 +02:00
4a1073847e docs: convert negative patterns to positive actionable instructions
Some checks failed
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Rewrite 'do not X' / 'never Y' / 'avoid Z' / 'cannot W' patterns across
documentation files into positive 'do ABC to achieve XYZ' instructions.

Files changed:
- AGENTS.md (180 lines): 30+ patterns converted including caching,
  profiles, known pitfalls, testing, change-detector tests
- CONTRIBUTING.md (50 lines): 14+ patterns including memory providers,
  cross-platform rules, skill authoring, security
- README-FreeBSD.md: operator-user instructions
- apps/desktop/DESIGN.md (49 lines): 12 design constraint patterns
- docs/observability/README.md: 4 observer contract patterns

Hard safety invariants preserved:
- Secrets never in logs → 'Keep secrets out of logs. Redact from log output'
- Tests never write to ~/.hermes → 'Use _isolate_hermes_home fixture'
- Prompt cache never broken → 'Past context stays immutable mid-conversation'
2026-06-21 13:24:20 +02:00
b4e1d23975 Merge pr-7: FreeBSD rc.d fixes + Node 24 Dockerfile bump
Some checks failed
Nix / nix (ubuntu-latest) (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
Nix / nix (macos-latest) (push) Waiting to run
Lint (ruff + ty) / ruff + ty diff (push) Has been cancelled
Tests / test (3) (push) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (push) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (push) Has been cancelled
Docker / shell lint / Lint Dockerfile (hadolint) (push) Has been cancelled
Docker / shell lint / Lint docker/ shell scripts (shellcheck) (push) Has been cancelled
Docker Build and Publish / build-amd64 (push) Has been cancelled
Docker Build and Publish / build-arm64 (push) Has been cancelled
Tests / test (1) (push) Has been cancelled
Tests / test (2) (push) Has been cancelled
Tests / test (4) (push) Has been cancelled
Tests / test (5) (push) Has been cancelled
Tests / test (6) (push) Has been cancelled
Tests / e2e (push) Has been cancelled
Docker Build and Publish / merge (push) Has been cancelled
Tests / save-durations (push) Has been cancelled
2026-06-21 12:30:11 +02:00
4d5a5746a3 fix(docker): bump Node 22 → 24 LTS in Dockerfile
Some checks failed
History Check / check-common-ancestor (pull_request) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (pull_request) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (pull_request) Has been cancelled
Tests / test (1) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
Docker Build and Publish / build-amd64 (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Docker / shell lint / Lint Dockerfile (hadolint) (pull_request) Has been cancelled
Docker / shell lint / Lint docker/ shell scripts (shellcheck) (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Docker Build and Publish / build-arm64 (pull_request) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Tests / e2e (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Tests / test (2) (pull_request) Has been cancelled
Tests / test (3) (pull_request) Has been cancelled
Tests / test (4) (pull_request) Has been cancelled
Tests / test (5) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Tests / test (6) (pull_request) Has been cancelled
Docker Build and Publish / merge (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Tests / save-durations (pull_request) Has been cancelled
Closes #4. Container image now matches the toolchain baseline
(Node 24 LTS across the matrix). Digest updated to current
node:24-bookworm-slim amd64.
2026-06-21 12:29:39 +02:00
9d54686c93 fix(freebsd): move chmod after daemon command in dashboard rc.d
Some checks failed
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Tests / test (1) (pull_request) Has been cancelled
Tests / test (2) (pull_request) Has been cancelled
Tests / test (4) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (pull_request) Has been cancelled
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (pull_request) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (pull_request) Has been cancelled
Tests / test (3) (pull_request) Has been cancelled
Tests / test (5) (pull_request) Has been cancelled
Tests / test (6) (pull_request) Has been cancelled
Tests / e2e (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Tests / save-durations (pull_request) Has been cancelled
The chmod 644 on pidfiles was injected mid-command between daemon(8)
and its arguments (--host, --port, etc.), causing the shell to pass
'chmod' as a subcommand argument to 'hermes dashboard', which
instantly crashed. Move it after the complete daemon invocation.

This caused the 502 Bad Gateway on ai.clawdie.si after restart —
dashboard process never started because it rejected 'chmod' as an
invalid dashboard subcommand.
2026-06-21 12:24:00 +02:00
674f153495 Merge pull request 'fix(skills): add freebsd to coding-agent platforms (codex, claude-code, opencode)' (#8) from feat/skills-freebsd-coding-agents into main
Some checks failed
Nix / nix (ubuntu-latest) (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
Nix / nix (macos-latest) (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
2026-06-21 11:52:03 +02:00
abb3ab8fa1 fix(skills): add freebsd to coding-agent platforms (codex, claude-code, opencode)
Some checks failed
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
These declared platforms: [linux, macos, windows] and omitted freebsd, so
skill_matches_platform() rejected them on FreeBSD (same class as PR #5's
hermes-agent fix). codex ships as a FreeBSD pkg (it's in our host baseline);
claude-code and opencode are Node/Go tools that run on FreeBSD's node24/go.

Coding-agent skills are core for an agent host, so this is the highest-value
slice of the broader "skills omit freebsd" gap (~20 skills). The rest
(research/mlops/python CLI skills) is a follow-up; genuinely OS-specific ones
(apple/*, GPU-only mlops) correctly stay as-is.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 11:45:32 +02:00
83830b6dcc Merge pull request 'feat(gateway): real FreeBSD rc.d detection in get_gateway_runtime_snapshot' (#7) from feat/gateway-freebsd-rcd-detection into main
Some checks are pending
Docker Build and Publish / build-amd64 (push) Waiting to run
Docker Build and Publish / build-arm64 (push) Waiting to run
Docker Build and Publish / merge (push) Blocked by required conditions
Lint (ruff + ty) / ruff + ty diff (push) Waiting to run
Lint (ruff + ty) / ruff enforcement (blocking) (push) Waiting to run
Lint (ruff + ty) / Windows footguns (blocking) (push) Waiting to run
Nix / nix (macos-latest) (push) Waiting to run
Nix / nix (ubuntu-latest) (push) Waiting to run
Tests / test (1) (push) Waiting to run
Tests / test (3) (push) Waiting to run
Tests / test (4) (push) Waiting to run
Tests / test (5) (push) Waiting to run
Tests / test (2) (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Tests / test (6) (push) Waiting to run
Tests / save-durations (push) Blocked by required conditions
Tests / e2e (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
2026-06-21 11:44:17 +02:00
4e7a55704d feat(gateway): real FreeBSD rc.d detection in get_gateway_runtime_snapshot
Some checks failed
Docker Build and Publish / build-amd64 (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Docker Build and Publish / build-arm64 (pull_request) Has been cancelled
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (pull_request) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (pull_request) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Tests / test (1) (pull_request) Has been cancelled
Tests / test (2) (pull_request) Has been cancelled
Tests / test (3) (pull_request) Has been cancelled
Tests / test (4) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Tests / test (5) (pull_request) Has been cancelled
Tests / test (6) (pull_request) Has been cancelled
Tests / e2e (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Docker Build and Publish / merge (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Tests / save-durations (pull_request) Has been cancelled
`hermes status` reported the gateway as "manual process" on FreeBSD because
get_gateway_runtime_snapshot() only had systemd/launchd branches and fell
through. Add a proper FreeBSD rc.d path so status reports real state:

- is_freebsd() helper (sys.platform.startswith("freebsd")).
- _freebsd_rcd_service_path() + _probe_freebsd_service_running() — probes the
  hermes_daemon rc.d service via `service hermes_daemon onestatus` (reports
  running regardless of the rcvar enable flag; works without root; fail-safe on
  timeout/missing binary), mirroring the launchd probe.
- snapshot branch: manager="rc.d (hermes_daemon)", service_installed (rc.d file
  present), service_running (onestatus), service_scope="rc.d".

This is the deeper fix behind the status.py fallback message (PR #6). Not changed:
get_managed_gateway_pids() restart-drain path (systemd/launchd only) — gateway
liveness already works via find_gateway_pids(); rc.d restart-drain is a separate
follow-up.

py_compile clean; wiring + branch-ordering verified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 11:06:12 +02:00
f12e8c13f2 Merge pull request 'fix(status): recognize FreeBSD rc.d in hermes status fallback' (#6) from fix/status-freebsd-rcd into main
Some checks are pending
Docker Build and Publish / build-amd64 (push) Waiting to run
Docker Build and Publish / build-arm64 (push) Waiting to run
Docker Build and Publish / merge (push) Blocked by required conditions
Lint (ruff + ty) / ruff + ty diff (push) Waiting to run
Lint (ruff + ty) / ruff enforcement (blocking) (push) Waiting to run
Lint (ruff + ty) / Windows footguns (blocking) (push) Waiting to run
Nix / nix (macos-latest) (push) Waiting to run
Nix / nix (ubuntu-latest) (push) Waiting to run
Tests / test (1) (push) Waiting to run
Tests / test (2) (push) Waiting to run
Tests / test (3) (push) Waiting to run
Tests / test (6) (push) Waiting to run
Tests / test (4) (push) Waiting to run
Tests / test (5) (push) Waiting to run
Tests / save-durations (push) Blocked by required conditions
Tests / e2e (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
2026-06-21 11:03:38 +02:00
4258411d57 fix(status): recognize FreeBSD rc.d in hermes status gateway fallback
Some checks failed
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (pull_request) Has been cancelled
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
Docker Build and Publish / build-amd64 (pull_request) Has been cancelled
Docker Build and Publish / build-arm64 (pull_request) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Tests / test (1) (pull_request) Has been cancelled
Tests / test (2) (pull_request) Has been cancelled
Tests / test (3) (pull_request) Has been cancelled
Tests / test (4) (pull_request) Has been cancelled
Tests / test (5) (pull_request) Has been cancelled
Tests / test (6) (pull_request) Has been cancelled
Tests / e2e (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Docker Build and Publish / merge (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Tests / save-durations (pull_request) Has been cancelled
`hermes status` showed "Manager: (not supported on this platform)" on FreeBSD
because the gateway-status fallback only knew systemd/launchd (the primary
get_gateway_runtime_snapshot() path raises on FreeBSD → this except branch).
Add a freebsd branch reporting the rc.d service, matching the linux/darwin
branch style.

Cosmetic-only (the displayed manager line). A deeper fix — teaching
get_gateway_runtime_snapshot()/gateway.py to actually probe the rc.d service
(running/installed) so status reports real state — is a separate, larger change.

py_compile clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 11:01:36 +02:00
3a021f3a41 Merge pull request 'fix(skills): add FreeBSD to hermes-agent platform support' (#5) from fix/skill-platform-freebsd into main
Some checks are pending
Deploy Site / deploy-vercel (push) Waiting to run
Deploy Site / deploy-docs (push) Waiting to run
Docker Build and Publish / merge (push) Blocked by required conditions
Lint (ruff + ty) / ruff + ty diff (push) Waiting to run
Lint (ruff + ty) / ruff enforcement (blocking) (push) Waiting to run
Lint (ruff + ty) / Windows footguns (blocking) (push) Waiting to run
Nix / nix (macos-latest) (push) Waiting to run
Tests / test (4) (push) Waiting to run
Tests / test (5) (push) Waiting to run
Tests / save-durations (push) Blocked by required conditions
Tests / e2e (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Docker Build and Publish / build-amd64 (push) Waiting to run
Docker Build and Publish / build-arm64 (push) Waiting to run
Nix / nix (ubuntu-latest) (push) Waiting to run
Tests / test (1) (push) Waiting to run
Tests / test (2) (push) Waiting to run
Tests / test (3) (push) Waiting to run
Tests / test (6) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Reviewed-on: #5
2026-06-21 10:49:45 +02:00
0e1d4ead04 fix(skills): add FreeBSD to hermes-agent platform support
Some checks failed
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
Docker Build and Publish / build-amd64 (pull_request) Has been cancelled
Docker Build and Publish / build-arm64 (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (pull_request) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (pull_request) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Tests / test (1) (pull_request) Has been cancelled
Tests / test (2) (pull_request) Has been cancelled
Tests / test (3) (pull_request) Has been cancelled
Tests / test (4) (pull_request) Has been cancelled
Tests / test (5) (pull_request) Has been cancelled
Tests / test (6) (pull_request) Has been cancelled
Tests / e2e (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Docker Build and Publish / merge (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Tests / save-durations (pull_request) Has been cancelled
Two changes needed:
- skills/.../hermes-agent/SKILL.md: add freebsd to platforms list
- agent/skill_utils.py: add freebsd to PLATFORM_MAP so
  skill_matches_platform() recognizes sys.platform='freebsd*'

Without PLATFORM_MAP entry, the YAML platform declaration alone is not
enough — the runtime check compares against sys.platform prefixes.
2026-06-21 10:48:08 +02:00
4c2d76f9cd fix(dashboard): normalise wildcard binds for PTY child WebSocket URL
Some checks failed
Nix / nix (ubuntu-latest) (push) Has been cancelled
Tests / test (1) (push) Has been cancelled
Tests / test (2) (push) Has been cancelled
Tests / test (3) (push) Has been cancelled
Tests / test (4) (push) Has been cancelled
Tests / test (5) (push) Has been cancelled
Tests / test (6) (push) Has been cancelled
Tests / e2e (push) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (push) Has been cancelled
Typecheck / typecheck (apps/desktop) (push) Has been cancelled
Typecheck / typecheck (apps/shared) (push) Has been cancelled
Typecheck / typecheck (ui-tui) (push) Has been cancelled
Typecheck / typecheck (web) (push) Has been cancelled
Docker Build and Publish / build-amd64 (push) Has been cancelled
Docker Build and Publish / build-arm64 (push) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (push) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (push) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (push) Has been cancelled
Nix / nix (macos-latest) (push) Has been cancelled
Tests / save-durations (push) Has been cancelled
Docker Build and Publish / merge (push) Has been cancelled
_build_gateway_ws_url() and _build_sidecar_url() used
the raw bound host (0.0.0.0) to construct ws:// URLs for
the PTY child. 0.0.0.0 is listen-only, not diallable —
the TUI gateway couldn't connect, showing 'gateway exited'
in the Chat tab.

Normalise 0.0.0.0 / :: to 127.0.0.1 before constructing
the WebSocket URL so the PTY child can connect back.
2026-06-19 23:10:03 +02:00
d496853d44 chore(freebsd): add hermes dashboard rc.d template, clean up drift
Some checks are pending
Lint (ruff + ty) / ruff + ty diff (push) Waiting to run
Lint (ruff + ty) / ruff enforcement (blocking) (push) Waiting to run
Lint (ruff + ty) / Windows footguns (blocking) (push) Waiting to run
Nix / nix (macos-latest) (push) Waiting to run
Tests / test (1) (push) Waiting to run
Nix / nix (ubuntu-latest) (push) Waiting to run
Tests / test (3) (push) Waiting to run
Tests / test (4) (push) Waiting to run
Tests / test (5) (push) Waiting to run
Tests / test (6) (push) Waiting to run
Tests / save-durations (push) Blocked by required conditions
Tests / e2e (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
Tests / test (2) (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
- hermes_dashboard.in: matches live install at
  /usr/local/etc/rc.d/hermes_dashboard, was untracked
- .gitignore: add ui-tui/node.core (Node crash dump)
- Restore package-lock.json to committed state
2026-06-19 12:28:31 +02:00
16911c5ac9 fix(gateway): bypass sendRichMessage for lifecycle notifications
Some checks are pending
Docker Build and Publish / build-amd64 (push) Waiting to run
Docker Build and Publish / build-arm64 (push) Waiting to run
Docker Build and Publish / merge (push) Blocked by required conditions
Lint (ruff + ty) / ruff + ty diff (push) Waiting to run
Lint (ruff + ty) / ruff enforcement (blocking) (push) Waiting to run
Lint (ruff + ty) / Windows footguns (blocking) (push) Waiting to run
Nix / nix (macos-latest) (push) Waiting to run
Nix / nix (ubuntu-latest) (push) Waiting to run
Tests / test (1) (push) Waiting to run
Tests / test (2) (push) Waiting to run
Tests / test (3) (push) Waiting to run
Tests / test (4) (push) Waiting to run
Tests / test (5) (push) Waiting to run
Tests / test (6) (push) Waiting to run
Tests / save-durations (push) Blocked by required conditions
Tests / e2e (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
Telegram Web doesn't support Bot API 10.1 sendRichMessage, so
gateway startup/shutdown/restart notifications rendered as
'This message is not supported on the web version of Telegram.'

Root cause: TelegramAdapter.send() uses sendRichMessage for
every non-empty message. Lifecycle notifications are plain text
and gain nothing from rich rendering.

Fix:
- telegram.py: add 'skip_rich' metadata flag to _should_attempt_rich()
- run.py: set skip_rich=True on all 4 lifecycle notification paths
  (shutdown→active chats, shutdown→home channel, startup→home,
  restart→active chat)

Lifecycle notifications now use plain sendMessage. All other
messages continue using sendRichMessage for rich rendering.

Also: sync colibri_bridge.in template from live OSA deployment.
2026-06-19 12:19:10 +02:00
4db973d266 fix(freebsd): document and harden hermes rc.d on OSA (Sam & Codex) 2026-06-18 12:37:20 +02:00
df59ba2d3a Merge pull request 'fix(freebsd): portable bash shebang (/usr/bin/env bash)' (#3) from fix/freebsd-portable-bash-shebang into main
Some checks failed
Tests / test (1) (push) Has been cancelled
Typecheck / typecheck (web) (push) Has been cancelled
Tests / e2e (push) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (push) Has been cancelled
Typecheck / typecheck (apps/desktop) (push) Has been cancelled
Typecheck / typecheck (apps/shared) (push) Has been cancelled
Typecheck / typecheck (ui-tui) (push) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (push) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (push) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (push) Has been cancelled
Tests / test (2) (push) Has been cancelled
Nix / nix (macos-latest) (push) Has been cancelled
Nix / nix (ubuntu-latest) (push) Has been cancelled
Tests / test (3) (push) Has been cancelled
Tests / test (4) (push) Has been cancelled
Tests / test (5) (push) Has been cancelled
Tests / test (6) (push) Has been cancelled
Tests / save-durations (push) Has been cancelled
Reviewed-on: #3
2026-06-17 18:57:56 +02:00
3c34788a0f fix(freebsd): portable bash shebang (/usr/bin/env bash)
Some checks failed
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (pull_request) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (pull_request) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Tests / test (1) (pull_request) Has been cancelled
Tests / test (2) (pull_request) Has been cancelled
Tests / test (3) (pull_request) Has been cancelled
Tests / test (4) (pull_request) Has been cancelled
Tests / test (5) (pull_request) Has been cancelled
Tests / test (6) (pull_request) Has been cancelled
Tests / e2e (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Tests / save-durations (pull_request) Has been cancelled
#!/bin/bash does not resolve on FreeBSD — bash lives at /usr/local/bin/bash,
not /bin. The documented first-install command `./setup-hermes.sh` would fail
with 'bad interpreter: No such file or directory'. Use env-based lookup so the
interpreter resolves wherever bash is on PATH (FreeBSD, Linux, macOS).

Covers setup-hermes.sh (the FreeBSD first-validation entrypoint) plus the two
scripts/ bash helpers. install-freebsd.sh is already #!/bin/sh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 18:16:39 +02:00
912e697de0 Merge pull request 'chore(setup): target Python 3.12 venv baseline' (#2) from chore/setup-hermes-python-3-12 into main
Some checks are pending
Lint (ruff + ty) / ruff + ty diff (push) Waiting to run
Lint (ruff + ty) / ruff enforcement (blocking) (push) Waiting to run
Lint (ruff + ty) / Windows footguns (blocking) (push) Waiting to run
Nix / nix (macos-latest) (push) Waiting to run
Nix / nix (ubuntu-latest) (push) Waiting to run
Tests / test (1) (push) Waiting to run
Tests / test (2) (push) Waiting to run
Tests / test (3) (push) Waiting to run
Tests / test (4) (push) Waiting to run
Tests / test (5) (push) Waiting to run
Tests / test (6) (push) Waiting to run
Tests / save-durations (push) Blocked by required conditions
Tests / e2e (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
2026-06-17 16:16:57 +02:00
99954132eb chore(setup): target Python 3.12 venv baseline
Some checks failed
Lint (ruff + ty) / ruff + ty diff (pull_request) Has been cancelled
Typecheck / typecheck (ui-tui) (pull_request) Has been cancelled
Typecheck / typecheck (web) (pull_request) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (pull_request) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (pull_request) Has been cancelled
Typecheck / typecheck (apps/desktop) (pull_request) Has been cancelled
Typecheck / typecheck (apps/shared) (pull_request) Has been cancelled
Contributor Attribution Check / check-attribution (pull_request) Has been cancelled
History Check / check-common-ancestor (pull_request) Has been cancelled
Lint (ruff + ty) / Windows footguns (blocking) (pull_request) Has been cancelled
Nix / nix (macos-latest) (pull_request) Has been cancelled
Nix / nix (ubuntu-latest) (pull_request) Has been cancelled
Supply Chain Audit / changes (pull_request) Has been cancelled
Tests / test (1) (pull_request) Has been cancelled
Tests / test (2) (pull_request) Has been cancelled
Tests / test (3) (pull_request) Has been cancelled
Tests / test (4) (pull_request) Has been cancelled
Tests / test (5) (pull_request) Has been cancelled
Tests / test (6) (pull_request) Has been cancelled
Tests / e2e (pull_request) Has been cancelled
Supply Chain Audit / Scan PR for critical supply chain risks (pull_request) Has been cancelled
Supply Chain Audit / Check PyPI dependency upper bounds (pull_request) Has been cancelled
Tests / save-durations (pull_request) Has been cancelled
Align the FreeBSD/desktop installer with the agreed Python 3.12 floor
(see layered-soul/docs/TOOLCHAIN.md). uv fetches a standalone 3.12, so this
is independent of FreeBSD's pkg default flavor. Lands the writable-repo
version of the patch stranded on osa's read-only hermes-freebsd mirror.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 16:05:56 +02:00
fc4b57adeb FreeBSD rc.d service for hermes gateway (daemon(8) supervision) (#1)
Some checks failed
Lint (ruff + ty) / Windows footguns (blocking) (push) Has been cancelled
Typecheck / typecheck (ui-tui) (push) Has been cancelled
Typecheck / typecheck (web) (push) Has been cancelled
Lint (ruff + ty) / ruff enforcement (blocking) (push) Has been cancelled
Nix / nix (macos-latest) (push) Has been cancelled
Nix / nix (ubuntu-latest) (push) Has been cancelled
Tests / test (1) (push) Has been cancelled
Tests / test (2) (push) Has been cancelled
Tests / test (3) (push) Has been cancelled
Tests / e2e (push) Has been cancelled
Typecheck / typecheck (apps/bootstrap-installer) (push) Has been cancelled
Typecheck / typecheck (apps/desktop) (push) Has been cancelled
Typecheck / typecheck (apps/shared) (push) Has been cancelled
Lint (ruff + ty) / ruff + ty diff (push) Has been cancelled
Tests / test (4) (push) Has been cancelled
Tests / test (5) (push) Has been cancelled
Tests / test (6) (push) Has been cancelled
Tests / save-durations (push) Has been cancelled
Co-authored-by: Hermes & Sam <hello@clawdie.si>
Co-committed-by: Hermes & Sam <hello@clawdie.si>
2026-06-14 15:21:23 +02:00
Sam & Claude
7aa46cc9f8 docs(freebsd): correct patched-file list (3 changes, drop phantom voice_mode.py)
Some checks are pending
Nix / nix (macos-latest) (push) Waiting to run
Nix / nix (ubuntu-latest) (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
The README claimed "six targeted changes" and listed tools/voice_mode.py as
patched, but commit a9e4caa3f touched only three code files (setup.py,
uninstall.py, install-freebsd.sh) plus this README. voice_mode.py was never
modified — voice works on FreeBSD via pkg-installed ffplay without code
changes, as the same README already states. Drop the phantom row and fix the
count.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 15:13:06 +02:00
a9e4caa3f7 feat: FreeBSD compatibility patches (clean-room, MIT)
Some checks failed
Lint (ruff + ty) / ruff + ty diff (push) Waiting to run
Lint (ruff + ty) / ruff enforcement (blocking) (push) Waiting to run
Lint (ruff + ty) / Windows footguns (blocking) (push) Waiting to run
Nix / nix (macos-latest) (push) Waiting to run
Nix / nix (ubuntu-latest) (push) Waiting to run
Tests / test (1) (push) Waiting to run
Tests / test (2) (push) Waiting to run
Tests / test (3) (push) Waiting to run
Tests / test (4) (push) Waiting to run
Tests / test (5) (push) Waiting to run
Tests / test (6) (push) Waiting to run
Tests / save-durations (push) Blocked by required conditions
Tests / e2e (push) Waiting to run
Typecheck / typecheck (apps/bootstrap-installer) (push) Waiting to run
Typecheck / typecheck (apps/desktop) (push) Waiting to run
Typecheck / typecheck (apps/shared) (push) Waiting to run
Typecheck / typecheck (ui-tui) (push) Waiting to run
Typecheck / typecheck (web) (push) Waiting to run
Docker Build and Publish / build-amd64 (push) Has been cancelled
Docker Build and Publish / build-arm64 (push) Has been cancelled
Docker Build and Publish / merge (push) Has been cancelled
- setup.py: FreeBSD platform detection, pkg package manager, rc.d service
- uninstall.py: /usr/local/bin symlink path on FreeBSD
- voice_mode.py: aplay/ffplay audio on FreeBSD
- install-freebsd.sh: native POSIX sh installer for FreeBSD 14/15
- README-FreeBSD.md: documentation

Built from MIT-licensed upstream NousResearch/hermes-agent.
No LGPL code — clean-room implementation guided by platform behavior.
Clipboard (xclip) and voice (ffplay) work via pkg-installed tools.
2026-06-14 03:17:14 +02:00
brooklyn!
6b76284c77
fix(desktop): surface off-screen approvals via the jump-to-bottom control (#45853)
* fix(desktop): jump-to-approval pill for off-screen approvals

A blocked approval's only response surface is the inline Run/Reject bar on
the pending tool row. When that row is scrolled out of view the session looks
stalled with no visible action. Surface a composer-anchored "Approval needed"
pill only when an approval is pending AND its inline bar is scrolled away;
clicking scrolls the bar back into view. Preserves the deliberate inline (not
modal) approval design — the pill never duplicates the approve/reject controls.

The inline bar mirrors its own viewport visibility via IntersectionObserver
(tracks scroll/resize/layout) and registers a scroll-into-view handler the pill
fires, mirroring the existing thread-scroll jump-button bridge.

Supersedes #45828.

* fix(desktop): morph jump-to-bottom into approval prompt; drop scroll bridge

Collapse the separate "jump to approval" pill into the existing
scroll-to-bottom control: when scrolled away from the bottom while an approval
is pending, it relabels to "Approval needed". A parked approval's inline
Run/Reject bar is always the bottom-most content, so the existing
scroll-to-bottom action lands the user right on it — one control, no collision.

This also fixes the layout corruption from the first cut: the pill called
native el.scrollIntoView(), which scrolls every scrollable ancestor including
the overflow:hidden chat shell containers. Those have no scrollbar to scroll
back and don't remount on session switch, so the composer stayed shoved and
the breakage persisted across sessions. Reusing requestScrollToBottom() (the
use-stick-to-bottom path) only touches the one designated scroll container.

Removes the now-unused approval-scroll store + IntersectionObserver wiring.
2026-06-13 23:07:22 +00:00
Teknium
4026f526d5 chore(release): map MaxFreedomPollard author email 2026-06-13 15:01:42 -07:00
Max Pollard
9a2b976326 test(skills): add regression tests for bundled-update backup recovery
Three tests covering: a stale .bak poisoning a failed update's move/restore, an orphaned .bak misread as a user deletion, and a partially written dest blocking restore-on-failure. All three fail on current main without the fix.

Refs #44942
2026-06-13 15:01:42 -07:00
Max Pollard
3581131e7d fix(skills): make bundled-update backup handling crash-safe and idempotent
Recover an orphaned .bak before classification (interrupted updates no longer read as user deletions), clear a stale .bak before shutil.move (replace, not nest), and clear a partial dest before restore so restore-on-failure actually runs.

Fixes #44942
2026-06-13 15:01:42 -07:00
Teknium
bf8effad02
fix(utils): copy fallback for atomic replace across devices (#43852)
Fallback from `os.replace` on EXDEV/EBUSY using copy+fsync+unlink while preserving symlink target semantics and metadata.
2026-06-13 14:50:05 -07:00
Teknium
817f392311
feat(read): extract notebook and office documents (#37082)
Add stdlib-only extraction for `.ipynb`, `.docx`, and `.xlsx` in read_file with lazy integration and malformed-document fallback.
2026-06-13 14:42:51 -07:00
Teknium
2b67e96aec fix(approval): gate in-place edits to sensitive user files
Cover sed, perl, and ruby in-place mutations against shell rc, SSH, and credential files so terminal approvals pair the redirection and copy guards.
2026-06-13 14:35:27 -07:00
helix4u
abd69b8117 fix(approval): detect absolute home shell rc writes 2026-06-13 14:35:27 -07:00
briandevans
da28d5d113 fix(security): gate cp/mv/install into ~/.ssh, credential, and shell-rc files
tools/approval.py already denies tee/redirection writes to every
_SENSITIVE_WRITE_TARGET (~/.ssh/*, ~/.netrc/.pgpass/.npmrc/.pypirc, shell
rc files, ~/.hermes/config.yaml/.env) via the DANGEROUS_PATTERNS tee/`>`
rules, but cp/mv/install were only paired for _SYSTEM_CONFIG_PATH (/etc) and
the project-relative env/config target. So `cp evil ~/.ssh/authorized_keys`
(SSH-key implant / persistence), `cp creds ~/.netrc`, and `cp evil ~/.bashrc`
(login-time command injection) auto-approved while the equivalent tee/`>`
forms were denied — an unpaired write deny is theater (same rationale as
#14639 / commit 4e9d886d, which paired the terminal side for
~/.hermes/config.yaml writes but did not touch these cp/mv/install verbs on
the broader sensitive set).

Add one (cp|mv|install) DANGEROUS_PATTERNS entry reusing the existing
_SENSITIVE_WRITE_TARGET fragment, anchored via _COMMAND_TAIL so it fires on
the destination (last arg) only: reading OUT of a sensitive path
(`cp ~/.ssh/config /tmp/x`) stays auto-approved. Description differs from the
system-config cp entry so the two keep distinct approval keys (no silent
cross-approval). Additive — does not subsume the /etc or project-config rules.

Adds TestSensitiveCopyMovePattern: 5 positive cases (ssh authorized_keys,
ssh private key via mv, netrc via install, bashrc, ~/.hermes/config.yaml) +
2 negative guards (copy FROM ssh, unrelated copy). The ssh/netrc/bashrc
positives fail on main and pass on this branch; the negatives stay green
both ways.
2026-06-13 14:35:27 -07:00
Teknium
1fa761f8de
fix(search): keep partial results on search timeout (#36142)
Treat search command budget timeouts as soft truncation so partial results survive, while real search failures still return structured errors.
2026-06-13 14:35:21 -07:00
Teknium
069bfd6545 fix(agent): keep Codex reasoning replay on Codex path 2026-06-13 14:35:00 -07:00
briandevans
1d584a301e fix(agent): treat Codex reasoning items as thinking-only 2026-06-13 14:35:00 -07:00
ITheEqualizer
57c2a55be4 fix(telegram): harden rich message fallback handling
Carry forward focused follow-ups from PR #45741: treat PTB's raw Bot API 10.1 response shapes safely, recognize real missing-endpoint errors, preserve link preview settings on rich sends, and lock the rich limit to Telegram's character-based cap.
2026-06-13 14:34:53 -07:00
brooklyn!
0a865e5948
fix(desktop): bypass Chromium editing pipeline for large paste & select-delete (#45812)
Large paste and Ctrl+A → Delete froze the composer for seconds — both routed
through Chromium's contenteditable editing pipeline (~O(n²) on multiline DOM).

- insertPlainTextAtCaret: Range + text/<br> fragment (paste path)
- deleteSelectionInEditor: range.deleteContents for non-collapsed Backspace/Delete
- Shared composerSelectionRange helper; both flush via flushEditorToDraft

Profiled live (47 KB / 122 paragraphs): paste 4474 ms → 13 ms; select-delete
1304 ms → 4 ms. Collapsed-caret deletes still native.
2026-06-13 20:49:58 +00:00
Teknium
c8e5f34f24
fix(gemini): strip native self prefixes before generateContent (#36141)
Strip `google/` and `gemini/` self-prefixes before native Gemini generateContent calls, and keep provider-normalization expectations aligned.
2026-06-13 13:47:08 -07:00
briandevans
7d11fa4e9e fix(codex-responses): let final_answer complete top-level incomplete responses 2026-06-13 13:45:29 -07:00
ITheEqualizer
7c0605bf22 fix(telegram): preserve rich formatting on stream final 2026-06-13 13:44:45 -07:00
achaljhawar
819def44c7 fix(agent): scope Nous tags to Nous auxiliary calls 2026-06-13 13:24:40 -07:00
Teknium
08890d77e6
fix(plugins): normalize browser-pasted GitHub repo URLs (#33539)
Accept common GitHub web URLs in `hermes plugins install` by normalizing repository views back to cloneable `.git` URLs, with focused parser coverage.
2026-06-13 13:23:59 -07:00
brooklyn!
425e777f54
fix(desktop): polish slash command completion (space/tab/click + typed args) (#45760)
* fix(desktop): accept slash command on space at command stage

Pressing space on a no-arg slash command (e.g. /hermes-agent) fell
through to the arg-completion stage and dead-ended on "No matches"
instead of inserting the directive. Space now mirrors Tab/Enter while
the command name is still being typed: no-arg commands commit the chip,
arg-taking commands expand to their options step.

* fix(desktop): suppress arg popover for no-arg slash commands

Committing a no-arg command (`/hermes-agent `) re-detected the chip+space
as an arg query and re-opened the popover on "No matches". The arg-stage
menu now only opens when the command actually takes args.

* fix(desktop): polish slash arg completion (space/tab/click + typed args)

Unify Enter/Tab/Space accept of the highlighted item at both the command
and arg stages: no-arg commands commit a chip, arg commands expand to
options, and an arg option commits the full `/cmd arg` chip. A fully-typed
arg (which the backend completer drops from suggestions) now commits on
Space/Tab via the verbatim text instead of dead-ending, and the "No
matches" empty state is suppressed past a command's name. Space stays
slash-only so @ mentions keep a literal space.
2026-06-13 18:43:52 +00:00
kshitij
7be22e37e1
Merge pull request #45753 from kshitijk4poor/salvage/gateway-auto-resume-duplicate-agent
fix(gateway): claim session slot before auto-resume task to prevent duplicate agents (#45456)
2026-06-13 23:46:17 +05:30
kshitijk4poor
28902dc890 chore: map liuhao1024 contributor email for attribution 2026-06-13 23:39:49 +05:30
kshitijk4poor
63097ee0d7 test(gateway): cover auto-resume full-path no-regression; clarify guard docstring
The salvaged fix's two regression tests mock adapter.handle_message, so
they only assert the pre-claimed sentinel is set/cleaned around a stub —
they never drive the real dispatch chain. Add a full-path test that
exercises _schedule_resume_pending_sessions -> _guarded_handle_message ->
adapter.handle_message -> _process_message_background -> _handle_message
and asserts the resumed session's agent runs EXACTLY ONCE: not zero (the
pre-claim must not self-bounce the resume into a queued no-op) and not
twice (the duplicate-agent bug #45456 the fix targets). Also assert no
leaked sentinel and no orphaned pending event after the drain settles.

Tighten the _guarded_handle_message docstring: on current main the real
sentinel is taken over inside _handle_message (not _process_message_background),
and note the `is _AGENT_PENDING_SENTINEL` guard only releases the slot we
ourselves placed, never one a live run owns.
2026-06-13 23:39:35 +05:30
liuhao1024
6e2fd955ca fix(gateway): claim session slot before auto-resume task to prevent duplicate agents
When the gateway restarts and auto-resumes an interrupted session, an
inbound message arriving in the window between `asyncio.create_task()`
and the task's first await could spin up a second AIAgent for the same
session.  Both agents would then process messages concurrently,
producing interleaved duplicate responses (#45456).

Fix: set `_AGENT_PENDING_SENTINEL` in `_running_agents` immediately
after the "already running" check, before creating the task.  This
closes the race window — any inbound message sees the slot as occupied
and queues behind the auto-resume.

A `_guarded_handle_message` wrapper ensures the pre-claimed sentinel is
always released, even if `handle_message` raises before reaching
`_process_message_background` (whose `finally` block handles normal
cleanup).

(cherry picked from commit 85150c976bcd067d96900dbf85a4616bb4851e1c)
2026-06-13 23:36:51 +05:30
helix4u
78c11d99e3 fix(update): stop Windows gateways before mutating install 2026-06-13 10:46:08 -07:00