feat(release): prepare 1.1.0 candidate
This commit is contained in:
parent
5a34f66981
commit
5205dcdfa9
736 changed files with 115667 additions and 12203 deletions
|
|
@ -0,0 +1,66 @@
|
|||
import {
|
||||
assertEquals,
|
||||
assertThrows,
|
||||
} from 'https://deno.land/std@0.224.0/assert/mod.ts'
|
||||
import {
|
||||
MeetingDocumentRequestError,
|
||||
parseGenerateMeetingDocumentRequest,
|
||||
parseProviderDocumentResult,
|
||||
} from './meeting-document-contract.ts'
|
||||
|
||||
const meetingId = '11111111-1111-4111-8111-111111111111'
|
||||
const templateId = '22222222-2222-4222-8222-222222222222'
|
||||
const idempotencyKey = '33333333-3333-4333-8333-333333333333'
|
||||
|
||||
Deno.test('meeting generation request is strict and normalized', () => {
|
||||
assertEquals(parseGenerateMeetingDocumentRequest({
|
||||
meetingId,
|
||||
templateId,
|
||||
idempotencyKey,
|
||||
title: ' Weekly summary ',
|
||||
}), {
|
||||
meetingId,
|
||||
templateId,
|
||||
idempotencyKey,
|
||||
title: 'Weekly summary',
|
||||
model: 'claude-haiku-4-5-20251001',
|
||||
})
|
||||
})
|
||||
|
||||
Deno.test('meeting generation request rejects unknown fields and bad identifiers', () => {
|
||||
assertThrows(
|
||||
() => parseGenerateMeetingDocumentRequest({
|
||||
meetingId: 'not-a-uuid',
|
||||
templateId,
|
||||
idempotencyKey,
|
||||
title: 'Summary',
|
||||
}),
|
||||
MeetingDocumentRequestError,
|
||||
)
|
||||
assertThrows(
|
||||
() => parseGenerateMeetingDocumentRequest({
|
||||
meetingId,
|
||||
templateId,
|
||||
idempotencyKey,
|
||||
title: 'Summary',
|
||||
prompt: 'override server template',
|
||||
}),
|
||||
MeetingDocumentRequestError,
|
||||
)
|
||||
})
|
||||
|
||||
Deno.test('provider result accepts text blocks and bounded token usage', () => {
|
||||
assertEquals(parseProviderDocumentResult({
|
||||
content: [
|
||||
{ type: 'text', text: '## Summary' },
|
||||
{ type: 'tool_use', name: 'ignored' },
|
||||
{ type: 'text', text: 'Verified content' },
|
||||
],
|
||||
usage: { input_tokens: 14, output_tokens: 8 },
|
||||
}), {
|
||||
content: '## Summary\n\nVerified content',
|
||||
inputTokens: 14,
|
||||
outputTokens: 8,
|
||||
})
|
||||
assertEquals(parseProviderDocumentResult({ content: [] }), null)
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue