@undefineds.co/xpod 0.3.17 → 0.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/bun.json +57 -11
- package/config/cloud.json +14 -12
- package/config/local.json +16 -14
- package/config/xpod.json +47 -9
- package/dist/api/matrix/PodMatrixStore.d.ts +4 -7
- package/dist/api/matrix/PodMatrixStore.js +116 -148
- package/dist/api/matrix/PodMatrixStore.js.map +1 -1
- package/dist/api/matrix/types.d.ts +2 -0
- package/dist/api/matrix/types.js.map +1 -1
- package/dist/components/components.jsonld +3 -0
- package/dist/components/context.jsonld +71 -32
- package/dist/http/SubgraphSparqlHttpHandler.d.ts +1 -0
- package/dist/http/SubgraphSparqlHttpHandler.js +27 -4
- package/dist/http/SubgraphSparqlHttpHandler.js.map +1 -1
- package/dist/http/SubgraphSparqlHttpHandler.jsonld +4 -0
- package/dist/http/vector/VectorHttpHandler.d.ts +5 -1
- package/dist/http/vector/VectorHttpHandler.js +5 -5
- package/dist/http/vector/VectorHttpHandler.js.map +1 -1
- package/dist/http/vector/VectorHttpHandler.jsonld +40 -28
- package/dist/index.d.ts +5 -3
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/runtime/Proxy.d.ts +3 -0
- package/dist/runtime/Proxy.js +31 -7
- package/dist/runtime/Proxy.js.map +1 -1
- package/dist/storage/SparqlUpdateResourceStore.js +94 -33
- package/dist/storage/SparqlUpdateResourceStore.js.map +1 -1
- package/dist/storage/accessors/MixDataAccessor.d.ts +22 -5
- package/dist/storage/accessors/MixDataAccessor.js +376 -61
- package/dist/storage/accessors/MixDataAccessor.js.map +1 -1
- package/dist/storage/accessors/MixDataAccessor.jsonld +73 -5
- package/dist/storage/accessors/QuadstoreSparqlDataAccessor.js +32 -10
- package/dist/storage/accessors/QuadstoreSparqlDataAccessor.js.map +1 -1
- package/dist/storage/accessors/QuintStoreSparqlDataAccessor.js +28 -6
- package/dist/storage/accessors/QuintStoreSparqlDataAccessor.js.map +1 -1
- package/dist/storage/accessors/SolidRdfDataAccessor.d.ts +45 -0
- package/dist/storage/accessors/SolidRdfDataAccessor.js +277 -0
- package/dist/storage/accessors/SolidRdfDataAccessor.js.map +1 -0
- package/dist/storage/accessors/SolidRdfDataAccessor.jsonld +161 -0
- package/dist/storage/rdf/Rdf3xIndex.d.ts +122 -0
- package/dist/storage/rdf/Rdf3xIndex.js +2695 -0
- package/dist/storage/rdf/Rdf3xIndex.js.map +1 -0
- package/dist/storage/rdf/Rdf3xIndex.jsonld +528 -0
- package/dist/storage/rdf/Rdf3xSchema.d.ts +20 -0
- package/dist/storage/rdf/Rdf3xSchema.js +65 -0
- package/dist/storage/rdf/Rdf3xSchema.js.map +1 -0
- package/dist/storage/rdf/RdfLocalQueryEngine.d.ts +10 -4
- package/dist/storage/rdf/RdfLocalQueryEngine.js +607 -127
- package/dist/storage/rdf/RdfLocalQueryEngine.js.map +1 -1
- package/dist/storage/rdf/RdfQuadIndex.d.ts +12 -1
- package/dist/storage/rdf/RdfQuadIndex.js +152 -22
- package/dist/storage/rdf/RdfQuadIndex.js.map +1 -1
- package/dist/storage/rdf/RdfQuadIndex.jsonld +36 -4
- package/dist/storage/rdf/RdfSparqlAdapter.d.ts +20 -2
- package/dist/storage/rdf/RdfSparqlAdapter.js +364 -40
- package/dist/storage/rdf/RdfSparqlAdapter.js.map +1 -1
- package/dist/storage/rdf/RdfSparqlAdapter.jsonld +60 -0
- package/dist/storage/rdf/RdfTermDictionary.d.ts +8 -0
- package/dist/storage/rdf/RdfTermDictionary.js +141 -70
- package/dist/storage/rdf/RdfTermDictionary.js.map +1 -1
- package/dist/storage/rdf/RdfTermDictionary.jsonld +24 -0
- package/dist/storage/rdf/RdfTextIndex.js +10 -3
- package/dist/storage/rdf/RdfTextIndex.js.map +1 -1
- package/dist/storage/rdf/SolidRdfEngine.d.ts +15 -6
- package/dist/storage/rdf/SolidRdfEngine.js +218 -25
- package/dist/storage/rdf/SolidRdfEngine.js.map +1 -1
- package/dist/storage/rdf/SolidRdfEngine.jsonld +70 -7
- package/dist/storage/rdf/SolidRdfSparqlEngine.d.ts +11 -7
- package/dist/storage/rdf/SolidRdfSparqlEngine.js +60 -47
- package/dist/storage/rdf/SolidRdfSparqlEngine.js.map +1 -1
- package/dist/storage/rdf/SolidRdfSparqlEngine.jsonld +9 -5
- package/dist/storage/rdf/index.d.ts +2 -2
- package/dist/storage/rdf/index.js +3 -3
- package/dist/storage/rdf/index.js.map +1 -1
- package/dist/storage/rdf/models-benchmark.d.ts +12 -1
- package/dist/storage/rdf/models-benchmark.js +549 -32
- package/dist/storage/rdf/models-benchmark.js.map +1 -1
- package/dist/storage/rdf/types.d.ts +81 -7
- package/dist/storage/rdf/types.js.map +1 -1
- package/dist/storage/sparql/CompatibilitySparqlEngine.d.ts +36 -0
- package/dist/storage/sparql/CompatibilitySparqlEngine.js +96 -0
- package/dist/storage/sparql/CompatibilitySparqlEngine.js.map +1 -0
- package/dist/storage/sparql/CompatibilitySparqlEngine.jsonld +123 -0
- package/dist/storage/sparql/CompatibilitySparqlEngineImpl.d.ts +35 -0
- package/dist/storage/sparql/CompatibilitySparqlEngineImpl.js +112 -0
- package/dist/storage/sparql/CompatibilitySparqlEngineImpl.js.map +1 -0
- package/dist/storage/sparql/SubgraphQueryEngine.d.ts +1 -36
- package/dist/storage/sparql/SubgraphQueryEngine.js +2 -115
- package/dist/storage/sparql/SubgraphQueryEngine.js.map +1 -1
- package/dist/storage/sparql/SubgraphQueryEngine.jsonld +1 -124
- package/dist/terminal/AclPermissionService.d.ts +2 -1
- package/dist/terminal/AclPermissionService.js +26 -3
- package/dist/terminal/AclPermissionService.js.map +1 -1
- package/dist/terminal/TerminalSessionManager.js +25 -3
- package/dist/terminal/TerminalSessionManager.js.map +1 -1
- package/package.json +1 -1
- package/dist/storage/rdf/Rdf3xTripleIndex.d.ts +0 -55
- package/dist/storage/rdf/Rdf3xTripleIndex.js +0 -1235
- package/dist/storage/rdf/Rdf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,CAAC,CACH,CAAC;IACJ,CAAC;IAEO,YAAY,CAAC,QAAsB;QACzC,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE;YACtB,8BAA8B,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1D,8BAA8B,EAAE,6BAA6B;SAC9D,CAAC,CAAC;QACH,QAAQ,CAAC,GAAG,EAAE,CAAC;IACjB,CAAC;CACF;AAnVD,8CAmVC","sourcesContent":["/**\n * VectorHttpHandler - 纯向量存储 HTTP API\n *\n * 提供 /-/vector 端点,只负责向量的存储和搜索,不访问 Pod 数据。\n * AI embedding 生成、credential 管理等逻辑由外部 API Server 处理。\n *\n * 端点设计:\n * - POST /-/vector/upsert - 存入向量\n * - POST /-/vector/search - 搜索向量(只接受向量输入)\n * - DELETE /-/vector/delete - 删除向量\n * - GET /-/vector/status - 索引状态\n */\n\nimport { getLoggerFor } from 'global-logger-factory';\nimport { HttpHandler } from '@solid/community-server';\nimport type { HttpHandlerInput, HttpRequest, HttpResponse } from '@solid/community-server';\nimport {\n NotImplementedHttpError,\n MethodNotAllowedHttpError,\n HttpError,\n IdentifierSetMultiMap,\n} from '@solid/community-server';\nimport { PERMISSIONS } from '@solidlab/policy-engine';\nimport type { CredentialsExtractor, PermissionReader, Authorizer, ResourceIdentifier } from '@solid/community-server';\nimport { VectorStore } from '../../storage/vector/VectorStore';\nimport type { VectorSearchOptions, VectorSearchResult } from '../../storage/vector/types';\n\nconst ALLOWED_METHODS = ['GET', 'POST', 'DELETE', 'OPTIONS'];\n\n// ============================================\n// 统一错误处理\n// ============================================\n\ntype VectorErrorCode =\n | 'INVALID_REQUEST'\n | 'UNAUTHORIZED'\n | 'FORBIDDEN'\n | 'NOT_FOUND'\n | 'DIMENSION_MISMATCH'\n | 'STORAGE_ERROR';\n\nclass VectorApiError extends Error {\n constructor(\n public readonly code: VectorErrorCode,\n public readonly statusCode: number,\n message: string,\n public readonly details?: Record<string, unknown>,\n ) {\n super(message);\n this.name = 'VectorApiError';\n }\n\n static invalidRequest(message: string, details?: Record<string, unknown>): VectorApiError {\n return new VectorApiError('INVALID_REQUEST', 400, message, details);\n }\n\n static unauthorized(message: string): VectorApiError {\n return new VectorApiError('UNAUTHORIZED', 401, message);\n }\n\n static notFound(action: string): VectorApiError {\n return new VectorApiError('NOT_FOUND', 404, `Unknown vector action: ${action}`);\n }\n\n static dimensionMismatch(expected: number, actual: number): VectorApiError {\n return new VectorApiError('DIMENSION_MISMATCH', 422, `Vector dimension mismatch: expected ${expected}, got ${actual}`, {\n expected,\n actual,\n });\n }\n\n static storageError(message: string): VectorApiError {\n return new VectorApiError('STORAGE_ERROR', 500, message);\n }\n}\n\n// ============================================\n// 请求/响应类型\n// ============================================\n\ninterface UpsertRequest {\n /** 模型名,如 text-embedding-004 */\n model: string;\n /** 要存入的向量列表 */\n vectors: {\n /** 向量 ID(通常是 subject URI 的哈希) */\n id: number;\n /** 向量数据 */\n vector: number[];\n /** 可选的元数据 */\n metadata?: Record<string, unknown>;\n }[];\n}\n\ninterface SearchRequest {\n /** 模型名 */\n model: string;\n /** 查询向量 */\n vector: number[];\n /** 返回结果数量,默认 10 */\n limit?: number;\n /** 相似度阈值 */\n threshold?: number;\n /** 排除的 ID 列表 */\n excludeIds?: number[];\n}\n\ninterface DeleteRequest {\n /** 模型名 */\n model: string;\n /** 要删除的向量 ID 列表 */\n ids: number[];\n}\n\ninterface VectorHttpHandlerOptions {\n sidecarPath?: string;\n}\n\nexport class VectorHttpHandler extends HttpHandler {\n protected readonly logger = getLoggerFor(this);\n\n private readonly vectorStore: VectorStore;\n private readonly credentialsExtractor: CredentialsExtractor;\n private readonly permissionReader: PermissionReader;\n private readonly authorizer: Authorizer;\n private readonly sidecarPath: string;\n\n public constructor(\n vectorStore: VectorStore,\n credentialsExtractor: CredentialsExtractor,\n permissionReader: PermissionReader,\n authorizer: Authorizer,\n options: VectorHttpHandlerOptions = {},\n ) {\n super();\n this.vectorStore = vectorStore;\n this.credentialsExtractor = credentialsExtractor;\n this.permissionReader = permissionReader;\n this.authorizer = authorizer;\n this.sidecarPath = options.sidecarPath ?? '/-/vector';\n }\n\n public override async canHandle({ request }: HttpHandlerInput): Promise<void> {\n const path = this.parseUrl(request).pathname;\n if (!path.includes(this.sidecarPath)) {\n throw new NotImplementedHttpError('Request is not targeting a vector endpoint.');\n }\n }\n\n public override async handle({ request, response }: HttpHandlerInput): Promise<void> {\n const method = (request.method ?? 'GET').toUpperCase();\n\n if (method === 'OPTIONS') {\n this.writeOptions(response);\n return;\n }\n\n if (!ALLOWED_METHODS.includes(method)) {\n throw new MethodNotAllowedHttpError(ALLOWED_METHODS);\n }\n\n try {\n const url = this.parseUrl(request);\n const path = decodeURIComponent(url.pathname);\n\n const sidecarIndex = path.indexOf(this.sidecarPath);\n if (sidecarIndex === -1) {\n throw new NotImplementedHttpError('Request is not targeting a vector endpoint.');\n }\n\n let basePath = path.slice(0, sidecarIndex);\n if (!basePath.endsWith('/')) {\n basePath = `${basePath}/`;\n }\n\n const actionPath = path.slice(sidecarIndex + this.sidecarPath.length);\n const action = actionPath.replace(/^\\//, '').split('/')[0] || '';\n\n const origin = `${url.protocol}//${url.host}`;\n const baseUrl = `${origin}${basePath}`;\n\n this.logger.debug(`Vector request: ${method} ${path}, action=${action}, baseUrl=${baseUrl}`);\n\n switch (action) {\n case 'upsert':\n await this.handleUpsert(request, response, baseUrl, method);\n break;\n case 'search':\n await this.handleSearch(request, response, baseUrl, method);\n break;\n case 'delete':\n await this.handleDelete(request, response, baseUrl, method);\n break;\n case 'status':\n case 'stats':\n await this.handleStatus(request, response, baseUrl, method);\n break;\n default:\n throw VectorApiError.notFound(action);\n }\n } catch (error: unknown) {\n this.handleError(response, error);\n }\n }\n\n // ============================================\n // HTTP Handlers\n // ============================================\n\n private async handleUpsert(request: HttpRequest, response: HttpResponse, baseUrl: string, method: string): Promise<void> {\n if (method !== 'POST') {\n throw new MethodNotAllowedHttpError(['POST']);\n }\n\n const startTime = Date.now();\n await this.authorizeForWithBodyDrain(baseUrl, request, [PERMISSIONS.Append]);\n\n const body = await this.readJsonBody<UpsertRequest>(request);\n\n if (!body.model) {\n throw VectorApiError.invalidRequest('Missing \"model\" field');\n }\n\n if (!Array.isArray(body.vectors) || body.vectors.length === 0) {\n throw VectorApiError.invalidRequest('Missing or empty \"vectors\" field');\n }\n\n // 确保向量表存在\n await this.vectorStore.ensureVectorTable(body.model);\n\n let upserted = 0;\n const errors: string[] = [];\n\n for (const item of body.vectors) {\n try {\n if (typeof item.id !== 'number') {\n throw new Error('Invalid id: must be a number');\n }\n if (!Array.isArray(item.vector) || item.vector.length === 0) {\n throw new Error('Invalid vector: must be a non-empty array');\n }\n\n await this.vectorStore.upsertVector(body.model, item.id, item.vector);\n upserted++;\n } catch (err) {\n errors.push(`id=${item.id}: ${err instanceof Error ? err.message : String(err)}`);\n }\n }\n\n this.sendJsonResponse(response, {\n upserted,\n errors,\n took_ms: Date.now() - startTime,\n });\n }\n\n private async handleSearch(request: HttpRequest, response: HttpResponse, baseUrl: string, method: string): Promise<void> {\n if (method !== 'POST') {\n throw new MethodNotAllowedHttpError(['POST']);\n }\n\n const startTime = Date.now();\n await this.authorizeForWithBodyDrain(baseUrl, request, [PERMISSIONS.Read]);\n\n const body = await this.readJsonBody<SearchRequest>(request);\n\n if (!body.model) {\n throw VectorApiError.invalidRequest('Missing \"model\" field');\n }\n\n if (!Array.isArray(body.vector) || body.vector.length === 0) {\n throw VectorApiError.invalidRequest('Missing or empty \"vector\" field');\n }\n\n const searchOptions: VectorSearchOptions = {\n limit: body.limit ?? 10,\n threshold: body.threshold,\n excludeIds: body.excludeIds ? new Set(body.excludeIds) : undefined,\n };\n\n const results = await this.vectorStore.search(body.model, body.vector, searchOptions);\n\n this.sendJsonResponse(response, {\n results: results.map((r: VectorSearchResult) => ({\n id: r.id,\n score: r.score,\n distance: r.distance,\n })),\n model: body.model,\n took_ms: Date.now() - startTime,\n });\n }\n\n private async handleDelete(request: HttpRequest, response: HttpResponse, baseUrl: string, method: string): Promise<void> {\n if (method !== 'POST' && method !== 'DELETE') {\n throw new MethodNotAllowedHttpError(['POST', 'DELETE']);\n }\n\n const startTime = Date.now();\n // 使用 Modify 权限,因为删除向量是对向量存储的修改操作\n await this.authorizeForWithBodyDrain(baseUrl, request, [PERMISSIONS.Modify]);\n\n const body = await this.readJsonBody<DeleteRequest>(request);\n\n if (!body.model) {\n throw VectorApiError.invalidRequest('Missing \"model\" field');\n }\n\n if (!Array.isArray(body.ids) || body.ids.length === 0) {\n throw VectorApiError.invalidRequest('Missing or empty \"ids\" field');\n }\n\n let deleted = 0;\n const errors: string[] = [];\n\n for (const id of body.ids) {\n try {\n await this.vectorStore.deleteVector(body.model, id);\n deleted++;\n } catch (err) {\n errors.push(`id=${id}: ${err instanceof Error ? err.message : String(err)}`);\n }\n }\n\n this.sendJsonResponse(response, {\n deleted,\n errors,\n took_ms: Date.now() - startTime,\n });\n }\n\n private async handleStatus(request: HttpRequest, response: HttpResponse, baseUrl: string, method: string): Promise<void> {\n if (method !== 'GET') {\n throw new MethodNotAllowedHttpError(['GET']);\n }\n\n await this.authorizeFor(baseUrl, request, [PERMISSIONS.Read]);\n\n // 获取所有模型的向量统计\n const tables = await this.vectorStore.listVectorTables();\n const byModel: { model: string; count: number }[] = [];\n let totalCount = 0;\n\n for (const table of tables) {\n const count = await this.vectorStore.countVectors(table);\n byModel.push({ model: table, count });\n totalCount += count;\n }\n\n this.sendJsonResponse(response, { byModel, totalCount });\n }\n\n // ============================================\n // 辅助方法\n // ============================================\n\n private handleError(response: HttpResponse, error: unknown): void {\n if (error instanceof VectorApiError) {\n this.logger.error(`Vector API error [${error.code}]: ${error.message}`);\n this.sendErrorResponse(response, error);\n return;\n }\n\n if (error instanceof HttpError) {\n const errorMsg = error.message || error.name || `HTTP ${error.statusCode}`;\n this.logger.error(`HTTP error ${error.statusCode}: ${errorMsg}`);\n this.sendErrorResponse(response, new VectorApiError('INVALID_REQUEST', error.statusCode, errorMsg));\n return;\n }\n\n const errorMsg = error instanceof Error ? error.message : String(error);\n this.logger.error(`Unexpected error: ${errorMsg}`);\n this.sendErrorResponse(response, VectorApiError.storageError(errorMsg || 'Internal server error'));\n }\n\n private async authorizeFor(baseUrl: string, request: HttpRequest, permissions: typeof PERMISSIONS[keyof typeof PERMISSIONS][]): Promise<void> {\n const credentials = await this.credentialsExtractor.handleSafe(request);\n const identifier: ResourceIdentifier = { path: baseUrl };\n const requestedModes = new IdentifierSetMultiMap([[identifier, permissions]] as any);\n\n const availablePermissions = await this.permissionReader.handleSafe({ credentials, identifier, requestedModes } as any);\n\n this.logger.debug(`authorizeFor: baseUrl=${baseUrl}, webId=${credentials.agent?.webId}, requested=${permissions}`);\n\n await this.authorizer.handleSafe({ credentials, identifier, requestedModes, availablePermissions } as any);\n }\n\n private async authorizeForWithBodyDrain(\n baseUrl: string,\n request: HttpRequest,\n permissions: typeof PERMISSIONS[keyof typeof PERMISSIONS][],\n ): Promise<void> {\n try {\n await this.authorizeFor(baseUrl, request, permissions);\n } catch (error: unknown) {\n await this.drainRequest(request);\n throw error;\n }\n }\n\n private parseUrl(request: HttpRequest): URL {\n const protocol = request.headers['x-forwarded-proto'] || 'http';\n const host = request.headers['x-forwarded-host'] || request.headers.host || 'localhost';\n return new URL(request.url!, `${protocol}://${host}`);\n }\n\n private async readJsonBody<T>(request: HttpRequest): Promise<T> {\n const chunks: Buffer[] = [];\n for await (const chunk of request) {\n chunks.push(chunk);\n }\n const body = Buffer.concat(chunks).toString('utf8');\n try {\n return JSON.parse(body) as T;\n } catch {\n throw VectorApiError.invalidRequest('Invalid JSON body');\n }\n }\n\n private async drainRequest(request: HttpRequest): Promise<void> {\n try {\n for await (const _chunk of request) {\n }\n } catch {\n }\n }\n\n private sendJsonResponse(response: HttpResponse, data: unknown, status = 200): void {\n response.writeHead(status, {\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache',\n });\n response.end(JSON.stringify(data));\n }\n\n private sendErrorResponse(response: HttpResponse, error: VectorApiError): void {\n response.writeHead(error.statusCode, {\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache',\n });\n response.end(\n JSON.stringify({\n error: true,\n code: error.code,\n message: error.message,\n details: error.details,\n }),\n );\n }\n\n private writeOptions(response: HttpResponse): void {\n response.writeHead(204, {\n 'Access-Control-Allow-Methods': ALLOWED_METHODS.join(', '),\n 'Access-Control-Allow-Headers': 'Content-Type, Authorization',\n });\n response.end();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"VectorHttpHandler.js","sourceRoot":"","sources":["../../../src/http/vector/VectorHttpHandler.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAEH,iEAAqD;AACrD,8DAAsD;AAEtD,8DAKiC;AACjC,2DAAsD;AAKtD,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAc7D,MAAM,cAAe,SAAQ,KAAK;IAChC,YACkB,IAAqB,EACrB,UAAkB,EAClC,OAAe,EACC,OAAiC;QAEjD,KAAK,CAAC,OAAO,CAAC,CAAC;QALC,SAAI,GAAJ,IAAI,CAAiB;QACrB,eAAU,GAAV,UAAU,CAAQ;QAElB,YAAO,GAAP,OAAO,CAA0B;QAGjD,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,OAAe,EAAE,OAAiC;QACtE,OAAO,IAAI,cAAc,CAAC,iBAAiB,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAe;QACjC,OAAO,IAAI,cAAc,CAAC,cAAc,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,MAAc;QAC5B,OAAO,IAAI,cAAc,CAAC,WAAW,EAAE,GAAG,EAAE,0BAA0B,MAAM,EAAE,CAAC,CAAC;IAClF,CA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,eAAe,EAAE,UAAU;SAC5B,CAAC,CAAC;QACH,QAAQ,CAAC,GAAG,CACV,IAAI,CAAC,SAAS,CAAC;YACb,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO;SACvB,CAAC,CACH,CAAC;IACJ,CAAC;IAEO,YAAY,CAAC,QAAsB;QACzC,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE;YACtB,8BAA8B,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;YAC1D,8BAA8B,EAAE,6BAA6B;SAC9D,CAAC,CAAC;QACH,QAAQ,CAAC,GAAG,EAAE,CAAC;IACjB,CAAC;CACF;AA7UD,8CA6UC","sourcesContent":["/**\n * VectorHttpHandler - 纯向量存储 HTTP API\n *\n * 提供 /-/vector 端点,只负责向量的存储和搜索,不访问 Pod 数据。\n * AI embedding 生成、credential 管理等逻辑由外部 API Server 处理。\n *\n * 端点设计:\n * - POST /-/vector/upsert - 存入向量\n * - POST /-/vector/search - 搜索向量(只接受向量输入)\n * - DELETE /-/vector/delete - 删除向量\n * - GET /-/vector/status - 索引状态\n */\n\nimport { getLoggerFor } from 'global-logger-factory';\nimport { HttpHandler } from '@solid/community-server';\nimport type { HttpHandlerInput, HttpRequest, HttpResponse } from '@solid/community-server';\nimport {\n NotImplementedHttpError,\n MethodNotAllowedHttpError,\n HttpError,\n IdentifierSetMultiMap,\n} from '@solid/community-server';\nimport { PERMISSIONS } from '@solidlab/policy-engine';\nimport type { CredentialsExtractor, PermissionReader, Authorizer, ResourceIdentifier } from '@solid/community-server';\nimport { VectorStore } from '../../storage/vector/VectorStore';\nimport type { VectorSearchOptions, VectorSearchResult } from '../../storage/vector/types';\n\nconst ALLOWED_METHODS = ['GET', 'POST', 'DELETE', 'OPTIONS'];\n\n// ============================================\n// 统一错误处理\n// ============================================\n\ntype VectorErrorCode =\n | 'INVALID_REQUEST'\n | 'UNAUTHORIZED'\n | 'FORBIDDEN'\n | 'NOT_FOUND'\n | 'DIMENSION_MISMATCH'\n | 'STORAGE_ERROR';\n\nclass VectorApiError extends Error {\n constructor(\n public readonly code: VectorErrorCode,\n public readonly statusCode: number,\n message: string,\n public readonly details?: Record<string, unknown>,\n ) {\n super(message);\n this.name = 'VectorApiError';\n }\n\n static invalidRequest(message: string, details?: Record<string, unknown>): VectorApiError {\n return new VectorApiError('INVALID_REQUEST', 400, message, details);\n }\n\n static unauthorized(message: string): VectorApiError {\n return new VectorApiError('UNAUTHORIZED', 401, message);\n }\n\n static notFound(action: string): VectorApiError {\n return new VectorApiError('NOT_FOUND', 404, `Unknown vector action: ${action}`);\n }\n\n static dimensionMismatch(expected: number, actual: number): VectorApiError {\n return new VectorApiError('DIMENSION_MISMATCH', 422, `Vector dimension mismatch: expected ${expected}, got ${actual}`, {\n expected,\n actual,\n });\n }\n\n static storageError(message: string): VectorApiError {\n return new VectorApiError('STORAGE_ERROR', 500, message);\n }\n}\n\n// ============================================\n// 请求/响应类型\n// ============================================\n\ninterface UpsertRequest {\n /** 模型名,如 text-embedding-004 */\n model: string;\n /** 要存入的向量列表 */\n vectors: {\n /** 向量 ID(通常是 subject URI 的哈希) */\n id: number;\n /** 向量数据 */\n vector: number[];\n /** 可选的元数据 */\n metadata?: Record<string, unknown>;\n }[];\n}\n\ninterface SearchRequest {\n /** 模型名 */\n model: string;\n /** 查询向量 */\n vector: number[];\n /** 返回结果数量,默认 10 */\n limit?: number;\n /** 相似度阈值 */\n threshold?: number;\n /** 排除的 ID 列表 */\n excludeIds?: number[];\n}\n\ninterface DeleteRequest {\n /** 模型名 */\n model: string;\n /** 要删除的向量 ID 列表 */\n ids: number[];\n}\n\ninterface VectorHttpHandlerOptions {\n vectorStore: VectorStore;\n credentialsExtractor: CredentialsExtractor;\n permissionReader: PermissionReader;\n authorizer: Authorizer;\n sidecarPath?: string;\n}\n\nexport class VectorHttpHandler extends HttpHandler {\n protected readonly logger = getLoggerFor(this);\n\n private readonly vectorStore: VectorStore;\n private readonly credentialsExtractor: CredentialsExtractor;\n private readonly permissionReader: PermissionReader;\n private readonly authorizer: Authorizer;\n private readonly sidecarPath: string;\n\n public constructor(options: VectorHttpHandlerOptions) {\n super();\n this.vectorStore = options.vectorStore;\n this.credentialsExtractor = options.credentialsExtractor;\n this.permissionReader = options.permissionReader;\n this.authorizer = options.authorizer;\n this.sidecarPath = options.sidecarPath ?? '/-/vector';\n }\n\n public override async canHandle({ request }: HttpHandlerInput): Promise<void> {\n const path = this.parseUrl(request).pathname;\n if (!path.includes(this.sidecarPath)) {\n throw new NotImplementedHttpError('Request is not targeting a vector endpoint.');\n }\n }\n\n public override async handle({ request, response }: HttpHandlerInput): Promise<void> {\n const method = (request.method ?? 'GET').toUpperCase();\n\n if (method === 'OPTIONS') {\n this.writeOptions(response);\n return;\n }\n\n if (!ALLOWED_METHODS.includes(method)) {\n throw new MethodNotAllowedHttpError(ALLOWED_METHODS);\n }\n\n try {\n const url = this.parseUrl(request);\n const path = decodeURIComponent(url.pathname);\n\n const sidecarIndex = path.indexOf(this.sidecarPath);\n if (sidecarIndex === -1) {\n throw new NotImplementedHttpError('Request is not targeting a vector endpoint.');\n }\n\n let basePath = path.slice(0, sidecarIndex);\n if (!basePath.endsWith('/')) {\n basePath = `${basePath}/`;\n }\n\n const actionPath = path.slice(sidecarIndex + this.sidecarPath.length);\n const action = actionPath.replace(/^\\//, '').split('/')[0] || '';\n\n const origin = `${url.protocol}//${url.host}`;\n const baseUrl = `${origin}${basePath}`;\n\n this.logger.debug(`Vector request: ${method} ${path}, action=${action}, baseUrl=${baseUrl}`);\n\n switch (action) {\n case 'upsert':\n await this.handleUpsert(request, response, baseUrl, method);\n break;\n case 'search':\n await this.handleSearch(request, response, baseUrl, method);\n break;\n case 'delete':\n await this.handleDelete(request, response, baseUrl, method);\n break;\n case 'status':\n case 'stats':\n await this.handleStatus(request, response, baseUrl, method);\n break;\n default:\n throw VectorApiError.notFound(action);\n }\n } catch (error: unknown) {\n this.handleError(response, error);\n }\n }\n\n // ============================================\n // HTTP Handlers\n // ============================================\n\n private async handleUpsert(request: HttpRequest, response: HttpResponse, baseUrl: string, method: string): Promise<void> {\n if (method !== 'POST') {\n throw new MethodNotAllowedHttpError(['POST']);\n }\n\n const startTime = Date.now();\n await this.authorizeForWithBodyDrain(baseUrl, request, [PERMISSIONS.Append]);\n\n const body = await this.readJsonBody<UpsertRequest>(request);\n\n if (!body.model) {\n throw VectorApiError.invalidRequest('Missing \"model\" field');\n }\n\n if (!Array.isArray(body.vectors) || body.vectors.length === 0) {\n throw VectorApiError.invalidRequest('Missing or empty \"vectors\" field');\n }\n\n // 确保向量表存在\n await this.vectorStore.ensureVectorTable(body.model);\n\n let upserted = 0;\n const errors: string[] = [];\n\n for (const item of body.vectors) {\n try {\n if (typeof item.id !== 'number') {\n throw new Error('Invalid id: must be a number');\n }\n if (!Array.isArray(item.vector) || item.vector.length === 0) {\n throw new Error('Invalid vector: must be a non-empty array');\n }\n\n await this.vectorStore.upsertVector(body.model, item.id, item.vector);\n upserted++;\n } catch (err) {\n errors.push(`id=${item.id}: ${err instanceof Error ? err.message : String(err)}`);\n }\n }\n\n this.sendJsonResponse(response, {\n upserted,\n errors,\n took_ms: Date.now() - startTime,\n });\n }\n\n private async handleSearch(request: HttpRequest, response: HttpResponse, baseUrl: string, method: string): Promise<void> {\n if (method !== 'POST') {\n throw new MethodNotAllowedHttpError(['POST']);\n }\n\n const startTime = Date.now();\n await this.authorizeForWithBodyDrain(baseUrl, request, [PERMISSIONS.Read]);\n\n const body = await this.readJsonBody<SearchRequest>(request);\n\n if (!body.model) {\n throw VectorApiError.invalidRequest('Missing \"model\" field');\n }\n\n if (!Array.isArray(body.vector) || body.vector.length === 0) {\n throw VectorApiError.invalidRequest('Missing or empty \"vector\" field');\n }\n\n const searchOptions: VectorSearchOptions = {\n limit: body.limit ?? 10,\n threshold: body.threshold,\n excludeIds: body.excludeIds ? new Set(body.excludeIds) : undefined,\n };\n\n const results = await this.vectorStore.search(body.model, body.vector, searchOptions);\n\n this.sendJsonResponse(response, {\n results: results.map((r: VectorSearchResult) => ({\n id: r.id,\n score: r.score,\n distance: r.distance,\n })),\n model: body.model,\n took_ms: Date.now() - startTime,\n });\n }\n\n private async handleDelete(request: HttpRequest, response: HttpResponse, baseUrl: string, method: string): Promise<void> {\n if (method !== 'POST' && method !== 'DELETE') {\n throw new MethodNotAllowedHttpError(['POST', 'DELETE']);\n }\n\n const startTime = Date.now();\n // 使用 Modify 权限,因为删除向量是对向量存储的修改操作\n await this.authorizeForWithBodyDrain(baseUrl, request, [PERMISSIONS.Modify]);\n\n const body = await this.readJsonBody<DeleteRequest>(request);\n\n if (!body.model) {\n throw VectorApiError.invalidRequest('Missing \"model\" field');\n }\n\n if (!Array.isArray(body.ids) || body.ids.length === 0) {\n throw VectorApiError.invalidRequest('Missing or empty \"ids\" field');\n }\n\n let deleted = 0;\n const errors: string[] = [];\n\n for (const id of body.ids) {\n try {\n await this.vectorStore.deleteVector(body.model, id);\n deleted++;\n } catch (err) {\n errors.push(`id=${id}: ${err instanceof Error ? err.message : String(err)}`);\n }\n }\n\n this.sendJsonResponse(response, {\n deleted,\n errors,\n took_ms: Date.now() - startTime,\n });\n }\n\n private async handleStatus(request: HttpRequest, response: HttpResponse, baseUrl: string, method: string): Promise<void> {\n if (method !== 'GET') {\n throw new MethodNotAllowedHttpError(['GET']);\n }\n\n await this.authorizeFor(baseUrl, request, [PERMISSIONS.Read]);\n\n // 获取所有模型的向量统计\n const tables = await this.vectorStore.listVectorTables();\n const byModel: { model: string; count: number }[] = [];\n let totalCount = 0;\n\n for (const table of tables) {\n const count = await this.vectorStore.countVectors(table);\n byModel.push({ model: table, count });\n totalCount += count;\n }\n\n this.sendJsonResponse(response, { byModel, totalCount });\n }\n\n // ============================================\n // 辅助方法\n // ============================================\n\n private handleError(response: HttpResponse, error: unknown): void {\n if (error instanceof VectorApiError) {\n this.logger.error(`Vector API error [${error.code}]: ${error.message}`);\n this.sendErrorResponse(response, error);\n return;\n }\n\n if (error instanceof HttpError) {\n const errorMsg = error.message || error.name || `HTTP ${error.statusCode}`;\n this.logger.error(`HTTP error ${error.statusCode}: ${errorMsg}`);\n this.sendErrorResponse(response, new VectorApiError('INVALID_REQUEST', error.statusCode, errorMsg));\n return;\n }\n\n const errorMsg = error instanceof Error ? error.message : String(error);\n this.logger.error(`Unexpected error: ${errorMsg}`);\n this.sendErrorResponse(response, VectorApiError.storageError(errorMsg || 'Internal server error'));\n }\n\n private async authorizeFor(baseUrl: string, request: HttpRequest, permissions: typeof PERMISSIONS[keyof typeof PERMISSIONS][]): Promise<void> {\n const credentials = await this.credentialsExtractor.handleSafe(request);\n const identifier: ResourceIdentifier = { path: baseUrl };\n const requestedModes = new IdentifierSetMultiMap([[identifier, permissions]] as any);\n\n const availablePermissions = await this.permissionReader.handleSafe({ credentials, identifier, requestedModes } as any);\n\n this.logger.debug(`authorizeFor: baseUrl=${baseUrl}, webId=${credentials.agent?.webId}, requested=${permissions}`);\n\n await this.authorizer.handleSafe({ credentials, identifier, requestedModes, availablePermissions } as any);\n }\n\n private async authorizeForWithBodyDrain(\n baseUrl: string,\n request: HttpRequest,\n permissions: typeof PERMISSIONS[keyof typeof PERMISSIONS][],\n ): Promise<void> {\n try {\n await this.authorizeFor(baseUrl, request, permissions);\n } catch (error: unknown) {\n await this.drainRequest(request);\n throw error;\n }\n }\n\n private parseUrl(request: HttpRequest): URL {\n const protocol = request.headers['x-forwarded-proto'] || 'http';\n const host = request.headers['x-forwarded-host'] || request.headers.host || 'localhost';\n return new URL(request.url!, `${protocol}://${host}`);\n }\n\n private async readJsonBody<T>(request: HttpRequest): Promise<T> {\n const chunks: Buffer[] = [];\n for await (const chunk of request) {\n chunks.push(chunk);\n }\n const body = Buffer.concat(chunks).toString('utf8');\n try {\n return JSON.parse(body) as T;\n } catch {\n throw VectorApiError.invalidRequest('Invalid JSON body');\n }\n }\n\n private async drainRequest(request: HttpRequest): Promise<void> {\n try {\n for await (const _chunk of request) {\n }\n } catch {\n }\n }\n\n private sendJsonResponse(response: HttpResponse, data: unknown, status = 200): void {\n response.writeHead(status, {\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache',\n });\n response.end(JSON.stringify(data));\n }\n\n private sendErrorResponse(response: HttpResponse, error: VectorApiError): void {\n response.writeHead(error.statusCode, {\n 'Content-Type': 'application/json',\n 'Cache-Control': 'no-cache',\n });\n response.end(\n JSON.stringify({\n error: true,\n code: error.code,\n message: error.message,\n details: error.details,\n }),\n );\n }\n\n private writeOptions(response: HttpResponse): void {\n response.writeHead(204, {\n 'Access-Control-Allow-Methods': ALLOWED_METHODS.join(', '),\n 'Access-Control-Allow-Headers': 'Content-Type, Authorization',\n });\n response.end();\n }\n}\n"]}
|
|
@@ -14,32 +14,32 @@
|
|
|
14
14
|
],
|
|
15
15
|
"parameters": [
|
|
16
16
|
{
|
|
17
|
-
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#
|
|
18
|
-
"range": {
|
|
19
|
-
"@type": "ParameterRangeUnion",
|
|
20
|
-
"parameterRangeElements": [
|
|
21
|
-
"xsd:string",
|
|
22
|
-
{
|
|
23
|
-
"@type": "ParameterRangeUndefined"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_vectorStore",
|
|
17
|
+
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options_vectorStore",
|
|
30
18
|
"range": "undefineds:dist/storage/vector/VectorStore.jsonld#VectorStore"
|
|
31
19
|
},
|
|
32
20
|
{
|
|
33
|
-
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#
|
|
21
|
+
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options_credentialsExtractor",
|
|
34
22
|
"range": "css:dist/authentication/CredentialsExtractor.jsonld#CredentialsExtractor"
|
|
35
23
|
},
|
|
36
24
|
{
|
|
37
|
-
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#
|
|
25
|
+
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options_permissionReader",
|
|
38
26
|
"range": "css:dist/authorization/PermissionReader.jsonld#PermissionReader"
|
|
39
27
|
},
|
|
40
28
|
{
|
|
41
|
-
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#
|
|
29
|
+
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options_authorizer",
|
|
42
30
|
"range": "css:dist/authorization/Authorizer.jsonld#Authorizer"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options_sidecarPath",
|
|
34
|
+
"range": {
|
|
35
|
+
"@type": "ParameterRangeUnion",
|
|
36
|
+
"parameterRangeElements": [
|
|
37
|
+
"xsd:string",
|
|
38
|
+
{
|
|
39
|
+
"@type": "ParameterRangeUndefined"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
45
|
"memberFields": [
|
|
@@ -136,21 +136,33 @@
|
|
|
136
136
|
}
|
|
137
137
|
],
|
|
138
138
|
"constructorArguments": [
|
|
139
|
-
{
|
|
140
|
-
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_vectorStore"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_credentialsExtractor"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_permissionReader"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_authorizer"
|
|
150
|
-
},
|
|
151
139
|
{
|
|
152
140
|
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options__constructorArgument",
|
|
153
141
|
"fields": [
|
|
142
|
+
{
|
|
143
|
+
"keyRaw": "vectorStore",
|
|
144
|
+
"value": {
|
|
145
|
+
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options_vectorStore"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"keyRaw": "credentialsExtractor",
|
|
150
|
+
"value": {
|
|
151
|
+
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options_credentialsExtractor"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"keyRaw": "permissionReader",
|
|
156
|
+
"value": {
|
|
157
|
+
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options_permissionReader"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"keyRaw": "authorizer",
|
|
162
|
+
"value": {
|
|
163
|
+
"@id": "undefineds:dist/http/vector/VectorHttpHandler.jsonld#VectorHttpHandler_options_authorizer"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
154
166
|
{
|
|
155
167
|
"keyRaw": "sidecarPath",
|
|
156
168
|
"value": {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,11 @@ import { RepresentationPartialConvertingStore } from './storage/RepresentationPa
|
|
|
3
3
|
import { MinioDataAccessor } from './storage/accessors/MinioDataAccessor';
|
|
4
4
|
import { QuadstoreSparqlDataAccessor } from './storage/accessors/QuadstoreSparqlDataAccessor';
|
|
5
5
|
import { QuintStoreSparqlDataAccessor } from './storage/accessors/QuintStoreSparqlDataAccessor';
|
|
6
|
+
import { SolidRdfDataAccessor } from './storage/accessors/SolidRdfDataAccessor';
|
|
6
7
|
import { MixDataAccessor } from './storage/accessors/MixDataAccessor';
|
|
7
8
|
import { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';
|
|
8
|
-
import { SubgraphQueryEngine
|
|
9
|
+
import { SubgraphQueryEngine } from './storage/sparql/SubgraphQueryEngine';
|
|
10
|
+
import { QuadstoreSparqlEngine, QuintstoreSparqlEngine } from './storage/sparql/CompatibilitySparqlEngine';
|
|
9
11
|
export type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';
|
|
10
12
|
export type { RdfIndexStats, RdfIndexSpaceObject, RdfIndexMetrics, RdfIndexPutOptions, RdfPatternQuery, RdfQuadIndexOptions, RdfQuadIndexScanResult, RdfShadowBackfillOptions, RdfShadowBackfillResult, RdfShadowDiff, RdfShadowScanResult, RdfSourceInput, } from './storage/rdf/types';
|
|
11
13
|
export type { RdfSparqlCompileResult } from './storage/rdf/RdfSparqlAdapter';
|
|
@@ -50,9 +52,9 @@ import { PodRoutingHttpHandler } from './http/PodRoutingHttpHandler';
|
|
|
50
52
|
import { ReactAppViewHandler } from './identity/ReactAppViewHandler';
|
|
51
53
|
import { SqliteQuintStore } from './storage/quint/SqliteQuintStore';
|
|
52
54
|
import { PgQuintStore } from './storage/quint/PgQuintStore';
|
|
53
|
-
import { BaseQuintStore } from './storage/quint/BaseQuintStore';
|
|
54
55
|
import { QuintStore } from './storage/quint/types';
|
|
55
56
|
import { RdfQuadIndex } from './storage/rdf/RdfQuadIndex';
|
|
57
|
+
import { Rdf3xIndex } from './storage/rdf/Rdf3xIndex';
|
|
56
58
|
import { RdfSparqlAdapter } from './storage/rdf/RdfSparqlAdapter';
|
|
57
59
|
import { RdfTermDictionary } from './storage/rdf/RdfTermDictionary';
|
|
58
60
|
import { ShadowRdfQuintStore } from './storage/rdf/ShadowRdfQuintStore';
|
|
@@ -91,4 +93,4 @@ export type { EntitlementProvider, AccountEntitlement } from './quota/Entitlemen
|
|
|
91
93
|
export type { TunnelProvider, TunnelConfig, TunnelSetupOptions, TunnelStatus, } from './tunnel/TunnelProvider';
|
|
92
94
|
export type { SubdomainRegistration, ConnectivityResult, SubdomainServiceOptions, } from './subdomain/SubdomainService';
|
|
93
95
|
export { AppStaticAssetHandler } from './http/AppStaticAssetHandler';
|
|
94
|
-
export { RepresentationPartialConvertingStore, MinioDataAccessor, QuadstoreSparqlDataAccessor, QuintStoreSparqlDataAccessor, MixDataAccessor, ConfigurableLoggerFactory, SparqlUpdateResourceStore, SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine, SubgraphSparqlHttpHandler, QuotaAdminHttpHandler, ClusterIngressRouter, ClusterWebSocketConfigurator, EdgeNodeDirectDebugHttpHandler, EdgeNodeProxyHttpHandler, RouterHttpHandler, RouterHttpRoute, TracingHandler, EdgeNodeCertificateHttpHandler, TerminalHttpHandler, ReservedSuffixIdentifierGenerator, DrizzleIndexedStorage, ValidatingIdentityProviderHttpHandler, PostgresKeyValueStorage, RedisKeyValueStorage, SqliteKeyValueStorage, DrizzleQuotaService, NoopQuotaService, HttpEntitlementProvider, NoopEntitlementProvider, PerAccountQuotaStrategy, TencentDnsProvider, EdgeNodeDnsCoordinator, Dns01CertificateProvisioner, SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager, FrpTunnelManager, EdgeNodeHealthProbeService, EdgeNodeAgent, EdgeNodeCertificateService, AcmeCertificateManager, EdgeNodeModeDetector, ClusterIdentifierStrategy, UsageTrackingStore, CenterNodeRegistrationService, PodRoutingHttpHandler, ReactAppViewHandler, QuintStore, SqliteQuintStore, PgQuintStore,
|
|
96
|
+
export { RepresentationPartialConvertingStore, MinioDataAccessor, QuadstoreSparqlDataAccessor, QuintStoreSparqlDataAccessor, SolidRdfDataAccessor, MixDataAccessor, ConfigurableLoggerFactory, SparqlUpdateResourceStore, SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine, SubgraphSparqlHttpHandler, QuotaAdminHttpHandler, ClusterIngressRouter, ClusterWebSocketConfigurator, EdgeNodeDirectDebugHttpHandler, EdgeNodeProxyHttpHandler, RouterHttpHandler, RouterHttpRoute, TracingHandler, EdgeNodeCertificateHttpHandler, TerminalHttpHandler, ReservedSuffixIdentifierGenerator, DrizzleIndexedStorage, ValidatingIdentityProviderHttpHandler, PostgresKeyValueStorage, RedisKeyValueStorage, SqliteKeyValueStorage, DrizzleQuotaService, NoopQuotaService, HttpEntitlementProvider, NoopEntitlementProvider, PerAccountQuotaStrategy, TencentDnsProvider, EdgeNodeDnsCoordinator, Dns01CertificateProvisioner, SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager, FrpTunnelManager, EdgeNodeHealthProbeService, EdgeNodeAgent, EdgeNodeCertificateService, AcmeCertificateManager, EdgeNodeModeDetector, ClusterIdentifierStrategy, UsageTrackingStore, CenterNodeRegistrationService, PodRoutingHttpHandler, ReactAppViewHandler, QuintStore, SqliteQuintStore, PgQuintStore, RdfTermDictionary, RdfQuadIndex, Rdf3xIndex, RdfSparqlAdapter, ShadowRdfQuintStore, SolidRdfEngine, SolidRdfSparqlEngine, VectorStore, SqliteVectorStore, PostgresVectorStore, VectorHttpHandler, ProviderRegistry, ProviderRegistryImpl, EmbeddingService, EmbeddingServiceImpl, CredentialReader, CredentialReaderImpl, CloudflareTunnelProvider, LocalTunnelProvider, SubdomainService, MultiDomainIdentifierStrategy, SubdomainPodIdentifierStrategy, DisabledOidcHandler, DisabledIdentityProviderHandler, AutoDetectOidcHandler, AutoDetectIdentityProviderHandler, LoopbackClientIdAdapterFactory, ScopedPickWebIdHandler, UrlAwareRedisLocker, ProvisionPodCreator, ProvisionCodeCodec, LocalPodProvisioningService, AuthModeSelector, };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.AuthModeSelector = exports.LocalPodProvisioningService = exports.ProvisionCodeCodec = exports.ProvisionPodCreator = exports.UrlAwareRedisLocker = exports.ScopedPickWebIdHandler = exports.LoopbackClientIdAdapterFactory = exports.AutoDetectIdentityProviderHandler = exports.AutoDetectOidcHandler = exports.DisabledIdentityProviderHandler = exports.DisabledOidcHandler = exports.SubdomainPodIdentifierStrategy = exports.MultiDomainIdentifierStrategy = exports.SubdomainService = exports.LocalTunnelProvider = exports.CloudflareTunnelProvider = exports.CredentialReaderImpl = exports.CredentialReader = exports.EmbeddingServiceImpl = exports.EmbeddingService = exports.ProviderRegistryImpl = exports.ProviderRegistry = exports.VectorHttpHandler = exports.PostgresVectorStore = exports.SqliteVectorStore = exports.VectorStore = exports.SolidRdfSparqlEngine = exports.SolidRdfEngine = exports.ShadowRdfQuintStore = exports.RdfSparqlAdapter = exports.
|
|
3
|
+
exports.ReactAppViewHandler = exports.PodRoutingHttpHandler = exports.CenterNodeRegistrationService = exports.UsageTrackingStore = exports.ClusterIdentifierStrategy = exports.EdgeNodeModeDetector = exports.AcmeCertificateManager = exports.EdgeNodeCertificateService = exports.EdgeNodeAgent = exports.EdgeNodeHealthProbeService = exports.FrpTunnelManager = exports.NoopEdgeNodeTunnelManager = exports.SimpleEdgeNodeTunnelManager = exports.Dns01CertificateProvisioner = exports.EdgeNodeDnsCoordinator = exports.TencentDnsProvider = exports.PerAccountQuotaStrategy = exports.NoopEntitlementProvider = exports.HttpEntitlementProvider = exports.NoopQuotaService = exports.DrizzleQuotaService = exports.SqliteKeyValueStorage = exports.RedisKeyValueStorage = exports.PostgresKeyValueStorage = exports.ValidatingIdentityProviderHttpHandler = exports.DrizzleIndexedStorage = exports.ReservedSuffixIdentifierGenerator = exports.TerminalHttpHandler = exports.EdgeNodeCertificateHttpHandler = exports.TracingHandler = exports.RouterHttpRoute = exports.RouterHttpHandler = exports.EdgeNodeProxyHttpHandler = exports.EdgeNodeDirectDebugHttpHandler = exports.ClusterWebSocketConfigurator = exports.ClusterIngressRouter = exports.QuotaAdminHttpHandler = exports.SubgraphSparqlHttpHandler = exports.QuintstoreSparqlEngine = exports.QuadstoreSparqlEngine = exports.SubgraphQueryEngine = exports.SparqlUpdateResourceStore = exports.ConfigurableLoggerFactory = exports.MixDataAccessor = exports.SolidRdfDataAccessor = exports.QuintStoreSparqlDataAccessor = exports.QuadstoreSparqlDataAccessor = exports.MinioDataAccessor = exports.RepresentationPartialConvertingStore = exports.AppStaticAssetHandler = void 0;
|
|
4
|
+
exports.AuthModeSelector = exports.LocalPodProvisioningService = exports.ProvisionCodeCodec = exports.ProvisionPodCreator = exports.UrlAwareRedisLocker = exports.ScopedPickWebIdHandler = exports.LoopbackClientIdAdapterFactory = exports.AutoDetectIdentityProviderHandler = exports.AutoDetectOidcHandler = exports.DisabledIdentityProviderHandler = exports.DisabledOidcHandler = exports.SubdomainPodIdentifierStrategy = exports.MultiDomainIdentifierStrategy = exports.SubdomainService = exports.LocalTunnelProvider = exports.CloudflareTunnelProvider = exports.CredentialReaderImpl = exports.CredentialReader = exports.EmbeddingServiceImpl = exports.EmbeddingService = exports.ProviderRegistryImpl = exports.ProviderRegistry = exports.VectorHttpHandler = exports.PostgresVectorStore = exports.SqliteVectorStore = exports.VectorStore = exports.SolidRdfSparqlEngine = exports.SolidRdfEngine = exports.ShadowRdfQuintStore = exports.RdfSparqlAdapter = exports.Rdf3xIndex = exports.RdfQuadIndex = exports.RdfTermDictionary = exports.PgQuintStore = exports.SqliteQuintStore = exports.QuintStore = void 0;
|
|
5
5
|
require("./runtime/configure-drizzle-solid");
|
|
6
6
|
const RepresentationPartialConvertingStore_1 = require("./storage/RepresentationPartialConvertingStore");
|
|
7
7
|
Object.defineProperty(exports, "RepresentationPartialConvertingStore", { enumerable: true, get: function () { return RepresentationPartialConvertingStore_1.RepresentationPartialConvertingStore; } });
|
|
@@ -11,14 +11,17 @@ const QuadstoreSparqlDataAccessor_1 = require("./storage/accessors/QuadstoreSpar
|
|
|
11
11
|
Object.defineProperty(exports, "QuadstoreSparqlDataAccessor", { enumerable: true, get: function () { return QuadstoreSparqlDataAccessor_1.QuadstoreSparqlDataAccessor; } });
|
|
12
12
|
const QuintStoreSparqlDataAccessor_1 = require("./storage/accessors/QuintStoreSparqlDataAccessor");
|
|
13
13
|
Object.defineProperty(exports, "QuintStoreSparqlDataAccessor", { enumerable: true, get: function () { return QuintStoreSparqlDataAccessor_1.QuintStoreSparqlDataAccessor; } });
|
|
14
|
+
const SolidRdfDataAccessor_1 = require("./storage/accessors/SolidRdfDataAccessor");
|
|
15
|
+
Object.defineProperty(exports, "SolidRdfDataAccessor", { enumerable: true, get: function () { return SolidRdfDataAccessor_1.SolidRdfDataAccessor; } });
|
|
14
16
|
const MixDataAccessor_1 = require("./storage/accessors/MixDataAccessor");
|
|
15
17
|
Object.defineProperty(exports, "MixDataAccessor", { enumerable: true, get: function () { return MixDataAccessor_1.MixDataAccessor; } });
|
|
16
18
|
const ConfigurableLoggerFactory_1 = require("./logging/ConfigurableLoggerFactory");
|
|
17
19
|
Object.defineProperty(exports, "ConfigurableLoggerFactory", { enumerable: true, get: function () { return ConfigurableLoggerFactory_1.ConfigurableLoggerFactory; } });
|
|
18
20
|
const SubgraphQueryEngine_1 = require("./storage/sparql/SubgraphQueryEngine");
|
|
19
21
|
Object.defineProperty(exports, "SubgraphQueryEngine", { enumerable: true, get: function () { return SubgraphQueryEngine_1.SubgraphQueryEngine; } });
|
|
20
|
-
|
|
21
|
-
Object.defineProperty(exports, "
|
|
22
|
+
const CompatibilitySparqlEngine_1 = require("./storage/sparql/CompatibilitySparqlEngine");
|
|
23
|
+
Object.defineProperty(exports, "QuadstoreSparqlEngine", { enumerable: true, get: function () { return CompatibilitySparqlEngine_1.QuadstoreSparqlEngine; } });
|
|
24
|
+
Object.defineProperty(exports, "QuintstoreSparqlEngine", { enumerable: true, get: function () { return CompatibilitySparqlEngine_1.QuintstoreSparqlEngine; } });
|
|
22
25
|
const SubgraphSparqlHttpHandler_1 = require("./http/SubgraphSparqlHttpHandler");
|
|
23
26
|
Object.defineProperty(exports, "SubgraphSparqlHttpHandler", { enumerable: true, get: function () { return SubgraphSparqlHttpHandler_1.SubgraphSparqlHttpHandler; } });
|
|
24
27
|
const QuotaAdminHttpHandler_1 = require("./http/quota/QuotaAdminHttpHandler");
|
|
@@ -99,12 +102,12 @@ const SqliteQuintStore_1 = require("./storage/quint/SqliteQuintStore");
|
|
|
99
102
|
Object.defineProperty(exports, "SqliteQuintStore", { enumerable: true, get: function () { return SqliteQuintStore_1.SqliteQuintStore; } });
|
|
100
103
|
const PgQuintStore_1 = require("./storage/quint/PgQuintStore");
|
|
101
104
|
Object.defineProperty(exports, "PgQuintStore", { enumerable: true, get: function () { return PgQuintStore_1.PgQuintStore; } });
|
|
102
|
-
const BaseQuintStore_1 = require("./storage/quint/BaseQuintStore");
|
|
103
|
-
Object.defineProperty(exports, "BaseQuintStore", { enumerable: true, get: function () { return BaseQuintStore_1.BaseQuintStore; } });
|
|
104
105
|
const types_1 = require("./storage/quint/types");
|
|
105
106
|
Object.defineProperty(exports, "QuintStore", { enumerable: true, get: function () { return types_1.QuintStore; } });
|
|
106
107
|
const RdfQuadIndex_1 = require("./storage/rdf/RdfQuadIndex");
|
|
107
108
|
Object.defineProperty(exports, "RdfQuadIndex", { enumerable: true, get: function () { return RdfQuadIndex_1.RdfQuadIndex; } });
|
|
109
|
+
const Rdf3xIndex_1 = require("./storage/rdf/Rdf3xIndex");
|
|
110
|
+
Object.defineProperty(exports, "Rdf3xIndex", { enumerable: true, get: function () { return Rdf3xIndex_1.Rdf3xIndex; } });
|
|
108
111
|
const RdfSparqlAdapter_1 = require("./storage/rdf/RdfSparqlAdapter");
|
|
109
112
|
Object.defineProperty(exports, "RdfSparqlAdapter", { enumerable: true, get: function () { return RdfSparqlAdapter_1.RdfSparqlAdapter; } });
|
|
110
113
|
const RdfTermDictionary_1 = require("./storage/rdf/RdfTermDictionary");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],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AAqB,OAuHP;AAtHvB,yGAAsG;AAuHpG,kHAvHO,qEAAiC,OAuHP;AAtHnC,mGAAgG;AAuH9F,+GAvHO,+DAA8B,OAuHP;AAtHhC,mFAAgF;AAuH9E,uGAvHO,+CAAsB,OAuHP;AAtHxB,uBAAuB;AACvB,yEAAsE;AAwHpE,oGAxHO,yCAAmB,OAwHP;AAvHrB,uEAAoE;AAwHlE,mGAxHO,uCAAkB,OAwHP;AAvHpB,yFAAsF;AAwHpF,4GAxHO,yDAA2B,OAwHP;AAvH7B,2BAA2B;AAC3B,uEAAoE;AAwHlE,iGAxHO,mCAAgB,OAwHP;AA/FlB,uCAAuC;AACvC,sEAAqE;AAA5D,8HAAA,qBAAqB,OAAA","sourcesContent":["import './runtime/configure-drizzle-solid';\nimport { RepresentationPartialConvertingStore } from './storage/RepresentationPartialConvertingStore';\nimport { MinioDataAccessor } from './storage/accessors/MinioDataAccessor';\nimport { QuadstoreSparqlDataAccessor } from './storage/accessors/QuadstoreSparqlDataAccessor';\nimport { QuintStoreSparqlDataAccessor } from './storage/accessors/QuintStoreSparqlDataAccessor';\nimport { MixDataAccessor } from './storage/accessors/MixDataAccessor';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { SubgraphQueryEngine, QuadstoreSparqlEngine, QuintstoreSparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nexport type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nexport type {\n RdfIndexStats,\n RdfIndexSpaceObject,\n RdfIndexMetrics,\n RdfIndexPutOptions,\n RdfPatternQuery,\n RdfQuadIndexOptions,\n RdfQuadIndexScanResult,\n RdfShadowBackfillOptions,\n RdfShadowBackfillResult,\n RdfShadowDiff,\n RdfShadowScanResult,\n RdfSourceInput,\n} from './storage/rdf/types';\nexport type { RdfSparqlCompileResult } from './storage/rdf/RdfSparqlAdapter';\nexport type { ShadowRdfQuintStoreOptions } from './storage/rdf/ShadowRdfQuintStore';\nexport type {\n SolidRdfSparqlEngineOptions,\n SolidRdfSparqlFallback,\n} from './storage/rdf/SolidRdfSparqlEngine';\nimport { SubgraphSparqlHttpHandler } from './http/SubgraphSparqlHttpHandler';\nimport { QuotaAdminHttpHandler } from './http/quota/QuotaAdminHttpHandler';\nimport { SparqlUpdateResourceStore } from './storage/SparqlUpdateResourceStore';\nimport { ClusterIngressRouter } from './http/ClusterIngressRouter';\nimport { ClusterWebSocketConfigurator } from './http/ClusterWebSocketConfigurator';\nimport { EdgeNodeDirectDebugHttpHandler } from './http/EdgeNodeDirectDebugHttpHandler';\nimport { EdgeNodeProxyHttpHandler } from './http/EdgeNodeProxyHttpHandler';\nimport { RouterHttpHandler } from './http/RouterHttpHandler';\nimport { RouterHttpRoute } from './http/RouterHttpRoute';\nimport { TracingHandler } from './http/TracingHandler';\nimport { TerminalHttpHandler } from './http/terminal/TerminalHttpHandler';\nimport { EdgeNodeCertificateHttpHandler } from './http/admin/EdgeNodeCertificateHttpHandler';\nimport { ReservedSuffixIdentifierGenerator } from './pods/ReservedSuffixIdentifierGenerator';\nimport { DrizzleIndexedStorage } from './identity/drizzle/DrizzleIndexedStorage';\nimport { ValidatingIdentityProviderHttpHandler } from './identity/ValidatingIdentityProviderHttpHandler';\nimport { PostgresKeyValueStorage } from './storage/keyvalue/PostgresKeyValueStorage';\nimport { RedisKeyValueStorage } from './storage/keyvalue/RedisKeyValueStorage';\nimport { SqliteKeyValueStorage } from './storage/keyvalue/SqliteKeyValueStorage';\nimport { DrizzleQuotaService } from './quota/DrizzleQuotaService';\nimport { NoopQuotaService } from './quota/NoopQuotaService';\nimport { HttpEntitlementProvider, NoopEntitlementProvider } from './quota/EntitlementProvider';\nimport { PerAccountQuotaStrategy } from './storage/quota/PerAccountQuotaStrategy';\nimport { TencentDnsProvider } from './dns/tencent/TencentDnsProvider';\nimport { EdgeNodeDnsCoordinator } from './edge/EdgeNodeDnsCoordinator';\nimport { Dns01CertificateProvisioner } from './edge/Dns01CertificateProvisioner';\nimport { SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager } from './edge/EdgeNodeTunnelManager';\nimport { FrpTunnelManager } from './edge/FrpTunnelManager';\nimport { AcmeCertificateManager } from './edge/acme/AcmeCertificateManager';\nimport { EdgeNodeHealthProbeService } from './edge/EdgeNodeHealthProbeService';\nimport { EdgeNodeAgent } from './edge/EdgeNodeAgent';\nimport { EdgeNodeCertificateService } from './service/EdgeNodeCertificateService';\nimport { createBandwidthThrottleTransform } from './util/stream/BandwidthThrottleTransform';\nimport { UsageTrackingStore } from './storage/quota/UsageTrackingStore';\nimport { EdgeNodeModeDetector } from './edge/EdgeNodeModeDetector';\nimport { ClusterIdentifierStrategy } from './util/identifiers/ClusterIdentifierStrategy';\nimport { CenterNodeRegistrationService } from './identity/CenterNodeRegistrationService';\nimport { PodRoutingHttpHandler } from './http/PodRoutingHttpHandler';\nimport { ReactAppViewHandler } from './identity/ReactAppViewHandler';\nimport { SqliteQuintStore } from './storage/quint/SqliteQuintStore';\nimport { PgQuintStore } from './storage/quint/PgQuintStore';\nimport { BaseQuintStore } from './storage/quint/BaseQuintStore';\nimport { QuintStore } from './storage/quint/types';\nimport { RdfQuadIndex } from './storage/rdf/RdfQuadIndex';\nimport { RdfSparqlAdapter } from './storage/rdf/RdfSparqlAdapter';\nimport { RdfTermDictionary } from './storage/rdf/RdfTermDictionary';\nimport { ShadowRdfQuintStore } from './storage/rdf/ShadowRdfQuintStore';\nimport { SolidRdfEngine } from './storage/rdf/SolidRdfEngine';\nimport { SolidRdfSparqlEngine } from './storage/rdf/SolidRdfSparqlEngine';\nimport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\n// Vector components\nimport { SqliteVectorStore, PostgresVectorStore } from './storage/vector/index';\nimport { VectorHttpHandler } from './http/vector/VectorHttpHandler';\nimport { ProviderRegistry } from './ai/service/ProviderRegistry';\nimport { ProviderRegistryImpl } from './ai/service/ProviderRegistryImpl';\nimport { EmbeddingService } from './ai/service/EmbeddingService';\nimport { EmbeddingServiceImpl } from './ai/service/EmbeddingServiceImpl';\nimport { CredentialReader } from './ai/service/CredentialReader';\nimport { CredentialReaderImpl } from './ai/service/CredentialReaderImpl';\nimport { VectorStore } from './storage/vector/VectorStore';\n// Tunnel and Subdomain components\nimport { CloudflareTunnelProvider } from './tunnel/CloudflareTunnelProvider';\nimport { LocalTunnelProvider } from './tunnel/LocalTunnelProvider';\nimport { SubdomainService } from './subdomain/SubdomainService';\nimport { UrlAwareRedisLocker } from './storage/locking/UrlAwareRedisLocker';\n// IdP/SP separation components\nimport { MultiDomainIdentifierStrategy } from './util/identifiers/MultiDomainIdentifierStrategy';\nimport { SubdomainPodIdentifierStrategy } from './util/identifiers/SubdomainPodIdentifierStrategy';\nimport { DisabledOidcHandler } from './identity/oidc/DisabledOidcHandler';\nimport { DisabledIdentityProviderHandler } from './identity/oidc/DisabledIdentityProviderHandler';\nimport { AutoDetectOidcHandler } from './identity/oidc/AutoDetectOidcHandler';\nimport { AutoDetectIdentityProviderHandler } from './identity/oidc/AutoDetectIdentityProviderHandler';\nimport { LoopbackClientIdAdapterFactory } from './identity/oidc/LoopbackClientIdAdapterFactory';\nimport { ScopedPickWebIdHandler } from './identity/oidc/ScopedPickWebIdHandler';\n// Provision components\nimport { ProvisionPodCreator } from './provision/ProvisionPodCreator';\nimport { ProvisionCodeCodec } from './provision/ProvisionCodeCodec';\nimport { LocalPodProvisioningService } from './provision/LocalPodProvisioningService';\n// Authorization components\nimport { AuthModeSelector } from './authorization/AuthModeSelector';\nexport type {\n DnsProvider,\n ListDnsRecordsInput,\n ListableDnsProvider,\n DeleteDnsRecordInput,\n DnsRecordSummary,\n UpsertDnsRecordInput,\n} from './dns/DnsProvider';\nexport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\nexport type { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';\nexport type { QuotaService, AccountQuota } from './quota/QuotaService';\nexport type { EntitlementProvider, AccountEntitlement } from './quota/EntitlementProvider';\n// Tunnel and Subdomain types\nexport type {\n TunnelProvider,\n TunnelConfig,\n TunnelSetupOptions,\n TunnelStatus,\n} from './tunnel/TunnelProvider';\nexport type {\n SubdomainRegistration,\n ConnectivityResult,\n SubdomainServiceOptions,\n} from './subdomain/SubdomainService';\n// Export the new AppStaticAssetHandler\nexport { AppStaticAssetHandler } from './http/AppStaticAssetHandler';\n\nexport { \n RepresentationPartialConvertingStore,\n MinioDataAccessor, \n QuadstoreSparqlDataAccessor,\n QuintStoreSparqlDataAccessor,\n MixDataAccessor,\n ConfigurableLoggerFactory,\n SparqlUpdateResourceStore,\n SubgraphQueryEngine,\n QuadstoreSparqlEngine,\n QuintstoreSparqlEngine,\n SubgraphSparqlHttpHandler,\n QuotaAdminHttpHandler,\n ClusterIngressRouter,\n ClusterWebSocketConfigurator,\n EdgeNodeDirectDebugHttpHandler,\n EdgeNodeProxyHttpHandler,\n RouterHttpHandler,\n RouterHttpRoute,\n TracingHandler,\n EdgeNodeCertificateHttpHandler,\n TerminalHttpHandler,\n ReservedSuffixIdentifierGenerator,\n DrizzleIndexedStorage,\n ValidatingIdentityProviderHttpHandler,\n PostgresKeyValueStorage,\n RedisKeyValueStorage,\n SqliteKeyValueStorage,\n DrizzleQuotaService,\n NoopQuotaService,\n HttpEntitlementProvider,\n NoopEntitlementProvider,\n PerAccountQuotaStrategy,\n TencentDnsProvider,\n EdgeNodeDnsCoordinator,\n Dns01CertificateProvisioner,\n SimpleEdgeNodeTunnelManager,\n NoopEdgeNodeTunnelManager,\n FrpTunnelManager,\n EdgeNodeHealthProbeService,\n EdgeNodeAgent,\n EdgeNodeCertificateService,\n AcmeCertificateManager,\n EdgeNodeModeDetector,\n ClusterIdentifierStrategy,\n UsageTrackingStore,\n CenterNodeRegistrationService,\n PodRoutingHttpHandler,\n ReactAppViewHandler,\n // Quint exports\n QuintStore,\n SqliteQuintStore,\n PgQuintStore,\n BaseQuintStore,\n // RDF engine exports\n RdfTermDictionary,\n RdfQuadIndex,\n RdfSparqlAdapter,\n ShadowRdfQuintStore,\n SolidRdfEngine,\n SolidRdfSparqlEngine,\n // Vector exports\n VectorStore,\n SqliteVectorStore,\n PostgresVectorStore,\n VectorHttpHandler,\n // Embedding exports\n ProviderRegistry,\n ProviderRegistryImpl,\n EmbeddingService,\n EmbeddingServiceImpl,\n CredentialReader,\n CredentialReaderImpl,\n // Tunnel and Subdomain exports\n CloudflareTunnelProvider,\n LocalTunnelProvider,\n SubdomainService,\n // IdP/SP separation exports\n MultiDomainIdentifierStrategy,\n SubdomainPodIdentifierStrategy,\n DisabledOidcHandler,\n DisabledIdentityProviderHandler,\n AutoDetectOidcHandler,\n AutoDetectIdentityProviderHandler,\n LoopbackClientIdAdapterFactory,\n ScopedPickWebIdHandler,\n UrlAwareRedisLocker,\n // Provision exports\n ProvisionPodCreator,\n ProvisionCodeCodec,\n LocalPodProvisioningService,\n // Authorization exports\n AuthModeSelector,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,6CAA2C;AAC3C,yGAAsG;AA0IlG,qHA1IK,2EAAoC,OA0IL;AAzIxC,6EAA0E;AA0ItE,kGA1IK,qCAAiB,OA0IL;AAzIrB,iGAA8F;AA0I1F,4GA1IK,yDAA2B,OA0IL;AAzI/B,mGAAgG;AA0I5F,6GA1IK,2DAA4B,OA0IL;AAzIhC,mFAAgF;AA0I5E,qGA1IK,2CAAoB,OA0IL;AAzIxB,yEAAsE;AA0IlE,gGA1IK,iCAAe,OA0IL;AAzInB,mFAAgF;AA0I5E,0GA1IK,qDAAyB,OA0IL;AAzI7B,8EAA2E;AA2IvE,oGA3IK,yCAAmB,OA2IL;AA1IvB,0FAA2G;AA2IvG,sGA3IK,iDAAqB,OA2IL;AACrB,uGA5I4B,kDAAsB,OA4I5B;AAtH1B,gFAA6E;AAuHzE,0GAvHK,qDAAyB,OAuHL;AAtH7B,8EAA2E;AAuHvE,sGAvHK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import { RepresentationPartialConvertingStore } from './storage/RepresentationPartialConvertingStore';\nimport { MinioDataAccessor } from './storage/accessors/MinioDataAccessor';\nimport { QuadstoreSparqlDataAccessor } from './storage/accessors/QuadstoreSparqlDataAccessor';\nimport { QuintStoreSparqlDataAccessor } from './storage/accessors/QuintStoreSparqlDataAccessor';\nimport { SolidRdfDataAccessor } from './storage/accessors/SolidRdfDataAccessor';\nimport { MixDataAccessor } from './storage/accessors/MixDataAccessor';\nimport { ConfigurableLoggerFactory } from './logging/ConfigurableLoggerFactory';\nimport { SubgraphQueryEngine } from './storage/sparql/SubgraphQueryEngine';\nimport { QuadstoreSparqlEngine, QuintstoreSparqlEngine } from './storage/sparql/CompatibilitySparqlEngine';\nexport type { SparqlEngine } from './storage/sparql/SubgraphQueryEngine';\nexport type {\n RdfIndexStats,\n RdfIndexSpaceObject,\n RdfIndexMetrics,\n RdfIndexPutOptions,\n RdfPatternQuery,\n RdfQuadIndexOptions,\n RdfQuadIndexScanResult,\n RdfShadowBackfillOptions,\n RdfShadowBackfillResult,\n RdfShadowDiff,\n RdfShadowScanResult,\n RdfSourceInput,\n} from './storage/rdf/types';\nexport type { RdfSparqlCompileResult } from './storage/rdf/RdfSparqlAdapter';\nexport type { ShadowRdfQuintStoreOptions } from './storage/rdf/ShadowRdfQuintStore';\nexport type {\n SolidRdfSparqlEngineOptions,\n SolidRdfSparqlFallback,\n} from './storage/rdf/SolidRdfSparqlEngine';\nimport { SubgraphSparqlHttpHandler } from './http/SubgraphSparqlHttpHandler';\nimport { QuotaAdminHttpHandler } from './http/quota/QuotaAdminHttpHandler';\nimport { SparqlUpdateResourceStore } from './storage/SparqlUpdateResourceStore';\nimport { ClusterIngressRouter } from './http/ClusterIngressRouter';\nimport { ClusterWebSocketConfigurator } from './http/ClusterWebSocketConfigurator';\nimport { EdgeNodeDirectDebugHttpHandler } from './http/EdgeNodeDirectDebugHttpHandler';\nimport { EdgeNodeProxyHttpHandler } from './http/EdgeNodeProxyHttpHandler';\nimport { RouterHttpHandler } from './http/RouterHttpHandler';\nimport { RouterHttpRoute } from './http/RouterHttpRoute';\nimport { TracingHandler } from './http/TracingHandler';\nimport { TerminalHttpHandler } from './http/terminal/TerminalHttpHandler';\nimport { EdgeNodeCertificateHttpHandler } from './http/admin/EdgeNodeCertificateHttpHandler';\nimport { ReservedSuffixIdentifierGenerator } from './pods/ReservedSuffixIdentifierGenerator';\nimport { DrizzleIndexedStorage } from './identity/drizzle/DrizzleIndexedStorage';\nimport { ValidatingIdentityProviderHttpHandler } from './identity/ValidatingIdentityProviderHttpHandler';\nimport { PostgresKeyValueStorage } from './storage/keyvalue/PostgresKeyValueStorage';\nimport { RedisKeyValueStorage } from './storage/keyvalue/RedisKeyValueStorage';\nimport { SqliteKeyValueStorage } from './storage/keyvalue/SqliteKeyValueStorage';\nimport { DrizzleQuotaService } from './quota/DrizzleQuotaService';\nimport { NoopQuotaService } from './quota/NoopQuotaService';\nimport { HttpEntitlementProvider, NoopEntitlementProvider } from './quota/EntitlementProvider';\nimport { PerAccountQuotaStrategy } from './storage/quota/PerAccountQuotaStrategy';\nimport { TencentDnsProvider } from './dns/tencent/TencentDnsProvider';\nimport { EdgeNodeDnsCoordinator } from './edge/EdgeNodeDnsCoordinator';\nimport { Dns01CertificateProvisioner } from './edge/Dns01CertificateProvisioner';\nimport { SimpleEdgeNodeTunnelManager, NoopEdgeNodeTunnelManager } from './edge/EdgeNodeTunnelManager';\nimport { FrpTunnelManager } from './edge/FrpTunnelManager';\nimport { AcmeCertificateManager } from './edge/acme/AcmeCertificateManager';\nimport { EdgeNodeHealthProbeService } from './edge/EdgeNodeHealthProbeService';\nimport { EdgeNodeAgent } from './edge/EdgeNodeAgent';\nimport { EdgeNodeCertificateService } from './service/EdgeNodeCertificateService';\nimport { createBandwidthThrottleTransform } from './util/stream/BandwidthThrottleTransform';\nimport { UsageTrackingStore } from './storage/quota/UsageTrackingStore';\nimport { EdgeNodeModeDetector } from './edge/EdgeNodeModeDetector';\nimport { ClusterIdentifierStrategy } from './util/identifiers/ClusterIdentifierStrategy';\nimport { CenterNodeRegistrationService } from './identity/CenterNodeRegistrationService';\nimport { PodRoutingHttpHandler } from './http/PodRoutingHttpHandler';\nimport { ReactAppViewHandler } from './identity/ReactAppViewHandler';\nimport { SqliteQuintStore } from './storage/quint/SqliteQuintStore';\nimport { PgQuintStore } from './storage/quint/PgQuintStore';\nimport { QuintStore } from './storage/quint/types';\nimport { RdfQuadIndex } from './storage/rdf/RdfQuadIndex';\nimport { Rdf3xIndex } from './storage/rdf/Rdf3xIndex';\nimport { RdfSparqlAdapter } from './storage/rdf/RdfSparqlAdapter';\nimport { RdfTermDictionary } from './storage/rdf/RdfTermDictionary';\nimport { ShadowRdfQuintStore } from './storage/rdf/ShadowRdfQuintStore';\nimport { SolidRdfEngine } from './storage/rdf/SolidRdfEngine';\nimport { SolidRdfSparqlEngine } from './storage/rdf/SolidRdfSparqlEngine';\nimport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\n// Vector components\nimport { SqliteVectorStore, PostgresVectorStore } from './storage/vector/index';\nimport { VectorHttpHandler } from './http/vector/VectorHttpHandler';\nimport { ProviderRegistry } from './ai/service/ProviderRegistry';\nimport { ProviderRegistryImpl } from './ai/service/ProviderRegistryImpl';\nimport { EmbeddingService } from './ai/service/EmbeddingService';\nimport { EmbeddingServiceImpl } from './ai/service/EmbeddingServiceImpl';\nimport { CredentialReader } from './ai/service/CredentialReader';\nimport { CredentialReaderImpl } from './ai/service/CredentialReaderImpl';\nimport { VectorStore } from './storage/vector/VectorStore';\n// Tunnel and Subdomain components\nimport { CloudflareTunnelProvider } from './tunnel/CloudflareTunnelProvider';\nimport { LocalTunnelProvider } from './tunnel/LocalTunnelProvider';\nimport { SubdomainService } from './subdomain/SubdomainService';\nimport { UrlAwareRedisLocker } from './storage/locking/UrlAwareRedisLocker';\n// IdP/SP separation components\nimport { MultiDomainIdentifierStrategy } from './util/identifiers/MultiDomainIdentifierStrategy';\nimport { SubdomainPodIdentifierStrategy } from './util/identifiers/SubdomainPodIdentifierStrategy';\nimport { DisabledOidcHandler } from './identity/oidc/DisabledOidcHandler';\nimport { DisabledIdentityProviderHandler } from './identity/oidc/DisabledIdentityProviderHandler';\nimport { AutoDetectOidcHandler } from './identity/oidc/AutoDetectOidcHandler';\nimport { AutoDetectIdentityProviderHandler } from './identity/oidc/AutoDetectIdentityProviderHandler';\nimport { LoopbackClientIdAdapterFactory } from './identity/oidc/LoopbackClientIdAdapterFactory';\nimport { ScopedPickWebIdHandler } from './identity/oidc/ScopedPickWebIdHandler';\n// Provision components\nimport { ProvisionPodCreator } from './provision/ProvisionPodCreator';\nimport { ProvisionCodeCodec } from './provision/ProvisionCodeCodec';\nimport { LocalPodProvisioningService } from './provision/LocalPodProvisioningService';\n// Authorization components\nimport { AuthModeSelector } from './authorization/AuthModeSelector';\n\nexport type {\n DnsProvider,\n ListDnsRecordsInput,\n ListableDnsProvider,\n DeleteDnsRecordInput,\n DnsRecordSummary,\n UpsertDnsRecordInput,\n} from './dns/DnsProvider';\nexport type { EdgeNodeCertificateProvisioner } from './edge/EdgeNodeCertificateProvisioner';\nexport type { EdgeNodeTunnelManager } from './edge/interfaces/EdgeNodeTunnelManager';\nexport type { QuotaService, AccountQuota } from './quota/QuotaService';\nexport type { EntitlementProvider, AccountEntitlement } from './quota/EntitlementProvider';\n// Tunnel and Subdomain types\nexport type {\n TunnelProvider,\n TunnelConfig,\n TunnelSetupOptions,\n TunnelStatus,\n} from './tunnel/TunnelProvider';\nexport type {\n SubdomainRegistration,\n ConnectivityResult,\n SubdomainServiceOptions,\n} from './subdomain/SubdomainService';\n// Export the new AppStaticAssetHandler\nexport { AppStaticAssetHandler } from './http/AppStaticAssetHandler';\n\nexport { \n RepresentationPartialConvertingStore,\n MinioDataAccessor, \n QuadstoreSparqlDataAccessor,\n QuintStoreSparqlDataAccessor,\n SolidRdfDataAccessor,\n MixDataAccessor,\n ConfigurableLoggerFactory,\n SparqlUpdateResourceStore,\n SubgraphQueryEngine,\n QuadstoreSparqlEngine,\n QuintstoreSparqlEngine,\n SubgraphSparqlHttpHandler,\n QuotaAdminHttpHandler,\n ClusterIngressRouter,\n ClusterWebSocketConfigurator,\n EdgeNodeDirectDebugHttpHandler,\n EdgeNodeProxyHttpHandler,\n RouterHttpHandler,\n RouterHttpRoute,\n TracingHandler,\n EdgeNodeCertificateHttpHandler,\n TerminalHttpHandler,\n ReservedSuffixIdentifierGenerator,\n DrizzleIndexedStorage,\n ValidatingIdentityProviderHttpHandler,\n PostgresKeyValueStorage,\n RedisKeyValueStorage,\n SqliteKeyValueStorage,\n DrizzleQuotaService,\n NoopQuotaService,\n HttpEntitlementProvider,\n NoopEntitlementProvider,\n PerAccountQuotaStrategy,\n TencentDnsProvider,\n EdgeNodeDnsCoordinator,\n Dns01CertificateProvisioner,\n SimpleEdgeNodeTunnelManager,\n NoopEdgeNodeTunnelManager,\n FrpTunnelManager,\n EdgeNodeHealthProbeService,\n EdgeNodeAgent,\n EdgeNodeCertificateService,\n AcmeCertificateManager,\n EdgeNodeModeDetector,\n ClusterIdentifierStrategy,\n UsageTrackingStore,\n CenterNodeRegistrationService,\n PodRoutingHttpHandler,\n ReactAppViewHandler,\n // Quint exports\n QuintStore,\n SqliteQuintStore,\n PgQuintStore,\n // RDF engine exports\n RdfTermDictionary,\n RdfQuadIndex,\n Rdf3xIndex,\n RdfSparqlAdapter,\n ShadowRdfQuintStore,\n SolidRdfEngine,\n SolidRdfSparqlEngine,\n // Vector exports\n VectorStore,\n SqliteVectorStore,\n PostgresVectorStore,\n VectorHttpHandler,\n // Embedding exports\n ProviderRegistry,\n ProviderRegistryImpl,\n EmbeddingService,\n EmbeddingServiceImpl,\n CredentialReader,\n CredentialReaderImpl,\n // Tunnel and Subdomain exports\n CloudflareTunnelProvider,\n LocalTunnelProvider,\n SubdomainService,\n // IdP/SP separation exports\n MultiDomainIdentifierStrategy,\n SubdomainPodIdentifierStrategy,\n DisabledOidcHandler,\n DisabledIdentityProviderHandler,\n AutoDetectOidcHandler,\n AutoDetectIdentityProviderHandler,\n LoopbackClientIdAdapterFactory,\n ScopedPickWebIdHandler,\n UrlAwareRedisLocker,\n // Provision exports\n ProvisionPodCreator,\n ProvisionCodeCodec,\n LocalPodProvisioningService,\n // Authorization exports\n AuthModeSelector,\n};\n"]}
|
package/dist/runtime/Proxy.d.ts
CHANGED
|
@@ -20,7 +20,10 @@ export declare class GatewayProxy {
|
|
|
20
20
|
stop(): Promise<void>;
|
|
21
21
|
private handleRequest;
|
|
22
22
|
private shouldInspectRootMutation;
|
|
23
|
+
private shouldRejectRootResourceMutation;
|
|
24
|
+
private writeRootMutationForbidden;
|
|
23
25
|
private normalizeRootMutationProxyResponse;
|
|
26
|
+
private createRootMutationForbiddenBody;
|
|
24
27
|
private sanitizeProxyResponseHeaders;
|
|
25
28
|
private handleCorsPreflightRequest;
|
|
26
29
|
/**
|
package/dist/runtime/Proxy.js
CHANGED
|
@@ -148,6 +148,10 @@ class GatewayProxy {
|
|
|
148
148
|
}
|
|
149
149
|
// 3. CSS Routing (Default)
|
|
150
150
|
if (this.targets.css) {
|
|
151
|
+
if (this.shouldRejectRootResourceMutation(req)) {
|
|
152
|
+
this.writeRootMutationForbidden(res);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
151
155
|
const interceptedRequest = req;
|
|
152
156
|
interceptedRequest.__xpodInspectRootMutation = this.shouldInspectRootMutation(req);
|
|
153
157
|
this.proxy.web(req, res, {
|
|
@@ -169,6 +173,23 @@ class GatewayProxy {
|
|
|
169
173
|
const segments = pathname.split('/').filter(Boolean);
|
|
170
174
|
return segments.length === 1 && !segments[0].startsWith('.');
|
|
171
175
|
}
|
|
176
|
+
shouldRejectRootResourceMutation(req) {
|
|
177
|
+
const method = (req.method ?? 'GET').toUpperCase();
|
|
178
|
+
if (!['POST', 'PUT', 'PATCH', 'DELETE'].includes(method)) {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
const pathname = new URL(req.url ?? '/', 'http://localhost').pathname;
|
|
182
|
+
const segments = pathname.split('/').filter(Boolean);
|
|
183
|
+
return segments.length === 1 && !segments[0].startsWith('.') && !pathname.endsWith('/');
|
|
184
|
+
}
|
|
185
|
+
writeRootMutationForbidden(res) {
|
|
186
|
+
const body = Buffer.from(JSON.stringify(this.createRootMutationForbiddenBody()));
|
|
187
|
+
res.writeHead(403, {
|
|
188
|
+
'Content-Type': 'application/json',
|
|
189
|
+
'Content-Length': String(body.byteLength),
|
|
190
|
+
});
|
|
191
|
+
res.end(body);
|
|
192
|
+
}
|
|
172
193
|
normalizeRootMutationProxyResponse(proxyRes, body) {
|
|
173
194
|
const headers = { ...proxyRes.headers };
|
|
174
195
|
const statusCode = proxyRes.statusCode ?? 500;
|
|
@@ -181,13 +202,7 @@ class GatewayProxy {
|
|
|
181
202
|
if (statusCode === 500 &&
|
|
182
203
|
bodyText.includes('Cannot obtain the parent of') &&
|
|
183
204
|
bodyText.includes('because it is a root container')) {
|
|
184
|
-
const normalizedBody = Buffer.from(JSON.stringify(
|
|
185
|
-
name: 'ForbiddenHttpError',
|
|
186
|
-
message: 'Write to server root is not allowed.',
|
|
187
|
-
statusCode: 403,
|
|
188
|
-
errorCode: 'H403',
|
|
189
|
-
details: { cause: 'root-container-write' },
|
|
190
|
-
}));
|
|
205
|
+
const normalizedBody = Buffer.from(JSON.stringify(this.createRootMutationForbiddenBody()));
|
|
191
206
|
delete headers['content-length'];
|
|
192
207
|
delete headers['transfer-encoding'];
|
|
193
208
|
headers['content-type'] = 'application/json';
|
|
@@ -198,6 +213,15 @@ class GatewayProxy {
|
|
|
198
213
|
headers['content-length'] = String(body.byteLength);
|
|
199
214
|
return { statusCode, headers, body };
|
|
200
215
|
}
|
|
216
|
+
createRootMutationForbiddenBody() {
|
|
217
|
+
return {
|
|
218
|
+
name: 'ForbiddenHttpError',
|
|
219
|
+
message: 'Write to server root is not allowed.',
|
|
220
|
+
statusCode: 403,
|
|
221
|
+
errorCode: 'H403',
|
|
222
|
+
details: { cause: 'root-container-write' },
|
|
223
|
+
};
|
|
224
|
+
}
|
|
201
225
|
sanitizeProxyResponseHeaders(req, proxyRes) {
|
|
202
226
|
const method = (req.method ?? 'GET').toUpperCase();
|
|
203
227
|
const statusCode = proxyRes.statusCode ?? 200;
|