@mkterswingman/5mghost-yonder 0.0.36 → 0.0.37
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/cli/setup.js +25 -4
- package/dist/cli/uninstall.js +1 -0
- package/dist/utils/openClaw.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ powershell -ExecutionPolicy Bypass -File .\scripts\install.ps1
|
|
|
40
40
|
Client registration notes:
|
|
41
41
|
|
|
42
42
|
- `setup` auto-registers Claude/Codex/Gemini/OpenCode when their CLI supports `mcp add`
|
|
43
|
-
- OpenClaw is registered
|
|
43
|
+
- OpenClaw is registered via `mcporter config add --command ... --arg ...` (native stdio mode)
|
|
44
44
|
- pasted PAT tokens are stored in `~/.mkterswingman/auth.json`; client `env.YT_MCP_TOKEN` is optional after setup
|
|
45
45
|
|
|
46
46
|
Media download runtime expectations:
|
package/dist/cli/setup.js
CHANGED
|
@@ -51,6 +51,13 @@ function tryRegisterMcp(cmd, label) {
|
|
|
51
51
|
return false;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
function buildMcporterConfigAddCommand(launcherCommand) {
|
|
55
|
+
const args = ["config", "add", "yt-mcp", "--command", launcherCommand.file];
|
|
56
|
+
for (const arg of launcherCommand.args) {
|
|
57
|
+
args.push("--arg", arg);
|
|
58
|
+
}
|
|
59
|
+
return { file: "mcporter", args };
|
|
60
|
+
}
|
|
54
61
|
export function buildSetupCliCandidates(launcherCommand) {
|
|
55
62
|
return [
|
|
56
63
|
{ bin: "claude-internal", label: "Claude Code (internal)", command: { file: "claude-internal", args: ["mcp", "add", "-s", "user", "yt-mcp", "--", launcherCommand.file, ...launcherCommand.args] } },
|
|
@@ -370,10 +377,22 @@ export async function runSetup() {
|
|
|
370
377
|
}
|
|
371
378
|
if (isOpenClawInstallLikelyInstalled(detectCli)) {
|
|
372
379
|
try {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
380
|
+
let openClawRegistered = false;
|
|
381
|
+
if (detectCli("mcporter")) {
|
|
382
|
+
openClawRegistered = tryRegisterMcp(buildMcporterConfigAddCommand({
|
|
383
|
+
file: launcherCommand.command,
|
|
384
|
+
args: launcherCommand.args,
|
|
385
|
+
}), "OpenClaw (mcporter config)");
|
|
386
|
+
}
|
|
387
|
+
if (!openClawRegistered) {
|
|
388
|
+
const status = writeOpenClawConfig("yt-mcp", launcherCommand);
|
|
389
|
+
const suffix = status === "created" ? "created" : "updated";
|
|
390
|
+
console.log(` ✅ MCP registered in OpenClaw (${suffix} ${getOpenClawConfigPath()})`);
|
|
391
|
+
openClawRegistered = true;
|
|
392
|
+
}
|
|
393
|
+
if (openClawRegistered) {
|
|
394
|
+
registered = true;
|
|
395
|
+
}
|
|
377
396
|
}
|
|
378
397
|
catch (err) {
|
|
379
398
|
console.log(` ⚠️ OpenClaw auto-register failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -427,6 +446,8 @@ export async function runSetup() {
|
|
|
427
446
|
}
|
|
428
447
|
}
|
|
429
448
|
`);
|
|
449
|
+
console.log(" OpenClaw stdio CLI (recommended):");
|
|
450
|
+
console.log(` mcporter config add yt-mcp --command node --arg ${JSON.stringify(PATHS.launcherJs)} --arg serve`);
|
|
430
451
|
console.log(` OpenClaw uses ${PATHS.sharedAuthJson} for PAT/JWT, so env.YT_MCP_TOKEN is optional after setup.`);
|
|
431
452
|
if (skillsInstalled) {
|
|
432
453
|
console.log(" ✅ Installed bundled yt-mcp analysis skill for detected AI clients");
|
package/dist/cli/uninstall.js
CHANGED
|
@@ -33,6 +33,7 @@ function tryRemoveMcp(command, label) {
|
|
|
33
33
|
}
|
|
34
34
|
export function buildUninstallCliCandidates() {
|
|
35
35
|
return [
|
|
36
|
+
{ bin: "mcporter", label: "OpenClaw (mcporter config)", command: { file: "mcporter", args: ["config", "remove", "yt-mcp"] } },
|
|
36
37
|
{ bin: "claude-internal", label: "Claude Code (internal)", command: { file: "claude-internal", args: ["mcp", "remove", "-s", "user", "yt-mcp"] } },
|
|
37
38
|
{ bin: "claude", label: "Claude Code", command: { file: "claude", args: ["mcp", "remove", "-s", "user", "yt-mcp"] } },
|
|
38
39
|
{ bin: "codex", label: "Codex CLI / Codex App", command: { file: "codex", args: ["mcp", "remove", "yt-mcp"] } },
|
package/dist/utils/openClaw.js
CHANGED
|
@@ -19,7 +19,7 @@ function parseOpenClawConfig(raw) {
|
|
|
19
19
|
if (parsed && typeof parsed === "object") {
|
|
20
20
|
return parsed;
|
|
21
21
|
}
|
|
22
|
-
throw new Error("OpenClaw
|
|
22
|
+
throw new Error("OpenClaw config must be a JSON object");
|
|
23
23
|
}
|
|
24
24
|
export function upsertOpenClawConfigText(currentText, serverName, launcherCommand) {
|
|
25
25
|
const config = currentText ? parseOpenClawConfig(currentText) : {};
|