From 16bfd0bd380e6f011e1f4b0d508e1ff89149fe65 Mon Sep 17 00:00:00 2001 From: 134 Date: Sun, 12 Jul 2026 10:35:55 +0800 Subject: [PATCH] fix: constrain Pascal tools after initial inspection --- .../pascal-editor/apps/editor/lib/pascal-agent-intent.test.ts | 4 ++-- services/pascal-editor/apps/editor/lib/pascal-agent-intent.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/pascal-editor/apps/editor/lib/pascal-agent-intent.test.ts b/services/pascal-editor/apps/editor/lib/pascal-agent-intent.test.ts index 57b99c7ca..cdf722d2c 100644 --- a/services/pascal-editor/apps/editor/lib/pascal-agent-intent.test.ts +++ b/services/pascal-editor/apps/editor/lib/pascal-agent-intent.test.ts @@ -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'], diff --git a/services/pascal-editor/apps/editor/lib/pascal-agent-intent.ts b/services/pascal-editor/apps/editor/lib/pascal-agent-intent.ts index ab3b53227..33b96dc3c 100644 --- a/services/pascal-editor/apps/editor/lib/pascal-agent-intent.ts +++ b/services/pascal-editor/apps/editor/lib/pascal-agent-intent.ts @@ -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',