Catalog/C family/C04
Proposed specificationSource-located exemplarH1

Broker

Mediate discovery and invocation across boundaries.

JOIN POINTservice_discovery_invocationRECORD STATUSCandidate · v0.1.0
UML class view for Broker, showing participant roles, received calls, and analytical dependencies
FIG. C04 / UML CLASS VIEW
Object interaction diagram for Broker, showing role collaboration and a numbered message sequence
FIG. C04 / OBJECT INTERACTIONS
Context
A caller invokes a service or provider without direct construction.
Trigger
A service description is registered or a request is addressed.
Structure
Registry, service description, transport, request/reply, and error mapping.
Effect
Broker resolves a compatible endpoint and returns a correlated response.
Requires
Provider identity and versioned service description are available.
Ensures
Client and provider agree on schema or return incompatibility.
Invariant
Broker discovery does not bypass authentication or trust boundaries.
Violation
Provider absence, timeout, partial reply, and schema mismatch are explicit.

Negative control

A local factory returning implementations is only a registry cue.

Permitted variation

Tool registry, provider registry, cross-process broker, and service mesh.

Test obligation

Test discovery, missing provider, version mismatch, timeout, and reconnect.

Evolution question

Did local registries evolve into cross-process service brokers?

PROMPT SKETCH
Resolve a provider by identity and versioned service description. The client and provider must agree on the schema or return an explicit incompatibility, never a guessed call.
CODE DESIGN / PYTHON
def invoke(service_id, request, registry):
    provider = registry.resolve(service_id)
    if provider is None:
        return Incompatible(service_id, reason="not registered")
    if not provider.schema.accepts(request):
        return Incompatible(service_id, reason="schema mismatch")
    return provider.call(request)

Illustrative design sketch. Discovery without schema agreement is a lookup, not a broker contract. This example is a teaching aid, not implementation evidence or a conformance claim.

Join point
service_discovery_invocation
Source locator
Sarkar and Sarkar
Lexical cue
(?i)\b(?:broker|provider[_-]?registry|tool[_-]?registry|service[_-]?registry)\bFrozen expression, v0.1.0. A match is a retrieval cue, not a confirmed implementation.
Aliases
None
Canonical exemplar
mastra-ai/mastrapackages/core/src/events/unix-socket-pubsub.ts:325Support: packages/core/src/events/unix-socket-pubsub-codec.test.ts:62
Negative control
A local factory returning implementations is only a registry cue.

Scope-anchored review. pohe-agent analyze <repo> --pattern C04 anchors the cue to its enclosing declaration and checks a separate operational signature for all four pointcut dimensions. Missing roles and negative-control risks remain visible; a structural match is not E2/E3. Calibration report ↗

Source-located exemplar

A concrete source anchor is available for this proposed record. It is one exemplar, not evidence that all repositories—or every contract field—conform.

Review boundary: this candidate and its specification come from an AI-assisted study. Independent human validation remains open.

ANY-EVIDENCE FAMILY COVERAGE22/36

61.1% of repository families in the frozen panel have at least one current cue, historical cue, or canonical source layer. This is not confirmed prevalence.

Current lexical-cue repositories: 23 / 41
Canonical source anchormastra-ai/mastra 899383db98e0packages/core/src/events/unix-socket-pubsub.ts:325

Cross-process broker discovery and forwarding.

Exploratory retrieval cue Regex / v0.1.0
(?i)\b(?:broker|provider[_-]?registry|tool[_-]?registry|service[_-]?registry)\b

This expression is a discovery instrument only. A match is a retrieval cue—not a confirmed implementation, pointcut match, or contract proof.