Meshpocalypse Semantic
    Preparing search index...

    Class AuctionParticipant

    Agent side of the capability auction protocol.

    Subscribes to mesh.task.bid.* broadcasts, computes a Jaccard similarity score against this agent's capabilities, and publishes a bid to the mesh.task.bid.<taskId>.response subject.

    const participant = new AuctionParticipant(
    meshNode.transport,
    'agent-summariser',
    ['summarise', 'search'],
    );

    const stop = participant.startBidding(() => currentLoad());
    // Later:
    stop();
    Index

    Constructors

    Methods

    • Compute the Jaccard similarity score between the task's required capabilities and this agent's capabilities.

      Score = |intersection| / |union|

      • Full match → 1.0
      • No match → 0.0
      • Both empty → 1.0 (vacuously true — any agent can handle a task with no requirements)

      Parameters

      Returns number

      A number in [0.0, 1.0].

    • Start listening for auction broadcasts on mesh.task.bid.*.

      For each broadcast, computes a score and publishes a response to mesh.task.bid.<taskId>.response.

      Parameters

      • OptionalloadProvider: () => number

        Optional callback returning current load (0.0–1.0). Defaults to () => 0 (always idle).

      Returns () => void

      A zero-argument stop function. Call it to unsubscribe.