cavi-ai/
@cavi-ai/api-clientv0.11.0 stable
GitHub ↗

@cavi-ai/api-client/extensions/cavi

Package subpath: ./extensions/cavi

AgentMemoryFile

Kind: type

ts
export type AgentMemoryFile = {
    filename: string;
    content: string;
    lastModified: number;
};

AgentMemorySnapshot

Kind: type

ts
export type AgentMemorySnapshot = {
    agentId: string;
    activeFiles: AgentMemoryFile[];
    journalCount: number;
    lastJournalDate: string | null;
};

appendCaviApiPath

Kind: function

ts
export declare function appendCaviApiPath(basePath: string, relativePath?: string | null, options?: CaviApiPathAppendOptions): string;

appendHttpQuery

Kind: function

ts
export declare function appendHttpQuery(path: string, query?: Record<string, string | number | boolean | undefined>): string;

backfillCanonicalTeam

Kind: function

ts
export declare function backfillCanonicalTeam(team: TeamRegistryTeamConfig): OperatorRegistryTeam;

buildAgentMainSessionKey

Kind: function

ts
export declare function buildAgentMainSessionKey(params: {
    agentId: string | null | undefined;
    mainKey?: string | null | undefined;
}): string;

buildLibraryClipPayload

Kind: function

ts
export declare function buildLibraryClipPayload(input: LibraryClipInput): LibraryClipRequest;

buildLibraryClipSchemaSnapshot

Kind: function

ts
export declare function buildLibraryClipSchemaSnapshot(): LibraryClipSchemaSnapshot;

buildLibraryManualFileClipInput

Kind: function

ts
export declare function buildLibraryManualFileClipInput(input: LibraryManualFileClipInput): LibraryClipInput;

buildPortalApiErrorEnvelope

Kind: function

ts
export declare function buildPortalApiErrorEnvelope<TContract extends string, TData>(params: PortalApiEnvelopeBase & {
    contract: TContract;
    data: TData;
    error: PortalApiError;
    generatedAt?: number;
}): PortalApiResponseEnvelope<TContract, TData>;

buildPortalApiRequestEnvelope

Kind: function

ts
export declare function buildPortalApiRequestEnvelope<TContract extends string, TPayload>(params: PortalApiEnvelopeBase & {
    contract: TContract;
    payload: TPayload;
    requestedAt?: number;
}): PortalApiRequestEnvelope<TContract, TPayload>;

buildPortalApiSuccessEnvelope

Kind: function

ts
export declare function buildPortalApiSuccessEnvelope<TContract extends string, TData>(params: PortalApiEnvelopeBase & {
    contract: TContract;
    data: TData;
    generatedAt?: number;
}): PortalApiResponseEnvelope<TContract, TData>;

buildPortalMemoryEnvelope

Kind: function

ts
export declare function buildPortalMemoryEnvelope<TSchemaContract extends string, TPayload>(params: {
    clientId: string;
    teamSlug: string;
    memberId: string;
    memoryKey: string;
    schemaContract: TSchemaContract;
    payload: TPayload;
    updatedAt?: number;
    portalId?: string;
    feature?: string;
    library?: PortalLibraryRef;
}): PortalMemoryEnvelope<TSchemaContract, TPayload>;

buildPortalTtsVoiceOptions

Kind: function

ts
export declare function buildPortalTtsVoiceOptions(params: {
    providers?: readonly PortalTtsProviderLike[];
    activeProviderId?: string;
    dashboardVoices?: Record<string, PortalTtsDashboardVoiceLike>;
}): PortalTtsVoiceOption[];

CAVI_CONTROL_API_ENDPOINTS

Kind: variable

ts
export declare const CAVI_CONTROL_API_ENDPOINTS: {
    readonly costHistory: "/api/plugins/cavi-control/cost/history";
    readonly scoringModel: "/api/plugins/cavi-control/scoring/model";
    readonly projectBoard: {
        readonly root: "/api/plugins/cavi-control/kanban";
        readonly profile: "/api/plugins/cavi-control/kanban/profile";
        readonly sprint: "/api/plugins/cavi-control/kanban/sprint";
        readonly backlog: "/api/plugins/cavi-control/kanban/backlog";
        readonly call: "/api/plugins/cavi-control/kanban/call";
        readonly backlogItem: (itemId: string) => string;
    };
    readonly operator: {
        readonly root: "/cavi-control/api/operator";
        readonly snapshot: "/cavi-control/api/operator/snapshot";
        readonly status: "/cavi-control/api/operator/status";
        readonly registry: "/cavi-control/api/operator/registry";
        readonly tasks: "/cavi-control/api/operator/tasks";
        readonly task: (taskId: string) => string;
        readonly taskDiscourse: (taskId: string) => string;
        readonly memory: "/cavi-control/api/operator/memory";
        readonly workerReady: "/cavi-control/api/operator/worker/ready";
        readonly workerTasks: "/cavi-control/api/operator/worker/tasks";
    };
    readonly portalMemorySnapshot: (teamSlug: string, memberId: string, memoryKey: string) => string;
};

CAVI_CONTROL_BASE_PATH

Kind: variable

ts
export declare const CAVI_CONTROL_BASE_PATH: "/cavi-control";

CAVI_CONTROL_OPERATOR_API

Kind: variable

ts
export declare const CAVI_CONTROL_OPERATOR_API: {
    readonly root: "/cavi-control/api/operator";
    readonly snapshot: "/cavi-control/api/operator/snapshot";
    readonly status: "/cavi-control/api/operator/status";
    readonly registry: "/cavi-control/api/operator/registry";
    readonly tasks: "/cavi-control/api/operator/tasks";
    readonly task: (taskId: string) => string;
    readonly taskDiscourse: (taskId: string) => string;
    readonly memory: "/cavi-control/api/operator/memory";
    readonly workerReady: "/cavi-control/api/operator/worker/ready";
    readonly workerTasks: "/cavi-control/api/operator/worker/tasks";
};

CAVI_CONTROL_OPERATOR_API_BASE

Kind: variable

ts
export declare const CAVI_CONTROL_OPERATOR_API_BASE: "/cavi-control/api/operator";

CAVI_CONTROL_OPERATOR_API_PLUGIN_ALIAS

Kind: variable

ts
/**
 * The gateway mounts the operator API at two paths: the canonical
 * `/cavi-control/api/operator` and a generic plugin route
 * `/api/plugins/cavi-control/operator`. `operator-control-live` issues each
 * request against the canonical path with this plugin-alias path as a fallback,
 * so both tables are kept key-for-key identical.
 */
export declare const CAVI_CONTROL_OPERATOR_API_PLUGIN_ALIAS: {
    readonly root: "/api/plugins/cavi-control/operator";
    readonly snapshot: "/api/plugins/cavi-control/operator/snapshot";
    readonly status: "/api/plugins/cavi-control/operator/status";
    readonly registry: "/api/plugins/cavi-control/operator/registry";
    readonly tasks: "/api/plugins/cavi-control/operator/tasks";
    readonly task: (taskId: string) => string;
    readonly taskDiscourse: (taskId: string) => string;
    readonly memory: "/api/plugins/cavi-control/operator/memory";
    readonly workerReady: "/api/plugins/cavi-control/operator/worker/ready";
    readonly workerTasks: "/api/plugins/cavi-control/operator/worker/tasks";
};

CAVI_CONTROL_OPERATOR_API_PLUGIN_ALIAS_BASE

Kind: variable

ts
export declare const CAVI_CONTROL_OPERATOR_API_PLUGIN_ALIAS_BASE: "/api/plugins/cavi-control/operator";

CAVI_CONTROL_OPERATOR_RPC_METHOD_LIST

Kind: variable

ts
export declare const CAVI_CONTROL_OPERATOR_RPC_METHOD_LIST: ("operator.status" | "operator.registry.get" | "operator.snapshot" | "operator.memory.list" | "operator.tasks.list" | "operator.tasks.get" | "discourse.tree" | "operator.worker.ready" | "operator.worker.tasks.list" | "operator.worker.tasks.get")[];

CAVI_CONTROL_OPERATOR_RPC_METHODS

Kind: variable

ts
export declare const CAVI_CONTROL_OPERATOR_RPC_METHODS: {
    readonly status: "operator.status";
    readonly registry: "operator.registry.get";
    readonly snapshot: "operator.snapshot";
    readonly memoryList: "operator.memory.list";
    readonly tasksList: "operator.tasks.list";
    readonly tasksGet: "operator.tasks.get";
    readonly discourseTree: "discourse.tree";
    readonly workerReady: "operator.worker.ready";
    readonly workerTasksList: "operator.worker.tasks.list";
    readonly workerTasksGet: "operator.worker.tasks.get";
};

CAVI_SURFACE_CONTRACTS

Kind: variable

ts
export declare const CAVI_SURFACE_CONTRACTS: Record<string, SurfaceContract>;

CaviApiPathAppendOptions

Kind: type

ts
export type CaviApiPathAppendOptions = {
    boundaryLabel?: string;
    errorPrefix?: string;
};

CaviControlAdapterFallbackProvider

Kind: type

ts
export type CaviControlAdapterFallbackProvider = GatewaySnapshotFallbackProvider & {
    cavi?: CaviControlAdapterFallbacks;
};

CaviControlAdapterFallbacks

Kind: type

ts
export type CaviControlAdapterFallbacks = {
    projectBoardWorkspace?: ProjectBoardWorkspaceSnapshot | (() => ProjectBoardWorkspaceSnapshot);
    operatorControl?: OperatorControlSnapshot | (() => OperatorControlSnapshot);
    taskDiscourse?: TaskDiscourseSnapshot | ((taskId: string) => TaskDiscourseSnapshot);
};

CaviControlAdapters

Kind: type

ts
export type CaviControlAdapters = {
    loadSessionsListRaw: (params: {
        includeGlobal?: boolean;
        includeUnknown?: boolean;
        includeDerivedTitles?: boolean;
        limit?: number;
        activeMinutes?: number;
        search?: string;
        label?: string;
        spawnedBy?: string;
        agentId?: string;
    }) => Promise<SessionsListPayload & {
        hash?: string;
        count?: number;
        ts?: number;
        path?: string;
    }>;
    loadSessionsUsageRaw: (params: {
        key?: string;
        limit?: number;
        includeContextWeight?: boolean;
        startDate?: string;
        endDate?: string;
    }) => Promise<SessionsUsagePayload>;
    loadSessionsPreviewRaw: (params: {
        keys: string[];
        limit?: number;
        maxChars?: number;
    }) => Promise<SessionsPreviewPayload>;
    loadSessionDetailRaw: (params: {
        key: string;
        previewLimit?: number;
        maxChars?: number;
    }) => Promise<{
        key?: string;
        row?: unknown | null;
        usageSession?: unknown | null;
        preview?: unknown | null;
        errors?: {
            usage?: string | null;
        };
    }>;
    patchSessionRaw: (params: {
        key: string;
        label?: string | null;
        thinkingLevel?: string | null;
        fastMode?: boolean | null;
        verboseLevel?: string | null;
        reasoningLevel?: string | null;
    }) => Promise<void>;
    loadOverview: () => Promise<DataEnvelope<OverviewSnapshot>>;
    loadAgentRuns: (filters: AgentRunsFilters) => Promise<DataEnvelope<GatewaySessionRunsSnapshot>>;
    loadRunDetail: (key: string) => Promise<DataEnvelope<GatewaySessionRunDetailSnapshot>>;
    loadRoutingMatrix: (windowDays: number) => Promise<DataEnvelope<RoutingMatrixSnapshot>>;
    loadIncidents: () => Promise<DataEnvelope<IncidentsSnapshot>>;
    loadOperatorControl: () => Promise<DataEnvelope<OperatorControlSnapshot>>;
    loadProjectBoardWorkspace: () => Promise<DataEnvelope<ProjectBoardWorkspaceSnapshot>>;
    loadTaskDiscourse: (taskId: string) => Promise<DataEnvelope<TaskDiscourseSnapshot>>;
    loadFleetLibrary: () => Promise<FleetLibrarySnapshot>;
    loadCostHistory: (range: CostHistoryRange) => Promise<DataEnvelope<CostHistorySnapshot>>;
    createProjectBoardEmail: (draft: ProjectBoardEmailDraft) => Promise<MutationResult<ProjectBoardEmailRecipient>>;
    updateProjectBoardEmail: (emailId: string, draft: ProjectBoardEmailDraft) => Promise<MutationResult<ProjectBoardEmailRecipient>>;
    removeProjectBoardEmail: (emailId: string) => Promise<MutationResult<{
        id: string;
    }>>;
    createProjectBoardBacklogItem: (draft: ProjectBoardBacklogDraft) => Promise<MutationResult<ProjectBoardBacklogItem>>;
    updateProjectBoardBacklogItem: (itemId: string, draft: ProjectBoardBacklogDraft) => Promise<MutationResult<ProjectBoardBacklogItem>>;
    callProjectBoard: (request: ProjectBoardCallRequest) => Promise<MutationResult<ProjectBoardCallResult>>;
};

