mimi-seed 0.25.2 → 0.25.4
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 +4 -4
- package/dist/{chunk-IVF5QROQ.js → chunk-TKIQC6RE.js} +158 -44
- package/dist/index.js +413 -404
- package/dist/{setup-FINSBY6F.js → setup-QETGLQDD.js} +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
cmdDeploy,
|
|
11
11
|
cmdSetup,
|
|
12
12
|
cmdTelemetry,
|
|
13
|
+
consoleBase,
|
|
14
|
+
consoleBaseProblem,
|
|
13
15
|
credLabel,
|
|
14
16
|
credNote,
|
|
15
17
|
credentialFileProblemMessage,
|
|
@@ -45,7 +47,7 @@ import {
|
|
|
45
47
|
writeConfig,
|
|
46
48
|
writeCredentialFile,
|
|
47
49
|
writeSettings
|
|
48
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-TKIQC6RE.js";
|
|
49
51
|
|
|
50
52
|
// src/index.ts
|
|
51
53
|
import kleur12 from "kleur";
|
|
@@ -106,7 +108,7 @@ async function mcpCall(endpoint, token, name, args, options = {}) {
|
|
|
106
108
|
import os2 from "os";
|
|
107
109
|
import fs3 from "fs";
|
|
108
110
|
import path3 from "path";
|
|
109
|
-
import
|
|
111
|
+
import kleur2 from "kleur";
|
|
110
112
|
import open from "open";
|
|
111
113
|
|
|
112
114
|
// src/handshake.ts
|
|
@@ -173,174 +175,15 @@ async function awaitHandshake(timeoutMs) {
|
|
|
173
175
|
return { port, promise };
|
|
174
176
|
}
|
|
175
177
|
|
|
176
|
-
// src/auth.ts
|
|
177
|
-
import kleur from "kleur";
|
|
178
|
-
function log(msg) {
|
|
179
|
-
process.stdout.write(msg + "\n");
|
|
180
|
-
}
|
|
181
|
-
var M3 = catalog(
|
|
182
|
-
{
|
|
183
|
-
help: `${kleur.bold("mimi-seed auth")} \u2014 \uB85C\uCEEC \uC790\uACA9\uC99D\uBA85 \uC778\uC99D/\uAD00\uB9AC
|
|
184
|
-
|
|
185
|
-
${kleur.bold("Google OAuth (Firebase / AdMob / Play):")}
|
|
186
|
-
${kleur.cyan("mimi-seed auth login")} \uBE0C\uB77C\uC6B0\uC800\uB85C \uB85C\uADF8\uC778 (\uC774\uBBF8 \uC788\uC73C\uBA74 \uC790\uB3D9 refresh \uC2DC\uB3C4)
|
|
187
|
-
${kleur.cyan("mimi-seed auth status")} \uD604\uC7AC OAuth \uD1A0\uD070 \uC0C1\uD0DC
|
|
188
|
-
${kleur.cyan("mimi-seed auth refresh")} refresh_token\uC73C\uB85C \uAC31\uC2E0\uB9CC \uC2DC\uB3C4 (\uBE0C\uB77C\uC6B0\uC800 X)
|
|
189
|
-
${kleur.cyan("mimi-seed auth logout")} OAuth \uD1A0\uD070 \uC0AD\uC81C
|
|
190
|
-
|
|
191
|
-
${kleur.bold("\uD50C\uB7AB\uD3FC\uBCC4 \uC790\uACA9\uC99D\uBA85:")}
|
|
192
|
-
${kleur.cyan("mimi-seed auth appstore")} App Store Connect API \uD0A4 (appstore.json)
|
|
193
|
-
${kleur.cyan("mimi-seed auth playstore")} Play \uC11C\uBE44\uC2A4 \uACC4\uC815 JSON \uB4F1\uB85D
|
|
194
|
-
${kleur.cyan("mimi-seed auth bigquery")} BigQuery \uC11C\uBE44\uC2A4 \uACC4\uC815 (Crashlytics export \uB4F1)
|
|
195
|
-
${kleur.cyan("mimi-seed auth drive")} Google Drive \uC11C\uBE44\uC2A4 \uACC4\uC815 (\uACF5\uC720 \uD3F4\uB354\xB7\uACF5\uC720 \uB4DC\uB77C\uC774\uBE0C \uC5C5\uB85C\uB4DC)
|
|
196
|
-
|
|
197
|
-
${kleur.bold("\uBE4C\uB4DC / \uB9C8\uCF00\uD305:")}
|
|
198
|
-
${kleur.cyan("mimi-seed auth meta")} Facebook \xB7 Instagram \xB7 Threads \uD55C \uBC88\uC5D0
|
|
199
|
-
${kleur.cyan("mimi-seed auth jenkins")} Jenkins \uC5F0\uACB0 (jenkins.json)
|
|
200
|
-
${kleur.cyan("mimi-seed auth ci")} GitHub Actions / GitLab CI (ci.json)
|
|
201
|
-
${kleur.cyan("mimi-seed auth googleads")} Google Ads (google-ads.json)
|
|
202
|
-
${kleur.cyan("mimi-seed auth facebook")} Facebook \uD398\uC774\uC9C0
|
|
203
|
-
${kleur.cyan("mimi-seed auth instagram")} Instagram
|
|
204
|
-
${kleur.cyan("mimi-seed auth threads")} Threads \uBE0C\uB77C\uC6B0\uC800 \uB85C\uADF8\uC778
|
|
205
|
-
${kleur.cyan("mimi-seed auth tiktok")} TikTok Business Organic API
|
|
206
|
-
${kleur.dim(" Instagram/Threads: --profile <id>\uB85C \uD2B9\uC815 \uC18C\uC15C \uD504\uB85C\uD544 \uC800\uC7A5/\uAC31\uC2E0. Instagram/Threads \uC218\uB3D9 \uD1A0\uD070 \uC785\uB825\uC740 --manual-token")}
|
|
207
|
-
|
|
208
|
-
${kleur.bold("\uC804\uCCB4 \uC0C1\uD0DC:")}
|
|
209
|
-
${kleur.cyan("mimi-seed auth status --all")} \uBAA8\uB4E0 \uC790\uACA9\uC99D\uBA85 \uBCF4\uC720 \uC5EC\uBD80 \uD55C\uB208\uC5D0
|
|
210
|
-
|
|
211
|
-
${kleur.bold("\uD55C \uBC88\uC5D0 \uB2E4 \uC5F0\uACB0:")}
|
|
212
|
-
${kleur.cyan("mimi-seed setup")} \uC548\uB0B4\uB97C \uB530\uB77C\uAC00\uBA70 \uC21C\uC11C\uB300\uB85C \uC5F0\uACB0 (\uAD8C\uC7A5)
|
|
213
|
-
|
|
214
|
-
${kleur.bold("login \uC635\uC158:")}
|
|
215
|
-
--domains <ids> \uC694\uCCAD\uD560 \uAD8C\uD55C \uB3C4\uBA54\uC778\uB9CC \uC120\uD0DD (\uC27C\uD45C \uAD6C\uBD84, \uC608: ga4,googleads \u2014 \uAE30\uC874 \uAD8C\uD55C \uC720\uC9C0)
|
|
216
|
-
--no-browser URL \uC790\uB3D9 \uC624\uD508 \uC548 \uD568 (\uC9C1\uC811 \uBCF5\uBD99)
|
|
217
|
-
--timeout <\uCD08> \uCF5C\uBC31 \uB300\uAE30 \uC2DC\uAC04 (\uAE30\uBCF8 600)
|
|
218
|
-
--force \uAE30\uC874 \uD1A0\uD070 \uBB34\uC2DC\uD558\uACE0 \uAC15\uC81C \uC7AC\uB85C\uADF8\uC778
|
|
219
|
-
|
|
220
|
-
${kleur.dim(`\uB0B4\uBD80\uC801\uC73C\uB85C ${MCP_PKG} \uC758 mimi-seed-*-auth CLI\uB97C \uD638\uCD9C\uD569\uB2C8\uB2E4.`)}`,
|
|
221
|
-
connectAll: "\n \uD55C \uBC88\uC5D0 \uC5F0\uACB0: mimi-seed setup"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
help: `${kleur.bold("mimi-seed auth")} \u2014 local credential setup
|
|
225
|
-
|
|
226
|
-
${kleur.bold("Google OAuth (Firebase / AdMob / Play):")}
|
|
227
|
-
${kleur.cyan("mimi-seed auth login")} sign in via browser (refreshes an existing token if it can)
|
|
228
|
-
${kleur.cyan("mimi-seed auth status")} current OAuth token status
|
|
229
|
-
${kleur.cyan("mimi-seed auth refresh")} refresh only, using refresh_token (no browser)
|
|
230
|
-
${kleur.cyan("mimi-seed auth logout")} delete the OAuth token
|
|
231
|
-
|
|
232
|
-
${kleur.bold("Per-platform credentials:")}
|
|
233
|
-
${kleur.cyan("mimi-seed auth appstore")} App Store Connect API key (appstore.json)
|
|
234
|
-
${kleur.cyan("mimi-seed auth playstore")} register a Play service-account JSON
|
|
235
|
-
${kleur.cyan("mimi-seed auth bigquery")} BigQuery service account (Crashlytics export, etc.)
|
|
236
|
-
${kleur.cyan("mimi-seed auth drive")} Google Drive service account (uploads to shared folders / drives)
|
|
237
|
-
|
|
238
|
-
${kleur.bold("Build / marketing:")}
|
|
239
|
-
${kleur.cyan("mimi-seed auth meta")} Facebook \xB7 Instagram \xB7 Threads in one flow
|
|
240
|
-
${kleur.cyan("mimi-seed auth jenkins")} Jenkins connection (jenkins.json)
|
|
241
|
-
${kleur.cyan("mimi-seed auth ci")} GitHub Actions / GitLab CI (ci.json)
|
|
242
|
-
${kleur.cyan("mimi-seed auth googleads")} Google Ads (google-ads.json)
|
|
243
|
-
${kleur.cyan("mimi-seed auth facebook")} Facebook Page
|
|
244
|
-
${kleur.cyan("mimi-seed auth instagram")} Instagram
|
|
245
|
-
${kleur.cyan("mimi-seed auth threads")} Threads (browser login)
|
|
246
|
-
${kleur.cyan("mimi-seed auth tiktok")} TikTok Business Organic API
|
|
247
|
-
${kleur.dim(" Instagram/Threads: use --profile <id> to save or refresh a named social profile. Instagram/Threads manual tokens: --manual-token")}
|
|
248
|
-
|
|
249
|
-
${kleur.bold("Everything at a glance:")}
|
|
250
|
-
${kleur.cyan("mimi-seed auth status --all")} which credentials you have
|
|
251
|
-
|
|
252
|
-
${kleur.bold("Connect them all in one pass:")}
|
|
253
|
-
${kleur.cyan("mimi-seed setup")} guided, one credential at a time (recommended)
|
|
254
|
-
|
|
255
|
-
${kleur.bold("login options:")}
|
|
256
|
-
--domains <ids> request only these permission domains (comma-separated, e.g. ga4,googleads \u2014 prior grants are kept)
|
|
257
|
-
--no-browser don't open the URL automatically (paste it yourself)
|
|
258
|
-
--timeout <sec> how long to wait for the callback (default 600)
|
|
259
|
-
--force ignore the existing token and sign in again
|
|
260
|
-
|
|
261
|
-
${kleur.dim(`Under the hood this calls the mimi-seed-*-auth CLIs from ${MCP_PKG}.`)}`,
|
|
262
|
-
connectAll: "\n Connect everything at once: mimi-seed setup"
|
|
263
|
-
}
|
|
264
|
-
);
|
|
265
|
-
function printAuthHelp() {
|
|
266
|
-
log(M3().help);
|
|
267
|
-
}
|
|
268
|
-
function printAllCredStatus() {
|
|
269
|
-
log(kleur.bold(t().auth.statusTitle + " ") + kleur.dim("(~/.mimi-seed)"));
|
|
270
|
-
const detected = detectAll();
|
|
271
|
-
for (const spec of CREDENTIALS) {
|
|
272
|
-
const d = detected.get(spec.id);
|
|
273
|
-
const mark = d.freshness === "expired" ? kleur.red("\u2717") : d.freshness === "expiring" ? kleur.yellow("!") : d.present ? kleur.green("\u2713") : isSatisfied(spec, detected) ? kleur.yellow("~") : spec.requirement === "optional" ? kleur.dim("\xB7") : kleur.red("\u2717");
|
|
274
|
-
const tail = d.freshness === "expired" ? kleur.red(`${t().setup.tokenExpired} \u2192 ${spec.fix}`) : d.freshness === "expiring" ? kleur.yellow(`${t().setup.tokenExpiring(d.daysRemaining ?? 0)} \u2192 ${spec.fix}`) : d.present ? kleur.dim(d.detail ?? "") : kleur.dim(`\u2192 ${spec.fix}`);
|
|
275
|
-
log(` ${mark} ${credLabel(spec).padEnd(24)} ${tail}`);
|
|
276
|
-
}
|
|
277
|
-
log(kleur.dim(M3().connectAll));
|
|
278
|
-
}
|
|
279
|
-
async function cmdAuth(args) {
|
|
280
|
-
const sub = args[0];
|
|
281
|
-
const rest = args.slice(1);
|
|
282
|
-
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
283
|
-
printAuthHelp();
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
if (sub === "status" && rest.includes("--all")) {
|
|
287
|
-
printAllCredStatus();
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
if (sub === "appstore") return void exitWith(await runMcpBin("mimi-seed-appstore-auth", rest));
|
|
291
|
-
if (sub === "playstore") return void exitWith(await runMcpBin("mimi-seed-playstore-auth", rest));
|
|
292
|
-
if (sub === "bigquery") return void exitWith(await runMcpBin("mimi-seed-bigquery-auth", rest));
|
|
293
|
-
if (sub === "drive") return void exitWith(await runMcpBin("mimi-seed-drive-auth", rest));
|
|
294
|
-
if (sub === "jenkins") return void exitWith(await runMcpBin("mimi-seed-jenkins-auth", rest));
|
|
295
|
-
if (sub === "googleads") return void exitWith(await runMcpBin("mimi-seed-googleads-auth", rest));
|
|
296
|
-
if (sub === "meta") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["all", ...rest]));
|
|
297
|
-
if (sub === "facebook") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["facebook", ...rest]));
|
|
298
|
-
if (sub === "instagram") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["instagram", ...rest]));
|
|
299
|
-
if (sub === "threads") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["threads", ...rest]));
|
|
300
|
-
if (sub === "tiktok") return void exitWith(await runMcpBin("mimi-seed-tiktok-business-auth", rest));
|
|
301
|
-
if (sub === "ci") {
|
|
302
|
-
const { cmdSetup: cmdSetup2 } = await import("./setup-FINSBY6F.js");
|
|
303
|
-
await cmdSetup2(["--only", "github,gitlab", "--reconnect", "github,gitlab"]);
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
if (sub?.startsWith("--")) {
|
|
307
|
-
return void exitWith(await runMcpBin("mimi-seed-auth", args));
|
|
308
|
-
}
|
|
309
|
-
let mcpArgs;
|
|
310
|
-
switch (sub) {
|
|
311
|
-
case void 0:
|
|
312
|
-
case "login":
|
|
313
|
-
mcpArgs = rest;
|
|
314
|
-
break;
|
|
315
|
-
case "status":
|
|
316
|
-
mcpArgs = ["--status", ...rest];
|
|
317
|
-
break;
|
|
318
|
-
case "refresh":
|
|
319
|
-
mcpArgs = ["--refresh", ...rest];
|
|
320
|
-
break;
|
|
321
|
-
case "logout":
|
|
322
|
-
mcpArgs = ["--logout", ...rest];
|
|
323
|
-
break;
|
|
324
|
-
default:
|
|
325
|
-
log(kleur.red(t().auth.unknownSub(sub ?? "")));
|
|
326
|
-
printAuthHelp();
|
|
327
|
-
process.exit(1);
|
|
328
|
-
}
|
|
329
|
-
exitWith(await runMcpBin("mimi-seed-auth", mcpArgs));
|
|
330
|
-
}
|
|
331
|
-
function exitWith(code) {
|
|
332
|
-
if (code !== 0) process.exit(code);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
178
|
// src/mcp-config.ts
|
|
336
179
|
import fs from "fs/promises";
|
|
337
180
|
import path from "path";
|
|
338
181
|
import os from "os";
|
|
339
|
-
import
|
|
182
|
+
import kleur from "kleur";
|
|
340
183
|
var SERVER_NAME = "mimi-seed";
|
|
341
184
|
var CODEX_REMOTE_NAME = "mimi-seed-remote";
|
|
342
185
|
var CODEX_TOKEN_ENV = "MIMI_SEED_TOKEN";
|
|
343
|
-
var
|
|
186
|
+
var M3 = catalog(
|
|
344
187
|
{
|
|
345
188
|
claudeTitle: "Claude Code MCP \uB4F1\uB85D \u2014 \uC544\uB798 \uD55C \uC904\uC744 \uADF8\uB300\uB85C \uC2E4\uD589\uD558\uC138\uC694:",
|
|
346
189
|
tokenWarning: (loc) => ` \u26A0 \uC2E4\uC81C \uD1A0\uD070\uC774 \uD3EC\uD568\uB41C \uBA85\uB839\uC785\uB2C8\uB2E4 (\uC178 \uD788\uC2A4\uD1A0\uB9AC\uC5D0 \uB0A8\uC74C). \uD1A0\uD070\uC740 ${loc} \uC5D0\uB3C4 \uC800\uC7A5\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.`,
|
|
@@ -386,14 +229,14 @@ function claudeMcpAddCommand(cfg) {
|
|
|
386
229
|
function printMcpSetup(cfg) {
|
|
387
230
|
process.stdout.write(
|
|
388
231
|
[
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
232
|
+
kleur.bold(M3().claudeTitle),
|
|
233
|
+
kleur.cyan(` ${claudeMcpAddCommand(cfg)}`),
|
|
234
|
+
kleur.dim(M3().tokenWarning(CONFIG_LOCATION_HINT)),
|
|
392
235
|
"",
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
236
|
+
kleur.dim(M3().codexTitle),
|
|
237
|
+
kleur.dim(" mimi-seed mcp codex --write"),
|
|
238
|
+
kleur.dim(M3().codexEnvNote),
|
|
239
|
+
kleur.dim(M3().codexManual)
|
|
397
240
|
].join("\n") + "\n"
|
|
398
241
|
);
|
|
399
242
|
}
|
|
@@ -470,13 +313,11 @@ async function ensureReleaseManifest(cwd) {
|
|
|
470
313
|
}
|
|
471
314
|
|
|
472
315
|
// src/init.ts
|
|
473
|
-
var
|
|
474
|
-
var DEFAULT_MCP_ENDPOINT = `${DEFAULT_WEB_BASE}/api/mcp`;
|
|
475
|
-
var M5 = catalog(
|
|
316
|
+
var M4 = catalog(
|
|
476
317
|
{
|
|
477
318
|
noProjectSignal: "\u26A0 package.json / app.json / android / ios \uB97C \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. \uADF8\uB798\uB3C4 \uC9C4\uD589\uD569\uB2C8\uB2E4.",
|
|
478
319
|
detecting: "\u{1F50D} \uC571 \uAC10\uC9C0 \uC911...",
|
|
479
|
-
noAppDetected: "\uAC10\uC9C0\uB41C \uC571 \uC5C6\uC74C.
|
|
320
|
+
noAppDetected: "\uAC10\uC9C0\uB41C \uC571 \uC5C6\uC74C.",
|
|
480
321
|
unnamed: "(\uC774\uB984 \uBBF8\uC0C1)",
|
|
481
322
|
ciMode: "CI \uBAA8\uB4DC: MIMI_SEED_TOKEN \uC0AC\uC6A9",
|
|
482
323
|
syncFailed: (text) => "\uB4F1\uB85D \uC2E4\uD328: " + text,
|
|
@@ -493,23 +334,18 @@ var M5 = catalog(
|
|
|
493
334
|
askLike: "Claude Code \uB610\uB294 Codex\uC5D0\uC11C \uC774\uB807\uAC8C \uBB3C\uC5B4\uBCF4\uC138\uC694:",
|
|
494
335
|
ask1: ' "\uB0B4 \uC571 \uCD9C\uC2DC \uC900\uBE44\uB410\uC5B4?"',
|
|
495
336
|
ask2: ' "\uB9B4\uB9AC\uC988 \uB178\uD2B8 \uC368\uC918"',
|
|
496
|
-
ask3: ' "\
|
|
337
|
+
ask3: ' "\uC774\uBC88 \uBC84\uC804\uC5D0\uC11C \uB2EC\uB77C\uC9C4 \uC810\uC73C\uB85C \uC5C5\uB370\uC774\uD2B8 \uACF5\uC9C0 \uCD08\uC548\uC744 \uC368\uC918"',
|
|
497
338
|
dashboard: (url) => `\uB300\uC2DC\uBCF4\uB4DC: ${url}`,
|
|
498
|
-
nextTitle: "\uB2E4\uC74C \uB2E8\uACC4:",
|
|
499
339
|
nextSetup: " 1) mimi-seed setup \uACC4\uC815 \uC5F0\uACB0 (\uC548\uB0B4\uD615 \u2014 \uAC01 \uB2E8\uACC4\uC5D0\uC11C ? \uB97C \uB204\uB974\uBA74 \uBC1C\uAE09\uCC98 \uC548\uB0B4)",
|
|
500
340
|
nextDoctor: " 2) mimi-seed doctor \uC804\uCCB4 \uC810\uAC80 + \uB204\uB77D \uD56D\uBAA9\uBCC4 \uBCF5\uAD6C \uBA85\uB839",
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
localStep2: "2) \uB85C\uCEEC MCP \uC11C\uBC84 \uB4F1\uB85D (\uC6D0\uACA9 'mimi-seed' \uC640 \uBCC4\uAC1C):",
|
|
505
|
-
localCodexHint: ' Codex: ~/.codex/config.toml \uC5D0 [mcp_servers.mimi-seed-local] command="npx", args=["-y","@yoonion/mimi-seed-mcp@latest"]',
|
|
506
|
-
localStep3: "3) \uB098\uBA38\uC9C0 \uACC4\uC815 \uC5F0\uACB0 (App Store / Play / Jenkins / CI / \uC18C\uC15C \u2026):",
|
|
507
|
-
localSetupHint: " \uAC01 \uD56D\uBAA9\uC5D0\uC11C [?] \uB97C \uB204\uB974\uBA74 \uD1A0\uD070 \uBC1C\uAE09 \uBC29\uBC95\uC744 \uC54C\uB824\uC90D\uB2C8\uB2E4."
|
|
341
|
+
localStep1: "Google \uB85C\uADF8\uC778 (Firebase / AdMob / Play / Ads) \u2014 \uCC98\uC74C\uC774\uBA74 \uB0B4 Google Cloud \uC758 \uB370\uC2A4\uD06C\uD1B1 OAuth \uD074\uB77C\uC774\uC5B8\uD2B8\uB97C MIMI_SEED_GOOGLE_CLIENT_ID / _SECRET \uB85C \uC9C0\uC815 (docs/credentials.md#google-oauth):",
|
|
342
|
+
localStep2: "\uB85C\uCEEC MCP \uC11C\uBC84 \uB4F1\uB85D:",
|
|
343
|
+
localCodexHint: ' Codex: ~/.codex/config.toml \uC5D0 [mcp_servers.mimi-seed-local] command="npx", args=["-y","@yoonion/mimi-seed-mcp@latest"]'
|
|
508
344
|
},
|
|
509
345
|
{
|
|
510
346
|
noProjectSignal: "\u26A0 No package.json / app.json / android / ios found. Continuing anyway.",
|
|
511
347
|
detecting: "\u{1F50D} Detecting apps...",
|
|
512
|
-
noAppDetected: "No app detected.
|
|
348
|
+
noAppDetected: "No app detected.",
|
|
513
349
|
unnamed: "(unnamed)",
|
|
514
350
|
ciMode: "CI mode: using MIMI_SEED_TOKEN",
|
|
515
351
|
syncFailed: (text) => "Registration failed: " + text,
|
|
@@ -526,111 +362,63 @@ var M5 = catalog(
|
|
|
526
362
|
askLike: "Try asking this in Claude Code or Codex:",
|
|
527
363
|
ask1: ' "Is my app ready to ship?"',
|
|
528
364
|
ask2: ' "Write the release notes"',
|
|
529
|
-
ask3: ' "
|
|
365
|
+
ask3: ' "Draft an update announcement from the changes in this version"',
|
|
530
366
|
dashboard: (url) => `Dashboard: ${url}`,
|
|
531
|
-
nextTitle: "Next steps:",
|
|
532
367
|
nextSetup: " 1) mimi-seed setup connect your accounts (guided \u2014 press ? for where each token comes from)",
|
|
533
368
|
nextDoctor: " 2) mimi-seed doctor verify everything + the exact fix for anything missing",
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
localStep2: "2) Register the local MCP server (separate from the remote 'mimi-seed'):",
|
|
538
|
-
localCodexHint: ' Codex: add [mcp_servers.mimi-seed-local] command="npx", args=["-y","@yoonion/mimi-seed-mcp@latest"] to ~/.codex/config.toml',
|
|
539
|
-
localStep3: "3) Connect the remaining accounts (App Store / Play / Jenkins / CI / social \u2026):",
|
|
540
|
-
localSetupHint: " Press [?] on any item to see how to obtain that token."
|
|
369
|
+
localStep1: "Sign in with Google (Firebase / AdMob / Play / Ads) \u2014 the first time, set MIMI_SEED_GOOGLE_CLIENT_ID / _SECRET to a Desktop OAuth client in your Google Cloud project (docs/credentials.md#google-oauth):",
|
|
370
|
+
localStep2: "Register the local MCP server:",
|
|
371
|
+
localCodexHint: ' Codex: add [mcp_servers.mimi-seed-local] command="npx", args=["-y","@yoonion/mimi-seed-mcp@latest"] to ~/.codex/config.toml'
|
|
541
372
|
}
|
|
542
373
|
);
|
|
543
|
-
function
|
|
374
|
+
function log(msg) {
|
|
544
375
|
process.stdout.write(msg + "\n");
|
|
545
376
|
}
|
|
546
377
|
async function cmdInit(args) {
|
|
547
|
-
const
|
|
378
|
+
const webBase = args.includes("--local") ? null : consoleBase(process.env.MIMI_SEED_WEB_BASE);
|
|
548
379
|
const cwd = process.cwd();
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
380
|
+
log(kleur2.bold("Mimi Seed CLI \u2014 init"));
|
|
381
|
+
log(kleur2.dim(cwd));
|
|
382
|
+
log("");
|
|
552
383
|
if (!await hasAnyProjectSignal(cwd)) {
|
|
553
|
-
|
|
384
|
+
log(kleur2.yellow(M4().noProjectSignal));
|
|
554
385
|
}
|
|
555
|
-
|
|
386
|
+
log(M4().detecting);
|
|
556
387
|
const hints = await detectHints(cwd);
|
|
557
388
|
if (hints.length === 0) {
|
|
558
|
-
|
|
389
|
+
log(kleur2.yellow(M4().noAppDetected));
|
|
559
390
|
} else {
|
|
560
391
|
for (const h of hints) {
|
|
561
392
|
const tag = [h.packageName && `android:${h.packageName}`, h.bundleId && `ios:${h.bundleId}`].filter(Boolean).join(" ");
|
|
562
|
-
|
|
393
|
+
log(` \u2022 ${h.name ?? M4().unnamed} ${kleur2.dim(tag)}`);
|
|
563
394
|
}
|
|
564
395
|
}
|
|
565
|
-
|
|
566
|
-
if (process.env.MIMI_SEED_TOKEN) {
|
|
396
|
+
log("");
|
|
397
|
+
if (webBase && process.env.MIMI_SEED_TOKEN) {
|
|
567
398
|
const cfg2 = await getEffectiveConfig();
|
|
568
399
|
if (cfg2 && hints.length > 0) {
|
|
569
|
-
|
|
400
|
+
log(kleur2.dim(M4().ciMode));
|
|
570
401
|
const payload = hints.map((h) => ({ name: h.name, packageName: h.packageName, bundleId: h.bundleId }));
|
|
571
402
|
const result = await mcpCall(cfg2.endpoint, cfg2.token, "sync_apps", { hints: payload }, { timeoutMs: MCP_WRITE_TIMEOUT_MS });
|
|
572
403
|
if (result.isError) {
|
|
573
|
-
|
|
404
|
+
log(kleur2.red(M4().syncFailed(result.text)));
|
|
574
405
|
} else {
|
|
575
|
-
for (const line of result.text.split("\n"))
|
|
406
|
+
for (const line of result.text.split("\n")) log(" " + line);
|
|
576
407
|
if (hints.length === 1 && (hints[0].packageName || hints[0].bundleId)) {
|
|
577
408
|
try {
|
|
578
409
|
await linkProject(cwd, cfg2.webBase, cfg2.token, hints[0]);
|
|
579
410
|
} catch (error) {
|
|
580
|
-
|
|
411
|
+
log(kleur2.yellow(String(error)));
|
|
581
412
|
}
|
|
582
413
|
}
|
|
583
414
|
}
|
|
584
415
|
}
|
|
585
416
|
const manifest2 = await ensureReleaseManifest(cwd);
|
|
586
|
-
|
|
587
|
-
|
|
417
|
+
log(kleur2.dim(M4().manifest(manifest2.created)));
|
|
418
|
+
log(kleur2.bold(M4().doneCi));
|
|
588
419
|
return;
|
|
589
420
|
}
|
|
590
|
-
|
|
591
|
-
const hostName = os2.hostname().slice(0, 32);
|
|
592
|
-
const name = `cli-${hostName}`;
|
|
593
|
-
const { port, promise } = await awaitHandshake(5 * 60 * 1e3);
|
|
594
|
-
const callback = `http://127.0.0.1:${port}/cb`;
|
|
595
|
-
const connectUrl = `${DEFAULT_WEB_BASE}/cli/connect?callback=${encodeURIComponent(callback)}&name=${encodeURIComponent(name)}`;
|
|
596
|
-
log2(kleur3.dim(` ${connectUrl}`));
|
|
597
|
-
await open(connectUrl);
|
|
598
|
-
let handshake;
|
|
599
|
-
try {
|
|
600
|
-
handshake = await promise;
|
|
601
|
-
} catch (e) {
|
|
602
|
-
log2(kleur3.red(M5().connectFailed(e.message)));
|
|
603
|
-
process.exit(1);
|
|
604
|
-
}
|
|
605
|
-
log2(kleur3.green(M5().tokenReceived));
|
|
606
|
-
const cfg = {
|
|
607
|
-
token: handshake.token,
|
|
608
|
-
prefix: handshake.prefix,
|
|
609
|
-
endpoint: DEFAULT_MCP_ENDPOINT,
|
|
610
|
-
webBase: DEFAULT_WEB_BASE,
|
|
611
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
612
|
-
};
|
|
613
|
-
await writeConfig(cfg);
|
|
614
|
-
log2(kleur3.dim(M5().saved(CONFIG_LOCATION)));
|
|
615
|
-
log2("");
|
|
616
|
-
if (hints.length > 0) {
|
|
617
|
-
log2(M5().registering);
|
|
618
|
-
const payload = hints.map((h) => ({ name: h.name, packageName: h.packageName, bundleId: h.bundleId }));
|
|
619
|
-
const result = await mcpCall(cfg.endpoint, cfg.token, "sync_apps", { hints: payload }, { timeoutMs: MCP_WRITE_TIMEOUT_MS });
|
|
620
|
-
if (result.isError) {
|
|
621
|
-
log2(kleur3.red(M5().syncFailed(result.text)));
|
|
622
|
-
} else {
|
|
623
|
-
for (const line of result.text.split("\n")) log2(" " + line);
|
|
624
|
-
if (hints.length === 1 && (hints[0].packageName || hints[0].bundleId)) {
|
|
625
|
-
try {
|
|
626
|
-
await linkProject(cwd, cfg.webBase, cfg.token, hints[0]);
|
|
627
|
-
} catch (error) {
|
|
628
|
-
log2(kleur3.yellow(String(error)));
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
log2("");
|
|
633
|
-
}
|
|
421
|
+
const cfg = webBase ? await connectRemote(webBase, hints, cwd) : null;
|
|
634
422
|
const appLines = hints.flatMap((h) => {
|
|
635
423
|
const parts = [
|
|
636
424
|
h.name && ` name: ${h.name}`,
|
|
@@ -679,51 +467,86 @@ async function cmdInit(args) {
|
|
|
679
467
|
if (!fs3.existsSync(claudeAgentPath)) {
|
|
680
468
|
fs3.mkdirSync(claudeDir, { recursive: true });
|
|
681
469
|
fs3.writeFileSync(claudeAgentPath, agentMd, { mode: 420 });
|
|
682
|
-
|
|
470
|
+
log(kleur2.dim(M4().claudeAgent));
|
|
683
471
|
}
|
|
684
472
|
const codexAgentPath = path3.join(cwd, "AGENTS.md");
|
|
685
473
|
if (!fs3.existsSync(codexAgentPath)) {
|
|
686
474
|
fs3.writeFileSync(codexAgentPath, agentMd, { mode: 420 });
|
|
687
|
-
|
|
475
|
+
log(kleur2.dim(M4().codexAgent));
|
|
688
476
|
}
|
|
689
477
|
const manifest = await ensureReleaseManifest(cwd);
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
478
|
+
log(kleur2.dim(M4().manifest(manifest.created)));
|
|
479
|
+
log(kleur2.bold(M4().ready));
|
|
480
|
+
log("");
|
|
481
|
+
log(M4().askLike);
|
|
482
|
+
log(kleur2.cyan(M4().ask1));
|
|
483
|
+
log(kleur2.cyan(M4().ask2));
|
|
484
|
+
log(kleur2.cyan(M4().ask3));
|
|
485
|
+
log("");
|
|
486
|
+
if (cfg) {
|
|
487
|
+
log(M4().dashboard(kleur2.underline(cfg.webBase + "/apps")));
|
|
488
|
+
printMcpSetup(cfg);
|
|
489
|
+
} else {
|
|
490
|
+
log(M4().localStep2);
|
|
491
|
+
log(kleur2.cyan(" claude mcp add mimi-seed-local -- npx -y @yoonion/mimi-seed-mcp@latest"));
|
|
492
|
+
log(kleur2.dim(M4().localCodexHint));
|
|
493
|
+
log("");
|
|
494
|
+
log(M4().localStep1);
|
|
495
|
+
log(kleur2.cyan(" mimi-seed auth login"));
|
|
496
|
+
}
|
|
497
|
+
log(kleur2.cyan(M4().nextSetup));
|
|
498
|
+
log(kleur2.cyan(M4().nextDoctor));
|
|
499
|
+
}
|
|
500
|
+
async function connectRemote(webBase, hints, cwd) {
|
|
501
|
+
log(M4().waitingLogin);
|
|
502
|
+
const hostName = os2.hostname().slice(0, 32);
|
|
503
|
+
const name = `cli-${hostName}`;
|
|
504
|
+
const { port, promise } = await awaitHandshake(5 * 60 * 1e3);
|
|
505
|
+
const callback = `http://127.0.0.1:${port}/cb`;
|
|
506
|
+
const connectUrl = `${webBase}/cli/connect?callback=${encodeURIComponent(callback)}&name=${encodeURIComponent(name)}`;
|
|
507
|
+
log(kleur2.dim(` ${connectUrl}`));
|
|
508
|
+
await open(connectUrl);
|
|
509
|
+
let handshake;
|
|
510
|
+
try {
|
|
511
|
+
handshake = await promise;
|
|
512
|
+
} catch (e) {
|
|
513
|
+
log(kleur2.red(M4().connectFailed(e.message)));
|
|
514
|
+
process.exit(1);
|
|
722
515
|
}
|
|
516
|
+
log(kleur2.green(M4().tokenReceived));
|
|
517
|
+
const cfg = {
|
|
518
|
+
token: handshake.token,
|
|
519
|
+
prefix: handshake.prefix,
|
|
520
|
+
endpoint: `${webBase}/api/mcp`,
|
|
521
|
+
webBase,
|
|
522
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
523
|
+
};
|
|
524
|
+
await writeConfig(cfg);
|
|
525
|
+
log(kleur2.dim(M4().saved(CONFIG_LOCATION)));
|
|
526
|
+
log("");
|
|
527
|
+
if (hints.length > 0) {
|
|
528
|
+
log(M4().registering);
|
|
529
|
+
const payload = hints.map((h) => ({ name: h.name, packageName: h.packageName, bundleId: h.bundleId }));
|
|
530
|
+
const result = await mcpCall(cfg.endpoint, cfg.token, "sync_apps", { hints: payload }, { timeoutMs: MCP_WRITE_TIMEOUT_MS });
|
|
531
|
+
if (result.isError) {
|
|
532
|
+
log(kleur2.red(M4().syncFailed(result.text)));
|
|
533
|
+
} else {
|
|
534
|
+
for (const line of result.text.split("\n")) log(" " + line);
|
|
535
|
+
if (hints.length === 1 && (hints[0].packageName || hints[0].bundleId)) {
|
|
536
|
+
try {
|
|
537
|
+
await linkProject(cwd, cfg.webBase, cfg.token, hints[0]);
|
|
538
|
+
} catch (error) {
|
|
539
|
+
log(kleur2.yellow(String(error)));
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
log("");
|
|
544
|
+
}
|
|
545
|
+
return cfg;
|
|
723
546
|
}
|
|
724
547
|
|
|
725
548
|
// src/doctor.ts
|
|
726
|
-
import
|
|
549
|
+
import kleur3 from "kleur";
|
|
727
550
|
|
|
728
551
|
// src/git.ts
|
|
729
552
|
import { execFileSync } from "child_process";
|
|
@@ -787,7 +610,7 @@ function formatCommitsForPrompt(commits) {
|
|
|
787
610
|
}
|
|
788
611
|
|
|
789
612
|
// src/doctor.ts
|
|
790
|
-
var ICON = { ok:
|
|
613
|
+
var ICON = { ok: kleur3.green("\u2713"), warn: kleur3.yellow("\u26A0"), fail: kleur3.red("\u2717") };
|
|
791
614
|
var Reporter = class {
|
|
792
615
|
constructor(print) {
|
|
793
616
|
this.print = print;
|
|
@@ -797,7 +620,7 @@ var Reporter = class {
|
|
|
797
620
|
current = "account";
|
|
798
621
|
section(id, title) {
|
|
799
622
|
this.current = id;
|
|
800
|
-
if (this.print) process.stdout.write("\n" +
|
|
623
|
+
if (this.print) process.stdout.write("\n" + kleur3.dim(`\u2500\u2500 ${title} \u2500\u2500
|
|
801
624
|
`));
|
|
802
625
|
}
|
|
803
626
|
text(s) {
|
|
@@ -806,7 +629,7 @@ var Reporter = class {
|
|
|
806
629
|
add(status, label, detail = "") {
|
|
807
630
|
this.checks.push({ section: this.current, status, label, ...detail ? { detail } : {} });
|
|
808
631
|
if (this.print) {
|
|
809
|
-
process.stdout.write(` ${ICON[status]} ${label}${detail ?
|
|
632
|
+
process.stdout.write(` ${ICON[status]} ${label}${detail ? kleur3.dim(" " + detail) : ""}
|
|
810
633
|
`);
|
|
811
634
|
}
|
|
812
635
|
}
|
|
@@ -851,9 +674,9 @@ function platformsFromHints(hints) {
|
|
|
851
674
|
return platforms;
|
|
852
675
|
}
|
|
853
676
|
async function remoteConfigured(cwd, env = process.env) {
|
|
854
|
-
if (env.
|
|
677
|
+
if (consoleBase(env.MIMI_SEED_WEB_BASE)) return true;
|
|
855
678
|
try {
|
|
856
|
-
return await findProjectLink(cwd)
|
|
679
|
+
return !!consoleBase((await findProjectLink(cwd))?.webBase);
|
|
857
680
|
} catch {
|
|
858
681
|
return true;
|
|
859
682
|
}
|
|
@@ -862,7 +685,7 @@ async function runDoctor(opts) {
|
|
|
862
685
|
const { cwd } = opts;
|
|
863
686
|
const m = t().doctor;
|
|
864
687
|
const r = new Reporter(opts.print);
|
|
865
|
-
r.text(
|
|
688
|
+
r.text(kleur3.bold(m.title + "\n\n"));
|
|
866
689
|
r.section("account", m.secAuth);
|
|
867
690
|
const cfg = await getEffectiveConfig();
|
|
868
691
|
const remote = cfg !== null || await remoteConfigured(cwd);
|
|
@@ -914,7 +737,7 @@ async function runDoctor(opts) {
|
|
|
914
737
|
if (store.effective === "file") r.ok(m.storeLabel, sealed > 0 ? m.storeEncrypted(sealed) : m.storePlain);
|
|
915
738
|
else if (plain > 0) r.warn(m.storeLabel, m.storePlainLeft(plain));
|
|
916
739
|
else r.ok(m.storeLabel, m.storeEncrypted(sealed));
|
|
917
|
-
r.text(
|
|
740
|
+
r.text(kleur3.dim(m.credsHint));
|
|
918
741
|
const manifestLookup = lookupProjectManifest(cwd);
|
|
919
742
|
if (manifestLookup.state === "invalid") {
|
|
920
743
|
r.fail(m.manifestInvalid, m.manifestInvalidDetail(manifestLookup.filePath, m.manifestReason[manifestLookup.reason]));
|
|
@@ -978,7 +801,7 @@ async function cmdDoctor(args = []) {
|
|
|
978
801
|
// src/check.ts
|
|
979
802
|
import fs11 from "fs";
|
|
980
803
|
import path14 from "path";
|
|
981
|
-
import
|
|
804
|
+
import kleur4 from "kleur";
|
|
982
805
|
|
|
983
806
|
// ../core/src/checks/release-doctor-render.ts
|
|
984
807
|
var COPY = {
|
|
@@ -4697,9 +4520,9 @@ async function scanReleaseDoctor(projectPath, now = /* @__PURE__ */ new Date(),
|
|
|
4697
4520
|
}
|
|
4698
4521
|
|
|
4699
4522
|
// src/check.ts
|
|
4700
|
-
var
|
|
4523
|
+
var M5 = catalog(
|
|
4701
4524
|
{
|
|
4702
|
-
noAccount: "\
|
|
4525
|
+
noAccount: "\uC6D0\uACA9 \uAE30\uB2A5\uC740 MIMI_SEED_WEB_BASE\uB97C \uD300 \uCF58\uC194 \uC8FC\uC18C\uB85C \uC124\uC815\uD558\uACE0 `mimi-seed init`\uC73C\uB85C \uC5F0\uACB0\uD558\uC138\uC694.\n",
|
|
4703
4526
|
missingOptionValue: (option) => `${option} \uB4A4\uC5D0 \uAC12\uC744 \uC785\uB825\uD558\uC138\uC694.`,
|
|
4704
4527
|
unknownOption: (option) => `\uC54C \uC218 \uC5C6\uB294 check \uC635\uC158: ${option}`,
|
|
4705
4528
|
unexpectedArgument: (value) => `\uC608\uC0C1\uD558\uC9C0 \uC54A\uC740 check \uC778\uC790: ${value}`,
|
|
@@ -4742,7 +4565,7 @@ CI\uC5D0\uC11C \uBC18\uBCF5 \uAC80\uC0AC: ${command}
|
|
|
4742
4565
|
`
|
|
4743
4566
|
},
|
|
4744
4567
|
{
|
|
4745
|
-
noAccount: "
|
|
4568
|
+
noAccount: "For remote commands, set MIMI_SEED_WEB_BASE to your team console and run `mimi-seed init`.\n",
|
|
4746
4569
|
missingOptionValue: (option) => `Provide a value after ${option}.`,
|
|
4747
4570
|
unknownOption: (option) => `Unknown check option: ${option}`,
|
|
4748
4571
|
unexpectedArgument: (value) => `Unexpected check argument: ${value}`,
|
|
@@ -4806,7 +4629,7 @@ function parseCheckArgs(argv) {
|
|
|
4806
4629
|
};
|
|
4807
4630
|
const takeValue = (option, index) => {
|
|
4808
4631
|
const value = argv[index + 1];
|
|
4809
|
-
if (!value || value.startsWith("--")) throw new Error(
|
|
4632
|
+
if (!value || value.startsWith("--")) throw new Error(M5().missingOptionValue(option));
|
|
4810
4633
|
return value;
|
|
4811
4634
|
};
|
|
4812
4635
|
for (let i = 0; i < argv.length; i++) {
|
|
@@ -4818,15 +4641,15 @@ function parseCheckArgs(argv) {
|
|
|
4818
4641
|
} else if (token === "--fail-on-blocker") args.failOnBlocker = true;
|
|
4819
4642
|
else if (token === "--local") args.local = true;
|
|
4820
4643
|
else if (token === "--json") args.json = true;
|
|
4821
|
-
else if (token.startsWith("-")) throw new Error(
|
|
4822
|
-
else throw new Error(
|
|
4644
|
+
else if (token.startsWith("-")) throw new Error(M5().unknownOption(token));
|
|
4645
|
+
else throw new Error(M5().unexpectedArgument(token));
|
|
4823
4646
|
}
|
|
4824
4647
|
return args;
|
|
4825
4648
|
}
|
|
4826
4649
|
function renderScore(score) {
|
|
4827
4650
|
const filled = Math.round(score / 5);
|
|
4828
4651
|
const bar = "\u2588".repeat(filled) + "\u2591".repeat(20 - filled);
|
|
4829
|
-
const color = score >= 80 ?
|
|
4652
|
+
const color = score >= 80 ? kleur4.green : score >= 50 ? kleur4.yellow : kleur4.red;
|
|
4830
4653
|
return color(`${bar} ${score}/100`);
|
|
4831
4654
|
}
|
|
4832
4655
|
var MODULE_LABELS = {
|
|
@@ -4840,7 +4663,7 @@ async function cmdCheck(argv) {
|
|
|
4840
4663
|
try {
|
|
4841
4664
|
args = parseCheckArgs(argv);
|
|
4842
4665
|
} catch (error) {
|
|
4843
|
-
process.stderr.write(
|
|
4666
|
+
process.stderr.write(kleur4.red(`${error instanceof Error ? error.message : String(error)}
|
|
4844
4667
|
`));
|
|
4845
4668
|
process.exitCode = 2;
|
|
4846
4669
|
return;
|
|
@@ -4848,12 +4671,12 @@ async function cmdCheck(argv) {
|
|
|
4848
4671
|
const cfg = await getEffectiveConfig();
|
|
4849
4672
|
const localRequested = args.local || args.json || args.projectPathExplicit;
|
|
4850
4673
|
if (args.appId && localRequested) {
|
|
4851
|
-
process.stderr.write(
|
|
4674
|
+
process.stderr.write(kleur4.red(M5().localAppConflict));
|
|
4852
4675
|
process.exitCode = 2;
|
|
4853
4676
|
return;
|
|
4854
4677
|
}
|
|
4855
4678
|
if (args.appId && !cfg) {
|
|
4856
|
-
process.stderr.write(
|
|
4679
|
+
process.stderr.write(kleur4.red(M5().noAccount));
|
|
4857
4680
|
process.exitCode = 1;
|
|
4858
4681
|
return;
|
|
4859
4682
|
}
|
|
@@ -4864,21 +4687,21 @@ async function cmdCheck(argv) {
|
|
|
4864
4687
|
process.stdout.write(args.json ? `${JSON.stringify(report, null, 2)}
|
|
4865
4688
|
` : renderReleaseDoctor(report, resolveLang()));
|
|
4866
4689
|
if (!args.json && !process.env.CI) {
|
|
4867
|
-
process.stdout.write((declaresDevEngines(args.projectPath) ?
|
|
4690
|
+
process.stdout.write((declaresDevEngines(args.projectPath) ? M5().localNextDevEngines(devEnginesCheckCommand(process.platform)) : M5().localNext) + telemetryNotice());
|
|
4868
4691
|
}
|
|
4869
4692
|
if (args.failOnBlocker && report.counts.blocker > 0) process.exitCode = 1;
|
|
4870
4693
|
await finish("completed", report);
|
|
4871
4694
|
} catch (error) {
|
|
4872
|
-
process.stderr.write(
|
|
4695
|
+
process.stderr.write(kleur4.red(M5().localFailed(error instanceof Error ? error.message : String(error))));
|
|
4873
4696
|
process.exitCode = 2;
|
|
4874
4697
|
await finish("failed");
|
|
4875
4698
|
}
|
|
4876
4699
|
return;
|
|
4877
4700
|
}
|
|
4878
|
-
process.stdout.write(
|
|
4701
|
+
process.stdout.write(kleur4.bold(M5().title));
|
|
4879
4702
|
const appsResult = await mcpCall(cfg.endpoint, cfg.token, "list_apps", {});
|
|
4880
4703
|
if (appsResult.isError) {
|
|
4881
|
-
process.stdout.write(
|
|
4704
|
+
process.stdout.write(kleur4.red(M5().appsFailed(appsResult.text)));
|
|
4882
4705
|
process.exit(1);
|
|
4883
4706
|
}
|
|
4884
4707
|
let appId = args.appId;
|
|
@@ -4886,32 +4709,32 @@ async function cmdCheck(argv) {
|
|
|
4886
4709
|
try {
|
|
4887
4710
|
const apps = JSON.parse(appsResult.text);
|
|
4888
4711
|
if (!Array.isArray(apps) || apps.length === 0) {
|
|
4889
|
-
process.stdout.write(
|
|
4712
|
+
process.stdout.write(kleur4.yellow(M5().noApps));
|
|
4890
4713
|
process.exit(0);
|
|
4891
4714
|
}
|
|
4892
4715
|
appId = apps[0].id;
|
|
4893
|
-
process.stdout.write(
|
|
4716
|
+
process.stdout.write(kleur4.dim(M5().app(apps[0].name ?? appId)));
|
|
4894
4717
|
} catch {
|
|
4895
|
-
process.stdout.write(
|
|
4718
|
+
process.stdout.write(kleur4.red(M5().appsParseFailed(appsResult.text.slice(0, 80))));
|
|
4896
4719
|
process.exit(1);
|
|
4897
4720
|
}
|
|
4898
4721
|
}
|
|
4899
|
-
process.stdout.write(
|
|
4722
|
+
process.stdout.write(M5().scoring);
|
|
4900
4723
|
const readinessResult = await mcpCall(cfg.endpoint, cfg.token, "get_readiness", { app_id: appId });
|
|
4901
4724
|
if (readinessResult.isError) {
|
|
4902
|
-
process.stdout.write(
|
|
4725
|
+
process.stdout.write(kleur4.red(M5().scoreFailed(readinessResult.text)));
|
|
4903
4726
|
process.exit(1);
|
|
4904
4727
|
}
|
|
4905
4728
|
let hasBlocker = false;
|
|
4906
4729
|
try {
|
|
4907
4730
|
const data = JSON.parse(readinessResult.text);
|
|
4908
4731
|
const score = data.score ?? 0;
|
|
4909
|
-
process.stdout.write(
|
|
4732
|
+
process.stdout.write(M5().score(renderScore(score)));
|
|
4910
4733
|
if (data.modules) {
|
|
4911
|
-
process.stdout.write(
|
|
4734
|
+
process.stdout.write(kleur4.dim(M5().byModule));
|
|
4912
4735
|
for (const [key, val] of Object.entries(data.modules)) {
|
|
4913
4736
|
const label = MODULE_LABELS[key] ?? key;
|
|
4914
|
-
const color = val >= 25 ?
|
|
4737
|
+
const color = val >= 25 ? kleur4.green : val >= 10 ? kleur4.yellow : kleur4.red;
|
|
4915
4738
|
process.stdout.write(` ${label.padEnd(12)} ${color(String(val).padStart(2))}/25
|
|
4916
4739
|
`);
|
|
4917
4740
|
}
|
|
@@ -4919,33 +4742,33 @@ async function cmdCheck(argv) {
|
|
|
4919
4742
|
}
|
|
4920
4743
|
if (data.blockers?.length) {
|
|
4921
4744
|
hasBlocker = true;
|
|
4922
|
-
process.stdout.write(
|
|
4923
|
-
for (const b of data.blockers) process.stdout.write(` ${
|
|
4745
|
+
process.stdout.write(kleur4.bold(M5().blockers));
|
|
4746
|
+
for (const b of data.blockers) process.stdout.write(` ${kleur4.red("\u2022")} ${b}
|
|
4924
4747
|
`);
|
|
4925
4748
|
process.stdout.write("\n");
|
|
4926
4749
|
}
|
|
4927
4750
|
if (data.warnings?.length) {
|
|
4928
|
-
process.stdout.write(
|
|
4929
|
-
for (const w of data.warnings) process.stdout.write(` ${
|
|
4751
|
+
process.stdout.write(kleur4.bold(M5().warnings));
|
|
4752
|
+
for (const w of data.warnings) process.stdout.write(` ${kleur4.yellow("\u2022")} ${w}
|
|
4930
4753
|
`);
|
|
4931
4754
|
process.stdout.write("\n");
|
|
4932
4755
|
}
|
|
4933
4756
|
const base = `${cfg.webBase}/apps/${appId}`;
|
|
4934
4757
|
const nextSteps = [];
|
|
4935
4758
|
if (data.modules) {
|
|
4936
|
-
if ((data.modules.integration ?? 25) < 25) nextSteps.push(
|
|
4937
|
-
if ((data.modules.copy ?? 25) < 25) nextSteps.push(
|
|
4938
|
-
if ((data.modules.screenshot ?? 25) < 25) nextSteps.push(
|
|
4939
|
-
if ((data.modules.checklist ?? 25) < 25) nextSteps.push(
|
|
4759
|
+
if ((data.modules.integration ?? 25) < 25) nextSteps.push(M5().stepIntegration(`${base}/integration`));
|
|
4760
|
+
if ((data.modules.copy ?? 25) < 25) nextSteps.push(M5().stepCopy(`${base}/copy`));
|
|
4761
|
+
if ((data.modules.screenshot ?? 25) < 25) nextSteps.push(M5().stepScreenshot(`${base}/screenshots`));
|
|
4762
|
+
if ((data.modules.checklist ?? 25) < 25) nextSteps.push(M5().stepChecklist(`${base}/launch`));
|
|
4940
4763
|
}
|
|
4941
4764
|
if (nextSteps.length) {
|
|
4942
|
-
process.stdout.write(
|
|
4943
|
-
for (const s of nextSteps) process.stdout.write(` ${
|
|
4765
|
+
process.stdout.write(kleur4.bold(M5().nextSteps));
|
|
4766
|
+
for (const s of nextSteps) process.stdout.write(` ${kleur4.cyan("\u2022")} ${s}
|
|
4944
4767
|
`);
|
|
4945
|
-
process.stdout.write(
|
|
4768
|
+
process.stdout.write(kleur4.dim(M5().preview));
|
|
4946
4769
|
}
|
|
4947
4770
|
if (!hasBlocker) {
|
|
4948
|
-
process.stdout.write(score >= 80 ?
|
|
4771
|
+
process.stdout.write(score >= 80 ? kleur4.green(M5().ready) : kleur4.yellow(M5().notReady(score)));
|
|
4949
4772
|
}
|
|
4950
4773
|
} catch {
|
|
4951
4774
|
for (const line of readinessResult.text.split("\n")) process.stdout.write(" " + line + "\n");
|
|
@@ -4955,7 +4778,7 @@ async function cmdCheck(argv) {
|
|
|
4955
4778
|
|
|
4956
4779
|
// src/notes.ts
|
|
4957
4780
|
import { createInterface } from "readline/promises";
|
|
4958
|
-
import
|
|
4781
|
+
import kleur5 from "kleur";
|
|
4959
4782
|
|
|
4960
4783
|
// ../core/src/ai.ts
|
|
4961
4784
|
var AI_MODEL = "claude-haiku-4-5-20251001";
|
|
@@ -4997,7 +4820,7 @@ async function loadAnthropic(apiKey) {
|
|
|
4997
4820
|
}
|
|
4998
4821
|
|
|
4999
4822
|
// src/notes.ts
|
|
5000
|
-
var
|
|
4823
|
+
var M6 = catalog(
|
|
5001
4824
|
{
|
|
5002
4825
|
// Claude 프롬프트
|
|
5003
4826
|
localeHint: (l) => `"${l}": "\uD574\uB2F9 \uC5B8\uC5B4\uB85C \uBC88\uC5ED\uB41C \uAC04\uACB0\uD55C \uBC84\uC804"`,
|
|
@@ -5046,7 +4869,7 @@ ${items}
|
|
|
5046
4869
|
hdrDetailed: "\u2500\u2500\u2500 \uC0C1\uC138 \uBC84\uC804 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n",
|
|
5047
4870
|
hdrMarketing: "\u2500\u2500\u2500 \uB9C8\uCF00\uD305 \uBC84\uC804 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n",
|
|
5048
4871
|
hdrLocalized: "\u2500\u2500\u2500 \uB2E4\uAD6D\uC5B4 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n",
|
|
5049
|
-
needAccount: "
|
|
4872
|
+
needAccount: "\uC6D0\uACA9 \uAE30\uB2A5\uC740 MIMI_SEED_WEB_BASE\uB97C \uD300 \uCF58\uC194 \uC8FC\uC18C\uB85C \uC124\uC815\uD558\uACE0 `mimi-seed init`\uC73C\uB85C \uC5F0\uACB0\uD558\uC138\uC694.\n",
|
|
5050
4873
|
choosePrompt: "\uC801\uC6A9\uD560 \uBC84\uC804 [1=\uAC04\uACB0/2=\uC0C1\uC138/3=\uB9C8\uCF00\uD305/Enter=\uAC74\uB108\uB700]: ",
|
|
5051
4874
|
skipped: "\uAC74\uB108\uB700.\n",
|
|
5052
4875
|
listAppsFailed: (msg) => `\uC571 \uBAA9\uB85D \uC870\uD68C \uC2E4\uD328: ${msg}
|
|
@@ -5107,7 +4930,7 @@ Update now.`,
|
|
|
5107
4930
|
hdrDetailed: "\u2500\u2500\u2500 Detailed \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n",
|
|
5108
4931
|
hdrMarketing: "\u2500\u2500\u2500 Marketing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n",
|
|
5109
4932
|
hdrLocalized: "\u2500\u2500\u2500 Localized \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n",
|
|
5110
|
-
needAccount: "
|
|
4933
|
+
needAccount: "For remote commands, set MIMI_SEED_WEB_BASE to your team console and run `mimi-seed init`.\n",
|
|
5111
4934
|
choosePrompt: "Which version? [1=concise/2=detailed/3=marketing/Enter=skip]: ",
|
|
5112
4935
|
skipped: "Skipped.\n",
|
|
5113
4936
|
listAppsFailed: (msg) => `Failed to list apps: ${msg}
|
|
@@ -5132,11 +4955,11 @@ function parseArgs(argv) {
|
|
|
5132
4955
|
if (argv[i] === "--no-interactive") args.noInteractive = true;
|
|
5133
4956
|
if (argv[i] === "--limit") {
|
|
5134
4957
|
const raw = argv[++i] ?? "";
|
|
5135
|
-
if (!/^\d+$/.test(raw) || Number(raw) < 1 || Number(raw) > MAX_LIMIT) return { error:
|
|
4958
|
+
if (!/^\d+$/.test(raw) || Number(raw) < 1 || Number(raw) > MAX_LIMIT) return { error: M6().invalidLimit(raw) };
|
|
5136
4959
|
args.limit = Number(raw);
|
|
5137
4960
|
}
|
|
5138
4961
|
}
|
|
5139
|
-
for (const ref of [args.from, args.to]) if (ref?.startsWith("-")) return { error:
|
|
4962
|
+
for (const ref of [args.from, args.to]) if (ref?.startsWith("-")) return { error: M6().invalidRef(ref) };
|
|
5140
4963
|
return args;
|
|
5141
4964
|
}
|
|
5142
4965
|
async function promptUser(question) {
|
|
@@ -5146,7 +4969,7 @@ async function promptUser(question) {
|
|
|
5146
4969
|
return answer.trim();
|
|
5147
4970
|
}
|
|
5148
4971
|
function buildReleaseNotesPrompt(commitsText, locales) {
|
|
5149
|
-
const m =
|
|
4972
|
+
const m = M6();
|
|
5150
4973
|
const toneHints = m.toneHints;
|
|
5151
4974
|
const localeList = locales.map((l) => m.localeHint(l)).join(",\n ");
|
|
5152
4975
|
const skeleton = [
|
|
@@ -5165,7 +4988,7 @@ async function generateWithClaude(commitsText, locales) {
|
|
|
5165
4988
|
model: AI_MODEL,
|
|
5166
4989
|
// mcp-server 의 generateReleaseNotes 기본값과 같은 상수 — 낮으면 다국어 JSON 이 한쪽 경로에서만 잘린다.
|
|
5167
4990
|
max_tokens: RELEASE_NOTES_MAX_TOKENS,
|
|
5168
|
-
system:
|
|
4991
|
+
system: M6().system,
|
|
5169
4992
|
messages: [{
|
|
5170
4993
|
role: "user",
|
|
5171
4994
|
content: buildReleaseNotesPrompt(commitsText, locales)
|
|
@@ -5173,7 +4996,7 @@ async function generateWithClaude(commitsText, locales) {
|
|
|
5173
4996
|
});
|
|
5174
4997
|
const text = response.content[0].type === "text" ? response.content[0].text : "";
|
|
5175
4998
|
const match = text.match(/\{[\s\S]*\}/);
|
|
5176
|
-
if (!match) throw new Error(
|
|
4999
|
+
if (!match) throw new Error(M6().parseFailed);
|
|
5177
5000
|
return JSON.parse(match[0]);
|
|
5178
5001
|
}
|
|
5179
5002
|
function generateTemplate(commits, locales) {
|
|
@@ -5183,7 +5006,7 @@ function generateTemplate(commits, locales) {
|
|
|
5183
5006
|
});
|
|
5184
5007
|
const concise = items.slice(0, 3).join("\n");
|
|
5185
5008
|
const detailed = items.join("\n");
|
|
5186
|
-
const marketing =
|
|
5009
|
+
const marketing = M6().marketingTemplate(items.slice(0, 5).join("\n"));
|
|
5187
5010
|
const localized = Object.fromEntries(locales.map((l) => [l, concise]));
|
|
5188
5011
|
return { concise, detailed, marketing, localized };
|
|
5189
5012
|
}
|
|
@@ -5198,57 +5021,57 @@ function parseFirstApp(text) {
|
|
|
5198
5021
|
async function cmdNotes(argv) {
|
|
5199
5022
|
const parsed = parseArgs(argv);
|
|
5200
5023
|
if ("error" in parsed) {
|
|
5201
|
-
process.stderr.write(
|
|
5024
|
+
process.stderr.write(kleur5.red(parsed.error));
|
|
5202
5025
|
process.exit(1);
|
|
5203
5026
|
}
|
|
5204
5027
|
const args = parsed;
|
|
5205
5028
|
const cwd = process.cwd();
|
|
5206
|
-
process.stdout.write(
|
|
5029
|
+
process.stdout.write(kleur5.bold(M6().title));
|
|
5207
5030
|
if (!isGitRepo(cwd)) {
|
|
5208
|
-
process.stdout.write(
|
|
5031
|
+
process.stdout.write(kleur5.red(M6().notGitRepo));
|
|
5209
5032
|
process.exit(1);
|
|
5210
5033
|
}
|
|
5211
5034
|
for (const [flag, ref] of [["--from", args.from], ["--to", args.to === "HEAD" ? void 0 : args.to]]) {
|
|
5212
5035
|
if (ref !== void 0 && !isCommitRef(cwd, ref)) {
|
|
5213
|
-
process.stdout.write(
|
|
5036
|
+
process.stdout.write(kleur5.red(M6().badRef(flag, ref)));
|
|
5214
5037
|
process.exit(1);
|
|
5215
5038
|
}
|
|
5216
5039
|
}
|
|
5217
5040
|
const latestTag = getLatestTag(cwd);
|
|
5218
5041
|
const fromRef = args.from ?? latestTag ?? void 0;
|
|
5219
5042
|
process.stdout.write(
|
|
5220
|
-
|
|
5043
|
+
kleur5.dim(fromRef ? M6().range(fromRef, args.to) : M6().recentCommits(args.limit))
|
|
5221
5044
|
);
|
|
5222
5045
|
const fromForGit = args.from ?? (latestTag ? `refs/tags/${latestTag}` : void 0);
|
|
5223
5046
|
const commits = getGitLog(cwd, { from: fromForGit, to: args.to, limit: args.limit });
|
|
5224
5047
|
if (commits.length === 0) {
|
|
5225
|
-
process.stdout.write(
|
|
5048
|
+
process.stdout.write(kleur5.yellow(M6().noCommits));
|
|
5226
5049
|
process.exit(0);
|
|
5227
5050
|
}
|
|
5228
|
-
process.stdout.write(
|
|
5051
|
+
process.stdout.write(kleur5.dim(M6().analyzing(commits.length)));
|
|
5229
5052
|
let result;
|
|
5230
5053
|
if (process.env.ANTHROPIC_API_KEY) {
|
|
5231
|
-
process.stdout.write(
|
|
5054
|
+
process.stdout.write(M6().generating);
|
|
5232
5055
|
try {
|
|
5233
5056
|
result = await generateWithClaude(formatCommitsForPrompt(commits), args.locales);
|
|
5234
5057
|
} catch (e) {
|
|
5235
|
-
process.stdout.write(
|
|
5058
|
+
process.stdout.write(kleur5.yellow(M6().aiFailed(e.message)));
|
|
5236
5059
|
result = generateTemplate(commits, args.locales);
|
|
5237
5060
|
}
|
|
5238
5061
|
} else {
|
|
5239
|
-
process.stdout.write(
|
|
5062
|
+
process.stdout.write(kleur5.dim(M6().noAnthropicKey) + kleur5.dim(M6().noAnthropicKeyHint));
|
|
5240
5063
|
result = generateTemplate(commits, args.locales);
|
|
5241
5064
|
}
|
|
5242
|
-
process.stdout.write(
|
|
5065
|
+
process.stdout.write(kleur5.bold(M6().hdrConcise));
|
|
5243
5066
|
process.stdout.write(result.concise + "\n\n");
|
|
5244
|
-
process.stdout.write(
|
|
5067
|
+
process.stdout.write(kleur5.bold(M6().hdrDetailed));
|
|
5245
5068
|
process.stdout.write(result.detailed + "\n\n");
|
|
5246
|
-
process.stdout.write(
|
|
5069
|
+
process.stdout.write(kleur5.bold(M6().hdrMarketing));
|
|
5247
5070
|
process.stdout.write(result.marketing + "\n\n");
|
|
5248
5071
|
if (Object.keys(result.localized).length > 0) {
|
|
5249
|
-
process.stdout.write(
|
|
5072
|
+
process.stdout.write(kleur5.bold(M6().hdrLocalized));
|
|
5250
5073
|
for (const [locale, text] of Object.entries(result.localized)) {
|
|
5251
|
-
process.stdout.write(
|
|
5074
|
+
process.stdout.write(kleur5.dim(`[${locale}]
|
|
5252
5075
|
`) + text + "\n\n");
|
|
5253
5076
|
}
|
|
5254
5077
|
}
|
|
@@ -5256,15 +5079,15 @@ async function cmdNotes(argv) {
|
|
|
5256
5079
|
if (!args.apply && !shouldPrompt) return;
|
|
5257
5080
|
const cfg = await getEffectiveConfig();
|
|
5258
5081
|
if (!cfg) {
|
|
5259
|
-
process.stdout.write(
|
|
5082
|
+
process.stdout.write(kleur5.yellow(M6().needAccount));
|
|
5260
5083
|
return;
|
|
5261
5084
|
}
|
|
5262
5085
|
let selectedText = result.concise;
|
|
5263
5086
|
let userSelectedTone = false;
|
|
5264
5087
|
if (shouldPrompt) {
|
|
5265
|
-
const choice = await promptUser(
|
|
5088
|
+
const choice = await promptUser(M6().choosePrompt);
|
|
5266
5089
|
if (!choice) {
|
|
5267
|
-
process.stdout.write(
|
|
5090
|
+
process.stdout.write(kleur5.dim(M6().skipped));
|
|
5268
5091
|
return;
|
|
5269
5092
|
}
|
|
5270
5093
|
if (choice === "2") selectedText = result.detailed;
|
|
@@ -5273,18 +5096,18 @@ async function cmdNotes(argv) {
|
|
|
5273
5096
|
}
|
|
5274
5097
|
const appsResult = await mcpCall(cfg.endpoint, cfg.token, "list_apps", {});
|
|
5275
5098
|
if (appsResult.isError) {
|
|
5276
|
-
process.stdout.write(
|
|
5099
|
+
process.stdout.write(kleur5.red(M6().listAppsFailed(appsResult.text)));
|
|
5277
5100
|
return;
|
|
5278
5101
|
}
|
|
5279
5102
|
const app = parseFirstApp(appsResult.text);
|
|
5280
5103
|
if (!app) {
|
|
5281
|
-
process.stdout.write(
|
|
5104
|
+
process.stdout.write(kleur5.yellow(M6().noApps));
|
|
5282
5105
|
return;
|
|
5283
5106
|
}
|
|
5284
5107
|
if (userSelectedTone && args.locales.length > 1) {
|
|
5285
|
-
process.stdout.write(
|
|
5108
|
+
process.stdout.write(kleur5.dim(M6().toneToAllLocales));
|
|
5286
5109
|
}
|
|
5287
|
-
process.stdout.write(
|
|
5110
|
+
process.stdout.write(M6().applying);
|
|
5288
5111
|
for (const locale of args.locales) {
|
|
5289
5112
|
const text = userSelectedTone ? selectedText : result.localized[locale] ?? selectedText;
|
|
5290
5113
|
const r = await mcpCall(cfg.endpoint, cfg.token, "apply_release_notes", {
|
|
@@ -5294,15 +5117,15 @@ async function cmdNotes(argv) {
|
|
|
5294
5117
|
text
|
|
5295
5118
|
}, { timeoutMs: MCP_WRITE_TIMEOUT_MS });
|
|
5296
5119
|
process.stdout.write(
|
|
5297
|
-
r.isError ?
|
|
5120
|
+
r.isError ? kleur5.red(M6().applyFailed(locale, r.text)) : kleur5.green(M6().applied(locale))
|
|
5298
5121
|
);
|
|
5299
5122
|
}
|
|
5300
5123
|
}
|
|
5301
5124
|
|
|
5302
5125
|
// src/review.ts
|
|
5303
5126
|
import { createInterface as createInterface2 } from "readline/promises";
|
|
5304
|
-
import
|
|
5305
|
-
var
|
|
5127
|
+
import kleur6 from "kleur";
|
|
5128
|
+
var M7 = catalog(
|
|
5306
5129
|
{
|
|
5307
5130
|
toneGuides: {
|
|
5308
5131
|
friendly: "\uCE5C\uADFC\uD558\uACE0 \uB530\uB73B\uD558\uAC8C. \uC774\uBAA8\uC9C0 1~2\uAC1C \uC0AC\uC6A9. \uAC10\uC0AC \uC778\uC0AC\uB85C \uC2DC\uC791.",
|
|
@@ -5346,7 +5169,7 @@ JSON\uC73C\uB85C\uB9CC \uC751\uB2F5: { "reply": "\uB2F5\uBCC0 \uD14D\uC2A4\uD2B8
|
|
|
5346
5169
|
draftWarning: "\n\u26A0 \uC774 \uB2F5\uBCC0\uC740 AI\uAC00 \uC0DD\uC131\uD55C \uCD08\uC548\uC785\uB2C8\uB2E4. \uAC8C\uC2DC \uC804 \uBC18\uB4DC\uC2DC \uAC80\uD1A0\uD558\uC138\uC694.\n\n",
|
|
5347
5170
|
postPrompt: "\uC774 \uB2F5\uBCC0\uC744 Play Store\uC5D0 \uAC8C\uC2DC\uD560\uAE4C\uC694? [y/N]: ",
|
|
5348
5171
|
skipped: "\uAC74\uB108\uB700.\n",
|
|
5349
|
-
needAccount: "
|
|
5172
|
+
needAccount: "\uC6D0\uACA9 \uAE30\uB2A5\uC740 MIMI_SEED_WEB_BASE\uB97C \uD300 \uCF58\uC194 \uC8FC\uC18C\uB85C \uC124\uC815\uD558\uACE0 `mimi-seed init`\uC73C\uB85C \uC5F0\uACB0\uD558\uC138\uC694.\n",
|
|
5350
5173
|
idsRequired: "--review-id \uC640 --package-name \uC774 \uD544\uC694\uD569\uB2C8\uB2E4.\n",
|
|
5351
5174
|
packagePrompt: "\uD328\uD0A4\uC9C0\uBA85 (\uC608: com.example.app): ",
|
|
5352
5175
|
reviewIdPrompt: "\uB9AC\uBDF0 ID: ",
|
|
@@ -5405,7 +5228,7 @@ Respond with JSON only: { "reply": "the reply text" }`,
|
|
|
5405
5228
|
draftWarning: "\n\u26A0 This reply is an AI-generated draft. Always review it before posting.\n\n",
|
|
5406
5229
|
postPrompt: "Post this reply to Play Store? [y/N]: ",
|
|
5407
5230
|
skipped: "Skipped.\n",
|
|
5408
|
-
needAccount: "
|
|
5231
|
+
needAccount: "For remote commands, set MIMI_SEED_WEB_BASE to your team console and run `mimi-seed init`.\n",
|
|
5409
5232
|
idsRequired: "--review-id and --package-name are required.\n",
|
|
5410
5233
|
packagePrompt: "Package name (e.g. com.example.app): ",
|
|
5411
5234
|
reviewIdPrompt: "Review ID: ",
|
|
@@ -5440,7 +5263,7 @@ async function promptUser2(question) {
|
|
|
5440
5263
|
}
|
|
5441
5264
|
async function generateReply(opts) {
|
|
5442
5265
|
const client = await loadAnthropic(process.env.ANTHROPIC_API_KEY);
|
|
5443
|
-
const m =
|
|
5266
|
+
const m = M7();
|
|
5444
5267
|
const toneGuides = m.toneGuides;
|
|
5445
5268
|
const sentimentPrompts = m.sentimentPrompts;
|
|
5446
5269
|
const localeNames = m.localeNames;
|
|
@@ -5466,71 +5289,238 @@ async function generateReply(opts) {
|
|
|
5466
5289
|
}
|
|
5467
5290
|
async function cmdReview(argv) {
|
|
5468
5291
|
const args = parseArgs2(argv);
|
|
5469
|
-
process.stdout.write(
|
|
5292
|
+
process.stdout.write(kleur6.bold(M7().title));
|
|
5470
5293
|
if (!process.env.ANTHROPIC_API_KEY) {
|
|
5471
|
-
process.stdout.write(
|
|
5472
|
-
process.stdout.write(
|
|
5294
|
+
process.stdout.write(kleur6.red(M7().noAnthropicKey));
|
|
5295
|
+
process.stdout.write(kleur6.dim(M7().noAnthropicKeyHint));
|
|
5473
5296
|
process.exit(1);
|
|
5474
5297
|
}
|
|
5475
5298
|
let reviewText = args.text;
|
|
5476
5299
|
if (!reviewText) {
|
|
5477
5300
|
if (args.noInteractive) {
|
|
5478
|
-
process.stdout.write(
|
|
5301
|
+
process.stdout.write(kleur6.red(M7().textRequired));
|
|
5479
5302
|
process.exit(1);
|
|
5480
5303
|
}
|
|
5481
|
-
process.stdout.write(
|
|
5304
|
+
process.stdout.write(kleur6.dim(M7().enterReview));
|
|
5482
5305
|
reviewText = await promptUser2("> ");
|
|
5483
5306
|
if (!reviewText) {
|
|
5484
|
-
process.stdout.write(
|
|
5307
|
+
process.stdout.write(kleur6.yellow(M7().noInput));
|
|
5485
5308
|
process.exit(0);
|
|
5486
5309
|
}
|
|
5487
5310
|
}
|
|
5488
5311
|
if (args.rating !== void 0) {
|
|
5489
5312
|
const stars = "\u2605".repeat(args.rating) + "\u2606".repeat(5 - args.rating);
|
|
5490
|
-
process.stdout.write(
|
|
5313
|
+
process.stdout.write(kleur6.dim(M7().meta(stars, args.tone, args.language)));
|
|
5491
5314
|
}
|
|
5492
|
-
process.stdout.write(
|
|
5315
|
+
process.stdout.write(M7().generating);
|
|
5493
5316
|
const reply = await generateReply({ ...args, text: reviewText });
|
|
5494
|
-
process.stdout.write("\n" +
|
|
5317
|
+
process.stdout.write("\n" + kleur6.bold(M7().hdrReply));
|
|
5495
5318
|
process.stdout.write(reply + "\n");
|
|
5496
|
-
process.stdout.write(
|
|
5319
|
+
process.stdout.write(kleur6.dim(M7().draftWarning));
|
|
5497
5320
|
const shouldPrompt = !args.apply && !args.noInteractive && process.stdout.isTTY;
|
|
5498
5321
|
if (!args.apply && !shouldPrompt) return;
|
|
5499
5322
|
let doApply = args.apply;
|
|
5500
5323
|
if (shouldPrompt) {
|
|
5501
|
-
const ans = await promptUser2(
|
|
5324
|
+
const ans = await promptUser2(M7().postPrompt);
|
|
5502
5325
|
doApply = ans.toLowerCase() === "y";
|
|
5503
5326
|
}
|
|
5504
5327
|
if (!doApply) {
|
|
5505
|
-
process.stdout.write(
|
|
5328
|
+
process.stdout.write(kleur6.dim(M7().skipped));
|
|
5506
5329
|
return;
|
|
5507
5330
|
}
|
|
5508
5331
|
const cfg = await getEffectiveConfig();
|
|
5509
5332
|
if (!cfg) {
|
|
5510
|
-
process.stdout.write(
|
|
5333
|
+
process.stdout.write(kleur6.yellow(M7().needAccount));
|
|
5511
5334
|
return;
|
|
5512
5335
|
}
|
|
5513
5336
|
let reviewId = args.reviewId;
|
|
5514
5337
|
let packageName = args.packageName;
|
|
5515
5338
|
if (!reviewId || !packageName) {
|
|
5516
5339
|
if (args.noInteractive) {
|
|
5517
|
-
process.stdout.write(
|
|
5340
|
+
process.stdout.write(kleur6.red(M7().idsRequired));
|
|
5518
5341
|
process.exit(1);
|
|
5519
5342
|
}
|
|
5520
|
-
if (!packageName) packageName = await promptUser2(
|
|
5521
|
-
if (!reviewId) reviewId = await promptUser2(
|
|
5343
|
+
if (!packageName) packageName = await promptUser2(M7().packagePrompt);
|
|
5344
|
+
if (!reviewId) reviewId = await promptUser2(M7().reviewIdPrompt);
|
|
5522
5345
|
}
|
|
5523
5346
|
if (!reviewId || !packageName) {
|
|
5524
|
-
process.stdout.write(
|
|
5347
|
+
process.stdout.write(kleur6.yellow(M7().notEnoughInfo));
|
|
5525
5348
|
return;
|
|
5526
5349
|
}
|
|
5527
|
-
process.stdout.write(
|
|
5350
|
+
process.stdout.write(M7().posting);
|
|
5528
5351
|
const r = await mcpCall(cfg.endpoint, cfg.token, "playstore_reply_review", {
|
|
5529
5352
|
package_name: packageName,
|
|
5530
5353
|
review_id: reviewId,
|
|
5531
5354
|
reply_text: reply
|
|
5532
5355
|
}, { timeoutMs: MCP_WRITE_TIMEOUT_MS });
|
|
5533
|
-
process.stdout.write(r.isError ?
|
|
5356
|
+
process.stdout.write(r.isError ? kleur6.red(M7().postFailed(r.text)) : kleur6.green(M7().posted));
|
|
5357
|
+
}
|
|
5358
|
+
|
|
5359
|
+
// src/auth.ts
|
|
5360
|
+
import kleur7 from "kleur";
|
|
5361
|
+
function log2(msg) {
|
|
5362
|
+
process.stdout.write(msg + "\n");
|
|
5363
|
+
}
|
|
5364
|
+
var M8 = catalog(
|
|
5365
|
+
{
|
|
5366
|
+
help: `${kleur7.bold("mimi-seed auth")} \u2014 \uB85C\uCEEC \uC790\uACA9\uC99D\uBA85 \uC778\uC99D/\uAD00\uB9AC
|
|
5367
|
+
|
|
5368
|
+
${kleur7.bold("Google OAuth (Firebase / AdMob / Play):")}
|
|
5369
|
+
${kleur7.cyan("mimi-seed auth login")} \uBE0C\uB77C\uC6B0\uC800\uB85C \uB85C\uADF8\uC778 (\uC774\uBBF8 \uC788\uC73C\uBA74 \uC790\uB3D9 refresh \uC2DC\uB3C4)
|
|
5370
|
+
${kleur7.cyan("mimi-seed auth status")} \uD604\uC7AC OAuth \uD1A0\uD070 \uC0C1\uD0DC
|
|
5371
|
+
${kleur7.cyan("mimi-seed auth refresh")} refresh_token\uC73C\uB85C \uAC31\uC2E0\uB9CC \uC2DC\uB3C4 (\uBE0C\uB77C\uC6B0\uC800 X)
|
|
5372
|
+
${kleur7.cyan("mimi-seed auth logout")} OAuth \uD1A0\uD070 \uC0AD\uC81C
|
|
5373
|
+
|
|
5374
|
+
${kleur7.bold("\uD50C\uB7AB\uD3FC\uBCC4 \uC790\uACA9\uC99D\uBA85:")}
|
|
5375
|
+
${kleur7.cyan("mimi-seed auth appstore")} App Store Connect API \uD0A4 (appstore.json)
|
|
5376
|
+
${kleur7.cyan("mimi-seed auth playstore")} Play \uC11C\uBE44\uC2A4 \uACC4\uC815 JSON \uB4F1\uB85D
|
|
5377
|
+
${kleur7.cyan("mimi-seed auth bigquery")} BigQuery \uC11C\uBE44\uC2A4 \uACC4\uC815 (Crashlytics export \uB4F1)
|
|
5378
|
+
${kleur7.cyan("mimi-seed auth drive")} Google Drive \uC11C\uBE44\uC2A4 \uACC4\uC815 (\uACF5\uC720 \uD3F4\uB354\xB7\uACF5\uC720 \uB4DC\uB77C\uC774\uBE0C \uC5C5\uB85C\uB4DC)
|
|
5379
|
+
|
|
5380
|
+
${kleur7.bold("\uBE4C\uB4DC / \uB9C8\uCF00\uD305:")}
|
|
5381
|
+
${kleur7.cyan("mimi-seed auth social")} YouTube \xB7 Facebook \xB7 Instagram \xB7 Threads \xB7 TikTok \uD55C \uBC88\uC5D0 (\uC5F0\uACB0\uB41C \uAC74 \uAC74\uB108\uB700)
|
|
5382
|
+
${kleur7.cyan("mimi-seed auth meta")} Facebook \xB7 Instagram \xB7 Threads \uD55C \uBC88\uC5D0
|
|
5383
|
+
${kleur7.cyan("mimi-seed auth jenkins")} Jenkins \uC5F0\uACB0 (jenkins.json)
|
|
5384
|
+
${kleur7.cyan("mimi-seed auth ci")} GitHub Actions / GitLab CI (ci.json)
|
|
5385
|
+
${kleur7.cyan("mimi-seed auth googleads")} Google Ads (google-ads.json)
|
|
5386
|
+
${kleur7.cyan("mimi-seed auth facebook")} Facebook \uD398\uC774\uC9C0
|
|
5387
|
+
${kleur7.cyan("mimi-seed auth instagram")} Instagram
|
|
5388
|
+
${kleur7.cyan("mimi-seed auth threads")} Threads (\uB0B4 Meta \uC571 \uBE0C\uB77C\uC6B0\uC800 \uB85C\uADF8\uC778 \xB7 \uD300 \uBE0C\uB85C\uCEE4 \xB7 \uD1A0\uD070)
|
|
5389
|
+
${kleur7.cyan("mimi-seed auth tiktok")} TikTok Business Organic API
|
|
5390
|
+
${kleur7.dim(" Instagram/Threads: --profile <id>\uB85C \uD2B9\uC815 \uC18C\uC15C \uD504\uB85C\uD544 \uC800\uC7A5/\uAC31\uC2E0. Instagram/Threads \uC218\uB3D9 \uD1A0\uD070 \uC785\uB825\uC740 --manual-token, \uC800\uC7A5\uB41C Meta \uC571 \uBCC0\uACBD\uC740 --reset-app")}
|
|
5391
|
+
|
|
5392
|
+
${kleur7.bold("\uC804\uCCB4 \uC0C1\uD0DC:")}
|
|
5393
|
+
${kleur7.cyan("mimi-seed auth status --all")} \uBAA8\uB4E0 \uC790\uACA9\uC99D\uBA85 \uBCF4\uC720 \uC5EC\uBD80 \uD55C\uB208\uC5D0
|
|
5394
|
+
|
|
5395
|
+
${kleur7.bold("\uD55C \uBC88\uC5D0 \uB2E4 \uC5F0\uACB0:")}
|
|
5396
|
+
${kleur7.cyan("mimi-seed setup")} \uC548\uB0B4\uB97C \uB530\uB77C\uAC00\uBA70 \uC21C\uC11C\uB300\uB85C \uC5F0\uACB0 (\uAD8C\uC7A5)
|
|
5397
|
+
|
|
5398
|
+
${kleur7.bold("login \uC635\uC158:")}
|
|
5399
|
+
--domains <ids> \uC694\uCCAD\uD560 \uAD8C\uD55C \uB3C4\uBA54\uC778\uB9CC \uC120\uD0DD (\uC27C\uD45C \uAD6C\uBD84, \uC608: ga4,googleads \u2014 \uAE30\uC874 \uAD8C\uD55C \uC720\uC9C0)
|
|
5400
|
+
--no-browser URL \uC790\uB3D9 \uC624\uD508 \uC548 \uD568 (\uC9C1\uC811 \uBCF5\uBD99)
|
|
5401
|
+
--timeout <\uCD08> \uCF5C\uBC31 \uB300\uAE30 \uC2DC\uAC04 (\uAE30\uBCF8 600)
|
|
5402
|
+
--force \uAE30\uC874 \uD1A0\uD070 \uBB34\uC2DC\uD558\uACE0 \uAC15\uC81C \uC7AC\uB85C\uADF8\uC778
|
|
5403
|
+
|
|
5404
|
+
${kleur7.dim(`\uB0B4\uBD80\uC801\uC73C\uB85C ${MCP_PKG} \uC758 mimi-seed-*-auth CLI\uB97C \uD638\uCD9C\uD569\uB2C8\uB2E4.`)}`,
|
|
5405
|
+
connectAll: "\n \uD55C \uBC88\uC5D0 \uC5F0\uACB0: mimi-seed setup"
|
|
5406
|
+
},
|
|
5407
|
+
{
|
|
5408
|
+
help: `${kleur7.bold("mimi-seed auth")} \u2014 local credential setup
|
|
5409
|
+
|
|
5410
|
+
${kleur7.bold("Google OAuth (Firebase / AdMob / Play):")}
|
|
5411
|
+
${kleur7.cyan("mimi-seed auth login")} sign in via browser (refreshes an existing token if it can)
|
|
5412
|
+
${kleur7.cyan("mimi-seed auth status")} current OAuth token status
|
|
5413
|
+
${kleur7.cyan("mimi-seed auth refresh")} refresh only, using refresh_token (no browser)
|
|
5414
|
+
${kleur7.cyan("mimi-seed auth logout")} delete the OAuth token
|
|
5415
|
+
|
|
5416
|
+
${kleur7.bold("Per-platform credentials:")}
|
|
5417
|
+
${kleur7.cyan("mimi-seed auth appstore")} App Store Connect API key (appstore.json)
|
|
5418
|
+
${kleur7.cyan("mimi-seed auth playstore")} register a Play service-account JSON
|
|
5419
|
+
${kleur7.cyan("mimi-seed auth bigquery")} BigQuery service account (Crashlytics export, etc.)
|
|
5420
|
+
${kleur7.cyan("mimi-seed auth drive")} Google Drive service account (uploads to shared folders / drives)
|
|
5421
|
+
|
|
5422
|
+
${kleur7.bold("Build / marketing:")}
|
|
5423
|
+
${kleur7.cyan("mimi-seed auth social")} YouTube \xB7 Facebook \xB7 Instagram \xB7 Threads \xB7 TikTok in one flow (skips connected ones)
|
|
5424
|
+
${kleur7.cyan("mimi-seed auth meta")} Facebook \xB7 Instagram \xB7 Threads in one flow
|
|
5425
|
+
${kleur7.cyan("mimi-seed auth jenkins")} Jenkins connection (jenkins.json)
|
|
5426
|
+
${kleur7.cyan("mimi-seed auth ci")} GitHub Actions / GitLab CI (ci.json)
|
|
5427
|
+
${kleur7.cyan("mimi-seed auth googleads")} Google Ads (google-ads.json)
|
|
5428
|
+
${kleur7.cyan("mimi-seed auth facebook")} Facebook Page
|
|
5429
|
+
${kleur7.cyan("mimi-seed auth instagram")} Instagram
|
|
5430
|
+
${kleur7.cyan("mimi-seed auth threads")} Threads (own Meta app browser login \xB7 team broker \xB7 token)
|
|
5431
|
+
${kleur7.cyan("mimi-seed auth tiktok")} TikTok Business Organic API
|
|
5432
|
+
${kleur7.dim(" Instagram/Threads: use --profile <id> to save or refresh a named social profile. Instagram/Threads manual tokens: --manual-token; change the saved Meta app: --reset-app")}
|
|
5433
|
+
|
|
5434
|
+
${kleur7.bold("Everything at a glance:")}
|
|
5435
|
+
${kleur7.cyan("mimi-seed auth status --all")} which credentials you have
|
|
5436
|
+
|
|
5437
|
+
${kleur7.bold("Connect them all in one pass:")}
|
|
5438
|
+
${kleur7.cyan("mimi-seed setup")} guided, one credential at a time (recommended)
|
|
5439
|
+
|
|
5440
|
+
${kleur7.bold("login options:")}
|
|
5441
|
+
--domains <ids> request only these permission domains (comma-separated, e.g. ga4,googleads \u2014 prior grants are kept)
|
|
5442
|
+
--no-browser don't open the URL automatically (paste it yourself)
|
|
5443
|
+
--timeout <sec> how long to wait for the callback (default 600)
|
|
5444
|
+
--force ignore the existing token and sign in again
|
|
5445
|
+
|
|
5446
|
+
${kleur7.dim(`Under the hood this calls the mimi-seed-*-auth CLIs from ${MCP_PKG}.`)}`,
|
|
5447
|
+
connectAll: "\n Connect everything at once: mimi-seed setup"
|
|
5448
|
+
}
|
|
5449
|
+
);
|
|
5450
|
+
var SOCIAL_CREDENTIALS = ["youtube", "facebook", "instagram", "threads", "tiktok"];
|
|
5451
|
+
function printAuthHelp() {
|
|
5452
|
+
log2(M8().help);
|
|
5453
|
+
}
|
|
5454
|
+
function printAllCredStatus() {
|
|
5455
|
+
log2(kleur7.bold(t().auth.statusTitle + " ") + kleur7.dim("(~/.mimi-seed)"));
|
|
5456
|
+
const detected = detectAll();
|
|
5457
|
+
for (const spec of CREDENTIALS) {
|
|
5458
|
+
const d = detected.get(spec.id);
|
|
5459
|
+
const mark = d.freshness === "expired" ? kleur7.red("\u2717") : d.freshness === "expiring" ? kleur7.yellow("!") : d.present ? kleur7.green("\u2713") : isSatisfied(spec, detected) ? kleur7.yellow("~") : spec.requirement === "optional" ? kleur7.dim("\xB7") : kleur7.red("\u2717");
|
|
5460
|
+
const tail = d.freshness === "expired" ? kleur7.red(`${t().setup.tokenExpired} \u2192 ${spec.fix}`) : d.freshness === "expiring" ? kleur7.yellow(`${t().setup.tokenExpiring(d.daysRemaining ?? 0)} \u2192 ${spec.fix}`) : d.present ? kleur7.dim(d.detail ?? "") : kleur7.dim(`\u2192 ${spec.fix}`);
|
|
5461
|
+
log2(` ${mark} ${credLabel(spec).padEnd(24)} ${tail}`);
|
|
5462
|
+
}
|
|
5463
|
+
log2(kleur7.dim(M8().connectAll));
|
|
5464
|
+
}
|
|
5465
|
+
async function cmdAuth(args) {
|
|
5466
|
+
const sub = args[0];
|
|
5467
|
+
const rest = args.slice(1);
|
|
5468
|
+
if (sub === "--help" || sub === "-h" || sub === "help") {
|
|
5469
|
+
printAuthHelp();
|
|
5470
|
+
return;
|
|
5471
|
+
}
|
|
5472
|
+
if (sub === "status" && rest.includes("--all")) {
|
|
5473
|
+
printAllCredStatus();
|
|
5474
|
+
return;
|
|
5475
|
+
}
|
|
5476
|
+
if (sub === "appstore") return void exitWith(await runMcpBin("mimi-seed-appstore-auth", rest));
|
|
5477
|
+
if (sub === "playstore") return void exitWith(await runMcpBin("mimi-seed-playstore-auth", rest));
|
|
5478
|
+
if (sub === "bigquery") return void exitWith(await runMcpBin("mimi-seed-bigquery-auth", rest));
|
|
5479
|
+
if (sub === "drive") return void exitWith(await runMcpBin("mimi-seed-drive-auth", rest));
|
|
5480
|
+
if (sub === "jenkins") return void exitWith(await runMcpBin("mimi-seed-jenkins-auth", rest));
|
|
5481
|
+
if (sub === "googleads") return void exitWith(await runMcpBin("mimi-seed-googleads-auth", rest));
|
|
5482
|
+
if (sub === "meta") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["all", ...rest]));
|
|
5483
|
+
if (sub === "facebook") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["facebook", ...rest]));
|
|
5484
|
+
if (sub === "instagram") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["instagram", ...rest]));
|
|
5485
|
+
if (sub === "threads") return void exitWith(await runMcpBin("mimi-seed-social-auth", ["threads", ...rest]));
|
|
5486
|
+
if (sub === "tiktok") return void exitWith(await runMcpBin("mimi-seed-tiktok-business-auth", rest));
|
|
5487
|
+
if (sub === "social") {
|
|
5488
|
+
const { cmdSetup: cmdSetup2 } = await import("./setup-QETGLQDD.js");
|
|
5489
|
+
await cmdSetup2(["--only", SOCIAL_CREDENTIALS.join(","), ...rest]);
|
|
5490
|
+
return;
|
|
5491
|
+
}
|
|
5492
|
+
if (sub === "ci") {
|
|
5493
|
+
const { cmdSetup: cmdSetup2 } = await import("./setup-QETGLQDD.js");
|
|
5494
|
+
await cmdSetup2(["--only", "github,gitlab", "--reconnect", "github,gitlab"]);
|
|
5495
|
+
return;
|
|
5496
|
+
}
|
|
5497
|
+
if (sub?.startsWith("--")) {
|
|
5498
|
+
return void exitWith(await runMcpBin("mimi-seed-auth", args));
|
|
5499
|
+
}
|
|
5500
|
+
let mcpArgs;
|
|
5501
|
+
switch (sub) {
|
|
5502
|
+
case void 0:
|
|
5503
|
+
case "login":
|
|
5504
|
+
mcpArgs = rest;
|
|
5505
|
+
break;
|
|
5506
|
+
case "status":
|
|
5507
|
+
mcpArgs = ["--status", ...rest];
|
|
5508
|
+
break;
|
|
5509
|
+
case "refresh":
|
|
5510
|
+
mcpArgs = ["--refresh", ...rest];
|
|
5511
|
+
break;
|
|
5512
|
+
case "logout":
|
|
5513
|
+
mcpArgs = ["--logout", ...rest];
|
|
5514
|
+
break;
|
|
5515
|
+
default:
|
|
5516
|
+
log2(kleur7.red(t().auth.unknownSub(sub ?? "")));
|
|
5517
|
+
printAuthHelp();
|
|
5518
|
+
process.exit(1);
|
|
5519
|
+
}
|
|
5520
|
+
exitWith(await runMcpBin("mimi-seed-auth", mcpArgs));
|
|
5521
|
+
}
|
|
5522
|
+
function exitWith(code) {
|
|
5523
|
+
if (code !== 0) process.exit(code);
|
|
5534
5524
|
}
|
|
5535
5525
|
|
|
5536
5526
|
// src/lang.ts
|
|
@@ -5574,14 +5564,14 @@ var M9 = catalog(
|
|
|
5574
5564
|
{
|
|
5575
5565
|
// 명령별 상세 사용법 (SSOT). `mimi-seed <command> --help` 와 overview 가 공유.
|
|
5576
5566
|
usage: {
|
|
5577
|
-
telemetry: "mimi-seed telemetry on|off|status \u2014 \uC120\uD0DD\uC801 \uC0AC\uC6A9\uB7C9 \uCE21\uC815. \uAE30\uBCF8 \uAEBC\uC9D0. \uC784\uC758 \uC124\uCE58 ID, \uD504\uB85C\uC81D\uD2B8 \uD574\uC2DC, \uBC84\uC804, OS, \uACB0\uACFC \uCF54\uB4DC\uC640 \uC2E4\uD589\uC2DC\uAC04\uC744 \uC804\uC1A1\uD569\uB2C8\uB2E4. \uAC1C\uC778\uC815\uBCF4 \uC548\uB0B4: https://mimi-seed
|
|
5567
|
+
telemetry: "mimi-seed telemetry on|off|status \u2014 \uC120\uD0DD\uC801 \uC0AC\uC6A9\uB7C9 \uCE21\uC815. \uAE30\uBCF8 \uAEBC\uC9D0. \uC784\uC758 \uC124\uCE58 ID, \uD504\uB85C\uC81D\uD2B8 \uD574\uC2DC, \uBC84\uC804, OS, \uACB0\uACFC \uCF54\uB4DC\uC640 \uC2E4\uD589\uC2DC\uAC04\uC744 \uC804\uC1A1\uD569\uB2C8\uB2E4. \uAC1C\uC778\uC815\uBCF4 \uC548\uB0B4: https://github.com/jeonghwanko/mimi-seed-sdk/blob/main/docs/growth/measurement.md . MIMI_SEED_TELEMETRY=0\uC740 \uD56D\uC0C1 \uC804\uC1A1\uC744 \uB055\uB2C8\uB2E4.",
|
|
5578
5568
|
init: `${kleur9.bold("mimi-seed init")} \u2014 \uD604\uC7AC \uD504\uB85C\uC81D\uD2B8\uB97C Mimi Seed\uC5D0 \uC5F0\uACB0
|
|
5579
5569
|
|
|
5580
|
-
\uC571 \uC790\uB3D9 \uAC10\uC9C0(Expo/Gradle/Info.plist/pbxproj) \
|
|
5570
|
+
\uC571 \uC790\uB3D9 \uAC10\uC9C0(Expo/Gradle/Info.plist/pbxproj) (MIMI_SEED_WEB_BASE\uB97C \uC9C0\uC815\uD55C \uACBD\uC6B0\uC5D0\uB9CC \uC6D0\uACA9 \uC5F0\uACB0)
|
|
5581
5571
|
+ .claude/mimi-seed.md, AGENTS.md, docs/releases.json \uC0DD\uC131/\uD655\uC778.
|
|
5582
5572
|
|
|
5583
5573
|
\uC635\uC158:
|
|
5584
|
-
--local \
|
|
5574
|
+
--local \uC790\uCCB4 \uC6B4\uC601 \uCF58\uC194\uC774 \uC124\uC815\uB3FC \uC788\uC5B4\uB3C4 \uB85C\uCEEC \uD504\uB85C\uC81D\uD2B8\uB9CC \uCD08\uAE30\uD654`,
|
|
5585
5575
|
setup: `${kleur9.bold("mimi-seed setup")} \u2014 \uAC00\uC9C4 \uACC4\uC815\uC744 \uD55C \uBC88\uC5D0 \uC5F0\uACB0 (\uC548\uB0B4\uD615 \uB9C8\uBC95\uC0AC)
|
|
5586
5576
|
|
|
5587
5577
|
\uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uBA3C\uC800 \uBCF4\uC5EC\uC8FC\uACE0, \uC544\uC9C1 \uC5F0\uACB0\uB418\uC9C0 \uC54A\uC740 \uAC83\uB9CC \uC21C\uC11C\uB300\uB85C \uBB3C\uC5B4\uBCF8\uB2E4.
|
|
@@ -5620,7 +5610,7 @@ ${kleur9.dim("setup \uB9C8\uBC95\uC0AC\uAC00 \uCCAB \uC2E4\uD589 \uB54C \uBB3C\u
|
|
|
5620
5610
|
doctor: `${kleur9.bold("mimi-seed doctor")} \u2014 \uD658\uACBD \uC9C4\uB2E8 (\uD1A0\uD070\xB7Node\xB7Git\xB7\uD504\uB85C\uC81D\uD2B8\xB7CI)
|
|
5621
5611
|
|
|
5622
5612
|
\uAE30\uBCF8\uC740 \uC9C4\uB2E8\uB9CC \uD558\uACE0 exit 0. Mimi Seed \uD074\uB77C\uC6B0\uB4DC \uD1A0\uD070\uC740 \uC6D0\uACA9 \uAE30\uB2A5
|
|
5623
|
-
(
|
|
5613
|
+
(MIMI_SEED_WEB_BASE \xB7 .mimi-seed-link.json)\uC744 \uC4F8 \uB54C\uB9CC, App Store Connect \uB294
|
|
5624
5614
|
\uD504\uB85C\uC81D\uD2B8\uC5D0 iOS \uC571\uC774 \uC788\uC744 \uB54C\uB9CC \u2717 \uB85C \uBCF8\uB2E4.
|
|
5625
5615
|
|
|
5626
5616
|
\uC635\uC158:
|
|
@@ -5718,23 +5708,23 @@ ${kleur9.dim("\uAC01 \uBA85\uB839 \uC0C1\uC138 \uC635\uC158:")} ${kleur9.cyan("m
|
|
|
5718
5708
|
|
|
5719
5709
|
${kleur9.bold("\uD658\uACBD\uBCC0\uC218:")}
|
|
5720
5710
|
MIMI_SEED_TOKEN PAT \uD1A0\uD070 (CI/CD \uBB34\uC778\uC99D \uBAA8\uB4DC)
|
|
5721
|
-
MIMI_SEED_WEB_BASE \
|
|
5711
|
+
MIMI_SEED_WEB_BASE \uC790\uCCB4 \uC6B4\uC601 \uCF58\uC194 \uC8FC\uC18C (\uC120\uD0DD)
|
|
5722
5712
|
ANTHROPIC_API_KEY AI \uB178\uD2B8 \uC0DD\uC131 \uD65C\uC131\uD654 (\uC120\uD0DD)
|
|
5723
5713
|
MIMI_SEED_LANG \uCD9C\uB825 \uC5B8\uC5B4 \uAC15\uC81C (ko / en) \u2014 settings.json \uBCF4\uB2E4 \uC6B0\uC120
|
|
5724
5714
|
MIMI_SEED_GOOGLE_CLIENT_ID / _SECRET
|
|
5725
|
-
\
|
|
5715
|
+
\uCD5C\uCD08 \uC5F0\uACB0\uC6A9 Google \uB370\uC2A4\uD06C\uD1B1 \uC571 OAuth \uD074\uB77C\uC774\uC5B8\uD2B8 (\uC7AC\uB85C\uADF8\uC778\uC740 \uC800\uC7A5\uB41C \uC124\uC815 \uC0AC\uC6A9 \uAC00\uB2A5)
|
|
5726
5716
|
`
|
|
5727
5717
|
},
|
|
5728
5718
|
{
|
|
5729
5719
|
usage: {
|
|
5730
|
-
telemetry: "mimi-seed telemetry on|off|status \u2014 optional usage measurement, off by default. Sends a random installation ID, project hash, version, OS, result codes and duration. Privacy: https://mimi-seed
|
|
5720
|
+
telemetry: "mimi-seed telemetry on|off|status \u2014 optional usage measurement, off by default. Sends a random installation ID, project hash, version, OS, result codes and duration. Privacy: https://github.com/jeonghwanko/mimi-seed-sdk/blob/main/docs/growth/measurement.md . MIMI_SEED_TELEMETRY=0 always disables transmission.",
|
|
5731
5721
|
init: `${kleur9.bold("mimi-seed init")} \u2014 connect the current project to Mimi Seed
|
|
5732
5722
|
|
|
5733
|
-
Auto-detects apps (Expo/Gradle/Info.plist/pbxproj)
|
|
5723
|
+
Auto-detects apps (Expo/Gradle/Info.plist/pbxproj) (remote registration only with MIMI_SEED_WEB_BASE)
|
|
5734
5724
|
+ creates/verifies .claude/mimi-seed.md, AGENTS.md, docs/releases.json.
|
|
5735
5725
|
|
|
5736
5726
|
Options:
|
|
5737
|
-
--local
|
|
5727
|
+
--local scaffold locally even when a team console is configured`,
|
|
5738
5728
|
setup: `${kleur9.bold("mimi-seed setup")} \u2014 connect the accounts you have, in one pass (guided wizard)
|
|
5739
5729
|
|
|
5740
5730
|
Shows the connection status first, then asks only about what is not connected yet.
|
|
@@ -5773,7 +5763,7 @@ ${kleur9.dim("The setup wizard asks on first run, so you rarely need to type thi
|
|
|
5773
5763
|
doctor: `${kleur9.bold("mimi-seed doctor")} \u2014 environment check (token \xB7 Node \xB7 Git \xB7 project \xB7 CI)
|
|
5774
5764
|
|
|
5775
5765
|
By default it only reports and exits 0. The Mimi Seed cloud token is only a \u2717 when remote features
|
|
5776
|
-
are configured (
|
|
5766
|
+
are configured (MIMI_SEED_WEB_BASE \xB7 .mimi-seed-link.json), and App Store Connect
|
|
5777
5767
|
only when the project has an iOS app.
|
|
5778
5768
|
|
|
5779
5769
|
Options:
|
|
@@ -5871,11 +5861,11 @@ ${kleur9.dim("Per-command options:")} ${kleur9.cyan("mimi-seed <command> --help"
|
|
|
5871
5861
|
|
|
5872
5862
|
${kleur9.bold("Environment variables:")}
|
|
5873
5863
|
MIMI_SEED_TOKEN PAT token (headless CI/CD mode)
|
|
5874
|
-
MIMI_SEED_WEB_BASE
|
|
5864
|
+
MIMI_SEED_WEB_BASE team-operated console URL (optional)
|
|
5875
5865
|
ANTHROPIC_API_KEY enable AI note generation (optional)
|
|
5876
5866
|
MIMI_SEED_LANG force the output language (ko / en) \u2014 beats settings.json
|
|
5877
5867
|
MIMI_SEED_GOOGLE_CLIENT_ID / _SECRET
|
|
5878
|
-
|
|
5868
|
+
Google Desktop app OAuth client for first sign-in (a returning profile can reuse its saved client)
|
|
5879
5869
|
`
|
|
5880
5870
|
}
|
|
5881
5871
|
);
|
|
@@ -6696,7 +6686,7 @@ async function cmdRestart(args) {
|
|
|
6696
6686
|
// src/index.ts
|
|
6697
6687
|
var M12 = catalog(
|
|
6698
6688
|
{
|
|
6699
|
-
notConnected: "\
|
|
6689
|
+
notConnected: "\uC6D0\uACA9 \uAE30\uB2A5\uC5D0\uB294 \uD300 \uCF58\uC194 \uC5F0\uACB0\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. MIMI_SEED_WEB_BASE\uB97C \uC9C0\uC815\uD558\uACE0 mimi-seed init\uC744 \uC2E4\uD589\uD558\uC138\uC694.",
|
|
6700
6690
|
statusTitle: "Mimi Seed \uC5F0\uACB0 \uC0C1\uD0DC",
|
|
6701
6691
|
statusToken: (prefix, date) => ` \uD1A0\uD070: ${prefix}\u2026 (${date})`,
|
|
6702
6692
|
statusEndpoint: (endpoint) => ` \uC5D4\uB4DC\uD3EC\uC778\uD2B8: ${endpoint}`,
|
|
@@ -6711,10 +6701,18 @@ var M12 = catalog(
|
|
|
6711
6701
|
codexAuto: "\uC790\uB3D9 \uB4F1\uB85D:",
|
|
6712
6702
|
codexManual: "\uC218\uB3D9 \uB4F1\uB85D \uC608\uC2DC (~/.codex/config.toml) \u2014 \uD1A0\uD070\uC740 MIMI_SEED_TOKEN \uD658\uACBD\uBCC0\uC218\uB85C:",
|
|
6713
6703
|
claudeTitle: "Claude Code MCP \uB4F1\uB85D \u2014 \uC544\uB798 \uD55C \uC904\uC744 \uADF8\uB300\uB85C \uC2E4\uD589\uD558\uC138\uC694:",
|
|
6714
|
-
claudeWarn: " \u26A0 \uC2E4\uC81C \uD1A0\uD070\uC774 \uD3EC\uD568\uB41C \uBA85\uB839\uC785\uB2C8\uB2E4 (\uC178 \uD788\uC2A4\uD1A0\uB9AC\uC5D0 \uB0A8\uC74C). \uD1A0\uD070\uC740 ~/.mimi-seed/config.json \uC5D0\uB3C4 \uC800\uC7A5\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."
|
|
6704
|
+
claudeWarn: " \u26A0 \uC2E4\uC81C \uD1A0\uD070\uC774 \uD3EC\uD568\uB41C \uBA85\uB839\uC785\uB2C8\uB2E4 (\uC178 \uD788\uC2A4\uD1A0\uB9AC\uC5D0 \uB0A8\uC74C). \uD1A0\uD070\uC740 ~/.mimi-seed/config.json \uC5D0\uB3C4 \uC800\uC7A5\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",
|
|
6705
|
+
webBaseIgnored: (problem) => `\u26A0 MIMI_SEED_WEB_BASE \uB97C \uBB34\uC2DC\uD569\uB2C8\uB2E4: ${{
|
|
6706
|
+
invalid: "URL \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4",
|
|
6707
|
+
retired: "\uC885\uB8CC\uB41C \uACF5\uAC1C \uCF58\uC194 \uC8FC\uC18C\uC785\uB2C8\uB2E4",
|
|
6708
|
+
"not-https": "https \uAC00 \uC544\uB2D9\uB2C8\uB2E4 (http \uB294 localhost \uAC1C\uBC1C \uC11C\uBC84\uB9CC)",
|
|
6709
|
+
credentials: "URL \uC5D0 \uC0AC\uC6A9\uC790 \uC815\uBCF4\uAC00 \uB4E4\uC5B4 \uC788\uC2B5\uB2C8\uB2E4",
|
|
6710
|
+
query: "? \uB098 # \uB97C \uD3EC\uD568\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
6711
|
+
path: "\uD300 \uCF58\uC194\uC758 \uB8E8\uD2B8 \uC8FC\uC18C\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4 (\uC608: https://console.example.com \u2014 \uACBD\uB85C \uC5C6\uC774)"
|
|
6712
|
+
}[problem]}. \uC6D0\uACA9 \uAE30\uB2A5\uC740 \uC5F0\uACB0\uB418\uC9C0 \uC54A\uC740 \uAC83\uC73C\uB85C \uB3D9\uC791\uD569\uB2C8\uB2E4.`
|
|
6715
6713
|
},
|
|
6716
6714
|
{
|
|
6717
|
-
notConnected: "
|
|
6715
|
+
notConnected: "For remote commands, set MIMI_SEED_WEB_BASE to your team console and run mimi-seed init.",
|
|
6718
6716
|
statusTitle: "Mimi Seed connection status",
|
|
6719
6717
|
statusToken: (prefix, date) => ` Token: ${prefix}\u2026 (${date})`,
|
|
6720
6718
|
statusEndpoint: (endpoint) => ` Endpoint: ${endpoint}`,
|
|
@@ -6729,7 +6727,15 @@ var M12 = catalog(
|
|
|
6729
6727
|
codexAuto: "Automatic:",
|
|
6730
6728
|
codexManual: "Manual example (~/.codex/config.toml) \u2014 token via the MIMI_SEED_TOKEN env var:",
|
|
6731
6729
|
claudeTitle: "Claude Code MCP registration \u2014 run this one line as-is:",
|
|
6732
|
-
claudeWarn: " \u26A0 This command contains the real token (it stays in your shell history). The token is also stored in ~/.mimi-seed/config.json."
|
|
6730
|
+
claudeWarn: " \u26A0 This command contains the real token (it stays in your shell history). The token is also stored in ~/.mimi-seed/config.json.",
|
|
6731
|
+
webBaseIgnored: (problem) => `\u26A0 Ignoring MIMI_SEED_WEB_BASE: ${{
|
|
6732
|
+
invalid: "it is not a URL",
|
|
6733
|
+
retired: "it is the retired public console",
|
|
6734
|
+
"not-https": "it is not https (http only for a localhost dev server)",
|
|
6735
|
+
credentials: "it contains user credentials",
|
|
6736
|
+
query: "it cannot contain ? or #",
|
|
6737
|
+
path: "only the team console's root address is accepted (e.g. https://console.example.com, no path)"
|
|
6738
|
+
}[problem]}. Remote features behave as not connected.`
|
|
6733
6739
|
}
|
|
6734
6740
|
);
|
|
6735
6741
|
function log6(msg) {
|
|
@@ -6802,6 +6808,9 @@ async function main() {
|
|
|
6802
6808
|
log6(version);
|
|
6803
6809
|
return;
|
|
6804
6810
|
}
|
|
6811
|
+
const webBaseProblem = consoleBaseProblem(process.env.MIMI_SEED_WEB_BASE);
|
|
6812
|
+
if (webBaseProblem) process.stderr.write(`${M12().webBaseIgnored(webBaseProblem)}
|
|
6813
|
+
`);
|
|
6805
6814
|
if (cmd && cmd !== "auth" && (restArgs.includes("--help") || restArgs.includes("-h"))) {
|
|
6806
6815
|
if (printCommandHelp(cmd)) return;
|
|
6807
6816
|
}
|