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)
|
||||
})
|
||||
|
||||
test('forces a mutation after two inspection steps', () => {
|
||||
test('forces a mutation after the first inspection step', () => {
|
||||
expect(
|
||||
pascalAgentStepPolicy({
|
||||
hasMutation: false,
|
||||
mutationRequired: true,
|
||||
mutationToolNames: ['create_room', 'add_door'],
|
||||
stepNumber: 2,
|
||||
stepNumber: 1,
|
||||
}),
|
||||
).toEqual({
|
||||
activeTools: ['create_room', 'add_door'],
|
||||
|
||||
@ -34,7 +34,7 @@ export function pascalAgentStepPolicy(params: {
|
||||
stepNumber: number
|
||||
}): { activeTools?: string[]; toolChoice: 'auto' | 'required' } {
|
||||
if (!(params.mutationRequired && !params.hasMutation)) return { toolChoice: 'auto' }
|
||||
if (params.stepNumber < 2) return { toolChoice: 'required' }
|
||||
if (params.stepNumber < 1) return { toolChoice: 'required' }
|
||||
return {
|
||||
activeTools: params.mutationToolNames,
|
||||
toolChoice: 'required',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user