@pofky/asc-mcp 1.0.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/LICENSE +21 -0
- package/README.md +186 -0
- package/dist/auth.d.ts +9 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +85 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +25 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +124 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +97 -0
- package/dist/index.js.map +1 -0
- package/dist/license.d.ts +10 -0
- package/dist/license.d.ts.map +1 -0
- package/dist/license.js +47 -0
- package/dist/license.js.map +1 -0
- package/dist/tools/app-details.d.ts +19 -0
- package/dist/tools/app-details.d.ts.map +1 -0
- package/dist/tools/app-details.js +78 -0
- package/dist/tools/app-details.js.map +1 -0
- package/dist/tools/daily-briefing.d.ts +20 -0
- package/dist/tools/daily-briefing.d.ts.map +1 -0
- package/dist/tools/daily-briefing.js +141 -0
- package/dist/tools/daily-briefing.js.map +1 -0
- package/dist/tools/list-apps.d.ts +18 -0
- package/dist/tools/list-apps.d.ts.map +1 -0
- package/dist/tools/list-apps.js +31 -0
- package/dist/tools/list-apps.js.map +1 -0
- package/dist/tools/list-reviews.d.ts +36 -0
- package/dist/tools/list-reviews.d.ts.map +1 -0
- package/dist/tools/list-reviews.js +75 -0
- package/dist/tools/list-reviews.js.map +1 -0
- package/dist/tools/release-notes.d.ts +29 -0
- package/dist/tools/release-notes.d.ts.map +1 -0
- package/dist/tools/release-notes.js +160 -0
- package/dist/tools/release-notes.js.map +1 -0
- package/dist/tools/release-preflight.d.ts +20 -0
- package/dist/tools/release-preflight.d.ts.map +1 -0
- package/dist/tools/release-preflight.js +310 -0
- package/dist/tools/release-preflight.js.map +1 -0
- package/dist/tools/review-status.d.ts +19 -0
- package/dist/tools/review-status.d.ts.map +1 -0
- package/dist/tools/review-status.js +95 -0
- package/dist/tools/review-status.js.map +1 -0
- package/dist/tools/sales-report.d.ts +31 -0
- package/dist/tools/sales-report.d.ts.map +1 -0
- package/dist/tools/sales-report.js +104 -0
- package/dist/tools/sales-report.js.map +1 -0
- package/dist/types.d.ts +85 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"license.js","sourceRoot":"","sources":["../src/license.ts"],"names":[],"mappings":";;AAcA,0CA8BC;AAGD,8CAGC;AAhDD,MAAM,eAAe,GACnB,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,6CAA6C,CAAC;AACnF,MAAM,YAAY,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;AAErD,IAAI,YAAY,GAAyB,IAAI,CAAC;AAC9C,IAAI,QAAQ,GAAG,CAAC,CAAC;AAEjB;;;;GAIG;AACI,KAAK,UAAU,eAAe,CAAC,UAAmB;IACvD,IAAI,CAAC,UAAU;QAAE,OAAO,MAAM,CAAC;IAE/B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,IAAI,YAAY,IAAI,GAAG,GAAG,QAAQ,GAAG,YAAY,EAAE,CAAC;QAClD,OAAO,YAAY,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,eAAe,WAAW,EAAE;YAC1D,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC;SAC1C,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,OAAO,CAAC,KAAK,CAAC,8BAA8B,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAC/D,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,MAAM,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAkB,CAAC;QACxD,YAAY,GAAG,MAAM,CAAC;QACtB,QAAQ,GAAG,GAAG,CAAC;QAEf,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IAC7C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,gEAAgE;QAChE,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC;AACH,CAAC;AAED,mDAAmD;AACnD,SAAgB,iBAAiB;IAC/B,YAAY,GAAG,IAAI,CAAC;IACpB,QAAQ,GAAG,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ASCClient } from "../client.js";
|
|
2
|
+
export declare const appDetailsDefinition: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
app_id: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
required: string[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare function appDetails(client: ASCClient, args: {
|
|
17
|
+
app_id: string;
|
|
18
|
+
}): Promise<string>;
|
|
19
|
+
//# sourceMappingURL=app-details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-details.d.ts","sourceRoot":"","sources":["../../src/tools/app-details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAmB9C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;CAehC,CAAC;AAEF,wBAAsB,UAAU,CAC9B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GACvB,OAAO,CAAC,MAAM,CAAC,CA+CjB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appDetailsDefinition = void 0;
|
|
4
|
+
exports.appDetails = appDetails;
|
|
5
|
+
exports.appDetailsDefinition = {
|
|
6
|
+
name: "app_details",
|
|
7
|
+
description: "Get detailed information about an app including its latest version, build status, and release state.",
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: "object",
|
|
10
|
+
properties: {
|
|
11
|
+
app_id: {
|
|
12
|
+
type: "string",
|
|
13
|
+
description: "The App Store Connect app ID (numeric string). Use list_apps to find it.",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
required: ["app_id"],
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
async function appDetails(client, args) {
|
|
20
|
+
const appResponse = await client.get(`/v1/apps/${args.app_id}`, {
|
|
21
|
+
"fields[apps]": "name,bundleId,sku,primaryLocale,contentRightsDeclaration",
|
|
22
|
+
});
|
|
23
|
+
const app = Array.isArray(appResponse.data)
|
|
24
|
+
? appResponse.data[0]
|
|
25
|
+
: appResponse.data;
|
|
26
|
+
// Fetch latest versions
|
|
27
|
+
const versionsResponse = await client.get(`/v1/apps/${args.app_id}/appStoreVersions`, {
|
|
28
|
+
"fields[appStoreVersions]": "versionString,platform,appStoreState,createdDate,releaseType,earliestReleaseDate",
|
|
29
|
+
limit: "5",
|
|
30
|
+
});
|
|
31
|
+
const versions = Array.isArray(versionsResponse.data)
|
|
32
|
+
? versionsResponse.data
|
|
33
|
+
: [versionsResponse.data];
|
|
34
|
+
let result = `## ${app.attributes.name}\n\n`;
|
|
35
|
+
result += `- **Bundle ID**: ${app.attributes.bundleId}\n`;
|
|
36
|
+
result += `- **SKU**: ${app.attributes.sku}\n`;
|
|
37
|
+
result += `- **Primary Locale**: ${app.attributes.primaryLocale}\n`;
|
|
38
|
+
result += `- **App ID**: ${app.id}\n\n`;
|
|
39
|
+
if (versions.length > 0) {
|
|
40
|
+
result += `### Recent Versions\n\n`;
|
|
41
|
+
for (const v of versions) {
|
|
42
|
+
const state = formatState(v.attributes.appStoreState);
|
|
43
|
+
result += `- **v${v.attributes.versionString}** (${v.attributes.platform}) — ${state}`;
|
|
44
|
+
if (v.attributes.createdDate) {
|
|
45
|
+
result += ` — created ${v.attributes.createdDate.split("T")[0]}`;
|
|
46
|
+
}
|
|
47
|
+
result += "\n";
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
result += "No versions found.\n";
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
function formatState(state) {
|
|
56
|
+
const stateMap = {
|
|
57
|
+
ACCEPTED: "Accepted",
|
|
58
|
+
DEVELOPER_REJECTED: "Developer Rejected",
|
|
59
|
+
DEVELOPER_REMOVED_FROM_SALE: "Removed from Sale",
|
|
60
|
+
IN_REVIEW: "In Review",
|
|
61
|
+
INVALID_BINARY: "Invalid Binary",
|
|
62
|
+
METADATA_REJECTED: "Metadata Rejected",
|
|
63
|
+
PENDING_APPLE_RELEASE: "Pending Apple Release",
|
|
64
|
+
PENDING_CONTRACT: "Pending Contract",
|
|
65
|
+
PENDING_DEVELOPER_RELEASE: "Pending Developer Release",
|
|
66
|
+
PREPARE_FOR_SUBMISSION: "Prepare for Submission",
|
|
67
|
+
PREORDER_READY_FOR_SALE: "Preorder Ready for Sale",
|
|
68
|
+
PROCESSING_FOR_APP_STORE: "Processing for App Store",
|
|
69
|
+
READY_FOR_REVIEW: "Ready for Review",
|
|
70
|
+
READY_FOR_SALE: "Ready for Sale",
|
|
71
|
+
REJECTED: "Rejected",
|
|
72
|
+
REPLACED_WITH_NEW_VERSION: "Replaced with New Version",
|
|
73
|
+
WAITING_FOR_EXPORT_COMPLIANCE: "Waiting for Export Compliance",
|
|
74
|
+
WAITING_FOR_REVIEW: "Waiting for Review",
|
|
75
|
+
};
|
|
76
|
+
return stateMap[state] || state;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=app-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-details.js","sourceRoot":"","sources":["../../src/tools/app-details.ts"],"names":[],"mappings":";;;AAoCA,gCAkDC;AAnEY,QAAA,oBAAoB,GAAG;IAClC,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,sGAAsG;IACxG,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,0EAA0E;aAC7E;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;CACF,CAAC;AAEK,KAAK,UAAU,UAAU,CAC9B,MAAiB,EACjB,IAAwB;IAExB,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,GAAG,CAClC,YAAY,IAAI,CAAC,MAAM,EAAE,EACzB;QACE,cAAc,EAAE,0DAA0D;KAC3E,CACF,CAAC;IAEF,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;QACzC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QACrB,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC;IAErB,wBAAwB;IACxB,MAAM,gBAAgB,GAAG,MAAM,MAAM,CAAC,GAAG,CACvC,YAAY,IAAI,CAAC,MAAM,mBAAmB,EAC1C;QACE,0BAA0B,EACxB,kFAAkF;QACpF,KAAK,EAAE,GAAG;KACX,CACF,CAAC;IAEF,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC;QACnD,CAAC,CAAC,gBAAgB,CAAC,IAAI;QACvB,CAAC,CAAC,C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iB,EAAE,mBAAmB;QACtC,qBAAqB,EAAE,uBAAuB;QAC9C,gBAAgB,EAAE,kBAAkB;QACpC,yBAAyB,EAAE,2BAA2B;QACtD,sBAAsB,EAAE,wBAAwB;QAChD,uBAAuB,EAAE,yBAAyB;QAClD,wBAAwB,EAAE,0BAA0B;QACpD,gBAAgB,EAAE,kBAAkB;QACpC,cAAc,EAAE,gBAAgB;QAChC,QAAQ,EAAE,UAAU;QACpB,yBAAyB,EAAE,2BAA2B;QACtD,6BAA6B,EAAE,+BAA+B;QAC9D,kBAAkB,EAAE,oBAAoB;KACzC,CAAC;IACF,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ASCClient } from "../client.js";
|
|
2
|
+
import type { Tier } from "../types.js";
|
|
3
|
+
export declare const dailyBriefingDefinition: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object";
|
|
8
|
+
properties: {
|
|
9
|
+
days: {
|
|
10
|
+
type: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
required: string[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare function dailyBriefing(client: ASCClient, args: {
|
|
18
|
+
days?: number;
|
|
19
|
+
}, tier: Tier): Promise<string>;
|
|
20
|
+
//# sourceMappingURL=daily-briefing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daily-briefing.d.ts","sourceRoot":"","sources":["../../src/tools/daily-briefing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAuBxC,eAAO,MAAM,uBAAuB;;;;;;;;;;;kBAahB,MAAM,EAAE;;CAE3B,CAAC;AAEF,wBAAsB,aAAa,CACjC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACvB,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,CAAC,CAiJjB"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dailyBriefingDefinition = void 0;
|
|
4
|
+
exports.dailyBriefing = dailyBriefing;
|
|
5
|
+
exports.dailyBriefingDefinition = {
|
|
6
|
+
name: "daily_briefing",
|
|
7
|
+
description: "Get a morning briefing across all your apps: review status, recent customer reviews, and version states. One call for full situational awareness. Pro license adds review details.",
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: "object",
|
|
10
|
+
properties: {
|
|
11
|
+
days: {
|
|
12
|
+
type: "number",
|
|
13
|
+
description: "Look back N days for reviews (default 3). Only affects review section.",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
required: [],
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
async function dailyBriefing(client, args, tier) {
|
|
20
|
+
if (tier !== "pro") {
|
|
21
|
+
return ("Daily briefing requires a Pro license ($9/mo).\n" +
|
|
22
|
+
"Get your license at: https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu\n\n" +
|
|
23
|
+
"Set ASC_LICENSE_KEY in your MCP server config to unlock.");
|
|
24
|
+
}
|
|
25
|
+
const lookbackDays = args.days || 3;
|
|
26
|
+
const now = new Date();
|
|
27
|
+
const today = now.toISOString().split("T")[0];
|
|
28
|
+
let result = `## Daily Briefing - ${today}\n\n`;
|
|
29
|
+
// 1. List all apps
|
|
30
|
+
const appsResponse = await client.get("/v1/apps", {
|
|
31
|
+
"fields[apps]": "name,bundleId",
|
|
32
|
+
limit: "50",
|
|
33
|
+
});
|
|
34
|
+
const apps = Array.isArray(appsResponse.data)
|
|
35
|
+
? appsResponse.data
|
|
36
|
+
: [appsResponse.data];
|
|
37
|
+
if (apps.length === 0) {
|
|
38
|
+
return result + "No apps found in your account.\n";
|
|
39
|
+
}
|
|
40
|
+
result += `**${apps.length} app${apps.length > 1 ? "s" : ""}** in your account\n\n`;
|
|
41
|
+
// 2. For each app, get version status and recent reviews
|
|
42
|
+
for (const app of apps) {
|
|
43
|
+
const appName = app.attributes.name;
|
|
44
|
+
const appId = app.id;
|
|
45
|
+
result += `### ${appName}\n`;
|
|
46
|
+
// Get latest versions
|
|
47
|
+
try {
|
|
48
|
+
const versionsResponse = await client.get(`/v1/apps/${appId}/appStoreVersions`, {
|
|
49
|
+
"fields[appStoreVersions]": "versionString,platform,appStoreState,createdDate",
|
|
50
|
+
limit: "3",
|
|
51
|
+
});
|
|
52
|
+
const versions = Array.isArray(versionsResponse.data)
|
|
53
|
+
? versionsResponse.data
|
|
54
|
+
: [versionsResponse.data];
|
|
55
|
+
if (versions.length > 0) {
|
|
56
|
+
const latest = versions[0];
|
|
57
|
+
const state = formatState(latest.attributes.appStoreState);
|
|
58
|
+
result += `- **Latest**: v${latest.attributes.versionString} (${latest.attributes.platform}) - ${state}\n`;
|
|
59
|
+
// Flag anything in review
|
|
60
|
+
const reviewStates = [
|
|
61
|
+
"WAITING_FOR_REVIEW",
|
|
62
|
+
"IN_REVIEW",
|
|
63
|
+
"PENDING_APPLE_RELEASE",
|
|
64
|
+
"PENDING_DEVELOPER_RELEASE",
|
|
65
|
+
];
|
|
66
|
+
const inReview = versions.filter((v) => reviewStates.includes(v.attributes.appStoreState));
|
|
67
|
+
if (inReview.length > 0) {
|
|
68
|
+
for (const v of inReview) {
|
|
69
|
+
result += `- **Action needed**: v${v.attributes.versionString} is ${formatState(v.attributes.appStoreState)}\n`;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// Flag rejections
|
|
73
|
+
const rejected = versions.filter((v) => ["REJECTED", "METADATA_REJECTED"].includes(v.attributes.appStoreState));
|
|
74
|
+
if (rejected.length > 0) {
|
|
75
|
+
for (const v of rejected) {
|
|
76
|
+
result += `- **REJECTED**: v${v.attributes.versionString} - check App Store Connect for details\n`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
result += `- Could not fetch version info\n`;
|
|
83
|
+
}
|
|
84
|
+
// Get recent reviews (Pro only, but show count for free)
|
|
85
|
+
if (tier === "pro") {
|
|
86
|
+
try {
|
|
87
|
+
const reviewsResponse = await client.get(`/v1/apps/${appId}/customerReviews`, {
|
|
88
|
+
"fields[customerReviews]": "rating,title,body,reviewerNickname,territory,createdDate",
|
|
89
|
+
sort: "-createdDate",
|
|
90
|
+
limit: "20",
|
|
91
|
+
});
|
|
92
|
+
const allReviews = Array.isArray(reviewsResponse.data)
|
|
93
|
+
? reviewsResponse.data
|
|
94
|
+
: [reviewsResponse.data];
|
|
95
|
+
// Filter to recent
|
|
96
|
+
const cutoff = new Date(now);
|
|
97
|
+
cutoff.setDate(cutoff.getDate() - lookbackDays);
|
|
98
|
+
const recentReviews = allReviews.filter((r) => new Date(r.attributes.createdDate) >= cutoff);
|
|
99
|
+
if (recentReviews.length > 0) {
|
|
100
|
+
const avgRating = recentReviews.reduce((sum, r) => sum + r.attributes.rating, 0) /
|
|
101
|
+
recentReviews.length;
|
|
102
|
+
const lowRatings = recentReviews.filter((r) => r.attributes.rating <= 2);
|
|
103
|
+
result += `- **Reviews** (last ${lookbackDays}d): ${recentReviews.length} new, avg ${avgRating.toFixed(1)} stars\n`;
|
|
104
|
+
if (lowRatings.length > 0) {
|
|
105
|
+
result += `- **Attention**: ${lowRatings.length} review${lowRatings.length > 1 ? "s" : ""} with 1-2 stars:\n`;
|
|
106
|
+
for (const r of lowRatings.slice(0, 3)) {
|
|
107
|
+
const stars = "★".repeat(r.attributes.rating) + "☆".repeat(5 - r.attributes.rating);
|
|
108
|
+
result += ` - ${stars} "${r.attributes.title}" (${r.attributes.territory})\n`;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
result += `- No new reviews in the last ${lookbackDays} days\n`;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
result += `- Could not fetch reviews\n`;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
result += `- Reviews: upgrade to Pro to see review details in briefings\n`;
|
|
122
|
+
}
|
|
123
|
+
result += "\n";
|
|
124
|
+
}
|
|
125
|
+
return result;
|
|
126
|
+
}
|
|
127
|
+
function formatState(state) {
|
|
128
|
+
const stateMap = {
|
|
129
|
+
IN_REVIEW: "In Review",
|
|
130
|
+
WAITING_FOR_REVIEW: "Waiting for Review",
|
|
131
|
+
PENDING_APPLE_RELEASE: "Approved - Pending Release",
|
|
132
|
+
PENDING_DEVELOPER_RELEASE: "Approved - Your Release",
|
|
133
|
+
READY_FOR_SALE: "Live",
|
|
134
|
+
REJECTED: "REJECTED",
|
|
135
|
+
METADATA_REJECTED: "Metadata Rejected",
|
|
136
|
+
PREPARE_FOR_SUBMISSION: "Preparing",
|
|
137
|
+
READY_FOR_REVIEW: "Ready for Review",
|
|
138
|
+
};
|
|
139
|
+
return stateMap[state] || state;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=daily-briefing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"daily-briefing.js","sourceRoot":"","sources":["../../src/tools/daily-briefing.ts"],"names":[],"mappings":";;;AAyCA,sCAqJC;AAtKY,QAAA,uBAAuB,GAAG;IACrC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,oLAAoL;IACtL,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,wEAAwE;aAC3E;SACF;QACD,QAAQ,EAAE,EAAc;KACzB;CACF,CA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EAAgE,CAAC;QAC7E,CAAC;QAED,MAAM,IAAI,IAAI,CAAC;IACjB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,MAAM,QAAQ,GAA2B;QACvC,SAAS,EAAE,WAAW;QACtB,kBAAkB,EAAE,oBAAoB;QACxC,qBAAqB,EAAE,4BAA4B;QACnD,yBAAyB,EAAE,yBAAyB;QACpD,cAAc,EAAE,MAAM;QACtB,QAAQ,EAAE,UAAU;QACpB,iBAAiB,EAAE,mBAAmB;QACtC,sBAAsB,EAAE,WAAW;QACnC,gBAAgB,EAAE,kBAAkB;KACrC,CAAC;IACF,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ASCClient } from "../client.js";
|
|
2
|
+
export declare const listAppsDefinition: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
limit: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare function listApps(client: ASCClient, args: {
|
|
16
|
+
limit?: number;
|
|
17
|
+
}): Promise<string>;
|
|
18
|
+
//# sourceMappingURL=list-apps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-apps.d.ts","sourceRoot":"","sources":["../../src/tools/list-apps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAS9C,eAAO,MAAM,kBAAkB;;;;;;;;;;;;CAa9B,CAAC;AAEF,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACvB,OAAO,CAAC,MAAM,CAAC,CAmBjB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listAppsDefinition = void 0;
|
|
4
|
+
exports.listApps = listApps;
|
|
5
|
+
exports.listAppsDefinition = {
|
|
6
|
+
name: "list_apps",
|
|
7
|
+
description: "List all apps in your App Store Connect account with name, bundle ID, and platform.",
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: "object",
|
|
10
|
+
properties: {
|
|
11
|
+
limit: {
|
|
12
|
+
type: "number",
|
|
13
|
+
description: "Maximum number of apps to return (default 50, max 200)",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
async function listApps(client, args) {
|
|
19
|
+
const limit = Math.min(args.limit ?? 50, 200);
|
|
20
|
+
const response = await client.get("/v1/apps", {
|
|
21
|
+
"fields[apps]": "name,bundleId,sku,primaryLocale",
|
|
22
|
+
limit: String(limit),
|
|
23
|
+
});
|
|
24
|
+
const apps = Array.isArray(response.data) ? response.data : [response.data];
|
|
25
|
+
if (apps.length === 0) {
|
|
26
|
+
return "No apps found in your App Store Connect account.";
|
|
27
|
+
}
|
|
28
|
+
const lines = apps.map((app) => `- **${app.attributes.name}** (${app.attributes.bundleId}) — ID: ${app.id}`);
|
|
29
|
+
return `Found ${apps.length} app(s):\n\n${lines.join("\n")}`;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=list-apps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-apps.js","sourceRoot":"","sources":["../../src/tools/list-apps.ts"],"names":[],"mappings":";;;AAwBA,4BAsBC;AArCY,QAAA,kBAAkB,GAAG;IAChC,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,qFAAqF;IACvF,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wDAAwD;aACtE;SACF;KACF;CACF,CAAC;AAEK,KAAK,UAAU,QAAQ,CAC5B,MAAiB,EACjB,IAAwB;IAExB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,GAAG,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAgB,UAAU,EAAE;QAC3D,cAAc,EAAE,iCAAiC;QACjD,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC;KACrB,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE5E,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,kDAAkD,CAAC;IAC5D,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CACpB,CAAC,GAAG,EAAE,EAAE,CACN,OAAO,GAAG,CAAC,UAAU,CAAC,IAAI,OAAO,GAAG,CAAC,UAAU,CAAC,QAAQ,WAAW,GAAG,CAAC,EAAE,EAAE,CAC9E,CAAC;IAEF,OAAO,SAAS,IAAI,CAAC,MAAM,eAAe,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ASCClient } from "../client.js";
|
|
2
|
+
import type { Tier } from "../types.js";
|
|
3
|
+
export declare const listReviewsDefinition: {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: {
|
|
7
|
+
type: "object";
|
|
8
|
+
properties: {
|
|
9
|
+
app_id: {
|
|
10
|
+
type: string;
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
rating: {
|
|
14
|
+
type: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
limit: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
sort: {
|
|
22
|
+
type: string;
|
|
23
|
+
enum: string[];
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
required: string[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare function listReviews(client: ASCClient, args: {
|
|
31
|
+
app_id: string;
|
|
32
|
+
rating?: number;
|
|
33
|
+
limit?: number;
|
|
34
|
+
sort?: string;
|
|
35
|
+
}, tier: Tier): Promise<string>;
|
|
36
|
+
//# sourceMappingURL=list-reviews.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-reviews.d.ts","sourceRoot":"","sources":["../../src/tools/list-reviews.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAWxC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BjC,CAAC;AAEF,wBAAsB,WAAW,CAC/B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACxE,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,CAAC,CA2DjB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listReviewsDefinition = void 0;
|
|
4
|
+
exports.listReviews = listReviews;
|
|
5
|
+
exports.listReviewsDefinition = {
|
|
6
|
+
name: "list_reviews",
|
|
7
|
+
description: "List customer reviews for an app. Filter by rating (1-5 stars). Pro feature — requires license key.",
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: "object",
|
|
10
|
+
properties: {
|
|
11
|
+
app_id: {
|
|
12
|
+
type: "string",
|
|
13
|
+
description: "The App Store Connect app ID.",
|
|
14
|
+
},
|
|
15
|
+
rating: {
|
|
16
|
+
type: "number",
|
|
17
|
+
description: "Filter by star rating (1-5). Omit for all ratings.",
|
|
18
|
+
},
|
|
19
|
+
limit: {
|
|
20
|
+
type: "number",
|
|
21
|
+
description: "Maximum reviews to return (default 20, max 100).",
|
|
22
|
+
},
|
|
23
|
+
sort: {
|
|
24
|
+
type: "string",
|
|
25
|
+
enum: ["newest", "oldest", "rating_high", "rating_low"],
|
|
26
|
+
description: "Sort order (default: newest).",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ["app_id"],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
async function listReviews(client, args, tier) {
|
|
33
|
+
if (tier !== "pro") {
|
|
34
|
+
return ("Customer reviews require a Pro license ($9/mo).\n" +
|
|
35
|
+
"Get your license at: https://buy.polar.sh/polar_cl_Ta3OxEA1EbRyYNPFtSsRXgYWBCCtjwMxlbAeW35RLuu\n\n" +
|
|
36
|
+
"Set ASC_LICENSE_KEY in your MCP server config to unlock.");
|
|
37
|
+
}
|
|
38
|
+
const limit = Math.min(args.limit ?? 20, 100);
|
|
39
|
+
const params = {
|
|
40
|
+
"fields[customerReviews]": "rating,title,body,reviewerNickname,createdDate,territory",
|
|
41
|
+
limit: String(limit),
|
|
42
|
+
};
|
|
43
|
+
// Sort mapping
|
|
44
|
+
const sortMap = {
|
|
45
|
+
newest: "-createdDate",
|
|
46
|
+
oldest: "createdDate",
|
|
47
|
+
rating_high: "-rating",
|
|
48
|
+
rating_low: "rating",
|
|
49
|
+
};
|
|
50
|
+
params.sort = sortMap[args.sort ?? "newest"] || "-createdDate";
|
|
51
|
+
if (args.rating && args.rating >= 1 && args.rating <= 5) {
|
|
52
|
+
params["filter[rating]"] = String(args.rating);
|
|
53
|
+
}
|
|
54
|
+
const response = await client.get(`/v1/apps/${args.app_id}/customerReviews`, params);
|
|
55
|
+
const reviews = Array.isArray(response.data)
|
|
56
|
+
? response.data
|
|
57
|
+
: [response.data];
|
|
58
|
+
if (reviews.length === 0) {
|
|
59
|
+
return "No customer reviews found matching your criteria.";
|
|
60
|
+
}
|
|
61
|
+
const stars = (n) => "\u2605".repeat(n) + "\u2606".repeat(5 - n);
|
|
62
|
+
let result = `## Customer Reviews (${reviews.length} shown)\n\n`;
|
|
63
|
+
for (const review of reviews) {
|
|
64
|
+
const r = review.attributes;
|
|
65
|
+
result += `### ${stars(r.rating)} ${r.title || "(No title)"}\n`;
|
|
66
|
+
result += `**By** ${r.reviewerNickname || "Anonymous"} — ${r.territory} — ${r.createdDate.split("T")[0]}\n\n`;
|
|
67
|
+
result += `${r.body || "(No body)"}\n\n---\n\n`;
|
|
68
|
+
}
|
|
69
|
+
const total = response.meta?.paging?.total;
|
|
70
|
+
if (total && total > reviews.length) {
|
|
71
|
+
result += `\n*Showing ${reviews.length} of ${total} total reviews.*\n`;
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=list-reviews.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-reviews.js","sourceRoot":"","sources":["../../src/tools/list-reviews.ts"],"names":[],"mappings":";;;AAyCA,kCA+DC;AA5FY,QAAA,qBAAqB,GAAG;IACnC,IAAI,EAAE,cAAc;IACpB,WAAW,EACT,qGAAqG;IACvG,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+BAA+B;aAC7C;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oDAAoD;a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|
1
|
+
import type { Tier } from "../types.js";
|
|
2
|
+
export declare const releaseNotesDefinition: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
inputSchema: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
project_path: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
since_tag: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
max_commits: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
required: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare function releaseNotes(args: {
|
|
25
|
+
project_path?: string;
|
|
26
|
+
since_tag?: string;
|
|
27
|
+
max_commits?: number;
|
|
28
|
+
}, tier: Tier): Promise<string>;
|
|
29
|
+
//# sourceMappingURL=release-notes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release-notes.d.ts","sourceRoot":"","sources":["../../src/tools/release-notes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;kBAsBf,MAAM,EAAE;;CAE3B,CAAC;AAEF,wBAAsB,YAAY,CAAC,IAAI,EAAE;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAiJ9B"}
|