feat(engine): engine-probed capability manifest + pre-launch gate (issue #5 proposal 3) - #11
Merged
Merged
Conversation
…sue #5 proposal 3) Actors may declare required_capabilities from a controlled vocabulary (config.KNOWN_CAPABILITIES; unknown entries fail definition load). Before any claim or runtime spawn, the engine probes each required capability from the CLI itself — never adapter self-report — and refuses the launch when the probed manifest lacks one. v1 vocabulary: cli-version (<cli> --version exits 0) and hermes-cli one-shot-source-tagging (chat --help shows -q/--source/ --pass-session-id, verified against real Hermes v0.20). The manifest (probe argv, exit, truncated output, full-output hash per capability) is recorded in the turn evidence as capability_manifest. Canary: a stub whose chat --help omits --source gets the launch refused with no claim, no spawn, no ledger commit.
askclaw-vesper
force-pushed
the
feat/capability-manifest
branch
from
August 20, 2026 06:26
5705f17 to
e169ed9
Compare
There was a problem hiding this comment.
Confidence Score: 4/5
Summary
Adds an engine-probed capability manifest with a pre-launch gate that refuses before claim or spawn. Fail-closed design, full suite green; remaining risks are robustness and consistency nits, plus the stacked dependency on #10.
Important Files Changed
| File | Overview |
|---|---|
| src/multi_agent_dialogue/config.py | KNOWN_CAPABILITIES vocabulary and required_capabilities parsing with unknown/duplicate/type validation |
| src/multi_agent_dialogue/adapters/base.py | Bounded probe runner, manifest builder, manifest embedded in evidence record |
| src/multi_agent_dialogue/adapters/hermes.py | chat --help probe for one-shot-source-tagging; loose substring checks |
| src/multi_agent_dialogue/runner.py | Capability gate after prepare, before claim and any spawn |
| schemas/protocol.schema.json | required_capabilities enum duplicated by hand from config vocabulary |
| schemas/runtime-evidence.schema.json | capability_manifest shape with per-capability probe record |
| examples/fakes/bin/fake-hermes | chat --help fixture mirroring real v0.20 surface |
| docs/technical-reference.md | Capability gate documentation |
| tests/test_config.py | Vocabulary matrix: default, known, unknown, duplicate, non-string |
| tests/test_real_contracts.py | Canary: refusal before spawn, no claim, manifest recorded on pass |
- gate wraps probe failures into ProtocolError (no raw AdapterError); - the evidence records the SAME manifest that gated the launch (runner attaches it to the frozen context via dataclasses.replace), so no divergent re-probe and no probe failure after completion; - hook AdapterError inside probe_capabilities is caught and recorded as manifest hook_error instead of crashing the gate; - flag checks use exact-token regexes (-q no longer matches --query, --source no longer matches --source-map) with a lookalike-flags test; - probe records gain output_truncated for cli_version parity; - probe annotation typed Callable[[str, int], bool]; - schema capability enums are pinned to config.KNOWN_CAPABILITIES by a cross-check test so they cannot drift.
This was referenced Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements issue #5, proposal 3 (engine-detected adapter capability manifest). Stacked on #10 — merge order: #10, then this.
Design (per the proposal's hard constraints)
config.KNOWN_CAPABILITIES; unknown entries fail definition load. v1 entries, each verified against the real CLI:cli-version:<cli> --versionexits 0 (all adapters with a version argv).one-shot-source-tagging(hermes-cli):<cli> chat --helpshows-q/--source/--pass-session-id— probe shape verified against real Hermes v0.20.4.runner.launchprobes required capabilities after prepare and refuses before claim, before any runtime spawn with the missing capability named.capability_manifest(only when the actor declares requirements, so unchanged turns pay nothing).Canary (from the proposal)
A stubbed CLI whose
chat --helpomits--source→ launch refused,markerfile absent (no spawn), no claim,turn_index0 (test_missing_capability_refuses_launch_before_any_spawn). Plus: manifest recorded on pass, failing--versionfails the gate, and the config-level vocabulary matrix (unknown/duplicate/non-string/default).Tests
Full suite: 309 passed;
scripts/verify.py→{"ok": true}.