Skip to content
← Public packages

@kentcdodds/sentry-triage

Sentry triage wakes Cole (Grok Bot) per issue: one active wake per repo (lease + queue), loop-safe Discord. Cole may spawn Cursor for isolated repo work.

src/process-sentry-webhook.d.ts

27 lines · 966 B · TypeScript
import type {
	ProcessSentryWebhookInput,
	ProcessSentryWebhookResult,
} from './types.ts'

export type {
	ProcessSentryWebhookInput,
	ProcessSentryWebhookResult,
} from './types.ts'

/**
 * Durable Sentry webhook processor (issue + Seer). Prefetch, Discord updates,
 * Seer RCA / ship handoff, and Cole wake live here. Invoked by
 * `./handle-sentry-webhook` via `workflows.create` with a bounded
 * `payloadKey` reference (or synchronously for `kodyDryRun` with a full
 * `request` envelope). Missing staged payloads and wake failures throw so
 * the workflow run is visibly errored.
 *
 * @example
 * import processSentryWebhook from 'kody:@kentcdodds/sentry-triage/process-sentry-webhook'
 * const result = await processSentryWebhook({
 *   request: { json: { action: 'created', kodyDryRun: true, data: { issue: { id: '1' } } } },
 * })
 */
export default function processSentryWebhook(
	input?: ProcessSentryWebhookInput,
): Promise<ProcessSentryWebhookResult>