@axiom-lattice/protocols 2.1.8 → 2.1.10

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/protocols@2.1.8 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@2.1.10 build /home/runner/work/agentic/agentic/packages/protocols
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 2.87 KB
12
- ESM dist/index.mjs.map 19.75 KB
13
- ESM ⚡️ Build success in 45ms
14
- CJS dist/index.js 4.28 KB
15
- CJS dist/index.js.map 20.52 KB
16
- CJS ⚡️ Build success in 47ms
11
+ CJS dist/index.js 4.43 KB
12
+ CJS dist/index.js.map 22.72 KB
13
+ CJS ⚡️ Build success in 53ms
14
+ ESM dist/index.mjs 2.98 KB
15
+ ESM dist/index.mjs.map 21.82 KB
16
+ ESM ⚡️ Build success in 53ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 2410ms
19
- DTS dist/index.d.ts 28.62 KB
20
- DTS dist/index.d.mts 28.62 KB
18
+ DTS ⚡️ Build success in 2751ms
19
+ DTS dist/index.d.ts 35.88 KB
20
+ DTS dist/index.d.mts 35.88 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 2.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 773c03f: add skills
8
+
9
+ ## 2.1.9
10
+
11
+ ### Patch Changes
12
+
13
+ - ef0fb84: update lagger lattice
14
+
3
15
  ## 2.1.8
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -122,9 +122,7 @@ interface ModelLatticeProtocol extends BaseLatticeProtocol<LLMConfig, BaseChatMo
122
122
  */
123
123
  declare enum AgentType {
124
124
  REACT = "react",
125
- DEEP_AGENT = "deep_agent",
126
- PLAN_EXECUTE = "plan_execute",
127
- SEQUENTIAL = "sequential"
125
+ DEEP_AGENT = "deep_agent"
128
126
  }
129
127
  /**
130
128
  * Runtime configuration that will be injected into LangGraphRunnableConfig.configurable
@@ -151,6 +149,7 @@ interface BaseAgentConfig {
151
149
  * Will be available in tools via config.configurable.runConfig
152
150
  */
153
151
  runConfig?: AgentRunConfig;
152
+ skillCategories?: string[];
154
153
  }
155
154
  /**
156
155
  * REACT agent configuration
@@ -168,28 +167,15 @@ interface DeepAgentConfig extends BaseAgentConfig {
168
167
  subAgents?: string[];
169
168
  internalSubAgents?: AgentConfig[];
170
169
  }
171
- /**
172
- * PLAN_EXECUTE agent configuration
173
- */
174
- interface PlanExecuteAgentConfig extends BaseAgentConfig {
175
- type: AgentType.PLAN_EXECUTE;
176
- tools?: string[];
177
- }
178
- /**
179
- * SEQUENTIAL agent configuration
180
- */
181
- interface SequentialAgentConfig extends BaseAgentConfig {
182
- type: AgentType.SEQUENTIAL;
183
- }
184
170
  /**
185
171
  * Agent configuration union type
186
172
  * Different agent types have different configuration options
187
173
  */
188
- type AgentConfig = ReactAgentConfig | DeepAgentConfig | PlanExecuteAgentConfig | SequentialAgentConfig;
174
+ type AgentConfig = ReactAgentConfig | DeepAgentConfig;
189
175
  /**
190
176
  * Agent configuration with tools property
191
177
  */
192
- type AgentConfigWithTools = ReactAgentConfig | DeepAgentConfig | PlanExecuteAgentConfig;
178
+ type AgentConfigWithTools = ReactAgentConfig | DeepAgentConfig;
193
179
  /**
194
180
  * Type guard to check if config has tools property
195
181
  */
@@ -720,6 +706,77 @@ interface VectorStoreLatticeProtocol extends BaseLatticeProtocol<VectorStoreConf
720
706
  }) => Promise<DocumentInterface[]>;
721
707
  }
722
708
 
