{"draft":null,"from":2,"to":318,"files":[{"path":"client/src/issues-wire.ts","added":130,"removed":2,"diff":"--- a/client/src/issues-wire.ts\n+++ b/client/src/issues-wire.ts\n@@ -8,6 +8,14 @@\n /** Who is acting: an agent through the client, or a signed-in person through the website. */\n export type Actor = { agent: string } | { person: string };\n \n+/** Public per-field author classification; missing legacy evidence is unknown. */\n+export interface ProseAuthorship {\n+\tkind: \"human\" | \"agent\" | \"unknown\";\n+\tactor: string | null;\n+\tprovenance: \"native\" | \"copy\" | \"import\" | \"historical\" | \"unknown\";\n+\tauthorField: string | null;\n+}\n+\n export interface Lines {\n \tfile: string;\n \tfrom: number;\n@@ -18,6 +26,7 @@\n export interface IssueRow {\n \tid: number;\n \ttitle: string;\n+\tauthorship: { title: ProseAuthorship };\n \tparent: number | null;\n \tstatus: Status;\n \t/** Who it's for: set when it's written or edited, else the first agent whose start note named it. */\n@@ -44,9 +53,23 @@\n \tby: string;\n \tkind: \"comment\" | \"objection\";\n \ttext: string;\n+\tauthorship: ProseAuthorship;\n \tat: number;\n+\t/** Images it carries (abso issue 171); left out when none. */\n+\tattachments?: Attachment[];\n }\n \n+/** An image on an issue or comment (abso issue 171): GET /p/:project/attachments/<id> serves it. */\n+export interface Attachment {\n+\t/** \"a\" and the first 12 hex of its sha256: what a text points at. */\n+\tid: string;\n+\tname: string;\n+\ttype: string;\n+\tsize: number;\n+\t/** The SVG an image was drawn from, when it was one: the server serves the image as a PNG, and this only as a download at attachments/<id>/source. */\n+\tsource?: { name: string; size: number };\n+}\n+\n export interface Ask {\n \tid: number;\n \t/** The issue it's on; none for a decision that belongs to no issue. */\n@@ -55,6 +78,9 @@\n \tof: string;\n \tkind: \"question\" | \"task\";\n \tquestion: string;\n+\tauthorship: { question: ProseAuthorship };\n+\t/** Files the question carries; absent when none, and from older servers. */\n+\tattachments?: Attachment[];\n \treview: boolean;\n \tdue: string | null;\n \trecommendation: { text: string; by: string } | null;\n@@ -62,11 +88,31 @@\n \t/** Issues it holds up, besides its own. */\n \tblocks: number[];\n \tat: number;\n-\tanswer: { by: string; words: string; at: number } | null;\n+\t/** Its answer; for a withdrawn ask, the asker's note on why, with the asker as `by`. */\n+\tanswer: { by: string; words: string; at: number; authorship: ProseAuthorship; attachments?: Attachment[] } | null;\n \t/** When waiting first listed it to the one it's asked of; null until then (abso issue 124). */\n \tseen: number | null;\n+\t/** \"withdrawn\" when the asker took it back; absent for an open or answered ask, and from older servers. */\n+\toutcome?: \"withdrawn\";\n+\t/** When the one asked acknowledged it without answering yet, with their note; it stays open. Absent until then. */\n+\tack?: { at: number; note: string; authorship: { note: ProseAuthorship } };\n+\t/** Its thread: what the asker and the one asked said on it, oldest first. The answer closes it and isn't one of these. Absent from older servers. */\n+\treplies?: AskReply[];\n+\t/** Who it waits on now: the one asked, or the asker while the newest reply is a question from the one asked. Null once it's closed. Absent from older servers. */\n+\twaitingOn?: string | null;\n }\n \n+/** One reply on an ask, from the asker or the one asked. Neither opens nor closes it. */\n+export interface AskReply {\n+\tid: number;\n+\tby: string;\n+\ttext: string;\n+\tauthorship: ProseAuthorship;\n+\tat: number;\n+\t/** A question back from the one asked: the ask waits on the asker until they reply. */\n+\tquestion?: true;\n+}\n+\n export interface Claim {\n \tagent: string;\n \tchange: number;\n@@ -74,7 +120,13 @@\n }\n \n export interface IssuePage {\n-\tissue: IssueRow & { description: string; lines: Lines | null; watchers: string[] };\n+\tissue: IssueRow & {\n+\t\tdescription: string;\n+\t\tauthorship: { title: ProseAuthorship; description: ProseAuthorship };\n+\t\tlines: Lines | null;\n+\t\twatchers: string[];\n+\t\tattachments?: Attachment[];\n+\t};\n \tcomments: Comment[];\n \tedits: Edit[];\n \tasks: Ask[];\n@@ -120,3 +172,79 @@\n \tbody: DraftBody;\n \tsaved: number;\n }\n+\n+/** One issue search hit: the issue, where it matched, a few words around it. */\n+export interface IssueSearchHit {\n+\tissue: {\n+\t\tid: number;\n+\t\ttitle: string;\n+\t\tstatus: Status;\n+\t\tupdated: number;\n+\t\tlabels: string[];\n+\t\tauthorship: { title: ProseAuthorship };\n+\t};\n+\twhere: \"title\" | \"description\" | \"comment\";\n+\tmatchedAuthorship: ProseAuthorship;\n+\tcomment?: number;\n+\t/** The words around the match; char(1) and char(2) bracket each matched span. */\n+\tsnippet: string;\n+\t/** Only meaning search found it: the words differ, the meaning matches. */\n+\tmeaning?: true;\n+}\n+\n+/** A group: a named set of agents and people in one project, with one shared history. */\n+export interface Group {\n+\tid: number;\n+\tname: string;\n+\t/** Hidden from those not in it; joined, if joinable, only by its exact name. */\n+\tprivate: boolean;\n+\t/** Anyone in the project may join; otherwise its maker or a project owner adds members. */\n+\tjoinable: boolean;\n+\tpolicyRevision: number;\n+\tmembershipRevision: number;\n+\t/** The number of its newest event. */\n+\tlastEvent: number;\n+\tcreatedBy: string;\n+\tcreatedAt: number;\n+\tupdatedAt: number;\n+}\n+\n+/** A group as one caller sees it in a list. */\n+export interface GroupSummary extends Group {\n+\tmembers: number;\n+\tmember: boolean;\n+}\n+\n+/** One group with its roster. */\n+export interface GroupShown {\n+\tgroup: Group;\n+\tmembers: { who: string; since: number }[];\n+\tmember: boolean;\n+\t/** Who can read its history, said where members see it. */\n+\twhoReads: string;\n+}\n+\n+/** One thing that happened in a group, numbered from 1. Events are only added, never changed. */\n+export interface GroupEvent {\n+\tn: number;\n+\tkind: \"created\" | \"message\" | \"joined\" | \"left\" | \"added\" | \"removed\" | \"settings\";\n+\tby: string;\n+\tat: number;\n+\ttext?: string;\n+\treplyTo?: number;\n+\twho?: string;\n+\tdetail?: Record<string, unknown>;\n+\tmembershipRevision: number;\n+\tpolicyRevision: number;\n+\t/** A message's news: who it went to when sent. Empty means history only. */\n+\tnews?: string[];\n+}\n+\n+/** A group write's answer. */\n+export interface GroupWrite {\n+\tgroup: Group;\n+\tevent?: GroupEvent;\n+\t/** A retry of a post already made: this is the first one. */\n+\treplayed?: boolean;\n+\tnews?: News;\n+}"}],"unmatched":[]}