stigmergy 1.3.77-beta.4 → 1.3.77

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stigmergy",
3
- "version": "1.3.77-beta.4",
3
+ "version": "1.3.77",
4
4
  "description": "Stigmergy CLI - Multi-Agents Cross-AI CLI Tools Collaboration System",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -100,6 +100,28 @@ class StigmergySkillsHub {
100
100
  const content = await fs.readFile(this.adaptersPath, 'utf8');
101
101
  const config = JSON.parse(content);
102
102
  this.adapters = config.tools || [];
103
+
104
+ // Get default adapters to check for missing tools
105
+ const defaultAdapters = this.getDefaultAdapters();
106
+ const defaultAdapterIds = new Set(defaultAdapters.map(adapter => adapter.id));
107
+ const currentAdapterIds = new Set(this.adapters.map(adapter => adapter.id));
108
+
109
+ // Find missing adapters and add them
110
+ const missingAdapters = defaultAdapters.filter(adapter => !currentAdapterIds.has(adapter.id));
111
+
112
+ if (missingAdapters.length > 0) {
113
+ this.adapters = [...this.adapters, ...missingAdapters];
114
+ this.log(`Added ${missingAdapters.length} missing tool adapters`, 'OK');
115
+
116
+ // Update the config file with the new adapters
117
+ await fs.writeFile(
118
+ this.adaptersPath,
119
+ JSON.stringify({ tools: this.adapters }, null, 2),
120
+ 'utf8'
121
+ );
122
+ this.log(`Updated config with ${this.adapters.length} tool adapters`, 'OK');
123
+ }
124
+
103
125
  this.log(`Loaded ${this.adapters.length} tool adapters`, 'OK');
104
126
  } catch (error) {
105
127
  // Use default adapters if file doesn't exist