@@ -4,9 +4,12 @@ import { QuickBooksBlock } from '@/blocks/blocks/quickbooks'
44import {
55 getQuickBooksAttachmentTarget ,
66 parseQuickBooksAttachableResponse ,
7+ QUICKBOOKS_FILE_TOOL_RESPONSE_MAX_BYTES ,
78 sanitizeQuickBooksFileName ,
89 validateQuickBooksAttachmentFileType ,
910} from '@/tools/quickbooks/documents_utils'
11+ import { quickbooksDownloadAttachmentTool } from '@/tools/quickbooks/download_attachment'
12+ import { quickbooksDownloadTransactionPdfTool } from '@/tools/quickbooks/download_transaction_pdf'
1013import { quickbooksEmailTransactionTool } from '@/tools/quickbooks/email_transaction'
1114import { quickbooksReadAttachmentsTool } from '@/tools/quickbooks/read_attachments'
1215import type {
@@ -251,6 +254,16 @@ describe('QuickBooks document validation and block parity', () => {
251254 )
252255 } )
253256
257+ it ( 'allows bounded 100 MiB file outputs to pass through the tool executor' , ( ) => {
258+ expect ( quickbooksDownloadTransactionPdfTool . request . maxResponseBytes ) . toBe (
259+ QUICKBOOKS_FILE_TOOL_RESPONSE_MAX_BYTES
260+ )
261+ expect ( quickbooksDownloadAttachmentTool . request . maxResponseBytes ) . toBe (
262+ QUICKBOOKS_FILE_TOOL_RESPONSE_MAX_BYTES
263+ )
264+ expect ( QUICKBOOKS_FILE_TOOL_RESPONSE_MAX_BYTES ) . toBeGreaterThan ( ( 100 * 1024 * 1024 * 4 ) / 3 )
265+ } )
266+
254267 it ( 'exposes exactly 45 operation/tool pairs and a canonical single-file input pair' , ( ) => {
255268 const operation = QuickBooksBlock . subBlocks . find ( ( block ) => block . id === 'operation' )
256269 expect ( operation ?. options ) . toHaveLength ( 45 )
0 commit comments