feat: add BoxBrain persona runtime APIs

This commit is contained in:
2026-05-11 17:01:19 +09:00
parent c5a3d7e835
commit 3ee6b233ea
13 changed files with 2043 additions and 9 deletions

View File

@@ -2,8 +2,11 @@ import { describe, expect, it } from 'vitest';
import {
createReplyDelay,
createTypingDelay,
generateSchedule,
ONLINE_AVAILABILITY,
replyToConversation,
type BoxBrainFactDraft,
type SpecialDateProvider,
type TextModelAdapter,
} from '../src';
@@ -34,4 +37,16 @@ describe('public API', () => {
expect(fact.topics.map((topic) => topic.name)).toEqual(['Mina', 'quiet cafés']);
});
it('exports schedule, conversation, and external special-date adapter contracts', () => {
const specialDateProvider: SpecialDateProvider = {
async listSpecialDates() {
return [{ date: '2026-05-08', title: 'Parents Day' }];
},
};
expect(typeof generateSchedule).toBe('function');
expect(typeof replyToConversation).toBe('function');
expect(specialDateProvider.listSpecialDates).toBeTypeOf('function');
});
});