fix: constrain Pascal tools after initial inspection

This commit is contained in:
134 2026-07-12 10:35:55 +08:00
parent ab657330ea
commit 16bfd0bd38
2 changed files with 3 additions and 3 deletions

View File

@ -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'],

View File

@ -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',