@50arms/plugin-sdk 0.2.71 → 0.2.73

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 +73 -40
  2. package/package.json +1 -1
@@ -106,6 +106,30 @@ declare module "@danxbot/card-kit@1" {
106
106
  type: ResourceType;
107
107
  id: string;
108
108
  }
109
+ type BehaviorSignoffStatus = "compliant" | "incompliant" | "rejected" | "not_applicable";
110
+ type SlotStatus = BehaviorSignoffStatus | "unverified";
111
+ type BehaviorRuleKind = "process" | "outcome";
112
+ type BehaviorSlotProblemState = "waiting_on_person" | "waiting_on_agent" | "accepted";
113
+
114
+ interface ReportedSlot {
115
+ readonly ref: string;
116
+ readonly kind: BehaviorRuleKind;
117
+ readonly text: string;
118
+ readonly slot: string;
119
+ }
120
+ interface ReportedSignoff extends ReportedSlot {
121
+ readonly status: Exclude<SlotStatus, "unverified">;
122
+ readonly signer: {
123
+ readonly kind: "person" | "agent";
124
+ readonly name: string;
125
+ };
126
+ readonly confidence: number | null;
127
+ readonly note: string | null;
128
+ }
129
+ interface BehaviorSignoffReport {
130
+ readonly signoffs: readonly ReportedSignoff[];
131
+ readonly unverified: readonly ReportedSlot[];
132
+ }
109
133
  type EvidenceBlockType = "note" | "steps" | "command" | "table" | "code" | "diff" | "log" | "samples";
110
134
  type EvidenceMadeBy = "human" | "agent";
111
135
  type EvidenceColumnType = "number" | "boolean" | "text" | "date";
@@ -271,6 +295,7 @@ declare module "@danxbot/card-kit@1" {
271
295
  confidence_reason: string | null;
272
296
  unverified: string[];
273
297
  method: string | null;
298
+ reproduced_failure: boolean;
274
299
  }
