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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # mimi-seed
2
2
 
3
- Find mobile release risks before connecting store accounts.
3
+ [Mimi Seed](https://mimi-seed.oddbout.com/en/) helps you find mobile release risks before connecting store accounts.
4
4
 
5
5
  ```bash
6
6
  npx -y mimi-seed@latest check --local
@@ -12,7 +12,7 @@ Store Connect SDK minimum, and legacy Firebase Cloud Messaging API usage, with s
12
12
  Unresolved evidence remains a warning. A local pass does not guarantee store approval.
13
13
 
14
14
  The checker is bundled; it does not install the full MCP server. Optional usage measurement is off by
15
- default. See `mimi-seed telemetry --help` and the [privacy notice](https://mimi-seed.pryzm.gg/privacy/sdk-usage).
15
+ default. See `mimi-seed telemetry --help` and the [measurement guide](https://github.com/jeonghwanko/mimi-seed-sdk/blob/main/docs/growth/measurement.md).
16
16
 
17
17
  `@anthropic-ai/sdk` is an optional dependency, loaded only for AI release notes and review replies. A default
18
18
  `npm install` still includes it (about 33 MB). `check` and `--version` work without it:
@@ -26,14 +26,14 @@ project and set `ANTHROPIC_API_KEY`.
26
26
 
27
27
  ## Next steps
28
28
 
29
- - Connect store checks: `npx mimi-seed init`, then `npx mimi-seed setup`.
29
+ - Connect accounts for the local MCP tools: `npx mimi-seed setup`.
30
30
  - Repeat in CI: `npx mimi-seed check --local --fail-on-blocker`.
31
31
  - Switch output language: `mimi-seed lang en`.
32
32
  - Full options: `mimi-seed <command> --help`.
33
33
 
34
34
  [Claude Code / Codex installation](https://github.com/jeonghwanko/mimi-seed-sdk#30-second-setup)
35
35
  · [CI workflow and badge](https://github.com/jeonghwanko/mimi-seed-sdk/blob/main/docs/user-guide/release-doctor-ci.md)
36
- · [Validation examples](https://mimi-seed.pryzm.gg/guides/validation-examples)
36
+ · [Validation examples](https://github.com/jeonghwanko/mimi-seed-sdk/blob/main/docs/user-guide/release-doctor-validation.md)
37
37
 
38
38
  ## Commands
39
39
 
@@ -5,6 +5,41 @@ import kleur2 from "kleur";
5
5
  import * as readline2 from "readline";
6
6
  import os10 from "os";
7
7
 
8
+ // ../core/src/console-url.ts
9
+ var RETIRED_HOSTS = /* @__PURE__ */ new Set(["mimi-seed.pryzm.gg", "mimi-seed.oddbout.com"]);
10
+ var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]"]);
11
+ function inspect(value) {
12
+ let url;
13
+ try {
14
+ url = new URL(value);
15
+ } catch {
16
+ return null;
17
+ }
18
+ const host = url.hostname.replace(/\.$/, "");
19
+ if (RETIRED_HOSTS.has(host)) return { url, problem: "retired" };
20
+ if (url.protocol !== "https:" && !(LOOPBACK_HOSTS.has(host) && url.protocol === "http:")) return { url, problem: "not-https" };
21
+ if (url.username || url.password) return { url, problem: "credentials" };
22
+ if (url.search || url.hash || /[?#]/.test(value)) return { url, problem: "query" };
23
+ return { url, problem: null };
24
+ }
25
+ function consoleUrl(value) {
26
+ if (!value) return null;
27
+ const inspected = inspect(value);
28
+ if (!inspected || inspected.problem) return null;
29
+ return inspected.url.href.replace(/\/+$/, "");
30
+ }
31
+ function consoleBaseProblem(value) {
32
+ if (!value) return null;
33
+ const inspected = inspect(value);
34
+ if (!inspected) return "invalid";
35
+ if (inspected.problem) return inspected.problem;
36
+ return inspected.url.pathname === "/" ? null : "path";
37
+ }
38
+ function consoleBase(value) {
39
+ if (consoleBaseProblem(value) !== null || !value) return null;
40
+ return new URL(value).origin;
41
+ }
42
+
8
43
  // src/credentials.ts
9
44
  import fs5 from "fs";
10
45
  import os3 from "os";
@@ -119,9 +154,9 @@ var ko = {
119
154
  secEnv: "\uB85C\uCEEC \uD658\uACBD",
120
155
  secApps: "\uC571 \uAC10\uC9C0",
121
156
  noToken: "Mimi Seed \uD1A0\uD070 \uC5C6\uC74C",
122
- noTokenFix: "`mimi-seed init` \uC2E4\uD589 \uD544\uC694",
157
+ noTokenFix: "\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.",
123
158
  noTokenLocal: "Mimi Seed \uD074\uB77C\uC6B0\uB4DC \uACC4\uC815 \uBBF8\uC5F0\uACB0",
124
- noTokenLocalDetail: "\uC6F9 \uCF58\uC194\xB7\uC6D0\uACA9 MCP(init \xB7 status \xB7 deploy)\uB97C \uC4F8 \uB54C\uB9CC \uD544\uC694 \u2014 \uB85C\uCEEC MCP \uB3C4\uAD6C\uB294 \uC4F0\uC9C0 \uC54A\uC74C",
159
+ noTokenLocalDetail: "\uC6F9 \uCF58\uC194\xB7\uC6D0\uACA9 MCP(status \xB7 deploy)\uB97C \uC4F8 \uB54C\uB9CC \uD544\uC694 \u2014 \uB85C\uCEEC MCP \uB3C4\uAD6C\uB294 \uC4F0\uC9C0 \uC54A\uC74C",
125
160
  tokenSaved: "\uD1A0\uD070 \uC800\uC7A5\uB428",
126
161
  endpoint: "\uC5D4\uB4DC\uD3EC\uC778\uD2B8",
127
162
  ciMode: "CI \uBAA8\uB4DC",
@@ -234,9 +269,9 @@ MIMI_SEED_LANG takes precedence when set.`,
234
269
  secEnv: "Environment",
235
270
  secApps: "App detection",
236
271
  noToken: "No Mimi Seed token",
237
- noTokenFix: "run `mimi-seed init`",
272
+ noTokenFix: "For remote commands, set MIMI_SEED_WEB_BASE to your team console and run `mimi-seed init`.",
238
273
  noTokenLocal: "Mimi Seed cloud account not connected",
239
- noTokenLocalDetail: "only needed for the web console / remote MCP (init \xB7 status \xB7 deploy) \u2014 local MCP tools do not use it",
274
+ noTokenLocalDetail: "only needed for the web console / remote MCP (status \xB7 deploy) \u2014 local MCP tools do not use it",
240
275
  tokenSaved: "Token stored",
241
276
  endpoint: "Endpoint",
242
277
  ciMode: "CI mode",
@@ -785,6 +820,29 @@ function readJson(home, name) {
785
820
  return null;
786
821
  }
787
822
  }