CaviControlApiClient

Kind: class

ts
export declare class CaviControlApiClient extends BaseHttpApiClient {
    readonly endpoints: {
        readonly costHistory: "/api/plugins/cavi-control/cost/history";
        readonly scoringModel: "/api/plugins/cavi-control/scoring/model";
        readonly projectBoard: {
            readonly root: "/api/plugins/cavi-control/kanban";
            readonly profile: "/api/plugins/cavi-control/kanban/profile";
            readonly sprint: "/api/plugins/cavi-control/kanban/sprint";
            readonly backlog: "/api/plugins/cavi-control/kanban/backlog";
            readonly call: "/api/plugins/cavi-control/kanban/call";
            readonly backlogItem: (itemId: string) => string;
        };
        readonly operator: {
            readonly root: "/cavi-control/api/operator";
            readonly snapshot: "/cavi-control/api/operator/snapshot";
            readonly status: "/cavi-control/api/operator/status";
            readonly registry: "/cavi-control/api/operator/registry";
            readonly tasks: "/cavi-control/api/operator/tasks";
            readonly task: (taskId: string) => string;
            readonly taskDiscourse: (taskId: string) => string;
            readonly memory: "/cavi-control/api/operator/memory";
            readonly workerReady: "/cavi-control/api/operator/worker/ready";
            readonly workerTasks: "/cavi-control/api/operator/worker/tasks";
        };
        readonly portalMemorySnapshot: (teamSlug: string, memberId: string, memoryKey: string) => string;
    };
    readonly request: HttpApiTransport;
    constructor(options: HttpApiClientOptions);
    getOperatorSnapshot<T = unknown>(): Promise<T>;
    getPortalDashboard<T = unknown>(path: string): Promise<T>;
    postJson<T = unknown>(path: string, body: unknown, idempotencyKey?: string): Promise<T>;
}

CaviTeamPortalId

Kind: type

ts
export type CaviTeamPortalId = string;

configureCanonicalOperatorRegistry

Kind: function

ts
export declare function configureCanonicalOperatorRegistry(snapshot: OperatorRegistrySnapshot | null | undefined): void;

configureCanonicalTeamRegistry

Kind: function

ts
export declare function configureCanonicalTeamRegistry(config: TeamRegistryConfig | null | undefined): void;

configureTeamRegistryConfig

Kind: function

ts
export declare function configureTeamRegistryConfig(config: TeamRegistryConfig | null | undefined): void;

createCaviControlAdapterFallbackProvider

Kind: function

ts
export declare function createCaviControlAdapterFallbackProvider(): CaviControlAdapterFallbackProvider;

createCaviControlAdapters

Kind: function

ts
export declare function createCaviControlAdapters(opts: {
    gatewayBaseUrl: string;
    authToken: string | null;
    apiBaseUrl?: string | null;
    client?: GatewayWebSocketClient | null;
    defaultHeaders?: Record<string, string>;
    fallbackMode?: CaviSnapshotFallbackMode;
    fallbackProvider?: CaviControlAdapterFallbackProvider | null;
    snapshotFallbacks?: CreateGatewayWsSnapshotLoadersOptions["snapshotFallbacks"];
    costHistoryFallback?: CreateGatewayWsSnapshotLoadersOptions["costHistoryFallback"];
    caviFallbacks?: CaviControlAdapterFallbackProvider["cavi"];
    resolveSnapshotBinding?: CreateGatewayWsSnapshotLoadersOptions["resolveBinding"];
}): CaviControlAdapters;

createCaviSnapshotFallbackProvider

Kind: function

ts
export declare function createCaviSnapshotFallbackProvider(): GatewaySnapshotFallbackProvider;

createContractGap

Kind: function

ts
export declare function createContractGap(key: MobileGatewaySurfaceKey, note?: string): MobileGatewayContractGap;

createEmptyDelegatedTransport

Kind: function

ts
export declare function createEmptyDelegatedTransport(): OperatorControlSnapshot["status"]["delegatedFirstClassAgents"];

createEmptyOperatorMemory

Kind: function

ts
export declare function createEmptyOperatorMemory(): OperatorControlSnapshot["memory"];

createEmptyOperatorRegistry

Kind: function

ts
export declare function createEmptyOperatorRegistry(): OperatorControlSnapshot["registryDetail"];

createEmptyOperatorSectionStatus

Kind: function

ts
export declare function createEmptyOperatorSectionStatus(): OperatorControlSnapshot["sectionStatus"];

createEmptyOperatorStatus

Kind: function

ts
export declare function createEmptyOperatorStatus(): OperatorControlSnapshot["status"];

createEmptyOperatorTasks

Kind: function

ts
export declare function createEmptyOperatorTasks(): OperatorControlSnapshot["tasks"];

createEmptyWorkerReady

Kind: function

ts
export declare function createEmptyWorkerReady(): OperatorControlSnapshot["workerReady"];

createEmptyWorkerTasks

Kind: function

ts
export declare function createEmptyWorkerTasks(): OperatorControlSnapshot["workerTasks"];

createEmptyWorkerTransport

Kind: function

ts
export declare function createEmptyWorkerTransport(): OperatorControlSnapshot["status"]["worker"];

createHermesTeamRegistry

Kind: function

ts
export declare function createHermesTeamRegistry(config?: TeamRegistryConfig): TeamRegistry;

createOpenClawTeamRegistry

Kind: function

ts
export declare function createOpenClawTeamRegistry(config?: TeamRegistryConfig): TeamRegistry;

createOperatorSectionStatus

Kind: function

ts
export declare function createOperatorSectionStatus<TKey extends OperatorControlSectionKey>(params: {
    available: boolean;
    authoritative: boolean;
    error: string | null;
    sampleLimit: number | null;
}): OperatorControlSnapshot["sectionStatus"][TKey];

createPortalTtsAgentVoiceAssignment

Kind: function

ts
export declare function createPortalTtsAgentVoiceAssignment(params: {
    agentKey: string;
    voice: PortalTtsVoiceOption;
    assignedAt?: string;
}): PortalTtsAgentVoiceAssignment;

createProjectBoardLiveHelpers

Kind: function

ts
export declare function createProjectBoardLiveHelpers(requestJson: JsonHttpRequest, options?: {
    workboardRpc?: OpenClawWorkboardRpc | null;
}): ProjectBoardLiveHelpers;

createProjectBoardMutations

Kind: function

ts
export declare function createProjectBoardMutations(requestJson: JsonHttpRequest, projectBoardLive: ProjectBoardLiveHelpers): ProjectBoardMutations;

createTeamRegistry

Kind: function

ts
export declare function createTeamRegistry(config?: TeamRegistryConfig, options?: CreateTeamRegistryOptions): TeamRegistry;

createTeamRegistryFromSnapshot

Kind: function

ts
export declare function createTeamRegistryFromSnapshot(snapshot: OperatorRegistrySnapshot | null | undefined, options?: CreateTeamRegistryOptions): TeamRegistry;

CreateTeamRegistryOptions

Kind: type

ts
export type CreateTeamRegistryOptions = {
    provider?: TeamRegistryProviderKind | null;
};

DEFAULT_PROJECT_BOARD_ASSET_DIR

Kind: variable

ts
/** Default project-board asset directory — neutral, not a fleet-agent slug. */
export declare const DEFAULT_PROJECT_BOARD_ASSET_DIR = "project-board";

DelegationNode

Kind: type

ts
export type DelegationNode = {
    taskId: string;
    agentId: string;
    objective: string;
    status: string;
    children: DelegationNode[];
    events: DiscourseEvent[];
    cost: {
        tokens: number;
        costUsd: number;
        durationMs: number | null;
    };
};

DiscourseBlockerData

Kind: type

ts
export type DiscourseBlockerData = {
    blockerCode: string;
    description: string;
    severity: "low" | "medium" | "high" | "critical";
    retryable: boolean;
};

DiscourseBlockerEvent

Kind: type

ts
export type DiscourseBlockerEvent = DiscourseEventBase & {
    type: "discourse.blocker";
    data: DiscourseBlockerData;
};

DiscourseCompletionData

Kind: type

ts
export type DiscourseCompletionData = {
    outcome: "ok" | "error" | "timeout" | "partial";
    resultSummary: string;
    tokensUsed: number;
    costUsd: number;
    durationMs: number;
};

DiscourseCompletionEvent

Kind: type

ts
export type DiscourseCompletionEvent = DiscourseEventBase & {
    type: "discourse.completion";
    data: DiscourseCompletionData;
};

DiscourseDecisionData

Kind: type

ts
export type DiscourseDecisionData = {
    question: string;
    chosenApproach: string;
    rationale: string;
    alternatives: Array<{
        approach: string;
        reasonRejected: string;
    }>;
};

DiscourseDecisionEvent

Kind: type

ts
export type DiscourseDecisionEvent = DiscourseEventBase & {
    type: "discourse.decision";
    data: DiscourseDecisionData;
};

DiscourseDelegationData

Kind: type

ts
export type DiscourseDelegationData = {
    targetAgentId: string;
    objective: string;
    teamId?: string;
    rationale?: string;
};

DiscourseDelegationEvent

Kind: type

ts
export type DiscourseDelegationEvent = DiscourseEventBase & {
    type: "discourse.delegation";
    data: DiscourseDelegationData;
};

DiscourseDispatchData

Kind: type

ts
export type DiscourseDispatchData = {
    targetAgentId: string;
    objective: string;
    tier: string;
    packetType: string;
    approachRationale?: string;
    alternativesConsidered?: string[];
};

DiscourseDispatchEvent

Kind: type

ts
export type DiscourseDispatchEvent = DiscourseEventBase & {
    type: "discourse.dispatch";
    data: DiscourseDispatchData;
};

DiscourseEscalationData

Kind: type

ts
export type DiscourseEscalationData = {
    reason: string;
    target: string;
    severity?: "low" | "medium" | "high" | "critical";
};

DiscourseEscalationEvent

Kind: type

ts
export type DiscourseEscalationEvent = DiscourseEventBase & {
    type: "discourse.escalation";
    data: DiscourseEscalationData;
};

DiscourseEvent

Kind: type

ts
export type DiscourseEvent = DiscourseDispatchEvent | DiscourseDelegationEvent | DiscourseDecisionEvent | DiscourseBlockerEvent | DiscourseResolutionEvent | DiscourseStatusEvent | DiscourseEscalationEvent | DiscourseCompletionEvent | DiscourseSpawnDedupEvent | DiscourseSpawnGuardEvent | DiscourseSpawnBudgetEvent;

DiscourseEventType

Kind: type

ts
export type DiscourseEventType = "discourse.dispatch" | "discourse.delegation" | "discourse.decision" | "discourse.blocker" | "discourse.resolution" | "discourse.status" | "discourse.escalation" | "discourse.completion" | "discourse.spawn.dedup" | "discourse.spawn.guard" | "discourse.spawn.budget";

DiscourseResolutionData

Kind: type

ts
export type DiscourseResolutionData = {
    originalBlockerEventId: string;
    resolution: string;
    method: "retry" | "workaround" | "escalate" | "skip";
};

DiscourseResolutionEvent

Kind: type

ts
export type DiscourseResolutionEvent = DiscourseEventBase & {
    type: "discourse.resolution";
    data: DiscourseResolutionData;
};

DiscourseSpawnBudgetData

Kind: type

ts
export type DiscourseSpawnBudgetData = {
    recentFailureCount: number;
    blockStrikeCount: number;
    retryAfterMs: number;
};

