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
- bd3591c7conductor: gates run on the live day44 binarymre
- 47f747a7records: jukebox #9 fix livemre
- 0a3169fdMerge branch 'vendored-size' into mainKunibert
- e447bb09Vendored size fix: keep renames with an app side whole; type the filter parameter (L10)mre
- 99ccc742Vendored size fix: no renames in the app diff, filter the resumed delta toomre
- 1a52e100|||PR Diff size limit counts only app files when vendored paths are setmre
- 50a1867estatus: jukebox #9mre
- c57484e6log: jukebox #9 diff sizemre
- 795a20carecords: guard fix live (PR 8)mre
- 6981d96fMerge branch 'fresh-on-nocmd' into mainKunibert
- 37c47840runner: one shared prompt for both fresh-session fallbacks (L16)mre
- f945d2e1|||PR runner: a resumed run with no command on a new head gets one fresh session instead of a tool errormre
- 10b2a49estatus: PR 314, guard fix proposedmre
- e73995a3log: hycon PR 314 approved after fresh reviewmre
- f60427falog: hycon PR 314 false tool errormre
- 481974f7log: Hermes accepts PR 259 findingmre
- bb0976acrecords: hycon PR 259 design findingmre
- 5c637c24records: hycon PR 259 false tool errormre
- a344c406log: routger 132 reviewedmre
- 56e70dcbrecords: review time limit 1800 s (routger 132)mre