@pofky/asc-mcp 1.10.0 → 1.10.1
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 +1 -1
- package/README.md +3 -3
- package/USER_GUIDE.md +4 -4
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +22 -14
- package/dist/doctor.js.map +1 -1
- package/dist/editable.d.ts +18 -0
- package/dist/editable.d.ts.map +1 -1
- package/dist/editable.js +23 -0
- package/dist/editable.js.map +1 -1
- package/dist/gate.d.ts +2 -2
- package/dist/gate.js +8 -8
- package/dist/gate.js.map +1 -1
- package/dist/index.js +45 -16
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +7 -0
- package/dist/instructions.d.ts.map +1 -1
- package/dist/instructions.js +25 -2
- package/dist/instructions.js.map +1 -1
- package/dist/license.d.ts +8 -1
- package/dist/license.d.ts.map +1 -1
- package/dist/license.js +20 -9
- package/dist/license.js.map +1 -1
- package/dist/preflight/project-files.js +1 -1
- package/dist/preflight/project-files.js.map +1 -1
- package/dist/preflight/project-scan.d.ts.map +1 -1
- package/dist/preflight/project-scan.js +28 -1
- package/dist/preflight/project-scan.js.map +1 -1
- package/dist/preflight/report.d.ts +2 -0
- package/dist/preflight/report.d.ts.map +1 -1
- package/dist/preflight/report.js +7 -7
- package/dist/preflight/report.js.map +1 -1
- package/dist/preflight/run.js +1 -1
- package/dist/preflight/run.js.map +1 -1
- package/dist/prompts.js +1 -1
- package/dist/prompts.js.map +1 -1
- package/dist/setup.js +2 -2
- package/dist/tool-meta.js +1 -1
- package/dist/tools/age-rating.d.ts.map +1 -1
- package/dist/tools/age-rating.js +2 -0
- package/dist/tools/age-rating.js.map +1 -1
- package/dist/tools/availability.d.ts +2 -0
- package/dist/tools/availability.d.ts.map +1 -1
- package/dist/tools/availability.js +14 -0
- package/dist/tools/availability.js.map +1 -1
- package/dist/tools/builds.d.ts +1 -0
- package/dist/tools/builds.d.ts.map +1 -1
- package/dist/tools/builds.js +7 -2
- package/dist/tools/builds.js.map +1 -1
- package/dist/tools/competitor-snapshot.js +1 -1
- package/dist/tools/competitor-snapshot.js.map +1 -1
- package/dist/tools/daily-briefing.d.ts.map +1 -1
- package/dist/tools/daily-briefing.js +19 -4
- package/dist/tools/daily-briefing.js.map +1 -1
- package/dist/tools/guide.js +6 -6
- package/dist/tools/guide.js.map +1 -1
- package/dist/tools/iap.d.ts +2 -0
- package/dist/tools/iap.d.ts.map +1 -1
- package/dist/tools/iap.js +8 -0
- package/dist/tools/iap.js.map +1 -1
- package/dist/tools/list-apps.d.ts.map +1 -1
- package/dist/tools/list-apps.js +2 -0
- package/dist/tools/list-apps.js.map +1 -1
- package/dist/tools/metadata-diff.js +1 -1
- package/dist/tools/metadata-diff.js.map +1 -1
- package/dist/tools/sales-report.js +1 -1
- package/dist/tools/sales-report.js.map +1 -1
- package/dist/tools/screenshots.d.ts +1 -0
- package/dist/tools/screenshots.d.ts.map +1 -1
- package/dist/tools/screenshots.js +5 -8
- package/dist/tools/screenshots.js.map +1 -1
- package/dist/tools/submission.d.ts +5 -0
- package/dist/tools/submission.d.ts.map +1 -1
- package/dist/tools/submission.js +75 -30
- package/dist/tools/submission.js.map +1 -1
- package/dist/tools/testflight.d.ts +1 -1
- package/dist/tools/testflight.d.ts.map +1 -1
- package/dist/tools/testflight.js +21 -0
- package/dist/tools/testflight.js.map +1 -1
- package/dist/tools/update-version-metadata.d.ts +1 -0
- package/dist/tools/update-version-metadata.d.ts.map +1 -1
- package/dist/tools/update-version-metadata.js +8 -1
- package/dist/tools/update-version-metadata.js.map +1 -1
- package/dist/tools/version-control.d.ts.map +1 -1
- package/dist/tools/version-control.js +6 -2
- package/dist/tools/version-control.js.map +1 -1
- package/dist/trial.d.ts +0 -5
- package/dist/trial.d.ts.map +1 -1
- package/dist/trial.js +5 -2
- package/dist/trial.js.map +1 -1
- package/package.json +1 -1
package/LIMITATIONS.md
CHANGED
|
@@ -10,7 +10,7 @@ Do instead: ASC website > Apps > + (one time).
|
|
|
10
10
|
|
|
11
11
|
### Delete or remove an app record
|
|
12
12
|
Why: DELETE /v1/apps is forbidden for API keys (probed live: apps allows GET and UPDATE only). Builds and appInfos cannot be deleted either.
|
|
13
|
-
Do instead: First take it off sale everywhere, which IS automatable: set_app_availability with territories: [] turns all ~175 territories off (Apple requires this even for an app that was never released). Also remove any in-app purchases from sale. Then, in the ASC website: Apps > your app > App Information > Additional Information > Remove App. Needs the Account Holder or Admin role, and it will not appear while the app is in Ready for Review, Waiting for Review, In Review, Metadata Rejected or Rejected. Note the SKU can never be reused in the organisation, and the bundle ID cannot be reused if a build was ever uploaded.
|
|
13
|
+
Do instead: First take it off sale everywhere, which IS automatable: set_app_availability with territories: [] and confirm: true turns all ~175 territories off (Apple requires this even for an app that was never released). Also remove any in-app purchases from sale. Then, in the ASC website: Apps > your app > App Information > Additional Information > Remove App. Needs the Account Holder or Admin role, and it will not appear while the app is in Ready for Review, Waiting for Review, In Review, Metadata Rejected or Rejected. Note the SKU can never be reused in the organisation, and the bundle ID cannot be reused if a build was ever uploaded.
|
|
14
14
|
|
|
15
15
|
### Create an App Group
|
|
16
16
|
Why: Portal-only; no API.
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
npx @pofky/asc-mcp init --write # finds your .p8, asks for your Issuer ID, writes your MCP config
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Then ask your agent: **"start my asc-mcp trial, my email is you@example.com"**. All 41 tools unlock for 7 days, no card and nothing to cancel, and the trial activates in the session you are already in, so whatever you were blocked on works on the very next call. After that Pro is $9 a month (VAT included; in the US, Canada and India sales tax is added at checkout). Six tools stay free, and two of those (the setup check and the playbook) need nothing but Node. The Pro tools that only read (reviews, sales, builds, TestFlight groups, preflight, briefing, keywords, competitors, metadata diff, release notes) also work 5 times in total on your machine with no
|
|
15
|
+
Then ask your agent: **"start my asc-mcp trial, my email is you@example.com"**. All 41 tools unlock for 7 days, no card and nothing to cancel, and the trial activates in the session you are already in, so whatever you were blocked on works on the very next call. After that Pro is $9 a month (VAT included; in the US, Canada and India sales tax is added at checkout). Six tools stay free, and two of those (the setup check and the playbook) need nothing but Node. The Pro tools that only read (reviews, sales, builds, TestFlight groups, preflight, briefing, keywords, competitors, metadata diff, release notes) also work 5 times in total on your machine with no license, as a preview.
|
|
16
16
|
|
|
17
17
|
| You say | What happens |
|
|
18
18
|
|---------|-------------|
|
|
@@ -306,9 +306,9 @@ Your `.p8` private key never leaves your machine:
|
|
|
306
306
|
- The `.p8` private key is read locally. JWT tokens are generated on your computer, and name your Key ID and Issuer ID to Apple, as Apple's API requires.
|
|
307
307
|
- API calls go directly from your machine to `api.appstoreconnect.apple.com`.
|
|
308
308
|
- The license server is sent your license key string when one is set and, if you start a trial, your email address, a one-way hash of your Issuer ID and the name of the tool you started from. No Apple data and no credentials.
|
|
309
|
-
- `release_preflight` requests the support, marketing
|
|
309
|
+
- `release_preflight` requests the support, marketing and privacy policy addresses in your own App Store Connect record and any link in your description that looks like Terms of Use, following their redirects, from your machine with no key or token, and never one that resolves to a private network. If you pass `project_path` it reads that folder (on a Mac, `nm` and `plutil` on a built app there), writes nothing and runs nothing from the project; its reply carries paths, line numbers and setting names, not file contents.
|
|
310
310
|
- `~/.asc-mcp/preview.json` holds one number, how many of the 5 free preview calls have been used on this machine. It is never sent anywhere.
|
|
311
|
-
- Starting a trial
|
|
311
|
+
- Starting a trial saves the license key in plain text in `~/.asc-mcp/license.json` (owner-only permissions on macOS and Linux) and adds it as `ASC_LICENSE_KEY` to every asc-mcp entry found in your Claude Desktop, Claude Code (`~/.claude.json`, including per-project entries), `./.mcp.json`, Cursor, Windsurf and Cline configs. Nothing else in those files is changed, and each edited file gets a one-time `.bak` copy beside it, which holds whatever the file held. `~/.asc-mcp/last-verdict.json` holds the last license check and a hash of the key. Delete the file and the `ASC_LICENSE_KEY` lines to remove the key.
|
|
312
312
|
- Fully open source. [Read the code.](https://github.com/pofky/asc-mcp)
|
|
313
313
|
|
|
314
314
|
## Works With
|
package/USER_GUIDE.md
CHANGED
|
@@ -48,9 +48,9 @@ Steps:
|
|
|
48
48
|
1. `list_apps` to get the numeric app_id.
|
|
49
49
|
2. Build + upload a binary so a build exists to attach (see topic:binary), or upload via Xcode/Transporter. Then `wait_for_build` until VALID.
|
|
50
50
|
3. `set_app_metadata` - primary/secondary category, copyright, content rights, export compliance (most apps: uses_non_exempt_encryption=false).
|
|
51
|
-
4. `set_app_price` - price_usd:0 for free, or
|
|
51
|
+
4. `set_app_price` - price_usd:0 for free, or an exact USA price point. Required before submit. Changing a price the app already has needs confirm:true.
|
|
52
52
|
5. `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.
|
|
53
|
-
6. `set_app_availability` -
|
|
53
|
+
6. `set_app_availability` - all_territories:true, or a list of territories. Turning territories off on an app already set up needs confirm:true.
|
|
54
54
|
7. `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).
|
|
55
55
|
8. `set_review_contact` - name, phone, email, demo account if the app needs login. Required before submit.
|
|
56
56
|
9. `attach_build` - newest VALID build by default.
|
|
@@ -114,7 +114,7 @@ Manual interruptions you must do yourself:
|
|
|
114
114
|
When: Selling a lifetime unlock, consumable credits, etc.
|
|
115
115
|
|
|
116
116
|
Steps:
|
|
117
|
-
1. `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.
|
|
117
|
+
1. `create_iap` - needs confirm:true. 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.
|
|
118
118
|
2. `set_iap_review_screenshot` - IAPs need an App Review screenshot to leave MISSING_METADATA. Upload one showing the paywall.
|
|
119
119
|
3. 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`.
|
|
120
120
|
|
|
@@ -129,7 +129,7 @@ Manual interruptions you must do yourself:
|
|
|
129
129
|
When: Recurring billing (monthly/yearly plans, free trials).
|
|
130
130
|
|
|
131
131
|
Steps:
|
|
132
|
-
1. `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.
|
|
132
|
+
1. `create_subscription` - needs confirm:true. 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.
|
|
133
133
|
2. `set_iap_review_screenshot` - subscriptions also need a review screenshot of the paywall.
|
|
134
134
|
3. First subscriptions on a brand-new app submit WITH the version in the website; later ones via the API.
|
|
135
135
|
|
package/dist/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,OAAa,GAAG,MAAM,GAAG,IAAI,CAK1F;AASD;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,OAAa,GAAG,MAAM,GAAG,IAAI,CAK1F;AASD;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,YAAY,CAAC,CAyNvD;AAID,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAazD"}
|
package/dist/doctor.js
CHANGED
|
@@ -101,7 +101,7 @@ async function runDoctor() {
|
|
|
101
101
|
try {
|
|
102
102
|
(0, auth_js_1.clearTokenCache)();
|
|
103
103
|
const token = await (0, auth_js_1.getToken)(keyId, issuerId, keyPath);
|
|
104
|
-
const res = await fetch("https://api.appstoreconnect.apple.com/v1/apps?limit=1", { headers: { Authorization: `Bearer ${token}` } });
|
|
104
|
+
const res = await fetch("https://api.appstoreconnect.apple.com/v1/apps?limit=1", { headers: { Authorization: `Bearer ${token}` }, signal: AbortSignal.timeout(15_000) });
|
|
105
105
|
if (res.ok) {
|
|
106
106
|
checks.push({
|
|
107
107
|
name: "Live connection",
|
|
@@ -202,7 +202,7 @@ async function runDoctor() {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
else {
|
|
205
|
-
// The
|
|
205
|
+
// The license server says WHY, and the reasons want different answers. A
|
|
206
206
|
// finished trial is not a broken key, and sending that person to look up
|
|
207
207
|
// a key that is working exactly as designed both wastes their time and
|
|
208
208
|
// hides the one thing they need at that moment, which is the price and
|
|
@@ -211,7 +211,7 @@ async function runDoctor() {
|
|
|
211
211
|
const ended = {
|
|
212
212
|
trial_expired: {
|
|
213
213
|
detail: "Your 7-day trial has ended, so the write, control and intelligence tools are locked.",
|
|
214
|
-
fix: `Pro is ${gate_js_1.PRO_PRICE}, cancel any time: ${gate_js_1.UPGRADE_URL}. Already subscribed? Run \`asc_start_trial\` with the same email and
|
|
214
|
+
fix: `Pro is ${gate_js_1.PRO_PRICE}, cancel any time: ${gate_js_1.UPGRADE_URL}. Already subscribed? Run \`asc_start_trial\` with the same email and your paid key is emailed to you.`,
|
|
215
215
|
},
|
|
216
216
|
canceled: {
|
|
217
217
|
detail: "This subscription was cancelled and the paid period has ended.",
|
|
@@ -225,27 +225,35 @@ async function runDoctor() {
|
|
|
225
225
|
// saying a payment failed and where to fix it.
|
|
226
226
|
revoked: {
|
|
227
227
|
detail: "This subscription is no longer active. The usual cause is a renewal payment that did not go through.",
|
|
228
|
-
fix: `Start it again at ${gate_js_1.UPGRADE_URL}; you get a new key by email in seconds and swap it into the same ASC_LICENSE_KEY line. If you believe this is wrong, reply to your
|
|
228
|
+
fix: `Start it again at ${gate_js_1.UPGRADE_URL}; you get a new key by email in seconds and swap it into the same ASC_LICENSE_KEY line. If you believe this is wrong, reply to your license email and a person will look.`,
|
|
229
229
|
},
|
|
230
230
|
inactive: {
|
|
231
231
|
detail: "This subscription is not active right now, so the Pro tools are locked.",
|
|
232
232
|
fix: `Check the card on file, or start again at ${gate_js_1.UPGRADE_URL}. Already resubscribed? Retrieve the current key at ${license_js_1.LICENSE_API_URL}/key.`,
|
|
233
233
|
},
|
|
234
234
|
expired: {
|
|
235
|
-
detail: "This
|
|
235
|
+
detail: "This license has expired.",
|
|
236
236
|
fix: `Renew at ${gate_js_1.UPGRADE_URL}, or retrieve your current key at ${license_js_1.LICENSE_API_URL}/key.`,
|
|
237
237
|
},
|
|
238
238
|
};
|
|
239
239
|
const known = reason ? ended[reason] : undefined;
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
240
|
+
// No answer at all is an outage of ours, not a finding about the key.
|
|
241
|
+
if (!(0, license_js_1.lastLicenseStatus)()) {
|
|
242
|
+
checks.push({
|
|
243
|
+
name: "License",
|
|
244
|
+
status: "warn",
|
|
245
|
+
detail: "A license key is set, and the license server gave no verdict on it.",
|
|
246
|
+
fix: `Retry once you are online. Server status: ${license_js_1.LICENSE_API_URL}/health`,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
else
|
|
250
|
+
checks.push({
|
|
251
|
+
name: "License",
|
|
252
|
+
status: "fail",
|
|
253
|
+
detail: known?.detail ?? "A license key is set but did not validate as Pro.",
|
|
254
|
+
fix: known?.fix ??
|
|
255
|
+
`Check the key, or have it emailed again at ${license_js_1.LICENSE_API_URL}/key.`,
|
|
256
|
+
});
|
|
249
257
|
}
|
|
250
258
|
}
|
|
251
259
|
const healthy = !checks.some((c) => c.status === "fail");
|
package/dist/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAiCH,sCAKC;AAcD,
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../src/doctor.ts"],"names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C1B,CAAC"}
|
package/dist/editable.d.ts
CHANGED
|
@@ -6,4 +6,22 @@
|
|
|
6
6
|
* Import this everywhere instead of redefining.
|
|
7
7
|
*/
|
|
8
8
|
export declare const EDITABLE_VERSION_STATES: Set<string>;
|
|
9
|
+
interface VersionLike {
|
|
10
|
+
attributes: {
|
|
11
|
+
appStoreState: string;
|
|
12
|
+
platform?: string;
|
|
13
|
+
versionString?: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Which version a write is about. An app can have iOS and macOS versions in
|
|
18
|
+
* progress at once, and each tool used to take the first it saw, so a fix for a
|
|
19
|
+
* macOS finding could land on iOS and report success. With one platform in
|
|
20
|
+
* progress this is that version, exactly as before; with more, the caller must say.
|
|
21
|
+
*/
|
|
22
|
+
export declare function pickEditableVersion<T extends VersionLike>(versions: T[], platform?: string): {
|
|
23
|
+
version: T | null;
|
|
24
|
+
refusal?: string;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
9
27
|
//# sourceMappingURL=editable.d.ts.map
|
package/dist/editable.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["../src/editable.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,aAQlC,CAAC"}
|
|
1
|
+
{"version":3,"file":"editable.d.ts","sourceRoot":"","sources":["../src/editable.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,aAQlC,CAAC;AAEH,UAAU,WAAW;IACnB,UAAU,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAClF;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,WAAW,EACvD,QAAQ,EAAE,CAAC,EAAE,EACb,QAAQ,CAAC,EAAE,MAAM,GAChB;IAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAczC"}
|
package/dist/editable.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EDITABLE_VERSION_STATES = void 0;
|
|
4
|
+
exports.pickEditableVersion = pickEditableVersion;
|
|
4
5
|
/**
|
|
5
6
|
* The single definition of which App Store version states are still editable
|
|
6
7
|
* (metadata writable, build attachable, submittable). Previously each tool kept
|
|
@@ -17,4 +18,26 @@ exports.EDITABLE_VERSION_STATES = new Set([
|
|
|
17
18
|
// attached and the version resubmitted.
|
|
18
19
|
"INVALID_BINARY",
|
|
19
20
|
]);
|
|
21
|
+
/**
|
|
22
|
+
* Which version a write is about. An app can have iOS and macOS versions in
|
|
23
|
+
* progress at once, and each tool used to take the first it saw, so a fix for a
|
|
24
|
+
* macOS finding could land on iOS and report success. With one platform in
|
|
25
|
+
* progress this is that version, exactly as before; with more, the caller must say.
|
|
26
|
+
*/
|
|
27
|
+
function pickEditableVersion(versions, platform) {
|
|
28
|
+
const open = versions.filter((v) => v && exports.EDITABLE_VERSION_STATES.has(v.attributes.appStoreState));
|
|
29
|
+
const named = open.map((v) => `v${v.attributes.versionString ?? "?"} (${v.attributes.platform ?? "unknown platform"})`).join(", ");
|
|
30
|
+
if (platform) {
|
|
31
|
+
const match = open.find((v) => v.attributes.platform === platform);
|
|
32
|
+
if (match)
|
|
33
|
+
return { version: match };
|
|
34
|
+
return open.length
|
|
35
|
+
? { version: null, refusal: `Nothing was changed: no version is in progress on ${platform}. In progress: ${named}.` }
|
|
36
|
+
: { version: null };
|
|
37
|
+
}
|
|
38
|
+
if (new Set(open.map((v) => v.attributes.platform)).size > 1) {
|
|
39
|
+
return { version: null, refusal: `Nothing was changed: this app has versions in progress on more than one platform: ${named}. Pass platform to say which one.` };
|
|
40
|
+
}
|
|
41
|
+
return { version: open[0] ?? null };
|
|
42
|
+
}
|
|
20
43
|
//# sourceMappingURL=editable.js.map
|
package/dist/editable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editable.js","sourceRoot":"","sources":["../src/editable.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"editable.js","sourceRoot":"","sources":["../src/editable.ts"],"names":[],"mappings":";;;AA2BA,kDAiBC;AA5CD;;;;;;GAMG;AACU,QAAA,uBAAuB,GAAG,IAAI,GAAG,CAAC;IAC7C,wBAAwB;IACxB,oBAAoB;IACpB,UAAU;IACV,mBAAmB;IACnB,2EAA2E;IAC3E,wCAAwC;IACxC,gBAAgB;CACjB,CAAC,CAAC;AAMH;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,QAAa,EACb,QAAiB;IAEjB,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,+BAAuB,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC;IAClG,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,aAAa,IAAI,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,QAAQ,IAAI,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnI,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;QACnE,IAAI,KAAK;YAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACrC,OAAO,IAAI,CAAC,MAAM;YAChB,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,qDAAqD,QAAQ,kBAAkB,KAAK,GAAG,EAAE;YACrH,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACxB,CAAC;IACD,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;QAC7D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,qFAAqF,KAAK,mCAAmC,EAAE,CAAC;IACnK,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC;AACtC,CAAC"}
|
package/dist/gate.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
2
2
|
import type { Tier } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* The direct Polar checkout link. Kept in the package even though the normal
|
|
5
|
-
* path is the counted redirect below, so a
|
|
5
|
+
* path is the counted redirect below, so a license-server outage costs us
|
|
6
6
|
* attribution rather than the sale. Moving the product to a different Polar
|
|
7
7
|
* organization changes it, and the old link keeps working, so a missed copy
|
|
8
8
|
* silently sells into the wrong org: `scripts/set-checkout-url.mjs` rewrites
|
|
@@ -26,7 +26,7 @@ export declare const UPGRADE_URL: string;
|
|
|
26
26
|
*/
|
|
27
27
|
export declare const PRO_PRICE = "$9/month (VAT included; in the US, Canada and India sales tax is added at checkout)";
|
|
28
28
|
/**
|
|
29
|
-
* How many Pro calls work on this machine with no
|
|
29
|
+
* How many Pro calls work on this machine with no license, as a preview.
|
|
30
30
|
*
|
|
31
31
|
* Until 1.9.14 the gate came down on the second useful call: reviews, sales and
|
|
32
32
|
* build status were all locked, so nobody on the free tier saw the product do
|
package/dist/gate.js
CHANGED
|
@@ -12,7 +12,7 @@ const license_js_1 = require("./license.js");
|
|
|
12
12
|
const tool_meta_js_1 = require("./tool-meta.js");
|
|
13
13
|
/**
|
|
14
14
|
* The direct Polar checkout link. Kept in the package even though the normal
|
|
15
|
-
* path is the counted redirect below, so a
|
|
15
|
+
* path is the counted redirect below, so a license-server outage costs us
|
|
16
16
|
* attribution rather than the sale. Moving the product to a different Polar
|
|
17
17
|
* organization changes it, and the old link keeps working, so a missed copy
|
|
18
18
|
* silently sells into the wrong org: `scripts/set-checkout-url.mjs` rewrites
|
|
@@ -39,7 +39,7 @@ exports.UPGRADE_URL = upgradeUrl();
|
|
|
39
39
|
*/
|
|
40
40
|
exports.PRO_PRICE = "$9/month (VAT included; in the US, Canada and India sales tax is added at checkout)";
|
|
41
41
|
/**
|
|
42
|
-
* How many Pro calls work on this machine with no
|
|
42
|
+
* How many Pro calls work on this machine with no license, as a preview.
|
|
43
43
|
*
|
|
44
44
|
* Until 1.9.14 the gate came down on the second useful call: reviews, sales and
|
|
45
45
|
* build status were all locked, so nobody on the free tier saw the product do
|
|
@@ -50,7 +50,7 @@ exports.PRO_PRICE = "$9/month (VAT included; in the US, Canada and India sales t
|
|
|
50
50
|
exports.PREVIEW_CALLS = 5;
|
|
51
51
|
/**
|
|
52
52
|
* Pro tools that read but are not part of the preview. The first two work
|
|
53
|
-
* through the client's own model (MCP sampling) and report a missing
|
|
53
|
+
* through the client's own model (MCP sampling) and report a missing license
|
|
54
54
|
* inside a structured result rather than by returning the gate. The next two
|
|
55
55
|
* return Apple's manual steps for a submission; they show nothing of the
|
|
56
56
|
* product, and spending a preview call on a checklist would be a poor trade.
|
|
@@ -145,7 +145,7 @@ function requirePro(tier, capability, tool) {
|
|
|
145
145
|
return null;
|
|
146
146
|
// Someone whose trial has already run out must not be told to start one. They
|
|
147
147
|
// would call asc_start_trial, be refused, and reasonably conclude the thing is
|
|
148
|
-
// broken. `reason` comes from the
|
|
148
|
+
// broken. `reason` comes from the license server's last verdict on their key.
|
|
149
149
|
const spent = (0, license_js_1.lastLicenseStatus)()?.reason === "trial_expired";
|
|
150
150
|
// A former subscriber must not be offered a free trial either. Someone whose
|
|
151
151
|
// renewal was declined, or who cancelled, is refused by the trial endpoint
|
|
@@ -184,8 +184,8 @@ function requirePro(tier, capability, tool) {
|
|
|
184
184
|
`Pro is ${exports.PRO_PRICE}, cancel any time:\n` +
|
|
185
185
|
` ${upgradeUrl(tool)}\n` +
|
|
186
186
|
` (direct link: ${exports.CHECKOUT_URL})\n\n` +
|
|
187
|
-
"If you already subscribed, call `asc_start_trial` with the same email and
|
|
188
|
-
"
|
|
187
|
+
"If you already subscribed, call `asc_start_trial` with the same email and your paid key " +
|
|
188
|
+
"is emailed to that address.\n"
|
|
189
189
|
: (previewSpent ? `You have used the ${exports.PREVIEW_CALLS} free Pro calls on this machine. ` : "") +
|
|
190
190
|
`Pro is ${exports.PRO_PRICE}, cancel any time:\n` +
|
|
191
191
|
` ${upgradeUrl(tool)}\n` +
|
|
@@ -197,7 +197,7 @@ function requirePro(tier, capability, tool) {
|
|
|
197
197
|
/**
|
|
198
198
|
* The last line of the gate message.
|
|
199
199
|
*
|
|
200
|
-
* A key that is set but never validated means the
|
|
200
|
+
* A key that is set but never validated means the license server could not be
|
|
201
201
|
* reached, and validation fails open to the free tier. Telling that person to
|
|
202
202
|
* "set ASC_LICENSE_KEY" sends a paying customer to check a config that is
|
|
203
203
|
* already correct, during an outage that is ours.
|
|
@@ -206,7 +206,7 @@ function keyAdvice() {
|
|
|
206
206
|
const keySet = Boolean(process.env.ASC_LICENSE_KEY);
|
|
207
207
|
if (keySet && (0, license_js_1.lastLicenseStatus)() === null) {
|
|
208
208
|
return ("ASC_LICENSE_KEY is set but could not be checked, so the license server is probably " +
|
|
209
|
-
"unreachable from here.
|
|
209
|
+
"unreachable from here. That says nothing about your key. Retry in a moment, or check status at " +
|
|
210
210
|
`${license_js_1.LICENSE_API_URL}/health`);
|
|
211
211
|
}
|
|
212
212
|
// A one-click install has no server block in any client config file, so
|
package/dist/gate.js.map
CHANGED
|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,GAAG,CAAC,WAAW,KAAK,QAAQ;YACpC,CAAC,CAAC,wFAAwF;YAC1F,CAAC,CAAC,oEAAoE,CAAC;AAC7E,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -172,7 +172,18 @@ async function main() {
|
|
|
172
172
|
`Keep them for ${gate_js_1.PRO_PRICE}: ${gate_js_1.UPGRADE_URL}`);
|
|
173
173
|
}
|
|
174
174
|
else {
|
|
175
|
-
|
|
175
|
+
// Same split as the gate: a trial or subscription that ended is refused a new
|
|
176
|
+
// trial, and a key that got no answer is an outage, not the free tier.
|
|
177
|
+
const after = (0, license_js_1.lastLicenseStatus)();
|
|
178
|
+
const ended = after?.reason === "trial_expired" || after?.reason === "revoked" || after?.reason === "canceled" || after?.reason === "inactive";
|
|
179
|
+
const unchecked = Boolean(process.env.ASC_LICENSE_KEY) && after === null;
|
|
180
|
+
console.error(unchecked
|
|
181
|
+
? `asc-mcp ${exports.SERVER_VERSION}: A license key is set and the license server gave no answer, so Pro tools are locked for now. It asks again on your next tool call.`
|
|
182
|
+
: after && !after.valid && !ended && process.env.ASC_LICENSE_KEY
|
|
183
|
+
? `asc-mcp ${exports.SERVER_VERSION}: Free tier. This license key was not recognized: have it emailed again at ${license_js_1.LICENSE_API_URL}/key.`
|
|
184
|
+
: ended
|
|
185
|
+
? `asc-mcp ${exports.SERVER_VERSION}: Free tier, this license has ended. Pro is ${gate_js_1.PRO_PRICE}: ${gate_js_1.UPGRADE_URL}`
|
|
186
|
+
: `asc-mcp ${exports.SERVER_VERSION}: Free tier. Call asc_start_trial for 7 days of Pro, no card. Or subscribe at ${gate_js_1.UPGRADE_URL}`);
|
|
176
187
|
}
|
|
177
188
|
const server = new mcp_js_1.McpServer({
|
|
178
189
|
name: "asc-mcp",
|
|
@@ -182,16 +193,37 @@ async function main() {
|
|
|
182
193
|
tools: {},
|
|
183
194
|
prompts: {},
|
|
184
195
|
},
|
|
185
|
-
instructions: instructions_js_1.
|
|
196
|
+
instructions: (0, instructions_js_1.instructionsFor)(tier, (0, license_js_1.lastLicenseStatus)()?.reason, Boolean(process.env.ASC_LICENSE_KEY) && (0, license_js_1.lastLicenseStatus)() === null),
|
|
186
197
|
});
|
|
187
198
|
// --- Free tools ---
|
|
188
199
|
const tool = annotated(server);
|
|
200
|
+
/**
|
|
201
|
+
* `tier` was decided once, at startup. A key that got no answer then stayed on
|
|
202
|
+
* the free path for the whole session after the server came back: a subscriber
|
|
203
|
+
* was counted down free calls and offered a trial. So a key with no verdict asks
|
|
204
|
+
* again, at most this often, and any verdict reached since startup is adopted.
|
|
205
|
+
*/
|
|
206
|
+
const LICENSE_RETRY_MS = 30_000;
|
|
207
|
+
let lastLicenseRetry = 0;
|
|
208
|
+
async function refreshTier() {
|
|
209
|
+
const key = process.env.ASC_LICENSE_KEY;
|
|
210
|
+
if (tier === "pro" || !key)
|
|
211
|
+
return;
|
|
212
|
+
if ((0, license_js_1.lastLicenseStatus)() === null && Date.now() - lastLicenseRetry >= LICENSE_RETRY_MS) {
|
|
213
|
+
lastLicenseRetry = Date.now();
|
|
214
|
+
tier = await (0, license_js_1.validateLicense)(key);
|
|
215
|
+
}
|
|
216
|
+
else if ((0, license_js_1.lastLicenseStatus)()?.valid && (0, license_js_1.lastLicenseStatus)()?.tier === "pro") {
|
|
217
|
+
tier = "pro";
|
|
218
|
+
}
|
|
219
|
+
}
|
|
189
220
|
/** Wrap a tool handler so API errors return messages instead of crashing. */
|
|
190
221
|
function safe(fn) {
|
|
191
222
|
// Each call runs in its own preview scope, so a preview the gate grants
|
|
192
223
|
// inside it is reported on this reply and no other.
|
|
193
224
|
return (...a) => gate_js_1.previewScope.run({ grant: null }, async () => {
|
|
194
225
|
try {
|
|
226
|
+
await refreshTier();
|
|
195
227
|
const body = await fn(...a);
|
|
196
228
|
// Only ever non-null for a free-tier call the gate let through as a
|
|
197
229
|
// preview. A Pro reply is returned exactly as the tool produced it.
|
|
@@ -219,21 +251,9 @@ async function main() {
|
|
|
219
251
|
}
|
|
220
252
|
tool("asc_guide", "START HERE. Returns the exact end-to-end playbook for an App Store task, with every manual ASC-website/Xcode step that no API can do flagged inline. Call with topic to orient before any multi-step flow. Free.", {
|
|
221
253
|
topic: zod_1.z
|
|
222
|
-
.
|
|
223
|
-
"overview",
|
|
224
|
-
"setup",
|
|
225
|
-
"first-app",
|
|
226
|
-
"update",
|
|
227
|
-
"screenshots",
|
|
228
|
-
"iap",
|
|
229
|
-
"subscriptions",
|
|
230
|
-
"reviews",
|
|
231
|
-
"testflight",
|
|
232
|
-
"binary",
|
|
233
|
-
"limitations",
|
|
234
|
-
])
|
|
254
|
+
.string()
|
|
235
255
|
.optional()
|
|
236
|
-
.describe("Which playbook. Omit for the overview
|
|
256
|
+
.describe("Which playbook: overview, setup, first-app, update, screenshots, iap, subscriptions, reviews, testflight, binary or limitations. Omit for the overview."),
|
|
237
257
|
}, safe((args) => (0, guide_js_1.ascGuide)(args)));
|
|
238
258
|
tool("asc_setup_check", "Diagnose your setup: checks the .p8 key, Key ID, Issuer ID, a LIVE authenticated connection to App Store Connect, and your license tier. For anything wrong, returns the exact fix. Run this first if something isn't working. Free.", {}, safe(async () => (0, doctor_js_1.formatDoctor)(await (0, doctor_js_1.runDoctor)())));
|
|
239
259
|
server.registerTool("asc_start_trial", {
|
|
@@ -438,6 +458,7 @@ async function main() {
|
|
|
438
458
|
// --- Control / write tools (Pro, gated) ---
|
|
439
459
|
tool("update_version_metadata", "Edit App Store metadata on the editable version: description, keywords, what's-new, promotional text, marketing/support/privacy-policy URLs, plus app name and subtitle. Validates Apple character limits before writing. Pro feature.", {
|
|
440
460
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
461
|
+
platform: zod_1.z.enum(["IOS", "MAC_OS", "TV_OS", "VISION_OS"]).optional().describe("Which version, needed only when this app has versions in progress on more than one platform."),
|
|
441
462
|
locale: zod_1.z.string().optional().describe("Locale to edit (e.g. en-US). Default: first/primary locale."),
|
|
442
463
|
description: zod_1.z.string().optional().describe("App description (max 4000 chars)"),
|
|
443
464
|
keywords: zod_1.z.string().optional().describe("Comma-separated keywords (max 100 chars total)"),
|
|
@@ -472,10 +493,12 @@ async function main() {
|
|
|
472
493
|
}, safe((args) => (0, builds_js_1.waitForBuild)(client, args, tier)));
|
|
473
494
|
tool("attach_build", "Attach a build to the editable version (defaults to the newest processed build). Pro feature.", {
|
|
474
495
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
496
|
+
platform: zod_1.z.enum(["IOS", "MAC_OS", "TV_OS", "VISION_OS"]).optional().describe("Which version, needed only when this app has versions in progress on more than one platform."),
|
|
475
497
|
build_id: zod_1.z.string().optional().describe("Specific build ID (from list_builds). Omit for newest VALID build."),
|
|
476
498
|
}, safe((args) => (0, builds_js_1.attachBuild)(client, args, tier)));
|
|
477
499
|
tool("upload_screenshots", "Upload screenshots to a version localization for a device display type (e.g. APP_IPHONE_67). Handles Apple's reserve/upload/commit flow. Pro feature.", {
|
|
478
500
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
501
|
+
platform: zod_1.z.enum(["IOS", "MAC_OS", "TV_OS", "VISION_OS"]).optional().describe("Which version, needed only when this app has versions in progress on more than one platform."),
|
|
479
502
|
display_type: zod_1.z.string().describe("Device display type, e.g. APP_IPHONE_67, APP_IPHONE_65, APP_IPAD_PRO_3GEN_129"),
|
|
480
503
|
files: zod_1.z.array(zod_1.z.string()).describe("Absolute paths to PNG/JPEG screenshot files, in order"),
|
|
481
504
|
locale: zod_1.z.string().optional().describe("Locale (e.g. en-US). Default: first/primary locale."),
|
|
@@ -547,6 +570,7 @@ async function main() {
|
|
|
547
570
|
group_level: zod_1.z.number().optional().describe("Rank within the group (1 = top tier; default 1). Higher-value plans get a lower number."),
|
|
548
571
|
family_sharable: zod_1.z.boolean().optional().describe("Allow Family Sharing of this subscription (default false)."),
|
|
549
572
|
review_note: zod_1.z.string().optional().describe("Notes for App Review: how to reach the paywall, test instructions"),
|
|
573
|
+
confirm: zod_1.z.boolean().optional().describe("Required. This creates a real product on your App Store Connect account."),
|
|
550
574
|
}, safe((args) => (0, iap_js_1.createSubscription)(client, args, tier)));
|
|
551
575
|
tool("create_iap", "Create (idempotently) a one-time in-app purchase (non-consumable or consumable) with USA price. Pro feature.", {
|
|
552
576
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
@@ -559,6 +583,7 @@ async function main() {
|
|
|
559
583
|
locale: zod_1.z.string().optional().describe("Localization locale (default en-US)"),
|
|
560
584
|
family_sharable: zod_1.z.boolean().optional().describe("Allow Family Sharing of this purchase (default false)."),
|
|
561
585
|
review_note: zod_1.z.string().optional().describe("Notes for App Review: how to reach the paywall, test instructions"),
|
|
586
|
+
confirm: zod_1.z.boolean().optional().describe("Required. This creates a real product on your App Store Connect account."),
|
|
562
587
|
}, safe((args) => (0, iap_js_1.createIAP)(client, args, tier)));
|
|
563
588
|
tool("set_iap_review_screenshot", "Upload the App Review screenshot a subscription or in-app purchase needs to leave MISSING_METADATA. Resolves the product by product_id automatically. Pro feature.", {
|
|
564
589
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
@@ -567,6 +592,7 @@ async function main() {
|
|
|
567
592
|
}, safe((args) => (0, review_screenshot_js_1.setIapReviewScreenshot)(client, args, tier)));
|
|
568
593
|
tool("set_app_metadata", "Set submission-required app basics: primary/secondary category (appCategory ids like HEALTH_AND_FITNESS), copyright, content-rights declaration, and export compliance (encryption). Each applied only if provided. Pro feature.", {
|
|
569
594
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
595
|
+
platform: zod_1.z.enum(["IOS", "MAC_OS", "TV_OS", "VISION_OS"]).optional().describe("Which version, needed only when this app has versions in progress on more than one platform."),
|
|
570
596
|
primary_category: zod_1.z.string().optional().describe("Primary appCategory id, e.g. HEALTH_AND_FITNESS"),
|
|
571
597
|
secondary_category: zod_1.z.string().optional().describe("Secondary appCategory id"),
|
|
572
598
|
copyright: zod_1.z.string().optional().describe("Copyright line, e.g. 2026 Povilas Konopackas"),
|
|
@@ -582,9 +608,11 @@ async function main() {
|
|
|
582
608
|
tool("set_app_price", "Set the app's base price by creating its price schedule (USA base, auto-equalized). price_usd: 0 for free. Required before submission. Pro feature.", {
|
|
583
609
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
584
610
|
price_usd: zod_1.z.number().describe("0 for a free app, or a USA price tier in dollars"),
|
|
611
|
+
confirm: zod_1.z.boolean().optional().describe("Needed only to change a price this app already has: it applies to everyone buying from now on."),
|
|
585
612
|
}, safe((args) => (0, submission_js_1.setAppPrice)(client, args, tier)));
|
|
586
613
|
tool("set_review_contact", "Set the App Review contact and optional demo account on the editable version. Required before submission. Pro feature.", {
|
|
587
614
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|
|
615
|
+
platform: zod_1.z.enum(["IOS", "MAC_OS", "TV_OS", "VISION_OS"]).optional().describe("Which version, needed only when this app has versions in progress on more than one platform."),
|
|
588
616
|
first_name: zod_1.z.string().describe("Contact first name"),
|
|
589
617
|
last_name: zod_1.z.string().describe("Contact last name"),
|
|
590
618
|
phone: zod_1.z.string().describe("Contact phone (with country code)"),
|
|
@@ -611,6 +639,7 @@ async function main() {
|
|
|
611
639
|
.boolean()
|
|
612
640
|
.optional()
|
|
613
641
|
.describe("Auto-include future new territories (default true)"),
|
|
642
|
+
confirm: zod_1.z.boolean().optional().describe("Needed to turn territories off on an app that already has availability set: it stops sales there at once."),
|
|
614
643
|
}, safe((args) => (0, availability_js_1.setAppAvailability)(client, args, tier)));
|
|
615
644
|
tool("setup_app_store_signing", "Prepare App Store binary signing without the cloud-signing permission many API keys lack: downloads the app's IOS_APP_STORE provisioning profiles (app + extensions), installs them, and writes a manual-signing ExportOptions.plist for build_and_archive. Needs an Apple Distribution certificate already in the keychain. Pro feature.", {
|
|
616
645
|
app_id: zod_1.z.string().regex(/^\d+$/, "App ID must be numeric").describe("App Store Connect app ID"),
|