---
title: Client API
description: Generated public TypeScript reference for @relkit/client.
search:
  exclude: true
sidebar:
  icon: braces
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

## Common APIs

- [createClient](/docs/api/client#createclient)

For configuration and examples, read [generated clients](/docs/modules/http/generated-clients), [streaming](/docs/modules/http/streaming), [jobs](/docs/modules/jobs).

For a complete workflow, follow [connect react](/guides/frontend/connect-react).

## Frontend usage

[Connect a React frontend](/guides/frontend/connect-react) shows the client side of this capability.

## Public imports

- `@relkit/client` — 11 exports
- `@relkit/client/server` — 1 exports
- `@relkit/client/server/tanstack-query` — 4 exports
- `@relkit/client/tanstack-query` — 2 exports
- `@relkit/client/react` — 117 exports
- `@relkit/client/jobs` — 60 exports
- `@relkit/client/build/next` — 1 exports
- `@relkit/client/build/vite` — 2 exports

## All exported APIs

Names link to their complete contracts. Re-exports share their original contract; legacy exports keep their separate identity. Examples link to the API's inline sample, a maintained repository usage, or the shared module walkthrough.

| API                                                                                             | Kind  | Import from                                   | Example                                                                                                                           |
| ----------------------------------------------------------------------------------------------- | ----- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| [AgentBase](/docs/api/client#agentbase-interface)                                               | Type  | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/agent-observation.test.ts#L86)   |
| [AgentContent](/docs/api/client#agentcontent-interface)                                         | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentMessage](/docs/api/client#agentmessage-interface)                                         | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentNestedExecution](/docs/api/client#agentnestedexecution-type-alias)                        | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentOutput](/docs/api/client#agentoutput-type-alias)                                          | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentProgress](/docs/api/client#agentprogress-type-alias)                                      | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentRegistry](/docs/api/client#agentregistry-interface)                                       | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentResumeOptions](/docs/api/client#agentresumeoptions-interface)                             | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentRunOptions](/docs/api/client#agentrunoptions-interface)                                   | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentSelector](/docs/api/client#agentselector-type-alias)                                      | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentStopOptions](/docs/api/client#agentstopoptions-interface)                                 | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentThreadOptions](/docs/api/client#agentthreadoptions-interface)                             | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentTimelineItem](/docs/api/client#agenttimelineitem-type-alias)                              | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [AgentToolCall](/docs/api/client#agenttoolcall-interface)                                       | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [ChannelHandlers](/docs/api/client#channelhandlers-type-alias)                                  | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [ChannelRegistry](/docs/api/client#channelregistry-interface)                                   | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [ChannelSelector](/docs/api/client#channelselector-type-alias)                                  | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [clearPendingOperations](/docs/api/client#clearpendingoperations)                               | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/agent-continuation.test.ts#L80)  |
| [ClientAgentContract](/docs/api/client#clientagentcontract-interface)                           | Type  | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/client-react.ts#L34)                                     |
| [ClientAgentDynamic](/docs/api/client#clientagentdynamic-interface)                             | Type  | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/client-react.ts#L40)                                     |
| [ClientChannelContract](/docs/api/client#clientchannelcontract-interface)                       | Type  | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/client-react.ts#L26)                                     |
| [ClientHeaders](/docs/api/client#clientheaders-type-alias)                                      | Type  | `@relkit/client`                              | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [ClientHeadersInit](/docs/api/client#clientheadersinit-type-alias)                              | Type  | `@relkit/client`                              | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [ClientRegistry](/docs/api/client#clientregistry-interface)                                     | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [ClientRouteContract](/docs/api/client#clientroutecontract-interface)                           | Type  | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/client-react.ts#L18)                                     |
| [ClientSelector](/docs/api/client#clientselector-type-alias)                                    | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [ClientStreamContract](/docs/api/client#clientstreamcontract-interface)                         | Type  | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/client-react.ts#L21)                                     |
| [ContractFor](/docs/api/client#contractfor-type-alias)                                          | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [CountPresence](/docs/api/realtime#countpresence-interface)                                     | Type  | `@relkit/client/react`                        | [API example](/docs/api/realtime#countpresence-interface)                                                                         |
| [createAutoClient](/docs/api/client#createautoclient-1)                                         | Value | `@relkit/client`                              | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/client.test.ts#L124)             |
| [CreateAutoClientOptions](/docs/api/client#createautoclientoptions-interface)                   | Type  | `@relkit/client`                              | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [createClient](/docs/api/client#createclient-1)                                                 | Value | `@relkit/client`                              | [API example](/docs/api/client#createclient-1)                                                                                    |
| [CreateClientOptions](/docs/api/client#createclientoptions-interface)                           | Type  | `@relkit/client`                              | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/runtime-hono/tests/fixture-client.ts#L58)                   |
| [createRelkitServerContext](/docs/api/client#createrelkitservercontext)                         | Value | `@relkit/client/server/tanstack-query`        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/ssr.ts#L13)                              |
| [CreateRelkitServerContextOptions](/docs/api/client#createrelkitservercontextoptions-interface) | Type  | `@relkit/client/server/tanstack-query`        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [createServerClient](/docs/api/client#createserverclient)                                       | Value | `@relkit/client/server`                       | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/client.test.ts#L98)              |
| [createTanstackQueryUtils](/docs/api/client#createtanstackqueryutils)                           | Value | `@relkit/client/tanstack-query`               | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/server-query-entry.test.ts#L42)  |
| [createWebSocketClient](/docs/api/client#createwebsocketclient-1)                               | Value | `@relkit/client`                              | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/runtime-hono/tests/fixture-client.ts#L62)                   |
| [CreateWebSocketClientOptions](/docs/api/client#createwebsocketclientoptions-interface)         | Type  | `@relkit/client`                              | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/runtime-hono/tests/fixture-client.ts#L61)                   |
| [DefaultContract](/docs/api/client#defaultcontract-type-alias)                                  | Type  | `@relkit/client`                              | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [DefaultContractRegistry](/docs/api/client#defaultcontractregistry-interface)                   | Type  | `@relkit/client`                              | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [digestPendingRequest](/docs/api/client#digestpendingrequest)                                   | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/pending.test.ts#L26)             |
| [ErrorFor](/docs/api/client#errorfor-type-alias)                                                | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [FiniteSelector](/docs/api/client#finiteselector-type-alias)                                    | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [forgetPending](/docs/api/client#forgetpending)                                                 | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [InputFor](/docs/api/client#inputfor-type-alias)                                                | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [isJobUnknownOutcome](/docs/api/client#isjobunknownoutcome)                                     | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/jobs/reconcile-unknown.ts#L4)                     |
| [ItemFor](/docs/api/client#itemfor-type-alias)                                                  | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobCancelInput](/docs/api/client#jobcancelinput-type-alias)                                    | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobCancelInputFor](/docs/api/client#jobcancelinputfor-type-alias)                              | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobCancelName](/docs/api/client#jobcancelname-type-alias)                                      | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobCancelOutputFor](/docs/api/client#jobcanceloutputfor-type-alias)                            | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobClientField](/docs/api/client#jobclientfield-type-alias)                                    | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobClientOperation](/docs/api/app#jobclientoperation-type-alias)                               | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobContract](/docs/api/client#jobcontract-type-alias)                                          | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/jobs-client.ts#L18)                                      |
| [JobErrorEnvelope](/docs/api/app#joberrorenvelope-interface)                                    | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobFailureFor](/docs/api/client#jobfailurefor-type-alias)                                      | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobFor](/docs/api/client#jobfor-type-alias)                                                    | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobGetInput](/docs/api/client#jobgetinput-type-alias)                                          | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobListInput](/docs/api/client#joblistinput-type-alias)                                        | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobListQuery](/docs/api/client#joblistquery-type-alias)                                        | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobMutationOptions](/docs/api/client#jobmutationoptions-type-alias)                            | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobProcedureContract](/docs/api/client#jobprocedurecontract-interface)                         | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobProcedureSelector](/docs/api/client#jobprocedureselector-type-alias)                        | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/jobs-client.ts#L65)                                      |
| [JobRegistry](/docs/api/client#jobregistry-interface)                                           | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/jobs-client.ts#L17)                                      |
| [JobRetryInput](/docs/api/client#jobretryinput-type-alias)                                      | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobRetryInputFor](/docs/api/client#jobretryinputfor-type-alias)                                | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobRetryName](/docs/api/client#jobretryname-type-alias)                                        | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobRetryOutputFor](/docs/api/client#jobretryoutputfor-type-alias)                              | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobRunFor](/docs/api/client#jobrunfor-type-alias)                                              | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobRunSelector](/docs/api/client#jobrunselector-type-alias)                                    | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobRunStatus](/docs/api/app#jobrunstatus-type-alias)                                           | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobRunWatchController](/docs/api/client#jobrunwatchcontroller-class)                           | Value | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobSelector](/docs/api/client#jobselector-type-alias)                                          | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobSnapshotFor](/docs/api/client#jobsnapshotfor-type-alias)                                    | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobStreamGapError](/docs/api/client#jobstreamgaperror-class)                                   | Value | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/jobs-watch.test.ts#L471)         |
| [JobStreamInput](/docs/api/client#jobstreaminput-type-alias)                                    | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobStreamOptions](/docs/api/client#jobstreamoptions-interface)                                 | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobStreamOverflowError](/docs/api/client#jobstreamoverflowerror-class)                         | Value | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/jobs-watch.test.ts#L424)         |
| [JobStreamProcedureContract](/docs/api/client#jobstreamprocedurecontract-interface)             | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobTriggerInput](/docs/api/client#jobtriggerinput-type-alias)                                  | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobTriggerInputFor](/docs/api/client#jobtriggerinputfor-type-alias)                            | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobTriggerName](/docs/api/client#jobtriggername-type-alias)                                    | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobTriggerOptions](/docs/api/client#jobtriggeroptions-interface)                               | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobTriggerOutputFor](/docs/api/client#jobtriggeroutputfor-type-alias)                          | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobTriggerSelector](/docs/api/client#jobtriggerselector-type-alias)                            | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [jobUnknownOutcome](/docs/api/client#jobunknownoutcome)                                         | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/pending.test.ts#L36)             |
| [JobWatchAbortedError](/docs/api/client#jobwatchabortederror-class)                             | Value | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/jobs-watch.test.ts#L160)         |
| [JobWatchController](/docs/api/client#jobwatchcontroller-interface)                             | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobWatchDisposedError](/docs/api/client#jobwatchdisposederror-class)                           | Value | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobWatchFrame](/docs/api/client#jobwatchframe-type-alias)                                      | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobWatchFrameFor](/docs/api/client#jobwatchframefor-type-alias)                                | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobWatchInput](/docs/api/client#jobwatchinput-type-alias)                                      | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobWatchListener](/docs/api/client#jobwatchlistener-type-alias)                                | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobWatchName](/docs/api/client#jobwatchname-type-alias)                                        | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobWatchOptions](/docs/api/client#jobwatchoptions-interface)                                   | Type  | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/jobs/quality-fixture.ts#L51)                   |
| [JobWatchReadTimeoutError](/docs/api/client#jobwatchreadtimeouterror-class)                     | Value | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/jobs-watch.test.ts#L196)         |
| [JobWatchState](/docs/api/client#jobwatchstate-interface)                                       | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [JobWatchUnavailableError](/docs/api/client#jobwatchunavailableerror-class)                     | Value | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [matchesPendingRequest](/docs/api/client#matchespendingrequest)                                 | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/pending.test.ts#L28)             |
| [MemberPresence](/docs/api/realtime#memberpresence-interface)                                   | Type  | `@relkit/client/react`                        | [API example](/docs/api/realtime#memberpresence-interface)                                                                        |
| [MutationSelector](/docs/api/client#mutationselector-type-alias)                                | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [NamedStreamFrame](/docs/api/app#namedstreamframe-type-alias)                                   | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [ORPCError](/docs/api/client#orpcerror)                                                         | Value | `@relkit/client`                              | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/agent-sse-client.test.ts#L90)    |
| [OutputFor](/docs/api/client#outputfor-type-alias)                                              | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [PendingCapacityError](/docs/api/client#pendingcapacityerror-class)                             | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/agent/pending-service.test.ts#L43)             |
| [pendingOperations](/docs/api/client#pendingoperations)                                         | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/agent-continuation.test.ts#L114) |
| [PendingRecoveryUnavailableError](/docs/api/client#pendingrecoveryunavailableerror-class)       | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [PendingRememberOptions](/docs/api/client#pendingrememberoptions-interface)                     | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [pendingRequest](/docs/api/client#pendingrequest)                                               | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/pending.test.ts#L27)             |
| [PendingRequestMismatchError](/docs/api/client#pendingrequestmismatcherror-class)               | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [pendingScopeKey](/docs/api/client#pendingscopekey)                                             | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [QuerySelector](/docs/api/client#queryselector-type-alias)                                      | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [reconcileAgentRun](/docs/api/client#reconcileagentrun)                                         | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/agent-continuation.test.ts#L101) |
| [relkit](/docs/api/client#relkit)                                                               | Value | `@relkit/client/build/vite`                   | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/vite.config.ts#L5)                       |
| [RelkitClientProvider](/docs/api/client#relkitclientprovider)                                   | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/app.tsx#L27)                             |
| [RelkitClientProviderProps](/docs/api/client#relkitclientproviderprops-interface)               | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RelkitClientRuntime](/docs/api/client#relkitclientruntime-interface)                           | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RelkitHydrationState](/docs/api/client#relkithydrationstate-interface)                         | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [relkitJobKey](/docs/api/client#relkitjobkey)                                                   | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RelkitJobKeyOptions](/docs/api/client#relkitjobkeyoptions-interface)                           | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [relkitKey](/docs/api/client#relkitkey)                                                         | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/ssr.ts#L17)                              |
| [RelkitKeyScope](/docs/api/client#relkitkeyscope-interface)                                     | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RelkitServerContext](/docs/api/client#relkitservercontext-interface)                           | Type  | `@relkit/client/server/tanstack-query`        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RelkitServerHydrationState](/docs/api/client#relkitserverhydrationstate-interface)             | Type  | `@relkit/client/server/tanstack-query`        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RelkitVitePlugin](/docs/api/client#relkitviteplugin-interface)                                 | Type  | `@relkit/client/build/vite`                   | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RelkitWriteError](/docs/api/client#relkitwriteerror-class)                                     | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [rememberJobPending](/docs/api/client#rememberjobpending)                                       | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/pending.test.ts#L19)             |
| [rememberPending](/docs/api/client#rememberpending)                                             | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/agent-continuation.test.ts#L64)  |
| [RunCancellationReceipt](/docs/api/app#runcancellationreceipt-interface)                        | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RunHandle](/docs/api/app#runhandle-interface)                                                  | Type  | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/jobs-client.ts#L36)                                      |
| [RunListQuery](/docs/api/app#runlistquery-interface)                                            | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RunPage](/docs/api/app#runpage-interface)                                                      | Type  | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/inspector-api/tests/compatibility/jobs.test.ts#L85)         |
| [RunRetryReceipt](/docs/api/app#runretryreceipt-interface)                                      | Type  | `@relkit/client/jobs`                         | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [RunSnapshot](/docs/api/app#runsnapshot-type-alias)                                             | Type  | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/jobs-watch.test.ts#L557)         |
| [RunWatchFrame](/docs/api/app#runwatchframe-type-alias)                                         | Type  | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/jobs-watch.test.ts#L615)         |
| [SelectedJobField](/docs/api/client#selectedjobfield-type-alias)                                | Type  | `@relkit/client/react`, `@relkit/client/jobs` | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [StreamSelector](/docs/api/client#streamselector-type-alias)                                    | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [StreamState](/docs/api/client#streamstate-interface)                                           | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [TanstackQueryOperationContext](/docs/api/client#tanstackqueryoperationcontext)                 | Type  | `@relkit/client/tanstack-query`               | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [updatePending](/docs/api/client#updatepending)                                                 | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/pending.test.ts#L46)             |
| [useAgent](/docs/api/client#useagent)                                                           | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/assistant.tsx#L12)                       |
| [UseAgentResult](/docs/api/client#useagentresult-type-alias)                                    | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [useChannel](/docs/api/client#usechannel)                                                       | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/announcements.tsx#L10)                   |
| [UseChannelOptions](/docs/api/client#usechanneloptions-interface)                               | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [UseChannelResult](/docs/api/client#usechannelresult-type-alias)                                | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [useInfiniteRoute](/docs/api/client#useinfiniteroute)                                           | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [useJobCancel](/docs/api/client#usejobcancel-1)                                                 | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/jobs-client.ts#L75)                                      |
| [useJobRetry](/docs/api/client#usejobretry-1)                                                   | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/types/jobs-client.ts#L76)                                      |
| [useJobRun](/docs/api/client#usejobrun)                                                         | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/export-orders.tsx#L11)                   |
| [UseJobRunOptions](/docs/api/client#usejobrunoptions-interface)                                 | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [UseJobRunResult](/docs/api/client#usejobrunresult-interface)                                   | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [useJobTrigger](/docs/api/client#usejobtrigger-1)                                               | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/export-orders.tsx#L10)                   |
| [useRealtime](/docs/api/client#userealtime)                                                     | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [UseRealtimeResult](/docs/api/client#userealtimeresult-interface)                               | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [useRelkitClient](/docs/api/client#userelkitclient)                                             | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/app.tsx#L10)                             |
| [useRoute](/docs/api/client#useroute)                                                           | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/announcements.tsx#L9)                    |
| [useRouteMutation](/docs/api/client#useroutemutation)                                           | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/create-order.tsx#L10)                    |
| [useRouteUtils](/docs/api/client#userouteutils)                                                 | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [useStream](/docs/api/client#usestream)                                                         | Value | `@relkit/client/react`                        | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/report.tsx#L10)                          |
| [UseStreamResult](/docs/api/client#usestreamresult-interface)                                   | Type  | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [useSuspenseRoute](/docs/api/client#usesuspenseroute)                                           | Value | `@relkit/client/react`                        | [Module example](/docs/modules/http/generated-clients)                                                                            |
| [watchJobRun](/docs/api/client#watchjobrun)                                                     | Value | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/jobs/watch-run.ts#L6)                             |
| [watchJobStream](/docs/api/client#watchjobstream-1)                                             | Value | `@relkit/client/jobs`                         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/client/tests/compatibility/jobs-watch.test.ts#L301)         |
| [withRelkit](/docs/api/client#withrelkit)                                                       | Value | `@relkit/client/build/next`                   | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/frontend/next.config.ts#L4)                       |

## `manifest.ts`

### readPublicFingerprint

Reads the generated manifest fingerprint and rejects malformed generated output.

**Signature**

```ts
declare const readPublicFingerprint: (root?: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/build/manifest.ts#L9)

## `next.ts`

### withRelkit

Adds the generated public fingerprint and linked-workspace root to Next configuration.

**Signature**

```ts
declare const withRelkit: (config?: NextConfig, options?: { readonly root?: string }) => NextConfig;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/build/next.ts#L12)

## `next.types.ts`

The Next configuration shape accepted and returned by the client build adapter.

### NextConfig (type alias)

The Next configuration shape accepted and returned by the client build adapter.

**Signature**

```ts
type NextConfig = Readonly<Record<string, unknown>> & {
  readonly env?: Readonly<Record<string, string | undefined>>;
  readonly turbopack?: Readonly<Record<string, unknown>> & { readonly root?: string };
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/build/next.types.ts#L2)

## `vite.ts`

### RelkitVitePlugin

**Signature**

```ts
declare const RelkitVitePlugin: RelkitVitePlugin;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/build/vite.ts#L3)

### relkit

Creates the Vite adapter that defines the generated client fingerprint.

**Signature**

```ts
declare const relkit: (options?: { readonly root?: string }) => RelkitVitePlugin;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/build/vite.ts#L10)

## `vite.types.ts`

The minimal Vite plugin contract defining the generated client fingerprint.

### RelkitVitePlugin (interface)

The minimal Vite plugin contract defining the generated client fingerprint.

**Signature**

```ts
export interface RelkitVitePlugin {
  readonly name: "relkit";
  config(): {
    readonly define: Readonly<Record<string, string>>;
  };
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/build/vite.types.ts#L2)

## `client-owner.ts`

### acquireClientOwner

Acquires one synchronous Layer context and an independently closable fiber scope.

**Signature**

```ts
declare const acquireClientOwner: <Service, Shape>(
  layer: Layer.Layer<Service>,
  key: Context.Key<Service, Shape>,
) => ClientOwner<Shape>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/client-owner.ts#L17)

## `client-owner.types.ts`

### ClientOwner (interface)

Once-acquired domain context with independent asynchronous lifetime ownership.

**Signature**

```ts
export interface ClientOwner<Shape> {
  /** Stable service identity; invoking it does not acquire another Layer. */
  readonly service: Shape;
  /** Runs one child owned by this context and joins its scoped finalizers.
   * @typeParam A - Successful operation result.
   * @typeParam E - Original typed failure, preserved at the Promise boundary.
   * @param effect - Lazy resource-owning service workflow.
   * @returns The original result or rejection after child cleanup. */
  readonly run: <A, E>(effect: Effect.Effect<A, E>) => Promise<A>;
  /** Interrupts active children and joins acquired-resource finalizers once.
   * @returns The same settlement Promise on concurrent or repeated closure. */
  readonly close: () => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/client-owner.types.ts#L7)

## `client-runtime.ts`

### runClient

Runs fully provided client work at a Promise adapter, retaining original failures.

**Signature**

```ts
declare const runClient: <A, E>(effect: Effect.Effect<A, E>, signal?: AbortSignal) => Promise<A>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/client-runtime.ts#L16)

### runClientSync

Runs a fully provided synchronous state decision at its compatibility edge.

**Signature**

```ts
declare const runClientSync: <A, E>(effect: Effect.Effect<A, E>) => A;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/client-runtime.ts#L27)

## `index.ts`

Exposes transport clients and the generated contract augmentation authority.
Install @relkit/client for HTTP/WebSocket clients; React and TanStack peers
are needed only by their explicit integration entrypoints.

### ClientHeaders

**Signature**

```ts
declare const ClientHeaders: ClientHeaders;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L11)

### ClientHeadersInit

**Signature**

```ts
declare const ClientHeadersInit: ClientHeadersInit;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L10)

### CreateAutoClientOptions

**Signature**

```ts
declare const CreateAutoClientOptions: CreateAutoClientOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L14)

### CreateClientOptions

**Signature**

```ts
declare const CreateClientOptions: CreateClientOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L12)

### CreateWebSocketClientOptions

**Signature**

```ts
declare const CreateWebSocketClientOptions: CreateWebSocketClientOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L13)

### DefaultContract (type alias)

Contract inferred from the preserved public registry augmentation.

**Signature**

```ts
type DefaultContract = DefaultContractRegistry extends {
  readonly contract: infer Contract extends RouterContract;
}
  ? Contract
  : RouterContract;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L21)

### DefaultContractRegistry (interface)

Original augmentation authority; generated applications extend this exact module.

**Signature**

```ts
export interface DefaultContractRegistry {}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L18)

### ORPCError

**Signature**

```ts
declare const ORPCError: typeof ORPCError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L7)

### createAutoClient

**Signature**

```ts
declare const createAutoClient: <Contract extends RouterContract = RouterContract>(
  options: CreateAutoClientOptions,
) => RouterContractClient<Contract>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L8)

### createClient

**Signature**

```ts
declare const createClient: <Contract extends RouterContract = RouterContract>(
  options: CreateClientOptions,
) => RouterContractClient<Contract>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L8)

### createWebSocketClient

**Signature**

```ts
declare const createWebSocketClient: <Contract extends RouterContract = RouterContract>(
  options: CreateWebSocketClientOptions,
) => RouterContractClient<Contract>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.ts#L8)

## `index.types.ts`

Native header inputs accepted without copying mutable Headers at construction.

### ClientHeaders (type alias)

Static headers or a provider evaluated for each future request.

**Signature**

```ts
type ClientHeaders = ClientHeadersInit | (() => ClientHeadersInit | Promise<ClientHeadersInit>);
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.types.ts#L6)

### ClientHeadersInit (type alias)

Native header inputs accepted without copying mutable Headers at construction.

**Signature**

```ts
type ClientHeadersInit =
  Headers | Readonly<Record<string, string>> | readonly (readonly [string, string])[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.types.ts#L2)

### CreateAutoClientOptions (interface)

Combined transport options; fallback applies only to WebSocket establishment failure.

**Signature**

```ts
export interface CreateAutoClientOptions
  extends CreateClientOptions, CreateWebSocketClientOptions {}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.types.ts#L34)

### CreateClientOptions (interface)

HTTP client configuration preserving browser credentials and caller transport overrides.

**Signature**

```ts
export interface CreateClientOptions {
  /** Application HTTP origin and optional base path. */
  readonly baseUrl: string;
  /** Request-time headers, including asynchronous providers. */
  readonly headers?: ClientHeaders;
  /** Browser fetch credentials policy; the live adapter supplies the existing default. */
  readonly credentials?: RequestInit["credentials"];
  /** Borrowed fetch implementation used for all HTTP requests. */
  readonly fetch?: typeof globalThis.fetch;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.types.ts#L10)

### CreateWebSocketClientOptions (interface)

WebSocket configuration whose establishment timeout leaves accepted streams independent.

**Signature**

```ts
export interface CreateWebSocketClientOptions {
  /** Application origin converted to its corresponding WebSocket protocol. */
  readonly baseUrl: string;
  /** Maximum time allowed for initial connection establishment. */
  readonly establishmentTimeoutMs?: number;
  /** Headers retained with the existing WebSocket transport contract. */
  readonly headers?: ClientHeaders;
  /** Borrowed WebSocket constructor, or the browser implementation when omitted. */
  readonly websocket?: typeof WebSocket;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/index.types.ts#L22)

## `content.service.ts`

### JobContent (class)

Named job content lifetime and bounded continuity contract.

**Signature**

```ts
declare class JobContent
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/content.service.ts#L14)

### JobContentLive

Provides named-content acquisition with scoped native pulls and bounded continuity.

**See**

- packages/client/tests/compatibility/jobs-watch.test.ts for continuity assertions.

**Signature**

```ts
declare const JobContentLive: Layer.Layer<JobContent, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/content.service.ts#L25)

## `content.types.ts`

### JobContentService (interface)

Named stream acquisition, continuity and memory-bound ownership.

**Signature**

```ts
export interface JobContentService {
  /** Acquires named content and transfers native cleanup to the returned iterator.
   * @param client - Borrowed generated job transport.
   * @param job - Declared job key.
   * @param options - Existing stream identity, cursor, cancellation and bounds.
   * @returns Lazy acquisition of bounded frames or the original native failure. */
  readonly open: (
    client: unknown,
    job: string,
    options: JobStreamOptions,
  ) => Effect.Effect<AsyncIterable<NamedStreamFrame<JsonValue>>, unknown>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/content.types.ts#L6)

## `contracts.types.ts`

### JobCancelInput (type alias)

Cancellation request with caller-owned operation identity.

**Signature**

```ts
type JobCancelInput = {
  readonly runId: string;
  readonly operationId: OperationId | string;
  readonly reason?: string;
  readonly expectedIdentity?: ExpectedClientIdentity;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L100)

### JobClientField (type alias)

Client-visible run projection fields.

**Signature**

```ts
type JobClientField = "status" | "input" | "progress" | "output" | "error";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L10)

### JobGetInput (type alias)

Authoritative run lookup and expected application identity.

**Signature**

```ts
type JobGetInput = {
  readonly runId: string;
  readonly expectedIdentity?: ExpectedClientIdentity;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L64)

### JobListInput (type alias)

Job-specific listing filters and expected application identity.

**Signature**

```ts
type JobListInput = {
  readonly query?: JobListQuery;
  readonly expectedIdentity?: ExpectedClientIdentity;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L72)

### JobListQuery (type alias)

Filters accepted by a generated job-specific list; ownership is server-derived.

**Signature**

```ts
type JobListQuery = Omit<RunListQuery, "jobId" | "service">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L5)

### JobProcedureContract (interface)

Generated finite procedure shape preserving input, output and failure inference.

**Signature**

```ts
export interface JobProcedureContract<Input, Output, Failure = Error> {
  readonly input: Input;
  readonly output: Output;
  readonly error: Failure;
  readonly operation: "query" | "mutation";
  readonly stream: false;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L28)

### JobRetryInput (type alias)

Retry request with caller-owned operation identity.

**Signature**

```ts
type JobRetryInput = {
  readonly runId: string;
  readonly operationId: OperationId | string;
  readonly expectedIdentity?: ExpectedClientIdentity;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L110)

### JobStreamInput (type alias)

Named content observation cursor and expected application identity.

**Signature**

```ts
type JobStreamInput<StreamName extends string = string> = {
  readonly runId: string;
  readonly name: StreamName;
  readonly after?: string;
  readonly expectedIdentity?: ExpectedClientIdentity;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L90)

### JobStreamProcedureContract (interface)

Generated stream procedure shape preserving item and failure inference.

**Signature**

```ts
export interface JobStreamProcedureContract<Input, Item, Failure = Error> {
  readonly input: Input;
  readonly output: AsyncIterable<Item>;
  readonly item: Item;
  readonly error: Failure;
  readonly operation: "query" | "mutation";
  readonly stream: true;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L42)

### JobTriggerInput (type alias)

Job trigger request and expected application identity.

**Signature**

```ts
type JobTriggerInput<Input> = {
  readonly input: Input;
  readonly options?: JobTriggerOptions;
  readonly expectedIdentity?: ExpectedClientIdentity;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L55)

### JobTriggerOptions (interface)

Browser-safe options accepted by a generated job trigger.

**Signature**

```ts
export interface JobTriggerOptions {
  readonly operationId?: OperationId | string;
  readonly idempotencyKey?: string;
  readonly delay?: string;
  readonly at?: string;
  readonly tags?: readonly string[];
  readonly correlationId?: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L13)

### JobWatchInput (type alias)

Run observation cursor and expected application identity.

**Signature**

```ts
type JobWatchInput = {
  readonly runId: string;
  readonly after?: string;
  readonly expectedIdentity?: ExpectedClientIdentity;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/contracts.types.ts#L80)

## `controller-state.ts`

### stateFromFeedEvent

Projects observation status or frames into the existing external-store state.

**Signature**

```ts
declare const stateFromFeedEvent: <Run>(
  current: JobWatchState<Run>,
  event: FeedEvent<Run>,
  source: JobWatchOptions["source"],
) => JobWatchState<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller-state.ts#L13)

## `controller-support.ts`

### freeze

Deep-freezes external-store state without cloning its identity.

**Signature**

```ts
declare const freeze: <T>(value: T) => T;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller-support.ts#L24)

### notify

Isolates one external-store callback from observation ownership.

**Signature**

```ts
declare const notify: <Run>(listener: JobWatchListener<Run>, state: JobWatchState<Run>) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller-support.ts#L10)

### reconnectAfterTeardown

Waits for interrupted setup and cleanup before admitting the next connection.

**Signature**

```ts
declare const reconnectAfterTeardown: (
  previous: Promise<void> | undefined,
  teardown: Promise<void> | undefined,
  start: () => Promise<void>,
) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller-support.ts#L49)

### resumedOptions

Adds the retained snapshot cursor to the existing observation options.

**Signature**

```ts
declare const resumedOptions: <Run>(
  options: JobWatchOptions,
  state: JobWatchState<Run>,
) => JobWatchOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller-support.ts#L35)

## `controller.service.ts`

### JobControllers (class)

Creates passive external-store views over scoped physical observation services.

**Signature**

```ts
declare class JobControllers
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.service.ts#L15)

### JobControllersLive

Acquires the controller factory once without opening native requests.

**Example**

```ts
import { Layer, ManagedRuntime } from "effect";
import { runExecutionSync } from "@relkit/contracts/operation";
import { JobControllers, JobControllersLive } from "./controller.service.js";
import { JobFeedRegistryLive } from "./feed-registry.service.js";
export async function observeJob(client: unknown): Promise<void> {
  const owner = ManagedRuntime.make(JobControllersLive.pipe(Layer.provide(JobFeedRegistryLive)));
  try {
    const factory = runExecutionSync(owner, JobControllers);
    const view = factory.view(client, "job", { runId: "run" });
    try {
      await view.connect();
    } finally {
      await view.dispose();
    }
  } finally {
    await owner.dispose();
  }
}
```

**Signature**

```ts
declare const JobControllersLive: Layer.Layer<JobControllers, never, JobFeedRegistry>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.service.ts#L39)

## `controller.service.types.ts`

### JobControllerFactory (interface)

Once-acquired state factory sharing only complete-key physical observations.

**Signature**

```ts
export interface JobControllerFactory {
  readonly view: (client: unknown, name: string, options: JobWatchOptions) => JobControllerView;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.service.types.ts#L16)

### JobControllerView (interface)

Passive external-store state; asynchronous native work belongs to the feed service.

**Signature**

```ts
export interface JobControllerView {
  readonly snapshot: () => JobWatchState<unknown>;
  readonly subscribe: (listener: JobWatchListener<unknown>) => () => void;
  readonly assertLive: () => void;
  readonly isDisconnected: () => boolean;
  readonly connect: () => Promise<void>;
  readonly disconnect: () => Promise<void>;
  readonly dispose: () => Promise<void>;
  readonly refetch: () => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.service.types.ts#L4)

## `controller.ts`

### JobRunWatchController (class)

Passive synchronous external-store facade over scoped physical feed services.

**Signature**

```ts
declare class JobRunWatchController<Run> {
  constructor(client: unknown, name: string, options: JobWatchOptions);
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.ts#L24)

### getSnapshot (method)

**Signature**

```ts
declare const getSnapshot: () => JobWatchState<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.ts#L42)

### subscribe (method)

Borrows controller state publication without acquiring native work.

**Signature**

```ts
declare const subscribe: (listener: JobWatchListener<Run>) => () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.ts#L51)

### connect (method)

**Signature**

```ts
declare const connect: () => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.ts#L56)

### disconnect (method)

**Signature**

```ts
declare const disconnect: () => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.ts#L70)

### dispose (method)

**Signature**

```ts
declare const dispose: () => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.ts#L82)

### refetch (method)

**Signature**

```ts
declare const refetch: () => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.ts#L88)

### watchJobRun

Creates an idle, independently disposable external-store watch owner.

**Signature**

```ts
declare const watchJobRun: <Name extends string>(
  client: unknown,
  name: Name,
  options: JobWatchOptions,
) => JobWatchController<JobRunFor<Name>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/controller.ts#L102)

## `feed-registry.service.ts`

### JobFeedRegistry (class)

Reference-counted native observation ownership, independent of controller state.

**Signature**

```ts
declare class JobFeedRegistry
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/feed-registry.service.ts#L14)

### JobFeedRegistryLive

Provides reference-counted feed sharing within complete security/protocol keys.

**Example**

```ts
import { Effect, ManagedRuntime } from "effect";
import { runExecutionSync } from "@relkit/contracts/operation";
import { JobFeedRegistry, JobFeedRegistryLive } from "./feed-registry.service.js";
export async function borrowJobFeed(client: unknown): Promise<void> {
  const owner = ManagedRuntime.make(JobFeedRegistryLive);
  try {
    const registry = runExecutionSync(owner, JobFeedRegistry);
    const borrow = await owner.runPromise(registry.borrow(client, "job", { runId: "run" }));
    try {
      await borrow.feed.addLease("view", () => undefined);
    } finally {
      await Effect.runPromise(borrow.release);
    }
  } finally {
    await owner.dispose();
  }
}
```

**See**

- tests/jobs/registry.test.ts for checked scoped native cleanup.

**Signature**

```ts
declare const JobFeedRegistryLive: Layer.Layer<JobFeedRegistry, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/feed-registry.service.ts#L41)

## `feed-registry.types.ts`

### JobFeedRegistryService (interface)

Reference-counted observation registry, with complete request authority.

**Signature**

```ts
export interface JobFeedRegistryService {
  /** Registers a passive external-store view without another Layer acquisition. */
  readonly borrowView: (client: unknown, name: string, options: JobWatchOptions) => WatchFeedBorrow;
  readonly borrow: (
    client: unknown,
    name: string,
    options: JobWatchOptions,
  ) => Effect.Effect<WatchFeedBorrow>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/feed-registry.types.ts#L23)

### WatchFeedBorrow (interface)

One independently closable reference to a shared feed.

**Signature**

```ts
export interface WatchFeedBorrow {
  readonly feed: SharedWatchFeed<unknown>;
  /** Excludes a final retiring group before native callbacks can reconnect. */
  readonly retire: Effect.Effect<void>;
  readonly release: Effect.Effect<void>;
  /** Passive view retirement; this boundary never awaits native work. */
  readonly retireView: () => void;
  /** Joins the shared native borrow after passive view retirement. */
  readonly releaseView: () => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/feed-registry.types.ts#L12)

### WatchFeedGroup (interface)

One native RcMap borrow shared by independently retired passive view leases.

**Signature**

```ts
export interface WatchFeedGroup {
  readonly feed: SharedWatchFeed<unknown>;
  readonly scope: Scope.Closeable;
  readonly references: Ref.Ref<number>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/feed-registry.types.ts#L6)

## `index.ts`

### "./contracts.types.js" (namespace export)

Re-exports all named exports from the "./contracts.types.js" module.

**Signature**

```ts
export * from "./contracts.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L15)

### JobCancelInputFor

**Signature**

```ts
declare const JobCancelInputFor: JobCancelInputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L29)

### JobCancelName

**Signature**

```ts
declare const JobCancelName: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L38)

### JobCancelOutputFor

**Signature**

```ts
declare const JobCancelOutputFor: JobCancelOutputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L30)

### JobClientOperation

**Signature**

```ts
declare const JobClientOperation: JobClientOperation;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L2)

### JobContract

**Signature**

```ts
declare const JobContract: JobContract<
  Name,
  JobId,
  Input,
  Output,
  Failure,
  Progress,
  Streams,
  Operations,
  Fields
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L19)

### JobErrorEnvelope

**Signature**

```ts
declare const JobErrorEnvelope: JobErrorEnvelope;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L3)

### JobFailureFor

**Signature**

```ts
declare const JobFailureFor: JobFailureFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L31)

### JobFor

**Signature**

```ts
declare const JobFor: JobFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L20)

### JobProcedureSelector

**Signature**

```ts
declare const JobProcedureSelector: JobProcedureSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L21)

### JobRegistry

**Signature**

```ts
declare const JobRegistry: JobRegistry;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L17)

### JobRetryInputFor

**Signature**

```ts
declare const JobRetryInputFor: JobRetryInputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L32)

### JobRetryName

**Signature**

```ts
declare const JobRetryName: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L39)

### JobRetryOutputFor

**Signature**

```ts
declare const JobRetryOutputFor: JobRetryOutputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L33)

### JobRunFor

**Signature**

```ts
declare const JobRunFor: JobRunFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L34)

### JobRunSelector

**Signature**

```ts
declare const JobRunSelector: JobRunSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L25)

### JobRunStatus

**Signature**

```ts
declare const JobRunStatus: JobRunStatus;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L4)

### JobRunWatchController

**Signature**

```ts
declare const JobRunWatchController: typeof JobRunWatchController;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L57)

### JobSelector

**Signature**

```ts
declare const JobSelector: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L22)

### JobSnapshotFor

**Signature**

```ts
declare const JobSnapshotFor: JobSnapshotFor<Input, Output, Progress, Failure, Fields>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L23)

### JobStreamGapError

**Signature**

```ts
declare const JobStreamGapError: typeof JobStreamGapError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L58)

### JobStreamOptions

**Signature**

```ts
declare const JobStreamOptions: JobStreamOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L59)

### JobStreamOverflowError

**Signature**

```ts
declare const JobStreamOverflowError: typeof JobStreamOverflowError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L58)

### JobTriggerInputFor

**Signature**

```ts
declare const JobTriggerInputFor: JobTriggerInputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L35)

### JobTriggerName

**Signature**

```ts
declare const JobTriggerName: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L40)

### JobTriggerOutputFor

**Signature**

```ts
declare const JobTriggerOutputFor: JobTriggerOutputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L36)

### JobTriggerSelector

**Signature**

```ts
declare const JobTriggerSelector: JobTriggerSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L24)

### JobWatchAbortedError

**Signature**

```ts
declare const JobWatchAbortedError: typeof JobWatchAbortedError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L52)

### JobWatchController

**Signature**

```ts
declare const JobWatchController: JobWatchController<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L45)

### JobWatchDisposedError

**Signature**

```ts
declare const JobWatchDisposedError: typeof JobWatchDisposedError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L53)

### JobWatchFrame

**Signature**

```ts
declare const JobWatchFrame: JobWatchFrame<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L46)

### JobWatchFrameFor

**Signature**

```ts
declare const JobWatchFrameFor: JobWatchFrameFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L37)

### JobWatchListener

**Signature**

```ts
declare const JobWatchListener: JobWatchListener<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L47)

### JobWatchName

**Signature**

```ts
declare const JobWatchName: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L41)

### JobWatchOptions

**Signature**

```ts
declare const JobWatchOptions: JobWatchOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L48)

### JobWatchReadTimeoutError

**Signature**

```ts
declare const JobWatchReadTimeoutError: typeof JobWatchReadTimeoutError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L55)

### JobWatchState

**Signature**

```ts
declare const JobWatchState: JobWatchState<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L49)

### JobWatchUnavailableError

**Signature**

```ts
declare const JobWatchUnavailableError: typeof JobWatchUnavailableError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L54)

### NamedStreamFrame

**Signature**

```ts
declare const NamedStreamFrame: NamedStreamFrame<Item>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L5)

### RunCancellationReceipt

**Signature**

```ts
declare const RunCancellationReceipt: RunCancellationReceipt;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L6)

### RunHandle

**Signature**

```ts
declare const RunHandle: RunHandle;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L7)

### RunListQuery

**Signature**

```ts
declare const RunListQuery: RunListQuery;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L8)

### RunPage

**Signature**

```ts
declare const RunPage: RunPage<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L9)

### RunRetryReceipt

**Signature**

```ts
declare const RunRetryReceipt: RunRetryReceipt;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L10)

### RunSnapshot

**Signature**

```ts
declare const RunSnapshot: RunSnapshot<Input, Output, Progress, Failure>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L11)

### RunWatchFrame

**Signature**

```ts
declare const RunWatchFrame: RunWatchFrame<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L12)

### SelectedJobField

**Signature**

```ts
declare const SelectedJobField: SelectedJobField<Fields, Field>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L26)

### watchJobRun

**Signature**

```ts
declare const watchJobRun: <Name extends string>(
  client: unknown,
  name: Name,
  options: JobWatchOptions,
) => JobWatchController<JobRunFor<Name>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L57)

### watchJobStream

**Signature**

```ts
declare const watchJobStream: <Item extends JsonValue = JsonValue>(
  client: unknown,
  job: string,
  options: JobStreamOptions,
) => Promise<AsyncIterable<NamedStreamFrame<Item>>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/index.ts#L58)

## `job-registry-derived.ts`

### "./job-registry-derived.types.js" (namespace export)

Re-exports all named exports from the "./job-registry-derived.types.js" module.

**Signature**

```ts
export * from "./job-registry-derived.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.ts#L3)

## `job-registry-derived.types.ts`

### JobCancelInputFor (type alias)

Infers the exact cancellation request or its dynamic fallback.

**Signature**

```ts
type JobCancelInputFor<Name extends string> = Name extends JobSelector
  ? JobFor<Name> extends { readonly runs: infer Runs }
    ? Runs extends { readonly cancel: infer Cancel }
      ? Cancel extends { readonly input: infer Input }
        ? Input
        : never
      : never
    : never
  : JobCancelInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L117)

### JobCancelName (type alias)

Names of jobs exposing cancellation receipts.

**Signature**

```ts
type JobCancelName = JobRunName<"cancel">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L44)

### JobCancelOutputFor (type alias)

Infers the declared cancellation receipt or its standard fallback.

**Signature**

```ts
type JobCancelOutputFor<Name extends string> = Name extends JobSelector
  ? JobFor<Name> extends { readonly runs: infer Runs }
    ? Runs extends { readonly cancel: infer Cancel }
      ? Cancel extends { readonly output: infer Output }
        ? Output
        : RunCancellationReceipt
      : RunCancellationReceipt
    : RunCancellationReceipt
  : RunCancellationReceipt;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L131)

### JobFailureFor (type alias)

Infers declared job failures while preserving the standard error envelope fallback.

**Signature**

```ts
type JobFailureFor<Name extends string> = Name extends JobSelector
  ? JobFor<Name> extends { readonly trigger: infer Trigger }
    ? Trigger extends { readonly error: infer Failure }
      ? Failure
      : JobErrorEnvelope
    : JobErrorEnvelope
  : JobErrorEnvelope;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L79)

### JobRetryInputFor (type alias)

Infers the exact retry request or its dynamic fallback.

**Signature**

```ts
type JobRetryInputFor<Name extends string> = Name extends JobSelector
  ? JobFor<Name> extends { readonly runs: infer Runs }
    ? Runs extends { readonly retry: infer Retry }
      ? Retry extends { readonly input: infer Input }
        ? Input
        : never
      : never
    : never
  : JobRetryInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L145)

### JobRetryName (type alias)

Names of jobs exposing retry receipts.

**Signature**

```ts
type JobRetryName = JobRunName<"retry">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L49)

### JobRetryOutputFor (type alias)

Infers the declared retry receipt or its standard fallback.

**Signature**

```ts
type JobRetryOutputFor<Name extends string> = Name extends JobSelector
  ? JobFor<Name> extends { readonly runs: infer Runs }
    ? Runs extends { readonly retry: infer Retry }
      ? Retry extends { readonly output: infer Output }
        ? Output
        : RunRetryReceipt
      : RunRetryReceipt
    : RunRetryReceipt
  : RunRetryReceipt;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L159)

### JobRunFor (type alias)

Infers authoritative run payloads from get or watch contracts.

**Signature**

```ts
type JobRunFor<Name extends string> = Name extends JobSelector
  ? JobFor<Name> extends { readonly runs: infer Runs }
    ? Runs extends { readonly get: infer Get }
      ? Get extends { readonly output: infer Output }
        ? Output
        : RunSnapshot
      : Runs extends { readonly watch: infer Watch }
        ? Watch extends { readonly output: AsyncIterable<infer Frame> }
          ? Frame extends { readonly run: infer Run }
            ? Run
            : RunSnapshot
          : RunSnapshot
        : RunSnapshot
    : RunSnapshot
  : RunSnapshot;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L91)

### JobRunName (type alias)

Names of jobs exposing the selected run operation.

**Signature**

```ts
type JobRunName<Operation extends JobRunOperation> = {
  [Name in JobSelector]: JobFor<Name> extends { readonly runs: infer Runs }
    ? Operation extends keyof Runs
      ? Name
      : never
    : never;
}[JobSelector];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L28)

### JobTriggerInputFor (type alias)

Infers the declared trigger input while preserving the dynamic fallback.

**Signature**

```ts
type JobTriggerInputFor<Name extends string> = Name extends JobSelector
  ? JobFor<Name> extends { readonly trigger: infer Trigger }
    ? Trigger extends { readonly input: infer Input }
      ? Input
      : never
    : never
  : unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L55)

### JobTriggerName (type alias)

Names of jobs exposing a declared trigger procedure.

**Signature**

```ts
type JobTriggerName = {
  [Name in JobSelector]: JobFor<Name> extends { readonly trigger: unknown } ? Name : never;
}[JobSelector];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L20)

### JobTriggerOutputFor (type alias)

Infers the declared trigger receipt while preserving RunHandle fallback.

**Signature**

```ts
type JobTriggerOutputFor<Name extends string> = Name extends JobSelector
  ? JobFor<Name> extends { readonly trigger: infer Trigger }
    ? Trigger extends { readonly output: infer Output }
      ? Output
      : never
    : never
  : RunHandle;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L67)

### JobWatchFrameFor (type alias)

Wraps the inferred authoritative run payload in its native watch frame.

**Signature**

```ts
type JobWatchFrameFor<Name extends string> = RunWatchFrame<JobRunFor<Name>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L111)

### JobWatchName (type alias)

Names of jobs exposing native run observation.

**Signature**

```ts
type JobWatchName = JobRunName<"watch">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-derived.types.ts#L39)

## `job-registry-types.ts`

Augmentable registry of application-declared job contracts.

### "./job-registry.types.js" (namespace export)

Re-exports all named exports from the "./job-registry.types.js" module.

**Signature**

```ts
export * from "./job-registry.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-types.ts#L8)

### JobRegistry (interface)

Augmentable registry of application-declared job contracts.

**Signature**

```ts
export interface JobRegistry {}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry-types.ts#L6)

## `job-registry.types.ts`

### JobContract (type alias)

Generated job declaration retaining operation availability and selective field inference.

**Signature**

```ts
type JobContract<
  Name extends string = string,
  JobId extends string = string,
  Input = unknown,
  Output = unknown,
  Failure = JobErrorEnvelope,
  Progress = unknown,
  Streams extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>,
  Operations extends readonly JobClientOperation[] = readonly JobClientOperation[],
  Fields extends readonly JobClientField[] = readonly [],
> = {
  readonly name: Name;
  readonly jobId: JobId;
} & TriggerMember<Input, Failure, Operations> &
  RunMembers<Input, Output, Progress, Failure, Streams, Operations, Fields>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry.types.ts#L166)

### JobFor (type alias)

Looks up one declared job contract without widening its members.

**Signature**

```ts
type JobFor<Name extends JobSelector> = JobRegistry[Name];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry.types.ts#L191)

### JobProcedureSelector (type alias)

Union of exact procedure selectors exposed by one declared job.

**Signature**

```ts
type JobProcedureSelector<Name extends JobSelector = JobSelector> =
  JobTriggerSelector<Name> | JobRunSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry.types.ts#L221)

### JobRunSelector (type alias)

Produces exact selectors for the declared run operations.

**Signature**

```ts
type JobRunSelector<Name extends JobSelector> =
  JobFor<Name> extends { readonly runs: infer Runs }
    ? {
        [
          Operation in "get" | "list" | "watch" | "stream" | "cancel" | "retry"
        ]: Runs extends Record<Operation, unknown>
          ? Runs[Operation] extends never
            ? never
            : `${Name}.runs.${Operation}`
          : never;
      }["get" | "list" | "watch" | "stream" | "cancel" | "retry"]
    : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry.types.ts#L204)

### JobSelector (type alias)

String keys of the application-declared job registry.

**Signature**

```ts
type JobSelector = Extract<keyof JobRegistry, string>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry.types.ts#L185)

### JobSnapshotFor (type alias)

Projects run payload fields according to the declared client visibility contract.

**Signature**

```ts
type JobSnapshotFor<
  Input,
  Output,
  Progress,
  Failure,
  Fields extends readonly JobClientField[],
> = RunSnapshot<
  SelectedJobField<Fields, "input"> extends true ? Input : never,
  SelectedJobField<Fields, "output"> extends true ? Output : never,
  SelectedJobField<Fields, "progress"> extends true ? Progress : never,
  SelectedJobField<Fields, "error"> extends true ? Failure : never
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry.types.ts#L44)

### JobTriggerSelector (type alias)

Produces the exact trigger selector only for trigger-capable jobs.

**Signature**

```ts
type JobTriggerSelector<Name extends JobSelector> =
  JobFor<Name> extends { readonly trigger: unknown } ? `${Name}.trigger` : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry.types.ts#L197)

### SelectedJobField (type alias)

Tests whether a projection field belongs to the declared visible field set.

**Signature**

```ts
type SelectedJobField<
  Fields extends readonly JobClientField[],
  Field extends JobClientField,
> = Field extends Fields[number] ? true : false;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/job-registry.types.ts#L31)

## `observation.service.ts`

### JobObservation (class)

Cohesive native/polling observation workflow, replaceable at the feed owner.

**Signature**

```ts
declare class JobObservation
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/observation.service.ts#L7)

### JobObservationLive

Acquires the live observation workflow; native dependencies are supplied by each feed.

**See**

- tests/jobs/quality.test.ts for checked observation, recovery and interruption cases.

**Signature**

```ts
declare const JobObservationLive: Layer.Layer<JobObservation, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/observation.service.ts#L17)

## `observation.types.ts`

### JobObservationService (interface)

Live/test contract for one independently cancellable shared observation lifetime.

**Signature**

```ts
export interface JobObservationService {
  /** Observes one physical feed until confirmed completion or retirement.
   * @typeParam Run - Application-declared run payload.
   * @param feed - Native dependency and authoritative observation state.
   * @param generation - Active worker generation rejecting stale callbacks.
   * @returns A lazy observed and interruptible workflow preserving native failures. */
  readonly consume: <Run>(
    feed: WatchFeedLoop<Run>,
    generation: number,
  ) => Effect.Effect<void, unknown>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/observation.types.ts#L5)

## `read-timeout.ts`

### readWatchNext

Bounds one native iterator pull using the caller's cancellation authority.

**Signature**

```ts
declare const readWatchNext: (
  iterator: AsyncIterator<unknown>,
  signal: AbortSignal,
  timeoutMs?: number,
) => Promise<IteratorResult<unknown>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/read-timeout.ts#L10)

### timedCall

Races one native boundary call against cancellation and the existing bounded read deadline.

**Signature**

```ts
declare const timedCall: <T>(
  signal: AbortSignal,
  timeoutMs: number,
  operation: (signal: AbortSignal) => Promise<T> | T,
) => Promise<T>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/read-timeout.ts#L26)

## `reconcile-boundary.ts`

### asWatchFrame

Checks the existing selective watch-frame envelope and retains original fields.

**Signature**

```ts
declare const asWatchFrame: (value: unknown) => RunWatchFrame;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-boundary.ts#L109)

### isProcedureNotFound

Recognizes the existing missing-procedure envelope used for safe read fallback.

**Signature**

```ts
declare const isProcedureNotFound: (value: unknown) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-boundary.ts#L82)

### isRunSnapshot

Checks the existing selective run-snapshot authority without stricter payload validation.

**Signature**

```ts
declare const isRunSnapshot: (value: unknown) => value is RunSnapshot;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-boundary.ts#L121)

### optionalJobProcedure

Resolves an optional generated procedure while preserving unrelated lookup defects.

**Signature**

```ts
declare const optionalJobProcedure: (
  root: unknown,
  name: string,
  operation: string,
) => Procedure | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-boundary.ts#L63)

### ownJobProcedure

Finds a concrete job procedure while avoiding synthesized proxy properties.

**Signature**

```ts
declare const ownJobProcedure: (
  root: unknown,
  name: string,
  operation: string,
) => Procedure | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-boundary.ts#L27)

### resolveJobProcedure

Resolves a generated job procedure or preserves the existing missing-procedure error.

**Signature**

```ts
declare const resolveJobProcedure: (root: unknown, name: string, operation: string) => Procedure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-boundary.ts#L12)

### throwIfAborted

Preserves the public watch-aborted failure at a native compatibility edge.

**Signature**

```ts
declare const throwIfAborted: (signal: AbortSignal) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-boundary.ts#L130)

### toAsyncIterator

Checks and transfers a native iterable or iterator without cloning its payloads.

**Signature**

```ts
declare const toAsyncIterator: (value: unknown) => AsyncIterator<unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-boundary.ts#L91)

## `reconcile-support.ts`

### closeIterator

Bounds a native iterator's return without changing an existing public failure.

**Signature**

```ts
declare const closeIterator: (iterator: AsyncIterator<unknown>) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-support.ts#L8)

### newEpoch

Creates the existing local epoch used for synthesized authoritative snapshots.

**Signature**

```ts
declare const newEpoch: () => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile-support.ts#L32)

## `reconcile.ts`

### WatchRequest

**Signature**

```ts
declare const WatchRequest: WatchRequest;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L17)

### authoritativeFrame

Reads authoritative run state, falling back to watch only for a missing get procedure.

**Signature**

```ts
declare const authoritativeFrame: (
  client: unknown,
  name: string,
  options: JobWatchOptions,
  signal: AbortSignal,
) => Promise<RunWatchFrame | undefined>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L100)

### closeIterator

**Signature**

```ts
declare const closeIterator: (iterator: AsyncIterator<unknown>) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L148)

### frameFromRun

Projects an authoritative run into the existing frozen snapshot frame.

**Signature**

```ts
declare const frameFromRun: (run: RunSnapshot) => RunWatchFrame;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L137)

### newEpoch

**Signature**

```ts
declare const newEpoch: () => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L148)

### openWatchIterator

Bounds native watch establishment and preserves the supplied lifetime signal.

**Signature**

```ts
declare const openWatchIterator: (
  client: unknown,
  name: string,
  request: WatchRequest,
  signal: AbortSignal,
  timeoutMs?: number,
) => Promise<AsyncIterator<unknown>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L74)

### ownJobProcedure

**Signature**

```ts
declare const ownJobProcedure: (
  root: unknown,
  name: string,
  operation: string,
) => Procedure | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L11)

### readFirstWatchFrame

Reads and closes a temporary native watch used for authoritative fallback.

**Signature**

```ts
declare const readFirstWatchFrame: (
  client: unknown,
  name: string,
  request: WatchRequest,
  signal: AbortSignal,
  timeoutMs?: number,
) => Promise<RunWatchFrame | undefined>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L43)

### resolveJobProcedure

**Signature**

```ts
declare const resolveJobProcedure: (root: unknown, name: string, operation: string) => Procedure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L11)

### watchRequest

Builds the existing run observation request without widening identity authority.

**Signature**

```ts
declare const watchRequest: (options: JobWatchOptions, after?: string | undefined) => WatchRequest;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.ts#L25)

## `reconcile.types.ts`

### Procedure (type alias)

A native job procedure callable preserving unknown request and result authority.

**Signature**

```ts
type Procedure = (...args: readonly unknown[]) => unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.types.ts#L4)

### WatchRequest (interface)

Run identity, retained cursor and optional expected application identity.

**Signature**

```ts
export interface WatchRequest {
  readonly runId: string;
  readonly after?: string;
  readonly expectedIdentity?: ExpectedClientIdentity;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/reconcile.types.ts#L7)

## `stream-errors.ts`

### JobStreamGapError (class)

**Signature**

```ts
declare class JobStreamGapError { constructor(
    readonly expected: number,
    readonly received: number,
  ) }
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream-errors.ts#L15)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_JOB_STREAM_GAP"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream-errors.ts#L16)

### JobStreamOverflowError (class)

**Signature**

```ts
declare class JobStreamOverflowError { constructor(readonly limit: "frames" | "bytes" | "item-bytes") }
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream-errors.ts#L1)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_JOB_STREAM_OVERFLOW"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream-errors.ts#L2)

## `stream-support.ts`

### byteLength

Measures the existing UTF-8 JSON representation used by content memory limits.

**Signature**

```ts
declare const byteLength: (value: unknown) => number;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream-support.ts#L53)

### streamIdentity

Combines every existing named-content generation boundary into its continuity key.

**Signature**

```ts
declare const streamIdentity: (frame: NamedStreamFrame) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream-support.ts#L7)

### toAsyncIterator

Checks and transfers a native iterable or iterator without cloning its payloads.

**Signature**

```ts
declare const toAsyncIterator: (value: unknown) => AsyncIterator<unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream-support.ts#L62)

### validateFrame

Validates the existing selective named-content frame and chunk authority.

**Signature**

```ts
declare const validateFrame: (value: unknown) => NamedStreamFrame;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream-support.ts#L18)

## `stream.ts`

### JobStreamGapError

**Signature**

```ts
declare const JobStreamGapError: typeof JobStreamGapError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream.ts#L8)

### JobStreamOptions

**Signature**

```ts
declare const JobStreamOptions: JobStreamOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream.ts#L7)

### JobStreamOverflowError

**Signature**

```ts
declare const JobStreamOverflowError: typeof JobStreamOverflowError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream.ts#L8)

### watchJobStream

Opens one bounded named-content iterator with existing continuity guarantees.

**Signature**

```ts
declare const watchJobStream: <Item extends JsonValue = JsonValue>(
  client: unknown,
  job: string,
  options: JobStreamOptions,
) => Promise<AsyncIterable<NamedStreamFrame<Item>>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream.ts#L22)

## `stream.types.ts`

### JobStreamOptions (interface)

Existing content bounds and request authority for one named stream.

**Signature**

```ts
export interface JobStreamOptions {
  readonly runId: string;
  readonly name: string;
  readonly after?: string;
  readonly expectedIdentity?: ExpectedClientIdentity;
  readonly signal?: AbortSignal;
  readonly readTimeoutMs?: number;
  readonly maxFrames?: number;
  readonly maxBytes?: number;
  readonly maxItemBytes?: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/stream.types.ts#L3)

## `types.ts`

### JobWatchAbortedError (class)

**Signature**

```ts
declare class JobWatchAbortedError {
  constructor();
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L22)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_JOB_WATCH_ABORTED"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L23)

### JobWatchController

**Signature**

```ts
declare const JobWatchController: JobWatchController<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L6)

### JobWatchDisposedError (class)

**Signature**

```ts
declare class JobWatchDisposedError {
  constructor();
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L9)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_JOB_WATCH_DISPOSED"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L10)

### JobWatchFrame

**Signature**

```ts
declare const JobWatchFrame: JobWatchFrame<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L4)

### JobWatchListener

**Signature**

```ts
declare const JobWatchListener: JobWatchListener<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L5)

### JobWatchOptions

**Signature**

```ts
declare const JobWatchOptions: JobWatchOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L2)

### JobWatchReadTimeoutError (class)

**Signature**

```ts
declare class JobWatchReadTimeoutError {
  constructor();
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L48)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_JOB_WATCH_READ_TIMEOUT"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L49)

### JobWatchState

**Signature**

```ts
declare const JobWatchState: JobWatchState<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L3)

### JobWatchUnavailableError (class)

**Signature**

```ts
declare class JobWatchUnavailableError {
  constructor();
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L35)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_JOB_WATCH_UNAVAILABLE"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L36)

### isTerminalRun

Recognizes only the existing terminal run statuses.

**Signature**

```ts
declare const isTerminalRun: (run: unknown) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/types.ts#L66)

## `watch-feed-loop.ts`

### WatchFeedLoop

**Signature**

```ts
declare const WatchFeedLoop: WatchFeedLoop<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-loop.ts#L10)

### runWatchFeed

Runs the native observation/reconciliation/retry state machine in its owner fiber.

**Signature**

```ts
declare const runWatchFeed: <Run>(
  feed: WatchFeedLoop<Run>,
  generation: number,
) => Effect.Effect<void, unknown, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-loop.ts#L19)

## `watch-feed-loop.types.ts`

### WatchFeedLoop (interface)

State authority shared by native and polling observation workflows.

**Signature**

```ts
export interface WatchFeedLoop<Run> {
  readonly client: unknown;
  readonly name: string;
  readonly options: JobWatchOptions;
  readonly isActive: (generation: number) => boolean;
  readonly lastCursor: () => string | undefined;
  readonly setAbort: (controller: AbortController | undefined) => void;
  readonly setIterator: (iterator: AsyncIterator<unknown> | undefined) => void;
  readonly acceptFrame: (value: unknown) => RunWatchFrame<Run> | undefined;
  readonly emit: (event: FeedEvent<Run>) => void;
  readonly verifyTerminal: (
    frame: RunWatchFrame<Run>,
    signal: AbortSignal,
  ) => Promise<boolean | undefined>;
  readonly releaseTerminal: () => void;
  readonly resolveFirsts: () => void;
  readonly rejectFirsts: (error: unknown) => void;
  readonly failureCount: () => number;
  readonly setFailureCount: (value: number) => void;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-loop.types.ts#L9)

## `watch-feed-observers.ts`

### WatchFeedObservers

**Signature**

```ts
declare const WatchFeedObservers: WatchFeedObservers<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-observers.ts#L4)

### emitObservers

Publishes to each observer while isolating synchronous view failures.

**Signature**

```ts
declare const emitObservers: <Run>(
  observers: WatchFeedObservers<Run>,
  event: FeedEvent<Run>,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-observers.ts#L13)

### rejectObserverFirsts

Rejects pending first-snapshot Promises with the original failure object.

**Signature**

```ts
declare const rejectObserverFirsts: <Run>(
  observers: WatchFeedObservers<Run>,
  error: unknown,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-observers.ts#L43)

### releaseWatchFeedTerminal

Aborts the observer request and clears leases after authoritative completion.

**Signature**

```ts
declare const releaseWatchFeedTerminal: <Run>(
  observers: Map<string, { readonly observer: FeedObserver<Run>; readonly first: Pending }>,
  abort: AbortController | undefined,
  onEmpty: () => void,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-observers.ts#L58)

### resolveObserverFirsts

Settles each pending first-snapshot Promise after authoritative evidence.

**Signature**

```ts
declare const resolveObserverFirsts: <Run>(observers: WatchFeedObservers<Run>) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-observers.ts#L32)

## `watch-feed-observers.types.ts`

### WatchFeedObservers (type alias)

Each feed lease's callback and shared first-snapshot settlement authority.

**Signature**

```ts
type WatchFeedObservers<Run> = ReadonlyMap<
  string,
  { readonly observer: FeedObserver<Run>; readonly first: Pending }
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-observers.types.ts#L8)

## `watch-feed-polling.ts`

### runPollingFeed

Observes authoritative snapshots with the injected Clock and unchanged retry policy.

**Signature**

```ts
declare const runPollingFeed: <Run>(
  feed: WatchFeedLoop<Run>,
  generation: number,
) => Effect.Effect<void, unknown, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-polling.ts#L16)

## `watch-feed-recovery.ts`

### recoverWatchFeed

Applies the bounded, idempotent observation retry policy without retrying server work.

**Signature**

```ts
declare const recoverWatchFeed: <Run>(
  feed: WatchFeedLoop<Run>,
  generation: number,
  error: unknown,
  controller: AbortController,
) => Effect.Effect<void, unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-recovery.ts#L13)

## `watch-feed-refetch.ts`

### refetchSharedWatchFeed

Owns a temporary authoritative read while respecting borrowed cancellation.

**Signature**

```ts
declare const refetchSharedWatchFeed: <Run>(
  client: unknown,
  name: string,
  options: JobWatchOptions,
  lastCursor: string | undefined,
  signal?: AbortSignal,
) => Promise<RunWatchFrame<Run> | undefined>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-refetch.ts#L16)

## `watch-feed-state.ts`

### WatchFeedState

**Signature**

```ts
declare const WatchFeedState: WatchFeedState<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-state.ts#L4)

### acceptWatchFrame

Applies epoch changes and duplicate suppression without losing retained cursor authority.

**Signature**

```ts
declare const acceptWatchFrame: <Run>(
  state: WatchFeedState<Run>,
  value: unknown,
) => { readonly state: WatchFeedState<Run>; readonly frame: RunWatchFrame<Run> | undefined };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-state.ts#L22)

### emptyWatchFeedState

Creates the initial empty observation cache with no native resources.

**Signature**

```ts
declare const emptyWatchFeedState: <Run>() => WatchFeedState<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-state.ts#L11)

## `watch-feed-state.types.ts`

### WatchFeedState (interface)

Accepted frame, epoch, sequence and cursor retained by one shared observation feed.

**Signature**

```ts
export interface WatchFeedState<Run> {
  readonly lastFrame: RunWatchFrame<Run> | undefined;
  readonly lastCursor: string | undefined;
  readonly lastSequence: number;
  readonly nativeEpoch: string | undefined;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-state.types.ts#L7)

## `watch-feed-support.ts`

### Pending

**Signature**

```ts
declare const Pending: Pending;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L4)

### backoff

Calculates the existing bounded observation reconnect delay.

**Signature**

```ts
declare const backoff: (attempt: number, options: JobWatchOptions) => number;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L26)

### closeEmptyIterator

Provides the existing already-completed native iterator.

**Signature**

```ts
declare const closeEmptyIterator: () => AsyncIterator<unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L98)

### deferred

Creates one settled-once first-snapshot Promise with explicit resolution authority.

**Signature**

```ts
declare const deferred: () => Pending;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L10)

### isFrame

Checks the existing selective observation-frame shape.

**Signature**

```ts
declare const isFrame: (value: unknown) => value is RunWatchFrame;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L107)

### isUnauthorized

Recognizes existing nested authorization denial envelopes.

**Signature**

```ts
declare const isUnauthorized: (value: unknown) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L134)

### offline

Waits for browser online recovery while owning its listener and borrowed signal.

**Signature**

```ts
declare const offline: (signal: AbortSignal) => Promise<boolean>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L61)

### resetFrame

Marks reconnect continuity without fabricating cursor or terminal evidence.

**Signature**

```ts
declare const resetFrame: (value: unknown) => unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L116)

### wait

Owns a native delay and removes its timer and borrowed abort listener on settlement.

**Signature**

```ts
declare const wait: (milliseconds: number, signal: AbortSignal) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L39)

### withAfter

Adds a retained cursor only when one exists.

**Signature**

```ts
declare const withAfter: (options: JobWatchOptions, after: string | undefined) => JobWatchOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.ts#L90)

## `watch-feed-support.types.ts`

Settled-once first-snapshot Promise with explicit resolve and reject functions.

### Pending (type alias)

Settled-once first-snapshot Promise with explicit resolve and reject functions.

**Signature**

```ts
type Pending = {
  readonly promise: Promise<void>;
  readonly resolve: () => void;
  readonly reject: (error: unknown) => void;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-support.types.ts#L2)

## `watch-feed-teardown.ts`

Joins native feed completion within the public teardown deadline.

### joinFeedTeardown

Joins native feed completion within the public teardown deadline.

**Signature**

```ts
declare const joinFeedTeardown: (
  interrupted: Promise<void>,
  running: Promise<void>,
) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-teardown.ts#L9)

## `watch-feed-terminal.ts`

### verifyWatchTerminal

Confirms terminal evidence and publishes the authoritative frame.

**Signature**

```ts
declare const verifyWatchTerminal: <Run>(
  client: unknown,
  name: string,
  options: JobWatchOptions,
  frame: RunWatchFrame<Run>,
  signal: AbortSignal,
  accept: (value: unknown) => RunWatchFrame<Run> | undefined,
  emit: (event: FeedEvent<Run>) => void,
) => Promise<boolean | undefined>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-terminal.ts#L20)

## `watch-feed-types.ts`

### "./watch-feed.types.js" (namespace export)

Re-exports all named exports from the "./watch-feed.types.js" module.

**Signature**

```ts
export * from "./watch-feed.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed-types.ts#L2)

## `watch-feed.ts`

### FeedEvent

**Signature**

```ts
declare const FeedEvent: FeedEvent<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L17)

### FeedStatus

**Signature**

```ts
declare const FeedStatus: FeedStatus;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L17)

### SharedWatchFeed (class)

Scoped physical native observation shared by independently retired view leases.

**Signature**

```ts
declare class SharedWatchFeed<Run> { constructor(
    private readonly client: unknown,
    private readonly name: string,
    private readonly options: JobWatchOptions,
    private readonly onEmpty: () => void = () => undefined,
  ) }
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L23)

### addLease (method)

Registers one observer and its first-snapshot Promise without duplicating shared native work.

**Signature**

```ts
declare const addLease: (id: string, observer: FeedObserver<Run>) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L59)

### removeLease (method)

Releases one observer and joins bounded native teardown only for the final observer.

**Signature**

```ts
declare const removeLease: (id: string, error?: unknown) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L78)

### refetch (method)

Reads authoritative evidence without changing observation lease ownership.

**Signature**

```ts
declare const refetch: (signal?: AbortSignal) => Promise<RunWatchFrame<Run> | undefined>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L115)

### close (method)

Closes the service owner after the sharing registry removes its final entry.

**Signature**

```ts
declare const close: () => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L134)

### ensureRunning (method)

Starts one supervised observation worker only when live observers require it.

**Signature**

```ts
declare const ensureRunning: () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L150)

### loop (method)

Projects the facade's observer and epoch authority into the owned observation workflow.

**Signature**

```ts
declare const loop: (generation: number) => {
  client: unknown;
  name: string;
  options: JobWatchOptions;
  isActive: (generation: number) => boolean;
  lastCursor: () => string | undefined;
  setAbort: (controller: AbortController | undefined) => void;
  setIterator: () => void;
  acceptFrame: (value: unknown) => RunWatchFrame<Run> | undefined;
  emit: (event: FeedEvent<Run>) => void;
  verifyTerminal: (frame: RunWatchFrame<Run>, signal: AbortSignal) => Promise<boolean | undefined>;
  releaseTerminal: () => void;
  resolveFirsts: () => void;
  rejectFirsts: (error: unknown) => void;
  failureCount: () => number;
  setFailureCount: (value: number) => void;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L176)

### releaseTerminal (method)

Retires terminal observer authority and invalidates the shared registry entry.

**Signature**

```ts
declare const releaseTerminal: () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L217)

### acceptFrame (method)

Applies epoch, sequence and cursor duplicate rules to the cached observer snapshot.

**Signature**

```ts
declare const acceptFrame: (value: unknown) => RunWatchFrame<Run> | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L229)

### emit (method)

Publishes an observation without allowing one callback to fail another observer.

**Signature**

```ts
declare const emit: (event: FeedEvent<Run>) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.ts#L240)

## `watch-feed.types.ts`

### FeedEvent (type alias)

Canonical native frame or physical observation lifecycle publication.

**Signature**

```ts
type FeedEvent<Run> =
  | { readonly kind: "frame"; readonly frame: RunWatchFrame<Run> }
  | { readonly kind: "status"; readonly status: FeedStatus; readonly error?: unknown };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.types.ts#L7)

### FeedObserver (type alias)

Synchronous observer isolated from another view and the native worker lifetime.

**Signature**

```ts
type FeedObserver<Run> = (event: FeedEvent<Run>) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.types.ts#L19)

### FeedStatus (type alias)

Physical observation states projected into each passive external-store view.

**Signature**

```ts
type FeedStatus =
  "connecting" | "connected" | "reconnecting" | "completed" | "unauthorized" | "error";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-feed.types.ts#L12)

## `watch-key.ts`

### WatchFeedKey (class)

Complete immutable sharing identity with borrowed transport/configuration.

**Signature**

```ts
declare class WatchFeedKey { constructor(
    readonly client: unknown,
    readonly name: string,
    readonly options: JobWatchOptions,
  ) }
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-key.ts#L7)

### [Equal.symbol] (method)

**Signature**

```ts
declare const [Equal.symbol]: (that: Equal.Equal) => boolean
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-key.ts#L24)

### [Hash.symbol] (method)

**Signature**

```ts
declare const [Hash.symbol]: () => number
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-key.ts#L28)

### value (property)

**Signature**

```ts
readonly value: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch-key.ts#L8)

## `watch.ts`

### FeedEvent

**Signature**

```ts
declare const FeedEvent: FeedEvent<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.ts#L5)

### FeedStatus

**Signature**

```ts
declare const FeedStatus: FeedStatus;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.ts#L5)

### JobFeedRegistryDefault

Borrowed browser registry; each controller closes its explicit RcMap borrow.

**Signature**

```ts
declare const JobFeedRegistryDefault: Layer.Layer<JobFeedRegistry, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.ts#L14)

### SharedWatchFeed

**Signature**

```ts
declare const SharedWatchFeed: typeof SharedWatchFeed;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.ts#L4)

### jobFeedRegistry

Once-acquired reference-counted registry used by controller operations.

**Signature**

```ts
declare const jobFeedRegistry: JobFeedRegistryService;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.ts#L12)

## `watch.types.ts`

### JobWatchController (interface)

Reusable public watch owner with synchronous state and explicit Promise cleanup.

**Signature**

```ts
export interface JobWatchController<Run = RunSnapshot> {
  getSnapshot(): JobWatchState<Run>;
  subscribe(listener: JobWatchListener<Run>): () => void;
  connect(): Promise<void>;
  disconnect(): Promise<void>;
  dispose(): Promise<void>;
  refetch(): Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.types.ts#L59)

### JobWatchFrame (type alias)

Declared job run observation frame.

**Signature**

```ts
type JobWatchFrame<Run = RunSnapshot> = RunWatchFrame<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.types.ts#L47)

### JobWatchListener (type alias)

Borrowed synchronous observer of frozen job watch state.

**Signature**

```ts
type JobWatchListener<Run = RunSnapshot> = (state: JobWatchState<Run>) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.types.ts#L53)

### JobWatchOptions (interface)

Complete watch sharing authority, cursor/projection fields and retry/read bounds.

**Signature**

```ts
export interface JobWatchOptions {
  readonly runId: string;
  readonly jobId?: string;
  readonly after?: string;
  readonly expectedIdentity?: ExpectedClientIdentity;
  readonly identityKey?: string | null;
  readonly applicationId?: string;
  readonly environment?: string;
  readonly grantScope?: string;
  readonly projection?: string;
  readonly schemaVersion?: string;
  readonly protocolVersion?: number;
  readonly source?: "native" | "polling";
  readonly pollIntervalMs?: number;
  readonly maxReconnectAttempts?: number;
  readonly reconnectMinDelayMs?: number;
  readonly reconnectMaxDelayMs?: number;
  readonly readTimeoutMs?: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.types.ts#L5)

### JobWatchState (interface)

Frozen external-store snapshot of connection, run and continuity evidence.

**Signature**

```ts
export interface JobWatchState<Run = RunSnapshot> {
  readonly run?: Run;
  readonly connection: RunConnection;
  readonly isStale: boolean;
  readonly lastObservedAt?: string;
  readonly connectionError?: unknown;
  readonly continuity?: "state" | "history";
  readonly resetReason?: "reconnected" | "cursor-expired" | "history-unavailable" | "overflow";
  readonly source?: "native" | "polling";
  readonly epoch?: string;
  readonly sequence?: number;
  readonly cursor?: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/jobs/watch.types.ts#L29)

## `native-stream.ts`

### nativeCall

Suspends native work and passes the owning fiber's cancellation signal.

**Signature**

```ts
declare const nativeCall: <A>(
  execute: (signal: AbortSignal) => PromiseLike<A>,
) => Effect.Effect<A, unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/native-stream.ts#L10)

### nativeStream

Owns an iterator and its request through all pulls, EOF and early return.

**Signature**

```ts
declare const nativeStream: <A>(
  operation: string,
  open: (signal: AbortSignal) => PromiseLike<AsyncIterator<A>>,
  caller?: AbortSignal,
  opened?: Effect.Effect<void>,
  read?: (iterator: AsyncIterator<A>, signal: AbortSignal) => PromiseLike<IteratorResult<A>>,
) => Stream.Stream<A, unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/native-stream.ts#L28)

## `agent-continuation.ts`

### prepareAgentContinuation

Binds a continuation to the authoritative waiting revision for its thread.

**Signature**

```ts
declare const prepareAgentContinuation: (
  client: unknown,
  agentId: string,
  threadId: string,
  payload: unknown,
  current?: ThreadSnapshot,
) => Promise<PreparedContinuation>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-continuation.ts#L16)

### requiredThreadId

Validates the existing caller-supplied thread boundary.

**Throws**

Error when the existing thread validation fails.

**Signature**

```ts
declare const requiredThreadId: (options: AgentThreadOptions | undefined) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-continuation.ts#L35)

## `agent-contract-selection.ts`

### "./agent-contract-selection.types.js" (namespace export)

Re-exports all named exports from the "./agent-contract-selection.types.js" module.

**Signature**

```ts
export * from "./agent-contract-selection.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.ts#L3)

## `agent-contract-selection.types.ts`

### AgentChat (type alias)

Infers whether the declared agent accepts chat send.

**Signature**

```ts
type AgentChat<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly chat: infer Value } ? Value : false;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L35)

### AgentControls (type alias)

Infers the declared agent control capabilities.

**Signature**

```ts
type AgentControls<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly controls: infer Value } ? Value : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L28)

### AgentCustomEvent (type alias)

Infers the declared custom observation event payload.

**Signature**

```ts
type AgentCustomEvent<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly customEvent: infer Value } ? Value : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L63)

### AgentInput (type alias)

Infers the declared agent run input.

**Signature**

```ts
type AgentInput<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly input: infer Value } ? Value : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L14)

### AgentOutput (type alias)

Infers the declared terminal agent output.

**Signature**

```ts
type AgentOutput<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly output: infer Value } ? Value : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L21)

### AgentPublicState (type alias)

Infers the public values projected into observed thread state.

**Signature**

```ts
type AgentPublicState<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly publicState: infer Value } ? Value : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L56)

### AgentResume (type alias)

Infers the declared continuation input.

**Signature**

```ts
type AgentResume<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly resume: infer Value } ? Value : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L42)

### AgentScope (type alias)

Infers declared nested execution scope identities.

**Signature**

```ts
type AgentScope<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly scope: infer Value } ? Value : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L70)

### AgentTool (type alias)

Infers the declared tool input and output contract.

**Signature**

```ts
type AgentTool<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly tool: infer Value } ? Value : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L49)

### AgentWaiting (type alias)

Infers supported waiting request payloads.

**Signature**

```ts
type AgentWaiting<Name extends AgentSelector> =
  AgentFor<Name> extends { readonly waiting: infer Value } ? Value : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-contract-selection.types.ts#L77)

## `agent-execution-observation.ts`

### AgentExecutionProjection

**Signature**

```ts
declare const AgentExecutionProjection: AgentExecutionProjection<Output>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-execution-observation.ts#L8)

### clientEventProjection

Projects canonical client events into the existing browser execution event shape.

**Signature**

```ts
declare const clientEventProjection: (event: AgentClientEvent) => unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-execution-observation.ts#L138)

### executionProjection

Projects authoritative execution state into the existing browser agent shape.

**Signature**

```ts
declare const executionProjection: <Output>(
  current: AgentExecutionProjection<Output>,
  event: AgentExecutionEvent,
) => AgentExecutionProjection<Output>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-execution-observation.ts#L17)

### snapshotProjection

Projects a thread snapshot through its canonical executions.

**Signature**

```ts
declare const snapshotProjection: <Output>(
  snapshot: ThreadSnapshot,
) => AgentExecutionProjection<Output>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-execution-observation.ts#L56)

### terminalProjection

Projects a native terminal envelope without fabricating missing output.

**Signature**

```ts
declare const terminalProjection: <Output>(value: unknown) => {
  output?: Output;
  status: "failed" | "cancelled" | "succeeded";
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-execution-observation.ts#L107)

### updateSnapshotProjection

Updates the browser snapshot projection without widening authority.

**Signature**

```ts
declare const updateSnapshotProjection: <Snapshot extends ThreadSnapshot>(
  snapshot: Snapshot,
  projection: AgentExecutionProjection,
  event: AgentClientEvent,
) => Snapshot;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-execution-observation.ts#L74)

## `agent-execution-observation.types.ts`

### AgentExecutionProjection (interface)

Browser agent lifecycle and content projected from authoritative execution state.

**Signature**

```ts
export interface AgentExecutionProjection<Output = unknown> {
  readonly values?: unknown;
  readonly output?: Output;
  readonly executions: readonly AgentExecutionSnapshot[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-execution-observation.types.ts#L7)

## `agent-hook-contract.ts`

### "./agent-hook-contract.types.js" (namespace export)

Re-exports all named exports from the "./agent-hook-contract.types.js" module.

**Signature**

```ts
export * from "./agent-hook-contract.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-contract.ts#L3)

## `agent-hook-contract.types.ts`

### AgentNestedExecution (type alias)

Projects nested execution identity and public values from the declared scope.

**Signature**

```ts
type AgentNestedExecution<Scope, PublicState> = Omit<
  AgentExecutionSnapshot,
  "agent" | "node" | "values"
> & {
  readonly agent?: ScopeId<Scope, "agent" | "subagent">;
  readonly node?: ScopeId<Scope, "node">;
  readonly values?: PublicState;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-contract.types.ts#L123)

### AgentObservedEvent (type alias)

Canonical observed events with declared tool and custom payload inference.

**Signature**

```ts
type AgentObservedEvent<Tool, CustomEvent> =
  | Exclude<AgentClientEvent, AgentToolEvent>
  | TypedToolEvent<AgentToolEvent, Tool>
  | ObservedCustomEvent<CustomEvent>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-contract.types.ts#L84)

### AgentToolCall (interface)

Stable browser projection of canonical tool identity, state, input and output.

**Signature**

```ts
export interface AgentToolCall {
  readonly toolCallId: string;
  readonly messageId: string;
  readonly partId: string;
  readonly runId?: string;
  readonly toolId: string;
  readonly state: ToolPartState;
  readonly inputText?: string;
  readonly input?: unknown;
  readonly output?: unknown;
  readonly createdAt: string;
  readonly updatedAt: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-contract.types.ts#L14)

### TypedAgentToolCall (type alias)

Specializes observed tool identity and payloads when a tool contract is declared.

**Signature**

```ts
type TypedAgentToolCall<Tool> = Tool extends ToolContract
  ? Omit<AgentToolCall, "toolId" | "input" | "output"> & {
      readonly toolId: Tool["id"];
      readonly input?: Tool["input"];
      readonly output?: Tool["output"];
    }
  : AgentToolCall;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-contract.types.ts#L42)

### TypedThreadSnapshot (type alias)

Authoritative thread snapshot with declaration-derived output, scope, values and waiting requests.

**Signature**

```ts
type TypedThreadSnapshot<Output, PublicState, Scope, Waiting> = Omit<
  ThreadSnapshot,
  "executions" | "output" | "values" | "waiting"
> & {
  readonly executions: readonly AgentNestedExecution<Scope, PublicState>[];
  readonly output?: Output;
  readonly values?: PublicState;
  readonly waiting?: [Waiting] extends [never] ? never : TypedWaitingState<Waiting>;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-contract.types.ts#L139)

### TypedWaitingState (type alias)

Projects waiting requests using the declared supported waiting union.

**Signature**

```ts
type TypedWaitingState<Waiting> = Omit<AgentWaitingState, "requests"> & {
  readonly requests: readonly (Waiting extends AgentWaitingRequest ? Waiting : never)[];
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-contract.types.ts#L93)

## `agent-hook-types.ts`

### "./agent-hook-types.types.js" (namespace export)

Re-exports all named exports from the "./agent-hook-types.types.js" module.

**Signature**

```ts
export * from "./agent-hook-types.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.ts#L3)

## `agent-hook-types.types.ts`

### AgentBase (interface)

Observed durable thread state with declaration-derived payload and control contracts.

**Signature**

```ts
export interface AgentBase<
  Output,
  Tool = ClientAgentDynamic,
  PublicState = unknown,
  CustomEvent = never,
  Scope = ClientAgentDynamic,
  Waiting = AgentWaitingRequest,
> extends AgentContent<Tool> {
  readonly status:
    | "idle"
    | "loading"
    | "running"
    | "waiting"
    | "approval-interrupted"
    | "stopping"
    | "worker-interrupted"
    | "succeeded"
    | "failed"
    | "cancelled"
    | "error";
  readonly threadId?: string;
  readonly events: readonly AgentObservedEvent<Tool, CustomEvent>[];
  readonly values?: PublicState;
  readonly executions: readonly AgentNestedExecution<Scope, PublicState>[];
  readonly output?: Output;
  readonly snapshot?: ThreadSnapshot;
  readonly waiting?: ([Waiting] extends [never] ? never : TypedWaitingState<Waiting>) | undefined;
  readonly error?: unknown;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L116)

### AgentContent (interface)

Indexed browser content supporting ordered timeline and direct identity lookup.

**Signature**

```ts
export interface AgentContent<Tool = ClientAgentDynamic> {
  readonly timeline: readonly AgentTimelineItem<Tool>[];
  readonly timelineById: ReadonlyMap<string, AgentTimelineItem<Tool>>;
  readonly messages: readonly AgentMessage[];
  readonly messagesById: ReadonlyMap<string, AgentMessage>;
  readonly toolCalls: readonly TypedAgentToolCall<Tool>[];
  readonly toolCallsById: ReadonlyMap<string, TypedAgentToolCall<Tool>>;
  readonly progress: readonly AgentProgress[];
  readonly progressById: ReadonlyMap<string, AgentProgress>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L96)

### AgentMessage (interface)

Browser projection of canonical user or assistant text message parts.

**Signature**

```ts
export interface AgentMessage {
  readonly messageId: string;
  readonly runId?: string;
  readonly role: "user" | "assistant";
  readonly parts: readonly Extract<BrowserMessagePart, { readonly kind: "text" }>[];
  readonly createdAt: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L58)

### AgentNestedExecution

**Signature**

```ts
declare const AgentNestedExecution: AgentNestedExecution<Scope, PublicState>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L25)

### AgentOutput

**Signature**

```ts
declare const AgentOutput: AgentOutput<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L23)

### AgentProgress (type alias)

Browser progress projection with its canonical run or tool scope.

**Signature**

```ts
type AgentProgress = AgentProgressBase & import("@relkit/contracts").AgentProgressScope;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L81)

### AgentResumeOptions (interface)

Continuation options requiring explicit resume mode.

**Signature**

```ts
export interface AgentResumeOptions extends AgentThreadOptions {
  readonly resume: true;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L44)

### AgentRunOptions (interface)

Fresh run options excluding continuation mode.

**Signature**

```ts
export interface AgentRunOptions extends AgentThreadOptions {
  readonly resume?: false;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L37)

### AgentStopOptions (interface)

Durable thread stop policy preserving graceful and immediate alternatives.

**Signature**

```ts
export interface AgentStopOptions extends AgentThreadOptions {
  readonly mode?: "graceful" | "immediate";
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L51)

### AgentThreadOptions (interface)

Caller-owned durable thread identity used by observation and controls.

**Signature**

```ts
export interface AgentThreadOptions {
  readonly threadId: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L30)

### AgentTimelineItem (type alias)

Ordered browser timeline member retaining stable message, tool and progress identity.

**Signature**

```ts
type AgentTimelineItem<Tool = ClientAgentDynamic> =
  | { readonly key: string; readonly kind: "message"; readonly message: AgentMessage }
  | { readonly key: string; readonly kind: "tool"; readonly toolCall: TypedAgentToolCall<Tool> }
  | { readonly key: string; readonly kind: "progress"; readonly progress: AgentProgress };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L87)

### AgentToolCall

**Signature**

```ts
declare const AgentToolCall: AgentToolCall;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L25)

### UseAgentResult (type alias)

Public agent hook state and declaration-derived execution, observation and controls.

**Signature**

```ts
type UseAgentResult<Name extends AgentSelector> = Omit<ContractBase<Name>, "snapshot"> & {
  readonly snapshot?: TypedThreadSnapshot<
    AgentOutput<Name>,
    AgentPublicState<Name>,
    AgentScope<Name>,
    AgentWaiting<Name>
  >;
} & Execution<Name> &
  Observation &
  Controls<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook-types.types.ts#L214)

## `agent-hook.ts`

### "./agent-hook-types.js" (namespace export)

Re-exports all named exports from the "./agent-hook-types.js" module.

**Signature**

```ts
export * from "./agent-hook-types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook.ts#L19)

### useAgent

Adapts the agent service into React state while keeping accepted work independent of view cleanup.

**Signature**

```ts
declare const useAgent: <Name extends AgentSelector>(name: Name) => UseAgentResult<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook.ts#L27)

## `agent-hook.types.ts`

### InvocationOptions (type alias)

Explicit caller thread authority for an agent submission.

**Signature**

```ts
type InvocationOptions = AgentThreadOptions & { readonly resume?: boolean };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook.types.ts#L7)

### ObservationRequest (type alias)

The thread selected for the view's current agent observation.

**Signature**

```ts
type ObservationRequest = { readonly threadId: string; readonly revision: number };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-hook.types.ts#L4)

## `agent-methods.ts`

### agentMethods

Projects declared agent methods over the view's borrowed invocation and observation adapters.

**Signature**

```ts
declare const agentMethods: <Output>(
  state: AgentBase<Output>,
  invoke: Invoke,
  observe: (options: AgentThreadOptions) => Promise<void>,
) => {
  observe: (options: AgentThreadOptions) => Promise<void>;
  run: (input: unknown, options: AgentThreadOptions) => Promise<void>;
  send: (message: string, options: AgentThreadOptions) => Promise<void>;
  steer: (message: string, options: AgentThreadOptions) => Promise<void>;
  followUp: (message: string, options: AgentThreadOptions) => Promise<void>;
  stop: (options: AgentStopOptions) => Promise<void>;
  approve: (approvalId: string, options: AgentThreadOptions) => Promise<void>;
  deny: (approvalId: string, options: AgentThreadOptions) => Promise<void>;
  status:
    | "idle"
    | "loading"
    | "running"
    | "waiting"
    | "approval-interrupted"
    | "stopping"
    | "worker-interrupted"
    | "succeeded"
    | "failed"
    | "cancelled"
    | "error";
  threadId?: string;
  events: ReadonlyArray<AgentObservedEvent<ClientAgentDynamic, never>>;
  values?: unknown;
  executions: ReadonlyArray<AgentNestedExecution<ClientAgentDynamic, unknown>>;
  output?: Output;
  snapshot?: ThreadSnapshot;
  waiting?: TypedWaitingState<AgentWaitingRequest> | undefined;
  error?: unknown;
  timeline: ReadonlyArray<AgentTimelineItem<ClientAgentDynamic>>;
  timelineById: ReadonlyMap<string, AgentTimelineItem<ClientAgentDynamic>>;
  messages: readonly AgentMessage[];
  messagesById: ReadonlyMap<string, AgentMessage>;
  toolCalls: ReadonlyArray<AgentToolCall>;
  toolCallsById: ReadonlyMap<string, AgentToolCall>;
  progress: readonly AgentProgress[];
  progressById: ReadonlyMap<string, AgentProgress>;
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-methods.ts#L12)

## `agent-methods.types.ts`

### Invoke (type alias)

Borrowed agent submission callback preserving its declared receipt Promise.

**Signature**

```ts
type Invoke = (
  kind: string,
  payload: unknown,
  options: AgentThreadOptions & { readonly resume?: boolean },
) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-methods.types.ts#L4)

## `agent-observation-effect.ts`

### observeAgent

Restores the authoritative snapshot and owns every subsequent observation attempt.

**Signature**

```ts
declare const observeAgent: <Output>(
  client: unknown,
  streamClient: unknown,
  agentId: string,
  threadId: string,
  identity: AgentIdentity | undefined,
  signal: AbortSignal,
  update: AgentUpdate<Output>,
) => Effect.Effect<void, unknown, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-observation-effect.ts#L27)

## `agent-observation-index.ts`

### upsertMessage

Replaces or appends one message while preserving its timeline position.

**Signature**

```ts
declare const upsertMessage: (content: AgentContent, value: AgentMessage) => AgentContent;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-observation-index.ts#L15)

### upsertProgress

Replaces or appends one scoped progress item while preserving its timeline position.

**Signature**

```ts
declare const upsertProgress: (content: AgentContent, value: AgentProgress) => AgentContent;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-observation-index.ts#L55)

### upsertTool

Replaces or appends one tool call while preserving its timeline position.

**Signature**

```ts
declare const upsertTool: (content: AgentContent, value: AgentToolCall) => AgentContent;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-observation-index.ts#L35)

## `agent-observation.ts`

### agentContentFromMessages

Projects authoritative messages into indexed browser content.

**Signature**

```ts
declare const agentContentFromMessages: (messages: readonly BrowserMessage[]) => AgentContent;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-observation.ts#L45)

### applyAgentEvent

Applies one canonical agent observation while preserving lifecycle and journal authority.

**Signature**

```ts
declare const applyAgentEvent: <Output>(
  current: AgentBase<Output>,
  event: AgentClientEvent,
) => AgentBase<Output>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-observation.ts#L56)

### emptyAgentContent

Creates empty indexed browser agent content without native resources.

**Signature**

```ts
declare const emptyAgentContent: () => AgentContent;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-observation.ts#L27)

## `agent-observer.ts`

### restoreAndObserve

Restores and observes one caller-owned thread until terminal evidence or cleanup.

**Signature**

```ts
declare const restoreAndObserve: <Output>(
  client: unknown,
  streamClient: unknown,
  agentId: string,
  threadId: string,
  identity: AgentIdentity | undefined,
  signal: AbortSignal,
  update: AgentUpdate<Output>,
) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-observer.ts#L18)

## `agent-operations.service.ts`

### AgentOperations (class)

Agent observation, continuation and accepted-work ownership contract.

**Signature**

```ts
declare class AgentOperations
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.service.ts#L17)

### AgentOperationsLive

Provides agent operations using the existing pending receipt authority.

**Example**

```ts
import { Layer } from "effect";
import { AgentOperationsLive } from "./agent-operations.service.js";
import { pendingOperationsLayer } from "./pending.service.js";
export const live = AgentOperationsLive.pipe(Layer.provide(pendingOperationsLayer()));
```

**Signature**

```ts
declare const AgentOperationsLive: Layer.Layer<AgentOperations, never, PendingOperations>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.service.ts#L32)

### isAcceptedAgentRun

Retains the existing weak receipt predicate used by agent dispatch.

**Signature**

```ts
declare const isAcceptedAgentRun: (value: unknown) => value is { readonly threadId: string };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.service.ts#L203)

## `agent-operations.types.ts`

### AgentIdentity (interface)

Complete identity authority supplied to an observation or submission.

**Signature**

```ts
export interface AgentIdentity {
  readonly identityScope: string;
  readonly sessionEpoch: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.types.ts#L13)

### AgentObservationCursor (interface)

Checkpoint state belongs to one observation fiber.

**Signature**

```ts
export interface AgentObservationCursor {
  checkpoint: JournalCheckpoint;
  runId: string | undefined;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.types.ts#L40)

### AgentOperationsService (interface)

Cohesive agent recovery and accepted-work contract, independent of React.

**Signature**

```ts
export interface AgentOperationsService {
  /** Observes durable thread snapshots and ordered frames until view retirement.
   * @typeParam Output - Application-declared terminal output payload.
   * @param client - Borrowed finite procedure transport.
   * @param streamClient - Borrowed native observation transport.
   * @param agentId - Declared agent key.
   * @param threadId - Caller-owned durable thread identity.
   * @param identity - Complete authorization and session boundary.
   * @param signal - View lifetime propagated to native observations.
   * @param update - Isolated external-store publication.
   * @returns A lazy scoped recovery workflow preserving native errors. */
  readonly observe: <Output>(
    client: unknown,
    streamClient: unknown,
    agentId: string,
    threadId: string,
    identity: AgentIdentity | undefined,
    signal: AbortSignal,
    update: AgentUpdate<Output>,
  ) => Effect.Effect<void, unknown>;
  /** Binds continuation input to an authoritative waiting revision.
   * @param client - Borrowed finite procedure transport.
   * @param agentId - Declared agent key.
   * @param threadId - Caller-owned durable thread identity.
   * @param payload - Original transmitted continuation payload.
   * @param current - Matching authoritative snapshot when already available.
   * @returns A lazy observed revision and digest input or original native failure. */
  readonly continuation: (
    client: unknown,
    agentId: string,
    threadId: string,
    payload: unknown,
    current?: ThreadSnapshot,
  ) => Effect.Effect<PreparedContinuation, unknown>;
  /** Reconciles stored receipts with durable thread identity.
   * @param client - Borrowed receipt lookup transport.
   * @param scopeKey - Complete pending isolation scope.
   * @param agentId - Declared agent key.
   * @param signal - View lifetime for receipt observations.
   * @returns A lazy observed restored thread identity or original native failure. */
  readonly reconcile: (
    client: unknown,
    scopeKey: string,
    agentId: string,
    signal: AbortSignal,
  ) => Effect.Effect<string | undefined, unknown>;
  /** Dispatches accepted agent work independently of observation cancellation.
   * @param request - Complete identity, input, continuation and pending authority.
   * @returns A lazy observed original receipt or original native rejection. */
  readonly submit: (request: AgentSubmission) => Effect.Effect<unknown, unknown>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.types.ts#L45)

### AgentReceiptLookup (type alias)

Receipt lookup preserves the existing finite recovery alternatives.

**Signature**

```ts
type AgentReceiptLookup =
  | { readonly status: "found"; readonly receipt: { readonly threadId: string } }
  | { readonly status: "not-found" | "expired" | "state-lost" };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.types.ts#L23)

### AgentSubmission (interface)

Request state for a single accepted-work submission.

**Signature**

```ts
export interface AgentSubmission {
  readonly client: unknown;
  readonly scopeKey: string;
  readonly agentId: string;
  readonly threadId: string;
  readonly identity: AgentIdentity | undefined;
  readonly kind: string;
  readonly payload: unknown;
  readonly resume?: boolean;
  readonly snapshot?: ThreadSnapshot;
  readonly activeRunId?: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.types.ts#L27)

### AgentUpdate (type alias)

State publication remains borrowed from the calling view.

**Signature**

```ts
type AgentUpdate<Output> = (
  value: AgentBase<Output> | ((current: AgentBase<Output>) => AgentBase<Output>),
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.types.ts#L9)

### PreparedContinuation (interface)

A continuation digest binds input to the authoritative waiting revision.

**Signature**

```ts
export interface PreparedContinuation {
  readonly waitingRevision: string;
  readonly digestValue: { readonly payload: unknown; readonly waitingRevision: string };
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-operations.types.ts#L18)

## `agent-reconcile.ts`

### reconcileAgentRun

Reconciles recorded submissions using authoritative receipt lookup.

**Signature**

```ts
declare const reconcileAgentRun: (
  client: unknown,
  scopeKey: string,
  agentId: string,
  signal: AbortSignal,
) => Promise<string | undefined>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-reconcile.ts#L12)

## `agent-runtime.ts`

### agentOperations

Once-acquired service used by synchronous constructors and Promise adapters.

**Signature**

```ts
declare const agentOperations: AgentOperationsService;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-runtime.ts#L11)

### agentRuntime

**Signature**

```ts
declare const agentRuntime: ManagedRuntime.ManagedRuntime<AgentOperations, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-runtime.ts#L7)

## `agent-snapshot-observation.ts`

### applyAgentSnapshot

Replaces authoritative agent state and reconciles its browser projection.

**Signature**

```ts
declare const applyAgentSnapshot: <Output>(
  current: AgentBase<Output>,
  snapshot: ThreadSnapshot,
) => AgentBase<Output>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-snapshot-observation.ts#L13)

## `agent-sse-client.ts`

### createAgentSseClient

Creates the native SSE edge used by the agent observation service.

**Signature**

```ts
declare const createAgentSseClient: (options: AgentSseClientOptions, fallback?: object) => unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-sse-client.ts#L13)

## `agent-sse-stream.ts`

### agentSseObservations

Transfers a native response reader into a scoped Effect parser and iterator edge.

**Signature**

```ts
declare const agentSseObservations: (
  body: ReadableStream<Uint8Array>,
  controller: AbortController,
  borrowed?: AbortSignal,
) => AsyncIterable<AgentObservation>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-sse-stream.ts#L12)

## `agent-sse.types.ts`

### AgentSseClientOptions (interface)

Native HTTP configuration for the browser-safe agent SSE edge.

**Signature**

```ts
export interface AgentSseClientOptions {
  readonly baseUrl: string;
  readonly credentials: NonNullable<RequestInit["credentials"]>;
  readonly headers?: ClientHeaders;
  readonly fetch: typeof globalThis.fetch;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-sse.types.ts#L5)

### AgentSseObserveInput (interface)

Existing selective observation input authority.

**Signature**

```ts
export interface AgentSseObserveInput {
  readonly agentId: string;
  readonly threadId: string;
  readonly runId?: string;
  readonly after: JournalCheckpoint;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/agent-sse.types.ts#L12)

## `context-support.ts`

### browserOrigin

Reads the current browser backend origin or the existing local fallback.

**Signature**

```ts
declare const browserOrigin: () => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L11)

### compiledFingerprint

Reads the existing browser or Next public fingerprint binding.

**Signature**

```ts
declare const compiledFingerprint: () => string | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L31)

### finiteFetcher

Creates the finite native fetch edge with combined caller and deadline signals.

**Signature**

```ts
declare const finiteFetcher: (timeoutMs: number) => typeof fetch;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L105)

### identityHeaders

Attaches existing identity, jobs protocol and CSRF authority to current headers.

**Signature**

```ts
declare const identityHeaders: (
  value: ClientHeaders | undefined,
  identity: ClientIdentityDocument | undefined,
) => Promise<Headers>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L65)

### isRelkitQuery

Selects query entries owned by RELKIT's existing key prefix.

**Signature**

```ts
declare const isRelkitQuery: (query: { readonly queryKey: readonly unknown[] }) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L23)

### loadIdentity

Reads the existing backend identity document with caller-owned cancellation.

**Signature**

```ts
declare const loadIdentity: (
  baseUrl: string,
  credentials: NonNullable<RequestInit["credentials"]>,
  signal: AbortSignal,
) => Promise<ClientIdentityDocument>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L45)

### sameScope

Compares every existing query and hydration isolation boundary.

**Signature**

```ts
declare const sameScope: (left: RelkitKeyScope, right: RelkitKeyScope) => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L202)

### scopeFor

Constructs the complete existing backend and identity hydration/query scope.

**Signature**

```ts
declare const scopeFor: (
  backend: string,
  identity: ClientIdentityDocument,
  identityKey: string | null | undefined,
  environment?: string,
) => RelkitKeyScope;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L178)

### streamClientFor

Selects the existing HTTP, WebSocket, auto or SSE procedure adapter.

**Signature**

```ts
declare const streamClientFor: (options: {
  readonly baseUrl: string;
  readonly credentials: NonNullable<RequestInit["credentials"]>;
  readonly headers: ClientHeaders | undefined;
  readonly transport: "auto" | "websocket" | "http-stream" | "sse" | undefined;
  readonly timeoutMs: number;
  readonly identity: ClientIdentityDocument | undefined;
}) => ReturnType<typeof createClient>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L141)

### streamFetcher

Bounds native stream establishment without timing out the subsequent live stream.

**Signature**

```ts
declare const streamFetcher: (timeoutMs: number) => typeof fetch;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-support.ts#L118)

## `context-types.ts`

### "./context.types.js" (namespace export)

Re-exports all named exports from the "./context.types.js" module.

**Signature**

```ts
export * from "./context.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context-types.ts#L2)

## `context.tsx`

### RelkitClientProvider

Provides configured clients, query hydration, identity isolation and realtime ownership.

**See**

- https://relkit.dev/docs/modules/client#install-the-provider

**Signature**

```ts
declare const RelkitClientProvider: (props: RelkitClientProviderProps) => ReactNode;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context.tsx#L51)

### RelkitClientProviderProps

**Signature**

```ts
declare const RelkitClientProviderProps: RelkitClientProviderProps;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context.tsx#L39)

### RelkitClientRuntime

**Signature**

```ts
declare const RelkitClientRuntime: RelkitClientRuntime;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context.tsx#L40)

### RelkitHydrationState

**Signature**

```ts
declare const RelkitHydrationState: RelkitHydrationState;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context.tsx#L41)

### useRelkitClient

Reads the required existing React client provider context.

**Throws**

Error when called outside RelkitClientProvider.

**See**

- https://relkit.dev/docs/modules/client#install-the-provider

**Signature**

```ts
declare const useRelkitClient: () => RelkitClientRuntime;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context.tsx#L195)

## `context.types.ts`

### RelkitClientProviderProps (interface)

React provider configuration retaining borrowed clients and hydration authority.

**Signature**

```ts
export interface RelkitClientProviderProps {
  readonly baseUrl?: string;
  readonly environment?: string;
  readonly credentials?: RequestInit["credentials"];
  readonly headers?: ClientHeaders;
  readonly queryClient?: QueryClient;
  readonly identityKey?: string | null;
  readonly hydratedState?: RelkitHydrationState;
  readonly transport?: "auto" | "websocket" | "http-stream" | "sse";
  readonly requestTimeoutMs?: number;
  readonly streamEstablishmentTimeoutMs?: number;
  readonly children: ReactNode;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context.types.ts#L20)

### RelkitClientRuntime (interface)

Provider-owned client and identity state shared by React boundary adapters.

**Signature**

```ts
export interface RelkitClientRuntime {
  readonly client: ReturnType<typeof createClient>;
  readonly streamClient: ReturnType<typeof createClient>;
  readonly queryClient: QueryClient;
  readonly utils: unknown;
  readonly identity?: ClientIdentityDocument;
  readonly identityKey?: string | null;
  readonly status: "loading" | "ready" | "application-updated" | "error";
  readonly scope?: RelkitKeyScope;
  readonly transport: "auto" | "websocket" | "http-stream" | "sse";
  readonly streamEstablishmentTimeoutMs: number;
  readonly environment?: string;
  readonly realtime: RealtimeManager;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context.types.ts#L37)

### RelkitHydrationState (interface)

Server-supplied ready identity and application contract hydration.

**Signature**

```ts
export interface RelkitHydrationState {
  readonly scope: RelkitKeyScope;
  readonly dehydrated: unknown;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/context.types.ts#L12)

## `finite-hooks.ts`

### RelkitWriteError

**Signature**

```ts
declare const RelkitWriteError: typeof RelkitWriteError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/finite-hooks.ts#L35)

### useInfiniteRoute

Adapts a declared paginated route while retaining page and scope inference.

**Signature**

```ts
declare const useInfiniteRoute: <
  Name extends QuerySelector,
  PageParam,
  Selected = InfiniteData<OutputFor<Name>, PageParam>,
>(
  name: Name,
  options: Omit<
    UseInfiniteQueryOptions<
      OutputFor<Name>,
      ErrorFor<Name>,
      Selected,
      readonly unknown[],
      PageParam
    >,
    "queryKey" | "queryFn"
  > & { readonly input: (page: PageParam) => InputFor<Name> },
) => UseInfiniteQueryResult<Selected, ErrorFor<Name>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/finite-hooks.ts#L177)

### useRoute

Adapts a declared finite route into a scope-bound TanStack query.

**Signature**

```ts
declare const useRoute: <Name extends QuerySelector, Selected = OutputFor<Name>>(
  name: Name,
  options: QueryInput<Name, Selected>,
) => UseQueryResult<Selected, ErrorFor<Name>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/finite-hooks.ts#L45)

### useRouteMutation

Adapts a declared accepted-work operation into TanStack mutation state.

**Signature**

```ts
declare const useRouteMutation: <Name extends MutationSelector, Context = unknown>(
  name: Name,
  options?: Omit<
    UseMutationOptions<OutputFor<Name>, ErrorFor<Name>, InputFor<Name>, Context>,
    "mutationKey" | "mutationFn"
  >,
) => UseMutationResult<OutputFor<Name>, ErrorFor<Name>, InputFor<Name>, Context>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/finite-hooks.ts#L98)

### useRouteUtils

Returns the existing generated query/mutation utilities for a declared selector.

**Signature**

```ts
declare const useRouteUtils: <Name extends QuerySelector | MutationSelector>(
  name: Name,
) => ProcedureUtilsLike;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/finite-hooks.ts#L219)

### useSuspenseRoute

Adapts a ready declared route into a scope-bound suspense query.

**Signature**

```ts
declare const useSuspenseRoute: <Name extends QuerySelector, Selected = OutputFor<Name>>(
  name: Name,
  options: Omit<
    UseSuspenseQueryOptions<OutputFor<Name>, ErrorFor<Name>, Selected>,
    "queryKey" | "queryFn"
  > & {
    readonly input: InputFor<Name>;
  },
) => UseSuspenseQueryResult<Selected, ErrorFor<Name>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/finite-hooks.ts#L71)

## `finite-hooks.types.ts`

### QueryInput (type alias)

Declared route input or the existing skip-token readiness sentinel.

**Signature**

```ts
type QueryInput<Name extends QuerySelector, Selected> = Omit<
  UseQueryOptions<OutputFor<Name>, ErrorFor<Name>, Selected>,
  "queryKey" | "queryFn"
> & { readonly input: InputFor<Name> };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/finite-hooks.types.ts#L9)

## `index.ts`

Exposes React providers and hooks backed by the selected query adapter. Install
react, @tanstack/react-query@^5, @tanstack/query-core@^5 and

### "./agent-hook.js" (namespace export)

Re-exports all named exports from the "./agent-hook.js" module.

**Signature**

```ts
export * from "./agent-hook.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L8)

### "./agent-reconcile.js" (namespace export)

Re-exports all named exports from the "./agent-reconcile.js" module.

**Signature**

```ts
export * from "./agent-reconcile.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L9)

### "./context.js" (namespace export)

Re-exports all named exports from the "./context.js" module.

**Signature**

```ts
export * from "./context.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L7)

### "./finite-hooks.js" (namespace export)

Re-exports all named exports from the "./finite-hooks.js" module.

**Signature**

```ts
export * from "./finite-hooks.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L10)

### "./job-hooks.js" (namespace export)

Re-exports all named exports from the "./job-hooks.js" module.

**Signature**

```ts
export * from "./job-hooks.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L11)

### "./keys.js" (namespace export)

Re-exports all named exports from the "./keys.js" module.

**Signature**

```ts
export * from "./keys.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L12)

### "./pending.js" (namespace export)

Re-exports all named exports from the "./pending.js" module.

**Signature**

```ts
export * from "./pending.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L13)

### "./realtime-hook.js" (namespace export)

Re-exports all named exports from the "./realtime-hook.js" module.

**Signature**

```ts
export * from "./realtime-hook.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L14)

### "./registry.js" (namespace export)

Re-exports all named exports from the "./registry.js" module.

**Signature**

```ts
export * from "./registry.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L15)

### "./stream-hook.js" (namespace export)

Re-exports all named exports from the "./stream-hook.js" module.

**Signature**

```ts
export * from "./stream-hook.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L16)

### CountPresence

**Signature**

```ts
declare const CountPresence: CountPresence;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L17)

### JobCancelInput

**Signature**

```ts
declare const JobCancelInput: JobCancelInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L21)

### JobCancelInputFor

**Signature**

```ts
declare const JobCancelInputFor: JobCancelInputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L22)

### JobCancelName

**Signature**

```ts
declare const JobCancelName: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L23)

### JobCancelOutputFor

**Signature**

```ts
declare const JobCancelOutputFor: JobCancelOutputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L24)

### JobClientField

**Signature**

```ts
declare const JobClientField: JobClientField;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L20)

### JobContract

**Signature**

```ts
declare const JobContract: JobContract<
  Name,
  JobId,
  Input,
  Output,
  Failure,
  Progress,
  Streams,
  Operations,
  Fields
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L19)

### JobFor

**Signature**

```ts
declare const JobFor: JobFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L25)

### JobGetInput

**Signature**

```ts
declare const JobGetInput: JobGetInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L26)

### JobListInput

**Signature**

```ts
declare const JobListInput: JobListInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L28)

### JobListQuery

**Signature**

```ts
declare const JobListQuery: JobListQuery;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L27)

### JobProcedureContract

**Signature**

```ts
declare const JobProcedureContract: JobProcedureContract<Input, Output, Failure>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L30)

### JobProcedureSelector

**Signature**

```ts
declare const JobProcedureSelector: JobProcedureSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L29)

### JobRegistry

**Signature**

```ts
declare const JobRegistry: JobRegistry;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L31)

### JobRetryInput

**Signature**

```ts
declare const JobRetryInput: JobRetryInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L32)

### JobRetryInputFor

**Signature**

```ts
declare const JobRetryInputFor: JobRetryInputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L33)

### JobRetryName

**Signature**

```ts
declare const JobRetryName: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L34)

### JobRetryOutputFor

**Signature**

```ts
declare const JobRetryOutputFor: JobRetryOutputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L35)

### JobRunFor

**Signature**

```ts
declare const JobRunFor: JobRunFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L39)

### JobRunSelector

**Signature**

```ts
declare const JobRunSelector: JobRunSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L36)

### JobSelector

**Signature**

```ts
declare const JobSelector: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L37)

### JobSnapshotFor

**Signature**

```ts
declare const JobSnapshotFor: JobSnapshotFor<Input, Output, Progress, Failure, Fields>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L38)

### JobStreamInput

**Signature**

```ts
declare const JobStreamInput: JobStreamInput<StreamName>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L40)

### JobStreamProcedureContract

**Signature**

```ts
declare const JobStreamProcedureContract: JobStreamProcedureContract<Input, Item, Failure>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L41)

### JobTriggerInput

**Signature**

```ts
declare const JobTriggerInput: JobTriggerInput<Input>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L42)

### JobTriggerInputFor

**Signature**

```ts
declare const JobTriggerInputFor: JobTriggerInputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L43)

### JobTriggerName

**Signature**

```ts
declare const JobTriggerName: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L44)

### JobTriggerOptions

**Signature**

```ts
declare const JobTriggerOptions: JobTriggerOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L46)

### JobTriggerOutputFor

**Signature**

```ts
declare const JobTriggerOutputFor: JobTriggerOutputFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L45)

