"""EchoConnector — minimal example governed connector."""
from __future__ import annotations

from typing import Any

from gsap_broker.connectors.base import ConnectorContext, ConnectorPlugin, ConnectorResult


class EchoConnector(ConnectorPlugin):
    connector_id = "echo"
    corpus_entry_cid = "sha256:" + "e" * 64
    capability_mask = 1
    declared_endpoints = ["localhost"]
    accord_template = ""
    gsap_required = False
    chronicle_enabled = True

    async def invoke(
        self, operation: str, parameters: dict[str, Any], context: ConnectorContext
    ) -> ConnectorResult:
        return ConnectorResult(success=True, data=parameters)

    def health_check(self) -> bool:
        return True
