Fix test.

This commit is contained in:
Christian Gunderman
2026-03-13 16:17:38 -07:00
parent 3effa0f998
commit 576bf204ba
3 changed files with 7 additions and 1 deletions

View File

@@ -2017,6 +2017,10 @@ console.log(JSON.stringify({
// 3. Final setup with full settings
rig.setup('Hook Disabling Multiple Ops', {
fakeResponsesPath: join(
import.meta.dirname,
'hooks-system.multiple-ops.responses',
),
settings: {
hooksConfig: {
enabled: true,

View File

@@ -76,6 +76,7 @@ export async function executeToolWithHooks(
setExecutionIdCallback?: (executionId: number) => void,
config?: Config,
originalRequestName?: string,
skipBeforeHook?: boolean,
): Promise<ToolResult> {
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
const toolInput = (invocation.params || {}) as Record<string, unknown>;
@@ -86,7 +87,7 @@ export async function executeToolWithHooks(
const mcpContext = config ? extractMcpContext(invocation, config) : undefined;
const hookSystem = config?.getHookSystem();
if (hookSystem) {
if (hookSystem && !skipBeforeHook) {
const beforeOutput = await hookSystem.fireBeforeToolEvent(
toolName,
toolInput,

View File

@@ -116,6 +116,7 @@ export class ToolExecutor {
setExecutionIdCallback,
this.config,
request.originalRequestName,
true, // skipBeforeHook
);
const toolResult: ToolResult = await promise;