Skip to content

feat(core): converge tool gating with controller gating via per-Tool DomainGroup metadata #4821

Description

@oxoxDev

Context

Follow-up from PR #4808 (#4796 DomainSet seam), raised in @M3gA-Mind's review.

The DomainSet filter gates two surfaces with different grouping mechanisms:

  • Controllers carry an explicit DomainGroup tag at the single registration site (build_registered_controllers).
  • Agent tools are classified by a name/prefix heuristic (tool_group in src/openhuman/tools/ops.rs).

Problems this causes

  1. Axis divergence under harness(): Agent/Config/Security controllers stay live over RPC, but their agent tools (spawn_subagent, config/security tools, agent-orchestration tools) classify as Platform and drop. So the "embeddable agent core" tool surface is effectively memory + threads/todos only. This is an intentional strict-minimal choice for the seam PR, but the two axes should converge.
  2. Heuristic fragility: a new gate-family tool that matches no listed name/prefix silently defaults to Platform and would leak under a custom DomainSet. PR feat(core): runtime DomainSet composition axis — group-tagged registry + ambient filter (#4796) #4808 mitigated this by switching Web3/Media/Mcp/Channels to prefix matching + a no_gate_family_tool_silently_defaults_to_platform guard test, but that is still name-based, not authoritative.

Proposed direction

Give every Tool an authoritative fn domain_group(&self) -> DomainGroup (or a metadata field), sourced from the domain that owns the tool — the same way controllers carry their group. Then all_tools_with_runtime filters on that metadata instead of tool_group(name), and the two axes converge (a domain gated off drops both its controllers AND its tools consistently).

Acceptance

  • Tool gating uses per-Tool metadata, not name inference.
  • Under harness(), Agent/Config/Security tools are present iff their controllers are (axis convergence), or the strict-minimal surface is an explicit, documented preset decision.
  • The name-heuristic + no_gate_family_tool_silently_defaults_to_platform guard is removed once metadata is authoritative.

Related

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions