/** * Report finished (or parked, blocked, failed, in-progress) work onto a factory * card. Appends the report to the card, moves it when the outcome calls for it * (blocked or failed → needs you; shipped, done, or parked → verifying), marks * ship-pr's report step done for the PR, and sends a web push that opens the card. * * Run it in the kody org, e.g. `npx -y @kodycodes/cli@latest execute --local --org kody --code '…'`. * * @param input - `cardId` (or a `prUrl` linked to the card), `outcome`, `summary`; optional `title`, `agent`, `links`, ship-pr fields, `notify`, `dryRun` * @returns The card id, its deep link (`cardUrl`), the state change, and the push result * * @example * import report from 'kody:@kody/kody-factory/cards/report' * await report({ * cardId: 'wi_123', * outcome: 'shipped', * summary: 'Fixed the retry loop; PR merged and the deploy is green.', * prUrl: 'https://github.com/kody-hq/kody/pull/123', * agent: { kind: 'devin', url: 'https://app.devin.ai/sessions/abc' }, * }) * // => { ok: true, cardId: 'wi_123', cardUrl: 'https://kody-factory--kody.kody.run/c/wi_123', to: 'verifying', push: { sent: 1, … } } */ import { reportOnCard, type CardReportInput } from '../cards/report.ts' export default async function report(input: CardReportInput) { return reportOnCard(input) }