@danxbot/plugin-sdk 0.2.28 → 0.2.31

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.
@@ -4,6 +4,15 @@ declare module "@danxbot/card-kit@1" {
4
4
  import { ReactNode } from 'react';
5
5
  export { Link, useNavigate } from 'react-router';
6
6
 
7
+ interface DesignOptionGroup {
8
+ key: string;
9
+ label: string;
10
+ options: string[];
11
+ multiple: boolean;
12
+ recommended: string[];
13
+ }
14
+ type OptionSelection = Record<string, string[]>;
15
+
7
16
  type CardTypeKey = string;
8
17
  interface RepoProfileCopy {
9
18
  shipped: string;
@@ -34,10 +43,11 @@ declare module "@danxbot/card-kit@1" {
34
43
  id: StatusReasonId;
35
44
  values: StatusReasonValues;
36
45
  }
46
+ type PacingLimit = "five_hour" | "weekly" | "spend";
37
47
 
38
48
  type IssueStatus$1 = "Review" | "ToDo" | "In Progress" | "Backlog" | "Done" | "Cancelled";
39
49
  type EffortLevelName = "min" | "very_low" | "low" | "medium" | "high" | "very_high" | "max";
40
- type IssueAuthoredProblemType = "question" | "action";
50
+ type IssueProblemType = "question" | "action" | "design";
41
51
  type DecisionOutcome = "answered" | "rejected";
42
52
  type IssueDependencyKind = "depends_on" | "conflict_on";
43
53
  type IssueDispatchKind = "work" | "triage" | "recovery" | "flesh-out" | "chat" | "main-sync-repair" | "worktree-maintenance" | "manual" | "landing" | `gate-${string}`;
@@ -102,7 +112,6 @@ declare module "@danxbot/card-kit@1" {
102
112
  status_derived: IssueStatus$1;
103
113
  in_progress_derived: boolean;
104
114
  dispatchable_derived: boolean;
105
- self_dispatchable_derived: boolean;
106
115
  triage_enabled: boolean;
107
116
  content_hash: string;
108
117
  }
@@ -117,6 +126,7 @@ declare module "@danxbot/card-kit@1" {
117
126
  type CommentRecipientV2 = {
118
127
  kind: "agent";
119
128
  by: AuthorV2;
129
+ reachability: CommentReachabilityV2;
120
130
  } | {
121
131
  kind: "none";
122
132
  waiting_on: {
@@ -128,9 +138,32 @@ declare module "@danxbot/card-kit@1" {
128
138
  id: string;
129
139
  };
130
140
  };
141
+ type CommentReachabilityV2 = {
142
+ state: "listening";
143
+ } | {
144
+ state: "busy";
145
+ } | {
146
+ state: "compacting";
147
+ since: string;
148
+ } | {
149
+ state: "listener_down";
150
+ } | {
151
+ state: "paused_by_agent";
152
+ reason: string;
153
+ } | {
154
+ state: "usage_limit";
155
+ limit: PacingLimit;
156
+ until: string;
157
+ };
158
+ type ReplyRecipientV2 = {
159
+ kind: "agent";
160
+ by: AuthorV2;
161
+ } | Extract<CommentRecipientV2, {
162
+ kind: "none";
163
+ }>;
131
164
  interface CommentReplyStateV2 {
132
165
  state: CommentReplyStateName;
133
- recipient: CommentRecipientV2;
166
+ recipient: ReplyRecipientV2;
134
167
  reply_comment_id: number | null;
135
168
  }
136
169
  type ChecklistItemStatus$1 = "incomplete" | "failing" | "passing" | "cancelled" | "deferred";
@@ -199,6 +232,230 @@ declare module "@danxbot/card-kit@1" {
199
232
  reason: StatusReason | ProfileName | null;
200
233
  }
201
234
 
235
+ type ListType = "archived" | "review" | "ready" | "in_progress" | "completed" | "cancelled";
236
+
237
+ interface SolutionContent {
238
+ title: string;
239
+ body: string;
240
+ pro: string;
241
+ con: string;
242
+ recommended: boolean;
243
+ }
244
+
245
+ interface V2CopyComment {
246
+ author: string;
247
+ text: string;
248
+ metadata: unknown | null;
249
+ answers_decision: V2CopyDecisionRef | null;
250
+ tags: V2CopyCommentTag[];
251
+ team_agent: string | null;
252
+ author_email: string | null;
253
+ created_at: string;
254
+ updated_at: string;
255
+ }
256
+ interface V2CopyDecisionRef {
257
+ problem: number;
258
+ decision: number;
259
+ }
260
+ type V2CopyCommentTag = {
261
+ kind: "problem";
262
+ index: number;
263
+ } | {
264
+ kind: "design";
265
+ index: number;
266
+ };
267
+ interface V2CopyBlobRef {
268
+ sha256: string;
269
+ size: number;
270
+ }
271
+ interface V2CopyAttachment {
272
+ filename: string;
273
+ primary: boolean;
274
+ created_at: string;
275
+ updated_at: string;
276
+ blob: V2CopyBlobRef;
277
+ }
278
+ interface V2CopyDesignRevision {
279
+ revision_no: number;
280
+ target: string;
281
+ design_dir: string;
282
+ source_files: {
283
+ path: string;
284
+ content: string;
285
+ }[];
286
+ option_groups: DesignOptionGroup[];
287
+ built_from_commit: string;
288
+ note: string;
289
+ created_by: string;
290
+ created_at: string;
291
+ bundle: {
292
+ blob: V2CopyBlobRef;
293
+ } | null;
294
+ screenshot: {
295
+ blob: V2CopyBlobRef;
296
+ } | null;
297
+ }
298
+ interface V2CopyDesignDecision {
299
+ revision_no: number;
300
+ outcome: DesignDecisionOutcome;
301
+ note: string | null;
302
+ decided_by: string;
303
+ created_at: string;
304
+ retracted_at: string | null;
305
+ options: OptionSelection | null;
306
+ }
307
+ interface V2CopyDesign {
308
+ design_no: number;
309
+ title: string;
310
+ created_by: string;
311
+ created_at: string;
312
+ revisions: V2CopyDesignRevision[];
313
+ decisions: V2CopyDesignDecision[];
314
+ }
315
+ interface V2CopyControlOverride {
316
+ key: string;
317
+ value: unknown;
318
+ }
319
+ interface V2CopyAgentNote {
320
+ author: string;
321
+ text: string;
322
+ team_agent: string | null;
323
+ metadata: Record<string, unknown> | null;
324
+ ordinal: number;
325
+ created_at: string;
326
+ updated_at: string;
327
+ }
328
+ interface V2CopyAc {
329
+ title: string;
330
+ checked: boolean;
331
+ }
332
+ interface V2CopyChecklist {
333
+ name: string;
334
+ items: V2CopyChecklistItem[];
335
+ }
336
+ interface V2CopyChecklistItem {
337
+ label: string;
338
+ detail: string;
339
+ status: ChecklistItemStatus$1;
340
+ }
341
+ interface V2CopyDependency {
342
+ kind: IssueDependencyKind;
343
+ target_id: string;
344
+ reason: string;
345
+ }
346
+ interface V2CopyRetro {
347
+ good: string;
348
+ bad: string;
349
+ correctable_danxbot_problem: boolean;
350
+ correctable_danxbot_problem_description: string;
351
+ action_item_ids: string[];
352
+ commits: {
353
+ sha: string;
354
+ subject: string;
355
+ }[];
356
+ tests: V2CopyRetroTest[];
357
+ }
358
+ interface V2CopyRetroTest {
359
+ name: string;
360
+ kind: "group" | "e2e";
361
+ num_tests: number;
362
+ num_assertions: number | null;
363
+ num_passing_tests: number;
364
+ num_passing_assertions: number | null;
365
+ duration_ms: number;
366
+ }
367
+ interface V2CopyMirror {
368
+ target_type: MirrorProviderId;
369
+ target_ref: string;
370
+ target_url: string;
371
+ source_ref: string;
372
+ }
373
+ type SourceMirrorLocation = Record<MirrorProviderId, string | null>;
374
+ interface V2CopyQualityGate {
375
+ gate: string;
376
+ decision_note: string;
377
+ effort_level: EffortLevelName | null;
378
+ status: QualityGateStatus;
379
+ message: string;
380
+ completed_at: string | null;
381
+ attempts: number;
382
+ reviewed_ref: string | null;
383
+ decided_by: string | null;
384
+ owed: boolean;
385
+ }
386
+ interface V2CopySolution extends SolutionContent {
387
+ removed: boolean;
388
+ design_index: number | null;
389
+ steps: V2CopyStep[];
390
+ }
391
+ interface V2CopyStep {
392
+ title: string;
393
+ description: string | null;
394
+ steps: V2CopyStep[];
395
+ }
396
+ interface V2CopyDecision {
397
+ solution_index: number | null;
398
+ outcome: DecisionOutcome;
399
+ freeform: string | null;
400
+ note: string | null;
401
+ decided_by: string;
402
+ decided_at: string;
403
+ retracted_at: string | null;
404
+ }
405
+ interface V2CopyProblem {
406
+ statement: string;
407
+ context: string | null;
408
+ type: IssueProblemType;
409
+ summary: string | null;
410
+ design_element: string | null;
411
+ removed: boolean;
412
+ solutions: V2CopySolution[];
413
+ decisions: V2CopyDecision[];
414
+ }
415
+ interface V2CopyIssue {
416
+ id: string;
417
+ parent_id: string | null;
418
+ type: CardTypeKey;
419
+ title: string;
420
+ description: string;
421
+ summary: string | null;
422
+ priority: number;
423
+ effort_level: EffortLevelName | null;
424
+ assigned_agent: string | null;
425
+ ready_at: string | null;
426
+ completed_at: string | null;
427
+ cancelled_at: string | null;
428
+ archived_at: string | null;
429
+ blocked_at: string | null;
430
+ blocked_reason: string | null;
431
+ ac: V2CopyAc[];
432
+ checklists: V2CopyChecklist[];
433
+ comments: V2CopyComment[];
434
+ agent_notes: V2CopyAgentNote[];
435
+ dependencies: V2CopyDependency[];
436
+ retro: V2CopyRetro | null;
437
+ mirrors: V2CopyMirror[];
438
+ quality_gates: V2CopyQualityGate[];
439
+ problems: V2CopyProblem[];
440
+ triage_enabled: boolean;
441
+ attachments: V2CopyAttachment[];
442
+ designs: V2CopyDesign[];
443
+ list_name: string | null;
444
+ list_type: ListType | null;
445
+ control_overrides: V2CopyControlOverride[];
446
+ unknown_fields: V2CopyUnknownField[];
447
+ }
448
+ interface V2CopyUnknownField {
449
+ path: string;
450
+ value: unknown;
451
+ }
452
+ interface V2CopyPayload {
453
+ schema_version: number;
454
+ issues: V2CopyIssue[];
455
+ source_mirror_location: SourceMirrorLocation;
456
+ blobs: Record<string, string>;
457
+ }
458
+
202
459
  interface HolderAgentPause {
203
460
  reason: string;
204
461
  since: string;
@@ -247,6 +504,14 @@ declare module "@danxbot/card-kit@1" {
247
504
  linesAdded: number;
248
505
  linesRemoved: number;
249
506
  }
507
+ interface UsageActivity {
508
+ activeMinutes: number;
509
+ agentMinutes: number;
510
+ tokens: number;
511
+ costUsd: number;
512
+ tokensPerMinute: number;
513
+ measuredSince: number;
514
+ }
250
515
  interface UsageSummary {
251
516
  totals: UsageTotals;
252
517
  costUsd: number;
@@ -257,6 +522,7 @@ declare module "@danxbot/card-kit@1" {
257
522
  operatorAttributionSince: number | null;
258
523
  timing: UsageTiming;
259
524
  timingMeasuredSince: number | null;
525
+ activity: UsageActivity | null;
260
526
  }
261
527
  type UsageErrorCode = "unattributable_dispatch" | "usage_inconsistent";
262
528
  interface UsageError {
@@ -339,7 +605,7 @@ declare module "@danxbot/card-kit@1" {
339
605
  detail: string;
340
606
  }
341
607
 
342
- type PickerRouting = "gate" | "work" | "orchestrated" | "skip" | "terminal_or_container";
608
+ type PickerRouting = "gate" | "queued" | "not_queued" | "skip" | "terminal_or_container";
343
609
  interface DispatchableExplainView {
344
610
  id: string;
345
611
  dispatchable: boolean;
@@ -359,148 +625,6 @@ declare module "@danxbot/card-kit@1" {
359
625
  agent_wait: StatusReason | null;
360
626
  }
361
627
 
362
- interface SolutionContent {
363
- title: string;
364
- body: string;
365
- pro: string;
366
- con: string;
367
- recommended: boolean;
368
- }
369
-
370
- interface V2CopyComment {
371
- author: string;
372
- text: string;
373
- }
374
- interface V2CopyAgentNote {
375
- author: string;
376
- text: string;
377
- metadata: Record<string, unknown> | null;
378
- ordinal: number;
379
- created_at: string;
380
- updated_at: string;
381
- }
382
- interface V2CopyAc {
383
- title: string;
384
- checked: boolean;
385
- }
386
- interface V2CopyChecklist {
387
- name: string;
388
- items: V2CopyChecklistItem[];
389
- }
390
- interface V2CopyChecklistItem {
391
- label: string;
392
- detail: string;
393
- status: ChecklistItemStatus$1;
394
- }
395
- interface V2CopyDependency {
396
- kind: IssueDependencyKind;
397
- target_id: string;
398
- reason: string;
399
- }
400
- interface V2CopyRetro {
401
- good: string;
402
- bad: string;
403
- correctable_danxbot_problem: boolean;
404
- correctable_danxbot_problem_description: string;
405
- action_item_ids: string[];
406
- commits: {
407
- sha: string;
408
- subject: string;
409
- }[];
410
- tests: V2CopyRetroTest[];
411
- }
412
- interface V2CopyRetroTest {
413
- name: string;
414
- kind: "group" | "e2e";
415
- num_tests: number;
416
- num_assertions: number | null;
417
- num_passing_tests: number;
418
- num_passing_assertions: number | null;
419
- duration_ms: number;
420
- }
421
- interface V2CopyMirror {
422
- target_type: MirrorProviderId;
423
- target_ref: string;
424
- target_url: string;
425
- source_ref: string;
426
- }
427
- type SourceMirrorLocation = Record<MirrorProviderId, string | null>;
428
- interface V2CopyQualityGate {
429
- gate: string;
430
- decision_note: string;
431
- effort_level: EffortLevelName | null;
432
- status: QualityGateStatus;
433
- message: string;
434
- completed_at: string | null;
435
- attempts: number;
436
- reviewed_ref: string | null;
437
- decided_by: string | null;
438
- }
439
- interface V2CopySolution extends SolutionContent {
440
- removed: boolean;
441
- steps: V2CopyStep[];
442
- }
443
- interface V2CopyStep {
444
- title: string;
445
- description: string | null;
446
- steps: V2CopyStep[];
447
- }
448
- interface V2CopyDecision {
449
- solution_index: number | null;
450
- outcome: DecisionOutcome;
451
- freeform: string | null;
452
- note: string | null;
453
- decided_by: string;
454
- decided_at: string;
455
- retracted_at: string | null;
456
- }
457
- interface V2CopyProblem {
458
- statement: string;
459
- context: string | null;
460
- type: IssueAuthoredProblemType;
461
- summary: string | null;
462
- removed: boolean;
463
- solutions: V2CopySolution[];
464
- decisions: V2CopyDecision[];
465
- }
466
- interface V2CopyIssue {
467
- id: string;
468
- parent_id: string | null;
469
- type: CardTypeKey;
470
- title: string;
471
- description: string;
472
- summary: string | null;
473
- priority: number;
474
- effort_level: EffortLevelName | null;
475
- assigned_agent: string | null;
476
- ready_at: string | null;
477
- completed_at: string | null;
478
- cancelled_at: string | null;
479
- archived_at: string | null;
480
- blocked_at: string | null;
481
- blocked_reason: string | null;
482
- ac: V2CopyAc[];
483
- checklists: V2CopyChecklist[];
484
- comments: V2CopyComment[];
485
- agent_notes: V2CopyAgentNote[];
486
- dependencies: V2CopyDependency[];
487
- retro: V2CopyRetro | null;
488
- mirrors: V2CopyMirror[];
489
- quality_gates: V2CopyQualityGate[];
490
- problems: V2CopyProblem[];
491
- triage_enabled: boolean;
492
- unknown_fields: V2CopyUnknownField[];
493
- }
494
- interface V2CopyUnknownField {
495
- path: string;
496
- value: unknown;
497
- }
498
- interface V2CopyPayload {
499
- schema_version: number;
500
- issues: V2CopyIssue[];
501
- source_mirror_location: SourceMirrorLocation;
502
- }
503
-
504
628
  type IssueStatus = "Review" | "ToDo" | "In Progress" | "Backlog" | "Done" | "Cancelled";
505
629
  interface InheritedBlockedViewV2 {
506
630
  id: string;
@@ -590,6 +714,7 @@ declare module "@danxbot/card-kit@1" {
590
714
  name: string;
591
715
  items: ChecklistItemView[];
592
716
  }
717
+ type DesignDecisionOutcome = "rejected" | "changes_requested" | "approved";
593
718
  interface ChecklistHistoryViewV2 {
594
719
  action: "create" | "rename" | "remove" | "add_item" | "update_item" | "remove_item";
595
720
  checklist: string;
@@ -720,6 +845,7 @@ declare module "@danxbot/card-kit@1" {
720
845
  ac_items?: undefined | (Array<{ title: string; status: "incomplete" | "failing" | "passing" | "cancelled" | "deferred"; }>);
721
846
  comments_count?: undefined | number;
722
847
  agent_notes_count?: undefined | number;
848
+ comment_recipient?: undefined | { kind: "agent"; by: AuthorV2; reachability: CommentReachabilityV2; } | { kind: "none"; waiting_on: { kind: "plan"; id: number; name: string; } | { kind: "card"; id: string; }; };
723
849
  has_retro?: undefined | false | true;
724
850
  primary_attachment?: undefined | null | AttachmentPreviewV2;
725
851
  in_progress_derived?: undefined | false | true;
@@ -758,6 +884,7 @@ declare module "@danxbot/card-kit@1" {
758
884
  review_state: "rejected" | "awaiting_review" | "changes_requested" | "approved";
759
885
  revision_count: number;
760
886
  latest_revision_no: number;
887
+ chosen_options: null | OptionSelection;
761
888
  revisions?: undefined | (Array<{
762
889
  revision_no: number;
763
890
  target: string;
@@ -770,6 +897,7 @@ declare module "@danxbot/card-kit@1" {
770
897
  bundle_bytes: null | number;
771
898
  bundle_available: boolean;
772
899
  screenshot_available: boolean;
900
+ option_groups: Array<DesignOptionGroup>;
773
901
  source_files?: undefined | Array<DesignSourceFile>;
774
902
  }>);
775
903
  decisions?: undefined | (Array<{
@@ -780,6 +908,7 @@ declare module "@danxbot/card-kit@1" {
780
908
  decided_by: string;
781
909
  decided_by_ref: ActorRef;
782
910
  created_at: string;
911
+ options: null | OptionSelection;
783
912
  }>);
784
913
  }>);
785
914
  pull_request_reviews?: undefined | (Array<{
@@ -915,9 +1044,11 @@ declare module "@danxbot/card-kit@1" {
915
1044
  feedback_consent: boolean;
916
1045
  choice_locked: boolean;
917
1046
  comment_count: number;
1047
+ needs_person: boolean;
918
1048
  issue_id: string;
919
1049
  statement: string;
920
1050
  context: null | string;
1051
+ design_element: null | string;
921
1052
  solutions: Array<SolutionViewV2>;
922
1053
  };
923
1054
  type SolutionViewV2 = {
@@ -952,6 +1083,7 @@ declare module "@danxbot/card-kit@1" {
952
1083
  review_state: "rejected" | "awaiting_review" | "changes_requested" | "approved";
953
1084
  revision_count: number;
954
1085
  latest_revision_no: number;
1086
+ chosen_options: null | OptionSelection;
955
1087
  revisions?: undefined | (Array<{
956
1088
  revision_no: number;
957
1089
  target: string;
@@ -964,6 +1096,7 @@ declare module "@danxbot/card-kit@1" {
964
1096
  bundle_bytes: null | number;
965
1097
  bundle_available: boolean;
966
1098
  screenshot_available: boolean;
1099
+ option_groups: Array<DesignOptionGroup>;
967
1100
  source_files?: undefined | Array<DesignSourceFile>;
968
1101
  }>);
969
1102
  decisions?: undefined | (Array<{
@@ -974,6 +1107,7 @@ declare module "@danxbot/card-kit@1" {
974
1107
  decided_by: string;
975
1108
  decided_by_ref: ActorRef;
976
1109
  created_at: string;
1110
+ options: null | OptionSelection;
977
1111
  }>);
978
1112
  }>);
979
1113
  };
package/dist/cli.js CHANGED
@@ -5891,7 +5891,7 @@ var CARD_KIT_LIBRARY = "@danxbot/card-kit";
5891
5891
  var PLUGIN_RUNTIME_LIBRARIES = [
5892
5892
  { name: "react", major: 19 },
5893
5893
  { name: "react-dom", major: 19 },
5894
- { name: "@danxbot/ui", major: 27 },
5894
+ { name: "@danxbot/ui", major: 28 },
5895
5895
  { name: CARD_KIT_LIBRARY, major: CARD_KIT_MAJOR }
5896
5896
  ];
5897
5897
  var PLUGIN_RUNTIME_SPECIFIERS = [
package/dist/publish.js CHANGED
@@ -5886,7 +5886,7 @@ var CARD_KIT_LIBRARY = "@danxbot/card-kit";
5886
5886
  var PLUGIN_RUNTIME_LIBRARIES = [
5887
5887
  { name: "react", major: 19 },
5888
5888
  { name: "react-dom", major: 19 },
5889
- { name: "@danxbot/ui", major: 27 },
5889
+ { name: "@danxbot/ui", major: 28 },
5890
5890
  { name: CARD_KIT_LIBRARY, major: CARD_KIT_MAJOR }
5891
5891
  ];
5892
5892
  var PLUGIN_RUNTIME_SPECIFIERS = [
package/dist/vite.js CHANGED
@@ -4,7 +4,7 @@ var CARD_KIT_LIBRARY = "@danxbot/card-kit";
4
4
  var PLUGIN_RUNTIME_LIBRARIES = [
5
5
  { name: "react", major: 19 },
6
6
  { name: "react-dom", major: 19 },
7
- { name: "@danxbot/ui", major: 27 },
7
+ { name: "@danxbot/ui", major: 28 },
8
8
  { name: CARD_KIT_LIBRARY, major: CARD_KIT_MAJOR }
9
9
  ];
10
10
  var PLUGIN_RUNTIME_SPECIFIERS = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/plugin-sdk",
3
- "version": "0.2.28",
3
+ "version": "0.2.31",
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",
@@ -33,7 +33,7 @@
33
33
  "node": ">=20"
34
34
  },
35
35
  "peerDependencies": {
36
- "@danxbot/ui": "^27.0.0",
36
+ "@danxbot/ui": "^28.0.0",
37
37
  "@types/react": "^19.0.0",
38
38
  "react": "^19.0.0",
39
39
  "react-router": "^7.0.0",
@@ -46,7 +46,7 @@
46
46
  "test": "vitest run"
47
47
  },
48
48
  "devDependencies": {
49
- "@danxbot/ui": "27.46.0",
49
+ "@danxbot/ui": "28.0.0",
50
50
  "@types/node": "^22.0.0",
51
51
  "@types/react": "^19.2.2",
52
52
  "esbuild": "^0.25.0",