### JobTriggerSelector

**Signature**

```ts
declare const JobTriggerSelector: JobTriggerSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L47)

### JobWatchFrameFor

**Signature**

```ts
declare const JobWatchFrameFor: JobWatchFrameFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L49)

### JobWatchInput

**Signature**

```ts
declare const JobWatchInput: JobWatchInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L48)

### JobWatchName

**Signature**

```ts
declare const JobWatchName: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L50)

### MemberPresence

**Signature**

```ts
declare const MemberPresence: MemberPresence<Member>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L17)

### SelectedJobField

**Signature**

```ts
declare const SelectedJobField: SelectedJobField<Fields, Field>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/index.ts#L51)

## `job-hooks-support.ts`

### PreparedJobRequest

**Signature**

```ts
declare const PreparedJobRequest: PreparedJobRequest;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks-support.ts#L4)

### generatedJobTriggerName

Recognizes a generated trigger selector without rewriting other route names.

**Signature**

```ts
declare const generatedJobTriggerName: (name: string) => string | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks-support.ts#L70)

### isRecord

Checks whether the existing property-access boundary accepts a supplied value.

**Signature**

```ts
declare const isRecord: (value: unknown) => value is Record<string, unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks-support.ts#L80)

### prepareJobRequest

Binds a transmitted job request to caller identity and explicit receipt authority.

**Signature**

```ts
declare const prepareJobRequest: (
  value: unknown,
  expectedIdentity: ExpectedClientIdentity,
  mutationContext?: object,
) => PreparedJobRequest;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks-support.ts#L15)

