@50arms/plugin-sdk 0.2.58 → 0.2.60

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.
@@ -4,6 +4,8 @@ declare module "@danxbot/card-kit@1" {
4
4
  import { ReactNode } from 'react';
5
5
  export { Link, useNavigate } from 'react-router';
6
6
 
7
+ type RiskScore = "R0" | "R1" | "R2" | "R3" | "R4";
8
+
7
9
  const BOARD_ID: unique symbol;
8
10
  const CARD_ID: unique symbol;
9
11
  type BoardId = number & {
@@ -28,8 +30,49 @@ declare module "@danxbot/card-kit@1" {
28
30
  }
29
31
 
30
32
  type CardTypeKey = string;
31
- type MirrorProviderId = "trello" | "slack" | "asana";
33
+
34
+ interface Justification {
35
+ quote: string;
36
+ reasoning: string;
37
+ }
38
+ type MirrorProviderId = "trello" | "slack" | "asana" | "linear";
32
39
  type SourceOrigin = "danxbot" | MirrorProviderId | "";
40
+ type DecisionRecordKind = "business_rule" | "architecture" | "design" | "other";
41
+ type DecisionRecordAction = "created" | "changed" | "deleted" | "restored";
42
+ type DecisionMadeBy = "human" | "agent";
43
+ type DecisionApprovalAction = "approve" | "unapprove";
44
+
45
+ interface DecisionApprovalState {
46
+ approved: boolean;
47
+ by_user_id: number | null;
48
+ by_name: string | null;
49
+ at: string | null;
50
+ }
51
+ interface DecisionContentView {
52
+ action: DecisionRecordAction;
53
+ title: string;
54
+ text: string;
55
+ kind: DecisionRecordKind;
56
+ impact: number;
57
+ confidence: number;
58
+ made_by: DecisionMadeBy;
59
+ made_by_user_id: number | null;
60
+ made_by_name: string | null;
61
+ made_by_author: AuthorV2;
62
+ made_by_is_writer: boolean;
63
+ provenance: ProvenanceRecordV2[];
64
+ author: string;
65
+ by: AuthorV2;
66
+ via_key: ViaKey | null;
67
+ created_at: string;
68
+ }
69
+ interface DecisionVersionView extends DecisionContentView {
70
+ id: number;
71
+ record_id: number;
72
+ ref: string;
73
+ version_no: number;
74
+ approval: DecisionApprovalState;
75
+ }
33
76
  interface RepoProfileCopy {
34
77
  shipped: string;
35
78
  repo: string;
@@ -61,14 +104,13 @@ declare module "@danxbot/card-kit@1" {
61
104
  }
62
105
  type PacingLimit = "five_hour" | "weekly" | "spend";
63
106
  type ProvenanceSourceKind = "card" | "comment" | "session_thread" | "problem" | "url";
64
- type ProvenancePartyKind = "person" | "agent";
65
- type ResourceType = "plan" | "problem" | "issue" | "plan_record" | "plan_section" | "design" | "decision";
107
+ type ProvenancePartyKind = "agent" | "person";
108
+ type ResourceType = "design" | "plan" | "problem" | "issue" | "plan_record" | "plan_section" | "decision";
66
109
  interface ResourceRef {
67
110
  type: ResourceType;
68
111
  id: string;
69
112
  }
70
- type RiskScore = "R0" | "R1" | "R2" | "R3" | "R4";
71
- type WorkMarkResourceType = "plan" | "problem" | "issue" | "plan_record" | "plan_section" | "design" | "decision";
113
+ type WorkMarkResourceType = "design" | "plan" | "problem" | "plan_record" | "plan_section" | "decision";
72
114
  interface WorkMarkResource extends ResourceRef {
73
115
  type: WorkMarkResourceType;
74
116
  }
@@ -130,17 +172,6 @@ declare module "@danxbot/card-kit@1" {
130
172
  compare_url: string | null;
131
173
  updated_at: string;
132
174
  }
133
- type DecisionRecordKind = "design" | "business_rule" | "architecture" | "other";
134
- type DecisionRecordAction = "created" | "changed" | "deleted" | "restored";
135
- type DecisionMadeBy = "agent" | "human";
136
- type DecisionApprovalAction = "approve" | "unapprove";
137
-
138
- interface DecisionApprovalState {
139
- approved: boolean;
140
- by_user_id: number | null;
141
- by_name: string | null;
142
- at: string | null;
143
- }
144
175
  interface DecisionRecordPage {
145
176
  offset: number;
146
177
  target_found: boolean | null;
@@ -275,6 +306,7 @@ declare module "@danxbot/card-kit@1" {
275
306
  }
276
307
  interface V2CopyDecisionVersion {
277
308
  version_no: number;
309
+ quality_gate_round: V2CopyRoundRef | null;
278
310
  action: DecisionRecordAction;
279
311
  title: string;
280
312
  text: string;
@@ -301,8 +333,13 @@ declare module "@danxbot/card-kit@1" {
301
333
  }
302
334
  interface V2CopyChecklist {
303
335
  name: string;
336
+ quality_gate_round: V2CopyRoundRef | null;
304
337
  items: V2CopyChecklistItem[];
305
338
  }
339
+ interface V2CopyRoundRef {
340
+ gate: string;
341
+ number: number;
342
+ }
306
343
  interface V2CopyChecklistItem {
307
344
  label: string;
308
345
  detail: string;
@@ -353,7 +390,7 @@ declare module "@danxbot/card-kit@1" {
353
390
  decided_by: string | null;
354
391
  owed: boolean;
355
392
  }
356
- type V2CopyGateRound = Omit<GateRoundV2, "id" | "by" | "via_key">;
393
+ type V2CopyGateRound = Omit<GateRoundV2, "id" | "by" | "via_key" | "decision_versions">;
357
394
  interface V2CopySolution extends SolutionContent {
358
395
  removed: boolean;
359
396
  design_index: number | null;
@@ -466,7 +503,7 @@ declare module "@danxbot/card-kit@1" {
466
503
  interface HolderAgentPause {
467
504
  reason: string;
468
505
  since: string;
469
- until: string;
506
+ until: string | null;
470
507
  }
471
508
 
472
509
  interface AgentIdentity {
@@ -545,6 +582,14 @@ declare module "@danxbot/card-kit@1" {
545
582
  content: string;
546
583
  }
547
584
 
585
+ type NotificationText = {
586
+ kind: "reason";
587
+ reason: StatusReason;
588
+ } | {
589
+ kind: "external";
590
+ text: string;
591
+ };
592
+
548
593
  type PreGateHold = {
549
594
  kind: "awaiting_person";
550
595
  } | {
@@ -650,9 +695,10 @@ declare module "@danxbot/card-kit@1" {
650
695
  dispatch_key_blockers: DispatchKeyBlocker[];
651
696
  worker_readiness_blockers: ReadinessBlocker[];
652
697
  agent_wait: StatusReason | null;
698
+ orchestrator_profile: string | null;
653
699
  }
654
700
  type CardContextCategoryKey = "comments" | "checklists" | "content" | "agent_notes" | "problems" | "decisions" | "designs";
655
- type PlanContextCategoryKey = "comments" | "architecture" | "records" | "notes" | "open_cards";
701
+ type PlanContextCategoryKey = "architecture" | "comments" | "records" | "notes" | "open_cards";
656
702
  type ContextCategoryKey = CardContextCategoryKey | PlanContextCategoryKey;
657
703
  interface ContextCategorySize {
658
704
  key: ContextCategoryKey;
@@ -760,6 +806,7 @@ declare module "@danxbot/card-kit@1" {
760
806
  interface ChecklistView {
761
807
  id: number;
762
808
  name: string;
809
+ quality_gate_round_id: number | null;
763
810
  items: ChecklistItemView[];
764
811
  }
765
812
  type DesignDecisionOutcome = "approved" | "changes_requested" | "rejected";
@@ -796,7 +843,7 @@ declare module "@danxbot/card-kit@1" {
796
843
  reduced_text?: undefined | null | string;
797
844
  parent_removed?: undefined | true;
798
845
  updated_at: string;
799
- origin: "" | "trello" | "slack" | "asana" | "danxbot";
846
+ origin: "" | "trello" | "slack" | "asana" | "linear" | "danxbot";
800
847
  via_key?: undefined | null | ViaKey;
801
848
  metadata?: unknown;
802
849
  answers_decision_id?: undefined | null | number;
@@ -810,7 +857,7 @@ declare module "@danxbot/card-kit@1" {
810
857
  checklists?: undefined | Array<ChecklistView>;
811
858
  attachments?: undefined | (Array<{
812
859
  id: number;
813
- source: "" | "trello" | "slack" | "asana" | "danxbot";
860
+ source: "" | "trello" | "slack" | "asana" | "linear" | "danxbot";
814
861
  url: string;
815
862
  filename: string;
816
863
  mime: string;
@@ -896,6 +943,7 @@ declare module "@danxbot/card-kit@1" {
896
943
  blocked?: undefined | null | { at: string; reason: string; by: AuthorV2 | null; };
897
944
  board_id?: undefined | BoardRefNum;
898
945
  ready_at?: undefined | null | string;
946
+ started_at?: undefined | null | string;
899
947
  archived_at?: undefined | null | string;
900
948
  completed_at?: undefined | null | string;
901
949
  cancelled_at?: undefined | null | string;
@@ -919,7 +967,9 @@ declare module "@danxbot/card-kit@1" {
919
967
  pull_request_url?: undefined | null | string;
920
968
  risk_score?: undefined | null | "R0" | "R1" | "R2" | "R3" | "R4";
921
969
  risk_reason?: undefined | null | string;
970
+ risk_set?: undefined | null | { at: string; by: AuthorV2; };
922
971
  risk_raise_reason?: undefined | null | string;
972
+ justification?: undefined | null | Justification;
923
973
  start_commit?: undefined | null | { at: string; sha: string | null; error: "no_repo" | "not_github_repo" | "no_token" | "github_refused" | "github_unreachable" | "unreadable_tip" | "unexpected" | null; error_detail: string | null; };
924
974
  problem_total?: undefined | number;
925
975
  decision_record_total?: undefined | number;
@@ -963,6 +1013,7 @@ declare module "@danxbot/card-kit@1" {
963
1013
  unread_comments_count?: undefined | number;
964
1014
  unread_decision_comment_counts?: undefined | Record<string, number>;
965
1015
  context_size?: undefined | ContextSize;
1016
+ content_compaction?: undefined | null | { requested_at: string; } & { status: "waiting" | "working"; ended_at: null; failure_reason: null; } | { requested_at: string; } & { status: "done"; ended_at: string; failure_reason: null; } | { requested_at: string; } & { status: "failed"; ended_at: string; failure_reason: NotificationText; };
966
1017
  agent_notes_count?: undefined | number;
967
1018
  comment_recipient?: undefined | { kind: "agent"; by: AuthorV2; reachability: CommentReachabilityV2; } | { kind: "none"; waiting_on: { kind: "plan"; id: PlanRefNum; ref: string; name: string; } | { kind: "card"; id: string; }; };
968
1019
  comment_tags?: undefined | Array<CommentTagOption>;
@@ -987,9 +1038,9 @@ declare module "@danxbot/card-kit@1" {
987
1038
  copy_issue?: undefined | V2CopyIssue;
988
1039
  decision_records?: undefined | (Array<{
989
1040
  title: string;
990
- kind: "design" | "business_rule" | "architecture" | "other";
1041
+ kind: "business_rule" | "architecture" | "design" | "other";
991
1042
  action: "created" | "changed" | "deleted" | "restored";
992
- made_by: "agent" | "human";
1043
+ made_by: "human" | "agent";
993
1044
  approved: boolean;
994
1045
  impact: number;
995
1046
  confidence: number;
@@ -1015,9 +1066,9 @@ declare module "@danxbot/card-kit@1" {
1015
1066
  unread_comment_count: number;
1016
1067
  versions?: undefined | (Array<{
1017
1068
  title: string;
1018
- kind: "design" | "business_rule" | "architecture" | "other";
1069
+ kind: "business_rule" | "architecture" | "design" | "other";
1019
1070
  action: "created" | "changed" | "deleted" | "restored";
1020
- made_by: "agent" | "human";
1071
+ made_by: "human" | "agent";
1021
1072
  impact: number;
1022
1073
  confidence: number;
1023
1074
  id: number;
@@ -1047,9 +1098,9 @@ declare module "@danxbot/card-kit@1" {
1047
1098
  }>);
1048
1099
  decision_record_versions?: undefined | (Array<{
1049
1100
  title: string;
1050
- kind: "design" | "business_rule" | "architecture" | "other";
1101
+ kind: "business_rule" | "architecture" | "design" | "other";
1051
1102
  action: "created" | "changed" | "deleted" | "restored";
1052
- made_by: "agent" | "human";
1103
+ made_by: "human" | "agent";
1053
1104
  impact: number;
1054
1105
  confidence: number;
1055
1106
  id: number;
@@ -1098,13 +1149,6 @@ declare module "@danxbot/card-kit@1" {
1098
1149
  occurred_at: string;
1099
1150
  }>);
1100
1151
  changed_fields?: undefined | Array<string>;
1101
- code_review_items?: undefined | Array<{
1102
- gate_name: string;
1103
- title: string;
1104
- description: string;
1105
- status: string;
1106
- reasoning: string;
1107
- }>;
1108
1152
  children_detail?: undefined | (Array<{
1109
1153
  status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
1110
1154
  type: string;
@@ -1126,10 +1170,10 @@ declare module "@danxbot/card-kit@1" {
1126
1170
  name: string;
1127
1171
  }>;
1128
1172
  mirrors?: undefined | (Array<{
1129
- target_type: "trello" | "slack" | "asana";
1173
+ target_type: "trello" | "slack" | "asana" | "linear";
1130
1174
  target_url: string;
1131
1175
  sync_state: "synced" | "out_of_sync" | "error" | "dead" | "unavailable" | "diverged";
1132
- dead_reason: "" | "deleted" | "archived";
1176
+ dead_reason: "" | "deleted" | "archived" | "left";
1133
1177
  source_ref: string;
1134
1178
  last_error: null | StatusReason;
1135
1179
  owed: Array<"comments" | "checklists" | "attachments" | "title" | "description" | "status" | "type" | "priority" | "parent_child" | "dependencies" | "card_create" | "card_delete">;
@@ -1137,7 +1181,6 @@ declare module "@danxbot/card-kit@1" {
1137
1181
  target_ref: string;
1138
1182
  target_label: string;
1139
1183
  last_synced_at: number;
1140
- logo_url: string;
1141
1184
  }>);
1142
1185
  history?: undefined | (Array<{
1143
1186
  id: string;
@@ -1241,9 +1284,9 @@ declare module "@danxbot/card-kit@1" {
1241
1284
  choices: Array<{ solution_id: number; kind: DecisionReviewChoiceKind; version_no: number; title: string; }>;
1242
1285
  versions?: undefined | (Array<{
1243
1286
  title: string;
1244
- kind: "design" | "business_rule" | "architecture" | "other";
1287
+ kind: "business_rule" | "architecture" | "design" | "other";
1245
1288
  action: "created" | "changed" | "deleted" | "restored";
1246
- made_by: "agent" | "human";
1289
+ made_by: "human" | "agent";
1247
1290
  impact: number;
1248
1291
  confidence: number;
1249
1292
  id: number;
@@ -1384,7 +1427,14 @@ declare module "@danxbot/card-kit@1" {
1384
1427
  pull_request_url: string | null;
1385
1428
  risk_score: RiskScore | null;
1386
1429
  risk_reason: string | null;
1430
+ risk_set_at: string | null;
1431
+ risk_set_by: string | null;
1432
+ risk_set_via_key_id: number | null;
1433
+ risk_set_via_key_name: string | null;
1434
+ risk_set_team_agent_id: number | null;
1387
1435
  risk_raise_reason: string | null;
1436
+ justification_quote: string | null;
1437
+ justification_reasoning: string | null;
1388
1438
  start_commit_sha: string | null;
1389
1439
  start_commit_at: string | null;
1390
1440
  start_commit_error: StartCommitError | null;
@@ -1515,6 +1565,7 @@ declare module "@danxbot/card-kit@1" {
1515
1565
  issue_id: CardId;
1516
1566
  ordinal: number;
1517
1567
  name: string;
1568
+ quality_gate_round_id: number | null;
1518
1569
  created_at: string;
1519
1570
  updated_at: string;
1520
1571
  deleted_at: string | null;
@@ -1571,6 +1622,7 @@ declare module "@danxbot/card-kit@1" {
1571
1622
  verdict: GateRoundVerdict;
1572
1623
  summary: string;
1573
1624
  recorded_at: string;
1625
+ decision_versions: DecisionVersionView[];
1574
1626
  }
1575
1627
  interface ProvenanceRecordV2 {
1576
1628
  id: number;
@@ -1723,7 +1775,7 @@ declare module "@danxbot/card-kit@1" {
1723
1775
  function planCardPath(planId: number, cardId: string, planSearch?: string): string;
1724
1776
  function planPathFromCard(planId: number, cardSearch?: string): string;
1725
1777
 
1726
- function CardLink({ id, className, onNavigate }: {
1778
+ function CardLink({ id, className, onNavigate, }: {
1727
1779
  id: string;
1728
1780
  className?: string;
1729
1781
  onNavigate?: () => void;
@@ -1741,7 +1793,7 @@ declare module "@danxbot/card-kit@1" {
1741
1793
  card: IssueViewV2;
1742
1794
  }): react.JSX.Element;
1743
1795
 
1744
- function ChecklistsSection({ card, mutation }: {
1796
+ function ChecklistsSection({ card, mutation, }: {
1745
1797
  card: IssueViewV2;
1746
1798
  mutation: CardMutation;
1747
1799
  }): react.JSX.Element;
@@ -1766,7 +1818,7 @@ declare module "@danxbot/card-kit@1" {
1766
1818
  cardId: IssueViewV2["id"];
1767
1819
  } & Omit<ProblemsSectionProps, "card">): react.JSX.Element;
1768
1820
 
1769
- function DependenciesSection({ card, mutation }: {
1821
+ function DependenciesSection({ card, mutation, }: {
1770
1822
  card: IssueViewV2;
1771
1823
  mutation: CardMutation;
1772
1824
  }): react.JSX.Element;
@@ -1775,12 +1827,12 @@ declare module "@danxbot/card-kit@1" {
1775
1827
  card: IssueViewV2;
1776
1828
  }): react.JSX.Element;
1777
1829
 
1778
- function ParentField({ card, mutation }: {
1830
+ function ParentField({ card, mutation, }: {
1779
1831
  card: IssueViewV2;
1780
1832
  mutation: CardMutation;
1781
1833
  }): react.JSX.Element;
1782
1834
 
1783
- function PlansField({ card, mutation }: {
1835
+ function PlansField({ card, mutation, }: {
1784
1836
  card: IssueViewV2;
1785
1837
  mutation: CardMutation;
1786
1838
  }): react.JSX.Element;
@@ -1868,7 +1920,7 @@ declare module "@danxbot/card-kit@1" {
1868
1920
  onOpenDependencies?: () => void;
1869
1921
  assignee?: boolean;
1870
1922
  }
1871
- function WorkStateControl({ cardId, input, size, onOpenHold, onOpenDependencies, assignee }: WorkStateControlProps): react.JSX.Element | null;
1923
+ function WorkStateControl({ cardId, input, size, onOpenHold, onOpenDependencies, assignee, }: WorkStateControlProps): react.JSX.Element | null;
1872
1924
 
1873
1925
  interface ControlProps {
1874
1926
  card: IssueViewV2;
@@ -1955,7 +2007,7 @@ declare module "@danxbot/card-kit@1" {
1955
2007
  cover?: ReactNode;
1956
2008
  inParentBox?: boolean;
1957
2009
  }
1958
- function CardFace({ card, renderTitle, trailing, statusMark, cover }: CardFaceProps): react.JSX.Element;
2010
+ function CardFace({ card, renderTitle, trailing, statusMark, cover, }: CardFaceProps): react.JSX.Element;
1959
2011
 
1960
2012
  function CardBoard({ state, cardPath, }: {
1961
2013
  state: BoardLaneState;