@50arms/plugin-sdk 0.2.64 → 0.2.67

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.
Files changed (2) hide show
  1. package/dist/card-kit.d.ts +454 -112
  2. package/package.json +1 -1
@@ -111,77 +111,15 @@ declare module "@danxbot/card-kit@1" {
111
111
  type: ResourceType;
112
112
  id: string;
113
113
  }
114
- type WorkMarkResourceType = "design" | "plan" | "problem" | "plan_record" | "plan_section" | "decision";
115
- interface WorkMarkResource extends ResourceRef {
116
- type: WorkMarkResourceType;
117
- }
118
-
119
- type QualityGatePhase = "plan" | "code";
120
- type ControlValue = boolean | string;
121
-
122
- type ControlSource = "card" | "plan" | "board" | "team" | "system";
123
- interface ControlFallback {
124
- readonly value: ControlValue;
125
- readonly source: Exclude<ControlSource, "card">;
126
- }
127
-
128
- type ActorKind = "person" | "system" | "dispatch_agent" | "worker" | "agent_profile" | "plan_session" | "unresolved";
129
- interface ActorRef {
130
- kind: ActorKind;
131
- name: string;
132
- reason: StatusReason | ProfileName | null;
133
- }
134
-
135
- type DocsPromotionStatus = "running" | "drafted" | "failed" | "landing" | "landed" | "superseded" | "waiting";
136
-
137
- type DocsLandStage = "direct" | "resolving" | "needs_person" | "pull_request";
138
-
139
- type DocsLandWorker = {
140
- kind: "dispatch";
141
- dispatch_id: string;
142
- } | {
143
- kind: "session";
144
- session_id: string;
145
- plan_id: PlanRefNum;
146
- };
147
- interface DocsLandWire {
148
- land_stage: DocsLandStage | null;
149
- land_conflict_files: string[] | null;
150
- land_reason: string | null;
151
- land_worker: DocsLandWorker | null;
152
- land_problem_ref_num: number | null;
153
- land_pull_request_url: string | null;
154
- }
155
-
156
- interface DocsReviewView extends DocsLandWire {
157
- plan_id: PlanRefNum;
158
- repo_name: string;
159
- attempt: number;
160
- status: DocsPromotionStatus;
161
- summary: string;
162
- head_sha: string;
163
- change_counts: {
164
- added: number;
165
- changed: number;
166
- removed: number;
167
- } | null;
168
- landed_sha: string | null;
169
- failure_reason: string | null;
170
- waiting_board_id: BoardRefNum | null;
171
- approve_solution_id: number;
172
- withdraw_solution_id: number;
173
- compare_url: string | null;
174
- updated_at: string;
175
- }
176
- interface DecisionRecordPage {
177
- offset: number;
178
- target_found: boolean | null;
179
- }
180
114
  type EvidenceBlockType = "note" | "steps" | "command" | "table" | "code" | "diff" | "log" | "samples";
181
115
  type EvidenceMadeBy = "human" | "agent";
182
116
  type EvidenceColumnType = "number" | "boolean" | "text" | "date";
183
117
  type EvidenceChartKind = "line" | "time_series" | "bar";
184
118
  type EvidenceAttachmentRole = "samples" | "file" | "csv";
119
+ type EvidencePart = "hypothesis" | "verdict";
120
+ type EvidenceApprovalAction = "approve" | "reject";
121
+ type EvidenceAutoBasis = "threshold" | "pre_gate" | "subjects_only";
122
+ type EvidenceThresholdLayer = "board" | "team" | "default";
185
123
 
