docs(turn-loop): fix stale context_window_tokens module path + on-boot files dir
Verified against hive-agent/src/harness_state.rs (context_window_tokens lives there, only imported into events.rs) and hive-agent/src/paths.rs (config_dir() defaults to /run/hive-config, deliberately separate from /run/hive/ which holds the per-agent socket).
This commit is contained in:
parent
ac58823eb3
commit
0f92e58ebb
1 changed files with 7 additions and 4 deletions
|
|
@ -51,7 +51,7 @@ survives restart; override path: `HYPERHIVE_MODEL_FILE` env var
|
||||||
for tests.
|
for tests.
|
||||||
|
|
||||||
Context-window size is looked up per-model via
|
Context-window size is looked up per-model via
|
||||||
`events::context_window_tokens(model)`. Resolution order (first
|
`harness_state::context_window_tokens(model)`. Resolution order (first
|
||||||
match wins):
|
match wins):
|
||||||
|
|
||||||
1. `HIVE_CONTEXT_WINDOW_TOKENS_<KEY>` env var, where `KEY`
|
1. `HIVE_CONTEXT_WINDOW_TOKENS_<KEY>` env var, where `KEY`
|
||||||
|
|
@ -129,7 +129,7 @@ window with two triggers baked into its `run`:
|
||||||
The **when** is a `hive_claude::CompactionPolicy` injected by the harness:
|
The **when** is a `hive_claude::CompactionPolicy` injected by the harness:
|
||||||
`turn::make_session` builds a `PercentPolicy` that compacts once the
|
`turn::make_session` builds a `PercentPolicy` that compacts once the
|
||||||
model-reported context fill reaches `HIVE_COMPACT_WATERMARK_PERCENT`
|
model-reported context fill reaches `HIVE_COMPACT_WATERMARK_PERCENT`
|
||||||
(default **75%**), falling back to `events::context_window_tokens(model)`
|
(default **75%**), falling back to `harness_state::context_window_tokens(model)`
|
||||||
for the window on turns the model didn't report one. `0` disables proactive
|
for the window on turns the model didn't report one. `0` disables proactive
|
||||||
compaction (the reactive path always applies). The proactive path is
|
compaction (the reactive path always applies). The proactive path is
|
||||||
best-effort — a failed checkpoint or `/compact` never fails the turn that
|
best-effort — a failed checkpoint or `/compact` never fails the turn that
|
||||||
|
|
@ -195,8 +195,11 @@ next turn picks it up like any other inbox message.
|
||||||
|
|
||||||
## On-boot files
|
## On-boot files
|
||||||
|
|
||||||
`hive-agent`'s `turn` module writes two files next to the per-agent
|
`hive-agent`'s `turn` module writes two files into its own per-service
|
||||||
socket at `/run/hive/` once at startup:
|
runtime dir, `/run/hive-config/` (`RuntimeDirectory = "hive-config"`,
|
||||||
|
deliberately separate from `/run/hive/`, the host-owned dir holding the
|
||||||
|
per-agent socket — so the harness owns this write surface and nothing
|
||||||
|
needs to `chown` a bind mount), once at startup:
|
||||||
|
|
||||||
- `claude-mcp-config.json` — points claude at the persistent
|
- `claude-mcp-config.json` — points claude at the persistent
|
||||||
`hive-mcp-http` daemon (`http://127.0.0.1:{port}/mcp`, port from
|
`hive-mcp-http` daemon (`http://127.0.0.1:{port}/mcp`, port from
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue