INNER CODE UNIT · TypeScript

Caura

caura-ai/caura · clients/typescript/src/index.ts:178

export class Caura {
  readonly tenantId: string;
  readonly agentId?: string;
  private readonly baseUrl: string;
  private readonly timeoutMs: number;
  private readonly headers: Record<string, string>;
  private readonly fetchImpl: typeof globalThis.fetch;

  constructor(apiKey: string, options: CauraOptions) {
    if (!apiKey) throw new Error("apiKey is required");
    if (!options || !options.tenantId) throw new Error("tenantId is required");
    this.tenantId = options.tenantId;
    this.agentId = options.agentId;
    this.baseUrl = (options.baseUrl ?? DEFAULT_BASE_URL).replace(/\/$/, "");
    assertKeyTransportAllowed(this.baseUrl, options.allowInsecureHttp);
    this.timeoutMs = options.timeoutMs ?? 30000;
    this.headers = {
      "X-API-Key": apiKey,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…