Skip to content

The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.

492 B
Raw Blame
import type { CommentCheckerHookInput, CommentCheckRequest } from "./types.js";

export function toHookInput(
	request: CommentCheckRequest,
	context: {
		readonly sessionId: string;
		readonly cwd: string;
		readonly transcriptPath?: string;
	},
): CommentCheckerHookInput {
	return {
		session_id: context.sessionId,
		tool_name: request.toolName,
		transcript_path: context.transcriptPath ?? "",
		cwd: context.cwd,
		hook_event_name: "PostToolUse",
		tool_input: request.toolInput,
	};
}