fix: constrain Pascal tools after initial inspection
This commit is contained in:
parent
ab657330ea
commit
16bfd0bd38
@ -34,13 +34,13 @@ describe('Pascal agent intent', () => {
|
|||||||
).toBe(false)
|
).toBe(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
test('forces a mutation after two inspection steps', () => {
|
test('forces a mutation after the first inspection step', () => {
|
||||||
expect(
|
expect(
|
||||||
pascalAgentStepPolicy({
|
pascalAgentStepPolicy({
|
||||||
hasMutation: false,
|
hasMutation: false,
|
||||||
mutationRequired: true,
|
mutationRequired: true,
|
||||||
mutationToolNames: ['create_room', 'add_door'],
|
mutationToolNames: ['create_room', 'add_door'],
|
||||||
stepNumber: 2,
|
stepNumber: 1,
|
||||||
}),
|
}),
|
||||||
).toEqual({
|
).toEqual({
|
||||||
activeTools: ['create_room', 'add_door'],
|
activeTools: ['create_room', 'add_door'],
|
||||||
|
|||||||
@ -34,7 +34,7 @@ export function pascalAgentStepPolicy(params: {
|
|||||||
stepNumber: number
|
stepNumber: number
|
||||||
}): { activeTools?: string[]; toolChoice: 'auto' | 'required' } {
|
}): { activeTools?: string[]; toolChoice: 'auto' | 'required' } {
|
||||||
if (!(params.mutationRequired && !params.hasMutation)) return { toolChoice: 'auto' }
|
if (!(params.mutationRequired && !params.hasMutation)) return { toolChoice: 'auto' }
|
||||||
if (params.stepNumber < 2) return { toolChoice: 'required' }
|
if (params.stepNumber < 1) return { toolChoice: 'required' }
|
||||||
return {
|
return {
|
||||||
activeTools: params.mutationToolNames,
|
activeTools: params.mutationToolNames,
|
||||||
toolChoice: 'required',
|
toolChoice: 'required',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user