@50arms/plugin-sdk 0.2.62 → 0.2.64

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 +80 -4
  2. package/package.json +1 -1
@@ -4,6 +4,7 @@ declare module "@danxbot/card-kit@1" {
4
4
  import { ReactNode } from 'react';
5
5
  export { Link, useNavigate } from 'react-router';
6
6
 
7
+ type BumpSize = "patch" | "minor" | "major";
7
8
  type RiskScore = "R0" | "R1" | "R2" | "R3" | "R4";
8
9
 
9
10
  const BOARD_ID: unique symbol;
@@ -176,10 +177,11 @@ declare module "@danxbot/card-kit@1" {
176
177
  offset: number;
177
178
  target_found: boolean | null;
178
179
  }
179
- type EvidenceBlockType = "note" | "steps" | "command" | "table";
180
+ type EvidenceBlockType = "note" | "steps" | "command" | "table" | "code" | "diff" | "log" | "samples";
180
181
  type EvidenceMadeBy = "human" | "agent";
181
182
  type EvidenceColumnType = "number" | "boolean" | "text" | "date";
182
- type EvidenceAttachmentRole = "file" | "csv";
183
+ type EvidenceChartKind = "line" | "time_series" | "bar";
184
+ type EvidenceAttachmentRole = "samples" | "file" | "csv";
183
185
 
184
186
  interface EvidenceColumn {
185
187
  name: string;
@@ -197,9 +199,16 @@ declare module "@danxbot/card-kit@1" {
197
199
  actual: string | null;
198
200
  }>;
199
201
  }
202
+ interface EvidenceChart {
203
+ kind: EvidenceChartKind;
204
+ x: string;
205
+ y: string[];
206
+ title: string | null;
207
+ }
200
208
  interface EvidenceTableRows {
201
209
  columns: EvidenceColumn[];
202
210
  rows: EvidenceCell[][];
211
+ charts: EvidenceChart[];
203
212
  }
204
213
  interface EvidenceCommandData {
205
214
  command: string;
@@ -215,11 +224,53 @@ declare module "@danxbot/card-kit@1" {
215
224
  interface EvidenceTableData extends EvidenceTableRows {
216
225
  source: "inline" | "csv";
217
226
  }
227
+ interface EvidenceCodeData {
228
+ repo: string;
229
+ path: string;
230
+ commit_sha: string;
231
+ start_line: number;
232
+ end_line: number;
233
+ highlight_lines: number[];
234
+ text: string;
235
+ }
236
+ interface EvidenceDiffData {
237
+ patch: string;
238
+ }
239
+ interface EvidenceLogData {
240
+ source: string;
241
+ from: string;
242
+ to: string;
243
+ highlight_lines: number[];
244
+ text: string;
245
+ }
246
+ interface EvidenceSamplesStats {
247
+ n: number;
248
+ min: number;
249
+ p50: number;
250
+ p95: number;
251
+ max: number;
252
+ mean: number;
253
+ stddev: number;
254
+ }
255
+ interface EvidenceSamplesVariant {
256
+ name: string;
257
+ values: number[];
258
+ stats: EvidenceSamplesStats;
259
+ }
260
+ interface EvidenceSamplesData {
261
+ source: "inline" | "file";
262
+ unit: string;
263
+ variants: EvidenceSamplesVariant[];
264
+ }
218
265
  interface EvidenceBlockDataByType {
219
266
  note: EvidenceNoteData;
220
267
  steps: EvidenceStepsData;
221
268
  command: EvidenceCommandData;
222
269
  table: EvidenceTableData;
270
+ code: EvidenceCodeData;
271
+ diff: EvidenceDiffData;
272
+ log: EvidenceLogData;
273
+ samples: EvidenceSamplesData;
223
274
  }
224
275
  interface EvidenceWriterView {
225
276
  author: string;
@@ -247,6 +298,7 @@ declare module "@danxbot/card-kit@1" {
247
298
  question: string;
248
299
  expected_answer: string;
249
300
  exhibits: EvidenceExhibitView[];
301
+ subjects: string[];
250
302
  reasoning: string;
251
303
  confidence: number;
252
304
  }
@@ -338,6 +390,9 @@ declare module "@danxbot/card-kit@1" {
338
390
  } | {
339
391
  kind: "decision";
340
392
  index: number;
393
+ } | {
394
+ kind: "evidence";
395
+ index: number;
341
396
  } | {
342
397
  kind: "label";
343
398
  text: string;
@@ -460,6 +515,7 @@ declare module "@danxbot/card-kit@1" {
460
515
  reasoning: string;
461
516
  confidence: number;
462
517
  exhibits: V2CopyEvidenceExhibit[];
518
+ subjects: string[];
463
519
  }
464
520
  interface V2CopyEvidenceVerdictVersion extends V2CopyEvidenceMaker {
465
521
  version_no: number;
@@ -904,6 +960,18 @@ declare module "@danxbot/card-kit@1" {
904
960
  agent_wait: StatusReason | null;
905
961
  orchestrator_profile: string | null;
906
962
  }
963
+
964
+ interface LandingAheadRegistration {
965
+ readonly card: CardRef;
966
+ readonly sha: string;
967
+ readonly state: "landing" | "queued";
968
+ readonly docs_root: string | null;
969
+ }
970
+ interface LandingAheadView {
971
+ readonly target_branch: string;
972
+ readonly docs_root: string | null;
973
+ readonly ahead: readonly LandingAheadRegistration[];
974
+ }
907
975
  type CardContextCategoryKey = "comments" | "checklists" | "content" | "agent_notes" | "problems" | "decisions" | "designs";
908
976
  type PlanContextCategoryKey = "architecture" | "comments" | "heading" | "records" | "notes" | "open_cards";
909
977
  type ContextCategoryKey = CardContextCategoryKey | PlanContextCategoryKey;
@@ -1056,7 +1124,7 @@ declare module "@danxbot/card-kit@1" {
1056
1124
  answers_decision_id?: undefined | null | number;
1057
1125
  sign_off?: undefined | null | CommentSignOffViewV2;
1058
1126
  quoted_request?: undefined | null | ProvenanceRecordV2;
1059
- tags: Array<{ kind: "problem"; ref: number; } | { kind: "design"; ref: number; } | { kind: "decision"; ref: number; }>;
1127
+ tags: Array<{ kind: "problem"; ref: number; } | { kind: "design"; ref: number; } | { kind: "decision"; ref: number; } | { kind: "evidence"; ref: number; }>;
1060
1128
  resource_tags: Array<CommentResourceTag>;
1061
1129
  parent_comment_id: null | number;
1062
1130
  reply_phase: null | "ack" | "reply";
@@ -1180,6 +1248,7 @@ declare module "@danxbot/card-kit@1" {
1180
1248
  risk_set?: undefined | null | { at: string; by: AuthorV2; };
1181
1249
  risk_raise_reason?: undefined | null | string;
1182
1250
  justification?: undefined | null | Justification;
1251
+ bump_size?: undefined | "patch" | "minor" | "major";
1183
1252
  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; };
1184
1253
  problem_total?: undefined | number;
1185
1254
  evidence_record_total?: undefined | number;
@@ -1226,6 +1295,7 @@ declare module "@danxbot/card-kit@1" {
1226
1295
  comments_count?: undefined | number;
1227
1296
  unread_comments_count?: undefined | number;
1228
1297
  unread_decision_comment_counts?: undefined | Record<string, number>;
1298
+ unread_evidence_comment_counts?: undefined | Record<string, number>;
1229
1299
  context_size?: undefined | ContextSize;
1230
1300
  content_compaction?: undefined | null | { id: number; requested_at: string; } & { status: "waiting"; ended_at: null; failure_reason: null; } | { id: number; requested_at: string; } & { status: "working"; ended_at: null; failure_reason: null; job: CompactionJob; } | { id: number; requested_at: string; } & { status: "done"; ended_at: string; failure_reason: null; sizes: CompactionSizes; } | { id: number; requested_at: string; } & { status: "failed"; ended_at: string; failure_reason: NotificationText; };
1231
1301
  agent_notes_count?: undefined | number;
@@ -1249,6 +1319,7 @@ declare module "@danxbot/card-kit@1" {
1249
1319
  review_runnable?: undefined | false | true;
1250
1320
  dispatchable_explain?: undefined | DispatchableExplainView;
1251
1321
  copy_payload?: undefined | V2CopyPayload;
1322
+ landing_ahead?: undefined | LandingAheadView;
1252
1323
  copy_issue?: undefined | V2CopyIssue;
1253
1324
  decision_records?: undefined | (Array<{
1254
1325
  title: string;
@@ -1322,6 +1393,8 @@ declare module "@danxbot/card-kit@1" {
1322
1393
  other_block_count: number;
1323
1394
  round_count: number;
1324
1395
  block_count: number;
1396
+ comment_count: number;
1397
+ unread_comment_count: number;
1325
1398
  rounds?: undefined | (Array<{
1326
1399
  created_at: string;
1327
1400
  author: string;
@@ -1331,7 +1404,7 @@ declare module "@danxbot/card-kit@1" {
1331
1404
  hypothesis_version: number;
1332
1405
  environment: string;
1333
1406
  commit_sha: string;
1334
- blocks: Array<EvidenceBlockViewBase<"note"> | EvidenceBlockViewBase<"steps"> | EvidenceBlockViewBase<"command"> | EvidenceBlockViewBase<"table">>;
1407
+ blocks: Array<EvidenceBlockViewBase<"note"> | EvidenceBlockViewBase<"steps"> | EvidenceBlockViewBase<"command"> | EvidenceBlockViewBase<"table"> | EvidenceBlockViewBase<"code"> | EvidenceBlockViewBase<"diff"> | EvidenceBlockViewBase<"log"> | EvidenceBlockViewBase<"samples">>;
1335
1408
  }>);
1336
1409
  hypothesis_versions?: undefined | (Array<{
1337
1410
  id: number;
@@ -1339,6 +1412,7 @@ declare module "@danxbot/card-kit@1" {
1339
1412
  question: string;
1340
1413
  expected_answer: string;
1341
1414
  exhibits: Array<EvidenceExhibitView>;
1415
+ subjects: Array<string>;
1342
1416
  reasoning: string;
1343
1417
  confidence: number;
1344
1418
  author: string;
@@ -1709,6 +1783,7 @@ declare module "@danxbot/card-kit@1" {
1709
1783
  risk_raise_reason: string | null;
1710
1784
  justification_quote: string | null;
1711
1785
  justification_reasoning: string | null;
1786
+ bump_size: BumpSize;
1712
1787
  start_commit_sha: string | null;
1713
1788
  start_commit_at: string | null;
1714
1789
  start_commit_error: StartCommitError | null;
@@ -1956,6 +2031,7 @@ declare module "@danxbot/card-kit@1" {
1956
2031
  type?: CardTypeKey;
1957
2032
  parent_id?: string | null;
1958
2033
  effort_level?: EffortLevelName;
2034
+ bump_size?: BumpSize;
1959
2035
  content_hash?: string;
1960
2036
  }
1961
2037
  function editCard(id: string, patch: CardEditPatch): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@50arms/plugin-sdk",
3
- "version": "0.2.62",
3
+ "version": "0.2.64",
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",