- MCP
- code on this site's /mcp
- CLI
- none: the JSON below is the answer
- JSON
- /christopher/abso-core/files/client/src/issues-wire.ts?draft=login-timeout&format=json
153 linesFirst import 78% · pinch 12% · devops 7% · infra-split 2%0 versions changed it
1// What Issues answers and takes over HTTP (abso issues 54 and 141): the
2// client reads these shapes, and the Issues Worker's store writes them. They
3// sit with the client, the open tool, so the platform imports them from here
4// and the tool never imports the platform.
6export type Status = "open" | "in progress" | "in review" | "blocked" | "done" | "dropped";
8/** Who is acting: an agent through the client, or a signed-in person through the website. */
9export type Actor = { agent: string } | { person: string };
11export interface Lines {
12 file: string;
13 from: number;
14 to: number;
15 version: number;
16}
18export interface IssueRow {
19 id: number;
20 title: string;
21 parent: number | null;
22 status: Status;
23 /** Who it's for: set when it's written or edited, else the first agent whose start note named it. */
24 agent: string | null;
25 /** The agents whose start notes name it now. */
26 agents: string[];
27 /** Issues it waits on: it's Blocked until each is Done. */
28 blockedBy: number[];
29 /** Its labels, sorted: friction, client, and the like. */
30 labels: string[];
31 /** Versions of shared published for it, oldest first. */
32 versions: number[];
33 /** Who its open asks wait on (an agent, or person:<id>). */
34 waitingOn: string[];
35 opened: { by: string; at: number };
36 /** The latest claim, publish, comment, ask, answer or close. */
37 updated: number;
38 closed: { how: "done" | "dropped"; by: string; version: number | null; at: number } | null;
39 children: number;
40}
42export interface Comment {
43 id: number;
44 by: string;
45 kind: "comment" | "objection";
46 text: string;
47 at: number;
48 /** Images it carries (abso issue 171); left out when none. */
49 attachments?: Attachment[];
50}
52/** An image on an issue or comment (abso issue 171): GET /p/:project/attachments/<id> serves it. */
53export interface Attachment {
54 /** "a" and the first 12 hex of its sha256: what a text points at. */
55 id: string;
56 name: string;
57 type: string;
58 size: number;
59 /** 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. */
60 source?: { name: string; size: number };
61}
63export interface Ask {
64 id: number;
65 /** The issue it's on; none for a decision that belongs to no issue. */
66 issue: number | null;
67 by: string;
68 of: string;
69 kind: "question" | "task";
70 question: string;
71 /** Files the question carries; absent when none, and from older servers. */
72 attachments?: Attachment[];
73 review: boolean;
74 due: string | null;
75 recommendation: { text: string; by: string } | null;
76 options: string[];
77 /** Issues it holds up, besides its own. */
78 blocks: number[];
79 at: number;
80 /** Its answer; for a withdrawn ask, the asker's note on why, with the asker as `by`. */
81 answer: { by: string; words: string; at: number; attachments?: Attachment[] } | null;
82 /** When waiting first listed it to the one it's asked of; null until then (abso issue 124). */
83 seen: number | null;
84 /** "withdrawn" when the asker took it back; absent for an open or answered ask, and from older servers. */
85 outcome?: "withdrawn";
86 /** When the one asked acknowledged it without answering yet, with their note; it stays open. Absent until then. */
87 ack?: { at: number; note: string };
88}
90export interface Claim {
91 agent: string;
92 change: number;
93 since: number;
94}
96export interface IssuePage {
97 issue: IssueRow & { description: string; lines: Lines | null; watchers: string[]; attachments?: Attachment[] };
98 comments: Comment[];
99 edits: Edit[];
100 asks: Ask[];
101 claims: Claim[];
102 children: IssueRow[];
103}
105/** What a write tells the people working on an issue; the avcs Worker sends it. */
106export interface News {
107 issue: number | null;
108 text: string;
109 /** Besides the issue's agents: who else hears it (the one asked, or the asker). */
110 to?: string[];
111}
113/** One edit, in the issue's activity: each field it changed, from and to, and who was told. */
114export interface Edit {
115 id: number;
116 by: string;
117 changes: Partial<
118 Record<"title" | "description" | "parent" | "agent" | "blockedBy" | "labels", { from: unknown; to: unknown }>
119 >;
120 /** Who heard it: the watchers and anyone added, or nobody when the writer said not to notify. */
121 notified: string[];
122 at: number;
123}
125/** A new issue's form as it was left: open's fields, any of them still empty. */
126export interface DraftBody {
127 title?: string;
128 description?: string;
129 parent?: number | null;
130 lines?: Lines | null;
131 agent?: string | null;
132 blockedBy?: number[];
133 notify?: string[];
134 labels?: string[];
135}
137/** An issue not opened yet: its writer's alone, with no number, and no news. */
138export interface Draft {
139 id: number;
140 body: DraftBody;
141 saved: number;
142}
144/** One issue search hit: the issue, where it matched, a few words around it. */
145export interface IssueSearchHit {
146 issue: { id: number; title: string; status: Status; updated: number; labels: string[] };
147 where: "title" | "description" | "comment";
148 comment?: number;
149 /** The words around the match; char(1) and char(2) bracket each matched span. */
150 snippet: string;
151 /** Only meaning search found it: the words differ, the meaning matches. */
152 meaning?: true;
153}