### readOperationId

Selects a caller-supplied operation ID from the existing request shape.

**Signature**

```ts
declare const readOperationId: (value: unknown) => string | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks-support.ts#L48)

### readRunId

Selects the existing run identity from a request.

**Signature**

```ts
declare const readRunId: (value: unknown) => string | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks-support.ts#L61)

## `job-hooks-support.types.ts`

Transmitted job input and its operation/run receipt references.

### PreparedJobRequest (interface)

Transmitted job input and its operation/run receipt references.

**Signature**

```ts
export interface PreparedJobRequest {
  readonly value: unknown;
  readonly operationId: string;
  readonly idempotencyKey?: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks-support.types.ts#L2)

## `job-hooks.ts`

### JobMutationOptions

**Signature**

```ts
declare const JobMutationOptions: JobMutationOptions<Output, Failure, Input, Context>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks.ts#L15)

### UseJobRunOptions

**Signature**

```ts
declare const UseJobRunOptions: UseJobRunOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks.ts#L4)

### UseJobRunResult

**Signature**

```ts
declare const UseJobRunResult: UseJobRunResult<Run>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks.ts#L4)

### useJobCancel

**Signature**

```ts
declare const useJobCancel: <Name extends JobCancelName, Context = unknown>(
  name: Name,
  options?: JobMutationOptions<
    JobCancelOutputFor<Name>,
    JobFailureFor<Name>,
    JobCancelInputFor<Name>,
    Context
  >,
) => UseMutationResult<
  JobCancelOutputFor<Name>,
  JobFailureFor<Name>,
  JobCancelInputFor<Name>,
  Context
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks.ts#L16)

### useJobRetry

**Signature**

```ts
declare const useJobRetry: <Name extends JobRetryName, Context = unknown>(
  name: Name,
  options?: JobMutationOptions<
    JobRetryOutputFor<Name>,
    JobFailureFor<Name>,
    JobRetryInputFor<Name>,
    Context
  >,
) => UseMutationResult<
  JobRetryOutputFor<Name>,
  JobFailureFor<Name>,
  JobRetryInputFor<Name>,
  Context
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks.ts#L16)

