@50arms/plugin-sdk 0.2.72 → 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 +63 -21
  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";
@@ -589,6 +613,7 @@ declare module "@danxbot/card-kit@1" {
589
613
  position: number;
590
614
  requires_reasoning: boolean;
591
615
  confidence_threshold: number | null;
616
+ kind: BehaviorRuleKind | null;
592
617
  }
593
618
  interface V2CopyBehaviorPolicy {
594
619
  live_name: string;
@@ -905,9 +930,6 @@ declare module "@danxbot/card-kit@1" {
905
930
  };
906
931
  }
907
932
  type CardUsage = UsageSummary | UsageError | null;
908
- type BehaviorSignoffStatus = "compliant" | "incompliant" | "rejected" | "not_applicable";
909
- type SlotStatus = BehaviorSignoffStatus | "unverified";
910
- type BehaviorSlotProblemState = "waiting_on_person" | "waiting_on_agent" | "accepted";
911
933
 
912
934
  interface BehaviorDecisionView {
913
935
  readonly signoff_id: number;
@@ -927,6 +949,7 @@ declare module "@danxbot/card-kit@1" {
927
949
  readonly slot: string;
928
950
  readonly gate_on_card: boolean;
929
951
  readonly status: SlotStatus;
952
+ readonly settled: boolean;
930
953
  readonly signoff_id: number | null;
931
954
  readonly note: string | null;
932
955
  readonly confidence: number | null;
@@ -938,6 +961,8 @@ declare module "@danxbot/card-kit@1" {
938
961
  readonly problem: {
939
962
  readonly ref: string;
940
963
  readonly state: BehaviorSlotProblemState;
964
+ readonly reviewed_by_name: string | null;
965
+ readonly reviewed_at: string | null;
941
966
  } | null;
942
967
  readonly earlier: BehaviorDecisionView[];
943
968
  }
@@ -948,6 +973,7 @@ declare module "@danxbot/card-kit@1" {
948
973
  readonly rule_version: string;
949
974
  readonly requires_reasoning: boolean;
950
975
  readonly confidence_threshold: number;
976
+ readonly kind: BehaviorRuleKind;
951
977
  readonly provenance: ProvenanceRecordV2;
952
978
  readonly slots: BehaviorSlotView[];
953
979
  }
@@ -1027,6 +1053,14 @@ declare module "@danxbot/card-kit@1" {
1027
1053
  categories: ContextCategorySize[];
1028
1054
  }
1029
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
+
1030
1064
  interface CategorySizes {
1031
1065
  key: ContextCategoryKey;
1032
1066
  covered: boolean;
@@ -1054,6 +1088,7 @@ declare module "@danxbot/card-kit@1" {
1054
1088
  turns: number | null;
1055
1089
  spend_usd: number | null;
1056
1090
  model: string | null;
1091
+ agent_grade: CompactionGradeView;
1057
1092
  own: ItemSizes;
1058
1093
  cards: RunCard[] | null;
1059
1094
  }
@@ -1075,17 +1110,21 @@ declare module "@danxbot/card-kit@1" {
1075
1110
  turns: number;
1076
1111
  spend_usd: number;
1077
1112
  }
1078
- interface CompactionJobProgress {
1079
- dispatch_id: string;
1080
- baseline: CompactionFigures;
1081
- now: CompactionFigures;
1082
- }
1083
- interface CompactionJob {
1113
+ interface CompactionJobBase {
1084
1114
  who: CompactionJobWho;
1085
1115
  where: CompactionJobWhere;
1086
1116
  started_at: string;
1087
- progress: CompactionJobProgress | null;
1088
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;
1089
1128
  interface CompactionSizes {
1090
1129
  before_tokens: number | null;
1091
1130
  after_tokens: number | null;
@@ -1334,8 +1373,10 @@ declare module "@danxbot/card-kit@1" {
1334
1373
  usd_saved: number;
1335
1374
  unpriced_loads: number;
1336
1375
  unresolved_loads: number;
1337
- compact_usd: number;
1376
+ compact_usd: number | null;
1338
1377
  compact_runs: number;
1378
+ pending_runs: number;
1379
+ unrecorded_runs: number;
1339
1380
  counted_since: string;
1340
1381
  }
1341
1382
  interface BuildGradeView {
@@ -1400,6 +1441,7 @@ declare module "@danxbot/card-kit@1" {
1400
1441
  commits: string[];
1401
1442
  tests: RetroTestViewV2[];
1402
1443
  commit_url_base?: string | null;
1444
+ behavior_signoffs: BehaviorSignoffReport;
1403
1445
  }
1404
1446
  interface AttachmentViewV2 {
1405
1447
  id: number;
@@ -1438,7 +1480,7 @@ declare module "@danxbot/card-kit@1" {
1438
1480
  quality_gate_round_id: number | null;
1439
1481
  items: ChecklistItemView[];
1440
1482
  }
1441
- type DesignDecisionOutcome = "approved" | "rejected" | "changes_requested";
1483
+ type DesignDecisionOutcome = "rejected" | "approved" | "changes_requested";
1442
1484
  interface ChecklistHistoryViewV2 {
1443
1485
  action: "create" | "rename" | "remove" | "add_item" | "update_item" | "remove_item";
1444
1486
  checklist: string;
@@ -1522,7 +1564,7 @@ declare module "@danxbot/card-kit@1" {
1522
1564
  created_by: string;
1523
1565
  created_at: string;
1524
1566
  archived_at: null | string;
1525
- review_state: "approved" | "rejected" | "awaiting_review" | "changes_requested";
1567
+ review_state: "rejected" | "approved" | "awaiting_review" | "changes_requested";
1526
1568
  revision_count: number;
1527
1569
  latest_revision_no: number;
1528
1570
  chosen_options: null | OptionSelection;
@@ -1549,7 +1591,7 @@ declare module "@danxbot/card-kit@1" {
1549
1591
  decisions?: undefined | (Array<{
1550
1592
  decision_id: number;
1551
1593
  revision_no: number;
1552
- outcome: "approved" | "rejected" | "changes_requested";
1594
+ outcome: "rejected" | "approved" | "changes_requested";
1553
1595
  note: null | string;
1554
1596
  comment_id: number;
1555
1597
  decided_by: string;
@@ -1659,7 +1701,7 @@ declare module "@danxbot/card-kit@1" {
1659
1701
  unread_decision_comment_counts?: undefined | Record<string, number>;
1660
1702
  unread_evidence_comment_counts?: undefined | Record<string, number>;
1661
1703
  context_size?: undefined | ContextSize;
1662
- 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; };
1663
1705
  content_compaction_history?: undefined | Array<CompactionRun>;
1664
1706
  compaction_savings?: undefined | null | CompactionSavings;
1665
1707
  agent_notes_count?: undefined | number;
@@ -1791,7 +1833,7 @@ declare module "@danxbot/card-kit@1" {
1791
1833
  made_by_name: null | string;
1792
1834
  made_by_author: AuthorV2;
1793
1835
  made_by_is_writer: boolean;
1794
- approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1836
+ approval_state: "rejected" | "approved" | "waiting" | "unreviewed";
1795
1837
  approvals: Array<EvidenceApprovalEventView>;
1796
1838
  review_problem_ref_num: null | number;
1797
1839
  }>);
@@ -1815,7 +1857,7 @@ declare module "@danxbot/card-kit@1" {
1815
1857
  made_by_name: null | string;
1816
1858
  made_by_author: AuthorV2;
1817
1859
  made_by_is_writer: boolean;
1818
- approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
1860
+ approval_state: "rejected" | "approved" | "waiting" | "unreviewed";
1819
1861
  approvals: Array<EvidenceApprovalEventView>;
1820
1862
  review_problem_ref_num: null | number;
1821
1863
  }>);
@@ -2057,7 +2099,7 @@ declare module "@danxbot/card-kit@1" {
2057
2099
  made_by_name: null | string;
2058
2100
  made_by_author: AuthorV2;
2059
2101
  made_by_is_writer: boolean;
2060
- approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
2102
+ approval_state: "rejected" | "approved" | "waiting" | "unreviewed";
2061
2103
  approvals: Array<EvidenceApprovalEventView>;
2062
2104
  review_problem_ref_num: null | number;
2063
2105
  }>);
@@ -2081,7 +2123,7 @@ declare module "@danxbot/card-kit@1" {
2081
2123
  made_by_name: null | string;
2082
2124
  made_by_author: AuthorV2;
2083
2125
  made_by_is_writer: boolean;
2084
- approval_state: "approved" | "rejected" | "waiting" | "unreviewed";
2126
+ approval_state: "rejected" | "approved" | "waiting" | "unreviewed";
2085
2127
  approvals: Array<EvidenceApprovalEventView>;
2086
2128
  review_problem_ref_num: null | number;
2087
2129
  }>);
@@ -2118,7 +2160,7 @@ declare module "@danxbot/card-kit@1" {
2118
2160
  created_by: string;
2119
2161
  created_at: string;
2120
2162
  archived_at: null | string;
2121
- review_state: "approved" | "rejected" | "awaiting_review" | "changes_requested";
2163
+ review_state: "rejected" | "approved" | "awaiting_review" | "changes_requested";
2122
2164
  revision_count: number;
2123
2165
  latest_revision_no: number;
2124
2166
  chosen_options: null | OptionSelection;
@@ -2145,7 +2187,7 @@ declare module "@danxbot/card-kit@1" {
2145
2187
  decisions?: undefined | (Array<{
2146
2188
  decision_id: number;
2147
2189
  revision_no: number;
2148
- outcome: "approved" | "rejected" | "changes_requested";
2190
+ outcome: "rejected" | "approved" | "changes_requested";
2149
2191
  note: null | string;
2150
2192
  comment_id: number;
2151
2193
  decided_by: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@50arms/plugin-sdk",
3
- "version": "0.2.72",
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",