Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

976 B
Raw Blame
export interface OvHttpConfig {
  baseUrl?: string;
  endpoint?: string;
  apiKey?: string;
  account?: string;
  user?: string;
  sendIdentityHeaders?: boolean;
  userAgent?: string;
  [key: string]: unknown;
}

export interface OvHttpRequestOptions {
  timeoutMs?: number;
  actorPeerId?: string;
}

export interface OvHttpEnvelope {
  ok: boolean;
  status: number;
  result: any;
  error?: any;
  traceId?: string;
}

export function buildOvHeaders(
  cfg?: OvHttpConfig,
  options?: {
    actorPeerId?: string;
    identityHeaders?: boolean;
    extraHeaders?: Record<string, string>;
  },
): Record<string, string>;

export function createOvHttp(
  cfg?: OvHttpConfig,
  options?: {
    defaultTimeoutMs?: number;
    resolveActorPeerId?: () => string;
    identityHeaders?: boolean;
    extraHeaders?: Record<string, string>;
    requireJsonBody?: boolean;
  },
): (
  path: string,
  init?: RequestInit,
  options?: OvHttpRequestOptions,
) => Promise<OvHttpEnvelope>;