@50arms/plugin-sdk 0.2.69 → 0.2.71

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 +172 -36
  2. package/package.json +1 -1
@@ -31,11 +31,6 @@ declare module "@danxbot/card-kit@1" {
31
31
  }
32
32
 
33
33
  type CardTypeKey = string;
34
-
35
- interface Justification {
36
- quote: string;
37
- reasoning: string;
38
- }
39
34
  type MirrorProviderId = "trello" | "slack" | "asana" | "linear";
40
35
  type SourceOrigin = "danxbot" | MirrorProviderId | "";
41
36
  type DecisionRecordKind = "business_rule" | "architecture" | "design" | "other";
@@ -61,7 +56,7 @@ declare module "@danxbot/card-kit@1" {
61
56
  made_by_name: string | null;
62
57
  made_by_author: AuthorV2;
63
58
  made_by_is_writer: boolean;
64
- provenance: ProvenanceRecordV2[];
59
+ provenance: ProvenanceRecordV2 | null;
65
60
  author: string;
66
61
  by: AuthorV2;
67
62
  via_key: ViaKey | null;
@@ -104,9 +99,9 @@ declare module "@danxbot/card-kit@1" {
104
99
  values: StatusReasonValues;
105
100
  }
106
101
  type PacingLimit = "five_hour" | "weekly" | "spend";
107
- type ProvenanceSourceKind = "card" | "comment" | "session_thread" | "problem" | "url" | "evidence";
102
+ type ProvenanceSourceKind = "design" | "agent" | "plan" | "card" | "comment" | "session_thread" | "problem" | "evidence" | "url" | "decision" | "plan_record" | "plan_section" | "behavior_rule" | "behavior_policy" | "docs_page" | "commit" | "user" | "system";
108
103
  type ProvenancePartyKind = "agent" | "person";
109
- type ResourceType = "design" | "plan" | "problem" | "evidence" | "issue" | "plan_record" | "plan_section" | "decision" | "behavior_policy" | "behavior_policy_group";
104
+ type ResourceType = "design" | "plan" | "problem" | "evidence" | "decision" | "plan_record" | "plan_section" | "behavior_policy" | "issue" | "behavior_policy_group";
110
105
  interface ResourceRef {
111
106
  type: ResourceType;
112
107
  id: string;
@@ -257,7 +252,7 @@ declare module "@danxbot/card-kit@1" {
257
252
  subjects: string[];
258
253
  reasoning: string;
259
254
  confidence: number;
260
- provenance: ProvenanceRecordV2[];
255
+ provenance: ProvenanceRecordV2 | null;
261
256
  }
262
257
  interface EvidenceKeyFigure {
263
258
  value: string;
@@ -271,8 +266,7 @@ declare module "@danxbot/card-kit@1" {
271
266
  version_no: number;
272
267
  answer: string;
273
268
  confidence: number;
274
- reasoning: string;
275
- cites: string[];
269
+ provenance: ProvenanceRecordV2;
276
270
  key_figures: EvidenceKeyFigure[];
277
271
  confidence_reason: string | null;
278
272
  unverified: string[];
@@ -318,7 +312,7 @@ declare module "@danxbot/card-kit@1" {
318
312
  ref: string;
319
313
  card_id: string;
320
314
  }
321
- type WorkMarkResourceType = "design" | "plan" | "problem" | "plan_record" | "plan_section" | "decision";
315
+ type WorkMarkResourceType = "design" | "plan" | "problem" | "decision" | "plan_record" | "plan_section";
322
316
  type ClaimResourceType = "design" | "evidence";
323
317
  interface ClaimResource extends ResourceRef {
324
318
  type: ClaimResourceType;
@@ -328,6 +322,7 @@ declare module "@danxbot/card-kit@1" {
328
322
  }
329
323
 
330
324
  type QualityGatePhase = "plan" | "code";
325
+
331
326
  type ControlValue = boolean | string;
332
327
 
333
328
  type ControlSource = "card" | "plan" | "board" | "team" | "system";
@@ -489,7 +484,7 @@ declare module "@danxbot/card-kit@1" {
489
484
  made_by_email: string | null;
490
485
  made_by_name: string | null;
491
486
  made_by_team_agent: string | null;
492
- provenance: V2CopyProvenanceRecord[];
487
+ provenance: V2CopyProvenanceRecord | null;
493
488
  author: string;
494
489
  team_agent: string | null;
495
490
  created_at: string;
@@ -535,7 +530,7 @@ declare module "@danxbot/card-kit@1" {
535
530
  exhibits: V2CopyEvidenceExhibit[];
536
531
  subjects: string[];
537
532
  approvals: V2CopyEvidenceApproval[];
538
- provenance: V2CopyProvenanceRecord[];
533
+ provenance: V2CopyProvenanceRecord | null;
539
534
  }
540
535
  interface V2CopyEvidenceKeyFigure {
541
536
  value: string;
@@ -548,8 +543,7 @@ declare module "@danxbot/card-kit@1" {
548
543
  version_no: number;
549
544
  answer: string;
550
545
  confidence: number;
551
- reasoning: string;
552
- cites: number[];
546
+ provenance: V2CopyProvenanceRecord;
553
547
  key_figures: V2CopyEvidenceKeyFigure[];
554
548
  confidence_reason: string | null;
555
549
  unverified: string[];
@@ -591,6 +585,8 @@ declare module "@danxbot/card-kit@1" {
591
585
  live_position: number;
592
586
  rule_version: string;
593
587
  position: number;
588
+ requires_reasoning: boolean;
589
+ confidence_threshold: number | null;
594
590
  }
595
591
  interface V2CopyBehaviorPolicy {
596
592
  live_name: string;
@@ -598,6 +594,8 @@ declare module "@danxbot/card-kit@1" {
598
594
  position: number;
599
595
  quality_gate_types: string[] | null;
600
596
  attached_at: string;
597
+ violation_instructions: string;
598
+ confidence_threshold: number;
601
599
  rules: V2CopyBehaviorRule[];
602
600
  }
603
601
  interface V2CopyBehaviorReview {
@@ -611,6 +609,7 @@ declare module "@danxbot/card-kit@1" {
611
609
  interface V2CopyBehaviorSignoff {
612
610
  policy_index: number;
613
611
  rule_index: number;
612
+ pin_no: number;
614
613
  slot: string;
615
614
  status: "compliant" | "incompliant" | "rejected" | "not_applicable";
616
615
  note: string | null;
@@ -734,17 +733,26 @@ declare module "@danxbot/card-kit@1" {
734
733
  interface V2CopyProvenanceSource {
735
734
  kind: ProvenanceSourceKind;
736
735
  ref: string;
736
+ quote: string | null;
737
+ quote_verified: boolean;
737
738
  comment_index: number | null;
738
739
  problem_index: number | null;
739
740
  evidence_index: number | null;
741
+ design_index: number | null;
740
742
  card_linked: boolean;
741
743
  author: V2CopyProvenanceParty | null;
742
744
  at: string | null;
745
+ added_by: V2CopyProvenanceParty;
746
+ added_at: string;
747
+ }
748
+ interface V2CopyJustification {
749
+ card_type: string;
750
+ provenance: V2CopyProvenanceRecord;
743
751
  }
744
752
  interface V2CopyProvenanceRecord {
745
- quote: string | null;
746
753
  reasoning: string | null;
747
- source: V2CopyProvenanceSource | null;
754
+ confidence: number | null;
755
+ sources: V2CopyProvenanceSource[];
748
756
  recorded_by: V2CopyProvenanceParty;
749
757
  recorded_at: string;
750
758
  }
@@ -787,8 +795,10 @@ declare module "@danxbot/card-kit@1" {
787
795
  comments: V2CopyComment[];
788
796
  agent_notes: V2CopyAgentNote[];
789
797
  decision_records: V2CopyDecisionRecord[];
798
+ justifications: V2CopyJustification[];
790
799
  evidence_records: V2CopyEvidenceRecord[];
791
800
  behavior_policies_pinned_at: string | null;
801
+ behavior_policies_pin_no: number | null;
792
802
  behavior_policies: V2CopyBehaviorPolicy[];
793
803
  behavior_signoffs: V2CopyBehaviorSignoff[];
794
804
  created_tags: V2CopyCommentTag[];
@@ -908,6 +918,7 @@ declare module "@danxbot/card-kit@1" {
908
918
  readonly name: string;
909
919
  readonly user_id: number | null;
910
920
  };
921
+ readonly pin_no: number;
911
922
  readonly signed_at: string;
912
923
  }
913
924
  interface BehaviorSlotView {
@@ -919,6 +930,7 @@ declare module "@danxbot/card-kit@1" {
919
930
  readonly confidence: number | null;
920
931
  readonly review: "surfaced" | "auto_approved" | null;
921
932
  readonly signer: BehaviorDecisionView["signer"] | null;
933
+ readonly pin_no: number | null;
922
934
  readonly signed_at: string | null;
923
935
  readonly problem: {
924
936
  readonly ref: string;
@@ -931,6 +943,9 @@ declare module "@danxbot/card-kit@1" {
931
943
  readonly ref: string;
932
944
  readonly text: string;
933
945
  readonly rule_version: string;
946
+ readonly requires_reasoning: boolean;
947
+ readonly confidence_threshold: number;
948
+ readonly provenance: ProvenanceRecordV2 | null;
934
949
  readonly slots: BehaviorSlotView[];
935
950
  }
936
951
  interface BehaviorPolicyView {
@@ -938,10 +953,15 @@ declare module "@danxbot/card-kit@1" {
938
953
  readonly name: string;
939
954
  readonly quality_gate_types: string[] | null;
940
955
  readonly attached_at: string | null;
956
+ readonly stale: boolean;
957
+ readonly violation_instructions: string;
958
+ readonly confidence_threshold: number;
941
959
  readonly rules: BehaviorRuleView[];
942
960
  }
943
961
  interface CardBehaviorPoliciesView {
944
962
  readonly behavior_policies_pinned_at: string | null;
963
+ readonly behavior_policies_pin_no: number | null;
964
+ readonly stale: boolean;
945
965
  readonly open_slot_count: number;
946
966
  readonly policies: BehaviorPolicyView[];
947
967
  }
@@ -970,11 +990,28 @@ declare module "@danxbot/card-kit@1" {
970
990
  readonly evaluated_count: number;
971
991
  readonly rows: BehaviorRuleRowView[];
972
992
  }
993
+ interface BehaviorRuleEscalationView {
994
+ readonly rule_id: number;
995
+ readonly rule_ref: string;
996
+ readonly rule_text: string;
997
+ readonly policy_ref: string;
998
+ readonly policy_name: string;
999
+ readonly slot: string;
1000
+ readonly gate_on_card: boolean;
1001
+ readonly confidence: number;
1002
+ readonly why: string;
1003
+ readonly escalated_by: string;
1004
+ readonly escalated_at: string;
1005
+ readonly state: "waiting_on_person" | "settled";
1006
+ readonly decision: BehaviorDecisionView | null;
1007
+ }
973
1008
  interface BehaviorRulesProblemView {
974
1009
  readonly total_count: number;
975
1010
  readonly evaluated_count: number;
976
1011
  readonly waiting_count: number;
1012
+ readonly pin_no: number | null;
977
1013
  readonly groups: BehaviorRuleGroupView[];
1014
+ readonly escalations: BehaviorRuleEscalationView[];
978
1015
  }
979
1016
  interface DesignSourceFile {
980
1017
  path: string;
@@ -1101,6 +1138,93 @@ declare module "@danxbot/card-kit@1" {
1101
1138
  name: string | null;
1102
1139
  card_id: CardRef | null;
1103
1140
  }
1141
+
1142
+ type TransitionAction = "ready" | "unready" | "pickup" | "rollback_pickup" | "gate_release" | "gate_repin" | "claim_repin" | "landing_hold" | "complete" | "cancel" | "block" | "unblock" | "archive" | "snooze" | "coerce" | "reopen";
1143
+
1144
+ type MoveKind = "create" | "archive" | "snooze" | "delete" | "retype" | "edit" | "other";
1145
+
1146
+ type SignoffScope = {
1147
+ type: "base";
1148
+ } | {
1149
+ type: "filtered";
1150
+ board: string | null;
1151
+ card_type: string | null;
1152
+ card: string | null;
1153
+ agent_profile: string | null;
1154
+ runtime: string | null;
1155
+ };
1156
+ interface SignedRule {
1157
+ ref: string;
1158
+ version: string;
1159
+ text: string;
1160
+ status: "compliant" | "rejected" | "not_applicable";
1161
+ confidence: number;
1162
+ threshold: number;
1163
+ note: string | null;
1164
+ }
1165
+ interface SignedPolicy {
1166
+ policy: string;
1167
+ name: string;
1168
+ scope: SignoffScope;
1169
+ instructions: string | null;
1170
+ rules: SignedRule[];
1171
+ }
1172
+ interface SignedMove {
1173
+ type: "signed";
1174
+ id: string;
1175
+ at: string;
1176
+ move: MoveKind;
1177
+ route: string;
1178
+ signer: {
1179
+ name: string;
1180
+ via: "session" | "dispatch";
1181
+ };
1182
+ policies: SignedPolicy[];
1183
+ }
1184
+ type SkippedItemView = {
1185
+ type: "write_rule";
1186
+ rule: {
1187
+ ref: string;
1188
+ version: string;
1189
+ text: string;
1190
+ threshold: number;
1191
+ };
1192
+ policies: {
1193
+ policy: string;
1194
+ name: string;
1195
+ scope: SignoffScope;
1196
+ }[];
1197
+ } | {
1198
+ type: "card_slot";
1199
+ rule: {
1200
+ ref: string;
1201
+ version: string;
1202
+ text: string;
1203
+ };
1204
+ policy: string;
1205
+ slot: string;
1206
+ status: "unverified" | "incompliant";
1207
+ } | {
1208
+ type: "open_problem";
1209
+ problem: string;
1210
+ statement: string;
1211
+ };
1212
+ interface BypassMove {
1213
+ type: "bypass";
1214
+ id: string;
1215
+ at: string;
1216
+ move: MoveKind;
1217
+ operation: string;
1218
+ kind: "write" | "completion" | "verdict";
1219
+ person: {
1220
+ name: string;
1221
+ };
1222
+ skipped: SkippedItemView[];
1223
+ }
1224
+ type SignoffMove = SignedMove | BypassMove;
1225
+ interface CardBehaviorSignoffs {
1226
+ moves: SignoffMove[];
1227
+ }
1104
1228
  interface RelationPageView {
1105
1229
  readonly limit: number;
1106
1230
  readonly total: number;
@@ -1111,6 +1235,15 @@ declare module "@danxbot/card-kit@1" {
1111
1235
  readonly card_id: CardRef;
1112
1236
  readonly card_title: string;
1113
1237
  readonly card_status: string;
1238
+ readonly card_priority: number;
1239
+ readonly card_created_at: string;
1240
+ readonly card_updated_at: string;
1241
+ readonly parent: {
1242
+ readonly id: CardRef;
1243
+ readonly title: string;
1244
+ readonly created_at: string;
1245
+ readonly updated_at: string;
1246
+ } | null;
1114
1247
  readonly problems: readonly {
1115
1248
  readonly ref_num: number;
1116
1249
  readonly type: IssueProblemType;
@@ -1481,12 +1614,14 @@ declare module "@danxbot/card-kit@1" {
1481
1614
  risk_reason?: undefined | null | string;
1482
1615
  risk_set?: undefined | null | { at: string; by: AuthorV2; };
1483
1616
  risk_raise_reason?: undefined | null | string;
1484
- justification?: undefined | null | Justification;
1617
+ justification?: undefined | null | ProvenanceRecordV2;
1618
+ justification_history?: undefined | Array<ProvenanceRecordV2>;
1485
1619
  bump_size?: undefined | "patch" | "minor" | "major";
1486
1620
  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; };
1487
1621
  problem_total?: undefined | number;
1488
1622
  evidence_record_total?: undefined | number;
1489
1623
  behavior_policies?: undefined | CardBehaviorPoliciesView;
1624
+ behavior_signoffs?: undefined | CardBehaviorSignoffs;
1490
1625
  decision_record_total?: undefined | number;
1491
1626
  decision_record_page?: undefined | DecisionRecordPage;
1492
1627
  decision_record_approved_total?: undefined | number;
@@ -1587,7 +1722,7 @@ declare module "@danxbot/card-kit@1" {
1587
1722
  made_by_name: null | string;
1588
1723
  made_by_author: AuthorV2;
1589
1724
  made_by_is_writer: boolean;
1590
- provenance: Array<ProvenanceRecordV2>;
1725
+ provenance: null | ProvenanceRecordV2;
1591
1726
  comment_count: number;
1592
1727
  unread_comment_count: number;
1593
1728
  versions?: undefined | (Array<{
@@ -1609,7 +1744,7 @@ declare module "@danxbot/card-kit@1" {
1609
1744
  made_by_name: null | string;
1610
1745
  made_by_author: AuthorV2;
1611
1746
  made_by_is_writer: boolean;
1612
- provenance: Array<ProvenanceRecordV2>;
1747
+ provenance: null | ProvenanceRecordV2;
1613
1748
  version_no: number;
1614
1749
  }>);
1615
1750
  approvals?: undefined | (Array<{
@@ -1658,7 +1793,7 @@ declare module "@danxbot/card-kit@1" {
1658
1793
  subjects: Array<string>;
1659
1794
  reasoning: string;
1660
1795
  confidence: number;
1661
- provenance: Array<ProvenanceRecordV2>;
1796
+ provenance: null | ProvenanceRecordV2;
1662
1797
  author: string;
1663
1798
  by: AuthorV2;
1664
1799
  via_key: null | ViaKey;
@@ -1677,8 +1812,7 @@ declare module "@danxbot/card-kit@1" {
1677
1812
  version_no: number;
1678
1813
  answer: string;
1679
1814
  confidence: number;
1680
- reasoning: string;
1681
- cites: Array<string>;
1815
+ provenance: ProvenanceRecordV2;
1682
1816
  key_figures: Array<EvidenceKeyFigure>;
1683
1817
  confidence_reason: null | string;
1684
1818
  unverified: Array<string>;
@@ -1716,7 +1850,7 @@ declare module "@danxbot/card-kit@1" {
1716
1850
  made_by_name: null | string;
1717
1851
  made_by_author: AuthorV2;
1718
1852
  made_by_is_writer: boolean;
1719
- provenance: Array<ProvenanceRecordV2>;
1853
+ provenance: null | ProvenanceRecordV2;
1720
1854
  version_no: number;
1721
1855
  }>);
1722
1856
  decision_record_approvals?: undefined | (Array<{
@@ -1902,7 +2036,7 @@ declare module "@danxbot/card-kit@1" {
1902
2036
  made_by_name: null | string;
1903
2037
  made_by_author: AuthorV2;
1904
2038
  made_by_is_writer: boolean;
1905
- provenance: Array<ProvenanceRecordV2>;
2039
+ provenance: null | ProvenanceRecordV2;
1906
2040
  version_no: number;
1907
2041
  }>);
1908
2042
  }>);
@@ -1924,7 +2058,7 @@ declare module "@danxbot/card-kit@1" {
1924
2058
  subjects: Array<string>;
1925
2059
  reasoning: string;
1926
2060
  confidence: number;
1927
- provenance: Array<ProvenanceRecordV2>;
2061
+ provenance: null | ProvenanceRecordV2;
1928
2062
  author: string;
1929
2063
  by: AuthorV2;
1930
2064
  via_key: null | ViaKey;
@@ -1943,8 +2077,7 @@ declare module "@danxbot/card-kit@1" {
1943
2077
  version_no: number;
1944
2078
  answer: string;
1945
2079
  confidence: number;
1946
- reasoning: string;
1947
- cites: Array<string>;
2080
+ provenance: ProvenanceRecordV2;
1948
2081
  key_figures: Array<EvidenceKeyFigure>;
1949
2082
  confidence_reason: null | string;
1950
2083
  unverified: Array<string>;
@@ -2093,10 +2226,9 @@ declare module "@danxbot/card-kit@1" {
2093
2226
  risk_set_via_key_name: string | null;
2094
2227
  risk_set_team_agent_id: number | null;
2095
2228
  risk_raise_reason: string | null;
2096
- justification_quote: string | null;
2097
- justification_reasoning: string | null;
2098
2229
  bump_size: BumpSize;
2099
2230
  behavior_policies_pinned_at: string | null;
2231
+ behavior_policies_pin_no: number | null;
2100
2232
  start_commit_sha: string | null;
2101
2233
  start_commit_at: string | null;
2102
2234
  start_commit_error: StartCommitError | null;
@@ -2299,24 +2431,28 @@ declare module "@danxbot/card-kit@1" {
2299
2431
  }
2300
2432
  interface ProvenanceRecordV2 {
2301
2433
  id: number;
2302
- quote: string | null;
2303
2434
  reasoning: string | null;
2304
- source: ProvenanceSourceV2 | null;
2435
+ confidence: number | null;
2436
+ sources: ProvenanceSourceV2[];
2305
2437
  recorded_by: AuthorV2;
2306
2438
  recorded_at: string;
2307
2439
  }
2308
2440
  interface ProvenanceSourceV2 {
2309
2441
  kind: ProvenanceSourceKind;
2310
2442
  ref: string;
2311
- card_id: CardRef | null;
2443
+ quote: string | null;
2444
+ quote_verified: boolean;
2445
+ label: string;
2446
+ url: string | null;
2447
+ external: boolean;
2312
2448
  author: AuthorV2 | null;
2313
2449
  at: string | null;
2450
+ added_by: AuthorV2;
2451
+ added_at: string;
2314
2452
  }
2315
2453
 
2316
2454
  function useIssueDetail(id: string): LiveQueryResult<IssueViewV2>;
2317
2455
 
2318
- type TransitionAction = "ready" | "unready" | "pickup" | "rollback_pickup" | "gate_release" | "gate_repin" | "claim_repin" | "landing_hold" | "complete" | "cancel" | "block" | "unblock" | "archive" | "snooze" | "coerce" | "reopen";
2319
-
2320
2456
  interface ChildProgress {
2321
2457
  done: number;
2322
2458
  total: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@50arms/plugin-sdk",
3
- "version": "0.2.69",
3
+ "version": "0.2.71",
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",