sync: update from private repo (edc775f2)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-07-06 01:04:12 +00:00
parent 747377bef9
commit b1292e34b2
322 changed files with 28001 additions and 4686 deletions
+3 -2
View File
@@ -75,7 +75,7 @@ describe('web tools', () => {
vi.restoreAllMocks();
});
it('blocks WebFetch on PDF responses and suggests ReadPdf', async () => {
it('blocks WebFetch on PDF responses and suggests DownloadFile + Read', async () => {
workspacePath = makeWorkspace();
vi.stubGlobal('fetch', vi.fn().mockResolvedValue(new Response('%PDF-1.4', {
status: 200,
@@ -86,7 +86,8 @@ describe('web tools', () => {
expect(result).not.toBeNull();
expect(result?.isError).toBe(true);
expect(result?.output).toContain('ReadPdf');
expect(result?.output).toContain('Read');
expect(result?.output).not.toContain('ReadPdf');
const history = fs.readFileSync(path.join(workspacePath, 'logs', 'webfetch-history.jsonl'), 'utf-8').trim().split('\n').map((line) => JSON.parse(line) as Record<string, unknown>);
expect(history).toHaveLength(1);
expect(history[0]?.url).toBe('https://example.com/manual.pdf');