mimi-seed 0.25.7 → 0.27.0

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.
@@ -6,7 +6,7 @@ import * as readline2 from "readline";
6
6
  import os10 from "os";
7
7
 
8
8
  // ../core/src/console-url.ts
9
- var RETIRED_HOSTS = /* @__PURE__ */ new Set(["mimi-seed.pryzm.gg", "mimi-seed.oddbout.com"]);
9
+ var RETIRED_HOSTS = /* @__PURE__ */ new Set(["mimi-seed.oddbout.com"]);
10
10
  var LOOPBACK_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "[::1]"]);
11
11
  function inspect(value) {
12
12
  let url;
@@ -729,6 +729,22 @@ function readJsonFile(file) {
729
729
  }
730
730
  }
731
731
 
732
+ // ../core/src/onestore-credentials.ts
733
+ var ONESTORE_CLIENT_ID_PATTERN = /^(?!\.{1,2}$)[A-Za-z0-9._-]{1,128}$/;
734
+ function parseOnestoreCredentials(value, expectedId) {
735
+ if (!value || typeof value !== "object") return null;
736
+ const { clientId, clientSecret, environment, marketCode, packageName, legacyHost } = value;
737
+ if (typeof clientId !== "string" || !ONESTORE_CLIENT_ID_PATTERN.test(clientId) || typeof clientSecret !== "string" || !clientSecret.trim() || expectedId !== void 0 && clientId !== expectedId || environment !== "sandbox" && environment !== "commercial" || marketCode !== "MKT_ONE" && marketCode !== "MKT_GLB" || legacyHost !== void 0 && typeof legacyHost !== "boolean") return null;
738
+ return {
739
+ clientId,
740
+ clientSecret,
741
+ environment,
742
+ marketCode,
743
+ packageName: typeof packageName === "string" ? packageName.trim() || void 0 : void 0,
744
+ legacyHost: environment === "commercial" && legacyHost === true
745
+ };
746
+ }
747
+
732
748
  // ../core/src/project-manifest.ts
733
749
  import fs4 from "fs";
734
750
  import path4 from "path";
@@ -910,6 +926,34 @@ function playSaDetect(home) {
910
926
  }
911
927
  return invalid ? { present: false, invalid } : { present: false };
912
928
  }
929
+ function onestoreDetect(home) {
930
+ const detectFile = (file, expectedId) => {
931
+ const read = readJsonFile(file);
932
+ if (read.state === "missing") return { present: false };
933
+ if (read.state !== "ok") return { present: false, invalid: unusable(file, read) };
934
+ const cfg = parseOnestoreCredentials(read.value, expectedId);
935
+ if (!cfg) return { present: false, invalid: { file, reason: "Invalid ONE store credential fields" } };
936
+ const identity = { clientId: cfg.clientId };
937
+ if (cfg.packageName) identity.packageName = cfg.packageName;
938
+ return { present: true, detail: Object.values(identity).join(" / "), identity };
939
+ };
940
+ const defaultFile = detectFile(path5.join(credDir(home), "onestore.json"));
941
+ if (defaultFile.present || defaultFile.invalid) return defaultFile;
942
+ const dir = path5.join(credDir(home), "onestore-apps");
943
+ let names;
944
+ try {
945
+ names = fs5.readdirSync(dir).filter((f) => f.endsWith(".json")).sort();
946
+ } catch {
947
+ return { present: false };
948
+ }
949
+ let invalid;
950
+ for (const name of names) {
951
+ const found = detectFile(path5.join(dir, name), name.slice(0, -5));
952
+ if (found.present) return found;
953
+ invalid ??= found.invalid;
954
+ }
955
+ return invalid ? { present: false, invalid } : { present: false };
956
+ }
913
957
  function ciDetect(home, want) {
914
958
  const ci = readJson(home, "ci.json");
915
959
  if (!ci || ci.provider !== want) return { present: false };
@@ -1056,6 +1100,38 @@ var CREDENTIALS = [
1056
1100
  },
1057
1101
  detect: (home) => playSaDetect(home)
1058
1102
  },