DiscourseSpawnBudgetEvent

Kind: type

ts
export type DiscourseSpawnBudgetEvent = DiscourseEventBase & {
    type: "discourse.spawn.budget";
    data: DiscourseSpawnBudgetData;
};

DiscourseSpawnDedupData

Kind: type

ts
export type DiscourseSpawnDedupData = {
    targetAgentId: string;
    existingChildSessionKey: string;
    ttlMs: number;
};

DiscourseSpawnDedupEvent

Kind: type

ts
export type DiscourseSpawnDedupEvent = DiscourseEventBase & {
    type: "discourse.spawn.dedup";
    data: DiscourseSpawnDedupData;
};

DiscourseSpawnGuardData

Kind: type

ts
export type DiscourseSpawnGuardData = {
    targetAgentId: string;
    failureCode: string;
    strikeCount: number;
    ttlMs: number;
};

DiscourseSpawnGuardEvent

Kind: type

ts
export type DiscourseSpawnGuardEvent = DiscourseEventBase & {
    type: "discourse.spawn.guard";
    data: DiscourseSpawnGuardData;
};

DiscourseStatusData

Kind: type

ts
export type DiscourseStatusData = {
    prevState: string;
    nextState: string;
    note?: string;
};

DiscourseStatusEvent

Kind: type

ts
export type DiscourseStatusEvent = DiscourseEventBase & {
    type: "discourse.status";
    data: DiscourseStatusData;
};

EnrichedAgentRun

Kind: type

ts
export type EnrichedAgentRun = AgentRun & {
    taskId: string | null;
    taskState: OperatorTaskState | null;
    taskObjective: string | null;
    taskOwner: string | null;
    teamId: string | null;
    verification: string | null;
    discourseTaskId: string | null;
};

fallbackProjectBoardWorkspace

Kind: variable

ts
export declare const fallbackProjectBoardWorkspace: ProjectBoardWorkspaceSnapshot;

FleetLibrarySnapshot

Kind: type

ts
export type FleetLibrarySnapshot = {
    generatedAt: number;
    teams: TeamLibraryStatus[];
    sigmund: {
        status: "online" | "offline" | "unknown";
        lastIngestAt: number | null;
        totalProcessed: number;
    };
};

GATEWAY_KANBAN_BOARD_PATH

Kind: variable

ts
export declare const GATEWAY_KANBAN_BOARD_PATH: string;

GATEWAY_KANBAN_TASKS_PATH

Kind: variable

ts
export declare const GATEWAY_KANBAN_TASKS_PATH: string;

GATEWAY_RPC_METHODS

Kind: variable

ts
export declare const GATEWAY_RPC_METHODS: {
    readonly discourseTree: "discourse.tree";
};

GATEWAY_WS_PATH

Kind: variable

ts
export declare const GATEWAY_WS_PATH: string;

GatewayTargets

Kind: type

ts
export type GatewayTargets = {
    rawBase: string;
    httpBase: string;
    wsBase: string;
    authToken: string | null;
    wsPath: string;
};

getConfiguredGatewayBaseUrl

Kind: function

ts
export declare function getConfiguredGatewayBaseUrl(): string | null;

getConfiguredTeamRegistry

Kind: function

ts
export declare function getConfiguredTeamRegistry(options?: CreateTeamRegistryOptions): TeamRegistry;

getFleetLibraryRef

Kind: function

ts
export declare function getFleetLibraryRef(): PortalLibraryRef;

getMobileGatewayEndpointContract

Kind: function

ts
export declare function getMobileGatewayEndpointContract(key: MobileGatewaySurfaceKey): MobileGatewayEndpointContract;

getMobileGatewayEndpointPath

Kind: function

ts
export declare function getMobileGatewayEndpointPath(key: MobileGatewaySurfaceKey): string;

getOperatorTeamLookupKeys

Kind: function

ts
export declare function getOperatorTeamLookupKeys(team: OperatorRegistryTeam): string[];

getPortalTeamCode

Kind: function

ts
export declare function getPortalTeamCode(portalId: CaviTeamPortalId): string;

getPortalTeamIdentity

Kind: function

ts
export declare function getPortalTeamIdentity(portalId: CaviTeamPortalId): OperatorRegistryTeam;

getPortalTeamSectorSlug

Kind: function

ts
export declare function getPortalTeamSectorSlug(portalId: CaviTeamPortalId): string;

getPortalTeamSlug

Kind: function

ts
export declare function getPortalTeamSlug(portalId: CaviTeamPortalId): string;

getPortalTtsProviderLabel

Kind: function

ts
export declare function getPortalTtsProviderLabel(provider: PortalTtsProviderLike): string;

getProjectBoardAssetDir

Kind: function

ts
/**
 * Project-board asset directory. Defaults to a neutral folder; a host can point
 * it at its own deployment's directory by setting `__CAVI_PROJECT_BOARD_ASSET_DIR__`.
 */
export declare function getProjectBoardAssetDir(): string;

getRuntimeBasePath

Kind: function

ts
export declare function getRuntimeBasePath(): string;

getTeamLookupKeys

Kind: function

ts
export declare function getTeamLookupKeys(team: OperatorRegistryTeam): string[];

HERMES_KANBAN_BOARD_PATH

Kind: variable

ts
export declare const HERMES_KANBAN_BOARD_PATH: string;

HERMES_KANBAN_TASKS_PATH

Kind: variable

ts
export declare const HERMES_KANBAN_TASKS_PATH: string;

HERMES_WS_PATH

Kind: variable

ts
export declare const HERMES_WS_PATH: string;

HermesGatewayTargets

Kind: type

ts
export type HermesGatewayTargets = GatewayTargets;

HTTP_API_CLIENT_ENV_ALIASES

Kind: variable

ts
export declare const HTTP_API_CLIENT_ENV_ALIASES: {
    readonly caviBaseUrl: readonly [
        "EXPO_PUBLIC_CAVI_API_BASE_URL",
        "EXPO_PUBLIC_CAVI_CONTROL_COMPAT_BASE_URL",
        "VITE_CAVI_API_BASE_URL"
    ];
    readonly caviAuthToken: readonly [
        "EXPO_PUBLIC_CAVI_API_AUTH_TOKEN",
        "EXPO_PUBLIC_GATEWAY_TOKEN",
        "VITE_CAVI_API_AUTH_TOKEN"
    ];
    readonly caviClientId: readonly [
        "EXPO_PUBLIC_CAVI_API_CLIENT_ID",
        "EXPO_PUBLIC_GATEWAY_CLIENT_ID",
        "VITE_CAVI_API_CLIENT_ID"
    ];
    readonly gatewayBaseUrl: readonly [
        "EXPO_PUBLIC_GATEWAY_API_BASE_URL",
        "VITE_GATEWAY_API_BASE_URL"
    ];
    readonly gatewayAuthToken: readonly [
        "EXPO_PUBLIC_GATEWAY_TOKEN",
        "EXPO_PUBLIC_GATEWAY_API_AUTH_TOKEN",
        "VITE_GATEWAY_API_AUTH_TOKEN"
    ];
    readonly gatewayClientId: readonly [
        "EXPO_PUBLIC_GATEWAY_CLIENT_ID",
        "EXPO_PUBLIC_GATEWAY_API_CLIENT_ID",
        "VITE_GATEWAY_API_CLIENT_ID"
    ];
    readonly libraryBaseUrl: readonly [
        "EXPO_PUBLIC_LIBRARY_API_BASE_URL",
        "EXPO_PUBLIC_CAVI_LIBRARY_API_BASE_URL",
        "VITE_LIBRARY_API_BASE_URL"
    ];
    readonly libraryAuthToken: readonly [
        "EXPO_PUBLIC_LIBRARY_API_AUTH_TOKEN",
        "EXPO_PUBLIC_GATEWAY_TOKEN",
        "VITE_LIBRARY_API_AUTH_TOKEN"
    ];
    readonly libraryClientId: readonly [
        "EXPO_PUBLIC_LIBRARY_API_CLIENT_ID",
        "EXPO_PUBLIC_GATEWAY_CLIENT_ID",
        "VITE_LIBRARY_API_CLIENT_ID"
    ];
};

HTTP_API_CLIENT_ENV_KEYS

Kind: variable

ts
export declare const HTTP_API_CLIENT_ENV_KEYS: {
    readonly caviBaseUrl: "CAVI_API_BASE_URL";
    readonly caviAuthToken: "CAVI_API_AUTH_TOKEN";
    readonly caviClientId: "CAVI_API_CLIENT_ID";
    readonly gatewayBaseUrl: "GATEWAY_API_BASE_URL";
    readonly gatewayAuthToken: "GATEWAY_API_AUTH_TOKEN";
    readonly gatewayClientId: "GATEWAY_API_CLIENT_ID";
    readonly libraryBaseUrl: "LIBRARY_API_BASE_URL";
    readonly libraryAuthToken: "LIBRARY_API_AUTH_TOKEN";
    readonly libraryClientId: "LIBRARY_API_CLIENT_ID";
};

HttpApiResolvedConfig

Kind: type

ts
export type HttpApiResolvedConfig = {
    cavi: HttpApiSurfaceConfig;
    gateway: HttpApiSurfaceConfig;
    library: HttpApiSurfaceConfig;
};

LIBRARY_API_BASE_PATH

Kind: variable

ts
export declare const LIBRARY_API_BASE_PATH: "/library/api";

LIBRARY_API_ENDPOINTS

Kind: variable

ts
export declare const LIBRARY_API_ENDPOINTS: {
    readonly root: "/library/api";
    readonly search: "/library/api/search";
    readonly ingest: "/library/api/ingest";
    readonly documents: "/library/api/documents";
    readonly fleetStatus: "/library/api/fleet-status";
    readonly status: "/library/api/status";
    readonly inbox: "/library/api/inbox";
    readonly promotable: "/library/api/promotable";
    readonly reviewRequests: "/library/api/review-requests";
    readonly clip: "/library/api/clip";
    readonly clipHealth: "/library/api/clip/health";
    readonly clipSchema: "/library/api/clip/schema";
    readonly clipLogs: "/library/api/clip/logs";
    readonly document: (id: string) => string;
};

LIBRARY_CLIP_DEFAULT_TEAM

Kind: variable

ts
export declare const LIBRARY_CLIP_DEFAULT_TEAM = "library";

LIBRARY_CLIP_ENDPOINT

Kind: variable

ts
export declare const LIBRARY_CLIP_ENDPOINT: "/library/api/clip";

LIBRARY_CLIP_HEALTH_ENDPOINT

Kind: variable

ts
export declare const LIBRARY_CLIP_HEALTH_ENDPOINT: "/library/api/clip/health";

LIBRARY_CLIP_LOGS_ENDPOINT

Kind: variable

ts
export declare const LIBRARY_CLIP_LOGS_ENDPOINT: "/library/api/clip/logs";

LIBRARY_CLIP_SCHEMA_ENDPOINT

Kind: variable

ts
export declare const LIBRARY_CLIP_SCHEMA_ENDPOINT: "/library/api/clip/schema";

LIBRARY_CLIP_SOURCE_TAG

Kind: variable

ts
export declare const LIBRARY_CLIP_SOURCE_TAG = "caviclip";

LibraryApiClient

Kind: class

ts
export declare class LibraryApiClient extends BaseHttpApiClient {
    readonly endpoints: {
        readonly root: "/library/api";
        readonly search: "/library/api/search";
        readonly ingest: "/library/api/ingest";
        readonly documents: "/library/api/documents";
        readonly fleetStatus: "/library/api/fleet-status";
        readonly status: "/library/api/status";
        readonly inbox: "/library/api/inbox";
        readonly promotable: "/library/api/promotable";
        readonly reviewRequests: "/library/api/review-requests";
        readonly clip: "/library/api/clip";
        readonly clipHealth: "/library/api/clip/health";
        readonly clipSchema: "/library/api/clip/schema";
        readonly clipLogs: "/library/api/clip/logs";
        readonly document: (id: string) => string;
    };
    readonly request: HttpApiTransport;
    constructor(options: HttpApiClientOptions);
    ingest(body: LibraryIngestRequest, idempotencyKey?: string): Promise<LibraryIngestResult>;
    search<T = unknown>(query: Record<string, string | number | boolean | undefined>): Promise<T>;
    getDocument<T = unknown>(id: string): Promise<T>;
}

