Skip to documentation
KonclaveDocumentationSource snapshot · Apache 2.0
Browse documentation

LocalServiceClient

Understand Konclave's profile-bound client contract: validate unknown results, preserve request identities, retire before close, and surface cleanup failures.

TypeScript APISource revision 8d0d3676e9fcView authoritative source

Repository-relative paths and “this checkout” refer to the Konclave source repository, not this website. The source link above identifies the exact revision used here.

On this page

Connection to one independently selected profile; the caller owns its lifecycle. Retire before close, even after an operation fails. Retirement failure does not undo an application result and is not a reason to repeat successful work.

Signature

Code example
export interface LocalServiceClient {
  readonly profile: string;
  request(
    operation: string,
    payload: unknown,
    options?: number | LocalServiceRequestOptions,
  ): Promise<unknown>;
  retire(): Promise<void>;
  close(): void;
  readonly connected: boolean;
}

see Checked result validation and cleanup

see Request and lifecycle contract

see Exact-operation recovery

profile

The immutable profile this connection is bound to.

request

Invokes one bounded operation and reconciles its actual terminal result. Validate the unknown result against that operation’s contract before using it. Cancellation requests are not rollback; preserve exact identity for recovery.

retire

Retires this exact grant and closes both lanes. Call before close; retirement failures reject and finite grant expiry remains the backstop.

close

Closes without retiring the grant; a subsequent retire call is a no-op.

connected

Whether the client remains open, not a continuous service or relay health probe.

Generation boundary

This reference reads the TypeScript compiler AST and authored JSDoc. Signatures are selected source declarations, not a separately published npm SDK or a fully resolved cross-package API index.

Content: Konclave,Apache-2.0. Revision: 8d0d3676e9fc746749a4fc04ddeb4499023c4104.