@alfe.ai/integrations 0.1.1 → 0.1.2
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/dist/index.js +17 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1162,6 +1162,13 @@ var IntegrationManager = class {
|
|
|
1162
1162
|
this.log.info(`Deactivating integration: ${integrationId}`);
|
|
1163
1163
|
try {
|
|
1164
1164
|
const removed = this.lockManager.removeEntries(integrationId);
|
|
1165
|
+
const remaining = this.lockManager.read();
|
|
1166
|
+
const claimedPluginsByRuntime = /* @__PURE__ */ new Map();
|
|
1167
|
+
const claimedSkillsByRuntime = /* @__PURE__ */ new Map();
|
|
1168
|
+
for (const [rtName, state] of Object.entries(remaining.runtimes)) {
|
|
1169
|
+
claimedPluginsByRuntime.set(rtName, new Set(state.plugins.map((p) => p.package)));
|
|
1170
|
+
claimedSkillsByRuntime.set(rtName, new Set(state.skills.map((s) => s.name)));
|
|
1171
|
+
}
|
|
1165
1172
|
for (const [runtimeName, entries] of Object.entries(removed)) {
|
|
1166
1173
|
const applier = this.runtimeAppliers.get(runtimeName);
|
|
1167
1174
|
if (!applier) {
|
|
@@ -1172,7 +1179,13 @@ var IntegrationManager = class {
|
|
|
1172
1179
|
this.log.warn(`Runtime "${runtimeName}" is not available — skipping removal`);
|
|
1173
1180
|
continue;
|
|
1174
1181
|
}
|
|
1182
|
+
const keepPlugins = claimedPluginsByRuntime.get(runtimeName) ?? /* @__PURE__ */ new Set();
|
|
1183
|
+
const keepSkills = claimedSkillsByRuntime.get(runtimeName) ?? /* @__PURE__ */ new Set();
|
|
1175
1184
|
for (const plugin of entries.plugins) {
|
|
1185
|
+
if (keepPlugins.has(plugin.package)) {
|
|
1186
|
+
this.log.info(`Keeping plugin ${plugin.package} on ${runtimeName} — still claimed by another active integration`);
|
|
1187
|
+
continue;
|
|
1188
|
+
}
|
|
1176
1189
|
this.log.info(`Removing plugin ${plugin.package} from ${runtimeName}`);
|
|
1177
1190
|
try {
|
|
1178
1191
|
await applier.removePlugin(plugin.package);
|
|
@@ -1181,6 +1194,10 @@ var IntegrationManager = class {
|
|
|
1181
1194
|
}
|
|
1182
1195
|
}
|
|
1183
1196
|
for (const skill of entries.skills) {
|
|
1197
|
+
if (keepSkills.has(skill.name)) {
|
|
1198
|
+
this.log.info(`Keeping skill ${skill.name} on ${runtimeName} — still claimed by another active integration`);
|
|
1199
|
+
continue;
|
|
1200
|
+
}
|
|
1184
1201
|
this.log.info(`Removing skill ${skill.name} from ${runtimeName}`);
|
|
1185
1202
|
try {
|
|
1186
1203
|
if (skill.sourcePath.startsWith("clawhub:")) await applier.removeClawHubSkill(skill.name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/integrations",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Integration lifecycle management for Alfe — registry, resolution, installation, and state",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@auriclabs/logger": "^0.1.1",
|
|
16
|
-
"@alfe.ai/integration-manifest": "^0.
|
|
17
|
-
"@alfe.ai/mcp-bundler": "^0.
|
|
16
|
+
"@alfe.ai/integration-manifest": "^0.2.0",
|
|
17
|
+
"@alfe.ai/mcp-bundler": "^0.2.0"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist"
|