test(live): retain original public metadata for AD reconciliation
This commit is contained in:
@@ -39,6 +39,12 @@ export function attempts() {
|
||||
try { const row = db.prepare('SELECT value FROM metadata WHERE key=?').get('modelAttempts'); return row ? JSON.parse(row.value) : []; }
|
||||
finally { db.close(); }
|
||||
}
|
||||
export function publicMetadata(dataRoot) {
|
||||
const db = new DatabaseSync(path.join(dataRoot, 'workbench.sqlite'), { readOnly: true });
|
||||
try { return Object.fromEntries(['config','modelRegistry','modelAttempts','modelNetworkDiagnostics'].map(key => {
|
||||
const row = db.prepare('SELECT value FROM metadata WHERE key=?').get(key); return [key, row ? JSON.parse(row.value) : null];
|
||||
})); } finally { db.close(); }
|
||||
}
|
||||
export async function client() {
|
||||
const dispatcher = new Agent({ connect: { autoSelectFamily: true, timeout: 5000 } }); let token;
|
||||
const api = async (route, input, timeout = 30000) => {
|
||||
|
||||
Reference in New Issue
Block a user