{"modulePath":"github.com/blackcoderx/falcon","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package debugging\n\nPackage debugging provides debugging and codebase analysis tools for ZAP.\n\n## Types\n\n```go\ntype AnalyzeEndpointParams struct {\n\tEndpointDescription string `json:\"endpoint_description\"`\n\tMethod              string `json:\"method\"`\n\tURL                 string `json:\"url\"`\n\tSampleRequest       string `json:\"sample_request,omitempty\"`\n\tContext             string `json:\"context,omitempty\"`\n}\n```\nAnalyzeEndpointParams defines input for analyze\\_endpoint\n\n```go\ntype AnalyzeEndpointTool struct {\n\t// contains filtered or unexported fields\n}\n```\nAnalyzeEndpointTool uses LLM to analyze API endpoint structure\n\n```go\nfunc NewAnalyzeEndpointTool(llmClient llm.LLMClient) *AnalyzeEndpointTool\n```\nNewAnalyzeEndpointTool creates a new analyze\\_endpoint tool\n\n```go\nfunc (t *AnalyzeEndpointTool) Description() string\n```\n\n```go\nfunc (t *AnalyzeEndpointTool) Execute(args string) (string, error)\n```\n\n```go\nfunc (t *AnalyzeEndpointTool) Name() string\n```\n\n```go\nfunc (t *AnalyzeEndpointTool) Parameters() string\n```\n\n```go\ntype AnalyzeFailureParams struct {\n\tTestResult       shared.TestResult `json:\"test_result\"`\n\tResponseBody     string            `json:\"response_body\"`\n\tExpectedBehavior string            `json:\"expected_behavior\"`\n}\n```\nAnalyzeFailureParams defines input for analyze\\_failure\n\n```go\ntype AnalyzeFailureTool struct {\n\t// contains filtered or unexported fields\n}\n```\nAnalyzeFailureTool uses LLM to explain test failures\n\n```go\nfunc NewAnalyzeFailureTool(llmClient llm.LLMClient) *AnalyzeFailureTool\n```\nNewAnalyzeFailureTool creates a new analyze\\_failure tool\n\n```go\nfunc (t *AnalyzeFailureTool) Description() string\n```\n\n```go\nfunc (t *AnalyzeFailureTool) Execute(args string) (string, error)\n```\n\n```go\nfunc (t *AnalyzeFailureTool) Name() string\n```\n\n```go\nfunc (t *AnalyzeFailureTool) Parameters() string\n```\n\n```go\ntype AutoFixParams struct {\n\tEndpoint       string               `json:\"endpoint\"`                  // e.g. \"POST /api/users\"\n\tBaseURL        string               `json:\"base_url\"`                  // e.g. \"http://localhost:8080\"\n\tScenario       *shared.TestScenario `json:\"scenario,omitempty\"`        // optional pre-built scenario\n\tExpectedStatus int                  `json:\"expected_status,omitempty\"` // default 200\n\tMaxAttempts    int                  `json:\"max_attempts,omitempty\"`    // default 3\n}\n```\nAutoFixParams defines input for auto\\_fix.\n\n```go\ntype AutoFixTool struct {\n\t// contains filtered or unexported fields\n}\n```\nAutoFixTool orchestrates the full fix-and-verify loop: run test → analyze failure → find handler → propose fix → write (with confirmation) → re-run test. Retries up to MaxAttempts times if each fix attempt still fails.\n\n```go\nfunc NewAutoFixTool(\n\tfindHandler *FindHandlerTool,\n\treadFile *ReadFileTool,\n\tproposeFix *ProposeFixTool,\n\twriteFile *WriteFileTool,\n\ttestExecutor *shared.TestExecutor,\n\tanalyzeFailure *AnalyzeFailureTool,\n) *AutoFixTool\n```\nNewAutoFixTool creates a new auto\\_fix orchestrator.\n\n```go\nfunc (t *AutoFixTool) Description() string\n```\n\n```go\nfunc (t *AutoFixTool) Execute(args string) (string, error)\n```\n\n```go\nfunc (t *AutoFixTool) Name() string\n```\n\n```go\nfunc (t *AutoFixTool) Parameters() string\n```\n\n```go\nfunc (t *AutoFixTool) SetEventCallback(callback core.EventCallback)\n```\nSetEventCallback implements ConfirmableTool — propagates to WriteFileTool so the TUI confirmation dialog fires correctly when write\\_file is called internally.\n\n```go\ntype CreateTestFileParams struct {\n\tHandlerFile   string `json:\"handler_file\"`\n\tVulnerability string `json:\"vulnerability\"`\n\tFixApplied    bool   `json:\"fix_applied\"`\n\tFramework     string `json:\"framework\"`\n}\n```\n\n```go\ntype CreateTestFileTool struct {\n\t// contains filtered or unexported fields\n}\n```\nCreateTestFileTool generates framework-specific test files\n\n```go\nfunc NewCreateTestFileTool(llmClient llm.LLMClient) *CreateTestFileTool\n```\n\n```go\nfunc (t *CreateTestFileTool) Description() string\n```\n\n```go\nfunc (t *CreateTestFileTool) Execute(args string) (string, error)\n```\n\n```go\nfunc (t *CreateTestFileTool) Name() string\n```\n\n```go\nfunc (t *CreateTestFileTool) Parameters() string\n```\n\n```go\ntype FindHandlerParams struct {\n\tEndpoint  string `json:\"endpoint\"`\n\tMethod    string `json:\"method\"`\n\tPath      string `json:\"path\"`\n\tFramework string `json:\"framework\"`\n}\n```\nFindHandlerParams defines input for find\\_handler\n\n```go\ntype FindHandlerTool struct {\n\t// contains filtered or unexported fields\n}\n```\nFindHandlerTool locates endpoint handlers in the codebase\n\n```go\nfunc NewFindHandlerTool(workDir string) *FindHandlerTool\n```\nNewFindHandlerTool creates a new find\\_handler tool It internally creates a SearchCodeTool, which is also in the debugging package.\n\n```go\nfunc (t *FindHandlerTool) Description() string\n```\n\n```go\nfunc (t *FindHandlerTool) Execute(args string) (string, error)\n```\n\n```go\nfunc (t *FindHandlerTool) Name() string\n```\n\n```go\nfunc (t *FindHandlerTool) Parameters() string\n```\n\n```go\ntype HandlerInfo struct {\n\tFile         string   `json:\"file\"`\n\tLine         int      `json:\"line\"`\n\tContent      string   `json:\"content\"`\n\tRelatedFiles []string `json:\"related_files\"`\n\tAnalysis     string   `json:\"analysis\"`\n}\n```\nHandlerInfo contains details about a discovered handler\n\n```go\ntype ListFilesTool struct {\n\t// contains filtered or unexported fields\n}\n```\nListFilesTool lists files in a directory with glob patterns\n\n```go\nfunc NewListFilesTool(workDir string) *ListFilesTool\n```\nNewListFilesTool creates a new file listing tool\n\n```go\nfunc (t *ListFilesTool) Description() string\n```\n\n```go\nfunc (t *ListFilesTool) Execute(args string) (string, error)\n```\n\n```go\nfunc (t *ListFilesTool) Name() string\n```\n\n```go\nfunc (t *ListFilesTool) Parameters() string\n```\n\n```go\ntype ProposeFixParams struct {\n\tFile          string `json:\"file\"`\n\tVulnerability string `json:\"vulnerability\"`\n\tCurrentCode   string `json:\"current_code\"`\n\tFailedTest    string `json:\"failed_test,omitempty\"`\n}\n```\n\n```go\ntype ProposeFixTool struct {\n\t// contains filtered or unexported fields\n}\n```\nProposeFixTool generates and applies code fixes\n\n```go\nfunc NewProposeFixTool(llmClient llm.LLMClient, workDir string) *ProposeFixTool\n```\nNewProposeFixTool creates a new propose\\_fix tool\n\n```go\nfunc (t *ProposeFixTool) Description() string\n```\n\n```go\nfunc (t *ProposeFixTool) Execute(args string) (string, error)\n```\n\n```go\nfunc (t *ProposeFixTool) Name() string\n```\n\n```go\nfunc (t *ProposeFixTool) Parameters() string\n```\n\n```go\ntype ReadFileTool struct {\n\t// contains filtered or unexported fields\n}\n```\nReadFileTool reads file contents\n\n```go\nfunc NewReadFileTool(workDir string) *ReadFileTool\n```\nNewReadFileTool creates a new file reading tool\n\n```go\nfunc (t *ReadFileTool) Description() string\n```\n\n```go\nfunc (t *ReadFileTool) Execute(args string) (string, error)\n```\n\n```go\nfunc (t *ReadFileTool) Name() string\n```\n\n```go\nfunc (t *ReadFileTool) Parameters() string\n```\n\n```go\ntype SearchCodeTool struct {\n\t// contains filtered or unexported fields\n}\n```\nSearchCodeTool searches for patterns in the codebase\n\n```go\nfunc NewSearchCodeTool(workDir string) *SearchCodeTool\n```\nNewSearchCodeTool creates a new code search tool\n\n```go\nfunc (t *SearchCodeTool) Description() string\n```\nDescription returns the tool description\n\n```go\nfunc (t *SearchCodeTool) Execute(args string) (string, error)\n```\nExecute searches for patterns in the codebase\n\n```go\nfunc (t *SearchCodeTool) Name() string\n```\nName returns the tool name\n\n```go\nfunc (t *SearchCodeTool) Parameters() string\n```\nParameters returns the tool parameter description\n\n```go\ntype WriteFileParams struct {\n\tPath    string `json:\"path\"`    // File path to write\n\tContent string `json:\"content\"` // Content to write\n}\n```\nWriteFileParams defines the parameters for the write\\_file tool.\n\n```go\ntype WriteFileTool struct {\n\t// contains filtered or unexported fields\n}\n```\nWriteFileTool writes or modifies files with human-in-the-loop confirmation.\n\n```go\nfunc NewWriteFileTool(workDir string, confirmManager *shared.ConfirmationManager) *WriteFileTool\n```\nNewWriteFileTool creates a new file writing tool.\n\n```go\nfunc (t *WriteFileTool) Description() string\n```\nDescription returns the tool description.\n\n```go\nfunc (t *WriteFileTool) Execute(args string) (string, error)\n```\nExecute writes a file after user confirmation.\n\n```go\nfunc (t *WriteFileTool) Name() string\n```\nName returns the tool name.\n\n```go\nfunc (t *WriteFileTool) Parameters() string\n```\nParameters returns the tool parameter description.\n\n```go\nfunc (t *WriteFileTool) SetEventCallback(callback core.EventCallback)\n```\nSetEventCallback sets the callback for emitting events to the TUI. This implements the ConfirmableTool interface.\n\n","path":"github.com/blackcoderx/falcon/pkg/core/tools/debugging","name":"debugging","synopsis":"Package debugging provides debugging and codebase analysis tools for ZAP.","isRedistributable":true}
