feat(page-data): add validation suggestions, repair path, and thinking fixes
Memind CI / Test, build, and release guards (push) Failing after 3m18s

Map Page Data failure codes to Chinese remediation hints, trigger one-shot
goosed repair for remediable cases, and recover poisoned thinking sessions.
Route local DeepSeek through the no-think proxy via host.docker.internal so
tool rounds no longer hit reasoning_content 400; document gate and case-study
scenarios for event registration repair.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-25 23:01:55 +08:00
parent 6b6f9ed01c
commit 8ccf2db05c
28 changed files with 1652 additions and 154 deletions
+29
View File
@@ -166,6 +166,35 @@ test('MindSearch uses the container-visible bundled MCP directory', () => {
assert.equal(extension.args[0], '/opt/portal/tkmind-search-mcp.mjs');
});
test('MindSearch keeps container MCP path even when sandboxMcp is absent', () => {
const previousContainerized = process.env.GOOSED_MCP_CONTAINERIZED;
const previousServerPath = process.env.GOOSED_MCP_SERVER_PATH;
process.env.GOOSED_MCP_CONTAINERIZED = '1';
process.env.GOOSED_MCP_SERVER_PATH = '/opt/portal/mindspace-sandbox-mcp.mjs';
try {
const policy = buildAgentExtensionPolicy(
{
...DEFAULT_USER_CAPABILITIES,
search_external: true,
},
{
mindSearchConfig: {
enabled: true,
mode: 'assist',
providers: {},
},
},
);
const extension = policy.extensionOverrides.find((ext) => ext.name === 'tkmind-search');
assert.equal(extension.args[0], '/opt/portal/tkmind-search-mcp.mjs');
} finally {
if (previousContainerized === undefined) delete process.env.GOOSED_MCP_CONTAINERIZED;
else process.env.GOOSED_MCP_CONTAINERIZED = previousContainerized;
if (previousServerPath === undefined) delete process.env.GOOSED_MCP_SERVER_PATH;
else process.env.GOOSED_MCP_SERVER_PATH = previousServerPath;
}
});
test('SearXNG adapter normalizes provider results without requiring a live network', async () => {
const result = await searchSearxng('goose', { endpoint: 'http://search.local', fetchImpl: async () => ({ ok: true, json: async () => ({ results: [{ title: 'Goose', url: 'https://example.com', content: 'snippet' }] }) }) });
assert.deepEqual(result[0], { title: 'Goose', url: 'https://example.com', snippet: 'snippet', source: 'searxng', rank: 1 });