275
300
  interface EvidenceRaisedProblemView {
276
301
  card_id: string;
@@ -548,6 +573,7 @@ declare module "@danxbot/card-kit@1" {
548
573
  confidence_reason: string | null;
549
574
  unverified: string[];
550
575
  method: string | null;
576
+ reproduced_failure: boolean;
551
577
  approvals: V2CopyEvidenceApproval[];
552
578
  }
553
579
  interface V2CopyEvidenceBlockAttachment {
@@ -587,6 +613,7 @@ declare module "@danxbot/card-kit@1" {
587
613
  position: number;
588
614
  requires_reasoning: boolean;
589
615
  confidence_threshold: number | null;
616
+ kind: BehaviorRuleKind | null;
590
617
  }
591
618
  interface V2CopyBehaviorPolicy {
592
619
  live_name: string;
@@ -903,9 +930,6 @@ declare module "@danxbot/card-kit@1" {
903
930
  };
904
931
  }
905
932
  type CardUsage = UsageSummary | UsageError | null;
906
- type BehaviorSignoffStatus = "compliant" | "incompliant" | "rejected" | "not_applicable";
907
- type SlotStatus = BehaviorSignoffStatus | "unverified";
908
- type BehaviorSlotProblemState = "waiting_on_person" | "waiting_on_agent" | "accepted";
909
933
 
910
934
  interface BehaviorDecisionView {
911
935
  readonly signoff_id: number;
@@ -915,9 +939,9 @@ declare module "@danxbot/card-kit@1" {
915
939
  readonly review: "surfaced" | "auto_approved" | null;
916
940
  readonly signer: {
917
941
  readonly kind: "person" | "agent";
918
- readonly name: string;
919
942
  readonly user_id: number | null;
920
943
  };
944
+ readonly by: AuthorV2;
921
945
  readonly pin_no: number;
922
946
  readonly signed_at: string;
923
947
  }
@@ -925,16 +949,20 @@ declare module "@danxbot/card-kit@1" {
925
949
  readonly slot: string;
926
950
  readonly gate_on_card: boolean;
927
951
  readonly status: SlotStatus;
952
+ readonly settled: boolean;
928
953
  readonly signoff_id: number | null;
929
954
  readonly note: string | null;
930
955
  readonly confidence: number | null;
931
956
  readonly review: "surfaced" | "auto_approved" | null;
932
957
  readonly signer: BehaviorDecisionView["signer"] | null;
958
+ readonly by: BehaviorDecisionView["by"] | null;
933
959
  readonly pin_no: number | null;
934
960
  readonly signed_at: string | null;
935
961
  readonly problem: {
936
962
  readonly ref: string;
937
963
  readonly state: BehaviorSlotProblemState;
964
+ readonly reviewed_by_name: string | null;
965
+ readonly reviewed_at: string | null;
938
966
  } | null;
939
967
  readonly earlier: BehaviorDecisionView[];
940
968
  }
@@ -945,7 +973,8 @@ declare module "@danxbot/card-kit@1" {
945
973
  readonly rule_version: string;
946
974
  readonly requires_reasoning: boolean;
947
975
  readonly confidence_threshold: number;
948
- readonly provenance: ProvenanceRecordV2 | null;
976
+ readonly kind: BehaviorRuleKind;
977
+ readonly provenance: ProvenanceRecordV2;
949
978
  readonly slots: BehaviorSlotView[];
950
979
  }
951
980
  interface BehaviorPolicyView {
@@ -990,28 +1019,12 @@ declare module "@danxbot/card-kit@1" {
990
1019
  readonly evaluated_count: number;
991
1020
  readonly rows: BehaviorRuleRowView[];
992
1021
  }
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
- }
1008
1022
  interface BehaviorRulesProblemView {
1009
1023
  readonly total_count: number;
1010
1024
  readonly evaluated_count: number;
1011
1025
  readonly waiting_count: number;
1012
1026
  readonly pin_no: number | null;
1013
1027
  readonly groups: BehaviorRuleGroupView[];
1014
- readonly escalations: BehaviorRuleEscalationView[];
1015
1028
  }
1016
1029
  interface DesignSourceFile {
1017
1030
  path: string;
@@ -1040,6 +1053,14 @@ declare module "@danxbot/card-kit@1" {
1040
1053
  categories: ContextCategorySize[];
1041
1054
  }
1042
1055
 
1056
+ type EffortLevelName$1 = "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
1057
+
1058
+ interface CompactionGradeView {
1059
+ grade: EffortLevelName$1;
1060
+ model: string | null;
1061
+ effort: string | null;
1062
+ }
1063
+
1043
1064
  interface CategorySizes {
1044
1065
  key: ContextCategoryKey;
1045
1066
  covered: boolean;
@@ -1067,6 +1088,7 @@ declare module "@danxbot/card-kit@1" {
1067
1088
  turns: number | null;
1068
1089
  spend_usd: number | null;
1069
1090
  model: string | null;
1091
+ agent_grade: CompactionGradeView;
1070
1092
  own: ItemSizes;
1071
1093
  cards: RunCard[] | null;
1072
1094
  }
@@ -1088,17 +1110,21 @@ declare module "@danxbot/card-kit@1" {
1088
1110
  turns: number;
1089
1111
  spend_usd: number;
1090
1112
  }
1091
- interface CompactionJobProgress {
1092
- dispatch_id: string;
1093
- baseline: CompactionFigures;
1094
- now: CompactionFigures;
1095
- }
1096
- interface CompactionJob {
1113
+ interface CompactionJobBase {
1097
1114
  who: CompactionJobWho;
1098
1115
  where: CompactionJobWhere;
1099
1116
  started_at: string;
1100
- progress: CompactionJobProgress | null;
1101
1117
  }
1118
+ interface WorkerCompactionJob extends CompactionJobBase {
1119
+ dispatch_id: string;
1120
+ progress: CompactionFigures;
1121
+ }
1122
+ interface SessionCompactionJob extends CompactionJobBase {
1123
+ dispatch_id: string | null;
1124
+ progress: CompactionFigures | null;
1125
+ not_counted: boolean;
1126
+ }
1127
+ type CompactionJob = WorkerCompactionJob | SessionCompactionJob;
1102
1128
  interface CompactionSizes {
1103
1129
  before_tokens: number | null;
1104
1130
  after_tokens: number | null;
@@ -1347,8 +1373,10 @@ declare module "@danxbot/card-kit@1" {
1347
1373
  usd_saved: number;
1348
1374
  unpriced_loads: number;
1349
1375
  unresolved_loads: number;
1350
- compact_usd: number;
1376
+ compact_usd: number | null;
1351
1377
  compact_runs: number;
1378
+ pending_runs: number;
1379
+ unrecorded_runs: number;
1352
1380
  counted_since: string;
1353
1381
  }
1354
1382
  interface BuildGradeView {
@@ -1413,6 +1441,7 @@ declare module "@danxbot/card-kit@1" {
1413
1441
  commits: string[];
1414
1442
  tests: RetroTestViewV2[];
1415
1443
  commit_url_base?: string | null;
1444
+ behavior_signoffs: BehaviorSignoffReport;
1416
1445
  }
1417
1446
  interface AttachmentViewV2 {
1418
1447
  id: number;
@@ -1451,7 +1480,7 @@ declare module "@danxbot/card-kit@1" {
1451
1480
  quality_gate_round_id: number | null;
1452
1481
  items: ChecklistItemView[];
1453
1482
  }
1454
- type DesignDecisionOutcome = "approved" | "rejected" | "changes_requested";
1483
+ type DesignDecisionOutcome = "rejected" | "approved" | "changes_requested";
1455
1484
  interface ChecklistHistoryViewV2 {
1456
1485
  action: "create" | "rename" | "remove" | "add_item" | "update_item" | "remove_item";
1457
1486
  checklist: string;
@@ -1522,6 +1551,7 @@ declare module "@danxbot/card-kit@1" {
1522
1551
  via_key: null | ViaKey;
1523
1552
  timestamp: string;
1524
1553
  updated_at: string;
1554
+ content_hash?: undefined | string;
1525
1555
  text: string;
1526
1556
  reduced?: undefined | true;
1527
1557
  reduced_text?: undefined | null | string;
@@ -1534,7 +1564,7 @@ declare module "@danxbot/card-kit@1" {
1534
1564
  created_by: string;
1535
1565
  created_at: string;
1536
1566
  archived_at: null | string;
1537
- review_state: "approved" | "rejected" | "awaiting_review" | "changes_requested";
1567
+ review_state: "rejected" | "approved" | "awaiting_review" | "changes_requested";
1538
1568
  revision_count: number;
1539
1569
  latest_revision_no: number;
1540
1570
  chosen_options: null | OptionSelection;
@@ -1561,7 +1591,7 @@ declare module "@danxbot/card-kit@1" {
1561
1591
  decisions?: undefined | (Array<{
1562
1592
  decision_id: number;
1563
1593
  revision_no: number;
1564
- outcome: "approved" | "rejected" | "changes_requested";
1594
+ outcome: "rejected" | "approved" | "changes_requested";
1565
1595
  note: null | string;
1566
1596
  comment_id: number;
1567
1597
  decided_by: string;
@@ -1671,7 +1701,7 @@ declare module "@danxbot/card-kit@1" {
1671
1701
  unread_decision_comment_counts?: undefined | Record<string, number>;
1672
1702
  unread_evidence_comment_counts?: undefined | Record<string, number>;
1673
1703
  context_size?: undefined | ContextSize;
1674
- 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; };
1704
+ content_compaction?: undefined | null | { id: number; requested_at: string; categories: ContextCategoryKey[]; card_categories: ContextCategoryKey[] | null; finished_runs: number; runs_version: string; agent_grade: CompactionGradeView; } & { status: "waiting"; ended_at: null; failure_reason: null; } | { id: number; requested_at: string; categories: ContextCategoryKey[]; card_categories: ContextCategoryKey[] | null; finished_runs: number; runs_version: string; agent_grade: CompactionGradeView; } & { status: "working"; ended_at: null; failure_reason: null; job: CompactionJob; } | { id: number; requested_at: string; categories: ContextCategoryKey[]; card_categories: ContextCategoryKey[] | null; finished_runs: number; runs_version: string; agent_grade: CompactionGradeView; } & { status: "done"; ended_at: string; failure_reason: null; sizes: CompactionSizes; } | { id: number; requested_at: string; categories: ContextCategoryKey[]; card_categories: ContextCategoryKey[] | null; finished_runs: number; runs_version: string; agent_grade: CompactionGradeView; } & { status: "failed"; ended_at: string; failure_reason: NotificationText; };
1675
1705
  content_compaction_history?: undefined | Array<CompactionRun>;
1676
1706
  compaction_savings?: undefined | null | CompactionSavings;
1677
1707
  agent_notes_count?: undefined | number;
@@ -1803,7 +1833,7 @@ declare module "@danxbot/card-kit@1" {
1803
1833
  made_by_name: null | string;
1804
1834
  made_by_author: AuthorV2;
1805
1835
  made_by_is_writer: boolean;
1806
- approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1836
+ approval_state: "rejected" | "approved" | "waiting" | "unreviewed";
1807
1837
  approvals: Array<EvidenceApprovalEventView>;
1808
1838
  review_problem_ref_num: null | number;
1809
1839
  }>);
@@ -1817,6 +1847,7 @@ declare module "@danxbot/card-kit@1" {
1817
1847
  confidence_reason: null | string;
1818
1848
  unverified: Array<string>;
1819
1849
  method: null | string;
1850
+ reproduced_failure: boolean;
1820
1851
  author: string;
1821
1852
  by: AuthorV2;
1822
1853
  via_key: null | ViaKey;
@@ -1826,7 +1857,7 @@ declare module "@danxbot/card-kit@1" {
1826
1857
  made_by_name: null | string;
1827
1858
  made_by_author: AuthorV2;
1828
1859
  made_by_is_writer: boolean;
1829
- approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1860
+ approval_state: "rejected" | "approved" | "waiting" | "unreviewed";
1830
1861
  approvals: Array<EvidenceApprovalEventView>;
1831
1862
  review_problem_ref_num: null | number;
1832
1863
  }>);
@@ -2068,7 +2099,7 @@ declare module "@danxbot/card-kit@1" {
2068
2099
  made_by_name: null | string;
2069
2100
  made_by_author: AuthorV2;
2070
2101
  made_by_is_writer: boolean;
2071
- approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
2102
+ approval_state: "rejected" | "approved" | "waiting" | "unreviewed";
2072
2103
  approvals: Array<EvidenceApprovalEventView>;
2073
2104
  review_problem_ref_num: null | number;
2074
2105
  }>);
@@ -2082,6 +2113,7 @@ declare module "@danxbot/card-kit@1" {
2082
2113
  confidence_reason: null | string;
2083
2114
  unverified: Array<string>;
2084
2115
  method: null | string;
2116
+ reproduced_failure: boolean;
2085
2117
  author: string;
2086
2118
  by: AuthorV2;
2087
2119
  via_key: null | ViaKey;
@@ -2091,7 +2123,7 @@ declare module "@danxbot/card-kit@1" {
2091
2123
  made_by_name: null | string;
2092
2124
  made_by_author: AuthorV2;
2093
2125
  made_by_is_writer: boolean;
2094
- approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
2126
+ approval_state: "rejected" | "approved" | "waiting" | "unreviewed";
2095
2127
  approvals: Array<EvidenceApprovalEventView>;
2096
2128
  review_problem_ref_num: null | number;
2097
2129
  }>);
@@ -2128,7 +2160,7 @@ declare module "@danxbot/card-kit@1" {
2128
2160
  created_by: string;
2129
2161
  created_at: string;
2130
2162
  archived_at: null | string;
2131
- review_state: "approved" | "rejected" | "awaiting_review" | "changes_requested";
2163
+ review_state: "rejected" | "approved" | "awaiting_review" | "changes_requested";
2132
2164
  revision_count: number;
2133
2165
  latest_revision_no: number;
2134
2166
  chosen_options: null | OptionSelection;
@@ -2155,7 +2187,7 @@ declare module "@danxbot/card-kit@1" {
2155
2187
  decisions?: undefined | (Array<{
2156
2188
  decision_id: number;
2157
2189
  revision_no: number;
2158
- outcome: "approved" | "rejected" | "changes_requested";
2190
+ outcome: "rejected" | "approved" | "changes_requested";
2159
2191
  note: null | string;
2160
2192
  comment_id: number;
2161
2193
  decided_by: string;
@@ -2615,10 +2647,11 @@ declare module "@danxbot/card-kit@1" {
2615
2647
  removedSolutionIds: ReadonlySet<number>;
2616
2648
  decisions: DecisionViewV2[];
2617
2649
  choiceLocked: boolean;
2650
+ answerable: boolean;
2618
2651
  }
2619
2652
 
2620
2653
  interface ProblemsSectionProps {
2621
- card: ProblemCard;
2654
+ card: ProblemCard & Partial<Pick<IssueViewV2, "archived_at">>;
2622
2655
  problems: ProblemAttention[];
2623
2656
  canAnswer: boolean;
2624
2657
  designGatePending: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@50arms/plugin-sdk",
3
- "version": "0.2.71",
3
+ "version": "0.2.73",
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",