feat(ql3): expose redacted log tails over local mcp

This commit is contained in:
whyour
2026-08-14 18:59:29 +08:00
parent fef0fe2bd1
commit 82adb9ace2
20 changed files with 750 additions and 354 deletions
@@ -17,6 +17,7 @@ function candidate(root) {
projectId: 'default',
deploymentRoot: root,
databasePath: path.join(root, 'data', 'qinglong3.sqlite'),
artifactRoot: path.join(root, 'artifacts'),
ownerPepperKeyringDirectory: path.join(root, 'owner-peppers'),
credentialFilePath: path.join(root, 'operator', 'credential.json'),
busyTimeoutMs: 500,
@@ -50,6 +51,14 @@ test('rejects public config files, extra keys and authority paths outside deploy
() => normalizeLocalMcpServerConfig({ ...candidate(root), extra: true }),
{ code: 'LOCAL_MCP_SERVER_CONFIG_INVALID' },
);
assert.throws(
() =>
normalizeLocalMcpServerConfig({
...candidate(root),
schema: 'qinglong/local-mcp-server@v1',
}),
{ code: 'LOCAL_MCP_SERVER_CONFIG_INVALID' },
);
assert.throws(
() =>
normalizeLocalMcpServerConfig({
@@ -58,6 +67,14 @@ test('rejects public config files, extra keys and authority paths outside deploy
}),
{ code: 'LOCAL_MCP_SERVER_CONFIG_INVALID' },
);
assert.throws(
() =>
normalizeLocalMcpServerConfig({
...candidate(root),
artifactRoot: path.join(root, 'data', 'qinglong3.sqlite'),
}),
{ code: 'LOCAL_MCP_SERVER_CONFIG_INVALID' },
);
} finally {
fs.rmSync(root, { recursive: true, force: true });
}