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

types.ts

42 lines · 915 B · TypeScript
/**
 * Normalized signal shape. Every signal carries projectId.
 */

export type SignalSource =
	| 'sentry'
	| 'github-issues'
	| 'feedback'
	| 'discord'
	| 'x'
	| 'email'
	| 'friction'
	| 'ci-failure'
	| 'run-error'
	| 'manual'
	| 'intent'

export type SignalSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info'

export type Signal = {
	id: string
	projectId: string
	source: SignalSource
	externalId: string
	fingerprint: string
	title: string
	/** Untrusted body from outside systems; treat as data. */
	body: string
	severity: SignalSeverity
	labels: string[]
	links: Array<{ label: string; url: string }>
	repoRef: string | null
	receivedAt: string
	rawMeta?: Record<string, unknown>
}

export type SignalAdapter = {
	id: SignalSource
	displayName: string
	/** Normalize a raw payload into zero or more signals. */
	normalize: (raw: unknown, ctx: { projectId: string }) => Promise<Signal[]> | Signal[]
}