// Resolve an incident — OPERATOR ONLY. Sets `status: 'resolved'` + stamps // `resolvedAt`, and appends a final `resolved` timeline entry. The public page's // banner goes green and the incident archives into the history. import { defineMutation } from '@voltro/protocol' import { Schema } from 'effect' export const resolveIncident = defineMutation({ name: 'incidents.resolve', target: { table: 'incidents', op: 'update' }, guards: [{ scope: 'status:write' }], input: Schema.Struct({ incidentId: Schema.NonEmptyString, body: Schema.String, }), output: Schema.Struct({ id: Schema.String, status: Schema.String, }), })