Skip to content

Agent KB_mediation

grisun0 edited this page Oct 25, 2026 · 1 revision

Subsystem: mediation

modules/mediation/init.py

modules/mediation/chain_mediator.py

  • Doc: Specialised mediator for the APT chain pipeline.
  • Layer: utility
  • Language: py
  • Symbols:
    • LlmPoolPort (class, line 13) class LlmPoolPort
    • ChainMediator (class, line 48) class ChainMediator
    • complete (method, line 16) def complete(self, prompt, max_tokens, task_id)
    • has_members (method, line 34) def has_members(self)
    • __init__ (method, line 53) def __init__(self)
    • register_llm_port (method, line 57) def register_llm_port(self, port)
    • llm (method, line 65) def llm(self)
    • describe (method, line 73) def describe(self)
  • Depends on: modules/lazy_loop.py
  • Imported by: modules/mediation/__init__.py, modules/mediation/hub.py, tests/test_guardrails.py

modules/mediation/contracts.py

  • Doc: Mediation contracts: the abstractions every participant depends on.
  • Layer: utility
  • Language: py
  • Symbols:
    • MediationDomains (class, line 12) class MediationDomains
    • ActivityLogPort (class, line 35) class ActivityLogPort(Protocol)
    • LlmCompletionPort (class, line 57) class LlmCompletionPort(Protocol)
    • MediatorContract (class, line 84) class MediatorContract(Protocol)
    • MediationHubContract (class, line 95) class MediationHubContract(Protocol)
    • resolve (function, line 103) def resolve(domain)
    • is_known (method, line 23) def is_known(cls, domain)
    • read (method, line 44) def read(self, limit)
    • complete (method, line 60) def complete(self, prompt, max_tokens, task_id)
    • has_members (method, line 78) def has_members(self)
    • describe (method, line 89) def describe(self)
    • mediator_for (method, line 98) def mediator_for(self, domain)
  • Depends on: modules/mediation/hub.py
  • Imported by: modules/mediation/__init__.py, modules/mediation/hub.py

modules/mediation/feedback_mediator.py

modules/mediation/hub.py

modules/mediation/intel_mediator.py

  • Doc: specialised mediator for recon-intel coordination.
  • Layer: utility
  • Language: py
  • Symbols:
    • IntelMediator (class, line 13) class IntelMediator
    • __init__ (method, line 18) def __init__(self)
    • register_activity_log_factory (method, line 22) def register_activity_log_factory(self, factory)
    • describe (method, line 32) def describe(self)
    • activity_records (method, line 39) def activity_records(self, task_id, limit)
    • record_routing_decision (method, line 64) def record_routing_decision(self, task_id, intent_id, command, intent_text, target, stack)
    • record_routing_outcome (method, line 97) def record_routing_outcome(self, task_id, intent_id, command, state, facts, findings, stack)
    • mask_configured (method, line 133) def mask_configured(self, text)
    • stack_signature (method, line 149) def stack_signature(self, assets)
  • Depends on: modules/lazy_intel.py, modules/lazy_loop.py
  • Imported by: modules/mediation/__init__.py, modules/mediation/hub.py

modules/mediation/telemetry_mediator.py

  • Doc: Specialised mediator for loop telemetry coordination.
  • Layer: utility
  • Language: py
  • Symbols:
    • TelemetryMediator (class, line 14) class TelemetryMediator
    • describe (method, line 19) def describe(self)
    • publish_event (method, line 23) def publish_event(self, task_id, worker, kind, text, severity)
    • annotate_detection (method, line 43) def annotate_detection(self, command)
    • record_step (method, line 59) def record_step(self, task_id, worker, command, output, detection_prob)
    • swan_available (method, line 76) def swan_available(self)
    • swan_consult (method, line 85) def swan_consult(self, prompt, task_type, phase, timeout)
    • moe_route (method, line 110) def moe_route(self, task_type)
    • rl_select (method, line 126) def rl_select(self, task_type, phase, candidates, deterministic)
    • moe_record_outcome (method, line 151) def moe_record_outcome(self, expert_id, task_type, reward, detection_prob)
    • rl_update (method, line 167) def rl_update(self, task_type, phase, action, reward, candidates, detection_prob)
  • Depends on: modules/loop_ai_bridge.py
  • Imported by: modules/mediation/__init__.py, modules/mediation/hub.py

Start

Wiki

Agent Docs

Recipes

Clone this wiki locally