@axiom-lattice/protocols 2.1.19 → 2.1.20

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.19 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@2.1.20 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
@@ -9,12 +9,12 @@
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  CJS dist/index.js 5.20 KB
12
- CJS dist/index.js.map 31.69 KB
12
+ CJS dist/index.js.map 31.74 KB
13
13
  CJS ⚡️ Build success in 66ms
14
14
  ESM dist/index.mjs 3.67 KB
15
- ESM dist/index.mjs.map 30.42 KB
16
- ESM ⚡️ Build success in 66ms
15
+ ESM dist/index.mjs.map 30.47 KB
16
+ ESM ⚡️ Build success in 67ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 2806ms
19
- DTS dist/index.d.ts 71.37 KB
20
- DTS dist/index.d.mts 71.37 KB
18
+ DTS ⚡️ Build success in 2739ms
19
+ DTS dist/index.d.ts 72.94 KB
20
+ DTS dist/index.d.mts 72.94 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 2.1.20
4
+
5
+ ### Patch Changes
6
+
7
+ - 99f4b77: add tenantid for all lattice
8
+
3
9
  ## 2.1.19
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -593,6 +593,7 @@ interface ScheduleStorage {
593
593
  * Get all tasks (with optional filters)
594
594
  */
595
595
  getAllTasks(filters?: {
596
+ tenantId?: string;
596
597
  status?: ScheduledTaskStatus;
597
598
  executionType?: ScheduleExecutionType;
598
599
  taskType?: string;
@@ -605,6 +606,7 @@ interface ScheduleStorage {
605
606
  * Count tasks (with optional filters)
606
607
  */
607
608
  countTasks(filters?: {
609
+ tenantId?: string;
608
610
  status?: ScheduledTaskStatus;
609
611
  executionType?: ScheduleExecutionType;
610
612
  taskType?: string;
@@ -973,6 +975,10 @@ interface Thread {
973
975
  * Thread identifier
974
976
  */
975
977
  id: string;
978
+ /**
979
+ * Tenant identifier
980
+ */
981
+ tenantId: string;
976
982
  /**
977
983
  * Assistant identifier this thread belongs to
978
984
  */
@@ -1002,52 +1008,54 @@ interface CreateThreadRequest {
1002
1008
  /**
1003
1009
  * ThreadStore interface
1004
1010
  * Provides CRUD operations for thread data
1005
- * All operations are scoped to an assistant ID
1011
+ * All operations are scoped to a tenant ID and assistant ID
1006
1012
  */
1007
1013
  interface ThreadStore {
1008
1014
  /**
1009
- * Get all threads for a specific assistant
1015
+ * Get all threads for a specific tenant and assistant
1016
+ * @param tenantId Tenant identifier
1010
1017
  * @param assistantId Assistant identifier
1011
1018
  * @returns Array of threads for the assistant
1012
1019
  */
1013
- getThreadsByAssistantId(assistantId: string): Promise<Thread[]>;
1020
+ getThreadsByAssistantId(tenantId: string, assistantId: string): Promise<Thread[]>;
1014
1021
  /**
1015
- * Get a thread by ID for a specific assistant
1016
- * @param assistantId Assistant identifier
1022
+ * Get a thread by ID for a specific tenant
1023
+ * @param tenantId Tenant identifier
1017
1024
  * @param threadId Thread identifier
1018
1025
  * @returns Thread if found, undefined otherwise
1019
1026
  */
1020
- getThreadById(assistantId: string, threadId: string): Promise<Thread | undefined>;
1027
+ getThreadById(tenantId: string, threadId: string): Promise<Thread | undefined>;
1021
1028
  /**
1022
- * Create a new thread for an assistant
1029
+ * Create a new thread for a tenant and assistant
1030
+ * @param tenantId Tenant identifier
1023
1031
  * @param assistantId Assistant identifier
1024
1032
  * @param threadId Thread identifier
1025
1033
  * @param data Thread creation data
1026
1034
  * @returns Created thread
1027
1035
  */
1028
- createThread(assistantId: string, threadId: string, data: CreateThreadRequest): Promise<Thread>;
1036
+ createThread(tenantId: string, assistantId: string, threadId: string, data: CreateThreadRequest): Promise<Thread>;
1029
1037
  /**
1030
1038
  * Update an existing thread
1031
- * @param assistantId Assistant identifier
1039
+ * @param tenantId Tenant identifier
1032
1040
  * @param threadId Thread identifier
1033
1041
  * @param updates Partial thread data to update
1034
1042
  * @returns Updated thread if found, null otherwise
1035
1043
  */
1036
- updateThread(assistantId: string, threadId: string, updates: Partial<CreateThreadRequest>): Promise<Thread | null>;
1044
+ updateThread(tenantId: string, threadId: string, updates: Partial<CreateThreadRequest>): Promise<Thread | null>;
1037
1045
  /**
1038
1046
  * Delete a thread by ID
1039
- * @param assistantId Assistant identifier
1047
+ * @param tenantId Tenant identifier
1040
1048
  * @param threadId Thread identifier
1041
1049
  * @returns true if deleted, false otherwise
1042
1050
  */
1043
- deleteThread(assistantId: string, threadId: string): Promise<boolean>;
1051
+ deleteThread(tenantId: string, threadId: string): Promise<boolean>;
1044
1052
  /**
1045
1053
  * Check if thread exists
1046
- * @param assistantId Assistant identifier
1054
+ * @param tenantId Tenant identifier
1047
1055
  * @param threadId Thread identifier
1048
1056
  * @returns true if thread exists, false otherwise
1049
1057
  */
1050
- hasThread(assistantId: string, threadId: string): Promise<boolean>;
1058
+ hasThread(tenantId: string, threadId: string): Promise<boolean>;
1051
1059
  }
1052
1060
 
1053
1061
  /**
@@ -1064,6 +1072,10 @@ interface Assistant {
1064
1072
  * Assistant identifier
1065
1073
  */
1066
1074
  id: string;
1075
+ /**
1076
+ * Tenant identifier
1077
+ */
1078
+ tenantId: string;
1067
1079
  /**
1068
1080
  * Assistant name
1069
1081
  */
@@ -1108,42 +1120,48 @@ interface CreateAssistantRequest {
1108
1120
  */
1109
1121
  interface AssistantStore {
1110
1122
  /**
1111
- * Get all assistants
1112
- * @returns Array of all assistants
1123
+ * Get all assistants for a tenant
1124
+ * @param tenantId Tenant identifier
1125
+ * @returns Array of all assistants for the tenant
1113
1126
  */
1114
- getAllAssistants(): Promise<Assistant[]>;
1127
+ getAllAssistants(tenantId: string): Promise<Assistant[]>;
1115
1128
  /**
1116
1129
  * Get assistant by ID
1130
+ * @param tenantId Tenant identifier
1117
1131
  * @param id Assistant identifier
1118
- * @returns Assistant if found, undefined otherwise
1132
+ * @returns Assistant if found, null otherwise
1119
1133
  */
1120
- getAssistantById(id: string): Promise<Assistant | null>;
1134
+ getAssistantById(tenantId: string, id: string): Promise<Assistant | null>;
1121
1135
  /**
1122
1136
  * Create a new assistant
1137
+ * @param tenantId Tenant identifier
1123
1138
  * @param id Assistant identifier
1124
1139
  * @param data Assistant creation data
1125
1140
  * @returns Created assistant
1126
1141
  */
1127
- createAssistant(id: string, data: CreateAssistantRequest): Promise<Assistant>;
1142
+ createAssistant(tenantId: string, id: string, data: CreateAssistantRequest): Promise<Assistant>;
1128
1143
  /**
1129
1144
  * Update an existing assistant
1145
+ * @param tenantId Tenant identifier
1130
1146
  * @param id Assistant identifier
1131
1147
  * @param updates Partial assistant data to update
1132
1148
  * @returns Updated assistant if found, null otherwise
1133
1149
  */
1134
- updateAssistant(id: string, updates: Partial<CreateAssistantRequest>): Promise<Assistant | null>;
1150
+ updateAssistant(tenantId: string, id: string, updates: Partial<CreateAssistantRequest>): Promise<Assistant | null>;
1135
1151
  /**
1136
1152
  * Delete an assistant by ID
1153
+ * @param tenantId Tenant identifier
1137
1154
  * @param id Assistant identifier
1138
1155
  * @returns true if deleted, false otherwise
1139
1156
  */
1140
- deleteAssistant(id: string): Promise<boolean>;
1157
+ deleteAssistant(tenantId: string, id: string): Promise<boolean>;
1141
1158
  /**
1142
1159
  * Check if assistant exists
1160
+ * @param tenantId Tenant identifier
1143
1161
  * @param id Assistant identifier
1144
1162
  * @returns true if assistant exists, false otherwise
1145
1163
  */
1146
- hasAssistant(id: string): Promise<boolean>;
1164
+ hasAssistant(tenantId: string, id: string): Promise<boolean>;
1147
1165
  }
1148
1166
 
1149
1167
  /**
@@ -1160,6 +1178,10 @@ interface Skill {
1160
1178
  * Skill identifier (key)
1161
1179
  */
1162
1180
  id: string;
1181
+ /**
1182
+ * Tenant identifier
1183
+ */
1184
+ tenantId: string;
1163
1185
  /**
1164
1186
  * Skill name
1165
1187
  */
@@ -1242,80 +1264,92 @@ interface CreateSkillRequest {
1242
1264
  */
1243
1265
  interface SkillStore {
1244
1266
  /**
1245
- * Get all skills
1246
- * @returns Array of all skills
1267
+ * Get all skills for a tenant
1268
+ * @param tenantId Tenant identifier
1269
+ * @returns Array of all skills for the tenant
1247
1270
  */
1248
- getAllSkills(): Promise<Skill[]>;
1271
+ getAllSkills(tenantId: string): Promise<Skill[]>;
1249
1272
  /**
1250
1273
  * Get skill by ID
1274
+ * @param tenantId Tenant identifier
1251
1275
  * @param id Skill identifier
1252
1276
  * @returns Skill if found, null otherwise
1253
1277
  */
1254
- getSkillById(id: string): Promise<Skill | null>;
1278
+ getSkillById(tenantId: string, id: string): Promise<Skill | null>;
1255
1279
  /**
1256
1280
  * Create a new skill
1281
+ * @param tenantId Tenant identifier
1257
1282
  * @param id Skill identifier
1258
1283
  * @param data Skill creation data
1259
1284
  * @returns Created skill
1260
1285
  */
1261
- createSkill(id: string, data: CreateSkillRequest): Promise<Skill>;
1286
+ createSkill(tenantId: string, id: string, data: CreateSkillRequest): Promise<Skill>;
1262
1287
  /**
1263
1288
  * Update an existing skill
1289
+ * @param tenantId Tenant identifier
1264
1290
  * @param id Skill identifier
1265
1291
  * @param updates Partial skill data to update
1266
1292
  * @returns Updated skill if found, null otherwise
1267
1293
  */
1268
- updateSkill(id: string, updates: Partial<CreateSkillRequest>): Promise<Skill | null>;
1294
+ updateSkill(tenantId: string, id: string, updates: Partial<CreateSkillRequest>): Promise<Skill | null>;
1269
1295
  /**
1270
1296
  * Delete a skill by ID
1297
+ * @param tenantId Tenant identifier
1271
1298
  * @param id Skill identifier
1272
1299
  * @returns true if deleted, false otherwise
1273
1300
  */
1274
- deleteSkill(id: string): Promise<boolean>;
1301
+ deleteSkill(tenantId: string, id: string): Promise<boolean>;
1275
1302
  /**
1276
1303
  * Check if skill exists
1304
+ * @param tenantId Tenant identifier
1277
1305
  * @param id Skill identifier
1278
1306
  * @returns true if skill exists, false otherwise
1279
1307
  */
1280
- hasSkill(id: string): Promise<boolean>;
1308
+ hasSkill(tenantId: string, id: string): Promise<boolean>;
1281
1309
  /**
1282
- * Search skills by metadata
1310
+ * Search skills by metadata within a tenant
1311
+ * @param tenantId Tenant identifier
1283
1312
  * @param metadataKey Metadata key to search for
1284
1313
  * @param metadataValue Metadata value to match
1285
1314
  * @returns Array of matching skills
1286
1315
  */
1287
- searchByMetadata(metadataKey: string, metadataValue: string): Promise<Skill[]>;
1316
+ searchByMetadata(tenantId: string, metadataKey: string, metadataValue: string): Promise<Skill[]>;
1288
1317
  /**
1289
- * Filter skills by compatibility
1318
+ * Filter skills by compatibility within a tenant
1319
+ * @param tenantId Tenant identifier
1290
1320
  * @param compatibility Compatibility string to filter by
1291
1321
  * @returns Array of matching skills
1292
1322
  */
1293
- filterByCompatibility(compatibility: string): Promise<Skill[]>;
1323
+ filterByCompatibility(tenantId: string, compatibility: string): Promise<Skill[]>;
1294
1324
  /**
1295
- * Filter skills by license
1325
+ * Filter skills by license within a tenant
1326
+ * @param tenantId Tenant identifier
1296
1327
  * @param license License string to filter by
1297
1328
  * @returns Array of matching skills
1298
1329
  */
1299
- filterByLicense(license: string): Promise<Skill[]>;
1330
+ filterByLicense(tenantId: string, license: string): Promise<Skill[]>;
1300
1331
  /**
1301
- * Get sub-skills of a parent skill
1332
+ * Get sub-skills of a parent skill within a tenant
1333
+ * @param tenantId Tenant identifier
1302
1334
  * @param parentSkillName Parent skill name
1303
1335
  * @returns Array of sub-skills if found, empty array otherwise
1304
1336
  */
1305
- getSubSkills(parentSkillName: string): Promise<Skill[]>;
1337
+ getSubSkills(tenantId: string, parentSkillName: string): Promise<Skill[]>;
1306
1338
  /**
1307
1339
  * List all resources in a skill's resources directory
1340
+ * @param tenantId Tenant identifier
1308
1341
  * @param id Skill identifier
1309
1342
  * @returns Array of resource paths relative to resources/ directory
1310
1343
  */
1311
- listSkillResources?(id: string): Promise<string[]>;
1344
+ listSkillResources?(tenantId: string, id: string): Promise<string[]>;
1312
1345
  /**
1313
1346
  * Load a specific resource from a skill's resources directory
1347
+ * @param tenantId Tenant identifier
1314
1348
  * @param id Skill identifier
1315
1349
  * @param resourcePath Path to the resource relative to resources/ directory
1316
1350
  * @returns The resource content as string, or null if not found
1317
1351
  */
1318
- loadSkillResource?(id: string, resourcePath: string): Promise<string | null>;
1352
+ loadSkillResource?(tenantId: string, id: string, resourcePath: string): Promise<string | null>;
1319
1353
  }
1320
1354
 
1321
1355
  /**
@@ -1920,6 +1954,8 @@ interface MetricsServerConfig {
1920
1954
  headers?: Record<string, string>;
1921
1955
  /** Optional timeout in milliseconds (default: 30000) */
1922
1956
  timeout?: number;
1957
+ /** Optional tenant ID for multi-tenant isolation */
1958
+ tenantId?: string;
1923
1959
  }
1924
1960
  /**
1925
1961
  * Metrics server configuration entry stored in the store
package/dist/index.d.ts CHANGED
@@ -593,6 +593,7 @@ interface ScheduleStorage {
593
593
  * Get all tasks (with optional filters)
594
594
  */
595
595
  getAllTasks(filters?: {
596
+ tenantId?: string;
596
597
  status?: ScheduledTaskStatus;
597
598
  executionType?: ScheduleExecutionType;
598
599
  taskType?: string;
@@ -605,6 +606,7 @@ interface ScheduleStorage {
605
606
  * Count tasks (with optional filters)
606
607
  */
607
608
  countTasks(filters?: {
609
+ tenantId?: string;
608
610
  status?: ScheduledTaskStatus;
609
611
  executionType?: ScheduleExecutionType;
610
612
  taskType?: string;
@@ -973,6 +975,10 @@ interface Thread {
973
975
  * Thread identifier
974
976
  */
975
977
  id: string;
978
+ /**
979
+ * Tenant identifier
980
+ */
981
+ tenantId: string;
976
982
  /**
977
983
  * Assistant identifier this thread belongs to
978
984
  */
@@ -1002,52 +1008,54 @@ interface CreateThreadRequest {
1002
1008
  /**
1003
1009
  * ThreadStore interface
1004
1010
  * Provides CRUD operations for thread data
1005
- * All operations are scoped to an assistant ID
1011
+ * All operations are scoped to a tenant ID and assistant ID
1006
1012
  */
1007
1013
  interface ThreadStore {
1008
1014
  /**
1009
- * Get all threads for a specific assistant
1015
+ * Get all threads for a specific tenant and assistant
1016
+ * @param tenantId Tenant identifier
1010
1017
  * @param assistantId Assistant identifier
1011
1018
  * @returns Array of threads for the assistant
1012
1019
  */
1013
- getThreadsByAssistantId(assistantId: string): Promise<Thread[]>;
1020
+ getThreadsByAssistantId(tenantId: string, assistantId: string): Promise<Thread[]>;
1014
1021
  /**
1015
- * Get a thread by ID for a specific assistant
1016
- * @param assistantId Assistant identifier
1022
+ * Get a thread by ID for a specific tenant
1023
+ * @param tenantId Tenant identifier
1017
1024
  * @param threadId Thread identifier
1018
1025
  * @returns Thread if found, undefined otherwise
1019
1026
  */
1020
- getThreadById(assistantId: string, threadId: string): Promise<Thread | undefined>;
1027
+ getThreadById(tenantId: string, threadId: string): Promise<Thread | undefined>;
1021
1028
  /**
1022
- * Create a new thread for an assistant
1029
+ * Create a new thread for a tenant and assistant
1030
+ * @param tenantId Tenant identifier
1023
1031
  * @param assistantId Assistant identifier
1024
1032
  * @param threadId Thread identifier
1025
1033
  * @param data Thread creation data
1026
1034
  * @returns Created thread
1027
1035
  */
1028
- createThread(assistantId: string, threadId: string, data: CreateThreadRequest): Promise<Thread>;
1036
+ createThread(tenantId: string, assistantId: string, threadId: string, data: CreateThreadRequest): Promise<Thread>;
1029
1037
  /**
1030
1038
  * Update an existing thread
1031
- * @param assistantId Assistant identifier
1039
+ * @param tenantId Tenant identifier
1032
1040
  * @param threadId Thread identifier
1033
1041
  * @param updates Partial thread data to update
1034
1042
  * @returns Updated thread if found, null otherwise
1035
1043
  */
1036
- updateThread(assistantId: string, threadId: string, updates: Partial<CreateThreadRequest>): Promise<Thread | null>;
1044
+ updateThread(tenantId: string, threadId: string, updates: Partial<CreateThreadRequest>): Promise<Thread | null>;
1037
1045
  /**
1038
1046
  * Delete a thread by ID
1039
- * @param assistantId Assistant identifier
1047
+ * @param tenantId Tenant identifier
1040
1048
  * @param threadId Thread identifier
1041
1049
  * @returns true if deleted, false otherwise
1042
1050
  */
1043
- deleteThread(assistantId: string, threadId: string): Promise<boolean>;
1051
+ deleteThread(tenantId: string, threadId: string): Promise<boolean>;
1044
1052
  /**
1045
1053
  * Check if thread exists
1046
- * @param assistantId Assistant identifier
1054
+ * @param tenantId Tenant identifier
1047
1055
  * @param threadId Thread identifier
1048
1056
  * @returns true if thread exists, false otherwise
1049
1057
  */
1050
- hasThread(assistantId: string, threadId: string): Promise<boolean>;
1058
+ hasThread(tenantId: string, threadId: string): Promise<boolean>;
1051
1059
  }
1052
1060
 
1053
1061
  /**
@@ -1064,6 +1072,10 @@ interface Assistant {
1064
1072
  * Assistant identifier
1065
1073
  */
1066
1074
  id: string;
1075
+ /**
1076
+ * Tenant identifier
1077
+ */
1078
+ tenantId: string;
1067
1079
  /**
1068
1080
  * Assistant name
1069
1081
  */
@@ -1108,42 +1120,48 @@ interface CreateAssistantRequest {
1108
1120
  */
1109
1121
  interface AssistantStore {
1110
1122
  /**
1111
- * Get all assistants
1112
- * @returns Array of all assistants
1123
+ * Get all assistants for a tenant
1124
+ * @param tenantId Tenant identifier
1125
+ * @returns Array of all assistants for the tenant
1113
1126
  */
1114
- getAllAssistants(): Promise<Assistant[]>;
1127
+ getAllAssistants(tenantId: string): Promise<Assistant[]>;
1115
1128
  /**
1116
1129
  * Get assistant by ID
1130
+ * @param tenantId Tenant identifier
1117
1131
  * @param id Assistant identifier
1118
- * @returns Assistant if found, undefined otherwise
1132
+ * @returns Assistant if found, null otherwise
1119
1133
  */
1120
- getAssistantById(id: string): Promise<Assistant | null>;
1134
+ getAssistantById(tenantId: string, id: string): Promise<Assistant | null>;
1121
1135
  /**
1122
1136
  * Create a new assistant
1137
+ * @param tenantId Tenant identifier
1123
1138
  * @param id Assistant identifier
1124
1139
  * @param data Assistant creation data
1125
1140
  * @returns Created assistant
1126
1141
  */
1127
- createAssistant(id: string, data: CreateAssistantRequest): Promise<Assistant>;
1142
+ createAssistant(tenantId: string, id: string, data: CreateAssistantRequest): Promise<Assistant>;
1128
1143
  /**
1129
1144
  * Update an existing assistant
1145
+ * @param tenantId Tenant identifier
1130
1146
  * @param id Assistant identifier
1131
1147
  * @param updates Partial assistant data to update
1132
1148
  * @returns Updated assistant if found, null otherwise
1133
1149
  */
1134
- updateAssistant(id: string, updates: Partial<CreateAssistantRequest>): Promise<Assistant | null>;
1150
+ updateAssistant(tenantId: string, id: string, updates: Partial<CreateAssistantRequest>): Promise<Assistant | null>;
1135
1151
  /**
1136
1152
  * Delete an assistant by ID
1153
+ * @param tenantId Tenant identifier
1137
1154
  * @param id Assistant identifier
1138
1155
  * @returns true if deleted, false otherwise
1139
1156
  */
1140
- deleteAssistant(id: string): Promise<boolean>;
1157
+ deleteAssistant(tenantId: string, id: string): Promise<boolean>;
1141
1158
  /**
1142
1159
  * Check if assistant exists
1160
+ * @param tenantId Tenant identifier
1143
1161
  * @param id Assistant identifier
1144
1162
  * @returns true if assistant exists, false otherwise
1145
1163
  */
1146
- hasAssistant(id: string): Promise<boolean>;
1164
+ hasAssistant(tenantId: string, id: string): Promise<boolean>;
1147
1165
  }
1148
1166
 
1149
1167
  /**
@@ -1160,6 +1178,10 @@ interface Skill {
1160
1178
  * Skill identifier (key)
1161
1179
  */
1162
1180
  id: string;
1181
+ /**
1182
+ * Tenant identifier
1183
+ */
1184
+ tenantId: string;
1163
1185
  /**
1164
1186
  * Skill name
1165
1187
  */
@@ -1242,80 +1264,92 @@ interface CreateSkillRequest {
1242
1264
  */
1243
1265
  interface SkillStore {
1244
1266
  /**
1245
- * Get all skills
1246
- * @returns Array of all skills
1267
+ * Get all skills for a tenant
1268
+ * @param tenantId Tenant identifier
1269
+ * @returns Array of all skills for the tenant
1247
1270
  */
1248
- getAllSkills(): Promise<Skill[]>;
1271
+ getAllSkills(tenantId: string): Promise<Skill[]>;
1249
1272
  /**
1250
1273
  * Get skill by ID
1274
+ * @param tenantId Tenant identifier
1251
1275
  * @param id Skill identifier
1252
1276
  * @returns Skill if found, null otherwise
1253
1277
  */
1254
- getSkillById(id: string): Promise<Skill | null>;
1278
+ getSkillById(tenantId: string, id: string): Promise<Skill | null>;
1255
1279
  /**
1256
1280
  * Create a new skill
1281
+ * @param tenantId Tenant identifier
1257
1282
  * @param id Skill identifier
1258
1283
  * @param data Skill creation data
1259
1284
  * @returns Created skill
1260
1285
  */
1261
- createSkill(id: string, data: CreateSkillRequest): Promise<Skill>;
1286
+ createSkill(tenantId: string, id: string, data: CreateSkillRequest): Promise<Skill>;
1262
1287
  /**
1263
1288
  * Update an existing skill
1289
+ * @param tenantId Tenant identifier
1264
1290
  * @param id Skill identifier
1265
1291
  * @param updates Partial skill data to update
1266
1292
  * @returns Updated skill if found, null otherwise
1267
1293
  */
1268
- updateSkill(id: string, updates: Partial<CreateSkillRequest>): Promise<Skill | null>;
1294
+ updateSkill(tenantId: string, id: string, updates: Partial<CreateSkillRequest>): Promise<Skill | null>;
1269
1295
  /**
1270
1296
  * Delete a skill by ID
1297
+ * @param tenantId Tenant identifier
1271
1298
  * @param id Skill identifier
1272
1299
  * @returns true if deleted, false otherwise
1273
1300
  */
1274
- deleteSkill(id: string): Promise<boolean>;
1301
+ deleteSkill(tenantId: string, id: string): Promise<boolean>;
1275
1302
  /**
1276
1303
  * Check if skill exists
1304
+ * @param tenantId Tenant identifier
1277
1305
  * @param id Skill identifier
1278
1306
  * @returns true if skill exists, false otherwise
1279
1307
  */
1280
- hasSkill(id: string): Promise<boolean>;
1308
+ hasSkill(tenantId: string, id: string): Promise<boolean>;
1281
1309
  /**
1282
- * Search skills by metadata
1310
+ * Search skills by metadata within a tenant
1311
+ * @param tenantId Tenant identifier
1283
1312
  * @param metadataKey Metadata key to search for
1284
1313
  * @param metadataValue Metadata value to match
1285
1314
  * @returns Array of matching skills
1286
1315
  */
1287
- searchByMetadata(metadataKey: string, metadataValue: string): Promise<Skill[]>;
1316
+ searchByMetadata(tenantId: string, metadataKey: string, metadataValue: string): Promise<Skill[]>;
1288
1317
  /**
1289
- * Filter skills by compatibility
1318
+ * Filter skills by compatibility within a tenant
1319
+ * @param tenantId Tenant identifier
1290
1320
  * @param compatibility Compatibility string to filter by
1291
1321
  * @returns Array of matching skills
1292
1322
  */
1293
- filterByCompatibility(compatibility: string): Promise<Skill[]>;
1323
+ filterByCompatibility(tenantId: string, compatibility: string): Promise<Skill[]>;
1294
1324
  /**
1295
- * Filter skills by license
1325
+ * Filter skills by license within a tenant
1326
+ * @param tenantId Tenant identifier
1296
1327
  * @param license License string to filter by
1297
1328
  * @returns Array of matching skills
1298
1329
  */
1299
- filterByLicense(license: string): Promise<Skill[]>;
1330
+ filterByLicense(tenantId: string, license: string): Promise<Skill[]>;
1300
1331
  /**
1301
- * Get sub-skills of a parent skill
1332
+ * Get sub-skills of a parent skill within a tenant
1333
+ * @param tenantId Tenant identifier
1302
1334
  * @param parentSkillName Parent skill name
1303
1335
  * @returns Array of sub-skills if found, empty array otherwise
1304
1336
  */
1305
- getSubSkills(parentSkillName: string): Promise<Skill[]>;
1337
+ getSubSkills(tenantId: string, parentSkillName: string): Promise<Skill[]>;
1306
1338
  /**
1307
1339
  * List all resources in a skill's resources directory
1340
+ * @param tenantId Tenant identifier
1308
1341
  * @param id Skill identifier
1309
1342
  * @returns Array of resource paths relative to resources/ directory
1310
1343
  */
1311
- listSkillResources?(id: string): Promise<string[]>;
1344
+ listSkillResources?(tenantId: string, id: string): Promise<string[]>;
1312
1345
  /**
1313
1346
  * Load a specific resource from a skill's resources directory
1347
+ * @param tenantId Tenant identifier
1314
1348
  * @param id Skill identifier
1315
1349
  * @param resourcePath Path to the resource relative to resources/ directory
1316
1350
  * @returns The resource content as string, or null if not found
1317
1351
  */
1318
- loadSkillResource?(id: string, resourcePath: string): Promise<string | null>;
1352
+ loadSkillResource?(tenantId: string, id: string, resourcePath: string): Promise<string | null>;
1319
1353
  }
1320
1354
 
1321
1355
  /**
@@ -1920,6 +1954,8 @@ interface MetricsServerConfig {
1920
1954
  headers?: Record<string, string>;
1921
1955
  /** Optional timeout in milliseconds (default: 30000) */
1922
1956
  timeout?: number;
1957
+ /** Optional tenant ID for multi-tenant isolation */
1958
+ tenantId?: string;
1923
1959
  }
1924
1960
  /**
1925
1961
  * Metrics server configuration entry stored in the store