# BugGrabber / External Error Bridge

ApiVault does not assume BugGrabber internals. Instead it provides a generic data ingestion API and passive adapter shape.

## Generic custom detector

```lua
ApiVault:RegisterExternalErrorSource("MyBugDetector", {
    version = "1.0.0"
})

ApiVault:IngestExternalError({
    addon = "MyAddon",
    message = errorMessage,
    stack = stackTrace,
    file = filePath,
    line = lineNumber,
    source = "MyBugDetector"
})
```

## Passive BugGrabber adapter shape

```lua
local adapter = ApiVault.ExternalErrorBridge:CreateBugGrabberAdapter()
adapter:Ingest({
    addon = "MyAddon",
    message = "...",
    stack = "...",
})
```

This is intentionally passive. If BugGrabber source/API documentation is supplied later, a specific adapter can be added.

## Output

The Bug Advisor creates:

```text
category
linked APIs
linked events
linked templates
linked modules
linked secure patterns
stack frame samples
suggested fixes
copyable checklist
copyable bug report
```