LibraryClipDiagnosticsCheck

Kind: type

ts
export type LibraryClipDiagnosticsCheck = {
    id: "clip-endpoint" | "pipeline-status" | "clip-health" | "clip-schema" | "clip-logs";
    label: string;
    path: string;
    ok: boolean;
    status?: number;
    message: string;
    source: "local-contract" | "gateway";
};

LibraryClipDiagnosticsLog

Kind: type

ts
export type LibraryClipDiagnosticsLog = {
    at?: string;
    level?: string;
    message: string;
    path?: string;
};

LibraryClipDiagnosticsSnapshot

Kind: type

ts
export type LibraryClipDiagnosticsSnapshot = {
    fetchedAt: number;
    endpoint: typeof LIBRARY_CLIP_ENDPOINT;
    schema: LibraryClipSchemaSnapshot | Record<string, unknown>;
    schemaSource: "local-contract" | "gateway";
    checks: LibraryClipDiagnosticsCheck[];
    logs: LibraryClipDiagnosticsLog[];
};

LibraryClipInput

Kind: type

ts
export type LibraryClipInput = {
    title?: string | null;
    sourceUrl?: string | null;
    text?: string | null;
    team?: string | null;
    tags?: readonly string[] | null;
    note?: string | null;
    metadata?: Record<string, unknown> | null;
    capturedAt?: string | null;
};

LibraryClipRequest

Kind: type

ts
export type LibraryClipRequest = {
    title: string;
    team: string;
    tags: string[];
    note: string;
    source_url?: string;
    text?: string;
    metadata: Record<string, unknown>;
};

LibraryClipResult

Kind: type

ts
export type LibraryClipResult = {
    accepted?: boolean;
    id?: string;
    clip_id?: string;
    jobId?: string;
    message?: string;
    errors?: Array<{
        field?: string;
        message: string;
    }>;
    [key: string]: unknown;
};

LibraryClipSchemaField

Kind: type

ts
export type LibraryClipSchemaField = {
    type: string;
    required: boolean;
    description: string;
};

LibraryClipSchemaSnapshot

Kind: type

ts
export type LibraryClipSchemaSnapshot = {
    contract: "LIBRARY_CLIP_V1";
    endpoint: typeof LIBRARY_CLIP_ENDPOINT;
    method: "POST";
    fields: Record<keyof LibraryClipRequest, LibraryClipSchemaField>;
    example: LibraryClipRequest;
};

LibraryClipTransport

Kind: type

ts
export type LibraryClipTransport = <T>(path: string, init?: {
    method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
    body?: unknown;
    timeoutMs?: number;
}) => Promise<T>;

LibraryIngestRequest

Kind: type

ts
export type LibraryIngestRequest = {
    source: LibraryIngestSource;
    workspaceId?: string;
    channelId?: string;
    threadId?: string;
    requestedBy?: string;
};

LibraryIngestResult

Kind: type

ts
export type LibraryIngestResult = {
    accepted: boolean;
    id?: string;
    jobId?: string;
    message?: string;
    errors?: Array<{
        field?: string;
        message: string;
    }>;
};

LibraryIngestSource

Kind: type

ts
export type LibraryIngestSource = {
    kind: "url" | "text" | "file" | "note";
    uri?: string;
    title?: string;
    text?: string;
    mimeType?: string;
    metadata?: Record<string, unknown>;
};

LibraryManualFileClipInput

Kind: type

ts
export type LibraryManualFileClipInput = {
    name: string;
    uri?: string | null;
    mimeType?: string | null;
    size?: number | null;
    text?: string | null;
    capturedAt?: string | null;
};

LibraryNote

Kind: type

ts
export type LibraryNote = {
    schema_version: number;
    id: string;
    note_type: LibraryNoteType;
    title: string;
    aliases: string[];
    tags: string[];
    domains: string[];
    summary: string;
    status: LibraryStatus;
    verification: LibraryVerification;
    language: string;
    sensitivity: LibrarySensitivity;
    compiled_at: string;
    compiled_by: string;
    content_hash: string;
    reviewed_at: string | null;
    reviewed_by: string | null;
    sources: LibrarySourceEntry[];
};

LibraryNoteType

Kind: type

ts
/** Fleet Library Schema v1 — team library status and candidate data for Cavi Control. */
export type LibraryNoteType = "concept" | "source" | "meeting" | "decision" | "transcript" | "synthesis" | "person" | "org" | "project";

LibrarySensitivity

Kind: type

ts
export type LibrarySensitivity = "public" | "internal" | "confidential";

LibrarySourceEntry

Kind: type

ts
export type LibrarySourceEntry = {
    uri: string;
    title?: string;
    kind: "web" | "file" | "repo" | "meeting" | "chat" | "manual";
    format: "html" | "pdf" | "md" | "txt" | "audio" | "video" | "email" | "json";
    capture_method: "clip" | "upload" | "transcription" | "manual" | "agent";
    captured_at: string;
    author?: string;
    site?: string;
    published_at?: string;
};

LibraryStatus

Kind: type

ts
export type LibraryStatus = "draft" | "active" | "archived";

LibraryVerification

Kind: type

ts
export type LibraryVerification = "unreviewed" | "reviewed" | "disputed";

listCaviTeamPortalIds

Kind: function

ts
export declare function listCaviTeamPortalIds(): string[];

listCompiledCanonicalTeams

Kind: function

ts
export declare function listCompiledCanonicalTeams(): OperatorRegistryTeam[];

listPortalLibraryRefs

Kind: function

ts
export declare function listPortalLibraryRefs(): PortalLibraryRef[];

loadOperatorControlSection

Kind: function

ts
export declare function loadOperatorControlSection<TKey extends OperatorControlSectionKey, TData>(params: {
    key: TKey;
    run: () => Promise<TData>;
    fallback: () => TData;
    authoritative: boolean;
    sampleLimit: number | null;
    expectedContract: string;
    note: string;
}): Promise<OperatorSectionLoadResult<TKey, TData>>;

matchesOperatorTeamIdentifier

Kind: function

ts
export declare function matchesOperatorTeamIdentifier(team: OperatorRegistryTeam, identifier: string | null | undefined): boolean;

matchesTaskTargetToTeam

Kind: function

ts
export declare function matchesTaskTargetToTeam(target: {
    team_id?: string | null;
    team_slug?: string | null;
}, team: OperatorRegistryTeam): boolean;

matchesTeamIdentifier

Kind: function

ts
export declare function matchesTeamIdentifier(team: OperatorRegistryTeam, identifier: string | null | undefined): boolean;

MOBILE_GATEWAY_ENDPOINT_CONTRACTS

Kind: variable

ts
export declare const MOBILE_GATEWAY_ENDPOINT_CONTRACTS: {
    readonly providerConfig: {
        readonly surface: "provider-config";
        readonly path: "http-base + /v1/*, /health*; ws-base + /api/ws";
        readonly owner: "mobile gateway owner";
        readonly note: "Resolve explicit HTTP and WS targets from the saved gateway URL; preserve bearer auth.";
    };
    readonly preflightHealth: {
        readonly surface: "preflight-health";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "mobile gateway owner";
        readonly note: "Primary reachability check for the selected gateway API server.";
    };
    readonly preflightHealthDetailed: {
        readonly surface: "preflight-health-detailed";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "mobile gateway owner";
        readonly note: "Detailed health check; failures should be reported without hiding the basic health result.";
    };
    readonly preflightCapabilities: {
        readonly surface: "preflight-capabilities";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "mobile gateway owner";
        readonly note: "Authenticated API-server capability proof for saved bearer tokens.";
    };
    readonly websocketSession: {
        readonly surface: "websocket-session";
        readonly path: string;
        readonly owner: "mobile gateway owner";
        readonly note: "Dashboard/TUI JSON-RPC for chat, sessions, logs, and health/status.";
    };
    readonly gatewayMediaProviders: {
        readonly surface: "gateway-media-providers";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/media contract";
        readonly note: "Shared media provider inventory for audio, image, video, and music generation across gateways.";
    };
    readonly gatewayMediaAudio: {
        readonly surface: "gateway-media-audio";
        readonly method: "POST";
        readonly path: string;
        readonly owner: "gateway/media contract";
        readonly note: "Core audio generation route exposed through the provider-neutral media client.";
    };
    readonly gatewayMediaImage: {
        readonly surface: "gateway-media-image";
        readonly method: "POST";
        readonly path: string;
        readonly owner: "gateway/media contract";
        readonly note: "Core image generation route exposed through the provider-neutral media client.";
    };
    readonly gatewayMediaVideo: {
        readonly surface: "gateway-media-video";
        readonly method: "POST";
        readonly path: string;
        readonly owner: "gateway/media contract";
        readonly note: "Core video generation route exposed through the provider-neutral media client.";
    };
    readonly gatewayMediaMusic: {
        readonly surface: "gateway-media-music";
        readonly method: "POST";
        readonly path: string;
        readonly owner: "gateway/media contract";
        readonly note: "Core music generation route exposed through the provider-neutral media client.";
    };
    readonly gatewayMediaJob: {
        readonly surface: "gateway-media-job";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/media contract";
        readonly note: "Core media job status route used by audio, image, video, and music generation.";
    };
    readonly gatewayMediaAssets: {
        readonly surface: "gateway-media-assets";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/media contract";
        readonly note: "Core media asset inventory route.";
    };
    readonly gatewayMediaAsset: {
        readonly surface: "gateway-media-asset";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/media contract";
        readonly note: "Core media asset bytes and metadata route.";
    };
    readonly gatewayWikiVaults: {
        readonly surface: "gateway-wiki-vaults";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/wiki contract";
        readonly note: "Core wiki vault inventory for external Obsidian/QMD plugin vaults.";
    };
    readonly gatewayWikiTree: {
        readonly surface: "gateway-wiki-tree";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/wiki contract";
        readonly note: "Core wiki tree route.";
    };
    readonly gatewayWikiRead: {
        readonly surface: "gateway-wiki-read";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/wiki contract";
        readonly note: "Core wiki read route for QMD/Markdown pages.";
    };
    readonly gatewayWikiIngest: {
        readonly surface: "gateway-wiki-ingest";
        readonly method: "POST";
        readonly path: string;
        readonly owner: "gateway/wiki contract";
        readonly note: "Core wiki ingest route used by external wiki plugins.";
    };
    readonly gatewayWikiCompile: {
        readonly surface: "gateway-wiki-compile";
        readonly method: "POST";
        readonly path: string;
        readonly owner: "gateway/wiki contract";
        readonly note: "Core QMD compile route for wiki pages and collections.";
    };
    readonly gatewayWikiPromote: {
        readonly surface: "gateway-wiki-promote";
        readonly method: "POST";
        readonly path: string;
        readonly owner: "gateway/wiki contract";
        readonly note: "Core wiki promotion route for durable vault publishing.";
    };
    readonly costHistory: {
        readonly surface: "cost-history";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/cavi owner";
        readonly note: "CAVI cost history endpoint.";
    };
    readonly operatorStatus: {
        readonly surface: "operator-status";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/cavi owner";
        readonly note: "Operator-status endpoint used as an HTTP preflight fallback.";
    };
    readonly operatorSnapshot: {
        readonly surface: "operator-snapshot";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/cavi owner";
        readonly note: "CAVI Control operator aggregate snapshot for mobile and portal fallbacks.";
    };
    readonly operatorTaskDispatch: {
        readonly surface: "operator-task-dispatch";
        readonly method: "POST";
        readonly path: string;
        readonly owner: "ODB + gateway owner";
        readonly note: "OperatorTaskCreateRequest is accepted by the unified CAVI Control operator task endpoint.";
    };
    readonly kanbanTasks: {
        readonly surface: "kanban-tasks";
        readonly method: "POST";
        readonly path: string;
        readonly owner: "gateway/kanban owner";
        readonly note: "Kanban-native task creation remains a separate gateway surface from the CAVI Control operator task endpoint.";
    };
    readonly kanbanBoard: {
        readonly surface: "kanban-board";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/kanban owner";
        readonly note: "Unified Kanban board through bearer-authenticated /api/plugins/kanban/board for Project Board and Operator visibility.";
    };
    readonly teamWorkspace: {
        readonly surface: "team-workspace";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/team contract";
        readonly note: "Agnostic team-owned folder route; resolve the concrete path through the team manifest whitelist.";
    };
    readonly teamAgentWorkspace: {
        readonly surface: "team-agent-workspace";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "gateway/team contract";
        readonly note: "Agnostic agent-owned media/research folder route; resolve concrete paths through the team manifest whitelist.";
    };
    readonly fleetLibrary: {
        readonly surface: "fleet-library";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "library gateway owner";
        readonly note: "Base fleet snapshot; mobile enriches it with library status, inbox, promotable, and review-request paths when available.";
    };
    readonly libraryPipelineStatus: {
        readonly surface: "library-pipeline-status";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "library gateway owner";
        readonly note: "Library ingest pipeline counters used by the mobile forge and fleet summaries.";
    };
    readonly libraryPipelineInbox: {
        readonly surface: "library-pipeline-inbox";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "library gateway owner";
        readonly note: "Optional inbox item detail for assigning arrival pressure to library lanes.";
    };
    readonly libraryPromotable: {
        readonly surface: "library-promotable";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "library gateway owner";
        readonly note: "Promotable note rows used to hydrate the library board, promotions, and graph surfaces.";
    };
    readonly libraryReviewRequests: {
        readonly surface: "library-review-requests";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "library gateway owner";
        readonly note: "Review-request state joined onto promotable notes before mobile renders library operation rows.";
    };
    readonly vaultTree: {
        readonly surface: "vault-tree";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "vault/gateway owner";
        readonly note: "Obsidian vault tree route.";
    };
    readonly vaultRead: {
        readonly surface: "vault-read";
        readonly method: "GET";
        readonly path: string;
        readonly owner: "vault/gateway owner";
        readonly note: "Obsidian file read route.";
    };
};