823
+ var YOUTUBE_UPLOAD_SCOPE = "https://www.googleapis.com/auth/youtube.force-ssl";
824
+ var YOUTUBE_PROFILE = "youtube";
825
+ var GOOGLE_PROFILE_FILE = /^[a-z0-9][a-z0-9_-]{0,63}\.json$/;
826
+ function hasYouTubeUpload(tokens) {
827
+ return typeof tokens?.scope === "string" && tokens.scope.split(/\s+/).includes(YOUTUBE_UPLOAD_SCOPE);
828
+ }
829
+ function detectYouTubeGrant(home) {
830
+ const found = [];
831
+ if (hasYouTubeUpload(readJson(home, "tokens.json"))) found.push("default");
832
+ let files = [];
833
+ try {
834
+ files = fs5.readdirSync(path5.join(credDir(home), "google-profiles")).filter((f) => GOOGLE_PROFILE_FILE.test(f)).sort();
835
+ } catch {
836
+ }
837
+ for (const file of files) {
838
+ const doc = readJson(home, path5.join("google-profiles", file));
839
+ if (!hasYouTubeUpload(doc?.tokens)) continue;
840
+ const raw = doc?.tokens?.youtubeChannel?.title;
841
+ const title = typeof raw === "string" ? raw.replace(new RegExp("\\p{Cc}", "gu"), "").slice(0, 60) : "";
842
+ found.push(`profile ${file.slice(0, -5)}${title ? ` (${title})` : ""}`);
843
+ }
844
+ return found.length > 0 ? { present: true, detail: found.join(", ") } : { present: false };
845
+ }
788
846
  var EXPIRING_SOON_MS = 7 * 24 * 60 * 60 * 1e3;
