@letta-ai/letta-client 1.6.6 → 1.6.7
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 +15 -0
- package/client.d.mts +2 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -11
- package/client.d.ts.map +1 -1
- package/client.js +0 -9
- package/client.js.map +1 -1
- package/client.mjs +0 -9
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +165 -13
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +165 -13
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +0 -8
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +0 -8
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -3
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -3
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js +1 -5
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs +0 -2
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/messages.d.mts +1 -2
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +1 -2
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/agents/messages.js.map +1 -1
- package/resources/agents/messages.mjs.map +1 -1
- package/resources/conversations/conversations.d.mts +2 -2
- package/resources/conversations/conversations.d.mts.map +1 -1
- package/resources/conversations/conversations.d.ts +2 -2
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/index.d.mts +1 -1
- package/resources/conversations/index.d.mts.map +1 -1
- package/resources/conversations/index.d.ts +1 -1
- package/resources/conversations/index.d.ts.map +1 -1
- package/resources/conversations/index.js.map +1 -1
- package/resources/conversations/index.mjs.map +1 -1
- package/resources/conversations/messages.d.mts +12 -16
- package/resources/conversations/messages.d.mts.map +1 -1
- package/resources/conversations/messages.d.ts +12 -16
- package/resources/conversations/messages.d.ts.map +1 -1
- package/resources/conversations/messages.js +3 -3
- package/resources/conversations/messages.js.map +1 -1
- package/resources/conversations/messages.mjs +3 -3
- package/resources/conversations/messages.mjs.map +1 -1
- package/resources/index.d.mts +1 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -3
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +6 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +6 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +7 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +7 -0
- package/resources/messages.mjs.map +1 -1
- package/src/client.ts +2 -79
- package/src/resources/agents/agents.ts +210 -37
- package/src/resources/agents/index.ts +0 -13
- package/src/resources/agents/messages.ts +1 -3
- package/src/resources/conversations/conversations.ts +0 -2
- package/src/resources/conversations/index.ts +0 -1
- package/src/resources/conversations/messages.ts +17 -19
- package/src/resources/index.ts +1 -35
- package/src/resources/messages.ts +11 -0
- 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
- package/resources/agents/groups.d.mts +0 -22
- package/resources/agents/groups.d.mts.map +0 -1
- package/resources/agents/groups.d.ts +0 -22
- package/resources/agents/groups.d.ts.map +0 -1
- package/resources/agents/groups.js +0 -20
- package/resources/agents/groups.js.map +0 -1
- package/resources/agents/groups.mjs +0 -16
- package/resources/agents/groups.mjs.map +0 -1
- package/resources/agents/schedule.d.mts +0 -197
- package/resources/agents/schedule.d.mts.map +0 -1
- package/resources/agents/schedule.d.ts +0 -197
- package/resources/agents/schedule.d.ts.map +0 -1
- package/resources/agents/schedule.js +0 -40
- package/resources/agents/schedule.js.map +0 -1
- package/resources/agents/schedule.mjs +0 -36
- package/resources/agents/schedule.mjs.map +0 -1
- package/resources/batches/batches.d.mts +0 -240
- package/resources/batches/batches.d.mts.map +0 -1
- package/resources/batches/batches.d.ts +0 -240
- package/resources/batches/batches.d.ts.map +0 -1
- package/resources/batches/batches.js +0 -46
- package/resources/batches/batches.js.map +0 -1
- package/resources/batches/batches.mjs +0 -41
- package/resources/batches/batches.mjs.map +0 -1
- package/resources/batches/index.d.mts +0 -3
- package/resources/batches/index.d.mts.map +0 -1
- package/resources/batches/index.d.ts +0 -3
- package/resources/batches/index.d.ts.map +0 -1
- package/resources/batches/index.js +0 -9
- package/resources/batches/index.js.map +0 -1
- package/resources/batches/index.mjs +0 -4
- package/resources/batches/index.mjs.map +0 -1
- package/resources/batches/messages.d.mts +0 -22
- package/resources/batches/messages.d.mts.map +0 -1
- package/resources/batches/messages.d.ts +0 -22
- package/resources/batches/messages.d.ts.map +0 -1
- package/resources/batches/messages.js +0 -17
- package/resources/batches/messages.js.map +0 -1
- package/resources/batches/messages.mjs +0 -13
- package/resources/batches/messages.mjs.map +0 -1
- package/resources/batches.d.mts +0 -2
- package/resources/batches.d.mts.map +0 -1
- package/resources/batches.d.ts +0 -2
- package/resources/batches.d.ts.map +0 -1
- package/resources/batches.js +0 -6
- package/resources/batches.js.map +0 -1
- package/resources/batches.mjs +0 -3
- package/resources/batches.mjs.map +0 -1
- package/resources/groups/groups.d.mts +0 -197
- package/resources/groups/groups.d.mts.map +0 -1
- package/resources/groups/groups.d.ts +0 -197
- package/resources/groups/groups.d.ts.map +0 -1
- package/resources/groups/groups.js +0 -49
- package/resources/groups/groups.js.map +0 -1
- package/resources/groups/groups.mjs +0 -44
- package/resources/groups/groups.mjs.map +0 -1
- package/resources/groups/index.d.mts +0 -3
- package/resources/groups/index.d.mts.map +0 -1
- package/resources/groups/index.d.ts +0 -3
- package/resources/groups/index.d.ts.map +0 -1
- package/resources/groups/index.js +0 -9
- package/resources/groups/index.js.map +0 -1
- package/resources/groups/index.mjs +0 -4
- package/resources/groups/index.mjs.map +0 -1
- package/resources/groups/messages.d.mts +0 -360
- package/resources/groups/messages.d.mts.map +0 -1
- package/resources/groups/messages.d.ts +0 -360
- package/resources/groups/messages.d.ts.map +0 -1
- package/resources/groups/messages.js +0 -54
- package/resources/groups/messages.js.map +0 -1
- package/resources/groups/messages.mjs +0 -50
- package/resources/groups/messages.mjs.map +0 -1
- package/resources/groups.d.mts +0 -2
- package/resources/groups.d.mts.map +0 -1
- package/resources/groups.d.ts +0 -2
- package/resources/groups.d.ts.map +0 -1
- package/resources/groups.js +0 -6
- package/resources/groups.js.map +0 -1
- package/resources/groups.mjs +0 -3
- package/resources/groups.mjs.map +0 -1
- package/resources/identities/agents.d.mts +0 -23
- package/resources/identities/agents.d.mts.map +0 -1
- package/resources/identities/agents.d.ts +0 -23
- package/resources/identities/agents.d.ts.map +0 -1
- package/resources/identities/agents.js +0 -17
- package/resources/identities/agents.js.map +0 -1
- package/resources/identities/agents.mjs +0 -13
- package/resources/identities/agents.mjs.map +0 -1
- package/resources/identities/blocks.d.mts +0 -18
- package/resources/identities/blocks.d.mts.map +0 -1
- package/resources/identities/blocks.d.ts +0 -18
- package/resources/identities/blocks.d.ts.map +0 -1
- package/resources/identities/blocks.js +0 -17
- package/resources/identities/blocks.js.map +0 -1
- package/resources/identities/blocks.mjs +0 -13
- package/resources/identities/blocks.mjs.map +0 -1
- package/resources/identities/identities.d.mts +0 -204
- package/resources/identities/identities.d.mts.map +0 -1
- package/resources/identities/identities.d.ts +0 -204
- package/resources/identities/identities.d.ts.map +0 -1
- package/resources/identities/identities.js +0 -63
- package/resources/identities/identities.js.map +0 -1
- package/resources/identities/identities.mjs +0 -58
- package/resources/identities/identities.mjs.map +0 -1
- package/resources/identities/index.d.mts +0 -5
- package/resources/identities/index.d.mts.map +0 -1
- package/resources/identities/index.d.ts +0 -5
- package/resources/identities/index.d.ts.map +0 -1
- package/resources/identities/index.js +0 -13
- package/resources/identities/index.js.map +0 -1
- package/resources/identities/index.mjs +0 -6
- package/resources/identities/index.mjs.map +0 -1
- package/resources/identities/properties.d.mts +0 -18
- package/resources/identities/properties.d.mts.map +0 -1
- package/resources/identities/properties.d.ts +0 -18
- package/resources/identities/properties.d.ts.map +0 -1
- package/resources/identities/properties.js +0 -17
- package/resources/identities/properties.js.map +0 -1
- package/resources/identities/properties.mjs +0 -13
- package/resources/identities/properties.mjs.map +0 -1
- package/resources/identities.d.mts +0 -2
- package/resources/identities.d.mts.map +0 -1
- package/resources/identities.d.ts +0 -2
- package/resources/identities.d.ts.map +0 -1
- package/resources/identities.js +0 -6
- package/resources/identities.js.map +0 -1
- package/resources/identities.mjs +0 -3
- package/resources/identities.mjs.map +0 -1
- package/src/resources/agents/groups.ts +0 -37
- package/src/resources/agents/schedule.ts +0 -361
- package/src/resources/batches/batches.ts +0 -317
- package/src/resources/batches/index.ts +0 -11
- package/src/resources/batches/messages.ts +0 -38
- package/src/resources/batches.ts +0 -3
- package/src/resources/groups/groups.ts +0 -334
- package/src/resources/groups/index.ts +0 -27
- package/src/resources/groups/messages.ts +0 -505
- package/src/resources/groups.ts +0 -3
- package/src/resources/identities/agents.ts +0 -48
- package/src/resources/identities/blocks.ts +0 -33
- package/src/resources/identities/identities.ts +0 -286
- package/src/resources/identities/index.ts +0 -17
- package/src/resources/identities/properties.ts +0 -30
- package/src/resources/identities.ts +0 -3
|
@@ -43,8 +43,6 @@ import {
|
|
|
43
43
|
FolderListResponsesArrayPage,
|
|
44
44
|
Folders,
|
|
45
45
|
} from './folders';
|
|
46
|
-
import * as GroupsAPI from './groups';
|
|
47
|
-
import { GroupListParams, Groups } from './groups';
|
|
48
46
|
import * as IdentitiesAPI from './identities';
|
|
49
47
|
import {
|
|
50
48
|
Identities,
|
|
@@ -120,18 +118,6 @@ import {
|
|
|
120
118
|
PassageSearchResponse,
|
|
121
119
|
Passages,
|
|
122
120
|
} from './passages';
|
|
123
|
-
import * as ScheduleAPI from './schedule';
|
|
124
|
-
import {
|
|
125
|
-
Schedule,
|
|
126
|
-
ScheduleCreateParams,
|
|
127
|
-
ScheduleCreateResponse,
|
|
128
|
-
ScheduleDeleteParams,
|
|
129
|
-
ScheduleDeleteResponse,
|
|
130
|
-
ScheduleListParams,
|
|
131
|
-
ScheduleListResponse,
|
|
132
|
-
ScheduleRetrieveParams,
|
|
133
|
-
ScheduleRetrieveResponse,
|
|
134
|
-
} from './schedule';
|
|
135
121
|
import * as AgentsToolsAPI from './tools';
|
|
136
122
|
import {
|
|
137
123
|
ToolAttachParams,
|
|
@@ -145,8 +131,6 @@ import {
|
|
|
145
131
|
} from './tools';
|
|
146
132
|
import * as ArchivesArchivesAPI from '../archives/archives';
|
|
147
133
|
import * as BlocksBlocksAPI from '../blocks/blocks';
|
|
148
|
-
import * as GroupsGroupsAPI from '../groups/groups';
|
|
149
|
-
import * as IdentitiesIdentitiesAPI from '../identities/identities';
|
|
150
134
|
import * as ModelsAPI from '../models/models';
|
|
151
135
|
import * as RunsAPI from '../runs/runs';
|
|
152
136
|
import { APIPromise } from '../../core/api-promise';
|
|
@@ -159,12 +143,10 @@ import { path } from '../../internal/utils/path';
|
|
|
159
143
|
|
|
160
144
|
export class Agents extends APIResource {
|
|
161
145
|
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
162
|
-
schedule: ScheduleAPI.Schedule = new ScheduleAPI.Schedule(this._client);
|
|
163
146
|
blocks: BlocksAPI.Blocks = new BlocksAPI.Blocks(this._client);
|
|
164
147
|
tools: AgentsToolsAPI.Tools = new AgentsToolsAPI.Tools(this._client);
|
|
165
148
|
folders: FoldersAPI.Folders = new FoldersAPI.Folders(this._client);
|
|
166
149
|
files: FilesAPI.Files = new FilesAPI.Files(this._client);
|
|
167
|
-
groups: GroupsAPI.Groups = new GroupsAPI.Groups(this._client);
|
|
168
150
|
archives: ArchivesAPI.Archives = new ArchivesAPI.Archives(this._client);
|
|
169
151
|
passages: PassagesAPI.Passages = new PassagesAPI.Passages(this._client);
|
|
170
152
|
identities: IdentitiesAPI.Identities = new IdentitiesAPI.Identities(this._client);
|
|
@@ -426,7 +408,7 @@ export interface AgentState {
|
|
|
426
408
|
/**
|
|
427
409
|
* The identities associated with this agent.
|
|
428
410
|
*/
|
|
429
|
-
identities?: Array<
|
|
411
|
+
identities?: Array<AgentState.Identity>;
|
|
430
412
|
|
|
431
413
|
/**
|
|
432
414
|
* @deprecated Deprecated: Use `identities` field instead. The ids of the
|
|
@@ -457,7 +439,7 @@ export interface AgentState {
|
|
|
457
439
|
/**
|
|
458
440
|
* The multi-agent group that this agent manages
|
|
459
441
|
*/
|
|
460
|
-
managed_group?:
|
|
442
|
+
managed_group?: AgentState.ManagedGroup | null;
|
|
461
443
|
|
|
462
444
|
/**
|
|
463
445
|
* Maximum number of files that can be open at once for this agent. Setting this
|
|
@@ -508,7 +490,7 @@ export interface AgentState {
|
|
|
508
490
|
* @deprecated Deprecated: Use `managed_group` field instead. The multi-agent group
|
|
509
491
|
* that this agent manages.
|
|
510
492
|
*/
|
|
511
|
-
multi_agent_group?:
|
|
493
|
+
multi_agent_group?: AgentState.MultiAgentGroup | null;
|
|
512
494
|
|
|
513
495
|
/**
|
|
514
496
|
* A message representing a request for approval to call a tool (generated by the
|
|
@@ -881,6 +863,141 @@ export namespace AgentState {
|
|
|
881
863
|
}
|
|
882
864
|
}
|
|
883
865
|
|
|
866
|
+
export interface Identity {
|
|
867
|
+
/**
|
|
868
|
+
* The human-friendly ID of the Identity
|
|
869
|
+
*/
|
|
870
|
+
id: string;
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* @deprecated The IDs of the agents associated with the identity.
|
|
874
|
+
*/
|
|
875
|
+
agent_ids: Array<string>;
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* @deprecated The IDs of the blocks associated with the identity.
|
|
879
|
+
*/
|
|
880
|
+
block_ids: Array<string>;
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* External, user-generated identifier key of the identity.
|
|
884
|
+
*/
|
|
885
|
+
identifier_key: string;
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* The type of the identity.
|
|
889
|
+
*/
|
|
890
|
+
identity_type: 'org' | 'user' | 'other';
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* The name of the identity.
|
|
894
|
+
*/
|
|
895
|
+
name: string;
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* The project id of the identity, if applicable.
|
|
899
|
+
*/
|
|
900
|
+
project_id?: string | null;
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* List of properties associated with the identity
|
|
904
|
+
*/
|
|
905
|
+
properties?: Array<Identity.Property>;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export namespace Identity {
|
|
909
|
+
/**
|
|
910
|
+
* A property of an identity
|
|
911
|
+
*/
|
|
912
|
+
export interface Property {
|
|
913
|
+
/**
|
|
914
|
+
* The key of the property
|
|
915
|
+
*/
|
|
916
|
+
key: string;
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* The type of the property
|
|
920
|
+
*/
|
|
921
|
+
type: 'string' | 'number' | 'boolean' | 'json';
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* The value of the property
|
|
925
|
+
*/
|
|
926
|
+
value: string | number | boolean | { [key: string]: unknown };
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* The multi-agent group that this agent manages
|
|
932
|
+
*/
|
|
933
|
+
export interface ManagedGroup {
|
|
934
|
+
/**
|
|
935
|
+
* The id of the group. Assigned by the database.
|
|
936
|
+
*/
|
|
937
|
+
id: string;
|
|
938
|
+
|
|
939
|
+
agent_ids: Array<string>;
|
|
940
|
+
|
|
941
|
+
description: string;
|
|
942
|
+
|
|
943
|
+
manager_type: 'round_robin' | 'supervisor' | 'dynamic' | 'sleeptime' | 'voice_sleeptime' | 'swarm';
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* The base template id.
|
|
947
|
+
*/
|
|
948
|
+
base_template_id?: string | null;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* The id of the deployment.
|
|
952
|
+
*/
|
|
953
|
+
deployment_id?: string | null;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* If set to True, the group will be hidden.
|
|
957
|
+
*/
|
|
958
|
+
hidden?: boolean | null;
|
|
959
|
+
|
|
960
|
+
last_processed_message_id?: string | null;
|
|
961
|
+
|
|
962
|
+
manager_agent_id?: string | null;
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* The desired maximum length of messages in the context window of the convo agent.
|
|
966
|
+
* This is a best effort, and may be off slightly due to user/assistant
|
|
967
|
+
* interleaving.
|
|
968
|
+
*/
|
|
969
|
+
max_message_buffer_length?: number | null;
|
|
970
|
+
|
|
971
|
+
max_turns?: number | null;
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* The desired minimum length of messages in the context window of the convo agent.
|
|
975
|
+
* This is a best effort, and may be off-by-one due to user/assistant interleaving.
|
|
976
|
+
*/
|
|
977
|
+
min_message_buffer_length?: number | null;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* The associated project id.
|
|
981
|
+
*/
|
|
982
|
+
project_id?: string | null;
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* @deprecated
|
|
986
|
+
*/
|
|
987
|
+
shared_block_ids?: Array<string>;
|
|
988
|
+
|
|
989
|
+
sleeptime_agent_frequency?: number | null;
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* The id of the template.
|
|
993
|
+
*/
|
|
994
|
+
template_id?: string | null;
|
|
995
|
+
|
|
996
|
+
termination_token?: string | null;
|
|
997
|
+
|
|
998
|
+
turns_counter?: number | null;
|
|
999
|
+
}
|
|
1000
|
+
|
|
884
1001
|
/**
|
|
885
1002
|
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
886
1003
|
*/
|
|
@@ -914,6 +1031,78 @@ export namespace AgentState {
|
|
|
914
1031
|
*/
|
|
915
1032
|
temperature?: number;
|
|
916
1033
|
}
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* @deprecated Deprecated: Use `managed_group` field instead. The multi-agent group
|
|
1037
|
+
* that this agent manages.
|
|
1038
|
+
*/
|
|
1039
|
+
export interface MultiAgentGroup {
|
|
1040
|
+
/**
|
|
1041
|
+
* The id of the group. Assigned by the database.
|
|
1042
|
+
*/
|
|
1043
|
+
id: string;
|
|
1044
|
+
|
|
1045
|
+
agent_ids: Array<string>;
|
|
1046
|
+
|
|
1047
|
+
description: string;
|
|
1048
|
+
|
|
1049
|
+
manager_type: 'round_robin' | 'supervisor' | 'dynamic' | 'sleeptime' | 'voice_sleeptime' | 'swarm';
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* The base template id.
|
|
1053
|
+
*/
|
|
1054
|
+
base_template_id?: string | null;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* The id of the deployment.
|
|
1058
|
+
*/
|
|
1059
|
+
deployment_id?: string | null;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* If set to True, the group will be hidden.
|
|
1063
|
+
*/
|
|
1064
|
+
hidden?: boolean | null;
|
|
1065
|
+
|
|
1066
|
+
last_processed_message_id?: string | null;
|
|
1067
|
+
|
|
1068
|
+
manager_agent_id?: string | null;
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* The desired maximum length of messages in the context window of the convo agent.
|
|
1072
|
+
* This is a best effort, and may be off slightly due to user/assistant
|
|
1073
|
+
* interleaving.
|
|
1074
|
+
*/
|
|
1075
|
+
max_message_buffer_length?: number | null;
|
|
1076
|
+
|
|
1077
|
+
max_turns?: number | null;
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* The desired minimum length of messages in the context window of the convo agent.
|
|
1081
|
+
* This is a best effort, and may be off-by-one due to user/assistant interleaving.
|
|
1082
|
+
*/
|
|
1083
|
+
min_message_buffer_length?: number | null;
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* The associated project id.
|
|
1087
|
+
*/
|
|
1088
|
+
project_id?: string | null;
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* @deprecated
|
|
1092
|
+
*/
|
|
1093
|
+
shared_block_ids?: Array<string>;
|
|
1094
|
+
|
|
1095
|
+
sleeptime_agent_frequency?: number | null;
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* The id of the template.
|
|
1099
|
+
*/
|
|
1100
|
+
template_id?: string | null;
|
|
1101
|
+
|
|
1102
|
+
termination_token?: string | null;
|
|
1103
|
+
|
|
1104
|
+
turns_counter?: number | null;
|
|
1105
|
+
}
|
|
917
1106
|
}
|
|
918
1107
|
|
|
919
1108
|
/**
|
|
@@ -2629,12 +2818,10 @@ export interface AgentImportFileParams {
|
|
|
2629
2818
|
}
|
|
2630
2819
|
|
|
2631
2820
|
Agents.Messages = Messages;
|
|
2632
|
-
Agents.Schedule = Schedule;
|
|
2633
2821
|
Agents.Blocks = Blocks;
|
|
2634
2822
|
Agents.Tools = Tools;
|
|
2635
2823
|
Agents.Folders = Folders;
|
|
2636
2824
|
Agents.Files = Files;
|
|
2637
|
-
Agents.Groups = Groups;
|
|
2638
2825
|
Agents.Archives = Archives;
|
|
2639
2826
|
Agents.Passages = Passages;
|
|
2640
2827
|
Agents.Identities = Identities;
|
|
@@ -2735,18 +2922,6 @@ export declare namespace Agents {
|
|
|
2735
2922
|
type MessageStreamParams as MessageStreamParams,
|
|
2736
2923
|
};
|
|
2737
2924
|
|
|
2738
|
-
export {
|
|
2739
|
-
Schedule as Schedule,
|
|
2740
|
-
type ScheduleCreateResponse as ScheduleCreateResponse,
|
|
2741
|
-
type ScheduleRetrieveResponse as ScheduleRetrieveResponse,
|
|
2742
|
-
type ScheduleListResponse as ScheduleListResponse,
|
|
2743
|
-
type ScheduleDeleteResponse as ScheduleDeleteResponse,
|
|
2744
|
-
type ScheduleCreateParams as ScheduleCreateParams,
|
|
2745
|
-
type ScheduleRetrieveParams as ScheduleRetrieveParams,
|
|
2746
|
-
type ScheduleListParams as ScheduleListParams,
|
|
2747
|
-
type ScheduleDeleteParams as ScheduleDeleteParams,
|
|
2748
|
-
};
|
|
2749
|
-
|
|
2750
2925
|
export {
|
|
2751
2926
|
Blocks as Blocks,
|
|
2752
2927
|
type Block as Block,
|
|
@@ -2790,8 +2965,6 @@ export declare namespace Agents {
|
|
|
2790
2965
|
type FileOpenParams as FileOpenParams,
|
|
2791
2966
|
};
|
|
2792
2967
|
|
|
2793
|
-
export { Groups as Groups, type GroupListParams as GroupListParams };
|
|
2794
|
-
|
|
2795
2968
|
export {
|
|
2796
2969
|
Archives as Archives,
|
|
2797
2970
|
type ArchiveAttachResponse as ArchiveAttachResponse,
|
|
@@ -76,7 +76,6 @@ export {
|
|
|
76
76
|
type FolderDetachParams,
|
|
77
77
|
type FolderListResponsesArrayPage,
|
|
78
78
|
} from './folders';
|
|
79
|
-
export { Groups, type GroupListParams } from './groups';
|
|
80
79
|
export {
|
|
81
80
|
Identities,
|
|
82
81
|
type IdentityAttachResponse,
|
|
@@ -138,7 +137,6 @@ export {
|
|
|
138
137
|
type MessageStreamParams,
|
|
139
138
|
type RunsArrayPage,
|
|
140
139
|
type MessagesArrayPage,
|
|
141
|
-
type InternalMessagesObjectPage,
|
|
142
140
|
} from './messages';
|
|
143
141
|
export {
|
|
144
142
|
Passages,
|
|
@@ -151,17 +149,6 @@ export {
|
|
|
151
149
|
type PassageDeleteParams,
|
|
152
150
|
type PassageSearchParams,
|
|
153
151
|
} from './passages';
|
|
154
|
-
export {
|
|
155
|
-
Schedule,
|
|
156
|
-
type ScheduleCreateResponse,
|
|
157
|
-
type ScheduleRetrieveResponse,
|
|
158
|
-
type ScheduleListResponse,
|
|
159
|
-
type ScheduleDeleteResponse,
|
|
160
|
-
type ScheduleCreateParams,
|
|
161
|
-
type ScheduleRetrieveParams,
|
|
162
|
-
type ScheduleListParams,
|
|
163
|
-
type ScheduleDeleteParams,
|
|
164
|
-
} from './schedule';
|
|
165
152
|
export {
|
|
166
153
|
Tools,
|
|
167
154
|
type ToolExecuteRequest,
|
|
@@ -6,7 +6,7 @@ import * as ToolsAPI from '../tools';
|
|
|
6
6
|
import * as AgentsAPI from './agents';
|
|
7
7
|
import * as RunsAPI from '../runs/runs';
|
|
8
8
|
import { APIPromise } from '../../core/api-promise';
|
|
9
|
-
import { ArrayPage, type ArrayPageParams,
|
|
9
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
10
10
|
import { Stream } from '../../core/streaming';
|
|
11
11
|
import { RequestOptions } from '../../internal/request-options';
|
|
12
12
|
import { path } from '../../internal/utils/path';
|
|
@@ -146,8 +146,6 @@ export type MessagesArrayPage = ArrayPage<Message>;
|
|
|
146
146
|
|
|
147
147
|
export type RunsArrayPage = ArrayPage<Run>;
|
|
148
148
|
|
|
149
|
-
export type InternalMessagesObjectPage = ObjectPage<InternalMessage>;
|
|
150
|
-
|
|
151
149
|
/**
|
|
152
150
|
* Input to approve or deny a tool call request
|
|
153
151
|
*/
|
|
@@ -5,7 +5,6 @@ import * as MessagesAPI from './messages';
|
|
|
5
5
|
import {
|
|
6
6
|
MessageCreateParams,
|
|
7
7
|
MessageListParams,
|
|
8
|
-
MessageListResponse,
|
|
9
8
|
MessageStreamParams,
|
|
10
9
|
MessageStreamResponse,
|
|
11
10
|
Messages,
|
|
@@ -159,7 +158,6 @@ export declare namespace Conversations {
|
|
|
159
158
|
|
|
160
159
|
export {
|
|
161
160
|
Messages as Messages,
|
|
162
|
-
type MessageListResponse as MessageListResponse,
|
|
163
161
|
type MessageStreamResponse as MessageStreamResponse,
|
|
164
162
|
type MessageCreateParams as MessageCreateParams,
|
|
165
163
|
type MessageListParams as MessageListParams,
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as AgentsAPI from '../agents/agents';
|
|
5
5
|
import * as MessagesAPI from '../agents/messages';
|
|
6
|
+
import { MessagesArrayPage } from '../agents/messages';
|
|
6
7
|
import { APIPromise } from '../../core/api-promise';
|
|
8
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
7
9
|
import { Stream } from '../../core/streaming';
|
|
8
10
|
import { RequestOptions } from '../../internal/request-options';
|
|
9
11
|
import { path } from '../../internal/utils/path';
|
|
@@ -31,15 +33,18 @@ export class Messages extends APIResource {
|
|
|
31
33
|
* List all messages in a conversation.
|
|
32
34
|
*
|
|
33
35
|
* Returns LettaMessage objects (UserMessage, AssistantMessage, etc.) for all
|
|
34
|
-
* messages in the conversation,
|
|
35
|
-
* for cursor-based pagination.
|
|
36
|
+
* messages in the conversation, with support for cursor-based pagination.
|
|
36
37
|
*/
|
|
37
38
|
list(
|
|
38
39
|
conversationID: string,
|
|
39
40
|
query: MessageListParams | null | undefined = {},
|
|
40
41
|
options?: RequestOptions,
|
|
41
|
-
):
|
|
42
|
-
return this._client.
|
|
42
|
+
): PagePromise<MessagesArrayPage, MessagesAPI.Message> {
|
|
43
|
+
return this._client.getAPIList(
|
|
44
|
+
path`/v1/conversations/${conversationID}/messages`,
|
|
45
|
+
ArrayPage<MessagesAPI.Message>,
|
|
46
|
+
{ query, ...options },
|
|
47
|
+
);
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
/**
|
|
@@ -61,8 +66,6 @@ export class Messages extends APIResource {
|
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
68
|
|
|
64
|
-
export type MessageListResponse = Array<MessagesAPI.Message>;
|
|
65
|
-
|
|
66
69
|
export type MessageStreamResponse = unknown;
|
|
67
70
|
|
|
68
71
|
export interface MessageCreateParams {
|
|
@@ -223,23 +226,17 @@ export namespace MessageCreateParams {
|
|
|
223
226
|
}
|
|
224
227
|
}
|
|
225
228
|
|
|
226
|
-
export interface MessageListParams {
|
|
229
|
+
export interface MessageListParams extends ArrayPageParams {
|
|
227
230
|
/**
|
|
228
|
-
*
|
|
229
|
-
* ID in the conversation
|
|
231
|
+
* Group ID to filter messages by.
|
|
230
232
|
*/
|
|
231
|
-
|
|
233
|
+
group_id?: string | null;
|
|
232
234
|
|
|
233
235
|
/**
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
+
* Whether to include error messages and error statuses. For debugging purposes
|
|
237
|
+
* only.
|
|
236
238
|
*/
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Maximum number of messages to return
|
|
241
|
-
*/
|
|
242
|
-
limit?: number | null;
|
|
239
|
+
include_err?: boolean | null;
|
|
243
240
|
}
|
|
244
241
|
|
|
245
242
|
export interface MessageStreamParams {
|
|
@@ -268,10 +265,11 @@ export interface MessageStreamParams {
|
|
|
268
265
|
|
|
269
266
|
export declare namespace Messages {
|
|
270
267
|
export {
|
|
271
|
-
type MessageListResponse as MessageListResponse,
|
|
272
268
|
type MessageStreamResponse as MessageStreamResponse,
|
|
273
269
|
type MessageCreateParams as MessageCreateParams,
|
|
274
270
|
type MessageListParams as MessageListParams,
|
|
275
271
|
type MessageStreamParams as MessageStreamParams,
|
|
276
272
|
};
|
|
277
273
|
}
|
|
274
|
+
|
|
275
|
+
export { type MessagesArrayPage };
|
package/src/resources/index.ts
CHANGED
|
@@ -58,14 +58,6 @@ export {
|
|
|
58
58
|
type ArchiveListParams,
|
|
59
59
|
type ArchivesArrayPage,
|
|
60
60
|
} from './archives/archives';
|
|
61
|
-
export {
|
|
62
|
-
Batches,
|
|
63
|
-
type BatchJob,
|
|
64
|
-
type BatchCancelResponse,
|
|
65
|
-
type BatchCreateParams,
|
|
66
|
-
type BatchListParams,
|
|
67
|
-
type BatchJobsArrayPage,
|
|
68
|
-
} from './batches/batches';
|
|
69
61
|
export {
|
|
70
62
|
Blocks,
|
|
71
63
|
type BlockResponse,
|
|
@@ -93,33 +85,6 @@ export {
|
|
|
93
85
|
type FolderListParams,
|
|
94
86
|
type FoldersArrayPage,
|
|
95
87
|
} from './folders/folders';
|
|
96
|
-
export {
|
|
97
|
-
Groups,
|
|
98
|
-
type DynamicManager,
|
|
99
|
-
type Group,
|
|
100
|
-
type ManagerType,
|
|
101
|
-
type RoundRobinManager,
|
|
102
|
-
type SleeptimeManager,
|
|
103
|
-
type SupervisorManager,
|
|
104
|
-
type VoiceSleeptimeManager,
|
|
105
|
-
type GroupDeleteResponse,
|
|
106
|
-
type GroupCreateParams,
|
|
107
|
-
type GroupUpdateParams,
|
|
108
|
-
type GroupListParams,
|
|
109
|
-
type GroupsArrayPage,
|
|
110
|
-
} from './groups/groups';
|
|
111
|
-
export {
|
|
112
|
-
Identities,
|
|
113
|
-
type Identity,
|
|
114
|
-
type IdentityProperty,
|
|
115
|
-
type IdentityType,
|
|
116
|
-
type IdentityDeleteResponse,
|
|
117
|
-
type IdentityCreateParams,
|
|
118
|
-
type IdentityUpdateParams,
|
|
119
|
-
type IdentityListParams,
|
|
120
|
-
type IdentityUpsertParams,
|
|
121
|
-
type IdentitiesArrayPage,
|
|
122
|
-
} from './identities/identities';
|
|
123
88
|
export {
|
|
124
89
|
McpServers,
|
|
125
90
|
type CreateSseMcpServer,
|
|
@@ -144,6 +109,7 @@ export {
|
|
|
144
109
|
Messages,
|
|
145
110
|
type MessageSearchRequest,
|
|
146
111
|
type MessageSearchResult,
|
|
112
|
+
type MessageRetrieveResponse,
|
|
147
113
|
type MessageListResponse,
|
|
148
114
|
type MessageSearchResponse,
|
|
149
115
|
type MessageListParams,
|
|
@@ -4,8 +4,16 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import * as AgentsMessagesAPI from './agents/messages';
|
|
5
5
|
import { APIPromise } from '../core/api-promise';
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
7
8
|
|
|
8
9
|
export class Messages extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a message by ID.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(messageID: string, options?: RequestOptions): APIPromise<MessageRetrieveResponse> {
|
|
14
|
+
return this._client.get(path`/v1/messages/${messageID}`, options);
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
/**
|
|
10
18
|
* List messages across all agents for the current user.
|
|
11
19
|
*/
|
|
@@ -94,6 +102,8 @@ export interface MessageSearchResult {
|
|
|
94
102
|
vector_rank?: number | null;
|
|
95
103
|
}
|
|
96
104
|
|
|
105
|
+
export type MessageRetrieveResponse = Array<AgentsMessagesAPI.Message>;
|
|
106
|
+
|
|
97
107
|
export type MessageListResponse = Array<AgentsMessagesAPI.Message>;
|
|
98
108
|
|
|
99
109
|
export type MessageSearchResponse = Array<
|
|
@@ -296,6 +306,7 @@ export declare namespace Messages {
|
|
|
296
306
|
export {
|
|
297
307
|
type MessageSearchRequest as MessageSearchRequest,
|
|
298
308
|
type MessageSearchResult as MessageSearchResult,
|
|
309
|
+
type MessageRetrieveResponse as MessageRetrieveResponse,
|
|
299
310
|
type MessageListResponse as MessageListResponse,
|
|
300
311
|
type MessageSearchResponse as MessageSearchResponse,
|
|
301
312
|
type MessageListParams as MessageListParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.6.
|
|
1
|
+
export const VERSION = '1.6.7'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.6.
|
|
1
|
+
export declare const VERSION = "1.6.7";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.6.
|
|
1
|
+
export declare const VERSION = "1.6.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.6.
|
|
1
|
+
export const VERSION = '1.6.7'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as GroupsGroupsAPI from "../groups/groups.mjs";
|
|
3
|
-
import { GroupsArrayPage } from "../groups/groups.mjs";
|
|
4
|
-
import { type ArrayPageParams, PagePromise } from "../../core/pagination.mjs";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
-
export declare class Groups extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Lists the groups for an agent.
|
|
9
|
-
*/
|
|
10
|
-
list(agentID: string, query?: GroupListParams | null | undefined, options?: RequestOptions): PagePromise<GroupsArrayPage, GroupsGroupsAPI.Group>;
|
|
11
|
-
}
|
|
12
|
-
export interface GroupListParams extends ArrayPageParams {
|
|
13
|
-
/**
|
|
14
|
-
* Manager type to filter groups by
|
|
15
|
-
*/
|
|
16
|
-
manager_type?: string | null;
|
|
17
|
-
}
|
|
18
|
-
export declare namespace Groups {
|
|
19
|
-
export { type GroupListParams as GroupListParams };
|
|
20
|
-
}
|
|
21
|
-
export { type GroupsArrayPage };
|
|
22
|
-
//# sourceMappingURL=groups.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups.d.mts","sourceRoot":"","sources":["../../src/resources/agents/groups.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAAE,eAAe,EAAE;OACnB,EAAa,KAAK,eAAe,EAAE,WAAW,EAAE;OAChD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC;CAMvD;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACpD;AAED,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as GroupsGroupsAPI from "../groups/groups.js";
|
|
3
|
-
import { GroupsArrayPage } from "../groups/groups.js";
|
|
4
|
-
import { type ArrayPageParams, PagePromise } from "../../core/pagination.js";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
-
export declare class Groups extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Lists the groups for an agent.
|
|
9
|
-
*/
|
|
10
|
-
list(agentID: string, query?: GroupListParams | null | undefined, options?: RequestOptions): PagePromise<GroupsArrayPage, GroupsGroupsAPI.Group>;
|
|
11
|
-
}
|
|
12
|
-
export interface GroupListParams extends ArrayPageParams {
|
|
13
|
-
/**
|
|
14
|
-
* Manager type to filter groups by
|
|
15
|
-
*/
|
|
16
|
-
manager_type?: string | null;
|
|
17
|
-
}
|
|
18
|
-
export declare namespace Groups {
|
|
19
|
-
export { type GroupListParams as GroupListParams };
|
|
20
|
-
}
|
|
21
|
-
export { type GroupsArrayPage };
|
|
22
|
-
//# sourceMappingURL=groups.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/resources/agents/groups.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAAE,eAAe,EAAE;OACnB,EAAa,KAAK,eAAe,EAAE,WAAW,EAAE;OAChD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC;CAMvD;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACpD;AAED,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Groups = void 0;
|
|
5
|
-
const resource_1 = require("../../core/resource.js");
|
|
6
|
-
const pagination_1 = require("../../core/pagination.js");
|
|
7
|
-
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
-
class Groups extends resource_1.APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Lists the groups for an agent.
|
|
11
|
-
*/
|
|
12
|
-
list(agentID, query = {}, options) {
|
|
13
|
-
return this._client.getAPIList((0, path_1.path) `/v1/agents/${agentID}/groups`, (pagination_1.ArrayPage), {
|
|
14
|
-
query,
|
|
15
|
-
...options,
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.Groups = Groups;
|
|
20
|
-
//# sourceMappingURL=groups.js.map
|