Skip to main content

client/runtime

packages/client/src/runtime

Purpose

Local-service IPC primitives and runtime helpers for the client CLI. Spec B (#596) deleted the three-field SubscriptionFilter re-export — the notification consumption surface is now Stream-based via MoltZapAgentClient.subscribe(def, refinement?).

Public surface

AgentNotFoundError

Class
export class AgentNotFoundError extends Data.TaggedError("AgentNotFoundError")<{
  readonly agentName: string;
}> {
  override get message(): string {
    return `Agent not found: ${this.agentName}`;
  }
}
A name→agent lookup returned no results.

CloseInfo

Interface
export interface CloseInfo {
  readonly code: number;
  readonly reason: string;
}
WebSocket close metadata surfaced to AgentClientOptions.onDisconnect (required arg post-migration — see design doc §Deletions, OQ-6) and to the conformance-adapter’s RealClientCloseEvent. Mirrors the WHATWG WebSocket CloseEvent fields restricted to {code, reason}wasClean is derivable from code and not worth its own field.

Files

  • close-info.ts
  • errors.ts