### useJobRun

Borrows an idle scoped job controller and exposes its frozen external-store state.

**Signature**

```ts
declare const useJobRun: <Name extends JobWatchName>(
  name: Name,
  options?: UseJobRunOptions,
) => UseJobRunResult<JobRunFor<Name>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks.ts#L25)

### useJobTrigger

**Signature**

```ts
declare const useJobTrigger: <Name extends JobTriggerName, Context = unknown>(
  name: Name,
  options?: JobMutationOptions<
    JobTriggerOutputFor<Name>,
    JobFailureFor<Name>,
    JobTriggerInputFor<Name>,
    Context
  >,
) => UseMutationResult<
  JobTriggerOutputFor<Name>,
  JobFailureFor<Name>,
  JobTriggerInputFor<Name>,
  Context
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks.ts#L16)

## `job-hooks.types.ts`

### UseJobRunOptions (interface)

Watch request authority and explicit connection/recovery policy for the declared job.

**Signature**

```ts
export interface UseJobRunOptions extends Omit<
  JobWatchOptions,
  "runId" | "expectedIdentity" | "identityKey" | "applicationId" | "protocolVersion"
> {
  readonly runId?: string;
  readonly enabled?: boolean;
  readonly autoConnect?: boolean;
  readonly expectedIdentity?: ExpectedClientIdentity;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks.types.ts#L6)

### UseJobRunResult (interface)

Frozen job run state plus connection, refetch and disposal controls.

**Signature**

```ts
export interface UseJobRunResult<Run = RunSnapshot> extends JobWatchState<Run> {
  readonly connect: () => Promise<void>;
  readonly disconnect: () => Promise<void>;
  readonly refetch: () => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-hooks.types.ts#L20)

## `job-mutation-hooks.ts`

### JobMutationOptions

**Signature**

```ts
declare const JobMutationOptions: JobMutationOptions<Output, Failure, Input, Context>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-mutation-hooks.ts#L4)

### useJobCancel

Adapts an idempotent job cancellation request into TanStack mutation state.

**Signature**

```ts
declare const useJobCancel: <Name extends JobCancelName, Context = unknown>(
  name: Name,
  options?: JobMutationOptions<
    JobCancelOutputFor<Name>,
    JobFailureFor<Name>,
    JobCancelInputFor<Name>,
    Context
  >,
) => UseMutationResult<
  JobCancelOutputFor<Name>,
  JobFailureFor<Name>,
  JobCancelInputFor<Name>,
  Context
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-mutation-hooks.ts#L114)

### useJobRetry

Adapts an explicit job retry request into TanStack mutation state.

**Signature**

```ts
declare const useJobRetry: <Name extends JobRetryName, Context = unknown>(
  name: Name,
  options?: JobMutationOptions<
    JobRetryOutputFor<Name>,
    JobFailureFor<Name>,
    JobRetryInputFor<Name>,
    Context
  >,
) => UseMutationResult<
  JobRetryOutputFor<Name>,
  JobFailureFor<Name>,
  JobRetryInputFor<Name>,
  Context
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-mutation-hooks.ts#L139)

### useJobTrigger

Adapts a declared job trigger and its pending authority into TanStack mutation state.

**Signature**

```ts
declare const useJobTrigger: <Name extends JobTriggerName, Context = unknown>(
  name: Name,
  options?: JobMutationOptions<
    JobTriggerOutputFor<Name>,
    JobFailureFor<Name>,
    JobTriggerInputFor<Name>,
    Context
  >,
) => UseMutationResult<
  JobTriggerOutputFor<Name>,
  JobFailureFor<Name>,
  JobTriggerInputFor<Name>,
  Context
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-mutation-hooks.ts#L41)

## `job-mutation-hooks.types.ts`

### JobMutationOptions (type alias)

Job mutation options preserving operation identity, retry and TanStack callback inference.

**Signature**

```ts
type JobMutationOptions<Output, Failure, Input, Context> = Omit<
  UseMutationOptions<Output, Failure, Input, Context>,
  "mutationKey" | "mutationFn"
> & { readonly jobId?: string };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-mutation-hooks.types.ts#L10)

## `job-mutation-support.ts`

### controlReferences

Retains the existing run reference in a job control receipt.

**Signature**

```ts
declare const controlReferences: (input: unknown) => { readonly runId?: string };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-mutation-support.ts#L42)

### offline

Reads the browser online hint synchronously without acquiring resources.

**Signature**

```ts
declare const offline: () => boolean;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-mutation-support.ts#L51)

### settlePending

Applies the existing authoritative or unknown receipt settlement policy.

**Signature**

```ts
declare const settlePending: (
  scopeKey: string,
  pending: PendingOperationMetadata,
  error: unknown,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-mutation-support.ts#L29)

### writableScope

Requires ready identity authority before an accepted-work dispatch.

**Signature**

```ts
declare const writableScope: (
  runtime: RelkitClientRuntime,
) => NonNullable<RelkitClientRuntime["scope"]>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/job-mutation-support.ts#L13)

## `keys.ts`

### RelkitJobKeyOptions

**Signature**

```ts
declare const RelkitJobKeyOptions: RelkitJobKeyOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/keys.ts#L2)

### RelkitKeyScope

**Signature**

```ts
declare const RelkitKeyScope: RelkitKeyScope;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/keys.ts#L2)

### relkitJobKey

Constructs the canonical scope-complete job observation or mutation key.

**Signature**

```ts
declare const relkitJobKey: (
  scope: RelkitKeyScope,
  operation: "trigger" | "run" | "cancel" | "retry",
  options: RelkitJobKeyOptions,
  input?: unknown,
) => readonly unknown[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/keys.ts#L42)

### relkitKey

Constructs the canonical scope-complete finite query or mutation key.

**Signature**

```ts
declare const relkitKey: (
  scope: RelkitKeyScope,
  kind: "query" | "mutation" | "stream" | "agent" | "channel",
  procedureId: string,
  input?: unknown,
) => readonly unknown[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/keys.ts#L12)

## `keys.types.ts`

Backend, fingerprint, transport, identity and session boundaries of cached client work.

### RelkitJobKeyOptions (interface)

Run, cursor, named-content and projection fields participating in a job cache key.

**Signature**

```ts
export interface RelkitJobKeyOptions {
  readonly jobId: string;
  readonly runId?: string;
  readonly projection?: string;
  readonly schemaVersion?: string;
  readonly environment?: string;
  readonly jobsProtocolVersion?: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/keys.types.ts#L14)

### RelkitKeyScope (interface)

Backend, fingerprint, transport, identity and session boundaries of cached client work.

**Signature**

```ts
export interface RelkitKeyScope {
  readonly backend: string;
  readonly applicationId: string;
  readonly identityScope: string;
  readonly sessionEpoch: string;
  readonly identityKey: string | null | undefined;
  readonly publicFingerprint: string;
  readonly environment?: string;
  readonly jobsProtocolVersion?: number;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/keys.types.ts#L2)

## `mutation-runtime.ts`

### mutationOperations

Once-acquired submission service at the Promise/React compatibility boundary.

**Signature**

```ts
declare const mutationOperations: MutationOperationsService;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/mutation-runtime.ts#L11)

### mutationRuntime

**Signature**

```ts
declare const mutationRuntime: ManagedRuntime.ManagedRuntime<MutationOperations, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/mutation-runtime.ts#L7)

## `mutation.service.ts`

### MutationOperations (class)

Accepted-work dispatch and authoritative pending settlement contract.

**Signature**

```ts
declare class MutationOperations
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/mutation.service.ts#L11)

### MutationOperationsLive

Acquires accepted-work submission and pending-outcome settlement.

**See**

- tests/compatibility/pending.test.ts for checked metadata and recovery behavior.

**Signature**

```ts
declare const MutationOperationsLive: Layer.Layer<MutationOperations, never, PendingOperations>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/mutation.service.ts#L22)

## `mutation.service.types.ts`

### MutationOperationsService (interface)

Accepted-work submission authority shared by finite and job React adapters.

**Signature**

```ts
export interface MutationOperationsService {
  /** Dispatches accepted work independently of the submitting view lifetime.
   * @param scope - Complete pending receipt isolation scope.
   * @param kind - Existing submission category.
   * @param resource - Declared route or job identity.
   * @param input - Transmitted input retained only in opted-in memory.
   * @param references - Existing receipt references.
   * @param options - Existing idempotency, reuse and retention policy.
   * @param execute - Native server submission boundary.
   * @returns A lazy observed original result or rejection after metadata settlement. */
  readonly submit: (
    scope: string,
    kind: PendingOperationMetadata["kind"],
    resource: string,
    input: unknown,
    references: PendingReferences,
    options: PendingRememberOptions,
    execute: () => PromiseLike<unknown>,
  ) => Effect.Effect<unknown, unknown>;
  /** Applies the existing unknown-outcome policy to receipt metadata.
   * @param scope - Complete pending receipt isolation scope.
   * @param pending - Previously stored metadata.
   * @param error - Original native rejection.
   * @returns A lazy observed metadata update; submission preserves the original rejection. */
  readonly settle: (
    scope: string,
    pending: PendingOperationMetadata,
    error: unknown,
  ) => Effect.Effect<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/mutation.service.types.ts#L5)

## `pending-errors.ts`

### MAX_JOB_INTENTS

**Signature**

```ts
declare const MAX_JOB_INTENTS: 100;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-errors.ts#L1)

### PendingCapacityError (class)

**Signature**

```ts
declare class PendingCapacityError {
  constructor();
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-errors.ts#L3)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_PENDING_CAPACITY"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-errors.ts#L4)

### PendingRecoveryUnavailableError (class)

**Signature**

```ts
declare class PendingRecoveryUnavailableError {
  constructor();
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-errors.ts#L29)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_PENDING_RECOVERY_UNAVAILABLE"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-errors.ts#L30)

### PendingRequestMismatchError (class)

**Signature**

```ts
declare class PendingRequestMismatchError {
  constructor();
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-errors.ts#L16)

### code (property)

**Signature**

```ts
readonly code: "RELKIT_PENDING_REQUEST_MISMATCH"
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-errors.ts#L17)

## `pending-outcome.ts`

### jobUnknownOutcome

Extracts recognized recovery authority without manufacturing successful outcomes.

**Signature**

```ts
declare const jobUnknownOutcome: (value: unknown) => JobUnknownOutcome | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-outcome.ts#L8)

## `pending-store.ts`

### PENDING_PREFIX

**Signature**

```ts
declare const PENDING_PREFIX: "relkit.pending.";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-store.ts#L4)

### clearPendingStorage

Retires all persisted receipt metadata in one complete identity scope.

**Signature**

```ts
declare const clearPendingStorage: (scopeKey: string) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-store.ts#L71)

### pendingEntryKey

Constructs the existing persistence key for one scoped receipt.

**Signature**

```ts
declare const pendingEntryKey: (scopeKey: string, operationId: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-store.ts#L16)

### pendingMemory

**Signature**

```ts
declare const pendingMemory: Map<
  string,
  { readonly metadata: PendingOperationMetadata; readonly request?: unknown }
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-store.ts#L5)

### readPendingStorage

Recovers selectively validated metadata while isolating malformed entries.

**Signature**

```ts
declare const readPendingStorage: (scopeKey: string) => Map<string, PendingOperationMetadata>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-store.ts#L48)

### removePendingStorage

Removes persisted receipt metadata without surfacing unavailable browser storage.

**Signature**

```ts
declare const removePendingStorage: (key: string) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-store.ts#L37)

### writePendingStorage

Persists metadata best-effort without persisting transmitted requests.

**Signature**

```ts
declare const writePendingStorage: (key: string, value: PendingOperationMetadata) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-store.ts#L26)

## `pending-support.ts`

Enumerates only the existing nested public recovery envelopes.

### candidates

Enumerates only the existing nested public recovery envelopes.

**Signature**

```ts
declare const candidates: (value: unknown) => readonly unknown[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-support.ts#L6)

### isRecord

Checks whether the existing property-access boundary accepts a supplied value.

**Signature**

```ts
declare const isRecord: (value: unknown) => value is Record<string, unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending-support.ts#L16)

## `pending.schemas.ts`

### PersistedPendingMetadata

Legacy persisted metadata authority: only operationId was required on recovery.

**Signature**

```ts
declare const PersistedPendingMetadata: Schema.Struct<{ readonly operationId: Schema.String }>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.schemas.ts#L4)

### isPersistedPendingMetadata

Validates the recovery discriminator without stripping other legacy fields.

**Signature**

```ts
declare const isPersistedPendingMetadata: <I>(
  input: I,
) => input is I & { readonly operationId: string };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.schemas.ts#L11)

## `pending.service.ts`

### PendingOperations (class)

Submission receipts, recovery authority and memory-only transmitted requests.

**Signature**

```ts
declare class PendingOperations
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.service.ts#L24)

### pendingOperationsLayer

Acquires pending state once; storage remains a best-effort native persistence edge.

**Example**

```ts
import { Effect, ManagedRuntime } from "effect";
import { PendingOperations, pendingOperationsLayer } from "./pending.service.js";
export async function pendingOwner(): Promise<void> {
  const owner = ManagedRuntime.make(pendingOperationsLayer(new Map()));
  try {
    await owner.runPromise(
      Effect.flatMap(PendingOperations, (service) => service.digest({ input: 1 })),
    );
  } finally {
    await owner.dispose();
  }
}
```

**See**

- packages/client/tests/transport/examples.test.ts for the checked live Layer example.

**Signature**

```ts
declare const pendingOperationsLayer: (
  memory?: Map<string, { readonly metadata: PendingOperationMetadata; readonly request?: unknown }>,
) => Layer.Layer<PendingOperations>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.service.ts#L45)

## `pending.ts`

### PendingCapacityError

**Signature**

```ts
declare const PendingCapacityError: typeof PendingCapacityError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L12)

### PendingRecoveryUnavailableError

**Signature**

```ts
declare const PendingRecoveryUnavailableError: typeof PendingRecoveryUnavailableError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L13)

### PendingRememberOptions

**Signature**

```ts
declare const PendingRememberOptions: PendingRememberOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L10)

### PendingRequestMismatchError

**Signature**

```ts
declare const PendingRequestMismatchError: typeof PendingRequestMismatchError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L14)

### clearPendingOperations

Clears every receipt in an explicitly retired identity scope.

**Signature**

```ts
declare const clearPendingOperations: (scopeKey: string) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L138)

### digestPendingRequest

Hashes the existing canonical transmitted request representation.

**Signature**

```ts
declare const digestPendingRequest: (value: unknown) => Promise<string>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L156)

### forgetPending

Removes memory and best-effort persisted metadata after a known outcome.

**Signature**

```ts
declare const forgetPending: (scopeKey: string, operationId: string) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L95)

### isJobUnknownOutcome

Checks nested public error envelopes for an unknown job outcome.

**Signature**

```ts
declare const isJobUnknownOutcome: (value: unknown) => value is JobUnknownOutcome;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L147)

### jobUnknownOutcome

**Signature**

```ts
declare const jobUnknownOutcome: (value: unknown) => JobUnknownOutcome | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L9)

### matchesPendingRequest

Compares a proposed retry against its recorded transmitted request digest.

**Signature**

```ts
declare const matchesPendingRequest: (
  scopeKey: string,
  operationId: string,
  request: unknown,
) => Promise<boolean>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L125)

### pendingOperations

Merges recovered metadata with newer in-memory values without discarding authority.

**Signature**

```ts
declare const pendingOperations: (scopeKey: string) => readonly PendingOperationMetadata[];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L104)

### pendingRequest

Reads a transmitted request; restored session metadata never recreates input.

**Signature**

```ts
declare const pendingRequest: (scopeKey: string, operationId: string) => unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L114)

### pendingScopeKey

Preserves the complete existing scope serialization used by query and receipt keys.

**Signature**

```ts
declare const pendingScopeKey: (scope: RelkitKeyScope) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L27)

### rememberJobPending

Remembers a job intent and retains its transmitted request only in memory.

**Signature**

```ts
declare const rememberJobPending: (
  scopeKey: string,
  resourceId: string,
  request: unknown,
  options?: PendingRememberOptions,
) => Promise<PendingOperationMetadata>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L63)

### rememberPending

Records a submission before dispatch without persisting its sensitive request.

**Signature**

```ts
declare const rememberPending: (
  scopeKey: string,
  kind: PendingOperationMetadata["kind"],
  resourceId: string,
  value: unknown,
  references?: PendingReferences,
  options?: PendingRememberOptions,
) => Promise<PendingOperationMetadata>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L41)