MobileGatewayContractGap

Kind: type

ts
export type MobileGatewayContractGap = {
    area: string;
    expectedContract: string;
    note: string;
    reason: "backend-not-configured" | "unknown";
};

MobileGatewayEndpointContract

Kind: type

ts
export type MobileGatewayEndpointContract = {
    surface: string;
    method?: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
    path: string;
    owner: string;
    note: string;
};

MobileGatewaySurfaceKey

Kind: type

ts
export type MobileGatewaySurfaceKey = keyof typeof MOBILE_GATEWAY_ENDPOINT_CONTRACTS;

normalizeDiscourseEvent

Kind: function

ts
export declare function normalizeDiscourseEvent(raw: unknown, fallbackTaskId: string): DiscourseEvent | null;

normalizeEmailAddress

Kind: function

ts
export declare function normalizeEmailAddress(value: unknown): string | null;

normalizeEmailList

Kind: function

ts
export declare function normalizeEmailList(emails: string[]): string[];

normalizeLimitations

Kind: function

ts
export declare function normalizeLimitations(value: unknown): readonly string[];

normalizeProjectBoardBacklogItem

Kind: function

ts
export declare function normalizeProjectBoardBacklogItem(raw: unknown): ProjectBoardBacklogApiItemResponse | null;

normalizeProjectBoardPriority

Kind: function

ts
export declare function normalizeProjectBoardPriority(value: unknown): ProjectBoardBacklogPriority;

normalizeProjectBoardStatus

Kind: function

ts
export declare function normalizeProjectBoardStatus(value: unknown): ProjectBoardBacklogStatus;

normalizeProjectBoardStorageMode

Kind: function

ts
export declare function normalizeProjectBoardStorageMode(value: unknown): ProjectBoardStorageMode;

normalizeSection

Kind: function

ts
export declare function normalizeSection(value: unknown): string;

normalizeSessionAgentId

Kind: function

ts
export declare function normalizeSessionAgentId(value: string | null | undefined): string | null;

normalizeSessionKey

Kind: function

ts
export declare function normalizeSessionKey(value: string | null | undefined): string | null;

normalizeTaskDiscourseSnapshot

Kind: function

ts
export declare function normalizeTaskDiscourseSnapshot(raw: unknown, fallbackTaskId: string): TaskDiscourseSnapshot;

normalizeTeamLookupValue

Kind: function

ts
export declare function normalizeTeamLookupValue(value: string): string;

normalizeTeamRegistryTeam

Kind: function

ts
export declare function normalizeTeamRegistryTeam(team: TeamRegistryTeamConfig, fallback?: OperatorRegistryTeam | null): OperatorRegistryTeam;

OPERATOR_DISPATCH_ENDPOINTS

Kind: variable

ts
export declare const OPERATOR_DISPATCH_ENDPOINTS: {
    readonly message: "/api/message";
    readonly operatorEvents: "/operator/events";
    readonly taskReceiptsTemplate: "/cavi-control/api/tasks/{taskId}/receipts";
};

OPERATOR_MEMORY_SAMPLE_LIMIT

Kind: variable

ts
export declare const OPERATOR_MEMORY_SAMPLE_LIMIT = 20;

OPERATOR_TASK_SAMPLE_LIMIT

Kind: variable

ts
export declare const OPERATOR_TASK_SAMPLE_LIMIT = 20;

OPERATOR_WORKER_TASK_SAMPLE_LIMIT

Kind: variable

ts
export declare const OPERATOR_WORKER_TASK_SAMPLE_LIMIT = 20;

operatorControlExpectedContractSummary

Kind: function

ts
export declare function operatorControlExpectedContractSummary(): string;

OperatorControlSectionKey

Kind: type

ts
export type OperatorControlSectionKey = "status" | "registryDetail" | "tasks" | "memory" | "workerReady" | "workerTasks";

OperatorControlSectionStatus

Kind: type

ts
export type OperatorControlSectionStatus = {
    available: boolean;
    authoritative: boolean;
    error: string | null;
    sampleLimit: number | null;
};

OperatorControlSnapshot

Kind: type

ts
export type OperatorControlSnapshot = {
    status: OperatorControlStatusSnapshot;
    registryDetail: OperatorRegistrySnapshot;
    tasks: OperatorTaskListSnapshot;
    memory: OperatorSharedMemorySnapshot;
    workerReady: OperatorWorkerReadySnapshot;
    workerTasks: OperatorWorkerTaskListSnapshot;
    sectionStatus: Record<OperatorControlSectionKey, OperatorControlSectionStatus>;
};

OperatorControlStatusSnapshot

Kind: type

ts
export type OperatorControlStatusSnapshot = {
    primaryOperator: string;
    fallbackOperator: string;
    authorityMode: "authoritative-failover";
    taskStorePath: string;
    registry: {
        agentCount: number;
        teamCount: number;
        sourcePath: string;
        sourceHash: string;
        generatedAt: number;
    };
    taskSummary: {
        primaryOperator: string;
        fallbackOperator: string;
        authorityMode?: "authoritative-failover";
        tasks: Record<OperatorTaskState, number>;
        totals: {
            total: number;
            terminal: number;
            active: number;
        };
    };
    runtimes: {
        acpBackendId: string | null;
        acpBackendHealthy: boolean;
        sharedMemoryAuthority: OperatorSharedMemoryAuthority;
    };
    sharedMemory: {
        storePath: string;
        collections: Record<OperatorSharedMemoryCollection, OperatorMemoryCollectionSummary>;
    };
    legacyWorkerFleet: OperatorWorkerTransportSnapshot;
    delegatedFirstClassAgents: OperatorDelegatedTransportSnapshot;
    worker: OperatorWorkerTransportSnapshot;
    mesh: {
        legacyExecutionFleet: OperatorWorkerTransportSnapshot;
        delegatedFirstClassAgents: OperatorDelegatedTransportSnapshot;
        executionFleet: OperatorWorkerTransportSnapshot;
        projectOps: {
            mode: "task-lifecycle";
            configured: boolean;
            baseUrl: string | null;
            eventEndpoint: string | null;
            authScheme: "bearer" | null;
            authEnv: string | null;
            authConfigured: boolean;
        };
        domainOrchestrators: OperatorDelegatedTransportSnapshot;
        marketing: OperatorDelegatedTransportSnapshot;
        research: OperatorDelegatedTransportSnapshot;
    };
};

OperatorDelegatedTransportSnapshot

Kind: type

ts
export type OperatorDelegatedTransportSnapshot = {
    dispatchTransport: "delegated-http";
    transportAliases: string[];
    role: "delegated-first-class-agent-boundary";
    configured: boolean;
    baseUrl: string | null;
    authScheme: "bearer" | null;
    authEnv: string | null;
    authConfigured: boolean;
    globalDefaultAlias: string | null;
    servedTeams: string[];
    leadAliases: string[];
    defaultAliasByTeam: Record<string, string>;
    teamTopology: Array<{
        teamId: string;
        declaredTransport: string | null;
        resolvedTransport: "delegated-http";
        leadAlias: string | null;
        defaultAlias: string | null;
        dispatchEndpointEnv: string | null;
        dispatchPath: string | null;
        dispatchAuthEnv: string | null;
        resolvedBaseUrl: string | null;
        resolvedEndpoint: string | null;
        authConfigured: boolean;
        /** When resolvedBaseUrl is null: which env vars to set on the gateway (no secret values). */
        urlResolutionHint?: string | null;
    }>;
    legacyTeams: string[];
};

OperatorMemoryCollectionSummary

Kind: type

ts
export type OperatorMemoryCollectionSummary = {
    count: number;
    lastVerifiedAt: number | null;
    writeMode: "append-only" | "upsert";
};

OperatorMemoryRecord

Kind: type

ts
export type OperatorMemoryRecord = {
    collection: OperatorSharedMemoryCollection;
    recordId: string;
    scopeKey: string;
    summary: string | null;
    content: Record<string, unknown>;
    metadata: {
        source: string;
        writer: string;
        evidence_ref: string;
        verified_at: number;
        ttl_policy?: string;
    };
    promotedAt: number;
};

OperatorRegistryAgent

Kind: type

ts
export type OperatorRegistryAgent = {
    id: string;
    name: string;
    role: string | null;
    specialty: string | null;
    model: string | null;
    skill: string | null;
    spawnTemplate: string | null;
    repos: string[];
    repoConfig: OperatorRegistryAgentRepoConfig | null;
    triggers: string[];
    notes: string | null;
    teams: string[];
    maxConcurrentSessions: number;
    capabilities: string[];
    mcpAccess: string[];
    reviewHandles: string[];
    executionMode: string | null;
    identity: OperatorRegistryAgentIdentity | null;
    ownership: OperatorRegistryAgentOwnership | null;
    roleBoundary: OperatorRegistryAgentRoleBoundary | null;
    tokenEnv: string | null;
    boardUrl: string | null;
    k8sService: string | null;
    delegatesTo: string[];
};

OperatorRegistryAgentIdentity

Kind: type

ts
export type OperatorRegistryAgentIdentity = {
    theme: string | null;
    avatar: string | null;
    rosterImage: string | null;
    cardImage: string | null;
    alt: string | null;
};

OperatorRegistryAgentOwnership

Kind: type

ts
export type OperatorRegistryAgentOwnership = {
    parentOrchestrator: string | null;
    ownsDomains: string[];
    delegatesTo: string[];
    ownsOutputs: string[];
    runtimeSpecialists: string[];
};

OperatorRegistryAgentRepoConfig

Kind: type

ts
export type OperatorRegistryAgentRepoConfig = {
    mode: "auto" | "manual" | "all";
    include: string[];
    exclude: string[];
    patterns: string[];
};

OperatorRegistryAgentRoleBoundary

Kind: type

ts
export type OperatorRegistryAgentRoleBoundary = {
    allowed: string[];
    forbidden: string[];
    enforcement: string | null;
};

OperatorRegistryDelegatedTransportConfig

Kind: type

ts
export type OperatorRegistryDelegatedTransportConfig = {
    globalDefaultAlias: string | null;
};

OperatorRegistryIdentity

Kind: type

ts
export type OperatorRegistryIdentity = {
    id: string;
    kind: "agent" | "runtime";
    name: string;
    role: string | null;
    capabilities: string[];
    teamIds: string[];
    leadTeamIds: string[];
    maxConcurrentSessions: number;
};

OperatorRegistryRuntime

Kind: type

