← 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.
Files
import { recordOutcome, type RecordOutcomeInput } from '../../health/outcome.ts'
/**
* Record how a health fingerprint ended. Releases the wake lease and, for
* `fixed` and `noise`, marks the matching open Activity rows resolved.
* Bad input returns `{ ok: true, skipped, error }` instead of throwing.
*
* @param input - `{ fingerprint, outcome: 'fixed' | 'recommendation' | 'noise' | 'failed', summary?, classification?, prUrl?, dryRun? }`
* @returns `{ ok, fingerprint, outcome, triaged }`
*
* @example
* import recordOutcome from 'kody:@kody/kody-factory/health/record-outcome'
* await recordOutcome({ fingerprint: 'kody:job:crm:http-500', outcome: 'noise', summary: 'Provider outage', dryRun: true })
*/
export default async function healthRecordOutcome(input: RecordOutcomeInput) {
return recordOutcome({ ...input, actor: input?.actor ?? 'agent' })
}