polydev-ai 1.8.95 → 1.8.96
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/lib/cliManager.js +14 -0
- package/mcp/stdio-wrapper.js +1 -1
- package/package.json +1 -1
package/lib/cliManager.js
CHANGED
|
@@ -156,6 +156,20 @@ class CLIManager {
|
|
|
156
156
|
return (now - checked) < this.CACHE_TIMEOUT_MS;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
/**
|
|
160
|
+
* Get all cached CLI statuses (synchronous)
|
|
161
|
+
* Returns empty object if no statuses cached
|
|
162
|
+
*/
|
|
163
|
+
getCachedStatus() {
|
|
164
|
+
const result = {};
|
|
165
|
+
for (const [providerId, status] of this.statusCache.entries()) {
|
|
166
|
+
if (this.isCacheValid(status)) {
|
|
167
|
+
result[providerId] = status;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return result;
|
|
171
|
+
}
|
|
172
|
+
|
|
159
173
|
async detectCliProvider(provider) {
|
|
160
174
|
try {
|
|
161
175
|
const cliPath = await this.findCliPath(provider.command);
|
package/mcp/stdio-wrapper.js
CHANGED