@rbbtsn0w/adg 0.11.0-dev.pr167.b948f1c → 0.11.1-beta.1
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/src/agents/codex.js +17 -13
- package/package.json +1 -1
package/dist/src/agents/codex.js
CHANGED
|
@@ -392,19 +392,23 @@ export function parseCodexInspection(out, marketplace) {
|
|
|
392
392
|
if (!Array.isArray(available))
|
|
393
393
|
return undefined;
|
|
394
394
|
const records = new Map();
|
|
395
|
-
for (const
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
395
|
+
for (const [entries, installed] of [[parsed.installed, true], [available, false]]) {
|
|
396
|
+
for (const record of entries) {
|
|
397
|
+
if (!record || typeof record !== "object" || Array.isArray(record) || typeof record.marketplaceName !== "string")
|
|
398
|
+
return undefined;
|
|
399
|
+
if (record.marketplaceName !== marketplace)
|
|
400
|
+
continue;
|
|
401
|
+
if (record.installed !== installed)
|
|
402
|
+
return undefined;
|
|
403
|
+
if (typeof record.name !== "string" || !record.name.trim() || record.pluginId !== `${record.name}@${marketplace}` || typeof record.installed !== "boolean" || typeof record.enabled !== "boolean" || (record.enabled && !record.installed))
|
|
404
|
+
return undefined;
|
|
405
|
+
if (record.version != null && (typeof record.version !== "string" || !record.version.trim()))
|
|
406
|
+
return undefined;
|
|
407
|
+
if (records.has(record.name))
|
|
408
|
+
return undefined;
|
|
409
|
+
records.set(record.name, { id: record.pluginId, name: record.name, installed: record.installed, enabled: record.enabled,
|
|
410
|
+
...(typeof record.version === "string" ? { version: record.version } : {}) });
|
|
411
|
+
}
|
|
408
412
|
}
|
|
409
413
|
return [...records.values()];
|
|
410
414
|
}
|