feat(session-query): add model-facing tools (round 1)
This commit is contained in:
@@ -141,6 +141,24 @@ describe('bootHost / startHost', () => {
|
||||
await handle.dispose()
|
||||
})
|
||||
|
||||
it('assembles workspace-authorized session query tools over the derived SQLite index', async () => {
|
||||
const persistenceRoot = mkdtempSync(join(tmpdir(), 'dsh-boot-session-query-'))
|
||||
const handle = await bootHost({
|
||||
persistenceRoot,
|
||||
workspaceContext: false,
|
||||
})
|
||||
expect(handle.ctx.get('sessionQuery')).toBeDefined()
|
||||
expect(handle.ctx.tools.schemas().map(schema => schema.name)).toEqual(expect.arrayContaining([
|
||||
'session_search',
|
||||
'session_event_search',
|
||||
'session_trace',
|
||||
'session_event_trace',
|
||||
'session_event_read',
|
||||
]))
|
||||
expect(handle.ctx.tools.get('session_search')?.timeoutMs).toBe(30_000)
|
||||
await handle.dispose()
|
||||
})
|
||||
|
||||
it('startHost assembles api + handler over the same defaults and dedupes dispose', async () => {
|
||||
const running = await boot()
|
||||
expect(running.defaults).toMatchObject({ provider: 'scripted', model: 'test-model' })
|
||||
|
||||
Reference in New Issue
Block a user