789
847
  function detectSocialToken(home, file, idKey, tokenKey, nestedPlatform) {
790
848
  const root = readJson(home, file);
@@ -864,26 +922,28 @@ var CREDENTIALS = [
864
922
  ko: "Mimi Seed \uACC4\uC815 (\uD074\uB77C\uC6B0\uB4DC)",
865
923
  en: "Mimi Seed account (cloud)"
866
924
  },
867
- requirement: "required",
925
+ requirement: "optional",
868
926
  group: "core",
869
927
  file: "~/.mimi-seed/config.json",
870
928
  fix: "mimi-seed init",
871
929
  setup: { kind: "command", run: "mimi-seed init" },
872
930
  obtain: {
873
931
  ko: [
874
- "https://mimi-seed.pryzm.gg \uC5D0\uC11C \uAC00\uC785/\uB85C\uADF8\uC778\uD558\uBA74 \uB05D \u2014 \uBE0C\uB77C\uC6B0\uC800\uAC00 \uC54C\uC544\uC11C \uD1A0\uD070\uC744 \uB118\uACA8\uC900\uB2E4.",
932
+ "\uD300 \uCF58\uC194 \uC8FC\uC18C\uB97C MIMI_SEED_WEB_BASE\uC5D0 \uC9C0\uC815\uD55C \uB4A4 mimi-seed init\uC744 \uC2E4\uD589\uD558\uC138\uC694.",
875
933
  "CI \uC5D0\uC11C\uB294 MIMI_SEED_TOKEN \uD658\uACBD\uBCC0\uC218\uB85C \uB300\uCCB4\uD560 \uC218 \uC788\uB2E4."
876
934
  ],
877
935
  en: [
878
- "Sign up / sign in at https://mimi-seed.pryzm.gg \u2014 the browser hands the token back for you.",
936
+ "Set MIMI_SEED_WEB_BASE to your team console, then run mimi-seed init.",
879
937
  "In CI, set the MIMI_SEED_TOKEN environment variable instead."
880
938
  ]
881
939
  },
882
940
  docsAnchor: "cloud-pat",
883
941
  detect: (home) => {
884
- if (process.env.MIMI_SEED_TOKEN) return { present: true, detail: "MIMI_SEED_TOKEN (env)" };
942
+ if (process.env.MIMI_SEED_TOKEN) {
943
+ return consoleBase(process.env.MIMI_SEED_WEB_BASE) ? { present: true, detail: "MIMI_SEED_TOKEN (env)" } : { present: false };
944
+ }
885
945
  const cfg = readJson(home, "config.json");
886
- return cfg?.prefix ? { present: true, detail: `${cfg.prefix}\u2026` } : { present: false };
946
+ return cfg?.prefix && consoleBase(cfg.webBase) && consoleUrl(cfg.endpoint) ? { present: true, detail: `${cfg.prefix}\u2026` } : { present: false };
887
947
  }
888
948
  },
