Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
1d4c1ee
feat(tui): respect history_nav_requires_empty_input for history nav
nicoechaniz Apr 22, 2026
5b52b37
feat(cli): make Ctrl+C priority configurable (interrupt_agent vs clea…
nicoechaniz Apr 17, 2026
534d6c0
fix(agent): sanitize unanswered tool_calls on interrupt to prevent tr…
nicoechaniz Apr 17, 2026
569a426
fix(cli): handle multimodal interrupt payloads in re-queue
nicoechaniz Apr 18, 2026
6207442
feat(tui): add scrollbar to input and make max lines configurable
nicoechaniz Apr 16, 2026
cff1d33
fix(cli): restore TUI config support in prompt_toolkit input
nicoechaniz Apr 22, 2026
a6c20e1
chore(gitignore): ignore local project memory and session artifacts
nicoechaniz Apr 23, 2026
6d50e64
feat(kimi): OAuth coding integration with X-Msh-* headers and tempera…
nicoechaniz Apr 22, 2026
a0849a6
chore(kimi): remove temperature pinning for Kimi coding
nicoechaniz Apr 25, 2026
bcbd38c
fix(kimi): repair upstream transport merge
nicoechaniz Apr 25, 2026
a8ba5b1
Merge branch 'feat/altermundi-tui'
nicoechaniz Apr 25, 2026
e504983
Merge branch 'feat/kimi-oauth-clean'
nicoechaniz Apr 25, 2026
9292e1b
fix(auxiliary): refresh Kimi OAuth credentials on 401 for memory flush
nicoechaniz Apr 28, 2026
a2d4732
Merge branch 'feat/kimi-oauth-clean'
nicoechaniz Apr 28, 2026
412df95
Merge branch 'nousmain' into feat/kimi-oauth-clean
nicoechaniz Apr 28, 2026
8e5160f
Merge branch 'nousmain' into feat/altermundi-cli
nicoechaniz Apr 28, 2026
6a6e0a8
Merge branch 'nousmain' into feat/altermundi-tui
nicoechaniz Apr 28, 2026
8988de7
Merge upstream/main (nousmain) into main
nicoechaniz Apr 28, 2026
1811b9e
Merge branch 'feat/kimi-oauth-clean'
nicoechaniz Apr 28, 2026
4a0365f
Merge branch 'feat/altermundi-cli'
nicoechaniz Apr 28, 2026
dc28400
Merge branch 'feat/altermundi-tui'
nicoechaniz Apr 28, 2026
442000f
feat: configurable compression protect_first_n and custom prompt
nicoechaniz Apr 29, 2026
6dba014
Merge remote-tracking branch 'upstream/main'
nicoechaniz Apr 29, 2026
371e3e0
Merge branch 'feat/compression-config'
nicoechaniz Apr 29, 2026
5611017
fix(agent): enable prompt caching for MiniMax own models on anthropic…
nicoechaniz Apr 29, 2026
0150e89
Merge feat/minimax-prompt-caching: MiniMax prompt caching fix (#17333)
nicoechaniz Apr 29, 2026
412d505
fix(agent): default MiniMax provider to anthropic_messages + base_url
nicoechaniz Apr 29, 2026
893fed4
Merge feat/minimax-prompt-caching: MiniMax AIAgent default api_mode +…
nicoechaniz Apr 29, 2026
aaa63f2
Merge upstream/main (v2026.4.30) into main
nicoechaniz May 1, 2026
6e43238
fix(agent): default MiniMax provider to anthropic_messages + correct …
nicoechaniz May 1, 2026
5a2a977
Merge branch 'feat/minimax-defaults'
nicoechaniz May 1, 2026
32d7b91
feat(agent): configurable compression protect_first_n and custom prompt
nicoechaniz May 1, 2026
f6c67a6
Merge branch 'feat/compression-config-reboot'
nicoechaniz May 1, 2026
b2086db
feat(gateway/daemoncraft): heartbeat context injection for DC-112
nicoechaniz May 2, 2026
bc50463
feat(gateway): two-level event architecture for DC-112
nicoechaniz May 2, 2026
67ec533
fix(gateway): restore DaemonCraft adapter wiring lost in rebase
nicoechaniz May 2, 2026
4a488bd
fix(gateway): pass tool_choice through _run_agent signature
nicoechaniz May 2, 2026
a2b1c1f
feat(gateway/daemoncraft): heartbeat context injection for DC-112
nicoechaniz May 2, 2026
032ac1b
feat(gateway): two-level event architecture for DC-112
nicoechaniz May 2, 2026
485abc4
fix(gateway): restore DaemonCraft adapter wiring lost in rebase
nicoechaniz May 2, 2026
42ca6ed
fix(gateway): pass tool_choice through _run_agent signature
nicoechaniz May 2, 2026
18313cb
Merge branch 'feat/dc-112-daemoncraft-gateway'
nicoechaniz May 2, 2026
78a7c23
fix(gateway): register daemoncraft platform + handle kimi tool_choice…
nicoechaniz May 2, 2026
6603628
feat(transport): generic thinking disable for tool_choice=required
nicoechaniz May 2, 2026
7d2c23b
fix(gateway): load per-message profile config for multi-profile setups
nicoechaniz May 2, 2026
380485b
DC-99: gateway per-platform profile support for daemoncraft adapter
nicoechaniz May 1, 2026
fae7187
DC-99: profile system prompt overrides global ephemeral prompt
nicoechaniz May 1, 2026
68de915
DC-99: skip global context files when gateway session uses a profile
nicoechaniz May 1, 2026
7402680
DC-99: override cached system prompt with profile prompt
nicoechaniz May 1, 2026
b3dc3df
fix(gateway/daemoncraft): scope group chat_id per bot to isolate sess…
nicoechaniz May 3, 2026
2020a5c
feat(tools): track minecraft_tools.py and register minecraft toolset
nicoechaniz May 3, 2026
c788571
feat(tools): session-scoped endpoint resolution for minecraft tools
nicoechaniz May 3, 2026
d70fd6e
fix(tools): remove undefined session_id from check_minecraft_available
nicoechaniz May 3, 2026
7cea0ff
refactor(tools): replace global endpoint dict with contextvars
nicoechaniz May 3, 2026
cccdfa0
chore(git): move MEMORY.md ignore from .gitignore to local exclude
nicoechaniz May 3, 2026
872f121
fix(gateway/daemoncraft): classify task_stuck heartbeat as wake_up
nicoechaniz May 3, 2026
1080ded
feat(gateway/daemoncraft): post agent logs to bot server for dashboard
nicoechaniz May 3, 2026
0b9c4e2
feat(gateway/daemoncraft): plan-driven heartbeat wake-ups + plan GC
nicoechaniz May 3, 2026
61ac70e
fix(gateway/daemoncraft): use sequential turn counter for agent logs
nicoechaniz May 3, 2026
5e0ca78
feat(agent,gateway): DC-134 configurable turn wall-clock timeout
nicoechaniz May 3, 2026
a96dbbd
fix(gateway): DC-134 read max_iterations and turn_timeout from profil…
nicoechaniz May 3, 2026
88206d5
chore: update MEMORY.md — DC consolidation, branch cleanup
nicoechaniz May 8, 2026
c347435
fix(gateway/daemoncraft): run transform_tool_result hooks on syntheti…
Fede654 May 3, 2026
7839ae1
feat(gateway/daemoncraft): port CycleDetector from daemoncraft agents…
Fede654 May 3, 2026
d61be7f
fix(DC-123): relay agent turns to Bot Mind panel and restore TTS on D…
Fede654 May 3, 2026
6fee953
test(gateway): CycleDetector + synthetic perceive hook coverage
Fede654 May 3, 2026
1131d12
feat(gateway/daemoncraft): emit mc_action_result hook for action_resu…
Fede654 May 3, 2026
542423a
feat(gateway/daemoncraft): emit DC-132 turn + tool metrics
Fede654 May 3, 2026
2d4db07
fix(gateway/daemoncraft): use os.O_APPEND single-write for DC-132 met…
Fede654 May 3, 2026
573b88b
fix(gateway/daemoncraft): DC-123 TTS fixes + wake-up logging, DC-132 …
nicoechaniz May 3, 2026
d9f0cca
chore: add upstream velocity context to MEMORY.md
nicoechaniz May 8, 2026
e94a527
merge: sync with upstream/main (2026-05-08)
nicoechaniz May 8, 2026
e2624a8
chore: update MEMORY.md — sync complete, v2026.5.7
nicoechaniz May 8, 2026
b395e94
chore: update MEMORY.md — memory scope rules, DC-MIG architecture note
nicoechaniz May 8, 2026
172454e
fix(daemoncraft): move TTS relay from _post_agent_log to send()
nicoechaniz May 8, 2026
1ef7d53
chore(git): untrack project-local memory
nicoechaniz May 8, 2026
18d7e08
fix(compressor): define preamble/template before prompt f-strings
Fede654 May 8, 2026
f168790
docs: add CHANGELOG and AGENTS_SETUP for multi-agent roster (2026-05-09)
nicoechaniz May 9, 2026
b29185d
fix: daemoncraft adapter skips heartbeat turns from dashboard
nicoechaniz May 9, 2026
942e660
feat(tools): embodied_plan tool + retire minecraft/altercraft toolsets
Fede654 May 9, 2026
e2c4f7c
feat(daemoncraft): embodied heartbeat — inject Gemma-Andy world state
nicoechaniz May 10, 2026
1233ad8
Merge pull request #3 from Fede654/fix/compressor-preamble-template-bug
nicoechaniz May 10, 2026
c4abd23
fix(compressor): define preamble/template before prompt f-strings
Fede654 May 8, 2026
b99e34b
Merge branch 'feat/embodied-heartbeat' into feat/daemoncraft
nicoechaniz May 10, 2026
07dd167
fix(embodied): pass BOT_API_URL from env to embodied service
nicoechaniz May 10, 2026
598ca41
fix(daemoncraft): @name! = interrupt, @name = steer + dynamic known_bots
nicoechaniz May 10, 2026
1b3736a
feat(kanban): ship-review orchestration — review graph, templates, te…
nicoechaniz May 11, 2026
9ad5cd6
Merge branch 'nousmain'
nicoechaniz May 11, 2026
5c0f94b
Merge branch 'feat/daemoncraft'
nicoechaniz May 11, 2026
c67de94
fix(model-metadata): prioritize curated defaults over OpenRouter for …
nicoechaniz May 11, 2026
9e9de23
Merge branch 'fix/kimi-context-length-resolution'
nicoechaniz May 11, 2026
b7c344a
docs: add CHANGELOG.md — team-facing fork changelog
nicoechaniz May 11, 2026
e860465
feat(embodied_plan): in-intent replan workaround for Gemma-Andy regre…
Fede654 May 10, 2026
cdc92f9
feat(embodied_plan): bake intent-composition rules into the schema de…
Fede654 May 10, 2026
0739e93
test: pin daemoncraft-base intent-composition rules
Fede654 May 10, 2026
bf15c7e
test: add failing cases for embodied_plan auto-recovery (TDD step 1)
Fede654 May 10, 2026
731db36
feat(embodied_plan): synchronous auto-recovery on execution failure
Fede654 May 10, 2026
7694354
revert(embodied_plan): retire tool-level auto-recovery; loop owns ret…
Fede654 May 10, 2026
1aaee61
test: pin autonomous-loop terms in daemoncraft-base rules
Fede654 May 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@
# =============================================================================
# MiniMax provides access to MiniMax models (global endpoint)
# Get your key at: https://www.minimax.io
# MINIMAX_API_KEY=
# MINIMAX_BASE_URL=https://api.minimax.io/v1 # Override default base URL
# MINIMAX_API_KEY=***
# MINIMAX_BASE_URL=https://api.minimax.io/anthropic # Anthropic-compatible endpoint (required for prompt caching)

# MiniMax China endpoint (for users in mainland China)
# MINIMAX_CN_API_KEY=
# MINIMAX_CN_BASE_URL=https://api.minimaxi.com/v1 # Override default base URL
# MINIMAX_CN_API_KEY=***
# MINIMAX_CN_BASE_URL=https://api.minimaxi.com/anthropic # Anthropic-compatible endpoint (required for prompt caching)

# =============================================================================
# LLM PROVIDER (OpenCode Zen)
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ mini-swe-agent/
result
website/static/api/skills-index.json
models-dev-upstream/

# Local project memory and session artifacts (never commit)
.codex
hermes_conversation_*.json
102 changes: 102 additions & 0 deletions AGENTS_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Agent Setup Guide

How to set up and run the multi-agent Kanban coding roster on your machine.

## Prerequisites

- Hermes Agent installed and working (`hermes chat -q "hello"`)
- API keys for your preferred providers in `~/.hermes/.env`
- Git access to this repo

## Quick Start

```bash
# 1. Pull latest
cd ~/Projects/hermes-agent
git pull origin main

# 2. Sync deploy target (if using gateway)
cd ~/.hermes/hermes-agent
git pull local-project main

# 3. Create profiles (one-time)
hermes profile create riqui
hermes profile create miki
hermes profile create maxi

# 4. Copy configs from repo
cp ~/Projects/hermes-agent/profiles/riqui/config.yaml ~/.hermes/profiles/riqui/
cp ~/Projects/hermes-agent/profiles/miki/config.yaml ~/.hermes/profiles/miki/
cp ~/Projects/hermes-agent/profiles/maxi/config.yaml ~/.hermes/profiles/maxi/

# 5. ADAPT PROVIDERS TO YOUR STACK (IMPORTANT)
# Edit each profile's config.yaml:
# - model.provider: your provider (openrouter, anthropic, nous, etc.)
# - model.default: your model name
# - model.base_url: your provider's endpoint (if needed)
# - model.api_key or symlink .env
$EDITOR ~/.hermes/profiles/riqui/config.yaml
$EDITOR ~/.hermes/profiles/miki/config.yaml
$EDITOR ~/.hermes/profiles/maxi/config.yaml

# 6. Copy SOUL.md files
cp ~/Projects/hermes-agent/profiles/riqui/SOUL.md ~/.hermes/profiles/riqui/
cp ~/Projects/hermes-agent/profiles/miki/SOUL.md ~/.hermes/profiles/miki/
cp ~/Projects/hermes-agent/profiles/maxi/SOUL.md ~/.hermes/profiles/maxi/

# 7. Symlink .env and agent-memory
ln -sf ~/.hermes/.env ~/.hermes/profiles/riqui/.env
ln -sf ~/.hermes/.env ~/.hermes/profiles/miki/.env
ln -sf ~/.hermes/.env ~/.hermes/profiles/maxi/.env
ln -sf ~/.hermes/agent-memory ~/.hermes/profiles/riqui/agent-memory
ln -sf ~/.hermes/agent-memory ~/.hermes/profiles/miki/agent-memory
ln -sf ~/.hermes/agent-memory ~/.hermes/profiles/maxi/agent-memory

# 8. Test each profile
hermes -p riqui chat -q "hello" --quiet
hermes -p miki chat -q "hello" --quiet
hermes -p maxi chat -q "hello" --quiet # ⚠ known issue: maxi needs api_mode fix
```

## Profile Reference

| Profile | Purpose | Key config | Status |
|---------|---------|-----------|--------|
| riqui | Fast surgical coding | max_turns=30, reasoning=minimal | ✓ Working |
| miki | Deep-thinking coding (Kimi) | max_turns=30, reasoning=high | ✓ Working |
| maxi | Deep-thinking coding (MiniMax) | max_turns=30, reasoning=high, Anthropic endpoint | ⚠ API mode bug |

## Provider Adaptation

The profiles assume our stack (DeepSeek, Kimi OAuth, MiniMax API key). To use different providers:

### Using OpenRouter
```yaml
model:
default: openai/gpt-5.4 # or anthropic/claude-sonnet-4-6, etc.
provider: openrouter
```

### Using Anthropic Direct
```yaml
model:
default: claude-sonnet-4-6-20250514
provider: anthropic
```

### Using Nous Portal
```yaml
model:
default: anthropic/claude-sonnet-4-6
provider: nous
```

The `agent.max_turns` and `agent.reasoning_effort` settings are provider-agnostic.

## Kanban Worker Rules (CRITICAL)

- All coding profiles MUST have `max_turns >= 25` and `reasoning_effort >= minimal`
- Lower values cause protocol violations (exhausted iterations before kanban_complete)
- Kanban dispatcher spawns `hermes -p <profile> --skills kanban-worker chat -q "work kanban task <id>"`
- Workers MUST end with `kanban_complete()` or `kanban_block()` — text-only exit is a violation
- Dispatcher auto-blocks after 1 protocol violation (effective_limit=1)
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# CHANGELOG — nicoechaniz/hermes-agent fork

Team-facing summary of changes to our fork. For upstream changes between syncs,
see `~/wiki/projects/hermes-agent/notes/upstream-changes-review.md`.

---

## 2026-05-11

### Upstream sync (138 commits behind → caught up)

- `nousmain` reset to upstream/main (`8e2eb4b51`)
- `main` merged with upstream (2 conflicts resolved: Kimi OAuth headers + ProviderProfile fallback)
- `feat/daemoncraft` merged into `main` (5 commits: embodied heartbeat, @name! interrupt, compressor fix, embodied_plan, kanban-review)
- Deployed to `~/.hermes/hermes-agent`, gateway restarted

### Kimi K2.6 context window bug — fixed

**Problem:** Hermes rejected `kimi-k2.6` with "context window of 32,768 tokens, below minimum 64,000". Real context is 262,144 (256K).

**Root cause:** Two issues in the context-length resolution chain (`agent/model_metadata.py`, `agent/models_dev.py`):
1. `PROVIDER_TO_MODELS_DEV` was missing `"kimi"` and `"moonshot"` entries (only had `kimi-coding`/`kimi-coding-cn`)
2. OpenRouter metadata (community-maintained, incorrect for kimi-k2.6) was consulted BEFORE the project's own curated `DEFAULT_CONTEXT_LENGTHS`

**Fix (3 changes in 2 files):**
1. Added `"kimi"` → `"kimi-for-coding"` and `"moonshot"` → `"kimi-for-coding"` to `PROVIDER_TO_MODELS_DEV`
2. Gated OpenRouter fallback behind `not effective_provider` — known providers skip third-party metadata and go straight to curated defaults
3. Added explicit `DEFAULT_CONTEXT_LENGTHS` entries for `kimi-k2.6`, `kimi-k2.5`, `kimi-k2`, `k2p6`, `k2p5` (all 262,144)

**Result:** `provider: kimi` with `kimi-k2.6` now resolves to 262,144. No config workaround needed.

**PR upstream:** https://github.com/NousResearch/hermes-agent/pull/23950
**Cherry-picked to:** `feat/kimi-oauth-clean`

### Kanban cleanup

- hermes-agent board had ~2,778 synthetic test tasks from kanban development
- DB backed up to `kanban.db.backup-20260511-145448`, then deleted
- Fresh empty board auto-created on next CLI access

### Branches

| Branch | Status | Notes |
|--------|--------|-------|
| `nousmain` | Clean | Tracks upstream/main exactly |
| `main` | Integration | upstream + all our features |
| `feat/daemoncraft` | Active | Consolidated DC work (needs rebase onto new nousmain) |
| `feat/kimi-oauth-clean` | Active | Kimi OAuth + context-length fix |
| `fix/kimi-context-length-resolution` | Merged to main | Kimi context window fix |

### Pending

- `feat/daemoncraft` is on the old base — needs rebase onto new `nousmain` on next sync cycle
26 changes: 21 additions & 5 deletions agent/auxiliary_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,8 @@ def _resolve_api_key_provider() -> Tuple[Optional[OpenAI], Optional[str]]:
return GeminiNativeClient(api_key=api_key, base_url=base_url), model
extra = {}
if base_url_host_matches(base_url, "api.kimi.com"):
extra["default_headers"] = {"User-Agent": "claude-code/0.1.0"}
from hermes_cli.auth import kimi_coding_default_headers
extra["default_headers"] = kimi_coding_default_headers()
elif base_url_host_matches(base_url, "api.githubcopilot.com"):
from hermes_cli.models import copilot_default_headers

Expand Down Expand Up @@ -1346,7 +1347,8 @@ def _resolve_api_key_provider() -> Tuple[Optional[OpenAI], Optional[str]]:
return GeminiNativeClient(api_key=api_key, base_url=base_url), model
extra = {}
if base_url_host_matches(base_url, "api.kimi.com"):
extra["default_headers"] = {"User-Agent": "claude-code/0.1.0"}
from hermes_cli.auth import kimi_coding_default_headers
extra["default_headers"] = kimi_coding_default_headers()
elif base_url_host_matches(base_url, "api.githubcopilot.com"):
from hermes_cli.models import copilot_default_headers

Expand Down Expand Up @@ -2372,6 +2374,17 @@ def _refresh_provider_credentials(provider: str) -> bool:
return False
_evict_cached_clients(normalized)
return True
if normalized in ("kimi-coding", "kimi-coding-cn"):
from hermes_cli.auth import resolve_kimi_coding_runtime_credentials

creds = resolve_kimi_coding_runtime_credentials(
force_refresh=True,
allow_api_key_fallback=True,
)
if not str(creds.get("api_key", "") or "").strip():
return False
_evict_cached_clients(normalized)
return True
except Exception as exc:
logger.debug("Auxiliary provider credential refresh failed for %s: %s", normalized, exc)
return False
Expand Down Expand Up @@ -2586,7 +2599,8 @@ def _to_async_client(sync_client, model: str, is_vision: bool = False):
is_agent_turn=True, is_vision=is_vision
)
elif base_url_host_matches(sync_base_url, "api.kimi.com"):
async_kwargs["default_headers"] = {"User-Agent": "claude-code/0.1.0"}
from hermes_cli.auth import kimi_coding_default_headers
async_kwargs["default_headers"] = kimi_coding_default_headers()
else:
# Fall back to profile.default_headers for providers that declare
# client-level headers on their ProviderProfile (e.g. attribution
Expand Down Expand Up @@ -2822,7 +2836,8 @@ def _wrap_if_needed(client_obj, final_model_str: str, base_url_str: str = "",
if _dq:
extra["default_query"] = _dq
if base_url_host_matches(custom_base, "api.kimi.com"):
extra["default_headers"] = {"User-Agent": "claude-code/0.1.0"}
from hermes_cli.auth import kimi_coding_default_headers
extra["default_headers"] = kimi_coding_default_headers()
elif base_url_host_matches(custom_base, "api.githubcopilot.com"):
from hermes_cli.copilot_auth import copilot_request_headers
extra["default_headers"] = copilot_request_headers(
Expand Down Expand Up @@ -3019,7 +3034,8 @@ def _wrap_if_needed(client_obj, final_model_str: str, base_url_str: str = "",
# Provider-specific headers
headers = {}
if base_url_host_matches(base_url, "api.kimi.com"):
headers["User-Agent"] = "claude-code/0.1.0"
from hermes_cli.auth import kimi_coding_default_headers
headers.update(kimi_coding_default_headers())
elif base_url_host_matches(base_url, "api.githubcopilot.com"):
from hermes_cli.copilot_auth import copilot_request_headers

Expand Down
Loading
Loading