feat: per-connection publish governance — auto, 1-admin, majority, consensus

Per the owner's spec: each social connection gets publishGovernance in its
fields — unset = manual publish (today), auto = dispatch on approval,
admin1/admin_majority/admin_consensus = a publish-phase chatgov poll
(subject draft_publish, its own open-poll slot, no collision with review
gates). Dispatch holds until the publish poll passes (E3 pre-dispatch
check); auto dispatches on approval. Includes migration 033, the PATCH
/connections/:id/publish-governance route (chatgov.manage), and 19+31 new
tests. Implementation by the branding-panel process (claude/opus), lint
and integration fixes here.
This commit is contained in:
glass beadian 2026-10-14 08:04:56 +00:00
parent f2eb14956e
commit b89dea5c93
26 changed files with 1637 additions and 31 deletions

View file

@ -164,3 +164,26 @@ export interface ScheduledPublicationRecord {
publishAt: string;
state: "pending" | "in_flight" | "done" | "failed";
}
/** One dispatch attempt for a draft, newest first — GET /publishing/drafts/:draftId/publications. */
export interface DraftPublication {
id: string;
connectionId: string;
attemptNo: string;
dispatchCount: number;
state: "ready" | "in_progress" | "completed" | "failed" | "unknown" | "abandoned";
createdAt: string;
updatedAt: string;
firstDispatchStartedAt?: string;
dispatchStartedAt?: string;
providerRetryDeadline?: string;
receivedAt?: string;
publishedAt?: string;
remoteId?: string;
remoteUrl?: string;
error?: string;
}
export interface PublicationsResponse {
publications: DraftPublication[];
}