ts
export type OperatorRegistryRuntime = {
    id: string;
    name: string | null;
    role: string | null;
    namespace: string | null;
    status: string | null;
    triggers: string[];
    maxConcurrentSessions: number;
    port: number | null;
    replicas: number | null;
    endpoints: string[];
    discordBotId: string | null;
};

OperatorRegistryRuntimeConfig

Kind: type

ts
export type OperatorRegistryRuntimeConfig = {
    transports: {
        delegatedHttp: OperatorRegistryDelegatedTransportConfig;
    };
};

OperatorRegistrySkillOwnership

Kind: type

ts
export type OperatorRegistrySkillOwnership = {
    skill: string;
    owner: string;
    status: string | null;
};

OperatorRegistrySnapshot

Kind: type

ts
export type OperatorRegistrySnapshot = {
    schema: "OperatorAgentRegistryV1" | "OperatorAgentRegistryV2";
    generatedAt: number;
    sourcePath: string;
    sourceHash: string;
    agentCount: number;
    teamCount: number;
    operatorRuntime: OperatorRegistryRuntimeConfig;
    agents: OperatorRegistryAgent[];
    teams: OperatorRegistryTeam[];
    k8sCluster: OperatorRegistryRuntime[];
    identities: OperatorRegistryIdentity[];
    skillOwnership: OperatorRegistrySkillOwnership[];
};

OperatorRegistryTeam

Kind: type

ts
export type OperatorRegistryTeam = {
    id: string;
    name: string;
    teamSlug: string;
    teamCode: string;
    sectorSlug: string;
    sectorCode: string;
    portalId: string | null;
    displayName: string;
    legacyAliases: string[];
    department: string | null;
    /** Deprecated; retained for compatibility while gateway transitions to `department`. */
    kind: string | null;
    parentTeamId: string | null;
    lead: string | null;
    leadKind: "agent" | "runtime" | "external" | null;
    routeViaLead: boolean;
    mission: string | null;
    members: string[];
    runtimeIds: string[];
    memberIdentityIds: string[];
    ownsCapabilities: string[];
    maxParallel: number | null;
    dispatchTransport: string | null;
    dispatchEndpointEnv: string | null;
    dispatchPath: string | null;
    dispatchAuthScheme: string | null;
    dispatchAuthEnv: string | null;
    dispatchDefaultAlias: string | null;
    routingPolicy: string | null;
    notes: string | null;
    ancestorTeamIds: string[];
    descendantTeamIds: string[];
    teamManifest: string | null;
    headOwnedAliases: string[];
    runtimeMembers: string[];
};

OperatorSectionLoadResult

Kind: type

ts
export type OperatorSectionLoadResult<TKey extends OperatorControlSectionKey, TData> = {
    key: TKey;
    data: TData;
    status: OperatorControlSnapshot["sectionStatus"][TKey];
    contractGap: ContractGap | null;
};

OperatorSharedMemoryAuthority

Kind: type

ts
export type OperatorSharedMemoryAuthority = "qdrant" | "vector-memory" | "local-json-shim";

OperatorSharedMemoryCollection

Kind: type

ts
export type OperatorSharedMemoryCollection = "service-context" | "task-outcomes" | "contract-registry" | "channel-events";

OperatorSharedMemorySnapshot

Kind: type

ts
export type OperatorSharedMemorySnapshot = {
    authority: OperatorSharedMemoryAuthority;
    storePath: string;
    generatedAt: number;
    collections: Record<OperatorSharedMemoryCollection, OperatorMemoryCollectionSummary>;
    records: OperatorMemoryRecord[];
};

operatorTaskDiscoursePath

Kind: function

ts
export declare function operatorTaskDiscoursePath(taskId: string): string;

operatorTaskDiscoursePluginAliasPath

Kind: function

ts
export declare function operatorTaskDiscoursePluginAliasPath(taskId: string): string;

OperatorTaskDispatchMode

Kind: type

ts
export type OperatorTaskDispatchMode = "operator-task" | "kanban-native";

OperatorTaskListSnapshot

Kind: type

ts
export type OperatorTaskListSnapshot = {
    tasks: OperatorTaskRecord[];
    summary: Record<OperatorTaskState, number>;
};

OperatorTaskRecord

Kind: type

ts
export type OperatorTaskRecord = {
    envelope: {
        task_id: string;
        parent_task_id?: string | null;
        requester: {
            id: string;
            kind: string;
        };
        target: {
            capability: string;
            team_id?: string | null;
            team_slug?: string | null;
            alias?: string | null;
        };
        objective: string;
        tier: OperatorTaskTier;
        acceptance_criteria: string[];
        timeout_s: number;
    };
    receipt: {
        task_id: string;
        run_id: string;
        state: OperatorTaskState;
        owner?: string | null;
        attempt: number;
        created_at: number;
        updated_at: number;
        queue_latency_ms?: number | null;
        artifacts: string[];
        failure_code?: string | null;
    };
    events: Array<{
        id: string;
        at: number;
        state: OperatorTaskState;
        note?: string | null;
        owner?: string | null;
        failureCode?: string | null;
    }>;
    validation: {
        validation_id: string;
        validator: string;
        result: "passed" | "failed" | "waived" | "pending";
    } | null;
    outcome: {
        outcome: "success" | "partial" | "fail" | "blocked";
        verification_status: "passed" | "failed" | "waived" | "pending";
        rework_needed: boolean;
        recorded_at: number;
    } | null;
};

OperatorTaskState

Kind: type

ts
export type OperatorTaskState = "accepted" | "queued" | "started" | "retrying" | "blocked" | "completed" | "dead-letter";

OperatorTaskTier

Kind: type

ts
export type OperatorTaskTier = "LITE" | "STANDARD" | "HEAVY";

OperatorWorkerReadySnapshot

Kind: type

ts
export type OperatorWorkerReadySnapshot = {
    status: "ok" | "not-ready";
    pending: number;
    active: number;
    shuttingDown: boolean;
    auth: {
        enabled: boolean;
        scheme: "bearer" | "none";
    };
    backend: {
        mode: "memory" | "filesystem" | "redis";
        persistenceEnabled: boolean;
        stateFile: string | null;
        recoveredTasks: number;
    };
};

OperatorWorkerTaskListSnapshot

Kind: type

ts
export type OperatorWorkerTaskListSnapshot = {
    tasks: OperatorWorkerTaskRecord[];
    stats: {
        pending: number;
        active: number;
        shuttingDown: boolean;
    };
};

OperatorWorkerTaskRecord

Kind: type

ts
export type OperatorWorkerTaskRecord = {
    taskId: string;
    runId: string;
    type: string;
    priority: "low" | "normal" | "high";
    state: OperatorWorkerTaskState;
    attempt: number;
    createdAt: number;
    updatedAt: number;
    startedAt?: number;
    finishedAt?: number;
    callbackUrl?: string;
    summary?: string;
    failureCode?: string;
    output?: Record<string, unknown>;
    metadata?: Record<string, unknown>;
};

OperatorWorkerTaskState

Kind: type

ts
export type OperatorWorkerTaskState = "accepted" | "queued" | "started" | "retrying" | "completed" | "dead-letter";

OperatorWorkerTransportSnapshot

Kind: type

ts
export type OperatorWorkerTransportSnapshot = {
    dispatchTransport: string;
    role: "legacy-worker-fleet";
    configured: boolean;
    baseUrl: string | null;
    receiptTemplate: string | null;
    authScheme: "bearer" | null;
    authEnv: string | null;
    authConfigured: boolean;
};

OperatorWorkflowLane

Kind: type

ts
export type OperatorWorkflowLane = {
    teamId: string;
    teamName: string;
    department: string | null;
    /** Deprecated; retained for compatibility while gateway transitions to `department`. */
    teamKind: string | null;
    runtimeIds: string[];
    runtimeName: string | null;
    runtimeRole: string | null;
    leadName: string | null;
    leadRole: string | null;
    transport: string;
    endpoint: string | null;
    authScheme: string | null;
    authEnv: string | null;
    configured: boolean;
    authConfigured: boolean;
    dispatchReady: boolean;
    status: OperatorWorkflowLaneStatus;
    /** Human-readable reason for degraded/unconfigured, or operational note for ready manual/local lanes */
    statusDetail: string | null;
    routingPolicy: string | null;
    tasksTotal: number;
    tasksCompleted: number;
    tasksBlocked: number;
    tasksFailed: number;
    tasksDeadLetter: number;
    tasksTimeout: number;
    successRate: number;
    failureRate: number;
    avgTimeToCompleteMs: number | null;
    runsTotal: number;
    totalTokens: number;
    totalCostUsd: number;
    primaryModel?: string;
    lastActivityAt: number | null;
    queue: {
        pending: number;
        active: number;
        recovered: number;
        backendMode: "memory" | "filesystem" | "redis";
    } | null;
};

OperatorWorkflowLaneStatus

Kind: type

ts
export type OperatorWorkflowLaneStatus = "ready" | "degraded" | "unconfigured";

parseAgentSessionKey

Kind: function

ts
export declare function parseAgentSessionKey(sessionKey: string | null | undefined): ParsedAgentSessionKey | null;

ParsedAgentSessionKey

Kind: type

ts
export type ParsedAgentSessionKey = {
    agentId: string;
    rest: string;
};

parseProjectBoardCallAck

Kind: function

ts
export declare function parseProjectBoardCallAck(raw: unknown, fallback: {
    action: string;
    requestedBy: string;
    traceId: string;
}): ProjectBoardCallResult;

PORTAL_CLIENT_ID_HEADER

Kind: variable

ts
export declare const PORTAL_CLIENT_ID_HEADER: "X-Portal-Client-Id";

PORTAL_MEMORY_SNAPSHOT_CONTRACT

Kind: variable

ts
export declare const PORTAL_MEMORY_SNAPSHOT_CONTRACT: "PORTAL_MEMORY_SNAPSHOT_V1";

PortalApiClient

Kind: class

ts
export declare class PortalApiClient extends BaseHttpApiClient {
    readonly portalId: string;
    readonly request: HttpApiTransport;
    constructor(options: PortalApiClientOptions);
    protected portalPath(path: string): string;
    getDashboard<T = unknown>(): Promise<T>;
    getFromPortal<T = unknown>(relativePath: string): Promise<T>;
    postToPortal<T = unknown>(relativePath: string, body: unknown, idempotencyKey?: string): Promise<T>;
    getPortalMemorySnapshot<T = unknown>(teamSlug: string, memberId: string, memoryKey: string): Promise<T>;
}

PortalApiClientOptions

Kind: type

ts
export type PortalApiClientOptions = HttpApiClientOptions & {
    portalId: string;
};

PortalApiEnvelopeBase

Kind: type

ts
export type PortalApiEnvelopeBase = {
    clientId: string;
    portalId: string;
    teamSlug: string;
    memberId?: string;
    feature: string;
    library?: PortalLibraryRef;
};

PortalApiError

Kind: type

ts
export type PortalApiError = {
    code: string;
    message: string;
    details?: Record<string, unknown>;
};

PortalApiRequestEnvelope

Kind: type

ts
export type PortalApiRequestEnvelope<TContract extends string, TPayload> = PortalApiEnvelopeBase & {
    contract: TContract;
    requestedAt: number;
    payload: TPayload;
};

PortalApiResponseEnvelope

Kind: type

ts
export type PortalApiResponseEnvelope<TContract extends string, TData> = PortalApiEnvelopeBase & {
    contract: TContract;
    generatedAt: number;
    ok: boolean;
    data: TData;
    error?: PortalApiError;
};

portalDashboardPath

Kind: function

ts
/**
 * Generic portal dashboard route for any portal slug. The slug is supplied at
 * runtime (from the team manifest) — the package bakes in no portal/agent roster.
 */
export declare function portalDashboardPath(portalId: string): string;

PortalLibraryRef

Kind: type

ts
export type PortalLibraryRef = {
    scope: "team" | "fleet";
    libraryTeamId: string;
    ownerPortalId?: string;
};

PortalMemoryEnvelope

Kind: type

ts
export type PortalMemoryEnvelope<TSchemaContract extends string, TPayload> = {
    contract: typeof PORTAL_MEMORY_SNAPSHOT_CONTRACT;
    clientId: string;
    teamSlug: string;
    memberId: string;
    memoryKey: string;
    schemaContract: TSchemaContract;
    updatedAt: number;
    payload: TPayload;
    portalId?: string;
    feature?: string;
    library?: PortalLibraryRef;
};