1103
+ {
1104
+ id: "onestore",
1105
+ label: {
1106
+ ko: "\uC6D0\uC2A4\uD1A0\uC5B4 IAP",
1107
+ en: "ONE store IAP"
1108
+ },
1109
+ requirement: "optional",
1110
+ group: "core",
1111
+ file: "~/.mimi-seed/onestore.json",
1112
+ fix: "mimi-seed auth onestore",
1113
+ setup: { kind: "mcp-bin", bin: "mimi-seed-onestore-auth" },
1114
+ obtain: {
1115
+ ko: [
1116
+ "ONEconsole \u2192 \uB77C\uC774\uC120\uC2A4 \uAD00\uB9AC\uC5D0\uC11C OAuth client_id(PID)\uC640 client_secret\uC744 \uBC1C\uAE09\uBC1B\uB294\uB2E4.",
1117
+ "2025-03-20 \uC774\uC804\uC5D0 \uB4F1\uB85D\uD55C \uC571\uC740 client_id \uAC00 \uD328\uD0A4\uC9C0\uBA85\uC77C \uC218 \uC788\uB2E4. \uC774\uD6C4 \uC571\uC740 PID \uB2E4.",
1118
+ "`mimi-seed auth onestore` \uB85C \uC800\uC7A5\uD55C\uB2E4. \uC561\uC138\uC2A4 \uD1A0\uD070\uC740 \uB514\uC2A4\uD06C\uC5D0 \uC4F0\uC9C0 \uC54A\uB294\uB2E4.",
1119
+ "\uC778\uC571 \uC11C\uBC84 API\uB9CC \uC9C0\uC6D0\uD55C\uB2E4. \uBC14\uC774\uB108\uB9AC \uC5C5\uB85C\uB4DC\xB7\uB9AC\uC2A4\uD305\xB7\uB9AC\uBDF0\xB7\uC0C1\uD488 \uCE74\uD0C8\uB85C\uADF8\xB7\uC815\uC0B0 API\uB294 \uC5C6\uB2E4."
1120
+ ],
1121
+ en: [
1122
+ "Issue an OAuth client_id (PID) and client_secret from ONEconsole \u2192 License Management.",
1123
+ "Apps registered before 2025-03-20 may still use the package name as client_id; newer apps use a PID.",
1124
+ "Save them with `mimi-seed auth onestore`. Access tokens are never written to disk.",
1125
+ "Only the IAP Server API is available. There is no official API for binary upload, listings, reviews, catalog CRUD, or settlements."
1126
+ ]
1127
+ },
1128
+ docsAnchor: "onestore-iap",
1129
+ note: {
1130
+ ko: "\uC120\uD0DD \u2014 \uC6D0\uC2A4\uD1A0\uC5B4 \uC778\uC571 \uAD6C\uB9E4 \uC870\uD68C\xB7\uD655\uC778\xB7\uD574\uC9C0",
1131
+ en: "optional \u2014 ONE store in-app purchase lookup, acknowledge, and cancel"
1132
+ },
1133
+ detect: (home) => onestoreDetect(home)
1134
+ },
1059
1135
  {
1060
1136
  id: "bigquery",
1061
1137
  label: {
@@ -1507,7 +1583,7 @@ import path7 from "path";
1507
1583
  import { fileURLToPath } from "url";
1508
1584
 
1509
1585
  // package.json
1510
- var version = "0.25.7";
1586
+ var version = "0.27.0";
1511
1587
 
1512
1588
  // src/lib/windows-path.ts
1513
1589
  import path6 from "path";
@@ -1700,10 +1776,11 @@ var IN_SCOPE_FILES = /* @__PURE__ */ new Set([
1700
1776
  "jenkins.json",
1701
1777
  "ci.json",
1702
1778
  "config.json",
1779
+ "onestore.json",
1703
1780
  // 사용자 본인의 Meta 앱 시크릿 — 만료되지 않고, 그 앱을 쓰는 모든 계정의 토큰을 만들 수 있다.
1704
1781
  "meta-apps.json"
1705
1782
  ]);
1706
- var IN_SCOPE_DIRS = /* @__PURE__ */ new Set(["google-profiles", "play-service-accounts", "social-profiles"]);
1783
+ var IN_SCOPE_DIRS = /* @__PURE__ */ new Set(["google-profiles", "play-service-accounts", "social-profiles", "onestore-apps"]);
1707
1784
  function isEncryptableCredential(aad) {
1708
1785
  if (!aad) return false;
1709
1786
  const parts = aad.split("/");
@@ -3791,6 +3868,7 @@ export {
3791
3868
  detectHints,
3792
3869
  hasAnyProjectSignal,
3793
3870
  findProjectLink,
3871
+ resolveLinkedAppId,
3794
3872
  linkProject,
3795
3873
  lookupProjectManifest,
3796
3874
  manifestServiceEntries,
package/dist/index.js CHANGED
@@ -37,6 +37,7 @@ import {
37
37
  obtainDataKey,
38
38
  readBodyWithTimeout,
39
39
  resolveLang,
40
+ resolveLinkedAppId,
40
41
  rewriteCredentialFiles,
41
42
  runMcpBin,
42
43
  t,
@@ -47,7 +48,7 @@ import {
47
48
  writeConfig,
48
49
  writeCredentialFile,
49
50
  writeSettings
50
- } from "./chunk-AHUBEWYH.js";
51
+ } from "./chunk-JGAE2S3M.js";
51
52
 
52
53
  // src/index.ts
53
54
  import kleur12 from "kleur";
@@ -451,6 +452,7 @@ async function cmdInit(args) {
451
452
  "- Google/Firebase/AdMob/Play OAuth: `npx -y @yoonion/mimi-seed-mcp mimi-seed-auth`",
452
453
  "- App Store Connect: `npx -y @yoonion/mimi-seed-mcp mimi-seed-appstore-auth`",
453
454
  "- Play service account: `npx -y @yoonion/mimi-seed-mcp mimi-seed-playstore-auth`",
455
+ "- ONE store IAP: `npx -y @yoonion/mimi-seed-mcp mimi-seed-onestore-auth`",
454
456
  "",
455
457
  "## \uC571 \uC815\uBCF4",
456
458
  ...appLines.length > 0 ? appLines : [" (mimi-seed status \uB85C \uD655\uC778)"],
@@ -589,8 +591,35 @@ function isCommitRef(cwd, ref) {
589
591
  return false;
590
592
  }
591
593
  }
594
+ function resolveCommit(cwd, ref) {
595
+ if (ref.startsWith("-")) return null;
596
+ try {
597
+ return git(cwd, ["rev-parse", "--verify", "--quiet", `${ref}^{commit}`]).trim() || null;
598
+ } catch {
599
+ return null;
600
+ }
601
+ }
602
+ function countCommits(cwd, opts = {}) {
603
+ const { from, to = "HEAD" } = opts;
604
+ if (from?.startsWith("-") || to.startsWith("-")) return null;
605
+ try {
606
+ const n = Number(git(cwd, ["rev-list", "--count", from ? `${from}..${to}` : to, "--"]).trim());
607
+ return Number.isInteger(n) ? n : null;
608
+ } catch {
609
+ return null;
610
+ }
611
+ }
612
+ function hasUncommittedChanges(cwd, opts = {}) {
613
+ try {
614
+ return git(cwd, ["status", "--porcelain", ...opts.here ? ["--", "."] : []]).trim().length > 0;
615
+ } catch {
616
+ return false;
617
+ }
618
+ }
619
+ var DEFAULT_NOTES_LIMIT = 30;
620
+ var MAX_NOTES_LIMIT = 1e4;
592
621
  function getGitLog(cwd, opts = {}) {
593
- const { from, to = "HEAD", limit = 30 } = opts;
622
+ const { from, to = "HEAD", limit = DEFAULT_NOTES_LIMIT } = opts;
594
623
  if (from?.startsWith("-") || to.startsWith("-")) return [];
595
624
  const range = from ? `${from}..${to}` : to;
596
625
  const format = "%H%s%ci%an";
@@ -650,6 +679,9 @@ function manifestDetail(id, svc) {
650
679
  if (svc.dataset) parts.push(svc.dataset);
651
680
  } else if (id === "playstore" && svc.packageName) {
652
681
  parts.push(svc.packageName);
682
+ } else if (id === "onestore") {
683
+ if (svc.clientId) parts.push(svc.clientId);
684
+ if (svc.packageName) parts.push(svc.packageName);
653
685
  } else if (id === "appstore" && svc.keyId) {
654
686
  parts.push(`keyId ${svc.keyId}`);
655
687
  } else if (id === "jenkins" && svc.url) {
@@ -814,6 +846,7 @@ var COPY = {
814
846
  evidence: "\uADFC\uAC70",
815
847
  action: "\uC870\uCE58",
816
848
  source: "\uCD9C\uCC98",
849
+ checked: "\uC774\uBC88\uC5D0 \uAC80\uC0AC\uD55C \uD56D\uBAA9",
817
850
  connected: "\uC2A4\uD1A0\uC5B4 \uC5F0\uACB0 \uD6C4 \uCD94\uAC00 \uAC80\uC0AC",
818
851
  connectedChecks: [
819
852
  "\uC2A4\uD1A0\uC5B4 \uB4F1\uB85D\uC815\uBCF4\uC640 \uC2A4\uD06C\uB9B0\uC0F7",
@@ -833,6 +866,7 @@ var COPY = {
833
866
  evidence: "Evidence",
834
867
  action: "Action",
835
868
  source: "Source",
869
+ checked: "Checked in this run",
836
870
  connected: "Checked after connecting stores",
837
871
  connectedChecks: void 0,
838
872
  ready: "No submission blocker was found by the local checks.",
@@ -840,6 +874,19 @@ var COPY = {
840
874
  partial: "This report checks deterministic repository evidence only. Store state is checked separately after connection."
841
875
  }
842
876
  };
877
+ var CHECKED_KO = {
878
+ "mobile project and app identifier detection": "\uBAA8\uBC14\uC77C \uD504\uB85C\uC81D\uD2B8\uC640 \uC571 \uC2DD\uBCC4\uC790 \uAC10\uC9C0",
879
+ "Android targetSdk policy": "Android targetSdk \uC815\uCC45",
880
+ "Google Play Billing dependency policy": "Google Play Billing \uC758\uC874\uC131 \uC815\uCC45",
881
+ "App Store Connect Xcode / SDK minimum (pinned build tooling)": "App Store Connect Xcode / SDK \uCD5C\uC18C \uBC84\uC804 (\uACE0\uC815\uB41C \uBE4C\uB4DC \uB3C4\uAD6C \uAE30\uC900)",
882
+ "Firebase Cloud Messaging legacy API usage": "Firebase Cloud Messaging \uAD6C\uD615 API \uC0AC\uC6A9"
883
+ };
884
+ function checkedLabel(item, lang) {
885
+ if (lang === "en") return item;
886
+ const truncated = /^Firebase Cloud Messaging legacy API usage \(first (\d+) source files\)$/.exec(item);
887
+ if (truncated) return `Firebase Cloud Messaging \uAD6C\uD615 API \uC0AC\uC6A9 (\uC18C\uC2A4 \uD30C\uC77C \uC55E ${truncated[1]}\uAC1C\uB9CC)`;
888
+ return CHECKED_KO[item] ?? item;
889
+ }
843
890
  function renderFinding(finding, copy, lang, unresolved) {
844
891
  const localized = lang === "ko" ? finding.ko : void 0;
845
892
  const label = finding.severity === "info" && unresolved.has(finding.code) ? copy.labels.unresolved : copy.labels[finding.severity];
@@ -864,6 +911,8 @@ function renderReleaseDoctor(report, lang) {
864
911
  copy.summary(report.counts.blocker, report.counts.warning),
865
912
  ""
866
913
  ];
914
+ const checked = report.coverage.checked ?? [];
915
+ if (checked.length > 0) lines.push(`${copy.checked}:`, ...checked.map((item) => ` - ${checkedLabel(item, lang)}`), "");
867
916
  for (const finding of report.findings) lines.push(...renderFinding(finding, copy, lang, unresolved), "");
868
917
  if (report.counts.blocker === 0) {
869
918
  lines.push(unresolved.size > 0 ? `! ${copy.incomplete(unresolved.size, [...unresolved].join(", "))}` : `\u2713 ${copy.ready}`, "");
@@ -4562,7 +4611,14 @@ CI\uC5D0\uC11C \uBC18\uBCF5 \uAC80\uC0AC: ${command}
4562
4611
  preview: " \uBBF8\uB9AC\uBCF4\uAE30: mimi-seed deploy --dry-run\n\n",
4563
4612
  ready: "\u2713 \uCD9C\uC2DC \uC900\uBE44 \uC644\uB8CC!\n",
4564
4613
  notReady: (score) => `\uC544\uC9C1 ${score}/100 \u2014 \uC704 \uB2E4\uC74C \uB2E8\uACC4\uB97C \uC9C4\uD589\uD558\uC138\uC694.
4565
- `
4614
+ `,
4615
+ rangeTitle: "\uACF5\uC9C0 \uCD08\uC548 \uBC94\uC704 (mimi-seed notes \uAE30\uC900):",
4616
+ rangeFromTag: (tag, from, head, count) => ` ${tag} (${from}) \u2192 HEAD (${head})${count === null ? "" : `, \uCEE4\uBC0B ${count}\uAC1C`}`,
4617
+ rangeOverLimit: (limit, count, canRaise) => ` ! notes \uB294 \uAE30\uBCF8\uC73C\uB85C \uCD5C\uADFC ${limit}\uAC1C\uB9CC \uC501\uB2C8\uB2E4. ${canRaise ? `${count}\uAC1C \uBAA8\uB450 \uC4F0\uB824\uBA74 --limit ${count}, \uC544\uB2C8\uBA74 ` : ""}--from \uC73C\uB85C \uBC94\uC704\uB97C \uC881\uD788\uC138\uC694.`,
4618
+ rangeNoTag: (head, limit) => ` \uD0DC\uADF8\uAC00 \uC5C6\uC5B4 HEAD (${head}) \uAE30\uC900 \uCD5C\uADFC \uCEE4\uBC0B\uC744 \uCD5C\uB300 ${limit}\uAC1C\uAE4C\uC9C0 \uC501\uB2C8\uB2E4. \uC9C0\uB09C \uCD9C\uC2DC \uC9C0\uC810\uC774 \uC788\uC73C\uBA74 --from \uC73C\uB85C \uC815\uD558\uC138\uC694.`,
4619
+ rangeDirty: " ! \uC774 \uD3F4\uB354\uC5D0 \uCEE4\uBC0B\uB418\uC9C0 \uC54A\uC740 \uBCC0\uACBD\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC704 \uC810\uAC80\uC740 \uC774 \uBCC0\uACBD\uAE4C\uC9C0 \uBD24\uC9C0\uB9CC \uACF5\uC9C0 \uCD08\uC548\uC740 \uCEE4\uBC0B\uB9CC \uBD05\uB2C8\uB2E4 \u2014 \uAC19\uC740 \uD6C4\uBCF4\uB97C \uBCF4\uB824\uBA74 \uBA3C\uC800 \uCEE4\uBC0B\uD558\uC138\uC694.",
4620
+ rangeNext: " \uCD08\uC548 \uB9CC\uB4E4\uAE30: mimi-seed notes",
4621
+ rangeNextAt: (dir) => ` \uCD08\uC548 \uB9CC\uB4E4\uAE30: \uC810\uAC80\uD55C \uD3F4\uB354(${dir})\uC5D0\uC11C mimi-seed notes`
4566
4622
  },
4567
4623
  {
4568
4624
  noAccount: "For remote commands, set MIMI_SEED_WEB_BASE to your team console and run `mimi-seed init`.\n",
@@ -4605,7 +4661,14 @@ Score: ${bar}
4605
4661
  preview: " Preview: mimi-seed deploy --dry-run\n\n",
4606
4662
  ready: "\u2713 Ready to launch!\n",
4607
4663
  notReady: (score) => `Still ${score}/100 \u2014 work through the next steps above.
4608
- `
4664
+ `,
4665
+ rangeTitle: "Release-notes range (what mimi-seed notes would use):",
4666
+ rangeFromTag: (tag, from, head, count) => ` ${tag} (${from}) \u2192 HEAD (${head})${count === null ? "" : `, ${count} commit(s)`}`,
4667
+ rangeOverLimit: (limit, count, canRaise) => ` ! notes uses only the latest ${limit} by default. ${canRaise ? `To use all ${count}: --limit ${count}, or n` : "N"}arrow the range with --from.`,
4668
+ rangeNoTag: (head, limit) => ` No tag yet, so at most the latest ${limit} commits ending at HEAD (${head}) are used. Set the last release point with --from.`,
4669
+ rangeDirty: " ! This folder has uncommitted changes. The check above saw them, but release notes only see commits \u2014 commit first so both look at the same candidate.",
4670
+ rangeNext: " Draft them: mimi-seed notes",
4671
+ rangeNextAt: (dir) => ` Draft them: run mimi-seed notes in the checked folder (${dir})`
4609
4672
  }
4610
4673
  );
4611
4674
  function declaresDevEngines(projectPath) {
@@ -4619,6 +4682,38 @@ function declaresDevEngines(projectPath) {
4619
4682
  function devEnginesCheckCommand(platform) {
4620
4683
  return platform === "win32" ? "$p = New-Item -ItemType Directory (Join-Path $env:TEMP ([guid]::NewGuid())); npx -y --prefix $p.FullName mimi-seed check --local --path . --fail-on-blocker" : 'npx -y --prefix "$(mktemp -d)" mimi-seed check --local --path . --fail-on-blocker';
4621
4684
  }
4685
+ function sameFolder(a, b) {
4686
+ const norm = (p) => {
4687
+ let real = path14.resolve(p);
4688
+ try {
4689
+ real = fs11.realpathSync.native(real);
4690
+ } catch {
4691
+ }
4692
+ return process.platform === "win32" ? real.toLowerCase() : real;
4693
+ };
4694
+ return norm(a) === norm(b);
4695
+ }
4696
+ function renderNotesRange(projectPath, cwd = process.cwd()) {
4697
+ if (!isGitRepo(projectPath)) return "";
4698
+ const head = resolveCommit(projectPath, "HEAD");
4699
+ if (!head) return "";
4700
+ const m = M5();
4701
+ const tag = getLatestTag(projectPath);
4702
+ const lines = [m.rangeTitle];
4703
+ if (tag) {
4704
+ const from = resolveCommit(projectPath, `refs/tags/${tag}`);
4705
+ const count = countCommits(projectPath, { from: `refs/tags/${tag}`, to: "HEAD" });
4706
+ lines.push(m.rangeFromTag(tag, from ?? "?", head, count));
4707
+ if (count !== null && count > DEFAULT_NOTES_LIMIT) lines.push(m.rangeOverLimit(DEFAULT_NOTES_LIMIT, count, count <= MAX_NOTES_LIMIT));
4708
+ } else {
4709
+ lines.push(m.rangeNoTag(head, DEFAULT_NOTES_LIMIT));
4710
+ }
4711
+ if (hasUncommittedChanges(projectPath, { here: true })) lines.push(m.rangeDirty);
4712
+ lines.push(sameFolder(projectPath, cwd) ? m.rangeNext : m.rangeNextAt(projectPath));
4713
+ return `
4714
+ ${lines.join("\n")}
4715
+ `;
4716
+ }
4622
4717
  function parseCheckArgs(argv) {
4623
4718
  const args = {
4624
4719
  projectPath: process.cwd(),
@@ -4687,6 +4782,7 @@ async function cmdCheck(argv) {
4687
4782
  process.stdout.write(args.json ? `${JSON.stringify(report, null, 2)}
4688
4783
  ` : renderReleaseDoctor(report, resolveLang()));
4689
4784
  if (!args.json && !process.env.CI) {
4785
+ process.stdout.write(renderNotesRange(args.projectPath));
4690
4786
  process.stdout.write((declaresDevEngines(args.projectPath) ? M5().localNextDevEngines(devEnginesCheckCommand(process.platform)) : M5().localNext) + telemetryNotice());
4691
4787
  }
4692
4788
  if (args.failOnBlocker && report.counts.blocker > 0) process.exitCode = 1;
@@ -4860,6 +4956,11 @@ ${items}
4860
4956
  analyzing: (n) => `\uCEE4\uBC0B ${n}\uAC1C \uBD84\uC11D \uC911...
4861
4957
 
4862
4958
  `,
4959
+ rangeShas: (from, to) => ` \uCEE4\uBC0B: ${from ?? "(\uC2DC\uC791)"} \u2192 ${to}
4960
+ `,
4961
+ truncated: (used, total, suggest) => `\uBC94\uC704\uC758 \uCEE4\uBC0B ${total}\uAC1C \uC911 \uCD5C\uADFC ${used}\uAC1C\uB9CC \uB178\uD2B8\uC5D0 \uC501\uB2C8\uB2E4. ${suggest === total ? `\uC804\uBD80 \uC4F0\uB824\uBA74 --limit ${total}` : `--limit \uCD5C\uB300\uAC12\uC740 ${suggest}\uC785\uB2C8\uB2E4 \u2014 --from \uC73C\uB85C \uBC94\uC704\uB97C \uC881\uD788\uC138\uC694`}
4962
+ `,
4963
+ dirtyTree: "\uCEE4\uBC0B\uB418\uC9C0 \uC54A\uC740 \uBCC0\uACBD\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC774 \uB178\uD2B8\uC5D0\uB294 \uB4E4\uC5B4\uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCD9C\uC2DC \uD6C4\uBCF4\uB77C\uBA74 \uBA3C\uC800 \uCEE4\uBC0B\uD558\uC138\uC694.\n",
4863
4964
  generating: "\u{1F916} Claude AI\uB85C \uC0DD\uC131 \uC911...\n",
4864
4965
  aiFailed: (msg) => `AI \uC0DD\uC131 \uC2E4\uD328, \uD15C\uD50C\uB9BF \uC0AC\uC6A9: ${msg}
4865
4966
  `,
@@ -4875,6 +4976,11 @@ ${items}
4875
4976
  listAppsFailed: (msg) => `\uC571 \uBAA9\uB85D \uC870\uD68C \uC2E4\uD328: ${msg}
4876
4977
  `,
4877
4978
  noApps: "\uB4F1\uB85D\uB41C \uC571\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.\n",
4979
+ invalidApp: (value) => `--app \uB4A4\uC5D0 \uC571 ID\uB97C \uC785\uB825\uD558\uC138\uC694: ${value || "(\uAC12 \uC5C6\uC74C)"}
4980
+ `,
4981
+ ambiguousApp: (n, rows) => `\uB4F1\uB85D\uB41C \uC571\uC774 ${n}\uAC1C\uB77C \uC5B4\uB290 \uC571\uC5D0 \uC801\uC6A9\uD560\uC9C0 \uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. --app <id> \uB85C \uACE0\uB974\uC138\uC694:
4982
+ ${rows}
4983
+ `,
4878
4984
  toneToAllLocales: "\uC120\uD0DD\uD55C \uD1A4\uC744 \uBAA8\uB4E0 \uB85C\uCF00\uC77C\uC5D0 \uC801\uC6A9\uD569\uB2C8\uB2E4 (\uC790\uB3D9 \uBC88\uC5ED \uBBF8\uC801\uC6A9).\n",
4879
4985
  applying: "Play Store\uC5D0 \uC801\uC6A9 \uC911...\n",
4880
4986
  applyFailed: (locale, msg) => `${locale} \uC801\uC6A9 \uC2E4\uD328: ${msg}
@@ -4921,6 +5027,11 @@ Update now.`,
4921
5027
  analyzing: (n) => `Analyzing ${n} commit(s)...
4922
5028
 
4923
5029
  `,
5030
+ rangeShas: (from, to) => ` Commits: ${from ?? "(start)"} \u2192 ${to}
5031
+ `,
5032
+ truncated: (used, total, suggest) => `Using only the latest ${used} of ${total} commits in the range. ${suggest === total ? `To use them all: --limit ${total}` : `--limit goes up to ${suggest} \u2014 narrow the range with --from`}
5033
+ `,
5034
+ dirtyTree: "There are uncommitted changes. They are not in these notes \u2014 commit them first if this is the release candidate.\n",
4924
5035
  generating: "\u{1F916} Generating with Claude AI...\n",
4925
5036
  aiFailed: (msg) => `AI generation failed, falling back to the template: ${msg}
4926
5037
  `,
@@ -4936,6 +5047,11 @@ Update now.`,
4936
5047
  listAppsFailed: (msg) => `Failed to list apps: ${msg}
4937
5048
  `,
4938
5049
  noApps: "No apps registered.\n",
5050
+ invalidApp: (value) => `Provide an app ID after --app: ${value || "(missing)"}
5051
+ `,
5052
+ ambiguousApp: (n, rows) => `${n} apps are registered, so the target app is ambiguous. Choose one with --app <id>:
5053
+ ${rows}
5054
+ `,
4939
5055
  toneToAllLocales: "Applying the selected tone to every locale (no automatic translation).\n",
4940
5056
  applying: "Applying to Play Store...\n",
4941
5057
  applyFailed: (locale, msg) => `${locale} failed to apply: ${msg}
@@ -4944,14 +5060,19 @@ Update now.`,
4944
5060
  `
4945
5061
  }
4946
5062
  );
4947
- var MAX_LIMIT = 1e4;
5063
+ var MAX_LIMIT = MAX_NOTES_LIMIT;
4948
5064
  function parseArgs(argv) {
4949
- const args = { to: "HEAD", locales: ["ko", "en-US"], apply: false, noInteractive: false, limit: 30 };
5065
+ const args = { to: "HEAD", locales: ["ko", "en-US"], apply: false, noInteractive: false, limit: DEFAULT_NOTES_LIMIT };
4950
5066
  for (let i = 0; i < argv.length; i++) {
4951
5067
  if (argv[i] === "--from" && argv[i + 1]) args.from = argv[++i];
4952
5068
  if (argv[i] === "--to" && argv[i + 1]) args.to = argv[++i];
4953
5069
  if (argv[i] === "--locale" && argv[i + 1]) args.locales = argv[++i].split(",").map((l) => l.trim());
4954
5070
  if (argv[i] === "--apply") args.apply = true;
5071
+ if (argv[i] === "--app") {
5072
+ const raw = argv[++i] ?? "";
5073
+ if (!raw || raw.startsWith("-")) return { error: M6().invalidApp(raw) };
5074
+ args.appId = raw;
5075
+ }
4955
5076
  if (argv[i] === "--no-interactive") args.noInteractive = true;
4956
5077
  if (argv[i] === "--limit") {
4957
5078
  const raw = argv[++i] ?? "";
@@ -5010,13 +5131,32 @@ function generateTemplate(commits, locales) {
5010
5131
  const localized = Object.fromEntries(locales.map((l) => [l, concise]));
5011
5132
  return { concise, detailed, marketing, localized };
5012
5133
  }
5013
- function parseFirstApp(text) {
5134
+ function pickSingleApp(text) {
5135
+ let apps;
5014
5136
  try {
5015
- const apps = JSON.parse(text);
5016
- if (Array.isArray(apps) && apps.length > 0) return apps[0];
5137
+ apps = JSON.parse(text);
5017
5138
  } catch {
5139
+ return { error: M6().noApps };
5018
5140
  }
5019
- return null;
5141
+ if (!Array.isArray(apps) || apps.length === 0) return { error: M6().noApps };
5142
+ if (apps.length > 1) {
5143
+ const rows = apps.map((a) => ` ${a.id} ${a.name ?? a.packageName ?? ""}`.trimEnd()).join("\n");
5144
+ return { error: M6().ambiguousApp(apps.length, rows) };
5145
+ }
5146
+ return { app: apps[0] };
5147
+ }
5148
+ async function resolveApplyApp(cfg, explicitAppId) {
5149
+ try {
5150
+ const linked = resolveLinkedAppId(await findProjectLink(process.cwd()), cfg.webBase, explicitAppId);
5151
+ if (linked) return { id: linked };
5152
+ } catch (e) {
5153
+ return { error: `${e.message}
5154
+ ` };
5155
+ }
5156
+ const appsResult = await mcpCall(cfg.endpoint, cfg.token, "list_apps", {});
5157
+ if (appsResult.isError) return { error: M6().listAppsFailed(appsResult.text) };
5158
+ const picked = pickSingleApp(appsResult.text);
5159
+ return "error" in picked ? picked : { id: picked.app.id };
5020
5160
  }
5021
5161
  async function cmdNotes(argv) {
5022
5162
  const parsed = parseArgs(argv);
@@ -5048,6 +5188,13 @@ async function cmdNotes(argv) {
5048
5188
  process.stdout.write(kleur5.yellow(M6().noCommits));
5049
5189
  process.exit(0);
5050
5190
  }
5191
+ const toSha = resolveCommit(cwd, args.to);
5192
+ if (toSha) process.stdout.write(kleur5.dim(M6().rangeShas(fromForGit ? resolveCommit(cwd, fromForGit) : null, toSha)));
5193
+ const total = fromForGit ? countCommits(cwd, { from: fromForGit, to: args.to }) : null;
5194
+ if (total !== null && total > args.limit) {
5195
+ process.stdout.write(kleur5.yellow(M6().truncated(commits.length, total, Math.min(total, MAX_LIMIT))));
5196
+ }
5197
+ if (args.to === "HEAD" && hasUncommittedChanges(cwd)) process.stdout.write(kleur5.yellow(M6().dirtyTree));
5051
5198
  process.stdout.write(kleur5.dim(M6().analyzing(commits.length)));
5052
5199
  let result;
5053
5200
  if (process.env.ANTHROPIC_API_KEY) {
@@ -5094,14 +5241,10 @@ async function cmdNotes(argv) {
5094
5241
  else if (choice === "3") selectedText = result.marketing;
5095
5242
  userSelectedTone = true;
5096
5243
  }
5097
- const appsResult = await mcpCall(cfg.endpoint, cfg.token, "list_apps", {});
5098
- if (appsResult.isError) {
5099
- process.stdout.write(kleur5.red(M6().listAppsFailed(appsResult.text)));
5100
- return;
5101
- }
5102
- const app = parseFirstApp(appsResult.text);
5103
- if (!app) {
5104
- process.stdout.write(kleur5.yellow(M6().noApps));
5244
+ const app = await resolveApplyApp(cfg, args.appId);
5245
+ if ("error" in app) {
5246
+ process.stdout.write(kleur5.red(app.error));
5247
+ if (args.apply) process.exit(1);
5105
5248
  return;
5106
5249
  }
5107
5250
  if (userSelectedTone && args.locales.length > 1) {
@@ -5137,7 +5280,7 @@ var M7 = catalog(
5137
5280
  positive: "\uAE0D\uC815\uC801\uC778 \uB9AC\uBDF0. \uAC10\uC0AC \uC778\uC0AC\uC640 \uD568\uAED8 \uC55E\uC73C\uB85C\uB3C4 \uC88B\uC740 \uACBD\uD5D8\uC744 \uC81C\uACF5\uD558\uACA0\uB2E4\uB294 \uC758\uC9C0\uB97C \uD45C\uD604.",
5138
5281
  negative: "\uBD80\uC815\uC801\uC778 \uB9AC\uBDF0. \uBA3C\uC800 \uBD88\uD3B8\uC744 \uC0AC\uACFC\uD558\uACE0, \uBB38\uC81C \uD574\uACB0 \uC758\uC9C0\uB97C \uBCF4\uC5EC\uC918. \uAC00\uB2A5\uD558\uBA74 \uC9C0\uC6D0 \uCC44\uB110\uB85C \uC720\uB3C4.",
5139
5282
  neutral: "\uC911\uB9BD\uC801\uC778 \uB9AC\uBDF0. \uD53C\uB4DC\uBC31\uC5D0 \uAC10\uC0AC\uD558\uACE0 \uAC1C\uC120 \uB178\uB825\uC744 \uC57D\uC18D.",
5140
- bug_report: "\uBC84\uADF8 \uB9AC\uD3EC\uD2B8. \uBB38\uC81C\uB97C \uD655\uC778\uD588\uC74C\uC744 \uC54C\uB9AC\uACE0, \uC218\uC815 \uC608\uC815\uC784\uC744 \uC804\uB2EC.",
5283
+ bug_report: "\uBC84\uADF8 \uB9AC\uD3EC\uD2B8. \uC81C\uBCF4\uC5D0 \uAC10\uC0AC\uD558\uACE0 \uC0B4\uD3B4\uBCF4\uACA0\uB2E4\uACE0 \uC54C\uB824. \uC218\uC815\uD588\uB2E4\uAC70\uB098 \uC5B8\uC81C \uACE0\uCCD0\uC9C4\uB2E4\uACE0\uB294 \uC4F0\uC9C0 \uB9C8.",
5141
5284
  feature_request: "\uAE30\uB2A5 \uC694\uCCAD. \uD53C\uB4DC\uBC31\uC5D0 \uAC10\uC0AC\uD558\uACE0, \uAC80\uD1A0\uD558\uACA0\uB2E4\uACE0 \uC57D\uC18D."
5142
5285
  },
5143
5286
  localeNames: { ko: "\uD55C\uAD6D\uC5B4", en: "\uC601\uC5B4", ja: "\uC77C\uBCF8\uC5B4", "en-US": "\uC601\uC5B4", "zh-TW": "\uBC88\uCCB4\uC911\uAD6D\uC5B4" },
@@ -5190,7 +5333,7 @@ JSON\uC73C\uB85C\uB9CC \uC751\uB2F5: { "reply": "\uB2F5\uBCC0 \uD14D\uC2A4\uD2B8
5190
5333
  positive: "A positive review. Say thank you and commit to keeping the experience great.",
5191
5334
  negative: "A negative review. Apologize for the trouble first, then show a commitment to fixing it. Point to a support channel if you can.",
5192
5335
  neutral: "A neutral review. Thank them for the feedback and promise to keep improving.",
5193
- bug_report: "A bug report. Confirm the issue is known and say a fix is coming.",
5336
+ bug_report: "A bug report. Thank them for reporting it and say you will look into it. Do not say it is fixed or when a fix will ship.",
5194
5337
  feature_request: "A feature request. Thank them for the feedback and promise to consider it."
5195
5338
  },
5196
5339
  localeNames: {
@@ -5374,6 +5517,7 @@ ${kleur7.bold("Google OAuth (Firebase / AdMob / Play):")}
5374
5517
  ${kleur7.bold("\uD50C\uB7AB\uD3FC\uBCC4 \uC790\uACA9\uC99D\uBA85:")}
5375
5518
  ${kleur7.cyan("mimi-seed auth appstore")} App Store Connect API \uD0A4 (appstore.json)
5376
5519
  ${kleur7.cyan("mimi-seed auth playstore")} Play \uC11C\uBE44\uC2A4 \uACC4\uC815 JSON \uB4F1\uB85D
5520
+ ${kleur7.cyan("mimi-seed auth onestore")} \uC6D0\uC2A4\uD1A0\uC5B4 IAP OAuth (onestore.json)
5377
5521
  ${kleur7.cyan("mimi-seed auth bigquery")} BigQuery \uC11C\uBE44\uC2A4 \uACC4\uC815 (Crashlytics export \uB4F1)
5378
5522
  ${kleur7.cyan("mimi-seed auth drive")} Google Drive \uC11C\uBE44\uC2A4 \uACC4\uC815 (\uACF5\uC720 \uD3F4\uB354\xB7\uACF5\uC720 \uB4DC\uB77C\uC774\uBE0C \uC5C5\uB85C\uB4DC)
5379
5523
 
@@ -5417,6 +5561,7 @@ ${kleur7.bold("Google OAuth (Firebase / AdMob / Play):")}
5417
5561
  ${kleur7.bold("Per-platform credentials:")}
5418
5562
  ${kleur7.cyan("mimi-seed auth appstore")} App Store Connect API key (appstore.json)
5419
5563
  ${kleur7.cyan("mimi-seed auth playstore")} register a Play service-account JSON
5564
+ ${kleur7.cyan("mimi-seed auth onestore")} ONE store IAP OAuth (onestore.json)
5420
5565
  ${kleur7.cyan("mimi-seed auth bigquery")} BigQuery service account (Crashlytics export, etc.)
5421
5566
  ${kleur7.cyan("mimi-seed auth drive")} Google Drive service account (uploads to shared folders / drives)
5422
5567
 
@@ -5477,6 +5622,7 @@ async function cmdAuth(args) {
5477
5622
  }
5478
5623
  if (sub === "appstore") return void exitWith(await runMcpBin("mimi-seed-appstore-auth", rest));
5479
5624
  if (sub === "playstore") return void exitWith(await runMcpBin("mimi-seed-playstore-auth", rest));
5625
+ if (sub === "onestore") return void exitWith(await runMcpBin("mimi-seed-onestore-auth", rest));
5480
5626
  if (sub === "bigquery") return void exitWith(await runMcpBin("mimi-seed-bigquery-auth", rest));
5481
5627
  if (sub === "drive") return void exitWith(await runMcpBin("mimi-seed-drive-auth", rest));
5482
5628
  if (sub === "jenkins") return void exitWith(await runMcpBin("mimi-seed-jenkins-auth", rest));
@@ -5488,12 +5634,12 @@ async function cmdAuth(args) {
5488
5634
  if (sub === "tiktok") return void exitWith(await runMcpBin("mimi-seed-tiktok-business-auth", rest));
5489
5635
  if (sub === "social") {
5490
5636
  log2(kleur7.dim(M8().socialChecklist));
5491
- const { cmdSetup: cmdSetup2 } = await import("./setup-52TDGMCT.js");
5637
+ const { cmdSetup: cmdSetup2 } = await import("./setup-TNM7VWKK.js");
5492
5638
  await cmdSetup2(["--only", SOCIAL_CREDENTIALS.join(","), ...rest]);
5493
5639
  return;
5494
5640
  }
5495
5641
  if (sub === "ci") {
5496
- const { cmdSetup: cmdSetup2 } = await import("./setup-52TDGMCT.js");
5642
+ const { cmdSetup: cmdSetup2 } = await import("./setup-TNM7VWKK.js");
5497
5643
  await cmdSetup2(["--only", "github,gitlab", "--reconnect", "github,gitlab"]);
5498
5644
  return;
5499
5645
  }
@@ -5629,9 +5775,10 @@ ${kleur9.dim("setup \uB9C8\uBC95\uC0AC\uAC00 \uCCAB \uC2E4\uD589 \uB54C \uBB3C\u
5629
5775
  --from <ref> \uC2DC\uC791 \uCEE4\uBC0B/\uD0DC\uADF8 (\uAE30\uBCF8: \uCD5C\uC2E0 \uD0DC\uADF8)
5630
5776
  --to <ref> \uB05D \uCEE4\uBC0B (\uAE30\uBCF8: HEAD)
5631
5777
  --locale ko,en-US \uB300\uC0C1 \uB85C\uCF00\uC77C (\uC27C\uD45C \uAD6C\uBD84)
5632
- --apply \uC0DD\uC131 \uD6C4 \uC2A4\uD1A0\uC5B4\uC5D0 \uBC14\uB85C \uC801\uC6A9
5778
+ --apply \uC0DD\uC131 \uD6C4 Play Store \uB9B4\uB9AC\uC988 \uB178\uD2B8\uC5D0 \uBC14\uB85C \uC801\uC6A9
5779
+ --app <id> \uC801\uC6A9\uD560 \uC571 (\uC5C6\uC73C\uBA74 \uD504\uB85C\uC81D\uD2B8 \uB9C1\uD06C, \uC571\uC774 \uD558\uB098\uBFD0\uC77C \uB54C\uB9CC \uC790\uB3D9 \uC120\uD0DD)
5633
5780
  --no-interactive CI \uBAA8\uB4DC (\uD504\uB86C\uD504\uD2B8 \uC5C6\uC74C)
5634
- --limit <n> \uCD5C\uB300 \uCEE4\uBC0B \uC218 (\uAE30\uBCF8: 30)`,
5781
+ --limit <n> \uCD5C\uB300 \uCEE4\uBC0B \uC218 (\uAE30\uBCF8: 30, \uBC94\uC704\uAC00 \uB354 \uAE38\uBA74 \uC798\uB838\uB2E4\uACE0 \uD45C\uC2DC)`,
5635
5782
  check: `${kleur9.bold("mimi-seed check")} \u2014 \uCD9C\uC2DC \uC804 Readiness \uC810\uAC80
5636
5783
 
5637
5784
  \uC635\uC158:
@@ -5782,9 +5929,10 @@ Options:
5782
5929
  --from <ref> start commit/tag (default: latest tag)
5783
5930
  --to <ref> end commit (default: HEAD)
5784
5931
  --locale ko,en-US target locales (comma-separated)
5785
- --apply push to the stores right after generating
5932
+ --apply push to the Play Store release notes right after generating
5933
+ --app <id> app to apply to (else the project link; auto-picked only when one app is registered)
5786
5934
  --no-interactive CI mode (no prompts)
5787
- --limit <n> max commits (default: 30)`,
5935
+ --limit <n> max commits (default: 30; the output says when the range was longer)`,
5788
5936
  check: `${kleur9.bold("mimi-seed check")} \u2014 pre-release readiness check
5789
5937
 
5790
5938
  Options:
@@ -3,7 +3,7 @@ import {
3
3
  cmdSetup,
4
4
  parseSetupArgs,
5
5
  resolveMode
6
- } from "./chunk-AHUBEWYH.js";
6
+ } from "./chunk-JGAE2S3M.js";
7
7
  export {
8
8
  cmdSetup,
9
9
  parseSetupArgs,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "mcp",
12
12
  "cli"
13
13
  ],
14
- "version": "0.25.7",
14
+ "version": "0.27.0",
15
15
  "description": "Release Doctor: check Expo, React Native and Unity release risks before connecting app stores.",
16
16
  "bin": {
17
17
  "mimi-seed": "dist/index.js"