@danxbot/plugin-sdk 0.2.35 → 0.2.38

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.
package/README.md CHANGED
@@ -41,6 +41,8 @@ export function CardView({ card, mutation }: CardViewProps) {
41
41
 
42
42
  `vite build` writes the plugin to `dist/`: `index.js` (the entry), `chunks/` for code splitting, `index.css`, source maps, and `danx-plugin.json`, the manifest listing every file with its size and sha256 and the runtime majors the plugin was built against.
43
43
 
44
+ A plugin styles itself with its own CSS (import a `.css` file; the build emits it as `index.css`) over the design system's runtime tokens such as `var(--surface)` and `var(--accent)`: the app's stylesheet holds only the utility classes the app's own source uses, so a utility class in a plugin may be missing at run time. A plugin changes cards with the kit's writes (`createCard`, `editCard`, `transitionCard`). A list view about one card type reads its cards with `useCardsOfType(scope, type)`, never by filtering `useBoardLaneState`'s lanes: those hold a window of each status, so cards would go missing.
45
+
44
46
  The build refuses to bundle a copy of React, React DOM, `@danxbot/ui` or `react-router`: import only the specifiers above. For routing, use the kit's `Link` and `useNavigate`; `StandardCardPage` reads the plan the page was opened from out of the URL, so a view that wraps it passes only `{card, mutation}`.
45
47
 
46
48
  ## The card kit is a contract
@@ -47,7 +47,7 @@ declare module "@danxbot/card-kit@1" {
47
47
 
48
48
  type IssueStatus$1 = "Review" | "ToDo" | "In Progress" | "Backlog" | "Done" | "Cancelled";
49
49
  type EffortLevelName = "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
50
- type IssueProblemType = "question" | "action" | "design";
50
+ type IssueProblemType = "question" | "action" | "design" | "decision_review";
51
51
  type DecisionOutcome = "answered" | "rejected";
52
52
  type IssueDependencyKind = "depends_on" | "conflict_on";
53
53
  type IssueDispatchKind = "work" | "triage" | "recovery" | "flesh-out" | "chat" | "main-sync-repair" | "worktree-maintenance" | "manual" | "landing" | `gate-${string}`;
@@ -113,6 +113,12 @@ declare module "@danxbot/card-kit@1" {
113
113
  triage_enabled: boolean;
114
114
  content_hash: string;
115
115
  }
116
+ type CommentResourceType = "issue" | "plan" | "problem" | "design" | "decision";
117
+ interface CommentResourceTag {
118
+ tag: string;
119
+ resource_type: CommentResourceType | null;
120
+ resource_id: string | null;
121
+ }
116
122
  interface AuthorV2 {
117
123
  name: string;
118
124
  kind: "agent" | "person";
@@ -206,6 +212,14 @@ declare module "@danxbot/card-kit@1" {
206
212
  deleted_at: string | null;
207
213
  }
208
214
  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;
222
+ }
209
223
 
210
224
  type QualityGatePhase = "plan" | "code";
211
225
 
@@ -217,7 +231,7 @@ declare module "@danxbot/card-kit@1" {
217
231
  type SourceOrigin = "danxbot" | MirrorProviderId | "";
218
232
  type ControlValue = boolean | string;
219
233
 
220
- type ControlSource = "card" | "plan" | "board" | "system";
234
+ type ControlSource = "card" | "plan" | "board" | "team" | "system";
221
235
  interface ControlFallback {
222
236
  readonly value: ControlValue;
223
237
  readonly source: Exclude<ControlSource, "card">;
@@ -230,6 +244,43 @@ declare module "@danxbot/card-kit@1" {
230
244
  reason: StatusReason | ProfileName | null;
231
245
  }
232
246
 
247
+ type DocsPromotionStatus = "running" | "drafted" | "failed" | "landing" | "landed" | "superseded" | "waiting";
248
+
249
+ interface DocsReviewView {
250
+ plan_id: number;
251
+ repo: string;
252
+ attempt: number;
253
+ status: DocsPromotionStatus;
254
+ summary: string;
255
+ head_sha: string;
256
+ change_counts: {
257
+ added: number;
258
+ changed: number;
259
+ removed: number;
260
+ } | null;
261
+ landed_sha: string | null;
262
+ failure_reason: string | null;
263
+ approve_solution_id: number;
264
+ withdraw_solution_id: number;
265
+ }
266
+ type DecisionRecordKind = "design" | "business_rule" | "architecture" | "other";
267
+ type DecisionRecordAction = "created" | "changed" | "deleted" | "restored";
268
+ type DecisionMadeBy = "human" | "agent";
269
+ type DecisionApprovalAction = "approve" | "unapprove";
270
+
271
+ interface DecisionApprovalState {
272
+ approved: boolean;
273
+ by_user_id: number | null;
274
+ by_name: string | null;
275
+ at: string | null;
276
+ }
277
+ interface DecisionProvenanceView {
278
+ text: string;
279
+ problem_id: number | null;
280
+ comment_id: number | null;
281
+ card_id: string | null;
282
+ }
283
+
233
284
  type ListType = "archived" | "review" | "ready" | "in_progress" | "completed" | "cancelled";
234
285
 
235
286
  interface SolutionContent {
@@ -239,11 +290,7 @@ declare module "@danxbot/card-kit@1" {
239
290
  con: string;
240
291
  recommended: boolean;
241
292
  }
242
-
243
- interface DocsProposalPromotionV2 {
244
- plan_id: number;
245
- attempt: number;
246
- }
293
+ type DecisionReviewChoiceKind = "accept" | "revert" | "restore" | "reject";
247
294
 
248
295
  interface V2CopyComment {
249
296
  author: string;
@@ -266,6 +313,12 @@ declare module "@danxbot/card-kit@1" {
266
313
  } | {
267
314
  kind: "design";
268
315
  index: number;
316
+ } | {
317
+ kind: "decision";
318
+ index: number;
319
+ } | {
320
+ kind: "label";
321
+ text: string;
269
322
  };
270
323
  interface V2CopyBlobRef {
271
324
  sha256: string;
@@ -287,6 +340,7 @@ declare module "@danxbot/card-kit@1" {
287
340
  content: string;
288
341
  }[];
289
342
  option_groups: DesignOptionGroup[];
343
+ checklist: string[];
290
344
  built_from_commit: string;
291
345
  note: string;
292
346
  created_by: string;
@@ -329,15 +383,36 @@ declare module "@danxbot/card-kit@1" {
329
383
  created_at: string;
330
384
  updated_at: string;
331
385
  }
332
- interface V2CopyDocsProposal {
333
- repo: string;
334
- page_id: string;
335
- new_page_title: string | null;
336
- change: string;
386
+ interface V2CopyDecisionApproval {
387
+ action: DecisionApprovalAction;
388
+ by_email: string | null;
389
+ by_name: string;
390
+ at: string;
391
+ }
392
+ interface V2CopyDecisionVersion {
393
+ version_no: number;
394
+ action: DecisionRecordAction;
395
+ text: string;
396
+ kind: DecisionRecordKind;
397
+ impact: number;
398
+ confidence: number;
399
+ made_by: DecisionMadeBy;
400
+ made_by_email: string | null;
401
+ made_by_name: string | null;
402
+ 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
+ };
337
409
  author: string;
338
410
  team_agent: string | null;
339
411
  created_at: string;
340
- updated_at: string;
412
+ approvals: V2CopyDecisionApproval[];
413
+ }
414
+ interface V2CopyDecisionRecord {
415
+ versions: V2CopyDecisionVersion[];
341
416
  }
342
417
  interface V2CopyAc {
343
418
  title: string;
@@ -400,8 +475,17 @@ declare module "@danxbot/card-kit@1" {
400
475
  interface V2CopySolution extends SolutionContent {
401
476
  removed: boolean;
402
477
  design_index: number | null;
478
+ decision_choice: V2CopyDecisionChoice | null;
403
479
  steps: V2CopyStep[];
404
480
  }
481
+ interface V2CopyDecisionChoice {
482
+ kind: DecisionReviewChoiceKind;
483
+ version_no: number;
484
+ }
485
+ interface V2CopyDecisionReview {
486
+ record_index: number;
487
+ answered_version_no: number | null;
488
+ }
405
489
  interface V2CopyStep {
406
490
  title: string;
407
491
  description: string | null;
@@ -415,6 +499,14 @@ declare module "@danxbot/card-kit@1" {
415
499
  decided_by: string;
416
500
  decided_at: string;
417
501
  retracted_at: string | null;
502
+ provenance: V2CopyDecisionProvenance | null;
503
+ }
504
+ interface V2CopyDecisionProvenance {
505
+ source: AnswerProvenanceSource;
506
+ source_ref: string;
507
+ quote: string;
508
+ recorded_by: string;
509
+ comment_index: number | null;
418
510
  }
419
511
  interface V2CopyProblem {
420
512
  statement: string;
@@ -422,6 +514,7 @@ declare module "@danxbot/card-kit@1" {
422
514
  type: IssueProblemType;
423
515
  summary: string | null;
424
516
  design_element: string | null;
517
+ decision_review: V2CopyDecisionReview | null;
425
518
  removed: boolean;
426
519
  solutions: V2CopySolution[];
427
520
  decisions: V2CopyDecision[];
@@ -446,7 +539,8 @@ declare module "@danxbot/card-kit@1" {
446
539
  checklists: V2CopyChecklist[];
447
540
  comments: V2CopyComment[];
448
541
  agent_notes: V2CopyAgentNote[];
449
- docs_proposals: V2CopyDocsProposal[];
542
+ decision_records: V2CopyDecisionRecord[];
543
+ created_tags: V2CopyCommentTag[];
450
544
  dependencies: V2CopyDependency[];
451
545
  retro: V2CopyRetro | null;
452
546
  mirrors: V2CopyMirror[];
@@ -583,11 +677,29 @@ declare module "@danxbot/card-kit@1" {
583
677
  interface LiveQueryResult<T> {
584
678
  data: T | null;
585
679
  loading: boolean;
680
+ refreshing?: boolean;
586
681
  error: Error | null;
587
682
  connection: ConnectionState;
588
683
  refetch: () => void;
589
684
  }
590
685
 
686
+ interface CommentTagOption extends CommentResourceTag {
687
+ name: string | null;
688
+ card_id: string | null;
689
+ }
690
+
691
+ interface DescendantNeedsYouView {
692
+ readonly card_id: string;
693
+ readonly card_title: string;
694
+ readonly card_status: string;
695
+ readonly problems: readonly {
696
+ readonly id: number;
697
+ readonly type: IssueProblemType;
698
+ readonly statement: string;
699
+ readonly created_at: string;
700
+ }[];
701
+ }
702
+
591
703
  interface ReadinessBlocker {
592
704
  worker_id: string;
593
705
  incomplete_count: number;
@@ -729,7 +841,7 @@ declare module "@danxbot/card-kit@1" {
729
841
  name: string;
730
842
  items: ChecklistItemView[];
731
843
  }
732
- type DesignDecisionOutcome = "rejected" | "changes_requested" | "approved";
844
+ type DesignDecisionOutcome = "rejected" | "approved" | "changes_requested";
733
845
  interface ChecklistHistoryViewV2 {
734
846
  action: "create" | "rename" | "remove" | "add_item" | "update_item" | "remove_item";
735
847
  checklist: string;
@@ -763,7 +875,8 @@ declare module "@danxbot/card-kit@1" {
763
875
  via_key?: undefined | null | ViaKey;
764
876
  metadata?: unknown;
765
877
  answers_decision_id?: undefined | null | number;
766
- tags: Array<{ kind: "problem"; ref: number; } | { kind: "design"; ref: number; }>;
878
+ tags: Array<{ kind: "problem"; ref: number; } | { kind: "design"; ref: number; } | { kind: "decision"; ref: number; }>;
879
+ resource_tags: Array<CommentResourceTag>;
767
880
  reply_to_comment_id: null | number;
768
881
  reply_phase: null | "ack" | "reply";
769
882
  reply_state: null | CommentReplyStateV2;
@@ -827,6 +940,7 @@ declare module "@danxbot/card-kit@1" {
827
940
  pull_request_url?: undefined | null | string;
828
941
  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; };
829
942
  problem_total?: undefined | number;
943
+ decision_record_total?: undefined | number;
830
944
  lane_header?: undefined | false | true;
831
945
  design_count?: undefined | number;
832
946
  open_action_count?: undefined | number;
@@ -851,6 +965,8 @@ declare module "@danxbot/card-kit@1" {
851
965
  conflict_dep_ids?: undefined | Record<string, number>;
852
966
  conflict_on_active_count?: undefined | number;
853
967
  children?: undefined | Array<string>;
968
+ descendant_ids?: undefined | Array<string>;
969
+ descendant_needs_you?: undefined | Array<DescendantNeedsYouView>;
854
970
  blocked_descendants?: undefined | Array<InheritedBlockedViewV2>;
855
971
  child_assignments?: undefined | Array<ChildAssignmentViewV2>;
856
972
  ac_total?: undefined | number;
@@ -859,6 +975,7 @@ declare module "@danxbot/card-kit@1" {
859
975
  comments_count?: undefined | number;
860
976
  agent_notes_count?: undefined | number;
861
977
  comment_recipient?: undefined | { kind: "agent"; by: AuthorV2; reachability: CommentReachabilityV2; } | { kind: "none"; waiting_on: { kind: "plan"; id: number; name: string; } | { kind: "card"; id: string; }; };
978
+ comment_tags?: undefined | Array<CommentTagOption>;
862
979
  has_retro?: undefined | false | true;
863
980
  primary_attachment?: undefined | null | AttachmentPreviewV2;
864
981
  in_progress_derived?: undefined | false | true;
@@ -888,18 +1005,95 @@ declare module "@danxbot/card-kit@1" {
888
1005
  text: string;
889
1006
  metadata: unknown;
890
1007
  }>);
891
- docs_proposals?: undefined | (Array<{
1008
+ decision_records?: undefined | (Array<{
892
1009
  id: number;
893
- repo: string;
894
- page_id: string;
895
- new_page_title: null | string;
896
- change: string;
1010
+ ref: string;
1011
+ current_version: number;
1012
+ deleted_at: null | string;
1013
+ approved: boolean;
1014
+ approval: DecisionApprovalState;
1015
+ record_created_at: string;
1016
+ updated_at: string;
1017
+ action: "created" | "changed" | "deleted" | "restored";
1018
+ text: string;
1019
+ kind: "design" | "business_rule" | "architecture" | "other";
1020
+ impact: number;
1021
+ confidence: number;
1022
+ made_by: "human" | "agent";
1023
+ made_by_user_id: null | number;
1024
+ made_by_name: null | string;
1025
+ made_by_author: AuthorV2;
1026
+ made_by_is_writer: boolean;
1027
+ provenance: DecisionProvenanceView;
1028
+ author: string;
1029
+ by: AuthorV2;
1030
+ via_key: null | ViaKey;
1031
+ created_at: string;
1032
+ comment_count: number;
1033
+ versions?: undefined | (Array<{
1034
+ id: number;
1035
+ record_id: number;
1036
+ ref: string;
1037
+ version_no: number;
1038
+ approval: DecisionApprovalState;
1039
+ action: "created" | "changed" | "deleted" | "restored";
1040
+ text: string;
1041
+ kind: "design" | "business_rule" | "architecture" | "other";
1042
+ impact: number;
1043
+ confidence: number;
1044
+ made_by: "human" | "agent";
1045
+ made_by_user_id: null | number;
1046
+ made_by_name: null | string;
1047
+ made_by_author: AuthorV2;
1048
+ made_by_is_writer: boolean;
1049
+ provenance: DecisionProvenanceView;
897
1050
  author: string;
898
1051
  by: AuthorV2;
899
1052
  via_key: null | ViaKey;
900
- promotion: null | DocsProposalPromotionV2;
901
1053
  created_at: string;
902
- updated_at: string;
1054
+ }>);
1055
+ approvals?: undefined | (Array<{
1056
+ id: number;
1057
+ record_id: number;
1058
+ ref: string;
1059
+ version_no: number;
1060
+ action: "approve" | "unapprove";
1061
+ by_user_id: null | number;
1062
+ by_name: string;
1063
+ at: string;
1064
+ }>);
1065
+ }>);
1066
+ decision_record_versions?: undefined | (Array<{
1067
+ id: number;
1068
+ record_id: number;
1069
+ ref: string;
1070
+ version_no: number;
1071
+ approval: DecisionApprovalState;
1072
+ action: "created" | "changed" | "deleted" | "restored";
1073
+ text: string;
1074
+ kind: "design" | "business_rule" | "architecture" | "other";
1075
+ impact: number;
1076
+ confidence: number;
1077
+ made_by: "human" | "agent";
1078
+ made_by_user_id: null | number;
1079
+ made_by_name: null | string;
1080
+ made_by_author: AuthorV2;
1081
+ made_by_is_writer: boolean;
1082
+ provenance: DecisionProvenanceView;
1083
+ author: string;
1084
+ by: AuthorV2;
1085
+ via_key: null | ViaKey;
1086
+ created_at: string;
1087
+ }>);
1088
+ decision_record_approvals?: undefined | (Array<{
1089
+ id: number;
1090
+ record_id: number;
1091
+ ref: string;
1092
+ version_no: number;
1093
+ action: "approve" | "unapprove";
1094
+ by_user_id: null | number;
1095
+ by_name: string;
1096
+ at: string;
903
1097
  }>);
904
1098
  designs?: undefined | (Array<{
905
1099
  id: number;
@@ -908,7 +1102,7 @@ declare module "@danxbot/card-kit@1" {
908
1102
  created_by: string;
909
1103
  created_at: string;
910
1104
  archived_at: null | string;
911
- review_state: "rejected" | "awaiting_review" | "changes_requested" | "approved";
1105
+ review_state: "rejected" | "approved" | "awaiting_review" | "changes_requested";
912
1106
  revision_count: number;
913
1107
  latest_revision_no: number;
914
1108
  chosen_options: null | OptionSelection;
@@ -925,12 +1119,13 @@ declare module "@danxbot/card-kit@1" {
925
1119
  bundle_available: boolean;
926
1120
  screenshot_available: boolean;
927
1121
  option_groups: Array<DesignOptionGroup>;
1122
+ checklist: Array<string>;
928
1123
  source_files?: undefined | Array<DesignSourceFile>;
929
1124
  }>);
930
1125
  decisions?: undefined | (Array<{
931
1126
  decision_id: number;
932
1127
  revision_no: number;
933
- outcome: "rejected" | "changes_requested" | "approved";
1128
+ outcome: "rejected" | "approved" | "changes_requested";
934
1129
  note: null | string;
935
1130
  decided_by: string;
936
1131
  decided_by_ref: ActorRef;
@@ -940,9 +1135,9 @@ declare module "@danxbot/card-kit@1" {
940
1135
  }>);
941
1136
  pull_request_reviews?: undefined | (Array<{
942
1137
  id: number;
943
- kind: "review" | "comment" | "thread";
1138
+ kind: "comment" | "review" | "thread";
944
1139
  author_login: string;
945
- state: null | "changes_requested" | "approved" | "commented" | "dismissed";
1140
+ state: null | "approved" | "changes_requested" | "commented" | "dismissed";
946
1141
  body: string;
947
1142
  html_url: string;
948
1143
  path: null | string;
@@ -976,12 +1171,17 @@ declare module "@danxbot/card-kit@1" {
976
1171
  id: number;
977
1172
  ref: string;
978
1173
  name: string;
1174
+ }>;
1175
+ inherited_plans?: undefined | Array<{
1176
+ id: number;
1177
+ ref: string;
1178
+ name: string;
979
1179
  }>;
980
1180
  mirrors?: undefined | (Array<{
981
1181
  target_type: "trello" | "slack" | "asana";
982
1182
  target_url: string;
983
1183
  sync_state: "synced" | "out_of_sync" | "error" | "dead" | "unavailable" | "diverged";
984
- dead_reason: "" | "archived" | "deleted";
1184
+ dead_reason: "" | "deleted" | "archived";
985
1185
  source_ref: string;
986
1186
  last_error: null | StatusReason;
987
1187
  owed: Array<"comments" | "checklists" | "attachments" | "title" | "description" | "status" | "type" | "priority" | "parent_child" | "dependencies" | "card_create" | "card_delete">;
@@ -1010,10 +1210,10 @@ declare module "@danxbot/card-kit@1" {
1010
1210
  }>);
1011
1211
  controls?: undefined | (Array<{
1012
1212
  key: string;
1013
- scope: "board" | "plan" | "card";
1213
+ scope: "board" | "plan" | "card" | "team";
1014
1214
  scope_id: string;
1015
1215
  value: null | string | false | true;
1016
- source: "board" | "plan" | "card" | "system" | "inherit";
1216
+ source: "board" | "plan" | "card" | "team" | "system" | "inherit";
1017
1217
  base_hash: string;
1018
1218
  kind: "boolean" | "enum" | "branch" | "markdown";
1019
1219
  options: null | Array<string>;
@@ -1021,9 +1221,12 @@ declare module "@danxbot/card-kit@1" {
1021
1221
  system_default: string | false | true;
1022
1222
  fallback: null | ControlFallback;
1023
1223
  overridable: boolean;
1224
+ default_changed: boolean;
1024
1225
  }>);
1025
1226
  comments_page?: undefined | RelationPageView;
1026
1227
  agent_notes_page?: undefined | RelationPageView;
1228
+ decision_record_versions_page?: undefined | RelationPageView;
1229
+ decision_record_approvals_page?: undefined | RelationPageView;
1027
1230
  history_page?: undefined | RelationPageView;
1028
1231
  problems?: undefined | Array<ProblemViewV2>;
1029
1232
  subtree?: undefined | Array<IssueViewV2>;
@@ -1046,7 +1249,7 @@ declare module "@danxbot/card-kit@1" {
1046
1249
  phase: "plan" | "code";
1047
1250
  };
1048
1251
  type ProblemViewV2 = {
1049
- type: "question" | "action" | "design";
1252
+ type: "question" | "action" | "design" | "decision_review";
1050
1253
  open: boolean;
1051
1254
  ordinal: number;
1052
1255
  id: number;
@@ -1054,6 +1257,7 @@ declare module "@danxbot/card-kit@1" {
1054
1257
  updated_at: string;
1055
1258
  content_hash: string;
1056
1259
  summary: null | string;
1260
+ comment_count: number;
1057
1261
  decisions: Array<{
1058
1262
  id: number;
1059
1263
  problem_id: number;
@@ -1067,17 +1271,47 @@ declare module "@danxbot/card-kit@1" {
1067
1271
  decided_at: string;
1068
1272
  retracted_at: null | string;
1069
1273
  relayed_by_session: null | string;
1274
+ provenance: null | DecisionProvenanceV2;
1070
1275
  content_hash: string;
1071
1276
  }>;
1072
1277
  feedback_consent: boolean;
1073
1278
  choice_locked: boolean;
1074
- comment_count: number;
1279
+ docs_review: null | DocsReviewView;
1075
1280
  needs_person: boolean;
1076
1281
  issue_id: string;
1077
1282
  statement: string;
1078
1283
  context: null | string;
1079
1284
  design_element: null | string;
1080
1285
  solutions: Array<SolutionViewV2>;
1286
+ decision_review?: undefined | (Array<{
1287
+ problem_id: number;
1288
+ record_id: number;
1289
+ record_ref: string;
1290
+ answered_version_no: null | number;
1291
+ choices: Array<{ solution_id: number; kind: DecisionReviewChoiceKind; version_no: number; title: string; }>;
1292
+ versions?: undefined | (Array<{
1293
+ id: number;
1294
+ record_id: number;
1295
+ ref: string;
1296
+ version_no: number;
1297
+ approval: DecisionApprovalState;
1298
+ action: "created" | "changed" | "deleted" | "restored";
1299
+ text: string;
1300
+ kind: "design" | "business_rule" | "architecture" | "other";
1301
+ impact: number;
1302
+ confidence: number;
1303
+ made_by: "human" | "agent";
1304
+ made_by_user_id: null | number;
1305
+ made_by_name: null | string;
1306
+ made_by_author: AuthorV2;
1307
+ made_by_is_writer: boolean;
1308
+ provenance: DecisionProvenanceView;
1309
+ author: string;
1310
+ by: AuthorV2;
1311
+ via_key: null | ViaKey;
1312
+ created_at: string;
1313
+ }>);
1314
+ }>);
1081
1315
  };
1082
1316
  type SolutionViewV2 = {
1083
1317
  title: string;
@@ -1109,7 +1343,7 @@ declare module "@danxbot/card-kit@1" {
1109
1343
  created_by: string;
1110
1344
  created_at: string;
1111
1345
  archived_at: null | string;
1112
- review_state: "rejected" | "awaiting_review" | "changes_requested" | "approved";
1346
+ review_state: "rejected" | "approved" | "awaiting_review" | "changes_requested";
1113
1347
  revision_count: number;
1114
1348
  latest_revision_no: number;
1115
1349
  chosen_options: null | OptionSelection;
@@ -1126,12 +1360,13 @@ declare module "@danxbot/card-kit@1" {
1126
1360
  bundle_available: boolean;
1127
1361
  screenshot_available: boolean;
1128
1362
  option_groups: Array<DesignOptionGroup>;
1363
+ checklist: Array<string>;
1129
1364
  source_files?: undefined | Array<DesignSourceFile>;
1130
1365
  }>);
1131
1366
  decisions?: undefined | (Array<{
1132
1367
  decision_id: number;
1133
1368
  revision_no: number;
1134
- outcome: "rejected" | "changes_requested" | "approved";
1369
+ outcome: "rejected" | "approved" | "changes_requested";
1135
1370
  note: null | string;
1136
1371
  decided_by: string;
1137
1372
  decided_by_ref: ActorRef;
@@ -1165,6 +1400,7 @@ declare module "@danxbot/card-kit@1" {
1165
1400
  decided_at: string;
1166
1401
  retracted_at: string | null;
1167
1402
  relayed_by_session: string | null;
1403
+ provenance: DecisionProvenanceV2 | null;
1168
1404
  content_hash: string;
1169
1405
  }
1170
1406
  interface CardRefViewV2 {
@@ -1177,6 +1413,18 @@ declare module "@danxbot/card-kit@1" {
1177
1413
 
1178
1414
  type LifecycleAction = Extract<TransitionAction, "ready" | "unready" | "complete" | "cancel" | "reopen">;
1179
1415
 
1416
+ interface CardEditPatch {
1417
+ title?: string;
1418
+ description?: string;
1419
+ summary?: string | null;
1420
+ pull_request_url?: string | null;
1421
+ priority?: number;
1422
+ type?: CardTypeKey;
1423
+ parent_id?: string | null;
1424
+ effort_level?: EffortLevelName;
1425
+ content_hash?: string;
1426
+ }
1427
+ function editCard(id: string, patch: CardEditPatch): Promise<void>;
1180
1428
  function transitionCard(id: string, action: LifecycleAction | "unblock" | "archive"): Promise<void>;
1181
1429
  type PriorityPlacement = {
1182
1430
  side: "after" | "before";
@@ -1213,6 +1461,47 @@ declare module "@danxbot/card-kit@1" {
1213
1461
  run: (key: string, failureTitle: string, op: () => Promise<void>) => Promise<boolean>;
1214
1462
  }
1215
1463
  function useCardMutation(): CardMutation;
1464
+
1465
+ type PlanWire = number | {
1466
+ name: string;
1467
+ } | null;
1468
+
1469
+ interface NewCardInput {
1470
+ board: string;
1471
+ type: CardTypeKey;
1472
+ title: string;
1473
+ priority: number;
1474
+ plan: PlanWire;
1475
+ description: string;
1476
+ }
1477
+ function createCard(input: NewCardInput): Promise<string>;
1478
+
1479
+ interface ChildProgress {
1480
+ done: number;
1481
+ total: number;
1482
+ }
1483
+ interface CardStatusPresentation {
1484
+ label: string;
1485
+ icon: string;
1486
+ reason: string | null;
1487
+ live: boolean;
1488
+ isContainer: boolean;
1489
+ childProgress: ChildProgress | null;
1490
+ }
1491
+ type SnoozePresentation = {
1492
+ active: false;
1493
+ } | {
1494
+ active: true;
1495
+ wakeAt: string;
1496
+ wakeAction: "ready" | "review";
1497
+ };
1498
+ interface GateBreakdownEntry {
1499
+ gate: string;
1500
+ label: string;
1501
+ status: GateVerdict;
1502
+ }
1503
+ const defaultNewCardPriority: () => number;
1504
+ type GateVerdict = QualityGateViewV2["status"];
1216
1505
  type HideableLane = "Cancelled" | "Backlog";
1217
1506
  interface LaneVisibility {
1218
1507
  isShown: (lane: IssueStatus$1) => boolean;
@@ -1249,6 +1538,8 @@ declare module "@danxbot/card-kit@1" {
1249
1538
  }
1250
1539
  function useBoardLaneState(scope: BoardScope): BoardLaneState;
1251
1540
 
1541
+ function useCardsOfType(scope: BoardScope, type: string): LiveQueryResult<readonly IssueViewV2[]>;
1542
+
1252
1543
  function boardCardPath(cardId: string): string;
1253
1544
  function planCardPath(planId: number, cardId: string, planSearch?: string): string;
1254
1545
  function planPathFromCard(planId: number, cardSearch?: string): string;
@@ -1276,32 +1567,6 @@ declare module "@danxbot/card-kit@1" {
1276
1567
  mutation: CardMutation;
1277
1568
  }): react.JSX.Element;
1278
1569
 
1279
- interface ChildProgress {
1280
- done: number;
1281
- total: number;
1282
- }
1283
- interface CardStatusPresentation {
1284
- label: string;
1285
- icon: string;
1286
- reason: string | null;
1287
- live: boolean;
1288
- isContainer: boolean;
1289
- childProgress: ChildProgress | null;
1290
- }
1291
- type SnoozePresentation = {
1292
- active: false;
1293
- } | {
1294
- active: true;
1295
- wakeAt: string;
1296
- wakeAction: "ready" | "review";
1297
- };
1298
- interface GateBreakdownEntry {
1299
- gate: string;
1300
- label: string;
1301
- status: GateVerdict;
1302
- }
1303
- type GateVerdict = QualityGateViewV2["status"];
1304
-
1305
1570
  interface ProblemAttention {
1306
1571
  problem: ProblemViewV2;
1307
1572
  solutions: SolutionViewV2[];
@@ -1527,6 +1792,6 @@ declare module "@danxbot/card-kit@1" {
1527
1792
  readonly cardPath: (cardId: string) => string;
1528
1793
  }
1529
1794
 
1530
- export { ActivityTab, AttachmentsTab, AttentionZone, CardActionsMenu, CardBoard, CardFace, CardLink, ChecklistsSection, ChildrenSection, DependenciesSection, EditableContext, EditableSummary, EditableTitle, EffortControl, GatesSection, ParentField, PlansField, PriorityControl, ProblemsSection, RetroTab, StandardCardPage, StatusControl, TypeControl, WorkStateControl, boardCardPath, planCardPath, planPathFromCard, requestBoardMove, transitionCard, useAttachmentActions, useBoardLaneState, useIssueDetail as useCard, useCardMutation };
1531
- export type { AttachmentActions, BoardLaneState, BoardMoveResult, BoardScope, CardFaceProps, CardListViewProps, CardMutation, CardViewProps, IssueViewV2, LaneMoveRequest, LiveQueryResult, StandardCardPageProps };
1795
+ export { ActivityTab, AttachmentsTab, AttentionZone, CardActionsMenu, CardBoard, CardFace, CardLink, ChecklistsSection, ChildrenSection, DependenciesSection, EditableContext, EditableSummary, EditableTitle, EffortControl, GatesSection, ParentField, PlansField, PriorityControl, ProblemsSection, RetroTab, StandardCardPage, StatusControl, TypeControl, WorkStateControl, boardCardPath, createCard, defaultNewCardPriority, editCard, planCardPath, planPathFromCard, requestBoardMove, transitionCard, useAttachmentActions, useBoardLaneState, useIssueDetail as useCard, useCardMutation, useCardsOfType };
1796
+ export type { AttachmentActions, BoardLaneState, BoardMoveResult, BoardScope, CardEditPatch, CardFaceProps, CardListViewProps, CardMutation, CardViewProps, IssueViewV2, LaneMoveRequest, LiveQueryResult, NewCardInput, StandardCardPageProps };
1532
1797
  }
package/dist/cli.js CHANGED
@@ -5850,14 +5850,14 @@ function gitFailure(err) {
5850
5850
  }
5851
5851
  async function gitFiles(dir) {
5852
5852
  try {
5853
- await execFileAsync("git", ["rev-parse", "--is-inside-work-tree"], { cwd: dir });
5853
+ await execFileAsync("git", ["rev-parse", "--is-inside-work-tree"], { cwd: dir, windowsHide: true });
5854
5854
  } catch (err) {
5855
5855
  if (err.code === 128 && /not a git repository/i.test(gitFailure(err))) return null;
5856
5856
  throw new Error(`danx-plugin: git could not tell whether ${dir} is a work tree: ${gitFailure(err)}`);
5857
5857
  }
5858
5858
  let stdout;
5859
5859
  try {
5860
- ({ stdout } = await execFileAsync("git", ["ls-files", "-z", "--cached", "--others", "--exclude-standard"], { cwd: dir, maxBuffer: 64 * 1024 * 1024 }));
5860
+ ({ stdout } = await execFileAsync("git", ["ls-files", "-z", "--cached", "--others", "--exclude-standard"], { cwd: dir, windowsHide: true, maxBuffer: 64 * 1024 * 1024 }));
5861
5861
  } catch (err) {
5862
5862
  throw new Error(`danx-plugin: git ls-files failed in ${dir}: ${gitFailure(err)}`);
5863
5863
  }
@@ -5916,7 +5916,7 @@ var BUILD_OUTPUT_TAIL_CHARS = 4e3;
5916
5916
  function runProjectBuild(projectDir) {
5917
5917
  return new Promise((resolvePromise, reject) => {
5918
5918
  let output = "";
5919
- const child = spawn("npm", ["run", "build"], { cwd: projectDir, shell: process.platform === "win32", stdio: ["ignore", "pipe", "pipe"] });
5919
+ const child = spawn("npm", ["run", "build"], { cwd: projectDir, windowsHide: true, shell: process.platform === "win32", stdio: ["ignore", "pipe", "pipe"] });
5920
5920
  const keep = (chunk) => {
5921
5921
  output = (output + chunk.toString("utf8")).slice(-BUILD_OUTPUT_TAIL_CHARS);
5922
5922
  };
package/dist/publish.js CHANGED
@@ -5845,14 +5845,14 @@ function gitFailure(err) {
5845
5845
  }
5846
5846
  async function gitFiles(dir) {
5847
5847
  try {
5848
- await execFileAsync("git", ["rev-parse", "--is-inside-work-tree"], { cwd: dir });
5848
+ await execFileAsync("git", ["rev-parse", "--is-inside-work-tree"], { cwd: dir, windowsHide: true });
5849
5849
  } catch (err) {
5850
5850
  if (err.code === 128 && /not a git repository/i.test(gitFailure(err))) return null;
5851
5851
  throw new Error(`danx-plugin: git could not tell whether ${dir} is a work tree: ${gitFailure(err)}`);
5852
5852
  }
5853
5853
  let stdout;
5854
5854
  try {
5855
- ({ stdout } = await execFileAsync("git", ["ls-files", "-z", "--cached", "--others", "--exclude-standard"], { cwd: dir, maxBuffer: 64 * 1024 * 1024 }));
5855
+ ({ stdout } = await execFileAsync("git", ["ls-files", "-z", "--cached", "--others", "--exclude-standard"], { cwd: dir, windowsHide: true, maxBuffer: 64 * 1024 * 1024 }));
5856
5856
  } catch (err) {
5857
5857
  throw new Error(`danx-plugin: git ls-files failed in ${dir}: ${gitFailure(err)}`);
5858
5858
  }
@@ -5911,7 +5911,7 @@ var BUILD_OUTPUT_TAIL_CHARS = 4e3;
5911
5911
  function runProjectBuild(projectDir) {
5912
5912
  return new Promise((resolvePromise, reject) => {
5913
5913
  let output = "";
5914
- const child = spawn("npm", ["run", "build"], { cwd: projectDir, shell: process.platform === "win32", stdio: ["ignore", "pipe", "pipe"] });
5914
+ const child = spawn("npm", ["run", "build"], { cwd: projectDir, windowsHide: true, shell: process.platform === "win32", stdio: ["ignore", "pipe", "pipe"] });
5915
5915
  const keep = (chunk) => {
5916
5916
  output = (output + chunk.toString("utf8")).slice(-BUILD_OUTPUT_TAIL_CHARS);
5917
5917
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/plugin-sdk",
3
- "version": "0.2.35",
3
+ "version": "0.2.38",
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.4.0",
49
+ "@danxbot/ui": "28.14.0",
50
50
  "@types/node": "^22.0.0",
51
51
  "@types/react": "^19.2.2",
52
52
  "esbuild": "^0.25.0",