Repository navigation
Conversation
|
Topology / landing interlock, verified against live This is a real complementary Bot Mode authority slice, not a duplicate, but it now has two active semantic/file collisions that cannot be left to merge timing:
The composed authority law must be one decision across all three axes: the current session/source is allowed; the declarative install/config roster allows the relationship; and the target profile is currently enabled/readable. Prompt projection and tool/schema exposure must derive from that same law, while dispatch rechecks the live revocable pieces before spawning delivery. Landing order for the current graph: compose #101057's source/session boundary first; reconcile this PR's Required composition matrix: config-only enable; roster-denied target; Exact-head proof for this PR is otherwise clean right now: |
andrexibiza
left a comment
There was a problem hiding this comment.
Exact-head review on 2215b6e88d55cbbd7ae7de9431a2b2a86d48cc81 (one surviving commit). CI 33760623189, Docker 33760622131, and Nix 33760622105 are green.
One code-level blocker remains in the declarative authority path: _configured_targets() treats any non-list agent.bot_mode.roster as None, and every caller interprets None as “no restriction; allow every local profile.” Because this PR reads config.yaml directly rather than through a typed/validated bot-mode schema, a malformed restriction such as roster: {from: default, to: [coder]} silently fails open and exposes every local teammate even though the operator attempted to constrain the relationship. Invalid/ambiguous authority configuration needs to deny local targets (or be rejected by canonical config validation) rather than becoming the unrestricted case. Please add the inverse regression for malformed roster shape and keep the explicit missing-roster case as the only unrestricted path.
The previously posted #101057/#100758 composition interlock still applies after that fix; I found no additional isolated-head defect in this pass.
Rematerialize NousResearch#100758 on main f58fcc8, retaining the tested source-first composition of NousResearch#101057 and the declarative roster from NousResearch#102195, together with durable leases, publication fencing, chain-qualified compression recovery, repeated-step identities and strict configuration policy. Original development history: 924fce6, retained in backup/pr100758-before-landing-20260905. Source-authority contribution: NousResearch#101057 at 8355ab1. Declarative roster contribution: NousResearch#102195 at 2215b6e. The NousResearch#99333 client salvage and StodsEcho5 credit remain inherited from main via NousResearch#101214. Validated with scripts/run_tests.sh: 906 passed, 0 failed, 9 skipped across 43 files; retries disabled. Ruff 0.16.4 passed for all changed Python files. Hosted verification must reference this new commit, not earlier tips. Co-authored-by: Brooklyn Nicholson <brooklyn.bb.nicholson@gmail.com> Co-authored-by: Ahmett101 <ahmet.tunc@gmail.com>
Summary
Adds a CLI-native Bot Mode declaration path so
agent.bot_mode.enabled: trueinconfig.yamlenables the Bot Chat protocol andmessage_agenttool without requiring Desktop-writtenui_meta["hermes-bots"]. Optionalagent.bot_mode.rosterentries now constrain local profile DMs, while existing Desktopui_metabehavior remains supported.Changes
tools/bot_mode_probe.py: readsagent.bot_modefrom rootconfig.yaml, treatsenabled: trueas a managed Bot Mode install, filters local roster entries by optionalroster, and includes config state in the Bot Chat capability fingerprint.tools/bot_mode_dm.py: applies the configured local roster tomessage_agenttarget validation and teammate error payloads.tests/tools/test_bot_mode_probe.py: adds regression coverage for config-only Bot Mode enablement and roster-limited prompt injection.tests/tools/test_bot_mode_dm.py: adds regression coverage for config-only tool injection and rejection of unlisted local teammates.How to Test
Full
scripts/run_tests.shwas attempted on Termux and failed before exercising the suite because the parallel runner crashed with repeatedPermissionError(13, 'Permission denied'); scoped regression tests passed.Checklist
Risk & Impact
Low. The existing Desktop-managed
ui_metapath is preserved; config-based Bot Mode only activates when users explicitly setagent.bot_mode.enabled: true.Type: New feature
Closes: #102155