/** * VectorHttpHandler - 纯向量存储 HTTP API * * 提供 /-/vector 端点,只负责向量的存储和搜索,不访问 Pod 数据。 * AI embedding 生成、credential 管理等逻辑由外部 API Server 处理。 * * 端点设计: * - POST /-/vector/upsert - 存入向量 * - POST /-/vector/search - 搜索向量(只接受向量输入) * - DELETE /-/vector/delete - 删除向量 * - GET /-/vector/status - 索引状态 */ import { HttpHandler } from '@solid/community-server'; import type { HttpHandlerInput } from '@solid/community-server'; import type { CredentialsExtractor, PermissionReader, Authorizer } from '@solid/community-server'; import { VectorStore } from '../../storage/vector/VectorStore'; interface VectorHttpHandlerOptions { vectorStore: VectorStore; credentialsExtractor: CredentialsExtractor; permissionReader: PermissionReader; authorizer: Authorizer; sidecarPath?: string; } export declare class VectorHttpHandler extends HttpHandler { protected readonly logger: import("global-logger-factory").Logger; private readonly vectorStore; private readonly credentialsExtractor; private readonly permissionReader; private readonly authorizer; private readonly sidecarPath; constructor(options: VectorHttpHandlerOptions); canHandle({ request }: HttpHandlerInput): Promise; handle({ request, response }: HttpHandlerInput): Promise; private handleUpsert; private handleSearch; private handleDelete; private handleStatus; private handleError; private authorizeFor; private authorizeForWithBodyDrain; private parseUrl; private readJsonBody; private drainRequest; private sendJsonResponse; private sendErrorResponse; private writeOptions; } export {};