@leaflow/sdk 0.21.0 → 0.22.0

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.
@@ -765,6 +765,22 @@ export interface components {
765
765
  /** Format: date-time */
766
766
  expiresAt: string;
767
767
  };
768
+ PartResource: {
769
+ /** @description For `file` parts. Points at one of this entry's `attachments`. */
770
+ attachmentId?: string | null;
771
+ /**
772
+ * @description Addresses this part in the live stream — text arrives as `append` frames pointing at
773
+ * `/items/{item}/parts/{id}/text`.
774
+ *
775
+ * Not an array index. It looks like one today because parts are only ever appended, and a
776
+ * client that treats it as one keeps working right up until that stops being true.
777
+ */
778
+ id: string;
779
+ /** @description For `text` parts. Grows as the answer is written. */
780
+ text?: string | null;
781
+ /** @enum {string} */
782
+ type: "text" | "file";
783
+ };
768
784
  RejectionResource: {
769
785
  /** Format: date-time */
770
786
  at: string;
@@ -970,7 +986,14 @@ export interface components {
970
986
  /** @enum {string} */
971
987
  status: "pending" | "in_progress" | "completed" | "failed" | "declined" | "interrupted";
972
988
  target?: string | null;
973
- text?: string;
989
+ /**
990
+ * @description The content of this entry, in the order it was written. A message that is only text is a
991
+ * single part, which is most of them.
992
+ *
993
+ * An image belongs where it was written, so render these in order rather than putting
994
+ * attachments at the end.
995
+ */
996
+ parts?: components["schemas"]["PartResource"][] | null;
974
997
  tool?: string | null;
975
998
  /**
976
999
  * @description Determines which fields this entry carries
@@ -1086,7 +1109,13 @@ export interface components {
1086
1109
  * block without `actions` keeps whatever was declared before.
1087
1110
  */
1088
1111
  ClientContextRequest: {
1089
- /** @description The actions on offer right now. Omit when unchanged since the last message. */
1112
+ /**
1113
+ * @description The actions on offer right now.
1114
+ *
1115
+ * Omit it when nothing changed since the last message. Send `[]` to say there is nothing
1116
+ * on offer — those are different: a client that moves off the page it was attached to has
1117
+ * to be able to say so, or the assistant keeps calling actions that no longer make sense.
1118
+ */
1090
1119
  actions?: components["schemas"]["ClientActionRequest"][] | null;
1091
1120
  /** @description Identifies this client while it stays open. Any stable string; one per tab or process. */
1092
1121
  clientId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {