How quantdale/night-watch works
Nightwatch is a private, local autonomous bug-hunting framework. Its main workflow contains browser activity, observes and records evidence, then minimizes and triages failures into private, owner-reviewable findings; operators inspect those findings in the Control Center. Major parallel capabilities include authenticated-session handling, source and semantic coverage analysis, campaign planning, and explicit outbound-network containment. The graph follows documented behavior and indexed imports; several substantial subsystems are represented at their exact enclosing directories because their implementation files were not sampled.
Main entry points: context.ts Browser Harness · networkObserver.ts Network Observer · pipeline.ts Failure Triage · privateArtifacts.ts Artifact Policy
Components 23
Local Investigation
- Browser Harness
src/browser/context.ts - Journey Executor
src/core/journeys/engine.ts - Exploration Engine
src/core/exploration/engine.ts - Campaign Runtime
src/core/campaign - Authentication
src/auth
Evidence and Triage
- Network Observer
src/browser/observers/networkObserver.ts - Run Evidence
src/core/evidence/runRecorder.ts - Failure Triage
src/core/triage/pipeline.ts - Private Artifacts
src/core/policy/privateArtifacts.ts - Finding Dossiers
src/core/autonomousFinding
Analysis and Campaigns
- Source Coverage
src/oracles/expectations/coverageInventory.ts - PHP Analysis
src/core/source/phpPipeline.ts - Semantic Coverage
src/core/semanticCoverage - Campaign Intelligence
src/core/campaignIntelligence
Safety and Policy
- Outbound Policy
src/core/safety/outboundPolicy.ts - Loopback Proxy
src/proxy/server.ts - Artifact Policy
src/core/policy/privateArtifacts.ts
Owner Review
- AI Review
src/core/aiReview/pipeline.ts - Control Center API
src/controlCenter/server/server.ts - Finding Authority
src/controlCenter/authorities/findingsAuthority.ts - Reviewer Projection
src/controlCenter/adapters/reviewerAdapter.ts - Control Center UI
ui/control-center/src/App.tsx
Other components
- Operator
Connections 22
- Operator → Browser Harness: runs locally
README.md - Operator → Authentication: captures session
README.md - Browser Harness → Network Observer: observes requests
src/browser/context.ts - Browser Harness → Run Evidence: records evidence
src/browser/context.ts - Journey Executor → Network Observer: waits for observations
src/core/journeys/engine.ts - Exploration Engine → Browser Harness: executes actions
- Campaign Runtime → Exploration Engine: coordinates runs
- Network Observer → Outbound Policy: checks requests
src/browser/observers/networkObserver.ts - Loopback Proxy → Outbound Policy: classifies requests
src/proxy/server.ts - Network Observer → Run Evidence: records observations
src/browser/observers/networkObserver.ts - Failure Triage → Artifact Policy: checks write policy
src/core/triage/pipeline.ts - Failure Triage → Finding Dossiers: produces dossiers
- Failure Triage → Private Artifacts: persists artifacts
src/core/triage/pipeline.ts - Private Artifacts → Artifact Policy: uses storage policy
src/core/selfDev/storage.ts - Source Coverage → PHP Analysis: analyzes PHP
src/oracles/expectations/coverageInventory.ts - PHP Analysis → Semantic Coverage: uses coverage analysis
src/core/source/phpPipeline.ts - Campaign Runtime → Campaign Intelligence: uses intelligence
- AI Review → Artifact Policy: checks owner scope
src/core/aiReview/pipeline.ts - Control Center API → Finding Authority: routes findings
- Finding Authority → Reviewer Projection: supplies findings
src/controlCenter/authorities/findingsAuthority.ts - Control Center UI → Control Center API: loads API data
- Operator → Control Center UI: reviews findings