/** * routes/session-search.ts * * `sessions.search` (see CHANGELOG 1.0.0): a paginated/filtered query over the * ALREADY-daemon-resident `SharedSessionBroker`'s home-scoped store, * extending the session-spine list-filter shape (`ListSharedSessionsOptions`: * project/kind/includeClosed) with a free-text `query`, `surfaceKind`, * `status`, and opaque cursor pagination (mirrors the * daemon-sdk `paginateItems` convention already used by * automation-jobs/runs and knowledge listings). * * DELIBERATELY a standalone read-only helper, NOT a `SharedSessionBroker` * method: the brief's file_ownership marks session-broker.ts read-only for * S2 ("add a search method only if unavoidable, prefer a read-only query * helper; coordinate with S3 which also reads the broker"). Everything here * is built from the broker's existing public `listSessions()`, no new * broker state, no new broker method. * * Bounded in-memory filter+sort: the store is * single-user scale, so a full unbounded scan per call is intentional (no * index), this ceiling is a deliberate, documented decision. */ import type { GatewayMethodCatalog } from '../method-catalog.js'; import type { GatewayMethodHandler } from '../method-catalog-shared.js'; import type { SharedSessionBroker } from '../session-broker.js'; /** Structural dep, only the read surface `sessions.search` needs. */ export type SessionSearchBroker = Pick; export declare function createSessionsSearchHandler(broker: SessionSearchBroker): GatewayMethodHandler; /** * Attach the `sessions.search` handler to the descriptor already registered * (without a handler) from ../method-catalog-control-core.ts's static * builtin array. Call once, at RuntimeServices construction time. A missing * descriptor is a silent no-op, see routes/fleet.ts's * `registerFleetGatewayMethods` for the same rationale. */ export declare function registerSessionSearchGatewayMethod(catalog: GatewayMethodCatalog, broker: SessionSearchBroker): void; //# sourceMappingURL=session-search.d.ts.map