PortalTtsAgentVoiceAssignment

Kind: type

ts
export type PortalTtsAgentVoiceAssignment = {
    agentKey: string;
    voiceValue: string;
    voiceId: string;
    voiceLabel: string;
    providerId?: string;
    providerLabel?: string;
    assignedAt: string;
};

PortalTtsAudioRequest

Kind: type

ts
export type PortalTtsAudioRequest = {
    text: string;
    voiceId?: string | null;
    providerId?: string | null;
    format?: string | null;
    accept?: string | null;
    options?: Record<string, GatewayMediaJsonValue>;
};

PortalTtsAudioTransport

Kind: type

ts
export type PortalTtsAudioTransport = {
    requestBlob: PortalTtsBlobRequester;
};

PortalTtsBlobRequester

Kind: type

ts
export type PortalTtsBlobRequester = (path: string, init?: Pick<HttpApiRequestInit, "body" | "headers" | "method">) => Promise<Blob>;

PortalTtsDashboardVoiceLike

Kind: type

ts
export type PortalTtsDashboardVoiceLike = {
    current_voice_id?: string;
    currentVoiceId?: string;
    current_voice_name?: string;
    currentVoiceName?: string;
    target_voice?: string;
    targetVoice?: string;
};

PortalTtsJsonRequester

Kind: type

ts
export type PortalTtsJsonRequester = <T>(path: string) => Promise<T>;

PortalTtsProviderLike

Kind: type

ts
export type PortalTtsProviderLike = {
    id: string;
    label?: string;
    name?: string;
    configured?: boolean;
    voices?: readonly (PortalTtsProviderVoiceLike | string)[];
};

PortalTtsProviderVoiceLike

Kind: type

ts
export type PortalTtsProviderVoiceLike = {
    id: string;
    name?: string;
};

PortalTtsVoiceOption

Kind: type

ts
export type PortalTtsVoiceOption = {
    value: string;
    label: string;
    detail?: string;
    source: "gateway" | "dashboard";
    voiceId: string;
    providerId?: string;
    providerLabel?: string;
    agentKey?: string;
};

postLibraryClip

Kind: function

ts
export declare function postLibraryClip<T extends LibraryClipResult = LibraryClipResult>(requestJson: LibraryClipTransport, input: LibraryClipInput, opts?: {
    timeoutMs?: number;
}): Promise<T>;

PROJECT_BOARD_CANONICAL_AVATAR_CANDIDATES

Kind: variable

ts
export declare const PROJECT_BOARD_CANONICAL_AVATAR_CANDIDATES: readonly [
    string,
    string,
    string
];

PROJECT_BOARD_FALLBACK_LIMITATIONS

Kind: variable

ts
export declare const PROJECT_BOARD_FALLBACK_LIMITATIONS: readonly [
    "Cavi Control adapter used compatibility projection for Project Board payload."
];

ProjectBoardBacklogApiItemResponse

Kind: type

ts
export type ProjectBoardBacklogApiItemResponse = {
    id: string;
    title: string;
    description: string | null;
    section: string;
    priority: ProjectBoardBacklogPriority;
    status: ProjectBoardBacklogStatus;
    tags: string[];
    createdAt: number;
    updatedAt: number;
};

ProjectBoardBacklogApiResponse

Kind: type

ts
export type ProjectBoardBacklogApiResponse = {
    sections: Array<{
        section: string;
        items: ProjectBoardBacklogApiItemResponse[];
    }>;
    priorities: Record<ProjectBoardBacklogPriority, number>;
    statusCounters: Record<ProjectBoardBacklogStatus, number>;
    totalItems: number;
    lastUpdated: number;
    storage: ProjectBoardStorageMode;
    limitations: readonly string[];
};

ProjectBoardBacklogDraft

Kind: type

ts
export type ProjectBoardBacklogDraft = {
    title: string;
    description: string;
    section: string;
    priority: ProjectBoardBacklogPriority;
    status: ProjectBoardBacklogStatus;
    tags: string[];
};

ProjectBoardBacklogItem

Kind: type

ts
export type ProjectBoardBacklogItem = {
    id: string;
    title: string;
    description: string | null;
    section: string;
    priority: ProjectBoardBacklogPriority;
    status: ProjectBoardBacklogStatus;
    tags: string[];
    createdAt: number;
    updatedAt: number;
};

projectBoardBacklogItemPath

Kind: function

ts
export declare function projectBoardBacklogItemPath(itemId: string): string;

ProjectBoardBacklogMutationPayload

Kind: type

ts
export type ProjectBoardBacklogMutationPayload = {
    title: string;
    description: string | null;
    section: string;
    priority: ProjectBoardBacklogPriority;
    status: ProjectBoardBacklogStatus;
    tags: string[];
};

ProjectBoardBacklogPriority

Kind: type

ts
export type ProjectBoardBacklogPriority = "p0" | "p1" | "p2" | "p3";

ProjectBoardBacklogSnapshot

Kind: type

ts
export type ProjectBoardBacklogSnapshot = {
    sections: Array<{
        section: string;
        items: ProjectBoardBacklogItem[];
    }>;
    priorities: Record<ProjectBoardBacklogPriority, number>;
    statusCounters: Record<ProjectBoardBacklogStatus, number>;
    totalItems: number;
    lastUpdated: number;
    storage: ProjectBoardStorageMode;
    limitations: readonly string[];
};

ProjectBoardBacklogStatus

Kind: type

ts
export type ProjectBoardBacklogStatus = "todo" | "in_progress" | "blocked" | "done";

ProjectBoardCallApiAckResponse

Kind: type

ts
export type ProjectBoardCallApiAckResponse = {
    ackId: string;
    status: "queued";
    action: string;
    requestedBy: string;
    queuedAt: number;
    queueDepth: number;
    note: string;
    storage: ProjectBoardStorageMode;
    limitations: readonly string[];
};

ProjectBoardCallRequest

Kind: type

ts
export type ProjectBoardCallRequest = {
    action: string;
    requestedBy: string;
    metadata: Record<string, string | number | boolean | null>;
};

ProjectBoardCallResult

Kind: type

ts
export type ProjectBoardCallResult = {
    ackId: string;
    status: "queued";
    action: string;
    requestedBy: string;
    queuedAt: number;
    queueDepth: number;
    note: string;
    storage: ProjectBoardStorageMode;
    limitations: readonly string[];
    traceId: string;
};

projectBoardDraftToWorkboardCreate

Kind: function

ts
export declare function projectBoardDraftToWorkboardCreate(params: {
    title: string;
    description: string | null;
    section: string;
    priority: ProjectBoardBacklogPriority;
    status: ProjectBoardBacklogStatus;
    tags: string[];
}): Record<string, unknown>;

projectBoardDraftToWorkboardPatch

Kind: function

ts
export declare function projectBoardDraftToWorkboardPatch(params: {
    title: string;
    description: string | null;
    section: string;
    priority: ProjectBoardBacklogPriority;
    tags: string[];
}): Record<string, unknown>;

ProjectBoardEmailDraft

Kind: type

ts
export type ProjectBoardEmailDraft = {
    email: string;
};

ProjectBoardEmailRecipient

Kind: type

ts
export type ProjectBoardEmailRecipient = {
    id: string;
    email: string;
};

ProjectBoardLiveHelpers

Kind: type

ts
export type ProjectBoardLiveHelpers = {
    workboardRpc?: OpenClawWorkboardRpc | null;
    loadProjectBoardWorkspaceLive: () => Promise<ProjectBoardWorkspaceSnapshot>;
    loadProjectBoardProfileForEmailMutation: () => Promise<ProjectBoardProfile>;
    persistProjectBoardEmails: (emails: string[]) => Promise<ProjectBoardProfile>;
    toBacklogMutationPayload: (draft: ProjectBoardBacklogDraft) => ProjectBoardBacklogMutationPayload;
};

ProjectBoardMutations

Kind: type

ts
export type ProjectBoardMutations = {
    createProjectBoardEmail: (draft: ProjectBoardEmailDraft) => Promise<MutationResult<{
        id: string;
        email: string;
    }>>;
    updateProjectBoardEmail: (emailId: string, draft: ProjectBoardEmailDraft) => Promise<MutationResult<{
        id: string;
        email: string;
    }>>;
    removeProjectBoardEmail: (emailId: string) => Promise<MutationResult<{
        id: string;
    }>>;
    createProjectBoardBacklogItem: (draft: ProjectBoardBacklogDraft) => Promise<MutationResult<ProjectBoardBacklogItem>>;
    updateProjectBoardBacklogItem: (itemId: string, draft: ProjectBoardBacklogDraft) => Promise<MutationResult<ProjectBoardBacklogItem>>;
    callProjectBoard: (request: ProjectBoardCallRequest) => Promise<MutationResult<ProjectBoardCallResult>>;
};

projectBoardPriorityToWorkboard

Kind: function

ts
export declare function projectBoardPriorityToWorkboard(priority: ProjectBoardBacklogPriority): OpenClawWorkboardPriority;

ProjectBoardProfile

Kind: type

ts
export type ProjectBoardProfile = {
    name: string;
    role: string;
    photoPath: string | null;
    photoUrl: string | null;
    avatarCandidates: string[];
    emails: string[];
    lastUpdated: number;
    storage: ProjectBoardStorageMode;
    limitations: readonly string[];
};

ProjectBoardProfileApiResponse

Kind: type

ts
export type ProjectBoardProfileApiResponse = {
    name: string;
    role: string;
    photoPath: string | null;
    photoUrl: string | null;
    emails: string[];
    lastUpdated: number;
    storage: ProjectBoardStorageMode;
    limitations: readonly string[];
};

ProjectBoardSprintApiResponse

Kind: type

ts
export type ProjectBoardSprintApiResponse = {
    sprint: {
        id: string;
        name: string;
        goal: string;
        startsOn: string | null;
        endsOn: string | null;
    };
    statusMetrics: {
        total: number;
        todo: number;
        inProgress: number;
        blocked: number;
        done: number;
        completionRate: number;
    };
    lastUpdated: number;
    storage: ProjectBoardStorageMode;
    limitations: readonly string[];
};

ProjectBoardSprintStatus

Kind: type

ts
export type ProjectBoardSprintStatus = {
    sprint: {
        id: string;
        name: string;
        goal: string;
        startsOn: string | null;
        endsOn: string | null;
    };
    statusMetrics: {
        total: number;
        todo: number;
        inProgress: number;
        blocked: number;
        done: number;
        completionRate: number;
    };
    lastUpdated: number;
    storage: ProjectBoardStorageMode;
    limitations: readonly string[];
};

projectBoardStatusToWorkboard

Kind: function

ts
export declare function projectBoardStatusToWorkboard(status: ProjectBoardBacklogStatus): OpenClawWorkboardStatus;

ProjectBoardStorageMode

Kind: type

ts
export type ProjectBoardStorageMode = "json-file" | "sqlite";

projectBoardWorkspaceDiagnosticRouteHint

Kind: function

ts
/** Operator-facing hint when Project Board workspace load fails (keep in sync with Project Board adapters). */
export declare function projectBoardWorkspaceDiagnosticRouteHint(): string;

projectBoardWorkspaceExpectedContractSummary

Kind: function

ts
export declare function projectBoardWorkspaceExpectedContractSummary(): string;

ProjectBoardWorkspaceSnapshot

Kind: type

ts
export type ProjectBoardWorkspaceSnapshot = {
    profile: ProjectBoardProfile;
    emails: ProjectBoardEmailRecipient[];
    sprint: ProjectBoardSprintStatus;
    backlog: ProjectBoardBacklogSnapshot;
};

requestLibraryClipDiagnostics

Kind: function

ts
export declare function requestLibraryClipDiagnostics(requestJson: LibraryClipTransport): Promise<LibraryClipDiagnosticsSnapshot>;

requestPortalTtsAudio

Kind: function

ts
export declare function requestPortalTtsAudio(transport: PortalTtsAudioTransport, ttsPath: string, body: PortalTtsAudioRequest): Promise<Blob>;

requestPortalTtsProviders

Kind: function

ts
export declare function requestPortalTtsProviders(requestJson: PortalTtsJsonRequester, providersPath: string): Promise<unknown>;

