diff --git a/src/agents/definitions/implementation.yaml b/src/agents/definitions/implementation.yaml index c8b8849e..0cbda959 100644 --- a/src/agents/definitions/implementation.yaml +++ b/src/agents/definitions/implementation.yaml @@ -60,7 +60,6 @@ backend: scm: enableStopHooks: true requiresPR: true - postConfigure: sequentialGadgetExecution hint: >- diff --git a/src/agents/definitions/schema.ts b/src/agents/definitions/schema.ts index abdcaf5d..36af1614 100644 --- a/src/agents/definitions/schema.ts +++ b/src/agents/definitions/schema.ts @@ -250,7 +250,6 @@ const BackendSchema = z.object({ requiresPR: z.boolean().optional(), /** Category-scoped hook configuration */ hooks: HooksSchema.optional(), - postConfigure: z.enum(['sequentialGadgetExecution']).optional(), }); const TrailingMessageSchema = z diff --git a/src/agents/shared/builderFactory.ts b/src/agents/shared/builderFactory.ts index 0229b466..89907ac0 100644 --- a/src/agents/shared/builderFactory.ts +++ b/src/agents/shared/builderFactory.ts @@ -36,8 +36,6 @@ export interface CreateBuilderOptions { skipSessionState?: boolean; /** Remaining card budget in USD — passed to llmist's withBudget() for in-flight enforcement */ remainingBudgetUsd?: number; - /** Post-configuration callback for agent-specific builder tweaks */ - postConfigure?: (builder: BuilderType) => BuilderType; /** Accumulator for per-call LLM metrics (for run tracking) */ llmCallAccumulator?: AccumulatedLlmCall[]; /** Run ID for real-time LLM call logging (resolved before builder creation) */ @@ -73,7 +71,6 @@ export async function createConfiguredBuilder(options: CreateBuilderOptions): Pr progressMonitor, skipSessionState, remainingBudgetUsd, - postConfigure, } = options; // Initialize session state for gadgets (e.g., Finish checks PR requirement for implementation) @@ -128,9 +125,7 @@ export async function createConfiguredBuilder(options: CreateBuilderOptions): Pr } } - if (postConfigure) { - builder = postConfigure(builder); - } + builder = builder.withGadgetExecutionMode('sequential'); return builder; } diff --git a/src/backends/llmist/index.ts b/src/backends/llmist/index.ts index 9363a4d5..25531996 100644 --- a/src/backends/llmist/index.ts +++ b/src/backends/llmist/index.ts @@ -3,7 +3,6 @@ import os from 'node:os'; import { LLMist, type ModelSpec, createLogger } from 'llmist'; import { createIntegrationChecker } from '../../agents/capabilities/index.js'; -import { resolveAgentDefinition } from '../../agents/definitions/index.js'; import { type BuilderType, createConfiguredBuilder } from '../../agents/shared/builderFactory.js'; import { injectSyntheticCall } from '../../agents/shared/syntheticCalls.js'; import { runAgentLoop } from '../../agents/utils/agentLoop.js'; @@ -17,11 +16,6 @@ import { extractPRUrl } from '../../utils/prUrl.js'; import { getAgentProfile } from '../agent-profiles.js'; import type { AgentBackend, AgentBackendInput, AgentBackendResult } from '../types.js'; -/** Post-configure registry: maps YAML string references to builder transform functions */ -const POST_CONFIGURE_REGISTRY: Record BuilderType> = { - sequentialGadgetExecution: (b) => b.withGadgetExecutionMode('sequential'), -}; - /** * llmist backend — executes agents using the llmist SDK. * @@ -122,16 +116,6 @@ export class LlmistBackend implements AgentBackend { progressMonitor: progressReporter as Parameters< typeof createConfiguredBuilder >[0]['progressMonitor'], - // Post-configure hook from YAML definition (e.g., sequentialGadgetExecution for implementation) - postConfigure: await (async () => { - try { - const def = await resolveAgentDefinition(agentType); - const hookName = def.backend.postConfigure; - return hookName ? POST_CONFIGURE_REGISTRY[hookName] : undefined; - } catch { - return undefined; - } - })(), }); // Convert ContextInjection[] from the unified adapter into synthetic gadget calls. diff --git a/tests/unit/agents/definitions/loader.test.ts b/tests/unit/agents/definitions/loader.test.ts index 88653f21..7e1cd375 100644 --- a/tests/unit/agents/definitions/loader.test.ts +++ b/tests/unit/agents/definitions/loader.test.ts @@ -131,11 +131,6 @@ describe('YAML agent definitions loader', () => { }); describe('definition content spot checks', () => { - it('implementation has postConfigure hook', () => { - const def = loadAgentDefinition('implementation'); - expect(def.backend.postConfigure).toBe('sequentialGadgetExecution'); - }); - it('implementation has requiresPR flag in hooks.scm', () => { const def = loadAgentDefinition('implementation'); expect(def.backend.hooks?.scm?.requiresPR).toBe(true); @@ -265,7 +260,6 @@ describe('YAML agent definitions loader', () => { expect(caps.isReadOnly).toBe(false); expect(def.backend.hooks?.scm?.enableStopHooks).toBe(true); expect(def.backend.needsGitHubToken).toBe(true); - expect(def.backend.postConfigure).toBe('sequentialGadgetExecution'); }); it('review agent is read-only', async () => { diff --git a/tests/unit/agents/definitions/schema.test.ts b/tests/unit/agents/definitions/schema.test.ts index 72f9df59..3847a89b 100644 --- a/tests/unit/agents/definitions/schema.test.ts +++ b/tests/unit/agents/definitions/schema.test.ts @@ -350,7 +350,6 @@ describe('AgentDefinitionSchema', () => { backend: { ...validDefinition.backend, blockGitPush: false, - postConfigure: 'sequentialGadgetExecution', }, trailingMessage: { includeDiagnostics: true, @@ -388,24 +387,6 @@ describe('AgentDefinitionSchema', () => { } }); - it('rejects invalid postConfigure hook names', () => { - const bad = { - ...validDefinition, - backend: { ...validDefinition.backend, postConfigure: 'nonexistentHook' }, - }; - const result = AgentDefinitionSchema.safeParse(bad); - expect(result.success).toBe(false); - }); - - it('accepts valid postConfigure hook name', () => { - const good = { - ...validDefinition, - backend: { ...validDefinition.backend, postConfigure: 'sequentialGadgetExecution' }, - }; - const result = AgentDefinitionSchema.safeParse(good); - expect(result.success).toBe(true); - }); - it('accepts requiresPR boolean', () => { const good = { ...validDefinition, diff --git a/tests/unit/agents/shared/builderFactory.test.ts b/tests/unit/agents/shared/builderFactory.test.ts index 914ca02a..a27aff19 100644 --- a/tests/unit/agents/shared/builderFactory.test.ts +++ b/tests/unit/agents/shared/builderFactory.test.ts @@ -44,6 +44,7 @@ const mockBuilderInstance = { withGadgets: vi.fn(), withMaxGadgetsPerResponse: vi.fn(), withBudget: vi.fn(), + withGadgetExecutionMode: vi.fn(), }; // Each method returns the builder for chaining @@ -232,22 +233,10 @@ describe('createConfiguredBuilder', () => { await expect(createConfiguredBuilder(options)).rejects.toThrow('Unexpected budget error'); }); - it('calls postConfigure callback when provided', async () => { - const customBuilder = { ...mockBuilderInstance, custom: true }; - const postConfigure = vi.fn().mockReturnValue(customBuilder); - const options = createBaseOptions({ postConfigure }); - - const result = await createConfiguredBuilder(options); - - expect(postConfigure).toHaveBeenCalled(); - expect(result).toBe(customBuilder); - }); - - it('does not call postConfigure when not provided', async () => { - const options = createBaseOptions({ postConfigure: undefined }); - - // Should not throw and returns builder - await expect(createConfiguredBuilder(options)).resolves.not.toThrow(); + it('calls withGadgetExecutionMode with sequential unconditionally', async () => { + const options = createBaseOptions(); + await createConfiguredBuilder(options); + expect(mockBuilderInstance.withGadgetExecutionMode).toHaveBeenCalledWith('sequential'); }); it('returns a builder with max gadgets per response set', async () => { diff --git a/web/src/components/settings/agent-definition-editor.tsx b/web/src/components/settings/agent-definition-editor.tsx index aa8de8eb..62ea8fd1 100644 --- a/web/src/components/settings/agent-definition-editor.tsx +++ b/web/src/components/settings/agent-definition-editor.tsx @@ -6,13 +6,6 @@ import { import { Badge } from '@/components/ui/badge.js'; import { Input } from '@/components/ui/input.js'; import { Label } from '@/components/ui/label.js'; -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from '@/components/ui/select.js'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs.js'; import { Textarea } from '@/components/ui/textarea.js'; import { @@ -449,27 +442,6 @@ function BackendSection({ description="Agent receives GitHub token for API access. Required for PR creation and code reviews." /> - -
-
-
- - -
- -
-
); }