### updatePending

Updates metadata while preserving a previously retained in-memory request.

**Signature**

```ts
declare const updatePending: (scopeKey: string, value: PendingOperationMetadata) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.ts#L85)

## `pending.types.ts`

### PendingOperationService (interface)

One browser's pending-operation state with isolated live/test implementations.

**Signature**

```ts
export interface PendingOperationService {
  /** Records validated metadata while retaining original input only in opted-in memory.
   * @param scope - Complete application and identity isolation scope.
   * @param kind - Existing submission category.
   * @param resource - Declared job, route or agent key.
   * @param value - Original transmitted request payload.
   * @param references - Existing durable receipt references.
   * @param options - Existing operation identity, reuse and retention policy.
   * @returns Lazy observed metadata creation or the original hashing/capacity failure. */
  readonly remember: (
    scope: string,
    kind: PendingOperationMetadata["kind"],
    resource: string,
    value: unknown,
    references: PendingReferences,
    options: PendingRememberOptions,
  ) => Effect.Effect<PendingOperationMetadata, unknown>;
  /** Replaces persisted metadata without persisting request inputs.
   * @param scope - Complete pending isolation scope.
   * @param value - Existing receipt metadata with its updated outcome.
   * @returns A synchronous observed best-effort metadata update. */
  readonly update: (scope: string, value: PendingOperationMetadata) => Effect.Effect<void>;
  /** Removes one settled receipt and its memory-only request.
   * @param scope - Complete pending isolation scope.
   * @param id - Existing operation identity.
   * @returns A synchronous observed state update. */
  readonly forget: (scope: string, id: string) => Effect.Effect<void>;
  /** Lists metadata using the existing selective persistence validation.
   * @param scope - Complete pending isolation scope.
   * @returns A synchronous observed metadata snapshot. */
  readonly list: (scope: string) => Effect.Effect<readonly PendingOperationMetadata[]>;
  /** Reads opted-in memory input without recovering payloads from persisted metadata.
   * @param scope - Complete pending isolation scope.
   * @param id - Existing operation identity.
   * @returns A synchronous observed original input when retained. */
  readonly request: (scope: string, id: string) => Effect.Effect<unknown>;
  /** Clears receipt metadata and retained memory input for one isolation scope.
   * @param scope - Complete pending isolation scope.
   * @returns A synchronous observed state update. */
  readonly clear: (scope: string) => Effect.Effect<void>;
  /** Checks a request digest against stored receipt metadata.
   * @param scope - Complete pending isolation scope.
   * @param id - Existing operation identity.
   * @param value - Original request payload whose digest is compared.
   * @returns A lazy observed match decision or the original hashing failure. */
  readonly matches: (scope: string, id: string, value: unknown) => Effect.Effect<boolean, unknown>;
  /** Hashes canonical JSON through the existing WebCrypto boundary.
   * @param value - Original payload whose canonical representation is hashed.
   * @returns A lazy observed SHA-256 digest or the original serialization/crypto failure. */
  readonly digest: (value: unknown) => Effect.Effect<string, unknown>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.types.ts#L17)

### PendingReferences (type alias)

References persisted with metadata; transmitted inputs remain memory-only.

**Signature**

```ts
type PendingReferences = Pick<PendingOperationMetadata, "threadId" | "runId">;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.types.ts#L14)

### PendingRememberOptions (interface)

Submission/recovery authority retained from the existing pending API.

**Signature**

```ts
export interface PendingRememberOptions {
  readonly operationId?: string;
  readonly idempotencyKey?: string;
  readonly recovery?: JobUnknownOutcome["recovery"];
  readonly retainRequest?: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/pending.types.ts#L6)

## `procedure.ts`

### ProcedureUtilsLike

**Signature**

```ts
declare const ProcedureUtilsLike: ProcedureUtilsLike;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/procedure.ts#L2)

### procedureCall

Resolves a callable generated procedure using exact selector semantics.

**Signature**

```ts
declare const procedureCall: (
  root: unknown,
  selector: string | readonly string[],
) => (...args: unknown[]) => unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/procedure.ts#L25)

### procedureUtils

Resolves generated TanStack utilities using exact selector semantics.

**Signature**

```ts
declare const procedureUtils: (
  root: unknown,
  selector: string | readonly string[],
) => ProcedureUtilsLike;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/procedure.ts#L10)

### resolveProcedure

Resolves generated paths without changing exact dotted route-key semantics.

**Signature**

```ts
declare const resolveProcedure: (root: unknown, selector: string | readonly string[]) => unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/procedure.ts#L40)

## `procedure.types.ts`

### ProcedureUtilsLike (interface)

Generated TanStack query/mutation options and keys resolved by exact selector.

**Signature**

```ts
export interface ProcedureUtilsLike {
  queryOptions(options: object): object;
  infiniteOptions(options: object): object;
  mutationOptions(options?: object): object;
  queryKey(options?: object): QueryKey;
  infiniteKey(options?: object): QueryKey;
  mutationKey(options?: object): QueryKey;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/procedure.types.ts#L4)

## `realtime-hook.ts`

### ChannelHandlers

**Signature**

```ts
declare const ChannelHandlers: Partial<{
  readonly [Event in keyof EventsFor<Name>]: (payload: EventsFor<Name>[Event]) => void;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.ts#L12)

### UseChannelOptions

**Signature**

```ts
declare const UseChannelOptions: UseChannelOptions<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.ts#L13)

### UseChannelResult

**Signature**

```ts
declare const UseChannelResult: UseChannelResult<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.ts#L14)

### UseRealtimeResult

**Signature**

```ts
declare const UseRealtimeResult: UseRealtimeResult;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.ts#L11)

### useChannel

Borrows one shared channel session and projects ordered frames into React state.

**Signature**

```ts
declare const useChannel: <Name extends ChannelSelector>(
  name: Name,
  options: UseChannelOptions<Name>,
) => UseChannelResult<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.ts#L55)

### useRealtime

Adapts manager status and explicit subscription leases into React's external store.

**Signature**

```ts
declare const useRealtime: () => UseRealtimeResult;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.ts#L30)

## `realtime-hook.types.ts`

### ChannelFor (type alias)

The channel registry entry inferred from its declared name.

**Signature**

```ts
type ChannelFor<Name extends ChannelSelector> = ChannelRegistry[Name];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.types.ts#L10)

### ChannelHandlers (type alias)

Typed handlers keyed by the declared channel's event names.

**Signature**

```ts
type ChannelHandlers<Name extends ChannelSelector> = Partial<{
  readonly [Event in keyof EventsFor<Name>]: (payload: EventsFor<Name>[Event]) => void;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.types.ts#L50)

### ChannelState (interface)

Current checkpoint, connection status, events and presence projection.

**Signature**

```ts
export interface ChannelState {
  readonly status: RealtimeStatus;
  readonly checkpoint?: ChannelCheckpoint;
  readonly caughtUp: boolean;
  readonly gap?: string;
  readonly presence?: unknown;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.types.ts#L66)

### EventsFor (type alias)

Event payloads inferred from the declared channel.

**Signature**

```ts
type EventsFor<Name extends ChannelSelector> =
  ChannelFor<Name> extends { readonly events: infer Events } ? Events : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.types.ts#L23)

### ParamsFor (type alias)

Channel parameter input inferred from the declared channel.

**Signature**

```ts
type ParamsFor<Name extends ChannelSelector> =
  ChannelFor<Name> extends { readonly params: infer Params } ? Params : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.types.ts#L16)

### PresenceFor (type alias)

Presence state inferred from the declared channel.

**Signature**

```ts
type PresenceFor<Name extends ChannelSelector> =
  ChannelFor<Name> extends { readonly presence: infer Presence } ? Presence : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.types.ts#L30)

### UseChannelOptions (interface)

Channel parameters and current-view event handlers.

**Signature**

```ts
export interface UseChannelOptions<Name extends ChannelSelector> {
  readonly params: ParamsFor<Name>;
  readonly on?: ChannelHandlers<Name>;
  readonly onCaughtUp?: () => void | Promise<void>;
  readonly onGap?: (reason: string) => void | Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.types.ts#L58)

### UseChannelResult (type alias)

Typed channel projection and explicit realtime controls.

**Signature**

```ts
type UseChannelResult<Name extends ChannelSelector> = Omit<ChannelState, "presence"> &
  ([PresenceFor<Name>] extends [never] ? {} : { readonly presence: PresenceFor<Name> });
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.types.ts#L78)

### UseRealtimeResult (interface)

Realtime connection state with explicit channel observer controls.

**Signature**

```ts
export interface UseRealtimeResult {
  readonly status: RealtimeStatus;
  readonly subscribe: <Name extends ChannelSelector>(
    name: Name,
    params: ParamsFor<Name>,
    listener: (frame: RealtimeFrame) => void,
  ) => () => void;
  readonly bind: UseRealtimeResult["subscribe"];
  readonly unbind: (unsubscribe: () => void) => void;
  readonly unsubscribe: (unsubscribe: () => void) => void;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-hook.types.ts#L34)

## `realtime-manager.ts`

### RealtimeFrame

**Signature**

```ts
declare const RealtimeFrame: RealtimeFrame;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.ts#L7)

### RealtimeManager (class)

Synchronous external-store adapter over one scoped realtime session owner.

**Signature**

```ts
declare class RealtimeManager {
  constructor(
    client: unknown,
    identity?: Pick<ClientIdentityDocument, "identityScope" | "sessionEpoch">,
  );
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.ts#L11)

### subscribe (method)

Borrows a shared channel without letting one observer close another's request.

**Signature**

```ts
declare const subscribe: (
  channel: string,
  params: unknown,
  listener: (frame: RealtimeFrame) => void,
  statusListener?: (status: RealtimeStatus) => void,
) => () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.ts#L53)

### listenStatus (method)

Subscribes to manager status changes for React's synchronous external store.

**Signature**

```ts
declare const listenStatus: (listener: () => void) => () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.ts#L73)

### dispose (method)

Initiates disposal synchronously; close joins native iterator cleanup.

**Signature**

```ts
declare const dispose: () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.ts#L81)

### close (method)

Joins the manager's finalization, including pending native pulls and retries.

**Signature**

```ts
declare const close: () => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.ts#L91)

### RealtimeStatus

**Signature**

```ts
declare const RealtimeStatus: RealtimeStatus;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.ts#L7)

### realtimeSubscriptionKey

**Signature**

```ts
declare const realtimeSubscriptionKey: (channel: string, params: unknown) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.ts#L8)

## `realtime-manager.types.ts`

### RealtimeFrame (type alias)

Public channel frames retained without changing wire schemas.

**Signature**

```ts
type RealtimeFrame =
  | {
      readonly kind: "event";
      readonly event: string;
      readonly payload: unknown;
      readonly checkpoint: ChannelCheckpoint;
    }
  | { readonly kind: "caught-up"; readonly checkpoint: ChannelCheckpoint }
  | { readonly kind: "gap"; readonly reason: string; readonly checkpoint: ChannelCheckpoint }
  | { readonly kind: "presence"; readonly presence: PresenceSnapshot };
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.types.ts#L8)

### RealtimeSessionService (interface)

Realtime state and scoped workflows supplied by live and test Layers.

**Signature**

```ts
export interface RealtimeSessionService {
  readonly feeds: Map<string, SharedSubscription>;
  readonly statusListeners: Set<() => void>;
  /** Reads the current pure external-store status.
   * @returns A synchronous state read without native acquisition. */
  readonly snapshot: () => Effect.Effect<RealtimeStatus>;
  /** Registers a manager-local view over a complete-key scoped native connection.
   * @param channel - Declared channel key.
   * @param params - Complete native channel parameters.
   * @param listener - Isolated synchronous frame publication.
   * @param statusListener - Optional isolated lifecycle publication.
   * @returns A synchronous registration Effect yielding independently releasable view ownership. */
  readonly subscribe: (
    channel: string,
    params: unknown,
    listener: (frame: RealtimeFrame) => void,
    statusListener?: (status: RealtimeStatus) => void,
  ) => Effect.Effect<Effect.Effect<void>>;
  /** Initiates cancellation of all scoped native connections and resets idle state.
   * @returns A synchronous cancellation request; owner closure joins native workers. */
  readonly stop: () => Effect.Effect<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.types.ts#L30)

### RealtimeStatus (type alias)

Existing realtime external-store states.

**Signature**

```ts
type RealtimeStatus = "idle" | "connecting" | "connected" | "stale" | "error";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.types.ts#L5)

### SharedSubscription (interface)

One connection shared inside its manager's authorization identity.

**Signature**

```ts
export interface SharedSubscription {
  readonly controller: AbortController;
  readonly listeners: Set<(frame: RealtimeFrame) => void>;
  readonly statusListeners: Set<(status: RealtimeStatus) => void>;
  status: RealtimeStatus;
  checkpoint?: ChannelCheckpoint;
  fiber?: Fiber.Fiber<void, unknown>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-manager.types.ts#L20)

## `realtime-session-key.ts`

Constructs a manager-local sharing key without losing parameter distinctions.

### realtimeSubscriptionKey

Constructs a manager-local sharing key without losing parameter distinctions.

**Signature**

```ts
declare const realtimeSubscriptionKey: (channel: string, params: unknown) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-session-key.ts#L7)

## `realtime-session.service.ts`

### RealtimeSessions (class)

One manager's sharing registry, checkpoints and reconnect workers.

**Signature**

```ts
declare class RealtimeSessions
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-session.service.ts#L15)

### realtimeSessionsLayer

Acquires one synchronous registry with scoped, lazy native workers.

**Example**

```ts
import { ManagedRuntime } from "effect";
import { runExecutionSync } from "@relkit/contracts/operation";
import { RealtimeSessions, realtimeSessionsLayer } from "./realtime-session.service.js";
export async function realtimeOwner(): Promise<void> {
  const owner = ManagedRuntime.make(realtimeSessionsLayer({}));
  try {
    const sessions = runExecutionSync(owner, RealtimeSessions);
  } finally {
    await owner.dispose();
  }
}
```

**See**

- packages/client/tests/transport/examples.test.ts for the checked live Layer example.

**Signature**

```ts
declare const realtimeSessionsLayer: (
  client: unknown,
  identity?: Pick<ClientIdentityDocument, "identityScope" | "sessionEpoch">,
) => Layer.Layer<RealtimeSessions>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/realtime-session.service.ts#L37)

## `registry.ts`

Augmentable application registry of exact procedure contracts.

### "./registry.types.js" (namespace export)

Re-exports all named exports from the "./registry.types.js" module.

**Signature**

```ts
export * from "./registry.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.ts#L18)

### AgentRegistry (interface)

Augmentable application registry of declared agent contracts.

**Signature**

```ts
export interface AgentRegistry {}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.ts#L16)

### ChannelRegistry (interface)

Augmentable application registry of declared channel contracts.

**Signature**

```ts
export interface ChannelRegistry {}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.ts#L11)

### ClientRegistry (interface)

Augmentable application registry of exact procedure contracts.

**Signature**

```ts
export interface ClientRegistry {}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.ts#L6)

## `registry.types.ts`

### AgentSelector (type alias)

String keys of the declared agent registry.

**Signature**

```ts
type AgentSelector = Extract<keyof AgentRegistry, string>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L129)

### ChannelSelector (type alias)

String keys of the declared channel registry.

**Signature**

```ts
type ChannelSelector = Extract<keyof ChannelRegistry, string>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L124)

### ClientAgentContract (interface)

Generated agent declaration preserving execution, payload and control capabilities.

**Signature**

```ts
export interface ClientAgentContract<
  Input = unknown,
  Output = unknown,
  Controls extends string = never,
  Chat extends boolean = false,
  Resume = never,
  Tool = never,
  PublicState = Readonly<Record<never, never>>,
  CustomEvent = never,
  Scope = ClientAgentDynamic,
  Waiting = never,
> {
  readonly input: Input;
  readonly output: Output;
  readonly controls: Controls;
  readonly chat: Chat;
  readonly resume: Resume;
  readonly tool: Tool;
  readonly publicState: PublicState;
  readonly customEvent: CustomEvent;
  readonly scope: Scope;
  readonly waiting: Waiting;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L89)

### ClientAgentDynamic (interface)

Dynamic agent capability marker retaining the existing broad compatibility contract.

**Signature**

```ts
export interface ClientAgentDynamic {
  readonly kind: "dynamic";
  readonly data: unknown;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L116)

### ClientChannelContract (interface)

Generated channel declaration preserving params, event and presence inference.

**Signature**

```ts
export interface ClientChannelContract<
  Params = unknown,
  Events extends Readonly<Record<string, unknown>> = Readonly<Record<string, unknown>>,
  Presence = never,
> {
  readonly params: Params;
  readonly events: Events;
  readonly presence: Presence;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L66)

### ClientRouteContract (interface)

Generated finite route declaration preserving payload and failure inference.

**Signature**

```ts
export interface ClientRouteContract<
  Input = unknown,
  Output = unknown,
  Failure = globalThis.Error,
> {
  readonly input: Input;
  readonly output: Output;
  readonly error: Failure;
  readonly operation: "query" | "mutation";
  readonly stream: false;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L9)

### ClientSelector (type alias)

String keys of the declared procedure registry.

**Signature**

```ts
type ClientSelector = Extract<keyof ClientRegistry, string>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L134)

### ClientStreamContract (interface)

Generated route stream declaration preserving item and failure inference.

**Signature**

```ts
export interface ClientStreamContract<Input = unknown, Item = unknown, Failure = globalThis.Error> {
  readonly input: Input;
  readonly output: AsyncIterable<Item>;
  readonly item: Item;
  readonly error: Failure;
  readonly operation: "query" | "mutation";
  readonly stream: true;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L27)

### ContractFor (type alias)

Looks up one exact application procedure contract.

**Signature**

```ts
type ContractFor<Name extends ClientSelector> = ClientRegistry[Name];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L172)

### ErrorFor (type alias)

Infers the declared failure of one exact application procedure.

**Signature**

```ts
type ErrorFor<Name extends ClientSelector> =
  ContractFor<Name> extends {
    readonly error: infer Error;
  }
    ? Error
    : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L200)

### FiniteSelector (type alias)

Declared procedure keys whose result is finite.

**Signature**

```ts
type FiniteSelector = {
  [Name in ClientSelector]: ClientRegistry[Name] extends { readonly stream: false } ? Name : never;
}[ClientSelector];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L139)

### InputFor (type alias)

Infers the input of one exact application procedure.

**Signature**

```ts
type InputFor<Name extends ClientSelector> =
  ContractFor<Name> extends {
    readonly input: infer Input;
  }
    ? Input
    : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L178)

### ItemFor (type alias)

Infers the item payload of one exact application stream.

**Signature**

```ts
type ItemFor<Name extends StreamSelector> =
  ContractFor<Name> extends {
    readonly item: infer Item;
  }
    ? Item
    : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L211)

### JobCancelInput

**Signature**

```ts
declare const JobCancelInput: JobCancelInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L39)

### JobClientField

**Signature**

```ts
declare const JobClientField: JobClientField;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L38)

### JobContract

**Signature**

```ts
declare const JobContract: JobContract<
  Name,
  JobId,
  Input,
  Output,
  Failure,
  Progress,
  Streams,
  Operations,
  Fields
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L37)

### JobFor

**Signature**

```ts
declare const JobFor: JobFor<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L40)

### JobGetInput

**Signature**

```ts
declare const JobGetInput: JobGetInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L41)

### JobListInput

**Signature**

```ts
declare const JobListInput: JobListInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L43)

### JobListQuery

**Signature**

```ts
declare const JobListQuery: JobListQuery;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L42)

### JobProcedureContract

**Signature**

```ts
declare const JobProcedureContract: JobProcedureContract<Input, Output, Failure>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L45)

