@kvell007/embed-labs-cli 0.1.0-alpha.20 → 0.1.0-alpha.21
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 +16 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1953,6 +1953,7 @@ async function cleanupLegacyCodexPluginRemnants(targetRoot) {
|
|
|
1953
1953
|
const legacyPaths = [
|
|
1954
1954
|
join(targetRoot, "dbt-agent"),
|
|
1955
1955
|
join(targetRoot, "development-board-toolchain"),
|
|
1956
|
+
join(targetRoot, "cache", CODEX_MARKETPLACE_NAME, CODEX_PLUGIN_NAME),
|
|
1956
1957
|
join(targetRoot, "cache", "embed-labs", "dbt-agent"),
|
|
1957
1958
|
join(targetRoot, "cache", "dbt-agent"),
|
|
1958
1959
|
join(targetRoot, "cache", "plugins", "dbt-agent")
|
|
@@ -2187,7 +2188,7 @@ function isLegacyEmbedLabsCodexMarketplaceConfigTable(table) {
|
|
|
2187
2188
|
function legacyCodexCleanupWarning(cleanup) {
|
|
2188
2189
|
const parts = [];
|
|
2189
2190
|
if (cleanup.legacy_removed_paths.length > 0) {
|
|
2190
|
-
parts.push(`removed ${cleanup.legacy_removed_paths.length} legacy Codex plugin path(s)`);
|
|
2191
|
+
parts.push(`removed ${cleanup.legacy_removed_paths.length} stale/legacy Codex plugin path(s)`);
|
|
2191
2192
|
}
|
|
2192
2193
|
if (cleanup.legacy_removed_config_tables?.length) {
|
|
2193
2194
|
parts.push(`removed ${cleanup.legacy_removed_config_tables.length} legacy Codex config table(s)`);
|
|
@@ -2201,7 +2202,7 @@ function legacyCodexCleanupWarning(cleanup) {
|
|
|
2201
2202
|
if (cleanup.warnings?.length) {
|
|
2202
2203
|
parts.push(`cleanup warning(s): ${cleanup.warnings.join("; ")}`);
|
|
2203
2204
|
}
|
|
2204
|
-
return parts.length > 0 ? `
|
|
2205
|
+
return parts.length > 0 ? `Codex plugin cleanup: ${parts.join(", ")}.` : undefined;
|
|
2205
2206
|
}
|
|
2206
2207
|
async function cleanupLegacyOpenCodePluginRemnants(targetRoot, globalInstall) {
|
|
2207
2208
|
const removedPaths = [];
|
|
@@ -2358,6 +2359,7 @@ async function maybeRegisterCodexMarketplace(parsed, targetRoot, targetPath) {
|
|
|
2358
2359
|
await rm(marketplacePluginPath, { recursive: true, force: true });
|
|
2359
2360
|
await mkdir(dirname(marketplacePluginPath), { recursive: true });
|
|
2360
2361
|
await cp(targetPath, marketplacePluginPath, { recursive: true });
|
|
2362
|
+
await refreshCodexPluginCache(targetPath);
|
|
2361
2363
|
await writeCodexLocalMarketplaceManifest(marketplacePath);
|
|
2362
2364
|
const warning = await upsertCodexPluginMarketplaceConfig(marketplacePath);
|
|
2363
2365
|
return warning ? { registered: true, marketplacePath, warning } : { registered: true, marketplacePath };
|
|
@@ -2373,6 +2375,18 @@ async function maybeRegisterCodexMarketplace(parsed, targetRoot, targetPath) {
|
|
|
2373
2375
|
function defaultCodexLocalMarketplaceRoot() {
|
|
2374
2376
|
return join(defaultCodexHome(), "local-marketplaces", CODEX_PLUGIN_NAME);
|
|
2375
2377
|
}
|
|
2378
|
+
async function refreshCodexPluginCache(targetPath) {
|
|
2379
|
+
const manifestPath = join(targetPath, ".codex-plugin", "plugin.json");
|
|
2380
|
+
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
|
2381
|
+
const version = typeof manifest.version === "string" && manifest.version.trim()
|
|
2382
|
+
? manifest.version.trim()
|
|
2383
|
+
: "local";
|
|
2384
|
+
const cachePluginRoot = join(defaultCodexPluginRoot(), "cache", CODEX_MARKETPLACE_NAME, CODEX_PLUGIN_NAME);
|
|
2385
|
+
const cacheVersionPath = join(cachePluginRoot, version);
|
|
2386
|
+
await rm(cachePluginRoot, { recursive: true, force: true });
|
|
2387
|
+
await mkdir(dirname(cacheVersionPath), { recursive: true });
|
|
2388
|
+
await cp(targetPath, cacheVersionPath, { recursive: true });
|
|
2389
|
+
}
|
|
2376
2390
|
async function writeCodexLocalMarketplaceManifest(marketplacePath) {
|
|
2377
2391
|
const manifestPath = join(marketplacePath, ".agents", "plugins", "marketplace.json");
|
|
2378
2392
|
const manifest = {
|