@leaflow/sdk 0.18.0 → 0.19.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.
|
@@ -302,8 +302,7 @@ export interface paths {
|
|
|
302
302
|
* with the namespace `dynamic`; the client acts when that entry turns in_progress and reports
|
|
303
303
|
* back here.
|
|
304
304
|
*
|
|
305
|
-
* The first result
|
|
306
|
-
* rather than replacing it, because the action already ran once.
|
|
305
|
+
* The first result is the one that counts. A later one is refused rather than replacing it.
|
|
307
306
|
*/
|
|
308
307
|
post: operations["submit-dynamic-call-result"];
|
|
309
308
|
delete?: never;
|
|
@@ -412,7 +411,7 @@ export interface paths {
|
|
|
412
411
|
head?: never;
|
|
413
412
|
/**
|
|
414
413
|
* Update conversation settings
|
|
415
|
-
* @description Changes the model, reasoning level, approval mode and archived state. A change takes effect from the next turn; a turn already running keeps the settings it started with.
|
|
414
|
+
* @description Changes the model, reasoning level, approval mode and archived state. A change takes effect from the next turn; a turn already running keeps the settings it started with. Model and reasoning level change independently: sending one leaves the other alone.
|
|
416
415
|
*/
|
|
417
416
|
patch: operations["update-thread"];
|
|
418
417
|
trace?: never;
|
|
@@ -820,6 +819,8 @@ export interface components {
|
|
|
820
819
|
models: components["schemas"]["ModelResource"][] | null;
|
|
821
820
|
};
|
|
822
821
|
ThreadSummaryResource: {
|
|
822
|
+
/** @description The tier this conversation runs at, or null when it follows the model's own default. */
|
|
823
|
+
reasoningEffort: string | null;
|
|
823
824
|
/** @enum {string} */
|
|
824
825
|
approvalMode: "guardian" | "manual" | "yolo";
|
|
825
826
|
archived: boolean;
|
|
@@ -843,6 +844,8 @@ export interface components {
|
|
|
843
844
|
approvalMode?: "guardian" | "manual" | "yolo";
|
|
844
845
|
};
|
|
845
846
|
ContextResource: {
|
|
847
|
+
/** @description The tier this conversation runs at, or null when it follows the model's own default. */
|
|
848
|
+
reasoningEffort: string | null;
|
|
846
849
|
/** Format: int64 */
|
|
847
850
|
compactAt: number | null;
|
|
848
851
|
model: string;
|
|
@@ -871,6 +874,17 @@ export interface components {
|
|
|
871
874
|
approvalReason?: string | null;
|
|
872
875
|
arguments?: string;
|
|
873
876
|
attachments?: components["schemas"]["AttachmentResource"][] | null;
|
|
877
|
+
/**
|
|
878
|
+
* @description The context blocks the client attached to this message.
|
|
879
|
+
*
|
|
880
|
+
* **Not part of what the operator wrote** — `text` is. Render the message from `text` and
|
|
881
|
+
* leave these out of the bubble; they are here so a client that did not send them, or one
|
|
882
|
+
* that reloaded, can still read what the assistant was given.
|
|
883
|
+
*
|
|
884
|
+
* The actions declared alongside them are not returned: they are re-declared as they
|
|
885
|
+
* change and would make every fetch of the conversation carry them again.
|
|
886
|
+
*/
|
|
887
|
+
clientContext?: components["schemas"]["ClientContextPart"][] | null;
|
|
874
888
|
/** Format: date-time */
|
|
875
889
|
createdAt: string;
|
|
876
890
|
detail?: string | null;
|
|
@@ -941,7 +955,13 @@ export interface components {
|
|
|
941
955
|
approvalMode?: "guardian" | "manual" | "yolo";
|
|
942
956
|
archived?: boolean;
|
|
943
957
|
model?: string;
|
|
944
|
-
|
|
958
|
+
/**
|
|
959
|
+
* @description Which reasoning tier to run at, from the model's `reasoningTiers`. Null puts it back to
|
|
960
|
+
* the model's own default; leaving it out keeps whatever is set.
|
|
961
|
+
*
|
|
962
|
+
* Independent of `model` — sending one does not touch the other.
|
|
963
|
+
*/
|
|
964
|
+
reasoningEffort?: string | null;
|
|
945
965
|
};
|
|
946
966
|
DecideRequestBody: {
|
|
947
967
|
approved: boolean;
|
|
@@ -952,57 +972,96 @@ export interface components {
|
|
|
952
972
|
items: components["schemas"]["ItemResource"][] | null;
|
|
953
973
|
};
|
|
954
974
|
SendMessageRequestBody: {
|
|
955
|
-
/** @description Ids of attachments uploaded earlier that are not yet bound to any message */
|
|
956
|
-
attachmentIds?: string[] | null;
|
|
957
975
|
client?: components["schemas"]["ClientContextRequest"];
|
|
958
|
-
|
|
976
|
+
/**
|
|
977
|
+
* @description The message, in the order it was written. A message with nothing but text is a single
|
|
978
|
+
* text part; that is the ordinary case and nothing else is required.
|
|
979
|
+
*/
|
|
980
|
+
parts: components["schemas"]["MessagePart"][];
|
|
959
981
|
};
|
|
960
982
|
/**
|
|
961
|
-
* @description
|
|
983
|
+
* @description One piece of a message. `type` says which of the fields below carries it:
|
|
984
|
+
*
|
|
985
|
+
* - `text` — the words, in `text`
|
|
986
|
+
* - `file` — an attachment uploaded earlier, by id in `attachmentId`
|
|
987
|
+
* - `data-<something>` — context from the client, in `data`. The name after `data-` is yours;
|
|
988
|
+
* it is shown to the assistant so it can tell one kind of block from another.
|
|
962
989
|
*
|
|
963
|
-
*
|
|
964
|
-
|
|
965
|
-
|
|
990
|
+
* Order matters: an image belongs where it was written, not at the end.
|
|
991
|
+
*/
|
|
992
|
+
MessagePart: {
|
|
993
|
+
/** @description For `file` parts. The attachment must have been uploaded and not yet bound to another message. */
|
|
994
|
+
attachmentId?: string | null;
|
|
995
|
+
/** @description For `data-*` parts. Any object; its keys reach the assistant as they are. */
|
|
996
|
+
data?: {
|
|
997
|
+
[key: string]: unknown;
|
|
998
|
+
} | null;
|
|
999
|
+
/** @description For `text` parts. */
|
|
1000
|
+
text?: string | null;
|
|
1001
|
+
type: string;
|
|
1002
|
+
};
|
|
1003
|
+
/**
|
|
1004
|
+
* @description Which client this is and what it can do, so the assistant can ask it to do those things
|
|
1005
|
+
* while it answers. What the operator is looking at travels as `data-*` parts on the message.
|
|
1006
|
+
*
|
|
1007
|
+
* Send `actions` only when they differ from the last message on this conversation. Sending the
|
|
1008
|
+
* block without `actions` keeps whatever was declared before.
|
|
966
1009
|
*/
|
|
967
1010
|
ClientContextRequest: {
|
|
968
1011
|
/** @description The actions on offer right now. Omit when unchanged since the last message. */
|
|
969
1012
|
actions?: components["schemas"]["ClientActionRequest"][] | null;
|
|
970
|
-
/** @description Identifies this client while it stays open. Any stable string
|
|
1013
|
+
/** @description Identifies this client while it stays open. Any stable string; one per tab or process. */
|
|
971
1014
|
clientId: string;
|
|
972
|
-
/** @description How the client calls itself,
|
|
1015
|
+
/** @description How the client calls itself, for example "Leaflow console (web)". */
|
|
973
1016
|
label?: string;
|
|
974
|
-
page?: components["schemas"]["ClientPageRequest"];
|
|
975
1017
|
};
|
|
1018
|
+
/** @description A `data-*` part as it was sent. */
|
|
1019
|
+
ClientContextPart: {
|
|
1020
|
+
data: {
|
|
1021
|
+
[key: string]: unknown;
|
|
1022
|
+
};
|
|
1023
|
+
type: string;
|
|
1024
|
+
};
|
|
1025
|
+
/** @description The shape of a tool in the OpenAI Chat Completions API, plus `readOnly` and `timeoutMs`. */
|
|
976
1026
|
ClientActionRequest: {
|
|
1027
|
+
function: components["schemas"]["ClientFunctionRequest"];
|
|
1028
|
+
/** @description True when the action changes nothing outside the client. Anything else goes through this conversation's approval before it runs. */
|
|
1029
|
+
readOnly: boolean;
|
|
1030
|
+
/**
|
|
1031
|
+
* Format: int64
|
|
1032
|
+
* @description How long the assistant should wait for this action. Omit for the default; longer values are capped.
|
|
1033
|
+
*/
|
|
1034
|
+
timeoutMs?: number;
|
|
1035
|
+
/**
|
|
1036
|
+
* @description Only functions are supported.
|
|
1037
|
+
* @default function
|
|
1038
|
+
* @enum {string}
|
|
1039
|
+
*/
|
|
1040
|
+
type?: "function";
|
|
1041
|
+
};
|
|
1042
|
+
/** @description The function object from the OpenAI tools format. */
|
|
1043
|
+
ClientFunctionRequest: {
|
|
977
1044
|
/** @description What the action does, written for the model. An action without one can only be guessed at from its name. */
|
|
978
1045
|
description: string;
|
|
1046
|
+
/** @description The MCP and Anthropic spelling of `parameters`. Give one or the other, not both. */
|
|
1047
|
+
inputSchema?: {
|
|
1048
|
+
[key: string]: unknown;
|
|
1049
|
+
} | null;
|
|
979
1050
|
name: string;
|
|
980
1051
|
/** @description JSON Schema for the arguments. Omit for an action that takes none. */
|
|
981
1052
|
parameters?: {
|
|
982
1053
|
[key: string]: unknown;
|
|
983
1054
|
} | null;
|
|
984
|
-
/** @description True when the action changes nothing outside the client. Anything else goes through this conversation's approval before it runs. */
|
|
985
|
-
readOnly?: boolean;
|
|
986
|
-
/**
|
|
987
|
-
* Format: int64
|
|
988
|
-
* @description How long the assistant should wait for this action. 0 uses the default; longer values are capped.
|
|
989
|
-
*/
|
|
990
|
-
timeoutMs?: number;
|
|
991
|
-
};
|
|
992
|
-
/** @description What the operator is looking at. The address alone answers most questions about context. */
|
|
993
|
-
ClientPageRequest: {
|
|
994
|
-
title?: string;
|
|
995
|
-
url?: string;
|
|
996
1055
|
};
|
|
997
1056
|
DynamicCallResultRequestBody: {
|
|
998
|
-
/** @description The same value sent with the message. A result from a client
|
|
1057
|
+
/** @description The same value sent with the message. A result from a different client is refused. */
|
|
999
1058
|
clientId: string;
|
|
1000
|
-
/** @description Why it failed, when `ok` is false.
|
|
1059
|
+
/** @description Why it failed, when `ok` is false. It reaches the assistant, so write it for a reader who cannot see the screen. */
|
|
1001
1060
|
error?: string;
|
|
1002
1061
|
/** @description Pass back when there is more to read. The assistant will call again with it. */
|
|
1003
1062
|
nextCursor?: string;
|
|
1004
1063
|
ok: boolean;
|
|
1005
|
-
/** @description What the action produced. At most 64 KiB;
|
|
1064
|
+
/** @description What the action produced. At most 64 KiB; use `nextCursor` for anything larger. */
|
|
1006
1065
|
output?: string;
|
|
1007
1066
|
};
|
|
1008
1067
|
TodoResource: {
|
|
@@ -14,6 +14,8 @@ export interface paths {
|
|
|
14
14
|
* 查看本项目的四层隧道
|
|
15
15
|
* @description 还没生成过时返回 `TUNNEL_NOT_FOUND`——首屏据此决定画「生成订阅链接」那个按钮还是画结果。
|
|
16
16
|
*
|
|
17
|
+
* 项目未获开放时返回 403 `TUNNEL_NOT_ENTITLED`,那是另一件事:控制台据此把四层隧道的入口整个收起来,而不是画那个按钮。
|
|
18
|
+
*
|
|
17
19
|
* 订阅地址、用量、配额各有自己的接口,这里不重复返回。
|
|
18
20
|
*/
|
|
19
21
|
get: operations["get-l4-tunnel"];
|