### JobProcedureSelector

**Signature**

```ts
declare const JobProcedureSelector: JobProcedureSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L44)

### JobRegistry

**Signature**

```ts
declare const JobRegistry: JobRegistry;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L46)

### JobRetryInput

**Signature**

```ts
declare const JobRetryInput: JobRetryInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L47)

### JobRunSelector

**Signature**

```ts
declare const JobRunSelector: JobRunSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L48)

### JobSelector

**Signature**

```ts
declare const JobSelector: never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L49)

### JobSnapshotFor

**Signature**

```ts
declare const JobSnapshotFor: JobSnapshotFor<Input, Output, Progress, Failure, Fields>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L50)

### JobStreamInput

**Signature**

```ts
declare const JobStreamInput: JobStreamInput<StreamName>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L51)

### JobStreamProcedureContract

**Signature**

```ts
declare const JobStreamProcedureContract: JobStreamProcedureContract<Input, Item, Failure>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L52)

### JobTriggerInput

**Signature**

```ts
declare const JobTriggerInput: JobTriggerInput<Input>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L53)

### JobTriggerOptions

**Signature**

```ts
declare const JobTriggerOptions: JobTriggerOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L54)

### JobTriggerSelector

**Signature**

```ts
declare const JobTriggerSelector: JobTriggerSelector<Name>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L55)

### JobWatchInput

**Signature**

```ts
declare const JobWatchInput: JobWatchInput;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L56)

