@leaflow/sdk 0.17.0 → 0.18.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.
|
@@ -46,6 +46,8 @@ export type GetWeixinLoginResult = operations["get-weixin-login"]["responses"][2
|
|
|
46
46
|
export type SubmitWeixinVerifyCodeResult = operations["submit-weixin-verify-code"]["responses"][200]["content"]["application/json"];
|
|
47
47
|
/** `POST /api/v1/weixin-logins/{login}/verify-code` 的请求体。 */
|
|
48
48
|
export type SubmitWeixinVerifyCodeBody = NonNullable<operations["submit-weixin-verify-code"]["requestBody"]>["content"]["application/json"];
|
|
49
|
+
/** `POST /api/v1/dynamic-calls/{call}/result` 的请求体。 */
|
|
50
|
+
export type SubmitDynamicCallResultBody = NonNullable<operations["submit-dynamic-call-result"]["requestBody"]>["content"]["application/json"];
|
|
49
51
|
/** `GET /api/v1/memories` 成功时的响应体。 */
|
|
50
52
|
export type ListMemoriesResult = operations["list-memories"]["responses"][200]["content"]["application/json"];
|
|
51
53
|
/** `GET /api/v1/models` 成功时的响应体。 */
|
|
@@ -287,6 +287,31 @@ export interface paths {
|
|
|
287
287
|
patch?: never;
|
|
288
288
|
trace?: never;
|
|
289
289
|
};
|
|
290
|
+
"/api/v1/dynamic-calls/{call}/result": {
|
|
291
|
+
parameters: {
|
|
292
|
+
query?: never;
|
|
293
|
+
header?: never;
|
|
294
|
+
path?: never;
|
|
295
|
+
cookie?: never;
|
|
296
|
+
};
|
|
297
|
+
get?: never;
|
|
298
|
+
put?: never;
|
|
299
|
+
/**
|
|
300
|
+
* Report what an action produced
|
|
301
|
+
* @description The assistant asks the client to run an action by adding a tool call to the conversation
|
|
302
|
+
* with the namespace `dynamic`; the client acts when that entry turns in_progress and reports
|
|
303
|
+
* back here.
|
|
304
|
+
*
|
|
305
|
+
* The first result wins. A second one — from another tab, or a retried request — is refused
|
|
306
|
+
* rather than replacing it, because the action already ran once.
|
|
307
|
+
*/
|
|
308
|
+
post: operations["submit-dynamic-call-result"];
|
|
309
|
+
delete?: never;
|
|
310
|
+
options?: never;
|
|
311
|
+
head?: never;
|
|
312
|
+
patch?: never;
|
|
313
|
+
trace?: never;
|
|
314
|
+
};
|
|
290
315
|
"/api/v1/memories": {
|
|
291
316
|
parameters: {
|
|
292
317
|
query?: never;
|
|
@@ -929,8 +954,57 @@ export interface components {
|
|
|
929
954
|
SendMessageRequestBody: {
|
|
930
955
|
/** @description Ids of attachments uploaded earlier that are not yet bound to any message */
|
|
931
956
|
attachmentIds?: string[] | null;
|
|
957
|
+
client?: components["schemas"]["ClientContextRequest"];
|
|
932
958
|
text: string;
|
|
933
959
|
};
|
|
960
|
+
/**
|
|
961
|
+
* @description What this client can do, so the assistant can ask it to do those things while it answers.
|
|
962
|
+
*
|
|
963
|
+
* Send `actions` only when they differ from what was sent last — the list is repeated to the
|
|
964
|
+
* model on every step of the turn, so an unchanged list costs more to resend than to omit.
|
|
965
|
+
* Sending the block without `actions` keeps whatever was declared before.
|
|
966
|
+
*/
|
|
967
|
+
ClientContextRequest: {
|
|
968
|
+
/** @description The actions on offer right now. Omit when unchanged since the last message. */
|
|
969
|
+
actions?: components["schemas"]["ClientActionRequest"][] | null;
|
|
970
|
+
/** @description Identifies this client while it stays open. Any stable string is fine; a fresh one per tab is expected. */
|
|
971
|
+
clientId: string;
|
|
972
|
+
/** @description How the client calls itself, shown to the model so it can name it — for example "Leaflow console (web)". */
|
|
973
|
+
label?: string;
|
|
974
|
+
page?: components["schemas"]["ClientPageRequest"];
|
|
975
|
+
};
|
|
976
|
+
ClientActionRequest: {
|
|
977
|
+
/** @description What the action does, written for the model. An action without one can only be guessed at from its name. */
|
|
978
|
+
description: string;
|
|
979
|
+
name: string;
|
|
980
|
+
/** @description JSON Schema for the arguments. Omit for an action that takes none. */
|
|
981
|
+
parameters?: {
|
|
982
|
+
[key: string]: unknown;
|
|
983
|
+
} | 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
|
+
};
|
|
997
|
+
DynamicCallResultRequestBody: {
|
|
998
|
+
/** @description The same value sent with the message. A result from a client that is no longer the attached one is refused. */
|
|
999
|
+
clientId: string;
|
|
1000
|
+
/** @description Why it failed, when `ok` is false. This reaches the model, so write it for a reader who cannot see the screen. */
|
|
1001
|
+
error?: string;
|
|
1002
|
+
/** @description Pass back when there is more to read. The assistant will call again with it. */
|
|
1003
|
+
nextCursor?: string;
|
|
1004
|
+
ok: boolean;
|
|
1005
|
+
/** @description What the action produced. At most 64 KiB; paginate anything larger rather than truncating it. */
|
|
1006
|
+
output?: string;
|
|
1007
|
+
};
|
|
934
1008
|
TodoResource: {
|
|
935
1009
|
/** @description The same step phrased as happening now — "Installing nginx". Show this one while the item is in progress. */
|
|
936
1010
|
activeForm: string;
|
|
@@ -1569,6 +1643,40 @@ export interface operations {
|
|
|
1569
1643
|
};
|
|
1570
1644
|
};
|
|
1571
1645
|
};
|
|
1646
|
+
"submit-dynamic-call-result": {
|
|
1647
|
+
parameters: {
|
|
1648
|
+
query?: never;
|
|
1649
|
+
header?: never;
|
|
1650
|
+
path: {
|
|
1651
|
+
/** @description The id of the tool call entry in the conversation. */
|
|
1652
|
+
call: string;
|
|
1653
|
+
};
|
|
1654
|
+
cookie?: never;
|
|
1655
|
+
};
|
|
1656
|
+
requestBody: {
|
|
1657
|
+
content: {
|
|
1658
|
+
"application/json": components["schemas"]["DynamicCallResultRequestBody"];
|
|
1659
|
+
};
|
|
1660
|
+
};
|
|
1661
|
+
responses: {
|
|
1662
|
+
/** @description No Content */
|
|
1663
|
+
204: {
|
|
1664
|
+
headers: {
|
|
1665
|
+
[name: string]: unknown;
|
|
1666
|
+
};
|
|
1667
|
+
content?: never;
|
|
1668
|
+
};
|
|
1669
|
+
/** @description Error */
|
|
1670
|
+
default: {
|
|
1671
|
+
headers: {
|
|
1672
|
+
[name: string]: unknown;
|
|
1673
|
+
};
|
|
1674
|
+
content: {
|
|
1675
|
+
"application/json": components["schemas"]["Error"];
|
|
1676
|
+
};
|
|
1677
|
+
};
|
|
1678
|
+
};
|
|
1679
|
+
};
|
|
1572
1680
|
"list-memories": {
|
|
1573
1681
|
parameters: {
|
|
1574
1682
|
query?: never;
|
|
@@ -368,7 +368,9 @@ export interface paths {
|
|
|
368
368
|
*
|
|
369
369
|
* Instances are created one by one in order. If the sequence stops part way through, because of a quota limit for example, **the instances already created are kept** and `failure` states why it stopped. A failure on the first instance is treated as a failure of the whole request and no instance is created.
|
|
370
370
|
*
|
|
371
|
-
* Exactly one
|
|
371
|
+
* Exactly one source must be given: `image_id` for a platform image, `private_image_id` for a private image, or `boot_disk_id` to boot a disk you already have. Supplying more than one, or none, is rejected.
|
|
372
|
+
*
|
|
373
|
+
* `boot_disk_id` recovers an instance that can no longer be repaired from the inside. Snapshot its disk, restore that snapshot into a new disk, attach the new disk to another instance and repair it there, then create an instance from it. That disk is not deleted when the instance is released; it is detached and returned to you.
|
|
372
374
|
*
|
|
373
375
|
* Instances are created in the availability zone of the instance type. Disks to be attached later must reside in the same zone.
|
|
374
376
|
*
|
|
@@ -1494,6 +1496,11 @@ export interface components {
|
|
|
1494
1496
|
hostname: string;
|
|
1495
1497
|
/** Format: uuid */
|
|
1496
1498
|
id: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* Format: uuid
|
|
1501
|
+
* @description Non-empty when the instance was created from a disk you already had, instead of from an image
|
|
1502
|
+
*/
|
|
1503
|
+
boot_disk_id: string | null;
|
|
1497
1504
|
/**
|
|
1498
1505
|
* Format: uuid
|
|
1499
1506
|
* @description Non-empty when the instance was created from a platform image
|
|
@@ -1564,13 +1571,20 @@ export interface components {
|
|
|
1564
1571
|
generate_password?: boolean;
|
|
1565
1572
|
/**
|
|
1566
1573
|
* Format: uuid
|
|
1567
|
-
* @description
|
|
1574
|
+
* @description Boot a disk you already have instead of installing an image. The disk must be available, unattached, and in the same availability zone as the instance type. Exactly one of this, `image_id` and `private_image_id`
|
|
1575
|
+
*/
|
|
1576
|
+
boot_disk_id?: string;
|
|
1577
|
+
/**
|
|
1578
|
+
* Format: uuid
|
|
1579
|
+
* @description A platform image. Exactly one of this, `private_image_id` and `boot_disk_id`
|
|
1568
1580
|
*/
|
|
1569
1581
|
image_id?: string;
|
|
1570
1582
|
/** Format: uuid */
|
|
1571
1583
|
instance_type_id: string;
|
|
1584
|
+
/** @description The account the disk lets you log in as. Required with `boot_disk_id`, and rejected without it since an image states its own */
|
|
1585
|
+
login_username?: string;
|
|
1572
1586
|
name: string;
|
|
1573
|
-
/** @description
|
|
1587
|
+
/** @description The password to set, on the login account and on root. Only the SSH public keys of the project are used when omitted */
|
|
1574
1588
|
password?: string;
|
|
1575
1589
|
/**
|
|
1576
1590
|
* Format: uuid
|
|
@@ -1579,12 +1593,12 @@ export interface components {
|
|
|
1579
1593
|
port_id?: string;
|
|
1580
1594
|
/**
|
|
1581
1595
|
* Format: uuid
|
|
1582
|
-
* @description A private image. Exactly one of this and `
|
|
1596
|
+
* @description A private image. Exactly one of this, `image_id` and `boot_disk_id`
|
|
1583
1597
|
*/
|
|
1584
1598
|
private_image_id?: string;
|
|
1585
1599
|
/**
|
|
1586
1600
|
* Format: int64
|
|
1587
|
-
* @description System disk capacity in GB. Chosen automatically from the requirement of the image and the platform minimum when omitted
|
|
1601
|
+
* @description System disk capacity in GB. Chosen automatically from the requirement of the image and the platform minimum when omitted. Ignored with `boot_disk_id`, since that disk already has its capacity
|
|
1588
1602
|
*/
|
|
1589
1603
|
root_disk_gb?: number;
|
|
1590
1604
|
/** @description Required when a primary network interface is created, at least one; the default security group is not applied automatically. Ignored together with `port_id`, as the security groups of that interface were fixed when it was created */
|