@letta-ai/letta-client 1.0.0-alpha.13 → 1.0.0-alpha.14
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.
- package/CHANGELOG.md +18 -0
- package/client.d.mts +7 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -1
- package/client.d.ts.map +1 -1
- package/client.js +7 -2
- package/client.js.map +1 -1
- package/client.mjs +7 -2
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +6 -6
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +6 -6
- package/core/pagination.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +2 -2
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +2 -2
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/files.d.mts +39 -79
- package/resources/agents/files.d.mts.map +1 -1
- package/resources/agents/files.d.ts +39 -79
- package/resources/agents/files.d.ts.map +1 -1
- package/resources/agents/files.js +5 -1
- package/resources/agents/files.js.map +1 -1
- package/resources/agents/files.mjs +5 -1
- package/resources/agents/files.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/templates/agents.d.mts +9 -14
- package/resources/templates/agents.d.mts.map +1 -1
- package/resources/templates/agents.d.ts +9 -14
- package/resources/templates/agents.d.ts.map +1 -1
- package/resources/templates/agents.js +2 -3
- package/resources/templates/agents.js.map +1 -1
- package/resources/templates/agents.mjs +2 -3
- package/resources/templates/agents.mjs.map +1 -1
- package/src/client.ts +13 -1
- package/src/core/pagination.ts +7 -7
- package/src/resources/agents/agents.ts +2 -0
- package/src/resources/agents/files.ts +47 -90
- package/src/resources/agents/index.ts +1 -0
- package/src/resources/templates/agents.ts +14 -17
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { NextFilesPage, type NextFilesPageParams, PagePromise } from '../../core/pagination';
|
|
5
6
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
7
|
import { path } from '../../internal/utils/path';
|
|
7
8
|
|
|
@@ -13,8 +14,11 @@ export class Files extends APIResource {
|
|
|
13
14
|
agentID: string,
|
|
14
15
|
query: FileListParams | null | undefined = {},
|
|
15
16
|
options?: RequestOptions,
|
|
16
|
-
):
|
|
17
|
-
return this._client.
|
|
17
|
+
): PagePromise<FileListResponsesNextFilesPage, FileListResponse> {
|
|
18
|
+
return this._client.getAPIList(path`/v1/agents/${agentID}/files`, NextFilesPage<FileListResponse>, {
|
|
19
|
+
query,
|
|
20
|
+
...options,
|
|
21
|
+
});
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
/**
|
|
@@ -51,128 +55,80 @@ export class Files extends APIResource {
|
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
|
|
58
|
+
export type FileListResponsesNextFilesPage = NextFilesPage<FileListResponse>;
|
|
59
|
+
|
|
54
60
|
/**
|
|
55
|
-
*
|
|
61
|
+
* Response model for agent file attachments showing file status in agent context
|
|
56
62
|
*/
|
|
57
63
|
export interface FileListResponse {
|
|
58
64
|
/**
|
|
59
|
-
*
|
|
65
|
+
* Unique identifier of the file-agent relationship
|
|
60
66
|
*/
|
|
61
|
-
|
|
67
|
+
id: string;
|
|
62
68
|
|
|
63
69
|
/**
|
|
64
|
-
*
|
|
70
|
+
* Unique identifier of the file
|
|
65
71
|
*/
|
|
66
|
-
|
|
72
|
+
file_id: string;
|
|
67
73
|
|
|
68
74
|
/**
|
|
69
|
-
*
|
|
75
|
+
* Name of the file
|
|
70
76
|
*/
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export namespace FileListResponse {
|
|
75
|
-
/**
|
|
76
|
-
* Response model for agent file attachments showing file status in agent context
|
|
77
|
-
*/
|
|
78
|
-
export interface File {
|
|
79
|
-
/**
|
|
80
|
-
* Unique identifier of the file-agent relationship
|
|
81
|
-
*/
|
|
82
|
-
id: string;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Unique identifier of the file
|
|
86
|
-
*/
|
|
87
|
-
file_id: string;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Name of the file
|
|
91
|
-
*/
|
|
92
|
-
file_name: string;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Unique identifier of the folder/source
|
|
96
|
-
*/
|
|
97
|
-
folder_id: string;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Name of the folder/source
|
|
101
|
-
*/
|
|
102
|
-
folder_name: string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Whether the file is currently open in the agent's context
|
|
106
|
-
*/
|
|
107
|
-
is_open: boolean;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Ending line number if file was opened with line range
|
|
111
|
-
*/
|
|
112
|
-
end_line?: number | null;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Timestamp of last access by the agent
|
|
116
|
-
*/
|
|
117
|
-
last_accessed_at?: string | null;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Starting line number if file was opened with line range
|
|
121
|
-
*/
|
|
122
|
-
start_line?: number | null;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Portion of the file visible to the agent if open
|
|
126
|
-
*/
|
|
127
|
-
visible_content?: string | null;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export type FileCloseResponse = unknown;
|
|
77
|
+
file_name: string;
|
|
132
78
|
|
|
133
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Unique identifier of the folder/source
|
|
81
|
+
*/
|
|
82
|
+
folder_id: string;
|
|
134
83
|
|
|
135
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Name of the folder/source
|
|
86
|
+
*/
|
|
87
|
+
folder_name: string;
|
|
136
88
|
|
|
137
|
-
export interface FileListParams {
|
|
138
89
|
/**
|
|
139
|
-
*
|
|
140
|
-
* specified sort order
|
|
90
|
+
* Whether the file is currently open in the agent's context
|
|
141
91
|
*/
|
|
142
|
-
|
|
92
|
+
is_open: boolean;
|
|
143
93
|
|
|
144
94
|
/**
|
|
145
|
-
*
|
|
146
|
-
* the specified sort order
|
|
95
|
+
* Ending line number if file was opened with line range
|
|
147
96
|
*/
|
|
148
|
-
|
|
97
|
+
end_line?: number | null;
|
|
149
98
|
|
|
150
99
|
/**
|
|
151
|
-
*
|
|
152
|
-
* before/after)
|
|
100
|
+
* Timestamp of last access by the agent
|
|
153
101
|
*/
|
|
154
|
-
|
|
102
|
+
last_accessed_at?: string | null;
|
|
155
103
|
|
|
156
104
|
/**
|
|
157
|
-
*
|
|
105
|
+
* Starting line number if file was opened with line range
|
|
158
106
|
*/
|
|
159
|
-
|
|
107
|
+
start_line?: number | null;
|
|
160
108
|
|
|
161
109
|
/**
|
|
162
|
-
*
|
|
110
|
+
* Portion of the file visible to the agent if open
|
|
163
111
|
*/
|
|
164
|
-
|
|
112
|
+
visible_content?: string | null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export type FileCloseResponse = unknown;
|
|
116
|
+
|
|
117
|
+
export type FileCloseAllResponse = Array<string>;
|
|
165
118
|
|
|
119
|
+
export type FileOpenResponse = Array<string>;
|
|
120
|
+
|
|
121
|
+
export interface FileListParams extends NextFilesPageParams {
|
|
166
122
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
123
|
+
* @deprecated Pagination cursor from previous response (deprecated, use
|
|
124
|
+
* before/after)
|
|
169
125
|
*/
|
|
170
|
-
|
|
126
|
+
cursor?: string | null;
|
|
171
127
|
|
|
172
128
|
/**
|
|
173
|
-
*
|
|
129
|
+
* Filter by open status (true for open files, false for closed files)
|
|
174
130
|
*/
|
|
175
|
-
|
|
131
|
+
is_open?: boolean | null;
|
|
176
132
|
}
|
|
177
133
|
|
|
178
134
|
export interface FileCloseParams {
|
|
@@ -195,6 +151,7 @@ export declare namespace Files {
|
|
|
195
151
|
type FileCloseResponse as FileCloseResponse,
|
|
196
152
|
type FileCloseAllResponse as FileCloseAllResponse,
|
|
197
153
|
type FileOpenResponse as FileOpenResponse,
|
|
154
|
+
type FileListResponsesNextFilesPage as FileListResponsesNextFilesPage,
|
|
198
155
|
type FileListParams as FileListParams,
|
|
199
156
|
type FileCloseParams as FileCloseParams,
|
|
200
157
|
type FileOpenParams as FileOpenParams,
|
|
@@ -10,9 +10,12 @@ export class Agents extends APIResource {
|
|
|
10
10
|
/**
|
|
11
11
|
* Creates an Agent or multiple Agents from a template
|
|
12
12
|
*/
|
|
13
|
-
create(
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
create(
|
|
14
|
+
templateVersion: string,
|
|
15
|
+
body: AgentCreateParams | null | undefined = {},
|
|
16
|
+
options?: RequestOptions,
|
|
17
|
+
): APIPromise<void> {
|
|
18
|
+
return this._client.post(path`/v1/templates/${templateVersion}/agents`, {
|
|
16
19
|
body,
|
|
17
20
|
...options,
|
|
18
21
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
@@ -22,40 +25,34 @@ export class Agents extends APIResource {
|
|
|
22
25
|
|
|
23
26
|
export interface AgentCreateParams {
|
|
24
27
|
/**
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
project_id: string;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Body param: The name of the agent, optional otherwise a random one will be
|
|
31
|
-
* assigned
|
|
28
|
+
* The name of the agent, optional otherwise a random one will be assigned
|
|
32
29
|
*/
|
|
33
30
|
agent_name?: string;
|
|
34
31
|
|
|
35
32
|
/**
|
|
36
|
-
*
|
|
33
|
+
* The identity ids to assign to the agent
|
|
37
34
|
*/
|
|
38
35
|
identity_ids?: Array<string>;
|
|
39
36
|
|
|
40
37
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
38
|
+
* Set an initial sequence of messages, if not provided, the agent will start with
|
|
39
|
+
* the default message sequence, if an empty array is provided, the agent will
|
|
40
|
+
* start with no messages
|
|
44
41
|
*/
|
|
45
42
|
initial_message_sequence?: Array<AgentCreateParams.InitialMessageSequence>;
|
|
46
43
|
|
|
47
44
|
/**
|
|
48
|
-
*
|
|
45
|
+
* The memory variables to assign to the agent
|
|
49
46
|
*/
|
|
50
47
|
memory_variables?: { [key: string]: string };
|
|
51
48
|
|
|
52
49
|
/**
|
|
53
|
-
*
|
|
50
|
+
* The tags to assign to the agent
|
|
54
51
|
*/
|
|
55
52
|
tags?: Array<string>;
|
|
56
53
|
|
|
57
54
|
/**
|
|
58
|
-
*
|
|
55
|
+
* The tool variables to assign to the agent
|
|
59
56
|
*/
|
|
60
57
|
tool_variables?: { [key: string]: string };
|
|
61
58
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.0.0-alpha.
|
|
1
|
+
export const VERSION = '1.0.0-alpha.14'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.0-alpha.
|
|
1
|
+
export declare const VERSION = "1.0.0-alpha.14";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.0-alpha.
|
|
1
|
+
export declare const VERSION = "1.0.0-alpha.14";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '1.0.0-alpha.
|
|
4
|
+
exports.VERSION = '1.0.0-alpha.14'; // x-release-please-version
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.0.0-alpha.
|
|
1
|
+
export const VERSION = '1.0.0-alpha.14'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|