@50arms/plugin-sdk 0.2.65 → 0.2.68

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 +408 -113
  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[];
304
261
  }
305
- interface EvidenceVerdictVersionView extends EvidenceWriterView, EvidenceMakerView {
262
+ interface EvidenceKeyFigure {
263
+ value: string;
264
+ label: string;
265
+ alt: string | null;
266
+ basis: string;
267
+ cites: string[];
268
+ }
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,38 @@ 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
+ }
340
345
  type BrowserCheckStatus = "checked" | "not_checked" | "not_recorded";
341
346
 
342
347
  type ListType = "archived" | "review" | "ready" | "in_progress" | "completed" | "cancelled";
@@ -357,7 +362,8 @@ declare module "@danxbot/card-kit@1" {
357
362
  con: string;
358
363
  recommended: boolean;
359
364
  }
360
- type DecisionReviewChoiceKind = "accept" | "revert" | "restore" | "reject";
365
+ type DecisionReviewChoiceKind = "reject" | "accept" | "revert" | "restore";
366
+ type EvidenceReviewReason = "threshold" | "rejected_before" | "refreshed";
361
367
 
362
368
  interface V2CopyComment {
363
369
  author: string;
@@ -508,14 +514,35 @@ declare module "@danxbot/card-kit@1" {
508
514
  block_type: EvidenceBlockType;
509
515
  method: string;
510
516
  }
517
+ interface V2CopyEvidenceApproval {
518
+ action: EvidenceApprovalAction;
519
+ reason: string | null;
520
+ approver: "person" | "auto";
521
+ by_email: string | null;
522
+ by_name: string | null;
523
+ basis: EvidenceAutoBasis | null;
524
+ threshold: string | null;
525
+ layer: EvidenceThresholdLayer | null;
526
+ at: string;
527
+ }
511
528
  interface V2CopyEvidenceHypothesisVersion extends V2CopyEvidenceMaker {
512
529
  version_no: number;
513
530
  question: string;
514
531
  expected_answer: string;
532
+ wrong_if: string | null;
515
533
  reasoning: string;
516
534
  confidence: number;
517
535
  exhibits: V2CopyEvidenceExhibit[];
518
536
  subjects: string[];
537
+ approvals: V2CopyEvidenceApproval[];
538
+ provenance: V2CopyProvenanceRecord[];
539
+ }
540
+ interface V2CopyEvidenceKeyFigure {
541
+ value: string;
542
+ label: string;
543
+ alt: string | null;
544
+ basis: string;
545
+ cites: number[];
519
546
  }
520
547
  interface V2CopyEvidenceVerdictVersion extends V2CopyEvidenceMaker {
521
548
  version_no: number;
@@ -523,6 +550,11 @@ declare module "@danxbot/card-kit@1" {
523
550
  confidence: number;
524
551
  reasoning: string;
525
552
  cites: number[];
553
+ key_figures: V2CopyEvidenceKeyFigure[];
554
+ confidence_reason: string | null;
555
+ unverified: string[];
556
+ method: string | null;
557
+ approvals: V2CopyEvidenceApproval[];
526
558
  }
527
559
  interface V2CopyEvidenceBlockAttachment {
528
560
  role: EvidenceAttachmentRole;
@@ -555,6 +587,45 @@ declare module "@danxbot/card-kit@1" {
555
587
  rounds: V2CopyEvidenceRound[];
556
588
  verdict_versions: V2CopyEvidenceVerdictVersion[];
557
589
  }
590
+ interface V2CopyBehaviorRule {
591
+ live_position: number;
592
+ rule_version: string;
593
+ position: number;
594
+ }
595
+ interface V2CopyBehaviorPolicy {
596
+ live_name: string;
597
+ name: string;
598
+ position: number;
599
+ quality_gate_types: string[] | null;
600
+ attached_at: string;
601
+ rules: V2CopyBehaviorRule[];
602
+ }
603
+ interface V2CopyBehaviorReview {
604
+ verdict: "accepted" | "rejected";
605
+ note: string | null;
606
+ reviewed_by_email: string | null;
607
+ reviewed_by_name: string;
608
+ comment_index: number | null;
609
+ created_at: string;
610
+ }
611
+ interface V2CopyBehaviorSignoff {
612
+ policy_index: number;
613
+ rule_index: number;
614
+ slot: string;
615
+ status: "compliant" | "incompliant" | "rejected" | "not_applicable";
616
+ note: string | null;
617
+ confidence: number | null;
618
+ review: "surfaced" | "auto_approved" | null;
619
+ problem_index: number | null;
620
+ signed_by_kind: "person" | "agent";
621
+ signed_by_email: string | null;
622
+ signed_by_name: string | null;
623
+ author: string;
624
+ team_agent: string | null;
625
+ quality_gate_round: V2CopyRoundRef | null;
626
+ created_at: string;
627
+ reviews: V2CopyBehaviorReview[];
628
+ }
558
629
  interface V2CopyAc {
559
630
  title: string;
560
631
  checked: boolean;
@@ -633,6 +704,12 @@ declare module "@danxbot/card-kit@1" {
633
704
  record_index: number;
634
705
  answered_version_no: number | null;
635
706
  }
707
+ interface V2CopyEvidenceReview {
708
+ record_index: number;
709
+ part: EvidencePart;
710
+ answered_version_no: number | null;
711
+ asked_because: EvidenceReviewReason | null;
712
+ }
636
713
  interface V2CopyStep {
637
714
  title: string;
638
715
  description: string | null;
@@ -671,6 +748,10 @@ declare module "@danxbot/card-kit@1" {
671
748
  recorded_by: V2CopyProvenanceParty;
672
749
  recorded_at: string;
673
750
  }
751
+ interface V2CopyProblemEvidenceRecord {
752
+ record_index: number | null;
753
+ ref_num: number;
754
+ }
674
755
  interface V2CopyProblem {
675
756
  ref_num: number;
676
757
  statement: string;
@@ -679,6 +760,8 @@ declare module "@danxbot/card-kit@1" {
679
760
  summary: string | null;
680
761
  design_element: string | null;
681
762
  decision_review: V2CopyDecisionReview | null;
763
+ evidence_review: V2CopyEvidenceReview | null;
764
+ evidence_record: V2CopyProblemEvidenceRecord | null;
682
765
  removed: boolean;
683
766
  solutions: V2CopySolution[];
684
767
  decisions: V2CopyDecision[];
@@ -705,6 +788,9 @@ declare module "@danxbot/card-kit@1" {
705
788
  agent_notes: V2CopyAgentNote[];
706
789
  decision_records: V2CopyDecisionRecord[];
707
790
  evidence_records: V2CopyEvidenceRecord[];
791
+ behavior_policies_pinned_at: string | null;
792
+ behavior_policies: V2CopyBehaviorPolicy[];
793
+ behavior_signoffs: V2CopyBehaviorSignoff[];
708
794
  created_tags: V2CopyCommentTag[];
709
795
  dependencies: V2CopyDependency[];
710
796
  retro: V2CopyRetro | null;
@@ -807,6 +893,89 @@ declare module "@danxbot/card-kit@1" {
807
893
  };
808
894
  }
809
895
  type CardUsage = UsageSummary | UsageError | null;
896
+ type BehaviorSignoffStatus = "compliant" | "incompliant" | "rejected" | "not_applicable";
897
+ type SlotStatus = BehaviorSignoffStatus | "unverified";
898
+ type BehaviorSlotProblemState = "waiting_on_person" | "waiting_on_agent" | "accepted";
899
+
900
+ interface BehaviorDecisionView {
901
+ readonly signoff_id: number;
902
+ readonly status: Exclude<SlotStatus, "unverified">;
903
+ readonly note: string | null;
904
+ readonly confidence: number | null;
905
+ readonly review: "surfaced" | "auto_approved" | null;
906
+ readonly signer: {
907
+ readonly kind: "person" | "agent";
908
+ readonly name: string;
909
+ readonly user_id: number | null;
910
+ };
911
+ readonly signed_at: string;
912
+ }
913
+ interface BehaviorSlotView {
914
+ readonly slot: string;
915
+ readonly gate_on_card: boolean;
916
+ readonly status: SlotStatus;
917
+ readonly signoff_id: number | null;
918
+ readonly note: string | null;
919
+ readonly confidence: number | null;
920
+ readonly review: "surfaced" | "auto_approved" | null;
921
+ readonly signer: BehaviorDecisionView["signer"] | null;
922
+ readonly signed_at: string | null;
923
+ readonly problem: {
924
+ readonly ref: string;
925
+ readonly state: BehaviorSlotProblemState;
926
+ } | null;
927
+ readonly earlier: BehaviorDecisionView[];
928
+ }
929
+ interface BehaviorRuleView {
930
+ readonly rule_id: number;
931
+ readonly ref: string;
932
+ readonly text: string;
933
+ readonly rule_version: string;
934
+ readonly slots: BehaviorSlotView[];
935
+ }
936
+ interface BehaviorPolicyView {
937
+ readonly ref: string;
938
+ readonly name: string;
939
+ readonly quality_gate_types: string[] | null;
940
+ readonly attached_at: string | null;
941
+ readonly rules: BehaviorRuleView[];
942
+ }
943
+ interface CardBehaviorPoliciesView {
944
+ readonly behavior_policies_pinned_at: string | null;
945
+ readonly open_slot_count: number;
946
+ readonly policies: BehaviorPolicyView[];
947
+ }
948
+
949
+ interface BehaviorRuleReviewView {
950
+ readonly verdict: "accepted" | "rejected";
951
+ readonly note: string | null;
952
+ readonly reviewed_by_name: string;
953
+ readonly comment_id: number | null;
954
+ readonly created_at: string;
955
+ }
956
+ interface BehaviorRuleRowView {
957
+ readonly rule_id: number;
958
+ readonly rule_ref: string;
959
+ readonly rule_text: string;
960
+ readonly slot: string;
961
+ readonly gate_on_card: boolean;
962
+ readonly state: BehaviorSlotProblemState;
963
+ readonly decision: BehaviorDecisionView;
964
+ readonly reviews: BehaviorRuleReviewView[];
965
+ }
966
+ interface BehaviorRuleGroupView {
967
+ readonly policy_ref: string;
968
+ readonly policy_name: string;
969
+ readonly total_count: number;
970
+ readonly evaluated_count: number;
971
+ readonly rows: BehaviorRuleRowView[];
972
+ }
973
+ interface BehaviorRulesProblemView {
974
+ readonly total_count: number;
975
+ readonly evaluated_count: number;
976
+ readonly waiting_count: number;
977
+ readonly groups: BehaviorRuleGroupView[];
978
+ }
810
979
  interface DesignSourceFile {
811
980
  path: string;
812
981
  content: string;
@@ -819,6 +988,49 @@ declare module "@danxbot/card-kit@1" {
819
988
  kind: "external";
820
989
  text: string;
821
990
  };
991
+ type CardContextCategoryKey = "comments" | "checklists" | "content" | "agent_notes" | "problems" | "decisions" | "designs";
992
+ type PlanContextCategoryKey = "architecture" | "comments" | "heading" | "records" | "notes" | "open_cards";
993
+ type ContextCategoryKey = CardContextCategoryKey | PlanContextCategoryKey;
994
+ interface ContextCategorySize {
995
+ key: ContextCategoryKey;
996
+ tokens: number;
997
+ items: number;
998
+ }
999
+ interface ContextSize {
1000
+ total_tokens: number;
1001
+ categories: ContextCategorySize[];
1002
+ }
1003
+
1004
+ interface CategorySizes {
1005
+ key: ContextCategoryKey;
1006
+ covered: boolean;
1007
+ before: number;
1008
+ after: number | null;
1009
+ }
1010
+ interface ItemSizes {
1011
+ before_tokens: number | null;
1012
+ after_tokens: number | null;
1013
+ categories: CategorySizes[] | null;
1014
+ }
1015
+ interface RunCard {
1016
+ ref: string;
1017
+ title: string;
1018
+ sizes: ItemSizes;
1019
+ }
1020
+ interface CompactionRun {
1021
+ id: number;
1022
+ pressed_at: string;
1023
+ started_at: string | null;
1024
+ ended_at: string;
1025
+ outcome: "done" | "failed";
1026
+ failure_reason: NotificationText | null;
1027
+ tool_calls: number | null;
1028
+ turns: number | null;
1029
+ spend_usd: number | null;
1030
+ model: string | null;
1031
+ own: ItemSizes;
1032
+ cards: RunCard[] | null;
1033
+ }
822
1034
 
823
1035
  interface CompactionJobWho {
824
1036
  name: string;
@@ -972,6 +1184,7 @@ declare module "@danxbot/card-kit@1" {
972
1184
  card: string;
973
1185
  state: PartnerState;
974
1186
  shas: string[];
1187
+ landed_sha: string | null;
975
1188
  }
976
1189
  type PartnerState = "live" | "cancelled" | "deleted";
977
1190
 
@@ -988,17 +1201,20 @@ declare module "@danxbot/card-kit@1" {
988
1201
  readonly stacked_on: readonly StackedOnWire[];
989
1202
  readonly ahead: readonly LandingAheadRegistration[];
990
1203
  }
991
- type CardContextCategoryKey = "comments" | "checklists" | "content" | "agent_notes" | "problems" | "decisions" | "designs";
992
- type PlanContextCategoryKey = "architecture" | "comments" | "heading" | "records" | "notes" | "open_cards";
993
- type ContextCategoryKey = CardContextCategoryKey | PlanContextCategoryKey;
994
- interface ContextCategorySize {
995
- key: ContextCategoryKey;
996
- tokens: number;
997
- items: number;
998
- }
999
- interface ContextSize {
1000
- total_tokens: number;
1001
- categories: ContextCategorySize[];
1204
+
1205
+ interface CompactionSavings {
1206
+ loads: number;
1207
+ dispatches: number;
1208
+ running: number;
1209
+ avg_tokens_fewer: number;
1210
+ avg_later_turns: number;
1211
+ tokens_saved: number;
1212
+ usd_saved: number;
1213
+ unpriced_loads: number;
1214
+ unresolved_loads: number;
1215
+ compact_usd: number;
1216
+ compact_runs: number;
1217
+ counted_since: string;
1002
1218
  }
1003
1219
  interface BuildGradeView {
1004
1220
  readonly grade: string;
@@ -1100,7 +1316,7 @@ declare module "@danxbot/card-kit@1" {
1100
1316
  quality_gate_round_id: number | null;
1101
1317
  items: ChecklistItemView[];
1102
1318
  }
1103
- type DesignDecisionOutcome = "approved" | "changes_requested" | "rejected";
1319
+ type DesignDecisionOutcome = "approved" | "rejected" | "changes_requested";
1104
1320
  interface ChecklistHistoryViewV2 {
1105
1321
  action: "create" | "rename" | "remove" | "add_item" | "update_item" | "remove_item";
1106
1322
  checklist: string;
@@ -1159,10 +1375,10 @@ declare module "@danxbot/card-kit@1" {
1159
1375
  thumbnail_error: null | string;
1160
1376
  created_at: string;
1161
1377
  }>);
1162
- title: string;
1163
1378
  description?: undefined | string;
1164
- status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
1165
1379
  type: string;
1380
+ title: string;
1381
+ status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
1166
1382
  priority: number;
1167
1383
  agent_notes?: undefined | (Array<{
1168
1384
  id: string;
@@ -1183,7 +1399,7 @@ declare module "@danxbot/card-kit@1" {
1183
1399
  created_by: string;
1184
1400
  created_at: string;
1185
1401
  archived_at: null | string;
1186
- review_state: "approved" | "awaiting_review" | "changes_requested" | "rejected";
1402
+ review_state: "approved" | "rejected" | "awaiting_review" | "changes_requested";
1187
1403
  revision_count: number;
1188
1404
  latest_revision_no: number;
1189
1405
  chosen_options: null | OptionSelection;
@@ -1210,7 +1426,7 @@ declare module "@danxbot/card-kit@1" {
1210
1426
  decisions?: undefined | (Array<{
1211
1427
  decision_id: number;
1212
1428
  revision_no: number;
1213
- outcome: "approved" | "changes_requested" | "rejected";
1429
+ outcome: "approved" | "rejected" | "changes_requested";
1214
1430
  note: null | string;
1215
1431
  comment_id: number;
1216
1432
  decided_by: string;
@@ -1268,11 +1484,15 @@ declare module "@danxbot/card-kit@1" {
1268
1484
  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; };
1269
1485
  problem_total?: undefined | number;
1270
1486
  evidence_record_total?: undefined | number;
1487
+ behavior_policies?: undefined | CardBehaviorPoliciesView;
1271
1488
  decision_record_total?: undefined | number;
1272
1489
  decision_record_page?: undefined | DecisionRecordPage;
1273
1490
  decision_record_approved_total?: undefined | number;
1274
1491
  lane_header?: undefined | false | true;
1275
1492
  design_count?: undefined | number;
1493
+ docs_unaccepted_count?: undefined | number;
1494
+ docs_unit_count?: undefined | number;
1495
+ docs_repos?: undefined | Array<string>;
1276
1496
  open_action_count?: undefined | number;
1277
1497
  open_problem_count?: undefined | number;
1278
1498
  ac?: undefined | Array<AcItemViewV2>;
@@ -1314,7 +1534,9 @@ declare module "@danxbot/card-kit@1" {
1314
1534
  unread_decision_comment_counts?: undefined | Record<string, number>;
1315
1535
  unread_evidence_comment_counts?: undefined | Record<string, number>;
1316
1536
  context_size?: undefined | ContextSize;
1317
- 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; };
1537
+ 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; };
1538
+ content_compaction_history?: undefined | Array<CompactionRun>;
1539
+ compaction_savings?: undefined | null | CompactionSavings;
1318
1540
  agent_notes_count?: undefined | number;
1319
1541
  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; }; };
1320
1542
  comment_tags?: undefined | Array<CommentTagOption>;
@@ -1339,14 +1561,14 @@ declare module "@danxbot/card-kit@1" {
1339
1561
  landing_ahead?: undefined | LandingAheadView;
1340
1562
  copy_issue?: undefined | V2CopyIssue;
1341
1563
  decision_records?: undefined | (Array<{
1342
- title: string;
1343
- kind: "business_rule" | "architecture" | "design" | "other";
1344
- action: "created" | "changed" | "deleted" | "restored";
1564
+ text: string;
1345
1565
  made_by: "human" | "agent";
1566
+ kind: "business_rule" | "architecture" | "design" | "other";
1346
1567
  approved: boolean;
1347
1568
  impact: number;
1348
1569
  confidence: number;
1349
- text: string;
1570
+ title: string;
1571
+ action: "created" | "changed" | "deleted" | "restored";
1350
1572
  rev: number;
1351
1573
  created_at: string;
1352
1574
  updated_at: string;
@@ -1367,13 +1589,13 @@ declare module "@danxbot/card-kit@1" {
1367
1589
  comment_count: number;
1368
1590
  unread_comment_count: number;
1369
1591
  versions?: undefined | (Array<{
1370
- title: string;
1371
- kind: "business_rule" | "architecture" | "design" | "other";
1372
- action: "created" | "changed" | "deleted" | "restored";
1592
+ text: string;
1373
1593
  made_by: "human" | "agent";
1594
+ kind: "business_rule" | "architecture" | "design" | "other";
1374
1595
  impact: number;
1375
1596
  confidence: number;
1376
- text: string;
1597
+ title: string;
1598
+ action: "created" | "changed" | "deleted" | "restored";
1377
1599
  id: number;
1378
1600
  created_at: string;
1379
1601
  author: string;
@@ -1399,17 +1621,18 @@ declare module "@danxbot/card-kit@1" {
1399
1621
  }>);
1400
1622
  }>);
1401
1623
  evidence_records?: undefined | (Array<{
1624
+ hypothesis: EvidenceHypothesisVersionView;
1625
+ verdict: null | EvidenceVerdictVersionView;
1402
1626
  rev: number;
1403
1627
  created_at: string;
1404
1628
  updated_at: string;
1405
1629
  ref: string;
1406
1630
  ref_num: number;
1407
- hypothesis: EvidenceHypothesisVersionView;
1408
- verdict: null | EvidenceVerdictVersionView;
1409
1631
  exhibits: Array<EvidenceExhibitStatusView>;
1410
1632
  other_block_count: number;
1411
1633
  round_count: number;
1412
1634
  block_count: number;
1635
+ raised_problems: Array<EvidenceRaisedProblemView>;
1413
1636
  comment_count: number;
1414
1637
  unread_comment_count: number;
1415
1638
  rounds?: undefined | (Array<{
@@ -1428,10 +1651,12 @@ declare module "@danxbot/card-kit@1" {
1428
1651
  version_no: number;
1429
1652
  question: string;
1430
1653
  expected_answer: string;
1654
+ wrong_if: null | string;
1431
1655
  exhibits: Array<EvidenceExhibitView>;
1432
1656
  subjects: Array<string>;
1433
1657
  reasoning: string;
1434
1658
  confidence: number;
1659
+ provenance: Array<ProvenanceRecordV2>;
1435
1660
  author: string;
1436
1661
  by: AuthorV2;
1437
1662
  via_key: null | ViaKey;
@@ -1441,6 +1666,9 @@ declare module "@danxbot/card-kit@1" {
1441
1666
  made_by_name: null | string;
1442
1667
  made_by_author: AuthorV2;
1443
1668
  made_by_is_writer: boolean;
1669
+ approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1670
+ approvals: Array<EvidenceApprovalEventView>;
1671
+ review_problem_ref_num: null | number;
1444
1672
  }>);
1445
1673
  verdict_versions?: undefined | (Array<{
1446
1674
  id: number;
@@ -1449,6 +1677,10 @@ declare module "@danxbot/card-kit@1" {
1449
1677
  confidence: number;
1450
1678
  reasoning: string;
1451
1679
  cites: Array<string>;
1680
+ key_figures: Array<EvidenceKeyFigure>;
1681
+ confidence_reason: null | string;
1682
+ unverified: Array<string>;
1683
+ method: null | string;
1452
1684
  author: string;
1453
1685
  by: AuthorV2;
1454
1686
  via_key: null | ViaKey;
@@ -1458,16 +1690,19 @@ declare module "@danxbot/card-kit@1" {
1458
1690
  made_by_name: null | string;
1459
1691
  made_by_author: AuthorV2;
1460
1692
  made_by_is_writer: boolean;
1693
+ approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1694
+ approvals: Array<EvidenceApprovalEventView>;
1695
+ review_problem_ref_num: null | number;
1461
1696
  }>);
1462
1697
  }>);
1463
1698
  decision_record_versions?: undefined | (Array<{
1464
- title: string;
1465
- kind: "business_rule" | "architecture" | "design" | "other";
1466
- action: "created" | "changed" | "deleted" | "restored";
1699
+ text: string;
1467
1700
  made_by: "human" | "agent";
1701
+ kind: "business_rule" | "architecture" | "design" | "other";
1468
1702
  impact: number;
1469
1703
  confidence: number;
1470
- text: string;
1704
+ title: string;
1705
+ action: "created" | "changed" | "deleted" | "restored";
1471
1706
  id: number;
1472
1707
  created_at: string;
1473
1708
  author: string;
@@ -1494,7 +1729,7 @@ declare module "@danxbot/card-kit@1" {
1494
1729
  work_marks?: undefined | (Array<{
1495
1730
  id: number;
1496
1731
  via_key_id: number;
1497
- resource: WorkMarkResource;
1732
+ resource: WorkMarkResource | ClaimResource;
1498
1733
  note: string;
1499
1734
  by: AuthorV2;
1500
1735
  started_at: string;
@@ -1514,8 +1749,8 @@ declare module "@danxbot/card-kit@1" {
1514
1749
  }>);
1515
1750
  changed_fields?: undefined | Array<string>;
1516
1751
  children_detail?: undefined | (Array<{
1517
- status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
1518
1752
  type: string;
1753
+ status: "Cancelled" | "Review" | "ToDo" | "In Progress" | "Backlog" | "Done";
1519
1754
  priority: number;
1520
1755
  name: string;
1521
1756
  id: string;
@@ -1540,7 +1775,7 @@ declare module "@danxbot/card-kit@1" {
1540
1775
  dead_reason: "" | "deleted" | "archived" | "left";
1541
1776
  source_ref: string;
1542
1777
  last_error: null | StatusReason;
1543
- owed: Array<"comments" | "checklists" | "attachments" | "title" | "description" | "status" | "type" | "priority" | "parent_child" | "dependencies" | "card_create" | "card_delete">;
1778
+ owed: Array<"comments" | "checklists" | "attachments" | "description" | "type" | "title" | "status" | "priority" | "parent_child" | "dependencies" | "card_create" | "card_delete">;
1544
1779
  description_unreadable: boolean;
1545
1780
  target_ref: string;
1546
1781
  target_label: string;
@@ -1605,7 +1840,7 @@ declare module "@danxbot/card-kit@1" {
1605
1840
  phase: "plan" | "code";
1606
1841
  };
1607
1842
  type ProblemViewV2 = {
1608
- type: "design" | "question" | "action" | "decision_review";
1843
+ type: "design" | "question" | "action" | "decision_review" | "evidence_review" | "behavior_rules";
1609
1844
  open: boolean;
1610
1845
  ordinal: number;
1611
1846
  decisions: Array<{
@@ -1633,13 +1868,13 @@ declare module "@danxbot/card-kit@1" {
1633
1868
  issue_id: string;
1634
1869
  feedback_consent: boolean;
1635
1870
  choice_locked: boolean;
1636
- docs_review: null | DocsReviewView;
1637
1871
  docs_land: boolean;
1638
1872
  needs_person: boolean;
1639
1873
  statement: string;
1640
1874
  context: null | string;
1641
1875
  design_element: null | string;
1642
1876
  solutions: Array<SolutionViewV2>;
1877
+ raised_by: null | ProblemRaisedBy;
1643
1878
  changed_fields?: undefined | Array<string>;
1644
1879
  decision_review?: undefined | (Array<{
1645
1880
  problem_ref_num: number;
@@ -1647,13 +1882,13 @@ declare module "@danxbot/card-kit@1" {
1647
1882
  answered_version_no: null | number;
1648
1883
  choices: Array<{ solution_id: number; kind: DecisionReviewChoiceKind; version_no: number; title: string; }>;
1649
1884
  versions?: undefined | (Array<{
1650
- title: string;
1651
- kind: "business_rule" | "architecture" | "design" | "other";
1652
- action: "created" | "changed" | "deleted" | "restored";
1885
+ text: string;
1653
1886
  made_by: "human" | "agent";
1887
+ kind: "business_rule" | "architecture" | "design" | "other";
1654
1888
  impact: number;
1655
1889
  confidence: number;
1656
- text: string;
1890
+ title: string;
1891
+ action: "created" | "changed" | "deleted" | "restored";
1657
1892
  id: number;
1658
1893
  created_at: string;
1659
1894
  author: string;
@@ -1669,9 +1904,66 @@ declare module "@danxbot/card-kit@1" {
1669
1904
  version_no: number;
1670
1905
  }>);
1671
1906
  }>);
1907
+ evidence_review?: undefined | (Array<{
1908
+ version_no: null | number;
1909
+ problem_ref_num: number;
1910
+ record_ref: string;
1911
+ answered_version_no: null | number;
1912
+ choices: Array<{ solution_id: number; kind: DecisionReviewChoiceKind; version_no: number; title: string; }>;
1913
+ part: "hypothesis" | "verdict";
1914
+ asked_because: null | "threshold" | "rejected_before" | "refreshed";
1915
+ hypothesis_versions?: undefined | (Array<{
1916
+ id: number;
1917
+ version_no: number;
1918
+ question: string;
1919
+ expected_answer: string;
1920
+ wrong_if: null | string;
1921
+ exhibits: Array<EvidenceExhibitView>;
1922
+ subjects: Array<string>;
1923
+ reasoning: string;
1924
+ confidence: number;
1925
+ provenance: Array<ProvenanceRecordV2>;
1926
+ author: string;
1927
+ by: AuthorV2;
1928
+ via_key: null | ViaKey;
1929
+ created_at: string;
1930
+ made_by: "human" | "agent";
1931
+ made_by_user_id: null | number;
1932
+ made_by_name: null | string;
1933
+ made_by_author: AuthorV2;
1934
+ made_by_is_writer: boolean;
1935
+ approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1936
+ approvals: Array<EvidenceApprovalEventView>;
1937
+ review_problem_ref_num: null | number;
1938
+ }>);
1939
+ verdict_versions?: undefined | (Array<{
1940
+ id: number;
1941
+ version_no: number;
1942
+ answer: string;
1943
+ confidence: number;
1944
+ reasoning: string;
1945
+ cites: Array<string>;
1946
+ key_figures: Array<EvidenceKeyFigure>;
1947
+ confidence_reason: null | string;
1948
+ unverified: Array<string>;
1949
+ method: null | string;
1950
+ author: string;
1951
+ by: AuthorV2;
1952
+ via_key: null | ViaKey;
1953
+ created_at: string;
1954
+ made_by: "human" | "agent";
1955
+ made_by_user_id: null | number;
1956
+ made_by_name: null | string;
1957
+ made_by_author: AuthorV2;
1958
+ made_by_is_writer: boolean;
1959
+ approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1960
+ approvals: Array<EvidenceApprovalEventView>;
1961
+ review_problem_ref_num: null | number;
1962
+ }>);
1963
+ }>);
1964
+ behavior_rules?: undefined | null | BehaviorRulesProblemView;
1672
1965
  };
1673
1966
  type SolutionViewV2 = {
1674
- title: string;
1675
1967
  steps: Array<{
1676
1968
  id: number;
1677
1969
  solution_id: number;
@@ -1684,6 +1976,7 @@ declare module "@danxbot/card-kit@1" {
1684
1976
  checked_by: null | string;
1685
1977
  steps: Array<SolutionStepViewV2>;
1686
1978
  }>;
1979
+ title: string;
1687
1980
  id: number;
1688
1981
  content_hash: string;
1689
1982
  body: string;
@@ -1700,7 +1993,7 @@ declare module "@danxbot/card-kit@1" {
1700
1993
  created_by: string;
1701
1994
  created_at: string;
1702
1995
  archived_at: null | string;
1703
- review_state: "approved" | "awaiting_review" | "changes_requested" | "rejected";
1996
+ review_state: "approved" | "rejected" | "awaiting_review" | "changes_requested";
1704
1997
  revision_count: number;
1705
1998
  latest_revision_no: number;
1706
1999
  chosen_options: null | OptionSelection;
@@ -1727,7 +2020,7 @@ declare module "@danxbot/card-kit@1" {
1727
2020
  decisions?: undefined | (Array<{
1728
2021
  decision_id: number;
1729
2022
  revision_no: number;
1730
- outcome: "approved" | "changes_requested" | "rejected";
2023
+ outcome: "approved" | "rejected" | "changes_requested";
1731
2024
  note: null | string;
1732
2025
  comment_id: number;
1733
2026
  decided_by: string;
@@ -1772,7 +2065,7 @@ declare module "@danxbot/card-kit@1" {
1772
2065
 
1773
2066
  type IssueStatus = "Review" | "ToDo" | "In Progress" | "Backlog" | "Done" | "Cancelled";
1774
2067
  type EffortLevelName = "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
1775
- type IssueProblemType = "design" | "question" | "action" | "decision_review";
2068
+ type IssueProblemType = "design" | "question" | "action" | "decision_review" | "evidence_review" | "behavior_rules";
1776
2069
  type DecisionOutcome = "rejected" | "answered";
1777
2070
  type GatingDependencyKind = "conflict_on" | "depends_on";
1778
2071
  type IssueDependencyKind = GatingDependencyKind | "depends_on_landing";
@@ -1801,6 +2094,7 @@ declare module "@danxbot/card-kit@1" {
1801
2094
  justification_quote: string | null;
1802
2095
  justification_reasoning: string | null;
1803
2096
  bump_size: BumpSize;
2097
+ behavior_policies_pinned_at: string | null;
1804
2098
  start_commit_sha: string | null;
1805
2099
  start_commit_at: string | null;
1806
2100
  start_commit_error: StartCommitError | null;
@@ -2084,6 +2378,7 @@ declare module "@danxbot/card-kit@1" {
2084
2378
  interface CardMutation {
2085
2379
  pending: string | null;
2086
2380
  run: (key: string, failureTitle: string, op: () => Promise<void>) => Promise<boolean>;
2381
+ onProblemResolved?: () => void;
2087
2382
  }
2088
2383
  function useCardMutation(): CardMutation;
2089
2384
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@50arms/plugin-sdk",
3
- "version": "0.2.65",
3
+ "version": "0.2.68",
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",