@yoonion/mimi-seed-mcp 0.29.0 → 0.30.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.
- package/README.md +12 -4
- package/assets/agent-guide.md +26 -9
- package/dist/checks/appstore-submission.d.ts +4 -4
- package/dist/checks/plan.d.ts +2 -2
- package/dist/checks/release-readiness.d.ts +3 -3
- package/dist/checks/risks.d.ts +1 -1
- package/dist/gsc/tools.d.ts +3 -3
- package/dist/i18n/manifest-en.js +3 -0
- package/dist/i18n/tools-en/auth.d.ts +1 -1
- package/dist/i18n/tools-en/auth.js +1 -1
- package/dist/i18n/tools-en/index.js +2 -0
- package/dist/i18n/tools-en/social.d.ts +5 -0
- package/dist/i18n/tools-en/social.js +4 -0
- package/dist/index.js +2 -0
- package/dist/jenkins/builds.d.ts +2 -2
- package/dist/lib/package-root.d.ts +15 -0
- package/dist/lib/package-root.js +30 -0
- package/dist/lib/tool-menu.d.ts +9 -2
- package/dist/lib/tool-menu.js +19 -3
- package/dist/playstore/releases.d.ts +2 -2
- package/dist/prompts.js +2 -2
- package/dist/registers/auth.js +5 -86
- package/dist/registers/social-status.d.ts +2 -0
- package/dist/registers/social-status.js +143 -0
- package/dist/resources.js +4 -3
- package/dist/server.js +4 -13
- package/dist/social/profile-store.js +1 -1
- package/dist/social-index.d.ts +2 -0
- package/dist/social-index.js +31 -0
- package/dist/social-server.d.ts +11 -0
- package/dist/social-server.js +49 -0
- package/dist/tiktok-business/config.js +1 -1
- package/dist/tools-cli.js +13 -5
- package/dist/video/research.d.ts +1 -1
- package/dist/video/schemas.d.ts +3 -3
- package/npm-shrinkwrap.json +3 -2
- package/package.json +2 -1
- package/tool-manifest.json +26 -11
package/dist/registers/auth.js
CHANGED
|
@@ -14,16 +14,9 @@ import { getAppStoreCredentials } from '../appstore/auth.js';
|
|
|
14
14
|
import { loadJenkinsConfig } from '../jenkins/config.js';
|
|
15
15
|
import { loadCiConfig } from '../ci/config.js';
|
|
16
16
|
import { loadConfig as loadGoogleAdsConfig } from '../googleads/config.js';
|
|
17
|
-
import { loadFacebookConfig } from '../facebook/config.js';
|
|
18
|
-
import { loadInstagramConfig } from '../instagram/config.js';
|
|
19
|
-
import { loadThreadsConfig } from '../threads/config.js';
|
|
20
|
-
import { loadTikTokBusinessConfig } from '../tiktok-business/config.js';
|
|
21
|
-
import { tokenFreshness as tiktokTokenFreshness } from '../tiktok-business/auth.js';
|
|
22
|
-
import { metaTokenFreshness } from '../lib/meta-auth.js';
|
|
23
17
|
import { readPackageRootText } from '../lib/package-root.js';
|
|
24
18
|
import { resolveBigQueryAuth } from '../auth/bigquery-auth.js';
|
|
25
19
|
import { syncRemoteCredentials } from '../remote-sync.js';
|
|
26
|
-
import { resolveSocialConfigTarget } from '../social/profile-store.js';
|
|
27
20
|
import { lookupProjectManifest, manifestServiceEntries, } from '#core/project-manifest.js';
|
|
28
21
|
import { textResult } from '../lib/mcp-response.js';
|
|
29
22
|
import { describeToolsets } from '../lib/toolsets.js';
|
|
@@ -33,7 +26,7 @@ import { credentialStoreReport } from '#core/credential-store.js';
|
|
|
33
26
|
import { catalog } from '#core/lang.js';
|
|
34
27
|
/** 출력 문구 — 도구별로 묶었다. 호출 시점에 언어를 읽는다 (`A()`). */
|
|
35
28
|
const A = catalog({
|
|
36
|
-
// ── 공통: tokens.json 갱신 시각 ·
|
|
29
|
+
// ── 공통: tokens.json 갱신 시각 · 매니페스트 줄 ──
|
|
37
30
|
refresh: {
|
|
38
31
|
mtimeFailed: '(파일 mtime 조회 실패)',
|
|
39
32
|
daysAgo: (days, hours) => `${days}d ${hours}h 전 갱신`,
|
|
@@ -41,13 +34,6 @@ const A = catalog({
|
|
|
41
34
|
over14: `⚠️ 14일 이상 미사용 — Google 정책상 refresh_token revoke 위험. 안전을 위해 'mimi_seed_auth_start' 로 재인증 권장.`,
|
|
42
35
|
over7: `ℹ️ 7일 이상 미사용 — 한 번 더 갱신하지 않으면 곧 revoke 가능. 다음 도구 호출이 자동 갱신해주지만, 장기 미사용 예정이면 미리 인증 갱신 권장.`,
|
|
43
36
|
},
|
|
44
|
-
meta: {
|
|
45
|
-
missing: (padded, fix) => `❌ ${padded} — 미설정 → ${fix} (선택)`,
|
|
46
|
-
expired: (padded, fix) => `❌ ${padded} — 토큰 만료 → ${fix}`,
|
|
47
|
-
expiring: (padded, days, detail, fix) => `⚠️ ${padded} — ${days}일 후 만료 (${detail}) → ${fix}`,
|
|
48
|
-
unknown: (padded, detail) => `⚠️ ${padded} — 설정됨, 만료일 미상 (${detail}) → 계정 조회 도구로 검증`,
|
|
49
|
-
ok: (padded, detail, days) => `✅ ${padded} — 연결됨 (${detail}, ${days}일 남음)`,
|
|
50
|
-
},
|
|
51
37
|
manifestFix: {
|
|
52
38
|
oauth: () => 'mimi_seed_auth_start (Google 로그인 — Firebase/AdMob/Play/GSC/GA4)',
|
|
53
39
|
bigquery: () => 'npx -y @yoonion/mimi-seed-mcp mimi-seed-bigquery-auth (서비스 계정 권장)',
|
|
@@ -88,11 +74,8 @@ const A = catalog({
|
|
|
88
74
|
ciMissing: '❌ CI — 미설정 → ci_save_config (선택)',
|
|
89
75
|
gadsOk: (customerId) => `⚠️ Google Ads — 설정됨 (customerId: ${customerId})`,
|
|
90
76
|
gadsMissing: '❌ Google Ads — 미설정 → googleads_save_config (선택)',
|
|
91
|
-
tiktokMissing: '❌ TikTok Business — 미설정 → mimi-seed auth tiktok (선택)',
|
|
92
|
-
tiktokRefreshExpired: (openId) => `❌ TikTok Business — refresh token 만료 (${openId}) → mimi-seed auth tiktok`,
|
|
93
|
-
tiktokAccessExpired: (openId) => `⚠️ TikTok Business — 연결됨, 다음 호출에서 access token 자동 갱신 (${openId})`,
|
|
94
|
-
tiktokOk: (openId) => `✅ TikTok Business — Organic API 연결됨 (${openId})`,
|
|
95
77
|
bqSa: (email) => `✅ BigQuery — 서비스 계정 연결됨 (${email})`,
|
|
78
|
+
socialServer: '📣 소셜 게시(Facebook · Instagram · Threads · TikTok · 통합 게시)는 별도 서버다 — 등록: npx -y @yoonion/mimi-seed-mcp mimi-seed-social-mcp, 연결 확인: social_status',
|
|
96
79
|
bqOauth: '⚠️ BigQuery — OAuth fallback (Workspace 재인증 정책 시 끊길 수 있음 → 서비스 계정 권장: mimi-seed-bigquery-auth)',
|
|
97
80
|
bqMissing: '❌ BigQuery — 미설정 → npx -y @yoonion/mimi-seed-mcp mimi-seed-bigquery-auth (선택)',
|
|
98
81
|
invalidHeader: '── ⚠️ 읽을 수 없는 설정 파일 ─────────────────────',
|
|
@@ -147,13 +130,6 @@ const A = catalog({
|
|
|
147
130
|
over14: `⚠️ Unused for 14+ days — under Google policy the refresh_token may be revoked. To be safe, re-authenticate with 'mimi_seed_auth_start'.`,
|
|
148
131
|
over7: `ℹ️ Unused for 7+ days — it may be revoked soon unless refreshed again. The next tool call refreshes it automatically, but if you expect a long period without use, refresh authentication in advance.`,
|
|
149
132
|
},
|
|
150
|
-
meta: {
|
|
151
|
-
missing: (padded, fix) => `❌ ${padded} — not set up → ${fix} (optional)`,
|
|
152
|
-
expired: (padded, fix) => `❌ ${padded} — token expired → ${fix}`,
|
|
153
|
-
expiring: (padded, days, detail, fix) => `⚠️ ${padded} — expires in ${days} day(s) (${detail}) → ${fix}`,
|
|
154
|
-
unknown: (padded, detail) => `⚠️ ${padded} — set up, expiry unknown (${detail}) → verify with the account lookup tool`,
|
|
155
|
-
ok: (padded, detail, days) => `✅ ${padded} — connected (${detail}, ${days} day(s) left)`,
|
|
156
|
-
},
|
|
157
133
|
manifestFix: {
|
|
158
134
|
oauth: () => 'mimi_seed_auth_start (Google login — Firebase/AdMob/Play/GSC/GA4)',
|
|
159
135
|
bigquery: () => 'npx -y @yoonion/mimi-seed-mcp mimi-seed-bigquery-auth (service account recommended)',
|
|
@@ -193,11 +169,8 @@ const A = catalog({
|
|
|
193
169
|
ciMissing: '❌ CI — not set up → ci_save_config (optional)',
|
|
194
170
|
gadsOk: (customerId) => `⚠️ Google Ads — set up (customerId: ${customerId})`,
|
|
195
171
|
gadsMissing: '❌ Google Ads — not set up → googleads_save_config (optional)',
|
|
196
|
-
tiktokMissing: '❌ TikTok Business — not set up → mimi-seed auth tiktok (optional)',
|
|
197
|
-
tiktokRefreshExpired: (openId) => `❌ TikTok Business — refresh token expired (${openId}) → mimi-seed auth tiktok`,
|
|
198
|
-
tiktokAccessExpired: (openId) => `⚠️ TikTok Business — connected; the access token refreshes automatically on the next call (${openId})`,
|
|
199
|
-
tiktokOk: (openId) => `✅ TikTok Business — Organic API connected (${openId})`,
|
|
200
172
|
bqSa: (email) => `✅ BigQuery — service account connected (${email})`,
|
|
173
|
+
socialServer: '📣 Social posting (Facebook · Instagram · Threads · TikTok · cross-post) is a separate server — register: npx -y @yoonion/mimi-seed-mcp mimi-seed-social-mcp, check it with social_status',
|
|
201
174
|
bqOauth: '⚠️ BigQuery — OAuth fallback (may disconnect under a Workspace re-auth policy → service account recommended: mimi-seed-bigquery-auth)',
|
|
202
175
|
bqMissing: '❌ BigQuery — not set up → npx -y @yoonion/mimi-seed-mcp mimi-seed-bigquery-auth (optional)',
|
|
203
176
|
invalidHeader: '── ⚠️ Unreadable config files ─────────────────────',
|
|
@@ -270,22 +243,6 @@ function formatLastRefreshHint(lastMs) {
|
|
|
270
243
|
}
|
|
271
244
|
return { label };
|
|
272
245
|
}
|
|
273
|
-
function renderMetaConnection(label, config, detail, fix) {
|
|
274
|
-
const padded = label.padEnd(18);
|
|
275
|
-
const m = A().meta;
|
|
276
|
-
if (!config)
|
|
277
|
-
return m.missing(padded, fix);
|
|
278
|
-
const freshness = metaTokenFreshness(config.expiresAt);
|
|
279
|
-
if (freshness.state === 'expired')
|
|
280
|
-
return m.expired(padded, fix);
|
|
281
|
-
if (freshness.state === 'expiring') {
|
|
282
|
-
return m.expiring(padded, freshness.daysRemaining, detail, fix);
|
|
283
|
-
}
|
|
284
|
-
if (freshness.state === 'unknown') {
|
|
285
|
-
return m.unknown(padded, detail);
|
|
286
|
-
}
|
|
287
|
-
return m.ok(padded, detail, freshness.daysRemaining);
|
|
288
|
-
}
|
|
289
246
|
// 두 MCP 가 모두 'mimi-seed' 로 등록되는 환경에서 에이전트가 프로그램적으로
|
|
290
247
|
// 어느 서버인지 판별할 수 있도록 status 첫 줄에 자기소개를 넣는다.
|
|
291
248
|
const { version: PKG_VERSION } = JSON.parse(readPackageRootText('package.json'));
|
|
@@ -345,7 +302,7 @@ export function registerAuthTools(server) {
|
|
|
345
302
|
// ── 전체 연결 상태 진단 ────────────────────────────────────────────────────
|
|
346
303
|
server.tool('mimi_seed_status', [
|
|
347
304
|
'초기 설정, 전체 연결 확인 또는 인증 문제 진단에 사용합니다.',
|
|
348
|
-
'
|
|
305
|
+
'앱 운영 서비스(Google OAuth / Play SA / App Store / Jenkins / CI / Google Ads / BigQuery)',
|
|
349
306
|
'설정 상태를 한 번에 스캔해 ✅ / ❌ 트래픽 라이트 리포트와 번호 매긴 다음 단계를 반환합니다.',
|
|
350
307
|
'미설정 서비스마다 어떤 도구를 호출하면 되는지 구체적으로 알려줍니다.',
|
|
351
308
|
].join(' '), {}, async () => {
|
|
@@ -452,45 +409,6 @@ export function registerAuthTools(server) {
|
|
|
452
409
|
else {
|
|
453
410
|
lines.push(m.gadsMissing);
|
|
454
411
|
}
|
|
455
|
-
// 7–9. Meta 소셜 — 프로필 결정이 throw 하면(깨진 .mimi-seed.json · 잘못된 socialProfiles) 상태 리포트 전체를
|
|
456
|
-
// 죽이지 않고 그 줄에 원인을 보인다. 게시 도구는 같은 경우에 실패한다(기본 계정으로 폴백하지 않는다).
|
|
457
|
-
const socialLine = (label, render) => {
|
|
458
|
-
try {
|
|
459
|
-
lines.push(render());
|
|
460
|
-
}
|
|
461
|
-
catch (error) {
|
|
462
|
-
lines.push(`❌ ${label.padEnd(17)} — ${error instanceof Error ? error.message : String(error)}`);
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
socialLine('Facebook', () => {
|
|
466
|
-
const fb = loadFacebookConfig();
|
|
467
|
-
return renderMetaConnection('Facebook', fb, `pageId: ${fb?.pageId ?? ''}`, 'mimi-seed auth facebook');
|
|
468
|
-
});
|
|
469
|
-
socialLine('Instagram', () => {
|
|
470
|
-
const igTarget = resolveSocialConfigTarget('instagram');
|
|
471
|
-
const ig = loadInstagramConfig();
|
|
472
|
-
return renderMetaConnection('Instagram', ig, `${igTarget.profile ? `profile: ${igTarget.profile}, ` : ''}userId: ${ig?.userId ?? ''}`, `mimi-seed auth instagram${igTarget.profile ? ` --profile ${igTarget.profile}` : ''}`);
|
|
473
|
-
});
|
|
474
|
-
socialLine('Threads', () => {
|
|
475
|
-
const threadsTarget = resolveSocialConfigTarget('threads');
|
|
476
|
-
const threads = loadThreadsConfig();
|
|
477
|
-
return renderMetaConnection('Threads', threads, `${threadsTarget.profile ? `profile: ${threadsTarget.profile}, ` : ''}userId: ${threads?.userId ?? ''}`, `mimi-seed auth threads${threadsTarget.profile ? ` --profile ${threadsTarget.profile}` : ''}`);
|
|
478
|
-
});
|
|
479
|
-
// 10. TikTok Business — 네트워크 없이 refresh token 만료 상태까지 판정.
|
|
480
|
-
const tiktok = loadTikTokBusinessConfig();
|
|
481
|
-
const tiktokFreshness = tiktokTokenFreshness(tiktok);
|
|
482
|
-
if (!tiktok) {
|
|
483
|
-
lines.push(m.tiktokMissing);
|
|
484
|
-
}
|
|
485
|
-
else if (tiktokFreshness.state === 'refresh_expired') {
|
|
486
|
-
lines.push(m.tiktokRefreshExpired(tiktok.openId));
|
|
487
|
-
}
|
|
488
|
-
else if (tiktokFreshness.state === 'access_expired') {
|
|
489
|
-
lines.push(m.tiktokAccessExpired(tiktok.openId));
|
|
490
|
-
}
|
|
491
|
-
else {
|
|
492
|
-
lines.push(m.tiktokOk(tiktok.openId));
|
|
493
|
-
}
|
|
494
412
|
// 11. BigQuery — resolveBigQueryAuth 기준(서비스 계정 우선, OAuth fallback).
|
|
495
413
|
// 이전엔 SA 파일만 검사해 OAuth fallback 이 살아있어도 ❌ 로 오표기했다.
|
|
496
414
|
let bqAuth = null;
|
|
@@ -513,6 +431,7 @@ export function registerAuthTools(server) {
|
|
|
513
431
|
else {
|
|
514
432
|
lines.push(m.bqMissing);
|
|
515
433
|
}
|
|
434
|
+
lines.push('', m.socialServer);
|
|
516
435
|
// 12. 깨진 설정 파일 — 로더는 "없음"과 "깨짐"을 둘 다 null 로 돌려주므로 위 줄들은 ❌ 미설정으로만 보인다.
|
|
517
436
|
// 어느 파일이 왜 못 읽히는지는 여기서 따로 밝힌다 (잘린 쓰기 · 손으로 고친 문법 오류 · 권한).
|
|
518
437
|
const invalidFiles = findInvalidJsonFiles(path.join(os.homedir(), '.mimi-seed'));
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { ensureFreshAccessToken, getStoredTokens, youtubeUploadProfiles } from '../auth/google-auth.js';
|
|
2
|
+
import { summarizeGrantedDomains } from '../auth/scopes.js';
|
|
3
|
+
import { loadFacebookConfig } from '../facebook/config.js';
|
|
4
|
+
import { loadInstagramConfig } from '../instagram/config.js';
|
|
5
|
+
import { loadThreadsConfig } from '../threads/config.js';
|
|
6
|
+
import { loadTikTokBusinessConfig } from '../tiktok-business/config.js';
|
|
7
|
+
import { tokenFreshness as tiktokTokenFreshness } from '../tiktok-business/auth.js';
|
|
8
|
+
import { metaTokenFreshness } from '../lib/meta-auth.js';
|
|
9
|
+
import { resolveSocialConfigTarget } from '../social/profile-store.js';
|
|
10
|
+
import { readPackageRootText } from '../lib/package-root.js';
|
|
11
|
+
import { textResult } from '../lib/mcp-response.js';
|
|
12
|
+
import { describeToolsets } from '../lib/toolsets.js';
|
|
13
|
+
import { describeApproval } from '../lib/human-approval.js';
|
|
14
|
+
import path from 'node:path';
|
|
15
|
+
import os from 'node:os';
|
|
16
|
+
import { findInvalidJsonFiles } from '../lib/json-file.js';
|
|
17
|
+
import { catalog } from '#core/lang.js';
|
|
18
|
+
/** 소셜 서버의 연결 진단 — 앱 운영 서버의 mimi_seed_status 에서 소셜 줄을 떼어 왔다. */
|
|
19
|
+
const S = catalog({
|
|
20
|
+
header: (version) => `📣 Mimi Seed Social 연결 상태 — local-stdio (@yoonion/mimi-seed-mcp v${version}, 소셜 서버)`,
|
|
21
|
+
metaMissing: (padded, fix) => `❌ ${padded} — 미설정 → ${fix} (선택)`,
|
|
22
|
+
metaExpired: (padded, fix) => `❌ ${padded} — 토큰 만료 → ${fix}`,
|
|
23
|
+
metaExpiring: (padded, days, detail, fix) => `⚠️ ${padded} — ${days}일 후 만료 (${detail}) → ${fix}`,
|
|
24
|
+
metaUnknown: (padded, detail) => `⚠️ ${padded} — 설정됨, 만료일 미상 (${detail}) → 계정 조회 도구로 검증`,
|
|
25
|
+
metaOk: (padded, detail, days) => `✅ ${padded} — 연결됨 (${detail}, ${days}일 남음)`,
|
|
26
|
+
tiktokMissing: '❌ TikTok Business — 미설정 → mimi-seed auth tiktok (선택)',
|
|
27
|
+
tiktokRefreshExpired: (openId) => `❌ TikTok Business — refresh token 만료 (${openId}) → mimi-seed auth tiktok`,
|
|
28
|
+
tiktokAccessExpired: (openId) => `⚠️ TikTok Business — 연결됨, 다음 호출에서 access token 자동 갱신 (${openId})`,
|
|
29
|
+
tiktokOk: (openId) => `✅ TikTok Business — Organic API 연결됨 (${openId})`,
|
|
30
|
+
youtubeUpload: '✅ YouTube — 업로드 권한 연결됨 (social_publish 의 youtube 대상)',
|
|
31
|
+
youtubeProfiles: (list) => `✅ YouTube — 업로드 권한 연결됨 (프로필 ${list})`,
|
|
32
|
+
youtubeMissing: '❌ YouTube — 업로드 권한 없음 → 메인 Mimi Seed 서버의 mimi_seed_auth_start(profile="youtube", domains=["youtube"]) (선택)',
|
|
33
|
+
invalidHeader: '── ⚠️ 읽을 수 없는 설정 파일 ─────────────────────',
|
|
34
|
+
invalidReason: (reason) => ` 원인: ${reason}`,
|
|
35
|
+
invalidFix: ' → 해당 연결을 다시 설정하면 파일을 새로 씁니다. 고치기 전 내용을 보존하려면 먼저 백업하세요.',
|
|
36
|
+
footer: '앱 스토어 · 클라우드 · CI · 영상 제작 연결은 메인 Mimi Seed 서버의 mimi_seed_status 로 확인한다.',
|
|
37
|
+
}, {
|
|
38
|
+
header: (version) => `📣 Mimi Seed Social connection status — local-stdio (@yoonion/mimi-seed-mcp v${version}, social server)`,
|
|
39
|
+
metaMissing: (padded, fix) => `❌ ${padded} — not set up → ${fix} (optional)`,
|
|
40
|
+
metaExpired: (padded, fix) => `❌ ${padded} — token expired → ${fix}`,
|
|
41
|
+
metaExpiring: (padded, days, detail, fix) => `⚠️ ${padded} — expires in ${days} day(s) (${detail}) → ${fix}`,
|
|
42
|
+
metaUnknown: (padded, detail) => `⚠️ ${padded} — set up, expiry unknown (${detail}) → verify with the account lookup tool`,
|
|
43
|
+
metaOk: (padded, detail, days) => `✅ ${padded} — connected (${detail}, ${days} day(s) left)`,
|
|
44
|
+
tiktokMissing: '❌ TikTok Business — not set up → mimi-seed auth tiktok (optional)',
|
|
45
|
+
tiktokRefreshExpired: (openId) => `❌ TikTok Business — refresh token expired (${openId}) → mimi-seed auth tiktok`,
|
|
46
|
+
tiktokAccessExpired: (openId) => `⚠️ TikTok Business — connected; the access token refreshes automatically on the next call (${openId})`,
|
|
47
|
+
tiktokOk: (openId) => `✅ TikTok Business — Organic API connected (${openId})`,
|
|
48
|
+
youtubeUpload: '✅ YouTube — upload permission connected (social_publish youtube target)',
|
|
49
|
+
youtubeProfiles: (list) => `✅ YouTube — upload permission connected (profile ${list})`,
|
|
50
|
+
youtubeMissing: '❌ YouTube — no upload permission → mimi_seed_auth_start(profile="youtube", domains=["youtube"]) on the main Mimi Seed server (optional)',
|
|
51
|
+
invalidHeader: '── ⚠️ Unreadable config files ─────────────────────',
|
|
52
|
+
invalidReason: (reason) => ` Cause: ${reason}`,
|
|
53
|
+
invalidFix: ' → Setting up that connection again rewrites the file. To keep its current contents, back it up first.',
|
|
54
|
+
footer: 'App store, cloud, CI, and video-production connections are checked with mimi_seed_status on the main Mimi Seed server.',
|
|
55
|
+
});
|
|
56
|
+
const { version: PKG_VERSION } = JSON.parse(readPackageRootText('package.json'));
|
|
57
|
+
function renderMetaConnection(label, config, detail, fix) {
|
|
58
|
+
const padded = label.padEnd(18);
|
|
59
|
+
const m = S();
|
|
60
|
+
if (!config)
|
|
61
|
+
return m.metaMissing(padded, fix);
|
|
62
|
+
const freshness = metaTokenFreshness(config.expiresAt);
|
|
63
|
+
if (freshness.state === 'expired')
|
|
64
|
+
return m.metaExpired(padded, fix);
|
|
65
|
+
if (freshness.state === 'expiring')
|
|
66
|
+
return m.metaExpiring(padded, freshness.daysRemaining, detail, fix);
|
|
67
|
+
if (freshness.state === 'unknown')
|
|
68
|
+
return m.metaUnknown(padded, detail);
|
|
69
|
+
return m.metaOk(padded, detail, freshness.daysRemaining);
|
|
70
|
+
}
|
|
71
|
+
export function registerSocialStatusTools(server) {
|
|
72
|
+
server.tool('social_status', [
|
|
73
|
+
'소셜 게시 초기 설정, 연결 확인 또는 인증 문제 진단에 사용합니다.',
|
|
74
|
+
'Facebook / Instagram / Threads / TikTok Business / YouTube(통합 게시 대상) 연결 상태를 한 번에 스캔해',
|
|
75
|
+
'✅ / ❌ 리포트와 미설정 서비스마다 실행할 명령을 반환합니다.',
|
|
76
|
+
].join(' '), {}, async () => {
|
|
77
|
+
const m = S();
|
|
78
|
+
const lines = [
|
|
79
|
+
m.header(PKG_VERSION),
|
|
80
|
+
`🧰 Toolsets: ${describeToolsets(server.toolsets, server.manifest)}`,
|
|
81
|
+
`🛡️ Approval: ${describeApproval(server.approvalStatus())}`,
|
|
82
|
+
'',
|
|
83
|
+
];
|
|
84
|
+
// Meta 소셜 — 프로필 결정이 throw 하면(깨진 .mimi-seed.json · 잘못된 socialProfiles) 리포트 전체를
|
|
85
|
+
// 죽이지 않고 그 줄에 원인을 보인다. 게시 도구는 같은 경우에 실패한다(기본 계정으로 폴백하지 않는다).
|
|
86
|
+
const socialLine = (label, render) => {
|
|
87
|
+
try {
|
|
88
|
+
lines.push(render());
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
lines.push(`❌ ${label.padEnd(17)} — ${error instanceof Error ? error.message : String(error)}`);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
socialLine('Facebook', () => {
|
|
95
|
+
const fb = loadFacebookConfig();
|
|
96
|
+
return renderMetaConnection('Facebook', fb, `pageId: ${fb?.pageId ?? ''}`, 'mimi-seed auth facebook');
|
|
97
|
+
});
|
|
98
|
+
socialLine('Instagram', () => {
|
|
99
|
+
const igTarget = resolveSocialConfigTarget('instagram');
|
|
100
|
+
const ig = loadInstagramConfig();
|
|
101
|
+
return renderMetaConnection('Instagram', ig, `${igTarget.profile ? `profile: ${igTarget.profile}, ` : ''}userId: ${ig?.userId ?? ''}`, `mimi-seed auth instagram${igTarget.profile ? ` --profile ${igTarget.profile}` : ''}`);
|
|
102
|
+
});
|
|
103
|
+
socialLine('Threads', () => {
|
|
104
|
+
const threadsTarget = resolveSocialConfigTarget('threads');
|
|
105
|
+
const threads = loadThreadsConfig();
|
|
106
|
+
return renderMetaConnection('Threads', threads, `${threadsTarget.profile ? `profile: ${threadsTarget.profile}, ` : ''}userId: ${threads?.userId ?? ''}`, `mimi-seed auth threads${threadsTarget.profile ? ` --profile ${threadsTarget.profile}` : ''}`);
|
|
107
|
+
});
|
|
108
|
+
// TikTok Business — 네트워크 없이 refresh token 만료 상태까지 판정.
|
|
109
|
+
const tiktok = loadTikTokBusinessConfig();
|
|
110
|
+
const tiktokFreshness = tiktokTokenFreshness(tiktok);
|
|
111
|
+
if (!tiktok)
|
|
112
|
+
lines.push(m.tiktokMissing);
|
|
113
|
+
else if (tiktokFreshness.state === 'refresh_expired')
|
|
114
|
+
lines.push(m.tiktokRefreshExpired(tiktok.openId));
|
|
115
|
+
else if (tiktokFreshness.state === 'access_expired')
|
|
116
|
+
lines.push(m.tiktokAccessExpired(tiktok.openId));
|
|
117
|
+
else
|
|
118
|
+
lines.push(m.tiktokOk(tiktok.openId));
|
|
119
|
+
// YouTube — social_publish 의 youtube 대상은 Google 로그인을 쓴다. 로그인 자체는 메인 서버가 한다.
|
|
120
|
+
const oauth = await ensureFreshAccessToken();
|
|
121
|
+
const oauthOk = oauth.status === 'fresh' || oauth.status === 'refreshed';
|
|
122
|
+
const profiles = youtubeUploadProfiles();
|
|
123
|
+
if (oauthOk && summarizeGrantedDomains(getStoredTokens()?.scope).granted.includes('youtube')) {
|
|
124
|
+
lines.push(m.youtubeUpload);
|
|
125
|
+
}
|
|
126
|
+
else if (profiles.length > 0) {
|
|
127
|
+
lines.push(m.youtubeProfiles(profiles.map((p) => (p.channelTitle ? `${p.profile}: ${p.channelTitle}` : p.profile)).join(', ')));
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
lines.push(m.youtubeMissing);
|
|
131
|
+
}
|
|
132
|
+
// 로더는 "없음"과 "깨짐"을 둘 다 null 로 돌려주므로 위 줄들은 ❌ 미설정으로만 보인다 — 깨진 파일은 따로 밝힌다.
|
|
133
|
+
const invalidFiles = findInvalidJsonFiles(path.join(os.homedir(), '.mimi-seed'));
|
|
134
|
+
if (invalidFiles.length > 0) {
|
|
135
|
+
lines.push('', m.invalidHeader);
|
|
136
|
+
for (const { file, reason } of invalidFiles)
|
|
137
|
+
lines.push(`❌ ${file}`, m.invalidReason(reason));
|
|
138
|
+
lines.push(m.invalidFix);
|
|
139
|
+
}
|
|
140
|
+
lines.push('', m.footer);
|
|
141
|
+
return textResult(lines.join('\n'));
|
|
142
|
+
});
|
|
143
|
+
}
|
package/dist/resources.js
CHANGED
|
@@ -5,7 +5,7 @@ import { ensureFreshAccessToken } from './auth/google-auth.js';
|
|
|
5
5
|
import { readPackageRootText, readToolManifest } from './lib/package-root.js';
|
|
6
6
|
import { buildToolIndex } from './lib/tool-registrar.js';
|
|
7
7
|
import { resolveToolsets, TOOL_NAMES_ENV, TOOLSETS_ENV, TOOLSETS_EXCLUDE_ENV } from './lib/toolsets.js';
|
|
8
|
-
import { buildToolMenu, formatToolMenu, selectToolMenu, TOOL_MENU_URI, TOOL_SELECTION_URI } from './lib/tool-menu.js';
|
|
8
|
+
import { buildToolMenu, formatToolMenu, lacksSocialServer, selectToolMenu, TOOL_MENU_URI, TOOL_SELECTION_URI } from './lib/tool-menu.js';
|
|
9
9
|
// assets/agent-guide.md = docs/agent-guide.md 의 배포용 사본 (npm 배포본에는 docs/ 가 없다).
|
|
10
10
|
// 갱신은 `npm run plugin:sync`, 드리프트는 prompts-resources.test.ts 가 잡는다.
|
|
11
11
|
// 읽기 실패는 정상 설치에서 불가능하다(files 화이트리스트에 포함) — 그래서 폴백은 가이드
|
|
@@ -119,14 +119,15 @@ export function buildToolCatalog(manifest, selection) {
|
|
|
119
119
|
export function registerResources(server, options = {}) {
|
|
120
120
|
// 리소스 설명은 등록 시점의 언어로 고정된다. 본문은 읽을 때마다 M() 을 다시 부른다.
|
|
121
121
|
const m = M();
|
|
122
|
+
const getManifest = () => options.manifest ?? readToolManifest();
|
|
122
123
|
const getToolMenu = (lang) => {
|
|
123
|
-
const manifest =
|
|
124
|
+
const manifest = getManifest();
|
|
124
125
|
const selection = options.toolsets ?? resolveToolsets(process.env, manifest);
|
|
125
126
|
return buildToolMenu(manifest, selection, lang);
|
|
126
127
|
};
|
|
127
128
|
server.resource('tools-menu', TOOL_MENU_URI, { description: m.menuDescription, mimeType: 'text/plain' }, async () => {
|
|
128
129
|
const lang = resolveLang();
|
|
129
|
-
return { contents: [{ uri: TOOL_MENU_URI, mimeType: 'text/plain', text: formatToolMenu(getToolMenu(lang), lang) }] };
|
|
130
|
+
return { contents: [{ uri: TOOL_MENU_URI, mimeType: 'text/plain', text: formatToolMenu(getToolMenu(lang), lang, { pointToSocialServer: lacksSocialServer(getManifest()) }) }] };
|
|
130
131
|
});
|
|
131
132
|
server.resource('tools-menu-selection', new ResourceTemplate(TOOL_SELECTION_URI, { list: undefined }), { description: m.selectionDescription, mimeType: 'application/json' }, async (uri, { areas }) => {
|
|
132
133
|
const input = Array.isArray(areas) ? areas.join(',') : (areas ?? '');
|
package/dist/server.js
CHANGED
|
@@ -11,10 +11,6 @@ import { registerAiTools } from './registers/ai.js';
|
|
|
11
11
|
import { registerBigqueryTools } from './registers/bigquery.js';
|
|
12
12
|
import { registerAuthTools } from './registers/auth.js';
|
|
13
13
|
import { registerCiTools } from './registers/ci.js';
|
|
14
|
-
import { registerInstagramTools } from './registers/instagram.js';
|
|
15
|
-
import { registerThreadsTools } from './registers/threads.js';
|
|
16
|
-
import { registerCrosspostTools } from './registers/crosspost.js';
|
|
17
|
-
import { registerFacebookTools } from './registers/facebook.js';
|
|
18
14
|
import { registerGoogleAdsTools } from './registers/googleads.js';
|
|
19
15
|
import { registerGscTools } from './registers/gsc.js';
|
|
20
16
|
import { registerNaverTools } from './registers/naver.js';
|
|
@@ -24,11 +20,10 @@ import { registerJenkinsTools } from './registers/jenkins.js';
|
|
|
24
20
|
import { registerAndroidTools } from './registers/android.js';
|
|
25
21
|
import { registerVideoTools } from './registers/video.js';
|
|
26
22
|
import { registerYouTubeTools } from './registers/youtube.js';
|
|
27
|
-
import { registerTikTokBusinessTools } from './registers/tiktok.js';
|
|
28
23
|
import { registerDriveTools } from './registers/drive.js';
|
|
29
24
|
import { registerPrompts } from './prompts.js';
|
|
30
25
|
import { registerResources } from './resources.js';
|
|
31
|
-
import { readToolManifest } from './lib/package-root.js';
|
|
26
|
+
import { manifestForServer, readToolManifest } from './lib/package-root.js';
|
|
32
27
|
import { resolveToolsets } from './lib/toolsets.js';
|
|
33
28
|
import { createToolRegistrar } from './lib/tool-registrar.js';
|
|
34
29
|
import { localizeToolList, toolTextTranslator } from './lib/tool-text.js';
|
|
@@ -47,7 +42,8 @@ export function buildServer(version, options = {}) {
|
|
|
47
42
|
version,
|
|
48
43
|
}, {
|
|
49
44
|
instructions: [
|
|
50
|
-
'Mimi Seed manages app stores, cloud services, CI,
|
|
45
|
+
'Mimi Seed manages app stores, cloud services, CI, and media. Use the client’s tool discovery to load only the active tools needed for the current step.',
|
|
46
|
+
'Posting to Facebook, Instagram, Threads, or TikTok (and cross-posting with YouTube) is served by a separate Mimi Seed social MCP server; if its tools are not available, tell the user to register it (`npx -y @yoonion/mimi-seed-mcp mimi-seed-social-mcp`).',
|
|
51
47
|
'If the user starts Mimi Seed without a specific task, show mimi-seed://tools/menu and let them choose one or more services by number, name, or free-form description. Read mimi-seed://tools/menu/{areas} for the selected comma-separated service IDs before loading tools for the task.',
|
|
52
48
|
'For a targeted read, start with the domain tool. Use mimi_seed_status for onboarding, connection diagnostics, or unresolved authentication errors.',
|
|
53
49
|
'For preview-gated writes, get the preview and explicit approval before confirming the same operation.',
|
|
@@ -58,7 +54,7 @@ export function buildServer(version, options = {}) {
|
|
|
58
54
|
// 도구는 McpServer 에 직접이 아니라 레지스트라를 거쳐 등록한다 — manifest(SSOT)에서
|
|
59
55
|
// annotations · confirm 가드 · toolset 필터 · 폐기 별칭을 붙인다 (lib/tool-registrar.ts).
|
|
60
56
|
// prompts / resources 는 McpServer 를 그대로 쓴다.
|
|
61
|
-
const manifest = readToolManifest();
|
|
57
|
+
const manifest = manifestForServer(readToolManifest(), 'main');
|
|
62
58
|
const toolsets = resolveToolsets(options.env ?? process.env, manifest);
|
|
63
59
|
for (const warning of toolsets.warnings)
|
|
64
60
|
console.error(`[mimi-seed] ${warning}`);
|
|
@@ -79,9 +75,6 @@ export function buildServer(version, options = {}) {
|
|
|
79
75
|
registerBigqueryTools(registrar);
|
|
80
76
|
registerAuthTools(registrar);
|
|
81
77
|
registerCiTools(registrar);
|
|
82
|
-
registerInstagramTools(registrar);
|
|
83
|
-
registerThreadsTools(registrar);
|
|
84
|
-
registerFacebookTools(registrar);
|
|
85
78
|
registerGoogleAdsTools(registrar);
|
|
86
79
|
registerGscTools(registrar);
|
|
87
80
|
registerNaverTools(registrar);
|
|
@@ -91,8 +84,6 @@ export function buildServer(version, options = {}) {
|
|
|
91
84
|
registerAndroidTools(registrar);
|
|
92
85
|
registerVideoTools(registrar);
|
|
93
86
|
registerYouTubeTools(registrar);
|
|
94
|
-
registerTikTokBusinessTools(registrar);
|
|
95
|
-
registerCrosspostTools(registrar);
|
|
96
87
|
registerDriveTools(registrar);
|
|
97
88
|
// 모든 언어에 적용한다 — `$schema` 제거는 언어와 무관하다. 번역은 en 일 때만.
|
|
98
89
|
localizeToolList(server, toolLang === 'en' ? translate : undefined);
|
|
@@ -62,7 +62,7 @@ export function loadSocialPlatformConfig(platform, options = {}) {
|
|
|
62
62
|
return parsed;
|
|
63
63
|
}
|
|
64
64
|
catch {
|
|
65
|
-
// 깨진 설정은 '미설정' — 대상 파일이 이미 정해져 다른 계정으로 넘어가지 않고, 깨진 파일은 mimi_seed_status 가 보고한다
|
|
65
|
+
// 깨진 설정은 '미설정' — 대상 파일이 이미 정해져 다른 계정으로 넘어가지 않고, 깨진 파일은 mimi_seed_status · social_status 가 보고한다
|
|
66
66
|
return null;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readPackageRootText } from './lib/package-root.js';
|
|
3
|
+
// 소셜 게시 MCP 서버의 실행 엔트리 — `npx -y @yoonion/mimi-seed-mcp mimi-seed-social-mcp` (index.ts 가 위임) 또는
|
|
4
|
+
// 전역 설치의 `mimi-seed-social-mcp` bin. 메인 서버(index.ts → server.ts)와 같은 패키지 · 같은 자격증명을 쓰지만
|
|
5
|
+
// 프로세스는 따로다. 도구 조립은 social-server.ts 한 곳이다.
|
|
6
|
+
const { version } = JSON.parse(readPackageRootText('package.json'));
|
|
7
|
+
async function main() {
|
|
8
|
+
const arg = process.argv[2];
|
|
9
|
+
if (arg === '--version' || arg === '-v') {
|
|
10
|
+
console.log(version);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (arg === '--help' || arg === '-h') {
|
|
14
|
+
console.log(`mimi-seed-social-mcp ${version}\n\nMimi Seed social posting MCP server (Facebook, Instagram, Threads, TikTok, cross-post).\nIt is started by an MCP client:\n npx -y @yoonion/mimi-seed-mcp mimi-seed-social-mcp`);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (process.stdin.isTTY) {
|
|
18
|
+
console.error(`mimi-seed-social-mcp ${version}: MCP server running on stdio, waiting for an MCP client. ` +
|
|
19
|
+
'It is not interactive — press Ctrl+C to exit.');
|
|
20
|
+
}
|
|
21
|
+
const [{ StdioServerTransport }, { buildSocialServer }] = await Promise.all([
|
|
22
|
+
import('@modelcontextprotocol/sdk/server/stdio.js'),
|
|
23
|
+
import('./social-server.js'),
|
|
24
|
+
]);
|
|
25
|
+
const server = buildSocialServer(version);
|
|
26
|
+
await server.connect(new StdioServerTransport());
|
|
27
|
+
}
|
|
28
|
+
main().catch((err) => {
|
|
29
|
+
console.error('MCP server error:', err);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { type Lang } from '#core/lang.js';
|
|
3
|
+
/**
|
|
4
|
+
* 소셜 게시 서버 조립 단일 지점 — `mimi-seed-social-mcp` 엔트리(social-index.ts)와 테스트가 공유한다.
|
|
5
|
+
* 앱 운영 서버(server.ts)는 이 파일도, 소셜 도메인 코드도 import 하지 않는다 (social-boundary.test.ts).
|
|
6
|
+
* 도메인은 tool-manifest.json 의 `"server": "social"` 이 정한다.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildSocialServer(version: string, options?: {
|
|
9
|
+
env?: NodeJS.ProcessEnv;
|
|
10
|
+
lang?: Lang;
|
|
11
|
+
}): McpServer;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { registerInstagramTools } from './registers/instagram.js';
|
|
3
|
+
import { registerThreadsTools } from './registers/threads.js';
|
|
4
|
+
import { registerCrosspostTools } from './registers/crosspost.js';
|
|
5
|
+
import { registerFacebookTools } from './registers/facebook.js';
|
|
6
|
+
import { registerTikTokBusinessTools } from './registers/tiktok.js';
|
|
7
|
+
import { registerSocialStatusTools } from './registers/social-status.js';
|
|
8
|
+
import { registerResources } from './resources.js';
|
|
9
|
+
import { manifestForServer, readToolManifest } from './lib/package-root.js';
|
|
10
|
+
import { resolveToolsets } from './lib/toolsets.js';
|
|
11
|
+
import { createToolRegistrar } from './lib/tool-registrar.js';
|
|
12
|
+
import { localizeToolList, toolTextTranslator } from './lib/tool-text.js';
|
|
13
|
+
import { resolveLang } from '#core/lang.js';
|
|
14
|
+
/**
|
|
15
|
+
* 소셜 게시 서버 조립 단일 지점 — `mimi-seed-social-mcp` 엔트리(social-index.ts)와 테스트가 공유한다.
|
|
16
|
+
* 앱 운영 서버(server.ts)는 이 파일도, 소셜 도메인 코드도 import 하지 않는다 (social-boundary.test.ts).
|
|
17
|
+
* 도메인은 tool-manifest.json 의 `"server": "social"` 이 정한다.
|
|
18
|
+
*/
|
|
19
|
+
export function buildSocialServer(version, options = {}) {
|
|
20
|
+
const server = new McpServer({
|
|
21
|
+
name: 'mimi-seed-social-local',
|
|
22
|
+
version,
|
|
23
|
+
}, {
|
|
24
|
+
instructions: [
|
|
25
|
+
'Mimi Seed Social posts to Facebook, Instagram, Threads, and TikTok, and cross-posts one item (including YouTube) with social_publish. Use the client’s tool discovery to load only the tools needed for the current step.',
|
|
26
|
+
'Use social_status for onboarding or connection problems. App store, cloud, CI, and video-production tools live in the main Mimi Seed MCP server.',
|
|
27
|
+
'For preview-gated writes, get the preview and explicit approval before confirming the same operation.',
|
|
28
|
+
'A confirmed call may also open an approval dialog for the user; if it returns ⛔ (not approved), nothing changed — do not retry, ask the user.',
|
|
29
|
+
'If it returns ⏳, the user was asked on Telegram and has not answered yet — nothing changed; tell the user, and after they approve repeat the identical call (same arguments).',
|
|
30
|
+
].join(' '),
|
|
31
|
+
});
|
|
32
|
+
const env = options.env ?? process.env;
|
|
33
|
+
const manifest = manifestForServer(readToolManifest(), 'social');
|
|
34
|
+
const toolsets = resolveToolsets(env, manifest);
|
|
35
|
+
for (const warning of toolsets.warnings)
|
|
36
|
+
console.error(`[mimi-seed-social] ${warning}`);
|
|
37
|
+
const toolLang = options.lang ?? resolveLang();
|
|
38
|
+
const translate = toolTextTranslator(toolLang);
|
|
39
|
+
const registrar = createToolRegistrar(server, { manifest, toolsets, translate, env });
|
|
40
|
+
registerSocialStatusTools(registrar);
|
|
41
|
+
registerFacebookTools(registrar);
|
|
42
|
+
registerInstagramTools(registrar);
|
|
43
|
+
registerThreadsTools(registrar);
|
|
44
|
+
registerTikTokBusinessTools(registrar);
|
|
45
|
+
registerCrosspostTools(registrar);
|
|
46
|
+
localizeToolList(server, toolLang === 'en' ? translate : undefined);
|
|
47
|
+
registerResources(server, { manifest, toolsets });
|
|
48
|
+
return server;
|
|
49
|
+
}
|
|
@@ -18,7 +18,7 @@ export function loadTikTokBusinessConfig() {
|
|
|
18
18
|
return value;
|
|
19
19
|
}
|
|
20
20
|
catch {
|
|
21
|
-
// 읽을 수 없으면 '미설정' — 깨진 파일은 requireTikTokBusinessConfig · mimi_seed_status 가 json-file 로 따로 진단한다
|
|
21
|
+
// 읽을 수 없으면 '미설정' — 깨진 파일은 requireTikTokBusinessConfig · social_status · mimi_seed_status 가 json-file 로 따로 진단한다
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
24
|
}
|
package/dist/tools-cli.js
CHANGED
|
@@ -2,20 +2,28 @@
|
|
|
2
2
|
import { createInterface } from 'node:readline';
|
|
3
3
|
import { resolveLang, catalog } from '#core/lang.js';
|
|
4
4
|
import { printJson } from './lib/cli-args.js';
|
|
5
|
-
import { readToolManifest } from './lib/package-root.js';
|
|
6
|
-
import { buildToolMenu, formatToolMenu, selectToolMenu } from './lib/tool-menu.js';
|
|
5
|
+
import { manifestForServer, readToolManifest } from './lib/package-root.js';
|
|
6
|
+
import { buildToolMenu, formatToolMenu, lacksSocialServer, selectToolMenu } from './lib/tool-menu.js';
|
|
7
7
|
import { resolveToolsets } from './lib/toolsets.js';
|
|
8
8
|
const M = catalog({ invalid: '목록에서 고른 번호 또는 서비스 ID를 쉼표로 구분해 입력하세요.', prompt: '번호 또는 ID (예 1,2) > ' }, { invalid: 'Enter menu numbers or service IDs separated by commas.', prompt: 'Numbers or IDs (e.g. 1,2) > ' });
|
|
9
9
|
async function main(args) {
|
|
10
10
|
const lang = resolveLang();
|
|
11
|
-
const help = 'mimi-seed tools [--select <areas>]';
|
|
11
|
+
const help = 'mimi-seed tools [--server social] [--select <areas>]';
|
|
12
12
|
if (args.length === 1 && ['--help', '-h'].includes(args[0])) {
|
|
13
13
|
console.log(help);
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
+
// 메뉴는 한 서버의 도구만 — 소셜 도구는 별도 서버(mimi-seed-social-mcp)라 메인 서버의 MIMI_SEED_TOOLS 에 넣으면 거부된다.
|
|
17
|
+
let server = 'main';
|
|
18
|
+
if (args[0] === '--server') {
|
|
19
|
+
if (args[1] !== 'social' && args[1] !== 'main')
|
|
20
|
+
throw new Error(help);
|
|
21
|
+
server = args[1];
|
|
22
|
+
args = args.slice(2);
|
|
23
|
+
}
|
|
16
24
|
if (args.length > 0 && (args.length !== 2 || args[0] !== '--select'))
|
|
17
25
|
throw new Error(help);
|
|
18
|
-
const manifest = readToolManifest();
|
|
26
|
+
const manifest = manifestForServer(readToolManifest(), server);
|
|
19
27
|
const selection = resolveToolsets(process.env, manifest);
|
|
20
28
|
for (const warning of selection.warnings)
|
|
21
29
|
console.error(warning);
|
|
@@ -28,7 +36,7 @@ async function main(args) {
|
|
|
28
36
|
await printJson(selected);
|
|
29
37
|
return;
|
|
30
38
|
}
|
|
31
|
-
console.log(formatToolMenu(menu, lang));
|
|
39
|
+
console.log(formatToolMenu(menu, lang, { pointToSocialServer: lacksSocialServer(manifest) }));
|
|
32
40
|
if (!process.stdin.isTTY || !process.stdout.isTTY || process.env.CI)
|
|
33
41
|
return;
|
|
34
42
|
const readline = createInterface({ input: process.stdin, output: process.stdout });
|
package/dist/video/research.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ declare const briefSchema: z.ZodObject<{
|
|
|
5
5
|
pattern: z.ZodString;
|
|
6
6
|
evidence: z.ZodArray<z.ZodString>;
|
|
7
7
|
confidence: z.ZodEnum<{
|
|
8
|
+
medium: "medium";
|
|
8
9
|
high: "high";
|
|
9
10
|
low: "low";
|
|
10
|
-
medium: "medium";
|
|
11
11
|
}>;
|
|
12
12
|
}, z.core.$strip>>;
|
|
13
13
|
recommendations: z.ZodArray<z.ZodObject<{
|
package/dist/video/schemas.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export declare const aspectRatioSchema: z.ZodEnum<{
|
|
|
5
5
|
"1:1": "1:1";
|
|
6
6
|
}>;
|
|
7
7
|
export declare const assetKindSchema: z.ZodEnum<{
|
|
8
|
-
video: "video";
|
|
9
8
|
image: "image";
|
|
10
9
|
audio: "audio";
|
|
10
|
+
video: "video";
|
|
11
11
|
}>;
|
|
12
12
|
export declare const assetSourceSchema: z.ZodEnum<{
|
|
13
13
|
stock: "stock";
|
|
@@ -55,9 +55,9 @@ export declare const projectSchema: z.ZodObject<{
|
|
|
55
55
|
export declare const assetSchema: z.ZodObject<{
|
|
56
56
|
id: z.ZodString;
|
|
57
57
|
kind: z.ZodEnum<{
|
|
58
|
-
video: "video";
|
|
59
58
|
image: "image";
|
|
60
59
|
audio: "audio";
|
|
60
|
+
video: "video";
|
|
61
61
|
}>;
|
|
62
62
|
sourceType: z.ZodEnum<{
|
|
63
63
|
stock: "stock";
|
|
@@ -83,9 +83,9 @@ export declare const assetManifestSchema: z.ZodObject<{
|
|
|
83
83
|
assets: z.ZodArray<z.ZodObject<{
|
|
84
84
|
id: z.ZodString;
|
|
85
85
|
kind: z.ZodEnum<{
|
|
86
|
-
video: "video";
|
|
87
86
|
image: "image";
|
|
88
87
|
audio: "audio";
|
|
88
|
+
video: "video";
|
|
89
89
|
}>;
|
|
90
90
|
sourceType: z.ZodEnum<{
|
|
91
91
|
stock: "stock";
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yoonion/mimi-seed-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@yoonion/mimi-seed-mcp",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.30.0",
|
|
10
10
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@googleapis/admob": "^11.0.1",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"mimi-seed-playstore-auth": "dist/auth/playstore-setup-cli.js",
|
|
48
48
|
"mimi-seed-release-doctor": "dist/checks/release-doctor-cli.js",
|
|
49
49
|
"mimi-seed-social-auth": "dist/social/setup-cli.js",
|
|
50
|
+
"mimi-seed-social-mcp": "dist/social-index.js",
|
|
50
51
|
"mimi-seed-tiktok-business-auth": "dist/tiktok-business/setup-cli.js",
|
|
51
52
|
"mimi-seed-tools": "dist/tools-cli.js"
|
|
52
53
|
},
|