agent-detective 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +101 -0
- package/dist/chunk-H2IXGHNA.js +1237 -0
- package/dist/chunk-OIYJYLCB.js +685 -0
- package/dist/doctor-3ZMDZLW6.js +193 -0
- package/dist/index.js +661 -0
- package/dist/init-IPCDLNHA.js +179 -0
- package/package.json +88 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Antonio Hernandez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Agent Detective
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
[](https://github.com/andezdev/agent-detective/actions/workflows/ci.yml)
|
|
5
|
+
[](https://github.com/andezdev/agent-detective/releases)
|
|
6
|
+
|
|
7
|
+
AI-powered code analysis agent that responds to events from Jira, Telegram, Slack and more.
|
|
8
|
+
|
|
9
|
+
## Concept
|
|
10
|
+
|
|
11
|
+
When a new incident is created in Jira, this agent analyzes the relevant repository to identify possible causes and writes a detailed comment to help developers resolve it.
|
|
12
|
+
|
|
13
|
+
## Architecture
|
|
14
|
+
|
|
15
|
+
Core agent logic is **source-agnostic** — plugins normalize events from different sources (Jira, Telegram, Slack) into a common format.
|
|
16
|
+
|
|
17
|
+
## Run it (npm)
|
|
18
|
+
|
|
19
|
+
Install on a host where your agent CLI (OpenCode, Cursor, Claude) is already on `PATH` and authenticated:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm i -g agent-detective
|
|
23
|
+
mkdir -p ~/agent-detective && cd ~/agent-detective
|
|
24
|
+
agent-detective init --repo-path /absolute/path/to/your/git/checkout --repo-name symfony
|
|
25
|
+
agent-detective doctor --config-root .
|
|
26
|
+
agent-detective --config-root .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Five-minute walkthrough with a **mock Jira webhook** (no Jira account): [Get started](docs/operator/get-started.md). Full Jira + tunnel: [Golden path](docs/operator/golden-path.md). Production VM: [Deployment](docs/operator/deployment.md).
|
|
30
|
+
|
|
31
|
+
## Develop it (pnpm)
|
|
32
|
+
|
|
33
|
+
Clone the monorepo when you change core code or plugins:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
git clone https://github.com/andezdev/agent-detective.git
|
|
37
|
+
cd agent-detective
|
|
38
|
+
pnpm install
|
|
39
|
+
pnpm dev
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
CI runs `pnpm build` (packages) and `pnpm run build:app` (root `dist/`). See [Development Guide](docs/development/development.md#monorepo-layout-pnpm--turborepo).
|
|
43
|
+
|
|
44
|
+
## Packages
|
|
45
|
+
|
|
46
|
+
| Package | Description |
|
|
47
|
+
|---------|-------------|
|
|
48
|
+
| Root app | Fastify server (`src/`, not under `packages/`) |
|
|
49
|
+
| `@agent-detective/types` | Host-internal type-only contract package (re-exported through `@agent-detective/sdk`; plugins should not depend on it directly) |
|
|
50
|
+
| `@agent-detective/sdk` | Plugin-author SDK — single dependency for plugins. Bundles `defineRoute`, `registerRoutes`, `definePlugin`, `zodToPluginSchema`, service-name constants (`REPO_MATCHER_SERVICE`, `PR_WORKFLOW_SERVICE`), `StandardEvents`, and re-exports every plugin-facing type from `@agent-detective/types` |
|
|
51
|
+
| `@agent-detective/observability` | Logging, metrics, health |
|
|
52
|
+
| `@agent-detective/process-utils` | Process / shell helpers |
|
|
53
|
+
| `@agent-detective/local-repos-plugin` | Local repositories + `RepoMatcher` |
|
|
54
|
+
| `@agent-detective/jira-adapter` | Jira webhook adapter |
|
|
55
|
+
| `@agent-detective/linear-adapter` | Linear webhooks + OAuth, signature verification, deduplication; posts analysis back on task completion ([E2E](docs/e2e/linear-manual-e2e.md)) |
|
|
56
|
+
|
|
57
|
+
## Configuration
|
|
58
|
+
|
|
59
|
+
Start with **[docs/config/configuration-hub.md](docs/config/configuration-hub.md)** (load order and top-level keys), then **[docs/config/configuration.md](docs/config/configuration.md)** for the full env and plugin tables, **[docs/reference/generated/app-config.md](docs/reference/generated/app-config.md)** for the top-level app schema (Zod/JSON), and **[docs/reference/generated/plugin-options.md](docs/reference/generated/plugin-options.md)** for bundled plugin fields.
|
|
60
|
+
|
|
61
|
+
Configure via `config/default.json` (and optional `config/local.json`):
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"port": 3001,
|
|
66
|
+
"agent": "opencode",
|
|
67
|
+
"plugins": [...]
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Operator docs:** [Get started](docs/operator/get-started.md) · [Installation paths](docs/operator/installation.mdx) · [Upgrading](docs/operator/upgrading.md) · [Threat model](docs/operator/threat-model.md)
|
|
72
|
+
|
|
73
|
+
## Support matrix
|
|
74
|
+
|
|
75
|
+
| Dimension | Supported / tested in CI (typical) | Notes |
|
|
76
|
+
|-----------|--------------------------------------|--------|
|
|
77
|
+
| **Runtime** | Node.js **24+**; **npm CLI** `agent-detective` | See [package.json](package.json) `engines` / `packageManager`. |
|
|
78
|
+
| **Host OS** | **Linux** for production guides (systemd + nginx) | macOS/Windows OK for dev; WSL acceptable for local smoke. |
|
|
79
|
+
| **HTTP server** | **Fastify** on configurable `port` (default **3001**) | `/api/health`, `/api/metrics`, Scalar `/docs`. |
|
|
80
|
+
| **Agent CLIs** | **OpenCode** documented; **Claude** / **Cursor** agent ids registered in-repo | Match `config.agent` to an installed CLI; see [cursor-agent.md](docs/development/cursor-agent.md) for Cursor. |
|
|
81
|
+
| **Jira** | **Jira Cloud** webhooks + REST (Basic or OAuth 2.0 3LO) | Webhook + Automation shapes per [jira-manual-e2e.md](docs/e2e/jira-manual-e2e.md). **Data Center** not separately certified—treat as best-effort if APIs align. |
|
|
82
|
+
| **Linear** | **Linear** webhooks + GraphQL comments (OAuth or PAT) | [linear-manual-e2e.md](docs/e2e/linear-manual-e2e.md), [linear-adapter.md](docs/plugins/linear-adapter.md). |
|
|
83
|
+
| **Kubernetes / Helm** | **Not shipped** in-repo | Bring your own container or VM; see [installation.mdx](docs/operator/installation.mdx#kubernetes). |
|
|
84
|
+
|
|
85
|
+
## Documentation
|
|
86
|
+
|
|
87
|
+
- **Documentation site (Starlight):** `pnpm run docs:site` from the root builds the static site in [`apps/docs/`](apps/docs/README.md) (source markdown is [`docs/`](docs/README.md); a [sync script](scripts/sync-starlight-content.mjs) runs on build). **Published:** [https://agent-detective.chapascript.dev/docs/](https://agent-detective.chapascript.dev/docs/) (GitHub Pages + [custom domain in repo settings](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site), DNS in Cloudflare). **GitHub Actions** is the Pages source. CI: [.github/workflows/docs-site.yml](.github/workflows/docs-site.yml).
|
|
88
|
+
|
|
89
|
+
- [Get started](docs/operator/get-started.md) — five-minute npm quickstart with mock webhook
|
|
90
|
+
- [Installation](docs/operator/installation.mdx) — npm CLI, from source, or bare metal
|
|
91
|
+
- [Configuration (overview)](docs/config/configuration-hub.md) — [full reference](docs/config/configuration.md)
|
|
92
|
+
- [Upgrading](docs/operator/upgrading.md) — releases and upgrade runbook
|
|
93
|
+
- [Architecture](docs/architecture/architecture.md)
|
|
94
|
+
- [Extending with custom plugins](docs/plugins/extending-with-plugins.md) — npm, paths, private registry
|
|
95
|
+
- [Plugin development (full guide)](docs/plugins/plugins.md)
|
|
96
|
+
- [Development Guide](docs/development/development.md)
|
|
97
|
+
- [Jira E2E (manual walkthroughs)](docs/e2e/) — webhooks, tunnel, pr-pipeline
|
|
98
|
+
|
|
99
|
+
## License
|
|
100
|
+
|
|
101
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|