resetCanonicalOperatorRegistry

Kind: function

ts
export declare function resetCanonicalOperatorRegistry(): void;

resetTeamRegistryConfig

Kind: function

ts
export declare function resetTeamRegistryConfig(): void;

resolveCaviPath

Kind: variable

ts
export declare const resolveCaviPath: import("../../../index.js").SurfacePathResolver;

resolveCompiledCanonicalTeam

Kind: function

ts
export declare function resolveCompiledCanonicalTeam(identifier: string | null | undefined): OperatorRegistryTeam | null;

resolveGatewayHttpBase

Kind: function

ts
export declare function resolveGatewayHttpBase(gatewayBaseUrl: string): string;

resolveGatewayHttpUrl

Kind: function

ts
export declare function resolveGatewayHttpUrl(gatewayBaseUrl: string, pathname: string): string;

resolveGatewayWsUrl

Kind: function

ts
export declare function resolveGatewayWsUrl(gatewayBaseUrl: string): string;

resolveHttpApiConfigFromEnv

Kind: function

ts
export declare function resolveHttpApiConfigFromEnv(env: HttpApiEnvSource, options?: ResolveHttpApiConfigOptions): HttpApiResolvedConfig;

ResolveHttpApiConfigOptions

Kind: type

ts
export type ResolveHttpApiConfigOptions = {
    defaults?: Partial<HttpApiResolvedConfig>;
    trimValues?: boolean;
    includeAliases?: boolean;
};

resolveLibraryApiPath

Kind: function

ts
export declare function resolveLibraryApiPath(path: string): string;

resolveLibraryRefByTeamIdentity

Kind: function

ts
export declare function resolveLibraryRefByTeamIdentity(value: string | null | undefined): PortalLibraryRef | null;

resolveMemoryScope

Kind: function

ts
/**
 * Resolve a harness-native agent/team name to its canonical memory scope:
 *   - matches a member → `{ domain: team.id, member: member.id }`
 *   - matches a team   → `{ domain: team.id }`
 *   - no match         → `undefined` (caller skips that name)
 *
 * Member matches win over team matches (more specific). Matching is case-insensitive across
 * the canonical id plus the identity's slug/name/displayName/code/aliases.
 */
export declare function resolveMemoryScope(manifest: TeamManifest, name: string): MemoryScope | undefined;

resolveOperatorTaskDispatchContract

Kind: function

ts
export declare function resolveOperatorTaskDispatchContract(mode: OperatorTaskDispatchMode): MobileGatewayEndpointContract;

resolveOperatorTaskDispatchPath

Kind: function

ts
export declare function resolveOperatorTaskDispatchPath(mode?: OperatorTaskDispatchMode): string;

resolvePath

Kind: variable

ts
export declare const resolvePath: import("../../../index.js").SurfacePathResolver;

resolvePortalApiPath

Kind: function

ts
export declare function resolvePortalApiPath(portalId: string, relativePath: string): string;

resolvePortalLibraryRef

Kind: function

ts
export declare function resolvePortalLibraryRef(portalId: string): PortalLibraryRef | null;

resolvePortalPrimarySessionKey

Kind: function

ts
export declare function resolvePortalPrimarySessionKey(params: {
    portalId: CaviTeamPortalId;
    suffix?: string | null;
}): string | null;

resolveProjectBoardAssetPath

Kind: function

ts
export declare function resolveProjectBoardAssetPath(fileName: string): string;

resolvePublicAsset

Kind: function

ts
/** Static files under `public/` (`/agents`, `/angels`, …) for Vite `base` deployments. */
export declare function resolvePublicAsset(pathname: string): string;

resolveSessionApiPath

Kind: function

ts
export declare function resolveSessionApiPath(pathname: string): string;

resolveTeamFromCollection

Kind: function

ts
export declare function resolveTeamFromCollection(teams: readonly OperatorRegistryTeam[], identifier: string | null | undefined): OperatorRegistryTeam | null;

resolveTeamSessionAgentId

Kind: function

ts
export declare function resolveTeamSessionAgentId(params: {
    teamId?: string | null;
    operatorTeamId?: string | null;
    operatorTeamSlug?: string | null;
    agentAlias?: string | null;
}): string | null;

resolveTeamSessionKey

Kind: function

ts
export declare function resolveTeamSessionKey(params: {
    teamId?: string | null;
    operatorTeamId?: string | null;
    operatorTeamSlug?: string | null;
    agentAlias?: string | null;
    suffix?: string | null;
}): string | null;

Kind: type

ts
export type RunTaskLinkCandidate = {
    runKey: string;
    taskId: string | null;
};

sessionKeysEqual

Kind: function

ts
export declare function sessionKeysEqual(left: string | null | undefined, right: string | null | undefined): boolean;

sortBacklogItems

Kind: function

ts
export declare function sortBacklogItems(items: ProjectBoardBacklogApiItemResponse[]): ProjectBoardBacklogApiItemResponse[];

SURFACE_CONTRACTS

Kind: variable

ts
export declare const SURFACE_CONTRACTS: Record<string, SurfaceContract>;

SurfaceContract

Kind: type

ts
export type SurfaceContract = {
    key: string;
    method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
    path: (params?: Record<string, string>) => string;
    degradation: "hard" | "gap" | "silent";
    owner: string;
    note: string;
};

TaskDiscourseAgent

Kind: type

ts
export type TaskDiscourseAgent = {
    agentId: string;
    role: string;
    eventCount: number;
    tokensUsed: number;
    costUsd: number;
};

taskDiscourseExpectedContractSummary

Kind: function

ts
export declare function taskDiscourseExpectedContractSummary(): string;

TaskDiscourseSnapshot

Kind: type

ts
export type TaskDiscourseSnapshot = {
    rootTaskId: string;
    agents: TaskDiscourseAgent[];
    events: DiscourseEvent[];
    delegationTree: DelegationNode[];
    summary: TaskDiscourseSummary;
};

TaskDiscourseSummary

Kind: type

ts
export type TaskDiscourseSummary = {
    totalAgents: number;
    totalEvents: number;
    totalTokens: number;
    totalCostUsd: number;
    durationMs: number | null;
    blockerCount: number;
    decisionCount: number;
    outcome: "success" | "partial" | "fail" | "blocked" | "pending";
};

TaskObservabilitySummary

Kind: type

ts
export type TaskObservabilitySummary = {
    taskId: string;
    taskState: OperatorTaskState | null;
    taskObjective: string | null;
    taskOwner: string | null;
    teamId: string | null;
    verification: string | null;
    primaryRunKey: string | null;
    runStatus: AgentRunStatus | null;
    runUpdatedAt: number | null;
    totalTokens: number | null;
    totalCostUsd: number | null;
    errorCount: number;
    model: string | null;
    provider: string | null;
    degraded: boolean;
    discourseTaskId: string;
};

TEAM_REGISTRY_CONFIG

Kind: variable

ts
export declare const TEAM_REGISTRY_CONFIG: TeamRegistryConfig;

TeamLibraryStatus

Kind: type

ts
export type TeamLibraryStatus = {
    teamId: string;
    teamName: string;
    lead: string;
    inboxCount: number;
    candidatesCount: number;
    promotedCount: number;
    rejectedCount: number;
    recentPromotions: Array<{
        id: string;
        title: string;
        note_type: LibraryNoteType;
        promoted_at: string;
        promoted_by: string;
        /** When set, mobile/web can open this path in the gateway wiki vault reader. */
        wiki_path?: string;
    }>;
    qmdHealth: {
        lastIndexedAt: number | null;
        collectionSize: number;
        healthy: boolean;
    };
};

TeamRegistry

Kind: interface

ts
export interface TeamRegistry {
    readonly provider: TeamRegistryProviderKind;
    listTeams(): OperatorRegistryTeam[];
    listPortalIds(): string[];
    getTeamLookupKeys(team: OperatorRegistryTeam): string[];
    resolveTeam(identifier: string | null | undefined): OperatorRegistryTeam | null;
    requireTeam(identifier: string | null | undefined): OperatorRegistryTeam;
    getPortalTeam(portalId: string | null | undefined): OperatorRegistryTeam;
    getPortalTeamCode(portalId: string | null | undefined): string;
    getPortalTeamSlug(portalId: string | null | undefined): string;
    getPortalTeamSectorSlug(portalId: string | null | undefined): string;
    getFleetLibraryRef(): PortalLibraryRef | null;
    resolvePortalLibraryRef(portalId: string | null | undefined): PortalLibraryRef | null;
    resolveLibraryRefByTeamIdentity(value: string | null | undefined): PortalLibraryRef | null;
    listLibraryRefs(): PortalLibraryRef[];
}

TeamRegistryConfig

Kind: type

ts
export type TeamRegistryConfig = {
    provider?: TeamRegistryProviderKind | null;
    manifest?: Partial<TeamManifest> | null;
    teams?: readonly TeamRegistryTeamConfig[] | null;
    libraries?: TeamRegistryLibraryConfig | null;
    snapshot?: Pick<OperatorRegistrySnapshot, "teams"> | null;
};

TeamRegistryLibraryConfig

Kind: type

ts
export type TeamRegistryLibraryConfig = {
    fleet?: TeamRegistryLibraryRefConfig | null;
    teams?: readonly TeamRegistryLibraryRefConfig[] | null;
};

TeamRegistryLibraryRefConfig

Kind: type

ts
export type TeamRegistryLibraryRefConfig = PortalLibraryRef & {
    lookupKeys?: readonly string[];
};

TeamRegistryProviderKind

Kind: type

ts
export type TeamRegistryProviderKind = "gateway" | "hermes" | "openclaw" | (string & {});

TeamRegistryTeamConfig

Kind: type

ts
export type TeamRegistryTeamConfig = Partial<OperatorRegistryTeam> & {
    id: string;
    name?: string | null;
};

toProjectBoardProfile

Kind: function

ts
export declare function toProjectBoardProfile(raw: unknown): ProjectBoardProfile;

toProjectBoardWorkspaceFromCompatPayload

Kind: function

ts
export declare function toProjectBoardWorkspaceFromCompatPayload(raw: unknown): ProjectBoardWorkspaceSnapshot;

toProjectBoardWorkspaceSnapshot

Kind: function

ts
export declare function toProjectBoardWorkspaceSnapshot(params: {
    profilePayload: unknown;
    sprintPayload: unknown;
    backlogPayload: unknown;
}): ProjectBoardWorkspaceSnapshot;

withCaviControlOperatorCapabilities

Kind: function

ts
/**
 * Augment a base provider/gateway capabilities object with the CAVI Control
 * operator plane (status / snapshot / tasks endpoints + operator RPC methods).
 *
 * This is **plugin-gated**: the operator plane only exists when the cavi-control
 * plugin is installed on the target harness (the same cavi-control plugin runs on
 * OpenClaw and Hermes). It deliberately lives in `extensions/cavi`, not
 * in any provider, so the base OpenClaw/Hermes clients never assume a CAVI plugin
 * is present. A consumer that runs the plugin composes the operator surface on
 * top of the harness-native capabilities here.
 *
 * Provider-agnostic by design — pass any `GatewayCapabilities` (OpenClaw, Hermes,
 * or another harness) and get the same operator augmentation.
 */
export declare function withCaviControlOperatorCapabilities<T extends GatewayCapabilities & {
    rpcMethods?: readonly string[];
}>(base: T): T;

withRuntimeBasePath

Kind: function

ts
export declare function withRuntimeBasePath(pathname: string): string;

workboardCardsToProjectBoardWorkspace

Kind: function

ts
export declare function workboardCardsToProjectBoardWorkspace(cards: readonly OpenClawWorkboardCard[]): ProjectBoardWorkspaceSnapshot;

workboardCardToProjectBoardBacklogItem

Kind: function

ts
export declare function workboardCardToProjectBoardBacklogItem(card: OpenClawWorkboardCard): ProjectBoardBacklogItem;

workboardPriorityToProjectBoard

Kind: function

ts
export declare function workboardPriorityToProjectBoard(priority: OpenClawWorkboardPriority): ProjectBoardBacklogPriority;

workboardStatusToProjectBoard

Kind: function

ts
export declare function workboardStatusToProjectBoard(status: OpenClawWorkboardStatus): ProjectBoardBacklogStatus;