889
949
  {
@@ -899,13 +959,13 @@ var CREDENTIALS = [
899
959
  setup: { kind: "mcp-bin", bin: "mimi-seed-auth" },
900
960
  obtain: {
901
961
  ko: [
902
- "\uBBF8\uB9AC \uBC1C\uAE09\uBC1B\uC744 \uAC8C **\uC5C6\uB2E4**. \uBE0C\uB77C\uC6B0\uC800 \uB85C\uADF8\uC778 \uD55C \uBC88\uC774\uBA74 \uB05D.",
962
+ "\uCC98\uC74C\uC774\uBA74 Google \uB370\uC2A4\uD06C\uD1B1 \uC571 OAuth \uD074\uB77C\uC774\uC5B8\uD2B8\uC758 MIMI_SEED_GOOGLE_CLIENT_ID\uC640 MIMI_SEED_GOOGLE_CLIENT_SECRET\uB97C \uC124\uC815\uD55C\uB2E4.",
903
963
  "\uC774 \uD1A0\uD070 \uD558\uB098\uAC00 Firebase \xB7 AdMob \xB7 Play \xB7 Google Ads \xB7 Search Console \xB7 GA4 \xB7 IAM \xB7 BigQuery \uB97C \uBAA8\uB450 \uC5F0\uB2E4.",
904
964
  "\u26A0\uFE0F \uB85C\uADF8\uC778 \uD654\uBA74\uC5D0\uC11C \uAC70\uBD80(access_denied) \uB2F9\uD558\uBA74 \uC571\uC774 \uC544\uC9C1 '\uD14C\uC2A4\uD305' \uBAA8\uB4DC\uB77C \uADF8\uB807\uB2E4 \u2014",
905
965
  " \uC6B4\uC601\uC790\uC5D0\uAC8C \uB124 Google \uACC4\uC815\uC744 Test users \uC5D0 \uCD94\uAC00\uD574\uB2EC\uB77C\uACE0 \uC694\uCCAD\uD574\uC57C \uD55C\uB2E4."
906
966
  ],
907
967
  en: [
908
- "**Nothing** to fetch beforehand. One browser sign-in is all it takes.",
968
+ "For first sign-in, set MIMI_SEED_GOOGLE_CLIENT_ID and MIMI_SEED_GOOGLE_CLIENT_SECRET from a Google Desktop app OAuth client.",
909
969
  "This single token unlocks Firebase \xB7 AdMob \xB7 Play \xB7 Google Ads \xB7 Search Console \xB7 GA4 \xB7 IAM \xB7 BigQuery.",
910
970
  "\u26A0\uFE0F If the login screen blocks you (access_denied), the app is still in 'testing' mode \u2014",
911
971
  " ask whoever operates it to add your Google account under Test users. Retrying alone never works."
@@ -1188,6 +1248,36 @@ var CREDENTIALS = [
1188
1248
  return typeof cfg?.developerToken === "string" && cfg.developerToken && isId(cfg.customerId) && loginOk ? { present: true, detail: String(cfg.customerId) } : { present: false };
1189
1249
  }
1190
1250
  },
1251
+ {
1252
+ id: "youtube",
1253
+ label: {
1254
+ ko: "YouTube \uC5C5\uB85C\uB4DC",
1255
+ en: "YouTube upload"
1256
+ },
1257
+ requirement: "optional",
1258
+ group: "marketing",
1259
+ file: "~/.mimi-seed/tokens.json",
1260
+ // 기본 로그인(tokens.json)이 아니라 별도 Google 프로필에 연결한다. 채널 계정이 Play·Firebase 계정과 다르면
1261
+ // 기본 로그인에 YouTube 를 붙이는 순간 그 계정으로 tokens.json 이 교체돼 기존 연결이 끊긴다.
1262
+ fix: `mimi-seed auth login --profile ${YOUTUBE_PROFILE} --domains youtube`,
1263
+ setup: { kind: "mcp-bin", bin: "mimi-seed-auth", args: ["--profile", YOUTUBE_PROFILE, "--domains", "youtube"] },
1264
+ obtain: {
1265
+ ko: [
1266
+ "\uB530\uB85C \uBC1C\uAE09\uBC1B\uC744 \uD1A0\uD070\uC774 \uC5C6\uB2E4 \u2014 \uCC44\uB110\uC744 \uAC00\uC9C4 Google \uACC4\uC815\uC73C\uB85C \uB85C\uADF8\uC778\uD574 YouTube \uAD8C\uD55C\uC5D0 \uB3D9\uC758\uD55C\uB2E4.",
1267
+ `\uAE30\uBCF8 Google \uB85C\uADF8\uC778\uACFC \uBD84\uB9AC\uB41C '${YOUTUBE_PROFILE}' \uD504\uB85C\uD544\uC5D0 \uC800\uC7A5\uB418\uBBC0\uB85C Play\xB7Firebase \uB85C\uADF8\uC778\uC740 \uADF8\uB300\uB85C\uB2E4.`,
1268
+ "\uAE30\uBCF8 \uB85C\uADF8\uC778\uC5D0 \uC4F4 OAuth \uD074\uB77C\uC774\uC5B8\uD2B8\uB97C \uC7AC\uC0AC\uC6A9\uD55C\uB2E4. \uC800\uC7A5\uB41C \uCC44\uB110\uC740 \uB85C\uADF8\uC778 \uB54C \uD655\uC778\uD574 \uD568\uAED8 \uAE30\uB85D\uD55C\uB2E4.",
1269
+ `youtube_* \uB3C4\uAD6C\uC5D0\uB294 profile="${YOUTUBE_PROFILE}" \uB97C \uB118\uAE34\uB2E4 (\uC5C5\uB85C\uB4DC\uB294 expectedChannelId \uB85C \uCC44\uB110\uC744 \uB2E4\uC2DC \uD655\uC778\uD55C\uB2E4).`
1270
+ ],
1271
+ en: [
1272
+ "Nothing to obtain separately \u2014 sign in with the Google account that owns the channel and approve YouTube.",
1273
+ `It is saved to a separate '${YOUTUBE_PROFILE}' profile, so your default Google login (Play, Firebase) is untouched.`,
1274
+ "The OAuth client from your default login is reused. The channel is looked up at sign-in and recorded.",
1275
+ `Pass profile="${YOUTUBE_PROFILE}" to youtube_* tools (uploads re-check the channel with expectedChannelId).`
1276
+ ]
1277
+ },
1278
+ docsAnchor: "google-oauth",
1279
+ detect: (home) => detectYouTubeGrant(home)
1280
+ },
1191
1281
  {
1192
1282
  id: "facebook",
1193
1283
  label: {
@@ -1229,13 +1319,15 @@ var CREDENTIALS = [
1229
1319
  setup: { kind: "mcp-bin", bin: "mimi-seed-social-auth", args: ["instagram"] },
1230
1320
  obtain: {
1231
1321
  ko: [
1232
- "long-lived \uD1A0\uD070 \uB450 \uD615\uC2DD \uBAA8\uB450 \uC9C0\uC6D0\uD55C\uB2E4 (\uC790\uB3D9 \uAC10\uC9C0):",
1322
+ "`mimi-seed auth instagram`\uC740 \uB0B4 Meta \uC571(Instagram \uC571 ID\xB7\uC2DC\uD06C\uB9BF\xB7\uB9AC\uB514\uB809\uC158 URI)\uC73C\uB85C \uBE0C\uB77C\uC6B0\uC800 \uB85C\uADF8\uC778\uD55C\uB2E4. \uC11C\uBC84\uAC00 \uD544\uC694 \uC5C6\uB2E4.",
1323
+ "\uD1A0\uD070\uC744 \uC9C1\uC811 \uB123\uC744 \uB54C(--manual-token)\uB294 long-lived \uD1A0\uD070 \uB450 \uD615\uC2DD \uBAA8\uB450 \uC9C0\uC6D0\uD55C\uB2E4 (\uC790\uB3D9 \uAC10\uC9C0):",
1233
1324
  " \u2022 IGAA\u2026 \u2014 Instagram Login (Meta \uC2E0\uADDC \uBC29\uC2DD, Facebook \uD398\uC774\uC9C0 \uBD88\uD544\uC694)",
1234
1325
  " \u2022 EAA\u2026 \u2014 Facebook Login (IG **\uBE44\uC988\uB2C8\uC2A4** \uACC4\uC815\uC774 FB \uD398\uC774\uC9C0\uC5D0 \uC5F0\uACB0\uB3FC \uC788\uC5B4\uC57C \uD568)",
1235
1326
  "\uD1A0\uD070 \uC218\uBA85\uC740 \uC57D 60\uC77C\uC774\uB2E4."
1236
1327
  ],
1237
1328
  en: [
1238
- "Both long-lived token shapes are supported (auto-detected):",
1329
+ "`mimi-seed auth instagram` signs in through the browser with your own Meta app (Instagram app ID, secret, redirect URI). No server is needed.",
1330
+ "When pasting a token (--manual-token), both long-lived token shapes are supported (auto-detected):",
1239
1331
  " \u2022 IGAA\u2026 \u2014 Instagram Login (Meta's newer path, no Facebook Page required)",
1240
1332
  " \u2022 EAA\u2026 \u2014 Facebook Login (needs an Instagram **Business** account linked to a FB Page)",
1241
1333
  "Tokens last about 60 days."
@@ -1258,15 +1350,15 @@ var CREDENTIALS = [
1258
1350
  obtain: {
1259
1351
  ko: [
1260
1352
  "Instagram \uACFC **\uBCC4\uAC1C \uACC4\uC815\xB7\uBCC4\uAC1C \uD1A0\uD070**\uC774\uB2E4 (Threads Graph API).",
1261
- "\uAE30\uBCF8 \uD750\uB984: `mimi-seed auth threads`\uB97C \uC2E4\uD589\uD558\uBA74 HTTPS \uBE0C\uB85C\uCEE4\uAC00 \uC5EC\uB294 \uBE0C\uB77C\uC6B0\uC800\uC5D0\uC11C Threads \uB85C\uADF8\uC778\xB7\uAD8C\uD55C \uC2B9\uC778\uC744 \uC644\uB8CC\uD55C\uB2E4.",
1262
- "\uBE0C\uB85C\uCEE4 \uC6B4\uC601\uC790\uB294 Threads App ID/secret\uACFC \uC571\uC5D0 \uB4F1\uB85D\uD55C HTTPS callback URL\uC744 \uC124\uC815\xB7\uBC30\uD3EC\uD574\uC57C \uD55C\uB2E4 (SDK\uAC00 \uBE0C\uB85C\uCEE4\uB97C \uBC30\uD3EC\uD558\uC9C0\uB294 \uC54A\uB294\uB2E4).",
1353
+ "`mimi-seed auth threads`\uB294 \uB0B4 Meta \uC571(Threads \uC571 ID\xB7\uC2DC\uD06C\uB9BF\xB7\uB9AC\uB514\uB809\uC158 URI)\uC73C\uB85C \uBE0C\uB77C\uC6B0\uC800 \uB85C\uADF8\uC778\uD55C\uB2E4. \uC11C\uBC84\uAC00 \uD544\uC694 \uC5C6\uB2E4.",
1354
+ "MIMI_SEED_WEB_BASE\uC5D0 \uD300 \uBE0C\uB85C\uCEE4\uAC00 \uC124\uC815\uB3FC \uC788\uC73C\uBA74 \uBE0C\uB85C\uCEE4\uB97C \uB300\uC2E0 \uC4F4\uB2E4 (SDK\uAC00 \uBE0C\uB85C\uCEE4\uB97C \uBC30\uD3EC\uD558\uC9C0\uB294 \uC54A\uB294\uB2E4).",
1263
1355
  "\uD1A0\uD070\uC744 \uC9C1\uC811 \uBD99\uC5EC \uB123\uB294 `--manual-token`\uC740 \uACE0\uAE09/\uD5E4\uB4DC\uB9AC\uC2A4 \uD750\uB984\uC774\uB2E4. \uC800\uC7A5 \uC804\uC5D0 Threads \uACC4\uC815\uC744 \uAC80\uC99D\uD55C\uB2E4.",
1264
1356
  "`--profile <id>`\uB85C \uC774\uB984 \uC788\uB294 \uACC4\uC815\uC744 \uC800\uC7A5\uD560 \uC218 \uC788\uC73C\uBA70, OAuth \uC751\uB2F5\uC758 \uC2E4\uC81C \uB9CC\uB8CC \uC2DC\uAC01\uC744 \uB85C\uCEEC \uD504\uB85C\uD544\uC5D0 \uAE30\uB85D\uD55C\uB2E4."
1265
1357
  ],
1266
1358
  en: [
1267
1359
  "A **separate account and token** from Instagram (Threads Graph API).",
1268
- "Default: run `mimi-seed auth threads` and finish Threads login and consent in the browser opened by the HTTPS broker.",
1269
- "The broker operator must deploy it with the Threads App ID/secret and the HTTPS callback URL registered in the app (the SDK does not deploy the broker).",
1360
+ "`mimi-seed auth threads` signs in through the browser with your own Meta app (Threads app ID, secret, redirect URI). No server is needed.",
1361
+ "If MIMI_SEED_WEB_BASE points to a team broker, that broker is used instead (the SDK does not deploy it).",
1270
1362
  "Pasting a token with `--manual-token` is the advanced/headless path; the Threads account is verified before saving.",
1271
1363
  "Use `--profile <id>` for a named account; the actual expiry returned by OAuth is saved in the local profile."
1272
1364
  ]
@@ -1380,6 +1472,7 @@ function isSatisfied(spec, detected) {
1380
1472
  }
1381
1473
  function missingRequired(detected, platforms) {
1382
1474
  return CREDENTIALS.filter((spec) => {
1475
+ if (spec.id === "mimiseed") return !!consoleBase(process.env.MIMI_SEED_WEB_BASE) && !isSatisfied(spec, detected);
1383
1476
  if (spec.requirement === "optional") return false;
1384
1477
  if (spec.requirement === "platform" && !platforms.includes(spec.platform)) return false;
1385
1478
  return !isSatisfied(spec, detected);
@@ -1393,6 +1486,7 @@ function planSetup(detected, opts = {}) {
1393
1486
  const platforms = opts.platforms ?? [];
1394
1487
  return CREDENTIALS.filter((spec) => {
1395
1488
  if (only && !only.has(spec.id)) return false;
1489
+ if (spec.id === "mimiseed" && !only && !reconnect.has(spec.id) && !consoleBase(process.env.MIMI_SEED_WEB_BASE)) return false;
1396
1490
  if (reconnect.has(spec.id)) return true;
1397
1491
  const found = detected.get(spec.id);
1398
1492
  if (found?.freshness === "expired" || found?.freshness === "expiring") return true;
@@ -1413,7 +1507,7 @@ import path7 from "path";
1413
1507
  import { fileURLToPath } from "url";
1414
1508
 
1415
1509
  // package.json
1416
- var version = "0.25.2";
1510
+ var version = "0.25.4";
1417
1511
 
1418
1512
  // src/lib/windows-path.ts
1419
1513
  import path6 from "path";
@@ -1605,7 +1699,9 @@ var IN_SCOPE_FILES = /* @__PURE__ */ new Set([
1605
1699
  "google-ads.json",
1606
1700
  "jenkins.json",
1607
1701
  "ci.json",
1608
- "config.json"
1702
+ "config.json",
1703
+ // 사용자 본인의 Meta 앱 시크릿 — 만료되지 않고, 그 앱을 쓰는 모든 계정의 토큰을 만들 수 있다.
1704
+ "meta-apps.json"
1609
1705
  ]);
1610
1706
  var IN_SCOPE_DIRS = /* @__PURE__ */ new Set(["google-profiles", "play-service-accounts", "social-profiles"]);
1611
1707
  function isEncryptableCredential(aad) {
@@ -2073,7 +2169,8 @@ var CONFIG_LOCATION = CONFIG_PATH;
2073
2169
  async function getEffectiveConfig() {
2074
2170
  const envToken = process.env.MIMI_SEED_TOKEN;
2075
2171
  if (envToken) {
2076
- const webBase = process.env.MIMI_SEED_WEB_BASE ?? "https://mimi-seed.pryzm.gg";
2172
+ const webBase = consoleBase(process.env.MIMI_SEED_WEB_BASE);
2173
+ if (!webBase) return null;
2077
2174
  return {
2078
2175
  token: envToken,
2079
2176
  prefix: envToken.slice(0, 8),
@@ -2082,7 +2179,8 @@ async function getEffectiveConfig() {
2082
2179
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
2083
2180
  };
2084
2181
  }
2085
- return readConfig();
2182
+ const saved = await readConfig();
2183
+ return saved?.token && consoleBase(saved.webBase) && consoleUrl(saved.endpoint) ? saved : null;
2086
2184
  }
2087
2185
 
2088
2186
  // src/deploy-stream.ts
@@ -2696,7 +2794,7 @@ var M8 = catalog(
2696
2794
  buildEnded: (result) => `\uBE4C\uB4DC \uC885\uB8CC: ${result}`,
2697
2795
  alreadyBuiltHint: (versionCode, platform) => ` \uBE4C\uB4DC\uAC00 \uC774\uBBF8 \uC644\uB8CC\uB410\uB2E4\uBA74: mimi-seed deploy --skip-build --version-code ${versionCode} --platform ${platform}`,
2698
2796
  // cmdDeploy
2699
- noAccount: "\uC5F0\uACB0\uB41C \uACC4\uC815 \uC5C6\uC74C. `mimi-seed init` \uC2E4\uD589.",
2797
+ 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.",
2700
2798
  title: (platform) => `mimi-seed deploy \u2014 ${platform}`,
2701
2799
  dryRunNotice: " [dry-run \uBAA8\uB4DC] \uC2E4\uC81C \uBC30\uD3EC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",
2702
2800
  ciLine: (kind) => ` CI: ${kind}`,
@@ -2780,7 +2878,7 @@ var M8 = catalog(
2780
2878
  buildEnded: (result) => `Build ended: ${result}`,
2781
2879
  alreadyBuiltHint: (versionCode, platform) => ` If the build already finished: mimi-seed deploy --skip-build --version-code ${versionCode} --platform ${platform}`,
2782
2880
  // cmdDeploy
2783
- noAccount: "No account connected. Run `mimi-seed init`.",
2881
+ noAccount: "For remote commands, set MIMI_SEED_WEB_BASE to your team console and run `mimi-seed init`.",
2784
2882
  title: (platform) => `mimi-seed deploy \u2014 ${platform}`,
2785
2883
  dryRunNotice: " [dry-run] nothing will actually be deployed",
2786
2884
  ciLine: (kind) => ` CI: ${kind}`,
@@ -3305,25 +3403,27 @@ import fs13 from "fs";
3305
3403
  import os9 from "os";
3306
3404
  import path16 from "path";
3307
3405
  import { createHmac, randomUUID as randomUUID5 } from "crypto";
3308
- var ENDPOINT = "https://mimi-seed.pryzm.gg/api/sdk-usage";
3309
3406
  var M9 = catalog(
3310
3407
  {
3311
3408
  notice: "\uC120\uD0DD\uC801 \uC0AC\uC6A9\uB7C9 \uCE21\uC815\uC740 \uAEBC\uC838 \uC788\uC2B5\uB2C8\uB2E4. \uC548\uB0B4: mimi-seed telemetry --help\n",
3312
3409
  enabled: "\uC0AC\uC6A9\uB7C9 \uCE21\uC815 \uCF1C\uC9D0. \uC784\uC758 \uC124\uCE58 ID\xB7\uD504\uB85C\uC81D\uD2B8 \uD574\uC2DC\xB7\uBC84\uC804\xB7OS\xB7\uACB0\uACFC \uCF54\uB4DC\xB7\uC2E4\uD589\uC2DC\uAC04\uC744 \uC804\uC1A1\uD569\uB2C8\uB2E4. \uB044\uAE30: mimi-seed telemetry off\n",
3313
3410
  disabled: "\uC0AC\uC6A9\uB7C9 \uCE21\uC815 \uAEBC\uC9D0. MIMI_SEED_TELEMETRY=0\uC73C\uB85C\uB3C4 \uB04C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n",
3314
- invalid: "\uC0AC\uC6A9\uBC95: mimi-seed telemetry on|off|status\n"
3411
+ invalid: "\uC0AC\uC6A9\uBC95: mimi-seed telemetry on|off|status\n",
3412
+ noConsole: "\uC0AC\uC6A9\uB7C9 \uCE21\uC815\uC740 \uD300 \uCF58\uC194\uB85C\uB9CC \uBCF4\uB0C5\uB2C8\uB2E4 \u2014 \uCF1C\uB824\uBA74 \uBA3C\uC800 MIMI_SEED_WEB_BASE \uC5D0 \uD300 \uCF58\uC194 \uC8FC\uC18C\uB97C \uC9C0\uC815\uD558\uC138\uC694. \uC544\uBB34\uAC83\uB3C4 \uBC14\uAFB8\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.\n"
3315
3413
  },
3316
3414
  {
3317
3415
  notice: "Optional usage measurement is off. Learn more: mimi-seed telemetry --help\n",
3318
3416
  enabled: "Usage measurement enabled: random installation ID, project hash, version, OS, result codes and duration. Disable: mimi-seed telemetry off\n",
3319
3417
  disabled: "Usage measurement disabled. MIMI_SEED_TELEMETRY=0 also disables it.\n",
3320
- invalid: "Usage: mimi-seed telemetry on|off|status\n"
3418
+ invalid: "Usage: mimi-seed telemetry on|off|status\n",
3419
+ noConsole: "Usage measurement is sent only to a team console \u2014 set MIMI_SEED_WEB_BASE to your team console first. Nothing was changed.\n"
3321
3420
  }
3322
3421
  );
3323
3422
  var location = () => path16.join(os9.homedir(), ".mimi-seed", "telemetry.json");
3324
- function readConsent() {
3423
+ function readConsent(webBase) {
3325
3424
  try {
3326
- return JSON.parse(fs13.readFileSync(location(), "utf8"));
3425
+ const saved = JSON.parse(fs13.readFileSync(location(), "utf8"));
3426
+ return saved.webBase === webBase ? saved : { enabled: false };
3327
3427
  } catch {
3328
3428
  return { enabled: false };
3329
3429
  }
@@ -3332,10 +3432,13 @@ function writeConsent(value) {
3332
3432
  writeCredentialJson(location(), value);
3333
3433
  }
3334
3434
  function telemetryEnabled() {
3435
+ const webBase = consoleBase(process.env.MIMI_SEED_WEB_BASE);
3436
+ if (!webBase) return false;
3335
3437
  if (process.env.MIMI_SEED_TELEMETRY !== void 0) return process.env.MIMI_SEED_TELEMETRY === "1";
3336
- return readConsent().enabled === true;
3438
+ return readConsent(webBase).enabled === true;
3337
3439
  }
3338
3440
  function telemetryNotice() {
3441
+ if (!consoleBase(process.env.MIMI_SEED_WEB_BASE)) return "";
3339
3442
  return telemetryEnabled() ? "" : M9().notice;
3340
3443
  }
3341
3444
  function cmdTelemetry(argv) {
@@ -3345,9 +3448,15 @@ function cmdTelemetry(argv) {
3345
3448
  process.exitCode = 2;
3346
3449
  return;
3347
3450
  }
3348
- if (action === "on") {
3349
- const consent = readConsent();
3350
- writeConsent({ enabled: true, installationId: consent.installationId ?? randomUUID5(), salt: consent.salt ?? randomUUID5() });
3451
+ const webBase = consoleBase(process.env.MIMI_SEED_WEB_BASE);
3452
+ if (action === "on" && !webBase) {
3453
+ process.stderr.write(M9().noConsole);
3454
+ process.exitCode = 1;
3455
+ return;
3456
+ }
3457
+ if (action === "on" && webBase) {
3458
+ const consent = readConsent(webBase);
3459
+ writeConsent({ webBase, enabled: true, installationId: consent.installationId ?? randomUUID5(), salt: consent.salt ?? randomUUID5() });
3351
3460
  }
3352
3461
  if (action === "off") writeConsent({ enabled: false });
3353
3462
  process.stdout.write(telemetryEnabled() ? M9().enabled : M9().disabled);
@@ -3364,13 +3473,16 @@ function frameworkAt(root) {
3364
3473
  return "native-or-unknown";
3365
3474
  }
3366
3475
  function usageRun(command, projectPath) {
3367
- if (!telemetryEnabled()) return async () => {
3476
+ const baseUrl = consoleBase(process.env.MIMI_SEED_WEB_BASE);
3477
+ if (!baseUrl || !telemetryEnabled()) return async () => {
3368
3478
  };
3369
3479
  try {
3370
- const consent = readConsent();
3480
+ const consent = readConsent(baseUrl);
3371
3481
  const installationId = consent.installationId ?? randomUUID5();
3372
3482
  const salt = consent.salt ?? randomUUID5();
3373
- if (!consent.installationId || !consent.salt) writeConsent({ enabled: consent.enabled, installationId, salt });
3483
+ if (consent.enabled && (!consent.installationId || !consent.salt)) {
3484
+ writeConsent({ webBase: baseUrl, enabled: true, installationId, salt });
3485
+ }
3374
3486
  let normalized = path16.resolve(projectPath);
3375
3487
  try {
3376
3488
  normalized = fs13.realpathSync(normalized);
@@ -3390,7 +3502,7 @@ function usageRun(command, projectPath) {
3390
3502
  };
3391
3503
  const started = Date.now();
3392
3504
  return async (outcome, report) => {
3393
- if (!telemetryEnabled()) return;
3505
+ if (!telemetryEnabled() || consoleBase(process.env.MIMI_SEED_WEB_BASE) !== baseUrl) return;
3394
3506
  const payload = {
3395
3507
  ...base2,
3396
3508
  outcome,
@@ -3399,7 +3511,7 @@ function usageRun(command, projectPath) {
3399
3511
  codes: [...new Set(report?.findings.map((f) => f.code).filter((c) => /^[a-zA-Z0-9_]{1,80}$/.test(c)) ?? [])].slice(0, 60)
3400
3512
  };
3401
3513
  try {
3402
- await fetchWithTimeout(ENDPOINT, {
3514
+ await fetchWithTimeout(`${baseUrl}/api/sdk-usage`, {
3403
3515
  method: "POST",
3404
3516
  headers: { "content-type": "application/json" },
3405
3517
  body: JSON.stringify(payload),
@@ -3654,6 +3766,8 @@ async function cmdSetup(argv) {
3654
3766
  }
3655
3767
 
3656
3768
  export {
3769
+ consoleBaseProblem,
3770
+ consoleBase,
3657
3771
  isLang,
3658
3772
  resolveLang,
3659
3773
  catalog,
@@ -3676,6 +3790,8 @@ export {
3676
3790
  fetchWithTimeout,
3677
3791
  detectHints,
3678
3792
  hasAnyProjectSignal,
3793
+ findProjectLink,
3794
+ linkProject,
3679
3795
  lookupProjectManifest,
3680
3796
  manifestServiceEntries,
3681
3797
  credLabel,
@@ -3686,18 +3802,16 @@ export {
3686
3802
  credentialFileProblemMessage,
3687
3803
  credentialProblemText,
3688
3804
  isSatisfied,
3689
- version,
3690
3805
  absoluteWindowsPathDirs,
3691
- MCP_PKG,
3692
- runMcpBin,
3693
3806
  migrateLegacyJenkins,
3694
- findProjectLink,
3695
- linkProject,
3696
- cmdDeploy,
3697
- writeSettings,
3807
+ version,
3698
3808
  telemetryNotice,
3699
3809
  cmdTelemetry,
3700
3810
  usageRun,
3811
+ MCP_PKG,
3812
+ runMcpBin,
3813
+ cmdDeploy,
3814
+ writeSettings,
3701
3815
  parseSetupArgs,
3702
3816
  resolveMode,
3703
3817
  cmdSetup