/** * A VehicleClient that calls a same-process VehicleRegistry directly, no * wire involved -- for a daemon calling its own registered operations, or * a host embedding a provider and its consumer in one process. Depends on * @danypops/vehicle-server only for VehicleRegistry's type; every other * VehicleClient in this package (vehicle-http-client.ts) has no such * dependency, which is why this file is its own subpath (./local) rather * than folded into a shared barrel. */ import type { VehicleClient, VehicleEventHandler, VehicleInvocationOptions, VehicleJobSnapshot, VehicleJobSubmitOptions, VehicleJobSubmitResult, VehicleJobTailResult, VehicleManifest, VehicleProtocolAgreement, VehicleProtocolOffer, VehicleSubscription } from "@danypops/vehicle-core"; import type { VehicleRegistry } from "@danypops/vehicle-server"; import type { VehicleJobStore } from "@danypops/vehicle-server/jobs"; export interface LocalVehicleClientOptions { /** Opts this client into Vehicle Jobs (submitJob/pollJob/tailJob/steerJob/cancelJob) -- built on this * same registry. Omitted (the default) means every job method throws jobs-not-configured, matching * RemoteVehicleClient's own 404 when its daemon never wired one up. */ jobStore?: VehicleJobStore; } /** * A `VehicleClient` that calls a same-process VehicleRegistry directly, no * wire involved -- for a daemon calling its own registered operations, or * a host embedding a provider and its consumer in one process. Depends on * `@danypops/vehicle-server` only for `VehicleRegistry`'s type; * `RemoteVehicleClient` (`./http`) has no such dependency. */ export declare class LocalVehicleClient implements VehicleClient { private readonly registry; private closed; private readonly jobStore?; constructor(registry: VehicleRegistry, options?: LocalVehicleClientOptions); manifest(): Promise; negotiate(offer: VehicleProtocolOffer): Promise; invoke(name: string, version: number, input: unknown, options?: VehicleInvocationOptions): Promise; /** In-process subscription -- zero network, built directly on the registry's own subscribeLocal(). */ subscribe(name: string, version: number, handler: VehicleEventHandler): VehicleSubscription; /** Vehicle Jobs -- see VehicleClient's own doc comment. Delegates directly to this client's own jobStore, no wire involved, same as invoke() delegating to the registry. */ submitJob(name: string, version: number, input: unknown, options?: VehicleJobSubmitOptions): Promise; pollJob(jobId: string): Promise; tailJob(jobId: string, cursor?: number): Promise; steerJob(jobId: string, input: unknown): Promise; cancelJob(jobId: string): Promise; close(): Promise; private requireJobStore; private ensureOpen; }