Skip to content
← Public packages

@kody/kody-factory

Forkable multi-project software factory: signals, priority queue, project UI, sweep job. Agent runners and Sentry reach it by events.

FollowFork

Files

sweep.ts

17 lines · 774 B · TypeScript
import { healthSweep, type SweepInput } from '../../health/sweep.ts'

/**
 * Run one factory health sweep: recover stale wakes, wake Patch for queued
 * fingerprints (only when the wakes switch is on), reconcile open error runs,
 * and refresh health signals. Safe to call by hand; `dryRun` changes nothing.
 *
 * @param input - `{ dryRun?, limit? (1 to 3), reconcile? }`; `reconcile` omitted follows the reconcile switch
 * @returns Sweep summary: switches, wakes, anomaly counters, reconcile and drain results
 *
 * @example
 * import sweep from 'kody:@kody/kody-factory/health/sweep'
 * await sweep({ dryRun: true, reconcile: true })
 */
export default async function sweep(input: SweepInput = {}) {
	return healthSweep({ ...input, source: input?.source ?? 'manual' })
}