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