@cadraos/sdk 0.3.13 → 0.3.14-p102.2

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.
@@ -1312,6 +1312,8 @@ interface Artifact$1 {
1312
1312
  mimeType: string;
1313
1313
  /** Download URL */
1314
1314
  url: string;
1315
+ /** Thumbnail URL (images) — chat renders this instead of the full-size `url` */
1316
+ thumbnailUrl?: string;
1315
1317
  /** When the artifact was created (ISO string) */
1316
1318
  createdAt?: string;
1317
1319
  }
@@ -3724,7 +3726,17 @@ interface KanbanLane {
3724
3726
  * a tick fans out ⌈cap / chunkSize⌉ runs. Ignored for `per-card`/`event` lanes.
3725
3727
  */
3726
3728
  chunkSize?: number;
3729
+ /**
3730
+ * p46 Handoff contract, OPT-IN per lane (D1). Absent ⇒ `off` (existing boards
3731
+ * are byte-identical). `verdict` ⇒ the engine sends
3732
+ * `HANDOFF_VERDICT_JSON_SCHEMA` as the run's `context.outputSchema` and a
3733
+ * completion MUST carry a valid verdict (else the run fails with a FAILED
3734
+ * handoff). Active only on hosts whose adapter implements the ledger group.
3735
+ */
3736
+ handoff?: KanbanLaneHandoffMode;
3727
3737
  }
3738
+ /** Per-lane Handoff mode (p46 D1). */
3739
+ type KanbanLaneHandoffMode = "off" | "verdict";
3728
3740
  /**
3729
3741
  * A declared edge between two lanes in the lifecycle.
3730
3742
  *
@@ -3816,6 +3828,11 @@ interface KanbanCard {
3816
3828
  configVersion?: number;
3817
3829
  /** Arbitrary shared context carried across transitions. */
3818
3830
  sharedContext?: Record<string, unknown>;
3831
+ /**
3832
+ * p46 (P46-002): the card's id in an external host (a Jira issue key).
3833
+ * Absent on native / crm / yobo cards.
3834
+ */
3835
+ externalRef?: string;
3819
3836
  /**
3820
3837
  * Execution UUID of the card's current/last run, if any.
3821
3838
  *
@@ -3878,6 +3895,18 @@ interface CreateCardInput {
3878
3895
  * in the lifecycle's initial lane.
3879
3896
  */
3880
3897
  lane?: string;
3898
+ /**
3899
+ * p46 (P46-002): the card's id in an EXTERNAL host (a Jira issue key, e.g.
3900
+ * `CAD-231`). Optional. When set, a card is created at most ONCE per
3901
+ * `(boardConfigUuid, externalRef)`: a repeat create returns the existing card
3902
+ * and dispatches nothing. Hosts that don't store it simply ignore it.
3903
+ */
3904
+ externalRef?: string;
3905
+ /**
3906
+ * p46 (P46-002): opaque host facts stored with the card (Jira `statusId`,
3907
+ * `mover`, `detached`, …). Passed through to `adapter.createCard` untouched.
3908
+ */
3909
+ externalMeta?: Record<string, unknown>;
3881
3910
  }
3882
3911
  /**
3883
3912
  * Input for transitioning a card to another lane.
@@ -1312,6 +1312,8 @@ interface Artifact$1 {
1312
1312
  mimeType: string;
1313
1313
  /** Download URL */
1314
1314
  url: string;
1315
+ /** Thumbnail URL (images) — chat renders this instead of the full-size `url` */
1316
+ thumbnailUrl?: string;
1315
1317
  /** When the artifact was created (ISO string) */
1316
1318
  createdAt?: string;
1317
1319
  }
@@ -3724,7 +3726,17 @@ interface KanbanLane {
3724
3726
  * a tick fans out ⌈cap / chunkSize⌉ runs. Ignored for `per-card`/`event` lanes.
3725
3727
  */
3726
3728
  chunkSize?: number;
3729
+ /**
3730
+ * p46 Handoff contract, OPT-IN per lane (D1). Absent ⇒ `off` (existing boards
3731
+ * are byte-identical). `verdict` ⇒ the engine sends
3732
+ * `HANDOFF_VERDICT_JSON_SCHEMA` as the run's `context.outputSchema` and a
3733
+ * completion MUST carry a valid verdict (else the run fails with a FAILED
3734
+ * handoff). Active only on hosts whose adapter implements the ledger group.
3735
+ */
3736
+ handoff?: KanbanLaneHandoffMode;
3727
3737
  }
3738
+ /** Per-lane Handoff mode (p46 D1). */
3739
+ type KanbanLaneHandoffMode = "off" | "verdict";
3728
3740
  /**
3729
3741
  * A declared edge between two lanes in the lifecycle.
3730
3742
  *
@@ -3816,6 +3828,11 @@ interface KanbanCard {
3816
3828
  configVersion?: number;
3817
3829
  /** Arbitrary shared context carried across transitions. */
3818
3830
  sharedContext?: Record<string, unknown>;
3831
+ /**
3832
+ * p46 (P46-002): the card's id in an external host (a Jira issue key).
3833
+ * Absent on native / crm / yobo cards.
3834
+ */
3835
+ externalRef?: string;
3819
3836
  /**
3820
3837
  * Execution UUID of the card's current/last run, if any.
3821
3838
  *
@@ -3878,6 +3895,18 @@ interface CreateCardInput {
3878
3895
  * in the lifecycle's initial lane.
3879
3896
  */
3880
3897
  lane?: string;
3898
+ /**
3899
+ * p46 (P46-002): the card's id in an EXTERNAL host (a Jira issue key, e.g.
3900
+ * `CAD-231`). Optional. When set, a card is created at most ONCE per
3901
+ * `(boardConfigUuid, externalRef)`: a repeat create returns the existing card
3902
+ * and dispatches nothing. Hosts that don't store it simply ignore it.
3903
+ */
3904
+ externalRef?: string;
3905
+ /**
3906
+ * p46 (P46-002): opaque host facts stored with the card (Jira `statusId`,
3907
+ * `mover`, `detached`, …). Passed through to `adapter.createCard` untouched.
3908
+ */
3909
+ externalMeta?: Record<string, unknown>;
3881
3910
  }
3882
3911
  /**
3883
3912
  * Input for transitioning a card to another lane.
@@ -3669,6 +3669,7 @@ function createDefaultAdapter(config) {
3669
3669
  filename: a.filename,
3670
3670
  mimeType: a.mimeType,
3671
3671
  url: a.url,
3672
+ ...a.thumbnailUrl ? { thumbnailUrl: a.thumbnailUrl } : {},
3672
3673
  createdAt: a.createdAt
3673
3674
  }));
3674
3675
  },
@@ -5507,7 +5508,9 @@ function useAgentChat(options) {
5507
5508
  args: {},
5508
5509
  result: {
5509
5510
  success: true,
5510
- images: [{ url: artifact.url }]
5511
+ images: [
5512
+ artifact.thumbnailUrl ? { url: artifact.url, thumbnailUrl: artifact.thumbnailUrl } : { url: artifact.url }
5513
+ ]
5511
5514
  },
5512
5515
  status: "completed"
5513
5516
  }));