@axiom-lattice/protocols 2.1.19 → 2.1.21
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +211 -102
- package/dist/index.d.ts +211 -102
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/AgentLatticeProtocol.ts +20 -1
- package/src/AssistantStoreProtocol.ts +20 -8
- package/src/MetricsServerConfigStoreProtocol.ts +118 -62
- package/src/ModelLatticeProtocol.ts +2 -0
- package/src/ScheduleLatticeProtocol.ts +2 -0
- package/src/SkillStoreProtocol.ts +35 -16
- package/src/ThreadStoreProtocol.ts +21 -13
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ interface LLMConfig {
|
|
|
101
101
|
apiKeyEnvName?: string;
|
|
102
102
|
apiKey?: string;
|
|
103
103
|
baseURL?: string;
|
|
104
|
+
modelKwargs?: Record<string, any>;
|
|
105
|
+
extra?: Record<string, any>;
|
|
104
106
|
}
|
|
105
107
|
/**
|
|
106
108
|
* 模型Lattice协议接口
|
|
@@ -182,7 +184,7 @@ interface MetricsMiddlewareConfig {
|
|
|
182
184
|
/** Optional descriptions for each server */
|
|
183
185
|
serverDescriptions?: Record<string, string>;
|
|
184
186
|
}
|
|
185
|
-
type MiddlewareType = "filesystem" | "code_eval" | "browser" | "sql" | "skill" | "http" | "custom" | "metrics" | "ask_user_to_clarify";
|
|
187
|
+
type MiddlewareType = "filesystem" | "code_eval" | "browser" | "sql" | "skill" | "http" | "custom" | "metrics" | "ask_user_to_clarify" | "widget";
|
|
186
188
|
interface AgentMiddlewareConfig {
|
|
187
189
|
id: string;
|
|
188
190
|
type: MiddlewareType;
|
|
@@ -191,6 +193,24 @@ interface AgentMiddlewareConfig {
|
|
|
191
193
|
enabled: boolean;
|
|
192
194
|
config: SandboxMiddlewareConfig | CodeEvalMiddlewareConfig | BrowserMiddlewareConfig | SqlMiddlewareConfig | MetricsMiddlewareConfig | Record<string, any>;
|
|
193
195
|
}
|
|
196
|
+
/**
|
|
197
|
+
* Bootstrap file configuration
|
|
198
|
+
* Defines default content for project bootstrap files
|
|
199
|
+
*/
|
|
200
|
+
interface BootstrapFilesConfig {
|
|
201
|
+
/** Default content for AGENTS.md - operating instructions */
|
|
202
|
+
agents?: string;
|
|
203
|
+
/** Default content for SOUL.md - personality and tone */
|
|
204
|
+
soul?: string;
|
|
205
|
+
/** Default content for IDENTITY.md - agent identity */
|
|
206
|
+
identity?: string;
|
|
207
|
+
/** Default content for USER.md - user preferences */
|
|
208
|
+
user?: string;
|
|
209
|
+
/** Default content for TOOLS.md - tool documentation */
|
|
210
|
+
tools?: string;
|
|
211
|
+
/** Default content for BOOTSTRAP.md - first-run tasks */
|
|
212
|
+
bootstrap?: string;
|
|
213
|
+
}
|
|
194
214
|
/**
|
|
195
215
|
* REACT agent configuration
|
|
196
216
|
*/
|
|
@@ -593,6 +613,7 @@ interface ScheduleStorage {
|
|
|
593
613
|
* Get all tasks (with optional filters)
|
|
594
614
|
*/
|
|
595
615
|
getAllTasks(filters?: {
|
|
616
|
+
tenantId?: string;
|
|
596
617
|
status?: ScheduledTaskStatus;
|
|
597
618
|
executionType?: ScheduleExecutionType;
|
|
598
619
|
taskType?: string;
|
|
@@ -605,6 +626,7 @@ interface ScheduleStorage {
|
|
|
605
626
|
* Count tasks (with optional filters)
|
|
606
627
|
*/
|
|
607
628
|
countTasks(filters?: {
|
|
629
|
+
tenantId?: string;
|
|
608
630
|
status?: ScheduledTaskStatus;
|
|
609
631
|
executionType?: ScheduleExecutionType;
|
|
610
632
|
taskType?: string;
|
|
@@ -973,6 +995,10 @@ interface Thread {
|
|
|
973
995
|
* Thread identifier
|
|
974
996
|
*/
|
|
975
997
|
id: string;
|
|
998
|
+
/**
|
|
999
|
+
* Tenant identifier
|
|
1000
|
+
*/
|
|
1001
|
+
tenantId: string;
|
|
976
1002
|
/**
|
|
977
1003
|
* Assistant identifier this thread belongs to
|
|
978
1004
|
*/
|
|
@@ -1002,52 +1028,54 @@ interface CreateThreadRequest {
|
|
|
1002
1028
|
/**
|
|
1003
1029
|
* ThreadStore interface
|
|
1004
1030
|
* Provides CRUD operations for thread data
|
|
1005
|
-
* All operations are scoped to
|
|
1031
|
+
* All operations are scoped to a tenant ID and assistant ID
|
|
1006
1032
|
*/
|
|
1007
1033
|
interface ThreadStore {
|
|
1008
1034
|
/**
|
|
1009
|
-
* Get all threads for a specific assistant
|
|
1035
|
+
* Get all threads for a specific tenant and assistant
|
|
1036
|
+
* @param tenantId Tenant identifier
|
|
1010
1037
|
* @param assistantId Assistant identifier
|
|
1011
1038
|
* @returns Array of threads for the assistant
|
|
1012
1039
|
*/
|
|
1013
|
-
getThreadsByAssistantId(assistantId: string): Promise<Thread[]>;
|
|
1040
|
+
getThreadsByAssistantId(tenantId: string, assistantId: string): Promise<Thread[]>;
|
|
1014
1041
|
/**
|
|
1015
|
-
* Get a thread by ID for a specific
|
|
1016
|
-
* @param
|
|
1042
|
+
* Get a thread by ID for a specific tenant
|
|
1043
|
+
* @param tenantId Tenant identifier
|
|
1017
1044
|
* @param threadId Thread identifier
|
|
1018
1045
|
* @returns Thread if found, undefined otherwise
|
|
1019
1046
|
*/
|
|
1020
|
-
getThreadById(
|
|
1047
|
+
getThreadById(tenantId: string, threadId: string): Promise<Thread | undefined>;
|
|
1021
1048
|
/**
|
|
1022
|
-
* Create a new thread for
|
|
1049
|
+
* Create a new thread for a tenant and assistant
|
|
1050
|
+
* @param tenantId Tenant identifier
|
|
1023
1051
|
* @param assistantId Assistant identifier
|
|
1024
1052
|
* @param threadId Thread identifier
|
|
1025
1053
|
* @param data Thread creation data
|
|
1026
1054
|
* @returns Created thread
|
|
1027
1055
|
*/
|
|
1028
|
-
createThread(assistantId: string, threadId: string, data: CreateThreadRequest): Promise<Thread>;
|
|
1056
|
+
createThread(tenantId: string, assistantId: string, threadId: string, data: CreateThreadRequest): Promise<Thread>;
|
|
1029
1057
|
/**
|
|
1030
1058
|
* Update an existing thread
|
|
1031
|
-
* @param
|
|
1059
|
+
* @param tenantId Tenant identifier
|
|
1032
1060
|
* @param threadId Thread identifier
|
|
1033
1061
|
* @param updates Partial thread data to update
|
|
1034
1062
|
* @returns Updated thread if found, null otherwise
|
|
1035
1063
|
*/
|
|
1036
|
-
updateThread(
|
|
1064
|
+
updateThread(tenantId: string, threadId: string, updates: Partial<CreateThreadRequest>): Promise<Thread | null>;
|
|
1037
1065
|
/**
|
|
1038
1066
|
* Delete a thread by ID
|
|
1039
|
-
* @param
|
|
1067
|
+
* @param tenantId Tenant identifier
|
|
1040
1068
|
* @param threadId Thread identifier
|
|
1041
1069
|
* @returns true if deleted, false otherwise
|
|
1042
1070
|
*/
|
|
1043
|
-
deleteThread(
|
|
1071
|
+
deleteThread(tenantId: string, threadId: string): Promise<boolean>;
|
|
1044
1072
|
/**
|
|
1045
1073
|
* Check if thread exists
|
|
1046
|
-
* @param
|
|
1074
|
+
* @param tenantId Tenant identifier
|
|
1047
1075
|
* @param threadId Thread identifier
|
|
1048
1076
|
* @returns true if thread exists, false otherwise
|
|
1049
1077
|
*/
|
|
1050
|
-
hasThread(
|
|
1078
|
+
hasThread(tenantId: string, threadId: string): Promise<boolean>;
|
|
1051
1079
|
}
|
|
1052
1080
|
|
|
1053
1081
|
/**
|
|
@@ -1064,6 +1092,10 @@ interface Assistant {
|
|
|
1064
1092
|
* Assistant identifier
|
|
1065
1093
|
*/
|
|
1066
1094
|
id: string;
|
|
1095
|
+
/**
|
|
1096
|
+
* Tenant identifier
|
|
1097
|
+
*/
|
|
1098
|
+
tenantId: string;
|
|
1067
1099
|
/**
|
|
1068
1100
|
* Assistant name
|
|
1069
1101
|
*/
|
|
@@ -1108,42 +1140,48 @@ interface CreateAssistantRequest {
|
|
|
1108
1140
|
*/
|
|
1109
1141
|
interface AssistantStore {
|
|
1110
1142
|
/**
|
|
1111
|
-
* Get all assistants
|
|
1112
|
-
* @
|
|
1143
|
+
* Get all assistants for a tenant
|
|
1144
|
+
* @param tenantId Tenant identifier
|
|
1145
|
+
* @returns Array of all assistants for the tenant
|
|
1113
1146
|
*/
|
|
1114
|
-
getAllAssistants(): Promise<Assistant[]>;
|
|
1147
|
+
getAllAssistants(tenantId: string): Promise<Assistant[]>;
|
|
1115
1148
|
/**
|
|
1116
1149
|
* Get assistant by ID
|
|
1150
|
+
* @param tenantId Tenant identifier
|
|
1117
1151
|
* @param id Assistant identifier
|
|
1118
|
-
* @returns Assistant if found,
|
|
1152
|
+
* @returns Assistant if found, null otherwise
|
|
1119
1153
|
*/
|
|
1120
|
-
getAssistantById(id: string): Promise<Assistant | null>;
|
|
1154
|
+
getAssistantById(tenantId: string, id: string): Promise<Assistant | null>;
|
|
1121
1155
|
/**
|
|
1122
1156
|
* Create a new assistant
|
|
1157
|
+
* @param tenantId Tenant identifier
|
|
1123
1158
|
* @param id Assistant identifier
|
|
1124
1159
|
* @param data Assistant creation data
|
|
1125
1160
|
* @returns Created assistant
|
|
1126
1161
|
*/
|
|
1127
|
-
createAssistant(id: string, data: CreateAssistantRequest): Promise<Assistant>;
|
|
1162
|
+
createAssistant(tenantId: string, id: string, data: CreateAssistantRequest): Promise<Assistant>;
|
|
1128
1163
|
/**
|
|
1129
1164
|
* Update an existing assistant
|
|
1165
|
+
* @param tenantId Tenant identifier
|
|
1130
1166
|
* @param id Assistant identifier
|
|
1131
1167
|
* @param updates Partial assistant data to update
|
|
1132
1168
|
* @returns Updated assistant if found, null otherwise
|
|
1133
1169
|
*/
|
|
1134
|
-
updateAssistant(id: string, updates: Partial<CreateAssistantRequest>): Promise<Assistant | null>;
|
|
1170
|
+
updateAssistant(tenantId: string, id: string, updates: Partial<CreateAssistantRequest>): Promise<Assistant | null>;
|
|
1135
1171
|
/**
|
|
1136
1172
|
* Delete an assistant by ID
|
|
1173
|
+
* @param tenantId Tenant identifier
|
|
1137
1174
|
* @param id Assistant identifier
|
|
1138
1175
|
* @returns true if deleted, false otherwise
|
|
1139
1176
|
*/
|
|
1140
|
-
deleteAssistant(id: string): Promise<boolean>;
|
|
1177
|
+
deleteAssistant(tenantId: string, id: string): Promise<boolean>;
|
|
1141
1178
|
/**
|
|
1142
1179
|
* Check if assistant exists
|
|
1180
|
+
* @param tenantId Tenant identifier
|
|
1143
1181
|
* @param id Assistant identifier
|
|
1144
1182
|
* @returns true if assistant exists, false otherwise
|
|
1145
1183
|
*/
|
|
1146
|
-
hasAssistant(id: string): Promise<boolean>;
|
|
1184
|
+
hasAssistant(tenantId: string, id: string): Promise<boolean>;
|
|
1147
1185
|
}
|
|
1148
1186
|
|
|
1149
1187
|
/**
|
|
@@ -1160,6 +1198,10 @@ interface Skill {
|
|
|
1160
1198
|
* Skill identifier (key)
|
|
1161
1199
|
*/
|
|
1162
1200
|
id: string;
|
|
1201
|
+
/**
|
|
1202
|
+
* Tenant identifier
|
|
1203
|
+
*/
|
|
1204
|
+
tenantId: string;
|
|
1163
1205
|
/**
|
|
1164
1206
|
* Skill name
|
|
1165
1207
|
*/
|
|
@@ -1242,80 +1284,92 @@ interface CreateSkillRequest {
|
|
|
1242
1284
|
*/
|
|
1243
1285
|
interface SkillStore {
|
|
1244
1286
|
/**
|
|
1245
|
-
* Get all skills
|
|
1246
|
-
* @
|
|
1287
|
+
* Get all skills for a tenant
|
|
1288
|
+
* @param tenantId Tenant identifier
|
|
1289
|
+
* @returns Array of all skills for the tenant
|
|
1247
1290
|
*/
|
|
1248
|
-
getAllSkills(): Promise<Skill[]>;
|
|
1291
|
+
getAllSkills(tenantId: string): Promise<Skill[]>;
|
|
1249
1292
|
/**
|
|
1250
1293
|
* Get skill by ID
|
|
1294
|
+
* @param tenantId Tenant identifier
|
|
1251
1295
|
* @param id Skill identifier
|
|
1252
1296
|
* @returns Skill if found, null otherwise
|
|
1253
1297
|
*/
|
|
1254
|
-
getSkillById(id: string): Promise<Skill | null>;
|
|
1298
|
+
getSkillById(tenantId: string, id: string): Promise<Skill | null>;
|
|
1255
1299
|
/**
|
|
1256
1300
|
* Create a new skill
|
|
1301
|
+
* @param tenantId Tenant identifier
|
|
1257
1302
|
* @param id Skill identifier
|
|
1258
1303
|
* @param data Skill creation data
|
|
1259
1304
|
* @returns Created skill
|
|
1260
1305
|
*/
|
|
1261
|
-
createSkill(id: string, data: CreateSkillRequest): Promise<Skill>;
|
|
1306
|
+
createSkill(tenantId: string, id: string, data: CreateSkillRequest): Promise<Skill>;
|
|
1262
1307
|
/**
|
|
1263
1308
|
* Update an existing skill
|
|
1309
|
+
* @param tenantId Tenant identifier
|
|
1264
1310
|
* @param id Skill identifier
|
|
1265
1311
|
* @param updates Partial skill data to update
|
|
1266
1312
|
* @returns Updated skill if found, null otherwise
|
|
1267
1313
|
*/
|
|
1268
|
-
updateSkill(id: string, updates: Partial<CreateSkillRequest>): Promise<Skill | null>;
|
|
1314
|
+
updateSkill(tenantId: string, id: string, updates: Partial<CreateSkillRequest>): Promise<Skill | null>;
|
|
1269
1315
|
/**
|
|
1270
1316
|
* Delete a skill by ID
|
|
1317
|
+
* @param tenantId Tenant identifier
|
|
1271
1318
|
* @param id Skill identifier
|
|
1272
1319
|
* @returns true if deleted, false otherwise
|
|
1273
1320
|
*/
|
|
1274
|
-
deleteSkill(id: string): Promise<boolean>;
|
|
1321
|
+
deleteSkill(tenantId: string, id: string): Promise<boolean>;
|
|
1275
1322
|
/**
|
|
1276
1323
|
* Check if skill exists
|
|
1324
|
+
* @param tenantId Tenant identifier
|
|
1277
1325
|
* @param id Skill identifier
|
|
1278
1326
|
* @returns true if skill exists, false otherwise
|
|
1279
1327
|
*/
|
|
1280
|
-
hasSkill(id: string): Promise<boolean>;
|
|
1328
|
+
hasSkill(tenantId: string, id: string): Promise<boolean>;
|
|
1281
1329
|
/**
|
|
1282
|
-
* Search skills by metadata
|
|
1330
|
+
* Search skills by metadata within a tenant
|
|
1331
|
+
* @param tenantId Tenant identifier
|
|
1283
1332
|
* @param metadataKey Metadata key to search for
|
|
1284
1333
|
* @param metadataValue Metadata value to match
|
|
1285
1334
|
* @returns Array of matching skills
|
|
1286
1335
|
*/
|
|
1287
|
-
searchByMetadata(metadataKey: string, metadataValue: string): Promise<Skill[]>;
|
|
1336
|
+
searchByMetadata(tenantId: string, metadataKey: string, metadataValue: string): Promise<Skill[]>;
|
|
1288
1337
|
/**
|
|
1289
|
-
* Filter skills by compatibility
|
|
1338
|
+
* Filter skills by compatibility within a tenant
|
|
1339
|
+
* @param tenantId Tenant identifier
|
|
1290
1340
|
* @param compatibility Compatibility string to filter by
|
|
1291
1341
|
* @returns Array of matching skills
|
|
1292
1342
|
*/
|
|
1293
|
-
filterByCompatibility(compatibility: string): Promise<Skill[]>;
|
|
1343
|
+
filterByCompatibility(tenantId: string, compatibility: string): Promise<Skill[]>;
|
|
1294
1344
|
/**
|
|
1295
|
-
* Filter skills by license
|
|
1345
|
+
* Filter skills by license within a tenant
|
|
1346
|
+
* @param tenantId Tenant identifier
|
|
1296
1347
|
* @param license License string to filter by
|
|
1297
1348
|
* @returns Array of matching skills
|
|
1298
1349
|
*/
|
|
1299
|
-
filterByLicense(license: string): Promise<Skill[]>;
|
|
1350
|
+
filterByLicense(tenantId: string, license: string): Promise<Skill[]>;
|
|
1300
1351
|
/**
|
|
1301
|
-
* Get sub-skills of a parent skill
|
|
1352
|
+
* Get sub-skills of a parent skill within a tenant
|
|
1353
|
+
* @param tenantId Tenant identifier
|
|
1302
1354
|
* @param parentSkillName Parent skill name
|
|
1303
1355
|
* @returns Array of sub-skills if found, empty array otherwise
|
|
1304
1356
|
*/
|
|
1305
|
-
getSubSkills(parentSkillName: string): Promise<Skill[]>;
|
|
1357
|
+
getSubSkills(tenantId: string, parentSkillName: string): Promise<Skill[]>;
|
|
1306
1358
|
/**
|
|
1307
1359
|
* List all resources in a skill's resources directory
|
|
1360
|
+
* @param tenantId Tenant identifier
|
|
1308
1361
|
* @param id Skill identifier
|
|
1309
1362
|
* @returns Array of resource paths relative to resources/ directory
|
|
1310
1363
|
*/
|
|
1311
|
-
listSkillResources?(id: string): Promise<string[]>;
|
|
1364
|
+
listSkillResources?(tenantId: string, id: string): Promise<string[]>;
|
|
1312
1365
|
/**
|
|
1313
1366
|
* Load a specific resource from a skill's resources directory
|
|
1367
|
+
* @param tenantId Tenant identifier
|
|
1314
1368
|
* @param id Skill identifier
|
|
1315
1369
|
* @param resourcePath Path to the resource relative to resources/ directory
|
|
1316
1370
|
* @returns The resource content as string, or null if not found
|
|
1317
1371
|
*/
|
|
1318
|
-
loadSkillResource?(id: string, resourcePath: string): Promise<string | null>;
|
|
1372
|
+
loadSkillResource?(tenantId: string, id: string, resourcePath: string): Promise<string | null>;
|
|
1319
1373
|
}
|
|
1320
1374
|
|
|
1321
1375
|
/**
|
|
@@ -1920,6 +1974,8 @@ interface MetricsServerConfig {
|
|
|
1920
1974
|
headers?: Record<string, string>;
|
|
1921
1975
|
/** Optional timeout in milliseconds (default: 30000) */
|
|
1922
1976
|
timeout?: number;
|
|
1977
|
+
/** Optional tenant ID for multi-tenant isolation */
|
|
1978
|
+
tenantId?: string;
|
|
1923
1979
|
}
|
|
1924
1980
|
/**
|
|
1925
1981
|
* Metrics server configuration entry stored in the store
|
|
@@ -2089,6 +2145,17 @@ interface SemanticMetricsFilter {
|
|
|
2089
2145
|
/** Values for the filter */
|
|
2090
2146
|
values: (string | number | boolean)[];
|
|
2091
2147
|
}
|
|
2148
|
+
/**
|
|
2149
|
+
* Query result format options
|
|
2150
|
+
*/
|
|
2151
|
+
type QueryResultFormat = 'array' | 'object' | 'both';
|
|
2152
|
+
/**
|
|
2153
|
+
* Column definition
|
|
2154
|
+
*/
|
|
2155
|
+
interface MetricColumn {
|
|
2156
|
+
name: string;
|
|
2157
|
+
type: string;
|
|
2158
|
+
}
|
|
2092
2159
|
/**
|
|
2093
2160
|
* Request body for semantic metrics query
|
|
2094
2161
|
*/
|
|
@@ -2103,63 +2170,44 @@ interface SemanticMetricsQueryRequest {
|
|
|
2103
2170
|
filters?: SemanticMetricsFilter[];
|
|
2104
2171
|
/** Optional result limit */
|
|
2105
2172
|
limit?: number;
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
* Single data point in semantic metrics query response
|
|
2109
|
-
*/
|
|
2110
|
-
interface SemanticMetricDataPoint {
|
|
2111
|
-
/** Timestamp in milliseconds */
|
|
2112
|
-
timestamp?: number;
|
|
2113
|
-
/** Metric value */
|
|
2114
|
-
value: number;
|
|
2115
|
-
/** Metric name */
|
|
2116
|
-
metricName?: string;
|
|
2117
|
-
/** Additional dimension values */
|
|
2118
|
-
labels?: Record<string, string>;
|
|
2119
|
-
/** Group by dimension values */
|
|
2120
|
-
groupByValues?: Record<string, string>;
|
|
2121
|
-
}
|
|
2122
|
-
/**
|
|
2123
|
-
* AI Hints for a single metric result
|
|
2124
|
-
*/
|
|
2125
|
-
interface SemanticMetricAiHints {
|
|
2126
|
-
polarity: string;
|
|
2127
|
-
valueInterpretation: string;
|
|
2128
|
-
thresholds?: Array<{
|
|
2129
|
-
metric: string;
|
|
2130
|
-
operator: string;
|
|
2131
|
-
value: number;
|
|
2132
|
-
level: string;
|
|
2133
|
-
}>;
|
|
2134
|
-
suggestedFollowup?: string[];
|
|
2135
|
-
}
|
|
2136
|
-
/**
|
|
2137
|
-
* Single metric result from semantic metrics query
|
|
2138
|
-
*/
|
|
2139
|
-
interface SemanticMetricResult {
|
|
2140
|
-
metricName: string;
|
|
2141
|
-
displayName: string;
|
|
2142
|
-
dataType: string;
|
|
2143
|
-
format: string;
|
|
2144
|
-
polarity: string;
|
|
2145
|
-
columns: string[];
|
|
2146
|
-
rows: Array<Record<string, unknown>>;
|
|
2147
|
-
rowCount: number;
|
|
2148
|
-
executionTimeMs: number;
|
|
2149
|
-
aiHints: SemanticMetricAiHints;
|
|
2173
|
+
/** Optional format specification - defaults to 'array' */
|
|
2174
|
+
format?: QueryResultFormat;
|
|
2150
2175
|
}
|
|
2151
2176
|
/**
|
|
2152
2177
|
* Response from semantic metrics query
|
|
2178
|
+
*
|
|
2179
|
+
* Note: The actual API response format has changed from the original design.
|
|
2180
|
+
* It now returns a flat structure with columns and rows arrays.
|
|
2181
|
+
*
|
|
2182
|
+
* Based on format parameter:
|
|
2183
|
+
* - 'array' (default): returns rows as array of arrays
|
|
2184
|
+
* - 'object': returns rowsObject as array of objects
|
|
2185
|
+
* - 'both': returns both formats
|
|
2153
2186
|
*/
|
|
2154
2187
|
interface SemanticMetricsQueryResponse {
|
|
2155
|
-
/**
|
|
2156
|
-
|
|
2157
|
-
/**
|
|
2158
|
-
|
|
2159
|
-
/**
|
|
2160
|
-
|
|
2161
|
-
/**
|
|
2162
|
-
|
|
2188
|
+
/** Semantic model name that was queried */
|
|
2189
|
+
semanticModel: string;
|
|
2190
|
+
/** Column definitions with name and type */
|
|
2191
|
+
columns: MetricColumn[];
|
|
2192
|
+
/** Number of rows returned */
|
|
2193
|
+
rowCount: number;
|
|
2194
|
+
/** Execution time in milliseconds */
|
|
2195
|
+
executionTimeMs?: number;
|
|
2196
|
+
/**
|
|
2197
|
+
* Data rows as arrays (each row is an array of values corresponding to columns)
|
|
2198
|
+
* Present when format is 'array' or 'both'
|
|
2199
|
+
*/
|
|
2200
|
+
rows?: Array<Array<unknown>>;
|
|
2201
|
+
/**
|
|
2202
|
+
* Data rows as objects (each row is {columnName: value})
|
|
2203
|
+
* Present when format is 'object' or 'both'
|
|
2204
|
+
*/
|
|
2205
|
+
rowsObject?: Array<Record<string, unknown>>;
|
|
2206
|
+
/** Debug information (optional) */
|
|
2207
|
+
debug?: {
|
|
2208
|
+
sql?: string;
|
|
2209
|
+
params?: unknown;
|
|
2210
|
+
};
|
|
2163
2211
|
}
|
|
2164
2212
|
/**
|
|
2165
2213
|
* Request body for executing custom SQL query
|
|
@@ -2173,22 +2221,83 @@ interface ExecuteSqlQueryRequest {
|
|
|
2173
2221
|
params?: Record<string, string | number | boolean>;
|
|
2174
2222
|
/** Optional result limit */
|
|
2175
2223
|
limit?: number;
|
|
2224
|
+
/** Optional format specification - defaults to 'object' */
|
|
2225
|
+
format?: QueryResultFormat;
|
|
2176
2226
|
}
|
|
2177
2227
|
/**
|
|
2178
2228
|
* Response from custom SQL query execution
|
|
2229
|
+
*
|
|
2230
|
+
* Based on format parameter:
|
|
2231
|
+
* - 'object' (default): returns rowsObject as array of objects
|
|
2232
|
+
* - 'array': returns rows as array of arrays
|
|
2233
|
+
* - 'both': returns both formats
|
|
2179
2234
|
*/
|
|
2180
2235
|
interface ExecuteSqlQueryResponse {
|
|
2181
2236
|
/** Data source ID that was queried */
|
|
2182
2237
|
datasourceId: string | number;
|
|
2183
2238
|
/** Data source name */
|
|
2184
2239
|
datasourceName?: string;
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2240
|
+
/** Name of the queried table (if applicable) */
|
|
2241
|
+
tableName?: string;
|
|
2242
|
+
/** Column names in order */
|
|
2243
|
+
columns: string[];
|
|
2244
|
+
/** Number of rows returned */
|
|
2245
|
+
rowCount: number;
|
|
2246
|
+
/** Execution time in milliseconds */
|
|
2247
|
+
executionTimeMs: number;
|
|
2248
|
+
/** Executed SQL query */
|
|
2249
|
+
executedSql: string;
|
|
2250
|
+
/**
|
|
2251
|
+
* Data rows as arrays
|
|
2252
|
+
* Present when format is 'array' or 'both'
|
|
2253
|
+
*/
|
|
2254
|
+
rows?: Array<Array<unknown>>;
|
|
2255
|
+
/**
|
|
2256
|
+
* Data rows as objects (each row is {columnName: value})
|
|
2257
|
+
* Present when format is 'object' or 'both'
|
|
2258
|
+
*/
|
|
2259
|
+
rowsObject?: Array<Record<string, unknown>>;
|
|
2260
|
+
}
|
|
2261
|
+
/**
|
|
2262
|
+
* Request body for table query
|
|
2263
|
+
*/
|
|
2264
|
+
interface TableQueryRequest {
|
|
2265
|
+
/** Table name to query */
|
|
2266
|
+
tableName: string;
|
|
2267
|
+
/** Optional result limit */
|
|
2268
|
+
limit?: number;
|
|
2269
|
+
/** Optional format specification - defaults to 'object' */
|
|
2270
|
+
format?: QueryResultFormat;
|
|
2271
|
+
}
|
|
2272
|
+
/**
|
|
2273
|
+
* Response from table query
|
|
2274
|
+
*
|
|
2275
|
+
* Based on format parameter:
|
|
2276
|
+
* - 'object' (default): returns rowsObject as array of objects (API native format)
|
|
2277
|
+
* - 'array': returns rows as array of arrays
|
|
2278
|
+
* - 'both': returns both formats
|
|
2279
|
+
*/
|
|
2280
|
+
interface TableQueryResponse {
|
|
2281
|
+
/** Name of the queried table */
|
|
2282
|
+
tableName: string;
|
|
2283
|
+
/** Column names in order */
|
|
2284
|
+
columns: string[];
|
|
2285
|
+
/** Number of rows returned */
|
|
2286
|
+
rowCount: number;
|
|
2287
|
+
/** Execution time in milliseconds */
|
|
2288
|
+
executionTimeMs: number;
|
|
2289
|
+
/** Executed SQL query */
|
|
2290
|
+
executedSql: string;
|
|
2291
|
+
/**
|
|
2292
|
+
* Data rows as arrays
|
|
2293
|
+
* Present when format is 'array' or 'both'
|
|
2294
|
+
*/
|
|
2295
|
+
rows?: Array<Array<unknown>>;
|
|
2296
|
+
/**
|
|
2297
|
+
* Data rows as objects (each row is {columnName: value})
|
|
2298
|
+
* Present when format is 'object' or 'both' (API native format)
|
|
2299
|
+
*/
|
|
2300
|
+
rowsObject?: Array<Record<string, unknown>>;
|
|
2192
2301
|
}
|
|
2193
2302
|
/**
|
|
2194
2303
|
* MetricsServerConfigStore interface
|
|
@@ -2611,4 +2720,4 @@ type Timestamp = number;
|
|
|
2611
2720
|
*/
|
|
2612
2721
|
type Callback<T = any, R = void> = (data: T) => R | Promise<R>;
|
|
2613
2722
|
|
|
2614
|
-
export { type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type Assistant, type AssistantMessage, type AssistantStore, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type BrowserMiddlewareConfig, type Callback, type CodeEvalMiddlewareConfig, type CreateAssistantRequest, type CreateDatabaseConfigRequest, type CreateMcpServerConfigRequest, type CreateMetricsServerConfigRequest, type CreateProjectRequest, type CreateSkillRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkspaceRequest, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DeveloperMessage, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type FilterCondition, type GraphBuildOptions, type ID, type InterruptMessage, type LLMConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type Message, type MessageChunk, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelLatticeProtocol, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Project, type ProjectStore, type QueryParams, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type ReactAgentConfig, type Result, type SandboxMiddlewareConfig, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type
|
|
2723
|
+
export { type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type Assistant, type AssistantMessage, type AssistantStore, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type BootstrapFilesConfig, type BrowserMiddlewareConfig, type Callback, type CodeEvalMiddlewareConfig, type CreateAssistantRequest, type CreateDatabaseConfigRequest, type CreateMcpServerConfigRequest, type CreateMetricsServerConfigRequest, type CreateProjectRequest, type CreateSkillRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkspaceRequest, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DeveloperMessage, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type FilterCondition, type GraphBuildOptions, type ID, type InterruptMessage, type LLMConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type Message, type MessageChunk, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelLatticeProtocol, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Project, type ProjectStore, type QueryParams, type QueryResultFormat, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type ReactAgentConfig, type Result, type SandboxMiddlewareConfig, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SqlMiddlewareConfig, type StorageType, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskHandler, type TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMetricsServerConfigRequest, type UpdateProjectRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreLatticeProtocol, type Workspace, type WorkspaceStore, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isDeepAgentConfig, isTeamAgentConfig };
|