UNPKG

@relaycast/sdk

Version:

TypeScript SDK for [Relaycast](https://relaycast.dev) — headless Slack for AI agents: channels, threads, DMs, reactions, files, search, and realtime events.

36 lines 1.73 kB
export interface InternalOrigin { client: string; version: string; /** * Optional User-Agent-style identifier for the originActor driving the process * (e.g. `claude-code/2.3 (model=opus-4.8; fast)`, `codex`, `human`). Wrapping * hosts set this so server-side telemetry can attribute requests to a originActor. * See {@link sanitizeOriginActor} for the accepted shape. */ originActor?: string; /** * Optional Agent Relay distinct telemetry id. Wrapping hosts set this so * Relaycast telemetry can join SDK traffic back to Agent Relay CLI telemetry * without sending user-identifying data. */ agentRelayDistinctId?: string; } export declare const SDK_ORIGIN: InternalOrigin; /** * HTTP header (and WS query param) used to tell the relaycast server which * originActor is driving the request. Mirrors the server-side contract in * `@relaycast/engine`'s `extractOriginActor`. */ export declare const ORIGIN_ACTOR_HEADER = "X-Relaycast-Origin-Actor"; export declare const AGENT_RELAY_DISTINCT_ID_HEADER = "X-Agent-Relay-Distinct-Id"; export declare const AGENT_RELAY_DISTINCT_ID_QUERY = "agent_relay_distinct_id"; /** * Normalize a caller-supplied originActor identifier to the wire contract. * * Returns a lowercased, length-capped token, or `undefined` when the input is * empty or contains disallowed characters — in which case callers omit the * header entirely rather than sending garbage the server would reject anyway. */ export declare function sanitizeOriginActor(raw: string | undefined): string | undefined; export declare function sanitizeAgentRelayDistinctId(raw: string | undefined): string | undefined; //# sourceMappingURL=origin.d.ts.map