neuron-explorer
Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
errAgent is an incident-response workspace for collecting application errors, analyzing incidents, proposing safe remediations, validating fixes with focused tests, and monitoring operational health. It combines a FastAPI backend, a Clerk-authenticated React console, MongoDB persistence, GitHub integration, and Patchy, a human-in-the-loop operations assistant.
Patchy can recommend and coordinate work, but it does not silently approve changes, execute arbitrary shell commands, browse arbitrary URLs, or merge code without an operator decision.查看完整 README ↗errAgent is an incident-response workspace for collecting application errors, analyzing incidents, proposing safe remediations, validating fixes with focused tests, and monitoring operational health. It combines a FastAPI backend, a Clerk-authenticated React console, MongoDB persistence, GitHub integration, and Patchy, a human-in-the-loop operations assistant.
Patchy can recommend and coordinate work, but it does not silently approve changes, execute arbitrary shell commands, browse arbitrary URLs, or merge code without an operator decision.
Target applications send structured logs and errors to errAgent. Error events become persisted incidents; informational and warning events remain operational logs.
Supported ingestion surfaces include:
POST /api/v1/logs for structured application logsPOST /api/v1/client-errors for sanitized browser errors sent through a trusted app backend proxyPOST /api/v1/webhooks/ingest for machine-to-machine incident payloadsIncident records include service identity, environment, error message, stack trace, repository, metadata, timestamps, fingerprints, and lifecycle status. Recent duplicate events are deduplicated by fingerprint.
errAgent monitors registered services and stores health snapshots for operational history. The console exposes:
For incidents with repository context, errAgent can:
Generated changes are restricted by policy and are never applied directly to main.
Patchy supports a reviewable incident-to-test pipeline:
incident
-> analysis and remediation
-> operator approves hotfix
-> hotfix branch and pull request
-> test generate <incident-id>
-> operator reviews generated test
-> operator approves test commit
-> test plan <incident-id>
-> operator approves GitHub Actions execution
-> test status <test-plan-id>
-> operator merges only after tests pass
Commands:
test generate <incident-id>
test approve <generated-test-id>
test plan <incident-id>
test run <test-plan-id>
test status <test-plan-id>
test guide <incident-id>
The generated test is validated for syntax, assertions, file naming, side effects, and overwrite safety. Test plans are built from real repository context and commands are checked against discovered test files. Execution happens in the target repository's GitHub Actions workflow, not on the errAgent host. A linked test plan must be persisted as passed before the merge endpoint accepts a hotfix merge.
Patchy separates planning from execution. Actions that contact registered services, commit files, dispatch CI, or run synthetic checks create proposals in patchy_proposals.
The operator sees the exact action, destination, branch, risk, and relevant content before selecting Approve & Run or Disapprove.
Available workflows include:
Failures and rejections stop the relevant workflow. Patchy does not self-approve a proposal.
Patchy supports a safe, bounded pentest sweep workflow for registered applications. Sweeps are human-approved and operate within strict limits:
Synthetic-only fuzzing for public endpoints
Authenticated Browser Agent fuzzing for Clerk-protected admin endpoints
No arbitrary scanning, crawling, or shell execution
No destructive side effects
All actions logged and reviewable
Operators initiate sweeps through Patchy Terminal:
text pentest sweep [target] Supported targets:
public — synthetic fuzzing
admin_leads — authenticated admin leads fuzzing
admin_content — authenticated admin content fuzzing
admin_all — both admin fuzzers
full — public + admin fuzzers
Sweeps create a proposal that must be explicitly approved. Findings are persisted as incidents with full context.
Flow plans test structured HTTP journeys without UI automation or arbitrary shell execution. They work for registered services such as BTY and SAAPP and can be reused for future applications.
Simple syntax:
flow define bty health simple GET /api/health ASSERT 200
flow list bty
flow run flow_<id>
Supported actions and assertions:
GET, POST, PUT, PATCH, and DELETE requestsassert_statusassert_jsonassert_body{{variable}} reuse in later URLs, bodies, and headersFlow rules include site-relative URLs, registered service base URLs, bounded body size, a maximum of 12 steps, and approval before execution. Execution stops at the first failed step and reports each step's status, HTTP code, and latency.
For Clerk-protected admin routes, a flow can use an environment-backed bearer token:
flow define bty admin-schedule simple GET /api/admin/schedule ASSERT 200 --auth '{"type":"env_bearer","env":"ERRAGENT_BTY_ADMIN_TOKEN"}'
The token is read at execution time and is never stored in MongoDB or the flow definition. Only ERRAGENT_* environment variables are permitted for this purpose.
errAgent captures its own unhandled server errors as erragent incidents. Selected Patchy infrastructure failures, including GitHub, Gemini, timeout, network, and database failures, are also eligible for self-monitoring.
Self-monitoring is loop-safe:
For a frontend-heavy target such as BTY, the browser should report errors to the target app's own FastAPI backend. That backend sanitizes and forwards the event to POST /api/v1/client-errors using the existing x-ingest-secret and optional x-app-id headers. The browser must never receive errAgent ingestion secrets.
Client error payloads can include the service, environment, release, route, error source, sanitized message, stack, and limited metadata. errAgent bounds payload sizes and redacts common credentials such as authorization values, cookies, passwords, secrets, tokens, and API keys before incident creation.
Target apps / webhooks
|
v
FastAPI ingestion and API layer
|
+--> MongoDB incidents, logs, plans, proposals, audit records
+--> LogBroker live events
+--> GitHub and Render integrations
+--> Gemini analysis and test planning
|
v
React + Clerk Patchy console
Important backend modules:
backend/app/app.py — FastAPI application and API routesbackend/utils/app_utils.py — ingestion, analysis pipeline, repository resolution, patch validation, self-monitoring helpersbackend/services/log_broker.py — bounded in-memory log history and live subscribersbackend/services/patchy_terminal.py — Patchy command router and guided workflowsbackend/services/patchy_hitl.py — proposal lifecycle and approvalsbackend/services/patchy_flow_runner.py — reusable synthetic flow validation and executionbackend/services/github_service.py — GitHub API access, caching, branch and workflow operationsbackend/services/patchy_test_generator.py — regression test draftingbackend/services/patchy_test_planner.py — focused test-plan drafting and command validationbackend/services/patchy_test_runner.py — GitHub Actions dispatch and status trackingFrom the repository root:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r backend\requirements.txt
cd frontend
npm install
cd ..
Create backend/.env from your deployment or local secret manager. Do not commit credentials. Common settings include:
MONGO_URI=<mongodb-connection-string>
GOOGLE_API_KEY=<gemini-api-key>
GITHUB_TOKEN=<github-token>
DEFAULT_TARGET_REPO=<owner/repository>
CLERK_JWKS_URL=<clerk-jwks-url>
SENTRY_WEBHOOK_SECRET=<sentry-secret>
ERRAGENT_INGEST_SECRET=<ingest-secret>
PATCHY_TEST_WORKFLOW=patchy-tests.yml
PATCHY_LLM_TIMEOUT_SECONDS=60
For the frontend, configure the Vite variables required by frontend/src/main.tsx, including:
VITE_CLERK_PUBLISHABLE_KEY=<clerk-publishable-key>
Use a secret manager for deployed environments. Never put private Clerk keys, GitHub tokens, Gemini keys, Render keys, or bearer session tokens in frontend variables.
From the repository root:
.\start-local.ps1
The helper starts:
http://127.0.0.1:8006http://127.0.0.1:8086The backend API is available under /api/v1. The frontend requires a valid Clerk session.
.\.venv\Scripts\python.exe -m pytest backend\tests -q
cd frontend
npm run build
GET /health
POST /api/v1/health/check
GET /api/v1/health/full
GET /api/v1/health/services
GET /api/v1/events
GET /api/v1/incidents
GET /api/v1/incidents/{incident_id}
POST /api/v1/incidents
DELETE /api/v1/incidents/{incident_id}
POST /api/v1/incidents/{incident_id}/approve-hotfix
POST /api/v1/incidents/{incident_id}/merge-hotfix
POST /api/v1/incidents/{incident_id}/reanalyze
POST /api/v1/patchy/command
GET /api/v1/patchy/proposals
POST /api/v1/patchy/proposals/{proposal_id}/approve
POST /api/v1/patchy/proposals/{proposal_id}/decline
POST /api/v1/logs
POST /api/v1/client-errors
POST /api/v1/webhooks/ingest
POST /api/v1/webhooks/sentry
POST /api/v1/webhooks/vercel
POST /api/v1/webhooks/render
Protected routes require the authentication or ingestion headers described by the deployment configuration. See PATCHY_TERMINAL.md for the complete command reference and NEW_APP_ONBOARDING.md for integrating another application.
A target app generally needs no Patchy-specific application code beyond structured error reporting. The integration contract is:
pip install erragent-sdk (sdk/) and call erragent.install() at startup — see sdk/README.md. (The legacy copy-pasted handler at integrations/erragent_handler.py still works for existing integrations.)ERRAGENT_URL, per-app ERRAGENT_APP_ID/ERRAGENT_APP_SECRET (preferred) or ERRAGENT_INGEST_SECRET (legacy), and a stable service name./api/v1/logs.workflow_dispatch test workflow when using Patchy CI execution.For browser observability, add a target-app backend proxy that accepts sanitized frontend errors and forwards them to /api/v1/client-errors. Never embed ERRAGENT_INGEST_SECRET in browser JavaScript.
Keep credentials in the target app's environment or secret manager. Do not send credentials in log messages or metadata.
No license is currently specified for this repository.