@kvell007/embed-labs-cli 0.1.0-alpha.91 → 0.1.0-alpha.93
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/README.md +1 -1
- package/dist/embed-labs-mcp-bridge.mjs +15 -9
- package/dist/index.js +20 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -640,7 +640,7 @@ const tools = [
|
|
|
640
640
|
},
|
|
641
641
|
{
|
|
642
642
|
name: "dbt_plugin_update_check",
|
|
643
|
-
description: "Check the published Embed Labs Codex/OpenCode plugin release and report whether the local plugins should be updated.",
|
|
643
|
+
description: "Check the published Embed Labs Codex/OpenCode/Trae plugin release and report whether the local plugins should be updated.",
|
|
644
644
|
inputSchema: {
|
|
645
645
|
type: "object",
|
|
646
646
|
properties: {
|
|
@@ -650,25 +650,29 @@ const tools = [
|
|
|
650
650
|
codex_target: { type: "string" },
|
|
651
651
|
codexTarget: { type: "string" },
|
|
652
652
|
opencode_target: { type: "string" },
|
|
653
|
-
opencodeTarget: { type: "string" }
|
|
653
|
+
opencodeTarget: { type: "string" },
|
|
654
|
+
trae_target: { type: "string" },
|
|
655
|
+
traeTarget: { type: "string" }
|
|
654
656
|
}
|
|
655
657
|
}
|
|
656
658
|
},
|
|
657
659
|
{
|
|
658
660
|
name: "dbt_plugin_update",
|
|
659
|
-
description: "Update the local Embed Labs Codex/OpenCode plugin installation from the published release. Restart
|
|
661
|
+
description: "Update the local Embed Labs Codex/OpenCode/Trae plugin installation from the published release. Restart the updated client after this finishes.",
|
|
660
662
|
inputSchema: {
|
|
661
663
|
type: "object",
|
|
662
664
|
properties: {
|
|
663
|
-
target_plugin: { type: "string", enum: ["codex", "opencode", "all"] },
|
|
664
|
-
plugin: { type: "string", enum: ["codex", "opencode", "all"] },
|
|
665
|
+
target_plugin: { type: "string", enum: ["codex", "opencode", "trae", "all"] },
|
|
666
|
+
plugin: { type: "string", enum: ["codex", "opencode", "trae", "all"] },
|
|
665
667
|
release_url: { type: "string" },
|
|
666
668
|
releaseUrl: { type: "string" },
|
|
667
669
|
target: { type: "string" },
|
|
668
670
|
codex_target: { type: "string" },
|
|
669
671
|
codexTarget: { type: "string" },
|
|
670
672
|
opencode_target: { type: "string" },
|
|
671
|
-
opencodeTarget: { type: "string" }
|
|
673
|
+
opencodeTarget: { type: "string" },
|
|
674
|
+
trae_target: { type: "string" },
|
|
675
|
+
traeTarget: { type: "string" }
|
|
672
676
|
}
|
|
673
677
|
}
|
|
674
678
|
},
|
|
@@ -1080,7 +1084,7 @@ function authNotReadyResult(status) {
|
|
|
1080
1084
|
"2. Create or copy your Embed Labs API Token.",
|
|
1081
1085
|
"3. Update the local CLI, then run: embedlabs auth login --token <your_token>",
|
|
1082
1086
|
"4. Verify device binding with: embedlabs auth device status",
|
|
1083
|
-
"5. Restart Codex/OpenCode so the plugin picks up the refreshed CLI and auth file."
|
|
1087
|
+
"5. Restart Codex/OpenCode/Trae so the plugin picks up the refreshed CLI and auth file."
|
|
1084
1088
|
].join("\n"),
|
|
1085
1089
|
details: {
|
|
1086
1090
|
dashboard_url: "https://api.embedboard.com/dashboard",
|
|
@@ -3063,19 +3067,21 @@ async function pluginUpdateCheck(args) {
|
|
|
3063
3067
|
pushOptional(command, "target", args.target);
|
|
3064
3068
|
pushOptional(command, "codex-target", args.codex_target || args.codexTarget);
|
|
3065
3069
|
pushOptional(command, "opencode-target", args.opencode_target || args.opencodeTarget);
|
|
3070
|
+
pushOptional(command, "trae-target", args.trae_target || args.traeTarget);
|
|
3066
3071
|
return await runEmbed(command);
|
|
3067
3072
|
}
|
|
3068
3073
|
|
|
3069
3074
|
async function pluginUpdate(args) {
|
|
3070
3075
|
const target = asString(args.target_plugin || args.plugin || "all").toLowerCase();
|
|
3071
|
-
if (!["codex", "opencode", "all"].includes(target)) {
|
|
3072
|
-
throw new Error("target_plugin must be codex, opencode, or all");
|
|
3076
|
+
if (!["codex", "opencode", "trae", "all"].includes(target)) {
|
|
3077
|
+
throw new Error("target_plugin must be codex, opencode, trae, or all");
|
|
3073
3078
|
}
|
|
3074
3079
|
const command = ["plugin", "update", target];
|
|
3075
3080
|
pushOptional(command, "release-url", args.release_url || args.releaseUrl);
|
|
3076
3081
|
pushOptional(command, "target", args.target);
|
|
3077
3082
|
pushOptional(command, "codex-target", args.codex_target || args.codexTarget);
|
|
3078
3083
|
pushOptional(command, "opencode-target", args.opencode_target || args.opencodeTarget);
|
|
3084
|
+
pushOptional(command, "trae-target", args.trae_target || args.traeTarget);
|
|
3079
3085
|
return await runEmbed(command);
|
|
3080
3086
|
}
|
|
3081
3087
|
|
package/dist/index.js
CHANGED
|
@@ -45,7 +45,7 @@ const LEGACY_CODEX_PLUGIN_NAMES = [
|
|
|
45
45
|
const LEGACY_CODEX_MARKETPLACE_NAMES = new Set(["embed-labs-plugins", "plugins", "Plugins", "deve"]);
|
|
46
46
|
const PLUGIN_INSTALL_USAGE = "Usage: embed plugin install <codex|opencode|trae|all> [--release-dir <dir>] [--release-url <url>] [--target <dir>] [--codex-target <dir>] [--opencode-target <dir>] [--trae-target <dir>] [--force] [--json]";
|
|
47
47
|
const PLUGIN_UPDATE_CHECK_USAGE = "Usage: embed plugin update check [--release-url <url>] [--target <dir>] [--codex-target <dir>] [--opencode-target <dir>] [--json]";
|
|
48
|
-
const PLUGIN_UPDATE_USAGE = "Usage: embed plugin update
|
|
48
|
+
const PLUGIN_UPDATE_USAGE = "Usage: embed plugin update [codex|opencode|trae|all] [--release-url <url>] [--target <dir>] [--codex-target <dir>] [--opencode-target <dir>] [--trae-target <dir>] [--json]";
|
|
49
49
|
const CLOUD_TASK_ARTIFACTS_USAGE = "Usage: embed cloud task artifacts <task_id> [--json]";
|
|
50
50
|
const CLOUD_TASK_EVIDENCE_USAGE = "Usage: embed cloud task evidence <task_id> [--json]";
|
|
51
51
|
const ARTIFACT_STATUS_USAGE = "Usage: embed artifact status <artifact_id> [--json]";
|
|
@@ -343,7 +343,7 @@ async function main(argv) {
|
|
|
343
343
|
const result = await pluginUpdateCheck(parsed);
|
|
344
344
|
return output(parsed, result, renderPluginUpdateCheck, result.ok ? 0 : 2);
|
|
345
345
|
}
|
|
346
|
-
if (["codex", "opencode", "trae", "all"].includes(parsed.command[2]
|
|
346
|
+
if (!parsed.command[2] || ["codex", "opencode", "trae", "all"].includes(parsed.command[2])) {
|
|
347
347
|
const result = await pluginUpdate(parsed);
|
|
348
348
|
return output(parsed, result, renderPluginInstall, result.ok ? 0 : 2);
|
|
349
349
|
}
|
|
@@ -1948,7 +1948,7 @@ async function pluginInstall(parsed) {
|
|
|
1948
1948
|
installed.push(installedOpenCode.data);
|
|
1949
1949
|
}
|
|
1950
1950
|
if (target === "trae" || target === "all") {
|
|
1951
|
-
const installedTrae = await installTraeMcpIntegration(parsed, installingAll);
|
|
1951
|
+
const installedTrae = await installTraeMcpIntegration(parsed, installingAll, manifest?.data);
|
|
1952
1952
|
if (!installedTrae.ok) {
|
|
1953
1953
|
return installedTrae;
|
|
1954
1954
|
}
|
|
@@ -1978,6 +1978,7 @@ async function pluginUpdateCheck(parsed) {
|
|
|
1978
1978
|
const opencodePackage = manifest.packages?.find((item) => item.id === "opencode-embed-labs");
|
|
1979
1979
|
const codexTarget = join(codexPluginTargetRoot(parsed, true), CODEX_PLUGIN_NAME);
|
|
1980
1980
|
const openCodeTarget = openCodePluginTargetRoot(parsed, true);
|
|
1981
|
+
const traeTarget = traePluginTargetRoot(parsed, true);
|
|
1981
1982
|
return ok({
|
|
1982
1983
|
release_url: pluginReleaseBaseUrl(parsed),
|
|
1983
1984
|
latest_version: manifest.version,
|
|
@@ -2004,8 +2005,8 @@ async function pluginUpdateCheck(parsed) {
|
|
|
2004
2005
|
await pluginUpdateItem({
|
|
2005
2006
|
id: "trae",
|
|
2006
2007
|
displayName: "Embed Labs Trae MCP integration",
|
|
2007
|
-
targetPath:
|
|
2008
|
-
installedVersion:
|
|
2008
|
+
targetPath: traeTarget,
|
|
2009
|
+
installedVersion: await installedTraePluginVersion(traeTarget),
|
|
2009
2010
|
latestVersion: manifest.version,
|
|
2010
2011
|
updateCommand: "embedlabs plugin update trae"
|
|
2011
2012
|
})
|
|
@@ -2025,8 +2026,8 @@ async function pluginUpdate(parsed) {
|
|
|
2025
2026
|
if (unknownFlag) {
|
|
2026
2027
|
return fail("invalid_args", `Unknown flag --${unknownFlag}. ${PLUGIN_UPDATE_USAGE}`);
|
|
2027
2028
|
}
|
|
2028
|
-
const target = parsed.command[2];
|
|
2029
|
-
if (!
|
|
2029
|
+
const target = parsed.command[2] ?? "all";
|
|
2030
|
+
if (!["codex", "opencode", "trae", "all"].includes(target)) {
|
|
2030
2031
|
return fail("invalid_args", PLUGIN_UPDATE_USAGE);
|
|
2031
2032
|
}
|
|
2032
2033
|
const unexpected = parsed.command.slice(3);
|
|
@@ -2058,7 +2059,7 @@ async function pluginUpdateItem(input) {
|
|
|
2058
2059
|
notes.push("Plugin is not installed in the selected target.");
|
|
2059
2060
|
}
|
|
2060
2061
|
else if (updateAvailable) {
|
|
2061
|
-
notes.push("A newer plugin release is available. Run the update command, then restart
|
|
2062
|
+
notes.push("A newer plugin release is available. Run the update command, then restart the updated client.");
|
|
2062
2063
|
}
|
|
2063
2064
|
else if (versionOrder > 0) {
|
|
2064
2065
|
notes.push("Installed plugin is newer than the selected release channel; no update is needed.");
|
|
@@ -2192,7 +2193,7 @@ async function installOpenCodePlugin(parsed, context) {
|
|
|
2192
2193
|
cleanup: legacyCleanup
|
|
2193
2194
|
});
|
|
2194
2195
|
}
|
|
2195
|
-
async function installTraeMcpIntegration(parsed, installingAll) {
|
|
2196
|
+
async function installTraeMcpIntegration(parsed, installingAll, manifest) {
|
|
2196
2197
|
const targetRoot = traePluginTargetRoot(parsed, installingAll);
|
|
2197
2198
|
const configPath = join(targetRoot, "mcp.json");
|
|
2198
2199
|
const cacheRoot = join(targetRoot, "globalStorage", ".mcp_gallery_cache");
|
|
@@ -2208,7 +2209,8 @@ async function installTraeMcpIntegration(parsed, installingAll) {
|
|
|
2208
2209
|
await cp(iconSource, iconPath);
|
|
2209
2210
|
const launcher = await resolveEmbedCliMcpLauncher(process.env.EMBED_CLI_BIN?.trim() || await resolveExecutableOnPath("embedlabs") || await resolveExecutableOnPath("embed") || "");
|
|
2210
2211
|
const cloudUrl = pluginMcpCloudApiUrl(parsed);
|
|
2211
|
-
const
|
|
2212
|
+
const version = manifest?.version ?? await localPluginVersion("codex") ?? EMBED_CLIENT_VERSION;
|
|
2213
|
+
const gallery = traeGalleryMetadata(galleryId, iconPath, launcher, cloudUrl, version);
|
|
2212
2214
|
const galleryPath = join(cacheRoot, `${galleryId}.json`);
|
|
2213
2215
|
await writeFile(galleryPath, `${JSON.stringify(gallery, null, 2)}\n`, "utf8");
|
|
2214
2216
|
await mkdir(targetRoot, { recursive: true });
|
|
@@ -2250,7 +2252,7 @@ async function resolveEmbedLabsIconForTrae() {
|
|
|
2250
2252
|
}
|
|
2251
2253
|
return undefined;
|
|
2252
2254
|
}
|
|
2253
|
-
function traeGalleryMetadata(galleryId, iconPath, launcher, cloudUrl) {
|
|
2255
|
+
function traeGalleryMetadata(galleryId, iconPath, launcher, cloudUrl, version) {
|
|
2254
2256
|
return {
|
|
2255
2257
|
id: galleryId,
|
|
2256
2258
|
name: "embed-labs",
|
|
@@ -2275,7 +2277,7 @@ function traeGalleryMetadata(galleryId, iconPath, launcher, cloudUrl) {
|
|
|
2275
2277
|
]
|
|
2276
2278
|
}
|
|
2277
2279
|
},
|
|
2278
|
-
version
|
|
2280
|
+
version,
|
|
2279
2281
|
repository: "https://github.com/kkwell/Embed-Labs-Cloud",
|
|
2280
2282
|
mcpServerType: "stdio",
|
|
2281
2283
|
categories: ["开发者工具"],
|
|
@@ -3624,6 +3626,10 @@ async function installedCodexPluginVersion(pluginPath) {
|
|
|
3624
3626
|
async function installedOpenCodePluginVersion(targetRoot) {
|
|
3625
3627
|
return await readPackageVersion(join(targetRoot, "node_modules", "embed-labs", "package.json"));
|
|
3626
3628
|
}
|
|
3629
|
+
async function installedTraePluginVersion(targetRoot) {
|
|
3630
|
+
const galleryPath = join(targetRoot, "globalStorage", ".mcp_gallery_cache", "local.embed-labs.mcp_server.json");
|
|
3631
|
+
return await readPackageVersion(galleryPath);
|
|
3632
|
+
}
|
|
3627
3633
|
async function readPackageVersion(filePath) {
|
|
3628
3634
|
try {
|
|
3629
3635
|
const parsed = JSON.parse(await readFile(filePath, "utf8"));
|
|
@@ -8792,7 +8798,7 @@ Install local AI client plugins explicitly:
|
|
|
8792
8798
|
embedlabs plugin install opencode
|
|
8793
8799
|
embedlabs plugin install trae
|
|
8794
8800
|
embedlabs plugin update check
|
|
8795
|
-
embedlabs plugin update
|
|
8801
|
+
embedlabs plugin update
|
|
8796
8802
|
|
|
8797
8803
|
For Trae, restart Trae after install. The installer writes mcp.json and a local
|
|
8798
8804
|
Gallery cache entry so the Embed Labs MCP icon can appear in Trae builds that
|
|
@@ -8863,7 +8869,7 @@ Usage:
|
|
|
8863
8869
|
embed plugin list [--release-dir <dir>] [--release-url <url>] [--json]
|
|
8864
8870
|
embed plugin install <codex|opencode|trae|all> [--release-dir <dir>] [--release-url <url>] [--target <dir>] [--codex-target <dir>] [--opencode-target <dir>] [--trae-target <dir>] [--force] [--json]
|
|
8865
8871
|
embed plugin update check [--release-url <url>] [--target <dir>] [--codex-target <dir>] [--opencode-target <dir>] [--trae-target <dir>] [--json]
|
|
8866
|
-
embed plugin update
|
|
8872
|
+
embed plugin update [codex|opencode|trae|all] [--release-url <url>] [--target <dir>] [--codex-target <dir>] [--opencode-target <dir>] [--trae-target <dir>] [--json]
|
|
8867
8873
|
embed service modes [--json]
|
|
8868
8874
|
embed model list [--json]
|
|
8869
8875
|
embed model default [--json]
|