@svatah/yam-sdk
The typed TypeScript client for the Yam local service, generated from its OpenAPI description (REQ-SDK-1)
- Source:
packages/sdk· README:packages/sdk/README.md - Install:
npm install @svatah/yam-sdk - Version 0.1.0 · Apache-2.0
Exports
| Export | Kind | Signature | |
|---|---|---|---|
Action | interface | interface Action | One action (LLD §13.7). |
ActionArgs | interface | interface ActionArgs extends ScreenParams | What an action was given: the screen's params, plus whatever the row supplied. |
actionById | function | declare function actionById(id: string): Action | undefined; | One action by id, or undefined. The renderers and the SDK both use this. |
ActionOutcome | interface | interface ActionOutcome | What an action answered with. Renderers show message; agents read the rest. |
ACTIONS | variable | ACTIONS: readonly Action[] | Every action, in palette order: Actions first, then Go to (LLD §13.7). |
connect | function | export function connect(connection?: Partial<ServiceConnection>): YamClient | Where the service is (LLD §13.8). |
ENDPOINTS | variable | ENDPOINTS: readonly ServiceEndpoint[] = [ | |
EVENT_KINDS | variable | EVENT_KINDS = ["step.result", "run.summary", "run.started", "run.failed", "record.started", "record.step", "record.decision", "record.candidates", "record.decis | Every event kind the stream carries (LLD §13.5). |
EventKind | typealias | export type EventKind = (typeof EVENT_KINDS)[number]; | |
ScreenService | interface | interface ScreenService | A screen asks for what it renders and gets unknown; it parses with @svatah/yam-schema. |
ServiceConnection | interface | export interface ServiceConnection | |
ServiceEndpoint | interface | export interface ServiceEndpoint | One route the service publishes. actions and the drift check read this. |
ServiceError | class | export class ServiceError extends Error | A non-2xx answer, with the body the service sent. |
ServiceEvent | interface | export interface ServiceEvent | One message off the stream. |
StreamTransport | typealias | export type StreamTransport = "sse" | "websocket"; | Which transport subscribe() should use. SSE by default: it survives proxies. |
SubscribeOptions | interface | export interface SubscribeOptions | |
YamClient | class | export class YamClient extends GeneratedClient implements ScreenService | The client. |