kunibert
All repositories: gitoria
2.1 KB
import WebFramework from 'hl:web'import { args } from 'hl:proc'import { readFile } from 'hl:fs'import { every } from 'hl:time'import Intake from '../lib/intake.hl'\\ MAP (kunibert#5 step 1): the gitoria event hook and the job queue.\\ POST /hook/gitoria lib/intake.hl (checks, answers) -> lib/gitoria-events.hl (event names) -> lib/queue.hl (jobs, worker)\\ GET /health lib/intake.hl -> lib/queue.hl health\\ timer tick lib/queue.hl tick -> lib/run-job.hl runJob\\ Run: HL_ENV=production hybriel service <config.json> config: { port, host (default 127.0.0.1), dataDir, tickSeconds, maxParallel (default 3, minimum 1), maxTries, backoffSeconds, reposFile, secretsFile (optional default secret), hybriel, jobTimeoutSeconds, runnerData, ticketsBase (optional), ticketsTokenFile (optional), reviewUser (optional: unix user the model runs as), codexBin (default codex), workDir (optional: where job worktrees go) }config = JSON.parse(readFile(args()[0]))port = config.portopt = (v, d) => { if (v == null) { return d } return v }\\ optional: reposFile (per-repo config), hybriel (runtime binary), jobTimeoutSeconds (default 900), runnerDataintake = new Intake(secretsFile = opt(config.secretsFile, ''), dataDir = config.dataDir, maxTries = config.maxTries, maxParallel = opt(config.maxParallel, 3), backoffSeconds = config.backoffSeconds, reposFile = opt(config.reposFile, ''), hybriel = opt(config.hybriel, 'hybriel'), timeoutSeconds = opt(config.jobTimeoutSeconds, 900), runnerData = opt(config.runnerData, ''), ticketsBase = opt(config.ticketsBase, ''), ticketsTokenFile = opt(config.ticketsTokenFile, ''), reviewUser = opt(config.reviewUser, ''), codexBin = opt(config.codexBin, 'codex'), workDir = opt(config.workDir, ''))intake.start()routes = [{ pattern = "/hook/gitoria" method = "POST" function = (route, req) => { return intake.hook(req) } }{ pattern = "/health" function = (route, req) => { return intake.health() } }]ticker = every(config.tickSeconds)on ticker.tick(t) { intake.tick() }webFrameworkServer = new WebFramework(routes = routes, port = port, host = opt(config.host, '127.0.0.1'), watchMode = false)
Branches
Latest commits
- f97a0e5fMerge branch 'hl-standard' into mainKunibert
- 9710e39fType STANDARD as String (L10, Kunibert review)mre
- 4140b664|||PR Review against HL-STANDARD and cite rule ids (gitoria#50 step 3)mre
- 75c6888drecords: gitoria#50 step 1 connected and provenmre
- aa6d997frecords: gitoria#50 connect plan, Anton reportmre
- 8a190ba7Records: kunibert#18 and #15 donemre
- 2eee9dbbMerge branch 'revendor-day44' into mainKunibert
- e96721cb|||PR Re-vendor plugins from Hybriel day44 (hl:fetch redirect fix)mre
- 0c67ab8cLog: kunibert repo ping provenmre
- b6f3039cLog: kunibert repo connectedmre
- b143c3c7CONDUCTOR: push recipemre
- 7a1279eeRule: conductor merges own utility PRs after green reviewmre
- 4038b3e0Log: kunibert#18 openedmre
- 18543db1Log: day42 fetch fix, re-vendor pendingmre
- 81a12f96Statusmre
- 6ce706abRecords: neutral wording, split cleanupmre
- 81a4d31bDocs: neutral wordingKunibert
- 8205b05eRecords: #17 livemre
- c3391204Answer fresh reviews under open threadsKunibert
- a0f3d147Records: #16 livemre