refactor(authority): complete v0.6-only sql/blob/jobs rollout

This commit is contained in:
Youzini-afk
2026-04-28 21:45:21 +08:00
parent a5b822682a
commit a7e2edac88
23 changed files with 1816 additions and 212 deletions

View File

@@ -97,6 +97,9 @@ export function createAuthorityE2eContext(options = {}) {
const namespace = String(env.AUTHORITY_E2E_NAMESPACE || `st-bme-e2e-${runId}`);
const collectionId = String(env.AUTHORITY_E2E_COLLECTION_ID || `${namespace}::${chatId}`);
const blobPath = String(env.AUTHORITY_E2E_BLOB_PATH || `st-bme/e2e/${runId}/contract.json`);
const embeddingApiUrl = String(env.AUTHORITY_E2E_EMBEDDING_API_URL || "").trim();
const embeddingApiKey = String(env.AUTHORITY_E2E_EMBEDDING_API_KEY || "").trim();
const embeddingModel = String(env.AUTHORITY_E2E_EMBEDDING_MODEL || "").trim();
return {
skip: false,
env,
@@ -110,6 +113,9 @@ export function createAuthorityE2eContext(options = {}) {
namespace,
collectionId,
blobPath,
embeddingApiUrl,
embeddingApiKey,
embeddingModel,
};
}
@@ -181,6 +187,7 @@ export function buildAuthorityE2eVectorEntries(graph = null) {
index,
hash: `${node.id}:hash`,
text: `${node.fields?.title || node.id}. ${node.fields?.summary || ""}`,
vector: [1, index + 1, String(node.fields?.title || node.id || "").length / 100],
}));
}