### MutationSelector (type alias)

Declared finite mutation procedure keys.

**Signature**

```ts
type MutationSelector = {
  [Name in FiniteSelector]: ClientRegistry[Name] extends { readonly operation: "mutation" }
    ? Name
    : never;
}[FiniteSelector];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L155)

### OutputFor (type alias)

Infers the successful output of one exact application procedure.

**Signature**

```ts
type OutputFor<Name extends ClientSelector> =
  ContractFor<Name> extends {
    readonly output: infer Output;
  }
    ? Output
    : never;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L189)

### QuerySelector (type alias)

Declared finite query procedure keys.

**Signature**

```ts
type QuerySelector = {
  [Name in FiniteSelector]: ClientRegistry[Name] extends { readonly operation: "query" }
    ? Name
    : never;
}[FiniteSelector];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L146)

### SelectedJobField

**Signature**

```ts
declare const SelectedJobField: SelectedJobField<Fields, Field>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L57)

### StreamSelector (type alias)

Declared procedure keys whose result is streamed.

**Signature**

```ts
type StreamSelector = {
  [Name in ClientSelector]: ClientRegistry[Name] extends { readonly stream: true } ? Name : never;
}[ClientSelector];
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/registry.types.ts#L164)

## `stream-hook.ts`

### StreamState

**Signature**

```ts
declare const StreamState: StreamState<Item, Error>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream-hook.ts#L4)