186
124
  interface EvidenceColumn {
187
125
  name: string;
@@ -292,23 +230,58 @@ declare module "@danxbot/card-kit@1" {
292
230
  block_type: EvidenceBlockType;
293
231
  method: string;
294
232
  }
295
- interface EvidenceHypothesisVersionView extends EvidenceWriterView, EvidenceMakerView {
233
+ interface EvidenceApprovalEventView {
234
+ action: EvidenceApprovalAction;
235
+ approver: "person" | "auto";
236
+ by_user_id: number | null;
237
+ by_name: string | null;
238
+ basis: EvidenceAutoBasis | null;
239
+ threshold: string | null;
240
+ layer: EvidenceThresholdLayer | null;
241
+ reason: string | null;
242
+ at: string;
243
+ }
244
+ type EvidenceApprovalState = "approved" | "rejected" | "waiting" | "unreviewed";
245
+ interface EvidenceVersionApprovalView {
246
+ approval_state: EvidenceApprovalState;
247
+ approvals: EvidenceApprovalEventView[];
248
+ review_problem_ref_num: number | null;
249
+ }
250
+ interface EvidenceHypothesisVersionView extends EvidenceWriterView, EvidenceMakerView, EvidenceVersionApprovalView {
296
251
  id: number;
297
252
  version_no: number;
298
253
  question: string;
299
254
  expected_answer: string;
255
+ wrong_if: string | null;
300
256
  exhibits: EvidenceExhibitView[];
301
257
  subjects: string[];
302
258
  reasoning: string;
303
259
  confidence: number;
260
+ provenance: ProvenanceRecordV2[];
261
+ }
262
+ interface EvidenceKeyFigure {
263
+ value: string;
264
+ label: string;
265
+ alt: string | null;
266
+ basis: string;
267
+ cites: string[];
304
268
  }
305
- interface EvidenceVerdictVersionView extends EvidenceWriterView, EvidenceMakerView {
269
+ interface EvidenceVerdictVersionView extends EvidenceWriterView, EvidenceMakerView, EvidenceVersionApprovalView {
306
270
  id: number;
307
271
  version_no: number;
308
272
  answer: string;
309
273
  confidence: number;
310
274
  reasoning: string;
311
275
  cites: string[];
276
+ key_figures: EvidenceKeyFigure[];
277
+ confidence_reason: string | null;
278
+ unverified: string[];
279
+ method: string | null;
280
+ }
281
+ interface EvidenceRaisedProblemView {
282
+ card_id: string;
283
+ problem_ref_num: number;
284
+ open: boolean;
312
285
  }
313
286
  interface EvidenceBlockAttachmentView {
314
287
  role: EvidenceAttachmentRole;
@@ -337,6 +310,68 @@ declare module "@danxbot/card-kit@1" {
337
310
  block_count: number;
338
311
  gathered: boolean;
339
312
  }
313
+ interface DecisionRecordPage {
314
+ offset: number;
315
+ target_found: boolean | null;
316
+ }
317
+ interface ProblemRaisedBy {
318
+ ref: string;
319
+ card_id: string;
320
+ }
321
+ type WorkMarkResourceType = "design" | "plan" | "problem" | "plan_record" | "plan_section" | "decision";
322
+ type ClaimResourceType = "design" | "evidence";
323
+ interface ClaimResource extends ResourceRef {
324
+ type: ClaimResourceType;
325
+ }
326
+ interface WorkMarkResource extends ResourceRef {
327
+ type: WorkMarkResourceType;
328
+ }
329
+
330
+ type QualityGatePhase = "plan" | "code";
331
+ type ControlValue = boolean | string;
332
+
333
+ type ControlSource = "card" | "plan" | "board" | "team" | "system";
334
+ interface ControlFallback {
335
+ readonly value: ControlValue;
336
+ readonly source: Exclude<ControlSource, "card">;
337
+ }
338
+
339
+ type ActorKind = "person" | "system" | "dispatch_agent" | "worker" | "agent_profile" | "plan_session" | "unresolved";
340
+ interface ActorRef {
341
+ kind: ActorKind;
342
+ name: string;
343
+ reason: StatusReason | ProfileName | null;
344
+ }
345
+
346
+ type DocsPromotionStatus = "running" | "drafted" | "failed" | "landing" | "landed" | "superseded" | "waiting";
347
+
348
+ type DocsLandStage = "resolving" | "accept";
349
+
350
+ interface DocsLandWire {
351
+ land_stage: DocsLandStage | null;
352
+ land_problem_ref_num: number | null;
353
+ }
354
+
355
+ interface DocsReviewView extends DocsLandWire {
356
+ plan_id: PlanRefNum;
357
+ repo_name: string;
358
+ attempt: number;
359
+ status: DocsPromotionStatus;
360
+ summary: string;
361
+ head_sha: string;
362
+ change_counts: {
363
+ added: number;
364
+ changed: number;
365
+ removed: number;
366
+ } | null;
367
+ landed_sha: string | null;
368
+ failure_reason: string | null;
369
+ waiting_board_id: BoardRefNum | null;
370
+ approve_solution_id: number;
371
+ withdraw_solution_id: number;
372
+ compare_url: string | null;
373
+ updated_at: string;
374
+ }
340
375
  type BrowserCheckStatus = "checked" | "not_checked" | "not_recorded";
341
376
 
342
377
  type ListType = "archived" | "review" | "ready" | "in_progress" | "completed" | "cancelled";
@@ -357,7 +392,8 @@ declare module "@danxbot/card-kit@1" {
357
392
  con: string;
358
393
  recommended: boolean;
359
394
  }
360
- type DecisionReviewChoiceKind = "accept" | "revert" | "restore" | "reject";
395
+ type DecisionReviewChoiceKind = "reject" | "accept" | "revert" | "restore";
396
+ type EvidenceReviewReason = "threshold" | "rejected_before" | "refreshed";
361
397
 
362
398
  interface V2CopyComment {
363
399
  author: string;
@@ -508,14 +544,35 @@ declare module "@danxbot/card-kit@1" {
508
544
  block_type: EvidenceBlockType;
509
545
  method: string;
510
546
  }
547
+ interface V2CopyEvidenceApproval {
548
+ action: EvidenceApprovalAction;
549
+ reason: string | null;
550
+ approver: "person" | "auto";
551
+ by_email: string | null;
552
+ by_name: string | null;
553
+ basis: EvidenceAutoBasis | null;
554
+ threshold: string | null;
555
+ layer: EvidenceThresholdLayer | null;
556
+ at: string;
557
+ }
511
558
  interface V2CopyEvidenceHypothesisVersion extends V2CopyEvidenceMaker {
512
559
  version_no: number;
513
560
  question: string;
514
561
  expected_answer: string;
562
+ wrong_if: string | null;
515
563
  reasoning: string;
516
564
  confidence: number;
517
565
  exhibits: V2CopyEvidenceExhibit[];
518
566
  subjects: string[];
567
+ approvals: V2CopyEvidenceApproval[];
568
+ provenance: V2CopyProvenanceRecord[];
569
+ }
570
+ interface V2CopyEvidenceKeyFigure {
571
+ value: string;
572
+ label: string;
573
+ alt: string | null;
574
+ basis: string;
575
+ cites: number[];
519
576
  }
520
577
  interface V2CopyEvidenceVerdictVersion extends V2CopyEvidenceMaker {
521
578
  version_no: number;
@@ -523,6 +580,11 @@ declare module "@danxbot/card-kit@1" {
523
580
  confidence: number;
524
581
  reasoning: string;
525
582
  cites: number[];
583
+ key_figures: V2CopyEvidenceKeyFigure[];
584
+ confidence_reason: string | null;
585
+ unverified: string[];
586
+ method: string | null;
587
+ approvals: V2CopyEvidenceApproval[];
526
588
  }
527
589
  interface V2CopyEvidenceBlockAttachment {
528
590
  role: EvidenceAttachmentRole;
@@ -555,6 +617,45 @@ declare module "@danxbot/card-kit@1" {
555
617
  rounds: V2CopyEvidenceRound[];
556
618
  verdict_versions: V2CopyEvidenceVerdictVersion[];
557
619
  }
620
+ interface V2CopyBehaviorRule {
621
+ live_position: number;
622
+ rule_version: string;
623
+ position: number;
624
+ }
625
+ interface V2CopyBehaviorPolicy {
626
+ live_name: string;
627
+ name: string;
628
+ position: number;
629
+ quality_gate_types: string[] | null;
630
+ attached_at: string;
631
+ rules: V2CopyBehaviorRule[];
632
+ }
633
+ interface V2CopyBehaviorReview {
634
+ verdict: "accepted" | "rejected";
635
+ note: string | null;
636
+ reviewed_by_email: string | null;
637
+ reviewed_by_name: string;
638
+ comment_index: number | null;
639
+ created_at: string;
640
+ }
641
+ interface V2CopyBehaviorSignoff {
642
+ policy_index: number;
643
+ rule_index: number;
644
+ slot: string;
645
+ status: "compliant" | "incompliant" | "rejected" | "not_applicable";
646
+ note: string | null;
647
+ confidence: number | null;
648
+ review: "surfaced" | "auto_approved" | null;
649
+ problem_index: number | null;
650
+ signed_by_kind: "person" | "agent";
651
+ signed_by_email: string | null;
652
+ signed_by_name: string | null;
653
+ author: string;
654
+ team_agent: string | null;
655
+ quality_gate_round: V2CopyRoundRef | null;
656
+ created_at: string;
657
+ reviews: V2CopyBehaviorReview[];
658
+ }
558
659
  interface V2CopyAc {
559
660
  title: string;
560
661
  checked: boolean;
@@ -633,6 +734,12 @@ declare module "@danxbot/card-kit@1" {
633
734
  record_index: number;
634
735
  answered_version_no: number | null;
635
736
  }
737
+ interface V2CopyEvidenceReview {
738
+ record_index: number;
739
+ part: EvidencePart;
740
+ answered_version_no: number | null;
741
+ asked_because: EvidenceReviewReason | null;
742
+ }
636
743
  interface V2CopyStep {
637
744
  title: string;
638
745
  description: string | null;
@@ -671,6 +778,10 @@ declare module "@danxbot/card-kit@1" {
671
778
  recorded_by: V2CopyProvenanceParty;
672
779
  recorded_at: string;
673
780
  }
781
+ interface V2CopyProblemEvidenceRecord {
782
+ record_index: number | null;
783
+ ref_num: number;
784
+ }
674
785
  interface V2CopyProblem {
675
786
  ref_num: number;
676
787
  statement: string;
@@ -679,6 +790,8 @@ declare module "@danxbot/card-kit@1" {
679
790
  summary: string | null;
680
791
  design_element: string | null;
681
792
  decision_review: V2CopyDecisionReview | null;
793
+ evidence_review: V2CopyEvidenceReview | null;
794
+ evidence_record: V2CopyProblemEvidenceRecord | null;
682
795
  removed: boolean;
683
796
  solutions: V2CopySolution[];
684
797
  decisions: V2CopyDecision[];
@@ -705,6 +818,9 @@ declare module "@danxbot/card-kit@1" {
705
818
  agent_notes: V2CopyAgentNote[];
706
819
  decision_records: V2CopyDecisionRecord[];
707
820
  evidence_records: V2CopyEvidenceRecord[];
821
+ behavior_policies_pinned_at: string | null;
822
+ behavior_policies: V2CopyBehaviorPolicy[];
823
+ behavior_signoffs: V2CopyBehaviorSignoff[];
708
824
  created_tags: V2CopyCommentTag[];
709
825
  dependencies: V2CopyDependency[];
710
826
  retro: V2CopyRetro | null;
@@ -807,6 +923,89 @@ declare module "@danxbot/card-kit@1" {
807
923
  };
808
924
  }
809
925
  type CardUsage = UsageSummary | UsageError | null;
926
+ type BehaviorSignoffStatus = "compliant" | "incompliant" | "rejected" | "not_applicable";
927
+ type SlotStatus = BehaviorSignoffStatus | "unverified";
928
+ type BehaviorSlotProblemState = "waiting_on_person" | "waiting_on_agent" | "accepted";
929
+
930
+ interface BehaviorDecisionView {
931
+ readonly signoff_id: number;
932
+ readonly status: Exclude<SlotStatus, "unverified">;
933
+ readonly note: string | null;
934
+ readonly confidence: number | null;
935
+ readonly review: "surfaced" | "auto_approved" | null;
936
+ readonly signer: {
937
+ readonly kind: "person" | "agent";
938
+ readonly name: string;
939
+ readonly user_id: number | null;
940
+ };
941
+ readonly signed_at: string;
942
+ }
943
+ interface BehaviorSlotView {
944
+ readonly slot: string;
945
+ readonly gate_on_card: boolean;
946
+ readonly status: SlotStatus;
947
+ readonly signoff_id: number | null;
948
+ readonly note: string | null;
949
+ readonly confidence: number | null;
950
+ readonly review: "surfaced" | "auto_approved" | null;
951
+ readonly signer: BehaviorDecisionView["signer"] | null;
952
+ readonly signed_at: string | null;
953
+ readonly problem: {
954
+ readonly ref: string;
955
+ readonly state: BehaviorSlotProblemState;
956
+ } | null;
957
+ readonly earlier: BehaviorDecisionView[];
958
+ }
959
+ interface BehaviorRuleView {
960
+ readonly rule_id: number;
961
+ readonly ref: string;
962
+ readonly text: string;
963
+ readonly rule_version: string;
964
+ readonly slots: BehaviorSlotView[];
965
+ }
966
+ interface BehaviorPolicyView {
967
+ readonly ref: string;
968
+ readonly name: string;
969
+ readonly quality_gate_types: string[] | null;
970
+ readonly attached_at: string | null;
971
+ readonly rules: BehaviorRuleView[];
972
+ }
973
+ interface CardBehaviorPoliciesView {
974
+ readonly behavior_policies_pinned_at: string | null;
975
+ readonly open_slot_count: number;
976
+ readonly policies: BehaviorPolicyView[];
977
+ }
978
+
979
+ interface BehaviorRuleReviewView {
980
+ readonly verdict: "accepted" | "rejected";
981
+ readonly note: string | null;
982
+ readonly reviewed_by_name: string;
983
+ readonly comment_id: number | null;
984
+ readonly created_at: string;
985
+ }
986
+ interface BehaviorRuleRowView {
987
+ readonly rule_id: number;
988
+ readonly rule_ref: string;
989
+ readonly rule_text: string;
990
+ readonly slot: string;
991
+ readonly gate_on_card: boolean;
992
+ readonly state: BehaviorSlotProblemState;
993
+ readonly decision: BehaviorDecisionView;
994
+ readonly reviews: BehaviorRuleReviewView[];
995
+ }
996
+ interface BehaviorRuleGroupView {
997
+ readonly policy_ref: string;
998
+ readonly policy_name: string;
999
+ readonly total_count: number;
1000
+ readonly evaluated_count: number;
1001
+ readonly rows: BehaviorRuleRowView[];
1002
+ }
1003
+ interface BehaviorRulesProblemView {
1004
+ readonly total_count: number;
1005
+ readonly evaluated_count: number;
1006
+ readonly waiting_count: number;
1007
+ readonly groups: BehaviorRuleGroupView[];
1008
+ }
810
1009
  interface DesignSourceFile {
811
1010
  path: string;
812
1011
  content: string;
@@ -819,6 +1018,49 @@ declare module "@danxbot/card-kit@1" {
819
1018
  kind: "external";
820
1019
  text: string;
821
1020
  };
1021
+ type CardContextCategoryKey = "comments" | "checklists" | "content" | "agent_notes" | "problems" | "decisions" | "designs";
1022
+ type PlanContextCategoryKey = "architecture" | "comments" | "heading" | "records" | "notes" | "open_cards";
1023
+ type ContextCategoryKey = CardContextCategoryKey | PlanContextCategoryKey;
1024
+ interface ContextCategorySize {
1025
+ key: ContextCategoryKey;
1026
+ tokens: number;
1027
+ items: number;
1028
+ }
1029
+ interface ContextSize {
1030
+ total_tokens: number;
1031
+ categories: ContextCategorySize[];
1032
+ }
1033
+
1034
+ interface CategorySizes {
1035
+ key: ContextCategoryKey;
1036
+ covered: boolean;
1037
+ before: number;
1038
+ after: number | null;
1039
+ }
1040
+ interface ItemSizes {
1041
+ before_tokens: number | null;
1042
+ after_tokens: number | null;
1043
+ categories: CategorySizes[] | null;
1044
+ }
1045
+ interface RunCard {
1046
+ ref: string;
1047
+ title: string;
1048
+ sizes: ItemSizes;
1049
+ }
1050
+ interface CompactionRun {
1051
+ id: number;
1052
+ pressed_at: string;
1053
+ started_at: string | null;
1054
+ ended_at: string;
1055
+ outcome: "done" | "failed";
1056
+ failure_reason: NotificationText | null;
1057
+ tool_calls: number | null;
1058
+ turns: number | null;
1059
+ spend_usd: number | null;
1060
+ model: string | null;
1061
+ own: ItemSizes;
1062
+ cards: RunCard[] | null;
1063
+ }
822
1064
 
823
1065
  interface CompactionJobWho {
824
1066
  name: string;
@@ -852,6 +1094,13 @@ declare module "@danxbot/card-kit@1" {
852
1094
  before_tokens: number | null;
853
1095
  after_tokens: number | null;
854
1096
  }
1097
+ type ReleasingRegistrationState = "waiting" | "registered" | "batched" | "landed";
1098
+ interface DependencyLanding {
1099
+ readonly registration_id: number;
1100
+ readonly state: ReleasingRegistrationState;
1101
+ readonly sha: string;
1102
+ readonly branch: string;
1103
+ }
855
1104
 
856
1105
  type PreGateHold = {
857
1106
  kind: "awaiting_person";
@@ -961,28 +1210,40 @@ declare module "@danxbot/card-kit@1" {
961
1210
  orchestrator_profile: string | null;
962
1211
  }
963
1212
 
1213
+ interface StackedOnWire {
1214
+ card: string;
1215
+ state: PartnerState;
1216
+ shas: string[];
1217
+ }
1218
+ type PartnerState = "live" | "cancelled" | "deleted";
1219
+
964
1220
  interface LandingAheadRegistration {
965
1221
  readonly card: CardRef;
966
1222
  readonly sha: string;
967
1223
  readonly state: "landing" | "queued";
968
1224
  readonly docs_root: string | null;
1225
+ readonly stacked_on: readonly StackedOnWire[];
969
1226
  }
970
1227
  interface LandingAheadView {
971
1228
  readonly target_branch: string;
972
1229
  readonly docs_root: string | null;
1230
+ readonly stacked_on: readonly StackedOnWire[];
973
1231
  readonly ahead: readonly LandingAheadRegistration[];
974
1232
  }
975
- type CardContextCategoryKey = "comments" | "checklists" | "content" | "agent_notes" | "problems" | "decisions" | "designs";
976
- type PlanContextCategoryKey = "architecture" | "comments" | "heading" | "records" | "notes" | "open_cards";
977
- type ContextCategoryKey = CardContextCategoryKey | PlanContextCategoryKey;
978
- interface ContextCategorySize {
979
- key: ContextCategoryKey;
980
- tokens: number;
981
- items: number;
982
- }
983
- interface ContextSize {
984
- total_tokens: number;
985
- categories: ContextCategorySize[];
1233
+
1234
+ interface CompactionSavings {
1235
+ loads: number;
1236
+ dispatches: number;
1237
+ running: number;
1238
+ avg_tokens_fewer: number;
1239
+ avg_later_turns: number;
1240
+ tokens_saved: number;
1241
+ usd_saved: number;
1242
+ unpriced_loads: number;
1243
+ unresolved_loads: number;
1244
+ compact_usd: number;
1245
+ compact_runs: number;
1246
+ counted_since: string;
986
1247
  }
987
1248
  interface BuildGradeView {
988
1249
  readonly grade: string;
@@ -1084,7 +1345,7 @@ declare module "@danxbot/card-kit@1" {
1084
1345
  quality_gate_round_id: number | null;
1085
1346
  items: ChecklistItemView[];
1086
1347
  }
1087
- type DesignDecisionOutcome = "approved" | "changes_requested" | "rejected";
1348
+ type DesignDecisionOutcome = "approved" | "rejected" | "changes_requested";
1088
1349
  interface ChecklistHistoryViewV2 {
1089
1350
  action: "create" | "rename" | "remove" | "add_item" | "update_item" | "remove_item";
1090
1351
  checklist: string;
@@ -1143,10 +1404,10 @@ declare module "@danxbot/card-kit@1" {
1143
1404
  thumbnail_error: null | string;
1144
1405
  created_at: string;
1145
1406
  }>);
1146
- title: string;
1147
1407
  description?: undefined | string;
1148
- status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
1149
1408
  type: string;
1409
+ title: string;
1410
+ status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
1150
1411
  priority: number;
1151
1412
  agent_notes?: undefined | (Array<{
1152
1413
  id: string;
@@ -1167,7 +1428,7 @@ declare module "@danxbot/card-kit@1" {
1167
1428
  created_by: string;
1168
1429
  created_at: string;
1169
1430
  archived_at: null | string;
1170
- review_state: "approved" | "awaiting_review" | "changes_requested" | "rejected";
1431
+ review_state: "approved" | "rejected" | "awaiting_review" | "changes_requested";
1171
1432
  revision_count: number;
1172
1433
  latest_revision_no: number;
1173
1434
  chosen_options: null | OptionSelection;
@@ -1194,7 +1455,7 @@ declare module "@danxbot/card-kit@1" {
1194
1455
  decisions?: undefined | (Array<{
1195
1456
  decision_id: number;
1196
1457
  revision_no: number;
1197
- outcome: "approved" | "changes_requested" | "rejected";
1458
+ outcome: "approved" | "rejected" | "changes_requested";
1198
1459
  note: null | string;
1199
1460
  comment_id: number;
1200
1461
  decided_by: string;
@@ -1252,11 +1513,15 @@ declare module "@danxbot/card-kit@1" {
1252
1513
  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; };
1253
1514
  problem_total?: undefined | number;
1254
1515
  evidence_record_total?: undefined | number;
1516
+ behavior_policies?: undefined | CardBehaviorPoliciesView;
1255
1517
  decision_record_total?: undefined | number;
1256
1518
  decision_record_page?: undefined | DecisionRecordPage;
1257
1519
  decision_record_approved_total?: undefined | number;
1258
1520
  lane_header?: undefined | false | true;
1259
1521
  design_count?: undefined | number;
1522
+ docs_unaccepted_count?: undefined | number;
1523
+ docs_unit_count?: undefined | number;
1524
+ docs_repos?: undefined | Array<string>;
1260
1525
  open_action_count?: undefined | number;
1261
1526
  open_problem_count?: undefined | number;
1262
1527
  ac?: undefined | Array<AcItemViewV2>;
@@ -1276,6 +1541,7 @@ declare module "@danxbot/card-kit@1" {
1276
1541
  waiting_on_gate?: undefined | null | WaitingOnViewV2;
1277
1542
  waiting_on_dep_ids?: undefined | Record<string, number>;
1278
1543
  dependency_pull_requests?: undefined | Record<string, DependencyPullRequestViewV2>;
1544
+ dependency_landings?: undefined | Record<string, DependencyLanding>;
1279
1545
  conflict_on?: undefined | Array<ConflictEntryViewV2>;
1280
1546
  conflict_on_reverse?: undefined | Array<ConflictEntryViewV2>;
1281
1547
  conflict_on_partners?: undefined | Record<string, { status: IssueStatus; title: string; }>;
@@ -1297,7 +1563,9 @@ declare module "@danxbot/card-kit@1" {
1297
1563
  unread_decision_comment_counts?: undefined | Record<string, number>;
1298
1564
  unread_evidence_comment_counts?: undefined | Record<string, number>;
1299
1565
  context_size?: undefined | ContextSize;
1300
- content_compaction?: undefined | null | { id: number; requested_at: string; } & { status: "waiting"; ended_at: null; failure_reason: null; } | { id: number; requested_at: string; } & { status: "working"; ended_at: null; failure_reason: null; job: CompactionJob; } | { id: number; requested_at: string; } & { status: "done"; ended_at: string; failure_reason: null; sizes: CompactionSizes; } | { id: number; requested_at: string; } & { status: "failed"; ended_at: string; failure_reason: NotificationText; };
1566
+ content_compaction?: undefined | null | { id: number; requested_at: string; categories: ContextCategoryKey[]; card_categories: ContextCategoryKey[] | null; finished_runs: number; } & { status: "waiting"; ended_at: null; failure_reason: null; } | { id: number; requested_at: string; categories: ContextCategoryKey[]; card_categories: ContextCategoryKey[] | null; finished_runs: number; } & { status: "working"; ended_at: null; failure_reason: null; job: CompactionJob; } | { id: number; requested_at: string; categories: ContextCategoryKey[]; card_categories: ContextCategoryKey[] | null; finished_runs: number; } & { status: "done"; ended_at: string; failure_reason: null; sizes: CompactionSizes; } | { id: number; requested_at: string; categories: ContextCategoryKey[]; card_categories: ContextCategoryKey[] | null; finished_runs: number; } & { status: "failed"; ended_at: string; failure_reason: NotificationText; };
1567
+ content_compaction_history?: undefined | Array<CompactionRun>;
1568
+ compaction_savings?: undefined | null | CompactionSavings;
1301
1569
  agent_notes_count?: undefined | number;
1302
1570
  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; }; };
1303
1571
  comment_tags?: undefined | Array<CommentTagOption>;
@@ -1322,14 +1590,14 @@ declare module "@danxbot/card-kit@1" {
1322
1590
  landing_ahead?: undefined | LandingAheadView;
1323
1591
  copy_issue?: undefined | V2CopyIssue;
1324
1592
  decision_records?: undefined | (Array<{
1325
- title: string;
1326
- kind: "business_rule" | "architecture" | "design" | "other";
1327
- action: "created" | "changed" | "deleted" | "restored";
1593
+ text: string;
1328
1594
  made_by: "human" | "agent";
1595
+ kind: "business_rule" | "architecture" | "design" | "other";
1329
1596
  approved: boolean;
1330
1597
  impact: number;
1331
1598
  confidence: number;
1332
- text: string;
1599
+ title: string;
1600
+ action: "created" | "changed" | "deleted" | "restored";
1333
1601
  rev: number;
1334
1602
  created_at: string;
1335
1603
  updated_at: string;
@@ -1350,13 +1618,13 @@ declare module "@danxbot/card-kit@1" {
1350
1618
  comment_count: number;
1351
1619
  unread_comment_count: number;
1352
1620
  versions?: undefined | (Array<{
1353
- title: string;
1354
- kind: "business_rule" | "architecture" | "design" | "other";
1355
- action: "created" | "changed" | "deleted" | "restored";
1621
+ text: string;
1356
1622
  made_by: "human" | "agent";
1623
+ kind: "business_rule" | "architecture" | "design" | "other";
1357
1624
  impact: number;
1358
1625
  confidence: number;
1359
- text: string;
1626
+ title: string;
1627
+ action: "created" | "changed" | "deleted" | "restored";
1360
1628
  id: number;
1361
1629
  created_at: string;
1362
1630
  author: string;
@@ -1382,17 +1650,18 @@ declare module "@danxbot/card-kit@1" {
1382
1650
  }>);
1383
1651
  }>);
1384
1652
  evidence_records?: undefined | (Array<{
1653
+ hypothesis: EvidenceHypothesisVersionView;
1654
+ verdict: null | EvidenceVerdictVersionView;
1385
1655
  rev: number;
1386
1656
  created_at: string;
1387
1657
  updated_at: string;
1388
1658
  ref: string;
1389
1659
  ref_num: number;
1390
- hypothesis: EvidenceHypothesisVersionView;
1391
- verdict: null | EvidenceVerdictVersionView;
1392
1660
  exhibits: Array<EvidenceExhibitStatusView>;
1393
1661
  other_block_count: number;
1394
1662
  round_count: number;
1395
1663
  block_count: number;
1664
+ raised_problems: Array<EvidenceRaisedProblemView>;
1396
1665
  comment_count: number;
1397
1666
  unread_comment_count: number;
1398
1667
  rounds?: undefined | (Array<{
@@ -1411,10 +1680,12 @@ declare module "@danxbot/card-kit@1" {
1411
1680
  version_no: number;
1412
1681
  question: string;
1413
1682
  expected_answer: string;
1683
+ wrong_if: null | string;
1414
1684
  exhibits: Array<EvidenceExhibitView>;
1415
1685
  subjects: Array<string>;
1416
1686
  reasoning: string;
1417
1687
  confidence: number;
1688
+ provenance: Array<ProvenanceRecordV2>;
1418
1689
  author: string;
1419
1690
  by: AuthorV2;
1420
1691
  via_key: null | ViaKey;
@@ -1424,6 +1695,9 @@ declare module "@danxbot/card-kit@1" {
1424
1695
  made_by_name: null | string;
1425
1696
  made_by_author: AuthorV2;
1426
1697
  made_by_is_writer: boolean;
1698
+ approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1699
+ approvals: Array<EvidenceApprovalEventView>;
1700
+ review_problem_ref_num: null | number;
1427
1701
  }>);
1428
1702
  verdict_versions?: undefined | (Array<{
1429
1703
  id: number;
@@ -1432,6 +1706,10 @@ declare module "@danxbot/card-kit@1" {
1432
1706
  confidence: number;
1433
1707
  reasoning: string;
1434
1708
  cites: Array<string>;
1709
+ key_figures: Array<EvidenceKeyFigure>;
1710
+ confidence_reason: null | string;
1711
+ unverified: Array<string>;
1712
+ method: null | string;
1435
1713
  author: string;
1436
1714
  by: AuthorV2;
1437
1715
  via_key: null | ViaKey;
@@ -1441,16 +1719,19 @@ declare module "@danxbot/card-kit@1" {
1441
1719
  made_by_name: null | string;
1442
1720
  made_by_author: AuthorV2;
1443
1721
  made_by_is_writer: boolean;
1722
+ approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1723
+ approvals: Array<EvidenceApprovalEventView>;
1724
+ review_problem_ref_num: null | number;
1444
1725
  }>);
1445
1726
  }>);
1446
1727
  decision_record_versions?: undefined | (Array<{
1447
- title: string;
1448
- kind: "business_rule" | "architecture" | "design" | "other";
1449
- action: "created" | "changed" | "deleted" | "restored";
1728
+ text: string;
1450
1729
  made_by: "human" | "agent";
1730
+ kind: "business_rule" | "architecture" | "design" | "other";
1451
1731
  impact: number;
1452
1732
  confidence: number;
1453
- text: string;
1733
+ title: string;
1734
+ action: "created" | "changed" | "deleted" | "restored";
1454
1735
  id: number;
1455
1736
  created_at: string;
1456
1737
  author: string;
@@ -1477,7 +1758,7 @@ declare module "@danxbot/card-kit@1" {
1477
1758
  work_marks?: undefined | (Array<{
1478
1759
  id: number;
1479
1760
  via_key_id: number;
1480
- resource: WorkMarkResource;
1761
+ resource: WorkMarkResource | ClaimResource;
1481
1762
  note: string;
1482
1763
  by: AuthorV2;
1483
1764
  started_at: string;
@@ -1497,8 +1778,8 @@ declare module "@danxbot/card-kit@1" {
1497
1778
  }>);
1498
1779
  changed_fields?: undefined | Array<string>;
1499
1780
  children_detail?: undefined | (Array<{
1500
- status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
1501
1781
  type: string;
1782
+ status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
1502
1783
  priority: number;
1503
1784
  name: string;
1504
1785
  id: string;
@@ -1523,7 +1804,7 @@ declare module "@danxbot/card-kit@1" {
1523
1804
  dead_reason: "" | "deleted" | "archived" | "left";
1524
1805
  source_ref: string;
1525
1806
  last_error: null | StatusReason;
1526
- owed: Array<"comments" | "checklists" | "attachments" | "title" | "description" | "status" | "type" | "priority" | "parent_child" | "dependencies" | "card_create" | "card_delete">;
1807
+ owed: Array<"comments" | "checklists" | "attachments" | "description" | "type" | "title" | "status" | "priority" | "parent_child" | "dependencies" | "card_create" | "card_delete">;
1527
1808
  description_unreadable: boolean;
1528
1809
  target_ref: string;
1529
1810
  target_label: string;
@@ -1588,7 +1869,7 @@ declare module "@danxbot/card-kit@1" {
1588
1869
  phase: "plan" | "code";
1589
1870
  };
1590
1871
  type ProblemViewV2 = {
1591
- type: "design" | "question" | "action" | "decision_review";
1872
+ type: "design" | "question" | "action" | "decision_review" | "evidence_review" | "behavior_rules";
1592
1873
  open: boolean;
1593
1874
  ordinal: number;
1594
1875
  decisions: Array<{
@@ -1623,6 +1904,7 @@ declare module "@danxbot/card-kit@1" {
1623
1904
  context: null | string;
1624
1905
  design_element: null | string;
1625
1906
  solutions: Array<SolutionViewV2>;
1907
+ raised_by?: undefined | null | ProblemRaisedBy;
1626
1908
  changed_fields?: undefined | Array<string>;
1627
1909
  decision_review?: undefined | (Array<{
1628
1910
  problem_ref_num: number;
@@ -1630,13 +1912,13 @@ declare module "@danxbot/card-kit@1" {
1630
1912
  answered_version_no: null | number;
1631
1913
  choices: Array<{ solution_id: number; kind: DecisionReviewChoiceKind; version_no: number; title: string; }>;
1632
1914
  versions?: undefined | (Array<{
1633
- title: string;
1634
- kind: "business_rule" | "architecture" | "design" | "other";
1635
- action: "created" | "changed" | "deleted" | "restored";
1915
+ text: string;
1636
1916
  made_by: "human" | "agent";
1917
+ kind: "business_rule" | "architecture" | "design" | "other";
1637
1918
  impact: number;
1638
1919
  confidence: number;
1639
- text: string;
1920
+ title: string;
1921
+ action: "created" | "changed" | "deleted" | "restored";
1640
1922
  id: number;
1641
1923
  created_at: string;
1642
1924
  author: string;
@@ -1652,9 +1934,66 @@ declare module "@danxbot/card-kit@1" {
1652
1934
  version_no: number;
1653
1935
  }>);
1654
1936
  }>);
1937
+ evidence_review?: undefined | (Array<{
1938
+ version_no: null | number;
1939
+ problem_ref_num: number;
1940
+ record_ref: string;
1941
+ answered_version_no: null | number;
1942
+ choices: Array<{ solution_id: number; kind: DecisionReviewChoiceKind; version_no: number; title: string; }>;
1943
+ part: "hypothesis" | "verdict";
1944
+ asked_because: null | "threshold" | "rejected_before" | "refreshed";
1945
+ hypothesis_versions?: undefined | (Array<{
1946
+ id: number;
1947
+ version_no: number;
1948
+ question: string;
1949
+ expected_answer: string;
1950
+ wrong_if: null | string;
1951
+ exhibits: Array<EvidenceExhibitView>;
1952
+ subjects: Array<string>;
1953
+ reasoning: string;
1954
+ confidence: number;
1955
+ provenance: Array<ProvenanceRecordV2>;
1956
+ author: string;
1957
+ by: AuthorV2;
1958
+ via_key: null | ViaKey;
1959
+ created_at: string;
1960
+ made_by: "human" | "agent";
1961
+ made_by_user_id: null | number;
1962
+ made_by_name: null | string;
1963
+ made_by_author: AuthorV2;
1964
+ made_by_is_writer: boolean;
1965
+ approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1966
+ approvals: Array<EvidenceApprovalEventView>;
1967
+ review_problem_ref_num: null | number;
1968
+ }>);
1969
+ verdict_versions?: undefined | (Array<{
1970
+ id: number;
1971
+ version_no: number;
1972
+ answer: string;
1973
+ confidence: number;
1974
+ reasoning: string;
1975
+ cites: Array<string>;
1976
+ key_figures: Array<EvidenceKeyFigure>;
1977
+ confidence_reason: null | string;
1978
+ unverified: Array<string>;
1979
+ method: null | string;
1980
+ author: string;
1981
+ by: AuthorV2;
1982
+ via_key: null | ViaKey;
1983
+ created_at: string;
1984
+ made_by: "human" | "agent";
1985
+ made_by_user_id: null | number;
1986
+ made_by_name: null | string;
1987
+ made_by_author: AuthorV2;
1988
+ made_by_is_writer: boolean;
1989
+ approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1990
+ approvals: Array<EvidenceApprovalEventView>;
1991
+ review_problem_ref_num: null | number;
1992
+ }>);
1993
+ }>);
1994
+ behavior_rules?: undefined | null | BehaviorRulesProblemView;
1655
1995
  };
1656
1996
  type SolutionViewV2 = {
1657
- title: string;
1658
1997
  steps: Array<{
1659
1998
  id: number;
1660
1999
  solution_id: number;
@@ -1667,6 +2006,7 @@ declare module "@danxbot/card-kit@1" {
1667
2006
  checked_by: null | string;
1668
2007
  steps: Array<SolutionStepViewV2>;
1669
2008
  }>;
2009
+ title: string;
1670
2010
  id: number;
1671
2011
  content_hash: string;
1672
2012
  body: string;
@@ -1683,7 +2023,7 @@ declare module "@danxbot/card-kit@1" {
1683
2023
  created_by: string;
1684
2024
  created_at: string;
1685
2025
  archived_at: null | string;
1686
- review_state: "approved" | "awaiting_review" | "changes_requested" | "rejected";
2026
+ review_state: "approved" | "rejected" | "awaiting_review" | "changes_requested";
1687
2027
  revision_count: number;
1688
2028
  latest_revision_no: number;
1689
2029
  chosen_options: null | OptionSelection;
@@ -1710,7 +2050,7 @@ declare module "@danxbot/card-kit@1" {
1710
2050
  decisions?: undefined | (Array<{
1711
2051
  decision_id: number;
1712
2052
  revision_no: number;
1713
- outcome: "approved" | "changes_requested" | "rejected";
2053
+ outcome: "approved" | "rejected" | "changes_requested";
1714
2054
  note: null | string;
1715
2055
  comment_id: number;
1716
2056
  decided_by: string;
@@ -1755,7 +2095,7 @@ declare module "@danxbot/card-kit@1" {
1755
2095
 
1756
2096
  type IssueStatus = "Review" | "ToDo" | "In Progress" | "Backlog" | "Done" | "Cancelled";
1757
2097
  type EffortLevelName = "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
1758
- type IssueProblemType = "design" | "question" | "action" | "decision_review";
2098
+ type IssueProblemType = "design" | "question" | "action" | "decision_review" | "evidence_review" | "behavior_rules";
1759
2099
  type DecisionOutcome = "rejected" | "answered";
1760
2100
  type GatingDependencyKind = "conflict_on" | "depends_on";
1761
2101
  type IssueDependencyKind = GatingDependencyKind | "depends_on_landing";
@@ -1784,6 +2124,7 @@ declare module "@danxbot/card-kit@1" {
1784
2124
  justification_quote: string | null;
1785
2125
  justification_reasoning: string | null;
1786
2126
  bump_size: BumpSize;
2127
+ behavior_policies_pinned_at: string | null;
1787
2128
  start_commit_sha: string | null;
1788
2129
  start_commit_at: string | null;
1789
2130
  start_commit_error: StartCommitError | null;
@@ -2067,6 +2408,7 @@ declare module "@danxbot/card-kit@1" {
2067
2408
  interface CardMutation {
2068
2409
  pending: string | null;
2069
2410
  run: (key: string, failureTitle: string, op: () => Promise<void>) => Promise<boolean>;
2411
+ onProblemResolved?: () => void;
2070
2412
  }
2071
2413
  function useCardMutation(): CardMutation;
2072
2414
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@50arms/plugin-sdk",
3
- "version": "0.2.64",
3
+ "version": "0.2.67",
4
4
  "description": "SDK for building 50 Arms plugins (DX-5170): the card kit's type declarations, the Widget declaration kit, a Vite preset that builds a plugin against the app's shared runtime and writes its manifest, and the danx-plugin CLI.",
5
5
  "license": "MIT",
6
6
  "type": "module",