709
+ /**
710
+ * LoggerLatticeProtocol
711
+ *
712
+ * Logger Lattice protocol for logging management
713
+ */
714
+
715
+ /**
716
+ * Logger service type enumeration
717
+ */
718
+ declare enum LoggerType {
719
+ PINO = "pino",
720
+ CONSOLE = "console",
721
+ CUSTOM = "custom"
722
+ }
723
+ /**
724
+ * Logger context interface
725
+ */
726
+ interface LoggerContext {
727
+ "x-user-id"?: string;
728
+ "x-tenant-id"?: string;
729
+ "x-request-id"?: string;
730
+ "x-task-id"?: string;
731
+ "x-thread-id"?: string;
732
+ [key: string]: any;
733
+ }
734
+ /**
735
+ * Pino logger file transport options
736
+ */
737
+ interface PinoFileOptions {
738
+ file?: string;
739
+ frequency?: "daily" | "hourly" | "minutely" | string;
740
+ mkdir?: boolean;
741
+ size?: string;
742
+ maxFiles?: number;
743
+ }
744
+ /**
745
+ * Logger configuration interface
746
+ */
747
+ interface LoggerConfig {
748
+ name: string;
749
+ description?: string;
750
+ type: LoggerType;
751
+ serviceName?: string;
752
+ loggerName?: string;
753
+ context?: LoggerContext;
754
+ file?: string | PinoFileOptions;
755
+ options?: Record<string, any>;
756
+ }
757
+ /**
758
+ * Logger client interface
759
+ */
760
+ interface LoggerClient {
761
+ info: (msg: string, obj?: object) => void;
762
+ error: (msg: string, obj?: object | Error) => void;
763
+ warn: (msg: string, obj?: object) => void;
764
+ debug: (msg: string, obj?: object) => void;
765
+ updateContext?: (context: Partial<LoggerContext>) => void;
766
+ child?: (options: Partial<LoggerConfig>) => LoggerClient;
767
+ }
768
+ /**
769
+ * Logger Lattice protocol interface
770
+ */
771
+ interface LoggerLatticeProtocol extends BaseLatticeProtocol<LoggerConfig, LoggerClient> {
772
+ info: (msg: string, obj?: object) => void;
773
+ error: (msg: string, obj?: object | Error) => void;
774
+ warn: (msg: string, obj?: object) => void;
775
+ debug: (msg: string, obj?: object) => void;
776
+ updateContext?: (context: Partial<LoggerContext>) => void;
777
+ child?: (options: Partial<LoggerConfig>) => LoggerClient;
778
+ }
779
+
723
780
  /**
724
781
  * MessageProtocol
725
782
  *
@@ -1010,6 +1067,222 @@ interface AssistantStore {
1010
1067
  hasAssistant(id: string): Promise<boolean>;
1011
1068
  }
1012
1069
 
1070
+ /**
1071
+ * SkillStoreProtocol
1072
+ *
1073
+ * Skill store protocol definitions for the Axiom Lattice framework
1074
+ * Provides standardized interfaces for skill management across all implementations
1075
+ */
1076
+ /**
1077
+ * Skill type definition
1078
+ */
1079
+ interface Skill {
1080
+ /**
1081
+ * Skill identifier (key)
1082
+ */
1083
+ id: string;
1084
+ /**
1085
+ * Skill name
1086
+ */
1087
+ name: string;
1088
+ /**
1089
+ * Skill description
1090
+ */
1091
+ description: string;
1092
+ /**
1093
+ * License information (optional)
1094
+ */
1095
+ license?: string;
1096
+ /**
1097
+ * Compatibility information (optional)
1098
+ */
1099
+ compatibility?: string;
1100
+ /**
1101
+ * Additional metadata as string-to-string map (optional)
1102
+ */
1103
+ metadata?: Record<string, string>;
1104
+ /**
1105
+ * Skill detailed content description (optional)
1106
+ * This is the markdown body content after the frontmatter
1107
+ */
1108
+ content?: string;
1109
+ /**
1110
+ * Sub-skills (optional)
1111
+ * Array of skill names that are sub-skills of this skill
1112
+ * Creates a hierarchical tree structure for organizing skills
1113
+ */
1114
+ subSkills?: string[];
1115
+ /**
1116
+ * Skill creation timestamp
1117
+ */
1118
+ createdAt: Date;
1119
+ /**
1120
+ * Skill last update timestamp
1121
+ */
1122
+ updatedAt: Date;
1123
+ }
1124
+ /**
1125
+ * Create skill request type
1126
+ */
1127
+ interface CreateSkillRequest {
1128
+ /**
1129
+ * Skill name
1130
+ */
1131
+ name: string;
1132
+ /**
1133
+ * Skill description
1134
+ */
1135
+ description: string;
1136
+ /**
1137
+ * License information (optional)
1138
+ */
1139
+ license?: string;
1140
+ /**
1141
+ * Compatibility information (optional)
1142
+ */
1143
+ compatibility?: string;
1144
+ /**
1145
+ * Additional metadata as string-to-string map (optional)
1146
+ */
1147
+ metadata?: Record<string, string>;
1148
+ /**
1149
+ * Skill detailed content description (optional)
1150
+ * This is the markdown body content after the frontmatter
1151
+ */
1152
+ content?: string;
1153
+ /**
1154
+ * Sub-skills (optional)
1155
+ * Array of skill names that are sub-skills of this skill
1156
+ * Creates a hierarchical tree structure for organizing skills
1157
+ */
1158
+ subSkills?: string[];
1159
+ }
1160
+ /**
1161
+ * SkillStore interface
1162
+ * Provides CRUD operations for skill data
1163
+ */
1164
+ interface SkillStore {
1165
+ /**
1166
+ * Get all skills
1167
+ * @returns Array of all skills
1168
+ */
1169
+ getAllSkills(): Promise<Skill[]>;
1170
+ /**
1171
+ * Get skill by ID
1172
+ * @param id Skill identifier
1173
+ * @returns Skill if found, null otherwise
1174
+ */
1175
+ getSkillById(id: string): Promise<Skill | null>;
1176
+ /**
1177
+ * Create a new skill
1178
+ * @param id Skill identifier
1179
+ * @param data Skill creation data
1180
+ * @returns Created skill
1181
+ */
1182
+ createSkill(id: string, data: CreateSkillRequest): Promise<Skill>;
1183
+ /**
1184
+ * Update an existing skill
1185
+ * @param id Skill identifier
1186
+ * @param updates Partial skill data to update
1187
+ * @returns Updated skill if found, null otherwise
1188
+ */
1189
+ updateSkill(id: string, updates: Partial<CreateSkillRequest>): Promise<Skill | null>;
1190
+ /**
1191
+ * Delete a skill by ID
1192
+ * @param id Skill identifier
1193
+ * @returns true if deleted, false otherwise
1194
+ */
1195
+ deleteSkill(id: string): Promise<boolean>;
1196
+ /**
1197
+ * Check if skill exists
1198
+ * @param id Skill identifier
1199
+ * @returns true if skill exists, false otherwise
1200
+ */
1201
+ hasSkill(id: string): Promise<boolean>;
1202
+ /**
1203
+ * Search skills by metadata
1204
+ * @param metadataKey Metadata key to search for
1205
+ * @param metadataValue Metadata value to match
1206
+ * @returns Array of matching skills
1207
+ */
1208
+ searchByMetadata(metadataKey: string, metadataValue: string): Promise<Skill[]>;
1209
+ /**
1210
+ * Filter skills by compatibility
1211
+ * @param compatibility Compatibility string to filter by
1212
+ * @returns Array of matching skills
1213
+ */
1214
+ filterByCompatibility(compatibility: string): Promise<Skill[]>;
1215
+ /**
1216
+ * Filter skills by license
1217
+ * @param license License string to filter by
1218
+ * @returns Array of matching skills
1219
+ */
1220
+ filterByLicense(license: string): Promise<Skill[]>;
1221
+ /**
1222
+ * Get sub-skills of a parent skill
1223
+ * @param parentSkillName Parent skill name
1224
+ * @returns Array of sub-skills if found, empty array otherwise
1225
+ */
1226
+ getSubSkills(parentSkillName: string): Promise<Skill[]>;
1227
+ }
1228
+
1229
+ /**
1230
+ * SkillLatticeProtocol
1231
+ *
1232
+ * Skill Lattice protocol for defining reusable skill components
1233
+ */
1234
+
1235
+ /**
1236
+ * Skill configuration interface
1237
+ */
1238
+ interface SkillConfig {
1239
+ /** Skill name (required) */
1240
+ name: string;
1241
+ /** Skill description (required) */
1242
+ description: string;
1243
+ /** License information (optional) */
1244
+ license?: string;
1245
+ /** Compatibility information (optional) */
1246
+ compatibility?: string;
1247
+ /** Additional metadata as string-to-string map (optional) */
1248
+ metadata?: Record<string, string>;
1249
+ /** Skill detailed content description (optional) */
1250
+ content?: string;
1251
+ /** Sub-skills (optional) - Array of skill names that are sub-skills of this skill */
1252
+ subSkills?: string[];
1253
+ }
1254
+ /**
1255
+ * Skill client interface
1256
+ * Clients can optionally implement setStore to receive store access
1257
+ * Supports both interface implementation and any type for backward compatibility
1258
+ */
1259
+ interface SkillClient {
1260
+ /**
1261
+ * Optional method to set the store instance
1262
+ * Called by SkillLatticeManager when registering a skill
1263
+ */
1264
+ setStore?: (store: SkillStore) => void;
1265
+ /**
1266
+ * Optional store property
1267
+ * Can be set directly or via setStore method
1268
+ */
1269
+ store?: SkillStore;
1270
+ /**
1271
+ * Additional client-specific properties and methods
1272
+ */
1273
+ [key: string]: any;
1274
+ }
1275
+ /**
1276
+ * Skill client type (supports both interface and any for backward compatibility)
1277
+ */
1278
+ type SkillClientType = SkillClient | any;
1279
+ /**
1280
+ * Skill Lattice protocol interface
1281
+ */
1282
+ interface SkillLatticeProtocol extends BaseLatticeProtocol<SkillConfig, SkillClientType> {
1283
+ execute?: (input: any, config?: any) => Promise<any>;
1284
+ }
1285
+
1013
1286
  /**
1014
1287
  * 通用类型定义
1015
1288
  *
@@ -1073,4 +1346,4 @@ type Timestamp = number;
1073
1346
  */
