@danxbot/plugin-sdk 0.2.38 → 0.2.39

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 +52 -38
  2. package/package.json +2 -2
@@ -44,6 +44,8 @@ declare module "@danxbot/card-kit@1" {
44
44
  values: StatusReasonValues;
45
45
  }
46
46
  type PacingLimit = "five_hour" | "weekly" | "spend";
47
+ type ProvenanceSourceKind = "card" | "comment" | "session_thread" | "problem" | "url";
48
+ type ProvenancePartyKind = "person" | "agent";
47
49
 
48
50
  type IssueStatus$1 = "Review" | "ToDo" | "In Progress" | "Backlog" | "Done" | "Cancelled";
49
51
  type EffortLevelName = "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
@@ -212,13 +214,20 @@ declare module "@danxbot/card-kit@1" {
212
214
  deleted_at: string | null;
213
215
  }
214
216
  type QualityGateStatus = "pending" | "pass" | "fail" | "skipped";
215
- type AnswerProvenanceSource = "comment" | "session_thread";
216
- interface DecisionProvenanceV2 {
217
- source: AnswerProvenanceSource;
218
- source_ref: string;
219
- quote: string;
220
- recorded_by: string;
221
- comment_issue_id: string | null;
217
+ interface ProvenanceRecordV2 {
218
+ id: number;
219
+ quote: string | null;
220
+ reasoning: string | null;
221
+ source: ProvenanceSourceV2 | null;
222
+ recorded_by: AuthorV2;
223
+ recorded_at: string;
224
+ }
225
+ interface ProvenanceSourceV2 {
226
+ kind: ProvenanceSourceKind;
227
+ ref: string;
228
+ card_id: string | null;
229
+ author: AuthorV2 | null;
230
+ at: string | null;
222
231
  }
223
232
 
224
233
  type QualityGatePhase = "plan" | "code";
@@ -265,7 +274,7 @@ declare module "@danxbot/card-kit@1" {
265
274
  }
266
275
  type DecisionRecordKind = "design" | "business_rule" | "architecture" | "other";
267
276
  type DecisionRecordAction = "created" | "changed" | "deleted" | "restored";
268
- type DecisionMadeBy = "human" | "agent";
277
+ type DecisionMadeBy = "agent" | "human";
269
278
  type DecisionApprovalAction = "approve" | "unapprove";
270
279
 
271
280
  interface DecisionApprovalState {
@@ -274,12 +283,6 @@ declare module "@danxbot/card-kit@1" {
274
283
  by_name: string | null;
275
284
  at: string | null;
276
285
  }
277
- interface DecisionProvenanceView {
278
- text: string;
279
- problem_id: number | null;
280
- comment_id: number | null;
281
- card_id: string | null;
282
- }
283
286
 
284
287
  type ListType = "archived" | "review" | "ready" | "in_progress" | "completed" | "cancelled";
285
288
 
@@ -400,12 +403,7 @@ declare module "@danxbot/card-kit@1" {
400
403
  made_by_email: string | null;
401
404
  made_by_name: string | null;
402
405
  made_by_team_agent: string | null;
403
- provenance: {
404
- text: string;
405
- problem_index: number | null;
406
- comment_index: number | null;
407
- card_id: string | null;
408
- };
406
+ provenance: V2CopyProvenanceRecord[];
409
407
  author: string;
410
408
  team_agent: string | null;
411
409
  created_at: string;
@@ -499,14 +497,29 @@ declare module "@danxbot/card-kit@1" {
499
497
  decided_by: string;
500
498
  decided_at: string;
501
499
  retracted_at: string | null;
502
- provenance: V2CopyDecisionProvenance | null;
500
+ provenance: V2CopyProvenanceRecord | null;
503
501
  }
504
- interface V2CopyDecisionProvenance {
505
- source: AnswerProvenanceSource;
506
- source_ref: string;
507
- quote: string;
508
- recorded_by: string;
502
+ interface V2CopyProvenanceParty {
503
+ kind: ProvenancePartyKind;
504
+ email: string | null;
505
+ team_agent: string | null;
506
+ name: string;
507
+ }
508
+ interface V2CopyProvenanceSource {
509
+ kind: ProvenanceSourceKind;
510
+ ref: string;
509
511
  comment_index: number | null;
512
+ problem_index: number | null;
513
+ card_linked: boolean;
514
+ author: V2CopyProvenanceParty | null;
515
+ at: string | null;
516
+ }
517
+ interface V2CopyProvenanceRecord {
518
+ quote: string | null;
519
+ reasoning: string | null;
520
+ source: V2CopyProvenanceSource | null;
521
+ recorded_by: V2CopyProvenanceParty;
522
+ recorded_at: string;
510
523
  }
511
524
  interface V2CopyProblem {
512
525
  statement: string;
@@ -576,7 +589,7 @@ declare module "@danxbot/card-kit@1" {
576
589
  name: string;
577
590
  avatar_url: string | null;
578
591
  }
579
- type AssignedAgentKind = "session" | "person" | "worker" | "label";
592
+ type AssignedAgentKind = "person" | "session" | "worker" | "label";
580
593
 
581
594
  interface UsageTokenCounts {
582
595
  input: number;
@@ -941,6 +954,7 @@ declare module "@danxbot/card-kit@1" {
941
954
  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; };
942
955
  problem_total?: undefined | number;
943
956
  decision_record_total?: undefined | number;
957
+ decision_record_approved_total?: undefined | number;
944
958
  lane_header?: undefined | false | true;
945
959
  design_count?: undefined | number;
946
960
  open_action_count?: undefined | number;
@@ -950,7 +964,7 @@ declare module "@danxbot/card-kit@1" {
950
964
  dispatch?: undefined | null | { started_at: string | null; };
951
965
  dispatch_kind?: undefined | null | "work" | "triage" | "recovery" | "flesh-out" | "chat" | "main-sync-repair" | "worktree-maintenance" | "manual" | "landing" | `gate-${string}`;
952
966
  assignment_mode?: undefined | "manual" | "automated";
953
- assigned_agent_kind?: undefined | null | "session" | "person" | "worker" | "label";
967
+ assigned_agent_kind?: undefined | null | "person" | "session" | "worker" | "label";
954
968
  assigned_agent_pause?: undefined | null | HolderAgentPause;
955
969
  assigned_agent_repo_copy?: undefined | null | RepoProfileCopy;
956
970
  latest_work_dispatch?: undefined | null | LatestWorkDispatchViewV2;
@@ -1019,12 +1033,12 @@ declare module "@danxbot/card-kit@1" {
1019
1033
  kind: "design" | "business_rule" | "architecture" | "other";
1020
1034
  impact: number;
1021
1035
  confidence: number;
1022
- made_by: "human" | "agent";
1036
+ made_by: "agent" | "human";
1023
1037
  made_by_user_id: null | number;
1024
1038
  made_by_name: null | string;
1025
1039
  made_by_author: AuthorV2;
1026
1040
  made_by_is_writer: boolean;
1027
- provenance: DecisionProvenanceView;
1041
+ provenance: Array<ProvenanceRecordV2>;
1028
1042
  author: string;
1029
1043
  by: AuthorV2;
1030
1044
  via_key: null | ViaKey;
@@ -1041,12 +1055,12 @@ declare module "@danxbot/card-kit@1" {
1041
1055
  kind: "design" | "business_rule" | "architecture" | "other";
1042
1056
  impact: number;
1043
1057
  confidence: number;
1044
- made_by: "human" | "agent";
1058
+ made_by: "agent" | "human";
1045
1059
  made_by_user_id: null | number;
1046
1060
  made_by_name: null | string;
1047
1061
  made_by_author: AuthorV2;
1048
1062
  made_by_is_writer: boolean;
1049
- provenance: DecisionProvenanceView;
1063
+ provenance: Array<ProvenanceRecordV2>;
1050
1064
  author: string;
1051
1065
  by: AuthorV2;
1052
1066
  via_key: null | ViaKey;
@@ -1074,12 +1088,12 @@ declare module "@danxbot/card-kit@1" {
1074
1088
  kind: "design" | "business_rule" | "architecture" | "other";
1075
1089
  impact: number;
1076
1090
  confidence: number;
1077
- made_by: "human" | "agent";
1091
+ made_by: "agent" | "human";
1078
1092
  made_by_user_id: null | number;
1079
1093
  made_by_name: null | string;
1080
1094
  made_by_author: AuthorV2;
1081
1095
  made_by_is_writer: boolean;
1082
- provenance: DecisionProvenanceView;
1096
+ provenance: Array<ProvenanceRecordV2>;
1083
1097
  author: string;
1084
1098
  by: AuthorV2;
1085
1099
  via_key: null | ViaKey;
@@ -1271,7 +1285,7 @@ declare module "@danxbot/card-kit@1" {
1271
1285
  decided_at: string;
1272
1286
  retracted_at: null | string;
1273
1287
  relayed_by_session: null | string;
1274
- provenance: null | DecisionProvenanceV2;
1288
+ provenance: null | ProvenanceRecordV2;
1275
1289
  content_hash: string;
1276
1290
  }>;
1277
1291
  feedback_consent: boolean;
@@ -1300,12 +1314,12 @@ declare module "@danxbot/card-kit@1" {
1300
1314
  kind: "design" | "business_rule" | "architecture" | "other";
1301
1315
  impact: number;
1302
1316
  confidence: number;
1303
- made_by: "human" | "agent";
1317
+ made_by: "agent" | "human";
1304
1318
  made_by_user_id: null | number;
1305
1319
  made_by_name: null | string;
1306
1320
  made_by_author: AuthorV2;
1307
1321
  made_by_is_writer: boolean;
1308
- provenance: DecisionProvenanceView;
1322
+ provenance: Array<ProvenanceRecordV2>;
1309
1323
  author: string;
1310
1324
  by: AuthorV2;
1311
1325
  via_key: null | ViaKey;
@@ -1400,7 +1414,7 @@ declare module "@danxbot/card-kit@1" {
1400
1414
  decided_at: string;
1401
1415
  retracted_at: string | null;
1402
1416
  relayed_by_session: string | null;
1403
- provenance: DecisionProvenanceV2 | null;
1417
+ provenance: ProvenanceRecordV2 | null;
1404
1418
  content_hash: string;
1405
1419
  }
1406
1420
  interface CardRefViewV2 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/plugin-sdk",
3
- "version": "0.2.38",
3
+ "version": "0.2.39",
4
4
  "description": "SDK for building 50 Arms card-type plugins (DX-5170): the card kit's type declarations, 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",
@@ -46,7 +46,7 @@
46
46
  "test": "vitest run"
47
47
  },
48
48
  "devDependencies": {
49
- "@danxbot/ui": "28.14.0",
49
+ "@danxbot/ui": "28.16.0",
50
50
  "@types/node": "^22.0.0",
51
51
  "@types/react": "^19.2.2",
52
52
  "esbuild": "^0.25.0",