@pofky/asc-mcp 1.3.0 → 1.8.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/LIMITATIONS.md +41 -0
- package/README.md +80 -10
- package/USER_GUIDE.md +185 -0
- package/dist/client.d.ts +5 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +58 -1
- package/dist/client.js.map +1 -1
- package/dist/doctor.d.ts +28 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +178 -0
- package/dist/doctor.js.map +1 -0
- package/dist/editable.d.ts +9 -0
- package/dist/editable.d.ts.map +1 -0
- package/dist/editable.js +20 -0
- package/dist/editable.js.map +1 -0
- package/dist/gate.d.ts +8 -0
- package/dist/gate.d.ts.map +1 -0
- package/dist/gate.js +17 -0
- package/dist/gate.js.map +1 -0
- package/dist/index.js +254 -16
- package/dist/index.js.map +1 -1
- package/dist/license.js +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +101 -0
- package/dist/prompts.js.map +1 -1
- package/dist/setup.d.ts +19 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +153 -0
- package/dist/setup.js.map +1 -0
- package/dist/tools/age-rating.d.ts +14 -0
- package/dist/tools/age-rating.d.ts.map +1 -0
- package/dist/tools/age-rating.js +125 -0
- package/dist/tools/age-rating.js.map +1 -0
- package/dist/tools/app-details.js +2 -2
- package/dist/tools/availability.d.ts +20 -0
- package/dist/tools/availability.d.ts.map +1 -0
- package/dist/tools/availability.js +96 -0
- package/dist/tools/availability.js.map +1 -0
- package/dist/tools/builds.d.ts +26 -0
- package/dist/tools/builds.d.ts.map +1 -0
- package/dist/tools/builds.js +108 -0
- package/dist/tools/builds.js.map +1 -0
- package/dist/tools/eu-trader.d.ts +12 -0
- package/dist/tools/eu-trader.d.ts.map +1 -0
- package/dist/tools/eu-trader.js +25 -0
- package/dist/tools/eu-trader.js.map +1 -0
- package/dist/tools/guide.d.ts +38 -0
- package/dist/tools/guide.d.ts.map +1 -0
- package/dist/tools/guide.js +273 -0
- package/dist/tools/guide.js.map +1 -0
- package/dist/tools/iap.d.ts +43 -0
- package/dist/tools/iap.d.ts.map +1 -0
- package/dist/tools/iap.js +360 -0
- package/dist/tools/iap.js.map +1 -0
- package/dist/tools/list-apps.js +1 -1
- package/dist/tools/list-reviews.js +2 -2
- package/dist/tools/local-build.d.ts +26 -0
- package/dist/tools/local-build.d.ts.map +1 -0
- package/dist/tools/local-build.js +100 -0
- package/dist/tools/local-build.js.map +1 -0
- package/dist/tools/privacy.d.ts +15 -0
- package/dist/tools/privacy.d.ts.map +1 -0
- package/dist/tools/privacy.js +32 -0
- package/dist/tools/privacy.js.map +1 -0
- package/dist/tools/release-control.d.ts +22 -0
- package/dist/tools/release-control.d.ts.map +1 -0
- package/dist/tools/release-control.js +85 -0
- package/dist/tools/release-control.js.map +1 -0
- package/dist/tools/release-preflight.d.ts.map +1 -1
- package/dist/tools/release-preflight.js +139 -0
- package/dist/tools/release-preflight.js.map +1 -1
- package/dist/tools/review-screenshot.d.ts +14 -0
- package/dist/tools/review-screenshot.d.ts.map +1 -0
- package/dist/tools/review-screenshot.js +72 -0
- package/dist/tools/review-screenshot.js.map +1 -0
- package/dist/tools/review-status.js +2 -2
- package/dist/tools/sales-report.js +3 -3
- package/dist/tools/sales-report.js.map +1 -1
- package/dist/tools/screenshots.d.ts +15 -0
- package/dist/tools/screenshots.d.ts.map +1 -0
- package/dist/tools/screenshots.js +106 -0
- package/dist/tools/screenshots.js.map +1 -0
- package/dist/tools/signing.d.ts +21 -0
- package/dist/tools/signing.d.ts.map +1 -0
- package/dist/tools/signing.js +101 -0
- package/dist/tools/signing.js.map +1 -0
- package/dist/tools/submission.d.ts +47 -0
- package/dist/tools/submission.d.ts.map +1 -0
- package/dist/tools/submission.js +199 -0
- package/dist/tools/submission.js.map +1 -0
- package/dist/tools/testflight.d.ts +20 -0
- package/dist/tools/testflight.d.ts.map +1 -0
- package/dist/tools/testflight.js +75 -0
- package/dist/tools/testflight.js.map +1 -0
- package/dist/tools/update-version-metadata.d.ts +17 -0
- package/dist/tools/update-version-metadata.d.ts.map +1 -0
- package/dist/tools/update-version-metadata.js +148 -0
- package/dist/tools/update-version-metadata.js.map +1 -0
- package/dist/tools/version-control.d.ts +21 -0
- package/dist/tools/version-control.d.ts.map +1 -0
- package/dist/tools/version-control.js +144 -0
- package/dist/tools/version-control.js.map +1 -0
- package/package.json +5 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setAppAvailability = setAppAvailability;
|
|
4
|
+
const client_js_1 = require("../client.js");
|
|
5
|
+
const gate_js_1 = require("../gate.js");
|
|
6
|
+
/**
|
|
7
|
+
* Set the app's country/region availability. By default makes the app available
|
|
8
|
+
* in every App Store territory and auto-includes future ones. App availability
|
|
9
|
+
* is a per-app singleton: if it already exists we flip the individual
|
|
10
|
+
* territoryAvailabilities; otherwise we create it inline.
|
|
11
|
+
*/
|
|
12
|
+
async function setAppAvailability(client, args, tier) {
|
|
13
|
+
const gate = (0, gate_js_1.requirePro)(tier, "Setting app availability");
|
|
14
|
+
if (gate)
|
|
15
|
+
return gate;
|
|
16
|
+
const newTerr = args.available_in_new_territories ?? true;
|
|
17
|
+
// Resolve the target territory set (all, unless a subset was given).
|
|
18
|
+
const allTerrRes = await client.getAll("/v1/territories", { limit: "200" });
|
|
19
|
+
const allIds = (Array.isArray(allTerrRes.data) ? allTerrRes.data : [allTerrRes.data])
|
|
20
|
+
.filter(Boolean)
|
|
21
|
+
.map((t) => t.id);
|
|
22
|
+
const wanted = new Set(args.territories?.length ? args.territories : allIds);
|
|
23
|
+
// Does an availability already exist for this app?
|
|
24
|
+
let availId = null;
|
|
25
|
+
try {
|
|
26
|
+
const ex = await client.get(`/v1/apps/${args.app_id}/appAvailabilityV2`);
|
|
27
|
+
if (ex.data && !Array.isArray(ex.data))
|
|
28
|
+
availId = ex.data.id;
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
if (!(err instanceof client_js_1.ASCAPIError && err.status === 404))
|
|
32
|
+
throw err;
|
|
33
|
+
}
|
|
34
|
+
// Create path: no availability yet, build it inline with the wanted set.
|
|
35
|
+
if (!availId) {
|
|
36
|
+
const ids = [...wanted];
|
|
37
|
+
const lid = (id) => "${ta-" + id + "}";
|
|
38
|
+
await client.post("/v2/appAvailabilities", {
|
|
39
|
+
data: {
|
|
40
|
+
type: "appAvailabilities",
|
|
41
|
+
attributes: { availableInNewTerritories: newTerr },
|
|
42
|
+
relationships: {
|
|
43
|
+
app: { data: { type: "apps", id: args.app_id } },
|
|
44
|
+
territoryAvailabilities: { data: ids.map((id) => ({ type: "territoryAvailabilities", id: lid(id) })) },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
included: ids.map((id) => ({
|
|
48
|
+
type: "territoryAvailabilities",
|
|
49
|
+
id: lid(id),
|
|
50
|
+
attributes: { available: true },
|
|
51
|
+
relationships: { territory: { data: { type: "territories", id } } },
|
|
52
|
+
})),
|
|
53
|
+
});
|
|
54
|
+
return `App availability created: ${ids.length} territories on, new-territory auto-include ${newTerr}.`;
|
|
55
|
+
}
|
|
56
|
+
// Update path: flip each territoryAvailability to match the wanted set.
|
|
57
|
+
let url = `/v2/appAvailabilities/${availId}/territoryAvailabilities?include=territory&limit=50`;
|
|
58
|
+
const rows = [];
|
|
59
|
+
while (url) {
|
|
60
|
+
const r = await client.get(url.replace(/^https:\/\/api\.appstoreconnect\.apple\.com/, ""));
|
|
61
|
+
const items = (Array.isArray(r.data) ? r.data : [r.data]).filter(Boolean);
|
|
62
|
+
for (const t of items) {
|
|
63
|
+
const territory = t.relationships?.territory?.data?.id;
|
|
64
|
+
if (territory)
|
|
65
|
+
rows.push({ id: t.id, territory, on: Boolean(t.attributes?.available) });
|
|
66
|
+
}
|
|
67
|
+
url = r.links?.next ?? null;
|
|
68
|
+
}
|
|
69
|
+
let turnedOn = 0;
|
|
70
|
+
let turnedOff = 0;
|
|
71
|
+
for (const row of rows) {
|
|
72
|
+
const shouldBeOn = wanted.has(row.territory);
|
|
73
|
+
if (shouldBeOn === row.on)
|
|
74
|
+
continue;
|
|
75
|
+
await client.patch(`/v2/territoryAvailabilities/${row.id}`, {
|
|
76
|
+
data: { type: "territoryAvailabilities", id: row.id, attributes: { available: shouldBeOn } },
|
|
77
|
+
});
|
|
78
|
+
if (shouldBeOn)
|
|
79
|
+
turnedOn++;
|
|
80
|
+
else
|
|
81
|
+
turnedOff++;
|
|
82
|
+
}
|
|
83
|
+
// Sync the new-territory flag.
|
|
84
|
+
try {
|
|
85
|
+
await client.patch(`/v1/appAvailabilities/${availId}`, {
|
|
86
|
+
data: { type: "appAvailabilities", id: availId, attributes: { availableInNewTerritories: newTerr } },
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
// Some accounts reject this PATCH; the territory set is what matters.
|
|
91
|
+
}
|
|
92
|
+
const onTotal = rows.filter((r) => wanted.has(r.territory)).length;
|
|
93
|
+
return (`App availability updated: ${onTotal} territories on (+${turnedOn} enabled, -${turnedOff} disabled), ` +
|
|
94
|
+
`new-territory auto-include ${newTerr}.`);
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=availability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"availability.js","sourceRoot":"","sources":["../../src/tools/availability.ts"],"names":[],"mappings":";;AAyBA,gDA+FC;AAxHD,4CAA2D;AAE3D,wCAAwC;AAiBxC;;;;;GAKG;AACI,KAAK,UAAU,kBAAkB,CACtC,MAAiB,EACjB,IAAyB,EACzB,IAAU;IAEV,MAAM,IAAI,GAAG,IAAA,oBAAU,EAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC;IAC1D,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAEtB,MAAM,OAAO,GAAG,IAAI,CAAC,4BAA4B,IAAI,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AE,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,yBAAyB,EAAE,OAAO,EAAE,EAAE;SACrG,CAAC,CAAC;IACL,CAAC;IAAC,MAAM,CAAC;QACP,sEAAsE;IACxE,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IACnE,OAAO,CACL,6BAA6B,OAAO,qBAAqB,QAAQ,cAAc,SAAS,cAAc;QACtG,8BAA8B,OAAO,GAAG,CACzC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ASCClient } from "../client.js";
|
|
2
|
+
import type { Tier } from "../types.js";
|
|
3
|
+
/** List recent builds for an app with their processing state. */
|
|
4
|
+
export declare function listBuilds(client: ASCClient, args: {
|
|
5
|
+
app_id: string;
|
|
6
|
+
limit?: number;
|
|
7
|
+
}, tier: Tier): Promise<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Poll until the newest build for an app finishes processing (state VALID),
|
|
10
|
+
* so the ship flow can be one call instead of manual polling. Bounded by
|
|
11
|
+
* max_wait_seconds; returns as soon as a VALID build appears or it times out.
|
|
12
|
+
*/
|
|
13
|
+
export declare function waitForBuild(client: ASCClient, args: {
|
|
14
|
+
app_id: string;
|
|
15
|
+
max_wait_seconds?: number;
|
|
16
|
+
poll_seconds?: number;
|
|
17
|
+
}, tier: Tier): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* Attach a build to the editable App Store version. If no build_id is given,
|
|
20
|
+
* picks the newest VALID (processed) build automatically.
|
|
21
|
+
*/
|
|
22
|
+
export declare function attachBuild(client: ASCClient, args: {
|
|
23
|
+
app_id: string;
|
|
24
|
+
build_id?: string;
|
|
25
|
+
}, tier: Tier): Promise<string>;
|
|
26
|
+
//# sourceMappingURL=builds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builds.d.ts","sourceRoot":"","sources":["../../src/tools/builds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAexC,iEAAiE;AACjE,wBAAsB,UAAU,CAC9B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EACxC,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,CAAC,CAoBjB;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,EAC1E,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,CAAC,CAgCjB;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3C,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,CAAC,CA2CjB"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listBuilds = listBuilds;
|
|
4
|
+
exports.waitForBuild = waitForBuild;
|
|
5
|
+
exports.attachBuild = attachBuild;
|
|
6
|
+
const gate_js_1 = require("../gate.js");
|
|
7
|
+
const editable_js_1 = require("../editable.js");
|
|
8
|
+
/** List recent builds for an app with their processing state. */
|
|
9
|
+
async function listBuilds(client, args, tier) {
|
|
10
|
+
const gate = (0, gate_js_1.requirePro)(tier, "Listing builds");
|
|
11
|
+
if (gate)
|
|
12
|
+
return gate;
|
|
13
|
+
const res = await client.get("/v1/builds", {
|
|
14
|
+
"filter[app]": args.app_id,
|
|
15
|
+
sort: "-uploadedDate",
|
|
16
|
+
"fields[builds]": "version,processingState,uploadedDate,expired",
|
|
17
|
+
limit: String(Math.min(args.limit ?? 10, 50)),
|
|
18
|
+
});
|
|
19
|
+
const builds = Array.isArray(res.data) ? res.data : [res.data];
|
|
20
|
+
if (!builds.length) {
|
|
21
|
+
return "No builds found. Upload one with upload_binary (or Xcode/Transporter) first.";
|
|
22
|
+
}
|
|
23
|
+
const lines = builds.map((b) => {
|
|
24
|
+
const a = b.attributes;
|
|
25
|
+
const flag = a.expired ? " (expired)" : "";
|
|
26
|
+
return `- Build ${a.version} [${b.id}]: ${a.processingState}${flag}, uploaded ${a.uploadedDate?.slice(0, 10) ?? "?"}`;
|
|
27
|
+
});
|
|
28
|
+
return `Builds for app ${args.app_id}:\n${lines.join("\n")}`;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Poll until the newest build for an app finishes processing (state VALID),
|
|
32
|
+
* so the ship flow can be one call instead of manual polling. Bounded by
|
|
33
|
+
* max_wait_seconds; returns as soon as a VALID build appears or it times out.
|
|
34
|
+
*/
|
|
35
|
+
async function waitForBuild(client, args, tier) {
|
|
36
|
+
const gate = (0, gate_js_1.requirePro)(tier, "Waiting for a build");
|
|
37
|
+
if (gate)
|
|
38
|
+
return gate;
|
|
39
|
+
const maxWait = Math.min(args.max_wait_seconds ?? 1800, 3600) * 1000;
|
|
40
|
+
const poll = Math.max(args.poll_seconds ?? 30, 10) * 1000;
|
|
41
|
+
const start = Date.now();
|
|
42
|
+
let last = "";
|
|
43
|
+
while (Date.now() - start < maxWait) {
|
|
44
|
+
const res = await client.get("/v1/builds", {
|
|
45
|
+
"filter[app]": args.app_id,
|
|
46
|
+
sort: "-uploadedDate",
|
|
47
|
+
"fields[builds]": "version,processingState",
|
|
48
|
+
limit: "1",
|
|
49
|
+
});
|
|
50
|
+
const builds = Array.isArray(res.data) ? res.data : [res.data];
|
|
51
|
+
const newest = builds[0];
|
|
52
|
+
if (!newest) {
|
|
53
|
+
last = "no builds yet";
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
last = `${newest.attributes.version}: ${newest.attributes.processingState}`;
|
|
57
|
+
if (newest.attributes.processingState === "VALID") {
|
|
58
|
+
return `Build ${newest.attributes.version} is VALID and ready [${newest.id}]. Attach it with attach_build.`;
|
|
59
|
+
}
|
|
60
|
+
if (newest.attributes.processingState === "FAILED" || newest.attributes.processingState === "INVALID") {
|
|
61
|
+
return `Build ${newest.attributes.version} processing ${newest.attributes.processingState}. Check App Store Connect for details.`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
await new Promise((r) => setTimeout(r, poll));
|
|
65
|
+
}
|
|
66
|
+
return `Timed out after ${Math.round(maxWait / 1000)}s waiting for a VALID build. Last seen: ${last}.`;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Attach a build to the editable App Store version. If no build_id is given,
|
|
70
|
+
* picks the newest VALID (processed) build automatically.
|
|
71
|
+
*/
|
|
72
|
+
async function attachBuild(client, args, tier) {
|
|
73
|
+
const gate = (0, gate_js_1.requirePro)(tier, "Attaching a build");
|
|
74
|
+
if (gate)
|
|
75
|
+
return gate;
|
|
76
|
+
// Find the editable version.
|
|
77
|
+
const versionsRes = await client.get(`/v1/apps/${args.app_id}/appStoreVersions`, { "fields[appStoreVersions]": "versionString,appStoreState", limit: "5" });
|
|
78
|
+
const versions = Array.isArray(versionsRes.data) ? versionsRes.data : [versionsRes.data];
|
|
79
|
+
const version = versions.find((v) => editable_js_1.EDITABLE_VERSION_STATES.has(v.attributes.appStoreState));
|
|
80
|
+
if (!version) {
|
|
81
|
+
return "No editable version to attach a build to. Create one with create_version first.";
|
|
82
|
+
}
|
|
83
|
+
// Resolve build: explicit id, else newest processed (VALID) build.
|
|
84
|
+
let buildId = args.build_id;
|
|
85
|
+
let buildVersion = buildId ?? "";
|
|
86
|
+
if (!buildId) {
|
|
87
|
+
const res = await client.get("/v1/builds", {
|
|
88
|
+
"filter[app]": args.app_id,
|
|
89
|
+
"filter[processingState]": "VALID",
|
|
90
|
+
sort: "-uploadedDate",
|
|
91
|
+
"fields[builds]": "version",
|
|
92
|
+
limit: "1",
|
|
93
|
+
});
|
|
94
|
+
const builds = Array.isArray(res.data) ? res.data : [res.data];
|
|
95
|
+
const newest = builds[0];
|
|
96
|
+
if (!newest) {
|
|
97
|
+
return "No processed (VALID) build available yet. Wait for processing or check list_builds.";
|
|
98
|
+
}
|
|
99
|
+
buildId = newest.id;
|
|
100
|
+
buildVersion = newest.attributes.version;
|
|
101
|
+
}
|
|
102
|
+
await client.patch(`/v1/appStoreVersions/${version.id}/relationships/build`, {
|
|
103
|
+
data: { type: "builds", id: buildId },
|
|
104
|
+
});
|
|
105
|
+
return (`Attached build ${buildVersion} [${buildId}] to version ${version.attributes.versionString}.\n` +
|
|
106
|
+
"Run release_preflight, then submit_for_review.");
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=builds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builds.js","sourceRoot":"","sources":["../../src/tools/builds.ts"],"names":[],"mappings":";;AAiBA,gCAwBC;AAOD,oCAoCC;AAMD,kCA+CC;AAvID,wCAAwC;AACxC,gDAAqE;AAarE,iEAAiE;AAC1D,KAAK,UAAU,UAAU,CAC9B,MAAiB,EACjB,IAAwC,EACxC,IAAU;IAEV,MAAM,IAAI,GAAG,IAAA,oBAAU,EAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAChD,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAEtB,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAa,YAAY,EAAE;QACrD,aAAa,EAAE,IAAI,CAAC,MAAM;QAC1B,IAAI,EAAE,eAAe;QACrB,gBAAgB,EAAE,8CAA8C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AC,GAAG,CAAa,YAAY,EAAE;YACrD,aAAa,EAAE,IAAI,CAAC,MAAM;YAC1B,yBAAyB,EAAE,OAAO;YAClC,IAAI,EAAE,eAAe;YACrB,gBAAgB,EAAE,SAAS;YAC3B,KAAK,EAAE,GAAG;SACX,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,qFAAqF,CAAC;QAC/F,CAAC;QACD,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;QACpB,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC;IAC3C,CAAC;IAED,MAAM,MAAM,CAAC,KAAK,CAAC,wBAAwB,OAAO,CAAC,EAAE,sBAAsB,EAAE;QAC3E,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE;KACtC,CAAC,CAAC;IAEH,OAAO,CACL,kBAAkB,YAAY,KAAK,OAAO,gBAAgB,OAAO,CAAC,UAAU,CAAC,aAAa,KAAK;QAC/F,gDAAgD,CACjD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Tier } from "../types.js";
|
|
2
|
+
export interface EUTraderArgs {
|
|
3
|
+
app_id: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* EU Digital Services Act "trader status" is required before an app can stay
|
|
7
|
+
* available in the EU. Apple does not expose it through the public App Store
|
|
8
|
+
* Connect API (no trader attribute on apps; no dedicated resource, probed live
|
|
9
|
+
* 2026-06-26), so this returns the exact steps plus a deep link.
|
|
10
|
+
*/
|
|
11
|
+
export declare function setEUTraderStatus(args: EUTraderArgs, tier: Tier): Promise<string>;
|
|
12
|
+
//# sourceMappingURL=eu-trader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eu-trader.d.ts","sourceRoot":"","sources":["../../src/tools/eu-trader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBvF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setEUTraderStatus = setEUTraderStatus;
|
|
4
|
+
const gate_js_1 = require("../gate.js");
|
|
5
|
+
/**
|
|
6
|
+
* EU Digital Services Act "trader status" is required before an app can stay
|
|
7
|
+
* available in the EU. Apple does not expose it through the public App Store
|
|
8
|
+
* Connect API (no trader attribute on apps; no dedicated resource, probed live
|
|
9
|
+
* 2026-06-26), so this returns the exact steps plus a deep link.
|
|
10
|
+
*/
|
|
11
|
+
async function setEUTraderStatus(args, tier) {
|
|
12
|
+
const gate = (0, gate_js_1.requirePro)(tier, "Declaring EU trader status");
|
|
13
|
+
if (gate)
|
|
14
|
+
return gate;
|
|
15
|
+
const url = `https://appstoreconnect.apple.com/apps/${args.app_id}/distribution/info`;
|
|
16
|
+
return ("EU trader status (Digital Services Act) is not API-addressable; declare it once in App Store Connect:\n\n" +
|
|
17
|
+
`1. Open ${url} (App Information).\n` +
|
|
18
|
+
"2. Find 'Trader Status' and choose Trader or Non-Trader.\n" +
|
|
19
|
+
" - If you sell paid apps or in-app purchases in the EU, you are a Trader and must publish your\n" +
|
|
20
|
+
" name, address, email, and phone, which Apple shows on your EU product pages.\n" +
|
|
21
|
+
" - Non-Trader removes EU availability for paid distribution.\n" +
|
|
22
|
+
"3. Complete the contact details under Business > and save.\n\n" +
|
|
23
|
+
"Required before an app with EU availability can pass review. This is a legal decision: confirm with the account owner.");
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=eu-trader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eu-trader.js","sourceRoot":"","sources":["../../src/tools/eu-trader.ts"],"names":[],"mappings":";;AAaA,8CAgBC;AA5BD,wCAAwC;AAMxC;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CAAC,IAAkB,EAAE,IAAU;IACpE,MAAM,IAAI,GAAG,IAAA,oBAAU,EAAC,IAAI,EAAE,4BAA4B,CAAC,CAAC;IAC5D,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAEtB,MAAM,GAAG,GAAG,0CAA0C,IAAI,CAAC,MAAM,oBAAoB,CAAC;IAEtF,OAAO,CACL,2GAA2G;QAC3G,WAAW,GAAG,uBAAuB;QACrC,4DAA4D;QAC5D,oGAAoG;QACpG,qFAAqF;QACrF,kEAAkE;QAClE,gEAAgE;QAChE,wHAAwH,CACzH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* asc_guide - the orientation layer.
|
|
3
|
+
*
|
|
4
|
+
* The MCP has 30+ tools and a control plane with real, non-obvious limits
|
|
5
|
+
* (atomic PATCH, V2 age rating, per-territory pricing, first-IAP-on-version,
|
|
6
|
+
* ASC-UI-only privacy/trader). An agent that just sees a flat tool list will
|
|
7
|
+
* stumble into those. This tool is the map: it returns the exact end-to-end
|
|
8
|
+
* playbook for a given goal, with the manual ASC-website / Xcode interruptions
|
|
9
|
+
* called out inline at the step where they bite.
|
|
10
|
+
*
|
|
11
|
+
* Free tier: orientation is never gated. Users should be able to read the flows
|
|
12
|
+
* (and see what Pro unlocks) before paying.
|
|
13
|
+
*/
|
|
14
|
+
export type GuideTopic = "overview" | "setup" | "first-app" | "update" | "screenshots" | "iap" | "subscriptions" | "reviews" | "testflight" | "binary" | "limitations";
|
|
15
|
+
export interface GuideArgs {
|
|
16
|
+
topic?: GuideTopic;
|
|
17
|
+
}
|
|
18
|
+
interface Flow {
|
|
19
|
+
title: string;
|
|
20
|
+
when: string;
|
|
21
|
+
/** Ordered steps. A step starting with "MANUAL:" is a hand-step in the ASC website / Xcode that no API can do. */
|
|
22
|
+
steps: string[];
|
|
23
|
+
/** Manual interruptions specific to this flow, restated so they are impossible to miss. */
|
|
24
|
+
manual: string[];
|
|
25
|
+
}
|
|
26
|
+
declare const FLOWS: Record<Exclude<GuideTopic, "overview" | "limitations">, Flow>;
|
|
27
|
+
declare const LIMITATIONS: {
|
|
28
|
+
item: string;
|
|
29
|
+
why: string;
|
|
30
|
+
doInstead: string;
|
|
31
|
+
}[];
|
|
32
|
+
declare function renderFlow(f: Flow): string;
|
|
33
|
+
declare function renderOverview(): string;
|
|
34
|
+
declare function renderLimitations(): string;
|
|
35
|
+
export declare function ascGuide(args: GuideArgs): Promise<string>;
|
|
36
|
+
/** Exposed so docs generation and tests can reuse the same source of truth. */
|
|
37
|
+
export { FLOWS, LIMITATIONS, renderFlow, renderOverview, renderLimitations };
|
|
38
|
+
//# sourceMappingURL=guide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide.d.ts","sourceRoot":"","sources":["../../src/tools/guide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,OAAO,GACP,WAAW,GACX,QAAQ,GACR,aAAa,GACb,KAAK,GACL,eAAe,GACf,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,aAAa,CAAC;AAElB,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,UAAU,IAAI;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,kHAAkH;IAClH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,2FAA2F;IAC3F,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,QAAA,MAAM,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,GAAG,aAAa,CAAC,EAAE,IAAI,CA2JxE,CAAC;AAEF,QAAA,MAAM,WAAW,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EA8ClE,CAAC;AAEF,iBAAS,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAcnC;AAED,iBAAS,cAAc,IAAI,MAAM,CAuBhC;AAED,iBAAS,iBAAiB,IAAI,MAAM,CAUnC;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAO/D;AAED,+EAA+E;AAC/E,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* asc_guide - the orientation layer.
|
|
4
|
+
*
|
|
5
|
+
* The MCP has 30+ tools and a control plane with real, non-obvious limits
|
|
6
|
+
* (atomic PATCH, V2 age rating, per-territory pricing, first-IAP-on-version,
|
|
7
|
+
* ASC-UI-only privacy/trader). An agent that just sees a flat tool list will
|
|
8
|
+
* stumble into those. This tool is the map: it returns the exact end-to-end
|
|
9
|
+
* playbook for a given goal, with the manual ASC-website / Xcode interruptions
|
|
10
|
+
* called out inline at the step where they bite.
|
|
11
|
+
*
|
|
12
|
+
* Free tier: orientation is never gated. Users should be able to read the flows
|
|
13
|
+
* (and see what Pro unlocks) before paying.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.LIMITATIONS = exports.FLOWS = void 0;
|
|
17
|
+
exports.ascGuide = ascGuide;
|
|
18
|
+
exports.renderFlow = renderFlow;
|
|
19
|
+
exports.renderOverview = renderOverview;
|
|
20
|
+
exports.renderLimitations = renderLimitations;
|
|
21
|
+
const FLOWS = {
|
|
22
|
+
setup: {
|
|
23
|
+
title: "One-time setup",
|
|
24
|
+
when: "Before anything else, once per machine.",
|
|
25
|
+
steps: [
|
|
26
|
+
"Create an API key: App Store Connect > Users and Access > Integrations > App Store Connect API > generate a key with the App Manager role. Download the .p8 (one time only).",
|
|
27
|
+
"Drop the .p8 into ~/.appstoreconnect/private_keys/ (Apple's standard path). The 10-char Key ID is read from the filename, so that one file is enough.",
|
|
28
|
+
"Run `asc-mcp init` in a terminal. It auto-detects the key, asks for your Issuer ID (the UUID at the top of the Integrations page) and an optional Pro license key, and prints a paste-ready MCP config block.",
|
|
29
|
+
"Paste the block into your client config (~/.claude/settings.json, Claude Desktop config, Cursor, etc.) and restart the client.",
|
|
30
|
+
"Verify with `list_apps`. If it returns your apps, you are connected.",
|
|
31
|
+
],
|
|
32
|
+
manual: [
|
|
33
|
+
"MANUAL: generating the API key and downloading the .p8 is a one-time App Store Connect website action. The .p8 cannot be re-downloaded; if lost, revoke and make a new one.",
|
|
34
|
+
"Free tier is read/intelligence only. Set ASC_LICENSE_KEY to unlock all write/control tools ($9/mo).",
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
"first-app": {
|
|
38
|
+
title: "Ship an app's FIRST release (1.0)",
|
|
39
|
+
when: "Brand-new app, never been on the store. The hardest flow because of first-time-only Apple constraints.",
|
|
40
|
+
steps: [
|
|
41
|
+
"MANUAL: the app RECORD must already exist. `POST /v1/apps` is forbidden for API keys, so create the app (name, bundle ID, SKU, primary language) once in App Store Connect > Apps > +. App Groups are portal-only too.",
|
|
42
|
+
"`list_apps` to get the numeric app_id.",
|
|
43
|
+
"Build + upload a binary so a build exists to attach (see topic:binary), or upload via Xcode/Transporter. Then `wait_for_build` until VALID.",
|
|
44
|
+
"`set_app_metadata` - primary/secondary category, copyright, content rights, export compliance (most apps: uses_non_exempt_encryption=false).",
|
|
45
|
+
"`set_app_price` - price_usd:0 for free, or a tier. Required before submit.",
|
|
46
|
+
"`update_version_metadata` - description, keywords, what's-new (note: what's-new is NOT editable on a first 1.0 with no prior release; the tool drops it and reports it skipped), promo text, marketing/support/privacy-policy URLs, name, subtitle. Char limits validated.",
|
|
47
|
+
"`set_app_availability` - defaults to all ~175 territories; pass a subset to restrict.",
|
|
48
|
+
"`set_age_rating` - pass only the declarations that apply; the tool fetches, merges the full V2 set, and submits (it is NOT a partial PATCH).",
|
|
49
|
+
"`set_review_contact` - name, phone, email, demo account if the app needs login. Required before submit.",
|
|
50
|
+
"`attach_build` - newest VALID build by default.",
|
|
51
|
+
"`upload_screenshots` per display type (at minimum APP_IPHONE_67; APP_IPHONE_65 + APP_IPAD recommended). See topic:screenshots.",
|
|
52
|
+
"MANUAL: App Privacy nutrition label. Not in the API. Run `set_privacy_nutrition` for the exact checklist + deep link, then set it in the ASC website.",
|
|
53
|
+
"MANUAL: EU DSA trader status. Not in the API. Run `set_eu_trader_status` for steps + deep link; it's a legal decision, set it in the website.",
|
|
54
|
+
"If the app has in-app purchases or subscriptions, create them now (topic:iap / topic:subscriptions). The FIRST ones must be submitted WITH the version (next step).",
|
|
55
|
+
"`release_preflight` - fix every FAIL it reports. It tailors a 'manual steps to finish' list to this app's state.",
|
|
56
|
+
"MANUAL (if first IAPs exist): the app's very first in-app purchases CANNOT be bundled with the version via the API. In the ASC website, open the version, Add for Review, tick the products, and submit them together. `submit_for_review` detects this and ABORTS rather than orphaning the version. After the first release is live, later IAPs submit via the API fine.",
|
|
57
|
+
"`submit_for_review` with confirm:true (only if there are no first-IAPs blocking; otherwise submit in the website per the step above).",
|
|
58
|
+
"After approval: `release_version` (confirm:true) to go live now, or `manage_phased_release` start for a 7-day rollout.",
|
|
59
|
+
],
|
|
60
|
+
manual: [
|
|
61
|
+
"App record + App Group creation - ASC website / Developer portal only.",
|
|
62
|
+
"App Privacy nutrition label - ASC website only (`set_privacy_nutrition` gives the checklist).",
|
|
63
|
+
"EU trader status - ASC website only, legal decision (`set_eu_trader_status` gives steps).",
|
|
64
|
+
"First in-app purchases - must be submitted with the version in the ASC website; API cannot bundle them.",
|
|
65
|
+
"Building the binary needs Xcode on a Mac (the API can't compile).",
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
update: {
|
|
69
|
+
title: "Ship an UPDATE to an existing app",
|
|
70
|
+
when: "App is already live; you're releasing a new version. Much simpler than 1.0.",
|
|
71
|
+
steps: [
|
|
72
|
+
"`app_details` to read current version + state.",
|
|
73
|
+
"`create_version` with the next version number (e.g. 2.5.0) if there's no editable version yet.",
|
|
74
|
+
"`update_version_metadata` - what's-new is editable now; update description/keywords/promo as needed.",
|
|
75
|
+
"Upload the new build (`upload_binary` confirm:true, or Xcode/Transporter; see topic:binary), `wait_for_build` to VALID, then `attach_build`.",
|
|
76
|
+
"`upload_screenshots` only if they changed.",
|
|
77
|
+
"Later IAPs/subscriptions (not the first ever) can be created and will submit via the API.",
|
|
78
|
+
"`release_preflight` - fix FAILs.",
|
|
79
|
+
"`submit_for_review` confirm:true.",
|
|
80
|
+
"After approval: `release_version` confirm:true, or `manage_phased_release` start.",
|
|
81
|
+
"Use `metadata_diff` any time to see exactly what changed between live and pending across locales.",
|
|
82
|
+
],
|
|
83
|
+
manual: [
|
|
84
|
+
"Still no API for nutrition label or trader status, but these persist from the first release; only revisit if your data practices changed.",
|
|
85
|
+
"Building the binary still needs Xcode.",
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
screenshots: {
|
|
89
|
+
title: "Upload screenshots",
|
|
90
|
+
when: "Adding or replacing App Store screenshots.",
|
|
91
|
+
steps: [
|
|
92
|
+
"Prepare PNG/JPEG files at the exact pixel size for the display type.",
|
|
93
|
+
"`upload_screenshots` with display_type, an ordered files array, and locale. It runs Apple's 3-step reserve/PUT-chunks/commit flow for you.",
|
|
94
|
+
"Common display types: APP_IPHONE_67 (6.7in, required), APP_IPHONE_65 (6.5in), APP_IPAD_PRO_129 (12.9in iPad).",
|
|
95
|
+
],
|
|
96
|
+
manual: [
|
|
97
|
+
"Capturing the screenshots from a simulator is not yet automated (capture_screenshots is on the roadmap). Produce the PNGs yourself, then upload via the tool.",
|
|
98
|
+
"Apple requires correct exact dimensions per display type or the commit fails.",
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
iap: {
|
|
102
|
+
title: "Create a one-time in-app purchase (non-consumable / consumable)",
|
|
103
|
+
when: "Selling a lifetime unlock, consumable credits, etc.",
|
|
104
|
+
steps: [
|
|
105
|
+
"`create_iap` - product_id, reference name, display name (max 30), description (max 45), type, price_usd. It's idempotent: USA base price, auto-equalized across all territories, availability set. IAP state recomputes immediately on availability (unlike subscriptions, which need a nudge), so once price + availability + a review screenshot are set the product is READY_TO_SUBMIT.",
|
|
106
|
+
"`set_iap_review_screenshot` - IAPs need an App Review screenshot to leave MISSING_METADATA. Upload one showing the paywall.",
|
|
107
|
+
"For the FIRST IAP ever on the app: it must be submitted WITH the app version in the ASC website (see topic:first-app). After the first release is live, later IAPs submit via `submit_for_review`.",
|
|
108
|
+
],
|
|
109
|
+
manual: [
|
|
110
|
+
"First non-consumable / first IAP on a brand-new app: submit it together with the version in the ASC website. API can't bundle the first one.",
|
|
111
|
+
"IAP localization description is capped at 45 chars.",
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
subscriptions: {
|
|
115
|
+
title: "Create an auto-renewable subscription",
|
|
116
|
+
when: "Recurring billing (monthly/yearly plans, free trials).",
|
|
117
|
+
steps: [
|
|
118
|
+
"`create_subscription` - group ref + display name, product_id, names, description (max 45), period, price_usd, optional free_trial, review_note. It is idempotent and handles the gnarly order Apple requires: availability FIRST, then USA base price, then equalize across ~175 territories, then per-territory free-trial intro offers, then a final no-op PATCH to force the state to recompute to READY_TO_SUBMIT.",
|
|
119
|
+
"`set_iap_review_screenshot` - subscriptions also need a review screenshot of the paywall.",
|
|
120
|
+
"First subscriptions on a brand-new app submit WITH the version in the website; later ones via the API.",
|
|
121
|
+
],
|
|
122
|
+
manual: [
|
|
123
|
+
"First subscriptions on a new app: submit with the version in the ASC website.",
|
|
124
|
+
"Subscription state only recomputes on a subscription-level edit; create_subscription nudges it for you, but if you edit sub-resources by hand, expect a lag until a subscription PATCH.",
|
|
125
|
+
],
|
|
126
|
+
},
|
|
127
|
+
reviews: {
|
|
128
|
+
title: "Triage and respond to customer reviews",
|
|
129
|
+
when: "Managing your App Store reputation.",
|
|
130
|
+
steps: [
|
|
131
|
+
"`list_reviews` - filter by rating, sort, limit.",
|
|
132
|
+
"`triage_reviews` - clusters recent reviews into 3-5 themes with counts and action buckets, using your own client's model via MCP Sampling (no extra cost from this server).",
|
|
133
|
+
"`draft_review_response` - drafts a public reply in the review's locale. It NEVER auto-posts.",
|
|
134
|
+
"MANUAL: post the approved reply text in App Store Connect yourself (the API does not expose posting public responses).",
|
|
135
|
+
],
|
|
136
|
+
manual: [
|
|
137
|
+
"Posting the public response is manual in the ASC website; the tool only drafts it.",
|
|
138
|
+
],
|
|
139
|
+
},
|
|
140
|
+
testflight: {
|
|
141
|
+
title: "Distribute a TestFlight beta",
|
|
142
|
+
when: "Getting a build to testers before App Review.",
|
|
143
|
+
steps: [
|
|
144
|
+
"Upload a build (topic:binary), `wait_for_build` to VALID.",
|
|
145
|
+
"`list_beta_groups` to find or confirm a group.",
|
|
146
|
+
"`assign_build_to_group` - newest VALID build by default.",
|
|
147
|
+
"`invite_beta_tester` - email + name; Apple sends the TestFlight invite.",
|
|
148
|
+
],
|
|
149
|
+
manual: [
|
|
150
|
+
"Beta App Review (for external groups' first build) and the test-information form may need a one-time touch in the ASC website.",
|
|
151
|
+
],
|
|
152
|
+
},
|
|
153
|
+
binary: {
|
|
154
|
+
title: "Build, sign, and upload the binary",
|
|
155
|
+
when: "You need a build on App Store Connect and want to do it from the agent.",
|
|
156
|
+
steps: [
|
|
157
|
+
"MANUAL: an Apple Distribution certificate must already exist in your login keychain. Certificate creation and cloud signing are not available to least-privilege API keys.",
|
|
158
|
+
"`setup_app_store_signing` - downloads the app's IOS_APP_STORE provisioning profiles (app + extensions), installs them, and writes a manual-signing ExportOptions.plist. This sidesteps the cloud-signing permission most API keys lack.",
|
|
159
|
+
"`build_and_archive` - xcodebuild archive + export using that ExportOptions.plist. Requires Xcode on this Mac. Give it the .xcodeproj/.xcworkspace, scheme, and the generated plist.",
|
|
160
|
+
"`upload_binary` confirm:true - uploads the .ipa via altool with your API key.",
|
|
161
|
+
"`wait_for_build` until the build is VALID, then `attach_build`.",
|
|
162
|
+
],
|
|
163
|
+
manual: [
|
|
164
|
+
"Building requires the local Xcode toolchain; the API cannot compile.",
|
|
165
|
+
"Distribution certificate must pre-exist in the keychain; API keys can't create certs or use cloud signing.",
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
};
|
|
169
|
+
exports.FLOWS = FLOWS;
|
|
170
|
+
const LIMITATIONS = [
|
|
171
|
+
{
|
|
172
|
+
item: "Create an app record",
|
|
173
|
+
why: "POST /v1/apps is forbidden for API keys.",
|
|
174
|
+
doInstead: "ASC website > Apps > + (one time).",
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
item: "Create an App Group",
|
|
178
|
+
why: "Portal-only; no API.",
|
|
179
|
+
doInstead: "Apple Developer portal > Identifiers.",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
item: "App Privacy nutrition label",
|
|
183
|
+
why: "appDataUsages is not in the public API.",
|
|
184
|
+
doInstead: "ASC website. Run `set_privacy_nutrition` for the exact checklist + deep link.",
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
item: "EU DSA trader status",
|
|
188
|
+
why: "No public API attribute/resource.",
|
|
189
|
+
doInstead: "ASC website. Run `set_eu_trader_status` for steps + deep link. Legal decision.",
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
item: "Submit an app's FIRST in-app purchases / subscriptions",
|
|
193
|
+
why: "First products return FIRST_NON_CONSUMABLE_MUST_BE_SUBMITTED_ON_VERSION; only the website bundles them with the version.",
|
|
194
|
+
doInstead: "ASC website: open the version, Add for Review, tick the products, submit together. `submit_for_review` aborts to avoid orphaning. Later products submit via API.",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
item: "Create a signing certificate / use cloud signing",
|
|
198
|
+
why: "Least-privilege API keys lack certificate rights; cloud signing fails with a permission error.",
|
|
199
|
+
doInstead: "Have an Apple Distribution cert in the keychain, then `setup_app_store_signing` for manual-signing profiles + ExportOptions.plist.",
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
item: "Compile the binary",
|
|
203
|
+
why: "Building an .ipa needs the Xcode toolchain.",
|
|
204
|
+
doInstead: "`build_and_archive` + `upload_binary` run locally on a Mac with Xcode.",
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
item: "Post a public response to a review",
|
|
208
|
+
why: "API exposes reading reviews, not posting public replies.",
|
|
209
|
+
doInstead: "`draft_review_response` writes the reply; paste it in the ASC website.",
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
item: "Capture simulator screenshots",
|
|
213
|
+
why: "Not yet implemented (roadmap).",
|
|
214
|
+
doInstead: "Produce PNGs yourself, then `upload_screenshots`.",
|
|
215
|
+
},
|
|
216
|
+
];
|
|
217
|
+
exports.LIMITATIONS = LIMITATIONS;
|
|
218
|
+
function renderFlow(f) {
|
|
219
|
+
// MANUAL lines are interleaved callouts, not numbered steps, so they must not
|
|
220
|
+
// consume a step number (otherwise the visible numbering skips).
|
|
221
|
+
let n = 0;
|
|
222
|
+
const steps = f.steps
|
|
223
|
+
.map((s) => (s.startsWith("MANUAL:") ? ` ${s}` : `${++n}. ${s}`))
|
|
224
|
+
.join("\n");
|
|
225
|
+
const manual = f.manual.map((m) => `- ${m}`).join("\n");
|
|
226
|
+
return (`## ${f.title}\n\n` +
|
|
227
|
+
`When: ${f.when}\n\n` +
|
|
228
|
+
`Steps:\n${steps}\n\n` +
|
|
229
|
+
`Manual interruptions you must do yourself:\n${manual}\n`);
|
|
230
|
+
}
|
|
231
|
+
function renderOverview() {
|
|
232
|
+
const lines = [
|
|
233
|
+
"# App Store Connect MCP - Guide",
|
|
234
|
+
"",
|
|
235
|
+
"Call `asc_guide` with a `topic` for the exact playbook. Manual steps (things no API can do) are flagged inline so you never get blocked mid-flow.",
|
|
236
|
+
"",
|
|
237
|
+
"Topics:",
|
|
238
|
+
"- setup - one-time machine setup (.p8, init, config)",
|
|
239
|
+
"- first-app - ship a brand-new app's 1.0 (the hardest flow)",
|
|
240
|
+
"- update - ship an update to a live app",
|
|
241
|
+
"- screenshots - upload App Store screenshots",
|
|
242
|
+
"- iap - create a one-time in-app purchase",
|
|
243
|
+
"- subscriptions - create an auto-renewable subscription",
|
|
244
|
+
"- reviews - triage and reply to customer reviews",
|
|
245
|
+
"- testflight - distribute a beta",
|
|
246
|
+
"- binary - build, sign, upload the binary (needs Xcode)",
|
|
247
|
+
"- limitations - everything the API can't do + the manual workaround",
|
|
248
|
+
"",
|
|
249
|
+
"Golden rule: when a step says MANUAL, stop and do it in the App Store Connect website (or Xcode). The agent should hand the user the deep link and exact steps, not pretend the API can do it.",
|
|
250
|
+
"",
|
|
251
|
+
"Outward-facing tools (submit_for_review, release_version, upload_binary) require confirm:true. Always confirm with the human first.",
|
|
252
|
+
];
|
|
253
|
+
return lines.join("\n");
|
|
254
|
+
}
|
|
255
|
+
function renderLimitations() {
|
|
256
|
+
const rows = LIMITATIONS.map((l) => `### ${l.item}\nWhy: ${l.why}\nDo instead: ${l.doInstead}`).join("\n\n");
|
|
257
|
+
return ("# Limitations and manual interruptions\n\n" +
|
|
258
|
+
"Everything here is impossible via the App Store Connect API and must be done by hand. " +
|
|
259
|
+
"The MCP either returns the exact steps (privacy, trader) or detects and aborts (first IAPs) so nothing is left half-done.\n\n" +
|
|
260
|
+
rows);
|
|
261
|
+
}
|
|
262
|
+
async function ascGuide(args) {
|
|
263
|
+
const topic = args.topic ?? "overview";
|
|
264
|
+
if (topic === "overview")
|
|
265
|
+
return renderOverview();
|
|
266
|
+
if (topic === "limitations")
|
|
267
|
+
return renderLimitations();
|
|
268
|
+
const flow = FLOWS[topic];
|
|
269
|
+
if (!flow)
|
|
270
|
+
return renderOverview();
|
|
271
|
+
return renderFlow(flow);
|
|
272
|
+
}
|
|
273
|
+
//# sourceMappingURL=guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide.js","sourceRoot":"","sources":["../../src/tools/guide.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AA8RH,4BAOC;AAG4B,gCAAU;AAAE,wCAAc;AAAE,8CAAiB;AA5Q1E,MAAM,KAAK,GAAkE;IAC3E,KAAK,EAAE;QACL,KAAK,EAAE,gBAAgB;QACvB,IAAI,EAAE,yCAAyC;QAC/C,KAAK,EAAE;YACL,8KAA8K;YAC9K,uJAAuJ;YACvJ,+MAA+M;YAC/M,gIAAgI;YAChI,sEAAsE;SACvE;QACD,MAAM,EAAE;YACN,6KAA6K;YAC7K,qGAAqG;SACtG;KACF;IAED,WAAW,EAAE;QACX,KAAK,EAAE,mCAAmC;QAC1C,IAAI,EAAE,wGAAwG;QAC9G,KAAK,EAAE;YACL,wNAAwN;YACxN,wCAAwC;YACxC,6IAA6I;YAC7I,8IAA8I;YAC9I,4EAA4E;YAC5E,4QAA4Q;YAC5Q,uFAAuF;YACvF,8IAA8I;YAC9I,yGAAyG;YACzG,iDAAiD;YACjD,gIAAgI;YAChI,uJAAuJ;YACvJ,+IAA+I;YAC/I,qKAAqK;YACrK,kHAAkH;YAClH,4WAA4W;YAC5W,uIAAuI;YACvI,wHAAwH;SACzH;QACD,MAAM,EAAE;YACN,wEAAwE;YACxE,+FAA+F;YAC/F,2FAA2F;YAC3F,yGAAyG;YACzG,mEAAmE;SACpE;KACF;IAED,MAAM,EAAE;QACN,KAAK,E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