/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.json;
import java.util.concurrent.CompletableFuture;
/**
* Handler for post-tool-use hooks.
*
* This hook is called after a tool has been executed, allowing you to:
*
* - Inspect or modify tool results
* - Add additional context for the model
* - Suppress output
*
*
* @since 1.0.6
*/
@FunctionalInterface
public interface PostToolUseHandler {
/**
* Handles a post-tool-use hook invocation.
*
* @param input
* the hook input containing tool name, arguments, and result
* @param invocation
* context information about the invocation
* @return a future that resolves with the hook output, or {@code null} to use
* defaults
*/
CompletableFuture handle(PostToolUseHookInput input, HookInvocation invocation);
}