@axiom-lattice/protocols 2.1.20 → 2.1.22
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 +149 -62
- package/dist/index.d.ts +149 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/AgentLatticeProtocol.ts +32 -2
- package/src/MetricsServerConfigStoreProtocol.ts +116 -62
- package/src/ModelLatticeProtocol.ts +3 -0
- package/src/ScheduleLatticeProtocol.ts +3 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @axiom-lattice/protocols@2.1.
|
|
2
|
+
> @axiom-lattice/protocols@2.1.22 build /home/runner/work/agentic/agentic/packages/protocols
|
|
3
3
|
> tsup src/index.ts --format cjs,esm --dts --sourcemap
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
11
|
[32mCJS[39m [1mdist/index.js [22m[32m5.20 KB[39m
|
|
12
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
13
|
-
[32mCJS[39m ⚡️ Build success in
|
|
12
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m32.76 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 72ms
|
|
14
14
|
[32mESM[39m [1mdist/index.mjs [22m[32m3.67 KB[39m
|
|
15
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
16
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m31.49 KB[39m
|
|
16
|
+
[32mESM[39m ⚡️ Build success in 73ms
|
|
17
17
|
[34mDTS[39m Build start
|
|
18
|
-
[32mDTS[39m ⚡️ Build success in
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[
|
|
20
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[
|
|
18
|
+
[32mDTS[39m ⚡️ Build success in 2793ms
|
|
19
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m75.87 KB[39m
|
|
20
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m75.87 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -93,6 +93,7 @@ interface ToolLatticeProtocol extends BaseLatticeProtocol<ToolConfig, Structured
|
|
|
93
93
|
interface LLMConfig {
|
|
94
94
|
provider: "azure" | "openai" | "deepseek" | "siliconcloud" | "volcengine";
|
|
95
95
|
model: string;
|
|
96
|
+
displayName?: string;
|
|
96
97
|
maxTokens?: number;
|
|
97
98
|
temperature?: number;
|
|
98
99
|
timeout?: number;
|
|
@@ -101,6 +102,8 @@ interface LLMConfig {
|
|
|
101
102
|
apiKeyEnvName?: string;
|
|
102
103
|
apiKey?: string;
|
|
103
104
|
baseURL?: string;
|
|
105
|
+
modelKwargs?: Record<string, any>;
|
|
106
|
+
extra?: Record<string, any>;
|
|
104
107
|
}
|
|
105
108
|
/**
|
|
106
109
|
* 模型Lattice协议接口
|
|
@@ -182,14 +185,42 @@ interface MetricsMiddlewareConfig {
|
|
|
182
185
|
/** Optional descriptions for each server */
|
|
183
186
|
serverDescriptions?: Record<string, string>;
|
|
184
187
|
}
|
|
185
|
-
type MiddlewareType = "filesystem" | "code_eval" | "browser" | "sql" | "skill" | "http" | "custom" | "metrics" | "ask_user_to_clarify";
|
|
188
|
+
type MiddlewareType = "filesystem" | "code_eval" | "browser" | "sql" | "skill" | "http" | "custom" | "metrics" | "ask_user_to_clarify" | "widget" | "claw";
|
|
186
189
|
interface AgentMiddlewareConfig {
|
|
187
190
|
id: string;
|
|
188
191
|
type: MiddlewareType;
|
|
189
192
|
name: string;
|
|
190
193
|
description: string;
|
|
191
194
|
enabled: boolean;
|
|
192
|
-
config: SandboxMiddlewareConfig | CodeEvalMiddlewareConfig | BrowserMiddlewareConfig | SqlMiddlewareConfig | MetricsMiddlewareConfig | Record<string, any>;
|
|
195
|
+
config: SandboxMiddlewareConfig | CodeEvalMiddlewareConfig | BrowserMiddlewareConfig | SqlMiddlewareConfig | MetricsMiddlewareConfig | ClawMiddlewareConfig | Record<string, any>;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Bootstrap file configuration
|
|
199
|
+
* Defines default content for project bootstrap files
|
|
200
|
+
*/
|
|
201
|
+
interface BootstrapFilesConfig {
|
|
202
|
+
/** Default content for AGENTS.md - operating instructions */
|
|
203
|
+
agents?: string;
|
|
204
|
+
/** Default content for SOUL.md - personality and tone */
|
|
205
|
+
soul?: string;
|
|
206
|
+
/** Default content for IDENTITY.md - agent identity */
|
|
207
|
+
identity?: string;
|
|
208
|
+
/** Default content for USER.md - user preferences */
|
|
209
|
+
user?: string;
|
|
210
|
+
/** Default content for TOOLS.md - tool documentation */
|
|
211
|
+
tools?: string;
|
|
212
|
+
/** Default content for BOOTSTRAP.md - first-run tasks */
|
|
213
|
+
bootstrap?: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Claw Middleware 配置
|
|
217
|
+
* 用于配置 bootstrap 文件管理行为
|
|
218
|
+
*/
|
|
219
|
+
interface ClawMiddlewareConfig {
|
|
220
|
+
/** 是否启用 bootstrap 文件注入(默认:true) */
|
|
221
|
+
injectBootstrapFiles?: boolean;
|
|
222
|
+
/** 自定义 bootstrap 文件内容 */
|
|
223
|
+
bootstrapFiles?: BootstrapFilesConfig;
|
|
193
224
|
}
|
|
194
225
|
/**
|
|
195
226
|
* REACT agent configuration
|
|
@@ -496,6 +527,7 @@ interface ScheduledTaskDefinition {
|
|
|
496
527
|
taskId: string;
|
|
497
528
|
taskType: string;
|
|
498
529
|
payload: Record<string, any>;
|
|
530
|
+
tenantId: string;
|
|
499
531
|
assistantId?: string;
|
|
500
532
|
threadId?: string;
|
|
501
533
|
executionType: ScheduleExecutionType;
|
|
@@ -527,6 +559,7 @@ interface ScheduleOnceOptions {
|
|
|
527
559
|
executeAt?: number;
|
|
528
560
|
delayMs?: number;
|
|
529
561
|
maxRetries?: number;
|
|
562
|
+
tenantId?: string;
|
|
530
563
|
assistantId?: string;
|
|
531
564
|
threadId?: string;
|
|
532
565
|
metadata?: Record<string, any>;
|
|
@@ -540,6 +573,7 @@ interface ScheduleCronOptions {
|
|
|
540
573
|
maxRuns?: number;
|
|
541
574
|
expiresAt?: number;
|
|
542
575
|
maxRetries?: number;
|
|
576
|
+
tenantId?: string;
|
|
543
577
|
assistantId?: string;
|
|
544
578
|
threadId?: string;
|
|
545
579
|
metadata?: Record<string, any>;
|
|
@@ -2125,6 +2159,17 @@ interface SemanticMetricsFilter {
|
|
|
2125
2159
|
/** Values for the filter */
|
|
2126
2160
|
values: (string | number | boolean)[];
|
|
2127
2161
|
}
|
|
2162
|
+
/**
|
|
2163
|
+
* Query result format options
|
|
2164
|
+
*/
|
|
2165
|
+
type QueryResultFormat = 'array' | 'object' | 'both';
|
|
2166
|
+
/**
|
|
2167
|
+
* Column definition
|
|
2168
|
+
*/
|
|
2169
|
+
interface MetricColumn {
|
|
2170
|
+
name: string;
|
|
2171
|
+
type: string;
|
|
2172
|
+
}
|
|
2128
2173
|
/**
|
|
2129
2174
|
* Request body for semantic metrics query
|
|
2130
2175
|
*/
|
|
@@ -2139,63 +2184,44 @@ interface SemanticMetricsQueryRequest {
|
|
|
2139
2184
|
filters?: SemanticMetricsFilter[];
|
|
2140
2185
|
/** Optional result limit */
|
|
2141
2186
|
limit?: number;
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
* Single data point in semantic metrics query response
|
|
2145
|
-
*/
|
|
2146
|
-
interface SemanticMetricDataPoint {
|
|
2147
|
-
/** Timestamp in milliseconds */
|
|
2148
|
-
timestamp?: number;
|
|
2149
|
-
/** Metric value */
|
|
2150
|
-
value: number;
|
|
2151
|
-
/** Metric name */
|
|
2152
|
-
metricName?: string;
|
|
2153
|
-
/** Additional dimension values */
|
|
2154
|
-
labels?: Record<string, string>;
|
|
2155
|
-
/** Group by dimension values */
|
|
2156
|
-
groupByValues?: Record<string, string>;
|
|
2157
|
-
}
|
|
2158
|
-
/**
|
|
2159
|
-
* AI Hints for a single metric result
|
|
2160
|
-
*/
|
|
2161
|
-
interface SemanticMetricAiHints {
|
|
2162
|
-
polarity: string;
|
|
2163
|
-
valueInterpretation: string;
|
|
2164
|
-
thresholds?: Array<{
|
|
2165
|
-
metric: string;
|
|
2166
|
-
operator: string;
|
|
2167
|
-
value: number;
|
|
2168
|
-
level: string;
|
|
2169
|
-
}>;
|
|
2170
|
-
suggestedFollowup?: string[];
|
|
2171
|
-
}
|
|
2172
|
-
/**
|
|
2173
|
-
* Single metric result from semantic metrics query
|
|
2174
|
-
*/
|
|
2175
|
-
interface SemanticMetricResult {
|
|
2176
|
-
metricName: string;
|
|
2177
|
-
displayName: string;
|
|
2178
|
-
dataType: string;
|
|
2179
|
-
format: string;
|
|
2180
|
-
polarity: string;
|
|
2181
|
-
columns: string[];
|
|
2182
|
-
rows: Array<Record<string, unknown>>;
|
|
2183
|
-
rowCount: number;
|
|
2184
|
-
executionTimeMs: number;
|
|
2185
|
-
aiHints: SemanticMetricAiHints;
|
|
2187
|
+
/** Optional format specification - defaults to 'array' */
|
|
2188
|
+
format?: QueryResultFormat;
|
|
2186
2189
|
}
|
|
2187
2190
|
/**
|
|
2188
2191
|
* Response from semantic metrics query
|
|
2192
|
+
*
|
|
2193
|
+
* Note: The actual API response format has changed from the original design.
|
|
2194
|
+
* It now returns a flat structure with columns and rows arrays.
|
|
2195
|
+
*
|
|
2196
|
+
* Based on format parameter:
|
|
2197
|
+
* - 'array' (default): returns rows as array of arrays
|
|
2198
|
+
* - 'object': returns rowsObject as array of objects
|
|
2199
|
+
* - 'both': returns both formats
|
|
2189
2200
|
*/
|
|
2190
2201
|
interface SemanticMetricsQueryResponse {
|
|
2191
|
-
/**
|
|
2192
|
-
|
|
2193
|
-
/**
|
|
2194
|
-
|
|
2195
|
-
/**
|
|
2196
|
-
|
|
2197
|
-
/**
|
|
2198
|
-
|
|
2202
|
+
/** Semantic model name that was queried */
|
|
2203
|
+
semanticModel: string;
|
|
2204
|
+
/** Column definitions with name and type */
|
|
2205
|
+
columns: MetricColumn[];
|
|
2206
|
+
/** Number of rows returned */
|
|
2207
|
+
rowCount: number;
|
|
2208
|
+
/** Execution time in milliseconds */
|
|
2209
|
+
executionTimeMs?: number;
|
|
2210
|
+
/**
|
|
2211
|
+
* Data rows as arrays (each row is an array of values corresponding to columns)
|
|
2212
|
+
* Present when format is 'array' or 'both'
|
|
2213
|
+
*/
|
|
2214
|
+
rows?: Array<Array<unknown>>;
|
|
2215
|
+
/**
|
|
2216
|
+
* Data rows as objects (each row is {columnName: value})
|
|
2217
|
+
* Present when format is 'object' or 'both'
|
|
2218
|
+
*/
|
|
2219
|
+
rowsObject?: Array<Record<string, unknown>>;
|
|
2220
|
+
/** Debug information (optional) */
|
|
2221
|
+
debug?: {
|
|
2222
|
+
sql?: string;
|
|
2223
|
+
params?: unknown;
|
|
2224
|
+
};
|
|
2199
2225
|
}
|
|
2200
2226
|
/**
|
|
2201
2227
|
* Request body for executing custom SQL query
|
|
@@ -2209,22 +2235,83 @@ interface ExecuteSqlQueryRequest {
|
|
|
2209
2235
|
params?: Record<string, string | number | boolean>;
|
|
2210
2236
|
/** Optional result limit */
|
|
2211
2237
|
limit?: number;
|
|
2238
|
+
/** Optional format specification - defaults to 'object' */
|
|
2239
|
+
format?: QueryResultFormat;
|
|
2212
2240
|
}
|
|
2213
2241
|
/**
|
|
2214
2242
|
* Response from custom SQL query execution
|
|
2243
|
+
*
|
|
2244
|
+
* Based on format parameter:
|
|
2245
|
+
* - 'object' (default): returns rowsObject as array of objects
|
|
2246
|
+
* - 'array': returns rows as array of arrays
|
|
2247
|
+
* - 'both': returns both formats
|
|
2215
2248
|
*/
|
|
2216
2249
|
interface ExecuteSqlQueryResponse {
|
|
2217
2250
|
/** Data source ID that was queried */
|
|
2218
2251
|
datasourceId: string | number;
|
|
2219
2252
|
/** Data source name */
|
|
2220
2253
|
datasourceName?: string;
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2254
|
+
/** Name of the queried table (if applicable) */
|
|
2255
|
+
tableName?: string;
|
|
2256
|
+
/** Column names in order */
|
|
2257
|
+
columns: string[];
|
|
2258
|
+
/** Number of rows returned */
|
|
2259
|
+
rowCount: number;
|
|
2260
|
+
/** Execution time in milliseconds */
|
|
2261
|
+
executionTimeMs: number;
|
|
2262
|
+
/** Executed SQL query */
|
|
2263
|
+
executedSql: string;
|
|
2264
|
+
/**
|
|
2265
|
+
* Data rows as arrays
|
|
2266
|
+
* Present when format is 'array' or 'both'
|
|
2267
|
+
*/
|
|
2268
|
+
rows?: Array<Array<unknown>>;
|
|
2269
|
+
/**
|
|
2270
|
+
* Data rows as objects (each row is {columnName: value})
|
|
2271
|
+
* Present when format is 'object' or 'both'
|
|
2272
|
+
*/
|
|
2273
|
+
rowsObject?: Array<Record<string, unknown>>;
|
|
2274
|
+
}
|
|
2275
|
+
/**
|
|
2276
|
+
* Request body for table query
|
|
2277
|
+
*/
|
|
2278
|
+
interface TableQueryRequest {
|
|
2279
|
+
/** Table name to query */
|
|
2280
|
+
tableName: string;
|
|
2281
|
+
/** Optional result limit */
|
|
2282
|
+
limit?: number;
|
|
2283
|
+
/** Optional format specification - defaults to 'object' */
|
|
2284
|
+
format?: QueryResultFormat;
|
|
2285
|
+
}
|
|
2286
|
+
/**
|
|
2287
|
+
* Response from table query
|
|
2288
|
+
*
|
|
2289
|
+
* Based on format parameter:
|
|
2290
|
+
* - 'object' (default): returns rowsObject as array of objects (API native format)
|
|
2291
|
+
* - 'array': returns rows as array of arrays
|
|
2292
|
+
* - 'both': returns both formats
|
|
2293
|
+
*/
|
|
2294
|
+
interface TableQueryResponse {
|
|
2295
|
+
/** Name of the queried table */
|
|
2296
|
+
tableName: string;
|
|
2297
|
+
/** Column names in order */
|
|
2298
|
+
columns: string[];
|
|
2299
|
+
/** Number of rows returned */
|
|
2300
|
+
rowCount: number;
|
|
2301
|
+
/** Execution time in milliseconds */
|
|
2302
|
+
executionTimeMs: number;
|
|
2303
|
+
/** Executed SQL query */
|
|
2304
|
+
executedSql: string;
|
|
2305
|
+
/**
|
|
2306
|
+
* Data rows as arrays
|
|
2307
|
+
* Present when format is 'array' or 'both'
|
|
2308
|
+
*/
|
|
2309
|
+
rows?: Array<Array<unknown>>;
|
|
2310
|
+
/**
|
|
2311
|
+
* Data rows as objects (each row is {columnName: value})
|
|
2312
|
+
* Present when format is 'object' or 'both' (API native format)
|
|
2313
|
+
*/
|
|
2314
|
+
rowsObject?: Array<Record<string, unknown>>;
|
|
2228
2315
|
}
|
|
2229
2316
|
/**
|
|
2230
2317
|
* MetricsServerConfigStore interface
|
|
@@ -2647,4 +2734,4 @@ type Timestamp = number;
|
|
|
2647
2734
|
*/
|
|
2648
2735
|
type Callback<T = any, R = void> = (data: T) => R | Promise<R>;
|
|
2649
2736
|
|
|
2650
|
-
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
|
|
2737
|
+
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 ClawMiddlewareConfig, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ interface ToolLatticeProtocol extends BaseLatticeProtocol<ToolConfig, Structured
|
|
|
93
93
|
interface LLMConfig {
|
|
94
94
|
provider: "azure" | "openai" | "deepseek" | "siliconcloud" | "volcengine";
|
|
95
95
|
model: string;
|
|
96
|
+
displayName?: string;
|
|
96
97
|
maxTokens?: number;
|
|
97
98
|
temperature?: number;
|
|
98
99
|
timeout?: number;
|
|
@@ -101,6 +102,8 @@ interface LLMConfig {
|
|
|
101
102
|
apiKeyEnvName?: string;
|
|
102
103
|
apiKey?: string;
|
|
103
104
|
baseURL?: string;
|
|
105
|
+
modelKwargs?: Record<string, any>;
|
|
106
|
+
extra?: Record<string, any>;
|
|
104
107
|
}
|
|
105
108
|
/**
|
|
106
109
|
* 模型Lattice协议接口
|
|
@@ -182,14 +185,42 @@ interface MetricsMiddlewareConfig {
|
|
|
182
185
|
/** Optional descriptions for each server */
|
|
183
186
|
serverDescriptions?: Record<string, string>;
|
|
184
187
|
}
|
|
185
|
-
type MiddlewareType = "filesystem" | "code_eval" | "browser" | "sql" | "skill" | "http" | "custom" | "metrics" | "ask_user_to_clarify";
|
|
188
|
+
type MiddlewareType = "filesystem" | "code_eval" | "browser" | "sql" | "skill" | "http" | "custom" | "metrics" | "ask_user_to_clarify" | "widget" | "claw";
|
|
186
189
|
interface AgentMiddlewareConfig {
|
|
187
190
|
id: string;
|
|
188
191
|
type: MiddlewareType;
|
|
189
192
|
name: string;
|
|
190
193
|
description: string;
|
|
191
194
|
enabled: boolean;
|
|
192
|
-
config: SandboxMiddlewareConfig | CodeEvalMiddlewareConfig | BrowserMiddlewareConfig | SqlMiddlewareConfig | MetricsMiddlewareConfig | Record<string, any>;
|
|
195
|
+
config: SandboxMiddlewareConfig | CodeEvalMiddlewareConfig | BrowserMiddlewareConfig | SqlMiddlewareConfig | MetricsMiddlewareConfig | ClawMiddlewareConfig | Record<string, any>;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Bootstrap file configuration
|
|
199
|
+
* Defines default content for project bootstrap files
|
|
200
|
+
*/
|
|
201
|
+
interface BootstrapFilesConfig {
|
|
202
|
+
/** Default content for AGENTS.md - operating instructions */
|
|
203
|
+
agents?: string;
|
|
204
|
+
/** Default content for SOUL.md - personality and tone */
|
|
205
|
+
soul?: string;
|
|
206
|
+
/** Default content for IDENTITY.md - agent identity */
|
|
207
|
+
identity?: string;
|
|
208
|
+
/** Default content for USER.md - user preferences */
|
|
209
|
+
user?: string;
|
|
210
|
+
/** Default content for TOOLS.md - tool documentation */
|
|
211
|
+
tools?: string;
|
|
212
|
+
/** Default content for BOOTSTRAP.md - first-run tasks */
|
|
213
|
+
bootstrap?: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Claw Middleware 配置
|
|
217
|
+
* 用于配置 bootstrap 文件管理行为
|
|
218
|
+
*/
|
|
219
|
+
interface ClawMiddlewareConfig {
|
|
220
|
+
/** 是否启用 bootstrap 文件注入(默认:true) */
|
|
221
|
+
injectBootstrapFiles?: boolean;
|
|
222
|
+
/** 自定义 bootstrap 文件内容 */
|
|
223
|
+
bootstrapFiles?: BootstrapFilesConfig;
|
|
193
224
|
}
|
|
194
225
|
/**
|
|
195
226
|
* REACT agent configuration
|
|
@@ -496,6 +527,7 @@ interface ScheduledTaskDefinition {
|
|
|
496
527
|
taskId: string;
|
|
497
528
|
taskType: string;
|
|
498
529
|
payload: Record<string, any>;
|
|
530
|
+
tenantId: string;
|
|
499
531
|
assistantId?: string;
|
|
500
532
|
threadId?: string;
|
|
501
533
|
executionType: ScheduleExecutionType;
|
|
@@ -527,6 +559,7 @@ interface ScheduleOnceOptions {
|
|
|
527
559
|
executeAt?: number;
|
|
528
560
|
delayMs?: number;
|
|
529
561
|
maxRetries?: number;
|
|
562
|
+
tenantId?: string;
|
|
530
563
|
assistantId?: string;
|
|
531
564
|
threadId?: string;
|
|
532
565
|
metadata?: Record<string, any>;
|
|
@@ -540,6 +573,7 @@ interface ScheduleCronOptions {
|
|
|
540
573
|
maxRuns?: number;
|
|
541
574
|
expiresAt?: number;
|
|
542
575
|
maxRetries?: number;
|
|
576
|
+
tenantId?: string;
|
|
543
577
|
assistantId?: string;
|
|
544
578
|
threadId?: string;
|
|
545
579
|
metadata?: Record<string, any>;
|
|
@@ -2125,6 +2159,17 @@ interface SemanticMetricsFilter {
|
|
|
2125
2159
|
/** Values for the filter */
|
|
2126
2160
|
values: (string | number | boolean)[];
|
|
2127
2161
|
}
|
|
2162
|
+
/**
|
|
2163
|
+
* Query result format options
|
|
2164
|
+
*/
|
|
2165
|
+
type QueryResultFormat = 'array' | 'object' | 'both';
|
|
2166
|
+
/**
|
|
2167
|
+
* Column definition
|
|
2168
|
+
*/
|
|
2169
|
+
interface MetricColumn {
|
|
2170
|
+
name: string;
|
|
2171
|
+
type: string;
|
|
2172
|
+
}
|
|
2128
2173
|
/**
|
|
2129
2174
|
* Request body for semantic metrics query
|
|
2130
2175
|
*/
|
|
@@ -2139,63 +2184,44 @@ interface SemanticMetricsQueryRequest {
|
|
|
2139
2184
|
filters?: SemanticMetricsFilter[];
|
|
2140
2185
|
/** Optional result limit */
|
|
2141
2186
|
limit?: number;
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
* Single data point in semantic metrics query response
|
|
2145
|
-
*/
|
|
2146
|
-
interface SemanticMetricDataPoint {
|
|
2147
|
-
/** Timestamp in milliseconds */
|
|
2148
|
-
timestamp?: number;
|
|
2149
|
-
/** Metric value */
|
|
2150
|
-
value: number;
|
|
2151
|
-
/** Metric name */
|
|
2152
|
-
metricName?: string;
|
|
2153
|
-
/** Additional dimension values */
|
|
2154
|
-
labels?: Record<string, string>;
|
|
2155
|
-
/** Group by dimension values */
|
|
2156
|
-
groupByValues?: Record<string, string>;
|
|
2157
|
-
}
|
|
2158
|
-
/**
|
|
2159
|
-
* AI Hints for a single metric result
|
|
2160
|
-
*/
|
|
2161
|
-
interface SemanticMetricAiHints {
|
|
2162
|
-
polarity: string;
|
|
2163
|
-
valueInterpretation: string;
|
|
2164
|
-
thresholds?: Array<{
|
|
2165
|
-
metric: string;
|
|
2166
|
-
operator: string;
|
|
2167
|
-
value: number;
|
|
2168
|
-
level: string;
|
|
2169
|
-
}>;
|
|
2170
|
-
suggestedFollowup?: string[];
|
|
2171
|
-
}
|
|
2172
|
-
/**
|
|
2173
|
-
* Single metric result from semantic metrics query
|
|
2174
|
-
*/
|
|
2175
|
-
interface SemanticMetricResult {
|
|
2176
|
-
metricName: string;
|
|
2177
|
-
displayName: string;
|
|
2178
|
-
dataType: string;
|
|
2179
|
-
format: string;
|
|
2180
|
-
polarity: string;
|
|
2181
|
-
columns: string[];
|
|
2182
|
-
rows: Array<Record<string, unknown>>;
|
|
2183
|
-
rowCount: number;
|
|
2184
|
-
executionTimeMs: number;
|
|
2185
|
-
aiHints: SemanticMetricAiHints;
|
|
2187
|
+
/** Optional format specification - defaults to 'array' */
|
|
2188
|
+
format?: QueryResultFormat;
|
|
2186
2189
|
}
|
|
2187
2190
|
/**
|
|
2188
2191
|
* Response from semantic metrics query
|
|
2192
|
+
*
|
|
2193
|
+
* Note: The actual API response format has changed from the original design.
|
|
2194
|
+
* It now returns a flat structure with columns and rows arrays.
|
|
2195
|
+
*
|
|
2196
|
+
* Based on format parameter:
|
|
2197
|
+
* - 'array' (default): returns rows as array of arrays
|
|
2198
|
+
* - 'object': returns rowsObject as array of objects
|
|
2199
|
+
* - 'both': returns both formats
|
|
2189
2200
|
*/
|
|
2190
2201
|
interface SemanticMetricsQueryResponse {
|
|
2191
|
-
/**
|
|
2192
|
-
|
|
2193
|
-
/**
|
|
2194
|
-
|
|
2195
|
-
/**
|
|
2196
|
-
|
|
2197
|
-
/**
|
|
2198
|
-
|
|
2202
|
+
/** Semantic model name that was queried */
|
|
2203
|
+
semanticModel: string;
|
|
2204
|
+
/** Column definitions with name and type */
|
|
2205
|
+
columns: MetricColumn[];
|
|
2206
|
+
/** Number of rows returned */
|
|
2207
|
+
rowCount: number;
|
|
2208
|
+
/** Execution time in milliseconds */
|
|
2209
|
+
executionTimeMs?: number;
|
|
2210
|
+
/**
|
|
2211
|
+
* Data rows as arrays (each row is an array of values corresponding to columns)
|
|
2212
|
+
* Present when format is 'array' or 'both'
|
|
2213
|
+
*/
|
|
2214
|
+
rows?: Array<Array<unknown>>;
|
|
2215
|
+
/**
|
|
2216
|
+
* Data rows as objects (each row is {columnName: value})
|
|
2217
|
+
* Present when format is 'object' or 'both'
|
|
2218
|
+
*/
|
|
2219
|
+
rowsObject?: Array<Record<string, unknown>>;
|
|
2220
|
+
/** Debug information (optional) */
|
|
2221
|
+
debug?: {
|
|
2222
|
+
sql?: string;
|
|
2223
|
+
params?: unknown;
|
|
2224
|
+
};
|
|
2199
2225
|
}
|
|
2200
2226
|
/**
|
|
2201
2227
|
* Request body for executing custom SQL query
|
|
@@ -2209,22 +2235,83 @@ interface ExecuteSqlQueryRequest {
|
|
|
2209
2235
|
params?: Record<string, string | number | boolean>;
|
|
2210
2236
|
/** Optional result limit */
|
|
2211
2237
|
limit?: number;
|
|
2238
|
+
/** Optional format specification - defaults to 'object' */
|
|
2239
|
+
format?: QueryResultFormat;
|
|
2212
2240
|
}
|
|
2213
2241
|
/**
|
|
2214
2242
|
* Response from custom SQL query execution
|
|
2243
|
+
*
|
|
2244
|
+
* Based on format parameter:
|
|
2245
|
+
* - 'object' (default): returns rowsObject as array of objects
|
|
2246
|
+
* - 'array': returns rows as array of arrays
|
|
2247
|
+
* - 'both': returns both formats
|
|
2215
2248
|
*/
|
|
2216
2249
|
interface ExecuteSqlQueryResponse {
|
|
2217
2250
|
/** Data source ID that was queried */
|
|
2218
2251
|
datasourceId: string | number;
|
|
2219
2252
|
/** Data source name */
|
|
2220
2253
|
datasourceName?: string;
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2254
|
+
/** Name of the queried table (if applicable) */
|
|
2255
|
+
tableName?: string;
|
|
2256
|
+
/** Column names in order */
|
|
2257
|
+
columns: string[];
|
|
2258
|
+
/** Number of rows returned */
|
|
2259
|
+
rowCount: number;
|
|
2260
|
+
/** Execution time in milliseconds */
|
|
2261
|
+
executionTimeMs: number;
|
|
2262
|
+
/** Executed SQL query */
|
|
2263
|
+
executedSql: string;
|
|
2264
|
+
/**
|
|
2265
|
+
* Data rows as arrays
|
|
2266
|
+
* Present when format is 'array' or 'both'
|
|
2267
|
+
*/
|
|
2268
|
+
rows?: Array<Array<unknown>>;
|
|
2269
|
+
/**
|
|
2270
|
+
* Data rows as objects (each row is {columnName: value})
|
|
2271
|
+
* Present when format is 'object' or 'both'
|
|
2272
|
+
*/
|
|
2273
|
+
rowsObject?: Array<Record<string, unknown>>;
|
|
2274
|
+
}
|
|
2275
|
+
/**
|
|
2276
|
+
* Request body for table query
|
|
2277
|
+
*/
|
|
2278
|
+
interface TableQueryRequest {
|
|
2279
|
+
/** Table name to query */
|
|
2280
|
+
tableName: string;
|
|
2281
|
+
/** Optional result limit */
|
|
2282
|
+
limit?: number;
|
|
2283
|
+
/** Optional format specification - defaults to 'object' */
|
|
2284
|
+
format?: QueryResultFormat;
|
|
2285
|
+
}
|
|
2286
|
+
/**
|
|
2287
|
+
* Response from table query
|
|
2288
|
+
*
|
|
2289
|
+
* Based on format parameter:
|
|
2290
|
+
* - 'object' (default): returns rowsObject as array of objects (API native format)
|
|
2291
|
+
* - 'array': returns rows as array of arrays
|
|
2292
|
+
* - 'both': returns both formats
|
|
2293
|
+
*/
|
|
2294
|
+
interface TableQueryResponse {
|
|
2295
|
+
/** Name of the queried table */
|
|
2296
|
+
tableName: string;
|
|
2297
|
+
/** Column names in order */
|
|
2298
|
+
columns: string[];
|
|
2299
|
+
/** Number of rows returned */
|
|
2300
|
+
rowCount: number;
|
|
2301
|
+
/** Execution time in milliseconds */
|
|
2302
|
+
executionTimeMs: number;
|
|
2303
|
+
/** Executed SQL query */
|
|
2304
|
+
executedSql: string;
|
|
2305
|
+
/**
|
|
2306
|
+
* Data rows as arrays
|
|
2307
|
+
* Present when format is 'array' or 'both'
|
|
2308
|
+
*/
|
|
2309
|
+
rows?: Array<Array<unknown>>;
|
|
2310
|
+
/**
|
|
2311
|
+
* Data rows as objects (each row is {columnName: value})
|
|
2312
|
+
* Present when format is 'object' or 'both' (API native format)
|
|
2313
|
+
*/
|
|
2314
|
+
rowsObject?: Array<Record<string, unknown>>;
|
|
2228
2315
|
}
|
|
2229
2316
|
/**
|
|
2230
2317
|
* MetricsServerConfigStore interface
|
|
@@ -2647,4 +2734,4 @@ type Timestamp = number;
|
|
|
2647
2734
|
*/
|
|
2648
2735
|
type Callback<T = any, R = void> = (data: T) => R | Promise<R>;
|
|
2649
2736
|
|
|
2650
|
-
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
|
|
2737
|
+
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 ClawMiddlewareConfig, 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 };
|