### UseStreamResult

**Signature**

```ts
declare const UseStreamResult: UseStreamResult<Input, Item, Error>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream-hook.ts#L4)

### useStream

Adapts a declared scoped stream into React state and explicit cancellation controls.

**Signature**

```ts
declare const useStream: <Name extends StreamSelector>(
  name: Name,
  options?: { readonly autoStart?: boolean; readonly input?: InputFor<Name> },
) => UseStreamResult<InputFor<Name>, ItemFor<Name>, ErrorFor<Name>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream-hook.ts#L19)

## `stream-hook.types.ts`

Current stream lifecycle, latest item, retained item history and original failure.

### StreamState (interface)

Current stream lifecycle, latest item, retained item history and original failure.

**Signature**

```ts
export interface StreamState<Item, Error> {
  readonly status: "idle" | "starting" | "streaming" | "completed" | "cancelled" | "error";
  readonly items: readonly Item[];
  readonly error?: Error;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream-hook.types.ts#L6)

### UseStreamResult (interface)

Typed stream state with explicit start and cancellation controls.

**Signature**

```ts
export interface UseStreamResult<Input, Item, Error> extends StreamState<Item, Error> {
  readonly start: (input: Input) => Promise<void>;
  readonly cancel: () => void;
  readonly reset: () => void;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream-hook.types.ts#L18)

## `stream-runtime.ts`

### clientStreams

Once-acquired stream service whose call fibers own all native requests.

**Signature**

```ts
declare const clientStreams: ClientStreamService;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream-runtime.ts#L8)

### streamRuntime

**Signature**

```ts
declare const streamRuntime: ManagedRuntime.ManagedRuntime<ClientStreams, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream-runtime.ts#L6)

## `stream.service.ts`

### ClientStreams (class)

Arbitrary declared procedure observation lifetime, independent of React.

**Signature**

```ts
declare class ClientStreams
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream.service.ts#L8)

### ClientStreamsLive

Supplies declared procedure streams with scoped native pulls.

**See**

- tests/transport/native.test.ts for checked pending-pull cancellation at the Bun boundary.

**Signature**

```ts
declare const ClientStreamsLive: Layer.Layer<ClientStreams, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream.service.ts#L17)

## `stream.service.types.ts`

### ClientStreamService (interface)

Declared procedure observation with borrowed external-store callbacks.

**Signature**

```ts
export interface ClientStreamService {
  /** Owns declared native pulls and external-store publication until cancellation.
   * @param client - Borrowed generated transport.
   * @param name - Exact declared procedure key.
   * @param input - Original request payload.
   * @param signal - View lifetime propagated to the native transport.
   * @param opened - Synchronous establishment publication.
   * @param publish - Isolated synchronous item publication.
   * @returns A lazy scoped observation preserving native errors and joining cleanup. */
  readonly consume: (
    client: unknown,
    name: string,
    input: unknown,
    signal: AbortSignal,
    opened: () => void,
    publish: (item: unknown) => void,
  ) => Effect.Effect<void, unknown>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/stream.service.types.ts#L3)

## `view-owner.ts`

Retains an owner across React's synchronous development cleanup/setup replay.

### borrowViewOwner

Retains an owner across React's synchronous development cleanup/setup replay.

**Signature**

```ts
declare const borrowViewOwner: (
  owner: object,
  close: () => void,
  leases: WeakMap<object, object>,
) => () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/view-owner.ts#L10)

## `write-error.ts`

### RelkitWriteError (class)

**Signature**

```ts
declare class RelkitWriteError { constructor(
    readonly outcome: "not-sent" | "unknown",
    message: string,
  ) }
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/react/write-error.ts#L1)

## `server-context.ts`

Implements the opt-in Bun server query context and identity-bound hydration.
Install @orpc/tanstack-query@2.0.0-beta.31 and @tanstack/query-core@^5 alongside

### CreateRelkitServerContextOptions

**Signature**

```ts
declare const CreateRelkitServerContextOptions: CreateRelkitServerContextOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/server-context.ts#L16)

### RelkitServerContext

**Signature**

```ts
declare const RelkitServerContext: RelkitServerContext;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/server-context.ts#L17)

### RelkitServerHydrationState

**Signature**

```ts
declare const RelkitServerHydrationState: RelkitServerHydrationState;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/server-context.ts#L18)

### createRelkitServerContext

Forwards request identity into a server client and scope-bound hydration state.

**Signature**

```ts
declare const createRelkitServerContext: (
  options: CreateRelkitServerContextOptions,
) => Promise<RelkitServerContext>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/server-context.ts#L26)

## `server-context.types.ts`

Describes server query hydration using query-core types alone. The React
provider accepts this structural hydration result without making its own
declarations part of the server integration's dependency graph.

### CreateRelkitServerContextOptions (interface)

Server request, backend and query-client configuration for one hydration context.

**Signature**

```ts
export interface CreateRelkitServerContextOptions {
  readonly baseUrl: string;
  readonly request: Request;
  readonly queryClient: QueryClient;
  readonly identityKey?: string | null;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/server-context.types.ts#L22)

### RelkitServerContext (interface)

Typed finite client, TanStack utilities and dehydrated server query state.

**Signature**

```ts
export interface RelkitServerContext {
  readonly client: ReturnType<typeof createClient<DefaultContract>>;
  readonly utils: ReturnType<typeof createTanstackQueryUtils<RelkitServerContext["client"]>>;
  readonly identity: ClientIdentityDocument;
  readonly dehydrate: () => RelkitServerHydrationState;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/server-context.types.ts#L30)

### RelkitServerHydrationState (interface)

Identity-bound query snapshot accepted by the React provider on hydration.

**Signature**

```ts
export interface RelkitServerHydrationState {
  /** Backend, application and session authority attached to the cached data. */
  readonly scope: RelkitKeyScope;
  /** Native query-core snapshot, preserving query and mutation metadata. */
  readonly dehydrated: DehydratedState;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/server-context.types.ts#L14)

## `server.ts`

Adds request-time tracing to the Bun server transport without loading frontend
bindings. TanStack hydration is exposed by @relkit/client/server/tanstack-query
and requires that integration's documented frontend peers.

### createServerClient

Bun server client with operation-time W3C propagation. Response bodies remain untouched.

**Signature**

```ts
declare const createServerClient: <Contract extends RouterContract = RouterContract>(
  options: CreateClientOptions,
) => RouterContractClient<Contract>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/server.ts#L18)

## `tanstack-query.ts`

Reexports oRPC's query adapter without adding it to the transport dependency
graph. Install @orpc/tanstack-query@2.0.0-beta.31 and @tanstack/query-core@^5
alongside @relkit/client when selecting this entrypoint.

### TanstackQueryOperationContext

**Signature**

```ts
declare const TanstackQueryOperationContext: OperationContext;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/tanstack-query.ts#L7)

### createTanstackQueryUtils

**Signature**

```ts
declare const createTanstackQueryUtils: <T extends AnyNestedClient>(
  client: T,
  options?: NoInfer<RouterUtilsOptions<T>>,
) => RouterUtils<T>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/tanstack-query.ts#L6)

## `transport-native.ts`

### httpLink

Builds the native HTTP oRPC link with lazy headers and owned iterator cancellation.

**Signature**

```ts
declare const httpLink: (options: CreateClientOptions) => RPCLink<Record<PropertyKey, unknown>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport-native.ts#L20)

### webSocketEndpoint

Resolves the RPC WebSocket endpoint and canonical agent capability query.

**Signature**

```ts
declare const webSocketEndpoint: (baseUrl: string) => URL;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport-native.ts#L96)

### webSocketLink

Builds the native oRPC WebSocket link while retaining SDK reconnect ownership.

**Signature**

```ts
declare const webSocketLink: (
  options: CreateWebSocketClientOptions,
  Socket: typeof WebSocket,
  connect?: () => Promise<WebSocket>,
) => WebSocketRPCLink<Record<PropertyKey, unknown>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport-native.ts#L74)

## `transport-socket.ts`

### connectSocket

Establishes a socket through an interruptible Clock deadline and native callback.

**Signature**

```ts
declare const connectSocket: (
  Socket: typeof WebSocket,
  endpoint: URL,
  timeoutMs: number,
) => Promise<WebSocket>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport-socket.ts#L12)

### connectSocketEffect

Owns establishment callbacks until socket ownership transfers to oRPC.

**Signature**

```ts
declare const connectSocketEffect: (
  Socket: {
    new (url: string | URL, options?: Bun.WebSocketOptions): WebSocket;
    new (url: string | URL, protocols?: string | string[]): WebSocket;
    prototype: WebSocket;
    readonly CONNECTING: 0;
    readonly OPEN: 1;
    readonly CLOSING: 2;
    readonly CLOSED: 3;
  },
  endpoint: URL,
  timeoutMs: number,
) => Effect.Effect<WebSocket, unknown, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport-socket.ts#L27)

## `transport.service.ts`

### ClientTransport (class)

Configured transport selection and invocation authority, without server dependencies.

**Signature**

```ts
declare class ClientTransport
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport.service.ts#L10)

### clientTransportLayer

Acquires one link owner with a lazy, shared transport-selection decision.

**Example**

```ts
import { Effect, ManagedRuntime } from "effect";
import { runExecutionSync } from "@relkit/contracts/operation";
import { ClientTransport, clientTransportLayer } from "./transport.service.js";
export async function transportOwner(): Promise<void> {
  const owner = ManagedRuntime.make(clientTransportLayer(Effect.succeed({ call: async () => 1 })));
  try {
    const transport = runExecutionSync(owner, ClientTransport);
  } finally {
    await owner.dispose();
  }
}
```

**See**

- packages/client/tests/transport/examples.test.ts for executable ownership examples.

**Signature**

```ts
declare const clientTransportLayer: (
  select: Effect.Effect<TransportLink, unknown, Scope.Scope>,
) => Layer.Layer<ClientTransport>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport.service.ts#L33)

### selectAutoTransport

Selects WebSocket once, falling back only when initial establishment fails.

**Signature**

```ts
declare const selectAutoTransport: (
  options: CreateAutoClientOptions,
) => Effect.Effect<
  RPCLink<Record<PropertyKey, unknown>> | RPCLink<Record<PropertyKey, unknown>>,
  never,
  Scope.Scope
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport.service.ts#L79)

## `transport.ts`

### createClient

Creates the generated contract's synchronous HTTP proxy with a configured service owner.

**Example**

```ts
import { createClient } from "@relkit/client";
export const makeClient = () => createClient({ baseUrl: "http://127.0.0.1:3000" });
```

**Signature**

```ts
declare const createClient: <Contract extends RouterContract = RouterContract>(
  options: CreateClientOptions,
) => RouterContractClient<Contract>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport.ts#L28)

Since v0.1.0

### createAutoClient

Creates a lazy proxy whose first transport choice is shared by concurrent calls.

**Signature**

```ts
declare const createAutoClient: <Contract extends RouterContract = RouterContract>(
  options: CreateAutoClientOptions,
) => RouterContractClient<Contract>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport.ts#L54)

### createWebSocketClient

Creates a synchronous lazy WebSocket proxy, retaining constructor availability errors.

**Signature**

```ts
declare const createWebSocketClient: <Contract extends RouterContract = RouterContract>(
  options: CreateWebSocketClientOptions,
) => RouterContractClient<Contract>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport.ts#L40)

## `transport.types.ts`

### ClientTransportService (interface)

One configured link-selection and invocation owner.

**Signature**

```ts
export interface ClientTransportService {
  /** Selects the owned link and invokes one declared procedure.
   * @param path - Exact generated procedure path segments.
   * @param input - Original request payload passed to the native link.
   * @param options - Existing oRPC context, cancellation and request options.
   * @returns A lazy observed invocation preserving the native result and error identity. */
  readonly invoke: (
    path: string[],
    input: unknown,
    options: ClientOptions<TransportContext>,
  ) => Effect.Effect<unknown, unknown>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport.types.ts#L8)

### TransportContext (type alias)

Existing oRPC context retained without translating native error objects.

**Signature**

```ts
type TransportContext = Record<PropertyKey, unknown>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport.types.ts#L5)

### TransportLink (type alias)

Native link dependency supplied at transport acquisition.

**Signature**

```ts
type TransportLink = ClientLink<TransportContext>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/client/src/transport.types.ts#L22)
