/** * `weft.workers.list` operation + REST binding. * * Reports the connected-worker fleet for an operator-facing * "Workers & Queues" view: per-worker queue assignment, advertised * activities, concurrency, in-flight count, available capacity, * connected/heartbeat timestamps, and heartbeat age. Routing policy is * reported at the response top level so it does not drift per-worker. * * Access is `system:read` because the registry is server-wide * infrastructure. * * The operation is constructed via a factory that closes over a * `WorkerRegistry` and an injectable `clock`. Tests use a deterministic * clock to prove the operation reads "now" exactly once per request and * derives every `heartbeatAgeMs` from it. * * Discovery-only callers (`asyncapi`, `openapi`) may build the operation * with no registry; the resulting `invoke` is a sentinel that throws if * reached. No live request path uses a discovery-only registry. * * @module server/operations/list-workers */ import { z } from 'zod'; import type { RoutingPolicy, WorkerDeploymentSummary, WorkerRegistry, WorkerSummary } from '../../worker/registry.ts'; import type { UnknownRestBinding } from '../rest-bindings.ts'; declare const listWorkersInput: z.ZodObject<{}, z.core.$strip>; export type ListWorkersInput = z.infer; export type ListWorkersOutput = { items: WorkerSummary[]; deployments: WorkerDeploymentSummary[]; routingPolicy: RoutingPolicy; }; type ListWorkersOptions = { workerRegistry?: WorkerRegistry; clock?: () => number; }; /** * Build the `weft.workers.list` operation, optionally bound to a live * `WorkerRegistry` and clock. * * When `workerRegistry` is omitted, the operation is registered with full * metadata (name, schemas, access, transports) so the public catalog * stays honest, but `invoke` throws if called — this path is reserved * for discovery-only registries (OpenAPI/AsyncAPI generators). */ export declare function createListWorkersOperation(options?: ListWorkersOptions): import("../operation-catalog.ts").OperationDefinition, ListWorkersOutput, unknown>; /** Default discovery-only operation; live servers use `createListWorkersOperation(...)`. */ export declare const listWorkersOperation: import("../operation-catalog.ts").OperationDefinition, ListWorkersOutput, unknown>; /** * Build the REST binding for `weft.workers.list`. The binding is metadata * only; the live `WorkerRegistry` is wired into the operation, not the * binding. */ export declare function createListWorkersRestBinding(): UnknownRestBinding; export {};