feat: add canonical typed tool outputs
This commit is contained in:
@@ -156,6 +156,12 @@ describe('dsh-tool-ralph', () => {
|
||||
report: COMPLETE,
|
||||
})
|
||||
expect(result.isError).toBe(false)
|
||||
if (result.isError) throw new Error('expected Ralph success')
|
||||
expect(result.value).toEqual({
|
||||
runId: 'ralph-1',
|
||||
agentsStarted: 1,
|
||||
result: { status: 'complete', roundsStarted: 1, report: COMPLETE },
|
||||
})
|
||||
expect((result.content[0] as { text: string }).text)
|
||||
.toContain('Ralph worker reported completion after 1 round.')
|
||||
expect((result.content[0] as { text: string }).text).toContain('All required gates pass.')
|
||||
@@ -279,7 +285,7 @@ describe('dsh-tool-ralph', () => {
|
||||
expect((await execute(ctx, { objective: 'Work.', maxRounds }, { agent: parent })).isError).toBe(true)
|
||||
}
|
||||
const missing = await execute(ctx, {}, { agent: parent })
|
||||
expect(missing.error?.code).toBe('INVALID_ARGS')
|
||||
expect(missing.error?.info?.code).toBe('INVALID_ARGS')
|
||||
expect(engine.requests).toHaveLength(0)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user