mimi-seed 0.15.4 → 0.15.6
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.
|
@@ -519,6 +519,48 @@ var CREDENTIALS = [
|
|
|
519
519
|
docsAnchor: "threads",
|
|
520
520
|
detect: (home, startDir) => detectProjectSocialToken(home, startDir, "threads")
|
|
521
521
|
},
|
|
522
|
+
{
|
|
523
|
+
id: "tiktok",
|
|
524
|
+
label: {
|
|
525
|
+
ko: "TikTok Business",
|
|
526
|
+
en: "TikTok Business"
|
|
527
|
+
},
|
|
528
|
+
requirement: "optional",
|
|
529
|
+
group: "marketing",
|
|
530
|
+
file: "~/.mimi-seed/tiktok-business.json",
|
|
531
|
+
fix: "mimi-seed auth tiktok",
|
|
532
|
+
setup: { kind: "mcp-bin", bin: "mimi-seed-tiktok-business-auth" },
|
|
533
|
+
obtain: {
|
|
534
|
+
ko: [
|
|
535
|
+
"TikTok for Business Developer \uC571\uC744 \uB9CC\uB4E4\uACE0 Organic API \uC811\uADFC \uC2B9\uC778\uC744 \uBC1B\uB294\uB2E4.",
|
|
536
|
+
"TikTok Accounts > Business Content > Video Publish \uAD8C\uD55C\uACFC account holder redirect URL\uC744 \uC124\uC815\uD55C\uB2E4.",
|
|
537
|
+
"owned Business Account\uB97C \uC2B9\uC778\uD55C callback URL\uC758 auth_code\uB97C \uC5F0\uACB0 \uB9C8\uBC95\uC0AC\uC5D0 \uC785\uB825\uD55C\uB2E4."
|
|
538
|
+
],
|
|
539
|
+
en: [
|
|
540
|
+
"Create a TikTok for Business developer app and obtain Organic API approval.",
|
|
541
|
+
"Enable TikTok Accounts > Business Content > Video Publish and configure the account-holder redirect URL.",
|
|
542
|
+
"Authorize the owned Business Account, then paste the callback auth_code into the setup wizard."
|
|
543
|
+
]
|
|
544
|
+
},
|
|
545
|
+
docsAnchor: "tiktok-business",
|
|
546
|
+
detect: (home) => {
|
|
547
|
+
const cfg = readJson(
|
|
548
|
+
home,
|
|
549
|
+
"tiktok-business.json"
|
|
550
|
+
);
|
|
551
|
+
if (!cfg?.openId || !cfg.refreshTokenExpiresAt) return { present: false };
|
|
552
|
+
const refreshRemaining = Date.parse(cfg.refreshTokenExpiresAt) - Date.now();
|
|
553
|
+
if (!Number.isFinite(refreshRemaining) || refreshRemaining <= 0) {
|
|
554
|
+
return { present: true, detail: cfg.openId, freshness: "expired", daysRemaining: 0 };
|
|
555
|
+
}
|
|
556
|
+
const accessRemaining = cfg.accessTokenExpiresAt ? Date.parse(cfg.accessTokenExpiresAt) - Date.now() : NaN;
|
|
557
|
+
const daysRemaining = Math.max(1, Math.ceil(refreshRemaining / 864e5));
|
|
558
|
+
if (Number.isFinite(accessRemaining) && accessRemaining <= 0) {
|
|
559
|
+
return { present: true, detail: `${cfg.openId} (access token \uC790\uB3D9 \uAC31\uC2E0 \uC608\uC815)`, freshness: "fresh", daysRemaining };
|
|
560
|
+
}
|
|
561
|
+
return { present: true, detail: cfg.openId, freshness: "fresh", daysRemaining };
|
|
562
|
+
}
|
|
563
|
+
},
|
|
522
564
|
{
|
|
523
565
|
id: "anthropic",
|
|
524
566
|
label: {
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
runMcpBin,
|
|
23
23
|
tryCredById,
|
|
24
24
|
writeConfig
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-OXYELVMI.js";
|
|
26
26
|
import {
|
|
27
27
|
catalog,
|
|
28
28
|
isLang,
|
|
@@ -973,6 +973,7 @@ ${kleur5.bold("\uBE4C\uB4DC / \uB9C8\uCF00\uD305:")}
|
|
|
973
973
|
${kleur5.cyan("mimi-seed auth facebook")} Facebook \uD398\uC774\uC9C0
|
|
974
974
|
${kleur5.cyan("mimi-seed auth instagram")} Instagram
|
|
975
975
|
${kleur5.cyan("mimi-seed auth threads")} Threads
|
|
976
|
+
${kleur5.cyan("mimi-seed auth tiktok")} TikTok Business Organic API
|
|
976
977
|
${kleur5.dim(" Instagram/Threads: --profile <id>\uB85C \uD2B9\uC815 \uC18C\uC15C \uD504\uB85C\uD544 \uC800\uC7A5/\uAC31\uC2E0")}
|
|
977
978
|
|
|
978
979
|
${kleur5.bold("\uC804\uCCB4 \uC0C1\uD0DC:")}
|
|
@@ -1012,6 +1013,7 @@ ${kleur5.bold("Build / marketing:")}
|
|
|
1012
1013
|
${kleur5.cyan("mimi-seed auth facebook")} Facebook Page
|
|
1013
1014
|
${kleur5.cyan("mimi-seed auth instagram")} Instagram
|
|
1014
1015
|
${kleur5.cyan("mimi-seed auth threads")} Threads
|
|
1016
|
+
${kleur5.cyan("mimi-seed auth tiktok")} TikTok Business Organic API
|
|
1015
1017
|
${kleur5.dim(" Instagram/Threads: use --profile <id> to save or refresh a named social profile")}
|
|
1016
1018
|
|
|
1017
1019
|
${kleur5.bold("Everything at a glance:")}
|
|
@@ -1064,8 +1066,9 @@ async function cmdAuth(args) {
|
|
|
1064
1066
|
if (sub === "facebook") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["facebook", ...rest]));
|
|
1065
1067
|
if (sub === "instagram") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["instagram", ...rest]));
|
|
1066
1068
|
if (sub === "threads") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["threads", ...rest]));
|
|
1069
|
+
if (sub === "tiktok") return void exitWith(await runMcpBin("mimi-seed-tiktok-business-auth", rest));
|
|
1067
1070
|
if (sub === "ci") {
|
|
1068
|
-
const { cmdSetup: cmdSetup2 } = await import("./setup-
|
|
1071
|
+
const { cmdSetup: cmdSetup2 } = await import("./setup-PEHGP5MD.js");
|
|
1069
1072
|
await cmdSetup2(["--only", "github,gitlab", "--reconnect", "github,gitlab"]);
|
|
1070
1073
|
return;
|
|
1071
1074
|
}
|
|
@@ -1163,10 +1166,17 @@ var M6 = catalog(
|
|
|
1163
1166
|
configLine: (cfg) => ` \uC124\uC815: ${cfg}`,
|
|
1164
1167
|
markerLine: (marker) => ` \uC2DD\uBCC4\uC790: ${marker}`,
|
|
1165
1168
|
noProcess: "\u26A0 \uC2E4\uD589 \uC911\uC778 \uD504\uB85C\uC138\uC2A4\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1169
|
+
codexNoProcessHint: " Codex\uC758 stdio transport\uAC00 \uC774\uBBF8 \uB2EB\uD614\uC2B5\uB2C8\uB2E4. \uC774 \uBA54\uC2DC\uC9C0\uB9CC\uC73C\uB85C \uC778\uC99D \uC2E4\uD328\uB97C \uB73B\uD558\uC9C0 \uC54A\uC73C\uBA70, \uC774 CLI\uC5D0\uC11C \uD604\uC7AC thread\uC5D0 \uB2E4\uC2DC \uBD99\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
1170
|
+
codexKilledHint: " \uD604\uC7AC Codex thread\uB294 \uC885\uB8CC\uD55C stdio \uC11C\uBC84\uC5D0 \uB2E4\uC2DC \uBD99\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0C8 thread\uB97C \uC2DC\uC791\uD558\uAC70\uB098 Codex\uB97C \uB2E4\uC2DC \uC5EC\uC138\uC694.",
|
|
1171
|
+
codexVerify: " \uD655\uC778: \uC0C8 Codex thread\uC5D0\uC11C mimi_seed_status \uD638\uCD9C",
|
|
1172
|
+
claudeNoProcessHint: " \uC774\uBBF8 \uC885\uB8CC\uB410\uAC70\uB098, Claude Code\uAC00 \uC544\uC9C1 \uC11C\uBC84\uB97C \uC2DC\uC791\uD558\uC9C0 \uC54A\uC740 \uC0C1\uD0DC\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
1173
|
+
claudeKilledHint: " Claude Code\uAC00 \uB2E4\uC74C \uB3C4\uAD6C \uD638\uCD9C \uC2DC \uC790\uB3D9\uC73C\uB85C \uC7AC\uC5F0\uACB0\uD569\uB2C8\uB2E4.",
|
|
1174
|
+
claudeVerify: " \uC5F0\uACB0 \uD655\uC778: Claude Code\uC5D0\uC11C /mcp \uC2E4\uD589",
|
|
1175
|
+
genericNoProcessHint: " stdio transport\uAC00 \uC774\uBBF8 \uB2EB\uD614\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. MCP \uD074\uB77C\uC774\uC5B8\uD2B8\uB97C \uB2E4\uC2DC \uC5F4\uC5B4 \uC5F0\uACB0\uD558\uC138\uC694.",
|
|
1176
|
+
genericKilledHint: " stdio \uC11C\uBC84\uB294 MCP \uD074\uB77C\uC774\uC5B8\uD2B8\uAC00 \uC18C\uC720\uD569\uB2C8\uB2E4. \uD074\uB77C\uC774\uC5B8\uD2B8\uB97C \uB2E4\uC2DC \uC5F4\uC5B4 \uC5F0\uACB0\uD558\uC138\uC694.",
|
|
1177
|
+
genericVerify: " \uC5F0\uACB0 \uD655\uC778: \uC0C8 \uC138\uC158\uC5D0\uC11C mimi_seed_status \uD638\uCD9C",
|
|
1178
|
+
unknownWriteOutcome: " \uC9C1\uC804 \uD638\uCD9C\uC774 \uC5C5\uB85C\uB4DC\xB7\uAC8C\uC2DC \uAC19\uC740 \uC4F0\uAE30\uC600\uB2E4\uBA74 \uACB0\uACFC\uAC00 \uBD88\uBA85\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB300\uC0C1 \uC11C\uBE44\uC2A4\uC5D0\uC11C \uC2E4\uC81C \uBC18\uC601 \uC5EC\uBD80\uB97C \uD655\uC778\uD55C \uB4A4 \uC7AC\uC2DC\uB3C4\uD558\uC138\uC694.",
|
|
1179
|
+
killed: (server, n) => `\u2713 ${server} \uC885\uB8CC\uB428 (${n}\uAC1C \uD504\uB85C\uC138\uC2A4)`
|
|
1170
1180
|
},
|
|
1171
1181
|
{
|
|
1172
1182
|
killedPid: (pid) => ` PID ${pid} killed`,
|
|
@@ -1182,10 +1192,17 @@ var M6 = catalog(
|
|
|
1182
1192
|
configLine: (cfg) => ` Config: ${cfg}`,
|
|
1183
1193
|
markerLine: (marker) => ` Marker: ${marker}`,
|
|
1184
1194
|
noProcess: "\u26A0 No running process found.",
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1195
|
+
codexNoProcessHint: " The Codex stdio transport is already closed. This message alone does not prove an auth failure, and this CLI cannot reattach the current thread.",
|
|
1196
|
+
codexKilledHint: " The current Codex thread cannot reattach to the terminated stdio server. Start a new thread or reopen Codex.",
|
|
1197
|
+
codexVerify: " Verify: call mimi_seed_status in a new Codex thread",
|
|
1198
|
+
claudeNoProcessHint: " It may have already exited, or Claude Code may not have started the server yet.",
|
|
1199
|
+
claudeKilledHint: " Claude Code will reconnect automatically on the next tool call.",
|
|
1200
|
+
claudeVerify: " Verify the connection: run /mcp in Claude Code",
|
|
1201
|
+
genericNoProcessHint: " The stdio transport may already be closed. Reopen the MCP client to reconnect.",
|
|
1202
|
+
genericKilledHint: " The MCP client owns the stdio server. Reopen the client to reconnect.",
|
|
1203
|
+
genericVerify: " Verify: call mimi_seed_status in a new session",
|
|
1204
|
+
unknownWriteOutcome: " If the previous call was a write such as an upload or publish, its outcome may be unknown. Check the target service before retrying.",
|
|
1205
|
+
killed: (server, n) => `\u2713 ${server} killed (${n} process(es))`
|
|
1189
1206
|
}
|
|
1190
1207
|
);
|
|
1191
1208
|
function readJson(filePath) {
|
|
@@ -1195,6 +1212,30 @@ function readJson(filePath) {
|
|
|
1195
1212
|
return {};
|
|
1196
1213
|
}
|
|
1197
1214
|
}
|
|
1215
|
+
var BUILTIN_MIMI_SEED_SERVER = {
|
|
1216
|
+
command: "npx",
|
|
1217
|
+
args: ["-y", "@yoonion/mimi-seed-mcp"]
|
|
1218
|
+
};
|
|
1219
|
+
function detectMcpClient(env = process.env) {
|
|
1220
|
+
if (env.CODEX_THREAD_ID || env.CODEX_CI || env.CODEX_INTERNAL_ORIGINATOR_OVERRIDE) return "codex";
|
|
1221
|
+
if (env.CLAUDECODE || env.CLAUDE_CODE || env.CLAUDE_CODE_ENTRYPOINT) return "claude-code";
|
|
1222
|
+
return "unknown";
|
|
1223
|
+
}
|
|
1224
|
+
function recoveryMessages(client, killed) {
|
|
1225
|
+
const m = M6();
|
|
1226
|
+
if (client === "codex") {
|
|
1227
|
+
return { hint: killed ? m.codexKilledHint : m.codexNoProcessHint, verify: m.codexVerify };
|
|
1228
|
+
}
|
|
1229
|
+
if (client === "claude-code") {
|
|
1230
|
+
return { hint: killed ? m.claudeKilledHint : m.claudeNoProcessHint, verify: m.claudeVerify };
|
|
1231
|
+
}
|
|
1232
|
+
return { hint: killed ? m.genericKilledHint : m.genericNoProcessHint, verify: m.genericVerify };
|
|
1233
|
+
}
|
|
1234
|
+
function resolveServerConfig(servers, serverName) {
|
|
1235
|
+
const configured = servers[serverName];
|
|
1236
|
+
if (configured) return configured;
|
|
1237
|
+
return serverName === "mimi-seed" ? BUILTIN_MIMI_SEED_SERVER : void 0;
|
|
1238
|
+
}
|
|
1198
1239
|
function collectServers() {
|
|
1199
1240
|
const servers = {};
|
|
1200
1241
|
const sources = [];
|
|
@@ -1296,7 +1337,7 @@ async function cmdRestart(args) {
|
|
|
1296
1337
|
log3(kleur7.bold(M6().title(serverName)));
|
|
1297
1338
|
log3("");
|
|
1298
1339
|
const { servers, sources } = collectServers();
|
|
1299
|
-
const cfg = servers
|
|
1340
|
+
const cfg = resolveServerConfig(servers, serverName);
|
|
1300
1341
|
if (!cfg) {
|
|
1301
1342
|
const names = Object.keys(servers);
|
|
1302
1343
|
const available = names.length ? names.join(", ") : M6().none;
|
|
@@ -1319,16 +1360,18 @@ async function cmdRestart(args) {
|
|
|
1319
1360
|
}
|
|
1320
1361
|
log3(kleur7.dim(M6().markerLine(marker)));
|
|
1321
1362
|
const { killed } = killByMarkers(markers);
|
|
1363
|
+
const recovery = recoveryMessages(detectMcpClient(), killed > 0);
|
|
1322
1364
|
if (killed === 0) {
|
|
1323
1365
|
log3(kleur7.yellow(M6().noProcess));
|
|
1324
|
-
log3(kleur7.dim(
|
|
1366
|
+
log3(kleur7.dim(recovery.hint));
|
|
1367
|
+
log3(kleur7.yellow(M6().unknownWriteOutcome));
|
|
1325
1368
|
} else {
|
|
1326
1369
|
log3("");
|
|
1327
1370
|
log3(kleur7.green(M6().killed(serverName, killed)));
|
|
1328
|
-
log3(kleur7.dim(
|
|
1371
|
+
log3(kleur7.dim(recovery.hint));
|
|
1329
1372
|
}
|
|
1330
1373
|
log3("");
|
|
1331
|
-
log3(kleur7.cyan(
|
|
1374
|
+
log3(kleur7.cyan(recovery.verify));
|
|
1332
1375
|
}
|
|
1333
1376
|
|
|
1334
1377
|
// src/mcp-config.ts
|
package/package.json
CHANGED