recon/peertube-plugin/peertube-plugin-recon-domains/main.js
Matt 71e3dc12ed Phase 1: PeerTube plugin and recon_domains module
Single source of truth for the 18 RECON knowledge domains mapped to
PeerTube category IDs 100-117. Replaces duplicate VALID_DOMAINS sets
in enricher.py and embedder.py with imports from lib/recon_domains.py.

Includes PeerTube plugin (peertube-plugin-recon-domains) that registers
custom categories via videoCategoryManager.addConstant(), and a parity
test to verify constants match between RECON and the PeerTube API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-28 00:04:13 +00:00

28 lines
723 B
JavaScript

async function register ({ videoCategoryManager }) {
const reconDomains = {
100: 'Agriculture & Livestock',
101: 'Civil Organization',
102: 'Communications',
103: 'Food Systems',
104: 'Foundational Skills',
105: 'Logistics',
106: 'Medical',
107: 'Navigation',
108: 'Operations',
109: 'Power Systems',
110: 'Preservation & Storage',
111: 'Security',
112: 'Shelter & Construction',
113: 'Technology',
114: 'Tools & Equipment',
115: 'Vehicles',
116: 'Water Systems',
117: 'Wilderness Skills'
}
for (const [id, label] of Object.entries(reconDomains)) {
videoCategoryManager.addConstant(parseInt(id), label)
}
}
module.exports = { register }