Commit Graph

3562 Commits

Author SHA1 Message Date
4c2ac7b644 Merge pull request 'fix(memory): add remove action to on_memory_write bridge' (#277) from keymaxx/mimoomni/243 into main
Some checks failed
Forge CI / smoke-and-build (push) Failing after 45s
Auto-merged by Timmy
2026-04-10 20:59:47 +00:00
8202649ca0 fix(memory): add remove action to on_memory_write bridge
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 43s
- Extend on_memory_write trigger in run_agent.py to fire for 'remove' action
- Holographic provider now handles 'replace' (re-adds content) and 'remove' (lowers trust on matching facts)
- Fixes orphaned facts when entries are deleted from built-in memory

Fixes #243
2026-04-10 15:31:45 -04:00
f5f028d981 auto-merge PR #276
Some checks failed
Forge CI / smoke-and-build (push) Failing after 42s
2026-04-10 19:03:02 +00:00
Alexander Whitestone
a703fb823c docs: add Matrix integration setup guide and interactive script
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 36s
Phase 2 of Matrix integration — wires Hermes to any Matrix homeserver.

- docs/matrix-setup.md: step-by-step guide covering matrix.org (testing)
  and self-hosted (sovereignty) options, auth methods, E2EE setup, room
  config, and troubleshooting
- scripts/setup_matrix.py: interactive wizard that prompts for homeserver,
  supports token/password auth, generates MATRIX_DEVICE_ID, writes
  ~/.hermes/.env and config.yaml, and optionally creates a test room +
  sends a test message

No config.py changes needed — all Matrix env vars (MATRIX_HOMESERVER,
MATRIX_ACCESS_TOKEN, MATRIX_USER_ID, MATRIX_PASSWORD, MATRIX_ENCRYPTION,
MATRIX_DEVICE_ID, MATRIX_ALLOWED_USERS, MATRIX_HOME_ROOM, etc.) are
already registered in OPTIONAL_ENV_VARS and _EXTRA_ENV_KEYS.

Closes #271
2026-04-10 07:46:42 -04:00
a89dae9942 [auto-merge] browser integration PoC
Some checks failed
Forge CI / smoke-and-build (push) Failing after 38s
Notebook CI / notebook-smoke (push) Failing after 7s
Auto-merged by PR review bot: browser integration PoC
2026-04-10 11:44:56 +00:00
Alexander Whitestone
f85c07551a feat: browser integration analysis + PoC tool (#262)
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 36s
Add docs/browser-integration-analysis.md:
- Technical analysis of Browser Use, Graphify, and Multica for Hermes
- Integration paths, security considerations, performance characteristics
- Clear recommendations: Browser Use (integrate), Graphify (investigate),
  Multica (skip)
- Phased integration roadmap

Add tools/browser_use_tool.py:
- Wraps browser-use library as Hermes tool (toolset: browser_use)
- Three tools: browser_use_run, browser_use_extract, browser_use_compare
- Autonomous multi-step browser automation from natural language tasks
- Integrates with existing url_safety and website_policy security modules
- Supports both local Playwright and cloud execution modes
- Follows existing tool registration pattern (registry.register)

Refs: #262
2026-04-10 07:10:29 -04:00
f81c60a5b3 Merge pull request 'docs: Improve KNOWN_VIOLATIONS justifications for SOUL.md alignment' (#267) from feature/improve-sovereignty-justification into main
Some checks failed
Forge CI / smoke-and-build (push) Failing after 41s
Merge PR #267: docs: Improve KNOWN_VIOLATIONS justifications for SOUL.md alignment
2026-04-10 09:35:51 +00:00
01977f28fb docs: improve KNOWN_VIOLATIONS justifications in verify_memory_sovereignty.py
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 36s
2026-04-10 00:12:42 -04:00
a055e68ebf Merge pull request #265
Some checks failed
Forge CI / smoke-and-build (push) Failing after 43s
Merged PR #265
2026-04-10 03:44:23 +00:00
f6c9ecb893 Merge pull request #264
Some checks failed
Forge CI / smoke-and-build (push) Has been cancelled
Merged PR #264
2026-04-10 03:44:19 +00:00
549431bb81 Merge pull request #259
Some checks failed
Forge CI / smoke-and-build (push) Has been cancelled
Merged PR #259
2026-04-10 03:44:16 +00:00
43dc2d21f2 Merge pull request #263
Some checks failed
Forge CI / smoke-and-build (push) Has been cancelled
Merged PR #263
2026-04-10 03:44:04 +00:00
2948d010b7 Merge pull request #266
Some checks failed
Forge CI / smoke-and-build (push) Has been cancelled
Merged PR #266
2026-04-10 03:44:00 +00:00
Alexander Whitestone
0d92b9ad15 feat(scripts): add memory budget enforcement tool (#256)
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 40s
Add scripts/memory_budget.py — a CI-friendly tool for checking and
enforcing character budgets on MEMORY.md and USER.md memory files.

Features:
- Checks MEMORY.md vs memory_char_limit (default 2200)
- Checks USER.md vs user_char_limit (default 1375)
- Estimates total injection cost (chars / ~4 chars per token)
- Alerts when approaching limits (>80% usage)
- --report flag for detailed breakdown with progress bars
- --verbose flag for per-entry details
- --enforce flag trims oldest entries to fit budget
- --json flag for machine-readable output (CI integration)
- Exit codes: 0=within budget, 1=over budget, 2=trimmed
- Suggestions for largest entries when over budget

Relates to #256
2026-04-09 21:13:01 -04:00
Alexander Whitestone
2e37ff638a Add memory sovereignty verification script (#257)
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 39s
CI check that scans all memory-path code for network dependencies.

Scans 8 memory-related files:
- tools/memory_tool.py (MEMORY.md/USER.md store)
- hermes_state.py (SQLite session store)
- tools/session_search_tool.py (FTS5 session search)
- tools/graph_store.py (knowledge graph)
- tools/temporal_kg_tool.py (temporal KG tool)
- agent/temporal_knowledge_graph.py (temporal triple store)
- tools/skills_tool.py (skill listing/viewing)
- tools/skills_sync.py (bundled skill syncing)

Verifies no HTTP/HTTPS calls, no external API usage, and no
network dependencies in the core memory read/write path.

Reports violations with file:line references. Exit 0 if sovereign,
exit 1 if violations found. Suitable for CI integration.
2026-04-09 21:07:03 -04:00
Alexander Whitestone
815160bd6f burn: add Memory Architecture Guide (closes #263, #258)
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 1m3s
Developer-facing guide covering all four memory tiers:
- Built-in memory (MEMORY.md/USER.md) with frozen snapshot pattern
- Session search (FTS5 + Gemini Flash summarization)
- Skills as procedural memory
- External memory provider plugin architecture

Includes data lifecycle, security guarantees, code paths,
configuration reference, and troubleshooting.
2026-04-09 20:51:45 -04:00
Alexander Whitestone
511eacb573 docs: add Memory Architecture Guide
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 47s
Comprehensive guide covering the Hermes memory system:
- Built-in memory (MEMORY.md / USER.md) with frozen snapshot pattern
- Session search (FTS5 + Gemini Flash summarization)
- Skills as procedural memory
- External memory providers (8 plugins)
- System interaction flow and data lifecycle
- Best practices for what to save/skip
- Privacy and data locality guarantees
- Configuration reference (char limits, nudge interval, flush settings)
- Troubleshooting common issues

Closes #258
2026-04-09 12:45:48 -04:00
2a6045a76a feat: create plugins/memory/mempalace/__init__.py
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 40s
2026-04-09 00:45:21 +00:00
4ef7b5fc46 feat: create plugins/memory/mempalace/plugin.yaml 2026-04-09 00:45:14 +00:00
7d2421a15f Merge pull request 'ci: add duplicate model detection check' (#235) from feat/ci-no-duplicate-models into main
All checks were successful
Forge CI / smoke-and-build (push) Successful in 54s
2026-04-08 22:55:16 +00:00
Alexander Whitestone
5a942d71a1 ci: add duplicate model check step to CI workflow
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 49s
2026-04-08 08:16:00 -04:00
Alexander Whitestone
044f0f8951 ci: add check_no_duplicate_models.py - catches duplicate model IDs (#224) 2026-04-08 08:15:27 -04:00
61c59ce332 Merge pull request 'fix(config): replace kimi-for-coding with kimi-k2.5 across codebase' (#225) from fix/kimi-fallback-rebase into main
Some checks failed
Forge CI / smoke-and-build (push) Successful in 50s
Notebook CI / notebook-smoke (push) Failing after 13s
BezalelGolden-20260408-195253 v7.0.0
2026-04-08 06:57:03 +00:00
01ce8ae889 fix: remove duplicate kimi-k2.5 entries from model lists
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 47s
2026-04-08 00:49:52 +00:00
Alexander Whitestone
b179250ab8 fix(config): replace kimi-for-coding with kimi-k2.5 in all refs
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 36s
- model_metadata.py
- fallback-config.yaml
- hermes_cli/auth.py, main.py, models.py
- test_api_key_providers.py
- docs/integrations/providers.md
- ezra quarterly report
2026-04-07 12:58:44 -04:00
01a3f47a5b Merge pull request '[claude] Fix syntax errors in Ollama provider wiring (#223)' (#224) from claude/issue-223 into main
All checks were successful
Forge CI / smoke-and-build (push) Successful in 57s
2026-04-07 16:40:34 +00:00
Alexander Whitestone
4538e11f97 fix(auxiliary_client): repair syntax errors in Ollama provider wiring
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 45s
The Ollama feature commit introduced two broken `OpenAI(api_key=*** base_url=...)` calls
where `***` was a redacted variable name and the separating comma was missing.
Replace both occurrences with `api_key=api_key, base_url=base_url`.

Fixes #223
2026-04-07 12:04:40 -04:00
7936483ffc feat(provider): first-class Ollama support + Gemma 4 defaults (#169)
- Add 'ollama' to CLI provider choices and auth aliases
- Wire Ollama through resolve_provider_client with auto-detection
- Add _try_ollama to auxiliary fallback chain (before local/custom)
- Add ollama to vision provider order
- Update model_metadata.py: ollama prefix + gemma-4-* context lengths (256K)
- Default model: gemma4:12b when provider=ollama
2026-04-07 12:04:10 -04:00
69525f49ab Merge pull request '[BEZALEL][#203] Deep Self-Awareness Epic — Architecture & Topology Ingestion' (#215) from bezalel/self-awareness-epic-203 into main
All checks were successful
Forge CI / smoke-and-build (push) Successful in 1m57s
2026-04-07 14:50:34 +00:00
782e3b65d9 docs(bezael): Deep Self-Awareness Epic — architecture and topology ingestion
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 1m0s
- Add bezalel_topology.md: complete system architecture map
- Add topology_scan.py: automated topology discovery script
- Covers hardware, network, services, dependencies, fleet map,
  Evennia integration, MemPalace config, and emergency procedures

Addresses #203
2026-04-07 14:19:27 +00:00
bfb876b599 Merge pull request 'docs: add BOOT.md for hermes-agent repository' (#202) from bezalel/ci-uv-cache into main
All checks were successful
Forge CI / smoke-and-build (push) Successful in 1m28s
2026-04-07 14:15:14 +00:00
6479465300 docs: add BOOT.md for hermes-agent repository
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 47s
2026-04-07 14:10:40 +00:00
a1c5d7b6bf Merge pull request '[SYNC] Merge upstream NousResearch/hermes-agent — 499 commits' (#201) from upstream-sync into main
All checks were successful
Forge CI / smoke-and-build (push) Successful in 53s
Reviewed-on: #201
2026-04-07 14:03:15 +00:00
Alexander Whitestone
a0e625047e merge: sync with upstream NousResearch/hermes-agent (499 commits)
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 0s
Resolves all 10 conflicts by keeping upstream versions of core files.
Our 142 unique additions (wizard-bootstrap, CI, docs, tests, agent evolution) preserved.

Upstream highlights:
- Browser Use replaces Browserbase
- notify_on_complete for background processes
- Permanent command allowlist for approvals
- Reasoning block display fixes
- Credential pool auto-detection
- Many bug fixes and improvements
2026-04-07 10:00:16 -04:00
010894da7e Merge pull request '[BEZALEL] Fix Gitea CI — Remove container directive for host-mode runner' (#194) from bezalel/fix-gitea-ci-runner-host-mode into main
All checks were successful
Forge CI / smoke-and-build (push) Successful in 1m12s
2026-04-07 13:55:03 +00:00
3a3337a78e [BEZALEL] Fix Gitea CI — Remove container directive for host-mode runner 2026-04-07 13:54:38 +00:00
293c44603e fix(ci): remove container directive from Gitea workflows for host-mode runner
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 49s
The bezalel-vps-runner is registered in host mode (:host labels)
and cannot execute Docker containers. The container pinning added
in #180 causes all Gitea CI jobs to fail immediately with:

  Cannot connect to the Docker daemon at unix:///var/run/docker.sock

Remove container: from .gitea/workflows/*.yml while keeping it in
.github/workflows/ for actual GitHub Actions runners.

Fixes CI for all open PRs and main branch pushes.
2026-04-07 13:53:42 +00:00
Ben Barclay
b2f477a30b feat: switch managed browser provider from Browserbase to Browser Use (#5750)
* feat: switch managed browser provider from Browserbase to Browser Use

The Nous subscription tool gateway now routes browser automation through
Browser Use instead of Browserbase. This commit:

- Adds managed Nous gateway support to BrowserUseProvider (idempotency
  keys, X-BB-API-Key auth header, external_call_id persistence)
- Removes managed gateway support from BrowserbaseProvider (now
  direct-only via BROWSERBASE_API_KEY/BROWSERBASE_PROJECT_ID)
- Updates browser_tool.py fallback: prefers Browser Use over Browserbase
- Updates nous_subscription.py: gateway vendor 'browser-use', auto-config
  sets cloud_provider='browser-use' for new subscribers
- Updates tools_config.py: Nous Subscription entry now uses Browser Use
- Updates setup.py, cli.py, status.py, prompt_builder.py display strings
- Updates all affected tests to match new behavior

Browserbase remains fully functional for users with direct API credentials.
The change only affects the managed/subscription path.

* chore: remove redundant Browser Use hint from system prompt

* fix: upgrade Browser Use provider to v3 API

- Base URL: api/v2 -> api/v3 (v2 is legacy)
- Unified all endpoints to use native Browser Use paths:
  - POST /browsers (create session, returns cdpUrl)
  - PATCH /browsers/{id} with {action: stop} (close session)
- Removed managed-mode branching that used Browserbase-style
  /v1/sessions paths — v3 gateway now supports /browsers directly
- Removed unused managed_mode variable in close_session

* fix(browser-use): use X-Browser-Use-API-Key header for managed mode

The managed gateway expects X-Browser-Use-API-Key, not X-BB-API-Key
(which is a Browserbase-specific header). Using the wrong header caused
a 401 AUTH_ERROR on every managed-mode browser session create.

Simplified _headers() to always use X-Browser-Use-API-Key regardless
of direct vs managed mode.

* fix(nous_subscription): browserbase explicit provider is direct-only

Since managed Nous gateway now routes through Browser Use, the
browserbase explicit provider path should not check managed_browser_available
(which resolves against the browser-use gateway). Simplified to direct-only
with managed=False.

* fix(browser-use): port missing improvements from PR #5605

- CDP URL normalization: resolve HTTP discovery URLs to websocket after
  cloud provider create_session() (prevents agent-browser failures)
- Managed session payload: send timeout=5 and proxyCountryCode=us for
  gateway-backed sessions (prevents billing overruns)
- Update prompt builder, browser_close schema, and module docstring to
  replace remaining Browserbase references with Browser Use
- Dynamic /browser status detection via _get_cloud_provider() instead
  of hardcoded env var checks (future-proof for new providers)
- Rename post_setup key from 'browserbase' to 'agent_browser'
- Update setup hint to mention Browser Use alongside Browserbase
- Add tests: CDP normalization, browserbase direct-only guard,
  managed browser-use gateway, direct browserbase fallback

---------

Co-authored-by: rob-maron <132852777+rob-maron@users.noreply.github.com>
2026-04-07 08:40:22 -04:00
e07c3bcf00 Merge pull request '[BEZALEL][Epic-001] The Forge CI Pipeline + Health Check Fix' (#175) from bezalel/epic-001-forge-ci into main
Some checks failed
Forge CI / smoke-and-build (push) Failing after 0s
2026-04-07 12:37:31 +00:00
fcdbdd9f50 Merge pull request '[BEZALEL][CI] Enable uv caching in Forge CI workflow' (#187) from bezalel/ci-uv-cache into main
Some checks failed
Forge CI / smoke-and-build (push) Failing after 0s
2026-04-07 12:37:27 +00:00
87209a933f Merge pull request '[claude] Fix CI runner: pin act-22.04 container for Node.js (#174)' (#180) from claude/issue-174 into main
Some checks failed
Forge CI / smoke-and-build (push) Failing after 0s
2026-04-07 12:37:06 +00:00
61d137798e Merge pull request '[BEZALEL] Fix syntax error breaking all CI (test_skill_name_traversal.py)' (#188) from bezalel/fix-indentation-error into main
Some checks failed
Forge CI / smoke-and-build (push) Has been cancelled
2026-04-07 12:36:49 +00:00
5009f972c1 fix: indentation error in test_skill_name_traversal.py line 282
All checks were successful
Forge CI / smoke-and-build (pull_request) Successful in 1m46s
2026-04-07 12:34:17 +00:00
0438120402 [BEZALEL][CI] Enable uv caching in Forge CI workflow
Some checks failed
Forge CI / smoke-and-build (pull_request) Failing after 41s
2026-04-07 12:27:59 +00:00
Teknium
8b861b77c1 refactor: remove browser_close tool — auto-cleanup handles it (#5792)
* refactor: remove browser_close tool — auto-cleanup handles it

The browser_close tool was called in only 9% of browser sessions (13/144
navigations across 66 sessions), always redundantly — cleanup_browser()
already runs via _cleanup_task_resources() at conversation end, and the
background inactivity reaper catches anything else.

Removing it saves one tool schema slot in every browser-enabled API call.

Also fixes a latent bug: cleanup_browser() now handles Camofox sessions
too (previously only Browserbase). Camofox sessions were never auto-cleaned
per-task because they live in a separate dict from _active_sessions.

Files changed (13):
- tools/browser_tool.py: remove function, schema, registry entry; add
  camofox cleanup to cleanup_browser()
- toolsets.py, model_tools.py, prompt_builder.py, display.py,
  acp_adapter/tools.py: remove browser_close from all tool lists
- tests/: remove browser_close test, update toolset assertion
- docs/skills: remove all browser_close references

* fix: repeat browser_scroll 5x per call for meaningful page movement

Most backends scroll ~100px per call — barely visible on a typical
viewport. Repeating 5x gives ~500px (~half a viewport), making each
scroll tool call actually useful.

Backend-agnostic approach: works across all 7+ browser backends without
needing to configure each one's scroll amount individually. Breaks
early on error for the agent-browser path.

* feat: auto-return compact snapshot from browser_navigate

Every browser session starts with navigate → snapshot. Now navigate
returns the compact accessibility tree snapshot inline, saving one
tool call per browser task.

The snapshot captures the full page DOM (not viewport-limited), so
scroll position doesn't affect it. browser_snapshot remains available
for refreshing after interactions or getting full=true content.

Both Browserbase and Camofox paths auto-snapshot. If the snapshot
fails for any reason, navigation still succeeds — the snapshot is
a bonus, not a requirement.

Schema descriptions updated to guide models: navigate mentions it
returns a snapshot, snapshot mentions it's for refresh/full content.

* refactor: slim cronjob tool schema — consolidate model/provider, drop unused params

Session data (151 calls across 67 sessions) showed several schema
properties were never used by models. Consolidated and cleaned up:

Removed from schema (still work via backend/CLI):
- skill (singular): use skills array instead
- reason: pause-only, unnecessary
- include_disabled: now defaults to true
- base_url: extreme edge case, zero usage
- provider (standalone): merged into model object

Consolidated:
- model + provider → single 'model' object with {model, provider} fields.
  If provider is omitted, the current main provider is pinned at creation
  time so the job stays stable even if the user changes their default.

Kept:
- script: useful data collection feature
- skills array: standard interface for skill loading

Schema shrinks from 14 to 10 properties. All backend functionality
preserved — the Python function signature and handler lambda still
accept every parameter.

* fix: remove mixture_of_agents from core toolsets — opt-in only via hermes tools

MoA was in _HERMES_CORE_TOOLS and composite toolsets (hermes-cli,
hermes-messaging, safe), which meant it appeared in every session
for anyone with OPENROUTER_API_KEY set. The _DEFAULT_OFF_TOOLSETS
gate only works after running 'hermes tools' explicitly.

Now MoA only appears when a user explicitly enables it via
'hermes tools'. The moa toolset definition and check_fn remain
unchanged — it just needs to be opted into.
2026-04-07 03:28:44 -07:00
Teknium
cafdfd3654 fix: sync bundled skills to default profile when updating from a named profile (#5795)
The filter in cmd_update() excluded is_default profiles from the
cross-profile skill sync loop. When running 'hermes update' from a
named profile (e.g. hermes -p coder update), the default profile
(~/.hermes) never received new bundled skills.

Remove the 'not p.is_default' condition so all profiles — including
default — are synced regardless of which profile runs the update.

Reported by olafgeibig.
2026-04-07 02:49:20 -07:00
Teknium
e120d2afac feat: notify_on_complete for background processes (#5779)
* feat: notify_on_complete for background processes

When terminal(background=true, notify_on_complete=true), the system
auto-triggers a new agent turn when the process exits — no polling needed.

Changes:
- ProcessSession: add notify_on_complete field
- ProcessRegistry: add completion_queue, populate on _move_to_finished()
- Terminal tool: add notify_on_complete parameter to schema + handler
- CLI: drain completion_queue after agent turn AND during idle loop
- Gateway: enhanced _run_process_watcher injects synthetic MessageEvent
  on completion, triggering a full agent turn
- Checkpoint persistence includes notify_on_complete for crash recovery
- code_execution_tool: block notify_on_complete in sandbox scripts
- 15 new tests covering queue mechanics, checkpoint round-trip, schema

* docs: update terminal tool descriptions for notify_on_complete

- background: remove 'ONLY for servers' language, describe both patterns
  (long-lived processes AND long-running tasks with notify_on_complete)
- notify_on_complete: more prescriptive about when to use it
- TERMINAL_TOOL_DESCRIPTION: remove 'Do NOT use background for builds'
  guidance that contradicted the new feature
2026-04-07 02:40:16 -07:00
Teknium
1c425f219e fix(cli): defer response content until reasoning block completes (#5773)
When show_reasoning is on with streaming, content tokens could arrive
while the reasoning box was still rendering (interleaved thinking mode).
This caused the response box to open before reasoning finished, resulting
in reasoning appearing after the response in the terminal.

Fix: buffer content in _deferred_content while _reasoning_box_opened is
True. Flush the buffer through _emit_stream_text when _close_reasoning_box
runs, ensuring reasoning always renders before the response.
2026-04-07 01:03:52 -07:00
Teknium
d9e7e42d0b fix(approval): load permanent command allowlist on startup (#5076)
Co-authored-by: Timo Karp <timo@timos-macbook-pro.taildbbd26.ts.net>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 01:00:02 -07:00
Ben Barclay
302240d3a6 Merge pull request #5745 from NousResearch/fix/portal-env-var-ignored-during-login
fix: HERMES_PORTAL_BASE_URL env var ignored during Nous login
2026-04-07 17:57:31 +10:00