1074
1347
  type Callback<T = any, R = void> = (data: T) => R | Promise<R>;
1075
1348
 
1076
- export { type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentRunConfig, AgentType, type Assistant, type AssistantMessage, type AssistantStore, type BaseLatticeProtocol, type BaseMessage, type Callback, type CreateAssistantRequest, type CreateThreadRequest, type DeepAgentConfig, type DeveloperMessage, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type FilterCondition, type GraphBuildOptions, type ID, type InterruptMessage, type LLMConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type Message, type MessageChunk, type ModelLatticeProtocol, type PaginatedResult, type PaginationParams, type PlanExecuteAgentConfig, type QueryParams, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type ReactAgentConfig, type Result, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SequentialAgentConfig, type SystemMessage, type TaskHandler, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UserMessage, type VectorStoreConfig, type VectorStoreLatticeProtocol, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isDeepAgentConfig };
1349
+ export { type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentRunConfig, AgentType, type Assistant, type AssistantMessage, type AssistantStore, type BaseLatticeProtocol, type BaseMessage, type Callback, type CreateAssistantRequest, type CreateSkillRequest, type CreateThreadRequest, type DeepAgentConfig, type DeveloperMessage, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, 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 MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type Message, type MessageChunk, type ModelLatticeProtocol, type PaginatedResult, type PaginationParams, type PinoFileOptions, type QueryParams, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type ReactAgentConfig, type Result, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SystemMessage, type TaskHandler, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UserMessage, type VectorStoreConfig, type VectorStoreLatticeProtocol, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isDeepAgentConfig };