@danxbot/plugin-sdk 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -2
- package/dist/card-kit.d.ts +1246 -0
- package/dist/cli.js +12 -0
- package/dist/vite.d.ts +22 -0
- package/dist/vite.js +119 -0
- package/package.json +55 -4
|
@@ -0,0 +1,1246 @@
|
|
|
1
|
+
declare module "@danxbot/card-kit@1" {
|
|
2
|
+
import { PagedWindow, SortValue } from '@danxbot/ui';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
export { Link, useNavigate } from 'react-router';
|
|
6
|
+
|
|
7
|
+
type IssueType = "Epic" | "Bug" | "Feature" | "Story" | "Chore" | "Task";
|
|
8
|
+
type IssueStatus$1 = "Review" | "ToDo" | "In Progress" | "Backlog" | "Done" | "Cancelled";
|
|
9
|
+
type EffortLevelName = "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
|
|
10
|
+
type IssueProblemType = "question" | "action";
|
|
11
|
+
type DecisionOutcome = "answered" | "rejected";
|
|
12
|
+
type IssueDependencyKind = "depends_on" | "conflict_on";
|
|
13
|
+
type IssueDispatchKind = "work" | "triage" | "recovery" | "flesh-out" | "chat" | "main-sync-repair" | "worktree-maintenance" | "manual" | `gate-${string}`;
|
|
14
|
+
type IssueAssignmentMode = "automated" | "manual";
|
|
15
|
+
interface IssueV2 {
|
|
16
|
+
id: string;
|
|
17
|
+
repo_name: string;
|
|
18
|
+
board_id: string;
|
|
19
|
+
schema_version: number;
|
|
20
|
+
type: IssueType;
|
|
21
|
+
title: string;
|
|
22
|
+
description: string;
|
|
23
|
+
summary: string | null;
|
|
24
|
+
pull_request_url: string | null;
|
|
25
|
+
parent_id: string | null;
|
|
26
|
+
effort_level: EffortLevelName;
|
|
27
|
+
escalation_rung: EffortLevelName | null;
|
|
28
|
+
escalation_attempts: number;
|
|
29
|
+
downward_rung: EffortLevelName | null;
|
|
30
|
+
source_type: string;
|
|
31
|
+
list_name: string | null;
|
|
32
|
+
list_id: string | null;
|
|
33
|
+
assigned_agent: string | null;
|
|
34
|
+
priority: number;
|
|
35
|
+
created_at: string;
|
|
36
|
+
updated_at: string;
|
|
37
|
+
deleted_at: string | null;
|
|
38
|
+
ready_at: string | null;
|
|
39
|
+
started_at: string | null;
|
|
40
|
+
completed_at: string | null;
|
|
41
|
+
cancelled_at: string | null;
|
|
42
|
+
archived_at: string | null;
|
|
43
|
+
wake_at: string | null;
|
|
44
|
+
wake_action: "ready" | "review" | null;
|
|
45
|
+
dispatch_id: string | null;
|
|
46
|
+
dispatch_started_at: string | null;
|
|
47
|
+
dispatch_kind: IssueDispatchKind | null;
|
|
48
|
+
assignment_mode: IssueAssignmentMode;
|
|
49
|
+
card_branch: string | null;
|
|
50
|
+
last_commit_sha: string | null;
|
|
51
|
+
card_branch_retired_at: string | null;
|
|
52
|
+
card_branch_retired_reason: string | null;
|
|
53
|
+
card_branch_retired_by: string | null;
|
|
54
|
+
chat_session_uuid: string | null;
|
|
55
|
+
slack_session_uuid: string | null;
|
|
56
|
+
blocked_at: string | null;
|
|
57
|
+
blocked_reason: string | null;
|
|
58
|
+
blocked_by: string | null;
|
|
59
|
+
open_problem_count: number;
|
|
60
|
+
triage_ice_total: number | null;
|
|
61
|
+
triage_ice_i: number | null;
|
|
62
|
+
triage_ice_c: number | null;
|
|
63
|
+
triage_ice_e: number | null;
|
|
64
|
+
triage_confidence: number | null;
|
|
65
|
+
triage_last_status: string;
|
|
66
|
+
triage_last_explain: string;
|
|
67
|
+
status_derived: IssueStatus$1;
|
|
68
|
+
in_progress_derived: boolean;
|
|
69
|
+
dispatchable_derived: boolean;
|
|
70
|
+
self_dispatchable_derived: boolean;
|
|
71
|
+
triage_enabled: boolean;
|
|
72
|
+
content_hash: string;
|
|
73
|
+
}
|
|
74
|
+
type ChecklistItemStatus$1 = "incomplete" | "failing" | "passing" | "cancelled" | "deferred";
|
|
75
|
+
interface ChecklistV2 {
|
|
76
|
+
id: number;
|
|
77
|
+
issue_id: string;
|
|
78
|
+
ordinal: number;
|
|
79
|
+
name: string;
|
|
80
|
+
created_at: string;
|
|
81
|
+
updated_at: string;
|
|
82
|
+
deleted_at: string | null;
|
|
83
|
+
}
|
|
84
|
+
interface ChecklistItemV2 {
|
|
85
|
+
id: number;
|
|
86
|
+
checklist_id: number;
|
|
87
|
+
ordinal: number;
|
|
88
|
+
label: string;
|
|
89
|
+
detail: string;
|
|
90
|
+
status: ChecklistItemStatus$1;
|
|
91
|
+
created_at: string;
|
|
92
|
+
updated_at: string;
|
|
93
|
+
deleted_at: string | null;
|
|
94
|
+
}
|
|
95
|
+
interface ChecklistWithItemsV2 extends ChecklistV2 {
|
|
96
|
+
items: ChecklistItemV2[];
|
|
97
|
+
}
|
|
98
|
+
type ThumbnailStatus = "ready" | "not_image" | "failed" | "pending";
|
|
99
|
+
interface IssueAttachmentV2 {
|
|
100
|
+
id: number;
|
|
101
|
+
issue_id: string;
|
|
102
|
+
source_type: string;
|
|
103
|
+
external_id: string;
|
|
104
|
+
url: string;
|
|
105
|
+
filename: string;
|
|
106
|
+
mime: string;
|
|
107
|
+
is_primary: boolean;
|
|
108
|
+
thumbnail_status: ThumbnailStatus;
|
|
109
|
+
thumbnail_url: string | null;
|
|
110
|
+
thumbnail_error: string | null;
|
|
111
|
+
created_at: string;
|
|
112
|
+
updated_at: string;
|
|
113
|
+
deleted_at: string | null;
|
|
114
|
+
}
|
|
115
|
+
type QualityGateStatus = "pending" | "pass" | "fail" | "skipped";
|
|
116
|
+
|
|
117
|
+
interface RepoProfileCopy {
|
|
118
|
+
shipped: string;
|
|
119
|
+
repo: string;
|
|
120
|
+
}
|
|
121
|
+
type ProfileNameId = string;
|
|
122
|
+
|
|
123
|
+
type ListType$1 = "and" | "or" | "semicolon";
|
|
124
|
+
interface ListValue<Item> {
|
|
125
|
+
list: readonly Item[];
|
|
126
|
+
type?: ListType$1;
|
|
127
|
+
}
|
|
128
|
+
type StatusReasonId = string;
|
|
129
|
+
type StatusReasonValues = Record<string, string | number | boolean | null | StatusReason | ProfileNameMessage | StatusReason[] | StatusReasonLines | StatusReasonList>;
|
|
130
|
+
interface ProfileNameMessage {
|
|
131
|
+
id: ProfileNameId;
|
|
132
|
+
values: StatusReasonValues;
|
|
133
|
+
}
|
|
134
|
+
type StatusReasonList = ListValue<string | number | StatusReason | ProfileNameMessage>;
|
|
135
|
+
interface StatusReasonLines {
|
|
136
|
+
lines: StatusReason[];
|
|
137
|
+
}
|
|
138
|
+
interface StatusReason {
|
|
139
|
+
id: StatusReasonId;
|
|
140
|
+
values: StatusReasonValues;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
type QualityGatePhase = "plan" | "code";
|
|
144
|
+
|
|
145
|
+
interface ViaKey {
|
|
146
|
+
id: number;
|
|
147
|
+
name: string;
|
|
148
|
+
}
|
|
149
|
+
type MirrorProviderId = "trello" | "slack" | "asana";
|
|
150
|
+
type SourceOrigin = "" | "trello" | "slack" | "asana" | "danxbot" | "card-only";
|
|
151
|
+
type ControlValue = boolean | string;
|
|
152
|
+
|
|
153
|
+
type ControlSource = "card" | "plan" | "board" | "parent" | "system";
|
|
154
|
+
interface ControlFallback {
|
|
155
|
+
readonly value: ControlValue;
|
|
156
|
+
readonly source: Exclude<ControlSource, "card">;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
interface HolderAgentPause {
|
|
160
|
+
reason: string;
|
|
161
|
+
since: string;
|
|
162
|
+
until: string;
|
|
163
|
+
}
|
|
164
|
+
type AssignedAgentKind = "session" | "person" | "worker" | "label";
|
|
165
|
+
|
|
166
|
+
interface UsageTokenCounts {
|
|
167
|
+
input: number;
|
|
168
|
+
output: number;
|
|
169
|
+
cacheRead: number;
|
|
170
|
+
cacheWrite: number;
|
|
171
|
+
}
|
|
172
|
+
interface UsageSlice {
|
|
173
|
+
tokens: UsageTokenCounts;
|
|
174
|
+
costUsd: number;
|
|
175
|
+
}
|
|
176
|
+
interface UsageTotals extends UsageTokenCounts {
|
|
177
|
+
cacheWrite5m: number;
|
|
178
|
+
cacheWrite1h: number;
|
|
179
|
+
cacheWriteUnsplit: number;
|
|
180
|
+
}
|
|
181
|
+
interface UsageModelRow extends UsageSlice {
|
|
182
|
+
model: string | null;
|
|
183
|
+
}
|
|
184
|
+
type UsageKind = "work" | "operator-session" | `gate:${string}` | "triage" | "maintenance" | "chat" | "other";
|
|
185
|
+
interface UsageKindRow extends UsageSlice {
|
|
186
|
+
kind: UsageKind;
|
|
187
|
+
label: string;
|
|
188
|
+
}
|
|
189
|
+
type UsageSubagentTypeKey = "main" | "unknown" | "unattributed" | `agent:${string}`;
|
|
190
|
+
interface UsageSubagentTypeRow extends UsageSlice {
|
|
191
|
+
key: UsageSubagentTypeKey;
|
|
192
|
+
label: string;
|
|
193
|
+
sourceCount: number;
|
|
194
|
+
}
|
|
195
|
+
interface UsageTiming {
|
|
196
|
+
apiMs: number;
|
|
197
|
+
agentMs: number;
|
|
198
|
+
linesAdded: number;
|
|
199
|
+
linesRemoved: number;
|
|
200
|
+
}
|
|
201
|
+
interface UsageSummary {
|
|
202
|
+
totals: UsageTotals;
|
|
203
|
+
costUsd: number;
|
|
204
|
+
byModel: UsageModelRow[];
|
|
205
|
+
byKind: UsageKindRow[];
|
|
206
|
+
bySubagentType: UsageSubagentTypeRow[];
|
|
207
|
+
dispatchCount: number;
|
|
208
|
+
operatorAttributionSince: number | null;
|
|
209
|
+
timing: UsageTiming;
|
|
210
|
+
timingMeasuredSince: number | null;
|
|
211
|
+
}
|
|
212
|
+
type UsageErrorCode = "unattributable_dispatch" | "usage_inconsistent";
|
|
213
|
+
interface UsageError {
|
|
214
|
+
error: {
|
|
215
|
+
code: UsageErrorCode;
|
|
216
|
+
message: string;
|
|
217
|
+
dispatchId: string;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
type CardUsage = UsageSummary | UsageError | null;
|
|
221
|
+
interface DesignSourceFile {
|
|
222
|
+
path: string;
|
|
223
|
+
content: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
interface CodeGateStatus {
|
|
227
|
+
gate: string;
|
|
228
|
+
status: QualityGateStatus;
|
|
229
|
+
}
|
|
230
|
+
interface RelationPageView {
|
|
231
|
+
readonly limit: number;
|
|
232
|
+
readonly total: number;
|
|
233
|
+
readonly next_cursor: string | null;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
type ConnectionState = "connecting" | "connected" | "disconnected";
|
|
237
|
+
interface LiveQueryResult<T> {
|
|
238
|
+
data: T | null;
|
|
239
|
+
loading: boolean;
|
|
240
|
+
error: Error | null;
|
|
241
|
+
connection: ConnectionState;
|
|
242
|
+
refetch: () => void;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
interface ReadinessBlocker {
|
|
246
|
+
worker_id: string;
|
|
247
|
+
incomplete_count: number;
|
|
248
|
+
items: {
|
|
249
|
+
id: string;
|
|
250
|
+
label: string;
|
|
251
|
+
label_message: StatusReason;
|
|
252
|
+
reason: string;
|
|
253
|
+
reason_message: StatusReason;
|
|
254
|
+
status: string;
|
|
255
|
+
}[];
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
type DispatchKeyRefusal = {
|
|
259
|
+
reason: "role_exceeds_owner";
|
|
260
|
+
missingPermissions: readonly string[];
|
|
261
|
+
} | {
|
|
262
|
+
reason: "owner_terms_not_accepted";
|
|
263
|
+
} | {
|
|
264
|
+
reason: "owner_not_member";
|
|
265
|
+
} | {
|
|
266
|
+
reason: "profile_role_missing";
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
interface DispatchKeyBlocker {
|
|
270
|
+
worker_id: string;
|
|
271
|
+
owner_user_id: number;
|
|
272
|
+
owner_username: string;
|
|
273
|
+
reason: DispatchKeyRefusal["reason"];
|
|
274
|
+
detail: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
type PickerRouting = "gate" | "work" | "orchestrated" | "skip" | "terminal_or_container";
|
|
278
|
+
interface DispatchableExplainView {
|
|
279
|
+
id: string;
|
|
280
|
+
dispatchable: boolean;
|
|
281
|
+
self_dispatchable: boolean;
|
|
282
|
+
ancestor_blocked: boolean;
|
|
283
|
+
next_pre_gate: string | null;
|
|
284
|
+
next_code_gate: string | null;
|
|
285
|
+
blocking_gates: {
|
|
286
|
+
gate: string;
|
|
287
|
+
detail: string;
|
|
288
|
+
}[];
|
|
289
|
+
picker_routing: PickerRouting;
|
|
290
|
+
dispatch_key_blockers: DispatchKeyBlocker[];
|
|
291
|
+
worker_readiness_blockers: ReadinessBlocker[];
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
interface SolutionContent {
|
|
295
|
+
title: string;
|
|
296
|
+
body: string;
|
|
297
|
+
pro: string;
|
|
298
|
+
con: string;
|
|
299
|
+
recommended: boolean;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
interface V2CopyComment {
|
|
303
|
+
author: string;
|
|
304
|
+
text: string;
|
|
305
|
+
}
|
|
306
|
+
interface V2CopyAc {
|
|
307
|
+
title: string;
|
|
308
|
+
checked: boolean;
|
|
309
|
+
}
|
|
310
|
+
interface V2CopyChecklist {
|
|
311
|
+
name: string;
|
|
312
|
+
items: V2CopyChecklistItem[];
|
|
313
|
+
}
|
|
314
|
+
interface V2CopyChecklistItem {
|
|
315
|
+
label: string;
|
|
316
|
+
detail: string;
|
|
317
|
+
status: ChecklistItemStatus$1;
|
|
318
|
+
}
|
|
319
|
+
interface V2CopyDependency {
|
|
320
|
+
kind: IssueDependencyKind;
|
|
321
|
+
target_id: string;
|
|
322
|
+
reason: string;
|
|
323
|
+
}
|
|
324
|
+
interface V2CopyRetro {
|
|
325
|
+
good: string;
|
|
326
|
+
bad: string;
|
|
327
|
+
correctable_danxbot_problem: boolean;
|
|
328
|
+
correctable_danxbot_problem_description: string;
|
|
329
|
+
action_item_ids: string[];
|
|
330
|
+
commits: {
|
|
331
|
+
sha: string;
|
|
332
|
+
subject: string;
|
|
333
|
+
}[];
|
|
334
|
+
tests: V2CopyRetroTest[];
|
|
335
|
+
}
|
|
336
|
+
interface V2CopyRetroTest {
|
|
337
|
+
name: string;
|
|
338
|
+
kind: "group" | "e2e";
|
|
339
|
+
num_tests: number;
|
|
340
|
+
num_assertions: number | null;
|
|
341
|
+
num_passing_tests: number;
|
|
342
|
+
num_passing_assertions: number | null;
|
|
343
|
+
duration_ms: number;
|
|
344
|
+
}
|
|
345
|
+
interface V2CopyMirror {
|
|
346
|
+
target_type: MirrorProviderId;
|
|
347
|
+
target_ref: string;
|
|
348
|
+
target_url: string;
|
|
349
|
+
source_ref: string;
|
|
350
|
+
}
|
|
351
|
+
type SourceMirrorLocation = Record<MirrorProviderId, string | null>;
|
|
352
|
+
interface V2CopyQualityGate {
|
|
353
|
+
gate: string;
|
|
354
|
+
decision_note: string;
|
|
355
|
+
effort_level: EffortLevelName | null;
|
|
356
|
+
status: QualityGateStatus;
|
|
357
|
+
message: string;
|
|
358
|
+
completed_at: string | null;
|
|
359
|
+
attempts: number;
|
|
360
|
+
reviewed_ref: string | null;
|
|
361
|
+
}
|
|
362
|
+
interface V2CopySolution extends SolutionContent {
|
|
363
|
+
removed: boolean;
|
|
364
|
+
steps: V2CopyStep[];
|
|
365
|
+
}
|
|
366
|
+
interface V2CopyStep {
|
|
367
|
+
title: string;
|
|
368
|
+
description: string | null;
|
|
369
|
+
steps: V2CopyStep[];
|
|
370
|
+
}
|
|
371
|
+
interface V2CopyDecision {
|
|
372
|
+
solution_index: number | null;
|
|
373
|
+
outcome: DecisionOutcome;
|
|
374
|
+
freeform: string | null;
|
|
375
|
+
note: string | null;
|
|
376
|
+
decided_by: string;
|
|
377
|
+
decided_at: string;
|
|
378
|
+
retracted_at: string | null;
|
|
379
|
+
}
|
|
380
|
+
interface V2CopyProblem {
|
|
381
|
+
statement: string;
|
|
382
|
+
context: string | null;
|
|
383
|
+
type: IssueProblemType;
|
|
384
|
+
summary: string | null;
|
|
385
|
+
removed: boolean;
|
|
386
|
+
solutions: V2CopySolution[];
|
|
387
|
+
decisions: V2CopyDecision[];
|
|
388
|
+
}
|
|
389
|
+
interface V2CopyIssue {
|
|
390
|
+
id: string;
|
|
391
|
+
parent_id: string | null;
|
|
392
|
+
type: IssueType;
|
|
393
|
+
title: string;
|
|
394
|
+
description: string;
|
|
395
|
+
summary: string | null;
|
|
396
|
+
priority: number;
|
|
397
|
+
effort_level: EffortLevelName | null;
|
|
398
|
+
assigned_agent: string | null;
|
|
399
|
+
ready_at: string | null;
|
|
400
|
+
completed_at: string | null;
|
|
401
|
+
cancelled_at: string | null;
|
|
402
|
+
archived_at: string | null;
|
|
403
|
+
blocked_at: string | null;
|
|
404
|
+
blocked_reason: string | null;
|
|
405
|
+
ac: V2CopyAc[];
|
|
406
|
+
checklists: V2CopyChecklist[];
|
|
407
|
+
comments: V2CopyComment[];
|
|
408
|
+
dependencies: V2CopyDependency[];
|
|
409
|
+
retro: V2CopyRetro | null;
|
|
410
|
+
mirrors: V2CopyMirror[];
|
|
411
|
+
quality_gates: V2CopyQualityGate[];
|
|
412
|
+
problems: V2CopyProblem[];
|
|
413
|
+
triage_enabled: boolean;
|
|
414
|
+
unknown_fields: V2CopyUnknownField[];
|
|
415
|
+
}
|
|
416
|
+
interface V2CopyUnknownField {
|
|
417
|
+
path: string;
|
|
418
|
+
value: unknown;
|
|
419
|
+
}
|
|
420
|
+
interface V2CopyPayload {
|
|
421
|
+
schema_version: number;
|
|
422
|
+
issues: V2CopyIssue[];
|
|
423
|
+
source_mirror_location: SourceMirrorLocation;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
type IssueStatus = "Review" | "ToDo" | "In Progress" | "Backlog" | "Done" | "Cancelled";
|
|
427
|
+
interface InheritedBlockedViewV2 {
|
|
428
|
+
id: string;
|
|
429
|
+
reason: string;
|
|
430
|
+
}
|
|
431
|
+
interface WaitingOnViewV2 {
|
|
432
|
+
by: string[];
|
|
433
|
+
reason: string;
|
|
434
|
+
timestamp: string;
|
|
435
|
+
}
|
|
436
|
+
interface ConflictEntryViewV2 {
|
|
437
|
+
id: string;
|
|
438
|
+
reason: string;
|
|
439
|
+
}
|
|
440
|
+
interface IceViewV2 {
|
|
441
|
+
total: number | null;
|
|
442
|
+
i: number | null;
|
|
443
|
+
c: number | null;
|
|
444
|
+
e: number | null;
|
|
445
|
+
}
|
|
446
|
+
interface TriageHistoryEntryViewV2 {
|
|
447
|
+
timestamp: string;
|
|
448
|
+
status: string;
|
|
449
|
+
explain: string;
|
|
450
|
+
ice: IceViewV2;
|
|
451
|
+
confidence: number | null;
|
|
452
|
+
}
|
|
453
|
+
interface TriageViewV2 {
|
|
454
|
+
last_status: string;
|
|
455
|
+
last_explain: string;
|
|
456
|
+
ice: IceViewV2;
|
|
457
|
+
confidence: number | null;
|
|
458
|
+
history: TriageHistoryEntryViewV2[];
|
|
459
|
+
}
|
|
460
|
+
interface RetroTestViewV2 {
|
|
461
|
+
name: string;
|
|
462
|
+
kind: "group" | "e2e";
|
|
463
|
+
num_tests: number;
|
|
464
|
+
num_assertions: number | null;
|
|
465
|
+
num_passing_tests: number;
|
|
466
|
+
num_passing_assertions: number | null;
|
|
467
|
+
duration_ms: number;
|
|
468
|
+
}
|
|
469
|
+
interface RetroViewV2 {
|
|
470
|
+
good: string;
|
|
471
|
+
bad: string;
|
|
472
|
+
correctable_danxbot_problem: boolean;
|
|
473
|
+
correctable_danxbot_problem_description: string;
|
|
474
|
+
action_item_ids: string[];
|
|
475
|
+
commits: string[];
|
|
476
|
+
tests: RetroTestViewV2[];
|
|
477
|
+
commit_url_base?: string | null;
|
|
478
|
+
}
|
|
479
|
+
interface CommentViewV2 {
|
|
480
|
+
id: string;
|
|
481
|
+
author: string;
|
|
482
|
+
timestamp: string;
|
|
483
|
+
text: string;
|
|
484
|
+
updated_at: string;
|
|
485
|
+
origin: SourceOrigin;
|
|
486
|
+
via_key?: ViaKey | null;
|
|
487
|
+
metadata?: unknown | null;
|
|
488
|
+
answers_decision_id?: number | null;
|
|
489
|
+
problem_id?: number | null;
|
|
490
|
+
}
|
|
491
|
+
interface AttachmentViewV2 {
|
|
492
|
+
id: number;
|
|
493
|
+
source: SourceOrigin;
|
|
494
|
+
url: string;
|
|
495
|
+
filename: string;
|
|
496
|
+
mime: string;
|
|
497
|
+
is_primary: boolean;
|
|
498
|
+
thumbnail_status: ThumbnailStatus;
|
|
499
|
+
thumbnail_url: string | null;
|
|
500
|
+
thumbnail_error: string | null;
|
|
501
|
+
created_at: string;
|
|
502
|
+
}
|
|
503
|
+
interface AttachmentPreviewV2 {
|
|
504
|
+
id: number;
|
|
505
|
+
url: string;
|
|
506
|
+
thumbnail_url: string | null;
|
|
507
|
+
filename: string;
|
|
508
|
+
mime: string;
|
|
509
|
+
}
|
|
510
|
+
interface AcItemViewV2 {
|
|
511
|
+
check_item_id: string;
|
|
512
|
+
title: string;
|
|
513
|
+
checked: boolean;
|
|
514
|
+
}
|
|
515
|
+
type ChecklistItemStatus = "incomplete" | "failing" | "passing" | "cancelled" | "deferred";
|
|
516
|
+
interface ChecklistItemView {
|
|
517
|
+
id: number;
|
|
518
|
+
label: string;
|
|
519
|
+
detail: string;
|
|
520
|
+
status: ChecklistItemStatus;
|
|
521
|
+
}
|
|
522
|
+
interface ChecklistView {
|
|
523
|
+
id: number;
|
|
524
|
+
name: string;
|
|
525
|
+
items: ChecklistItemView[];
|
|
526
|
+
}
|
|
527
|
+
interface ChecklistHistoryViewV2 {
|
|
528
|
+
action: "create" | "rename" | "remove" | "add_item" | "update_item" | "remove_item";
|
|
529
|
+
checklist: string;
|
|
530
|
+
item: string | null;
|
|
531
|
+
changed: "status" | "label" | "detail" | null;
|
|
532
|
+
}
|
|
533
|
+
interface LatestWorkDispatchViewV2 {
|
|
534
|
+
dispatch_id: string;
|
|
535
|
+
started_at_ms: number;
|
|
536
|
+
completed_at_ms: number | null;
|
|
537
|
+
status: string;
|
|
538
|
+
usage_input: number;
|
|
539
|
+
usage_output: number;
|
|
540
|
+
assigned_worker_id: string | null;
|
|
541
|
+
}
|
|
542
|
+
interface ChildAssignmentViewV2 {
|
|
543
|
+
agent: string;
|
|
544
|
+
agent_repo_copy: RepoProfileCopy | null;
|
|
545
|
+
issue_id: string;
|
|
546
|
+
issue_title: string;
|
|
547
|
+
}
|
|
548
|
+
type IssueViewV2 = {
|
|
549
|
+
triage?: undefined | TriageViewV2;
|
|
550
|
+
comments?: undefined | (Array<{
|
|
551
|
+
id: string;
|
|
552
|
+
author: string;
|
|
553
|
+
timestamp: string;
|
|
554
|
+
text: string;
|
|
555
|
+
updated_at: string;
|
|
556
|
+
origin: "" | "trello" | "slack" | "asana" | "danxbot" | "card-only";
|
|
557
|
+
via_key?: undefined | null | ViaKey;
|
|
558
|
+
metadata?: unknown;
|
|
559
|
+
answers_decision_id?: undefined | null | number;
|
|
560
|
+
problem_id?: undefined | null | number;
|
|
561
|
+
}>);
|
|
562
|
+
checklists?: undefined | Array<ChecklistView>;
|
|
563
|
+
attachments?: undefined | (Array<{
|
|
564
|
+
id: number;
|
|
565
|
+
source: "" | "trello" | "slack" | "asana" | "danxbot" | "card-only";
|
|
566
|
+
url: string;
|
|
567
|
+
filename: string;
|
|
568
|
+
mime: string;
|
|
569
|
+
is_primary: boolean;
|
|
570
|
+
thumbnail_status: "ready" | "not_image" | "failed" | "pending";
|
|
571
|
+
thumbnail_url: null | string;
|
|
572
|
+
thumbnail_error: null | string;
|
|
573
|
+
created_at: string;
|
|
574
|
+
}>);
|
|
575
|
+
title: string;
|
|
576
|
+
description?: undefined | string;
|
|
577
|
+
status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
|
|
578
|
+
type: "Epic" | "Bug" | "Feature" | "Story" | "Chore" | "Task";
|
|
579
|
+
priority: number;
|
|
580
|
+
id: string;
|
|
581
|
+
parent_id: null | string;
|
|
582
|
+
created_at: number;
|
|
583
|
+
updated_at: number;
|
|
584
|
+
assigned_agent: null | string;
|
|
585
|
+
content_hash: string;
|
|
586
|
+
retro?: undefined | RetroViewV2;
|
|
587
|
+
stored_row?: undefined | IssueV2;
|
|
588
|
+
stored_checklists?: undefined | Array<ChecklistWithItemsV2>;
|
|
589
|
+
stored_attachments?: undefined | Array<IssueAttachmentV2>;
|
|
590
|
+
retro_commit_shas?: undefined | Array<string>;
|
|
591
|
+
code_gates?: undefined | Array<CodeGateStatus>;
|
|
592
|
+
deleted_at?: undefined | null | number;
|
|
593
|
+
dispatchable_derived?: undefined | false | true;
|
|
594
|
+
blocked?: undefined | null | { at: string; reason: string; by: string | null; };
|
|
595
|
+
board_id?: undefined | string;
|
|
596
|
+
ready_at?: undefined | null | string;
|
|
597
|
+
archived_at?: undefined | null | string;
|
|
598
|
+
completed_at?: undefined | null | string;
|
|
599
|
+
cancelled_at?: undefined | null | string;
|
|
600
|
+
wake_at?: undefined | null | string;
|
|
601
|
+
wake_action?: undefined | null | "review" | "ready";
|
|
602
|
+
assigned_agent_name?: undefined | null | string;
|
|
603
|
+
resolved_list_id?: undefined | string;
|
|
604
|
+
list_name?: undefined | string;
|
|
605
|
+
list_color?: undefined | null | string;
|
|
606
|
+
list_emoji?: undefined | null | string;
|
|
607
|
+
refs?: undefined | Array<CardRefViewV2>;
|
|
608
|
+
parent_title?: undefined | null | string;
|
|
609
|
+
parent_type?: undefined | null | "Epic" | "Bug" | "Feature" | "Story" | "Chore" | "Task";
|
|
610
|
+
parent_created_at?: undefined | null | number;
|
|
611
|
+
parent_updated_at?: undefined | null | number;
|
|
612
|
+
parent_blocked?: undefined | null | false | true;
|
|
613
|
+
parent_open_problem_count?: undefined | null | number;
|
|
614
|
+
projection_error?: undefined | null | string;
|
|
615
|
+
summary?: undefined | null | string;
|
|
616
|
+
pull_request_url?: undefined | null | string;
|
|
617
|
+
problem_total?: undefined | number;
|
|
618
|
+
design_revision_count?: undefined | number;
|
|
619
|
+
open_action_count?: undefined | number;
|
|
620
|
+
open_problem_count?: undefined | number;
|
|
621
|
+
ac?: undefined | Array<AcItemViewV2>;
|
|
622
|
+
triage_enabled?: undefined | false | true;
|
|
623
|
+
dispatch?: undefined | null | { started_at: string | null; };
|
|
624
|
+
dispatch_kind?: undefined | null | "work" | "triage" | "recovery" | "flesh-out" | "chat" | "main-sync-repair" | "worktree-maintenance" | "manual" | `gate-${string}`;
|
|
625
|
+
assignment_mode?: undefined | "manual" | "automated";
|
|
626
|
+
assigned_agent_kind?: undefined | null | "session" | "person" | "worker" | "label";
|
|
627
|
+
assigned_agent_pause?: undefined | null | HolderAgentPause;
|
|
628
|
+
assigned_agent_repo_copy?: undefined | null | RepoProfileCopy;
|
|
629
|
+
latest_work_dispatch?: undefined | null | LatestWorkDispatchViewV2;
|
|
630
|
+
usage?: undefined | null | UsageSummary | UsageError;
|
|
631
|
+
effort_level?: undefined | "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
|
|
632
|
+
escalation_rung?: undefined | null | "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
|
|
633
|
+
escalation_attempts?: undefined | number;
|
|
634
|
+
downward_rung?: undefined | null | "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
|
|
635
|
+
waiting_on_gate?: undefined | null | WaitingOnViewV2;
|
|
636
|
+
waiting_on_dep_ids?: undefined | Record<string, number>;
|
|
637
|
+
conflict_on?: undefined | Array<ConflictEntryViewV2>;
|
|
638
|
+
conflict_on_reverse?: undefined | Array<ConflictEntryViewV2>;
|
|
639
|
+
conflict_on_partners?: undefined | Record<string, { status: IssueStatus; title: string; }>;
|
|
640
|
+
conflict_dep_ids?: undefined | Record<string, number>;
|
|
641
|
+
conflict_on_active_count?: undefined | number;
|
|
642
|
+
children?: undefined | Array<string>;
|
|
643
|
+
blocked_descendants?: undefined | Array<InheritedBlockedViewV2>;
|
|
644
|
+
child_assignments?: undefined | Array<ChildAssignmentViewV2>;
|
|
645
|
+
ac_total?: undefined | number;
|
|
646
|
+
ac_done?: undefined | number;
|
|
647
|
+
ac_items?: undefined | (Array<{ title: string; status: "incomplete" | "failing" | "passing" | "cancelled" | "deferred"; }>);
|
|
648
|
+
comments_count?: undefined | number;
|
|
649
|
+
has_retro?: undefined | false | true;
|
|
650
|
+
primary_attachment?: undefined | null | AttachmentPreviewV2;
|
|
651
|
+
in_progress_derived?: undefined | false | true;
|
|
652
|
+
waiting_on?: undefined | false | true;
|
|
653
|
+
waiting_on_reason?: undefined | null | string;
|
|
654
|
+
waiting_on_by?: undefined | Array<string>;
|
|
655
|
+
triage_ice_total?: undefined | null | number;
|
|
656
|
+
triage_ice_i?: undefined | null | number;
|
|
657
|
+
triage_ice_c?: undefined | null | number;
|
|
658
|
+
triage_ice_e?: undefined | null | number;
|
|
659
|
+
triage_confidence?: undefined | null | number;
|
|
660
|
+
triage_last_explain?: undefined | string;
|
|
661
|
+
triage_last_status?: undefined | string;
|
|
662
|
+
triage_last_decision_at?: undefined | null | string;
|
|
663
|
+
next_pre_gate?: undefined | null | string;
|
|
664
|
+
next_code_gate?: undefined | null | string;
|
|
665
|
+
dispatchable_explain?: undefined | DispatchableExplainView;
|
|
666
|
+
copy_payload?: undefined | V2CopyPayload;
|
|
667
|
+
copy_issue?: undefined | V2CopyIssue;
|
|
668
|
+
design_revisions?: undefined | (Array<{
|
|
669
|
+
revision_no: number;
|
|
670
|
+
target: string;
|
|
671
|
+
entry: string;
|
|
672
|
+
built_from_commit: string;
|
|
673
|
+
note: string;
|
|
674
|
+
created_by: string;
|
|
675
|
+
created_at: string;
|
|
676
|
+
bundle_bytes: null | number;
|
|
677
|
+
bundle_available: boolean;
|
|
678
|
+
screenshot_available: boolean;
|
|
679
|
+
source_files?: undefined | Array<DesignSourceFile>;
|
|
680
|
+
}>);
|
|
681
|
+
design_decisions?: undefined | (Array<{
|
|
682
|
+
decision_id: number;
|
|
683
|
+
revision_no: number;
|
|
684
|
+
outcome: "rejected" | "approved" | "changes_requested";
|
|
685
|
+
note: null | string;
|
|
686
|
+
decided_by: string;
|
|
687
|
+
created_at: string;
|
|
688
|
+
}>);
|
|
689
|
+
pull_request_reviews?: undefined | (Array<{
|
|
690
|
+
id: number;
|
|
691
|
+
kind: "review" | "comment" | "thread";
|
|
692
|
+
author_login: string;
|
|
693
|
+
state: null | "approved" | "changes_requested" | "commented" | "dismissed";
|
|
694
|
+
body: string;
|
|
695
|
+
html_url: string;
|
|
696
|
+
path: null | string;
|
|
697
|
+
line: null | number;
|
|
698
|
+
resolved: null | false | true;
|
|
699
|
+
occurred_at: string;
|
|
700
|
+
}>);
|
|
701
|
+
code_review_items?: undefined | Array<{
|
|
702
|
+
gate_name: string;
|
|
703
|
+
title: string;
|
|
704
|
+
description: string;
|
|
705
|
+
status: string;
|
|
706
|
+
reasoning: string;
|
|
707
|
+
}>;
|
|
708
|
+
children_detail?: undefined | (Array<{
|
|
709
|
+
id: string;
|
|
710
|
+
name: string;
|
|
711
|
+
status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
|
|
712
|
+
type?: undefined | "Epic" | "Bug" | "Feature" | "Story" | "Chore" | "Task";
|
|
713
|
+
priority?: undefined | number;
|
|
714
|
+
summary?: undefined | null | string;
|
|
715
|
+
waiting_on: boolean;
|
|
716
|
+
waiting_on_by_card: boolean;
|
|
717
|
+
open_problem_count: number;
|
|
718
|
+
blocked: boolean;
|
|
719
|
+
waiting_on_ids: Array<string>;
|
|
720
|
+
conflict_on_ids: Array<string>;
|
|
721
|
+
}>);
|
|
722
|
+
plans?: undefined | Array<{
|
|
723
|
+
id: number;
|
|
724
|
+
ref: string;
|
|
725
|
+
name: string;
|
|
726
|
+
}>;
|
|
727
|
+
mirrors?: undefined | (Array<{
|
|
728
|
+
target_type: "trello" | "slack" | "asana";
|
|
729
|
+
target_url: string;
|
|
730
|
+
sync_state: "synced" | "out_of_sync" | "error" | "dead" | "unavailable" | "diverged";
|
|
731
|
+
dead_reason: "" | "archived" | "deleted";
|
|
732
|
+
source_ref: string;
|
|
733
|
+
last_error: null | StatusReason;
|
|
734
|
+
owed: Array<"comments" | "checklists" | "attachments" | "title" | "description" | "status" | "type" | "priority" | "parent_child" | "dependencies" | "card_create" | "card_delete">;
|
|
735
|
+
description_unreadable: boolean;
|
|
736
|
+
target_ref: string;
|
|
737
|
+
target_label: string;
|
|
738
|
+
last_synced_at: number;
|
|
739
|
+
logo_url: string;
|
|
740
|
+
}>);
|
|
741
|
+
history?: undefined | (Array<{
|
|
742
|
+
id: string;
|
|
743
|
+
timestamp: string;
|
|
744
|
+
actor: string;
|
|
745
|
+
via_key: undefined | null | ViaKey;
|
|
746
|
+
event: "created" | "blocked" | "activity" | "status_change" | "unblocked" | "field_change" | "dependency_added" | "dependency_removed" | "conflict_added" | "conflict_removed";
|
|
747
|
+
label: undefined | StatusReason;
|
|
748
|
+
from: undefined | "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
|
|
749
|
+
to: undefined | "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
|
|
750
|
+
note: undefined | string;
|
|
751
|
+
field: undefined | string;
|
|
752
|
+
value_before: undefined | null | string;
|
|
753
|
+
value_after: undefined | null | string;
|
|
754
|
+
target: undefined | string;
|
|
755
|
+
checklist: undefined | ChecklistHistoryViewV2;
|
|
756
|
+
}>);
|
|
757
|
+
controls?: undefined | (Array<{
|
|
758
|
+
key: string;
|
|
759
|
+
scope: "board" | "plan" | "card";
|
|
760
|
+
scope_id: string;
|
|
761
|
+
value: null | string | false | true;
|
|
762
|
+
source: "board" | "plan" | "card" | "parent" | "system" | "inherit";
|
|
763
|
+
base_hash: string;
|
|
764
|
+
kind: "boolean" | "enum" | "branch" | "markdown";
|
|
765
|
+
options: null | Array<string>;
|
|
766
|
+
description: string;
|
|
767
|
+
system_default: string | false | true;
|
|
768
|
+
fallback: null | ControlFallback;
|
|
769
|
+
}>);
|
|
770
|
+
comments_page?: undefined | RelationPageView;
|
|
771
|
+
history_page?: undefined | RelationPageView;
|
|
772
|
+
problems?: undefined | Array<ProblemViewV2>;
|
|
773
|
+
subtree?: undefined | Array<IssueViewV2>;
|
|
774
|
+
quality_gates?: undefined | Array<QualityGateChipV2> | Array<QualityGateViewV2>;
|
|
775
|
+
};
|
|
776
|
+
interface QualityGateChipV2 {
|
|
777
|
+
gate: string;
|
|
778
|
+
phase: QualityGatePhase;
|
|
779
|
+
status: "pending" | "pass" | "fail" | "skipped";
|
|
780
|
+
}
|
|
781
|
+
type QualityGateViewV2 = {
|
|
782
|
+
gate: string;
|
|
783
|
+
decision_note: string;
|
|
784
|
+
status: "pending" | "pass" | "fail" | "skipped";
|
|
785
|
+
completed_at: null | string;
|
|
786
|
+
message: string;
|
|
787
|
+
reviewed_ref: null | string;
|
|
788
|
+
effort_level: null | "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
|
|
789
|
+
phase: "plan" | "code";
|
|
790
|
+
};
|
|
791
|
+
type ProblemViewV2 = {
|
|
792
|
+
id: number;
|
|
793
|
+
issue_id: string;
|
|
794
|
+
ordinal: number;
|
|
795
|
+
statement: string;
|
|
796
|
+
context: null | string;
|
|
797
|
+
type: "question" | "action";
|
|
798
|
+
summary: null | string;
|
|
799
|
+
content_hash: string;
|
|
800
|
+
created_at: string;
|
|
801
|
+
updated_at: string;
|
|
802
|
+
open: boolean;
|
|
803
|
+
solutions: Array<{
|
|
804
|
+
id: number;
|
|
805
|
+
problem_id: number;
|
|
806
|
+
removed: boolean;
|
|
807
|
+
title: string;
|
|
808
|
+
body: string;
|
|
809
|
+
pro: string;
|
|
810
|
+
con: string;
|
|
811
|
+
recommended: boolean;
|
|
812
|
+
content_hash: string;
|
|
813
|
+
steps_hash: string;
|
|
814
|
+
steps: Array<{
|
|
815
|
+
id: number;
|
|
816
|
+
solution_id: number;
|
|
817
|
+
parent_step_id: null | number;
|
|
818
|
+
label: string;
|
|
819
|
+
title: string;
|
|
820
|
+
description: null | string;
|
|
821
|
+
content_hash: string;
|
|
822
|
+
checked_at: null | string;
|
|
823
|
+
checked_by: null | string;
|
|
824
|
+
steps: Array<SolutionStepViewV2>;
|
|
825
|
+
}>;
|
|
826
|
+
}>;
|
|
827
|
+
decisions: Array<{
|
|
828
|
+
id: number;
|
|
829
|
+
problem_id: number;
|
|
830
|
+
solution_id: null | number;
|
|
831
|
+
solution_title: null | string;
|
|
832
|
+
outcome: "answered" | "rejected";
|
|
833
|
+
freeform: null | string;
|
|
834
|
+
note: null | string;
|
|
835
|
+
decided_by: string;
|
|
836
|
+
decided_at: string;
|
|
837
|
+
retracted_at: null | string;
|
|
838
|
+
relayed_by_session: null | string;
|
|
839
|
+
content_hash: string;
|
|
840
|
+
}>;
|
|
841
|
+
};
|
|
842
|
+
type SolutionViewV2 = {
|
|
843
|
+
id: number;
|
|
844
|
+
problem_id: number;
|
|
845
|
+
removed: boolean;
|
|
846
|
+
title: string;
|
|
847
|
+
body: string;
|
|
848
|
+
pro: string;
|
|
849
|
+
con: string;
|
|
850
|
+
recommended: boolean;
|
|
851
|
+
content_hash: string;
|
|
852
|
+
steps_hash: string;
|
|
853
|
+
steps: Array<{
|
|
854
|
+
id: number;
|
|
855
|
+
solution_id: number;
|
|
856
|
+
parent_step_id: null | number;
|
|
857
|
+
label: string;
|
|
858
|
+
title: string;
|
|
859
|
+
description: null | string;
|
|
860
|
+
content_hash: string;
|
|
861
|
+
checked_at: null | string;
|
|
862
|
+
checked_by: null | string;
|
|
863
|
+
steps: Array<SolutionStepViewV2>;
|
|
864
|
+
}>;
|
|
865
|
+
};
|
|
866
|
+
interface SolutionStepViewV2 {
|
|
867
|
+
id: number;
|
|
868
|
+
solution_id: number;
|
|
869
|
+
parent_step_id: number | null;
|
|
870
|
+
label: string;
|
|
871
|
+
title: string;
|
|
872
|
+
description: string | null;
|
|
873
|
+
content_hash: string;
|
|
874
|
+
checked_at: string | null;
|
|
875
|
+
checked_by: string | null;
|
|
876
|
+
steps: SolutionStepViewV2[];
|
|
877
|
+
}
|
|
878
|
+
interface DecisionViewV2 {
|
|
879
|
+
id: number;
|
|
880
|
+
problem_id: number;
|
|
881
|
+
solution_id: number | null;
|
|
882
|
+
solution_title: string | null;
|
|
883
|
+
outcome: DecisionOutcome;
|
|
884
|
+
freeform: string | null;
|
|
885
|
+
note: string | null;
|
|
886
|
+
decided_by: string;
|
|
887
|
+
decided_at: string;
|
|
888
|
+
retracted_at: string | null;
|
|
889
|
+
relayed_by_session: string | null;
|
|
890
|
+
content_hash: string;
|
|
891
|
+
}
|
|
892
|
+
interface CardRefViewV2 {
|
|
893
|
+
source: "danxbot" | MirrorProviderId;
|
|
894
|
+
ref: string;
|
|
895
|
+
url: string;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
type TransitionAction = "ready" | "unready" | "pickup" | "rollback_pickup" | "escalate" | "gate_release" | "gate_repin" | "claim_repin" | "complete" | "cancel" | "block" | "unblock" | "archive" | "snooze" | "coerce" | "reopen";
|
|
899
|
+
|
|
900
|
+
type LifecycleAction = Extract<TransitionAction, "ready" | "unready" | "complete" | "cancel" | "reopen">;
|
|
901
|
+
|
|
902
|
+
function transitionCard(id: string, action: LifecycleAction | "unblock" | "archive"): Promise<void>;
|
|
903
|
+
type PriorityPlacement = {
|
|
904
|
+
side: "after" | "before";
|
|
905
|
+
id: string;
|
|
906
|
+
} | {
|
|
907
|
+
edge: "top" | "bottom";
|
|
908
|
+
};
|
|
909
|
+
interface DetachedDispatch {
|
|
910
|
+
dispatchId: string;
|
|
911
|
+
stop: "requested" | "unreachable";
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
interface LaneMoveRequest {
|
|
915
|
+
issueId: string;
|
|
916
|
+
lane: IssueStatus$1;
|
|
917
|
+
placement: PriorityPlacement | null;
|
|
918
|
+
}
|
|
919
|
+
type BoardMoveResult = {
|
|
920
|
+
ok: true;
|
|
921
|
+
reason: null;
|
|
922
|
+
updatedAt: number;
|
|
923
|
+
detachedDispatch: DetachedDispatch | null;
|
|
924
|
+
} | {
|
|
925
|
+
ok: false;
|
|
926
|
+
reason: string;
|
|
927
|
+
updatedAt: null;
|
|
928
|
+
};
|
|
929
|
+
|
|
930
|
+
function useIssueDetail(id: string): LiveQueryResult<IssueViewV2>;
|
|
931
|
+
function requestBoardMove(req: LaneMoveRequest): Promise<BoardMoveResult>;
|
|
932
|
+
|
|
933
|
+
interface CardMutation {
|
|
934
|
+
pending: string | null;
|
|
935
|
+
run: (key: string, failureTitle: string, op: () => Promise<void>) => Promise<boolean>;
|
|
936
|
+
}
|
|
937
|
+
function useCardMutation(): CardMutation;
|
|
938
|
+
type HideableLane = "Cancelled" | "Backlog";
|
|
939
|
+
interface LaneVisibility {
|
|
940
|
+
isShown: (lane: IssueStatus$1) => boolean;
|
|
941
|
+
setShown: (lane: HideableLane, shown: boolean) => void;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
type LaneSortField = "title" | "id" | "priority" | "updated_at" | "created_at";
|
|
945
|
+
type LaneSort = SortValue<LaneSortField>;
|
|
946
|
+
type LaneSorts = Readonly<Record<IssueStatus$1, LaneSort>>;
|
|
947
|
+
interface LaneSortState {
|
|
948
|
+
readonly sorts: LaneSorts;
|
|
949
|
+
readonly setSort: (lane: IssueStatus$1, sort: LaneSort) => void;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
type BoardScope = {
|
|
953
|
+
readonly kind: "board";
|
|
954
|
+
readonly board: string;
|
|
955
|
+
readonly boards: readonly string[];
|
|
956
|
+
} | {
|
|
957
|
+
readonly kind: "plan";
|
|
958
|
+
readonly planId: number;
|
|
959
|
+
readonly boards: readonly string[];
|
|
960
|
+
};
|
|
961
|
+
type BoardLaneWindows = Readonly<Record<IssueStatus$1, PagedWindow<IssueViewV2>>>;
|
|
962
|
+
interface BoardLaneState {
|
|
963
|
+
readonly scope: BoardScope;
|
|
964
|
+
readonly windows: BoardLaneWindows;
|
|
965
|
+
readonly visibility: LaneVisibility;
|
|
966
|
+
readonly sorts: LaneSorts;
|
|
967
|
+
readonly setSort: LaneSortState["setSort"];
|
|
968
|
+
readonly openCount: number | null;
|
|
969
|
+
}
|
|
970
|
+
function useBoardLaneState(scope: BoardScope): BoardLaneState;
|
|
971
|
+
|
|
972
|
+
function boardCardPath(cardId: string): string;
|
|
973
|
+
function planCardPath(planId: number, cardId: string, planSearch?: string): string;
|
|
974
|
+
function planPathFromCard(planId: number, cardSearch?: string): string;
|
|
975
|
+
|
|
976
|
+
function CardLink({ id, className, onNavigate }: {
|
|
977
|
+
id: string;
|
|
978
|
+
className?: string;
|
|
979
|
+
onNavigate?: () => void;
|
|
980
|
+
}): react.JSX.Element;
|
|
981
|
+
|
|
982
|
+
function EditableTitle({ card }: {
|
|
983
|
+
card: IssueViewV2;
|
|
984
|
+
}): react.JSX.Element;
|
|
985
|
+
|
|
986
|
+
function EditableSummary({ card }: {
|
|
987
|
+
card: IssueViewV2;
|
|
988
|
+
}): react.JSX.Element;
|
|
989
|
+
|
|
990
|
+
function EditableContext({ card }: {
|
|
991
|
+
card: IssueViewV2;
|
|
992
|
+
}): react.JSX.Element;
|
|
993
|
+
|
|
994
|
+
function ChecklistsSection({ card, mutation }: {
|
|
995
|
+
card: IssueViewV2;
|
|
996
|
+
mutation: CardMutation;
|
|
997
|
+
}): react.JSX.Element;
|
|
998
|
+
|
|
999
|
+
type CardTone = "success" | "warning" | "danger" | "info" | "neutral" | "accent" | "brand" | "muted";
|
|
1000
|
+
interface ChildProgress {
|
|
1001
|
+
done: number;
|
|
1002
|
+
total: number;
|
|
1003
|
+
}
|
|
1004
|
+
interface CardStatusPresentation {
|
|
1005
|
+
label: string;
|
|
1006
|
+
tone: CardTone;
|
|
1007
|
+
icon: string;
|
|
1008
|
+
reason: string | null;
|
|
1009
|
+
live: boolean;
|
|
1010
|
+
isContainer: boolean;
|
|
1011
|
+
childProgress: ChildProgress | null;
|
|
1012
|
+
}
|
|
1013
|
+
type SnoozePresentation = {
|
|
1014
|
+
active: false;
|
|
1015
|
+
} | {
|
|
1016
|
+
active: true;
|
|
1017
|
+
wakeAt: string;
|
|
1018
|
+
wakeAction: "ready" | "review";
|
|
1019
|
+
};
|
|
1020
|
+
interface GateBreakdownEntry {
|
|
1021
|
+
gate: string;
|
|
1022
|
+
label: string;
|
|
1023
|
+
status: GateVerdict;
|
|
1024
|
+
}
|
|
1025
|
+
type GateVerdict = QualityGateViewV2["status"];
|
|
1026
|
+
|
|
1027
|
+
interface ProblemAttention {
|
|
1028
|
+
problem: ProblemViewV2;
|
|
1029
|
+
solutions: SolutionViewV2[];
|
|
1030
|
+
removedSolutionIds: ReadonlySet<number>;
|
|
1031
|
+
decisions: DecisionViewV2[];
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
function ProblemsSection({ cardId, problems, comments, canAnswer, mutation, }: {
|
|
1035
|
+
cardId: string;
|
|
1036
|
+
problems: ProblemAttention[];
|
|
1037
|
+
comments: readonly CommentViewV2[];
|
|
1038
|
+
canAnswer: boolean;
|
|
1039
|
+
mutation: CardMutation;
|
|
1040
|
+
}): react.JSX.Element;
|
|
1041
|
+
|
|
1042
|
+
function DependenciesSection({ card, mutation }: {
|
|
1043
|
+
card: IssueViewV2;
|
|
1044
|
+
mutation: CardMutation;
|
|
1045
|
+
}): react.JSX.Element;
|
|
1046
|
+
|
|
1047
|
+
function ChildrenSection({ card }: {
|
|
1048
|
+
card: IssueViewV2;
|
|
1049
|
+
}): react.JSX.Element;
|
|
1050
|
+
|
|
1051
|
+
function ParentField({ card, mutation }: {
|
|
1052
|
+
card: IssueViewV2;
|
|
1053
|
+
mutation: CardMutation;
|
|
1054
|
+
}): react.JSX.Element;
|
|
1055
|
+
|
|
1056
|
+
function PlansField({ card, mutation }: {
|
|
1057
|
+
card: IssueViewV2;
|
|
1058
|
+
mutation: CardMutation;
|
|
1059
|
+
}): react.JSX.Element;
|
|
1060
|
+
|
|
1061
|
+
function GatesSection({ card }: {
|
|
1062
|
+
card: IssueViewV2;
|
|
1063
|
+
}): react.JSX.Element;
|
|
1064
|
+
|
|
1065
|
+
interface ActivityProps {
|
|
1066
|
+
card: IssueViewV2;
|
|
1067
|
+
mutation: CardMutation;
|
|
1068
|
+
onFocusProblem?: (problemId: number) => void;
|
|
1069
|
+
}
|
|
1070
|
+
function ActivityTab(props: ActivityProps): react.JSX.Element;
|
|
1071
|
+
|
|
1072
|
+
type ShownAttachment = AttachmentViewV2 & {
|
|
1073
|
+
pending: boolean;
|
|
1074
|
+
};
|
|
1075
|
+
|
|
1076
|
+
interface AttachmentActions {
|
|
1077
|
+
attachments: ShownAttachment[];
|
|
1078
|
+
add: (files: readonly File[]) => void;
|
|
1079
|
+
replace: (id: number, file: File) => void;
|
|
1080
|
+
rename: (id: number, filename: string) => void;
|
|
1081
|
+
setCover: (id: number) => void;
|
|
1082
|
+
remove: (id: number) => void;
|
|
1083
|
+
}
|
|
1084
|
+
function useAttachmentActions(card: Pick<IssueViewV2, "id" | "attachments">): AttachmentActions;
|
|
1085
|
+
|
|
1086
|
+
interface AttachmentViewer {
|
|
1087
|
+
open: (attachmentId: number) => void;
|
|
1088
|
+
element: ReactNode;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
function AttachmentsTab({ cardId, actions, viewer, }: {
|
|
1092
|
+
cardId: string;
|
|
1093
|
+
actions: AttachmentActions;
|
|
1094
|
+
viewer: AttachmentViewer;
|
|
1095
|
+
}): react.JSX.Element;
|
|
1096
|
+
|
|
1097
|
+
function RetroTab({ retro }: {
|
|
1098
|
+
retro: RetroViewV2;
|
|
1099
|
+
}): react.JSX.Element;
|
|
1100
|
+
|
|
1101
|
+
interface AttentionZoneProps {
|
|
1102
|
+
card: IssueViewV2;
|
|
1103
|
+
mutation: CardMutation;
|
|
1104
|
+
}
|
|
1105
|
+
function AttentionZone({ card, mutation }: AttentionZoneProps): react.JSX.Element;
|
|
1106
|
+
|
|
1107
|
+
interface CardActionsMenuProps {
|
|
1108
|
+
card: IssueViewV2;
|
|
1109
|
+
mutation: CardMutation;
|
|
1110
|
+
}
|
|
1111
|
+
function CardActionsMenu({ card, mutation }: CardActionsMenuProps): react.JSX.Element;
|
|
1112
|
+
|
|
1113
|
+
interface WorkStateInput {
|
|
1114
|
+
terminal: boolean;
|
|
1115
|
+
container: boolean;
|
|
1116
|
+
assignedAgent: string | null;
|
|
1117
|
+
assignedAgentName: string | null;
|
|
1118
|
+
assignedAgentKind: AssignedAgentKind | null;
|
|
1119
|
+
assignedAgentRepoCopy: RepoProfileCopy | null;
|
|
1120
|
+
assignedAgentPause: HolderAgentPause | null;
|
|
1121
|
+
heldSince: string | null;
|
|
1122
|
+
blocked: {
|
|
1123
|
+
reason: string;
|
|
1124
|
+
by: string | null;
|
|
1125
|
+
at: string | null;
|
|
1126
|
+
} | null;
|
|
1127
|
+
waitingOn: readonly string[];
|
|
1128
|
+
conflictIds: readonly string[];
|
|
1129
|
+
conflictActive: number;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
interface WorkStateControlProps {
|
|
1133
|
+
cardId: string;
|
|
1134
|
+
input: WorkStateInput;
|
|
1135
|
+
size?: "sm" | "2xs";
|
|
1136
|
+
onOpenHold?: () => void;
|
|
1137
|
+
onOpenDependencies?: () => void;
|
|
1138
|
+
}
|
|
1139
|
+
function WorkStateControl({ cardId, input, size, onOpenHold, onOpenDependencies }: WorkStateControlProps): react.JSX.Element | null;
|
|
1140
|
+
|
|
1141
|
+
interface ControlProps {
|
|
1142
|
+
card: IssueViewV2;
|
|
1143
|
+
mutation: CardMutation;
|
|
1144
|
+
}
|
|
1145
|
+
function PriorityControl({ card, mutation }: ControlProps): react.JSX.Element;
|
|
1146
|
+
function EffortControl({ card, mutation }: ControlProps): react.JSX.Element;
|
|
1147
|
+
function TypeControl({ card, mutation }: ControlProps): react.JSX.Element;
|
|
1148
|
+
function StatusControl({ card, mutation }: ControlProps): react.JSX.Element;
|
|
1149
|
+
|
|
1150
|
+
interface StandardCardPageProps {
|
|
1151
|
+
card: IssueViewV2;
|
|
1152
|
+
mutation: CardMutation;
|
|
1153
|
+
}
|
|
1154
|
+
function StandardCardPage({ card, mutation }: StandardCardPageProps): react.JSX.Element;
|
|
1155
|
+
|
|
1156
|
+
interface CardFaceAc {
|
|
1157
|
+
total: number;
|
|
1158
|
+
byStatus: Record<ChecklistItemStatus, number>;
|
|
1159
|
+
items?: NonNullable<IssueViewV2["ac_items"]>;
|
|
1160
|
+
}
|
|
1161
|
+
interface CardFaceModel {
|
|
1162
|
+
id: string;
|
|
1163
|
+
title: string;
|
|
1164
|
+
type: IssueType;
|
|
1165
|
+
priority: number;
|
|
1166
|
+
statusName: IssueStatus$1;
|
|
1167
|
+
status: CardStatusPresentation;
|
|
1168
|
+
list: CardFaceList | null;
|
|
1169
|
+
to: string;
|
|
1170
|
+
parent: {
|
|
1171
|
+
id: string;
|
|
1172
|
+
title: string | null;
|
|
1173
|
+
to: string;
|
|
1174
|
+
} | null;
|
|
1175
|
+
needsHuman: {
|
|
1176
|
+
questions: number;
|
|
1177
|
+
actions: number;
|
|
1178
|
+
};
|
|
1179
|
+
work: WorkStateInput;
|
|
1180
|
+
snooze: SnoozePresentation;
|
|
1181
|
+
effort: EffortLevelName | null;
|
|
1182
|
+
planGates: readonly GateBreakdownEntry[];
|
|
1183
|
+
codeGates: readonly GateBreakdownEntry[];
|
|
1184
|
+
ac: CardFaceAc;
|
|
1185
|
+
commentsCount: number;
|
|
1186
|
+
hasRetro: boolean;
|
|
1187
|
+
onPullRequest: boolean;
|
|
1188
|
+
childrenCount: number;
|
|
1189
|
+
childrenDetail?: NonNullable<IssueViewV2["children_detail"]>;
|
|
1190
|
+
triage: {
|
|
1191
|
+
lastDecisionAt: string | null;
|
|
1192
|
+
confidence: number | null;
|
|
1193
|
+
iceTotal: number | null;
|
|
1194
|
+
iceI: number | null;
|
|
1195
|
+
iceC: number | null;
|
|
1196
|
+
iceE: number | null;
|
|
1197
|
+
};
|
|
1198
|
+
agent: {
|
|
1199
|
+
childAssignments: readonly ChildAssignmentViewV2[];
|
|
1200
|
+
dispatchKind?: IssueDispatchKind | null;
|
|
1201
|
+
latestWorkDispatch: LatestWorkDispatchViewV2 | null;
|
|
1202
|
+
};
|
|
1203
|
+
usage: CardUsage;
|
|
1204
|
+
createdAt: string | number;
|
|
1205
|
+
updatedAt: string | number;
|
|
1206
|
+
}
|
|
1207
|
+
type CardFaceList = {
|
|
1208
|
+
name: string;
|
|
1209
|
+
id: string;
|
|
1210
|
+
color: string;
|
|
1211
|
+
emoji: string;
|
|
1212
|
+
};
|
|
1213
|
+
|
|
1214
|
+
type CardFaceStatusMark = {
|
|
1215
|
+
kind: "labelled";
|
|
1216
|
+
} | {
|
|
1217
|
+
kind: "lane";
|
|
1218
|
+
laneListId: string | null;
|
|
1219
|
+
};
|
|
1220
|
+
interface CardFaceProps {
|
|
1221
|
+
card: CardFaceModel;
|
|
1222
|
+
renderTitle: (props: {
|
|
1223
|
+
className: string;
|
|
1224
|
+
describedBy: string;
|
|
1225
|
+
}) => ReactNode;
|
|
1226
|
+
trailing?: ReactNode;
|
|
1227
|
+
statusMark: CardFaceStatusMark;
|
|
1228
|
+
cover?: ReactNode;
|
|
1229
|
+
demo?: boolean;
|
|
1230
|
+
}
|
|
1231
|
+
function CardFace({ card, renderTitle, trailing, statusMark, cover, demo }: CardFaceProps): react.JSX.Element;
|
|
1232
|
+
|
|
1233
|
+
function CardBoard({ state, cardPath, }: {
|
|
1234
|
+
state: BoardLaneState;
|
|
1235
|
+
cardPath?: (cardId: string) => string;
|
|
1236
|
+
}): react.JSX.Element;
|
|
1237
|
+
|
|
1238
|
+
type CardViewProps = StandardCardPageProps;
|
|
1239
|
+
interface CardListViewProps {
|
|
1240
|
+
readonly scope: BoardScope;
|
|
1241
|
+
readonly cardPath: (cardId: string) => string;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
export { ActivityTab, AttachmentsTab, AttentionZone, CardActionsMenu, CardBoard, CardFace, CardLink, ChecklistsSection, ChildrenSection, DependenciesSection, EditableContext, EditableSummary, EditableTitle, EffortControl, GatesSection, ParentField, PlansField, PriorityControl, ProblemsSection, RetroTab, StandardCardPage, StatusControl, TypeControl, WorkStateControl, boardCardPath, planCardPath, planPathFromCard, requestBoardMove, transitionCard, useAttachmentActions, useBoardLaneState, useIssueDetail as useCard, useCardMutation };
|
|
1245
|
+
export type { AttachmentActions, BoardLaneState, BoardMoveResult, BoardScope, CardFaceProps, CardListViewProps, CardMutation, CardViewProps, IssueViewV2, LaneMoveRequest, LiveQueryResult, StandardCardPageProps };
|
|
1246
|
+
}
|